import{bC as t,bD as e,bE as n,bF as i,bG as o,bH as r,bI as a,bJ as s,bK as l,bL as u,bM as c,bN as d,bO as h,bP as p,bQ as f,bR as g,bS as y,bT as m,bU as v,bV as x,bW as _,bX as b,bY as S,bZ as w,b_ as M,b$ as I,c0 as D,c1 as T,c2 as C,c3 as A,c4 as L,c5 as k,c6 as P,c7 as N,c8 as O,c9 as R,ca as E,cb as V,cc as z,cd as B,ce as G,cf as F,cg as W,ch as H,ci as Y,cj as U,ck as Z,cl as X,cm as j,cn as q,co as K,cp as J,cq as $,cr as Q,cs as tt,ct as et,cu as nt,cv as it,cw as ot,cx as rt,cy as at,cz as st,cA as lt,cB as ut,cC as ct,cD as dt,cE as ht,cF as pt,cG as ft,cH as gt,cI as yt,cJ as mt,cK as vt,cL as xt,cM as _t,cN as bt,cO as St,cP as wt,cQ as Mt,cR as It,cS as Dt,cT as Tt,cU as Ct,cV as At,cW as Lt,cX as kt,cY as Pt,cZ as Nt,c_ as Ot,c$ as Rt,d0 as Et,d1 as Vt,d2 as zt,d3 as Bt,d4 as Gt,d5 as Ft,d6 as Wt,d7 as Ht,d8 as Yt,d9 as Ut,da as Zt,db as Xt,dc as jt,dd as qt,de as Kt,df as Jt,dg as $t,dh as Qt,di as te,dj as ee,dk as ne,dl as ie,dm as oe,dn as re,dp as ae,dq as se,dr as le,ds as ue,dt as ce,du as de,dv as he,dw as pe,dx as fe,dy as ge,dz as ye,dA as me,dB as ve,dC as xe,dD as _e,dE as be,dF as Se,dG as we,dH as Me,dI as Ie,dJ as De,dK as Te,dL as Ce,dM as Ae,dN as Le,dO as ke,dP as Pe,dQ as Ne,dR as Oe,dS as Re,dT as Ee,dU as Ve}from"./.pnpm.DGfAnZKL.js";var ze=1e-4;function Be(t,e,n,i){var o=e[0],r=e[1],a=n[0],s=n[1],l=r-o,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(t<=o)return a;if(t>=r)return s}else{if(t>=o)return a;if(t<=r)return s}else{if(t===o)return a;if(t===r)return s}return(t-o)/l*u+a}function Ge(e,n){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return t(e)?(i=e,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*n:parseFloat(e):null==e?NaN:+e;var i}function Fe(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function We(t){return t.sort(function(t,e){return t-e}),t}function He(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return function(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,o=n>0?n:e.length,r=e.indexOf("."),a=r<0?0:o-1-r;return Math.max(0,a-i)}(t)}function Ye(t,e){var n=Math.log,i=Math.LN10,o=Math.floor(n(t[1]-t[0])/i),r=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-o+r,0),20);return isFinite(a)?a:20}function Ue(t,e){var n=Math.max(He(t),He(e)),i=t+e;return n>20?i:Fe(i,n)}var Ze=9007199254740991;function Xe(t){var e=2*Math.PI;return(t%e+e)%e}function je(t){return t>-1e-4&&t=10&&e++,e}function $e(t,e){var n=Je(t),i=Math.pow(10,n),o=t/i;return t=(o<1.5?1:o<2.5?2:o<4?3:o<7?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function Qe(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),o=+t[i-1],r=n-i;return r?o+r*(t[i]-o):o}function tn(t){t.sort(function(t,e){return s(t,e,0)?-1:1});for(var e=-Infinity,n=1,i=0;i= result.length`. (i=t[o])&&(i.newOption||bn(i.existing)||// In mode "replaceMerge", here no not-mapped-non-internal-existing. i.existing&&null!=e.id&&!mn("id",e,i.existing));)o++;i?(i.newOption=e,i.brandNew=n):t.push({newOption:e,brandNew:n,existing:null,keyInfo:null}),o++}})}(p,e,l):u&&function(t,e){s(e,function(e){t.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}(p,e),d=p,h=a(),s(d,function(t){var e=t.existing;e&&h.set(e.id,t)}),s(d,function(t){var e=t.newOption;i(!e||null==e.id||!h.get(e.id)||h.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&h.set(e.id,t),!t.keyInfo&&(t.keyInfo={})}),s(d,function(t,e){var n=t.existing,i=t.newOption,o=t.keyInfo;if(r(i)){if(o.name=null!=i.name?vn(i.name):n?n.name:un+e,n)o.id=vn(n.id);else if(null!=i.id)o.id=vn(i.id);else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(h.get(o.id))}h.set(o.id,t)}}),p}function mn(t,e,n){var i=xn(e[t],null),o=xn(n[t],null);return null!=i&&null!=o&&i===o}function vn(t){return xn(t,"")}function xn(e,n){return null==e?n:t(e)?e:u(e)||c(e)?e+"":n}function _n(t){var e=t.name;return!(!e||!e.indexOf(un))}function bn(t){return t&&null!=t.id&&0===vn(t.id).indexOf(cn)}function Sn(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?o(e.dataIndex)?n(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?o(e.name)?n(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function wn(){var t="__ec_inner_"+Mn++;return function(e){return e[t]||(e[t]={})}}var Mn=on();function In(t,e,n){var i=Dn(e,n),o=i.mainTypeSpecified,r=i.queryOptionMap,a=i.others,s=n?n.defaultMainType:null;return!o&&s&&r.set(s,{}),r.each(function(e,i){var o=An(t,i,e,{useDefault:s===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[i+"Models"]=o.models,a[i+"Model"]=o.models[0]}),a}function Dn(e,n){var i;if(t(e)){var o={};o[e+"Index"]=0,i=o}else i=e;var r=a(),u={},c=!1;return s(i,function(t,e){if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],o=i[1],a=(i[2]||"").toLowerCase();if(o&&a&&!(n&&n.includeMainTypes&&l(n.includeMainTypes,o)<0))c=c||!!o,(r.get(o)||r.set(o,{}))[a]=t}else u[e]=t}),{mainTypeSpecified:c,queryOptionMap:r,others:u}}var Tn={useDefault:!0,enableAll:!1,enableNone:!1},Cn={useDefault:!1,enableAll:!0,enableNone:!0};function An(t,e,n,o){o=o||Tn;var r=n.index,a=n.id,s=n.name,l={models:null,specified:null!=r||null!=a||null!=s};if(!l.specified){var u=void 0;return l.models=o.useDefault&&(u=t.getComponent(e))?[u]:[],l}return"none"===r||!1===r?(i(o.enableNone,'`"none"` or `false` is not a valid value on index option.'),l.models=[],l):("all"===r&&(i(o.enableAll,'`"all"` is not a valid value on index option.'),r=a=s=null),l.models=t.queryComponents({mainType:e,index:r,id:a,name:s}),l)}function Ln(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function kn(t,e){var n=a(),i=[];return s(t,function(t){var o=e(t);(n.get(o)||(i.push(o),n.set(o,[]))).push(t)}),{keys:i,buckets:n}}function Pn(e,n,i,o,r){var a=null==n||"auto"===n;if(null==o)return o;if(u(o))return Fe(y=ln(i||0,o,r),a?Math.max(He(i||0),He(o)):n);if(t(o))return r<1?i:o;for(var s=[],l=i,c=o,d=Math.max(l?l.length:0,c.length),h=0;h=0||o&&l(o,s)<0)){var u=n.getShallow(s,e);null!=u&&(r[t[a][0]]=u)}}return r}}var Hn=Wn([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Yn= /** @class */function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Hn(this,t,e)},t}(),Un=wn(),Zn=function(t,e,n,i){if(i){var o=Un(i);o.dataIndex=n,o.dataType=e,o.seriesIndex=t,o.ssrType="chart","group"===i.type&&i.traverse(function(i){var o=Un(i);o.seriesIndex=t,o.dataIndex=n,o.dataType=e,o.ssrType="chart"})}},Xn=1,jn={},qn=wn(),Kn=wn(),Jn=["emphasis","blur","select"],$n=["normal","emphasis","blur","select"],Qn=10,ti="highlight",ei="downplay",ni="select",ii="unselect",oi="toggleSelect";function ri(t){return null!=t&&"none"!==t}function ai(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function si(t){ai(t,"emphasis",2)}function li(t){2===t.hoverState&&ai(t,"normal",0)}function ui(t){ai(t,"blur",1)}function ci(t){1===t.hoverState&&ai(t,"normal",0)}function di(t){t.selected=!0}function hi(t){t.selected=!1}function pi(t,e,n){e(t,n)}function fi(t,e,n){pi(t,e,n),t.isGroup&&t.traverse(function(t){pi(t,e,n)})}function gi(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function yi(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&l(n,"select")>=0,r=!1;if(t instanceof y){var a=qn(t),s=o&&a.selectFill||a.normalFill,u=o&&a.selectStroke||a.normalStroke;if(ri(s)||ri(u)){var c=(i=i||{}).style||{};"inherit"===c.fill?(r=!0,i=f({},i),(c=f({},c)).fill=s):!ri(c.fill)&&ri(s)?(r=!0,i=f({},i),(c=f({},c)).fill=m(s)):!ri(c.stroke)&&ri(u)&&(r||(i=f({},i),c=f({},c)),c.stroke=m(u)),i.style=c}}if(i&&null==i.z2){r||(i=f({},i));var d=t.z2EmphasisLift;i.z2=t.z2+(null!=d?d:Qn)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=l(t.currentStates,e)>=0,o=t.style.opacity,r=i?null:function(t,e,n,i){for(var o=t.style,r={},a=0;a0){var r={dataIndex:o,seriesIndex:t.seriesIndex};null!=i&&(r.dataType=i),e.push(r)}})}),e}function Ni(t,e,n){Bi(t,!0),fi(t,mi),Ri(t,e,n)}function Oi(t,e,n,i){i?function(t){Bi(t,!1)}(t):Ni(t,e,n)}function Ri(t,e,n){var i=Un(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var Ei=["emphasis","blur","select"],Vi={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function zi(t,e,n,i){n=n||"itemStyle";for(var o=0;o0){var h={duration:d.duration,delay:d.delay||0,easing:d.easing,done:a,force:!!a||!!s, // Set to final state in update/init animation. // So the post processing based on the path shape can be done correctly. setToFinal:!c,scope:t,during:s};u?e.animateFrom(n,h):e.animateTo(n,h)}else e.stopAnimation(),!u&&e.attr(n),s&&s(1),a&&a()}function Zi(t,e,n,i,o,r){Ui("update",t,e,n,i,o,r)}function Xi(t,e,n,i,o,r){Ui("enter",t,e,n,i,o,r)}function ji(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function yo(t){return!t.isGroup}function mo(t,e,n){if(t&&e){var i,o=(i={},t.traverse(function(t){yo(t)&&t.anid&&(i[t.anid]=t)}),i);e.traverse(function(t){if(yo(t)&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),Zi(t,i,n,Un(t).dataIndex)}}})}function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=f({},t.shape)),e}}function vo(t,e){return n(t,function(t){var n=t[0];n=Qi(n,e.x),n=to(n,e.x+e.width);var i=t[1];return i=Qi(i,e.y),[n,i=to(i,e.y+e.height)]})}function xo(t,e,n){var i=f({rectHover:!0},e),o=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(o.image=t.slice(8),C(o,n),new b(i)):ro(t.replace("path://",""),i,n,"center")}function _o(t,e,n,i,o){for(var r=0,a=o[o.length-1];r=-1e-6)return!1;var f=t-o,g=e-r,y=So(f,g,u,c)/p;if(y<0||y>1)return!1;var m=So(f,g,d,h)/p;return!(m<0||m>1)}function So(t,e,n,i){return t*i-n*e}function wo(e){var n=e.itemTooltipOption,i=e.componentModel,o=e.itemName,r=t(n)?{formatter:n}:n,a=i.mainType,l=i.componentIndex,u={componentType:a,name:o,$vars:["name"]};u[a+"Index"]=l;var c=e.formatterParamsExtra;c&&s(x(c),function(t){k(u,t)||(u[t]=c[t],u.$vars.push(t))});var d=Un(e.el);d.componentMainType=a,d.componentIndex=l,d.tooltipConfig={name:o,option:C({content:o,encodeHTMLContent:!0,formatterParams:u},r)}}function Mo(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Io(t,e){if(t)if(o(t))for(var n=0;n=n&&r>=o)return{x:n,y:o,width:i-n,height:r-o}},createIcon:xo,extendPath:function(t,e){return no(t,e)},extendShape:function(t){return y.extend(t)},getShapeClass:oo,getTransform:po,groupTransition:mo,initProps:Xi,isElementRemoved:ji,lineLineIntersect:bo,linePolygonIntersect:_o,makeImage:ao,makePath:ro,mergePath:lo,registerShape:io,removeElement:qi,removeElementWithFadeOut:Ji,resizePath:uo,setTooltipConfig:wo,subPixelOptimize:ho,subPixelOptimizeLine:co,subPixelOptimizeRect:function(t){return N(t.shape,t.shape,t.style),t},transformDirection:go,traverseElements:Io,updateProps:Zi},Symbol.toStringTag,{value:"Module"}));var To={};function Co(t,e){for(var n=0;n-1?or:ar;function cr(t,e){t=t.toUpperCase(),lr[t]=new tr(e),sr[t]=e}function dr(t){return lr[t]}cr(rr,{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:". "}}}}),cr(or,{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 hr=1e3,pr=6e4,fr=36e5,gr=864e5,yr=31536e6,mr={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}"},vr="{yyyy}-{MM}-{dd}",xr={year:"{yyyy}",month:"{yyyy}-{MM}",day:vr,hour:vr+" "+mr.hour,minute:vr+" "+mr.minute,second:vr+" "+mr.second,millisecond:mr.none},_r=["year","month","day","hour","minute","second","millisecond"],br=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Sr(t,e){return"0000".substr(0,e-(t+="").length)+t}function wr(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Mr(t){return t===wr(t)}function Ir(t,e,n,i){var o=Ke(t),r=o[Cr(n)](),a=o[Ar(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[Lr(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[kr(n)](),d=(c-1)%12+1,h=o[Pr(n)](),p=o[Nr(n)](),f=o[Or(n)](),g=c>=12?"pm":"am",y=g.toUpperCase(),m=(i instanceof tr?i:dr(i||ur)||lr[ar]).getModel("time"),v=m.get("month"),x=m.get("monthAbbr"),_=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,Sr(r%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,Sr(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Sr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Sr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Sr(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Sr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Sr(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Sr(f,3)).replace(/{S}/g,f+"")}function Dr(t,e){var n=Ke(t),i=n[Ar(e)]()+1,o=n[Lr(e)](),r=n[kr(e)](),a=n[Pr(e)](),s=n[Nr(e)](),l=0===n[Or(e)](),u=l&&0===s,c=u&&0===a,d=c&&0===r,h=d&&1===o;return h&&1===i?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function Tr(t,e,n){var i=u(t)?Ke(t):t;switch(e=e||Dr(t,n)){case"year":return i[Cr(n)]();case"half-year":return i[Ar(n)]()>=6?1:0;case"quarter":return Math.floor((i[Ar(n)]()+1)/4);case"month":return i[Ar(n)]();case"day":return i[Lr(n)]();case"half-day":return i[kr(n)]()/24;case"hour":return i[kr(n)]();case"minute":return i[Pr(n)]();case"second":return i[Nr(n)]();case"millisecond":return i[Or(n)]()}}function Cr(t){return t?"getUTCFullYear":"getFullYear"}function Ar(t){return t?"getUTCMonth":"getMonth"}function Lr(t){return t?"getUTCDate":"getDate"}function kr(t){return t?"getUTCHours":"getHours"}function Pr(t){return t?"getUTCMinutes":"getMinutes"}function Nr(t){return t?"getUTCSeconds":"getSeconds"}function Or(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Rr(t){return t?"setUTCFullYear":"setFullYear"}function Er(t){return t?"setUTCMonth":"setMonth"}function Vr(t){return t?"setUTCDate":"setDate"}function zr(t){return t?"setUTCHours":"setHours"}function Br(t){return t?"setUTCMinutes":"setMinutes"}function Gr(t){return t?"setUTCSeconds":"setSeconds"}function Fr(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Wr(e){if(!nn(e))return t(e)?e:"-";var n=(e+"").split(".");return n[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(n.length>1?"."+n[1]:"")}function Hr(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Yr=ot;function Ur(t,e,n){function i(t){return t&&tt(t)?t:"-"}function o(t){return!(null==t||isNaN(t)||!isFinite(t))}var r="time"===e,a=t instanceof Date;if(r||a){var s=r?Ke(t):t;if(!isNaN(+s))return Ir(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return c(t)?i(t):u(t)&&o(t)?t+"":"-";var l=en(t);return o(l)?Wr(l):c(t)?i(t):"boolean"==typeof t?t+"":"-"}var Zr=["a","b","c","d","e","f","g"],Xr=function(t,e){return"{"+t+(null==e?"":e)+"}"};function jr(t,e,n){o(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;ai||l.newline?(r=0,c=g,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var y=h.height+(f?-f.y+h.y:0);(d=a+y)>o||l.newline?(r+=s+n,a=0,d=y,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=r,l.y=a,l.markRedraw(),"horizontal"===t?r=c+n:a=d+n)})}var ea=ta;function na(t,e,n){n=Yr(n||0);var i=e.width,o=e.height,r=Ge(t.left,i),a=Ge(t.top,o),s=Ge(t.right,i),l=Ge(t.bottom,o),u=Ge(t.width,i),c=Ge(t.height,o),d=n[2]+n[0],h=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-h-r),isNaN(c)&&(c=o-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>i/o?u=.8*i:c=.8*o),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(r)&&(r=i-s-u-h),isNaN(a)&&(a=o-l-c-d),t.left||t.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-h}switch(t.top||t.bottom){case"middle":case"center":a=o/2-c/2-n[0];break;case"bottom":a=o-c-d}r=r||0,a=a||0,isNaN(u)&&(u=i-h-r-(s||0)),isNaN(c)&&(c=o-d-a-(l||0));var f=new U(r+n[3],a+n[0],u,c);return f.margin=n,f}function ia(t,e,n,i,o,r){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if((r=r||t).x=t.x,r.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new U(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=na(C({width:a.width,height:a.height},e),n,i),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(r.x=h,r.y=p):(r.x+=h,r.y+=p),r===t&&t.markRedraw(),!0}function oa(t){var e=t.layoutMode||t.constructor.layoutMode;return r(e)?e:e?{type:e}:null}function ra(t,e,n){var i=n&&n.ignoreSize;!o(i)&&(i=[i,i]);var r=s(Qr[0],0),a=s(Qr[1],1);function s(n,o){var r={},a=0,s={},c=0;if(Jr(n,function(e){s[e]=t[e]}),Jr(n,function(t){l(e,t)&&(r[t]=s[t]=e[t]),u(r,t)&&a++,u(s,t)&&c++}),i[o])return u(e,n[1])?s[n[2]]=null:u(e,n[2])&&(s[n[1]]=null),s;if(2!==c&&a){if(a>=2)return r;for(var d=0;d=0;a--)r=et(r,n[a],!0);e.defaultOption=r}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return An(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},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=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(tr);Vn(ua,tr),Fn(ua),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Rn(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var r=Rn(n).main;t.hasSubTypes(n)&&e[r]&&(o=e[r](i))}return o}}(ua),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,o,r){if(t.length){var a=function(t){var i={},o=[];return s(t,function(r){var a=n(i,r),u=function(t,e){var n=[];return s(t,function(t){l(e,t)>=0&&n.push(t)}),n}(a.originalDeps=e(r),t);a.entryCount=u.length,0===a.entryCount&&o.push(r),s(u,function(t){l(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:o}}(i),u=a.graph,c=a.noEntryList,d={};for(s(t,function(t){d[t]=!0});c.length;){var h=c.pop(),p=u[h],f=!!d[h];f&&(o.call(r,h,p.originalDeps.slice()),delete d[h]),s(p.successor,f?y:g)}s(d,function(){throw new Error("")})}function g(t){u[t].entryCount--,0===u[t].entryCount&&c.push(t)}function y(t){d[t]=!0,g(t)}}}(ua,function(t){var e=[];s(ua.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=n(e,function(t){return Rn(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset");return e});var ca="";"undefined"!=typeof navigator&&(ca=navigator.platform||"");var da="rgba(0, 0, 0, 0.2)";const ha={darkMode:"auto", // backgroundColor: 'rgba(0,0,0,0)', colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:da,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:da,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:da,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:da,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:da,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:da,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}}, // If xAxis and yAxis declared, grid is created by default. // grid: {}, textStyle:{ // color: '#000', // decoration: 'none', // PENDING fontFamily:ca.match(/^Win/)?"Microsoft YaHei":"sans-serif", // fontFamily: 'Arial, Verdana, sans-serif', fontSize:12,fontStyle:"normal",fontWeight:"normal"}, // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/ // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation // Default is source-over blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3, // Configuration for progressive/incremental rendering progressiveThreshold:3e3,progressive:400, // Threshold of if use single hover layer to optimize. // It is recommended that `hoverLayerThreshold` is equivalent to or less than // `progressiveThreshold`, otherwise hover will cause restart of progressive, // which is unexpected. // see example . hoverLayerThreshold:3e3, // See: module:echarts/scale/Time useUTC:!1};var pa=a(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),fa="original",ga="arrayRows",ya="objectRows",ma="keyedColumns",va="typedArray",xa="unknown",_a="column",ba="row",Sa=1,wa=2,Ma=3,Ia=wn();function Da(t,e,n){var i={},o=Ca(e);if(!o||!t)return i;var a,l,u=[],c=[],d=e.ecModel,h=Ia(d).datasetMap,p=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),s(t,function(e,n){var o=r(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=y(o)),i[o.name]=[]});var f=h.get(p)||h.set(p,{categoryWayDim:l,valueWayDim:0});function g(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((c=c||n)&&c.length){var d=c[l];return o&&(u[o]=d),s.paletteIdx=(l+1)%c.length,d}}var Ga="\0_ec_inner",Fa= /** @class */function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return h(n,e),n.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new tr(i),this._locale=new tr(o),this._optionManager=r},n.prototype.setOption=function(t,e,n){var i=Ya(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},n.prototype.resetOption=function(t,e){return this._resetOption(t,Ya(e))},n.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var o=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(o,e)):Oa(this,o),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(n=!0,this._mergeOption(r,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&s(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},n.prototype.mergeOption=function(t){this._mergeOption(t,null)},n.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,o=this._componentsCount,l=[],u=a(),c=e&&e.replaceMergeMainTypeMap;Ia(this).datasetMap=a(),s(t,function(t,e){null!=t&&(ua.hasClass(e)?e&&(l.push(e),u.set(e,!0)):n[e]=null==n[e]?nt(t):et(n[e],t,!0))}),c&&c.each(function(t,e){ua.hasClass(e)&&!u.get(e)&&(l.push(e),u.set(e,!0))}),ua.topologicalTravel(l,ua.getAllClassMainTypes(),function(e){var a=function(t,e,n){var i=ka.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}(this,e,dn(t[e])),l=i.get(e),u= // `!oldCmptList` means init. See the comment in `mappingToExists` l?c&&c.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=yn(l,a,u);(function(t,e,n){s(t,function(t){var i=t.newOption;r(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))})})(d,e,ua),n[e]=null,i.set(e,null),o.set(e,0);var h,p=[],g=[],y=0;s(d,function(t,n){var i=t.existing,o=t.newOption;if(o){var r="series"===e,a=ua.getClass(e,t.keyInfo.subType,!r);if(!a)return;if("tooltip"===e){if(h)return;h=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(o,this),i.optionUpdated(o,!1);else{var s=f({componentIndex:n},t.keyInfo);i=new a(o,this,this,s),f(i,s),t.brandNew&&(i.__requireNewView=!0),i.init(o,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(p.push(i.option),g.push(i),y++):(p.push(void 0),g.push(void 0))},this),n[e]=p,i.set(e,g),o.set(e,y),"series"===e&&Pa(this)},this),this._seriesIndices||Pa(this)},n.prototype.getOption=function(){var t=nt(this.option);return s(t,function(e,n){if(ua.hasClass(n)){for(var i=dn(e),o=i.length,r=!1,a=o-1;a>=0;a--)i[a]&&!bn(i[a])?r=!0:(i[a]=null,!r&&o--);i.length=o,t[n]=i}}),delete t[Ga],t},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(t){this._payload=t},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var o=0;o=e:"max"===n?t<=e:t===e})(i[a],t,r)||(o=!1)}}),o}var $a=s,Qa=r,ts=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function es(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=ts.length;n=0;g--){var y=t[g];if(s||(h=y.data.rawIndexOf(y.stackedByDimension,d)),h>=0){var m=y.data.getByRawIndex(y.stackResultDimension,h);if("all"===l||"positive"===l&&m>0||"negative"===l&&m<0||"samesign"===l&&p>=0&&m>0||"samesign"===l&&p<=0&&m<0){p=Ue(p,m),f=m;break}}}return i[0]=p,i[1]=f,i})})}var xs,_s,bs,Ss,ws,Ms= /** @class */ function(){return function(t){this.data=t.data||(t.sourceFormat===ma?{}:[]),this.sourceFormat=t.sourceFormat||xa,this.seriesLayoutBy=t.seriesLayoutBy||_a,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function o(t){for(var e=0;e=0&&(a=s.interpolatedValue[u])}return null!=a?a+"":""}):void 0},e.prototype.getRawValue=function(t,e){return Hs(this.getData(e),t)},e.prototype.formatTooltip=function(t,e,n){},e}();function Zs(t){var e,n;return r(t)?t.type&&(n=t):e=t,{text:e, // markers: markers || markersExisting, frag:n}}function Xs(t){return new js(t)}var js= /** @class */function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var a,s=d(this._modBy),l=this._modDataCount||0,u=d(t&&t.modBy),c=t&&t.modDataCount||0;function d(t){return!(t>=1)&&(t=1),t}s===u&&l===c||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(i)),this._modBy=u,this._modDataCount=c;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):Infinity,this._progress){var p=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:Infinity,this._dueEnd);if(!i&&(a||p1&&i>0?s:a}};return r;function a(){return e=t?null:re},gte:function(t,e){return t>=e}},tl= /** @class */function(){function t(t,e){if(!u(e)){sn("")}this._opFn=Qs[t],this._rvalFloat=en(e)}return t.prototype.evaluate=function(t){return u(t)?this._opFn(t,this._rvalFloat):this._opFn(en(t),this._rvalFloat)},t}(),el= /** @class */function(){function e(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-Infinity:Infinity}return e.prototype.evaluate=function(e,n){var i=u(e)?e:en(e),o=u(n)?n:en(n),r=isNaN(i),a=isNaN(o);if(r&&(i=this._incomparable),a&&(o=this._incomparable),r&&a){var s=t(e),l=t(n);s&&(i=l?e:0),l&&(o=s?n:0)}return io?-this._resultLT:0},e}(),nl= /** @class */function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=en(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=en(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function il(t,e){return"eq"===t||"ne"===t?new nl("eq"===t,e):k(Qs,t)?new tl(t,e):null}var ol= /** @class */function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Ks(t,e)},t}();function rl(t){if(!dl(t.sourceFormat)){sn("")}return t.data}function al(t){var e=t.sourceFormat,n=t.data;if(!dl(e)){sn("")}if(e===ga){for(var i=[],o=0,r=n.length;o65535?fl:gl}function _l(){return[Infinity,-Infinity]}function bl(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Sl(t,e,n,i,o){var r=vl[n||"float"];if(o){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new r(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,i){for(var o=this._provider,r=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=n(a,function(t){return t.property}),c=0;cm[1]&&(m[1]=y)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return r;o=r-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],o=[];if(!i)return o;null==n&&(n=Infinity);for(var r=Infinity,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(r=d,a=c,s=0),c===a&&(o[s++]=l))}return o.length=s,o},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var o=0;o=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}h=!0}else if(2===o){f=d[i[0]];var y=d[i[1]],m=t[i[1]][0],v=t[i[1]][1];for(g=0;g=u&&_<=c||isNaN(_))&&(b>=m&&b<=v||isNaN(b))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===o)for(g=0;g=u&&_<=c||isNaN(_))&&(a[s++]=S)}else for(g=0;gt[I][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sy[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,o,r=this.clone([t],!0),a=r._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),c=this.getRawIndex(0),d=new(xl(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;hn&&(n=i,o=I)}M>0&&M<_-x&&(d[l++]=Math.min(w,o),o=Math.max(w,o)),d[l++]=o,c=o}return d[l++]=this.getRawIndex(s-1),r._count=l,r._indices=d,r.getRawIndex=this._getRawIdx,r},t.prototype.minmaxDownSample=function(t,e){for(var n=this.clone([t],!0),i=n._chunks,o=Math.floor(1/e),r=i[t],a=this.count(),s=new(xl(this._rawCount))(2*Math.ceil(a/o)),l=0,u=0;ua&&(f=a-u);for(var g=0;gp&&(p=y,h=u+g)}var m=this.getRawIndex(c),v=this.getRawIndex(h);cu-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=y),d[h++]=m}return o._count=h,o._indices=d,o._updateGetRawIdx(),o},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,o=0,r=this.count();oa&&(a=l)}return i=[r,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,o=0;o=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return Ks(t[i],this._dimensions[i])}hl={arrayRows:t,objectRows:function(t,e,n,i){return Ks(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var o=t&&(null==t.value?t:t.value);return Ks(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),Ml= /** @class */function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),o=!!i.length;if(Dl(n)){var r=n,a=void 0,s=void 0,l=void 0;if(o){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else a=r.get("data",!0),s=st(a)?va:fa,e=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=_(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=_(c.sourceHeader,d.sourceHeader),f=_(c.dimensions,d.dimensions);t=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[Ds(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(o){var y=this._applyTransform(i);t=y.sourceList,e=y.upstreamSignList}else{t=[Ds(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==t.length&&Tl("")}var r,a=[],l=[];return s(t,function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||Tl(""),a.push(e),l.push(t._getVersionSign())}),i?e=function(t,e){var n=dn(t),i=n.length;i||sn("");for(var o=0,r=i;o1||n>0&&!t.noHeader;return s(t.blocks,function(t){var n=Rl(t);n>=e&&(e=n+ +(i&&(// 0 always can not be readable gap level. !n||Nl(t)&&!t.noHeader)))}),e}return 0}function El(t,e,n,r){var a,l=e.noHeader,u=(a=Rl(e),{html:Ll[a],richText:kl[a]}),c=[],d=e.blocks||[];i(!d||o(d)),d=d||[];var h=t.orderMode;if(e.sortBlocks&&h){d=d.slice();var p={valueAsc:"asc",valueDesc:"desc"};if(k(p,h)){var g=new el(p[h],null);d.sort(function(t,e){return g.evaluate(t.sortParam,e.sortParam)})}else"seriesDesc"===h&&d.reverse()}s(d,function(n,i){var o=e.valueFormatter,a=Ol(n)( // Inherit valueFormatter o?f(f({},t),{valueFormatter:o}):t,n,i>0?u.html:0,r);null!=a&&c.push(a)});var y="richText"===t.renderMode?c.join(u.richText):Bl(r,c.join(""),l?n:u.html);if(l)return y;var m=Ur(e.header,"ordinal",t.useUTC),v=Al(r,t.renderMode).nameStyle,x=Cl(r);return"richText"===t.renderMode?Gl(t,m,v)+u.richText+y:Bl(r,'
'+rt(m)+"
"+y,n)}function Vl(t,e,i,r){var a=t.renderMode,s=e.noName,l=e.noValue,u=!e.markerType,c=e.name,d=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return t=o(t)?t:[t],n(t,function(t,e){return Ur(t,o(g)?g[e]:g,d)})};if(!s||!l){var p=u?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),f=s?"":Ur(c,"ordinal",d),g=e.valueType,y=l?[]:h(e.value,e.dataIndex),m=!u||!s,v=!u&&s,x=Al(r,a),_=x.nameStyle,b=x.valueStyle;return"richText"===a?(u?"":p)+(s?"":Gl(t,f,_))+(l?"":function(t,e,n,i,r){var a=[r],s=i?10:20;return n&&a.push({padding:[0,0,0,s],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(o(e)?e.join(" "):e,a)}(t,y,m,v,b)):Bl(r,(u?"":p)+(s?"":function(t,e,n){return''+rt(t)+""}(f,!u,_))+(l?"":function(t,e,i,r){var a=i?"10px":"20px",s=e?"float:right;margin-left:"+a:"";return t=o(t)?t:[t],''+n(t,function(t){return rt(t)}).join("  ")+""}(y,m,v,b)),i)}}function zl(t,e,n,i,o,r){if(t)return Ol(t)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function Bl(t,e,n){return'
'+e+'
'}function Gl(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Fl(t,e){return qr(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Wl(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Hl= /** @class */function(){function e(){this.richTextStyles={},this._nextStyleNameId=on()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,n,i){var o="richText"===i?this._generateStyleName():null,r=function(e,n){var i=t(e)?{color:e,extraCssText:n}:e||{},o=i.color,r=i.type;n=i.extraCssText;var a=i.renderMode||"html";return o?"html"===a?"subItem"===r?'':'':{renderMode:a,content:"{"+(i.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:o}:{width:10,height:10,borderRadius:5,backgroundColor:o}}:""}({color:n,type:e,renderMode:i,markerId:o});return t(r)?r:(this.richTextStyles[o]=r.style,r.content)},e.prototype.wrapRichTextStyle=function(t,e){var n={};o(e)?s(e,function(t){return f(n,t)}):f(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function Yl(t){var n,i,r,a,l=t.series,u=t.dataIndex,c=t.multipleSeries,d=l.getData(),h=d.mapDimensionsAll("defaultedTooltip"),p=h.length,f=l.getRawValue(u),g=o(f),y=Fl(l,u);if(p>1||g&&!p){var m=function(t,n,i,o,r){var a=n.getData(),l=e(t,function(t,e,n){var i=a.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName},!1),u=[],c=[],d=[];function h(t,e){var n=a.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(l?d.push(Pl("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(u.push(t),c.push(n.type)))}return o.length?s(o,function(t){h(Hs(a,i,t),t)}):s(t,h),{inlineValues:u,inlineValueTypes:c,blocks:d}}(f,l,u,h,y);n=m.inlineValues,i=m.inlineValueTypes,r=m.blocks,a=m.inlineValues[0]}else if(p){var v=d.getDimensionInfo(h[0]);a=n=Hs(d,u,h[0]),i=v.type}else a=n=g?f[0]:f;var x=_n(l),_=x&&l.name||"",b=d.getName(u),S=c?_:b;return Pl("section",{header:_, // When series name is not specified, do not show a header line with only '-'. // This case always happens in tooltip.trigger: 'item'. noHeader:c||!x,sortParam:a,blocks:[Pl("nameValue",{markerType:"item",markerColor:y, // Do not mix display seriesName and itemName in one tooltip, // which might confuses users. name:S, // name dimension might be auto assigned, where the name might // be not readable. So we check trim here. noName:!tt(S),value:n,valueType:i,dataIndex:u})].concat(r||[])})}var Ul=wn();function Zl(t,e){return t.getName(e)||t.getId(e)}var Xl="__universalTransitionEnabled",jl= /** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return h(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Xs({count:Kl,reset:Jl}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Ul(this).sourceManager=new Ml(this)).prepareSource();var i=this.getInitialData(t,n);Ql(i,this),this.dataTask.context.data=i,Ul(this).dataBeforeProcessed=i,ql(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=oa(this),i=n?aa(t):{},o=this.subType;ua.hasClass(o)&&(o+="Series"),et(t,e.getTheme().get(this.subType)),et(t,this.getDefaultOption()),hn(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ra(t,i,n)},e.prototype.mergeOption=function(t,e){t=et(this.option,t,!0),this.fillDataTextStyle(t.data);var n=oa(this);n&&ra(this.option,t,n);var i=Ul(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);Ql(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ul(this).dataBeforeProcessed=o,ql(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!st(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,o=Va.prototype.getColorFromPalette.call(this,t,e,n);return o||(o=i.getColorFromPalette(t,e,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,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var r=0;r=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[Zl(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Xl])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,o=this.option,a=o.selectedMode,s=e.length;if(a&&s)if("series"===a)o.selectedMap="all";else if("multiple"===a){r(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,u=0;u0&&this._innerSelect(t,e)}},e.registerClass=function(t){return ua.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(ua);function ql(t){var e=t.name;_n(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return s(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}(t)||e)}function Kl(t){return t.model.getRawData().count()}function Jl(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),$l}function $l(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ql(t,e){s(dt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,at(tu,e))})}function tu(t,e){var n=eu(t);return n&&n.setOutputEnd((e||this).count()),e}function eu(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var o=i.agentStubMap;o&&(i=o.get(t.uid))}return i}}it(jl,Us),it(jl,Va),Vn(jl,ua);var nu= /** @class */function(){function t(){this.group=new X,this.uid=nr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function iu(){var t=wn();return function(e){var n=t(e),i=e.pipelineContext,o=!!n.large,r=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(o===a&&r===s)&&"reset"}}En(nu),Fn(nu);var ou=wn(),ru=iu(),au= /** @class */function(){function t(){this.group=new X,this.uid=nr("viewChart"),this.renderTask=Xs({plan:uu,reset:cu}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){var o=t.getData(i&&i.dataType);o&&lu(o,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var o=t.getData(i&&i.dataType);o&&lu(o,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){Io(this.group,t)},t.markUpdateMethod=function(t,e){ou(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function su(t,e,n){t&&Gi(t)&&("emphasis"===e?_i:bi)(t,n)}function lu(t,e,n){var i=Sn(t,e),o=e&&null!=e.highlightKey?function(t){var e=jn[t];return null==e&&Xn<=32&&(e=jn[t]=Xn++),e}(e.highlightKey):null;null!=i?s(dn(i),function(e){su(t.getItemGraphicEl(e),n,o)}):t.eachItemGraphicEl(function(t){su(t,n,o)})}function uu(t){return ru(t.model)}function cu(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,a=t.view,s=o&&ou(o).updateMethod,l=r?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,o),du[l]}En(au),Fn(au);var du={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{ // Put view.render in `progress` to support appendData. But in this case // view.render should not be called in reset, otherwise it will be called // twise. Use `forceFirstProgress` to make sure that view.render is called // in any cases. forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},hu="\0__throttleOriginMethod",pu="\0__throttleRate",fu="\0__throttleType";function gu(t,e,n){var i,o,r,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,t.apply(r,a||[])}e=e||0;var h=function(){for(var t=[],h=0;h=0?d():c=setTimeout(d,-o),l=i};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(t){s=t},h}function yu(t,e,n,i){var o=t[e];if(o){var r=o[hu]||o,a=o[fu];if(o[pu]!==n||a!==i){if(null==n||!i)return t[e]=r;(o=t[e]=gu(r,n,"debounce"===i))[hu]=r,o[fu]=i,o[pu]=n}return o}}function mu(t,e){var n=t[e];n&&n[hu]&&(n.clear&&n.clear(),t[e]=n[hu])}var vu=wn(),xu={itemStyle:Wn(Jo,!0),lineStyle:Wn(jo,!0)},_u={lineStyle:"stroke",itemStyle:"fill"};function bu(t,e){var n=t.visualStyleMapper||xu[e];return n||xu.itemStyle}function Su(t,e){var n=t.visualDrawType||_u[e];return n||"fill"}var wu={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=t.getModel(i),r=bu(t,i)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Su(t,i),l=r[s],u=g(l)?l:null,c="auto"===r.fill||"auto"===r.stroke;if(!r[s]||u||c){var d=t.getColorFromPalette( // TODO series count changed. t.name,null,e.getSeriesCount());r[s]||(r[s]=d,n.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||g(r.fill)?d:r.fill,r.stroke="auto"===r.stroke||g(r.stroke)?d:r.stroke}if(n.setVisual("style",r),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),o=f({},r);o[s]=u(i),e.setItemVisual(n,"style",o)}}}},Mu=new tr,Iu={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=bu(t,i),r=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){Mu.option=n[i];var a=o(Mu),s=t.ensureUniqueItemVisual(e,"style");f(s,a),Mu.option.decal&&(t.setItemVisual(e,"decal",Mu.option.decal),Mu.option.decal.dirty=!0),r in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Du={performRawSeries:!0,overallReset:function(t){var e=a();t.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,o=e.get(i);o||(o={},e.set(i,o)),vu(t).scope=o}}),t.eachSeries(function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},o=e.getData(),r=vu(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Su(e,a);o.each(function(t){var e=o.getRawIndex(t);i[e]=t}),n.each(function(t){var a=i[t];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",c=n.count();l[s]=e.getColorFromPalette(u,r,c)}})}})}},Tu=Math.PI;var Cu= /** @class */function(){function t(t,e,n,i){this._stageTaskMap=a(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,o=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount;return{step:o,modBy:null!=r?Math.ceil(r/o):null,modDataCount:r}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:r}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=a();t.eachSeries(function(t){var i=t.getProgressive(),o=t.uid;n.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;s(this._allHandlers,function(o){var r=t.get(o.uid)||t.set(o.uid,{});i(!(o.reset&&o.overallReset),""),o.reset&&this._createSeriesStageTask(o,r,e,n),o.overallReset&&this._createOverallStageTask(o,r,e,n)},this)},t.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var o=!1,r=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}s(t,function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=r._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each(function(t){a(i,t)&&(t.dirty(),d=!0)}),d&&c.dirty(),r.updatePayload(c,n);var p=r.getPerformArgs(c,i.block);h.each(function(t){t.perform(p)}),c.perform(p)&&(o=!0)}else u&&u.each(function(s,l){a(i,s)&&s.dirty();var u=r.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),r.updatePayload(s,n),s.perform(u)&&(o=!0)})}}),this.unfinished=o||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var o=this,r=e.seriesTaskMap,s=e.seriesTaskMap=a(),l=t.seriesType,u=t.getTargetSeries;function c(e){var a=e.uid,l=s.set(a,r&&r.get(a)||Xs({plan:Nu,reset:Ou,count:Vu}));l.context={model:e,ecModel:n,api:i, // PENDING: `useClearVisual` not used? useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c)},t.prototype._createOverallStageTask=function(t,e,n,o){var r=this,l=e.overallTask=e.overallTask||Xs({reset:Au});l.context={ecModel:n,api:o,overallReset:t.overallReset,scheduler:r};var u=l.agentStubMap,c=l.agentStubMap=a(),d=t.seriesType,h=t.getTargetSeries,p=!0,f=!1;function g(t){var e=t.uid,n=c.set(e,u&&u.get(e)||(// When the result of `getTargetSeries` changed, the overallTask // should be set as dirty and re-performed. // When the result of `getTargetSeries` changed, the overallTask // should be set as dirty and re-performed. f=!0,Xs({reset:Lu,onDirty:Pu})));n.context={model:t,overallProgress:p},n.agent=l,n.__block=p,r._pipe(t,n)}i(!t.createOnAllSeries,""),d?n.eachRawSeriesByType(d,g):h?h(n,o).each(g):(p=!1,s(n.getSeries(),g)),f&&l.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return g(t)&&(t={overallReset:t,seriesType:zu(t)}),t.uid=nr("stageHandler"),e&&(t.visualType=e),t},t}();function Au(t){t.overallReset(t.ecModel,t.api,t.payload)}function Lu(t){return t.overallProgress&&ku}function ku(){this.agent.dirty(),this.getDownstream().dirty()}function Pu(){this.agent&&this.agent.dirty()}function Nu(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Ou(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=dn(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?n(e,function(t,e){return Eu(e)}):Ru}var Ru=Eu(0);function Eu(t){return function(e,n){var i=n.data,o=n.resetDefines[t];if(o&&o.dataEach)for(var r=e.start;r0&&c===e.length-u.length){var d=e.slice(0,c);"data"!==d&&(n.mainType=d,n[u.toLowerCase()]=t,r=!0)}}l.hasOwnProperty(e)&&(i[e]=t,r=!0),r||(o[e]=t)})}return{cptQuery:n,dataQuery:i,otherQuery:o}},e.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,r,"mainType")&&u(s,r,"subType")&&u(s,r,"index","componentIndex")&&u(s,r,"name")&&u(s,r,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,o));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Ju=["symbol","symbolSize","symbolRotate","symbolOffset"],$u=Ju.concat(["symbolKeepAspect"]),Qu={createOnAllSeries:!0, // For legend. performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},o={},r=!1,a=0;a0&&t.unfinished);t.unfinished||this._zr.flush()}}},i.prototype.getDom=function(){return this._dom},i.prototype.getId=function(){return this.id},i.prototype.getZr=function(){return this._zr},i.prototype.isSSR=function(){return this._ssr},i.prototype.setOption=function(t,e,n){if(!this[Lc])if(this._disposed)this.id;else{var i,o,a;if(r(e)&&(n=e.lazyUpdate,i=e.silent,o=e.replaceMerge,a=e.transition,e=e.notMerge),this[Lc]=!0,!this._model||e){var s=new Ka(this._api),l=this._theme,u=this._model=new Fa;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:o},cd);var c={seriesTransition:a,optionChanged:!0};if(n)this[kc]={silent:i,updateParams:c},this[Lc]=!1,this.getZr().wakeUp();else{try{zc(this),Fc.update.call(this,null,c)}catch(d){throw this[kc]=null,this[Lc]=!1,d}this._ssr||this._zr.flush(),this[kc]=null,this[Lc]=!1,Uc.call(this,i),Zc.call(this,i)}}},i.prototype.setTheme=function(){},i.prototype.getModel=function(){return this._model},i.prototype.getOption=function(){return this._model&&this._model.getOption()},i.prototype.getWidth=function(){return this._zr.getWidth()},i.prototype.getHeight=function(){return this._zr.getHeight()},i.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||d.hasGlobalWindow&&window.devicePixelRatio||1},i.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},i.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},i.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},i.prototype.getSvgDataURL=function(){if(d.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return s(e,function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},i.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;s(e,function(t){n.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return s(i,function(t){t.group.ignore=!1}),r}this.id},i.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,o=Math.max,r=Infinity;if(gd[n]){var a=r,l=r,u=-Infinity,c=-Infinity,d=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();s(fd,function(r,s){if(r.group===n){var h=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(nt(t)),p=r.getDom().getBoundingClientRect();a=i(p.left,a),l=i(p.top,l),u=o(p.right,u),c=o(p.bottom,c),d.push({dom:h,left:p.left,top:p.top})}});var p=(u*=h)-(a*=h),f=(c*=h)-(l*=h),g=yt.createCanvas(),y=xt(g,{renderer:e?"svg":"canvas"});if(y.resize({width:p,height:f}),e){var m="";return s(d,function(t){var e=t.left-a,n=t.top-l;m+=''+t.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new F({shape:{x:0,y:0,width:p,height:f},style:{fill:t.connectedBackgroundColor}})),s(d,function(t){var e=new b({style:{x:t.left*h-a,y:t.top*h-l,image:t.dom}});y.add(e)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}this.id},i.prototype.convertToPixel=function(t,e){return Wc(this,"convertToPixel",t,e)},i.prototype.convertFromPixel=function(t,e){return Wc(this,"convertFromPixel",t,e)},i.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=In(this._model,t);return s(i,function(t,i){i.indexOf("Models")>=0&&s(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(e);else if("seriesModels"===i){var r=this._chartsMap[t.__viewId];r&&r.containPoint&&(n=n||r.containPoint(e,t))}},this)},this),!!n}this.id},i.prototype.getVisual=function(t,e){var n=In(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=o?ec(i,o,e):nc(i,e)},i.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},i.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},i.prototype._initEvents=function(){var t,e,n,i=this;s(ad,function(t){var e=function(e){var n,o=i.getModel(),r=e.target;if("globalout"===t?n={}:r&&ac(r,function(t){var e=Un(t);if(e&&null!=e.dataIndex){var i=e.dataModel||o.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType,r)||{},!0}if(e.eventData)return n=f({},e.eventData),!0},!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),u=l&&i["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:l,view:u},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)}),s(ld,function(t,e){i._messageCenter.on(e,function(t){this.trigger(e,t)},i)}),s(["selectchanged"],function(t){i._messageCenter.on(t,function(e){this.trigger(t,e)},i)}),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",function(t){var i=n.getModel();t.isFromClick?(rc("map","selectchanged",e,i,t),rc("pie","selectchanged",e,i,t)):"select"===t.fromAction?(rc("map","selected",e,i,t),rc("pie","selected",e,i,t)):"unselect"===t.fromAction&&(rc("map","unselected",e,i,t),rc("pie","unselected",e,i,t))})},i.prototype.isDisposed=function(){return this._disposed},i.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},i.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Ln(this.getDom(),md,"");var t=this,e=t._api,n=t._model;s(t._componentsViews,function(t){t.dispose(n,e)}),s(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete fd[t.id]}},i.prototype.resize=function(t){if(!this[Lc])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[kc]&&(null==i&&(i=this[kc].silent),n=!0,this[kc]=null),this[Lc]=!0;try{n&&zc(this),Fc.update.call(this,{type:"resize",animation:f({ // Disable animation duration:0},t&&t.animation)})}catch(o){throw this[Lc]=!1,o}this[Lc]=!1,Uc.call(this,i),Zc.call(this,i)}}},i.prototype.showLoading=function(t,e){if(this._disposed)this.id;else if(r(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),pd[t]){var n=pd[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},i.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},i.prototype.makeActionFromEvent=function(t){var e=f({},t);return e.type=ld[t.type],e},i.prototype.dispatchAction=function(t,e){if(this._disposed)this.id;else if(r(e)||(e={silent:!!e}),sd[t.type]&&this._model)if(this[Lc])this._pendingActions.push(t);else{var n=e.silent;Yc.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&d.browser.weChat&&this._throttledZrFlush(),Uc.call(this,n),Zc.call(this,n)}},i.prototype.updateLabelLayout=function(){Ic.trigger("series:layoutlabels",this._model,this._api,{ // Not adding series labels. // TODO updatedSeries:[]})},i.prototype.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},i.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:r,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered(function(t){if(t.states&&t.states.emphasis){if(ji(t))return;if(t instanceof y&&function(t){var e=qn(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(o){t.stateTransition=a;var i=t.getTextContent(),r=t.getTextGuideLine();i&&(i.stateTransition=a),r&&(r.stateTransition=a)}t.__dirty&&e(t)}})}zc=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Bc(t,!0),Bc(t,!1),e.plan()},Bc=function(t,e){for(var n=t._model,i=t._scheduler,o=e?t._componentsViews:t._chartsViews,r=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!d.node&&!d.worker&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}})}(t,e),Ic.trigger("series:afterupdate",e,n,r)},td=function(t){t[Pc]=!0,t.getZr().wakeUp()},ed=function(t){t[Pc]&&(t.getZr().storage.traverse(function(t){ji(t)||e(t)}),t[Pc]=!1)},$c=function(t){return new(/** @class */ function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return h(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){_i(e,n),td(t)},n.prototype.leaveEmphasis=function(e,n){bi(e,n),td(t)},n.prototype.enterBlur=function(e){Si(e),td(t)},n.prototype.leaveBlur=function(e){wi(e),td(t)},n.prototype.enterSelect=function(e){Mi(e),td(t)},n.prototype.leaveSelect=function(e){Ii(e),td(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(Za))(t)},Qc=function(t){function e(t,e){for(var n=0;n=0)){Id.push(n);var a=Cu.wrapStageHandler(n,o);a.__prio=e,a.__raw=n,t.push(a)}}function Td(t,e){pd[t]=e}var Cd=function(t){var e=(t=nt(t)).type;e||sn("");var n=e.split(":");2!==n.length&&sn("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,ul.set(e,t)};function Ad(t){return null==t?0:t.length||1}function Ld(t){return t}Md(Tc,wu),Md(Cc,Iu),Md(Cc,Du),Md(Tc,Qu),Md(Cc,tc),Md(7e3,function(t,e){t.eachRawSeries(function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=bc(n,e))});var o=i.getVisual("decal");if(o)i.getVisual("style").decal=bc(o,e)}})}),_d(ms),bd(900,function(t){var e=a();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),o=t.getData(),r={ // Used for calculate axis extent automatically. // TODO: Type getCalculationInfo return more specific type? stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;i.length&&o.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(r)}}),e.each(vs)}),Td("default",function(t,e){C(e=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 n=new X,i=new F({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var o,r=new Q({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new F({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((o=new Y({shape:{startAngle:-Tu/2,endAngle:-Tu/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Tu/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Tu/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=r.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}),wd({type:ti,event:ti,update:ti},ht),wd({type:ei,event:ei,update:ei},ht),wd({type:ni,event:ni,update:ni},ht),wd({type:ii,event:ii,update:ii},ht),wd({type:oi,event:oi,update:oi},ht),xd("light",Yu),xd("dark",qu);var kd= /** @class */function(){function t(t,e,n,i,o,r){this._old=t,this._new=e,this._oldKeyGetter=n||Ld,this._newKeyGetter=i||Ld,this.context=o,this._diffModeMultiple="multiple"===r}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var r=0;r1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,r)}else 1===l?(n[a]=null,this._update&&this._update(s,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},o=[],r=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,i,r,"_newKeyGetter");for(var a=0;a1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),i[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var h=0;h1)for(var a=0;a30}var Hd,Yd,Ud,Zd,Xd,jd,qd,Kd=r,Jd=n,$d="undefined"==typeof Int32Array?Array:Int32Array,Qd=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],th=["_approximateExtent"],eh= /** @class */function(){function e(e,n){var i;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 o=!1;Bd(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(o=!0,i=e),i=i||["x","y"];for(var r={},l=[],u={},c=!1,d={},h=0;h=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList;if(n.getSource().sourceFormat===fa&&!n.pure)for(var r=[],a=t;a0},e.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),o(r)?r=r.slice():Kd(r)&&(r=f({},r)),i[e]=r),r},e.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Kd(e)?f(i,e):i[e]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,e){Kd(t)?f(this._layout,t):this._layout[t]=e},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?f(this._itemLayouts[t]||{},e):e},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Zn(n,this.dataType,t,e),this._graphicEls[t]=e},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,e){s(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Jd(this.dimensions,this._getDimInfo,this),this.hostModel)),Xd(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,e){var n=this[t];g(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(St(arguments)))})},e.internalField=(Hd=function(t){var e=t._invertedIndicesMap;s(e,function(n,i){var o=t._dimInfos[i],r=o.ordinalMeta,a=t._store;if(r){n=e[i]=new $d(r.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),e}();function nh(e,n){Is(e)||(e=Ts(e));var i=(n=n||{}).coordDimensions||[],o=n.dimensionsDefine||e.dimensionsDefine||[],l=a(),u=[],c=function(t,e,n,i){var o=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return s(e,function(t){var e;r(t)&&(e=t.dimsDef)&&(o=Math.max(o,e.length))}),o}(e,i,o,n.dimensionsCount),d=n.canOmitUnusedDimensions&&Wd(c),h=o===e.dimensionsDefine,p=h?Fd(e):Gd(o),g=n.encodeDefine;!g&&n.encodeDefaulter&&(g=n.encodeDefaulter(e,c));for(var y=a(g),m=new yl(c),v=0;v0&&(i.name=o+(r-1)),r++,e.set(o,r)}}(u),new zd({source:e,dimensions:u,fullDimensionCount:c,dimensionOmitted:d})}function ih(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var oh= /** @class */ function(){return function(t){this.coordSysDims=[],this.axisMap=a(),this.categoryAxisMap=a(),this.coordSysName=t}}();var rh={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis",Tn).models[0],r=t.getReferringComponents("yAxis",Tn).models[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",r),ah(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),ah(r)&&(i.set("y",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis",Tn).models[0];e.coordSysDims=["single"],n.set("single",o),ah(o)&&(i.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar",Tn).models[0],r=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",a),ah(r)&&(i.set("radius",r),e.firstCategoryDimIndex=0),ah(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var o=t.ecModel,r=o.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=r.dimensions.slice();s(r.parallelAxisIndex,function(t,r){var s=o.getComponent("parallelAxis",t),l=a[r];n.set(l,s),ah(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=r))})}};function ah(t){return"category"===t.get("type")}function sh(e,n,i){var o,r,a,l=(i=i||{}).byIndex,u=i.stackedCoordDimension;!function(t){return!Bd(t.schema)}(n)?(r=n.schema,o=r.dimensions,a=n.store):o=n;var c,d,h,p,f=!(!e||!e.get("stack"));if(s(o,function(e,n){t(e)&&(o[n]=e={name:e}),f&&!e.isExtraCoord&&(l||c||!e.ordinalMeta||(c=e),d||"ordinal"===e.type||"time"===e.type||u&&u!==e.coordDim||(d=e))}),!d||l||c||(l=!0),d){h="__\0ecstackresult_"+e.id,p="__\0ecstackedover_"+e.id,c&&(c.createInvertedIndices=!0);var g=d.coordDim,y=d.type,m=0;s(o,function(t){t.coordDim===g&&m++});var v={name:h,coordDim:g,coordDimIndex:m,type:y,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},x={name:p, // This dimension contains stack base (generally, 0), so do not set it as // `stackedDimCoordDim` to avoid extent calculation, consider log scale. coordDim:p,coordDimIndex:m+1,type:y,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};r?(a&&(v.storeDimIndex=a.ensureCalculationDimension(p,y),x.storeDimIndex=a.ensureCalculationDimension(h,y)),r.appendCalculationDimension(v),r.appendCalculationDimension(x)):(o.push(v),o.push(x))}return{stackedDimension:d&&d.name,stackedByDimension:c&&c.name,isStackedByIndex:l,stackedOverDimension:p,stackResultDimension:h}}function lh(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function uh(t,e){return lh(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ch(t,e,i){i=i||{};var r,a=e.getSourceManager(),l=!1;t?(l=!0,r=Ts(t)):l=(r=a.getSource()).sourceFormat===fa;var u=function(t){var e=t.get("coordinateSystem"),n=new oh(e),i=rh[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),c=function(t,e){var i,o=t.get("coordinateSystem"),r=ja.get(o);return e&&e.coordSysDims&&(i=n(e.coordSysDims,function(t){var n={name:t},i=e.axisMap.get(t);if(i){var o=i.get("type");n.type=Od(o)}return n})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),i}(e,u),d=i.useEncodeDefaulter,h=g(d)?d:d?at(Da,c,e):null,p=nh(r,{coordDimensions:c,generateCoord:i.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:h,canOmitUnusedDimensions:!l}),f=function(t,e,n){var i,o;return n&&s(t,function(t,r){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=r),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)}),o||null==i||(t[i].otherDims.itemName=0),i}(p.dimensions,i.createInvertedIndices,u),y=l?null:a.getSharedDataStore(p),m=sh(e,{schema:p,store:y}),v=new eh(p,e);v.setCalculationInfo(m);var x=null!=f&&function(t){if(t.sourceFormat===fa){var e=function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Fn(dh);var hh=0,ph= /** @class */function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++hh}return e.createByAxisModel=function(t){var i=t.option,o=i.data,r=o&&n(o,fh);return new e({categories:r,needCollect:!r, // deduplication is default in axis. deduplication:!1!==i.dedplication})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(e){var n,i=this._needCollect;if(!t(e)&&!i)return e;if(i&&!this._deduplication)return n=this.categories.length,this.categories[n]=e,n;var o=this._getOrCreateMap();return null==(n=o.get(e))&&(i?(n=this.categories.length,this.categories[n]=e,o.set(e,n)):n=NaN),n},e.prototype._getOrCreateMap=function(){return this._map||(this._map=a(this.categories))},e}();function fh(t){return r(t)&&null!=t.value?t.value:t+""}function gh(t){return"interval"===t.type||"log"===t.type}function yh(t,e,n,i){var o={},r=t[1]-t[0],a=o.interval=$e(r/e);null!=n&&ai&&(a=o.interval=i);var s=o.intervalPrecision=vh(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),xh(t,0,e),xh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[Fe(Math.ceil(t[0]/a)*a,s),Fe(Math.floor(t[1]/a)*a,s)],t),o}function mh(t){var e=Math.pow(10,Je(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Fe(n*e)}function vh(t){return He(t)+2}function xh(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function _h(t,e){return t>=e[0]&&t<=e[1]}function bh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Sh(t,e){return t*(e[1]-e[0])+e[0]}var wh= /** @class */function(e){function i(t){var i=e.call(this,t)||this;i.type="ordinal";var a=i.getSetting("ordinalMeta");return a||(a=new ph({})),o(a)&&(a=new ph({categories:n(a,function(t){return r(t)?t.value:t})})),i._ordinalMeta=a,i._extent=i.getSetting("extent")||[0,a.categories.length-1],i}return h(i,e),i.prototype.parse=function(e){return null==e?NaN:t(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},i.prototype.contain=function(t){return _h(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},i.prototype.normalize=function(t){return bh(t=this._getTickNumber(this.parse(t)),this._extent)},i.prototype.scale=function(t){return t=Math.round(Sh(t,this._extent)),this.getRawOrdinalNumber(t)},i.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},i.prototype.getMinorTicks=function(t){},i.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o=0&&t=0&&t=t},i.prototype.getOrdinalMeta=function(){return this._ordinalMeta},i.prototype.calcNiceTicks=function(){},i.prototype.calcNiceExtent=function(){},i.type="ordinal",i}(dh);dh.registerClass(wh);var Mh=Fe,Ih= /** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return h(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return _h(t,this._extent)},e.prototype.normalize=function(t){return bh(t,this._extent)},e.prototype.scale=function(t){return Sh(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=vh(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(!e)return r;n[0]1e4)return[];var s=r.length?r[r.length-1].value:i[1];return n[1]>s&&(t?r.push({value:Mh(s+e,o)}):r.push({value:n[1]})),r},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&c0&&(r=null===r?l:Math.min(r,l))}n[i]=r}}return n}(t),n=[];return s(t,function(t){var i,o=t.coordinateSystem.getBaseAxis(),r=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=e[a],l=Math.abs(r[1]-r[0]),u=o.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var d=t.getData();i=Math.abs(r[1]-r[0])/d.count()}var h=Ge(t.get("barWidth"),i),p=Ge(t.get("barMaxWidth"),i),f=Ge( // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis, // the auto-calculated bar width might be less than 0.5 / 1. t.get("barMinWidth")||(zh(t)?.5:1),i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:kh(o),stackId:Lh(t)})}),Oh(n)}function Oh(t){var e={};s(t,function(t,n){var i=t.axisKey,o=t.bandWidth,r=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=r.stacks;e[i]=r;var s=t.stackId;a[s]||r.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var d=t.barGap;null!=d&&(r.gap=d);var h=t.barCategoryGap;null!=h&&(r.categoryGap=h)});var n={};return s(e,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,r=t.categoryGap;if(null==r){var a=x(i).length;r=Math.max(35-4*a,15)+"%"}var l=Ge(r,o),u=Ge(t.gap,1),c=t.remainedWidth,d=t.autoWidthCount,h=(c-l)/(d+(d-1)*u);h=Math.max(h,0),s(i,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,c-=i+u*i,d--}else{var i=h;e&&ei&&(i=n),i!==h&&(t.width=i,c-=i+u*i,d--)}}),h=(c-l)/(d+(d-1)*u),h=Math.max(h,0);var p,f=0;s(i,function(t,e){t.width||(t.width=h),p=t,f+=t.width*(1+u)}),p&&(f-=p.width*u);var g=-f/2;s(i,function(t,i){n[e][i]=n[e][i]||{bandWidth:o,offset:g,width:t.width},g+=t.width*(1+u)})}),n}function Rh(t,e){var n=Ph(t,e),i=Nh(n);s(n,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),o=Lh(t),r=i[kh(n)][o],a=r.offset,s=r.width;e.setLayout({bandWidth:r.bandWidth,offset:a,size:s})})}function Eh(t){return{seriesType:t,plan:iu(),reset:function(t){if(Vh(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=n.getOtherAxis(i),r=e.getDimensionIndex(e.mapDimension(o.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(o.dim),u=e.getCalculationInfo("stackResultDimension"),c=lh(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),d=o.isHorizontal(),h=function(t,e){var n=e.model.get("startValue");n||(n=0);return e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))}(0,o),p=zh(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(t,e){for(var i,o=t.count,l=p&&Ch(3*o),u=p&&s&&Ch(3*o),v=p&&Ch(o),x=n.master.getRect(),_=d?x.width:x.height,b=e.getStore(),S=0;null!=(i=t.next());){var w=b.get(c?g:r,i),M=b.get(a,i),I=h,D=void 0;c&&(D=+w-b.get(r,i));var T=void 0,C=void 0,A=void 0,L=void 0;if(d){var k=n.dataToPoint([w,M]);if(c)I=n.dataToPoint([D,M])[0];T=I,C=k[1]+m,A=k[0]-I,L=y,Math.abs(A)0)for(var u=0;u<_r.length;++u)l[_r[u]]="{primary|"+l[_r[u]]+"}";var c=i?!1===i.inherit?i:C(i,l):l,d=Dr(e.value,a);if(c[d])s=c[d];else if(c.inherit){for(u=br.indexOf(d)-1;u>=0;--u)if(c[d]){s=c[d];break}s=s||l.none}if(o(s)){var h=null==e.level?0:e.level>=0?e.level:s.length+e.level;s=s[h=Math.min(h,s.length-1)]}}return Ir(new Date(e.value),s,a,r)}(e,n,i,this.getSetting("locale"),r)},i.prototype.getTicks=function(){var t=this._interval,e=this._extent,i=[];if(!t)return i;i.push({value:e[0],level:0});var o=this.getSetting("useUTC"),r=function(t,e,i,o){var r=1e4,a=br,s=0;function l(t,e,n,i,r,a,s){for(var l=new Date(e),u=e,c=l[i]();u1&&0===u&&r.unshift({value:r[0].value-h})}}for(u=0;u=o[0]&&v<=o[1]&&h++)}var x=(o[1]-o[0])/e;if(h>1.5*x&&p>x/1.5)break;if(c.push(y),h>x||t===a[f])break}d=[]}}var _=lt(n(c,function(t){return lt(t,function(t){return t.value>=o[0]&&t.value<=o[1]&&!t.notAdd})}),function(t){return t.length>0}),b=[],S=_.length-1;for(f=0;f<_.length;++f)for(var w=_[f],M=0;Mn&&(this._approxInterval=n);var r=Gh.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[o][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Wh(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function Hh(t){return(t/=fr)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Yh(t,e){return(t/=e?pr:hr)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Uh(t){return $e(t)}function Zh(t,e,n){var i=new Date(t);switch(wr(e)){case"year":case"month":i[Er(n)](0);case"day":i[Vr(n)](1);case"hour":i[zr(n)](0);case"minute":i[Br(n)](0);case"second":i[Gr(n)](0),i[Fr(n)](0)}return i.getTime()}dh.registerClass(Bh);var Xh=dh.prototype,jh=Ih.prototype,qh=Fe,Kh=Math.floor,Jh=Math.ceil,$h=Math.pow,Qh=Math.log,tp= /** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Ih,e._interval=0,e}return h(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,i=this._extent,o=e.getExtent(),r=jh.getTicks.call(this,t);return n(r,function(t){var e=t.value,n=Fe($h(this.base,e));return n=e===i[0]&&this._fixMin?np(n,o[0]):n,{value:n=e===i[1]&&this._fixMax?np(n,o[1]):n}},this)},e.prototype.setExtent=function(t,e){var n=Qh(this.base);t=Qh(Math.max(0,t))/n,e=Qh(Math.max(0,e))/n,jh.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=Xh.getExtent.call(this);e[0]=$h(t,e[0]),e[1]=$h(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=np(e[0],n[0])),this._fixMax&&(e[1]=np(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Qh(t[0])/Qh(e),t[1]=Qh(t[1])/Qh(e),Xh.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(Infinity===n||n<=0)){var i,o=(i=n,Math.pow(10,Je(i)));for(t/n*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var r=[Fe(Jh(e[0]/o)*o),Fe(Kh(e[1]/o)*o)];this._interval=o,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){jh.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 _h(t=Qh(t)/Qh(this.base),this._extent)},e.prototype.normalize=function(t){return bh(t=Qh(t)/Qh(this.base),this._extent)},e.prototype.scale=function(t){return t=Sh(t,this._extent),$h(this.base,t)},e.type="log",e}(dh),ep=tp.prototype;function np(t,e){return qh(t,He(e))}ep.getMinorTicks=jh.getMinorTicks,ep.getLabel=jh.getLabel,dh.registerClass(tp);var ip= /** @class */function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[rp[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[op[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),op={min:"_determinedMin",max:"_determinedMax"},rp={min:"_dataMin",max:"_dataMax"};function ap(t,e,n){var i=t.rawExtentInfo;return i||(i=new ip(t,e,n),t.rawExtentInfo=i,i)}function sp(t,e){return null==e?null:Mt(e)?NaN:t.parse(e)}function lp(t,e){var n=t.type,i=ap(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var o=i.min,r=i.max,a=e.ecModel;if(a&&"time"===n){var l=Ph("bar",a),u=!1;if(s(l,function(t){u=u||t.getBaseAxis()===e.axis}),u){var c=Nh(l),d=function(t,e,n,i){var o=n.axis.getExtent(),r=Math.abs(o[1]-o[0]),a=function(t,e){if(t&&e)return t[kh(e)]}(i,n.axis);if(void 0===a)return{min:t,max:e};var l=Infinity;s(a,function(t){l=Math.min(t.offset,l)});var u=-Infinity;s(a,function(t){u=Math.max(t.offset+t.width,u)}),l=Math.abs(l),u=Math.abs(u);var c=l+u,d=e-t,h=d/(1-(l+u)/r)-d;return e+=h*(u/c),t-=h*(l/c),{min:t,max:e}}(o,r,e,c);o=d.min,r=d.max}}return{extent:[o,r], // "fix" means "fixed", the value should not be // changed in the subsequent steps. fixMin:i.minFixed,fixMax:i.maxFixed}}function up(t,e){var n=e,i=lp(t,n),o=i.extent,r=n.get("splitNumber");t instanceof tp&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(o[0],o[1]),t.calcNiceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function cp(t,e){if(e=e||t.get("type"))switch(e){ // Buildin scale case"category":return new wh({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[Infinity,-Infinity]});case"time":return new Bh({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(dh.getClass(e)||Ih)}}function dp(e){var n=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(n,i){return e.scale.getFormattedLabel(n,i,t)}}(n):t(n)?function(t){return function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")}}(n):g(n)?function(t){return function(n,o){return null!=i&&(o=n.value-i),t(hp(e,n),o,null!=n.level?{level:n.level}:null)}}(n):function(t){return e.scale.getLabel(t)}}function hp(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function pp(t,e){var n=e*Math.PI/180,i=t.width,o=t.height,r=i*Math.abs(Math.cos(n))+Math.abs(o*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(o*Math.cos(n));return new U(t.x,t.y,r,a)}function fp(t){var e=t.get("interval");return null==e?"auto":e}function gp(t){return"category"===t.type&&0===fp(t.getLabelModel())}function yp(t,e){var n={};return s(t.mapDimensionsAll(e),function(e){n[uh(t,e)]=!0}),x(n)}var mp= /** @class */function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),vp=[],xp={registerPreprocessor:_d,registerProcessor:bd,registerPostInit:function(t){Sd("afterinit",t)},registerPostUpdate:function(t){Sd("afterupdate",t)},registerUpdateLifecycle:Sd,registerAction:wd,registerCoordinateSystem:function(t,e){ja.register(t,e)},registerLayout:function(t,e){Dd(dd,t,e,1e3,"layout")},registerVisual:Md,registerTransform:Cd,registerLoading:Td,registerMap:function(t,e,n){var i=Dc["registerMap"];i&&i(t,e,n)},registerImpl:function(t,e){Dc[t]=e},PRIORITY:Ac,ComponentModel:ua,ComponentView:nu,SeriesModel:jl,ChartView:au, // TODO Use ComponentModel and SeriesModel instead of Constructor registerComponentModel:function(t){ua.registerClass(t)},registerComponentView:function(t){nu.registerClass(t)},registerSeriesModel:function(t){jl.registerClass(t)},registerChartView:function(t){au.registerClass(t)},registerSubTypeDefaulter:function(t,e){ua.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){It(t,e)}};function _p(t){o(t)?s(t,function(t){_p(t)}):l(vp,t)>=0||(vp.push(t),g(t)&&(t={install:t}),t.install(xp))}var bp=[];function Sp(t,e){for(var n=0;nn&&(t=o,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,o=t.length,r=t[o-1][0],a=t[o-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),o=s+=o,r=l+=r,i.push([s/n,l/n])}return i}function kp(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var i=e.features;return s(i,function(t){var e=t.geometry,i=e.encodeOffsets,o=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=Lp(o,i,n);break;case"Polygon":case"MultiLineString":Ap(o,i,n);break;case"MultiPolygon":s(o,function(t,e){return Ap(t,i[e],n)})}}),e.UTF8Encoding=!1,e}(t),n(lt(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,o=[];switch(i.type){case"Polygon":var r=i.coordinates;o.push(new Ip(r[0],r.slice(1)));break;case"MultiPolygon":s(i.coordinates,function(t){t[0]&&o.push(new Ip(t[0],t.slice(1)))});break;case"LineString":o.push(new Dp([i.coordinates]));break;case"MultiLineString":o.push(new Dp(i.coordinates))}var a=new Tp(n[e||"name"],o,n.cp);return a.properties=n,a})}var Pp=wn();function Np(t,e){var i=n(e,function(e){return t.scale.parse(e)});return"time"===t.type&&i.length>0&&(i.sort(),i.unshift(i[0]),i.push(i[i.length-1])),i}function Op(t){var e=t.getLabelModel().get("customValues");if(e){var i=dp(t),o=t.scale.getExtent(),r=Np(t,e),a=lt(r,function(t){return t>=o[0]&&t<=o[1]});return{labels:n(a,function(e){var n={value:e};return{formattedLabel:i(n),rawLabel:t.scale.getLabel(n),tickValue:e}})}}return"category"===t.type?function(t){var e=t.getLabelModel(),n=Ep(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),i=dp(t);return{labels:n(e,function(e,n){return{level:e.level,formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e.value}})}}(t)}function Rp(t,e){var i=t.getTickModel().get("customValues");if(i){var o=t.scale.getExtent(),r=Np(t,i);return{ticks:lt(r,function(t){return t>=o[0]&&t<=o[1]})}}return"category"===t.type?function(t,e){var i,o,r=Vp(t,"ticks"),a=fp(e),s=zp(r,a);if(s)return s;e.get("show")&&!t.scale.isBlank()||(i=[]);if(g(a))i=Fp(t,a,!0);else if("auto"===a){var l=Ep(t,t.getLabelModel());o=l.labelCategoryInterval,i=n(l.labels,function(t){return t.tickValue})}else i=Gp(t,o=a,!0);return Bp(r,a,{ticks:i,tickCategoryInterval:o})}(t,e):{ticks:n(t.scale.getTicks(),function(t){return t.value})}}function Ep(t,e){var n,i,o=Vp(t,"labels"),r=fp(e),a=zp(o,r);return a||(g(r)?n=Fp(t,r):(i="auto"===r?function(t){var e=Pp(t).autoInterval;return null!=e?e:Pp(t).autoInterval=t.calculateCategoryInterval()}(t):r,n=Gp(t,i)),Bp(o,r,{labels:n,labelCategoryInterval:i}))}function Vp(t,e){return Pp(t)[e]||(Pp(t)[e]=[])}function zp(t,e){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=gp(t),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==r[0]&&g(r[0]);for(var f=u;f<=r[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:o.getLabel(e),tickValue:t})}return p&&f-l!==r[1]&&g(r[1]),s}function Fp(t,e,n){var i=t.scale,o=dp(t),r=[];return s(i.getTicks(),function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&r.push(n?s:{formattedLabel:o(t),rawLabel:a,tickValue:s})}),r}var Wp=[0,1],Hp= /** @class */function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Ye(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Yp(n=n.slice(),i.count()),Be(t,Wp,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Yp(n=n.slice(),i.count());var o=Be(t,n,Wp,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=Rp(this,e).ticks,o=n(i,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this);return function(t,e,n,i){var o=e.length;if(!t.onBand||n||!o)return;var r,a,l=t.getExtent();if(1===o)e[0].coord=l[0],r=e[1]={coord:l[1],tickValue:e[0].tickValue};else{var u=e[o-1].tickValue-e[0].tickValue,c=(e[o-1].coord-e[0].coord)/u;s(e,function(t){t.coord-=c/2});var d=t.scale.getExtent();a=1+d[1]-e[o-1].tickValue,r={coord:e[o-1].coord+c*a,tickValue:d[1]+1},e.push(r)}var h=l[0]>l[1];p(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift());i&&p(l[0],e[0].coord)&&e.unshift({coord:l[0]});p(l[1],r.coord)&&(i?r.coord=l[1]:e.pop());i&&p(r.coord,l[1])&&e.push({coord:l[1]});function p(t,e){return t=Fe(t),e=Fe(e),h?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return n(e,function(t){return n(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},t.prototype.getViewLabels=function(){return Op(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=dp(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,r=o.getExtent(),a=o.count();if(r[1]-r[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=r[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,p=0;l<=r[1];l+=s){var f,g,y=At(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,h=Math.max(h,f,7),p=Math.max(p,g,7)}var m=h/c,v=p/d;isNaN(m)&&(m=Infinity),isNaN(v)&&(v=Infinity);var x=Math.max(0,Math.floor(Math.min(m,v))),_=Pp(t.model),b=t.getExtent(),S=_.lastAutoInterval,w=_.lastTickCount;return null!=S&&null!=w&&Math.abs(S-x)<=1&&Math.abs(w-a)<=1&&S>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=S:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},t}();function Yp(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var Up=2*Math.PI,Zp=Pt.CMD,Xp=["top","right","bottom","left"];function jp(t,e,n,i,o){var r=n.width,a=n.height;switch(t){case"top":i.set(n.x+r/2,n.y-e),o.set(0,-1);break;case"bottom":i.set(n.x+r/2,n.y+a+e),o.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),o.set(-1,0);break;case"right":i.set(n.x+r+e,n.y+a/2),o.set(1,0)}}function qp(t,e,n,i,o,r,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,d=(s/=u)*n+e;if(Math.abs(i-o)%Up<1e-4)return l[0]=c,l[1]=d,u-n;if(r){var h=i;i=Rt(o),o=Rt(h)}else i=Rt(i),o=Rt(o);i>o&&(o+=Up);var p=Math.atan2(s,a);if(p<0&&(p+=Up),p>=i&&p<=o||p+Up>=i&&p+Up<=o)return l[0]=c,l[1]=d,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(o)+t,m=n*Math.sin(o)+e,v=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(m-s)*(m-s);return v0){e=e/180*Math.PI,ef.fromArray(t[0]),nf.fromArray(t[1]),of.fromArray(t[2]),J.sub(rf,ef,nf),J.sub(af,of,nf);var n=rf.len(),i=af.len();if(!(n<.001||i<.001)){rf.scale(1/n),af.scale(1/i);var o=rf.dot(af);if(Math.cos(e)1&&J.copy(uf,of),uf.toArray(t[1])}}}}function df(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,ef.fromArray(t[0]),nf.fromArray(t[1]),of.fromArray(t[2]),J.sub(rf,nf,ef),J.sub(af,of,nf);var i=rf.len(),o=af.len();if(!(i<.001||o<.001))if(rf.scale(1/i),af.scale(1/o),rf.dot(e)=a)J.copy(uf,of);else{uf.scaleAndAdd(af,r/Math.tan(Math.PI/2-s));var l=of.x!==nf.x?(uf.x-nf.x)/(of.x-nf.x):(uf.y-nf.y)/(of.y-nf.y);if(isNaN(l))return;l<0?J.copy(uf,nf):l>1&&J.copy(uf,of)}uf.toArray(t[1])}}}function hf(t,e,n,i){var o="normal"===n,r=o?t:t.ensureState(n);r.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),r.shape=r.shape||{},a>0&&(r.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();o?t.useStyle(s):r.style=s}function pf(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var o=Lt(i[0],i[1]),r=Lt(i[1],i[2]);if(!o||!r)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(o,r)*n,s=kt([],i[1],i[0],a/o),l=kt([],i[1],i[2],a/r),u=kt([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0){x(i*n,0,a);var o=i+t;o<0&&_(-o*n,1)}else _(-t*n,1)}}function x(n,i,o){0!==n&&(u=!0);for(var r=i;r0)for(l=0;l0;l--){x(-(r[l-1]*d),l,a)}}}function b(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function vf(t,e,n,i){return mf(t,"y","height",e,n)}function xf(t){var e=[];t.sort(function(t,e){return e.priority-t.priority});var n=new U(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var o=0;o