import{_ as H}from"./tslib@2.3.0-BDyQ-Jie.js";import{i as X,r as Wa,m as Y,a as N,b as $,c as Z,e as C,d as ue,f as ce,g as Po,h as ut,j as ye,k as Gg,l as W,n as q,P as Ce,o as ru,p as $n,q as qe,s as j,Z as Zr,t as Fg,u as Wg,v as oe,w as ze,x as Hg,T as Ug,y as Ns,z as lr,A as Yg,B as Xg,C as Zg,D as Mv,E as Iv,F as Ee,G as $g,H as vi,I as Q,J as hi,K as Lv,S as pr,R as Pv,L as zs,M as Kn,N as de,O as ur,Q as kv,U as Vs,V as Kg,W as Se,X as qg,Y as Rv,_ as Ev,$ as pe,a0 as jg,a1 as De,a2 as qn,a3 as Ov,a4 as Gs,a5 as J,a6 as bt,a7 as Ne,a8 as ne,a9 as ko,aa as We,ab as we,ac as ie,ad as Ha,ae as Qg,af as St,ag as Ro,ah as Jg,ai as em,aj as Bv,ak as tm,al as jn,am as nu,an as Ei,ao as rm,ap as Eo,aq as Ua,ar as nm,as as Fs,at as au,au as Oi,av as Nv,aw as In,ax as iu,ay as am,az as im,aA as om,aB as Oo,aC as ou,aD as sm,aE as lm,aF as um,aG as cm,aH as fm,aI as vm,aJ as hm,aK as su,aL as lu,aM as dm,aN as pm,aO as gm,aP as mm,aQ as ym,aR as _m,aS as Sm,aT as xm,aU as bm}from"./zrender@6.0.0-Dzb6jg8s.js";var wm=1e-4,zv=20;function Cm(r){return r.replace(/^\s+|\s+$/g,"")}var Ln=Math.min,Fe=Math.max,it=Math.abs;function Bt(r,e,t,n){var a=e[0],i=e[1],o=t[0],s=t[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}var se=Tm;function Tm(r,e,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 Bo(r,e,t)}function Bo(r,e,t){return X(r)?Cm(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function Le(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),zv),r=(+r).toFixed(e),t?r:+r}function Dm(r){return r.sort(function(e,t){return e-t}),r}function yt(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return Am(r)}function Am(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function Vv(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(it(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function Mm(r,e){var t=Wa(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=Y(r,function(v){return(isNaN(v)?0:v)/t*n*100}),i=n*100,o=Y(a,function(v){return Math.floor(v)}),s=Wa(o,function(v,d){return v+d},0),l=Y(a,function(v,d){return v-o[d]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return Y(o,function(v){return v/n})}function Im(r,e){var t=Math.max(yt(r),yt(e)),n=r+e;return t>zv?n:Le(n,t)}function Gv(r){var e=Math.PI*2;return(r%e+e)%e}function Ya(r){return r>-1e-4&&r=10&&e++,e}function Fv(r,e){var t=Ws(r),n=Math.pow(10,t),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,t>=-20?+r.toFixed(t<0?-t:0):r}function Ht(r){var e=parseFloat(r);return e==r&&(e!==0||!X(r)||r.indexOf("x")<=0)?e:NaN}function Wv(r){return!isNaN(Ht(r))}function Hv(){return Math.round(Math.random()*9)}function Uv(r,e){return e===0?r:Uv(e,r%e)}function uu(r,e){return r==null?e:e==null?r:r*e/Uv(r,e)}var km="[ECharts] ",Rm=typeof console<"u"&&console.warn&&console.log;function Em(r,e,t){Rm&&console[r](km+e)}function Yv(r,e){Em("error",r)}function re(r){throw new Error(r)}function cu(r,e,t){return(e-r)*t+r}var Xv="series\0",Zv="\0_ec_\0";function _e(r){return r instanceof Array?r:r==null?[]:[r]}function No(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,a=t.length;n=0||i&&ue(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var iy=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],oy=kn(iy),sy=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return oy(this,e,t)},r}(),ee=fe(),ly=function(r,e,t,n){if(n){var a=ee(n);a.dataIndex=t,a.dataType=e,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=ee(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},vu=1,hu={},Qv=fe(),Xs=fe(),Zs=0,pi=1,gi=2,Ke=["emphasis","blur","select"],Xa=["normal","emphasis","blur","select"],uy=10,cy=9,ir="highlight",ka="downplay",Za="select",zo="unselect",$a="toggleSelect",$s="selectchanged";function Sr(r){return r!=null&&r!=="none"}function mi(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function Jv(r){mi(r,"emphasis",gi)}function eh(r){r.hoverState===gi&&mi(r,"normal",Zs)}function Ks(r){mi(r,"blur",pi)}function th(r){r.hoverState===pi&&mi(r,"normal",Zs)}function fy(r){r.selected=!0}function vy(r){r.selected=!1}function du(r,e,t){e(r,t)}function wt(r,e,t){du(r,e,t),r.isGroup&&r.traverse(function(n){du(n,e,t)})}function pu(r,e){switch(e){case"emphasis":r.hoverState=gi;break;case"normal":r.hoverState=Zs;break;case"blur":r.hoverState=pi;break;case"select":r.selected=!0}}function hy(r,e,t,n){for(var a=r.style,i={},o=0;o=0,i=!1;if(r instanceof Ce){var o=Qv(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Sr(s)||Sr(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=W({},n),u=W({},u),u.fill=s):!Sr(u.fill)&&Sr(s)?(i=!0,n=W({},n),u=W({},u),u.fill=ru(s)):!Sr(u.stroke)&&Sr(l)&&(i||(n=W({},n),u=W({},u)),u.stroke=ru(l)),n.style=u}}if(n&&n.z2==null){i||(n=W({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??uy)}return n}function py(r,e,t){if(t&&t.z2==null){t=W({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??cy)}return t}function gy(r,e,t){var n=ue(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:hy(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=W({},t),o=W({opacity:n?a:i.opacity*.1},o),t.style=o),t}function Bi(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return dy(this,r,e,t);if(r==="blur")return gy(this,r,t);if(r==="select")return py(this,r,t)}return t}function my(r){r.stateProxy=Bi;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Bi),t&&(t.stateProxy=Bi)}function gu(r,e){!ih(r,e)&&!r.__highByOuter&&wt(r,Jv)}function mu(r,e){!ih(r,e)&&!r.__highByOuter&&wt(r,eh)}function zr(r,e){r.__highByOuter|=1<<(e||0),wt(r,Jv)}function Vr(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&wt(r,eh)}function yy(r){wt(r,Ks)}function rh(r){wt(r,th)}function nh(r){wt(r,fy)}function ah(r){wt(r,vy)}function ih(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function oh(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=Xs(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){th(u)}),s&&t.push(i)),o.isBlured=!1}),C(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function Vo(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function Fo(r,e,t){sh(r,!0),wt(r,my),Ty(r,e,t)}function Cy(r){sh(r,!1)}function fr(r,e,t,n){n?Cy(r):Fo(r,e,t)}function Ty(r,e,t){var n=ee(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var _u=["emphasis","blur","select"],Dy={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Rn(r,e,t,n){t=t||"itemStyle";for(var a=0;a<_u.length;a++){var i=_u[a],o=e.getModel([i,t]),s=r.ensureState(i);s.style=o[Dy[t]]()}}function sh(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function Wo(r){return!!(r&&r.__highDownDispatcher)}function Ay(r){var e=hu[r];return e==null&&vu<=32&&(e=hu[r]=vu++),e}function Ho(r){var e=r.type;return e===Za||e===zo||e===$a}function Su(r){var e=r.type;return e===ir||e===ka}function My(r){var e=Qv(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var lh=fe();function yi(r,e,t,n,a){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=j(n.duration,200),c=j(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(c=i.easing),i.delay!=null&&(f=i.delay)),q(f)&&(f=f(t,a)),q(u)&&(u=u(t));var h={duration:u||0,delay:f,easing:c};return h}else return null}function js(r,e,t,n,a,i,o){var s=!1,l;q(a)?(o=i,i=a,a=null):$(a)&&(i=a.cb,o=a.during,s=a.isFrom,l=a.removeOpt,a=a.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=yi(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,v=c.easing,d={duration:f,delay:h||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Ae(r,e,t,n,a,i){js("update",r,e,t,n,a,i)}function Ve(r,e,t,n,a,i){js("enter",r,e,t,n,a,i)}function bn(r){if(!r.__zr)return!0;for(var e=0;eit(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function bu(r){return!r.isGroup}function By(r){return r.shape!=null}function hh(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){bu(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return By(o)&&(s.shape=Q(o.shape)),s}var i=n(r);e.traverse(function(o){if(bu(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Ae(o,l,t,ee(o).dataIndex)}}})}function dh(r,e){return Y(r,function(t){var n=t[0];n=Fe(n,e.x),n=Ln(n,e.x+e.width);var a=t[1];return a=Fe(a,e.y),a=Ln(a,e.y+e.height),[n,a]})}function Ny(r,e){var t=Fe(r.x,e.x),n=Ln(r.x+r.width,e.x+e.width),a=Fe(r.y,e.y),i=Ln(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function Si(r,e,t){var n=W({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),oe(a,t),new Zr(n)):Qs(r.replace("path://",""),n,t,"center")}function zy(r,e,t,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var m=Ni(v,d,c,f)/h;return!(m<0||m>1)}function Ni(r,e,t,n){return r*n-t*e}function Vy(r){return r<=1e-6&&r>=-1e-6}function Ka(r,e,t,n,a){return e==null||(ce(e)?ve[0]=ve[1]=ve[2]=ve[3]=e:(ve[0]=e[0],ve[1]=e[1],ve[2]=e[2],ve[3]=e[3]),n&&(ve[0]=Fe(0,ve[0]),ve[1]=Fe(0,ve[1]),ve[2]=Fe(0,ve[2]),ve[3]=Fe(0,ve[3])),t&&(ve[0]=-ve[0],ve[1]=-ve[1],ve[2]=-ve[2],ve[3]=-ve[3]),wu(r,ve,"x","width",3,1,a&&a[0]||0),wu(r,ve,"y","height",0,2,a&&a[1]||0)),r}var ve=[0,0,0,0];function wu(r,e,t,n,a,i,o){var s=e[i]+e[a],l=r[n];r[n]+=s,o=Fe(0,Ln(o,l)),r[n]=0?-e[a]:e[i]>=0?l+e[i]:it(s)>1e-8?(l-o)*e[a]/s:0):r[t]-=e[a]}function ea(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=X(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&C(qe(l),function(c){ze(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ee(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:oe({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function Yo(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function ta(r,e){if(r)if(N(r))for(var t=0;te&&(e=o),oe&&(t=e=0),{min:t,max:e}}function gh(r,e,t){mh(r,e,t,-1/0)}function mh(r,e,t,n){if(r.ignoreModelZ)return n;var a=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function al(r,e){return J(J({},r,!0),e,!0)}const e0={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:". "}}}},t0={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 ja="ZH",il="EN",Or=il,Ea={},ol={},xh=ye.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Or).toUpperCase();return r.indexOf(ja)>-1?ja:Or}():Or;function bh(r,e){r=r.toUpperCase(),ol[r]=new he(e),Ea[r]=e}function r0(r){if(X(r)){var e=Ea[r.toUpperCase()]||{};return r===ja||r===il?Q(e):J(Q(e),Q(Ea[Or]),!1)}else return J(Q(r),Q(Ea[Or]),!1)}function n0(r){return ol[r]}function a0(){return ol[Or]}bh(il,e0);bh(ja,t0);var i0=null;function Qa(){return i0}var sl=1e3,ll=sl*60,Cn=ll*60,$e=Cn*24,Lu=$e*365,o0={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Oa={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},s0="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",ca="{yyyy}-{MM}-{dd}",Pu={year:"{yyyy}",month:"{yyyy}-{MM}",day:ca,hour:ca+" "+Oa.hour,minute:ca+" "+Oa.minute,second:ca+" "+Oa.second,millisecond:s0},or=["year","month","day","hour","minute","second","millisecond"],l0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function u0(r){return!X(r)&&!q(r)?c0(r):r}function c0(r){r=r||{};var e={},t=!0;return C(or,function(n){t&&(t=r[n]==null)}),C(or,function(n,a){var i=r[n];e[n]={};for(var o=null,s=a;s>=0;s--){var l=or[s],u=$(i)&&!N(i)?i[l]:i,c=void 0;N(u)?(c=u.slice(),o=c[0]||""):X(u)?(o=u,c=[o]):(o==null?o=Oa[n]:o0[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],t&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function At(r,e){return r+="","0000".substr(0,e-r.length)+r}function Tn(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 f0(r){return r===Tn(r)}function v0(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function wi(r,e,t,n){var a=$r(r),i=a[wh(t)](),o=a[ul(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[cl(t)](),u=a["get"+(t?"UTC":"")+"Day"](),c=a[fl(t)](),f=(c-1)%12+1,h=a[vl(t)](),v=a[hl(t)](),d=a[dl(t)](),p=c>=12?"pm":"am",m=p.toUpperCase(),g=n instanceof he?n:n0(n||xh)||a0(),y=g.getModel("time"),_=y.get("month"),S=y.get("monthAbbr"),b=y.get("dayOfWeek"),x=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,At(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,At(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,At(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,At(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,At(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,At(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,At(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,At(d,3)).replace(/{S}/g,d+"")}function h0(r,e,t,n,a){var i=null;if(X(t))i=t;else if(q(t)){var o={time:r.time,level:r.time.level},s=Qa();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var c=Ja(r.value,a);i=t[c][c][0]}}return wi(new Date(r.value),i,a,n)}function Ja(r,e){var t=$r(r),n=t[ul(e)]()+1,a=t[cl(e)](),i=t[fl(e)](),o=t[vl(e)](),s=t[hl(e)](),l=t[dl(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&i===0,v=h&&a===1,d=v&&n===1;return d?"year":v?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Xo(r,e,t){switch(e){case"year":r[Ch(t)](0);case"month":r[Th(t)](1);case"day":r[Dh(t)](0);case"hour":r[Ah(t)](0);case"minute":r[Mh(t)](0);case"second":r[Ih(t)](0)}return r}function wh(r){return r?"getUTCFullYear":"getFullYear"}function ul(r){return r?"getUTCMonth":"getMonth"}function cl(r){return r?"getUTCDate":"getDate"}function fl(r){return r?"getUTCHours":"getHours"}function vl(r){return r?"getUTCMinutes":"getMinutes"}function hl(r){return r?"getUTCSeconds":"getSeconds"}function dl(r){return r?"getUTCMilliseconds":"getMilliseconds"}function d0(r){return r?"setUTCFullYear":"setFullYear"}function Ch(r){return r?"setUTCMonth":"setMonth"}function Th(r){return r?"setUTCDate":"setDate"}function Dh(r){return r?"setUTCHours":"setHours"}function Ah(r){return r?"setUTCMinutes":"setMinutes"}function Mh(r){return r?"setUTCSeconds":"setSeconds"}function Ih(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Lh(r){if(!Wv(r))return X(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Ph(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ci=Ov;function Zo(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&qn(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?$r(r):r;if(isNaN(+l)){if(s)return"-"}else return wi(l,n,t)}if(e==="ordinal")return Po(r)?a(r):ce(r)&&i(r)?r+"":"-";var u=Ht(r);return i(u)?Lh(u):Po(r)?a(r):typeof r=="boolean"?r+"":"-"}var ku=["a","b","c","d","e","f","g"],Gi=function(r,e){return"{"+r+(e??"")+"}"};function kh(r,e,t){N(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i':'';var o=t.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 vr(r,e){return e=e||"transparent",X(r)?r:$(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Ru(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Ba={},Fi={},pl=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Ba),this._normalMasterList=n(Fi);function n(a,i){var o=[];return C(a,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){C(this._normalMasterList,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){Ba[e]=t;return}Fi[e]=t},r.get=function(e){return Fi[e]||Ba[e]},r}();function g0(r){return!!Ba[r]}var $o={coord:1,coord2:2};function m0(r){Rh.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var Rh=Z();function y0(r){var e=r.getShallow("coord",!0),t=$o.coord;if(e==null){var n=Rh.get(r.type);n&&n.getCoord2&&(t=$o.coord2,e=n.getCoord2(r))}return{coord:e,from:t}}var mt={none:0,dataCoordSys:1,boxCoordSys:2};function _0(r,e){var t=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),a=mt.none;if(t){var i=r.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=mt.dataCoordSys,i||(a=mt.none)):n==="box"&&(a=mt.boxCoordSys,!i&&!g0(t)&&(a=mt.none))}return{coordSysType:t,kind:a}}function S0(r){var e=r.targetModel,t=r.coordSysType,n=r.coordSysProvider,a=r.isDefaultDataCoordSys,i=_0(e),o=i.kind,s=i.coordSysType;if(a&&o!==mt.dataCoordSys&&(o=mt.dataCoordSys,s=t),o===mt.none||s!==t)return!1;var l=n(t,e);return l?(o===mt.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var Na=C,x0=["left","right","top","bottom","width","height"],fa=[["width","left","right"],["height","top","bottom"]];function gl(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),v,d;if(r==="horizontal"){var p=c.width+(h?-h.x+c.x:0);v=i+p,v>n||l.newline?(i=0,v=p,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);d=o+m,d>a||l.newline?(i+=s+t,o=0,d=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+t:o=d+t)})}var Br=gl;ne(gl,"vertical");ne(gl,"horizontal");function b0(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function w0(r,e){var t=na(r,e,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),a,i;if(t.type===pn.point)i=t.refPoint,a=ct(n,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=N(o)?o:[o,o];a=ct(n,t.refContainer),i=t.boxCoordFrom===$o.coord2?t.refPoint:[se(s[0],a.width)+a.x,se(s[1],a.height)+a.y]}return{viewRect:a,center:i}}function C0(r,e){var t=w0(r,e),n=t.viewRect,a=t.center,i=r.get("radius");N(i)||(i=[0,i]);var o=se(n.width,e.getWidth()),s=se(n.height,e.getHeight()),l=Math.min(o,s),u=se(i[0],l/2),c=se(i[1],l/2);return{cx:a[0],cy:a[1],r0:u,r:c,viewRect:n}}function ct(r,e,t){t=Ci(t||0);var n=e.width,a=e.height,i=se(r.left,n),o=se(r.top,a),s=se(r.right,n),l=se(r.bottom,a),u=se(r.width,n),c=se(r.height,a),f=t[2]+t[0],h=t[1]+t[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-h-i),isNaN(c)&&(c=a-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/a?u=n*.8:c=a*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(i)&&(i=n-s-u-h),isNaN(o)&&(o=a-l-c-f),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-c/2-t[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var d=new Ee((e.x||0)+i+t[3],(e.y||0)+o+t[0],u,c);return d.margin=t,d}var pn={rect:1,point:2};function na(r,e,t){var n,a,i,o=r.boxCoordinateSystem,s;if(o){var l=y0(r),u=l.coord,c=l.from;if(o.dataToLayout){i=pn.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else t&&t.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=pn.point,s=c,a=o.dataToPoint(u))}return i==null&&(i=pn.rect),i===pn.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),a=[n.x+n.width/2,n.y+n.height/2]),{type:i,refContainer:n,refPoint:a,boxCoordFrom:s}}function T0(r,e,t,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=ct(oe({width:o.width,height:o.height},e),t,n),u=l.x-o.x,c=l.y-o.y;return i.x+=u,i.y+=c,i===r&&r.markRedraw(),!0}function Nn(r){var e=r.layoutMode||r.constructor.layoutMode;return $(e)?e:e?{type:e}:null}function Yt(r,e,t){var n=t&&t.ignoreSize;!N(n)&&(n=[n,n]);var a=o(fa[0],0),i=o(fa[1],1);l(fa[0],r,a),l(fa[1],r,i);function o(u,c){var f={},h=0,v={},d=0,p=2;if(Na(u,function(y){v[y]=r[y]}),Na(u,function(y){ze(e,y)&&(f[y]=v[y]=e[y]),s(f,y)&&h++,s(v,y)&&d++}),n[c])return s(e,u[1])?v[u[2]]=null:s(e,u[2])&&(v[u[1]]=null),v;if(d===p||!h)return v;if(h>=p)return f;for(var m=0;m=0;l--)s=J(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return Jn(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){return b0(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(he);jv(ae,he);di(ae);Qy(ae);Jy(ae,M0);function M0(r){var e=[];return C(ae.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=Y(e,function(t){return ot(t).main}),r!=="dataset"&&ue(e,"dataset")<=0&&e.unshift("dataset"),e}var z={color:{},darkColor:{},size:{}},ge=z.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};W(ge,{primary:ge.neutral80,secondary:ge.neutral70,tertiary:ge.neutral60,quaternary:ge.neutral50,disabled:ge.neutral20,border:ge.neutral30,borderTint:ge.neutral20,borderShade:ge.neutral40,background:ge.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:ge.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:ge.neutral70,axisLineTint:ge.neutral40,axisTick:ge.neutral70,axisTickMinor:ge.neutral60,axisLabel:ge.neutral70,axisSplitLine:ge.neutral15,axisMinorSplitLine:ge.neutral05});for(var jt in ge)if(ge.hasOwnProperty(jt)){var Eu=ge[jt];jt==="theme"?z.darkColor.theme=ge.theme.slice():jt==="highlight"?z.darkColor.highlight="rgba(255,231,130,0.4)":jt.indexOf("accent")===0?z.darkColor[jt]=ko(Eu,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):z.darkColor[jt]=ko(Eu,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}z.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Eh="";typeof navigator<"u"&&(Eh=navigator.platform||"");var xr="rgba(0, 0, 0, 0.2)",Oh=z.color.theme[0],I0=ko(Oh,null,null,.9);const L0={darkMode:"auto",colorBy:"series",color:z.color.theme,gradientColor:[I0,Oh],aria:{decal:{decals:[{color:xr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:xr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:xr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:xr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:xr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:xr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Eh.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 Bh=Z(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ue="original",Pe="arrayRows",Ye="objectRows",nt="keyedColumns",Ft="typedArray",Nh="unknown",et="column",gr="row",Me={Must:1,Might:2,Not:3},zh=fe();function P0(r){zh(r).datasetMap=Z()}function Vh(r,e,t){var n={},a=ml(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=zh(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),C(r,function(p,m){var g=$(p)?p:r[m]={name:p};g.type==="ordinal"&&c==null&&(c=m,f=d(g)),n[g.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});C(r,function(p,m){var g=p.name,y=d(p);if(c==null){var _=h.valueWayDim;v(n[g],_,y),v(o,_,y),h.valueWayDim+=y}else if(c===m)v(n[g],0,y),v(i,0,y);else{var _=h.categoryWayDim;v(n[g],_,y),v(o,_,y),h.categoryWayDim+=y}});function v(p,m,g){for(var y=0;ye)return r[n];return r[t-1]}function Wh(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!n?t:N0(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function z0(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var va,tn,Nu,zu="\0_ec_inner",V0=1,_l=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new he(i),this._locale=new he(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){var i=Fu(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,Fu(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?Nu(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&C(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=Z(),u=n&&n.replaceMergeMainTypeMap;P0(this),C(t,function(f,h){f!=null&&(ae.hasClass(h)?h&&(s.push(h),l.set(h,!0)):a[h]=a[h]==null?Q(f):J(a[h],f,!0))}),u&&u.each(function(f,h){ae.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),ae.topologicalTravel(s,ae.getAllClassMainTypes(),c,this);function c(f){var h=O0(this,f,_e(t[f])),v=i.get(f),d=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=Bm(v,h,d);Um(p,f,ae),a[f]=null,i.set(f,null),o.set(f,0);var m=[],g=[],y=0,_;C(p,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=f==="series",D=ae.getClass(f,S.keyInfo.subType,!T);if(!D)return;if(f==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===D)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var M=W({componentIndex:b},S.keyInfo);x=new D(w,this,this,M),W(x,M),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(m.push(x.option),g.push(x),y++):(m.push(void 0),g.push(void 0))},this),a[f]=m,i.set(f,g),o.set(f,y),f==="series"&&va(this)}this._seriesIndices||va(this)},e.prototype.getOption=function(){var t=Q(this.option);return C(t,function(n,a){if(ae.hasClass(a)){for(var i=_e(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Pn(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[zu],t},e.prototype.setTheme=function(t){this._theme=new he(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function $0(r,e){return r.join(",")===e.join(",")}var je=C,zn=$,Wu=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Wi(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=Wu.length;t0?t[o-1].seriesModel:null)}),n_(t)}})}function n_(r){C(r,function(e,t){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return a;var v,d;s?d=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var p=NaN,m=t-1;m>=0;m--){var g=r[m];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,v)),d>=0){var y=g.data.getByRawIndex(g.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=Im(h,y),p=y;break}}}return n[0]=h,n[1]=p,n})})}var Ti=function(){function r(e){this.data=e.data||(e.sourceFormat===nt?{}:[]),this.sourceFormat=e.sourceFormat||Nh,this.seriesLayoutBy=e.seriesLayoutBy||et,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;np&&(p=_)}v[0]=d,v[1]=p}},a=function(){return this._data?this._data.length/this._dimSize:0};Ku=(e={},e[Pe+"_"+et]={pure:!0,appendData:i},e[Pe+"_"+gr]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Ye]={pure:!0,appendData:i},e[nt]={pure:!0,appendData:function(o){var s=this._data;C(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Ue]={appendData:i},e[Ft]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s=0&&(p=o.interpolatedValue[m])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(e,t){return Fr(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function Ju(r){var e,t;return $(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Dn(r){return new v_(r)}var v_=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._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&&(f||v1&&n>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},d_=function(){function r(e,t){if(!ce(t)){var n="";re(n)}this._opFn=ed[e],this._rvalFloat=Ht(t)}return r.prototype.evaluate=function(e){return ce(e)?this._opFn(e,this._rvalFloat):this._opFn(Ht(e),this._rvalFloat)},r}(),td=function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=ce(e)?e:Ht(e),a=ce(t)?t:Ht(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=X(e),l=X(t);s&&(n=l?e:0),l&&(a=s?t:0)}return na?-this._resultLT:0},r}(),p_=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ht(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=Ht(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function g_(r,e){return r==="eq"||r==="ne"?new p_(r==="eq",e):ze(ed,r)?new d_(r,e):null}var m_=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return za(e,t)},r}();function y_(r,e){var t=new m_,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==et&&re(o);var s=[],l={},u=r.dimensionsDefine;if(u)C(u,function(p,m){var g=p.name,y={index:m,name:g,displayName:p.displayName};if(s.push(y),g!=null){var _="";ze(l,g)&&re(_),l[g]=y}});else for(var c=0;c65535?D_:A_}function wr(){return[1/0,-1/0]}function M_(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function rc(r,e,t,n,a){var i=ad[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;um[1]&&(m[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Y(o,function(y){return y.property}),c=0;cg[1]&&(g[1]=m)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i=f&&y<=h||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var m=v[a[0]],_=v[a[1]],S=e[a[1]][0],b=e[a[1]][1],g=0;g=f&&y<=h||isNaN(y))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var g=0;g=f&&y<=h||isNaN(y))&&(l[u++]=w)}else for(var g=0;ge[M][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(g))}return ug[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,h,v=new(br(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;dc&&(c=f,h=S)}A>0&&As&&(p=s-c);for(var m=0;md&&(d=y,v=c+m)}var _=this.getRawIndex(f),S=this.getRawIndex(v);fc-d&&(l=c-d,s.length=l);for(var p=0;pf[1]&&(f[1]=g),h[v++]=y}return i._count=v,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();il&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,a,i){return za(t[i],this._dimensions[i])}Yi={arrayRows:e,objectRows:function(t,n,a,i){return za(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return za(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}}(),r}(),id=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,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 e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(da(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=We(s)?Ft:Ue,i=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=j(f.seriesLayoutBy,h.seriesLayoutBy)||null,d=j(f.sourceHeader,h.sourceHeader),p=j(f.dimensions,h.dimensions),m=v!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||p;a=m?[qo(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var g=e;if(n){var y=this._applyTransform(t);a=y.sourceList,i=y.upstreamSignList}else{var _=g.get("source",!0);a=[qo(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(a!=null){var i="";e.length!==1&&ac(i)}var o,s=[],l=[];return C(e,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&ac(f),s.push(c),l.push(u._getVersionSign())}),n?o=C_(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[a_(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return C(r.blocks,function(a){var i=ud(a);i>=e&&(e=i+ +(n&&(!i||Qo(a)&&!a.noHeader)))}),e}return 0}function k_(r,e,t,n){var a=e.noHeader,i=E_(ud(e)),o=[],s=e.blocks||[];ut(!s||N(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ze(u,l)){var c=new td(u[l],null);s.sort(function(p,m){return c.evaluate(p.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}C(s,function(p,m){var g=e.valueFormatter,y=ld(p)(g?W(W({},r),{valueFormatter:g}):r,p,m>0?i.html:0,n);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(i.richText):Jo(n,o.join(""),a?t:i.html);if(a)return f;var h=Zo(e.header,"ordinal",r.useUTC),v=sd(n,r.renderMode).nameStyle,d=od(n);return r.renderMode==="richText"?cd(r,h,v)+i.richText+f:Jo(n,'
'+Ne(h)+"
"+f,t)}function R_(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(S){return S=N(S)?S:[S],Y(S,function(b,x){return Zo(b,N(v)?v[x]:v,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||z.color.secondary,a),h=i?"":Zo(l,"ordinal",u),v=e.valueType,d=o?[]:c(e.value,e.dataIndex),p=!s||!i,m=!s&&i,g=sd(n,a),y=g.nameStyle,_=g.valueStyle;return a==="richText"?(s?"":f)+(i?"":cd(r,h,y))+(o?"":N_(r,d,p,m,_)):Jo(n,(s?"":f)+(i?"":O_(h,!s,y))+(o?"":B_(d,p,m,_)),t)}}function ic(r,e,t,n,a,i){if(r){var o=ld(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function E_(r){return{html:L_[r],richText:P_[r]}}function Jo(r,e,t){var n='
',a="margin: "+t+"px 0 0",i=od(r);return'
'+e+n+"
"}function O_(r,e,t){var n=e?"margin-left:2px":"";return''+Ne(r)+""}function B_(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=N(r)?r:[r],''+Y(r,function(o){return Ne(o)}).join("  ")+""}function cd(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function N_(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(N(e)?e.join(" "):e,i)}function z_(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return vr(n)}function fd(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Xi=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Hv()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=p0({color:t,type:e,renderMode:n,markerId:a});return X(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};N(t)?C(t,function(i){return W(n,i)}):W(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r}();function V_(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=N(s),u=z_(e,t),c,f,h,v;if(o>1||l&&!o){var d=G_(s,e,t,i,u);c=d.inlineValues,f=d.inlineValueTypes,h=d.blocks,v=d.inlineValues[0]}else if(o){var p=a.getDimensionInfo(i[0]);v=c=Fr(a,t,i[0]),f=p.type}else v=c=l?s[0]:s;var m=Hs(e),g=m&&e.name||"",y=a.getName(t),_=n?g:y;return Vn("section",{header:g,noHeader:n||!m,sortParam:v,blocks:[Vn("nameValue",{markerType:"item",markerColor:u,name:_,noName:!qn(_),value:c,valueType:f,dataIndex:t})].concat(h||[])})}function G_(r,e,t,n,a){var i=e.getData(),o=Wa(r,function(f,h,v){var d=i.getDimensionInfo(v);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?C(n,function(f){c(Fr(i,t,f),f)}):C(r,c);function c(f,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Vn("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Mt=fe();function pa(r,e){return r.getName(e)||r.getId(e)}var Va="__universalTransitionEnabled",He=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Dn({count:W_,reset:H_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=Mt(this).sourceManager=new id(this);i.prepareSource();var o=this.getInitialData(t,a);sc(o,this),this.dataTask.context.data=o,Mt(this).dataBeforeProcessed=o,oc(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=Nn(this),i=a?aa(t):{},o=this.subType;ae.hasClass(o)&&(o+="Series"),J(t,n.getTheme().get(this.subType)),J(t,this.getDefaultOption()),No(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&Yt(t,i,a)},e.prototype.mergeOption=function(t,n){t=J(this.option,t,!0),this.fillDataTextStyle(t.data);var a=Nn(this);a&&Yt(this.option,t,a);var i=Mt(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);sc(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Mt(this).dataBeforeProcessed=o,oc(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!We(t))for(var n=["show"],a=0;a=0&&h<0)&&(f=y,h=g,v=0),g===h&&(c[v++]=p))}),c.length=v,c},e.prototype.formatTooltip=function(t,n,a){return V_({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(ye.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=yl.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,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=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[pa(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Va])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,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"){$(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,n)}},e.registerClass=function(t){return ae.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(ae);bt(He,f_);bt(He,yl);jv(He,ae);function oc(r){var e=r.name;Hs(r)||(r.name=F_(r)||e)}function F_(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return C(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function W_(r){return r.model.getRawData().count()}function H_(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),U_}function U_(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function sc(r,e){C(Qg(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ne(Y_,e))})}function Y_(r,e){var t=es(r);return t&&t.setOutputEnd((e||this).count()),e}function es(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Ge=function(){function r(){this.group=new Se,this.uid=ra("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();Ys(Ge);di(Ge);function ia(){var r=fe();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var vd=fe(),X_=ia(),Be=function(){function r(){this.group=new Se,this.uid=ra("viewChart"),this.renderTask=Dn({plan:Z_,reset:$_}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&uc(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&uc(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){ta(this.group,e)},r.markUpdateMethod=function(e,t){vd(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function lc(r,e,t){r&&Wo(r)&&(e==="emphasis"?zr:Vr)(r,t)}function uc(r,e,t){var n=cr(r,e),a=e&&e.highlightKey!=null?Ay(e.highlightKey):null;n!=null?C(_e(n),function(i){lc(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){lc(i,t,a)})}Ys(Be);di(Be);function Z_(r){return X_(r.model)}function $_(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&vd(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),K_[l]}var K_={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},ei="\0__throttleOriginMethod",cc="\0__throttleRate",fc="\0__throttleType";function wl(r,e,t){var n,a=0,i=0,o=null,s,l,u,c;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],d=0;d=0?f():o=setTimeout(f,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function hd(r,e,t,n){var a=r[e];if(a){var i=a[ei]||a,o=a[fc],s=a[cc];if(s!==t||o!==n){if(t==null)return r[e]=i;a=r[e]=wl(i,t,n==="debounce"),a[ei]=i,a[fc]=n,a[cc]=t}return a}}function ts(r,e){var t=r[e];t&&t[ei]&&(t.clear&&t.clear(),r[e]=t[ei])}var vc=fe(),hc={itemStyle:kn(Sh,!0),lineStyle:kn(_h,!0)},q_={lineStyle:"stroke",itemStyle:"fill"};function dd(r,e){var t=r.visualStyleMapper||hc[e];return t||(console.warn("Unknown style type '"+e+"'."),hc.itemStyle)}function pd(r,e){var t=r.visualDrawType||q_[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var j_={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=dd(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=pd(r,n),u=o[l],c=q(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||q(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||q(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),m=W({},o);m[l]=c(p),v.setItemVisual(d,"style",m)}}}},nn=new he,Q_={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=dd(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){nn.option=l[n];var u=a(nn),c=o.ensureUniqueItemVisual(s,"style");W(c,u),nn.option.decal&&(o.setItemVisual(s,"decal",nn.option.decal),nn.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},J_={performRawSeries:!0,overallReset:function(r){var e=Z();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),vc(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=vc(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=pd(t,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var h=i.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",d=n.count();h[l]=t.getColorFromPalette(v,o,d)}})}})}},ga=Math.PI;function eS(r,e){e=e||{},oe(e,{text:"loading",textColor:z.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Se,n=new de({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new De({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new de({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Vs({shape:{startAngle:-ga/2,endAngle:-ga/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:ga*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ga*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var gd=function(){function r(e,t,n,a){this._stageTaskMap=Z(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__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(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Z();e.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}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;C(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";ut(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;C(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,d=h.agentStubMap;d.each(function(m){s(a,m)&&(m.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,a.block);d.each(function(m){m.perform(p)}),h.perform(p)&&(i=!0)}else f&&f.each(function(m,g){s(a,m)&&m.dirty();var y=o.getPerformArgs(m,a.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.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(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=Z(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||Dn({plan:iS,reset:oS,count:lS}));v.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,v)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||Dn({reset:tS});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=Z(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,v="";ut(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):c?c(n,a).each(d):(f=!1,C(n.getSeries(),d));function d(p){var m=p.uid,g=l.set(m,s&&s.get(m)||(h=!0,Dn({reset:rS,onDirty:aS})));g.context={model:p,overallProgress:f},g.agent=o,g.__block=f,i._pipe(p,g)}h&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return q(e)&&(e={overallReset:e,seriesType:uS(e)}),e.uid=ra("stageHandler"),t&&(e.visualType=t),e},r}();function tS(r){r.overallReset(r.ecModel,r.api,r.payload)}function rS(r){return r.overallProgress&&nS}function nS(){this.agent.dirty(),this.getDownstream().dirty()}function aS(){this.agent&&this.agent.dirty()}function iS(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function oS(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=_e(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?Y(e,function(t,n){return md(n)}):sS}var sS=md(0);function md(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i0&&v===u.length-h.length){var d=u.slice(0,v);d!=="data"&&(t.mainType=d,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){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=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function c(f,h,v,d){return f[v]==null||h[d||v]===f[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),rs=["symbol","symbolSize","symbolRotate","symbolOffset"],pc=rs.concat(["symbolKeepAspect"]),vS={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(!this[be]){if(this._disposed){this.id;return}var i,o,s;if($(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[be]=!0,Ar(this),!this._model||n){var l=new U0(this._api),u=this._theme,c=this._model=new _l;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},ls);var f={seriesTransition:s,optionChanged:!0};if(a)this[Te]={silent:i,updateParams:f},this[be]=!1,this.getZr().wakeUp();else{try{rr(this),dt.update.call(this,null,f)}catch(h){throw this[Te]=null,this[be]=!1,h}this._ssr||this._zr.flush(),this[Te]=null,this[be]=!1,Tr.call(this,i),Dr.call(this,i)}}},e.prototype.setTheme=function(t,n){if(!this[be]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[Te]&&(i==null&&(i=this[Te].silent),o=this[Te].updateParams,this[Te]=null),this[be]=!0,Ar(this);try{this._updateTheme(t),a.setTheme(this._theme),rr(this),dt.update.call(this,{type:"setTheme"},o)}catch(s){throw this[be]=!1,s}this[be]=!1,Tr.call(this,i),Dr.call(this,i)}}},e.prototype._updateTheme=function(t){X(t)&&(t=Od[t]),t&&(t=Q(t),t&&Yh(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ye.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,n=t.storage.getDisplayList();return C(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;C(n,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return C(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(Tc[a]){var l=s,u=s,c=-s,f=-s,h=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();C(An,function(_,S){if(_.group===a){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Q(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),c=o(x.right,c),f=o(x.bottom,f),h.push({dom:b,left:x.left,top:x.top})}}),l*=v,u*=v,c*=v,f*=v;var d=c-l,p=f-u,m=Bv.createCanvas(),g=nu(m,{renderer:n?"svg":"canvas"});if(g.resize({width:d,height:p}),n){var y="";return C(h,function(_){var S=_.left-l,b=_.top-u;y+=''+_.dom+""}),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new de({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),C(h,function(_){var S=new Zr({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});g.add(S)}),g.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n,a){return _a(this,"convertToPixel",t,n,a)},e.prototype.convertToLayout=function(t,n,a){return _a(this,"convertToLayout",t,n,a)},e.prototype.convertFromPixel=function(t,n,a){return _a(this,"convertFromPixel",t,n,a)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=xn(a,t);return C(o,function(s,l){l.indexOf("Models")>=0&&C(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=xn(a,t,{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?dS(s,l,n):pS(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;C(XS,function(a){var i=function(o){var s=t.getModel(),l=o.target,u,c=a==="globalout";if(c?u={}:l&&mn(l,function(p){var m=ee(p);if(m&&m.dataIndex!=null){var g=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=g&&g.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=W({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var v=f&&h!=null&&s.getComponent(f,h),d=v&&t[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=a,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:d},t.trigger(a,u)}};i.zrEventfulCallAtLast=!0,t._zr.on(a,i,t)});var n=this._messageCenter;C(os,function(a,i){n.on(i,function(o){t.trigger(i,o)})}),mS(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&Kv(this.getDom(),Al,"");var n=this,a=n._api,i=n._model;C(n._componentsViews,function(o){o.dispose(i,a)}),C(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 An[n.id]},e.prototype.resize=function(t){if(!this[be]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[Te]&&(i==null&&(i=this[Te].silent),a=!0,this[Te]=null),this[be]=!0,Ar(this);try{a&&rr(this),dt.update.call(this,{type:"resize",animation:W({duration:0},t&&t.animation)})}catch(o){throw this[be]=!1,o}this[be]=!1,Tr.call(this,i),Dr.call(this,i)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if($(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!us[t]){var a=us[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=W({},t);return n.type=is[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if($(n)||(n={silent:!!n}),!!ri[t.type]&&this._model){if(this[be]){this._pendingActions.push(t);return}var a=n.silent;Qi.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&ye.browser.weChat&&this._throttledZrFlush(),Tr.call(this,a),Dr.call(this,a)}},e.prototype.updateLabelLayout=function(){Qe.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){rr=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),qi(f,!0),qi(f,!1),h.plan()},qi=function(f,h){for(var v=f._model,d=f._scheduler,p=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,g=f._zr,y=f._api,_=0;_h.get("hoverLayerThreshold")&&!ye.node&&!ye.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var g=f._chartsMap[m.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function l(f,h){if(!f.preventAutoZ){var v=qa(f);h.eachRendered(function(d){return gh(d,v.z,v.zlevel),!0})}}function u(f,h){h.eachRendered(function(v){if(!bn(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 c(f,h){var v=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),p=v.get("duration"),m=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(g){if(g.states&&g.states.emphasis){if(bn(g))return;if(g instanceof Ce&&My(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=m;var _=g.getTextContent(),S=g.getTextGuideLine();_&&(_.stateTransition=m),S&&(S.stateTransition=m)}g.__dirty&&i(g)}})}wc=function(f){return new(function(h){H(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){zr(d,p),Xe(f)},v.prototype.leaveEmphasis=function(d,p){Vr(d,p),Xe(f)},v.prototype.enterBlur=function(d){yy(d),Xe(f)},v.prototype.leaveBlur=function(d){rh(d),Xe(f)},v.prototype.enterSelect=function(d){nh(d),Xe(f)},v.prototype.leaveSelect=function(d){ah(d),Xe(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},v.prototype.getMainProcessVersion=function(){return f[ma]},v}(Hh))(f)},Rd=function(f){function h(v,d){for(var p=0;p=0)){Dc.push(t);var i=gd.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function Vd(r,e){us[r]=e}function JS(r,e,t){var n=PS("registerMap");n&&n(r,e,t)}var ex=w_;mr(Tl,j_);mr(Ai,Q_);mr(Ai,J_);mr(Tl,vS);mr(Ai,hS);mr(Ad,IS);Nd(Yh);zd(ES,r_);Vd("default",eS);ft({type:ir,event:ir,update:ir},St);ft({type:ka,event:ka,update:ka},St);ft({type:Za,event:$s,update:Za,action:St,refineEvent:Ll,publishNonRefinedEvent:!0});ft({type:zo,event:$s,update:zo,action:St,refineEvent:Ll,publishNonRefinedEvent:!0});ft({type:$a,event:$s,update:$a,action:St,refineEvent:Ll,publishNonRefinedEvent:!0});function Ll(r,e,t,n){return{eventContent:{selected:wy(t),isFromClick:e.isFromClick||!1}}}Bd("default",{});Bd("dark",Sd);function on(r){return r==null?0:r.length||1}function Ac(r){return r}var Fn=function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||Ac,this._newKeyGetter=a||Ac,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,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 e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var v=0;v1)for(var s=0;s30}var sn=$,It=Y,ox=typeof Int32Array>"u"?Array:Int32Array,sx="e\0\0",Mc=-1,lx=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ux=["_approximateExtent"],Ic,xa,ln,un,to,cn,ro,Yd=function(){function r(e,t){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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;Fd(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Ue;if(l&&!a.pure)for(var u=[],c=e;c0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),N(i)?i=i.slice():sn(i)&&(i=W({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,sn(t)?W(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){sn(e)?W(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?W(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;ly(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){C(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:It(this.dimensions,this._getDimInfo,this),this.hostModel)),to(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(rm(arguments)))})},r.internalField=function(){Ic=function(e){var t=e._invertedIndicesMap;C(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new ox(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),a[t]=l}}}(),r}();function Xd(r,e){Sl(r)||(r=Xh(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=Z(),i=[],o=fx(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Ud(o),l=n===r.dimensionsDefine,u=l?Hd(r):Wd(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=Z(c),h=new nd(o),v=0;v0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function fx(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return C(e,function(i){var o;$(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function vx(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var hx=function(){function r(e){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=e}return r}();function dx(r){var e=r.get("coordinateSystem"),t=new hx(e),n=px[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var px={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",Re).models[0],i=r.getReferringComponents("yAxis",Re).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),Mr(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),Mr(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",Re).models[0];e.coordSysDims=["single"],t.set("single",a),Mr(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",Re).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Mr(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),Mr(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();C(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Mr(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,n){var a=r.getReferringComponents("matrix",Re).models[0];e.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");t.set("x",i),t.set("y",o),n.set("x",i),n.set("y",o)}};function Mr(r){return r.get("type")==="category"}function gx(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;mx(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(C(i,function(y,_){X(y)&&(i[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!a||a===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,d=c.type,p=0;C(i,function(y){y.coordDim===v&&p++});var m={name:f,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},g={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,d),g.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(m),o.appendCalculationDimension(g)):(i.push(m),i.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function mx(r){return!Fd(r.schema)}function Wr(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function yx(r,e){return Wr(r,e)?r.getCalculationInfo("stackResultDimension"):e}function _x(r,e){var t=r.get("coordinateSystem"),n=pl.get(t),a;return e&&e.coordSysDims&&(a=Y(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=cs(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function Sx(r,e,t){var n,a;return t&&C(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function Mi(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;a=n.getSource(),i=a.sourceFormat===Ue;var o=dx(e),s=_x(e,o),l=t.useEncodeDefaulter,u=q(l)?l:l?ne(Vh,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=Xd(a,c),h=Sx(f.dimensions,t.createInvertedIndices,o),v=i?null:n.getSharedDataStore(f),d=gx(e,{schema:f,store:v}),p=new Yd(f,e);p.setCalculationInfo(d);var m=h!=null&&xx(a)?function(g,y,_,S){return S===h?_:this.defaultDimValueGetter(g,y,_,S)}:null;return p.hasItemOption=!1,p.initData(i?a:v,null,m),p}function xx(r){if(r.sourceFormat===Ue){var e=bx(r.data||[]);return!N(Qn(e))}}function bx(r){for(var e=0;ea&&(o=i.interval=a);var s=i.intervalPrecision=Wn(o),l=i.niceTickExtent=[Le(Math.ceil(r[0]/o)*o,s),Le(Math.floor(r[1]/o)*o,s)];return Cx(l,r),i}function no(r){var e=Math.pow(10,Ws(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Le(t*e)}function Wn(r){return yt(r)+2}function Lc(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function Cx(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Lc(r,0,e),Lc(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Pl(r,e){return r>=e[0]&&r<=e[1]}var Tx=function(){function r(){this.normalize=Pc,this.scale=kc}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ie(e.normalize,e),this.scale=ie(e.scale,e)):(this.normalize=Pc,this.scale=kc)},r}();function Pc(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function kc(r,e){return r*(e[1]-e[0])+e[0]}function vs(r,e,t){var n=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/n,Math.log(t?e[1]:Math.max(0,e[1]))/n]}var $t=function(){function r(e){this._calculator=new Tx,this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(e){},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();di($t);var Dx=0,hs=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Dx,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&Y(n,Ax);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!X(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r}();function Ax(r){return $(r)&&r.value!=null?r.value:r+""}var kl=function(r){H(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new hs({})),N(a)&&(a=new hs({categories:Y(a,function(i){return $(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:X(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Pl(t,this._extent)&&t>=0&&t=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}($t);$t.registerClass(kl);var Lt=Le,Hr=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return Pl(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Wn(t)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=Qa(),l=[];if(!n)return l;t.breakTicks;var u=1e4;a[0]=0&&(f=Lt(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:i[1];return a[1]>v&&(t.expandToNicedExtent?l.push({value:Lt(v+n,o)}):l.push({value:a[1]})),t.breakTicks,l},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks({expandToNicedExtent:!0}),a=[],i=this.getExtent(),o=1;oi[0]&&d0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function qd(r){var e=Lx(r),t=[];return C(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=e[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=se(n.get("barWidth"),s),p=se(n.get("barMaxWidth"),s),m=se(n.get("barMinWidth")||(ep(n)?.5:1),s),g=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:m,barGap:g,barCategoryGap:y,defaultBarGap:_,axisKey:Rl(i),stackId:$d(n)})}),Px(t)}function Px(r){var e={};C(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);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 t={};return C(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=qe(i).length;s=Math.max(35-l*4,15)+"%"}var u=se(s,o),c=se(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),C(i,function(g){var y=g.maxWidth,_=g.minWidth;if(g.width){var S=g.width;y&&(S=Math.min(S,y)),_&&(S=Math.max(S,_)),g.width=S,f-=S+c*S,h--}else{var S=v;y&&yS&&(S=_),S!==v&&(g.width=S,f-=S+c*S,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var d=0,p;C(i,function(g,y){g.width||(g.width=v),p=g,d+=g.width*(1+c)}),p&&(d-=p.width*c);var m=-d/2;C(i,function(g,y){t[a][y]=t[a][y]||{bandWidth:o,offset:m,width:g.width},m+=g.width*(1+c)})}),t}function kx(r,e,t){if(r&&e){var n=r[Rl(e)];return n}}function jd(r,e){var t=Kd(r,e),n=qd(t);C(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=$d(a),u=n[Rl(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function Qd(r){return{seriesType:r,plan:ia(),reset:function(e){if(Jd(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),f=Wr(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=Rx(a,i),d=ep(e),p=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),g=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=d&&st(b*3),w=d&&l&&st(b*3),T=d&&st(b),D=n.master.getRect(),M=h?D.width:D.height,A,L=S.getStore(),I=0;(A=_.next())!=null;){var P=L.get(f?m:o,A),k=L.get(s,A),E=v,U=void 0;f&&(U=+P-L.get(o,A));var R=void 0,O=void 0,V=void 0,B=void 0;if(h){var G=n.dataToPoint([P,k]);if(f){var K=n.dataToPoint([U,k]);E=K[0]}R=E,O=G[1]+y,V=G[0]-E,B=g,Math.abs(V)0?t:1:t))}var Ex=function(r,e,t,n){for(;t>>1;r[a][1]a&&(this._approxInterval=a);var o=ba.length,s=Math.min(Ex(ba,this._approxInterval,0,o),o-1);this._interval=ba[s][1],this._intervalPrecision=Wn(this._interval),this._minLevelUnit=ba[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return ce(t)?t:+$r(t)},e.prototype.contain=function(t){return Pl(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e}(Hr),ba=[["second",sl],["minute",ll],["hour",Cn],["quarter-day",Cn*6],["half-day",Cn*12],["day",$e*1.2],["half-week",$e*3.5],["week",$e*7],["month",$e*31],["quarter",$e*95],["half-year",Lu/2],["year",Lu]];function Ox(r,e,t,n){return Xo(new Date(e),r,n).getTime()===Xo(new Date(t),r,n).getTime()}function Bx(r,e){return r/=$e,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Nx(r){var e=30*$e;return r/=e,r>6?6:r>3?3:r>2?2:1}function zx(r){return r/=Cn,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Rc(r,e){return r/=e?ll:sl,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function Vx(r){return Fv(r)}function Gx(r,e,t){var n=Math.max(0,ue(or,e)-1);return Xo(new Date(r),or[n],t).getTime()}function Fx(r,e){var t=new Date(0);t[r](1);var n=t.getTime();t[r](1+e);var a=t.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function Wx(r,e,t,n,a,i){var o=1e4,s=l0,l=0;function u(I,P,k,E,U,R,O){for(var V=Fx(U,I),B=P,G=new Date(B);Bo));)if(G[U](G[E]()+I),B=G.getTime(),i){var K=i.calcNiceTickMultiple(B,V);K>0&&(G[U](G[E]()+K*I),B=G.getTime())}O.push({value:B,notAdd:!0})}function c(I,P,k){var E=[],U=!P.length;if(!Ox(Tn(I),n[0],n[1],t)){U&&(P=[{value:Gx(n[0],I,t)},{value:n[1]}]);for(var R=0;R=n[0]&&O<=n[1]&&u(B,O,V,G,K,te,E),I==="year"&&k.length>1&&R===0&&k.unshift({value:k[0].value-B})}}for(var R=0;R=n[0]&&S<=n[1]&&v++)}var b=a/e;if(v>b*1.5&&d>b/1.5||(f.push(y),v>b||r===s[p]))break}h=[]}}}for(var x=we(Y(f,function(I){return we(I,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(I){return I.length>0}),w=[],T=x.length-1,p=0;p0;)i*=10;var s=[ds(Ux(n[0]/i)*i),ds(Hx(n[1]/i)*i)];this._interval=i,this._intervalPrecision=Wn(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Ca(t)/Ca(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Ca(t)/Ca(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),wa(this.base,t)},e.prototype.setBreaksFromOption=function(t){},e.type="log",e}(Hr);function ao(r,e){return ds(r,yt(e))}$t.registerClass(rp);var Yx=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[Zx[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=Xx[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),Xx={min:"_determinedMin",max:"_determinedMax"},Zx={min:"_dataMin",max:"_dataMax"};function np(r,e,t){var n=r.rawExtentInfo;return n||(n=new Yx(r,e,t),r.rawExtentInfo=n,n)}function Ta(r,e){return e==null?null:Ua(e)?NaN:r.parse(e)}function ap(r,e){var t=r.type,n=np(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=Kd("bar",o),l=!1;if(C(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=qd(s),c=$x(a,i,e,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function $x(r,e,t,n){var a=t.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=kx(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;C(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;C(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/i,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function Ec(r,e){var t=e,n=ap(r,t),a=n.extent,i=t.get("splitNumber");r instanceof rp&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(sp(t)),r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Kx(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new kl({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new tp({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new($t.getClass(e)||Hr)}}function qx(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function jr(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=u0(e);return function(a,i){return r.scale.getFormattedLabel(a,i,t)}}else{if(X(e))return function(a){var i=r.scale.getLabel(a),o=e.replace("{value}",i??"");return o};if(q(e)){if(r.type==="category")return function(a,i){return e(ai(r,a),a.value-r.scale.getExtent()[0],null)};var n=Qa();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),e(ai(r,a),i,o)}}else return function(a){return r.scale.getLabel(a)}}}function ai(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function El(r){var e=r.get("interval");return e??"auto"}function ip(r){return r.type==="category"&&El(r.getLabelModel())===0}function op(r,e){var t={};return C(r.mapDimensionsAll(e),function(n){t[yx(r,n)]=!0}),qe(t)}function jx(r,e,t){e&&C(op(e,t),function(n){var a=e.getApproximateExtent(n);a[0]r[1]&&(r[1]=a[1])})}function Ur(r){return r==="middle"||r==="center"}function Hn(r){return r.getShallow("show")}function sp(r){var e=r.get("breaks",!0);e==null}var Qx=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),Oc=[],Jx={registerPreprocessor:Nd,registerProcessor:zd,registerPostInit:KS,registerPostUpdate:qS,registerUpdateLifecycle:Ml,registerAction:ft,registerCoordinateSystem:jS,registerLayout:QS,registerVisual:mr,registerTransform:ex,registerLoading:Vd,registerMap:JS,registerImpl:LS,PRIORITY:HS,ComponentModel:ae,ComponentView:Ge,SeriesModel:He,ChartView:Be,registerComponentModel:function(r){ae.registerClass(r)},registerComponentView:function(r){Ge.registerClass(r)},registerSeriesModel:function(r){He.registerClass(r)},registerChartView:function(r){Be.registerClass(r)},registerCustomSeries:function(r,e){},registerSubTypeDefaulter:function(r,e){ae.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){nm(r,e)}};function xt(r){if(N(r)){C(r,function(e){xt(e)});return}ue(Oc,r)>=0||(Oc.push(r),q(r)&&(r={install:r}),r.install(Jx))}var eb=fe(),Mn=fe(),tt={estimate:1,determine:2};function ii(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function lp(r,e){var t=Y(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function tb(r,e){var t=r.getLabelModel().get("customValues");if(t){var n=jr(r),a=r.scale.getExtent(),i=lp(r,t),o=we(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:Y(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?nb(r,e):ib(r)}function rb(r,e,t){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=lp(r,n);return{ticks:we(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?ab(r,e):{ticks:Y(r.scale.getTicks(t),function(o){return o.value})}}function nb(r,e){var t=r.getLabelModel(),n=up(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:n}function up(r,e,t){var n=sb(r),a=El(e),i=t.kind===tt.estimate;if(!i){var o=fp(n,a);if(o)return o}var s,l;q(a)?s=dp(r,a):(l=a==="auto"?lb(r,t):a,s=hp(r,l));var u={labels:s,labelCategoryInterval:l};return i?t.out.noPxChangeTryDetermine.push(function(){return ps(n,a,u),!0}):ps(n,a,u),u}function ab(r,e){var t=ob(r),n=El(e),a=fp(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),q(n))i=dp(r,n,!0);else if(n==="auto"){var s=up(r,r.getLabelModel(),ii(tt.determine));o=s.labelCategoryInterval,i=Y(s.labels,function(l){return l.tickValue})}else o=n,i=hp(r,o,!0);return ps(t,n,{ticks:i,tickCategoryInterval:o})}function ib(r){var e=r.scale.getTicks(),t=jr(r);return{labels:Y(e,function(n,a){return{formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var ob=cp("axisTick"),sb=cp("axisLabel");function cp(r){return function(t){return Mn(t)[r]||(Mn(t)[r]={list:[]})}}function fp(r,e){for(var t=0;tc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=r.dataToCoord(f+1)-r.dataToCoord(f),v=Math.abs(h*Math.cos(i)),d=Math.abs(h*Math.sin(i)),p=0,m=0;f<=s[1];f+=u){var g=0,y=0,_=Fs(a({value:f}),n.font,"center","top");g=_.width*1.3,y=_.height*1.3,p=Math.max(p,g,7),m=Math.max(m,y,7)}var S=p/v,b=m/d;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(S,b)));if(t===tt.estimate)return e.out.noPxChangeTryDetermine.push(ie(cb,null,r,x,l)),x;var w=vp(r,x,l);return w??x}function cb(r,e,t){return vp(r,e,t)==null}function vp(r,e,t){var n=eb(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-t)<=1&&i>e&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=t,n.lastAutoInterval=e,n.axisExtent0=a[0],n.axisExtent1=a[1]}function fb(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function hp(r,e,t){var n=jr(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=ip(r),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;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(m){var g={value:m};s.push(t?m:{formattedLabel:n(g),rawLabel:a.getLabel(g),tickValue:m,time:void 0,break:void 0})}return s}function dp(r,e,t){var n=r.scale,a=jr(r),i=[];return C(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var Bc=[0,1],vb=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Vv(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(a.parse(e)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),Nc(n,a.count())),Bt(e,Bc,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),Nc(n,a.count()));var i=Bt(e,n,Bc,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=rb(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),a=n.ticks,i=Y(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return hb(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=Y(n,function(i){return Y(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(e){return e=e||ii(tt.determine),tb(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(e){return e=e||ii(tt.determine),ub(this,e)},r}();function Nc(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function hb(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;C(e,function(v){v.coord-=u/2,v.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=i[0]>i[1];h(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&h(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),h(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&h(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function h(v,d){return v=Le(v),d=Le(d),f?v>d:v0){e=e/180*Math.PI,zt.fromArray(r[0]),me.fromArray(r[1]),Ie.fromArray(r[2]),pe.sub(Vt,zt,me),pe.sub(at,Ie,me);var t=Vt.len(),n=at.len();if(!(t<.001||n<.001)){Vt.scale(1/t),at.scale(1/n);var a=Vt.dot(at),i=Math.cos(e);if(i1&&pe.copy(Oe,Ie),Oe.toArray(r[1])}}}}function pb(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,zt.fromArray(r[0]),me.fromArray(r[1]),Ie.fromArray(r[2]),pe.sub(Vt,me,zt),pe.sub(at,Ie,me);var n=Vt.len(),a=at.len();if(!(n<.001||a<.001)){Vt.scale(1/n),at.scale(1/a);var i=Vt.dot(e),o=Math.cos(t);if(i=l)pe.copy(Oe,Ie);else{Oe.scaleAndAdd(at,s/Math.tan(Math.PI/2-c));var f=Ie.x!==me.x?(Oe.x-me.x)/(Ie.x-me.x):(Oe.y-me.y)/(Ie.y-me.y);if(isNaN(f))return;f<0?pe.copy(Oe,me):f>1&&pe.copy(Oe,Ie)}Oe.toArray(r[1])}}}}function io(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;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 gb(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=au(n[0],n[1]),i=au(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)*t,s=Oi([],n[1],n[0],o/a),l=Oi([],n[1],n[2],o/i),u=Oi([],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 c=1;c0){S(M*D,0,i);var A=M+w;A<0&&b(-A*D,1)}else b(-w*D,1)}}function S(w,T,D){w!==0&&(c=!0);for(var M=T;M0)for(var A=0;A0;A--){var k=D[A-1]*P;S(-k,A,i)}}}function x(w){var T=w<0?-1:1;w=Math.abs(w);for(var D=Math.ceil(w/(i-1)),M=0;M0?S(D,0,M+1):S(-D,i-M-1,i),w-=D,w<=0)return}return c}function wb(r){var e=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function t(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;nn[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(vb),Ob="expandAxisBreak",Gt=Math.PI,Bb=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Nb=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Un=fe(),xp=fe(),bp=function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,a=this.recordMap,i=a[t]||(a[t]=[]);return i[n]||(i[n]={ready:{}})},r}();function zb(r,e,t,n){var a=t.axis,i=e.ensureRecord(t),o=[],s,l=Nl(r.axisName)&&Ur(r.nameLocation);C(n,function(d){var p=Zt(d);if(!(!p||p.label.ignore)){o.push(p);var m=i.transGroup;l&&(m.transform?Ns(fn,m.transform):Mv(fn),p.transform&&Iv(fn,fn,p.transform),Ee.copy(Da,p.localRect),Da.applyTransform(fn),s?s.union(Da):Ee.copy(s=new Ee(0,0,0,0),Da))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-c)-Math.abs(p.label[u]-c)}),l&&s){var f=a.getExtent(),h=Math.min(f[0],f[1]),v=Math.max(f[0],f[1])-h;s.union(new Ee(h,0,v,1))}i.stOccupiedRect=s,i.labelInfoList=o}var fn=vi(),Da=new Ee(0,0,0,0),wp=function(r,e,t,n,a,i){if(Ur(r.nameLocation)){var o=i.stOccupiedRect;o&&Cp(Sb({},o,i.transGroup.transform),n,a)}else Tp(i.labelInfoList,i.dirVec,n,a)};function Cp(r,e,t){var n=new pe;Ol(r,e,n,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&xb(e,n)}function Tp(r,e,t,n){for(var a=pe.dot(n,e)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):Ya(a-Gt)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),Vb=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Gb={axisLine:function(r,e,t,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(lr(c,c,u),lr(f,f,u));var v=W({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())Pb().buildAxisBreakLine(n,a,i,d);else{var p=new ur(W({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},d));On(p.shape,p.style.lineWidth),p.anid="line",a.add(p)}var m=n.get(["axisLine","symbol"]);if(m!=null){var g=n.get(["axisLine","symbolSize"]);X(m)&&(m=[m,m]),(X(g)||ce(g))&&(g=[g,g]);var y=Cl(n.get(["axisLine","symbolOffset"])||0,g),_=g[0],S=g[1];C([{rotate:r.rotation+Math.PI/2,offset:y[0],r:0},{rotate:r.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(b,x){if(m[x]!=="none"&&m[x]!=null){var w=Xt(m[x],-_/2,-S/2,_,S,v.stroke,!0),T=b.r+b.offset,D=h?f:c;w.attr({rotation:b.rotate,x:D[0]+T*Math.cos(r.rotation),y:D[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),a.add(w)}})}}},axisTickLabelEstimate:function(r,e,t,n,a,i,o,s){var l=Yc(e,a,s);l&&Uc(r,e,t,n,a,i,o,tt.estimate)},axisTickLabelDetermine:function(r,e,t,n,a,i,o,s){var l=Yc(e,a,s);l&&Uc(r,e,t,n,a,i,o,tt.determine);var u=Ub(r,a,i,n);Hb(r,e.labelLayoutList,u),Yb(r,a,i,n,r.tickDirection)},axisName:function(r,e,t,n,a,i,o,s){var l=t.ensureRecord(n);e.nameEl&&(a.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(Nl(u)){var c=r.nameLocation,f=r.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,d=n.axis.getExtent(),p=n.axis.inverse?-1:1,m=new pe(0,0),g=new pe(0,0);c==="start"?(m.x=d[0]-p*v,g.x=-p):c==="end"?(m.x=d[1]+p*v,g.x=p):(m.x=(d[0]+d[1])/2,m.y=r.labelOffset+f*v,g.y=f);var y=vi();g.transform(Nv(y,y,r.rotation));var _=n.get("nameRotate");_!=null&&(_=_*Gt/180);var S,b;Ur(c)?S=Wt.innerTextLayout(r.rotation,_??r.rotation,f):(S=Fb(r.rotation,c,_||0,d),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var x=h.getFont(),w=n.get("nameTruncate",!0)||{},T=w.ellipsis,D=In(r.raw.nameTruncateMaxWidth,w.maxWidth,b),M=s.nameMarginLevel||0,A=new De({x:m.x,y:m.y,rotation:S.rotation,silent:Wt.isLabelSilent(n),style:Ut(h,{text:u,font:x,overflow:"truncate",width:D,ellipsis:T,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(ea({el:A,componentModel:n,itemName:u}),A.__fullText=u,A.anid="name",n.get("triggerEvent")){var L=Wt.makeAxisEventDataBase(n);L.targetType="axisName",L.name=u,ee(A).eventData=L}i.add(A),A.updateTransform(),e.nameEl=A;var I=l.nameLayout=Zt({label:A,priority:A.z2,defaultAttr:{ignore:A.ignore},marginDefault:Ur(c)?Bb[M]:Nb[M]});if(l.nameLocation=c,a.add(A),A.decomposeTransform(),r.shouldNameMoveOverlap&&I){var P=t.ensureRecord(n);t.resolveAxisNameOverlap(r,t,n,I,g,P)}}}};function Uc(r,e,t,n,a,i,o,s){Ap(e)||Xb(r,e,a,s,n,o);var l=e.labelLayoutList;Zb(r,n,l,i),r.rotation;var u=r.optionHideOverlap;Wb(n,l,u),u&&wb(we(l,function(c){return c&&!c.label.ignore})),zb(r,t,n,l)}function Fb(r,e,t,n){var a=Gv(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Ya(a-Gt/2)?(o=l?"bottom":"top",i="center"):Ya(a-Gt*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",aGt/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function Wb(r,e,t){if(ip(r.axis))return;function n(s,l,u){var c=Zt(e[l]),f=Zt(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){yn(c.label);return}if(f.suggestIgnore){yn(f.label);return}var h=.1;if(!t){var v=[0,0,0,0];c=Vc({marginForce:v},c),f=Vc({marginForce:v},f)}Ol(c,f,null,{touchThreshold:h})&&yn(s?f.label:c.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=e.length;n(a,0,1),n(i,o-1,o-2)}function Hb(r,e,t){r.showMinorTicks||C(e,function(n){if(n&&n.label.ignore)for(var a=0;au[0]&&isFinite(d)&&isFinite(u[0]);)v=no(v),d=u[1]-v*o;else{var m=r.getTicks().length-1;m>o&&(v=no(v));var g=v*o;p=Math.ceil(u[1]/v)*v,d=Le(p-g),d<0&&u[0]>=0?(d=0,p=Le(g)):p>0&&u[1]<=0&&(p=0,d=-Le(g))}var y=(a[0].value-i[0].value)/s,_=(a[o].value-i[o].value)/s;n.setExtent.call(r,d+v*y,p+v*_),n.setInterval.call(r,v),(y||_)&&n.setNiceExtent.call(r,d+v,p-v)}var Zc=[[3,1],[0,2]],ew=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ms,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=qe(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],v=o[h],d=v.model,p=v.scale;fs(p)&&d.get("alignTicks")&&d.get("interval")==null?c.push(v):(Ec(p,d),fs(p)&&(s=v))}c.length&&(s||(s=c.pop(),Ec(s.scale,s.model)),C(c,function(m){Jb(m.scale,m.model,s.scale)}))}}a(n.x),a(n.y);var i={};C(n.x,function(o){$c(n,"y",o,i)}),C(n.y,function(o){$c(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=na(e,t),i=this._rect=ct(e.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(_s(o,i),!n){var u=nw(i,s,o,l,t),c=void 0;if(l)Ss?(Ss(this._axesList,i),_s(o,i)):c=jc(i.clone(),"axisLabel",null,i,o,u,a);else{var f=aw(e,i,a),h=f.outerBoundsRect,v=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;h&&(c=jc(h,v,d,i,o,u,a))}Mp(i,o,tt.determine,null,c,a)}C(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}$(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a0})==null;return Ka(n,s,!0,!0,t),_s(a,n),l;function u(h){C(a[Nt[h]],function(v){if(Hn(v.model)){var d=i.ensureRecord(v.model),p=d.labelInfoList;if(p)for(var m=0;m0&&!Ua(v)&&v>1e-4&&(h/=v),h}}function nw(r,e,t,n,a){var i=new bp(iw);return C(t,function(o){return C(o,function(s){if(Hn(s.model)){var l=!n;s.axisBuilder=jb(r,e,s.model,a,i,l)}})}),i}function Mp(r,e,t,n,a,i){var o=t===tt.determine;C(e,function(u){return C(u,function(c){Hn(c.model)&&(Qb(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Nt[1-u]]=r[Gr[u]]<=i.refContainer[Gr[u]]*.5?0:1-u===1?2:1}C(e,function(u,c){return C(u,function(f){Hn(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function aw(r,e,t){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=e.clone():(a==null||a==="auto")&&(n=ct(r.get("outerBounds",!0)||_p,t.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||ue(["all","axisLabel"],i)<0?o="all":o=i;var s=[Bo(j(r.get("outerBoundsClampWidth",!0),ui[0]),e.width),Bo(j(r.get("outerBoundsClampHeight",!0),ui[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var iw=function(r,e,t,n,a,i){var o=t.axis.dim==="x"?"y":"x";wp(r,e,t,n,a,i),Ur(r.nameLocation)||C(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&Tp(s.labelInfoList,s.dirVec,n,a)})};function ow(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return sw(t,r,e),t.seriesInvolved&&uw(t,r),t}function sw(r,e,t){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];C(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Yn(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(C(s.getAxes(),ne(p,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||v)&&C(d.baseAxes,ne(p,v?"cross":!0,h)),v&&C(d.otherAxes,ne(p,"cross",!1))}function p(m,g,y){var _=y.model.getModel("axisPointer",a),S=_.get("show");if(!(!S||S==="auto"&&!m&&!xs(_))){g==null&&(g=_.get("triggerTooltip")),_=m?lw(y,f,a,e,m,g):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),w=Yn(y.model),T=g||b||y.type==="category",D=r.axesInfo[w]={key:w,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:g,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:xs(_),seriesModels:[],linkGroup:null};u[w]=D,r.seriesInvolved=r.seriesInvolved||T;var M=cw(i,y);if(M!=null){var A=o[M]||(o[M]={axesInfo:{}});A.axesInfo[w]=D,A.mapper=i[M].mapper,D.linkGroup=A}}}})}function lw(r,e,t,n,a,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};C(s,function(h){l[h]=Q(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 c=o.get(["label","show"]);if(u.show=c??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&oe(u,f.textStyle)}}return r.model.getModel("axisPointer",new he(l,t,n))}function uw(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||C(r.coordSysAxesInfo[Yn(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function cw(r,e){for(var t=e.model,n=e.dim,a=0;a=0||r===e}function fw(r){var e=zl(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=xs(t);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]),os)return!0;if(o){var l=zl(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=ar(e).pointerEl=new nl[i.type](ef(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=ar(e).labelEl=new De(ef(t.label));e.add(i),rf(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=ar(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=ar(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),rf(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.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=Si(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){im(u.event)},onmousedown:uo(this._onHandleDragMove,this,0,0),drift:uo(this._onHandleDragMove,this),ondragend:uo(this._onHandleDragEnd,this)}),n.add(a)),nf(a,t,!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,hd(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){tf(this._axisPointerModel,!t&&this._moveAnimation,this._handle,co(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(co(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(co(a)),ar(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),ts(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function tf(r,e,t,n){Rp(ar(t).lastProp,n)||(ar(t).lastProp=n,e?Ae(t,n,r):(t.stopAnimation(),t.attr(n)))}function Rp(r,e){if($(r)&&$(e)){var t=!0;return C(e,function(n,a){t=t&&Rp(r[a],n)}),!!t}else return r===e}function rf(r,e){r[e.get(["label","show"])?"show":"hide"]()}function co(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function nf(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}function Sw(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function xw(r,e,t,n,a){var i=t.get("value"),o=Ep(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Ci(s.get("padding")||0),u=s.getFont(),c=Fs(o,u),f=a.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],d=a.align;d==="right"&&(f[0]-=h),d==="center"&&(f[0]-=h/2);var p=a.verticalAlign;p==="bottom"&&(f[1]-=v),p==="middle"&&(f[1]-=v/2),bw(f,h,v,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Ut(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function bw(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Ep(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:ai(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};C(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),X(o)?i=o.replace("{value}",i):q(o)&&(i=o(s))}return i}function Op(r,e,t){var n=vi();return Nv(n,n,t.rotation),om(n,n,t.position),el([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function ww(r,e,t,n,a,i){var o=Wt.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),xw(e,n,a,i,{position:Op(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Cw(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function Tw(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}var Dw=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=af(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=Sw(i),v=Aw[u](s,f,c);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=ci(l.getRect(),a);ww(n,t,d,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=ci(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=Op(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=af(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:v,tooltipOption:d[c]}},e}(_w);function af(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Aw={line:function(r,e,t){var n=Cw([e,t[0]],[e,t[1]],of(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:Tw([e-n/2,t[0]],[n,a],of(r))}}};function of(r){return r.dim==="x"?0:1}var Mw=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:z.color.border,width:1,type:"dashed"},shadowStyle:{color:z.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:z.color.neutral00,padding:[5,7,5,7],backgroundColor:z.color.accent60,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:z.color.accent40,throttle:40}},e}(ae),_t=fe(),Iw=C;function Bp(r,e,t){if(!ye.node){var n=e.getZr();_t(n).records||(_t(n).records={}),Lw(n,e);var a=_t(n).records[r]||(_t(n).records[r]={});a.handler=t}}function Lw(r,e){if(_t(r).initialized)return;_t(r).initialized=!0,t("click",ne(sf,"click")),t("mousemove",ne(sf,"mousemove")),t("globalout",kw);function t(n,a){r.on(n,function(i){var o=Rw(e);Iw(_t(r).records,function(s){s&&a(s,i,o.dispatchAction)}),Pw(o.pendings,e)})}}function Pw(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function kw(r,e,t){r.handler("leave",null,t)}function sf(r,e,t,n){e.handler(r,t,n)}function Rw(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function ws(r,e){if(!ye.node){var t=e.getZr(),n=(_t(t).records||{})[r];n&&(_t(t).records[r]=null)}}var Ew=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Bp("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})})},e.prototype.remove=function(t,n){ws("axisPointer",n)},e.prototype.dispose=function(t,n){ws("axisPointer",n)},e.type="axisPointer",e}(Ge);function Np(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=cr(i,r);if(o==null||o<0||N(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,d=i.mapDimension(h),p=[];p[v]=i.get(d,o),p[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(p)||[]}else t=l.dataToPoint(i.getValues(Y(l.dimensions,function(g){return i.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var lf=fe();function Ow(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||ie(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Fa(a)&&(a=Np({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Fa(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||Fa(a),h={},v={},d={list:[],map:{}},p={showPointer:ne(Nw,v),showTooltip:ne(zw,d)};C(s.coordSysMap,function(g,y){var _=l||g.containPoint(a);C(s.coordSysAxesInfo[y],function(S,b){var x=S.axis,w=Ww(u,S);if(!f&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&uf(S,T,p,!1,h)}})});var m={};return C(c,function(g,y){var _=g.linkGroup;_&&!v[y]&&C(_.axesInfo,function(S,b){var x=v[b];if(S!==g&&x){var w=x.value;_.mapper&&(w=g.axis.scale.parse(_.mapper(w,cf(S),cf(g)))),m[g.key]=w}})}),C(m,function(g,y){uf(c[y],g,p,!0,h)}),Vw(v,c,h),Gw(d,a,r,o),Fw(c,o,t),h}}function uf(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=Bw(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&W(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function Bw(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return C(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,r,t);h=v.dataIndices,f=v.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var d=r-f,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,a=f,i.length=0),C(h,function(m){i.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:i,snapToValue:a}}function Nw(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function zw(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=Yn(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.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 Vw(r,e,t){var n=t.axesInfo=[];C(e,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 Gw(r,e,t,n){if(Fa(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function Fw(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=lf(n)[a]||{},o=lf(n)[a]={};C(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&C(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];C(i,function(u,c){!o[c]&&l.push(u)}),C(o,function(u,c){!i[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Ww(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function cf(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Fa(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function zp(r){Ip.registerAxisPointerClass("CartesianAxisPointer",Dw),r.registerComponentModel(Mw),r.registerComponentView(Ew),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!N(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=ow(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Ow)}function ID(r){xt(kp),xt(zp)}var Vp=fe();function Hw(r,e,t){Vp(r)[e]=t}function Uw(r,e,t){var n=Vp(r),a=n[e];a===t&&(n[e]=null)}ft({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},St);var Yw={axisPointer:1,tooltip:1,brush:1};function Xw(r,e,t){var n=e.getComponentByElement(r.topTarget);if(!n||n===t||Yw.hasOwnProperty(n.mainType))return!1;var a=n.coordinateSystem;if(!a||a.model===t)return!1;var i=qa(n),o=qa(t);return!((i.zlevel-o.zlevel||i.z-o.z)<=0)}function Gp(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Ir(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Ir(s,[0,o]),a=i=Ir(s,[a,i]),n=0}e[0]=Ir(e[0],t),e[1]=Ir(e[1],t);var l=fo(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Ir(e[n],c);var f;return f=fo(e,n),a!=null&&(f.sign!==l.sign||f.spani&&(e[1-n]=e[n]+f.sign*i),e}function fo(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Ir(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var hr=!0,Xn=Math.min,Yr=Math.max,Zw=Math.pow,$w=1e4,Kw=6,qw=6,ff="globalPan",jw={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Qw={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},vf={brushStyle:{lineWidth:2,stroke:z.color.backgroundTint,fill:z.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},Jw=0,eC=function(r){H(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Se,n._uid="brushController_"+Jw++,C(sC,function(a,i){this._handlers[i]=ie(a,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||Hw(n,ff,this._uid),C(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=J(Q(vf),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;Uw(t,ff,this._uid),C(this._handlers,function(n,a){t.off(a,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};C(t,function(a){n[a.panelId]=Q(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=Y(t,function(h){return J(Q(vf),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Fn(a,t,u,l).add(c).update(c).remove(f).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 c(h,v){var d=t[h];if(v!=null&&a[v]===s)i[h]=a[v];else{var p=i[h]=v!=null?(a[v].__brushOption=d,a[v]):Wp(o,Fp(o,d));Vl(o,p)}}function f(h){a[h]!==s&&o.group.remove(a[h])}},e.prototype.unmount=function(){return this.enableBrush(!1),Cs(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(jn);function Fp(r,e){var t=Ii[e.brushType].createCover(r,e);return t.__brushOption=e,Up(t,e),r.group.add(t),t}function Wp(r,e){var t=Gl(e);return t.endCreating&&(t.endCreating(r,e),Up(e,e.__brushOption)),e}function Hp(r,e){var t=e.__brushOption;Gl(e).updateCoverShape(r,e,t.range,t)}function Up(r,e){var t=e.z;t==null&&(t=$w),r.traverse(function(n){n.z=t,n.z2=t})}function Vl(r,e){Gl(e).updateCommon(r,e),Hp(r,e)}function Gl(r){return Ii[r.__brushOption.brushType]}function Fl(r,e,t){var n=r._panels;if(!n)return hr;var a,i=r._transform;return C(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function Yp(r,e){var t=r._panels;if(!t)return hr;var n=e.__brushOption.panelId;return n!=null?t[n]:hr}function Cs(r){var e=r._covers,t=e.length;return C(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function dr(r,e){var t=Y(r._covers,function(n){var a=n.__brushOption,i=Q(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function tC(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],a=t[0]-n[0],i=t[1]-n[1],o=Zw(a*a+i*i,.5);return o>Kw}function Xp(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function Zp(r,e,t,n){var a=new Se;return a.add(new de({name:"main",style:Wl(t),silent:!0,draggable:!0,cursor:"move",drift:ne(hf,r,e,a,["n","s","w","e"]),ondragend:ne(dr,e,{isEnd:!0})})),C(n,function(i){a.add(new de({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ne(hf,r,e,a,i),ondragend:ne(dr,e,{isEnd:!0})}))}),a}function $p(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=Yr(a,qw),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,c=t[0][1],f=t[1][1],h=c-i+a/2,v=f-i+a/2,d=c-o,p=f-s,m=d+a,g=p+a;gt(r,e,"main",o,s,d,p),n.transformable&&(gt(r,e,"w",l,u,i,g),gt(r,e,"e",h,u,i,g),gt(r,e,"n",l,u,m,i),gt(r,e,"s",l,v,m,i),gt(r,e,"nw",l,u,i,i),gt(r,e,"ne",h,u,i,i),gt(r,e,"sw",l,v,i,i),gt(r,e,"se",h,v,i,i))}function Ts(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(Wl(t)),a.attr({silent:!n,cursor:n?"move":"default"}),C([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Ds(r,i[0]):nC(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?Qw[s]+"-resize":null})})}function gt(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(iC(Hl(r,e,[[n,a],[n+i,a+o]])))}function Wl(r){return oe({strokeNoScale:!0},r.brushStyle)}function Kp(r,e,t,n){var a=[Xn(r,t),Xn(e,n)],i=[Yr(r,t),Yr(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function rC(r){return Js(r.group)}function Ds(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=vh(t[e],rC(r));return n[a]}function nC(r,e){var t=[Ds(r,e[0]),Ds(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function hf(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=qp(e,a,i);C(n,function(u){var c=jw[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(Kp(s[0][0],s[1][0],s[0][1],s[1][1])),Vl(e,t),dr(e,{isEnd:!1})}function aC(r,e,t,n){var a=e.__brushOption.range,i=qp(r,t,n);C(a,function(o){o[0]+=i[0],o[1]+=i[1]}),Vl(r,e),dr(r,{isEnd:!1})}function qp(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function Hl(r,e,t){var n=Yp(r,e);return n&&n!==hr?n.clipPath(t,r._transform):Q(t)}function iC(r){var e=Xn(r[0][0],r[1][0]),t=Xn(r[0][1],r[1][1]),n=Yr(r[0][0],r[1][0]),a=Yr(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function oC(r,e,t){if(!(!r._brushType||lC(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=Fl(r,e,t);if(!r._dragging)for(var o=0;on.getWidth()||t<0||t>n.getHeight()}var Ii={lineX:gf(0),lineY:gf(1),rect:{createCover:function(r,e){function t(n){return n}return Zp({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=Xp(r);return Kp(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){$p(r,e,t,n)},updateCommon:Ts,contain:Ms},polygon:{createCover:function(r,e){var t=new Se;return t.add(new Kn({name:"main",style:Wl(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new zs({name:"main",draggable:!0,drift:ne(aC,r,e),ondragend:ne(dr,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:Hl(r,e,t)})},updateCommon:Ts,contain:Ms}};function gf(r){return{createCover:function(e,t){return Zp({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=Xp(e),n=Xn(t[0][r],t[1][r]),a=Yr(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=Yp(e,t);if(o!==hr&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),$p(e,t,l,a)},updateCommon:Ts,contain:Ms}}function uC(r){return r=Ul(r),function(e){return dh(e,r)}}function cC(r,e){return r=Ul(r),function(t){var n=e??t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function fC(r,e,t){var n=Ul(r);return function(a,i){return n.contain(i[0],i[1])&&!Xw(a,e,t)}}function Ul(r){return Ee.create(r)}var mf=["x","y","radius","angle","single"],vC=["cartesian2d","polar","singleAxis"];function hC(r){var e=r.get("coordinateSystem");return ue(vC,e)>=0}function Er(r){return r+"Axis"}function dC(r,e){var t=Z(),n=[],a=Z();r.eachComponent({mainType:"dataZoom",query:e},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var d=t.get(h);d&&d[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return n}var vo=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),pC=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=yf(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=yf(t);J(this.option,t,!0),J(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;C([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=Z(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return C(mf,function(a){var i=this.getReferringComponents(Er(a),Zm);if(i.specified){n=!0;var o=new vo;C(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,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(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new vo;if(h.add(f.componentIndex),t.set(c,h),i=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Re).models[0];v&&C(u,function(d){f.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Re).models[0]&&h.add(d.componentIndex)})}}}i&&C(mf,function(u){if(i){var c=a.findComponents({mainType:Er(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new vo;f.add(c[0].componentIndex),t.set(u,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");C([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(Er(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){C(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(Er(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;C([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;C(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(m=!0),S&&(d=!0),b&&(p=!0)}return m&&d&&p})}else kr(c,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)}});kr(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;kr(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Bt(n[0]+o,n,[0,100],!0):i!=null&&(o=Bt(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var a=Vv(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function SC(r,e,t){var n=[1/0,-1/0];kr(t,function(o){jx(n,o.getData(),e)});var a=r.getAxisModel(),i=np(a.axis.scale,a,n).calculate();return[i.min,i.max]}var xC={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Er(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new _C(a,i,s,r),t.push(o.__dzAxisProxy))});var n=Z();return C(t,function(a){C(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function bC(r){r.registerAction("dataZoom",function(e,t){var n=dC(t,e);C(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Sf=!1;function wC(r){Sf||(Sf=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,xC),bC(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function CC(r){r.registerComponentModel(gC),r.registerComponentView(yC),wC(r)}var Je=function(){function r(){}return r}(),Qp={};function vn(r,e){Qp[r]=e}function Jp(r){return Qp[r]}var TC=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;C(this.option.feature,function(n,a){var i=Jp(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),J(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:z.color.border,borderRadius:0,borderWidth:0,padding:z.size.m,itemSize:15,itemGap:z.size.s,showTitle:!0,iconStyle:{borderColor:z.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:z.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(ae);function eg(r,e){var t=Ci(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var a=new de({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var DC=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];C(u,function(y,_){f.push(_)}),new Fn(this._featureNames||[],f).add(h).update(h).remove(ne(h,null)).execute(),this._featureNames=f;function h(y,_){var S=f[y],b=f[_],x=u[S],w=new he(x,t,t.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(x.title=i.newTitle),S&&!b){if(AC(S))T={onclick:w.option.onclick,featureName:S};else{var D=Jp(S);if(!D)return;T=new D}c[S]=T}else if(T=c[b],!T)return;T.uid=ra("toolbox-feature"),T.model=w,T.ecModel=n,T.api=a;var M=T instanceof Je;if(!S&&b){M&&T.dispose&&T.dispose(n,a);return}if(!w.get("show")||M&&T.unusable){M&&T.remove&&T.remove(n,a);return}v(w,T,S),w.setIconStatus=function(A,L){var I=this.option,P=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[A]=L,P[A]&&(L==="emphasis"?zr:Vr)(P[A])},T instanceof Je&&T.render&&T.render(w,n,a,i)}function v(y,_,S){var b=y.getModel("iconStyle"),x=y.getModel(["emphasis","iconStyle"]),w=_ instanceof Je&&_.getIcons?_.getIcons():y.get("icon"),T=y.get("title")||{},D,M;X(w)?(D={},D[S]=w):D=w,X(T)?(M={},M[S]=T):M=T;var A=y.iconPaths={};C(D,function(L,I){var P=Si(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var k=P.ensureState("emphasis");k.style=x.getItemStyle();var E=new De({style:{text:M[I],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:yh({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},n)},ignore:!0});P.setTextContent(E),ea({el:P,componentModel:t,itemName:I,formatterParamsExtra:{title:M[I]}}),P.__title=M[I],P.on("mouseover",function(){var U=x.getItemStyle(),R=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:x.get("textFill")||U.fill||U.stroke||z.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),P.setTextConfig({position:x.get("textPosition")||R}),E.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){y.get(["iconStatus",I])!=="emphasis"&&a.leaveEmphasis(this),E.hide()}),(y.get(["iconStatus",I])==="emphasis"?zr:Vr)(P),o.add(P),P.on("click",ie(_.onclick,_,n,a,I)),A[I]=P})}var d=na(t,a).refContainer,p=t.getBoxLayoutParams(),m=t.get("padding"),g=ct(p,d,m);Br(t.get("orient"),o,t.get("itemGap"),g.width,g.height),T0(o,p,d,m),o.add(eg(o.getBoundingRect(),t)),l||o.eachChild(function(y){var _=y.__title,S=y.ensureState("emphasis"),b=S.textConfig||(S.textConfig={}),x=y.getTextContent(),w=x&&x.ensureState("emphasis");if(w&&!q(w)&&_){var T=w.style||(w.style={}),D=Fs(_,De.makeFont(T)),M=y.x+o.x,A=y.y+o.y+s,L=!1;A+D.height>a.getHeight()&&(b.position="top",L=!0);var I=L?-5-D.height:s+10;M+D.width/2>a.getWidth()?(b.position=["100%",I],T.align="right"):M-D.width/2<0&&(b.position=[0,I],T.align="left")}})},e.prototype.updateView=function(t,n,a,i){C(this._features,function(o){o instanceof Je&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){C(this._features,function(a){a instanceof Je&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){C(this._features,function(a){a instanceof Je&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e}(Ge);function AC(r){return r.indexOf("my")===0}var MC=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.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)||t.get("backgroundColor")||z.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=ye.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}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 m=d.length,g=new Uint8Array(m);m--;)g[m]=d.charCodeAt(m);var y=new Blob([g]);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"),w='',T=window.open();T.document.write(w),T.document.title=i}},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:z.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Je),xf="__ec_magicType_stack__",IC=[["line","bar"],["stack"]],LC=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return C(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(bf[a]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,d=bf[a](h,v,f,i);d&&(oe(d,f.option),s.series.push(d));var p=f.coordinateSystem;if(p&&p.type==="cartesian2d"&&(a==="line"||a==="bar")){var m=p.getAxesByScale("ordinal")[0];if(m){var g=m.dim,y=g+"Axis",_=f.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"}}};C(IC,function(f){ue(f,a)>=0&&C(f,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=J({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Je),bf={line:function(r,e,t,n){if(r==="bar")return J({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return J({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===xf;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),J({id:e,stack:a?"":xf},n.get(["option","stack"])||{},!0)}};ft({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Li=new Array(60).join("-"),Xr=" ";function PC(r){var e={},t=[],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;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function kC(r){var e=[];return C(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(Y(t.series,function(v){return v.name})),l=[a.model.getCategories()];C(t.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Xr)],c=0;c=0)return!0}var Is=new RegExp("["+Xr+"]+","g");function BC(r){for(var e=r.split(/\n+/g),t=fi(e.shift()).split(Is),n=[],a=Y(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[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();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function WC(r){var e=Yl(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return tg(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function HC(r){rg(r).snapshots=null}function UC(r){return Yl(r).length}function Yl(r){var e=rg(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var YC=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){HC(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Je);ft({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var XC=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],ng=function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=wf(t,e);C(ZC,function(o,s){(!n||!n.include||ue(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=ho[n.brushType](0,i,a);n.__rangeOffset={offset:Af[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){C(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&C(i.coordSyses,function(o){var s=ho[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){C(e,function(n){var a=this.findTargetInfo(n,t);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=ho[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?Af[n.brushType](i.values,o.offset,$C(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return Y(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:uC(a),isTargetByCursor:fC(a,e,n.coordSysModel),getLinearBrushOtherExtent:cC(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&ue(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=wf(t,e),i=0;ir[1]&&r.reverse(),r}function wf(r,e){return xn(r,e,{includeMainTypes:XC})}var ZC={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=Z(),o={},s={};!t&&!n&&!a||(C(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),C(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),C(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];C(u.getCartesians(),function(f,h){(ue(t,f.getAxis("x").model)>=0||ue(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Tf.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){C(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:Tf.geo})})}},Cf=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Tf={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Js(r)),e}},ho={lineX:ne(Df,0),lineY:ne(Df,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[Ls([a[0],i[0]]),Ls([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=Y(t,function(o){var s=r?e.pointToData(o,n):e.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 Df(r,e,t,n){var a=t.getAxis(["x","y"][r]),i=Ls(Y([0,1],function(s){return e?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 Af={lineX:ne(Mf,0),lineY:ne(Mf,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return Y(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function Mf(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function $C(r,e){var t=If(r),n=If(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function If(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Ps=C,KC=Hm("toolbox-dataZoom_"),qC=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new eC(a.getZr()),this._brushController.on("brush",ie(this._onBrush,this)).mount()),JC(t,n,this,i,a),QC(t,n)},e.prototype.onclick=function(t,n,a){jC[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new ng(Xl(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),FC(i,a),this._dispatchZoomAction(a);function s(u,c,f){var h=c.getAxis(u),v=h.model,d=l(u,v,i),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(f=Gp(0,f.slice(),h.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(a[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,c.componentIndex);d&&(h=v)}),h}},e.prototype._dispatchZoomAction=function(t){var n=[];Ps(t,function(a,i){n.push(Q(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:z.color.backgroundTint}};return n},e}(Je),jC={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(WC(this.ecModel))}};function Xl(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function QC(r,e){r.setIconStatus("back",UC(e)>1?"emphasis":"normal")}function JC(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new ng(Xl(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}E0("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=Xl(n),o=xn(r,i);Ps(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Ps(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:KC+u+f};h[c]=f,a.push(h)}return a});function LD(r){r.registerComponentModel(TC),r.registerComponentView(DC),vn("saveAsImage",MC),vn("magicType",LC),vn("dataView",VC),vn("dataZoom",qC),vn("restore",YC),xt(CC)}var eT=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:z.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:z.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:z.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:z.color.tertiary,fontSize:14}},e}(ae);function ag(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function ig(r){if(ye.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t-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 c=u*Math.PI/180,f=o+a,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-f)/2)*100)/100;s+=";"+i+":-"+v+"px";var d=e+" 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'
'}function sT(r,e,t){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return t&&(a=" "+r/2+"s "+n,i="opacity"+a+",visibility"+a),e||(a=" "+r+"s "+n,i+=(i.length?",":"")+(ye.transformSupported?""+Zl+a:",left"+a+",top"+a)),nT+":"+i}function Lf(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!ye.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=ye.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+Zl+":"+o+";":[["top",0],["left",0],[og,o]]}function lT(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var a=j(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),C(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function uT(r,e,t,n){var a=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=fd(r,"html"),v=u+"px "+c+"px "+s+"px "+l;return a.push("box-shadow:"+v),e&&i>0&&a.push(sT(i,t,n)),o&&a.push("background-color:"+o),C(["width","color","radius"],function(d){var p="border-"+d,m=Ph(p),g=r.get(m);g!=null&&a.push(p+":"+g+(d==="color"?"":"px"))}),a.push(lT(f)),h!=null&&a.push("padding:"+Ci(h).join("px ")+"px"),a.join(";")+";"}function Pf(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&lm(r,o,t,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]/e.getWidth(),r[3]=r[1]/e.getHeight()}var cT=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ye.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),i=t.appendTo,o=i&&(X(i)?document.querySelector(i):Oo(i)?i:q(i)&&i(e.getDom()));Pf(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,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,c=a.painter.getViewportRoot();sm(c,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(e){if(!this._container){var t=this._api.getDom(),n=rT(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=aT+uT(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+Lf(i[0],i[1],!0)+("border-color:"+vr(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(X(i)&&n.get("trigger")==="item"&&!ag(n)&&(s=oT(n,a,i)),X(e))o.innerHTML=e+s;else if(e){o.innerHTML="",N(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.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(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||ye.node||!a.getDom())){var o=Ef(i,a);this._ticket="";var s=i.dataByCoordSys,l=mT(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 c=vT;c.x=i.x,c.y=i.y,c.update(),ee(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},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(t,n,a,i))return;var f=Np(i,n),h=f.point[0],v=f.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:f.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))}},e.prototype.manuallyHideTip=function(t,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(Ef(i,a))},e.prototype._manuallyAxisShowTip=function(t,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 c=u.getData(),f=hn([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){var s=ee(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;mn(a,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(ee(c).dataIndex!=null?l=c:ee(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=ie(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=hn([n.tooltipOption],i),l=this._renderMode,u=[],c=Vn("section",{blocks:[],noHeader:!0}),f=[],h=new Xi;C(t,function(y){C(y.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=Ep(b,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),w=Vn("section",{header:x,noHeader:!qn(x),sortBlocks:!0,blocks:[]});c.blocks.push(w),C(_.seriesDataIndices,function(T){var D=a.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,A=D.getDataParams(M);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=ai(S.axis,{value:b}),A.axisValueLabel=x,A.marker=h.makeTooltipMarker("item",vr(A.color),l);var L=Ju(D.formatTooltip(M,!0,null)),I=L.frag;if(I){var P=hn([D],i).get("valueFormatter");w.blocks.push(P?W({valueFormatter:P},I):I)}L.text&&f.push(L.text),u.push(A)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,d=s.get("order"),p=ic(c,h,l,d,a.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var m=l==="richText"?` `:"
",g=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=ee(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,d=t.positionDefault,p=hn([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),m=p.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(c,f),y=new Xi;g.marker=y.makeTooltipMarker("item",vr(g.color),v);var _=Ju(u.formatTooltip(c,!1,f)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,w=x?ic(b?W({valueFormatter:b},x):x,y,v,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,w,g,T,t.offsetX,t.offsetY,t.position,t.target,y)}),a({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=this._renderMode==="html",o=ee(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(X(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=Q(l),l.content=Ne(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var v=t.positionDefault,d=hn(f,this._tooltipModel,v?{position:v}:null),p=d.get("content"),m=Math.random()+"",g=new Xi;this._showOrMove(d,function(){var y=Q(d.get("formatterParams")||{});this._showTooltipContent(d,p,y,m,t.offsetX,t.offsetY,t.position,n,g)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var v=n,d=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),p=d.color;if(h)if(X(h)){var m=t.ecModel.get("useUTC"),g=N(a)?a[0]:a,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;v=h,y&&(v=wi(g.axisValue,v,m)),v=kh(v,a,!0)}else if(q(h)){var _=ie(function(S,b){S===this._ticket&&(f.setContent(b,c,t,p,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,v=h(a,i,_)}else v=h;f.setContent(v,c,t,p,l),f.show(t,p),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i,o){if(a==="axis"||N(n))return{color:i||o};if(!N(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),h=t.get("align"),v=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),q(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),N(n))a=se(n[0],u),i=se(n[1],c);else if($(n)){var p=n;p.width=f[0],p.height=f[1];var m=ct(p,{width:u,height:c});a=m.x,i=m.y,h=null,v=null}else if(X(n)&&l){var g=gT(n,d,f,t.get("borderWidth"));a=g[0],i=g[1]}else{var g=dT(a,i,o,u,c,h?null:20,v?null:20);a=g[0],i=g[1]}if(h&&(a-=Of(h)?f[0]/2:h==="right"?f[0]:0),v&&(i-=Of(v)?f[1]/2:v==="bottom"?f[1]:0),ag(t)){var g=pT(a,i,o,u,c);a=g[0],i=g[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&C(a,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&C(u,function(h,v){var d=f[v]||{},p=h.seriesDataIndices||[],m=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===m.length,o&&C(p,function(g,y){var _=m[y];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),i&&C(h.seriesDataIndices,function(g){var y=g.seriesIndex,_=n[y],S=i[y];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){ye.node||!n.getDom()||(ts(this,"_updatePosition"),this._tooltipContent.dispose(),ws("itemTooltip",n))},e.type="tooltip",e}(Ge);function hn(r,e,t){var n=e.ecModel,a;t?(a=new he(t,n,n),a=new he(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof he&&(o=o.get("tooltip",!0)),X(o)&&(o={formatter:o}),o&&(a=new he(o,a,n)))}return a}function Ef(r,e){return r.dispatchAction||ie(e.dispatchAction,e)}function dT(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function pT(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function gT(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+c+o;break;case"left":s=e.x-a-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function Of(r){return r==="center"||r==="middle"}function mT(r,e,t){var n=Us(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Jn(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ee(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function PD(r){xt(zp),r.registerComponentModel(eT),r.registerComponentView(hT),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},St),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},St)}var yT=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:z.size.m,backgroundColor:z.color.transparent,borderColor:z.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:z.color.primary},subtextStyle:{fontSize:12,color:z.color.quaternary}},e}(ae),_T=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=j(t.get("textBaseline"),t.get("textVerticalAlign")),c=new De({style:Ut(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),v=new De({style:Ut(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),m=t.get("triggerEvent",!0);c.silent=!d&&!m,v.silent=!p&&!m,d&&c.on("click",function(){Ru(d,"_"+t.get("target"))}),p&&v.on("click",function(){Ru(p,"_"+t.get("subtarget"))}),ee(c).eventData=ee(v).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),h&&i.add(v);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var _=na(t,a),S=ct(y,_.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),v.setStyle(b),g=i.getBoundingRect();var x=S.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var T=new de({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},e.type="title",e}(Ge);function kD(r){r.registerComponentModel(yT),r.registerComponentView(_T)}function Pi(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=Fr(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(e[i])}return n.join(" ")}var $l=function(r){H(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o,s){this.removeAll();var l=Xt(t,-1,-1,2,2,null,s);l.attr({z2:j(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=ST,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){zr(this.childAt(0))},e.prototype.downplay=function(){Vr(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=e.getSymbolZ2(t,n),c=o!==this._symbolType,f=i&&i.disableAnimation;if(c){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(d):Ae(v,d,s,n),_i(v)}if(this._updateCommon(t,n,l,a,i),c){var v=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Ve(v,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,c,f,h,v,d,p,m,g;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,h=i.focus,v=i.blurScope,p=i.labelStatesModels,m=i.hoverScale,g=i.cursorStyle,d=i.emphasisDisabled),!i||t.hasItemOption){var y=i&&i.itemModel?i.itemModel:t.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=qr(y),m=_.getShallow("scale"),g=y.getShallow("cursor")}var S=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=Cl(t.getItemVisual(n,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var x=t.getItemVisual(n,"style"),w=x.fill;if(s instanceof Zr){var T=s.style;s.useStyle(W({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(W({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=t.getItemVisual(n,"liftZ"),M=this._z2;D!=null?M==null&&(this._z2=s.z2,s.z2+=D):M!=null&&(s.z2=M,this._z2=null);var A=o&&o.useNameLabel;Kr(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:w,defaultOpacity:x.opacity});function L(k){return A?t.getName(k):Pi(t,k)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var P=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),fr(this,h,v,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=ee(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&En(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();En(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return DS(t.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(t,n){return t.getItemVisual(n,"z2")},e}(Se);function ST(r,e){this.parent.drift(r,e)}function po(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function Bf(r){return r!=null&&!$(r)&&(r={isIgnore:r}),r||{}}function Nf(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:qr(e),cursorStyle:e.get("cursor")}}var ug=function(){function r(e){this.group=new Se,this._SymbolCtor=e||$l}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=Bf(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Nf(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||n.removeAll(),e.diff(i).add(function(f){var h=c(f);if(po(e,h,f,t)){var v=new o(e,f,l,u);v.setPosition(h),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,h){var v=i.getItemGraphicEl(h),d=c(f);if(!po(e,d,f,t)){n.remove(v);return}var p=e.getItemVisual(f,"symbol")||"circle",m=v&&v.getSymbolType&&v.getSymbolType();if(!v||m&&m!==p)n.remove(v),v=new o(e,f,l,u),v.setPosition(d);else{v.updateData(e,f,l,u);var g={x:d[0],y:d[1]};s?v.attr(g):Ae(v,g,a)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var h=i.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Nf(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=Bf(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:z.size.m,align:"auto",backgroundColor:z.color.transparent,borderColor:z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:z.color.disabled,inactiveBorderColor:z.color.disabled,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:z.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:z.color.tertiary,borderWidth:1,borderColor:z.color.border},emphasis:{selectorLabel:{show:!0,color:z.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(ae),Lr=ne,Rs=C,Aa=Se,cg=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Aa),this.group.add(this._selectorGroup=new Aa),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var c=na(t,a).refContainer,f=t.getBoxLayoutParams(),h=t.get("padding"),v=ct(f,c,h),d=this.layoutInner(t,o,v,i,l,u),p=ct(oe({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=eg(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),c=Z(),f=n.get("selectedMode"),h=n.get("triggerEvent"),v=[];a.eachRawSeries(function(d){!d.get("legendHoverLink")&&v.push(d.id)}),Rs(n.getData(),function(d,p){var m=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` `)){var y=new Aa;y.newline=!0,u.add(y);return}var _=a.getSeriesByName(g)[0];if(!c.get(g))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,g,p,d,n,t,b,w,x,f,i);T.on("click",Lr(zf,g,null,i,v)).on("mouseover",Lr(Es,_.name,null,i,v)).on("mouseout",Lr(Os,_.name,null,i,v)),a.ssr&&T.eachChild(function(D){var M=ee(D);M.seriesIndex=_.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),h&&T.eachChild(function(D){m.packEventData(D,n,_,p,g)}),c.set(g,!0)}else a.eachRawSeries(function(D){var M=this;if(!c.get(g)&&D.legendVisualProvider){var A=D.legendVisualProvider;if(!A.containName(g))return;var L=A.indexOfName(g),I=A.getItemVisual(L,"style"),P=A.getItemVisual(L,"legendIcon"),k=cm(I.fill);k&&k[3]===0&&(k[3]=.2,I=W(W({},I),{fill:fm(k,"rgba")}));var E=this._createItem(D,g,p,d,n,t,{},I,P,f,i);E.on("click",Lr(zf,null,g,i,v)).on("mouseover",Lr(Es,null,g,i,v)).on("mouseout",Lr(Os,null,g,i,v)),a.ssr&&E.eachChild(function(U){var R=ee(U);R.seriesIndex=D.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),h&&E.eachChild(function(U){M.packEventData(U,n,D,p,g)}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},e.prototype.packEventData=function(t,n,a,i,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};ee(t).eventData=s},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();Rs(t,function(u){var c=u.type,f=new De({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Kr(f,{normal:h,emphasis:v},{defaultText:u.title}),Fo(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,c,f,h){var v=t.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),m=o.isSelected(n),g=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");c=_||c||"roundRect";var S=bT(c,i,l,u,v,m,h),b=new Aa,x=i.getModel("textStyle");if(q(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:c,iconRotate:g,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;b.add(wT({itemWidth:d,itemHeight:p,icon:c,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,D=s,M=o.get("formatter"),A=n;X(M)&&M?A=M.replace("{name}",n??""):q(M)&&(A=M(n));var L=m?x.getTextColor():i.get("inactiveColor");b.add(new De({style:Ut(x,{text:A,x:T,y:p/2,fill:L,align:D,verticalAlign:"middle"},{inheritColor:L})}));var I=new de({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&ea({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(k){k.silent=!0}),I.silent=!f,this.getContentGroup().add(b),Fo(b),b.__legendDataIndex=a,b},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Br(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Br("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,m=p===0?"width":"height",g=p===0?"height":"width",y=p===0?"y":"x";s==="end"?v[p]+=c[m]+d:f[p]+=h[m]+d,v[1-p]+=c[g]/2-h[g]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[m]=c[m]+d+h[m],_[g]=Math.max(c[g],h[g]),_[y]=Math.min(0,h[y]+v[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Ge);function bT(r,e,t,n,a,i,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),Rs(m,function(y,_){m[_]==="inherit"&&(m[_]=g[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:as(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=e.get("inactiveBorderWidth"),p=u[c];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function wT(r){var e=r.icon||"roundRect",t=Xt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=z.color.neutral00,t.style.lineWidth=2),t}function zf(r,e,t,n){Os(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Es(r,e,t,n)}function fg(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;na[o],m=[-v.x,-v.y];n||(m[i]=c[u]);var g=[0,0],y=[-d.x,-d.y],_=j(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var S=t.get("pageButtonPosition",!0);S==="end"?y[i]+=a[o]-d[o]:g[i]+=d[o]+_}y[1-i]+=v[s]/2-d[s]/2,c.setPosition(m),f.setPosition(g),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]),f.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=b[s],f.setClipPath(new de({shape:x})),f.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Ae(c,{x:w.contentPosition[0],y:w.contentPosition[1]},p?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;C(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=a.childOfName(c);v&&(v.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",X(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=go[o],l=mo[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],h=c.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=S(f);d.contentPosition[o]=-p.s;for(var m=u+1,g=p,y=p,_=null;m<=h;++m)_=S(c[m]),(!_&&y.e>g.s+i||_&&!b(_,g.s))&&(y.i>g.i?g=y:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=_;for(var m=u-1,g=p,y=p,_=null;m>=-1;--m)_=S(c[m]),(!_||!b(y,_.s))&&g.i=w&&x.s<=w+i}},e.prototype._findTargetItemIndex=function(t){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===t&&(n=s)}),n??i},e.type="legend.scroll",e}(cg);function MT(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function IT(r){xt(vg),r.registerComponentModel(DT),r.registerComponentView(AT),MT(r)}function RD(r){xt(vg),xt(IT)}var LT={label:{enabled:!0},decal:{show:!1}},Wf=fe(),PT={};function kT(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=Q(LT);J(n.label,r.getLocaleModel().get("aria"),!1),J(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=Z();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),Wf(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(q(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var y=Bu(h.ecModel,h.name,PT,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,y))}else{var d=h.getRawData(),p={},m=Wf(h).scope;v.each(function(b){var x=v.getRawIndex(b);p[x]=b});var g=d.count();d.each(function(b){var x=p[b],w=d.getName(b)||b+"",T=Bu(h.ecModel,w,m,g),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",S(D,T))})}function S(b,x){var w=b?W(W({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=oe(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.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),m;if(!(h<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);m=o(y,{title:g})}else m=f.get(["general","withoutTitle"]);var _=[],S=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(S,{seriesCount:h}),r.eachSeries(function(T,D){if(D1?f.get(["series","multiple",L]):f.get(["series","single",L]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var P=f.get(["data","partialData"]);M+=o(P,{displayCnt:v})}else M+=f.get(["data","allData"]);for(var k=f.get(["data","separator","middle"]),E=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),R=[],O=0;O":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},ET=function(){function r(e){var t=this._condVal=X(e)?new RegExp(e):vm(e)?e:null;if(t==null){var n="";re(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return X(t)?this._condVal.test(e):ce(t)?this._condVal.test(e+""):!1},r}(),OT=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),BT=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t-1&&(u.style.stroke=u.style.fill,u.style.fill=z.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(He);function dg(r,e,t){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=KT(a,t),o=n.dim,s=a.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=Y(r.dimensions,function(d){return e.mapDimension(d)}),h=!1,v=e.getCalculationInfo("stackResultDimension");return Wr(e,f[0])&&(h=!0,f[0]=v),Wr(e,f[1])&&(h=!0,f[1]=v),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function KT(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:ce(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function pg(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function qT(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function jT(r,e,t,n,a,i,o,s){for(var l=qT(r,e),u=[],c=[],f=[],h=[],v=[],d=[],p=[],m=dg(a,e,o),g=r.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_=a||p<0)break;if(sr(g,y)){if(l){p+=i;continue}break}if(p===t)r[i>0?"moveTo":"lineTo"](g,y),f=g,h=y;else{var _=g-u,S=y-c;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var b=p+i,x=e[b*2],w=e[b*2+1];x===g&&w===y&&m=n||sr(x,w))v=g,d=y;else{M=x-u,A=w-c;var P=g-u,k=x-g,E=y-c,U=w-y,R=void 0,O=void 0;if(s==="x"){R=Math.abs(P),O=Math.abs(k);var V=M>0?1:-1;v=g-V*R*o,d=y,L=g+V*O*o,I=y}else if(s==="y"){R=Math.abs(E),O=Math.abs(U);var B=A>0?1:-1;v=g,d=y-B*R*o,L=g,I=y+B*O*o}else R=Math.sqrt(P*P+E*E),O=Math.sqrt(k*k+U*U),D=O/(O+R),v=g-M*o*(1-D),d=y-A*o*(1-D),L=g+M*o*D,I=y+A*o*D,L=Pt(L,kt(x,g)),I=Pt(I,kt(w,y)),L=kt(L,Pt(x,g)),I=kt(I,Pt(w,y)),M=L-g,A=I-y,v=g-M*R/O,d=y-A*R/O,v=Pt(v,kt(u,g)),d=Pt(d,kt(c,y)),v=kt(v,Pt(u,g)),d=kt(d,Pt(c,y)),M=g-v,A=y-d,L=g+M*O/R,I=y+A*O/R}r.bezierCurveTo(f,h,v,d,g,y),f=L,h=I}else r.lineTo(g,y)}u=g,c=y,p+=i}return m}var gg=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),QT=function(r){H(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:z.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new gg},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&sr(a[o*2-2],a[o*2-1]);o--);for(;i=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[t,S]:[S,t]}s=v,l=d;break;case o.C:v=i[f++],d=i[f++],p=i[f++],m=i[f++],g=i[f++],y=i[f++];var b=u?su(s,v,p,g,t,c):su(l,d,m,y,t,c);if(b>0)for(var x=0;x=0){var S=u?lu(l,d,m,y,w):lu(s,v,p,g,w);return u?[t,S]:[S,t]}}s=g,l=y;break}}},e}(Ce),JT=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(gg),e1=function(r){H(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new JT},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&sr(a[s*2-2],a[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function n1(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.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=e.getAxis(a),u=Y(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=r1(u,a==="x"?t.getWidth():t.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,p=h[0].coord-d,m=h[v-1].coord+d,g=m-p;if(g<.001)return"transparent";C(h,function(_){_.offset=(_.coord-p)/g}),h.push({offset:v?h[v-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:f[0]||"transparent"});var y=new Rv(0,0,0,0,h,!0);return y[a]=p,y[a+"2"]=m,y}}}function a1(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&i1(i,e))){var o=e.mapDimension(i.dim),s={};return C(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function i1(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function o1(r,e){return isNaN(r)||isNaN(e)}function s1(r){for(var e=r.length/2;e>0&&o1(r[e*2-2],r[e*2-1]);e--);return e-1}function Kf(r,e){return[r[e*2],r[e*2+1]]}function l1(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function _g(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var O=d.getState("emphasis").style;O.lineWidth=+d.style.lineWidth+1}ee(d).seriesIndex=t.seriesIndex,fr(d,E,U,R);var V=$f(t.get("smooth")),B=t.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:B,connectNulls:w}),p){var G=s.getCalculationInfo("stackedOnSeries"),K=0;p.useStyle(oe(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),G&&(K=$f(G.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:K,smoothMonotone:B,connectNulls:w}),Rn(p,t,"areaStyle"),ee(p).seriesIndex=t.seriesIndex,fr(p,E,U,R)}var te=this._changePolyState;s.eachItemGraphicEl(function(le){le&&(le.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=c,this._step=M,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,d),p&&this.packEventData(t,p))},e.prototype.packEventData=function(t,n){ee(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=cr(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 c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=t.get("zlevel")||0,v=t.get("z")||0;u=new $l(o,s),u.x=c,u.y=f,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 Be.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=cr(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 Be.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;pu(this._polyline,t),n&&pu(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new QT({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new e1({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,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=t.hostModel,c=u.get("animationDuration");q(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=q(f)?f(null):f;t.eachItemGraphicEl(function(v,d){var p=v;if(p){var m=[v.x,v.y],g=void 0,y=void 0,_=void 0;if(a)if(o){var S=a,b=n.pointToCoord(m);i?(g=S.startAngle,y=S.endAngle,_=-b[1]/180*Math.PI):(g=S.r0,y=S.r,_=b[0])}else{var x=a;i?(g=x.x,y=x.x+x.width,_=v.x):(g=x.y+x.height,y=x.y,_=v.y)}var w=y===g?0:(_-g)/(y-g);l&&(w=1-w);var T=q(f)?f(d):c*w+h,D=p.getSymbolPath(),M=D.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),D.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(_g(t)){var o=t.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 De({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=s1(l);c>=0&&(Kr(s,qr(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?lg(o,v):Pi(o,f)},enableTextSetter:!0},u1(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),h=a.hostModel,v=h.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,_=n.shape,S=y?g?_.x:_.y+_.height:g?_.x+_.width:_.y,b=(g?p:0)*(y?-1:1),x=(g?0:-p)*(y?-1:1),w=g?"x":"y",T=l1(f,S,w),D=T.range,M=D[1]-D[0],A=void 0;if(M>=1){if(M>1&&!v){var L=Kf(f,D[0]);u.attr({x:L[0]+b,y:L[1]+x}),o&&(A=h.getRawValue(D[0]))}else{var L=c.getPointOn(S,w);L&&u.attr({x:L[0]+b,y:L[1]+x});var I=h.getRawValue(D[0]),P=h.getRawValue(D[1]);o&&(A=qm(a,d,I,P,T.t))}i.lastFrameIndex=D[0]}else{var k=t===1||i.lastFrameIndex>0?D[0]:0,L=Kf(f,k);o&&(A=h.getRawValue(k)),u.attr({x:L[0]+b,y:L[1]+x})}if(o){var E=bi(u);typeof E.setLabelText=="function"&&E.setLabelText(A)}}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,h=jT(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=h.current,d=h.stackedOnCurrent,p=h.next,m=h.stackedOnNext;if(o&&(d=Rt(h.stackedOnCurrent,h.current,a,o,l),v=Rt(h.current,null,a,o,l),m=Rt(h.stackedOnNext,h.next,a,o,l),p=Rt(h.next,null,a,o,l)),Zf(v,p)>3e3||c&&Zf(d,m)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=v;var g={shape:{points:p}};h.current!==v&&(g.shape.__points=h.next),u.stopAnimation(),Ae(u,g,f),c&&(c.setShape({points:v,stackedOnPoints:d}),c.stopAnimation(),Ae(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=h.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&y.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/h);if(isFinite(v)&&v>1){i==="lttb"?e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v)):i==="minmax"&&e.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/v));var d=void 0;X(i)?d=f1[i]:q(i)&&(d=i),d&&e.setData(a.downSample(a.mapDimension(u.dim),1/v,d,v1))}}}}}function ND(r){r.registerChartView(c1),r.registerSeriesModel($T),r.registerLayout(Ql("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Sg("line"))}var Zn=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Mi(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(a)C(i.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var d=h.getTicksCoords(),p=h.getTickModel().get("alignWithLabel"),m=o[v],g=n[v]==="x1"||n[v]==="y1";if(g&&!p&&(m+=1),d.length<2)return;if(d.length===2){s[v]=h.toGlobalCoord(h.getExtent()[g?1:0]);return}for(var y=void 0,_=void 0,S=1,b=0;bm){_=(x+y)/2;break}b===1&&(S=w-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"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(He);He.registerClass(Zn);var h1=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Mi(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=al(Zn.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:z.color.primary,borderWidth:2}},realtimeSort:!1}),e}(Zn),d1=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}(),qf=function(r){H(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new d1},e.prototype.buildPath=function(t,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,c=n.startAngle,f=n.endAngle,h=n.clockwise,v=Math.PI*2,d=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,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(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){wn(i,t,ee(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Be),jf={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=_o(e.x,r.x),s=So(e.x+e.width,a),l=_o(e.y,r.y),u=So(e.y+e.height,i),c=sa?s:o,e.y=f&&l>i?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=So(e.r,r.r),i=_o(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},Qf={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new de({shape:W({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?qf:pr,c=new u({shape:n,z2:1});c.name="item";var f=xg(a);if(c.calculateTextPosition=p1(f,{isRoundCap:u===qf}),i){var h=c.shape,v=a?"r":"endAngle",d={};h[v]=a?n.r0:n.startAngle,d[v]=n[v],(s?Ae:Ve)(c,{shape:d},i)}return c}};function _1(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function Jf(r,e,t,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?Ae:Ve)(t,{shape:l},e,a,null);var c=e?r.baseAxis.model:null;(o?Ae:Ve)(t,{shape:u},c,a)}function ev(r,e){for(var t=0;t0?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,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function b1(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function xg(r){return function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}}(r)}function rv(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=_n(n.getModel("itemStyle"),c,!0);W(c,f),r.setShape(c)}}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=qr(n);Kr(r,d,{labelFetcher:i,labelDataIndex:t,defaultText:Pi(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var m=n.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,g1(r,m==="outside"?v:m,xg(o),n.get(["label","rotate"]))}Uy(p,d,i.getRawValue(t),function(y){return lg(e,y)});var g=n.getModel(["emphasis"]);fr(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),Rn(r,n),b1(a)&&(r.style.fill="none",r.style.stroke="none",C(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function w1(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var C1=function(){function r(){}return r}(),nv=function(r){H(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new C1},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function T1(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function bg(r,e,t){if(Kl(t,"cartesian2d")){var n=e,a=t.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=t.getArea(),i=e;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 D1(r,e,t){var n=r.type==="polar"?pr:de;return new n({shape:bg(e,t,r),silent:!0,z2:0})}function zD(r){r.registerChartView(y1),r.registerSeriesModel(h1),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ne(jd,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Qd("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Sg("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var ov=Math.PI*2,Pa=Math.PI/180;function A1(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=C0(n,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*Pa,v=n.get("endAngle"),d=n.get("padAngle")*Pa;v=v==="auto"?h-ov:-v*Pa;var p=n.get("minAngle")*Pa,m=p+d,g=0;a.each(i,function(U){!isNaN(U)&&g++});var y=a.getSum(i),_=Math.PI/(y||g)*2,S=n.get("clockwise"),b=n.get("roseType"),x=n.get("stillShowZeroSum"),w=a.getDataExtent(i);w[0]=0;var T=S?1:-1,D=[h,v],M=T*d/2;pm(D,!S),h=D[0],v=D[1];var A=wg(n);A.startAngle=h,A.endAngle=v,A.clockwise=S,A.cx=s,A.cy=l,A.r=u,A.r0=c;var L=Math.abs(v-h),I=L,P=0,k=h;if(a.setLayout({viewRect:f,r:u}),a.each(i,function(U,R){var O;if(isNaN(U)){a.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:c,r:b?NaN:u});return}b!=="area"?O=y===0&&x?_:U*_:O=L/g,OO?(B=k+T*O/2,G=B):(B=k+M,G=V-M),a.setItemLayout(R,{angle:O,startAngle:B,endAngle:G,clockwise:S,cx:s,cy:l,r0:c,r:b?Bt(U,w,[c,u]):u}),k=V}),It?g:m,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*a,w=n+_.len,T=Math.abs(x)r.unconstrainedWidth?null:h:null;n.setStyle("width",v)}Tg(i,n)}}}function Tg(r,e){lv.rect=r,yp(lv,e,P1)}var P1={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},lv={};function xo(r){return r.position==="center"}function k1(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*I1,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,D=w.getTextContent(),M=w.getTextGuideLine(),A=e.getItemModel(x),L=A.getModel("label"),I=L.get("position")||A.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),k=L.get("alignTo"),E=se(L.get("edgeDistance"),u),U=L.get("bleedMargin");U==null&&(U=Math.min(u,h)>200?10:2);var R=A.getModel("labelLine"),O=R.get("length");O=se(O,u);var V=R.get("length2");if(V=se(V,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":G>0?"left":"right"}var Dt=Math.PI,vt=0,en=L.get("rotate");if(ce(en))vt=en*(Dt/180);else if(I==="center")vt=0;else if(en==="radial"||en===!0){var zg=G<0?-B+Dt:-B;vt=zg}else if(en==="tangential"&&I!=="outside"&&I!=="outer"){var _r=Math.atan2(G,K);_r<0&&(_r=Dt*2+_r);var Vg=K>0;Vg&&(_r=Dt+_r),vt=_r-Dt}if(i=!!vt,D.x=te,D.y=le,D.rotation=vt,D.setStyle({verticalAlign:"middle"}),Tt){D.setStyle({align:yr});var Ri=D.states.select;Ri&&(Ri.x+=D.x,Ri.y+=D.y)}else{var ki=new Ee(0,0,0,0);Tg(ki,D),t.push({label:D,labelLine:M,position:I,len:O,len2:V,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new pe(G,K),linePoints:Ct,textAlign:yr,labelDistance:P,labelAlignTo:k,edgeDistance:E,bleedMargin:U,rect:ki,unconstrainedWidth:ki.width,labelStyleWidth:D.style.width})}w.setTextConfig({inside:Tt})}}),!i&&r.get("avoidLabelOverlap")&&L1(t,n,a,l,u,h,c,f);for(var p=0;p0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=i.r0}},e.type="pie",e}(Be);function Dg(r,e,t){e=N(e)&&{coordDimensions:e}||W({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=Xd(n,e).dimensions,i=new Yd(a,r);return i.initData(n,t),i}var O1=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r}(),B1=fe(),Ag=function(r){H(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new O1(ie(this.getData,this),ie(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Dg(this,{coordDimensions:["value"],encodeDefaulter:ne(k0,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=B1(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=Mm(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){No(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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"},e}(He);m0({fullType:Ag.type,getCoord2:function(r){return r.getShallow("center")}});function N1(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(ce(o)&&!isNaN(o)&&o<0)})}}}function VD(r){r.registerChartView(E1),r.registerSeriesModel(Ag),gS("pie",r.registerAction),r.registerLayout(ne(A1,"pie")),r.registerProcessor(M1("pie")),r.registerProcessor(N1("pie"))}var z1=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return Mi(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:z.color.primary}},universalTransition:{divideShape:"clone"}},e}(He),Mg=4,V1=function(){function r(){}return r}(),G1=function(r){H(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new V1},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var c=u*2,f=i[c]-s/2,h=i[c+1]-l/2;if(t>=f&&n>=h&&t<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),W1=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Ql("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new F1:new ug,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Be);function GD(r){xt(kp),r.registerSeriesModel(z1),r.registerChartView(W1),r.registerLayout(Ql("scatter"))}var H1=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[a,i],d=v[c].get("type"),p=v[1-c].get("type"),m=e.data;if(m&&l){var g=[];C(m,function(S,b){var x;N(S)?(x=S.slice(),S.unshift(b)):N(S.value)?(x=W({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,g.push(x)}),e.data=g}var y=this.defaultValueDimensions,_=[{name:f,type:cs(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:cs(p),dimsDef:y.slice()}];return Dg(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:ne(Vh,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),U1=["itemStyle","borderColor"],Y1=["itemStyle","borderColor0"],X1=["itemStyle","borderColorDoji"],Z1=["itemStyle","color"],$1=["itemStyle","color0"];function Jl(r,e){return e.get(r>0?Z1:$1)}function eu(r,e){return e.get(r===0?X1:r>0?U1:Y1)}var K1={seriesType:"candlestick",plan:ia(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=Jl(s,o),l.stroke=eu(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");W(u,l)}}}}}},q1=["color","borderColor"],j1=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){ta(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&uv(u,f))return;var h=bo(f,c,!0);Ve(h,{shape:{points:f.ends}},t,c),wo(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(h);return}var v=n.getItemLayout(c);if(s&&uv(u,v)){i.remove(h);return}h?(Ae(h,{shape:{points:v.ends}},t,c),_i(h)):h=bo(v),wo(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),cv(t,this.group);var n=t.get("clip",!0)?jl(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=bo(s);wo(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){cv(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Be),Q1=function(){function r(){}return r}(),J1=function(r){H(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new Q1},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e}(Ce);function bo(r,e,t){var n=r.ends;return new J1({shape:{points:t?eD(n,r):n},z2:100})}function uv(r,e){for(var t=!0,n=0;nb?A[i]:M[i],ends:P,brushRect:O(x,w,_)})}function U(B,G){var K=[];return K[a]=G,K[i]=B,isNaN(G)||isNaN(B)?[NaN,NaN]:e.dataToPoint(K)}function R(B,G,K){var te=G.slice(),le=G.slice();te[a]=Ra(te[a]+n/2,1,!1),le[a]=Ra(le[a]-n/2,1,!0),K?B.push(te,le):B.push(le,te)}function O(B,G,K){var te=U(B,K),le=U(G,K);return te[a]-=n/2,le[a]-=n/2,{x:te[0],y:te[1],width:n,height:le[1]-te[1]}}function V(B){return B[a]=Ra(B[a],1),B}}function d(p,m){for(var g=st(p.count*4),y=0,_,S=[],b=[],x,w=m.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var D=w.get(s,x),M=w.get(u,x),A=w.get(c,x),L=w.get(f,x),I=w.get(h,x);if(isNaN(D)||isNaN(L)||isNaN(I)){g[y++]=NaN,y+=3;continue}g[y++]=fv(w,x,M,A,c,T),S[a]=D,S[i]=L,_=e.dataToPoint(S,null,b),g[y++]=_?_[0]:NaN,g[y++]=_?_[1]:NaN,S[i]=I,_=e.dataToPoint(S,null,b),g[y++]=_?_[1]:NaN}m.setLayout("largePoints",g)}}};function fv(r,e,t,n,a,i){var o;return t>n?o=-1:t0?r.get(a,e-1)<=n?1:-1:1,o}function aD(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=se(j(r.get("barMaxWidth"),a),a),o=se(j(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?se(s,a):Math.max(Math.min(a/2,i),o)}function FD(r){r.registerChartView(j1),r.registerSeriesModel(Ig),r.registerPreprocessor(rD),r.registerVisual(K1),r.registerLayout(nD)}var iD=["itemStyle","borderWidth"],vv=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Do=new hi,oD=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:vv[+c],categoryDim:vv[1-+c]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=dv(o,d),m=hv(o,d,p,h),g=pv(o,h,m);o.setItemGraphicEl(d,g),i.add(g),mv(g,h,m)}}).update(function(d,p){var m=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(m);return}var g=dv(o,d),y=hv(o,d,g,h),_=Og(o,y);m&&_!==m.__pictorialShapeStr&&(i.remove(m),o.setItemGraphicEl(d,null),m=null),m?hD(m,h,y):m=pv(o,h,y,!0),o.setItemGraphicEl(d,m),m.__pictorialSymbolMeta=y,i.add(m),mv(m,h,y)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&gv(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=t.get("clip",!0)?jl(t.coordinateSystem,!1,t):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){gv(i,ee(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(Be);function hv(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};sD(t,i,a,n,h),lD(r,e,a,i,o,h.boundingLength,h.pxSign,c,n,h),uD(t,h.symbolScale,u,n,h);var v=h.symbolSize,d=Cl(t.get("symbolOffset"),v);return cD(t,v,a,i,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function sD(r,e,t,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-+(t[i.wh]<=0),c;if(N(o)){var f=[Ao(s,o[0])-l,Ao(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function Ao(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function lD(r,e,t,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),v=r.getItemVisual(e,"symbolSize"),d;N(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[f.index]=se(d[f.index],h),d[c.index]=se(d[c.index],n?h:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}function uD(r,e,t,n,a){var i=r.get(iD)||0;i&&(Do.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Do.updateTransform(),i/=Do.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function cD(r,e,t,n,a,i,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,d=f.pxSign,p=Math.max(e[v.index]+s,0),m=p;if(n){var g=Math.abs(l),y=In(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var S=se(y,e[v.index]),b=Math.max(p+S*2,0),x=_?0:S*2,w=Wv(n),T=w?n:yv((g+x)/b),D=g-T*p;S=D/2/(_?T:Math.max(T-1,1)),b=p+S*2,x=_?0:S*2,!w&&n!=="fixed"&&(T=u?yv((Math.abs(u)+x)/b):0),m=T*b-x,f.repeatTimes=T,f.symbolMargin=S}var M=d*(m/2),A=f.pathPosition=[];A[h.index]=t[h.wh]/2,A[v.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(A[0]+=i[0],A[1]+=i[1]);var L=f.bundlePosition=[];L[h.index]=t[h.xy],L[v.index]=t[v.xy];var I=f.barRectShape=W({},t);I[v.wh]=d*Math.max(Math.abs(t[v.wh]),Math.abs(A[v.index]+M)),I[h.wh]=t[h.wh];var P=f.clipShape={};P[h.xy]=-t[h.xy],P[h.wh]=c.ecSize[h.wh],P[v.xy]=0,P[v.wh]=t[v.wh]}function Lg(r){var e=r.symbolPatternSize,t=Xt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function Pg(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(tu(r,function(p){p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,c0:g<0)&&(y=u-1-p),m[l.index]=f*(y-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function kg(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Nr(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=Lg(t),a.add(i),Nr(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function Rg(r,e,t){var n=W({},e.barRectShape),a=r.__pictorialBarRect;a?Nr(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new de({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function Eg(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=W({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)Ae(a,{shape:i},s,l);else{i[o.wh]=0,a=new de({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],nl[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function dv(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=fD,t.isAnimationEnabled=vD,t}function fD(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function vD(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function pv(r,e,t,n){var a=new Se,i=new Se;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?Pg(a,e,t):kg(a,e,t),Rg(a,t,n),Eg(a,e,t,n),a.__pictorialShapeStr=Og(r,t),a.__pictorialSymbolMeta=t,a}function hD(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;Ae(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?Pg(r,e,t,!0):kg(r,e,t,!0),Rg(r,t,!0),Eg(r,e,t,!0)}function gv(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];tu(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),C(i,function(o){En(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function Og(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tu(r,e,t){C(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Nr(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&nl[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function mv(r,e,t){var n=t.dataIndex,a=t.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"),c=i.get("focus"),f=i.get("blurScope"),h=i.get("scale");tu(r,function(p){if(p instanceof Zr){var m=p.style;p.useStyle(W({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else p.useStyle(t.style);var g=p.ensureState("emphasis");g.style=o,h&&(g.scaleX=p.scaleX*1.1,g.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Kr(d,qr(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Pi(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),fr(r,c,f,i.get("disabled"))}function yv(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var dD=function(r){H(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=al(Zn.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:z.color.primary}}}),e}(Zn);function WD(r){r.registerChartView(oD),r.registerSeriesModel(dD),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ne(jd,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Qd("pictorialBar"))}function _v(r){return N(r[0])}function Sv(r,e){for(var t=[],n=r.length,a=0;a=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var pD={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;_v(r)&&(u=r,c=e),_v(e)&&(u=e,c=r);function f(g,y,_,S,b){var x=g.many,w=g.one;if(x.length===1&&!b){var T=y?x[0]:w,D=y?w:x[0];if(gm(T))f({many:[T],one:D},!0,_,S,!0);else{var M=s?oe({delay:s(_,S)},l):l;mm(T,D,M),i(T,D,T,D,M)}}else for(var A=oe({dividePath:pD[t],individualDelay:s&&function(U,R,O,V){return s(U+_,S)}},l),L=y?ym(x,w,A):_m(w,x,A),I=L.fromIndividuals,P=L.toIndividuals,k=I.length,E=0;Ee.length,v=u?Sv(c,u):Sv(h?e:r,[h?r:e]),d=0,p=0;pBg))for(var i=n.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof Ce&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function Tv(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Dv(r){return N(r)?r.sort().join(","):r}function Ot(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function bD(r,e){var t=Z(),n=Z(),a=Z();return C(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=Tv(i),c=Dv(u);n.set(c,{dataGroupId:s,data:l}),N(u)&&C(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),C(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=Tv(i),u=Dv(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ot(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ot(s),data:s}]});else if(N(l)){var f=[];C(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Ot(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ot(s)}]})}else{var h=a.get(l);if(h){var v=t.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ot(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ot(s)})}}}}),t}function Av(r,e){for(var t=0;t=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ot(e.oldData[s]),groupIdDim:o.dimension})}),C(_e(r.to),function(o){var s=Av(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ot(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&Ng(a,i,n)}function HD(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){C(_e(n.seriesTransition),function(a){C(_e(a.to),function(i){for(var o=n.updatedSeries,s=0;s40&&(u=Math.ceil(a/40));for(var c=0;c