import{_ as E}from"./tslib-BDyQ-Jie.js";import{i as Y,r as on,m as G,a as Se,b as B,c as J,d as St,e as Nt,f as $,g as w,h as ic,j as ct,k as eb,l as z,n as K,P as Mt,o as af,p as yn,q as Ut,s as pt,t as rb,u as ab,v as Z,w as Q,Z as Ne,x as nb,y as ib,z as ob,A as sb,B as gv,C as ls,T as Ja,D as Wi,E as Re,F as Ca,G as Lm,S as Ee,R as Hs,H as ke,I as xe,J as dt,L as ee,K as Ws,M as yv,N as wt,O as Pm,Q as et,U as lb,V as Us,W as us,X as Ft,Y as ub,_ as vt,$ as Ui,a0 as it,a1 as j,a2 as Jt,a3 as Rm,a4 as ye,a5 as tt,a6 as _e,a7 as _t,a8 as U,a9 as cs,aa as _i,ab as pe,ac as oc,ad as cb,ae as vb,af as vs,ag as hb,ah as mn,ai as nf,aj as _l,ak as fb,al as pb,am as sn,an as hs,ao as db,ap as na,aq as Em,ar as km,as as Ys,at as sa,au as xl,av as Nm,aw as gb,ax as yb,ay as lr,az as mb,aA as Sb,aB as of,aC as sf,aD as _b,aE as Om,aF as Sn,aG as Qt,aH as Yi,aI as xb,aJ as lf,aK as Br,aL as bb,aM as wb,aN as Ab,aO as ma,aP as Tb,aQ as _n,aR as ce,aS as mv,aT as Vm,aU as Sa,aV as Db,aW as Bm,aX as Xo,aY as bl,aZ as fs,a_ as ui,a$ as kr,b0 as Zi,b1 as Cb,b2 as Mb,b3 as Qa,b4 as uf,b5 as sc,b6 as Ib,b7 as Lb,b8 as zm,b9 as Pb,ba as Rb,bb as Eb,bc as cf,bd as kb,be as Nb,bf as xi,bg as Ob,bh as lc,bi as vf,bj as Vb,bk as Bb,bl as zb,bm as Gb,bn as Fb,bo as Hb,bp as Wb,bq as Ub}from"./zrender-xbpiMqDc.js";var Yb=1e-4,Gm=20;function Zb(r){return r.replace(/^\s+|\s+$/g,"")}function yt(r,e,t,a){var n=e[0],i=e[1],o=t[0],s=t[1],l=i-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}function H(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Y(r)?Zb(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Ot(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),Gm),r=(+r).toFixed(e),t?r:+r}function Le(r){return r.sort(function(e,t){return e-t}),r}function qe(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 $b(r)}function $b(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,n=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function Fm(r,e){var t=Math.log,a=Math.LN10,n=Math.floor(t(r[1]-r[0])/a),i=Math.round(t(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function Xb(r,e){var t=on(r,function(f,p){return f+(isNaN(p)?0:p)},0);if(t===0)return[];for(var a=Math.pow(10,e),n=G(r,function(f){return(isNaN(f)?0:f)/t*a*100}),i=a*100,o=G(n,function(f){return Math.floor(f)}),s=on(o,function(f,p){return f+p},0),l=G(n,function(f,p){return f-o[p]});su&&(u=l[v],c=v);++o[c],l[c]=0,++s}return G(o,function(f){return f/a})}function Kb(r,e){var t=Math.max(qe(r),qe(e)),a=r+e;return t>Gm?a:Ot(a,t)}var hf=9007199254740991;function Hm(r){var e=Math.PI*2;return(r%e+e)%e}function bi(r){return r>-1e-4&&r=10&&e++,e}function Wm(r,e){var t=Sv(r),a=Math.pow(10,t),n=r/a,i;return n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10,r=i*a,t>=-20?+r.toFixed(t<0?-t:0):r}function wl(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),n=+r[a-1],i=t-a;return i?n+i*(r[a]-n):n}function ff(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a=0||i&&ct(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var xw=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],bw=ba(xw),ww=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return bw(this,e,t)},r}(),q=ut(),cc=function(r,e,t,a){if(a){var n=q(a);n.dataIndex=t,n.dataType=e,n.seriesIndex=r,n.ssrType="chart",a.type==="group"&&a.traverse(function(i){var o=q(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},yf=1,mf={},e0=ut(),wv=ut(),Av=0,Xi=1,$s=2,de=["emphasis","blur","select"],Ai=["normal","emphasis","blur","select"],bn=10,Aw=9,ha="highlight",Ko="downplay",hi="select",qo="unselect",fi="toggleSelect";function Na(r){return r!=null&&r!=="none"}function Xs(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function r0(r){Xs(r,"emphasis",$s)}function a0(r){r.hoverState===$s&&Xs(r,"normal",Av)}function Tv(r){Xs(r,"blur",Xi)}function n0(r){r.hoverState===Xi&&Xs(r,"normal",Av)}function Tw(r){r.selected=!0}function Dw(r){r.selected=!1}function Sf(r,e,t){e(r,t)}function Sr(r,e,t){Sf(r,e,t),r.isGroup&&r.traverse(function(a){Sf(a,e,t)})}function ps(r,e){switch(e){case"emphasis":r.hoverState=$s;break;case"normal":r.hoverState=Av;break;case"blur":r.hoverState=Xi;break;case"select":r.selected=!0}}function Cw(r,e,t,a){for(var n=r.style,i={},o=0;o=0,i=!1;if(r instanceof Mt){var o=e0(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Na(s)||Na(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=z({},a),u=z({},u),u.fill=s):!Na(u.fill)&&Na(s)?(i=!0,a=z({},a),u=z({},u),u.fill=af(s)):!Na(u.stroke)&&Na(l)&&(i||(a=z({},a),u=z({},u)),u.stroke=af(l)),a.style=u}}if(a&&a.z2==null){i||(a=z({},a));var c=r.z2EmphasisLift;a.z2=r.z2+(c??bn)}return a}function Iw(r,e,t){if(t&&t.z2==null){t=z({},t);var a=r.z2SelectLift;t.z2=r.z2+(a??Aw)}return t}function Lw(r,e,t){var a=ct(r.currentStates,e)>=0,n=r.style.opacity,i=a?null:Cw(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=z({},t),o=z({opacity:a?n:i.opacity*.1},o),t.style=o),t}function Al(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return Mw(this,r,e,t);if(r==="blur")return Lw(this,r,t);if(r==="select")return Iw(this,r,t)}return t}function wa(r){r.stateProxy=Al;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Al),t&&(t.stateProxy=Al)}function _f(r,e){!l0(r,e)&&!r.__highByOuter&&Sr(r,r0)}function xf(r,e){!l0(r,e)&&!r.__highByOuter&&Sr(r,a0)}function fr(r,e){r.__highByOuter|=1<<(e||0),Sr(r,r0)}function pr(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Sr(r,a0)}function i0(r){Sr(r,Tv)}function Dv(r){Sr(r,n0)}function o0(r){Sr(r,Tw)}function s0(r){Sr(r,Dw)}function l0(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function u0(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(n,i){var o=wv(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){n0(u)}),s&&t.push(i)),o.isBlured=!1}),w(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function vc(r,e,t,a){var n=a.getModel();t=t||"coordinateSystem";function i(u,c){for(var v=0;v0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function fa(r,e,t){la(r,!0),Sr(r,wa),fc(r,e,t)}function Ow(r){la(r,!1)}function kt(r,e,t,a){a?Ow(r):fa(r,e,t)}function fc(r,e,t){var a=q(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var wf=["emphasis","blur","select"],Vw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function re(r,e,t,a){t=t||"itemStyle";for(var n=0;n0){var v=c.duration,h=c.delay,f=c.easing,p={duration:v,delay:h||0,easing:f,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function ft(r,e,t,a,n,i){Mv("update",r,e,t,a,n,i)}function Pt(r,e,t,a,n,i){Mv("enter",r,e,t,a,n,i)}function tn(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Df(r){return!r.isGroup}function Zw(r){return r.shape!=null}function Ki(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){Df(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Zw(o)&&(s.shape=z({},o.shape)),s}var i=a(r);e.traverse(function(o){if(Df(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),ft(o,l,t,q(o).dataIndex)}}})}function p0(r,e){return G(r,function(t){var a=t[0];a=ds(a,e.x),a=gs(a,e.x+e.width);var n=t[1];return n=ds(n,e.y),n=gs(n,e.y+e.height),[a,n]})}function $w(r,e){var t=ds(r.x,e.x),a=gs(r.x+r.width,e.x+e.width),n=ds(r.y,e.y),i=gs(r.y+r.height,e.y+e.height);if(a>=t&&i>=n)return{x:t,y:n,width:a-t,height:i-n}}function qi(r,e,t){var a=z({rectHover:!0},e),n=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),Q(n,t),new Ne(a)):Ks(r.replace("path://",""),a,t,"center")}function ri(r,e,t,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=Tl(f,p,c,v)/h;return!(g<0||g>1)}function Tl(r,e,t,a){return r*a-t*e}function Xw(r){return r<=1e-6&&r>=-1e-6}function Ma(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,n=Y(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&w(Ut(l),function(c){Z(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=q(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:Q({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function Cf(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Ur(r,e){if(r)if(B(r))for(var t=0;t=0&&s.push(l)}),s}}function Yr(r,e){return it(it({},r,!0),e,!0)}const oA={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:". "}}}},sA={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 ms="ZH",Pv="EN",en=Pv,Jo={},Rv={},x0=Nt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||en).toUpperCase();return r.indexOf(ms)>-1?ms:en}():en;function b0(r,e){r=r.toUpperCase(),Rv[r]=new mt(e),Jo[r]=e}function lA(r){if(Y(r)){var e=Jo[r.toUpperCase()]||{};return r===ms||r===Pv?j(e):it(j(e),j(Jo[en]),!1)}else return it(j(r),j(Jo[en]),!1)}function yc(r){return Rv[r]}function uA(){return Rv[en]}b0(Pv,oA);b0(ms,sA);var Ev=1e3,kv=Ev*60,pi=kv*60,Ie=pi*24,Rf=Ie*365,ai={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},vo="{yyyy}-{MM}-{dd}",Ef={year:"{yyyy}",month:"{yyyy}-{MM}",day:vo,hour:vo+" "+ai.hour,minute:vo+" "+ai.minute,second:vo+" "+ai.second,millisecond:ai.none},Ml=["year","month","day","hour","minute","second","millisecond"],w0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function br(r,e){return r+="","0000".substr(0,e-r.length)+r}function rn(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 cA(r){return r===rn(r)}function vA(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Js(r,e,t,a){var n=er(r),i=n[Nv(t)](),o=n[an(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[Qs(t)](),u=n["get"+(t?"UTC":"")+"Day"](),c=n[Ci(t)](),v=(c-1)%12+1,h=n[tl(t)](),f=n[el(t)](),p=n[rl(t)](),d=c>=12?"pm":"am",g=d.toUpperCase(),y=a instanceof mt?a:yc(a||x0)||uA(),m=y.getModel("time"),S=m.get("month"),_=m.get("monthAbbr"),x=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,br(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,br(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,br(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,br(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,br(v+"",2)).replace(/{h}/g,v+"").replace(/{mm}/g,br(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,br(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,br(p,3)).replace(/{S}/g,p+"")}function hA(r,e,t,a,n){var i=null;if(Y(t))i=t;else if(K(t))i=t(r.value,e,{level:r.level});else{var o=z({},ai);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(B(i)){var v=r.level==null?0:r.level>=0?r.level:i.length+r.level;v=Math.min(v,i.length-1),i=i[v]}}return Js(new Date(r.value),i,n,a)}function A0(r,e){var t=er(r),a=t[an(e)]()+1,n=t[Qs(e)](),i=t[Ci(e)](),o=t[tl(e)](),s=t[el(e)](),l=t[rl(e)](),u=l===0,c=u&&s===0,v=c&&o===0,h=v&&i===0,f=h&&n===1,p=f&&a===1;return p?"year":f?"month":h?"day":v?"hour":c?"minute":u?"second":"millisecond"}function kf(r,e,t){var a=St(r)?er(r):r;switch(e=e||A0(r,t),e){case"year":return a[Nv(t)]();case"half-year":return a[an(t)]()>=6?1:0;case"quarter":return Math.floor((a[an(t)]()+1)/4);case"month":return a[an(t)]();case"day":return a[Qs(t)]();case"half-day":return a[Ci(t)]()/24;case"hour":return a[Ci(t)]();case"minute":return a[tl(t)]();case"second":return a[el(t)]();case"millisecond":return a[rl(t)]()}}function Nv(r){return r?"getUTCFullYear":"getFullYear"}function an(r){return r?"getUTCMonth":"getMonth"}function Qs(r){return r?"getUTCDate":"getDate"}function Ci(r){return r?"getUTCHours":"getHours"}function tl(r){return r?"getUTCMinutes":"getMinutes"}function el(r){return r?"getUTCSeconds":"getSeconds"}function rl(r){return r?"getUTCMilliseconds":"getMilliseconds"}function fA(r){return r?"setUTCFullYear":"setFullYear"}function T0(r){return r?"setUTCMonth":"setMonth"}function D0(r){return r?"setUTCDate":"setDate"}function C0(r){return r?"setUTCHours":"setHours"}function M0(r){return r?"setUTCMinutes":"setMinutes"}function I0(r){return r?"setUTCSeconds":"setSeconds"}function L0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function P0(r){if(!Um(r))return Y(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function R0(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Dn=Rm;function mc(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&Ui(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?er(r):r;if(isNaN(+l)){if(s)return"-"}else return Js(l,a,t)}if(e==="ordinal")return ic(r)?n(r):St(r)&&i(r)?r+"":"-";var u=hr(r);return i(u)?P0(u):ic(r)?n(r):typeof r=="boolean"?r+"":"-"}var Nf=["a","b","c","d","e","f","g"],Il=function(r,e){return"{"+r+(e??"")+"}"};function E0(r,e,t){B(e)||(e=[e]);var a=e.length;if(!a)return"";for(var n=e[0].$vars||[],i=0;i':'';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Aa(r,e){return e=e||"transparent",Y(r)?r:J(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Ss(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Qo=w,k0=["left","right","top","bottom","width","height"],ua=[["width","left","right"],["height","top","bottom"]];function Ov(r,e,t,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),v=e.childAt(u+1),h=v&&v.getBoundingRect(),f,p;if(r==="horizontal"){var d=c.width+(h?-h.x+c.x:0);f=i+d,f>a||l.newline?(i=0,f=d,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(h?-h.y+c.y:0);p=o+g,p>n||l.newline?(i+=s+t,o=0,p=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=f+t:o=p+t)})}var da=Ov;tt(Ov,"vertical");tt(Ov,"horizontal");function gA(r,e,t){var a=e.width,n=e.height,i=H(r.left,a),o=H(r.top,n),s=H(r.right,a),l=H(r.bottom,n);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=Dn(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function Zt(r,e,t){t=Dn(t||0);var a=e.width,n=e.height,i=H(r.left,a),o=H(r.top,n),s=H(r.right,a),l=H(r.bottom,n),u=H(r.width,a),c=H(r.height,n),v=t[2]+t[0],h=t[1]+t[3],f=r.aspect;switch(isNaN(u)&&(u=a-s-h-i),isNaN(c)&&(c=n-l-v-o),f!=null&&(isNaN(u)&&isNaN(c)&&(f>a/n?u=a*.8:c=n*.8),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(i)&&(i=a-s-u-h),isNaN(o)&&(o=n-l-c-v),r.left||r.right){case"center":i=a/2-u/2-t[3];break;case"right":i=a-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-c/2-t[0];break;case"bottom":o=n-c-v;break}i=i||0,o=o||0,isNaN(u)&&(u=a-h-i-(s||0)),isNaN(c)&&(c=n-v-o-(l||0));var p=new wt(i+t[3],o+t[0],u,c);return p.margin=t,p}function al(r,e,t,a,n,i){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new wt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var v=Zt(Q({width:u.width,height:u.height},e),t,a),h=o?v.x-u.x:0,f=s?v.y-u.y:0;return l==="raw"?(i.x=h,i.y=f):(i.x+=h,i.y+=f),i===r&&r.markRedraw(),!0}function yA(r,e){return r[ua[e][0]]!=null||r[ua[e][1]]!=null&&r[ua[e][2]]!=null}function Mi(r){var e=r.layoutMode||r.constructor.layoutMode;return J(e)?e:e?{type:e}:null}function Gr(r,e,t){var a=t&&t.ignoreSize;!B(a)&&(a=[a,a]);var n=o(ua[0],0),i=o(ua[1],1);u(ua[0],r,n),u(ua[1],r,i);function o(c,v){var h={},f=0,p={},d=0,g=2;if(Qo(c,function(S){p[S]=r[S]}),Qo(c,function(S){s(e,S)&&(h[S]=p[S]=e[S]),l(h,S)&&f++,l(p,S)&&d++}),a[v])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(d===g||!f)return p;if(f>=g)return h;for(var y=0;y=0;l--)s=it(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var n=t+"Index",i=t+"Id";return $i(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},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}(mt);t0(lt,mt);Zs(lt);nA(lt);iA(lt,SA);function SA(r){var e=[];return w(lt.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=G(e,function(t){return je(t).main}),r!=="dataset"&&ct(e,"dataset")<=0&&e.unshift("dataset"),e}var O0="";typeof navigator<"u"&&(O0=navigator.platform||"");var Oa="rgba(0, 0, 0, 0.2)";const _A={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Oa,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Oa,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Oa,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Oa,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Oa,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Oa,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:O0.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 V0=$(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Oe="original",se="arrayRows",Ve="objectRows",rr="keyedColumns",Nr="typedArray",B0="unknown",tr="column",Mn="row",te={Must:1,Might:2,Not:3},z0=ut();function xA(r){z0(r).datasetMap=$()}function G0(r,e,t){var a={},n=Bv(e);if(!n||!r)return a;var i=[],o=[],s=e.ecModel,l=z0(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,c,v;r=r.slice(),w(r,function(d,g){var y=J(d)?d:r[g]={name:d};y.type==="ordinal"&&c==null&&(c=g,v=p(y)),a[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:v,valueWayDim:0});w(r,function(d,g){var y=d.name,m=p(d);if(c==null){var S=h.valueWayDim;f(a[y],S,m),f(o,S,m),h.valueWayDim+=m}else if(c===g)f(a[y],0,m),f(i,0,m);else{var S=h.categoryWayDim;f(a[y],S,m),f(o,S,m),h.categoryWayDim+=m}});function f(d,g,y){for(var m=0;me)return r[a];return r[t-1]}function W0(r,e,t,a,n,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!a?t:DA(a,o);if(c=c||t,!(!c||!c.length)){var v=c[l];return n&&(u[n]=v),s.paletteIdx=(l+1)%c.length,v}}function CA(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var ho,Nn,Vf,Bf="\0_ec_inner",MA=1,Gv=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,n,i,o,s){i=i||{},this.option=null,this._theme=new mt(i),this._locale=new mt(o),this._optionManager=s},e.prototype.setOption=function(t,a,n){var i=Ff(a);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,a){return this._resetOption(t,Ff(a))},e.prototype._resetOption=function(t,a){var n=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?Vf(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&w(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=$(),u=a&&a.replaceMergeMainTypeMap;xA(this),w(t,function(v,h){v!=null&&(lt.hasClass(h)?h&&(s.push(h),l.set(h,!0)):n[h]=n[h]==null?j(v):it(n[h],v,!0))}),u&&u.each(function(v,h){lt.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),lt.topologicalTravel(s,lt.getAllClassMainTypes(),c,this);function c(v){var h=AA(this,v,xt(t[v])),f=i.get(v),p=f?u&&u.get(v)?"replaceMerge":"normalMerge":"replaceAll",d=Km(f,h,p);ow(d,v,lt),n[v]=null,i.set(v,null),o.set(v,0);var g=[],y=[],m=0,S;w(d,function(_,x){var b=_.existing,A=_.newOption;if(!A)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var T=v==="series",D=lt.getClass(v,_.keyInfo.subType,!T);if(!D)return;if(v==="tooltip"){if(S)return;S=!0}if(b&&b.constructor===D)b.name=_.keyInfo.name,b.mergeOption(A,this),b.optionUpdated(A,!1);else{var C=z({componentIndex:x},_.keyInfo);b=new D(A,this,this,C),z(b,C),_.brandNew&&(b.__requireNewView=!0),b.init(A,this,this),b.optionUpdated(null,!0)}}b?(g.push(b.option),y.push(b),m++):(g.push(void 0),y.push(void 0))},this),n[v]=g,i.set(v,y),o.set(v,m),v==="series"&&ho(this)}this._seriesIndices||ho(this)},e.prototype.getOption=function(){var t=j(this.option);return w(t,function(a,n){if(lt.hasClass(n)){for(var i=xt(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!wi(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[n]=i}}),delete t[Bf],t},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,a){var n=this._componentsMap.get(t);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function VA(r,e){return r.join(",")===e.join(",")}var Be=w,Ii=J,Hf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Pl(r){var e=r&&r.itemStyle;if(e)for(var t=0,a=Hf.length;t=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,f)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&h>=0&&m>0||l==="samesign"&&h<=0&&m<0){h=Kb(h,m),d=m;break}}}return a[0]=h,a[1]=d,a})})}var nl=function(){function r(e){this.data=e.data||(e.sourceFormat===rr?{}:[]),this.sourceFormat=e.sourceFormat||B0,this.seriesLayoutBy=e.seriesLayoutBy||tr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;ad&&(d=S)}f[0]=p,f[1]=d}},n=function(){return this._data?this._data.length/this._dimSize:0};Kf=(e={},e[se+"_"+tr]={pure:!0,appendData:i},e[se+"_"+Mn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Ve]={pure:!0,appendData:i},e[rr]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var c=s[u]||(s[u]=[]),v=0;v<(l||[]).length;v++)c.push(l[v])})}},e[Oe]={appendData:i},e[Nr]={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&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return un(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function Qf(r){var e,t;return J(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function di(r){return new tT(r)}var tT=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,a=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(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(m){return!(m>=1)&&(m=1),m}var v;(this._dirty||i==="reset")&&(this._dirty=!1,v=this._doReset(a)),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 f=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!a&&(v||f1&&a>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},rT=function(){function r(e,t){if(!St(t)){var a="";gt(a)}this._opFn=tS[e],this._rvalFloat=hr(t)}return r.prototype.evaluate=function(e){return St(e)?this._opFn(e,this._rvalFloat):this._opFn(hr(e),this._rvalFloat)},r}(),eS=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=St(e)?e:hr(e),n=St(t)?t:hr(t),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=Y(e),l=Y(t);s&&(a=l?e:0),l&&(n=s?t:0)}return an?-this._resultLT:0},r}(),aT=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=hr(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=hr(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function nT(r,e){return r==="eq"||r==="ne"?new aT(r==="eq",e):Z(tS,r)?new rT(r,e):null}var iT=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 Or(e,t)},r}();function oT(r,e){var t=new iT,a=r.data,n=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==tr&>(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var S="";Z(l,y)&>(S),l[y]=m}});else for(var c=0;c65535?pT:dT}function Ba(){return[1/0,-1/0]}function gT(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function rp(r,e,t,a,n){var i=nS[t||"float"];if(n){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=G(o,function(m){return m.property}),c=0;cy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.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,a=t[e];if(a!=null&&ae)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,a){var n=this._chunks,i=n[e],o=[];if(!i)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,c=0,v=this.count();c=0&&l<0)&&(s=p,l=f,u=0),f===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,n=this._count;if(a===Array){e=new a(n);for(var i=0;i=v&&m<=h||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=f[n[0]],S=f[n[1]],_=e[n[1]][0],x=e[n[1]][1],y=0;y=v&&m<=h||isNaN(m))&&(b>=_&&b<=x||isNaN(b))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=v&&m<=h||isNaN(m))&&(l[u++]=A)}else for(var y=0;ye[C][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),n=a._chunks,i=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,v,h,f=new(Va(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));f[s++]=u;for(var p=1;pc&&(c=v,h=_)}M>0&&Ms&&(d=s-c);for(var g=0;gp&&(p=m,f=c+g)}var S=this.getRawIndex(v),_=this.getRawIndex(f);vc-p&&(l=c-p,s.length=l);for(var d=0;dv[1]&&(v[1]=y),h[f++]=m}return i._count=f,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var a=e.length,n=this._chunks,i=0,o=this.count();il&&(l=v)}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 a=[],n=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,a,n,i){return Or(t[i],this._dimensions[i])}kl={arrayRows:e,objectRows:function(t,a,n,i){return Or(t[a],this._dimensions[i])},keyedColumns:e,original:function(t,a,n,i){var o=t&&(t.value==null?t:t.value);return Or(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,a,n,i){return t[i]}}}(),r}(),iS=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(),a=!!t.length,n,i;if(fo(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){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=_e(s)?Nr:Oe,i=[];var v=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},f=pt(v.seriesLayoutBy,h.seriesLayoutBy)||null,p=pt(v.sourceHeader,h.sourceHeader),d=pt(v.dimensions,h.dimensions),g=f!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||d;n=g?[xc(s,{seriesLayoutBy:f,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);n=m.sourceList,i=m.upstreamSignList}else{var S=y.get("source",!0);n=[xc(S,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var i="";e.length!==1&&np(i)}var o,s=[],l=[];return w(e,function(u){u.prepareSource();var c=u.getSource(n||0),v="";n!=null&&!c&&np(v),s.push(c),l.push(u._getVersionSign())}),a?o=hT(a,s,{datasetIndex:t.componentIndex}):n!=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 w(r.blocks,function(n){var i=uS(n);i>=e&&(e=i+ +(a&&(!i||wc(n)&&!n.noHeader)))}),e}return 0}function _T(r,e,t,a){var n=e.noHeader,i=bT(uS(e)),o=[],s=e.blocks||[];Se(!s||B(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Z(u,l)){var c=new eS(u[l],null);s.sort(function(d,g){return c.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(d,g){var y=e.valueFormatter,m=lS(d)(y?z(z({},r),{valueFormatter:y}):r,d,g>0?i.html:0,a);m!=null&&o.push(m)});var v=r.renderMode==="richText"?o.join(i.richText):Ac(a,o.join(""),n?t:i.html);if(n)return v;var h=mc(e.header,"ordinal",r.useUTC),f=sS(a,r.renderMode).nameStyle,p=oS(a);return r.renderMode==="richText"?cS(r,h,f)+i.richText+v:Ac(a,'
'+ye(h)+"
"+v,t)}function xT(r,e,t,a){var n=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(_){return _=B(_)?_:[_],G(_,function(x,b){return mc(x,B(f)?f[b]:f,u)})};if(!(i&&o)){var v=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),h=i?"":mc(l,"ordinal",u),f=e.valueType,p=o?[]:c(e.value,e.dataIndex),d=!s||!i,g=!s&&i,y=sS(a,n),m=y.nameStyle,S=y.valueStyle;return n==="richText"?(s?"":v)+(i?"":cS(r,h,m))+(o?"":TT(r,p,d,g,S)):Ac(a,(s?"":v)+(i?"":wT(h,!s,m))+(o?"":AT(p,d,g,S)),t)}}function ip(r,e,t,a,n,i){if(r){var o=lS(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function bT(r){return{html:mT[r],richText:ST[r]}}function Ac(r,e,t){var a='
',n="margin: "+t+"px 0 0",i=oS(r);return'
'+e+a+"
"}function wT(r,e,t){var a=e?"margin-left:2px":"";return''+ye(r)+""}function AT(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=B(r)?r:[r],''+G(r,function(o){return ye(o)}).join("  ")+""}function cS(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function TT(r,e,t,a,n){var i=[n],o=a?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(B(e)?e.join(" "):e,i)}function vS(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return Aa(a)}function hS(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Nl=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Ym()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var n=a==="richText"?this._generateStyleName():null,i=dA({color:t,type:e,renderMode:a,markerId:n});return Y(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};B(t)?w(t,function(i){return z(a,i)}):z(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function fS(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=B(s),u=vS(e,t),c,v,h,f;if(o>1||l&&!o){var p=DT(s,e,t,i,u);c=p.inlineValues,v=p.inlineValueTypes,h=p.blocks,f=p.inlineValues[0]}else if(o){var d=n.getDimensionInfo(i[0]);f=c=un(n,t,i[0]),v=d.type}else f=c=l?s[0]:s;var g=_v(e),y=g&&e.name||"",m=n.getName(t),S=a?y:m;return jt("section",{header:y,noHeader:a||!g,sortParam:f,blocks:[jt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!Ui(S),value:c,valueType:v,dataIndex:t})].concat(h||[])})}function DT(r,e,t,a,n){var i=e.getData(),o=on(r,function(v,h,f){var p=i.getDimensionInfo(f);return v=v||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?w(a,function(v){c(un(i,t,v),v)}):w(r,c);function c(v,h){var f=i.getDimensionInfo(h);!f||f.otherDims.tooltip===!1||(o?u.push(jt("nameValue",{markerType:"subItem",markerColor:n,name:f.displayName,value:v,valueType:f.type})):(s.push(v),l.push(f.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var wr=ut();function po(r,e){return r.getName(e)||r.getId(e)}var ts="__universalTransitionEnabled",Ct=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,n){this.seriesIndex=this.componentIndex,this.dataTask=di({count:MT,reset:IT}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=wr(this).sourceManager=new iS(this);i.prepareSource();var o=this.getInitialData(t,n);sp(o,this),this.dataTask.context.data=o,wr(this).dataBeforeProcessed=o,op(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var n=Mi(this),i=n?Cn(t):{},o=this.subType;lt.hasClass(o)&&(o+="Series"),it(t,a.getTheme().get(this.subType)),it(t,this.getDefaultOption()),_a(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Gr(t,i,n)},e.prototype.mergeOption=function(t,a){t=it(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Mi(this);n&&Gr(this.option,t,n);var i=wr(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,a);sp(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,wr(this).dataBeforeProcessed=o,op(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!_e(t))for(var a=["show"],n=0;nthis.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,n){var i=this.ecModel,o=zv.prototype.getColorFromPalette.call(this,t,a,n);return o||(o=i.getColorFromPalette(t,a,n)),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,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(t,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[po(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[ts])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){J(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,a)}},e.registerClass=function(t){return lt.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}(lt);Jt(Ct,il);Jt(Ct,zv);t0(Ct,lt);function op(r){var e=r.name;_v(r)||(r.name=CT(r)||e)}function CT(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return w(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function MT(r){return r.model.getRawData().count()}function IT(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),LT}function LT(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function sp(r,e){w(_i(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,tt(PT,e))})}function PT(r,e){var t=Tc(r);return t&&t.setOutputEnd((e||this).count()),e}function Tc(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}var Rt=function(){function r(){this.group=new et,this.uid=Tn("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){},r.prototype.updateLayout=function(e,t,a,n){},r.prototype.updateVisual=function(e,t,a,n){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();bv(Rt);Zs(Rt);function In(){var r=ut();return function(e){var t=r(e),a=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var pS=ut(),RT=In(),bt=function(){function r(){this.group=new et,this.uid=Tn("viewChart"),this.renderTask=di({plan:ET,reset:kT}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.highlight=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&up(i,n,"emphasis")},r.prototype.downplay=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&up(i,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateLayout=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateVisual=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.eachRendered=function(e){Ur(this.group,e)},r.markUpdateMethod=function(e,t){pS(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function lp(r,e,t){r&&Ti(r)&&(e==="emphasis"?fr:pr)(r,t)}function up(r,e,t){var a=xa(r,e),n=e&&e.highlightKey!=null?zw(e.highlightKey):null;a!=null?w(xt(a),function(i){lp(r.getItemGraphicEl(i),t,n)}):r.eachItemGraphicEl(function(i){lp(i,t,n)})}bv(bt);Zs(bt);function ET(r){return RT(r.model)}function kT(r){var e=r.model,t=r.ecModel,a=r.api,n=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=n&&pS(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,n),NT[l]}var NT={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)}}},_s="\0__throttleOriginMethod",cp="\0__throttleRate",vp="\0__throttleType";function Yv(r,e,t){var a,n=0,i=0,o=null,s,l,u,c;e=e||0;function v(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var f=[],p=0;p=0?v():o=setTimeout(v,-s),n=a};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(f){c=f},h}function Ln(r,e,t,a){var n=r[e];if(n){var i=n[_s]||n,o=n[vp],s=n[cp];if(s!==t||o!==a){if(t==null||!a)return r[e]=i;n=r[e]=Yv(i,t,a==="debounce"),n[_s]=i,n[vp]=a,n[cp]=t}return n}}function Li(r,e){var t=r[e];t&&t[_s]&&(t.clear&&t.clear(),r[e]=t[_s])}var hp=ut(),fp={itemStyle:ba(_0,!0),lineStyle:ba(S0,!0)},OT={lineStyle:"stroke",itemStyle:"fill"};function dS(r,e){var t=r.visualStyleMapper||fp[e];return t||(console.warn("Unknown style type '"+e+"'."),fp.itemStyle)}function gS(r,e){var t=r.visualDrawType||OT[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var VT={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=dS(r,a),o=i(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=gS(r,a),u=o[l],c=K(u)?u:null,v=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||v){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||K(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||K(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(f,p){var d=r.getDataParams(p),g=z({},o);g[l]=c(d),f.setItemVisual(p,"style",g)}}}},Vn=new mt,BT={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=dS(r,a),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Vn.option=l[a];var u=n(Vn),c=o.ensureUniqueItemVisual(s,"style");z(c,u),Vn.option.decal&&(o.setItemVisual(s,"decal",Vn.option.decal),Vn.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},zT={performRawSeries:!0,overallReset:function(r){var e=$();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+a,i=e.get(n);i||(i={},e.set(n,i)),hp(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),n={},i=t.getData(),o=hp(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=gS(t,s);i.each(function(u){var c=i.getRawIndex(u);n[c]=u}),a.each(function(u){var c=n[u],v=i.getItemVisual(c,"colorFromPalette");if(v){var h=i.ensureUniqueItemVisual(c,"style"),f=a.getName(u)||u+"",p=a.count();h[l]=t.getColorFromPalette(f,o,p)}})}})}},go=Math.PI;function GT(r,e){e=e||{},Q(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new et,a=new dt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var n=new vt({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 dt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new yv({shape:{startAngle:-go/2,endAngle:-go/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:go*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:go*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.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}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var yS=function(){function r(e,t,a,n){this._stageTaskMap=$(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),n=a.context,i=!t&&a.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.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 a=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&i>=a.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=$();e.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;w(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";Se(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,t,a),n.overallReset&&this._createOverallStageTask(n,i,t,a)},this)},r.prototype.prepareView=function(e,t,a,n){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=a,o.api=n,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,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,n){n=n||{};var i=!1,o=this;w(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),v=c.seriesTaskMap,h=c.overallTask;if(h){var f,p=h.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),f=!0)}),f&&h.dirty(),o.updatePayload(h,a);var d=o.getPerformArgs(h,n.block);p.each(function(g){g.perform(d)}),h.perform(d)&&(i=!0)}else v&&v.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(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(a){t=a.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,a,n){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=$(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,n).each(c);function c(v){var h=v.uid,f=s.set(h,o&&o.get(h)||di({plan:YT,reset:ZT,count:XT}));f.context={model:v,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(v,f)}},r.prototype._createOverallStageTask=function(e,t,a,n){var i=this,o=t.overallTask=t.overallTask||di({reset:FT});o.context={ecModel:a,api:n,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=$(),u=e.seriesType,c=e.getTargetSeries,v=!0,h=!1,f="";Se(!e.createOnAllSeries,f),u?a.eachRawSeriesByType(u,p):c?c(a,n).each(p):(v=!1,w(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(h=!0,di({reset:HT,onDirty:UT})));y.context={model:d,overallProgress:v},y.agent=o,y.__block=v,i._pipe(d,y)}h&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:KT(e)}),e.uid=Tn("stageHandler"),t&&(e.visualType=t),e},r}();function FT(r){r.overallReset(r.ecModel,r.api,r.payload)}function HT(r){return r.overallProgress&&WT}function WT(){this.agent.dirty(),this.getDownstream().dirty()}function UT(){this.agent&&this.agent.dirty()}function YT(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function ZT(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=xt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?G(e,function(t,a){return mS(a)}):$T}var $T=mS(0);function mS(r){return function(e,t){var a=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var i=e.start;i0&&f===u.length-h.length){var p=u.slice(0,f);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:n}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.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,n,i));function c(v,h,f,p){return v[f]==null||h[p||f]===v[f]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Dc=["symbol","symbolSize","symbolRotate","symbolOffset"],yp=Dc.concat(["symbolKeepAspect"]),JT={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 a={},n={},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,a,n){if(!this[ne]){if(this._disposed){this.id;return}var i,o,s;if(J(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[ne]=!0,!this._model||a){var l=new EA(this._api),u=this._theme,c=this._model=new Gv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Mc);var v={seriesTransition:s,optionChanged:!0};if(n)this[ge]={silent:i,updateParams:v},this[ne]=!1,this.getZr().wakeUp();else{try{Ga(this),Ar.update.call(this,null,v)}catch(h){throw this[ge]=null,this[ne]=!1,h}this._ssr||this._zr.flush(),this[ge]=null,this[ne]=!1,Bn.call(this,i),zn.call(this,i)}}},e.prototype.setTheme=function(){},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||Nt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(Nt.svgSupported){var t=this._zr,a=t.storage.getDisplayList();return w(a,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,n=this._model,i=[],o=this;w(a,function(l){n.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 w(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(Cp[n]){var l=s,u=s,c=-s,v=-s,h=[],f=t&&t.pixelRatio||this.getDevicePixelRatio();w(yi,function(S,_){if(S.group===n){var x=a?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(j(t)),b=S.getDom().getBoundingClientRect();l=i(b.left,l),u=i(b.top,u),c=o(b.right,c),v=o(b.bottom,v),h.push({dom:x,left:b.left,top:b.top})}}),l*=f,u*=f,c*=f,v*=f;var p=c-l,d=v-u,g=vs.createCanvas(),y=nf(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return w(h,function(S){var _=S.left-l,x=S.top-u;m+=''+S.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new dt({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),w(h,function(S){var _=new Ne({style:{x:S.left*f-l,y:S.top*f-u,image:S.dom}});y.add(_)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a){return Gl(this,"convertToPixel",t,a)},e.prototype.convertFromPixel=function(t,a){return Gl(this,"convertFromPixel",t,a)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var n=this._model,i,o=vi(n,t);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(a);else if(l==="seriesModels"){var v=this._chartsMap[u.__viewId];v&&v.containPoint&&(i=i||v.containPoint(a,u))}},this)},this),!!i},e.prototype.getVisual=function(t,a){var n=this._model,i=vi(n,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?Zv(s,l,a):Ji(s,a)},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;w(MD,function(a){var n=function(i){var o=t.getModel(),s=i.target,l,u=a==="globalout";if(u?l={}:s&&ca(s,function(p){var d=q(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=z({},d.eventData),!0},!0),l){var c=l.componentType,v=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",v=l.seriesIndex);var h=c&&v!=null&&o.getComponent(c,v),f=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=i,l.type=a,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:f},t.trigger(a,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(a,n,t)}),w(gi,function(a,n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),w(["selectchanged"],function(a){t._messageCenter.on(a,function(n){this.trigger(a,n)},t)}),tD(this._messageCenter,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&&jm(this.getDom(),Kv,"");var a=this,n=a._api,i=a._model;w(a._componentsViews,function(o){o.dispose(i,n)}),w(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete yi[a.id]},e.prototype.resize=function(t){if(!this[ne]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=t&&t.silent;this[ge]&&(i==null&&(i=this[ge].silent),n=!0,this[ge]=null),this[ne]=!0;try{n&&Ga(this),Ar.update.call(this,{type:"resize",animation:z({duration:0},t&&t.animation)})}catch(o){throw this[ne]=!1,o}this[ne]=!1,Bn.call(this,i),zn.call(this,i)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(J(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!Ic[t]){var n=Ic[t](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},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 a=z({},t);return a.type=gi[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(J(a)||(a={silent:!!a}),!!ws[t.type]&&this._model){if(this[ne]){this._pendingActions.push(t);return}var n=a.silent;Hl.call(this,t,n);var i=a.flush;i?this._zr.flush():i!==!1&&Nt.browser.weChat&&this._throttledZrFlush(),Bn.call(this,n),zn.call(this,n)}},e.prototype.updateLabelLayout=function(){Ge.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Ga=function(v){var h=v._scheduler;h.restorePipelines(v._model),h.prepareStageTasks(),zl(v,!0),zl(v,!1),h.plan()},zl=function(v,h){for(var f=v._model,p=v._scheduler,d=h?v._componentsViews:v._chartsViews,g=h?v._componentsMap:v._chartsMap,y=v._zr,m=v._api,S=0;Sh.get("hoverLayerThreshold")&&!Nt.node&&!Nt.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=v._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(v,h){var f=v.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=f)})}function s(v,h){if(!v.preventAutoZ){var f=v.get("z")||0,p=v.get("zlevel")||0;h.eachRendered(function(d){return l(d,f,p,-1/0),!0})}}function l(v,h,f,p){var d=v.getTextContent(),g=v.getTextGuideLine(),y=v.isGroup;if(y)for(var m=v.childrenRef(),S=0;S0?{duration:d,delay:f.get("delay"),easing:f.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(tn(y))return;if(y instanceof Mt&&Gw(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var S=y.getTextContent(),_=y.getTextGuideLine();S&&(S.stateTransition=g),_&&(_.stateTransition=g)}y.__dirty&&n(y)}})}Tp=function(v){return new(function(h){E(f,h);function f(){return h!==null&&h.apply(this,arguments)||this}return f.prototype.getCoordinateSystems=function(){return v._coordSysMgr.getCoordinateSystems()},f.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return v._model.getComponent(d.mainType,d.index);p=p.parent}},f.prototype.enterEmphasis=function(p,d){fr(p,d),be(v)},f.prototype.leaveEmphasis=function(p,d){pr(p,d),be(v)},f.prototype.enterBlur=function(p){i0(p),be(v)},f.prototype.leaveBlur=function(p){Dv(p),be(v)},f.prototype.enterSelect=function(p){o0(p),be(v)},f.prototype.leaveSelect=function(p){s0(p),be(v)},f.prototype.getModel=function(){return v.getModel()},f.prototype.getViewOfComponentModel=function(p){return v.getViewOfComponentModel(p)},f.prototype.getViewOfSeriesModel=function(p){return v.getViewOfSeriesModel(p)},f}(U0))(v)},OS=function(v){function h(f,p){for(var d=0;d=0)){Mp.push(t);var i=yS.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,r.push(i)}}function HS(r,e){Ic[r]=e}function ND(r,e,t){var a=fD("registerMap");a&&a(r,e,t)}var OD=vT;Pa($v,VT);Pa(sl,BT);Pa(sl,zT);Pa($v,JT);Pa(sl,QT);Pa(LS,vD);GS(Z0);FS(gD,YA);HS("default",GT);ar({type:ha,event:ha,update:ha},pe);ar({type:Ko,event:Ko,update:Ko},pe);ar({type:hi,event:hi,update:hi},pe);ar({type:qo,event:qo,update:qo},pe);ar({type:fi,event:fi,update:fi},pe);zS("light",qT);zS("dark",xS);function Gn(r){return r==null?0:r.length||1}function Ip(r){return r}var dr=function(){function r(e,t,a,n,i,o){this._old=e,this._new=t,this._oldKeyGetter=a||Ip,this._newKeyGetter=n||Ip,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,a={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,a,i,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},n={},i=[],o=[];this._initIndexMap(e,a,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(v===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(v===1&&h===1)this._update&&this._update(c,u),n[l]=null;else if(v>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(v>1)for(var f=0;f1)for(var s=0;s30}var Fn=J,Tr=G,HD=typeof Int32Array>"u"?Array:Int32Array,WD="e\0\0",Lp=-1,UD=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],YD=["_approximateExtent"],Pp,_o,Hn,Wn,Yl,Un,Zl,he=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 a,n=!1;US(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,a=e),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c=t)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===Oe;if(l&&!n.pure)for(var u=[],c=e;c0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,n=a[e];n||(n=a[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),B(i)?i=i.slice():Fn(i)&&(i=z({},i)),n[t]=i),i},r.prototype.setItemVisual=function(e,t,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Fn(t)?z(n,t):n[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Fn(e)?z(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,a){this._itemLayouts[e]=a?z(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;cc(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){w(this._graphicEls,function(a,n){a&&e&&e.call(t,a,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Tr(this.dimensions,this._getDimInfo,this),this.hostModel)),Yl(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];K(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return t.apply(this,[n].concat(pb(arguments)))})},r.internalField=function(){Pp=function(e){var t=e._invertedIndicesMap;w(t,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=t[n]=new HD(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),n[t]=l}}}(),r}();function Qi(r,e){Fv(r)||(r=Hv(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],n=$(),i=[],o=$D(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&$S(o),l=a===r.dimensionsDefine,u=l?ZS(r):YS(a),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var v=$(c),h=new aS(o),f=0;f0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function $D(r,e,t,a){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return w(e,function(i){var o;J(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function XD(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var KD=function(){function r(e){this.coordSysDims=[],this.axisMap=$(),this.categoryAxisMap=$(),this.coordSysName=e}return r}();function qD(r){var e=r.get("coordinateSystem"),t=new KD(e),a=jD[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var jD={cartesian2d:function(r,e,t,a){var n=r.getReferringComponents("xAxis",Ht).models[0],i=r.getReferringComponents("yAxis",Ht).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),Fa(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),Fa(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var n=r.getReferringComponents("singleAxis",Ht).models[0];e.coordSysDims=["single"],t.set("single",n),Fa(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var n=r.getReferringComponents("polar",Ht).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Fa(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),Fa(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();w(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Fa(u)&&(a.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Fa(r){return r.get("type")==="category"}function JD(r,e,t){t=t||{};var a=t.byIndex,n=t.stackedCoordDimension,i,o,s;QD(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,v,h;if(w(i,function(m,S){Y(m)&&(i[S]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!c&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(c=m))}),c&&!a&&!u&&(a=!0),c){v="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var f=c.coordDim,p=c.type,d=0;w(i,function(m){m.coordDim===f&&d++});var g={name:v,coordDim:f,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(v,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:v}}function QD(r){return!US(r.schema)}function Fr(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function XS(r,e){return Fr(r,e)?r.getCalculationInfo("stackResultDimension"):e}function tC(r,e){var t=r.get("coordinateSystem"),a=ji.get(t),n;return e&&e.coordSysDims&&(n=G(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Ts(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function eC(r,e,t){var a,n;return t&&w(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function _r(r,e,t){t=t||{};var a=e.getSourceManager(),n,i=!1;r?(i=!0,n=Hv(r)):(n=a.getSource(),i=n.sourceFormat===Oe);var o=qD(e),s=tC(e,o),l=t.useEncodeDefaulter,u=K(l)?l:l?tt(G0,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},v=Qi(n,c),h=eC(v.dimensions,t.createInvertedIndices,o),f=i?null:a.getSharedDataStore(v),p=JD(e,{schema:v,store:f}),d=new he(v,e);d.setCalculationInfo(p);var g=h!=null&&rC(n)?function(y,m,S,_){return _===h?S:this.defaultDimValueGetter(y,m,S,_)}:null;return d.hasItemOption=!1,d.initData(i?n:f,null,g),d}function rC(r){if(r.sourceFormat===Oe){var e=aC(r.data||[]);return!B(xn(e))}}function aC(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t)},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}();Zs(nr);var nC=0,Lc=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++nC}return r.createByAxisModel=function(e){var t=e.option,a=t.data,n=a&&G(a,iC);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!Y(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=$(this.categories))},r}();function iC(r){return J(r)&&r.value!=null?r.value:r+""}function Pc(r){return r.type==="interval"||r.type==="log"}function oC(r,e,t,a){var n={},i=r[1]-r[0],o=n.interval=Wm(i/e);t!=null&&oa&&(o=n.interval=a);var s=n.intervalPrecision=KS(o),l=n.niceTickExtent=[Ot(Math.ceil(r[0]/o)*o,s),Ot(Math.floor(r[1]/o)*o,s)];return sC(l,r),n}function $l(r){var e=Math.pow(10,Sv(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ot(t*e)}function KS(r){return qe(r)+2}function Rp(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function sC(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Rp(r,0,e),Rp(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function ll(r,e){return r>=e[0]&&r<=e[1]}function ul(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function cl(r,e){return r*(e[1]-e[0])+e[0]}var vl=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new Lc({})),B(n)&&(n=new Lc({categories:G(n,function(i){return J(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:Y(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),ll(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),ul(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(cl(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,n=a[0];n<=a[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(nr);nr.registerClass(vl);var qr=Ot,gr=function(r){E(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},e.prototype.contain=function(t){return ll(t,this._extent)},e.prototype.normalize=function(t){return ul(t,this._extent)},e.prototype.scale=function(t){return cl(t,this._extent)},e.prototype.setExtent=function(t,a){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(a)||(n[1]=parseFloat(a))},e.prototype.unionExtent=function(t){var a=this._extent;t[0]a[1]&&(a[1]=t[1]),this.setExtent(a[0],a[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=KS(t)},e.prototype.getTicks=function(t){var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;n[0]l)return[];var c=s.length?s[s.length-1].value:i[1];return n[1]>c&&(t?s.push({value:qr(c+a,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&f0&&(i=i===null?s:Math.min(i,s))}t[a]=i}}return t}function QS(r){var e=cC(r),t=[];return w(r,function(a){var n=a.coordinateSystem,i=n.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]),v=i.scale.getExtent(),h=Math.abs(v[1]-v[0]);s=u?c/h*u:c}else{var f=a.getData();s=Math.abs(o[1]-o[0])/f.count()}var p=H(a.get("barWidth"),s),d=H(a.get("barMaxWidth"),s),g=H(a.get("barMinWidth")||(n_(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Jv(i),stackId:jS(a)})}),t_(t)}function t_(r){var e={};w(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var v=a.barMaxWidth;v&&(l[u].maxWidth=v);var h=a.barMinWidth;h&&(l[u].minWidth=h);var f=a.barGap;f!=null&&(s.gap=f);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return w(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=Ut(i).length;s=Math.max(35-l*4,15)+"%"}var u=H(s,o),c=H(a.gap,1),v=a.remainedWidth,h=a.autoWidthCount,f=(v-u)/(h+(h-1)*c);f=Math.max(f,0),w(i,function(y){var m=y.maxWidth,S=y.minWidth;if(y.width){var _=y.width;m&&(_=Math.min(_,m)),S&&(_=Math.max(_,S)),y.width=_,v-=_+c*_,h--}else{var _=f;m&&m<_&&(_=Math.min(m,v)),S&&S>_&&(_=S),_!==f&&(y.width=_,v-=_+c*_,h--)}}),f=(v-u)/(h+(h-1)*c),f=Math.max(f,0);var p=0,d;w(i,function(y,m){y.width||(y.width=f),d=y,p+=y.width*(1+c)}),d&&(p-=d.width*c);var g=-p/2;w(i,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+c)})}),t}function vC(r,e,t){if(r&&e){var a=r[Jv(e)];return a}}function e_(r,e){var t=JS(r,e),a=QS(t);w(t,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=jS(n),u=a[Jv(s)][l],c=u.offset,v=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:v})})}function r_(r){return{seriesType:r,plan:In(),reset:function(e){if(a_(e)){var t=e.getData(),a=e.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),v=Fr(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),f=hC(n,i),p=n_(e),d=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(S,_){for(var x=S.count,b=p&&Je(x*3),A=p&&l&&Je(x*3),T=p&&Je(x),D=a.master.getRect(),C=h?D.width:D.height,M,I=_.getStore(),L=0;(M=S.next())!=null;){var R=I.get(v?g:o,M),P=I.get(s,M),k=f,O=void 0;v&&(O=+R-I.get(o,M));var N=void 0,V=void 0,F=void 0,W=void 0;if(h){var X=a.dataToPoint([R,P]);if(v){var rt=a.dataToPoint([O,P]);k=rt[0]}N=k,V=X[1]+m,F=X[0]-k,W=y,Math.abs(F)0?t:1:t))}var fC=function(r,e,t,a){for(;t>>1;r[n][1]n&&(this._approxInterval=n);var s=xo.length,l=Math.min(fC(xo,this._approxInterval,0,s),s-1);this._interval=xo[l][1],this._minLevelUnit=xo[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return St(t)?t:+er(t)},e.prototype.contain=function(t){return ll(this.parse(t),this._extent)},e.prototype.normalize=function(t){return ul(this.parse(t),this._extent)},e.prototype.scale=function(t){return cl(t,this._extent)},e.type="time",e}(gr),xo=[["second",Ev],["minute",kv],["hour",pi],["quarter-day",pi*6],["half-day",pi*12],["day",Ie*1.2],["half-week",Ie*3.5],["week",Ie*7],["month",Ie*31],["quarter",Ie*95],["half-year",Rf/2],["year",Rf]];function pC(r,e,t,a){var n=er(e),i=er(t),o=function(p){return kf(n,p,a)===kf(i,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},v=function(){return c()&&o("minute")},h=function(){return v()&&o("second")},f=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return v();case"second":return h();case"millisecond":return f()}}function dC(r,e){return r/=Ie,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function gC(r){var e=30*Ie;return r/=e,r>6?6:r>3?3:r>2?2:1}function yC(r){return r/=pi,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Ep(r,e){return r/=e?kv:Ev,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function mC(r){return Wm(r)}function SC(r,e,t){var a=new Date(r);switch(rn(e)){case"year":case"month":a[T0(t)](0);case"day":a[D0(t)](1);case"hour":a[C0(t)](0);case"minute":a[M0(t)](0);case"second":a[I0(t)](0),a[L0(t)](0)}return a.getTime()}function _C(r,e,t,a){var n=1e4,i=w0,o=0;function s(C,M,I,L,R,P,k){for(var O=new Date(M),N=M,V=O[L]();N1&&P===0&&I.unshift({value:I[0].value-N})}}for(var P=0;P=a[0]&&m<=a[1]&&v++)}var S=(a[1]-a[0])/e;if(v>S*1.5&&h>S/1.5||(u.push(g),v>S||r===i[f]))break}c=[]}}}for(var _=_t(G(u,function(C){return _t(C,function(M){return M.value>=a[0]&&M.value<=a[1]&&!M.notAdd})}),function(C){return C.length>0}),x=[],b=_.length-1,f=0;f<_.length;++f)for(var A=_[f],T=0;T0;)i*=10;var s=[Ot(wC(a[0]/i)*i),Ot(bC(a[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){mi.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=ze(t)/ze(this.base),ll(t,this._extent)},e.prototype.normalize=function(t){return t=ze(t)/ze(this.base),ul(t,this._extent)},e.prototype.scale=function(t){return t=cl(t,this._extent),bo(this.base,t)},e.type="log",e}(nr),i_=th.prototype;i_.getMinorTicks=mi.getMinorTicks;i_.getLabel=mi.getLabel;function wo(r,e){return xC(r,qe(e))}nr.registerClass(th);var AC=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,f=this._determinedMax;return h!=null&&(s=h,u=!0),f!=null&&(l=f,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:v}},r.prototype.modifyDataMinMax=function(e,t){this[DC[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=TC[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),TC={min:"_determinedMin",max:"_determinedMax"},DC={min:"_dataMin",max:"_dataMax"};function o_(r,e,t){var a=r.rawExtentInfo;return a||(a=new AC(r,e,t),r.rawExtentInfo=a,a)}function Ao(r,e){return e==null?null:hs(e)?NaN:r.parse(e)}function s_(r,e){var t=r.type,a=o_(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=e.ecModel;if(o&&t==="time"){var s=JS("bar",o),l=!1;if(w(s,function(v){l=l||v.getBaseAxis()===e.axis}),l){var u=QS(s),c=CC(n,i,e,u);n=c.min,i=c.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function CC(r,e,t,a){var n=t.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=vC(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;w(o,function(f){s=Math.min(f.offset,s)});var l=-1/0;w(o,function(f){l=Math.max(f.offset+f.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,v=1-(s+l)/i,h=c/v-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function vn(r,e){var t=e,a=s_(r,t),n=a.extent,i=t.get("splitNumber");r instanceof th&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function hl(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new vl({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Qv({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(nr.getClass(e)||gr)}}function MC(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function Rn(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(a){return function(n,i){return r.scale.getFormattedLabel(n,i,a)}}(e):Y(e)?function(a){return function(n){var i=r.scale.getLabel(n),o=a.replace("{value}",i??"");return o}}(e):K(e)?function(a){return function(n,i){return t!=null&&(i=n.value-t),a(eh(r,n),i,n.level!=null?{level:n.level}:null)}}(e):function(a){return r.scale.getLabel(a)}}function eh(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function IC(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var a,n,i=t.getExtent();t instanceof vl?n=t.count():(a=t.getTicks(),n=a.length);var o=r.getLabelModel(),s=Rn(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;cr[1]&&(r[1]=n[1])})}var to=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),Np=[],RC={registerPreprocessor:GS,registerProcessor:FS,registerPostInit:PD,registerPostUpdate:RD,registerUpdateLifecycle:qv,registerAction:ar,registerCoordinateSystem:ED,registerLayout:kD,registerVisual:Pa,registerTransform:OD,registerLoading:HS,registerMap:ND,registerImpl:hD,PRIORITY:TD,ComponentModel:lt,ComponentView:Rt,SeriesModel:Ct,ChartView:bt,registerComponentModel:function(r){lt.registerClass(r)},registerComponentView:function(r){Rt.registerClass(r)},registerSeriesModel:function(r){Ct.registerClass(r)},registerChartView:function(r){bt.registerClass(r)},registerSubTypeDefaulter:function(r,e){lt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){db(r,e)}};function nt(r){if(B(r)){w(r,function(e){nt(e)});return}ct(Np,r)>=0||(Np.push(r),K(r)&&(r={install:r}),r.install(RC))}var EC=[];function Xl(r,e){for(var t=0;tn&&(a=o,n=l)}if(a)return kC(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return w(o,function(s){s.type==="polygon"?Op(s.exterior,n,i,t):w(s.points,function(l){Op(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new wt(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/t,l/t])}return a}function VC(r,e){return r=OC(r),G(_t(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new Vp(o[0],o.slice(1)));break;case"MultiPolygon":w(n.coordinates,function(l){l[0]&&i.push(new Vp(l[0],l.slice(1)))});break;case"LineString":i.push(new Bp([n.coordinates]));break;case"MultiLineString":i.push(new Bp(n.coordinates))}var s=new c_(a[e||"name"],i,a.cp);return s.properties=a,s})}var Ri=ut();function h_(r,e){var t=G(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function BC(r){var e=r.getLabelModel().get("customValues");if(e){var t=Rn(r),a=r.scale.getExtent(),n=h_(r,e),i=_t(n,function(o){return o>=a[0]&&o<=a[1]});return{labels:G(i,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?GC(r):HC(r)}function zC(r,e){var t=r.getTickModel().get("customValues");if(t){var a=r.scale.getExtent(),n=h_(r,t);return{ticks:_t(n,function(i){return i>=a[0]&&i<=a[1]})}}return r.type==="category"?FC(r,e):{ticks:G(r.scale.getTicks(),function(i){return i.value})}}function GC(r){var e=r.getLabelModel(),t=f_(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function f_(r,e){var t=p_(r,"labels"),a=rh(e),n=d_(t,a);if(n)return n;var i,o;return K(a)?i=m_(r,a):(o=a==="auto"?WC(r):a,i=y_(r,o)),g_(t,a,{labels:i,labelCategoryInterval:o})}function FC(r,e){var t=p_(r,"ticks"),a=rh(e),n=d_(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),K(a))i=m_(r,a,!0);else if(a==="auto"){var s=f_(r,r.getLabelModel());o=s.labelCategoryInterval,i=G(s.labels,function(l){return l.tickValue})}else o=a,i=y_(r,o,!0);return g_(t,a,{ticks:i,tickCategoryInterval:o})}function HC(r){var e=r.scale.getTicks(),t=Rn(r);return{labels:G(e,function(a,n){return{level:a.level,formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function p_(r,e){return Ri(r)[e]||(Ri(r)[e]=[])}function d_(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(a)),v=Math.abs(u*Math.sin(a)),h=0,f=0;l<=i[1];l+=s){var p=0,d=0,g=Ys(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,h=Math.max(h,p,7),f=Math.max(f,d,7)}var y=h/c,m=f/v;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var S=Math.max(0,Math.floor(Math.min(y,m))),_=Ri(r.model),x=r.getExtent(),b=_.lastAutoInterval,A=_.lastTickCount;return b!=null&&A!=null&&Math.abs(b-S)<=1&&Math.abs(A-o)<=1&&b>S&&_.axisExtent0===x[0]&&_.axisExtent1===x[1]?S=b:(_.lastTickCount=o,_.lastAutoInterval=S,_.axisExtent0=x[0],_.axisExtent1=x[1]),S}function YC(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 y_(r,e,t){var a=Rn(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var v=l_(r),h=o.get("showMinLabel")||v,f=o.get("showMaxLabel")||v;h&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);f&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function m_(r,e,t){var a=r.scale,n=Rn(r),i=[];return w(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),i}var zp=[0,1],Ze=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=a&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Fm(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(a=a.slice(),Gp(a,n.count())),yt(e,zp,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),Gp(a,n.count()));var i=yt(e,a,zp,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(),a=zC(this,t),n=a.ticks,i=G(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return ZC(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 a=this.scale.getMinorTicks(t),n=G(a,function(i){return G(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return BC(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(){return UC(this)},r}();function Gp(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function ZC(r,e,t,a){var n=e.length;if(!r.onBand||t||!n)return;var i=r.getExtent(),o,s;if(n===1)e[0].coord=i[0],o=e[1]={coord:i[1],tickValue:e[0].tickValue};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;w(e,function(f){f.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s,tickValue:c[1]+1},e.push(o)}var v=i[0]>i[1];h(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&h(i[0],e[0].coord)&&e.unshift({coord:i[0]}),h(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&h(o.coord,i[1])&&e.push({coord:i[1]});function h(f,p){return f=Ot(f),p=Ot(p),v?f>p:fn&&(n+=Yn);var f=Math.atan2(s,o);if(f<0&&(f+=Yn),f>=a&&f<=n||f+Yn>=a&&f+Yn<=n)return l[0]=c,l[1]=v,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=(p-o)*(p-o)+(d-s)*(d-s),S=(g-o)*(g-o)+(y-s)*(y-s);return m0){e=e/180*Math.PI,He.fromArray(r[0]),Tt.fromArray(r[1]),Bt.fromArray(r[2]),Ft.sub(Qe,He,Tt),Ft.sub(Ke,Bt,Tt);var t=Qe.len(),a=Ke.len();if(!(t<.001||a<.001)){Qe.scale(1/t),Ke.scale(1/a);var n=Qe.dot(Ke),i=Math.cos(e);if(i1&&Ft.copy(ve,Bt),ve.toArray(r[1])}}}}function JC(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,He.fromArray(r[0]),Tt.fromArray(r[1]),Bt.fromArray(r[2]),Ft.sub(Qe,Tt,He),Ft.sub(Ke,Bt,Tt);var a=Qe.len(),n=Ke.len();if(!(a<.001||n<.001)){Qe.scale(1/a),Ke.scale(1/n);var i=Qe.dot(e),o=Math.cos(t);if(i=l)Ft.copy(ve,Bt);else{ve.scaleAndAdd(Ke,s/Math.tan(Math.PI/2-c));var v=Bt.x!==Tt.x?(ve.x-Tt.x)/(Bt.x-Tt.x):(ve.y-Tt.y)/(Bt.y-Tt.y);if(isNaN(v))return;v<0?Ft.copy(ve,Tt):v>1&&Ft.copy(ve,Bt)}ve.toArray(r[1])}}}}function ql(r,e,t,a){var n=t==="normal",i=n?r:r.ensureState(t);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function QC(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var n=sa(a[0],a[1]),i=sa(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*t,s=xl([],a[1],a[0],o/n),l=xl([],a[1],a[2],o/i),u=xl([],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],a[2][0],a[2][1])}else for(var c=1;c0){S(D*T,0,o);var C=D+b;C<0&&_(-C*T,1)}else _(-b*T,1)}}function S(b,A,T){b!==0&&(u=!0);for(var D=A;D0)for(var C=0;C0;C--){var R=T[C-1]*L;S(-R,C,o)}}}function x(b){var A=b<0?-1:1;b=Math.abs(b);for(var T=Math.ceil(b/(o-1)),D=0;D0?S(T,0,D+1):S(-T,o-D-1,o),b-=T,b<=0)return}return u}function tM(r,e,t,a){return b_(r,"x","width",e,t)}function w_(r,e,t,a){return b_(r,"y","height",e,t)}function A_(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new wt(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var n=0;n=0&&a.attr(i.oldLayoutSelect),ct(h,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),ft(a,u,t,l)}else if(a.attr(u),!An(a).valueAnimation){var v=pt(a.style.opacity,1);a.style.opacity=0,Pt(a,{style:{opacity:v}},t,l)}if(i.oldLayout=u,a.states.select){var f=i.oldLayoutSelect={};To(f,u,Do),To(f,a.states.select,Do)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};To(p,u,Do),To(p,a.states.emphasis,Do)}m0(a,l,c,t,t)}if(n&&!n.ignore&&!n.invisible){var i=aM(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),ft(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,Pt(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}(),Jl=ut();function iM(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=Jl(t).labelManager;n||(n=Jl(t).labelManager=new nM),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=Jl(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function oM(r){r.registerPainter("svg",mb)}function sM(r){r.registerPainter("canvas",Sb)}var lM=function(r){E(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){return _r(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var a=new et,n=Wt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);a.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=t.itemHeight*.8,u=Wt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);a.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},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:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ct);function hn(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=un(r,e,t[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(e[i])}return a.join(" ")}var eo=function(r){E(e,r);function e(t,a,n,i){var o=r.call(this)||this;return o.updateData(t,a,n,i),o}return e.prototype._createSymbol=function(t,a,n,i,o){this.removeAll();var s=Wt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=uM,this._symbolType=t,this.add(s)},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(){fr(this.childAt(0))},e.prototype.downplay=function(){pr(this.childAt(0))},e.prototype.setZ=function(t,a){var n=this.childAt(0);n.zlevel=t,n.z=a},e.prototype.setDraggable=function(t,a){var n=this.childAt(0);n.draggable=t,n.cursor=!a&&t?"move":n.cursor},e.prototype.updateData=function(t,a,n,i){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=o!==this._symbolType,c=i&&i.disableAnimation;if(u){var v=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,v)}else{var h=this.childAt(0);h.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(f):ft(h,f,s,a),Ue(h)}if(this._updateCommon(t,a,l,n,i),u){var h=this.childAt(0);if(!c){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Pt(h,f,s,a)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.hostModel,u,c,v,h,f,p,d,g,y;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,v=i.selectItemStyle,h=i.focus,f=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(a),S=m.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),v=m.getModel(["select","itemStyle"]).getItemStyle(),c=m.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),f=S.get("blurScope"),p=S.get("disabled"),d=qt(m),g=S.getShallow("scale"),y=m.getShallow("cursor")}var _=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var x=La(t.getItemVisual(a,"symbolOffset"),n);x&&(s.x=x[0],s.y=x[1]),y&&s.attr("cursor",y);var b=t.getItemVisual(a,"style"),A=b.fill;if(s instanceof Ne){var T=s.style;s.useStyle(z({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(z({},b)):s.useStyle(b),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=t.getItemVisual(a,"liftZ"),C=this._z2;D!=null?C==null&&(this._z2=s.z2,s.z2+=D):C!=null&&(s.z2=C,this._z2=null);var M=o&&o.useNameLabel;ae(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:A,defaultOpacity:b.opacity});function I(P){return M?t.getName(P):hn(t,P)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=v,s.ensureState("blur").style=c;var R=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*R,L.scaleY=this._sizeY*R,this.setSymbolScale(1),kt(this,h,f,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,n){var i=this.childAt(0),o=q(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&zr(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();zr(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Pn(t.getItemVisual(a,"symbolSize"))},e}(et);function uM(r,e){this.parent.drift(r,e)}function Ql(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function Wp(r){return r!=null&&!J(r)&&(r={isIgnore:r}),r||{}}function Up(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:qt(e),cursorStyle:e.get("cursor")}}var ro=function(){function r(e){this.group=new et,this._SymbolCtor=e||eo}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=Wp(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Up(e),u={disableAnimation:s},c=t.getSymbolPoint||function(v){return e.getItemLayout(v)};i||a.removeAll(),e.diff(i).add(function(v){var h=c(v);if(Ql(e,h,v,t)){var f=new o(e,v,l,u);f.setPosition(h),e.setItemGraphicEl(v,f),a.add(f)}}).update(function(v,h){var f=i.getItemGraphicEl(h),p=c(v);if(!Ql(e,p,v,t)){a.remove(f);return}var d=e.getItemVisual(v,"symbol")||"circle",g=f&&f.getSymbolType&&f.getSymbolType();if(!f||g&&g!==d)a.remove(f),f=new o(e,v,l,u),f.setPosition(p);else{f.updateData(e,v,l,u);var y={x:p[0],y:p[1]};s?f.attr(y):ft(f,y,n)}a.add(f),e.setItemGraphicEl(v,f)}).remove(function(v){var h=i.getItemGraphicEl(v);h&&h.fadeOut(function(){a.remove(h)},n)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Up(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=Wp(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=a[0]:a[1]<0&&(t=a[1]),t}function C_(r,e,t,a){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function vM(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,n){t.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function hM(r,e,t,a,n,i,o,s){for(var l=vM(r,e),u=[],c=[],v=[],h=[],f=[],p=[],d=[],g=D_(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],S=0;S=n||d<0)break;if(ga(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),v=y,h=m;else{var S=y-u,_=m-c;if(S*S+_*_<.5){d+=i;continue}if(o>0){for(var x=d+i,b=e[x*2],A=e[x*2+1];b===y&&A===m&&g=a||ga(b,A))f=y,p=m;else{C=b-u,M=A-c;var R=y-u,P=b-y,k=m-c,O=A-m,N=void 0,V=void 0;if(s==="x"){N=Math.abs(R),V=Math.abs(P);var F=C>0?1:-1;f=y-F*N*o,p=m,I=y+F*V*o,L=m}else if(s==="y"){N=Math.abs(k),V=Math.abs(O);var W=M>0?1:-1;f=y,p=m-W*N*o,I=y,L=m+W*V*o}else N=Math.sqrt(R*R+k*k),V=Math.sqrt(P*P+O*O),D=V/(V+N),f=y-C*o*(1-D),p=m-M*o*(1-D),I=y+C*o*D,L=m+M*o*D,I=Dr(I,Cr(b,y)),L=Dr(L,Cr(A,m)),I=Cr(I,Dr(b,y)),L=Cr(L,Dr(A,m)),C=I-y,M=L-m,f=y-C*N/V,p=m-M*N/V,f=Dr(f,Cr(u,y)),p=Dr(p,Cr(c,m)),f=Cr(f,Dr(u,y)),p=Cr(p,Dr(c,m)),C=y-f,M=m-p,I=y+C*V/N,L=m+M*V/N}r.bezierCurveTo(v,h,f,p,y,m),v=I,h=L}else r.lineTo(y,m)}u=y,c=m,d+=i}return g}var M_=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),fM=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new M_},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&ga(n[o*2-2],n[o*2-1]);o--);for(;i=0){var _=u?(p-l)*S+l:(f-s)*S+s;return u?[t,_]:[_,t]}s=f,l=p;break;case o.C:f=i[v++],p=i[v++],d=i[v++],g=i[v++],y=i[v++],m=i[v++];var x=u?of(s,f,d,y,t,c):of(l,p,g,m,t,c);if(x>0)for(var b=0;b=0){var _=u?sf(l,p,g,m,A):sf(s,f,d,y,A);return u?[t,_]:[_,t]}}s=y,l=m;break}}},e}(Mt),pM=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(M_),I_=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new pM},e.prototype.buildPath=function(t,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&ga(n[s*2-2],n[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),i=l}return t}function yM(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=e.getAxis(n),u=G(i.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,v=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),v.reverse());var h=gM(u,n==="x"?t.getWidth():t.getHeight()),f=h.length;if(!f&&c)return u[0].coord<0?v[1]?v[1]:u[c-1].color:v[0]?v[0]:u[0].color;var p=10,d=h[0].coord-p,g=h[f-1].coord+p,y=g-d;if(y<.001)return"transparent";w(h,function(S){S.offset=(S.coord-d)/y}),h.push({offset:f?h[f-1].offset:.5,color:v[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:v[0]||"transparent"});var m=new Us(0,0,0,0,h,!0);return m[n]=d,m[n+"2"]=g,m}}}function mM(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(n&&SM(i,e))){var o=e.mapDimension(i.dim),s={};return w(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function SM(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function _M(r,e){return isNaN(r)||isNaN(e)}function xM(r){for(var e=r.length/2;e>0&&_M(r[e*2-2],r[e*2-1]);e--);return e-1}function Kp(r,e){return[r[e*2],r[e*2+1]]}function bM(r,e,t){for(var a=r.length/2,n=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 R_(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var V=p.getState("emphasis").style;V.lineWidth=+p.style.lineWidth+1}q(p).seriesIndex=t.seriesIndex,kt(p,k,O,N);var F=Xp(t.get("smooth")),W=t.get("smoothMonotone");if(p.setShape({smooth:F,smoothMonotone:W,connectNulls:A}),d){var X=s.getCalculationInfo("stackedOnSeries"),rt=0;d.useStyle(Q(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),X&&(rt=Xp(X.get("smooth"))),d.setShape({smooth:F,stackedOnSmooth:rt,smoothMonotone:W,connectNulls:A}),re(d,t,"areaStyle"),q(d).seriesIndex=t.seriesIndex,kt(d,k,O,N)}var at=this._changePolyState;s.eachItemGraphicEl(function(st){st&&(st.onHoverStateChange=at)}),this._polyline.onHoverStateChange=at,this._data=s,this._coordSys=i,this._stackedOnPoints=x,this._points=c,this._step=C,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,a){q(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,n,i){var o=t.getData(),s=xa(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],v=l[s*2+1];if(isNaN(c)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,v))return;var h=t.get("zlevel")||0,f=t.get("z")||0;u=new eo(o,s),u.x=c,u.y=v,u.setZ(h,f);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=f,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else bt.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=xa(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 bt.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;ps(this._polyline,t),a&&ps(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new fM({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new I_({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");K(c)&&(c=c(null));var v=u.get("animationDelay")||0,h=K(v)?v(null):v;t.eachItemGraphicEl(function(f,p){var d=f;if(d){var g=[f.x,f.y],y=void 0,m=void 0,S=void 0;if(n)if(o){var _=n,x=a.pointToCoord(g);i?(y=_.startAngle,m=_.endAngle,S=-x[1]/180*Math.PI):(y=_.r0,m=_.r,S=x[0])}else{var b=n;i?(y=b.x,m=b.x+b.width,S=f.x):(y=b.y+b.height,m=b.y,S=f.y)}var A=m===y?0:(S-y)/(m-y);l&&(A=1-A);var T=K(v)?v(p):c*A+h,D=d.getSymbolPath(),C=D.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),D.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(R_(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 vt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=xM(l);c>=0&&(ae(s,qt(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:c,defaultText:function(v,h,f){return f!=null?T_(o,f):hn(o,v)},enableTextSetter:!0},wM(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,n,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 v=n.getLayout("points"),h=n.hostModel,f=h.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,S=a.shape,_=m?y?S.x:S.y+S.height:y?S.x+S.width:S.y,x=(y?d:0)*(m?-1:1),b=(y?0:-d)*(m?-1:1),A=y?"x":"y",T=bM(v,_,A),D=T.range,C=D[1]-D[0],M=void 0;if(C>=1){if(C>1&&!f){var I=Kp(v,D[0]);u.attr({x:I[0]+x,y:I[1]+b}),o&&(M=h.getRawValue(D[0]))}else{var I=c.getPointOn(_,A);I&&u.attr({x:I[0]+x,y:I[1]+b});var L=h.getRawValue(D[0]),R=h.getRawValue(D[1]);o&&(M=Jm(n,p,L,R,T.t))}i.lastFrameIndex=D[0]}else{var P=t===1||i.lastFrameIndex>0?D[0]:0,I=Kp(v,P);o&&(M=h.getRawValue(P)),u.attr({x:I[0]+x,y:I[1]+b})}if(o){var k=An(u);typeof k.setLabelText=="function"&&k.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,c=this._polygon,v=t.hostModel,h=hM(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),f=h.current,p=h.stackedOnCurrent,d=h.next,g=h.stackedOnNext;if(o&&(p=Mr(h.stackedOnCurrent,h.current,n,o,l),f=Mr(h.current,null,n,o,l),g=Mr(h.stackedOnNext,h.next,n,o,l),d=Mr(h.next,null,n,o,l)),$p(f,d)>3e3||c&&$p(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),c&&(c.stopAnimation(),c.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=f;var y={shape:{points:d}};h.current!==f&&(y.shape.__points=h.next),u.stopAnimation(),ft(u,y,v),c&&(c.setShape({points:f,stackedOnPoints:p}),c.stopAnimation(),ft(c,{shape:{stackedOnPoints:g}},v),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var m=[],S=h.status,_=0;_e&&(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(),v=a.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(v||1),f=Math.round(s/h);if(isFinite(f)&&f>1){i==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/f)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/f));var p=void 0;Y(i)?p=TM[i]:K(i)&&(p=i),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/f,p,DM))}}}}}function CM(r){r.registerChartView(AM),r.registerSeriesModel(lM),r.registerLayout(no("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,E_("line"))}var Ei=function(r){E(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,a){return _r(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(n)w(i.getAxes(),function(h,f){if(h.type==="category"&&a!=null){var p=h.getTicksCoords(),d=h.getTickModel().get("alignWithLabel"),g=o[f],y=a[f]==="x1"||a[f]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[f]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var m=void 0,S=void 0,_=1,x=0;xg){S=(b+m)/2;break}x===1&&(_=A-p[0].tickValue)}S==null&&(m?m&&(S=p[p.length-1].coord):S=p[0].coord),s[f]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),v=i.getBaseAxis().isHorizontal()?0:1;s[v]+=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"},e}(Ct);Ct.registerClass(Ei);var MM=function(r){E(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 _r(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"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,n){return n.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Yr(Ei.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Ei),IM=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}(),Is=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new IM},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,c=a.startAngle,v=a.endAngle,h=a.clockwise,f=Math.PI*2,p=h?v-cMath.PI/2&&cs)return!0;s=v}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,n,i){if(this._isOrderChangedWithinSameData(t,a,n)){var o=this._dataSort(t,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,n){var i=a.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){Di(i,t,q(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(bt),qp={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,i=r.y+r.height,o=eu(e.x,r.x),s=ru(e.x+e.width,n),l=eu(e.y,r.y),u=ru(e.y+e.height,i),c=sn?s:o,e.y=v&&l>i?u:l,e.width=c?0:s-o,e.height=v?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),c||v},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var n=ru(e.r,r.r),i=eu(e.r0,r.r0);e.r=n,e.r0=i;var o=n-i<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},jp={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new dt({shape:z({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,v=n?"height":"width";c[v]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?Is:Ee,c=new u({shape:a,z2:1});c.name="item";var v=k_(n);if(c.calculateTextPosition=LM(v,{isRoundCap:u===Is}),i){var h=c.shape,f=n?"r":"endAngle",p={};h[f]=n?a.r0:a.startAngle,p[f]=a[f],(s?ft:Pt)(c,{shape:p},i)}return c}};function kM(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function Jp(r,e,t,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?ft:Pt)(t,{shape:l},e,n,null);var c=e?r.baseAxis.model:null;(o?ft:Pt)(t,{shape:u},c,n)}function Qp(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function VM(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function k_(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function ed(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var c=r.shape,v=va(a.getModel("itemStyle"),c,!0);z(c,v),r.setShape(c)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=a.getShallow("cursor");h&&r.attr("cursor",h);var f=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=qt(a);ae(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:hn(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var d=r.getTextContent();if(s&&d){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,PM(r,g==="outside"?f:g,k_(o),a.get(["label","rotate"]))}y0(d,p,i.getRawValue(t),function(m){return T_(e,m)});var y=a.getModel(["emphasis"]);kt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),re(r,a),VM(n)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function BM(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var zM=function(){function r(){}return r}(),rd=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new zM},e.prototype.buildPath=function(t,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function GM(r,e,t){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,v=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 N_(r,e,t){if(Ra(t,"cartesian2d")){var a=e,n=t.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function FM(r,e,t){var a=r.type==="polar"?Ee:dt;return new a({shape:N_(e,t,r),silent:!0,z2:0})}function HM(r){r.registerChartView(EM),r.registerSeriesModel(MM),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,tt(e_,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,r_("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,E_("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var id=Math.PI*2,Lo=Math.PI/180;function O_(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function V_(r,e){var t=O_(r,e),a=r.get("center"),n=r.get("radius");B(n)||(n=[0,n]);var i=H(t.width,e.getWidth()),o=H(t.height,e.getHeight()),s=Math.min(i,o),l=H(n[0],s/2),u=H(n[1],s/2),c,v,h=r.coordinateSystem;if(h){var f=h.dataToPoint(a);c=f[0]||0,v=f[1]||0}else B(a)||(a=[a,a]),c=H(a[0],i)+t.x,v=H(a[1],o)+t.y;return{cx:c,cy:v,r0:l,r:u}}function WM(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=O_(a,t),s=V_(a,t),l=s.cx,u=s.cy,c=s.r,v=s.r0,h=-a.get("startAngle")*Lo,f=a.get("endAngle"),p=a.get("padAngle")*Lo;f=f==="auto"?h-id:-f*Lo;var d=a.get("minAngle")*Lo,g=d+p,y=0;n.each(i,function(O){!isNaN(O)&&y++});var m=n.getSum(i),S=Math.PI/(m||y)*2,_=a.get("clockwise"),x=a.get("roseType"),b=a.get("stillShowZeroSum"),A=n.getDataExtent(i);A[0]=0;var T=_?1:-1,D=[h,f],C=T*p/2;Om(D,!_),h=D[0],f=D[1];var M=B_(a);M.startAngle=h,M.endAngle=f,M.clockwise=_;var I=Math.abs(f-h),L=I,R=0,P=h;if(n.setLayout({viewRect:o,r:c}),n.each(i,function(O,N){var V;if(isNaN(O)){n.setItemLayout(N,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:v,r:x?NaN:c});return}x!=="area"?V=m===0&&b?S:O*S:V=I/y,VV?(W=P+T*V/2,X=W):(W=P+C,X=F-C),n.setItemLayout(N,{angle:V,startAngle:W,endAngle:X,clockwise:_,cx:l,cy:u,r0:v,r:x?yt(O,A,[v,c]):c}),P=F}),Lt?y:g,x=Math.abs(S.label.y-t);if(x>=_.maxY){var b=S.label.x-e-S.len2*n,A=a+S.len,T=Math.abs(b)r.unconstrainedWidth?null:f:null;a.setStyle("width",p)}var d=a.getBoundingRect();i.width=d.width;var g=(a.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-v)/2}}}function au(r){return r.position==="center"}function ZM(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*UM,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,v=s.y,h=s.height;function f(b){b.ignore=!0}function p(b){if(!b.ignore)return!0;for(var A in b.states)if(b.states[A].ignore===!1)return!0;return!1}e.each(function(b){var A=e.getItemGraphicEl(b),T=A.shape,D=A.getTextContent(),C=A.getTextGuideLine(),M=e.getItemModel(b),I=M.getModel("label"),L=I.get("position")||M.get(["emphasis","label","position"]),R=I.get("distanceToLabelLine"),P=I.get("alignTo"),k=H(I.get("edgeDistance"),u),O=I.get("bleedMargin"),N=M.getModel("labelLine"),V=N.get("length");V=H(V,u);var F=N.get("length2");if(F=H(F,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":X>0?"left":"right"}var Lt=Math.PI,zt=0,le=I.get("rotate");if(St(le))zt=le*(Lt/180);else if(L==="center")zt=0;else if(le==="radial"||le===!0){var xr=X<0?-W+Lt:-W;zt=xr}else if(le==="tangential"&&L!=="outside"&&L!=="outer"){var ir=Math.atan2(X,rt);ir<0&&(ir=Lt*2+ir);var co=rt>0;co&&(ir=Lt+ir),zt=ir-Lt}if(i=!!zt,D.x=at,D.y=st,D.rotation=zt,D.setStyle({verticalAlign:"middle"}),ht){D.setStyle({align:me});var Sl=D.states.select;Sl&&(Sl.x+=D.x,Sl.y+=D.y)}else{var kn=D.getBoundingRect().clone();kn.applyTransform(D.getComputedTransform());var rf=(D.style.margin||0)+2.1;kn.y-=rf/2,kn.height+=rf,t.push({label:D,labelLine:C,position:L,len:V,len2:F,minTurnAngle:N.get("minTurnAngle"),maxSurfaceAngle:N.get("maxSurfaceAngle"),surfaceNormal:new Ft(X,rt),linePoints:Vt,textAlign:me,labelDistance:R,labelAlignTo:P,edgeDistance:k,bleedMargin:O,rect:kn,unconstrainedWidth:kn.width,labelStyleWidth:D.style.width})}A.setTextConfig({inside:ht})}}),!i&&r.get("avoidLabelOverlap")&&YM(t,a,n,l,u,h,c,v);for(var d=0;d0){for(var c=o.getItemLayout(0),v=1;isNaN(c&&c.startAngle)&&v=i.r0}},e.type="pie",e}(bt);function En(r,e,t){e=B(e)&&{coordDimensions:e}||z({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=Qi(a,e).dimensions,i=new he(n,r);return i.initData(a,t),i}var oo=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 a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}(),KM=ut(),qM=function(r){E(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 oo(U(this.getData,this),U(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return En(this,{coordDimensions:["value"],encodeDefaulter:tt(Vv,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=KM(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=Xb(o,a.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){_a(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ct);function jM(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(St(o)&&!isNaN(o)&&o<0)})}}}function JM(r){r.registerChartView(XM),r.registerSeriesModel(qM),wS("pie",r.registerAction),r.registerLayout(tt(WM,"pie")),r.registerProcessor(io("pie")),r.registerProcessor(jM("pie"))}var QM=function(r){E(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,a){return _r(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,a,n){return n.point(a.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"],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:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ct),G_=4,tI=function(){function r(){}return r}(),eI=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new tI},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var c=u*2,v=i[c]-s/2,h=i[c+1]-l/2;if(t>=v&&a>=h&&t<=v+s&&a<=h+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,v=-1/0,h=0;h=0&&(u.dataIndex=v+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),aI=function(r){E(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,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=no("").reset(t,a,n);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 a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new rI:new ro,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(bt),nI=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(lt),kc=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ht).models[0]},e.type="cartesian2dAxis",e}(lt);Jt(kc,to);var F_={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},iI=it({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},F_),ih=it({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},F_),oI=it({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ih),sI=Q({logBase:10},ih);const H_={category:iI,value:ih,time:oI,log:sI};var lI={value:1,category:1,time:1,log:1};function fn(r,e,t,a){w(lI,function(n,i){var o=it(it({},H_[i],!0),a,!0),s=function(l){E(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,v){var h=Mi(this),f=h?Cn(c):{},p=v.getTheme();it(c,p.get(i+"Axis")),it(c,this.getDefaultOption()),c.type=sd(c),h&&Gr(c,f,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=Lc.createByAxisModel(this))},u.prototype.getCategories=function(c){var v=this.option;if(v.type==="category")return c?v.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",sd)}function sd(r){return r.type||(r.data?"category":"value")}var uI=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),_t(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),Nc=["x","y"];function ld(r){return r.type==="interval"||r.type==="time"}var cI=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Nc,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!ld(t)||!ld(a))){var n=t.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,v=(s[1]-o[1])/u,h=o[0]-n[0]*c,f=o[1]-i[0]*v,p=this._transform=[c,0,0,v,h,f];this._invTransform=Wi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var n=this.dataToPoint(t),i=this.dataToPoint(a),o=this.getArea(),s=new wt(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Re(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},e.prototype.clampData=function(t,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(t[0]),u=i.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a){var n=[];if(this._invTransform)return Re(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),a),n[1]=o.coordToData(o.toLocalCoord(t[1]),a),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(a[0],a[1])-i+t,l=Math.max(n[0],n[1])-o+t;return new wt(i,o,s,l)},e}(uI),vI=function(r){E(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Ze);function Oc(r,e,t){t=t||{};var a=r.coordinateSystem,n=e.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,c=a.getRect(),v=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p=u==="x"?[v[2]-f,v[3]+f]:[v[0]-f,v[1]+f];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[h[l]]:v[0],u==="x"?p[h[l]]:v[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Qt(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function ud(r){return r.get("coordinateSystem")==="cartesian2d"}function cd(r){var e={xAxisModel:null,yAxisModel:null};return w(e,function(t,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,Ht).models[0];e[a]=i}),e}var nu=Math.log;function W_(r,e,t){var a=gr.prototype,n=a.getTicks.call(t),i=a.getTicks.call(t,!0),o=n.length-1,s=a.getInterval.call(t),l=s_(r,e),u=l.extent,c=l.fixMin,v=l.fixMax;if(r.type==="log"){var h=nu(r.base);u=[nu(u[0])/h,nu(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:v});var f=a.getExtent.call(r);c&&(u[0]=f[0]),v&&(u[1]=f[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(c&&v)p=(g-d)/o;else if(c)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=$l(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=$l(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Ot(g-m),d<0&&u[0]>=0?(d=0,g=Ot(m)):g>0&&u[1]<=0&&(g=0,d=-Ot(m))}var S=(n[0].value-i[0].value)/s,_=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+p*S,g+p*_),a.setInterval.call(r,p),(S||_)&&a.setNiceExtent.call(r,d+p,g-p)}var hI=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Nc,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=Ut(o),u=l.length;if(u){for(var c=[],v=u-1;v>=0;v--){var h=+l[v],f=o[h],p=f.model,d=f.scale;Pc(d)&&p.get("alignTicks")&&p.get("interval")==null?c.push(f):(vn(d,p),Pc(d)&&(s=f))}c.length&&(s||(s=c.pop(),vn(s.scale,s.model)),w(c,function(g){W_(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};w(a.x,function(o){vd(a,"y",o,i)}),w(a.y,function(o){vd(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=e.getBoxLayoutParams(),i=!a&&e.get("containLabel"),o=Zt(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(w(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=IC(u);if(c){var v=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[v]-=c[v]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),w(this._coordsList,function(u){u.calcAffineTransform()});function l(){w(s,function(u){var c=u.isHorizontal(),v=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(v[h],v[1-h]),fI(u,c?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0?"top":"bottom",i="center"):bi(n-Pr)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,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}(),fd={axisLine:function(r,e,t,a){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var i=e.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(Re(s,s,o),Re(l,l,o));var c=z({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),v=new ee({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});ln(v.shape,v.style.lineWidth),v.anid="line",t.add(v);var h=e.get(["axisLine","symbol"]);if(h!=null){var f=e.get(["axisLine","symbolSize"]);Y(h)&&(h=[h,h]),(Y(f)||St(f))&&(f=[f,f]);var p=La(e.get(["axisLine","symbolOffset"])||0,f),d=f[0],g=f[1];w([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(h[m]!=="none"&&h[m]!=null){var S=Wt(h[m],-d/2,-g/2,d,g,c.stroke,!0),_=y.r+y.offset,x=u?l:s;S.attr({rotation:y.rotate,x:x[0]+_*Math.cos(r.rotation),y:x[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),t.add(S)}})}}},axisTickLabel:function(r,e,t,a){var n=gI(t,a,e,r),i=mI(t,a,e,r);if(dI(e,i,n),yI(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=x_(G(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));A_(o)}},axisName:function(r,e,t,a){var n=Qt(r.axisName,e.get("name"));if(n){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,v=[i==="start"?u[0]-c*l:i==="end"?u[1]+c*l:(u[0]+u[1])/2,dd(i)?r.labelOffset+o*l:0],h,f=e.get("nameRotate");f!=null&&(f=f*Pr/180);var p;dd(i)?h=fe.innerTextLayout(r.rotation,f??r.rotation,o):(h=pI(r.rotation,i,f||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=Qt(r.nameTruncateMaxWidth,g.maxWidth,p),S=new vt({x:v[0],y:v[1],rotation:h.rotation,silent:fe.isLabelSilent(e),style:Dt(s,{text:n,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Ma({el:S,componentModel:e,itemName:n}),S.__fullText=n,S.anid="name",e.get("triggerEvent")){var _=fe.makeAxisEventDataBase(e);_.targetType="axisName",_.name=n,q(S).eventData=_}a.add(S),S.updateTransform(),t.add(S),S.decomposeTransform()}}};function pI(r,e,t,a){var n=Hm(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return bi(n-Pr/2)?(o=l?"bottom":"top",i="center"):bi(n-Pr*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nPr/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function dI(r,e,t){if(!l_(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],v=t[t.length-1],h=t[t.length-2];a===!1?(we(i),we(u)):pd(i,o)&&(a?(we(o),we(c)):(we(i),we(u))),n===!1?(we(s),we(v)):pd(l,s)&&(n?(we(l),we(h)):(we(s),we(v)))}}function we(r){r&&(r.ignore=!0)}function pd(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var n=gv([]);return Yi(n,n,-r.rotation),t.applyTransform(ls([],n,r.getLocalTransform())),a.applyTransform(ls([],n,e.getLocalTransform())),t.intersect(a)}}function dd(r){return r==="middle"||r==="center"}function U_(r,e,t,a,n){for(var i=[],o=[],s=[],l=0;l=0||r===e}function AI(r){var e=oh(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,n=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=Vc(t);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=Q({color:p.color},l));var g=it(j(p),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:v,nameTextStyle:d,triggerEvent:h},!1);if(Y(c)){var y=g.name;g.name=c.replace("{value}",y??"")}else K(c)&&(g.name=c(g.name,g));var m=new mt(g,null,this.ecModel);return Jt(m,to.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:it({lineStyle:{color:"#bbb"}},Zn.axisLine),axisLabel:Po(Zn.axisLabel,!1),axisTick:Po(Zn.axisTick,!1),splitLine:Po(Zn.splitLine,!0),splitArea:Po(Zn.splitArea,!0),indicator:[]},e}(lt),VI=["axisLine","axisTickLabel","axisName"],BI=function(r){E(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,a,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes(),i=G(n,function(o){var s=o.model.get("showName")?o.name:"",l=new fe(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});w(i,function(o){w(VI,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),v=s.get("show"),h=l.get("color"),f=u.get("color"),p=B(h)?h:[h],d=B(f)?f:[f],g=[],y=[];function m(P,k,O){var N=O%k.length;return P[N]=P[N]||[],N}if(i==="circle")for(var S=n[0].getTicksCoords(),_=a.cx,x=a.cy,b=0;b3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;su(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var v=Math.abs(i),h=(i>0?1:-1)*(v>3?.4:v>1?.15:.05);su(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!xd(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;su(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(mn);function su(r,e,t,a,n){r.pointerChecker&&r.pointerChecker(a,n.originX,n.originY)&&(Br(a.event),q_(r,e,t,a,n))}function q_(r,e,t,a,n){n.isAvailableBehavior=U(rs,null,t,a),r.trigger(e,n)}function rs(r,e,t){var a=t[r];return!r||a&&(!Y(a)||e.event[a+"Key"])}function lh(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function uh(r,e,t,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(a-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var YI={axisPointer:1,tooltip:1,brush:1};function fl(r,e,t){var a=e.getComponentByElement(r.topTarget),n=a&&a.coordinateSystem;return a&&a!==t&&!YI.hasOwnProperty(a.mainType)&&n&&n.model!==t}var ZI=$(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),$I=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=$(),this._freedGraphics=[],this._mapName=e,this._parsedXML=bb(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=KI(e.named),a=t.regions,n=t.regionsMap;this._regions=a,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,a;try{t=e&&wb(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=t.root,Se(a!=null)}catch(g){throw new Error(`Invalid svg format `+g.message)}var n=new et;n.add(a),n.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,v=void 0,h=void 0;if(i!=null?(u=0,v=i):s&&(u=s.x,v=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var f=a.getBoundingRect();u==null&&(u=f.x,v=f.width),c==null&&(c=f.y,h=f.height)}l=this._boundingRect=new wt(u,c,v,h)}if(s){var p=Ab(s,l);a.scaleX=a.scaleY=p.scale,a.x=p.x,a.y=p.y}n.setClipPath(new dt({shape:l.plain()}));var d=[];return w(t.named,function(g){ZI.get(g.svgNodeTagLower)!=null&&(d.push(g),XI(g.el))}),{root:n,boundingRect:l,named:d}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,a),a)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);a&&(t.removeKey(e),this._freedGraphics.push(a))},r}();function XI(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function KI(r){var e=[],t=$();return w(r,function(a){if(a.namedFrom==null){var n=new NC(a.name,a.el);e.push(n),t.set(a.name,n)}}),{regions:e,regionsMap:t}}var zc=[126,25],bd="南海诸岛",Qr=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Jr=0;Jr0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=$(),a=$(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(f,p){return p&&(f=p(f)),f&&[f[0]*i.scaleX+i.x,f[1]*i.scaleY+i.y]}function v(f){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(h=n);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ae(e,qt(a),{labelFetcher:h,labelDataIndex:v,defaultText:t},f);var p=e.getTextContent();if(p&&(j_(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Dd(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):q(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function Cd(r,e,t,a,n){r.data||Ma({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function Md(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return kt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&Bw(e,n,t),o}function Id(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),w(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Ct);function cL(r,e){var t={};return w(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,c=0;c1?(_.width=S,_.height=S/g):(_.height=S,_.width=S*g),_.y=m[1]-_.height/2,_.x=m[0]-_.width/2;else{var x=r.getBoxLayoutParams();x.aspect=g,_=Zt(x,{width:p,height:d})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function pL(r,e){w(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var dL=function(){function r(){this.dimensions=Q_}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Gc(l+s,l,z({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=Ed,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),w(i,function(o,s){var l=G(o,function(c){return c.get("nameMap")}),u=new Gc(s,s,z({nameMap:mv(l)},n(o[0])));u.zoomLimit=Qt.apply(null,G(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=Ed,u.resize(o[0],t),w(o,function(c){c.coordinateSystem=u,pL(u,c)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).slice(),o=$(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function xL(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){AL(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=TL(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function bL(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Nd(r){return arguments.length?r:ML}function ii(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function wL(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function AL(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function TL(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,v=s.hierNode.modifier;s=lu(s),i=uu(i),s&&i;){n=lu(n),o=uu(o),n.hierNode.ancestor=r;var h=s.hierNode.prelim+v-i.hierNode.prelim-u+a(s,i);h>0&&(CL(DL(s,r,t),r,h),u+=h,l+=h),v+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,c+=o.hierNode.modifier}s&&!lu(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=v-l),i&&!uu(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function lu(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function uu(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function DL(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function CL(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function ML(r,e){return r.parentNode===e.parentNode?1:2}var IL=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),LL=function(r){E(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new IL},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,c=u==="TB"||u==="BT"?0:1,v=1-c,h=H(a.forkPosition,1),f=[];f[c]=o[c],f[v]=o[v]+(l[v]-o[v])*h,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[c]=s[c],t.lineTo(f[0],f[1]),f[c]=l[c],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,x||(_=_-Math.PI));var A=x?"left":"right",T=s.getModel("label"),D=T.get("rotate"),C=D*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||A,rotation:D==null?-_:C,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?_i(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(q(t).focus=L),RL(n,o,c,t,p,f,d,a),t.__edge&&(t.onHoverStateChange=function(R){if(R!=="blur"){var P=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);P&&P.hoverState===Xi||ps(t.__edge,R)}})}function RL(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),v=r.getOrient(),h=r.get(["lineStyle","curveness"]),f=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new Ws({shape:Fc(c,v,h,n,n)})),ft(d,{shape:Fc(c,v,h,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,n=r.targetNode;if(Y(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function ix(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function ph(r,e){var t=ix(r);return ct(t,e)>=0}function pl(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var FL=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new mt(n,this,this.ecModel),o=fh.createTree(a,this,s);function s(v){v.wrapMethod("getItemModel",function(h,f){var p=o.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(v){v.depth>l&&(l=v.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(v){var h=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=h&&h.collapsed!=null?!h.collapsed:v.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return jt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=pl(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Ct);function HL(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function WL(r,e){r.eachSeriesByType("tree",function(t){UL(t,e)})}function UL(r,e){var t=wL(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Nd(function(S,_){return(S.parentNode===_.parentNode?1:2)/S.depth})):(n=t.width,i=t.height,o=Nd());var s=r.getData().tree.root,l=s.children[0];if(l){_L(s),HL(l,xL,o),s.hierNode.modifier=-l.hierNode.prelim,Xn(l,bL);var u=l,c=l,v=l;Xn(l,function(S){var _=S.getLayout().x;_c.getLayout().x&&(c=S),S.depth>v.depth&&(v=S)});var h=u===c?1:o(u,c)/2,f=h-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=n/(c.getLayout().x+h+f),d=i/(v.depth-1||1),Xn(l,function(S){g=(S.getLayout().x+f)*p,y=(S.depth-1)*d;var _=ii(g,y);S.setLayout({x:_.x,y:_.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(c.getLayout().x+h+f),p=n/(v.depth-1||1),Xn(l,function(S){y=(S.getLayout().x+f)*d,g=m==="LR"?(S.depth-1)*p:n-(S.depth-1)*p,S.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=n/(c.getLayout().x+h+f),d=i/(v.depth-1||1),Xn(l,function(S){g=(S.getLayout().x+f)*p,y=m==="TB"?(S.depth-1)*d:i-(S.depth-1)*d,S.setLayout({x:g,y},!0)}))}}}function YL(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");z(s,o)})})}function ZL(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=vh(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function $L(r){r.registerChartView(PL),r.registerSeriesModel(FL),r.registerLayout(WL),r.registerVisual(YL),ZL(r)}var Gd=["treemapZoomToNode","treemapRender","treemapMove"];function XL(r){for(var e=0;e1;)i=i.parentNode;var o=_c(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var KL=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};sx(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new mt({itemStyle:o},this,a);i=t.levels=qL(i,a);var l=G(i||[],function(v){return new mt(v,s,a)},this),u=fh.createTree(n,this,c);function c(v){v.wrapMethod("getItemModel",function(h,f){var p=u.getNodeByDataIndex(f),d=p?l[p.depth]:null;return h.parentModel=d||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return jt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=pl(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},z(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=$(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){ox(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ct);function sx(r){var e=0;w(r.children,function(a){sx(a);var n=a.value;B(n)&&(n=n[0]),e+=n});var t=r.value;B(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),B(r.value)?r.value[0]=t:r.value=t}function qL(r,e){var t=xt(e.get("color")),a=xt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,i;w(r,function(s){var l=new mt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}var jL=8,Fd=8,cu=5,JL=function(){function r(e){this.group=new et,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),v={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,v,u),this._renderContent(e,v,s,l,u,c,n),al(o,v.pos,v.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=Yt(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+jL*2,t.emptyItemWidth);t.totalWidth+=s+Fd,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),v=gA(t.pos,t.box),h=t.totalWidth,f=t.renderList,p=n.getModel("itemStyle").getItemStyle(),d=f.length-1;d>=0;d--){var g=f[d],y=g.node,m=g.width,S=g.text;h>v.width&&(h-=m-u,m=u,S=null);var _=new ke({shape:{points:QL(l,0,m,c,d===f.length-1,d===0)},style:Q(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new vt({style:Dt(i,{text:S})}),textConfig:{position:"inside"},z2:bn*1e4,onclick:tt(s,y)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Dt(o,{text:S}),_.ensureState("emphasis").style=p,kt(_,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(_),tP(_,e,y),l+=m+Fd}},r.prototype.remove=function(){this.group.removeAll()},r}();function QL(r,e,t,a,n,i){var o=[[n?r:r-cu,e],[r+t,e],[r+t,e+a],[n?r:r-cu,e+a]];return!i&&o.splice(2,0,[r+t+cu,e+a/2]),!n&&o.push([r,e+a/2]),o}function tP(r,e,t){q(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&pl(t,e)}}var eP=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;nWd||Math.abs(t.dy)>Wd)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new wt(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var v=c.zoom=c.zoom||1;if(v*=i,u){var h=u.min||0,f=u.max||1/0;v=Math.max(Math.min(f,v),h)}var p=v/c.zoom;c.zoom=v;var d=this.seriesModel.layoutInfo;a-=d.x,n-=d.y;var g=_n();Sa(g,g,[-a,-n]),Db(g,g,[p,p]),Sa(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Ss(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new JL(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(ph(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Kn(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(bt);function Kn(){return{nodeGroup:[],background:[],content:[]}}function sP(r,e,t,a,n,i,o,s,l,u){if(!o)return;var c=o.getLayout(),v=r.getData(),h=o.getModel();if(v.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var f=c.width,p=c.height,d=c.borderWidth,g=c.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),S=o.viewChildren,_=c.upperHeight,x=S&&S.length,b=h.getModel("itemStyle"),A=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),D=h.getModel(["select","itemStyle"]),C=b.get("borderRadius")||0,M=st("nodeGroup",Hc);if(!M)return;if(l.add(M),M.x=c.x||0,M.y=c.y||0,M.markRedraw(),Ls(M).nodeWidth=f,Ls(M).nodeHeight=p,c.isAboveViewRoot)return M;var I=st("background",Hd,u,nP);I&&F(M,I,x&&c.upperLabelHeight);var L=h.getModel("emphasis"),R=L.get("focus"),P=L.get("blurScope"),k=L.get("disabled"),O=R==="ancestor"?o.getAncestorsIndices():R==="descendant"?o.getDescendantIndices():R;if(x)Ti(M)&&la(M,!1),I&&(la(I,!k),v.setItemGraphicEl(o.dataIndex,I),fc(I,O,P));else{var N=st("content",Hd,u,iP);N&&W(M,N),I.disableMorphing=!0,I&&Ti(I)&&la(I,!1),la(M,!k),v.setItemGraphicEl(o.dataIndex,M);var V=h.getShallow("cursor");V&&N.attr("cursor",V),fc(M,O,P)}return M;function F(ht,ot,It){var At=q(ot);if(At.dataIndex=o.dataIndex,At.seriesIndex=r.seriesIndex,ot.setShape({x:0,y:0,width:f,height:p,r:C}),g)X(ot);else{ot.invisible=!1;var Et=o.getVisual("style"),$t=Et.stroke,Xt=Zd(b);Xt.fill=$t;var Lt=ta(A);Lt.fill=A.get("borderColor");var zt=ta(T);zt.fill=T.get("borderColor");var le=ta(D);if(le.fill=D.get("borderColor"),It){var xr=f-2*d;rt(ot,$t,Et.opacity,{x:d,y:0,width:xr,height:_})}else ot.removeTextContent();ot.setStyle(Xt),ot.ensureState("emphasis").style=Lt,ot.ensureState("blur").style=zt,ot.ensureState("select").style=le,wa(ot)}ht.add(ot)}function W(ht,ot){var It=q(ot);It.dataIndex=o.dataIndex,It.seriesIndex=r.seriesIndex;var At=Math.max(f-2*d,0),Et=Math.max(p-2*d,0);if(ot.culling=!0,ot.setShape({x:d,y:d,width:At,height:Et,r:C}),g)X(ot);else{ot.invisible=!1;var $t=o.getVisual("style"),Xt=$t.fill,Lt=Zd(b);Lt.fill=Xt,Lt.decal=$t.decal;var zt=ta(A),le=ta(T),xr=ta(D);rt(ot,Xt,$t.opacity,null),ot.setStyle(Lt),ot.ensureState("emphasis").style=zt,ot.ensureState("blur").style=le,ot.ensureState("select").style=xr,wa(ot)}ht.add(ot)}function X(ht){!ht.invisible&&i.push(ht)}function rt(ht,ot,It,At){var Et=h.getModel(At?Yd:Ud),$t=Yt(h.get("name"),null),Xt=Et.getShallow("show");ae(ht,qt(h,At?Yd:Ud),{defaultText:Xt?$t:null,inheritColor:ot,defaultOpacity:It,labelFetcher:r,labelDataIndex:o.dataIndex});var Lt=ht.getTextContent();if(Lt){var zt=Lt.style,le=Rm(zt.padding||0);At&&(ht.setTextConfig({layoutRect:At}),Lt.disableLabelLayout=!0),Lt.beforeUpdate=function(){var ir=Math.max((At?At.width:ht.shape.width)-le[1]-le[3],0),co=Math.max((At?At.height:ht.shape.height)-le[0]-le[2],0);(zt.width!==ir||zt.height!==co)&&Lt.setStyle({width:ir,height:co})},zt.truncateMinChar=2,zt.lineOverflow="truncate",at(zt,At,c);var xr=Lt.getState("emphasis");at(xr?xr.style:null,At,c)}}function at(ht,ot,It){var At=ht?ht.text:null;if(!ot&&It.isLeafRoot&&At!=null){var Et=r.get("drillDownIcon",!0);ht.text=Et?Et+" "+At:At}}function st(ht,ot,It,At){var Et=m!=null&&t[ht][m],$t=n[ht];return Et?(t[ht][m]=null,Vt($t,Et)):g||(Et=new ot,Et instanceof ma&&(Et.z2=lP(It,At)),me($t,Et)),e[ht][y]=Et}function Vt(ht,ot){var It=ht[y]={};ot instanceof Hc?(It.oldX=ot.x,It.oldY=ot.y):It.oldShape=z({},ot.shape)}function me(ht,ot){var It=ht[y]={},At=o.parentNode,Et=ot instanceof et;if(At&&(!a||a.direction==="drillDown")){var $t=0,Xt=0,Lt=n.background[At.getRawIndex()];!a&&Lt&&Lt.oldShape&&($t=Lt.oldShape.width,Xt=Lt.oldShape.height),Et?(It.oldX=0,It.oldY=Xt):It.oldShape={x:$t,y:Xt,width:0,height:0}}It.fadein=!Et}}function lP(r,e){return r*aP+e}var Oi=w,uP=J,Ps=-1,Kt=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=j(e);this.type=a,this.mappingMethod=t,this._normalizeData=hP[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(vu(n),cP(n)):t==="category"?n.categories?vP(n):vu(n,!0):(Se(t!=="linear"||n.dataExtent),vu(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return U(this._normalizeData,this)},r.listVisualTypes=function(){return Ut(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){J(e)?w(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=B(e)?[]:J(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},a;return e&&Oi(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(B(e))e=e.slice();else if(uP(e)){var t=[];Oi(e,function(a,n){t.push(n)}),e=t}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var n,i=1/0,o=0,s=t.length;o=0;i--)a[i]==null&&(delete t[e[i]],e.pop())}function vu(r,e){var t=r.visual,a=[];J(t)?Oi(t,function(i){a.push(i)}):t!=null&&a.push(t);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),lx(r,a)}function Eo(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:Wc([0,1])}}function $d(r){var e=this.option.visual;return e[Math.round(yt(r,[0,1],[0,e.length-1],!0))]||{}}function qn(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function oi(r){var e=this.option.visual;return e[this.option.loop&&r!==Ps?r%e.length:r]}function ea(){return this.option.visual[0]}function Wc(r){return{linear:function(e){return yt(e,r,this.option.visual,!0)},category:oi,piecewise:function(e,t){var a=Uc.call(this,t);return a==null&&(a=yt(e,r,this.option.visual,!0)),a},fixed:ea}}function Uc(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=Kt.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function lx(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var a=Bm(t);return a||[0,0,0,1]})),e}var hP={linear:function(r){return yt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Kt.findPieceIndex(r,e,!0);if(t!=null)return yt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??Ps},fixed:pe};function ko(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=mP(n,l,d,g,p,a);cx(d,y,t,a)}})}}}function dP(r,e,t){var a=z({},e),n=t.designatedVisualItemStyle;return w(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Xd(r){var e=hu(r,"color");if(e){var t=hu(r,"colorAlpha"),a=hu(r,"colorSaturation");return a&&(e=ui(e,null,null,a)),t&&(e=fs(e,t)),e}}function gP(r,e){return e!=null?ui(e,null,null,r):null}function hu(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function yP(r,e,t,a,n,i){if(!(!i||!i.length)){var o=fu(e,"color")||n.color!=null&&n.color!=="none"&&(fu(e,"colorAlpha")||fu(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),v={type:o.name,dataExtent:u,visual:o.range};v.type==="color"&&(c==="index"||c==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var h=new Kt(v);return ux(h).drColorMappingBy=c,h}}}function fu(r,e){var t=r.get(e);return B(t)&&t.length?{name:e,range:t}:null}function mP(r,e,t,a,n,i){var o=z({},e);if(n){var s=n.type,l=s==="color"&&ux(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Vi=Math.max,Rs=Math.min,Kd=Qt,dh=w,vx=["itemStyle","borderWidth"],SP=["itemStyle","gapWidth"],_P=["upperLabel","show"],xP=["upperLabel","height"];const bP={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=Zt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=H(Kd(s.width,l[0]),n),c=H(Kd(s.height,l[1]),i),v=a&&a.type,h=["treemapZoomToNode","treemapRootToNode"],f=Ni(a,h,r),p=v==="treemapRender"||v==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=ix(d);if(v!=="treemapMove"){var y=v==="treemapZoomToNode"?MP(r,f,d,u,c):p?[p.width,p.height]:[u,c],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var S={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(_),hx(d,S,!1,0),_=d.getLayout(),dh(g,function(b,A){var T=(g[A+1]||d).getValue();b.setLayout(z({dataExtent:[T,T],borderWidth:0,upperHeight:0},_))})}var x=r.getData().tree.root;x.setLayout(IP(s,p,f),!0),r.setLayoutInfo(s),fx(x,new wt(-s.x,-s.y,n,i),g,d,0)}};function hx(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(vx),u=s.get(SP)/2,c=px(s),v=Math.max(l,c),h=l-u,f=v-u;r.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:c},!0),n=Vi(n-2*h,0),i=Vi(i-h-f,0);var p=n*i,d=wP(r,s,p,e,t,a);if(d.length){var g={x:h,y:f,width:n,height:i},y=Rs(n,i),m=1/0,S=[];S.area=0;for(var _=0,x=d.length;_=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function CP(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Vi(u*a/l,l/(u*n)):1/0}function qd(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],c=e?r.area/e:0;(n||c>t[l[o]])&&(c=t[l[o]]);for(var v=0,h=r.length;vhf&&(u=hf),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(x[0]=-x[0],x[1]=-x[1]);var A=_[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(_[1],_[0]);v[0].8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+c[0],i.y=-h[1]*m+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*A+c[0],i.y=c[1]+D,p=_[0]<0?"right":"left",i.originX=-y*A,i.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=b[0],i.y=b[1]+D,p="center",i.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*A+v[0],i.y=v[1]+D,p=_[0]>=0?"right":"left",i.originX=y*A,i.originY=-D;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(et),_h=function(){function r(e){this.group=new et,this._LineCtor=e||Sh}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=rg(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=rg(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!$P(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function rg(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:qt(e)}}function ag(r){return isNaN(r[0])||isNaN(r[1])}function mu(r){return r&&!ag(r[0])&&!ag(r[1])}var Su=[],_u=[],xu=[],Ua=zm,bu=Pb,ng=Math.abs;function ig(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){Su[0]=Ua(a[0],n[0],i[0],c),Su[1]=Ua(a[1],n[1],i[1],c);var v=ng(bu(Su,e)-l);v=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function wu(r,e){var t=[],a=Lb,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[kr(u[0]),kr(u[1])],u[2]&&u.__original.push(kr(u[2])));var h=u.__original;if(u[2]!=null){if(ce(n[0],h[0]),ce(n[1],h[2]),ce(n[2],h[1]),c&&c!=="none"){var f=li(s.node1),p=ig(n,h[0],f*e);a(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(v&&v!=="none"){var f=li(s.node2),p=ig(n,h[1],f*e);a(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}ce(u[0],n[0]),ce(u[1],n[2]),ce(u[2],n[1])}else{if(ce(i[0],h[0]),ce(i[1],h[1]),Qa(o,i[1],i[0]),Zi(o,o),c&&c!=="none"){var f=li(s.node1);sc(i[0],i[0],o,f*e)}if(v&&v!=="none"){var f=li(s.node2);sc(i[1],i[1],o,-f*e)}ce(u[0],i[0]),ce(u[1],i[1])}})}function og(r){return r.type==="view"}var XP=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new ro,i=new _h,o=this.group;this._controller=new so(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(og(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):ft(u,c,t)}wu(t.getGraph(),si(t));var v=t.getData();s.updateData(v);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p);var d=t.get("layout");v.graph.eachNode(function(S){var _=S.dataIndex,x=S.getGraphicEl(),b=S.getModel();if(x){x.off("drag").off("dragend");var A=b.get("draggable");A&&x.on("drag",function(D){switch(d){case"force":f.warmUp(),!i._layouting&&i._startForceLayoutIteration(f,p),f.setFixed(_),v.setItemLayout(_,[x.x,x.y]);break;case"circular":v.setItemLayout(_,[x.x,x.y]),S.setLayout({fixed:!0},!0),mh(t,"symbolSize",S,[D.offsetX,D.offsetY]),i.updateLayout(t);break;case"none":default:v.setItemLayout(_,[x.x,x.y]),yh(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(_)}),x.setDraggable(A,!!b.get("cursor"));var T=b.get(["emphasis","focus"]);T==="adjacency"&&(q(x).focus=S.getAdjacentDataIndices())}}),v.graph.eachEdge(function(S){var _=S.getGraphicEl(),x=S.getModel().get(["emphasis","focus"]);_&&x==="adjacency"&&(q(_).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=v.getLayout("cx"),m=v.getLayout("cy");v.graph.eachNode(function(S){mx(S,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,v){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,v)&&!fl(u,n,t)}),!og(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){lh(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){uh(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),wu(t.getGraph(),si(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=si(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){wu(t.getGraph(),si(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(bt);function Ya(r){return"_EC_"+r}var KP=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[Ya(e)]){var n=new ra(e,t);return n.hostGraph=this,this.nodes.push(n),a[Ya(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Ya(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(St(e)&&(e=this.nodes[e]),St(t)&&(t=this.nodes[t]),e instanceof ra||(e=n[Ya(e)]),t instanceof ra||(t=n[Ya(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new _x(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof ra&&(e=e.id),t instanceof ra&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof ra||(t=this._nodesMap[Ya(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Jt(ra,xx("hostGraph","data"));Jt(_x,xx("hostGraph","edgeData"));function bx(r,e,t,a,n){for(var i=new KP(a),o=0;o "+h)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=_r(r,t);else{var d=ji.get(f),g=d?d.dimensions||[]:[];ct(g,"value")<0&&g.concat(["value"]);var y=Qi(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new he(y,t),p.initData(r)}var m=new he(["value"],t);return m.initData(l,s),n&&n(p,m),ax({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var qP=function(r){E(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.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new oo(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),_a(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){OP(this);var s=bx(i,n,this,!0,l);return w(s.edges,function(u){VP(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var v=mt.prototype.getModel;function h(p,d){var g=v.call(this,p,d);return g.resolveParentPath=f,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=h,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),jt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var v=fS({series:this,dataIndex:t,multipleSeries:a});return v},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(n){return n.value!=null?n:z({value:0},n)}),a=new he(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ct),jP={type:"graphRoam",event:"graphRoam",update:"none"};function JP(r){r.registerChartView(XP),r.registerSeriesModel(qP),r.registerProcessor(PP),r.registerVisual(RP),r.registerVisual(EP),r.registerLayout(BP),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,GP),r.registerLayout(HP),r.registerCoordinateSystem("graphView",{dimensions:lo.dimensions,create:UP}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},pe),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},pe),r.registerAction(jP,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=vh(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var QP=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),t2=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new QP},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),c=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,c)},e}(Mt);function e2(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=H(t[0],e.getWidth()),s=H(t[1],e.getHeight()),l=H(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Oo(r,e){var t=r==null?"":r+"";return e&&(Y(e)?t=e.replace("{value}",t):K(e)&&(t=e(r))),t}var r2=function(r){E(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,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=e2(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,v=t.getModel("axisLine"),h=v.get("roundCap"),f=h?Is:Ee,p=v.get("show"),d=v.getModel("lineStyle"),g=d.get("width"),y=[u,c];Om(y,!l),u=y[0],c=y[1];for(var m=c-u,S=u,_=[],x=0;p&&x=D&&(C===0?0:i[C-1][0])Math.PI/2&&(at+=Math.PI)):rt==="tangential"?at=-T-Math.PI/2:St(rt)&&(at=rt*Math.PI/180),at===0?v.add(new vt({style:Dt(S,{text:V,x:W,y:X,verticalAlign:P<-.8?"top":P>.8?"bottom":"middle",align:R<-.4?"left":R>.4?"right":"center"},{inheritColor:F}),silent:!0})):v.add(new vt({style:Dt(S,{text:V,x:W,y:X,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:W,originY:X,rotation:at}))}if(m.get("show")&&k!==_){var O=m.get("distance");O=O?O+c:c;for(var st=0;st<=x;st++){R=Math.cos(T),P=Math.sin(T);var Vt=new ee({shape:{x1:R*(p-O)+h,y1:P*(p-O)+f,x2:R*(p-A-O)+h,y2:P*(p-A-O)+f},silent:!0,style:I});I.stroke==="auto"&&Vt.setStyle({stroke:i((k+st/x)/_)}),v.add(Vt),T+=C}T-=C}else T+=D}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,c){var v=this.group,h=this._data,f=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),S=m.mapDimension("value"),_=+t.get("min"),x=+t.get("max"),b=[_,x],A=[s,l];function T(C,M){var I=m.getItemModel(C),L=I.getModel("pointer"),R=H(L.get("width"),o.r),P=H(L.get("length"),o.r),k=t.get(["pointer","icon"]),O=L.get("offsetCenter"),N=H(O[0],o.r),V=H(O[1],o.r),F=L.get("keepAspect"),W;return k?W=Wt(k,N-R/2,V-P,R,P,null,F):W=new t2({shape:{angle:-Math.PI/2,width:R,r:P,x:N,y:V}}),W.rotation=-(M+Math.PI/2),W.x=o.cx,W.y=o.cy,W}function D(C,M){var I=g.get("roundCap"),L=I?Is:Ee,R=g.get("overlap"),P=R?g.get("width"):c/m.count(),k=R?o.r-P:o.r-(C+1)*P,O=R?o.r:o.r-C*P,N=new L({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:k,r:O}});return R&&(N.z2=yt(m.get(S,C),[_,x],[100,0],!0)),N}(y||d)&&(m.diff(h).add(function(C){var M=m.get(S,C);if(d){var I=T(C,s);Pt(I,{rotation:-((isNaN(+M)?A[0]:yt(M,b,A,!0))+Math.PI/2)},t),v.add(I),m.setItemGraphicEl(C,I)}if(y){var L=D(C,s),R=g.get("clip");Pt(L,{shape:{endAngle:yt(M,b,A,R)}},t),v.add(L),cc(t.seriesIndex,m.dataType,C,L),p[C]=L}}).update(function(C,M){var I=m.get(S,C);if(d){var L=h.getItemGraphicEl(M),R=L?L.rotation:s,P=T(C,R);P.rotation=R,ft(P,{rotation:-((isNaN(+I)?A[0]:yt(I,b,A,!0))+Math.PI/2)},t),v.add(P),m.setItemGraphicEl(C,P)}if(y){var k=f[M],O=k?k.shape.endAngle:s,N=D(C,O),V=g.get("clip");ft(N,{shape:{endAngle:yt(I,b,A,V)}},t),v.add(N),cc(t.seriesIndex,m.dataType,C,N),p[C]=N}}).execute(),m.each(function(C){var M=m.getItemModel(C),I=M.getModel("emphasis"),L=I.get("focus"),R=I.get("blurScope"),P=I.get("disabled");if(d){var k=m.getItemGraphicEl(C),O=m.getItemVisual(C,"style"),N=O.fill;if(k instanceof Ne){var V=k.style;k.useStyle(z({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},O))}else k.useStyle(O),k.type!=="pointer"&&k.setColor(N);k.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",i(yt(m.get(S,C),b,[0,1],!0))),k.z2EmphasisLift=0,re(k,M),kt(k,L,R,P)}if(y){var F=p[C];F.useStyle(m.getItemVisual(C,"style")),F.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,re(F,M),kt(F,L,R,P)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),c=Wt(s,a.cx-o/2+H(l[0],a.r),a.cy-o/2+H(l[1],a.r),o,o,null,u);c.z2=n.get("showAbove")?1:0,c.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),v=+t.get("max"),h=new et,f=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){f[y]=new vt({silent:!0}),p[y]=new vt({silent:!0})}).update(function(y,m){f[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),S=l.get(u,y),_=new et,x=i(yt(S,[c,v],[0,1],!0)),b=m.getModel("title");if(b.get("show")){var A=b.get("offsetCenter"),T=o.cx+H(A[0],o.r),D=o.cy+H(A[1],o.r),C=f[y];C.attr({z2:g?0:2,style:Dt(b,{x:T,y:D,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:x})}),_.add(C)}var M=m.getModel("detail");if(M.get("show")){var I=M.get("offsetCenter"),L=o.cx+H(I[0],o.r),R=o.cy+H(I[1],o.r),P=H(M.get("width"),o.r),k=H(M.get("height"),o.r),O=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:x,C=p[y],N=M.get("formatter");C.attr({z2:g?0:2,style:Dt(M,{x:L,y:R,text:Oo(S,N),width:isNaN(P)?null:P,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:O})}),y0(C,{normal:M},S,function(F){return Oo(F,N)}),d&&m0(C,y,l,t,{getFormattedLabel:function(F,W,X,rt,at,st){return Oo(st?st.interpolatedValue:S,N)}}),_.add(C)}h.add(_)}),this.group.add(h),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(bt),a2=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return En(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Ct);function n2(r){r.registerChartView(r2),r.registerSeriesModel(a2)}var i2=["itemStyle","opacity"],o2=function(r){E(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new xe,s=new vt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),c=s.get(i2);c=c??1,n||Ue(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Pt(i,{style:{opacity:c}},o,a)):ft(i,{style:{opacity:c},shape:{points:l.points}},o,a),re(i,s),this._updateLabel(t,a),kt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),c=u.label,v=t.getItemVisual(a,"style"),h=v.fill;ae(o,qt(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:v.opacity,defaultText:t.getName(a)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),n.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var f=c.linePoints;i.setShape({points:f}),n.textGuideLineConfig={anchor:f?new Ft(f[0][0],f[0][1]):null},ft(o,{style:{x:c.x,y:c.y}},s,a),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),ah(n,nh(l),{stroke:h})},e}(ke),s2=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new o2(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Di(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(bt),l2=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new oo(U(this.getData,this),U(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return En(this,{coordDimensions:["value"],encodeDefaulter:tt(Vv,this)})},e.prototype._defaultLabelLine=function(t){_a(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ct);function u2(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function c2(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();oD2)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Tu(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function Tu(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var I2=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&it(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var n=t.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){w(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],n=_t(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);w(n,function(i){t.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(lt),L2=function(r){E(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Ze);function ka(r,e,t,a,n,i){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=Za(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Za(s,[0,o]),n=i=Za(s,[n,i]),a=0}e[0]=Za(e[0],t),e[1]=Za(e[1],t);var l=Du(e,a);e[a]+=r;var u=n||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[a]=Za(e[a],c);var v;return v=Du(e,a),n!=null&&(v.sign!==l.sign||v.spani&&(e[1-a]=e[a]+v.sign*i),e}function Du(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 Za(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Cu=w,Ax=Math.min,Tx=Math.max,ug=Math.floor,P2=Math.ceil,cg=Ot,R2=Math.PI,E2=function(){function r(e,t,a){this.type="parallel",this._axesMap=$(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=e.dimensions,i=e.parallelAxisIndex;Cu(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new L2(o,hl(u),[0,0],u.get("type"),l)),v=c.type==="category";c.onBand=v&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var n=a.getData();Cu(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),vn(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Zt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,c=Vo(e.get("axisExpandWidth"),l),v=Vo(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>v&&v>1&&c>0&&s>0,f=e.get("axisExpandWindow"),p;if(f)p=Vo(f[1]-f[0],l),f[1]=f[0]+p;else{p=Vo(c*(v-1),l);var d=e.get("axisExpandCenter")||ug(u/2);f=[c*d-p/2],f[1]=f[0]+p}var g=(s-p)/(u-v);g<3&&(g=0);var y=[ug(cg(f[0]/c,1))+1,P2(cg(f[1]/c,1))-1],m=g/c*f[0];return{layout:i,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[n[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Cu(a,function(o,s){var l=(n.axisExpandable?N2:k2)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:R2/2,vertical:0},v=[u[i].x+e.x,u[i].y+e.y],h=c[i],f=_n();Yi(f,f,h),Sa(f,f,v),this._axesLayout[o]={position:v,rotation:h,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];w(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),c=a;ci*(1-v[0])?(u="jump",l=s-i*(1-v[2])):(l=s-i*v[1])>=0&&(l=s-i*(1-v[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?ka(l,n,o,"all"):u="none";else{var f=n[1]-n[0],p=o[1]*s/f;n=[Tx(0,p-f/2)],n[1]=Ax(o[1],n[0]+f),n[0]=n[1]-f}return{axisExpandWindow:n,behavior:u}},r}();function Vo(r,e){return Ax(Tx(r,e[0]),e[1])}function k2(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function N2(r,e){var t=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r=0;n--)Le(a[n])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=a.length;iG2}function Px(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function Rx(r,e,t,a){var n=new et;return n.add(new dt({name:"main",style:Th(t),silent:!0,draggable:!0,cursor:"move",drift:tt(fg,r,e,n,["n","s","w","e"]),ondragend:tt(Da,e,{isEnd:!0})})),w(a,function(i){n.add(new dt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:tt(fg,r,e,n,i),ondragend:tt(Da,e,{isEnd:!0})}))}),n}function Ex(r,e,t,a){var n=a.brushStyle.lineWidth||0,i=pn(n,F2),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,c=t[0][1],v=t[1][1],h=c-i+n/2,f=v-i+n/2,p=c-o,d=v-s,g=p+n,y=d+n;sr(r,e,"main",o,s,p,d),a.transformable&&(sr(r,e,"w",l,u,i,y),sr(r,e,"e",h,u,i,y),sr(r,e,"n",l,u,g,i),sr(r,e,"s",l,f,g,i),sr(r,e,"nw",l,u,i,i),sr(r,e,"ne",h,u,i,i),sr(r,e,"sw",l,f,i,i),sr(r,e,"se",h,f,i,i))}function qc(r,e){var t=e.__brushOption,a=t.transformable,n=e.childAt(0);n.useStyle(Th(t)),n.attr({silent:!a,cursor:a?"move":"default"}),w([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?jc(r,i[0]):$2(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?W2[s]+"-resize":null})})}function sr(r,e,t,a,n,i,o){var s=e.childOfName(t);s&&s.setShape(K2(Dh(r,e,[[a,n],[a+i,n+o]])))}function Th(r){return Q({strokeNoScale:!0},r.brushStyle)}function kx(r,e,t,a){var n=[zi(r,t),zi(e,a)],i=[pn(r,t),pn(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function Z2(r){return pa(r.group)}function jc(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=qs(t[e],Z2(r));return a[n]}function $2(r,e){var t=[jc(r,e[0]),jc(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function fg(r,e,t,a,n,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=Nx(e,n,i);w(a,function(u){var c=H2[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(kx(s[0][0],s[1][0],s[0][1],s[1][1])),bh(e,t),Da(e,{isEnd:!1})}function X2(r,e,t,a){var n=e.__brushOption.range,i=Nx(r,t,a);w(n,function(o){o[0]+=i[0],o[1]+=i[1]}),bh(r,e),Da(r,{isEnd:!1})}function Nx(r,e,t){var a=r.group,n=a.transformCoordToLocal(e,t),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function Dh(r,e,t){var a=Lx(r,e);return a&&a!==Ta?a.clipPath(t,r._transform):j(t)}function K2(r){var e=zi(r[0][0],r[1][0]),t=zi(r[0][1],r[1][1]),a=pn(r[0][0],r[1][0]),n=pn(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:n-t}}function q2(r,e,t){if(!(!r._brushType||J2(r,e.offsetX,e.offsetY))){var a=r._zr,n=r._covers,i=Ah(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var gl={lineX:gg(0),lineY:gg(1),rect:{createCover:function(r,e){function t(a){return a}return Rx({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=Px(r);return kx(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){Ex(r,e,t,a)},updateCommon:qc,contain:Qc},polygon:{createCover:function(r,e){var t=new et;return t.add(new xe({name:"main",style:Th(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new ke({name:"main",draggable:!0,drift:tt(X2,r,e),ondragend:tt(Da,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:Dh(r,e,t)})},updateCommon:qc,contain:Qc}};function gg(r){return{createCover:function(e,t){return Rx({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=Px(e),a=zi(t[0][r],t[1][r]),n=pn(t[0][r],t[1][r]);return[a,n]},updateCoverShape:function(e,t,a,n){var i,o=Lx(e,t);if(o!==Ta&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),Ex(e,t,l,n)},updateCommon:qc,contain:Qc}}function Vx(r){return r=Ch(r),function(e){return p0(e,r)}}function Bx(r,e){return r=Ch(r),function(t){var a=e??t,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function zx(r,e,t){var a=Ch(r);return function(n,i){return a.contain(i[0],i[1])&&!fl(n,e,t)}}function Ch(r){return wt.create(r)}var Q2=["axisLine","axisTickLabel","axisName"],tR=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new xh(a.getZr())).on("brush",U(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!eR(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new et,this.group.add(this._axisGroup),!!t.get("show")){var s=aR(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,v=t.axis.dim,h=l.getAxisLayout(v),f=z({strokeContainThreshold:c},h),p=new fe(t,f);w(Q2,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,s,c,n),Ki(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),v=wt.create({x:l[0],y:-o/2,width:u,height:o});v.x-=c,v.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Vx(v),isTargetByCursor:zx(v,s,i),getLinearBrushOtherExtent:Bx(v,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(rR(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=G(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Rt);function eR(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function rR(r){var e=r.axis;return G(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function aR(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var nR={type:"axisAreaSelect",event:"axisAreaSelected"};function iR(r){r.registerAction(nR,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var oR={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Gx(r){r.registerComponentView(C2),r.registerComponentModel(I2),r.registerCoordinateSystem("parallel",V2),r.registerPreprocessor(w2),r.registerComponentModel(Xc),r.registerComponentView(tR),fn(r,"parallel",Xc,oR),iR(r)}function sR(r){nt(Gx),r.registerChartView(d2),r.registerSeriesModel(m2),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,b2)}var lR=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),uR=function(r){E(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new lR},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){fr(this)},e.prototype.downplay=function(){pr(this)},e}(Mt),cR=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,v=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new uR,g=q(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),S=m.get("curveness"),_=p.node1.getLayout(),x=p.node1.getModel(),b=x.get("localX"),A=x.get("localY"),T=p.node2.getLayout(),D=p.node2.getModel(),C=D.get("localX"),M=D.get("localY"),I=p.getLayout(),L,R,P,k,O,N,V,F;d.shape.extent=Math.max(1,I.dy),d.shape.orient=f,f==="vertical"?(L=(b!=null?b*u:_.x)+I.sy,R=(A!=null?A*c:_.y)+_.dy,P=(C!=null?C*u:T.x)+I.ty,k=M!=null?M*c:T.y,O=L,N=R*(1-S)+k*S,V=P,F=R*S+k*(1-S)):(L=(b!=null?b*u:_.x)+_.dx,R=(A!=null?A*c:_.y)+I.sy,P=C!=null?C*u:T.x,k=(M!=null?M*c:T.y)+I.ty,O=L*(1-S)+P*S,N=R,V=L*S+P*(1-S),F=k),d.setShape({x1:L,y1:R,x2:P,y2:k,cpx1:O,cpy1:N,cpx2:V,cpy2:F}),d.useStyle(m.getItemStyle()),yg(d.style,f,p);var W=""+y.get("value"),X=qt(y,"edgeLabel");ae(d,X,{labelFetcher:{getFormattedLabel:function(st,Vt,me,ht,ot,It){return t.getFormattedLabel(st,Vt,"edge",ht,Sn(ot,X.normal&&X.normal.get("formatter"),W),It)}},labelDataIndex:p.dataIndex,defaultText:W}),d.setTextConfig({position:"inside"});var rt=y.getModel("emphasis");re(d,y,"lineStyle",function(st){var Vt=st.getItemStyle();return yg(Vt,f,p),Vt}),s.add(d),h.setItemGraphicEl(p.dataIndex,d);var at=rt.get("focus");kt(d,at==="adjacency"?p.getAdjacentDataIndices():at==="trajectory"?p.getTrajectoryDataIndices():at,rt.get("blurScope"),rt.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),S=g.getModel("emphasis"),_=g.get(["itemStyle","borderRadius"])||0,x=new dt({shape:{x:y!=null?y*u:d.x,y:m!=null?m*c:d.y,width:d.dx,height:d.dy,r:_},style:g.getModel("itemStyle").getItemStyle(),z2:10});ae(x,qt(g),{labelFetcher:{getFormattedLabel:function(A,T){return t.getFormattedLabel(A,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),re(x,g),s.add(x),v.setItemGraphicEl(p.dataIndex,x),q(x).dataType="node";var b=S.get("focus");kt(x,b==="adjacency"?p.getAdjacentDataIndices():b==="trajectory"?p.getTrajectoryDataIndices():b,S.get("blurScope"),S.get("disabled"))}),v.eachItemGraphicEl(function(p,d){var g=v.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:v.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(vR(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(bt);function yg(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");Y(a)&&Y(n)&&(r.fill=new Us(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function vR(r,e,t){var a=new dt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Pt(a,{shape:{width:r.width+20}},e,t),a}var hR=function(r){E(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,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new mt(o[l],this,a));var u=bx(i,n,this,!0,c);return u.data;function c(v,h){v.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(f.parentModel=m)}return f}),h.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,S=d.levelModels[m];S&&(f.parentModel=S)}return f})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(f){return isNaN(f)||f==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return jt("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),v=c.getLayout().value,h=this.getDataParams(t,n).data.name;return jt("nameValue",{name:h!=null?h+"":null,value:v,noValue:i(v)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ct);function fR(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=pR(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,c=l.edges;gR(u);var v=_t(u,function(d){return d.getLayout().value===0}),h=v.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");dR(u,c,a,n,o,s,h,f,p)})}function pR(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function dR(r,e,t,a,n,i,o,s,l){yR(r,e,t,n,i,s,l),xR(r,e,i,n,a,o,s),LR(r,s)}function gR(r){w(r,function(e){var t=Vr(e.outEdges,Es),a=Vr(e.inEdges,Es),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function yR(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],c=[],v=0,h=0;h=0;y&&g.depth>f&&(f=g.depth),d.setLayout({depth:y?g.depth:v},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mv-1?f:v-1;o&&o!=="left"&&mR(r,o,i,A);var T=i==="vertical"?(n-t)/A:(a-t)/A;_R(r,T,i)}function Fx(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function mR(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,AR(s,l,o),Mu(s,n,t,a,o),IR(s,l,o),Mu(s,n,t,a,o)}function bR(r,e){var t=[],a=e==="vertical"?"y":"x",n=uc(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),w(n.keys,function(i){t.push(n.buckets.get(i))}),t}function wR(r,e,t,a,n,i){var o=1/0;w(r,function(s){var l=s.length,u=0;w(s,function(v){u+=v.getLayout().value});var c=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;c0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[h]+e;var p=n==="vertical"?a:t;if(u=c-e-p,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var f=v-2;f>=0;--f)l=o[f],u=l.getLayout()[i]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function AR(r,e,t){w(r.slice().reverse(),function(a){w(a,function(n){if(n.outEdges.length){var i=Vr(n.outEdges,TR,t)/Vr(n.outEdges,Es);if(isNaN(i)){var o=n.outEdges.length;i=o?Vr(n.outEdges,DR,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Hr(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Hr(n,t))*e;n.setLayout({y:l},!0)}}})})}function TR(r,e){return Hr(r.node2,e)*r.getValue()}function DR(r,e){return Hr(r.node2,e)}function CR(r,e){return Hr(r.node1,e)*r.getValue()}function MR(r,e){return Hr(r.node1,e)}function Hr(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Es(r){return r.getValue()}function Vr(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),w(a,function(s){var l=new Kt({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&w(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function RR(r){r.registerChartView(cR),r.registerSeriesModel(hR),r.registerLayout(fR),r.registerVisual(PR),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Hx=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 a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,v=this._baseAxisDim=u[c],h=u[1-c],f=[n,i],p=f[c].get("type"),d=f[1-c].get("type"),g=e.data;if(g&&l){var y=[];w(g,function(_,x){var b;B(_)?(b=_.slice(),_.unshift(x)):B(_.value)?(b=z({},_),b.value=b.value.slice(),_.value.unshift(x)):b=_,y.push(b)}),e.data=y}var m=this.defaultValueDimensions,S=[{name:v,type:Ts(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ts(d),dimsDef:m.slice()}];return En(this,{coordDimensions:S,dimensionsCount:m.length+1,encodeDefaulter:tt(G0,S,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),Wx=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Ct);Jt(Wx,Hx,!0);var ER=function(r){E(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,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),v=mg(c,i,u,l,!0);i.setItemGraphicEl(u,v),o.add(v)}}).update(function(u,c){var v=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(v);return}var h=i.getItemLayout(u);v?(Ue(v),Ux(h,v,i,u)):v=mg(h,i,u,l),o.add(v),i.setItemGraphicEl(u,v)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(bt),kR=function(){function r(){}return r}(),NR=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new kR},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();id){var _=[y,S];a.push(_)}}}return{boxData:t,outliers:a}}var HR={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==se){var a="";gt(a)}var n=FR(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function WR(r){r.registerSeriesModel(Wx),r.registerChartView(ER),r.registerLayout(VR),r.registerTransform(HR)}var UR=["itemStyle","borderColor"],YR=["itemStyle","borderColor0"],ZR=["itemStyle","borderColorDoji"],$R=["itemStyle","color"],XR=["itemStyle","color0"];function Mh(r,e){return e.get(r>0?$R:XR)}function Ih(r,e){return e.get(r===0?ZR:r>0?UR:YR)}var KR={seriesType:"candlestick",plan:In(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=Mh(s,o),l.stroke=Ih(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");z(u,l)}}}}}},qR=["color","borderColor"],jR=function(r){E(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,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){Ur(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(c){if(a.hasValue(c)){var v=a.getItemLayout(c);if(s&&Sg(u,v))return;var h=Iu(v,c,!0);Pt(h,{shape:{points:v.ends}},t,c),Lu(h,a,c,o),i.add(h),a.setItemGraphicEl(c,h)}}).update(function(c,v){var h=n.getItemGraphicEl(v);if(!a.hasValue(c)){i.remove(h);return}var f=a.getItemLayout(c);if(s&&Sg(u,f)){i.remove(h);return}h?(ft(h,{shape:{points:f.ends}},t,c),Ue(h)):h=Iu(f),Lu(h,a,c,o),i.add(h),a.setItemGraphicEl(c,h)}).remove(function(c){var v=n.getItemGraphicEl(c);v&&i.remove(v)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),_g(t,this.group);var a=t.get("clip",!0)?ao(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=Iu(s);Lu(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){_g(a,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}(bt),JR=function(){function r(){}return r}(),QR=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new JR},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Mt);function Iu(r,e,t){var a=r.ends;return new QR({shape:{points:t?tE(a,r):a},z2:100})}function Sg(r,e){for(var t=!0,a=0;ax?M[i]:C[i],ends:R,brushRect:V(b,A,S)})}function O(W,X){var rt=[];return rt[n]=X,rt[i]=W,isNaN(X)||isNaN(W)?[NaN,NaN]:e.dataToPoint(rt)}function N(W,X,rt){var at=X.slice(),st=X.slice();at[n]=jo(at[n]+a/2,1,!1),st[n]=jo(st[n]-a/2,1,!0),rt?W.push(at,st):W.push(st,at)}function V(W,X,rt){var at=O(W,rt),st=O(X,rt);return at[n]-=a/2,st[n]-=a/2,{x:at[0],y:at[1],width:a,height:st[1]-at[1]}}function F(W){return W[n]=jo(W[n],1),W}}function p(d,g){for(var y=Je(d.count*4),m=0,S,_=[],x=[],b,A=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(b=d.next())!=null;){var D=A.get(s,b),C=A.get(u,b),M=A.get(c,b),I=A.get(v,b),L=A.get(h,b);if(isNaN(D)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=xg(A,b,C,M,c,T),_[n]=D,_[i]=I,S=e.dataToPoint(_,null,x),y[m++]=S?S[0]:NaN,y[m++]=S?S[1]:NaN,_[i]=L,S=e.dataToPoint(_,null,x),y[m++]=S?S[1]:NaN}g.setLayout("largePoints",y)}}};function xg(r,e,t,a,n,i){var o;return t>a?o=-1:t0?r.get(n,e-1)<=a?1:-1:1,o}function nE(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=H(pt(r.get("barMaxWidth"),n),n),o=H(pt(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?H(s,n):Math.max(Math.min(n/2,i),o)}function iE(r){r.registerChartView(jR),r.registerSeriesModel(Yx),r.registerPreprocessor(rE),r.registerVisual(KR),r.registerLayout(aE)}function bg(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var oE=function(r){E(e,r);function e(t,a){var n=r.call(this)||this,i=new eo(t,a),o=new et;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;K(v)?h=v(n):h=v,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return sa(t.__p1,t.__cp1)+sa(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=zm,c=Eb;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var v=t.__t<1?c(a[0],i[0],n[0],o):c(n[0],i[0],a[0],1-o),h=t.__t<1?c(a[1],i[1],n[1],o):c(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(h,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var c=(a-i[l])/(i[l+1]-i[l]),v=n[l],h=n[l+1];t.x=v[0]*(1-c)+c*h[0],t.y=v[1]*(1-c)+c*h[1];var f=t.__t<1?h[0]-v[0]:v[0]-h[0],p=t.__t<1?h[1]-v[1]:v[1]-h[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(Zx),vE=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),hE=function(r){E(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new vE},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var f=(u+v)/2-(c-h)*i,p=(c+h)/2-(v-u)*i;t.quadraticCurveTo(f,p,v,h)}else t.lineTo(v,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var v=i[u++],h=i[u++],f=1;f0){var g=(v+p)/2-(h-d)*o,y=(h+d)/2-(p-v)*o;if(kb(v,h,g,y,p,d,s,t,a))return l}else if(cf(v,h,p,d,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Xx={seriesType:"lines",plan:In(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(t){for(var u=0,c=n.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var v=t.get("clip",!0)&&ao(t.coordinateSystem,!1,t);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=Xx.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new fE:new _h(o?i?cE:$x:i?Zx:Sh),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(bt),dE=typeof Uint32Array>"u"?Array:Uint32Array,gE=typeof Float64Array>"u"?Array:Float64Array;function wg(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=G(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),mv([n,t[0],t[1]])}))}var yE=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],wg(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(wg(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=_i(this._flatCoords,a.flatCoords),this._flatCoordsOffset=_i(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Ct);function Bo(r){return r instanceof Array||(r=[r,r]),r}var mE={seriesType:"lines",reset:function(r){var e=Bo(r.get("symbol")),t=Bo(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=Bo(s.getShallow("symbol",!0)),u=Bo(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function SE(r){r.registerChartView(pE),r.registerSeriesModel(yE),r.registerLayout(Xx),r.registerVisual(mE)}var _E=256,xE=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=vs.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,v=this.canvas,h=v.getContext("2d"),f=e.length;v.width=t,v.height=a;for(var p=0;p0){var I=o(S)?l:u;S>0&&(S=S*C+T),x[b++]=I[M],x[b++]=I[M+1],x[b++]=I[M+2],x[b++]=I[M+3]*S*256}else b+=4}return h.putImageData(_,0,0),v},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=vs.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();function bE(r,e,t){var a=r[1]-r[0];e=G(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function Ag(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var AE=function(r){E(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,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Ag(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(Ag(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Ur(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=Ra(s,"cartesian2d"),u,c,v,h;if(l){var f=s.getAxis("x"),p=s.getAxis("y");u=f.getBandWidth()+.5,c=p.getBandWidth()+.5,v=f.scale.getExtent(),h=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),_=t.get(["itemStyle","borderRadius"]),x=qt(t),b=t.getModel("emphasis"),A=b.get("focus"),T=b.get("blurScope"),D=b.get("disabled"),C=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],M=n;Mv[1]||Ph[1])continue;var k=s.dataToPoint([R,P]);I=new dt({shape:{x:k[0]-u/2,y:k[1]-c/2,width:u,height:c},style:L})}else{if(isNaN(g.get(C[1],M)))continue;I=new dt({z2:1,shape:s.dataToRect([g.get(C[0],M)]).contentShape,style:L})}if(g.hasItemOption){var O=g.getItemModel(M),N=O.getModel("emphasis");y=N.getModel("itemStyle").getItemStyle(),m=O.getModel(["blur","itemStyle"]).getItemStyle(),S=O.getModel(["select","itemStyle"]).getItemStyle(),_=O.get(["itemStyle","borderRadius"]),A=N.get("focus"),T=N.get("blurScope"),D=N.get("disabled"),x=qt(O)}I.shape.r=_;var V=t.getRawValue(M),F="-";V&&V[2]!=null&&(F=V[2]+""),ae(I,x,{labelFetcher:t,labelDataIndex:M,defaultOpacity:L.opacity,defaultText:F}),I.ensureState("emphasis").style=y,I.ensureState("blur").style=m,I.ensureState("select").style=S,kt(I,A,T,D),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),d.add(I),g.setItemGraphicEl(M,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new xE;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var c=t.getViewRect().clone(),v=t.getRoamTransform();c.applyTransform(v);var h=Math.max(c.x,0),f=Math.max(c.y,0),p=Math.min(c.width+c.x,i.getWidth()),d=Math.min(c.height+c.y,i.getHeight()),g=p-h,y=d-f,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(m,function(A,T,D){var C=t.dataToPoint([A,T]);return C[0]-=h,C[1]-=f,C.push(D),C}),_=n.getExtent(),x=n.type==="visualMap.continuous"?wE(_,n.option.range):bE(_,n.getPieceList(),n.option.selected);u.update(S,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var b=new Ne({style:{width:g,height:y,x:h,y:f,image:u.canvas},silent:!0});this.group.add(b)},e.type="heatmap",e}(bt),TE=function(r){E(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,a){return _r(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ji.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Ct);function DE(r){r.registerChartView(AE),r.registerSeriesModel(TE)}var CE=["itemStyle","borderWidth"],Tg=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Eu=new Ca,ME=function(r){E(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,a,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),v=l.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:c,valueDim:Tg[+c],categoryDim:Tg[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=Cg(o,p),g=Dg(o,p,d,h),y=Mg(o,h,g);o.setItemGraphicEl(p,y),i.add(y),Lg(y,h,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=Cg(o,p),m=Dg(o,p,y,h),S=t1(o,m);g&&S!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?NE(g,h,m):g=Mg(o,h,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),Lg(g,h,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&Ig(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var f=t.get("clip",!0)?ao(t.coordinateSystem,!1,t):null;return f?i.setClipPath(f):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){Ig(i,q(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(bt);function Dg(r,e,t,a){var n=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,v=t.isAnimationEnabled(),h={dataIndex:e,layout:n,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:v?t:null,hoverScale:v&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};IE(t,i,n,a,h),LE(r,e,n,i,o,h.boundingLength,h.pxSign,c,a,h),PE(t,h.symbolScale,u,a,h);var f=h.symbolSize,p=La(t.get("symbolOffset"),f);return RE(t,f,n,i,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,a,h),h}function IE(r,e,t,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),c;if(B(o)){var v=[ku(s,o[0])-l,ku(s,o[1])-l];v[1]=0?1:-1:c>0?1:-1}function ku(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function LE(r,e,t,a,n,i,o,s,l,u){var c=l.valueDim,v=l.categoryDim,h=Math.abs(t[v.wh]),f=r.getItemVisual(e,"symbolSize"),p;B(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[v.index]=H(p[v.index],h),p[c.index]=H(p[c.index],a?h:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[c.index]*=(l.isHorizontal?-1:1)*o}function PE(r,e,t,a,n){var i=r.get(CE)||0;i&&(Eu.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Eu.updateTransform(),i/=Eu.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function RE(r,e,t,a,n,i,o,s,l,u,c,v){var h=c.categoryDim,f=c.valueDim,p=v.pxSign,d=Math.max(e[f.index]+s,0),g=d;if(a){var y=Math.abs(l),m=Qt(r.get("symbolMargin"),"15%")+"",S=!1;m.lastIndexOf("!")===m.length-1&&(S=!0,m=m.slice(0,m.length-1));var _=H(m,e[f.index]),x=Math.max(d+_*2,0),b=S?0:_*2,A=Um(a),T=A?a:Pg((y+b)/x),D=y-T*d;_=D/2/(S?T:Math.max(T-1,1)),x=d+_*2,b=S?0:_*2,!A&&a!=="fixed"&&(T=u?Pg((Math.abs(u)+b)/x):0),g=T*x-b,v.repeatTimes=T,v.symbolMargin=_}var C=p*(g/2),M=v.pathPosition=[];M[h.index]=t[h.wh]/2,M[f.index]=o==="start"?C:o==="end"?l-C:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var I=v.bundlePosition=[];I[h.index]=t[h.xy],I[f.index]=t[f.xy];var L=v.barRectShape=z({},t);L[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(M[f.index]+C)),L[h.wh]=t[h.wh];var R=v.clipShape={};R[h.xy]=-t[h.xy],R[h.wh]=c.ecSize[h.wh],R[f.xy]=0,R[f.wh]=t[f.wh]}function Kx(r){var e=r.symbolPatternSize,t=Wt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function qx(r,e,t,a){var n=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,v=i[e.valueDim.index]+o+t.symbolMargin*2;for(Lh(r,function(d){d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,c0:y<0)&&(m=u-1-d),g[l.index]=v*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function jx(r,e,t,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?nn(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(i=r.__pictorialMainPath=Kx(t),n.add(i),nn(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,a))}function Jx(r,e,t){var a=z({},e.barRectShape),n=r.__pictorialBarRect;n?nn(n,null,{shape:a},e,t):(n=r.__pictorialBarRect=new dt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function Qx(r,e,t,a){if(t.symbolClip){var n=r.__pictorialClipPath,i=z({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)ft(n,{shape:i},s,l);else{i[o.wh]=0,n=new dt({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],Ia[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Cg(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=EE,t.isAnimationEnabled=kE,t}function EE(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function kE(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Mg(r,e,t,a){var n=new et,i=new et;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?qx(n,e,t):jx(n,e,t),Jx(n,t,a),Qx(n,e,t,a),n.__pictorialShapeStr=t1(r,t),n.__pictorialSymbolMeta=t,n}function NE(r,e,t){var a=t.animationModel,n=t.dataIndex,i=r.__pictorialBundle;ft(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,n),t.symbolRepeat?qx(r,e,t,!0):jx(r,e,t,!0),Jx(r,t,!0),Qx(r,e,t,!0)}function Ig(r,e,t,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];Lh(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),w(i,function(o){zr(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function t1(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Lh(r,e,t){w(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function nn(r,e,t,a,n,i){e&&r.attr(e),a.symbolClip&&!n?t&&r.attr(t):t&&Ia[n?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,i)}function Lg(r,e,t){var a=t.dataIndex,n=t.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),c=i.get("focus"),v=i.get("blurScope"),h=i.get("scale");Lh(r,function(d){if(d instanceof Ne){var g=d.style;d.useStyle(z({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,h&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,ae(p,qt(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:hn(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),kt(r,c,v,i.get("disabled"))}function Pg(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var OE=function(r){E(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=Yr(Ei.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Ei);function VE(r){r.registerChartView(ME),r.registerSeriesModel(OE),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,tt(e_,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,r_("pictorialBar"))}var BE=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,v=u.boundaryGap;s.x=0,s.y=c.y+v[0];function h(g){return g.name}var f=new dr(this._layersSeries||[],l,h,h),p=[];f.add(U(d,this,"add")).update(U(d,this,"update")).remove(U(d,this,"remove")).execute();function d(g,y,m){var S=o._layers;if(g==="remove"){s.remove(S[y]);return}for(var _=[],x=[],b,A=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=v)}return{y0:n,max:i}}function WE(r){r.registerChartView(BE),r.registerSeriesModel(GE),r.registerLayout(FE),r.registerProcessor(io("themeRiver"))}var UE=2,YE=4,Eg=function(r){E(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=UE,o.textConfig={inside:!0},q(o).seriesIndex=a.seriesIndex;var s=new vt({z2:YE,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;q(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),c=a.getLayout(),v=z({},c);v.label=null;var h=a.getVisual("style");h.lineJoin="bevel";var f=a.getVisual("decal");f&&(h.decal=cn(f,o));var p=va(l.getModel("itemStyle"),v,!0);z(v,p),w(de,function(m){var S=s.ensureState(m),_=l.getModel([m,"itemStyle"]);S.style=_.getItemStyle();var x=va(_,v);x&&(S.shape=x)}),t?(s.setShape(v),s.shape.r=c.r0,Pt(s,{shape:{r:c.r}},n,a.dataIndex)):(ft(s,{shape:v},n),Ue(s)),s.useStyle(h),this._updateLabel(n);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?_i(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;kt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),v=this,h=v.getTextContent(),f=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)R&&!bi(k-R)&&k0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new Eg(m,t,a,n),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Ss(u,c)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:tv,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(bt),KE=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};e1(n);var i=this._levelModels=G(t.levels||[],function(l){return new mt(l,this,a)},this),o=fh.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var v=o.getNodeByDataIndex(c),h=i[v.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=pl(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){ox(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Ct);function e1(r){var e=0;w(r.children,function(a){e1(a);var n=a.value;B(n)&&(n=n[0]),e+=n});var t=r.value;B(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),B(r.value)?r.value[0]=t:r.value=t}var Ng=Math.PI/180;function qE(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");B(i)||(i=[0,i]),B(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=H(n[0],o),c=H(n[1],s),v=H(i[0],l/2),h=H(i[1],l/2),f=-a.get("startAngle")*Ng,p=a.get("minAngle")*Ng,d=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&r1(g,m);var S=0;w(g.children,function(k){!isNaN(k.getValue())&&S++});var _=g.getValue(),x=Math.PI/(_||S)*2,b=g.depth>0,A=g.height-(b?-1:1),T=(h-v)/(A||1),D=a.get("clockwise"),C=a.get("stillShowZeroSum"),M=D?1:-1,I=function(k,O){if(k){var N=O;if(k!==d){var V=k.getValue(),F=_===0&&C?x:V*x;F1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&Y(s)&&(s=Nb(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");z(u,l)})})}function QE(r){r.registerChartView(XE),r.registerSeriesModel(KE),r.registerLayout(tt(qE,"sunburst")),r.registerProcessor(tt(io,"sunburst")),r.registerVisual(JE),$E(r)}var Og={color:"fill",borderColor:"stroke"},tk={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},cr=ut(),ek=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return _r(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=cr(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ct);function rk(r,e){return e=e||[0,0],G(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function ak(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:U(rk,r)}}}function nk(r,e){return e=e||[0,0],G([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function ik(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:U(nk,r)}}}function ok(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function sk(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:U(ok,r)}}}function lk(r,e){return e=e||[0,0],G(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function uk(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:U(lk,r)}}}function ck(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}function a1(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||Z(r,"text")))}function n1(r,e,t){var a=r,n,i,o;if(e==="text")o=a;else{o={},Z(a,"text")&&(o.text=a.text),Z(a,"rich")&&(o.rich=a.rich),Z(a,"textFill")&&(o.fill=a.textFill),Z(a,"textStroke")&&(o.stroke=a.textStroke),Z(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Z(a,"fontSize")&&(o.fontSize=a.fontSize),Z(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Z(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=Z(a,"textPosition");t?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),Z(a,"textPosition")&&(n.position=a.textPosition),Z(a,"textOffset")&&(n.offset=a.textOffset),Z(a,"textRotation")&&(n.rotation=a.textRotation),Z(a,"textDistance")&&(n.distance=a.textDistance)}return Vg(o,r),w(o.rich,function(l){Vg(l,l)}),{textConfig:n,textContent:i}}function Vg(r,e){e&&(e.font=e.textFont||e.font,Z(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Z(e,"textAlign")&&(r.align=e.textAlign),Z(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Z(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Z(e,"textWidth")&&(r.width=e.textWidth),Z(e,"textHeight")&&(r.height=e.textHeight),Z(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Z(e,"textPadding")&&(r.padding=e.textPadding),Z(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Z(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Z(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Z(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Z(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Z(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Z(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function Bg(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||"#000";zg(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||"#fff",!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||"#000"),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,w(e.rich,function(s){zg(s,s)}),a}function zg(r,e){e&&(Z(e,"fill")&&(r.textFill=e.fill),Z(e,"stroke")&&(r.textStroke=e.fill),Z(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Z(e,"font")&&(r.font=e.font),Z(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Z(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Z(e,"fontSize")&&(r.fontSize=e.fontSize),Z(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Z(e,"align")&&(r.textAlign=e.align),Z(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Z(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Z(e,"width")&&(r.textWidth=e.width),Z(e,"height")&&(r.textHeight=e.height),Z(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Z(e,"padding")&&(r.textPadding=e.padding),Z(e,"borderColor")&&(r.textBorderColor=e.borderColor),Z(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Z(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Z(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Z(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Z(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Z(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Z(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Z(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Z(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Z(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var i1={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Gg=Ut(i1);on(xi,function(r,e){return r[e]=1,r},{});xi.join(", ");var ks=["","style","shape","extra"],dn=ut();function Ph(r,e,t,a,n){var i=r+"Animation",o=wn(r,a,n)||{},s=dn(e).userDuring;return o.duration>0&&(o.during=s?U(dk,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),z(o,t[i]),o}function as(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=dn(r),u=e.style;l.userDuring=e.during;var c={},v={};if(yk(r,e,v),Hg("shape",e,v),Hg("extra",e,v),!i&&s&&(gk(r,e,c),Fg("shape",r,e,c),Fg("extra",r,e,c),mk(r,e,u,c)),v.style=u,vk(r,v,o),fk(r,e),s)if(i){var h={};w(ks,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(h[p]=h[p]||{}),z(p?h[p]:h,d.enterFrom))});var f=Ph("enter",r,e,t,n);f.duration>0&&r.animateFrom(h,f)}else hk(r,e,n||0,t,c);o1(r,e),u?r.dirty():r.markRedraw()}function o1(r,e){for(var t=dn(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function fk(r,e){Z(e,"silent")&&(r.silent=e.silent),Z(e,"ignore")&&(r.ignore=e.ignore),r instanceof ma&&Z(e,"invisible")&&(r.invisible=e.invisible),r instanceof Mt&&Z(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var $e={},pk={setTransform:function(r,e){return $e.el[r]=e,this},getTransform:function(r){return $e.el[r]},setShape:function(r,e){var t=$e.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=$e.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=$e.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=$e.el.style;if(e)return e[r]},setExtra:function(r,e){var t=$e.el.extra||($e.el.extra={});return t[r]=e,this},getExtra:function(r){var e=$e.el.extra;if(e)return e[r]}};function dk(){var r=this,e=r.el;if(e){var t=dn(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}$e.el=e,a(pk)}}function Fg(r,e,t,a){var n=t[r];if(n){var i=e[r],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),ya(l))z(o,i);else for(var u=xt(l),c=0;c=0){!o&&(o=a[r]={});for(var f=Ut(i),c=0;c=0)){var h=r.getAnimationStyleProps(),f=h?h.style:null;if(f){!i&&(i=a.style={});for(var p=Ut(t),u=0;u=0?e.getStore().get(O,P):void 0}var N=e.get(k.name,P),V=k&&k.ordinalMeta;return V?V.categories[N]:N}function b(R,P){P==null&&(P=u);var k=e.getItemVisual(P,"style"),O=k&&k.fill,N=k&&k.opacity,V=m(P,Rr).getItemStyle();O!=null&&(V.fill=O),N!=null&&(V.opacity=N);var F={inheritColor:Y(O)?O:"#000"},W=S(P,Rr),X=Dt(W,null,F,!1,!0);X.text=W.getShallow("show")?pt(r.getFormattedLabel(P,Rr),hn(e,P)):null;var rt=ys(W,F,!1);return D(R,V),V=Bg(V,X,rt),R&&T(V,R),V.legacy=!0,V}function A(R,P){P==null&&(P=u);var k=m(P,vr).getItemStyle(),O=S(P,vr),N=Dt(O,null,null,!0,!0);N.text=O.getShallow("show")?Sn(r.getFormattedLabel(P,vr),r.getFormattedLabel(P,Rr),hn(e,P)):null;var V=ys(O,null,!0);return D(R,k),k=Bg(k,N,V),R&&T(k,R),k.legacy=!0,k}function T(R,P){for(var k in P)Z(P,k)&&(R[k]=P[k])}function D(R,P){R&&(R.textFill&&(P.textFill=R.textFill),R.textPosition&&(P.textPosition=R.textPosition))}function C(R,P){if(P==null&&(P=u),Z(Og,R)){var k=e.getItemVisual(P,"style");return k?k[Og[R]]:null}if(Z(tk,R))return e.getItemVisual(P,R)}function M(R){if(i.type==="cartesian2d"){var P=i.getBaseAxis();return uC(Q({axis:P},R))}}function I(){return t.getCurrentSeriesIndices()}function L(R){return Lv(R,t)}}function Mk(r){var e={};return w(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Bu(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=Oh(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&kt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function Oh(r,e,t,a,n,i){var o=-1,s=e;e&&c1(e,a,n)&&(o=ct(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=kh(a),s&&Ak(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Ae.normal.cfg=Ae.normal.conOpt=Ae.emphasis.cfg=Ae.emphasis.conOpt=Ae.blur.cfg=Ae.blur.conOpt=Ae.select.cfg=Ae.select.conOpt=null,Ae.isLegacy=!1,Lk(u,t,a,n,l,Ae),Ik(u,t,a,n,l),Nh(r,u,t,a,Ae,n,l),Z(a,"info")&&(cr(u).info=a.info);for(var c=0;c=0?i.replaceAt(u,o):i.add(u),u}function c1(r,e,t){var a=cr(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&Nk(i)&&v1(i)!==a.customPathData||n==="image"&&Z(o,"image")&&o.image!==a.customImagePath}function Ik(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&c1(o,i,a)&&(o=null),o||(o=kh(i),r.setClipPath(o)),Nh(null,o,e,i,null,a,n)}}function Lk(r,e,t,a,n,i){if(!r.isGroup){Ug(t,null,i),Ug(t,vr,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=kh(o),r.setTextContent(c)),Nh(null,c,e,o,null,a,n);for(var v=o&&o.style,h=0;h=c;f--){var p=e.childAt(f);Rk(e,p,n)}}}function Rk(r,e,t){e&&yl(e,cr(r).option,t)}function Ek(r){new dr(r.oldChildren,r.newChildren,Yg,Yg,r).add(Zg).update(Zg).remove(kk).execute()}function Yg(r,e){var t=r&&r.name;return t??bk+e}function Zg(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;Oh(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function kk(r){var e=this.context,t=e.oldChildren[r];t&&yl(t,cr(t).option,e.seriesModel)}function v1(r){return r&&(r.pathData||r.d)}function Nk(r){return r&&(Z(r,"pathData")||Z(r,"d"))}function Ok(r){r.registerChartView(Tk),r.registerSeriesModel(ek)}var ia=ut(),$g=j,zu=U,Bh=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,n){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,a);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=c;var v=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new et,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var h=tt(Xg,t,v);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}qg(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),n=e.axis,i=n.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=oh(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,n,i){},r.prototype.createPointerEl=function(e,t,a,n){var i=t.pointer;if(i){var o=ia(e).pointerEl=new Ia[i.type]($g(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,n){if(t.label){var i=ia(e).labelEl=new vt($g(t.label));e.add(i),Kg(i,n)}},r.prototype.updatePointerEl=function(e,t,a){var n=ia(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),a(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,n){var i=ia(e).labelEl;i&&(i.setStyle(t.label.style),a(i,{x:t.label.x,y:t.label.y}),Kg(i,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=qi(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Br(u.event)},onmousedown:zu(this._onHandleDragMove,this,0,0),drift:zu(this._onHandleDragMove,this),ondragend:zu(this._onHandleDragEnd,this)}),a.add(n)),qg(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");B(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Ln(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){Xg(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Gu(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(Gu(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Gu(n)),ia(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.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(),a=this._group,n=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Li(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function Xg(r,e,t,a){h1(ia(t).lastProp,a)||(ia(t).lastProp=a,e?ft(t,a,r):(t.stopAnimation(),t.attr(a)))}function h1(r,e){if(J(r)&&J(e)){var t=!0;return w(e,function(a,n){t=t&&h1(r[n],a)}),!!t}else return r===e}function Kg(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Gu(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function qg(r,e,t){var a=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=t)})}function zh(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function f1(r,e,t,a,n){var i=t.get("value"),o=p1(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Dn(s.get("padding")||0),u=s.getFont(),c=Ys(o,u),v=n.position,h=c.width+l[1]+l[3],f=c.height+l[0]+l[2],p=n.align;p==="right"&&(v[0]-=h),p==="center"&&(v[0]-=h/2);var d=n.verticalAlign;d==="bottom"&&(v[1]-=f),d==="middle"&&(v[1]-=f/2),Vk(v,h,f,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:v[0],y:v[1],style:Dt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Vk(r,e,t,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+e,n)-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 p1(r,e,t,a,n){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:eh(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};w(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,v=u&&u.getDataParams(c);v&&s.seriesData.push(v)}),Y(o)?i=o.replace("{value}",i):K(o)&&(i=o(s))}return i}function Gh(r,e,t){var a=_n();return Yi(a,a,t.rotation),Sa(a,a,t.position),We([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function d1(r,e,t,a,n,i){var o=fe.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),f1(e,a,n,i,{position:Gh(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Fh(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function g1(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function jg(r,e,t,a,n,i){return{cx:r,cy:e,r0:t,r:a,startAngle:n,endAngle:i,clockwise:!0}}var Bk=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),c=Jg(l,s).getOtherAxis(s).getGlobalExtent(),v=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var h=zh(i),f=zk[u](s,v,c);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=Oc(l.model,n);d1(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Oc(a.axis.grid.model,a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Gh(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Jg(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,v=[t.x,t.y];v[c]+=a[c],v[c]=Math.min(l[1],v[c]),v[c]=Math.max(l[0],v[c]);var h=(u[1]+u[0])/2,f=[h,h];f[c]=v[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:f,tooltipOption:p[c]}},e}(Bh);function Jg(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var zk={line:function(r,e,t){var a=Fh([e,t[0]],[e,t[1]],Qg(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:g1([e-a/2,t[0]],[a,n],Qg(r))}}};function Qg(r){return r.dim==="x"?0:1}var Gk=function(r){E(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:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(lt),ur=ut(),Fk=w;function y1(r,e,t){if(!Nt.node){var a=e.getZr();ur(a).records||(ur(a).records={}),Hk(a,e);var n=ur(a).records[r]||(ur(a).records[r]={});n.handler=t}}function Hk(r,e){if(ur(r).initialized)return;ur(r).initialized=!0,t("click",tt(ty,"click")),t("mousemove",tt(ty,"mousemove")),t("globalout",Uk);function t(a,n){r.on(a,function(i){var o=Yk(e);Fk(ur(r).records,function(s){s&&n(s,i,o.dispatchAction)}),Wk(o.pendings,e)})}}function Wk(r,e){var t=r.showTip.length,a=r.hideTip.length,n;t?n=r.showTip[t-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function Uk(r,e,t){r.handler("leave",null,t)}function ty(r,e,t,a){e.handler(r,t,a)}function Yk(r){var e={showTip:[],hideTip:[]},t=function(a){var n=e[a.type];n?n.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function av(r,e){if(!Nt.node){var t=e.getZr(),a=(ur(t).records||{})[r];a&&(ur(t).records[r]=null)}}var Zk=function(r){E(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,a,n){var i=a.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";y1("axisPointer",n,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,a){av("axisPointer",a)},e.prototype.dispose=function(t,a){av("axisPointer",a)},e.type="axisPointer",e}(Rt);function m1(r,e){var t=[],a=r.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=xa(i,r);if(o==null||o<0||B(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),v=c.dim,h=u.dim,f=v==="x"||v==="radius"?1:0,p=i.mapDimension(h),d=[];d[f]=i.get(p,o),d[1-f]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues(G(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var ey=ut();function $k(r,e,t){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||U(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){ns(n)&&(n=m1({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=ns(n),u=i.axesInfo,c=s.axesInfo,v=a==="leave"||ns(n),h={},f={},p={list:[],map:{}},d={showPointer:tt(Kk,f),showTooltip:tt(qk,p)};w(s.coordSysMap,function(y,m){var S=l||y.containPoint(n);w(s.coordSysAxesInfo[m],function(_,x){var b=_.axis,A=tN(u,_);if(!v&&S&&(!u||A)){var T=A&&A.value;T==null&&!l&&(T=b.pointToData(n)),T!=null&&ry(_,T,d,!1,h)}})});var g={};return w(c,function(y,m){var S=y.linkGroup;S&&!f[m]&&w(S.axesInfo,function(_,x){var b=f[x];if(_!==y&&b){var A=b.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,ay(_),ay(y)))),g[y.key]=A}})}),w(g,function(y,m){ry(c[m],y,d,!0,h)}),jk(f,c,h),Jk(p,n,r,o),Qk(c,o,t),h}}function ry(r,e,t,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=Xk(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&z(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function Xk(r,e){var t=e.axis,a=t.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return w(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),v,h;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(c,r,t);h=f.dataIndices,v=f.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;v=l.getData().get(c[0],h[0])}if(!(v==null||!isFinite(v))){var p=r-v,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,n=v,i.length=0),w(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function Kk(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function qk(r,e,t,a){var n=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=ki(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:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function jk(r,e,t){var a=t.axesInfo=[];w(e,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function Jk(r,e,t,a){if(ns(e)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function Qk(r,e,t){var a=t.getZr(),n="axisPointerLastHighlights",i=ey(a)[n]||{},o=ey(a)[n]={};w(r,function(u,c){var v=u.axisPointerModel.option;v.status==="show"&&u.triggerEmphasis&&w(v.seriesDataIndices,function(h){var f=h.seriesIndex+" | "+h.dataIndex;o[f]=h})});var s=[],l=[];w(i,function(u,c){!o[c]&&l.push(u)}),w(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 tN(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function ay(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function ns(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function uo(r){Ea.registerAxisPointerClass("CartesianAxisPointer",Bk),r.registerComponentModel(Gk),r.registerComponentView(Zk),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=SI(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},$k)}function eN(r){nt(K_),nt(uo)}var rN=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),v=s.dataToCoord(a),h=i.get("type");if(h&&h!=="none"){var f=zh(i),p=nN[h](s,l,v,c);p.style=f,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=aN(a,n,i,l,d);f1(t,n,i,o,g)},e}(Bh);function aN(r,e,t,a,n){var i=e.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,v;if(i.dim==="radius"){var h=_n();Yi(h,h,s),Sa(h,h,[a.cx,a.cy]),u=We([o,-n],h);var f=e.getModel("axisLabel").get("rotate")||0,p=fe.innerTextLayout(s,f*Math.PI/180,-1);c=p.textAlign,v=p.textVerticalAlign}else{var d=l[1];u=a.coordToPoint([d+n,o]);var g=a.cx,y=a.cy;c=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",v=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:v}}var nN={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:Fh(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:jg(e.cx,e.cy,a[0],a[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:jg(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},iN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(lt),Hh=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ht).models[0]},e.type="polarAxis",e}(lt);Jt(Hh,to);var oN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Hh),sN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Hh),Wh=function(r){E(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(Ze);Wh.prototype.dataToRadius=Ze.prototype.dataToCoord;Wh.prototype.radiusToData=Ze.prototype.coordToData;var lN=ut(),Uh=function(r){E(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=Ys(s==null?"":s+"",a.getFont(),"center","top"),v=Math.max(c.height,7),h=v/u;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),p=lN(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-f)<=1&&Math.abs(g-o)<=1&&d>f?f=d:(p.lastTickCount=o,p.lastAutoInterval=f),f},e}(Ze);Uh.prototype.dataToAngle=Ze.prototype.dataToCoord;Uh.prototype.angleToData=Ze.prototype.coordToData;var S1=["radius","angle"],uN=function(){function r(e){this.dimensions=S1,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Wh,this._angleAxis=new Uh,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===e&&t.push(a),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var a=this.pointToCoord(e);return[this._radiusAxis.radiusToData(a[0],t),this._angleAxis.angleToData(a[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],a=e[1]/180*Math.PI,n=Math.cos(a)*t+this.cx,i=-Math.sin(a)*t+this.cy;return[n,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var n=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,v=u*u+c*c,h=this.r,f=this.r0;return h!==f&&v-o<=h*h&&v+o>=f*f}}},r.prototype.convertToPixel=function(e,t,a){var n=ny(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=ny(t);return n===this?this.pointToData(a):null},r}();function ny(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function cN(r,e,t){var a=e.get("center"),n=t.getWidth(),i=t.getHeight();r.cx=H(a[0],n),r.cy=H(a[1],i);var o=r.getRadiusAxis(),s=Math.min(n,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:B(l)||(l=[0,l]);var u=[H(l[0],s),H(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function vN(r,e){var t=this,a=t.getAngleAxis(),n=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();w(Ds(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),w(Ds(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),vn(a.scale,a.model),vn(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function hN(r){return r.mainType==="angleAxis"}function iy(r,e){var t;if(r.type=e.get("type"),r.scale=hl(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),hN(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,n)}e.axis=r,r.model=e}var fN={dimensions:S1,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,n){var i=new uN(n+"");i.update=vN;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");iy(o,l),iy(s,u),cN(i,a,e),t.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",Ht).models[0];a.coordinateSystem=n.coordinateSystem}}),t}},pN=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function zo(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function Go(r){var e=r.getRadiusAxis();return e.inverse?0:1}function oy(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var dN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=G(n.getViewLabels(),function(c){c=j(c);var v=n.scale,h=v.type==="ordinal"?v.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(h),c});oy(u),oy(s),w(pN,function(c){t.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&gN[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Ea),gN={axisLine:function(r,e,t,a,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Go(t),v=c?0:1,h,f=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[v]===0?h=new Ia[f]({shape:{cx:t.cx,cy:t.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new Hs({shape:{cx:t.cx,cy:t.cy,r:i[c],r0:i[v]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,e,t,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Go(t)],u=G(a,function(c){return new ee({shape:zo(t,[l,l+s],c.coord)})});r.add(Me(u,{style:Q(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,n,i){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Go(t)],c=[],v=0;vy?"left":"right",_=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var x=s[p];J(x)&&x.textStyle&&(f=new mt(x.textStyle,l,l.ecModel))}var b=new vt({silent:fe.isLabelSilent(e),style:Dt(f,{x:g[0],y:g[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:S,verticalAlign:_})});if(r.add(b),c){var A=fe.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=v.rawLabel,q(b).eventData=A}},this)},splitLine:function(r,e,t,a,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],v=0;v=0?"p":"n",P=D;x&&(a[c][L]||(a[c][L]={p:D,n:D}),P=a[c][L][R]);var k=void 0,O=void 0,N=void 0,V=void 0;if(p.dim==="radius"){var F=p.dataToCoord(I)-D,W=l.dataToCoord(L);Math.abs(F)=V})}}})}function wN(r){var e={};w(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=x1(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),v=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=v.stacks;e[l]=v;var f=_1(a);h[f]||v.autoWidthCount++,h[f]=h[f]||{width:0,maxWidth:0};var p=H(a.get("barWidth"),c),d=H(a.get("barMaxWidth"),c),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!h[f].width&&(p=Math.min(v.remainedWidth,p),h[f].width=p,v.remainedWidth-=p),d&&(h[f].maxWidth=d),g!=null&&(v.gap=g),y!=null&&(v.categoryGap=y)});var t={};return w(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=H(a.categoryGap,o),l=H(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,v=(u-s)/(c+(c-1)*l);v=Math.max(v,0),w(i,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=sy(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=sy(t);return n===this?this.pointToData(a):null},r}();function sy(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function kN(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new EN(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",Ht).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var NN={create:kN,dimensions:b1},ly=["x","y"],ON=["width","height"],VN=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=Fu(l,1-Vs(s)),c=l.dataToPoint(a)[0],v=i.get("type");if(v&&v!=="none"){var h=zh(i),f=BN[v](s,c,u);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=nv(n);d1(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=nv(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Gh(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=Vs(o),u=Fu(s,l),c=[t.x,t.y];c[l]+=a[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var v=Fu(s,1-l),h=(v[1]+v[0])/2,f=[h,h];return f[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(Bh),BN={line:function(r,e,t){var a=Fh([e,t[0]],[e,t[1]],Vs(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:g1([e-a/2,t[0]],[a,n],Vs(r))}}};function Vs(r){return r.isHorizontal()?0:1}function Fu(r,e){var t=r.getRect();return[t[ly[e]],t[ly[e]]+t[ON[e]]]}var zN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Rt);function GN(r){nt(uo),Ea.registerAxisPointerClass("SingleAxisPointer",VN),r.registerComponentView(zN),r.registerComponentView(LN),r.registerComponentModel(is),fn(r,"single",is,is.defaultOption),r.registerCoordinateSystem("single",NN)}var FN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,n){var i=Cn(t);r.prototype.init.apply(this,arguments),uy(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),uy(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(lt);function uy(r,e){var t=r.cellSize,a;B(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var n=G([0,1],function(i){return yA(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});Gr(r,e,{type:"box",ignoreSize:n})}var HN=function(r){E(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,a,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,a,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToRect([u],!1).tl,v=new dt({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});n.add(v)}},e.prototype._renderLines=function(t,a,n,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=a.start,h=0;v.time<=a.end.time;h++){p(v.formatedDate),h===0&&(v=s.getDateInfo(a.start.y+"-"+a.start.m));var f=v.date;f.setMonth(f.getMonth()+1),v=s.getDateInfo(f)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,n),l,i)},e.prototype._getEdgesPoints=function(t,a,n){var i=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},e.prototype._drawSplitline=function(t,a,n){var i=new xe({z2:20,shape:{points:t},style:a});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,a,n){for(var i=t.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return Y(t)&&t?pA(t,a):K(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,n,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,v=(u[0][1]+u[1][1])/2,h=n==="horizontal"?0:1,f={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],v],right:[u[h][0],v]},p=a.start.y;+a.end.y>+a.start.y&&(p=p+"-"+a.end.y);var d=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new vt({z2:30,style:Dt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,f[l],n,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,a,n,i,o){var s="left",l="top",u=t[0],c=t[1];return n==="horizontal"?(c=c+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,n,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),v=[this._tlpoints,this._blpoints];(!s||Y(s))&&(s&&(a=yc(s)||a),s=a.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,f=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",d=o.get("silent"),g=0;g=n.start.time&&a.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var n=Math.floor(t[1].time/Hu)-Math.floor(t[0].time/Hu)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var c=Math.floor((n+t[0].day+6)/7),v=a?-c+1:c-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:c,nthWeek:v,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var n=this._getRangeInfo(a);if(e>n.weeks||e===0&&tn.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(n){var i=new r(n);a.push(i),n.coordinateSystem=i}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=a[n.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r}();function cy(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}function UN(r){r.registerComponentModel(FN),r.registerComponentView(HN),r.registerCoordinateSystem("calendar",WN)}function YN(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function vy(r,e){var t;return w(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function ZN(r,e,t){var a=z({},t),n=r[e],i=t.$action||"merge";i==="merge"?n?(it(n,a,!0),Gr(n,a,{ignoreSize:!0}),N0(t,n),Fo(t,n),Fo(t,n,"shape"),Fo(t,n,"style"),Fo(t,n,"extra"),t.clipPath=n.clipPath):r[e]=a:i==="replace"?r[e]=a:i==="remove"&&n&&(r[e]=null)}var w1=["transition","enterFrom","leaveTo"],$N=w1.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Fo(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?w1:$N,n=0;n=0;c--){var v=n[c],h=Yt(v.id,null),f=h!=null?o.get(h):null;if(f){var p=f.parent,y=De(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},S={},_=al(f,v,m,null,{hv:v.hv,boundingMode:v.bounding},S);if(!De(f).isNew&&_){for(var x=v.transition,b={},A=0;A=0)?b[T]=D:f[T]=D}ft(f,b,t,0)}else f.attr(S)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(n){os(n,De(n).option,a,t._lastGraphicModel)}),this._elMap=$()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Rt);function iv(r){var e=Z(hy,r)?hy[r]:Iv(r),t=new e({});return De(t).type=r,t}function fy(r,e,t,a){var n=iv(t);return e.add(n),a.set(r,n),De(n).id=r,De(n).isNew=!0,n}function os(r,e,t,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){os(i,e,t,a)}),yl(r,e,a),t.removeKey(De(r).id))}function py(r,e,t,a){r.isGroup||w([["cursor",ma.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(n){var i=n[0];Z(e,i)?r[i]=pt(e[i],n[1]):r[i]==null&&(r[i]=n[1])}),w(Ut(e),function(n){if(n.indexOf("on")===0){var i=e[n];r[n]=K(i)?i:null}}),Z(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function jN(r){return r=z({},r),w(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(k0),function(e){delete r[e]}),r}function JN(r,e,t){var a=q(r).eventData;!r.silent&&!r.ignore&&!a&&(a=q(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function QN(r){r.registerComponentModel(KN),r.registerComponentView(qN),r.registerPreprocessor(function(e){var t=e.graphic;B(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var dy=["x","y","radius","angle","single"],tO=["cartesian2d","polar","singleAxis"];function eO(r){var e=r.get("coordinateSystem");return ct(tO,e)>=0}function Er(r){return r+"Axis"}function rO(r,e){var t=$(),a=[],n=$();r.eachComponent({mainType:"dataZoom",query:e},function(c){n.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!n.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){n.set(c.uid,!0),a.push(c),u(c)}function l(c){var v=!1;return c.eachTargetAxis(function(h,f){var p=t.get(h);p&&p[f]&&(v=!0)}),v}function u(c){c.eachTargetAxis(function(v,h){(t.get(v)||t.set(v,[]))[h]=!0})}return a}function A1(r){var e=r.ecModel,t={infoList:[],infoMap:$()};return r.eachTargetAxis(function(a,n){var i=e.getComponent(Er(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var Wu=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}(),Gi=function(r){E(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,a,n){var i=gy(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var a=gy(t);it(this.option,t,!0),it(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=$(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return w(dy,function(n){var i=this.getReferringComponents(Er(n),cw);if(i.specified){a=!0;var o=new Wu;w(i.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var v=u[0];if(v){var h=new Wu;if(h.add(v.componentIndex),t.set(c,h),i=!1,c==="x"||c==="y"){var f=v.getReferringComponents("grid",Ht).models[0];f&&w(u,function(p){v.componentIndex!==p.componentIndex&&f===p.getReferringComponents("grid",Ht).models[0]&&h.add(p.componentIndex)})}}}i&&w(dy,function(u){if(i){var c=n.findComponents({mainType:Er(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var v=new Wu;v.add(c[0].componentIndex),t.set(u,v),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,n=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,n){t==null&&(t=this.ecModel.getComponent(Er(a),n))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(n,i){w(n.indexList,function(o){t.call(a,i,o)})})},e.prototype.getAxisProxy=function(t,a){var n=this.getAxisModel(t,a);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[a])return this.ecModel.getComponent(Er(t),a)},e.prototype.setRawRange=function(t){var a=this.option,n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(a[i[0]]=n[i[0]]=t[i[0]],a[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;w(["start","startValue","end","endValue"],function(n){a[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(S&&!_&&!x)return!0;S&&(g=!0),_&&(p=!0),x&&(d=!0)}return g&&p&&d})}else qa(c,function(f){if(i==="empty")l.setData(u=u.map(f,function(d){return s(d)?d:NaN}));else{var p={};p[f]=o,u.selectRange(p)}});qa(c,function(f){u.setApproximateExtent(o,f)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;qa(["min","max"],function(n){var i=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=yt(a[0]+o,a,[0,100],!0):i!=null&&(o=yt(i,[0,100],a,!0)-a[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(t){var n=Fm(a,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function oO(r,e,t){var a=[1/0,-1/0];qa(t,function(o){PC(a,o.getData(),e)});var n=r.getAxisModel(),i=o_(n.axis.scale,n,a).calculate();return[i.min,i.max]}var sO={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Er(o),s);n(o,s,l,i)})})}e(function(n,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new iO(n,i,s,r),t.push(o.__dzAxisProxy))});var a=$();return w(t,function(n){w(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).reset(t)}),t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function lO(r){r.registerAction("dataZoom",function(e,t){var a=rO(t,e);w(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var my=!1;function Zh(r){my||(my=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,sO),lO(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function uO(r){r.registerComponentModel(aO),r.registerComponentView(nO),Zh(r)}var Ce=function(){function r(){}return r}(),T1={};function ja(r,e){T1[r]=e}function D1(r){return T1[r]}var cO=function(r){E(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;w(this.option.feature,function(a,n){var i=D1(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),it(a,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:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(lt);function vO(r,e,t){var a=e.getBoxLayoutParams(),n=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=Zt(a,i,n);da(e.get("orient"),r,e.get("itemGap"),o.width,o.height),al(r,a,i,n)}function C1(r,e){var t=Dn(e.get("padding")),a=e.getItemStyle(["color","opacity"]);return a.fill=e.get("backgroundColor"),r=new dt({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:a,silent:!0,z2:-1}),r}var hO=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,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={}),v=[];w(u,function(p,d){v.push(d)}),new dr(this._featureNames||[],v).add(h).update(h).remove(tt(h,null)).execute(),this._featureNames=v;function h(p,d){var g=v[p],y=v[d],m=u[g],S=new mt(m,t,t.ecModel),_;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(fO(g))_={onclick:S.option.onclick,featureName:g};else{var x=D1(g);if(!x)return;_=new x}c[g]=_}else if(_=c[y],!_)return;_.uid=Tn("toolbox-feature"),_.model=S,_.ecModel=a,_.api=n;var b=_ instanceof Ce;if(!g&&y){b&&_.dispose&&_.dispose(a,n);return}if(!S.get("show")||b&&_.unusable){b&&_.remove&&_.remove(a,n);return}f(S,_,g),S.setIconStatus=function(A,T){var D=this.option,C=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[A]=T,C[A]&&(T==="emphasis"?fr:pr)(C[A])},_ instanceof Ce&&_.render&&_.render(S,a,n,i)}function f(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),S=d instanceof Ce&&d.getIcons?d.getIcons():p.get("icon"),_=p.get("title")||{},x,b;Y(S)?(x={},x[g]=S):x=S,Y(_)?(b={},b[g]=_):b=_;var A=p.iconPaths={};w(x,function(T,D){var C=qi(T,{},{x:-s/2,y:-s/2,width:s,height:s});C.setStyle(y.getItemStyle());var M=C.ensureState("emphasis");M.style=m.getItemStyle();var I=new vt({style:{text:b[D],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:Lv({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},a)},ignore:!0});C.setTextContent(I),Ma({el:C,componentModel:t,itemName:D,formatterParamsExtra:{title:b[D]}}),C.__title=b[D],C.on("mouseover",function(){var L=m.getItemStyle(),R=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),C.setTextConfig({position:m.get("textPosition")||R}),I.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",D])!=="emphasis"&&n.leaveEmphasis(this),I.hide()}),(p.get(["iconStatus",D])==="emphasis"?fr:pr)(C),o.add(C),C.on("click",U(d.onclick,d,a,n,D)),A[D]=C})}vO(o,t,n),o.add(C1(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),S=m&&m.ensureState("emphasis");if(S&&!K(S)&&d){var _=S.style||(S.style={}),x=Ys(d,vt.makeFont(_)),b=p.x+o.x,A=p.y+o.y+s,T=!1;A+x.height>n.getHeight()&&(y.position="top",T=!0);var D=T?-5-x.height:s+10;b+x.width/2>n.getWidth()?(y.position=["100%",D],_.align="right"):b-x.width/2<0&&(y.position=[0,D],_.align="left")}})},e.prototype.updateView=function(t,a,n,i){w(this._features,function(o){o instanceof Ce&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(t,a){w(this._features,function(n){n instanceof Ce&&n.remove&&n.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){w(this._features,function(n){n instanceof Ce&&n.dispose&&n.dispose(t,a)})},e.type="toolbox",e}(Rt);function fO(r){return r.indexOf("my")===0}var pO=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Nt.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 v=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(v)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),f=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];f&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var S=document.createElement("iframe");document.body.appendChild(S);var _=S.contentWindow,x=_.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),_.focus(),x.execCommand("SaveAs",!0,d),document.body.removeChild(S)}}else{var b=n.get("lang"),A='',T=window.open();T.document.write(A),T.document.title=i}},e.getDefaultOption=function(t){var a={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:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(Ce),Sy="__ec_magicType_stack__",dO=[["line","bar"],["stack"]],gO=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),n={};return w(t.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},e.getDefaultOption=function(t){var a={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 a},e.prototype.onclick=function(t,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(_y[n]){var s={series:[]},l=function(v){var h=v.subType,f=v.id,p=_y[n](h,f,v,i);p&&(Q(p,v.option),s.series.push(p));var d=v.coordinateSystem;if(d&&d.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",S=v.getReferringComponents(m,Ht).models[0],_=S.componentIndex;s[m]=s[m]||[];for(var x=0;x<=_;x++)s[m][_]=s[m][_]||{};s[m][_].boundaryGap=n==="bar"}}};w(dO,function(v){ct(v,n)>=0&&w(v,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=n;n==="stack"&&(u=it({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Ce),_y={line:function(r,e,t,a){if(r==="bar")return it({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return it({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var n=t.get("stack")===Sy;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),it({id:e,stack:n?"":Sy},a.get(["option","stack"])||{},!0)}};ar({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var ml=new Array(60).join("-"),gn=" ";function yO(r){var e={},t=[],a=[];return r.eachRawSeries(function(n){var i=n.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:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function mO(r){var e=[];return w(r,function(t,a){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(G(t.series,function(f){return f.name})),l=[n.model.getCategories()];w(t.series,function(f){var p=f.getRawData();l.push(f.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(gn)],c=0;c=0)return!0}var ov=new RegExp("["+gn+"]+","g");function bO(r){for(var e=r.split(/\n+/g),t=Bs(e.shift()).split(ov),a=[],n=G(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function MO(r){var e=$h(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return M1(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function IO(r){I1(r).snapshots=null}function LO(r){return $h(r).length}function $h(r){var e=I1(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var PO=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){IO(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={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 a},e}(Ce);ar({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var RO=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Xh=function(){function r(e,t,a){var n=this;this._targetInfoList=[];var i=xy(t,e);w(EO,function(o,s){(!a||!a.include||ct(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Uu[a.brushType](0,i,n);a.__rangeOffset={offset:Ty[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){w(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&w(i.coordSyses,function(o){var s=Uu[n.brushType](1,o,n.range,!0);a(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){w(e,function(a){var n=this.findTargetInfo(a,t);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Uu[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?Ty[a.brushType](i.values,o.offset,kO(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return G(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:Vx(n),isTargetByCursor:zx(n,e,a.coordSysModel),getLinearBrushOtherExtent:Bx(n)}})},r.prototype.controlSeries=function(e,t,a){var n=this.findTargetInfo(e,a);return n===!0||n&&ct(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,n=xy(t,e),i=0;ir[1]&&r.reverse(),r}function xy(r,e){return vi(r,e,{includeMainTypes:RO})}var EO={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=$(),o={},s={};!t&&!a&&!n||(w(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),w(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),w(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];w(u.getCartesians(),function(v,h){(ct(t,v.getAxis("x").model)>=0||ct(a,v.getAxis("y").model)>=0)&&c.push(v)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:wy.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){w(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:wy.geo})})}},by=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],wy={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(pa(r)),e}},Uu={lineX:tt(Ay,0),lineY:tt(Ay,1),rect:function(r,e,t,a){var n=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),i=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[sv([n[0],i[0]]),sv([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=G(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function Ay(r,e,t,a){var n=t.getAxis(["x","y"][r]),i=sv(G([0,1],function(s){return e?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var Ty={lineX:tt(Dy,0),lineY:tt(Dy,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 G(r,function(a,n){return[a[0]-t[0]*e[n][0],a[1]-t[1]*e[n][1]]})}};function Dy(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function kO(r,e){var t=Cy(r),a=Cy(e),n=[t[0]/a[0],t[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function Cy(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var lv=w,NO=iw("toolbox-dataZoom_"),OO=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){this._brushController||(this._brushController=new xh(n.getZr()),this._brushController.on("brush",U(this._onBrush,this)).mount()),zO(t,a,this,i,n),BO(t,a)},e.prototype.onclick=function(t,a,n){VO[n].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Xh(Kh(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,c,v){if(v.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",v,c[0]),s("y",v,c[1])):s({lineX:"x",lineY:"y"}[h],v,c)}}),CO(i,n),this._dispatchZoomAction(n);function s(u,c,v){var h=c.getAxis(u),f=h.model,p=l(u,f,i),d=p.findRepresentativeAxisProxy(f).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(v=ka(0,v.slice(),h.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:v[0],endValue:v[1]})}function l(u,c,v){var h;return v.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var p=f.getAxisModel(u,c.componentIndex);p&&(h=f)}),h}},e.prototype._dispatchZoomAction=function(t){var a=[];lv(t,function(n,i){a.push(j(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={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:"rgba(210,219,238,0.2)"}};return a},e}(Ce),VO={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(MO(this.ecModel))}};function Kh(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 BO(r,e){r.setIconStatus("back",LO(e)>1?"emphasis":"normal")}function zO(r,e,t,a,n){var i=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Xh(Kh(r),e,{include:["grid"]}),s=o.makePanelOpts(n,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)}wA("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),n=[],i=Kh(a),o=vi(r,i);lv(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),lv(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var v=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:NO+u+v};h[c]=v,n.push(h)}return n});function GO(r){r.registerComponentModel(cO),r.registerComponentView(hO),ja("saveAsImage",pO),ja("magicType",gO),ja("dataView",TO),ja("dataZoom",OO),ja("restore",PO),nt(uO)}var FO=function(r){E(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,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(lt);function L1(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function P1(r){if(Nt.domSupported){for(var e=document.documentElement.style,t=0,a=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,v=o+n,h=v*Math.abs(Math.cos(c))+v*Math.abs(Math.sin(c)),f=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-v)/2)*100)/100;s+=";"+i+":-"+f+"px";var p=e+" solid "+n+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'
'}function XO(r,e){var t="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+t,n="opacity"+a+",visibility"+a;return e||(a=" "+r+"s "+t,n+=Nt.transformSupported?","+qh+a:",left"+a+",top"+a),UO+":"+n}function My(r,e,t){var a=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!Nt.transformSupported)return t?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=Nt.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+qh+":"+o+";":[["top",0],["left",0],[R1,o]]}function KO(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var n=pt(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+n+"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),w(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function qO(r,e,t){var a=[],n=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),v=hS(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+h),e&&n&&a.push(XO(n,t)),i&&a.push("background-color:"+i),w(["width","color","radius"],function(f){var p="border-"+f,d=R0(p),g=r.get(d);g!=null&&a.push(p+":"+g+(f==="color"?"":"px"))}),a.push(KO(c)),v!=null&&a.push("padding:"+Dn(v).join("px ")+"px"),a.join(";")+";"}function Iy(r,e,t,a,n){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&Bb(r,o,t,a,n)}else{r[0]=a,r[1]=n;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 jO=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,Nt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=e.getZr(),i=t.appendTo,o=i&&(Y(i)?document.querySelector(i):lc(i)?i:K(i)&&i(e.getDom()));Iy(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,c=n.painter.getViewportRoot();Vb(c,l,!0),u.dispatch("mousemove",l)}},a.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(),a=WO(t,"position"),n=t.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=YO+qO(e,!this._firstShow,this._longHide)+My(i[0],i[1],!0)+("border-color:"+Aa(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,n,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(Y(i)&&a.get("trigger")==="item"&&!L1(a)&&(s=$O(a,n,i)),Y(e))o.innerHTML=e+s;else if(e){o.innerHTML="",B(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,n=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(){!n.isDisposed()&&o.manuallyShowTip(t,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,n,i){if(!(i.from===this.uid||Nt.node||!n.getDom())){var o=Ry(i,n);this._ticket="";var s=i.dataByCoordSys,l=nV(i,a,n);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=QO;c.x=i.x,c.y=i.y,c.update(),q(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,a,n,i))return;var v=m1(i,a),h=v.point[0],f=v.point[1];h!=null&&f!=null&&this._tryShow({offsetX:h,offsetY:f,target:v.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,n,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(Ry(i,n))},e.prototype._manuallyAxisShowTip=function(t,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var c=u.getData(),v=jn([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(v.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,a){var n=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(n){var s=q(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;ca(n,function(c){if(q(c).dataIndex!=null)return l=c,!0;if(q(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var n=t.get("showDelay");a=U(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},e.prototype._showAxisTooltip=function(t,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=jn([a.tooltipOption],i),l=this._renderMode,u=[],c=jt("section",{blocks:[],noHeader:!0}),v=[],h=new Nl;w(t,function(m){w(m.dataByAxis,function(S){var _=n.getComponent(S.axisDim+"Axis",S.axisIndex),x=S.value;if(!(!_||x==null)){var b=p1(x,_.axis,n,S.seriesDataIndices,S.valueLabelOpt),A=jt("section",{header:b,noHeader:!Ui(b),sortBlocks:!0,blocks:[]});c.blocks.push(A),w(S.seriesDataIndices,function(T){var D=n.getSeriesByIndex(T.seriesIndex),C=T.dataIndexInside,M=D.getDataParams(C);if(!(M.dataIndex<0)){M.axisDim=S.axisDim,M.axisIndex=S.axisIndex,M.axisType=S.axisType,M.axisId=S.axisId,M.axisValue=eh(_.axis,{value:x}),M.axisValueLabel=b,M.marker=h.makeTooltipMarker("item",Aa(M.color),l);var I=Qf(D.formatTooltip(C,!0,null)),L=I.frag;if(L){var R=jn([D],i).get("valueFormatter");A.blocks.push(R?z({valueFormatter:R},L):L)}I.text&&v.push(I.text),u.push(M)}})}})}),c.blocks.reverse(),v.reverse();var f=a.position,p=s.get("order"),d=ip(c,h,l,p,n.get("useUTC"),s.get("textStyle"));d&&v.unshift(d);var g=l==="richText"?` `:"
",y=v.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,f,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],f,null,h)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=q(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,v=o.dataType,h=u.getData(v),f=this._renderMode,p=t.positionDefault,d=jn([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,v),m=new Nl;y.marker=m.makeTooltipMarker("item",Aa(y.color),f);var S=Qf(u.formatTooltip(c,!1,v)),_=d.get("order"),x=d.get("valueFormatter"),b=S.frag,A=b?ip(x?z({valueFormatter:x},b):b,m,f,_,i.get("useUTC"),d.get("textStyle")):S.text,T="item_"+u.name+"_"+c;this._showOrMove(d,function(){this._showTooltipContent(d,A,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=q(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Y(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=j(l),l.content=ye(l.content));var v=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&v.push(h),v.push({formatter:l.content});var f=t.positionDefault,p=jn(v,this._tooltipModel,f?{position:f}:null),d=p.get("content"),g=Math.random()+"",y=new Nl;this._showOrMove(p,function(){var m=j(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,t.offsetX,t.offsetY,t.position,a,y)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var v=this._tooltipContent;v.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var f=a,p=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor")),d=p.color;if(h)if(Y(h)){var g=t.ecModel.get("useUTC"),y=B(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;f=h,m&&(f=Js(y.axisValue,f,g)),f=E0(f,n,!0)}else if(K(h)){var S=U(function(_,x){_===this._ticket&&(v.setContent(x,c,t,d,l),this._updatePosition(t,l,o,s,v,n,u))},this);this._ticket=i,f=h(n,i,S)}else f=h;v.setContent(f,c,t,d,l),v.show(t,d),this._updatePosition(t,l,o,s,v,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i){if(n==="axis"||B(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!B(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||t.get("position");var v=o.getSize(),h=t.get("align"),f=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),K(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,c],contentSize:v.slice()})),B(a))n=H(a[0],u),i=H(a[1],c);else if(J(a)){var d=a;d.width=v[0],d.height=v[1];var g=Zt(d,{width:u,height:c});n=g.x,i=g.y,h=null,f=null}else if(Y(a)&&l){var y=aV(a,p,v,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=eV(n,i,o,u,c,h?null:20,f?null:20);n=y[0],i=y[1]}if(h&&(n-=Ey(h)?v[0]/2:h==="right"?v[0]:0),f&&(i-=Ey(f)?v[1]/2:f==="bottom"?v[1]:0),L1(t)){var y=rV(n,i,o,u,c);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&w(n,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},v=c.dataByAxis||[];o=o&&u.length===v.length,o&&w(u,function(h,f){var p=v[f]||{},d=h.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&d.length===g.length,o&&w(d,function(y,m){var S=g[m];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),i&&w(h.seriesDataIndices,function(y){var m=y.seriesIndex,S=a[m],_=i[m];S&&_&&_.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){Nt.node||!a.getDom()||(Li(this,"_updatePosition"),this._tooltipContent.dispose(),av("itemTooltip",a))},e.type="tooltip",e}(Rt);function jn(r,e,t){var a=e.ecModel,n;t?(n=new mt(t,a,a),n=new mt(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof mt&&(o=o.get("tooltip",!0)),Y(o)&&(o={formatter:o}),o&&(n=new mt(o,n,a)))}return n}function Ry(r,e){return r.dispatchAction||U(e.dispatchAction,e)}function eV(r,e,t,a,n,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function rV(r,e,t,a,n){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function aV(r,e,t,a){var n=t[0],i=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-n/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+c+o;break;case"left":s=e.x-n-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 Ey(r){return r==="center"||r==="middle"}function nV(r,e,t){var a=xv(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=$i(e,n,a.get(n),{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=q(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function iV(r){nt(uo),r.registerComponentModel(FO),r.registerComponentView(tV),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},pe),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},pe)}var oV=["rect","polygon","keep","clear"];function sV(r,e){var t=xt(r?r.brush:[]);if(t.length){var a=[];w(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;B(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),lV(s),e&&!s.length&&s.push.apply(s,oV)}}function lV(r){var e={};w(r,function(t){e[t]=1}),r.length=0,w(e,function(t,a){r.push(a)})}var ky=w;function Ny(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function uv(r,e,t){var a={};return ky(e,function(i){var o=a[i]=n();ky(r[i],function(s,l){if(Kt.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new Kt(u),l==="opacity"&&(u=j(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Kt(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function k1(r,e,t){var a;w(t,function(n){e.hasOwnProperty(n)&&Ny(e[n])&&(a=!0)}),a&&w(t,function(n){e.hasOwnProperty(n)&&Ny(e[n])?r[n]=j(e[n]):delete r[n]})}function uV(r,e,t,a,n,i){var o={};w(r,function(v){var h=Kt.prepareVisualTypes(e[v]);o[v]=h});var s;function l(v){return Zv(t,s,v)}function u(v,h){bS(t,s,v,h)}t.each(c);function c(v,h){s=v;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var p=a.call(n,v),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&Gy(e)}};function Gy(r){return new wt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var yV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new xh(a.getZr())).on("brush",U(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){N1(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:j(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:j(n),$from:a})},e.type="brush",e}(Rt),mV="#ddd",SV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&k1(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:mV},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=G(t,function(a){return Fy(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Fy(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(lt);function Fy(r,e){return it({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new mt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var _V=["rect","polygon","lineX","lineY","keep","clear"],xV=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,w(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return w(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:_V.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(Ce);function bV(r){r.registerComponentView(yV),r.registerComponentModel(SV),r.registerPreprocessor(sV),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,hV),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},pe),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},pe),ja("brush",xV)}var wV=function(r){E(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:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(lt),AV=function(r){E(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,a,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=pt(t.get("textBaseline"),t.get("textVerticalAlign")),c=new vt({style:Dt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),v=c.getBoundingRect(),h=t.get("subtext"),f=new vt({style:Dt(s,{text:h,fill:s.getTextColor(),y:v.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);c.silent=!p&&!g,f.silent=!d&&!g,p&&c.on("click",function(){Ss(p,"_"+t.get("target"))}),d&&f.on("click",function(){Ss(d,"_"+t.get("subtarget"))}),q(c).eventData=q(f).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),h&&i.add(f);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var S=Zt(m,{width:n.getWidth(),height:n.getHeight()},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 _={align:l,verticalAlign:u};c.setStyle(_),f.setStyle(_),y=i.getBoundingRect();var x=S.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var A=new dt({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:t.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(A)}},e.type="title",e}(Rt);function O1(r){r.registerComponentModel(wV),r.registerComponentView(AV)}var Hy=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],w(a,function(u,c){var v=Yt(xn(u),""),h;J(u)?(h=j(u),h.value=c):h=c,o.push(h),i.push(v)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new he([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(lt),V1=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Yr(Hy.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Hy);Jt(V1,il.prototype);var TV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Rt),DV=function(r){E(e,r);function e(t,a,n,i){var o=r.call(this,t,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Ze),Zu=Math.PI,Wy=ut(),CV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,n){if(this.model=t,this.api=n,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return jt("nameValue",{noName:!0,value:c})},w(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var n=t.get(["label","position"]),i=t.get("orient"),o=IV(t,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Zu/2},v=i==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),f=h.get("show",!0),p=f?h.get("itemSize"):0,d=f?h.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*Zu/180;var m,S,_,x=h.get("position",!0),b=f&&h.get("showPlayBtn",!0),A=f&&h.get("showPrevBtn",!0),T=f&&h.get("showNextBtn",!0),D=0,C=v;x==="left"||x==="bottom"?(b&&(m=[0,0],D+=g),A&&(S=[D,0],D+=g),T&&(_=[C-p,0],C-=g)):(b&&(m=[C-p,0],C-=g),A&&(S=[0,0],D+=g),T&&(_=[C-p,0],C-=g));var M=[D,C];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:v,orient:i,rotation:c[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:S,nextBtnPosition:_,axisExtent:M,controlSize:p,controlGap:d}},e.prototype._position=function(t,a){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=_n(),l=o.x,u=o.y+o.height;Sa(s,s,[-l,-u]),Yi(s,s,-Zu/2),Sa(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),v=m(n.getBoundingRect()),h=m(i.getBoundingRect()),f=[n.x,n.y],p=[i.x,i.y];p[0]=f[0]=c[0][0];var d=t.labelPosOpt;if(d==null||Y(d)){var g=d==="+"?0:1;S(f,v,c,1,g),S(p,h,c,1,1-g)}else{var g=d>=0?0:1;S(f,v,c,1,g),p[1]=f[1]+d}n.setPosition(f),i.setPosition(p),n.rotation=i.rotation=t.rotation,y(n),y(i);function y(_){_.originX=c[0][0]-_.x,_.originY=c[1][0]-_.y}function m(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function S(_,x,b,A,T){_[A]+=b[A][T]-x[A][T]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=MV(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new DV("value",o,t.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new et;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new ee({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:z({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new ee({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Q({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],w(l,function(u){var c=n.dataToCoord(u.value),v=s.getItemModel(u.value),h=v.getModel("itemStyle"),f=v.getModel(["emphasis","itemStyle"]),p=v.getModel(["progress","itemStyle"]),d={x:c,y:0,onclick:U(o._changeTimeline,o,u.value)},g=Uy(v,h,a,d);g.ensureState("emphasis").style=f.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),fa(g);var y=q(g);v.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],w(u,function(c){var v=c.tickValue,h=l.getItemModel(v),f=h.getModel("label"),p=h.getModel(["emphasis","label"]),d=h.getModel(["progress","label"]),g=n.dataToCoord(c.tickValue),y=new vt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:U(o._changeTimeline,o,v),silent:!1,style:Dt(f,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Dt(p),y.ensureState("progress").style=Dt(d),a.add(y),fa(y),Wy(y).dataIndex=v,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),v=i.get("inverse",!0);h(t.nextBtnPosition,"next",U(this._changeTimeline,this,v?"-":"+")),h(t.prevBtnPosition,"prev",U(this._changeTimeline,this,v?"+":"-")),h(t.playPosition,c?"stop":"play",U(this._handlePlayClick,this,!c),!0);function h(f,p,d,g){if(f){var y=sn(pt(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],S=LV(i,p+"Icon",m,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});S.ensureState("emphasis").style=u,a.add(S),fa(S)}}},e.prototype._renderCurrentPointer=function(t,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(v){v.draggable=!0,v.drift=U(u._handlePointerDrag,u),v.ondragend=U(u._handlePointerDragend,u),Yy(v,u._progressLine,s,n,i,!0)},onUpdate:function(v){Yy(v,u._progressLine,s,n,i)}};this._currentPointer=Uy(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var n=this._toAxisCoord(t)[0],i=this._axis,o=Le(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[i]=+o[i].toFixed(h)),[o,v]}var $u={min:tt(Uo,"min"),max:tt(Uo,"max"),average:tt(Uo,"average"),median:tt(Uo,"median")};function Fi(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!OV(e)&&!B(e.coord)&&B(n)){var i=B1(e,t,a,r);if(e=j(e),e.type&&$u[e.type]&&i.baseAxis&&i.valueAxis){var o=ct(n,i.baseAxis.dim),s=ct(n,i.valueAxis.dim),l=$u[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!B(n))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)$u[u[c]]&&(u[c]=Jh(t,t.mapDimension(n[c]),u[c]));return e}}function B1(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(VV(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function VV(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Hi(r,e){return r&&r.containData&&e.coord&&!vv(e)?r.containData(e.coord):!0}function BV(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!vv(e)&&!vv(t)?r.containZone(e.coord,t.coord):!0}function z1(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Or(o,e[i])}:function(t,a,n,i){return Or(t.value,e[i])}}function Jh(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Xu=ut(),Qh=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=$()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){Xu(s).keep=!1}),a.eachSeries(function(s){var l=mr.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!Xu(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Xu(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;w(t,function(i){var o=mr.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?i0(l):Dv(l))})}})},e.type="marker",e}(Rt);function $y(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=H(i.get("x"),t.getWidth()),l=H(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),c=r.get(a.dimensions[1],n);o=a.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var zV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=mr.getMarkerModelFromSeries(i,"markPoint");o&&($y(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new ro),v=GV(o,t,a);a.setData(v),$y(a.getData(),t,i),v.each(function(h){var f=v.getItemModel(h),p=f.getShallow("symbol"),d=f.getShallow("symbolSize"),g=f.getShallow("symbolRotate"),y=f.getShallow("symbolOffset"),m=f.getShallow("symbolKeepAspect");if(K(p)||K(d)||K(g)||K(y)){var S=a.getRawValue(h),_=a.getDataParams(h);K(p)&&(p=p(S,_)),K(d)&&(d=d(S,_)),K(g)&&(g=g(S,_)),K(y)&&(y=y(S,_))}var x=f.getModel("itemStyle").getItemStyle(),b=Ji(l,"color");x.fill||(x.fill=b),v.setItemVisual(h,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:x})}),c.updateData(v),this.group.add(c.group),v.eachItemGraphicEl(function(h){h.traverse(function(f){q(f).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(Qh);function GV(r,e,t){var a;r?a=G(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return z(z({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new he(a,t),i=G(t.get("data"),tt(Fi,e));r&&(i=_t(i,tt(Hi,r)));var o=z1(!!r,a);return n.initData(i,null,o),n}function FV(r){r.registerComponentModel(NV),r.registerComponentView(zV),r.registerPreprocessor(function(e){jh(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var HV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(mr),Yo=ut(),WV=function(r,e,t,a){var n=r.getData(),i;if(B(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=Qt(a.yAxis,a.xAxis);else{var u=B1(a,n,e,r);s=u.valueAxis;var c=XS(n,u.valueDataDim);l=Jh(n,c,o)}var v=s.dim==="x"?0:1,h=1-v,f=j(a),p={coord:[]};f.type=null,f.coord=[],f.coord[h]=-1/0,p.coord[h]=1/0;var d=t.get("precision");d>=0&&St(l)&&(l=+l.toFixed(Math.min(d,20))),f.coord[v]=p.coord[v]=l,i=[f,p,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[Fi(r,i[0]),Fi(r,i[1]),z({},i[2])];return g[2].type=g[2].type||null,it(g[2],g[0]),it(g[2],g[1]),g};function zs(r){return!isNaN(r)&&!isFinite(r)}function Xy(r,e,t,a){var n=1-r,i=a.dimensions[r];return zs(e[n])&&zs(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function UV(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(Xy(1,t,a,r)||Xy(0,t,a,r)))return!0}return Hi(r,e[0])&&Hi(r,e[1])}function Ku(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=H(o.get("x"),n.getWidth()),u=H(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,v=r.get(c[0],e),h=r.get(c[1],e);s=i.dataToPoint([v,h])}if(Ra(i,"cartesian2d")){var f=i.getAxis("x"),p=i.getAxis("y"),c=i.dimensions;zs(r.get(c[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):zs(r.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var YV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=mr.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Yo(o).from,u=Yo(o).to;l.each(function(c){Ku(l,c,!0,i,n),Ku(u,c,!1,i,n)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new _h);this.group.add(c.group);var v=ZV(o,t,a),h=v.from,f=v.to,p=v.line;Yo(a).from=h,Yo(a).to=f,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");B(d)||(d=[d,d]),B(g)||(g=[g,g]),B(y)||(y=[y,y]),B(m)||(m=[m,m]),v.from.each(function(_){S(h,_,!0),S(f,_,!1)}),p.each(function(_){var x=p.getItemModel(_).getModel("lineStyle").getLineStyle();p.setItemLayout(_,[h.getItemLayout(_),f.getItemLayout(_)]),x.stroke==null&&(x.stroke=h.getItemVisual(_,"style").fill),p.setItemVisual(_,{fromSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(_,"symbolOffset"),fromSymbolRotate:h.getItemVisual(_,"symbolRotate"),fromSymbolSize:h.getItemVisual(_,"symbolSize"),fromSymbol:h.getItemVisual(_,"symbol"),toSymbolKeepAspect:f.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(_,"symbolOffset"),toSymbolRotate:f.getItemVisual(_,"symbolRotate"),toSymbolSize:f.getItemVisual(_,"symbolSize"),toSymbol:f.getItemVisual(_,"symbol"),style:x})}),c.updateData(p),v.line.eachItemGraphicEl(function(_){q(_).dataModel=a,_.traverse(function(x){q(x).dataModel=a})});function S(_,x,b){var A=_.getItemModel(x);Ku(_,x,b,t,i);var T=A.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Ji(l,"color")),_.setItemVisual(x,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:pt(A.get("symbolOffset",!0),m[b?0:1]),symbolRotate:pt(A.get("symbolRotate",!0),y[b?0:1]),symbolSize:pt(A.get("symbolSize"),g[b?0:1]),symbol:pt(A.get("symbol",!0),d[b?0:1]),style:T})}this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(Qh);function ZV(r,e,t){var a;r?a=G(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return z(z({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new he(a,t),i=new he(a,t),o=new he([],t),s=G(t.get("data"),tt(WV,e,r,t));r&&(s=_t(s,tt(UV,r)));var l=z1(!!r,a);return n.initData(G(s,function(u){return u[0]}),null,l),i.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function $V(r){r.registerComponentModel(HV),r.registerComponentView(YV),r.registerPreprocessor(function(e){jh(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var XV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(mr),Zo=ut(),KV=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=Fi(r,n),s=Fi(r,i),l=o.coord,u=s.coord;l[0]=Qt(l[0],-1/0),l[1]=Qt(l[1],-1/0),u[0]=Qt(u[0],1/0),u[1]=Qt(u[1],1/0);var c=mv([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Gs(r){return!isNaN(r)&&!isFinite(r)}function Ky(r,e,t,a){var n=1-r;return Gs(e[n])&&Gs(t[n])}function qV(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return Ra(r,"cartesian2d")?t&&a&&(Ky(1,t,a)||Ky(0,t,a))?!0:BV(r,n,i):Hi(r,n)||Hi(r,i)}function qy(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=H(o.get(t[0]),n.getWidth()),u=H(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var c=r.getValues(["x0","y0"],e),v=r.getValues(["x1","y1"],e),h=i.clampData(c),f=i.clampData(v),p=[];t[0]==="x0"?p[0]=h[0]>f[0]?v[0]:c[0]:p[0]=h[0]>f[0]?c[0]:v[0],t[1]==="y0"?p[1]=h[1]>f[1]?v[1]:c[1]:p[1]=h[1]>f[1]?c[1]:v[1],s=a.getMarkerPosition(p,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Ra(i,"cartesian2d")){var m=i.getAxis("x"),S=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);Gs(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Gs(g)&&(s[1]=S.toGlobalCoord(S.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var jy=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],jV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=mr.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(jy,function(v){return qy(s,l,v,i,n)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new et});this.group.add(c.group),this.markKeep(c);var v=JV(o,t,a);a.setData(v),v.each(function(h){var f=G(jy,function(T){return qy(v,h,T,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(v.get("x0",h)),p.parse(v.get("x1",h))],S=[d.parse(v.get("y0",h)),d.parse(v.get("y1",h))];Le(m),Le(S);var _=!(g[0]>m[1]||g[1]S[1]||y[1]=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",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(lt),$a=tt,fv=w,$o=et,G1=function(r){E(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 $o),this.group.add(this._selectorGroup=new $o),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,n){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,a,n,l,s,u);var c=t.getBoxLayoutParams(),v={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),f=Zt(c,v,h),p=this.layoutInner(t,o,f,i,l,u),d=Zt(Q({width:p.width,height:p.height},c),v,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=C1(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,n,i,o,s,l){var u=this.getContentGroup(),c=$(),v=a.get("selectedMode"),h=[];n.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),fv(a.getData(),function(f,p){var d=f.get("name");if(!this.newlineDisabled&&(d===""||d===` `)){var g=new $o;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(d)[0];if(!c.get(d))if(y){var m=y.getData(),S=m.getVisual("legendLineStyle")||{},_=m.getVisual("legendIcon"),x=m.getVisual("style"),b=this._createItem(y,d,p,f,a,t,S,x,_,v,i);b.on("click",$a(Jy,d,null,i,h)).on("mouseover",$a(pv,y.name,null,i,h)).on("mouseout",$a(dv,y.name,null,i,h)),n.ssr&&b.eachChild(function(A){var T=q(A);T.seriesIndex=y.seriesIndex,T.dataIndex=p,T.ssrType="legend"}),c.set(d,!0)}else n.eachRawSeries(function(A){if(!c.get(d)&&A.legendVisualProvider){var T=A.legendVisualProvider;if(!T.containName(d))return;var D=T.indexOfName(d),C=T.getItemVisual(D,"style"),M=T.getItemVisual(D,"legendIcon"),I=Bm(C.fill);I&&I[3]===0&&(I[3]=.2,C=z(z({},C),{fill:Xo(I,"rgba")}));var L=this._createItem(A,d,p,f,a,t,{},C,M,v,i);L.on("click",$a(Jy,null,d,i,h)).on("mouseover",$a(pv,null,d,i,h)).on("mouseout",$a(dv,null,d,i,h)),n.ssr&&L.eachChild(function(R){var P=q(R);P.seriesIndex=A.seriesIndex,P.dataIndex=p,P.ssrType="legend"}),c.set(d,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();fv(t,function(u){var c=u.type,v=new vt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(v);var h=a.getModel("selectorLabel"),f=a.getModel(["emphasis","selectorLabel"]);ae(v,{normal:h,emphasis:f},{defaultText:u.title}),fa(v)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,c,v,h){var f=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),S=i.get("icon");c=S||c||"roundRect";var _=eB(c,i,l,u,f,g,h),x=new $o,b=i.getModel("textStyle");if(K(t.getLegendIcon)&&(!S||S==="inherit"))x.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:c,iconRotate:y,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:m}));else{var A=S==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;x.add(rB({itemWidth:p,itemHeight:d,icon:c,iconRotate:A,itemStyle:_.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,D=s,C=o.get("formatter"),M=a;Y(C)&&C?M=C.replace("{name}",a??""):K(C)&&(M=C(a));var I=g?b.getTextColor():i.get("inactiveColor");x.add(new vt({style:Dt(b,{text:M,x:T,y:d/2,fill:I,align:D,verticalAlign:"middle"},{inheritColor:I})}));var L=new dt({shape:x.getBoundingRect(),style:{fill:"transparent"}}),R=i.getModel("tooltip");return R.get("show")&&Ma({el:L,componentModel:o,itemName:a,itemTooltipOption:R.option}),x.add(L),x.eachChild(function(P){P.silent=!0}),L.silent=!v,this.getContentGroup().add(x),fa(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();da(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),v=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){da("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),f=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?f[d]+=c[g]+p:v[d]+=h[g]+p,f[1-d]+=c[y]/2-h[y]/2,u.x=f[0],u.y=f[1],l.x=v[0],l.y=v[1];var S={x:0,y:0};return S[g]=c[g]+p+h[g],S[y]=Math.max(c[y],h[y]),S[m]=Math.min(0,h[m]+f[1-d]),S}else return l.x=v[0],l.y=v[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Rt);function eB(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),fv(g,function(m,S){g[S]==="inherit"&&(g[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",v=l.getShallow("decal");u.decal=!v||v==="inherit"?a.decal:cn(v,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:t).opacity),s(u,a);var h=e.getModel("lineStyle"),f=h.getLineStyle();if(s(f,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),f.stroke==="auto"&&(f.stroke=a.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[c];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),f.stroke=h.get("inactiveColor"),f.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}function rB(r){var e=r.icon||"roundRect",t=Wt(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="#fff",t.style.lineWidth=2),t}function Jy(r,e,t,a){dv(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r??e}),pv(r,e,t,a)}function F1(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,n=e.length;an[o],g=[-f.x,-f.y];a||(g[i]=c[u]);var y=[0,0],m=[-p.x,-p.y],S=pt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var _=t.get("pageButtonPosition",!0);_==="end"?m[i]+=n[o]-p[o]:y[i]+=p[o]+S}m[1-i]+=f[s]/2-p[s]/2,c.setPosition(g),v.setPosition(y),h.setPosition(m);var x={x:0,y:0};if(x[o]=d?n[o]:f[o],x[s]=Math.max(f[s],p[s]),x[l]=Math.min(0,p[l]+m[1-i]),v.__rectSize=n[o],d){var b={x:0,y:0};b[o]=Math.max(n[o]-p[o]-S,0),b[s]=x[s],v.setClipPath(new dt({shape:b})),v.__rectSize=b[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(t);return A.pageIndex!=null&&ft(c,{x:A.contentPosition[0],y:A.contentPosition[1]},d?t:null),this._updatePageInfoView(t,A),x},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var n=this._controllerGroup;w(["pagePrev","pageNext"],function(c){var v=c+"DataIndex",h=a[v]!=null,f=n.childOfName(c);f&&(f.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",Y(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=qu[o],l=ju[o],u=this._findTargetItemIndex(a),c=n.children(),v=c[u],h=c.length,f=h?1:0,p={contentPosition:[n.x,n.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!v)return p;var d=_(v);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,S=null;g<=h;++g)S=_(c[g]),(!S&&m.e>y.s+i||S&&!x(S,y.s))&&(m.i>y.i?y=m:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=S;for(var g=u-1,y=d,m=d,S=null;g>=-1;--g)S=_(c[g]),(!S||!x(m,S.s))&&y.i=A&&b.s<=A+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(a=s)}),a??i},e.type="legend.scroll",e}(G1);function sB(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function lB(r){nt(H1),r.registerComponentModel(iB),r.registerComponentView(oB),sB(r)}function uB(r){nt(H1),nt(lB)}var cB=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Yr(Gi.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Gi),tf=ut();function vB(r,e,t){tf(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function hB(r,e){for(var t=tf(r).coordSysRecordMap,a=t.keys(),n=0;na[t+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function yB(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=tf(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=$());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=A1(i);w(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,fB(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=$());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){W1(n,i);return}var c=gB(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),Ln(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var mB=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),vB(n,t,{pan:U(Ju.pan,this),zoom:U(Ju.zoom,this),scrollMove:U(Ju.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){hB(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Yh),Ju={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=Qu[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ka(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:rm(function(r,e,t,a,n,i){var o=Qu[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:rm(function(r,e,t,a,n,i){var o=Qu[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function rm(r){return function(e,t,a,n){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,a,n);if(ka(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Qu={grid:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function U1(r){Zh(r),r.registerComponentModel(cB),r.registerComponentView(mB),yB(r)}var SB=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Yr(Gi.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Gi),ti=dt,am=7,_B=1,tc=30,xB=7,ei="horizontal",nm="vertical",bB=5,wB=["line","bar","candlestick","scatter"],AB={easing:"cubicOut",duration:100,delay:0},TB=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=U(this._onBrush,this),this._onBrushEnd=U(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),Ln(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Li(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new et;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?xB:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===ei?{right:s.width-o.x-o.width,top:s.height-tc-am-i,width:o.width,height:tc}:{right:am,top:o.y,width:tc,height:o.height},u=Cn(t.option);w(["right","top","width","height"],function(v){u[v]==="ph"&&(u[v]=l[v])});var c=Zt(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===nm&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===ei&&!o?{scaleY:l?1:-1,scaleX:1}:n===ei&&o?{scaleY:l?1:-1,scaleX:-1}:n===nm&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new ti({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ti({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:U(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var v=o.getDataExtent(l),h=(v[1]-v[0])*.3;v=[v[0]-h,v[1]+h];var f=[0,a[1]],p=[0,a[0]],d=[[a[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,S=Math.round(o.count()/a[0]),_;o.each([l],function(D,C){if(S>0&&C%S){m+=y;return}var M=D==null||isNaN(D)||D==="",I=M?0:yt(D,v,f,!0);M&&!_&&C?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&_&&(d.push([m,0]),g.push([m,0])),d.push([m,I]),g.push([m,I]),m+=y,_=M}),u=this._shadowPolygonPts=d,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var x=this.dataZoomModel;function b(D){var C=x.getModel(D?"selectedDataBackground":"dataBackground"),M=new et,I=new ke({shape:{points:u},segmentIgnoreThreshold:1,style:C.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new xe({shape:{points:c},segmentIgnoreThreshold:1,style:C.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(I),M.add(L),M}for(var A=0;A<3;A++){var T=b(A===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!n&&!(a!==!0&&ct(wB,u.get("type"))<0)){var c=i.getComponent(Er(o),s).axis,v=DB(o),h,f=u.coordinateSystem;v!=null&&f.getOtherAxis&&(h=f.getOtherAxis(c).inverse),v=u.getData().mapDimension(v),n={thisAxis:c,series:u,thisDim:o,otherDim:v,otherAxisInverse:h}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,v=l.get("brushSelect"),h=a.filler=new ti({silent:v,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new ti({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:_B,fill:"rgba(0,0,0,0)"}})),w([0,1],function(S){var _=l.get("handleIcon");!bs[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var x=Wt(_,-1,0,2,2,null,!0);x.attr({cursor:im(this._orient),draggable:!0,drift:U(this._onDragMove,this,S),ondragend:U(this._onDragEnd,this),onmouseover:U(this._showDataInfo,this,!0),onmouseout:U(this._showDataInfo,this,!1),z2:5});var b=x.getBoundingRect(),A=l.get("handleSize");this._handleHeight=H(A,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),fa(x);var T=l.get("handleColor");T!=null&&(x.style.fill=T),o.add(n[S]=x);var D=l.getModel("textStyle"),C=l.get("handleLabel")||{},M=C.show||!1;t.add(i[S]=new vt({silent:!0,invisible:!M,style:Dt(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var f=h;if(v){var p=H(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new dt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=a.moveHandleIcon=Wt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));f=a.moveZone=new dt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),f.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(f)}f.attr({draggable:!0,cursor:im(this._orient),drift:U(this._onDragMove,this,"all"),ondragstart:U(this._showDataInfo,this,!0),ondragend:U(this._onDragEnd,this),onmouseover:U(this._showDataInfo,this,!0),onmouseout:U(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[yt(t[0],[0,100],a,!0),yt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ka(a,i,o,n.get("zoomLock")?"all":t,s.minSpan!=null?yt(s.minSpan,l,o,!0):null,s.maxSpan!=null?yt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Le([yt(i[0],o,l,!0),yt(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=Le(n.slice()),o=this._size;w([0,1],function(f){var p=a.handles[f],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:n[f]+(f?-1:1),y:o[1]/2-d/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;ca[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new Ft(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Le([yt(n.x,o,s,!0),yt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Br(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new ti({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),c=l.transformCoordToLocal(s.x,s.y),v=this._size;u[0]=Math.max(Math.min(v[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:v[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?AB:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=A1(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Yh);function DB(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function im(r){return r==="vertical"?"ns-resize":"ew-resize"}function Y1(r){r.registerComponentModel(SB),r.registerComponentView(TB),Zh(r)}function CB(r){nt(U1),nt(Y1)}var Z1={get:function(r,e,t){var a=j((MB[r]||{})[e]);return t&&B(a)?a[a.length-1]:a}},MB={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},om=Kt.mapVisual,IB=Kt.eachVisual,LB=B,sm=w,PB=Le,RB=yt,Fs=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&k1(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=U(t,this),this.controllerVisuals=uv(this.option.controller,a,t),this.targetVisuals=uv(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=xt(t),a},e.prototype.eachTargetSeries=function(t,a){w(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],B(t)&&(t=t.slice(),u=!0);var c=a?t:u?[v(t[0]),v(t[1])]:v(t);if(Y(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(K(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+c[1]:t[1]===s[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function v(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=PB([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});it(i,n),it(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(v){LB(a.color)&&!v.inRange&&(v.inRange={color:a.color.slice().reverse()}),v.inRange=v.inRange||{color:t.get("gradientColor")}}function u(v,h,f){var p=v[h],d=v[f];p&&!d&&(d=v[f]={},sm(p,function(g,y){if(Kt.isValidType(y)){var m=Z1.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function c(v){var h=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,f=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";sm(this.stateList,function(y){var m=this.itemSize,S=v[y];S||(S=v[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&j(h)||(s?g:[g])),S.symbolSize==null&&(S.symbolSize=f&&j(f)||(s?m[0]:[m[0],m[0]])),S.symbol=om(S.symbol,function(b){return b==="none"?g:b});var _=S.symbolSize;if(_!=null){var x=-1/0;IB(_,function(b){b>x&&(x=b)}),S.symbolSize=om(_,function(b){return RB(b,[0,x],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(lt),lm=[20,140],EB=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=lm[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=lm[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):B(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),w(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=Le((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=um(this,"outOfRange",this.getExtent()),n=um(this,"inRange",this.option.range.slice()),i=[];function o(f,p){i.push({value:f,color:t(f,p)})}for(var s=0,l=0,u=n.length,c=a.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new et(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",n.mainGroup);kB([0,1],function(v){var h=o[v];h.setStyle("fill",a.handlesColor[v]),h.y=t[v];var f=Xe(t[v],[0,l[1]],u,!0),p=this.getControllerVisual(f,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var d=We(n.handleLabelPoints[v],pa(h,this.group));if(this._orient==="horizontal"){var g=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[v].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,v=c.indicator;if(v){v.attr("invisible",!1);var h={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),d=Xe(t,s,u,!0),g=l[0]-p/2,y={x:v.x,y:v.y};v.y=d,v.x=g;var m=We(c.indicatorLabelPoint,pa(v,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),x=this._orient,b=x==="horizontal";S.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:b?_:"middle",align:b?"center":_});var A={x:g,y:d,style:{fill:f}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};v.x=y.x,v.y=y.y,v.animateTo(A,D),S.animateTo(T,D)}else v.attr(A),S.attr(T);this._firstShowIndicator=!1;var C=this._shapes.handleLabels;if(C)for(var M=0;Mo[1]&&(v[1]=1/0),a&&(v[0]===-1/0?this._showIndicator(c,v[1],"< ",l):v[1]===1/0?this._showIndicator(c,v[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,f=[];(a||fm(n))&&(f=this._hoverLinkDataIndices=n.findTargetDataIndices(v));var p=lw(h,f);this._dispatchHighDown("downplay",ss(p[0],n)),this._dispatchHighDown("highlight",ss(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(ca(t.target,function(l){var u=q(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function HB(r,e,t,a){for(var n=e.targetVisuals[a],i=Kt.prepareVisualTypes(n),o={color:Ji(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(zB,GB),w(FB,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(WB))}function q1(r){r.registerComponentModel(EB),r.registerComponentView(VB),K1(r)}var UB=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],YB[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=j(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=j(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=Kt.listVisualTypes(),i=this.isCategory();w(t.pieces,function(s){w(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),w(a,function(s,l){var u=!1;w(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&w(this.stateList,function(c){(t[c]||(t[c]={}))[l]=Z1.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).selected||{};if(n.selected=o,w(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var s=!1;w(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=j(t)},e.prototype.getValueState=function(t){var a=Kt.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Kt.findPieceIndex(l,n);c===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(c,v){var h=i.getRepresentValue({interval:c});v||(v=i.getValueState(h));var f=t(h,v);c[0]===-1/0?n[0]=f:c[1]===1/0?n[1]=f:a.push({value:c[0],color:f},{value:c[1],color:f})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return w(s,function(c){var v=c.interval;v&&(v[0]>u&&o([u,v[0]],"outOfRange"),o(v.slice()),u=v[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=Yr(Fs.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Fs),YB={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function ym(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var ZB=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=a.itemSize,c=this._getViewData(),v=c.endsText,h=Qt(a.get("showLabel",!0),!v),f=!a.get("selectedMode");v&&this._renderEndsText(t,v[0],u,h,l),w(c.viewPieceList,function(p){var d=p.piece,g=new et;g.onclick=U(this._onItemClick,this,d),this._enableHoverLink(g,p.indexInModelPieceList);var y=a.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],f),h){var m=this.visualMapModel.getValueState(y);g.add(new vt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:f}))}t.add(g)},this),v&&this._renderEndsText(t,v[1],u,h,l),da(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:ss(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return X1(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(a){var s=new et,l=this.visualMapModel.textStyleModel;s.add(new vt({style:Dt(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n,i){var o=Wt(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=j(n.selected),s=a.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,w(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}($1);function j1(r){r.registerComponentModel(UB),r.registerComponentView(ZB),K1(r)}function $B(r){nt(q1),nt(j1)}var XB={label:{enabled:!0},decal:{show:!1}},mm=ut(),KB={};function qB(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=j(XB);it(a.label,r.getLocaleModel().get("aria"),!1),it(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),c=u.get("show");if(c){var v=$();r.eachSeries(function(h){if(!h.isColorBySeries()){var f=v.get(h.type);f||(f={},v.set(h.type,f)),mm(h).scope=f}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(K(h.enableAriaDecal)){h.enableAriaDecal();return}var f=h.getData();if(h.isColorBySeries()){var m=_c(h.ecModel,h.name,KB,r.getSeriesCount()),S=f.getVisual("decal");f.setVisual("decal",_(S,m))}else{var p=h.getRawData(),d={},g=mm(h).scope;f.each(function(x){var b=f.getRawIndex(x);d[b]=x});var y=p.count();p.each(function(x){var b=d[x],A=p.getName(x)||x+"",T=_c(h.ecModel,A,g,y),D=f.getItemVisual(b,"decal");f.setItemVisual(b,"decal",_(D,T))})}function _(x,b){var A=x?z(z({},b),x):b;return A.dirty=!0,A}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),v=t.getModel("label");if(v.option=Q(v.option,c),!!v.get("enabled")){if(u.setAttribute("role","img"),v.get("description")){u.setAttribute("aria-label",v.get("description"));return}var h=r.getSeriesCount(),f=v.get(["data","maxCount"])||10,p=v.get(["series","maxCount"])||10,d=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=v.get(["general","withTitle"]);g=o(m,{title:y})}else g=v.get(["general","withoutTitle"]);var S=[],_=h>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);g+=o(_,{seriesCount:h}),r.eachSeries(function(T,D){if(D1?v.get(["series","multiple",I]):v.get(["series","single",I]),C=o(C,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>f){var R=v.get(["data","partialData"]);C+=o(R,{displayCnt:f})}else C+=v.get(["data","allData"]);for(var P=v.get(["data","separator","middle"]),k=v.get(["data","separator","end"]),O=v.get(["data","excludeDimensionId"]),N=[],V=0;V":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},QB=function(){function r(e){var t=this._condVal=Y(e)?new RegExp(e):zb(e)?e:null;if(t==null){var a="";gt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return Y(t)?this._condVal.test(e):St(t)?this._condVal.test(e+""):!1},r}(),tz=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),ez=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t=0;n--)if(!t[n].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[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var dz={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;xm(r)&&(u=r,c=e),xm(e)&&(u=e,c=r);function v(y,m,S,_,x){var b=y.many,A=y.one;if(b.length===1&&!x){var T=m?b[0]:A,D=m?A:b[0];if(Gb(T))v({many:[T],one:D},!0,S,_,!0);else{var C=s?Q({delay:s(S,_)},l):l;Fb(T,D,C),i(T,D,T,D,C)}}else for(var M=Q({dividePath:dz[t],individualDelay:s&&function(O,N,V,F){return s(O+S,_)}},l),I=m?Hb(b,A,M):Wb(A,b,M),L=I.fromIndividuals,R=I.toIndividuals,P=L.length,k=0;ke.length,f=u?bm(c,u):bm(h?e:r,[h?r:e]),p=0,d=0;dQ1))for(var i=a.getIndices(),o=0;o0&&b.group.traverse(function(T){T instanceof Mt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},A)})})}function Cm(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Mm(r){return B(r)?r.sort().join(","):r}function Lr(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function bz(r,e){var t=$(),a=$(),n=$();return w(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=Cm(i),c=Mm(u);a.set(c,{dataGroupId:s,data:l}),B(u)&&w(u,function(v){n.set(v,{key:c,dataGroupId:s,data:l})})}),w(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=Cm(i),u=Mm(l),c=a.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Lr(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Lr(s),data:s}]});else if(B(l)){var v=[];w(l,function(p){var d=a.get(p);d.data&&v.push({dataGroupId:d.dataGroupId,divide:Lr(d.data),data:d.data})}),v.length&&t.set(u,{oldSeries:v,newSeries:[{dataGroupId:o,data:s,divide:Lr(s)}]})}else{var h=n.get(l);if(h){var f=t.get(h.key);f||(f={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Lr(h.data)}],newSeries:[]},t.set(h.key,f)),f.newSeries.push({dataGroupId:o,data:s,divide:Lr(s)})}}}}),t}function Im(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Lr(e.oldData[s]),groupIdDim:o.dimension})}),w(xt(r.to),function(o){var s=Im(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Lr(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&tb(n,i,a)}function Az(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){w(xt(a.seriesTransition),function(n){w(xt(n.to),function(i){for(var o=a.updatedSeries,s=0;s