import{_ as t}from"../tslib/tslib.e35f93b8.js";import{i as e,r as n,m as i,a as o,c as r,e as a,b as s,d as l,f as u,g as c,h as d,j as h,k as p,l as f,n as g,P as y,o as m,p as v,q as x,s as _,t as b,Z as S,u as w,v as M,w as I,x as D,y as T,z as C,T as A,A as L,B as k,C as P,D as N,E as O,F as R,G as E,S as V,R as z,H as B,I as G,J as F,L as W,K as H,M as Y,N as U,O as X,Q as Z,U as j,V as q,W as K,X as J,Y as $,_ as Q,$ as tt,a0 as et,a1 as nt,a2 as it,a3 as ot,a4 as rt,a5 as at,a6 as st,a7 as lt,a8 as ut,a9 as ct,aa as dt,ab as ht,ac as pt,ad as ft,ae as gt,af as yt,ag as mt,ah as vt,ai as xt,aj as _t,ak as bt,al as St,am as wt,an as Mt,ao as It,ap as Dt,aq as Tt,ar as Ct,as as At,at as Lt,au as kt,av as Pt,aw as Nt,ax as Ot,ay as Rt,az as Et,aA as Vt,aB as zt,aC as Bt,aD as Gt,aE as Ft,aF as Wt,aG as Ht,aH as Yt,aI as Ut,aJ as Xt,aK as Zt,aL as jt,aM as qt,aN as Kt,aO as Jt,aP as $t,aQ as Qt,aR as te,aS as ee,aT as ne,aU as ie,aV as oe,aW as re,aX as ae,aY as se,aZ as le,a_ as ue,a$ as ce,b0 as de,b1 as he,b2 as pe,b3 as fe,b4 as ge,b5 as ye,b6 as me,b7 as ve,b8 as xe,b9 as _e,ba as be,bb as Se,bc as we,bd as Me,be as Ie,bf as De,bg as Te,bh as Ce,bi as Ae,bj as Le,bk as ke,bl as Pe,bm as Ne,bn as Oe,bo as Re,bp as Ee,bq as Ve}from"../zrender/zrender.a6916eca.js";var ze=1e-4,Be=20;function Ge(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 Fe(t,n){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return e(t)?(i=t,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*n:parseFloat(t):null==t?NaN:+t;var i}function We(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),Be),t=(+t).toFixed(e),n?t:+t}function He(t){return t.sort((function(t,e){return t-e})),t}function Ye(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 Ue(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 Xe(t,e){var n=Math.max(Ye(t),Ye(e)),i=t+e;return n>Be?i:We(i,n)}var Ze=9007199254740991;function je(t){var e=2*Math.PI;return(t%e+e)%e}function qe(t){return t>-ze&&t=10&&e++,e}function Qe(t,e){var n=$e(t),i=Math.pow(10,n),o=t/i;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function tn(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 en(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||o&&d(o,s)<0)){var l=n.getShallow(s,e);null!=l&&(r[t[a][0]]=l)}}return r}}var Un=Yn([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Xn=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Un(this,t,e)},t}(),Zn=Mn(),jn=function(t,e,n,i){if(i){var o=Zn(i);o.dataIndex=n,o.dataType=e,o.seriesIndex=t,o.ssrType="chart","group"===i.type&&i.traverse((function(i){var o=Zn(i);o.seriesIndex=t,o.dataIndex=n,o.dataType=e,o.ssrType="chart"}))}},qn=1,Kn={},Jn=Mn(),$n=Mn(),Qn=0,ti=1,ei=2,ni=["emphasis","blur","select"],ii=["normal","emphasis","blur","select"],oi=10,ri=9,ai="highlight",si="downplay",li="select",ui="unselect",ci="toggleSelect";function di(t){return null!=t&&"none"!==t}function hi(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function pi(t){hi(t,"emphasis",ei)}function fi(t){t.hoverState===ei&&hi(t,"normal",Qn)}function gi(t){hi(t,"blur",ti)}function yi(t){t.hoverState===ti&&hi(t,"normal",Qn)}function mi(t){t.selected=!0}function vi(t){t.selected=!1}function xi(t,e,n){e(t,n)}function _i(t,e,n){xi(t,e,n),t.isGroup&&t.traverse((function(t){xi(t,e,n)}))}function bi(t,e){switch(e){case"emphasis":t.hoverState=ei;break;case"normal":t.hoverState=Qn;break;case"blur":t.hoverState=ti;break;case"select":t.selected=!0}}function Si(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&d(n,"select")>=0,r=!1;if(t instanceof y){var a=Jn(t),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(di(s)||di(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(r=!0,i=f({},i),(u=f({},u)).fill=s):!di(u.fill)&&di(s)?(r=!0,i=f({},i),(u=f({},u)).fill=m(s)):!di(u.stroke)&&di(l)&&(r||(i=f({},i),u=f({},u)),u.stroke=m(l)),i.style=u}}if(i&&null==i.z2){r||(i=f({},i));var c=t.z2EmphasisLift;i.z2=t.z2+(null!=c?c:oi)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=d(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 Bi(t,e,n){Ui(t,!0),_i(t,wi),Fi(t,e,n)}function Gi(t,e,n,i){i?function(t){Ui(t,!1)}(t):Bi(t,e,n)}function Fi(t,e,n){var i=Zn(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var Wi=["emphasis","blur","select"],Hi={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Yi(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:r,force:!!r||!!a,setToFinal:!c,scope:t,during:a};u?e.animateFrom(n,h):e.animateTo(n,h)}else e.stopAnimation(),!u&&e.attr(n),a&&a(1),r&&r()}function $i(t,e,n,i,o,r){Ji("update",t,e,n,i,o,r)}function Qi(t,e,n,i,o,r){Ji("enter",t,e,n,i,o,r)}function to(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 So(t){return!t.isGroup}function wo(t,e,n){if(t&&e){var i,o=(i={},t.traverse((function(t){So(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(So(t)&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),$i(t,i,n,Zn(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 Mo(t,e){return i(t,(function(t){var n=t[0];n=ro(n,e.x),n=ao(n,e.x+e.width);var i=t[1];return i=ro(i,e.y),[n,i=ao(i,e.y+e.height)]}))}function Io(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),P(o,n),new S(i)):ho(t.replace("path://",""),i,n,"center")}function Do(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=Co(f,g,u,c)/p;if(y<0||y>1)return!1;var m=Co(f,g,d,h)/p;return!(m<0||m>1)}function Co(t,e,n,i){return t*i-n*e}function Ao(t){var n=t.itemTooltipOption,i=t.componentModel,o=t.itemName,r=e(n)?{formatter:n}:n,s=i.mainType,l=i.componentIndex,u={componentType:s,name:o,$vars:["name"]};u[s+"Index"]=l;var c=t.formatterParamsExtra;c&&a(x(c),(function(t){N(u,t)||(u[t]=c[t],u.$vars.push(t))}));var d=Zn(t.el);d.componentMainType=s,d.componentIndex=l,d.tooltipConfig={name:o,option:P({content:o,formatterParams:u},r)}}function Lo(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function ko(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:Io,linePolygonIntersect:Do,lineLineIntersect:To,setTooltipConfig:Ao,traverseElements:ko,Group:U,Image:S,Text:X,Circle:R,Ellipse:E,Sector:V,Ring:z,Polygon:B,Polyline:G,Rect:F,Line:W,BezierCurve:H,Arc:Y,IncrementalDisplayable:Z,CompoundPath:j,LinearGradient:q,RadialGradient:K,BoundingRect:J,OrientedBoundingRect:$,Point:Q,Path:y},Symbol.toStringTag,{value:"Module"}));var No={};function Oo(t,e){for(var n=0;n-1?hr:fr;function vr(t,e){t=t.toUpperCase(),yr[t]=new lr(e),gr[t]=e}function xr(t){return yr[t]}vr(pr,{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:". "}}}}),vr(hr,{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 _r=1e3,br=60*_r,Sr=60*br,wr=24*Sr,Mr=365*wr,Ir={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}"},Dr="{yyyy}-{MM}-{dd}",Tr={year:"{yyyy}",month:"{yyyy}-{MM}",day:Dr,hour:Dr+" "+Ir.hour,minute:Dr+" "+Ir.minute,second:Dr+" "+Ir.second,millisecond:Ir.none},Cr=["year","month","day","hour","minute","second","millisecond"],Ar=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Lr(t,e){return"0000".substr(0,e-(t+="").length)+t}function kr(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 Pr(t){return t===kr(t)}function Nr(t,e,n,i){var o=Je(t),r=o[Er(n)](),a=o[Vr(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[zr(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[Br(n)](),d=(c-1)%12+1,h=o[Gr(n)](),p=o[Fr(n)](),f=o[Wr(n)](),g=(i instanceof lr?i:xr(i||mr)||yr[fr]).getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),v=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,Lr(r%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,m[a-1]).replace(/{MM}/g,Lr(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Lr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,v[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Lr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Lr(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Lr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Lr(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Lr(f,3)).replace(/{S}/g,f+"")}function Or(t,e){var n=Je(t),i=n[Vr(e)]()+1,o=n[zr(e)](),r=n[Br(e)](),a=n[Gr(e)](),s=n[Fr(e)](),l=0===n[Wr(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 Rr(t,e,n){var i=u(t)?Je(t):t;switch(e=e||Or(t,n)){case"year":return i[Er(n)]();case"half-year":return i[Vr(n)]()>=6?1:0;case"quarter":return Math.floor((i[Vr(n)]()+1)/4);case"month":return i[Vr(n)]();case"day":return i[zr(n)]();case"half-day":return i[Br(n)]()/24;case"hour":return i[Br(n)]();case"minute":return i[Gr(n)]();case"second":return i[Fr(n)]();case"millisecond":return i[Wr(n)]()}}function Er(t){return t?"getUTCFullYear":"getFullYear"}function Vr(t){return t?"getUTCMonth":"getMonth"}function zr(t){return t?"getUTCDate":"getDate"}function Br(t){return t?"getUTCHours":"getHours"}function Gr(t){return t?"getUTCMinutes":"getMinutes"}function Fr(t){return t?"getUTCSeconds":"getSeconds"}function Wr(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Hr(t){return t?"setUTCFullYear":"setFullYear"}function Yr(t){return t?"setUTCMonth":"setMonth"}function Ur(t){return t?"setUTCDate":"setDate"}function Xr(t){return t?"setUTCHours":"setHours"}function Zr(t){return t?"setUTCMinutes":"setMinutes"}function jr(t){return t?"setUTCSeconds":"setSeconds"}function qr(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Kr(t){if(!on(t))return e(t)?t:"-";var n=(t+"").split(".");return n[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(n.length>1?"."+n[1]:"")}function Jr(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 $r=ot;function Qr(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?Je(t):t;if(!isNaN(+s))return Nr(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=nn(t);return o(l)?Kr(l):c(t)?i(t):"boolean"==typeof t?t+"":"-"}var ta=["a","b","c","d","e","f","g"],ea=function(t,e){return"{"+t+(null==e?"":e)+"}"};function na(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 ua=la;function ca(t,e,n){n=$r(n||0);var i=e.width,o=e.height,r=Fe(t.left,i),a=Fe(t.top,o),s=Fe(t.right,i),l=Fe(t.bottom,o),u=Fe(t.width,i),c=Fe(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 J(r+n[3],a+n[0],u,c);return f.margin=n,f}function da(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 J(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=ca(P({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 ha(t){var e=t.layoutMode||t.constructor.layoutMode;return s(e)?e:e?{type:e}:null}function pa(t,e,n){var i=n&&n.ignoreSize;!o(i)&&(i=[i,i]);var r=s(sa[0],0),a=s(sa[1],1);function s(n,o){var r={},a=0,s={},c=0;if(ra(n,(function(e){s[e]=t[e]})),ra(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},n.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Ln(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},n.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")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=((i=n.prototype).type="component",i.id="",i.name="",i.mainType="",i.subType="",void(i.componentIndex=0)),n}(lr);Bn(ma,lr),Hn(ma),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Vn(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var r=Vn(n).main;t.hasSubTypes(n)&&e[r]&&(o=e[r](i))}return o}}(ma),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 s=function(t){var i={},o=[];return a(t,(function(r){var s=n(i,r),l=function(t,e){var n=[];return a(t,(function(t){d(e,t)>=0&&n.push(t)})),n}(s.originalDeps=e(r),t);s.entryCount=l.length,0===s.entryCount&&o.push(r),a(l,(function(t){d(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);d(e.successor,t)<0&&e.successor.push(r)}))})),{graph:i,noEntryList:o}}(i),l=s.graph,u=s.noEntryList,c={};for(a(t,(function(t){c[t]=!0}));u.length;){var h=u.pop(),p=l[h],f=!!c[h];f&&(o.call(r,h,p.originalDeps.slice()),delete c[h]),a(p.successor,f?y:g)}a(c,(function(){throw new Error("")}))}function g(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function y(t){c[t]=!0,g(t)}}}(ma,(function(t){var e=[];a(ma.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=i(e,(function(t){return Vn(t).main})),"dataset"!==t&&d(e,"dataset")<=0&&e.unshift("dataset");return e}));const va=ma;var xa="";"undefined"!=typeof navigator&&(xa=navigator.platform||"");var _a="rgba(0, 0, 0, 0.2)";const ba={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:_a,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:_a,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:_a,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:_a,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:_a,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:_a,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:xa.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Sa=r(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),wa="original",Ma="arrayRows",Ia="objectRows",Da="keyedColumns",Ta="typedArray",Ca="unknown",Aa="column",La="row",ka={Must:1,Might:2,Not:3},Pa=Mn();function Na(t,e,n){var i={},o=Ra(e);if(!o||!t)return i;var r,l,u=[],c=[],d=e.ecModel,h=Pa(d).datasetMap,p=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),a(t,(function(e,n){var o=s(e)?e:t[n]={name:e};"ordinal"===o.type&&null==r&&(r=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 Za="\0_ec_inner",ja=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new lr(i),this._locale=new lr(o),this._optionManager=r},i.prototype.setOption=function(t,e,n){var i=Ja(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},i.prototype.resetOption=function(t,e){return this._resetOption(t,Ja(e))},i.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)):Fa(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 s=i.getMediaOption(this);s.length&&a(s,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},i.prototype.mergeOption=function(t){this._mergeOption(t,null)},i.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,o=this._componentsCount,l=[],u=r(),c=e&&e.replaceMergeMainTypeMap;Pa(this).datasetMap=r(),a(t,(function(t,e){null!=t&&(va.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){va.hasClass(e)&&!u.get(e)&&(l.push(e),u.set(e,!0))})),va.topologicalTravel(l,va.getAllClassMainTypes(),(function(e){var r=function(t,e,n){var i=za.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}(this,e,hn(t[e])),l=i.get(e),u=l?c&&c.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=mn(l,r,u);(function(t,e,n){a(t,(function(t){var i=t.newOption;s(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,va),n[e]=null,i.set(e,null),o.set(e,0);var h,p=[],g=[],y=0;a(d,(function(t,n){var i=t.existing,o=t.newOption;if(o){var r="series"===e,a=va.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&&Ba(this)}),this),this._seriesIndices||Ba(this)},i.prototype.getOption=function(){var t=nt(this.option);return a(t,(function(e,n){if(va.hasClass(n)){for(var i=hn(e),o=i.length,r=!1,a=o-1;a>=0;a--)i[a]&&!Sn(i[a])?r=!0:(i[a]=null,!r&&o--);i.length=o,t[n]=i}})),delete t[Za],t},i.prototype.getTheme=function(){return this._theme},i.prototype.getLocaleModel=function(){return this._locale},i.prototype.setUpdatePayload=function(t){this._payload=t},i.prototype.getUpdatePayload=function(){return this._payload},i.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}const ss=rs;var ls=a,us=s,cs=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function ds(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=cs.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=Xe(p,m),f=m;break}}}return i[0]=p,i[1]=f,i}))}))}var As,Ls,ks,Ps,Ns,Os=function(t){this.data=t.data||(t.sourceFormat===Da?{}:[]),this.sourceFormat=t.sourceFormat||Ca,this.seriesLayoutBy=t.seriesLayoutBy||Aa,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},t.prototype.getRawValue=function(t,e){return Qs(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function nl(t){var e,n;return s(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function il(t){return new ol(t)}var ol=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):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,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}},cl=function(){function t(t,e){if(!u(e)){ln("")}this._opFn=ul[t],this._rvalFloat=nn(e)}return t.prototype.evaluate=function(t){return u(t)?this._opFn(t,this._rvalFloat):this._opFn(nn(t),this._rvalFloat)},t}(),dl=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,n){var i=u(t)?t:nn(t),o=u(n)?n:nn(n),r=isNaN(i),a=isNaN(o);if(r&&(i=this._incomparable),a&&(o=this._incomparable),r&&a){var s=e(t),l=e(n);s&&(i=l?t:0),l&&(o=s?n:0)}return io?-this._resultLT:0},t}(),hl=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=nn(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=nn(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function pl(t,e){return"eq"===t||"ne"===t?new hl("eq"===t,e):N(ul,t)?new cl(t,e):null}var fl=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 al(t,e)},t}();function gl(t){if(!bl(t.sourceFormat)){ln("")}return t.data}function yl(t){var e=t.sourceFormat,n=t.data;if(!bl(e)){ln("")}if(e===Ma){for(var i=[],o=0,r=n.length;o65535?Ml:Il}function Ll(t,e,n,i,o){var r=Cl[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,n){for(var o=this._provider,r=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=i(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=1/0);for(var r=1/0,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(Al(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.downSample=function(t,e,n,i){for(var o=this.clone([t],!0),r=o._chunks,a=[],s=Math.floor(1/e),l=r[t],u=this.count(),c=o._rawExtent[t]=[1/0,-1/0],d=new(Al(this._rawCount))(Math.ceil(u/s)),h=0,p=0;pu-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 al(t[i],this._dimensions[i])}Sl={arrayRows:t,objectRows:function(t,e,n,i){return al(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var o=t&&(null==t.value?t:t.value);return al(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),Pl=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(Ol(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)?Ta:wa,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?[Es(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=[Es(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&&Rl("")}var r,s=[],l=[];return a(t,(function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||Rl(""),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=hn(t),o=i.length;o||ln("");for(var r=0,a=o;r1||n>0&&!t.noHeader;return a(t.blocks,(function(t){var n=Hl(t);n>=e&&(e=n+ +(i&&(!n||Fl(t)&&!t.noHeader)))})),e}return 0}function Yl(t,e,n,i){var r,s=e.noHeader,u=(r=Hl(e),{html:zl[r],richText:Bl[r]}),c=[],d=e.blocks||[];l(!d||o(d)),d=d||[];var h=t.orderMode;if(e.sortBlocks&&h){d=d.slice();var p={valueAsc:"asc",valueDesc:"desc"};if(N(p,h)){var g=new dl(p[h],null);d.sort((function(t,e){return g.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===h&&d.reverse()}a(d,(function(n,o){var r=e.valueFormatter,a=Wl(n)(r?f(f({},t),{valueFormatter:r}):t,n,o>0?u.html:0,i);null!=a&&c.push(a)}));var y="richText"===t.renderMode?c.join(u.richText):Zl(c.join(""),s?n:u.html);if(s)return y;var m=Qr(e.header,"ordinal",t.useUTC),v=Vl(i,t.renderMode).nameStyle;return"richText"===t.renderMode?jl(t,m,v)+u.richText+y:Zl('
'+rt(m)+"
"+y,n)}function Ul(t,e,n,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],i(t,(function(t,e){return Qr(t,o(g)?g[e]:g,d)}))};if(!s||!l){var p=u?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),f=s?"":Qr(c,"ordinal",d),g=e.valueType,y=l?[]:h(e.value,e.dataIndex),m=!u||!s,v=!u&&s,x=Vl(r,a),_=x.nameStyle,b=x.valueStyle;return"richText"===a?(u?"":p)+(s?"":jl(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)):Zl((u?"":p)+(s?"":function(t,e,n){return''+rt(t)+""}(f,!u,_))+(l?"":function(t,e,n,r){var a=n?"10px":"20px",s=e?"float:right;margin-left:"+a:"";return t=o(t)?t:[t],''+i(t,(function(t){return rt(t)})).join("  ")+""}(y,m,v,b)),n)}}function Xl(t,e,n,i,o,r){if(t)return Wl(t)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function Zl(t,e){return'
'+t+'
'}function jl(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function ql(t,e){return ia(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Kl(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Jl=function(){function t(){this.richTextStyles={},this._nextStyleNameId=rn()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,n,i){var o="richText"===i?this._generateStyleName():null,r=function(t,n){var i=e(t)?{color:t,extraCssText:n}:t||{},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:t,renderMode:i,markerId:o});return e(r)?r:(this.richTextStyles[o]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};o(e)?a(e,(function(t){return f(n,t)})):f(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function $l(t){var e,i,r,s,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=ql(l,u);if(p>1||g&&!p){var m=function(t,e,i,o,r){var s=e.getData(),l=n(t,(function(t,e,n){var i=s.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),u=[],c=[],d=[];function h(t,e){var n=s.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(l?d.push(Gl("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(u.push(t),c.push(n.type)))}return o.length?a(o,(function(t){h(Qs(s,i,t),t)})):a(t,h),{inlineValues:u,inlineValueTypes:c,blocks:d}}(f,l,u,h,y);e=m.inlineValues,i=m.inlineValueTypes,r=m.blocks,s=m.inlineValues[0]}else if(p){var v=d.getDimensionInfo(h[0]);s=e=Qs(d,u,h[0]),i=v.type}else s=e=g?f[0]:f;var x=bn(l),_=x&&l.name||"",b=d.getName(u),S=c?_:b;return Gl("section",{header:_,noHeader:c||!x,sortParam:s,blocks:[Gl("nameValue",{markerType:"item",markerColor:y,name:S,noName:!tt(S),value:e,valueType:i,dataIndex:u})].concat(r||[])})}var Ql=Mn();function tu(t,e){return t.getName(e)||t.getId(e)}var eu="__universalTransitionEnabled",nu=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var i;return t(n,e),n.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=il({count:ou,reset:ru}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Ql(this).sourceManager=new Pl(this)).prepareSource();var i=this.getInitialData(t,n);su(i,this),this.dataTask.context.data=i,Ql(this).dataBeforeProcessed=i,iu(this),this._initSelectedMapFromData(i)},n.prototype.mergeDefaultAndTheme=function(t,e){var n=ha(this),i=n?fa(t):{},o=this.subType;va.hasClass(o)&&(o+="Series"),et(t,e.getTheme().get(this.subType)),et(t,this.getDefaultOption()),pn(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&pa(t,i,n)},n.prototype.mergeOption=function(t,e){t=et(this.option,t,!0),this.fillDataTextStyle(t.data);var n=ha(this);n&&pa(this.option,t,n);var i=Ql(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);su(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ql(this).dataBeforeProcessed=o,iu(this),this._initSelectedMapFromData(o)},n.prototype.fillDataTextStyle=function(t){if(t&&!st(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,o=Ya.prototype.getColorFromPalette.call(this,t,e,n);return o||(o=i.getColorFromPalette(t,e,n)),o},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},n.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},n.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[tu(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this[eu])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},n.prototype._innerSelect=function(t,e){var n,i,o=this.option,r=o.selectedMode,a=e.length;if(r&&a)if("series"===r)o.selectedMap="all";else if("multiple"===r){s(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,u=0;u0&&this._innerSelect(t,e)}},n.registerClass=function(t){return va.registerClass(t)},n.protoInitialize=((i=n.prototype).type="series.__base__",i.seriesIndex=0,i.ignoreStyleOnData=!1,i.hasSymbolVisual=!1,i.defaultSymbol="circle",i.visualStyleAccessPath="itemStyle",void(i.visualDrawType="fill")),n}(va);function iu(t){var e=t.name;bn(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return a(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function ou(t){return t.model.getRawData().count()}function ru(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),au}function au(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function su(t,e){a(dt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,at(lu,e))}))}function lu(t,e){var n=uu(t);return n&&n.setOutputEnd((e||this).count()),e}function uu(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(nu,el),it(nu,Ya),Bn(nu,va);const cu=nu;var du=function(){function t(){this.group=new U,this.uid=cr("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}();zn(du),Hn(du);const hu=du;function pu(){var t=Mn();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"}}var fu=Mn(),gu=pu(),yu=function(){function t(){this.group=new U,this.uid=cr("viewChart"),this.renderTask=il({plan:xu,reset:_u}),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&&vu(o,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var o=t.getData(i&&i.dataType);o&&vu(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){ko(this.group,t)},t.markUpdateMethod=function(t,e){fu(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function mu(t,e,n){t&&Xi(t)&&("emphasis"===e?Di:Ti)(t,n)}function vu(t,e,n){var i=wn(t,e),o=e&&null!=e.highlightKey?function(t){var e=Kn[t];return null==e&&qn<=32&&(e=Kn[t]=qn++),e}(e.highlightKey):null;null!=i?a(hn(i),(function(e){mu(t.getItemGraphicEl(e),n,o)})):t.eachItemGraphicEl((function(t){mu(t,n,o)}))}function xu(t){return gu(t.model)}function _u(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,a=t.view,s=o&&fu(o).updateMethod,l=r?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,o),bu[l]}zn(yu),Hn(yu);var bu={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Su=yu;var wu="\0__throttleOriginMethod",Mu="\0__throttleRate",Iu="\0__throttleType";function Du(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 Tu(t,e,n,i){var o=t[e];if(o){var r=o[wu]||o,a=o[Iu];if(o[Mu]!==n||a!==i){if(null==n||!i)return t[e]=r;(o=t[e]=Du(r,n,"debounce"===i))[wu]=r,o[Iu]=i,o[Mu]=n}return o}}function Cu(t,e){var n=t[e];n&&n[wu]&&(n.clear&&n.clear(),t[e]=n[wu])}var Au=Mn(),Lu={itemStyle:Yn(or,!0),lineStyle:Yn(er,!0)},ku={lineStyle:"stroke",itemStyle:"fill"};function Pu(t,e){var n=t.visualStyleMapper||Lu[e];return n||(console.warn("Unknown style type '"+e+"'."),Lu.itemStyle)}function Nu(t,e){var n=t.visualDrawType||ku[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var Ou={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=t.getModel(i),r=Pu(t,i)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Nu(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(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)}}}},Ru=new lr,Eu={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=Pu(t,i),r=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){Ru.option=n[i];var a=o(Ru),s=t.ensureUniqueItemVisual(e,"style");f(s,a),Ru.option.decal&&(t.setItemVisual(e,"decal",Ru.option.decal),Ru.option.decal.dirty=!0),r in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Vu={performRawSeries:!0,overallReset:function(t){var e=r();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)),Au(t).scope=o}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},o=e.getData(),r=Au(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Nu(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)}}))}}))}},zu=Math.PI;var Bu=function(){function t(t,e,n,i){this._stageTaskMap=r(),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=r();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;a(this._allHandlers,(function(i){var o=t.get(i.uid)||t.set(i.uid,{});l(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,o,e,n),i.overallReset&&this._createOverallStageTask(i,o,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 s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}a(t,(function(t,a){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){s(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(a,l){s(i,a)&&a.dirty();var u=r.getPerformArgs(a,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(a.context.model),r.updatePayload(a,n),a.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,a=e.seriesTaskMap,s=e.seriesTaskMap=r(),l=t.seriesType,u=t.getTargetSeries;function c(e){var r=e.uid,l=s.set(r,a&&a.get(r)||il({plan:Yu,reset:Uu,count:ju}));l.context={model:e,ecModel:n,api:i,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,i){var o=this,s=e.overallTask=e.overallTask||il({reset:Gu});s.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o};var u=s.agentStubMap,c=s.agentStubMap=r(),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)||(f=!0,il({reset:Fu,onDirty:Hu})));n.context={model:t,overallProgress:p},n.agent=s,n.__block=p,o._pipe(t,n)}l(!t.createOnAllSeries,""),d?n.eachRawSeriesByType(d,g):h?h(n,i).each(g):(p=!1,a(n.getSeries(),g)),f&&s.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:qu(t)}),t.uid=cr("stageHandler"),e&&(t.visualType=e),t},t}();function Gu(t){t.overallReset(t.ecModel,t.api,t.payload)}function Fu(t){return t.overallProgress&&Wu}function Wu(){this.agent.dirty(),this.getDownstream().dirty()}function Hu(){this.agent&&this.agent.dirty()}function Yu(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Uu(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=hn(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?i(e,(function(t,e){return Zu(e)})):Xu}var Xu=Zu(0);function Zu(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}},t.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]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),cc=["symbol","symbolSize","symbolRotate","symbolOffset"],dc=cc.concat(["symbolKeepAspect"]),hc={createOnAllSeries:!0,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()}}},l.prototype.getDom=function(){return this._dom},l.prototype.getId=function(){return this.id},l.prototype.getZr=function(){return this._zr},l.prototype.isSSR=function(){return this._ssr},l.prototype.setOption=function(t,e,n){if(!this[Hc])if(this._disposed)this.id;else{var i,o,r;if(s(e)&&(n=e.lazyUpdate,i=e.silent,o=e.replaceMerge,r=e.transition,e=e.notMerge),this[Hc]=!0,!this._model||e){var a=new ss(this._api),l=this._theme,u=this._model=new $a;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,a)}this._model.setOption(t,{replaceMerge:o},wd);var c={seriesTransition:r,optionChanged:!0};if(n)this[Yc]={silent:i,updateParams:c},this[Hc]=!1,this.getZr().wakeUp();else{try{Jc(this),td.update.call(this,null,c)}catch(d){throw this[Yc]=null,this[Hc]=!1,d}this._ssr||this._zr.flush(),this[Yc]=null,this[Hc]=!1,od.call(this,i),rd.call(this,i)}}},l.prototype.setTheme=function(){},l.prototype.getModel=function(){return this._model},l.prototype.getOption=function(){return this._model&&this._model.getOption()},l.prototype.getWidth=function(){return this._zr.getWidth()},l.prototype.getHeight=function(){return this._zr.getHeight()},l.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||h.hasGlobalWindow&&window.devicePixelRatio||1},l.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},l.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},l.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},l.prototype.getSvgDataURL=function(){if(h.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return a(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},l.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;a(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 a(i,(function(t){t.group.ignore=!1})),r}this.id},l.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,o=Math.max,r=1/0;if(Cd[n]){var s=r,l=r,u=-1/0,c=-1/0,d=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();a(Td,(function(r,a){if(r.group===n){var h=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(nt(t)),p=r.getDom().getBoundingClientRect();s=i(p.left,s),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)-(s*=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 a(d,(function(t){var e=t.left-s,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}})),a(d,(function(t){var e=new S({style:{x:t.left*h-s,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},l.prototype.convertToPixel=function(t,e){return ed(this,"convertToPixel",t,e)},l.prototype.convertFromPixel=function(t,e){return ed(this,"convertFromPixel",t,e)},l.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=Dn(this._model,t);return a(i,(function(t,i){i.indexOf("Models")>=0&&a(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},l.prototype.getVisual=function(t,e){var n=Dn(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?fc(i,o,e):gc(i,e)},l.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},l.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},l.prototype._initEvents=function(){var t,e,n,i=this;a(xd,(function(t){var e=function(e){var n,o=i.getModel(),r=e.target;if("globalout"===t?n={}:r&&xc(r,(function(t){var e=Zn(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)})),a(bd,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),a(["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?(vc("map","selectchanged",e,i,t),vc("pie","selectchanged",e,i,t)):"select"===t.fromAction?(vc("map","selected",e,i,t),vc("pie","selected",e,i,t)):"unselect"===t.fromAction&&(vc("map","unselected",e,i,t),vc("pie","unselected",e,i,t))}))},l.prototype.isDisposed=function(){return this._disposed},l.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},l.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&kn(this.getDom(),Ld,"");var t=this,e=t._api,n=t._model;a(t._componentsViews,(function(t){t.dispose(n,e)})),a(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 Td[t.id]}},l.prototype.resize=function(t){if(!this[Hc])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[Yc]&&(null==i&&(i=this[Yc].silent),n=!0,this[Yc]=null),this[Hc]=!0;try{n&&Jc(this),td.update.call(this,{type:"resize",animation:f({duration:0},t&&t.animation)})}catch(o){throw this[Hc]=!1,o}this[Hc]=!1,od.call(this,i),rd.call(this,i)}}},l.prototype.showLoading=function(t,e){if(this._disposed)this.id;else if(s(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Dd[t]){var n=Dd[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},l.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},l.prototype.makeActionFromEvent=function(t){var e=f({},t);return e.type=bd[t.type],e},l.prototype.dispatchAction=function(t,e){if(this._disposed)this.id;else if(s(e)||(e={silent:!!e}),_d[t.type]&&this._model)if(this[Hc])this._pendingActions.push(t);else{var n=e.silent;id.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&h.browser.weChat&&this._throttledZrFlush(),od.call(this,n),rd.call(this,n)}},l.prototype.updateLabelLayout=function(){zc.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},l.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()}},l.internalField=function(){function e(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function n(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:r,delay:i.get("delay"),easing:i.get("easing")}:null;e.eachRendered((function(t){if(t.states&&t.states.emphasis){if(to(t))return;if(t instanceof y&&function(t){var e=Jn(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 e=t.prevStates;e&&t.useStates(e)}if(o){t.stateTransition=a;var i=t.getTextContent(),r=t.getTextGuideLine();i&&(i.stateTransition=a),r&&(r.stateTransition=a)}t.__dirty&&n(t)}}))}Jc=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),$c(t,!0),$c(t,!1),e.plan()},$c=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")&&!h.node&&!h.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),zc.trigger("series:afterupdate",e,n,o)},pd=function(t){t[Uc]=!0,t.getZr().wakeUp()},fd=function(t){t[Uc]&&(t.getZr().storage.traverse((function(t){to(t)||n(t)})),t[Uc]=!1)},dd=function(e){return new(function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},i.prototype.enterEmphasis=function(t,n){Di(t,n),pd(e)},i.prototype.leaveEmphasis=function(t,n){Ti(t,n),pd(e)},i.prototype.enterBlur=function(t){Ci(t),pd(e)},i.prototype.leaveBlur=function(t){Ai(t),pd(e)},i.prototype.enterSelect=function(t){Li(t),pd(e)},i.prototype.leaveSelect=function(t){ki(t),pd(e)},i.prototype.getModel=function(){return e.getModel()},i.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},i.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},i}(ts))(e)},hd=function(t){function e(t,e){for(var n=0;n=0)){zd.push(n);var r=tc.wrapStageHandler(n,o);r.__prio=e,r.__raw=n,t.push(r)}}function Gd(t,e){Dd[t]=e}var Fd=function(t){var e=(t=nt(t)).type;e||ln("");var n=e.split(":");2!==n.length&&ln("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,xl.set(e,t)};Vd(Gc,Ou),Vd(Fc,Eu),Vd(Fc,Vu),Vd(Gc,hc),Vd(Fc,pc),Vd(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=Oc(n,e))}));var o=i.getVisual("decal");if(o)i.getVisual("style").decal=Oc(o,e)}}))})),Nd(Ts),Od(900,(function(t){var e=r();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),o=t.getData(),r={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(Cs)})),Gd("default",(function(t,e){P(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 U,i=new F({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var o,r=new X({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:-zu/2,endAngle:-zu/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*zu/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*zu/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})),Ed({type:ai,event:ai,update:ai},ht),Ed({type:si,event:si,update:si},ht),Ed({type:li,event:li,update:li},ht),Ed({type:ui,event:ui,update:ui},ht),Ed({type:ci,event:ci,update:ci},ht),Pd("light",nc),Pd("dark",lc);var Wd=[],Hd={registerPreprocessor:Nd,registerProcessor:Od,registerPostInit:function(t){Rd("afterinit",t)},registerPostUpdate:function(t){Rd("afterupdate",t)},registerUpdateLifecycle:Rd,registerAction:Ed,registerCoordinateSystem:function(t,e){is.register(t,e)},registerLayout:function(t,e){Bd(Md,t,e,1e3,"layout")},registerVisual:Vd,registerTransform:Fd,registerLoading:Gd,registerMap:function(t,e,n){var i=Bc["registerMap"];i&&i(t,e,n)},registerImpl:function(t,e){Bc[t]=e},PRIORITY:Wc,ComponentModel:va,ComponentView:hu,SeriesModel:cu,ChartView:Su,registerComponentModel:function(t){va.registerClass(t)},registerComponentView:function(t){hu.registerClass(t)},registerSeriesModel:function(t){cu.registerClass(t)},registerChartView:function(t){Su.registerClass(t)},registerSubTypeDefaulter:function(t,e){va.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){St(t,e)}};function Yd(t){o(t)?a(t,(function(t){Yd(t)})):d(Wd,t)>=0||(Wd.push(t),g(t)&&(t={install:t}),t.install(Hd))}function Ud(t){return null==t?0:t.length||1}function Xd(t){return t}var Zd=function(){function t(t,e,n,i,o,r){this._old=t,this._new=e,this._oldKeyGetter=n||Xd,this._newKeyGetter=i||Xd,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 ah,sh,lh,uh,ch,dh,hh,ph=s,fh=i,gh="undefined"==typeof Int32Array?Array:Int32Array,yh=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],mh=["_approximateExtent"],vh=function(){function t(t,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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var o=!1;nh(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(o=!0,i=t),i=i||["x","y"];for(var s={},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===wa&&!n.pure)for(var r=[],a=t;a0},t.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():ph(r)&&(r=f({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,ph(e)?f(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){ph(t)?f(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?f(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;jn(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){a(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:fh(this.dimensions,this._getDimInfo,this),this.hostModel)),ch(e,this),e._store=this._store,e},t.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(wt(arguments)))})},t.internalField=(ah=function(t){var e=t._invertedIndicesMap;a(e,(function(n,i){var o=t._dimInfos[i],r=o.ordinalMeta,a=t._store;if(r){n=e[i]=new gh(r.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}();const xh=vh;function _h(t,n){Rs(t)||(t=Vs(t));var i=(n=n||{}).coordDimensions||[],o=n.dimensionsDefine||t.dimensionsDefine||[],l=r(),u=[],c=function(t,e,n,i){var o=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return a(e,(function(t){var e;s(t)&&(e=t.dimsDef)&&(o=Math.max(o,e.length))})),o}(t,i,o,n.dimensionsCount),d=n.canOmitUnusedDimensions&&rh(c),h=o===t.dimensionsDefine,p=h?oh(t):ih(o),g=n.encodeDefine;!g&&n.encodeDefaulter&&(g=n.encodeDefaulter(t,c));for(var y=r(g),m=new Dl(c),v=0;v0&&(i.name=o+(a-1)),a++,e.set(o,a)}}(u),new eh({source:t,dimensions:u,fullDimensionCount:c,dimensionOmitted:d})}function bh(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 Sh=function(t){this.coordSysDims=[],this.axisMap=r(),this.categoryAxisMap=r(),this.coordSysName=t};var wh={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis",Cn).models[0],r=t.getReferringComponents("yAxis",Cn).models[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",r),Mh(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),Mh(r)&&(i.set("y",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis",Cn).models[0];e.coordSysDims=["single"],n.set("single",o),Mh(o)&&(i.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar",Cn).models[0],r=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",a),Mh(r)&&(i.set("radius",r),e.firstCategoryDimIndex=0),Mh(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")),s=e.coordSysDims=r.dimensions.slice();a(r.parallelAxisIndex,(function(t,r){var a=o.getComponent("parallelAxis",t),l=s[r];n.set(l,a),Mh(a)&&(i.set(l,a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=r))}))}};function Mh(t){return"category"===t.get("type")}function Ih(t,n,i){var o,r,s,l=(i=i||{}).byIndex,u=i.stackedCoordDimension;!function(t){return!nh(t.schema)}(n)?(r=n.schema,o=r.dimensions,s=n.store):o=n;var c,d,h,p,f=!(!t||!t.get("stack"));if(a(o,(function(t,n){e(t)&&(o[n]=t={name:t}),f&&!t.isExtraCoord&&(l||c||!t.ordinalMeta||(c=t),d||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(d=t))})),!d||l||c||(l=!0),d){h="__\0ecstackresult_"+t.id,p="__\0ecstackedover_"+t.id,c&&(c.createInvertedIndices=!0);var g=d.coordDim,y=d.type,m=0;a(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,coordDim:p,coordDimIndex:m+1,type:y,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};r?(s&&(v.storeDimIndex=s.ensureCalculationDimension(p,y),x.storeDimIndex=s.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 Dh(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Th(t,e){return Dh(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Ch(t,e,n){n=n||{};var r,s=e.getSourceManager(),l=!1;t?(l=!0,r=Vs(t)):l=(r=s.getSource()).sourceFormat===wa;var u=function(t){var e=t.get("coordinateSystem"),n=new Sh(e),i=wh[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),c=function(t,e){var n,o=t.get("coordinateSystem"),r=is.get(o);return e&&e.coordSysDims&&(n=i(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var o=i.get("type");n.type=Jd(o)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(e,u),d=n.useEncodeDefaulter,h=g(d)?d:d?at(Na,c,e):null,p=_h(r,{coordDimensions:c,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:h,canOmitUnusedDimensions:!l}),f=function(t,e,n){var i,o;return n&&a(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,n.createInvertedIndices,u),y=l?null:s.getSharedDataStore(p),m=Ih(e,{schema:p,store:y}),v=new xh(p,e);v.setCalculationInfo(m);var x=null!=f&&function(t){if(t.sourceFormat===wa){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}();Hn(Ah);const Lh=Ah;var kh=0;function Ph(t){return s(t)&&null!=t.value?t.value:t+""}const Nh=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++kh}return t.createByAxisModel=function(e){var n=e.option,o=n.data,r=o&&i(o,Ph);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var n,i=this._needCollect;if(!e(t)&&!i)return t;if(i&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var o=this._getOrCreateMap();return null==(n=o.get(t))&&(i?(n=this.categories.length,this.categories[n]=t,o.set(t,n)):n=NaN),n},t.prototype._getOrCreateMap=function(){return this._map||(this._map=r(this.categories))},t}();function Oh(t){return"interval"===t.type||"log"===t.type}function Rh(t,e,n,i){var o={},r=t[1]-t[0],a=o.interval=Qe(r/e,!0);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]),zh(t,0,e),zh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[We(Math.ceil(t[0]/a)*a,s),We(Math.floor(t[1]/a)*a,s)],t),o}function Eh(t){var e=Math.pow(10,$e(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,We(n*e)}function Vh(t){return Ye(t)+2}function zh(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Bh(t,e){return t>=e[0]&&t<=e[1]}function Gh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Fh(t,e){return t*(e[1]-e[0])+e[0]}var Wh=function(n){function r(t){var e=n.call(this,t)||this;e.type="ordinal";var r=e.getSetting("ordinalMeta");return r||(r=new Nh({})),o(r)&&(r=new Nh({categories:i(r,(function(t){return s(t)?t.value:t}))})),e._ordinalMeta=r,e._extent=e.getSetting("extent")||[0,r.categories.length-1],e}return t(r,n),r.prototype.parse=function(t){return null==t?NaN:e(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},r.prototype.contain=function(t){return Bh(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},r.prototype.normalize=function(t){return Gh(t=this._getTickNumber(this.parse(t)),this._extent)},r.prototype.scale=function(t){return t=Math.round(Fh(t,this._extent)),this.getRawOrdinalNumber(t)},r.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},r.prototype.getMinorTicks=function(t){},r.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},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r.prototype.calcNiceTicks=function(){},r.prototype.calcNiceExtent=function(){},r.type="ordinal",r}(Lh);Lh.registerClass(Wh);const Hh=Wh;var Yh=We,Uh=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return t(n,e),n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return Bh(t,this._extent)},n.prototype.normalize=function(t){return Gh(t,this._extent)},n.prototype.scale=function(t){return Fh(t,this._extent)},n.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},n.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},n.prototype.getInterval=function(){return this._interval},n.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Vh(t)},n.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:Yh(s+e,o)}):r.push({value:n[1]})),r},n.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 a(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=Fe(t.get("barWidth"),i),p=Fe(t.get("barMaxWidth"),i),f=Fe(t.get("barMinWidth")||(rp(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:$h(o),stackId:Jh(t)})})),ep(n)}function ep(t){var e={};a(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 a(e,(function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,r=t.categoryGap;if(null==r){var s=x(i).length;r=Math.max(35-4*s,15)+"%"}var l=Fe(r,o),u=Fe(t.gap,1),c=t.remainedWidth,d=t.autoWidthCount,h=(c-l)/(d+(d-1)*u);h=Math.max(h,0),a(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;a(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;a(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:o,offset:g,width:t.width},g+=t.width*(1+u)}))})),n}function np(t,e){var n=Qh(t,e),i=tp(n);a(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),o=Jh(t),r=i[$h(n)][o],a=r.offset,s=r.width;e.setLayout({bandWidth:r.bandWidth,offset:a,size:s})}))}function ip(t){return{seriesType:t,plan:pu(),reset:function(t){if(op(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=Dh(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),d=o.isHorizontal(),h=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,o),p=rp(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&&qh(3*o),u=p&&s&&qh(3*o),v=p&&qh(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=0;--u)if(c[d]){s=c[d];break}s=s||l.none}if(o(s)){var h=null==t.level?0:t.level>=0?t.level:s.length+t.level;s=s[h=Math.min(h,s.length-1)]}}return Nr(new Date(t.value),s,a,r)}(t,n,i,this.getSetting("locale"),r)},r.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var o=this.getSetting("useUTC"),r=function(t,e,n,o){var r=1e4,a=Ar,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(i(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=sp.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 up(t){return(t/=30*wr)>6?6:t>3?3:t>2?2:1}function cp(t){return(t/=Sr)>12?12:t>6?6:t>3.5?4:t>2?2:1}function dp(t,e){return(t/=e?br:_r)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function hp(t){return Qe(t,!0)}function pp(t,e,n){var i=new Date(t);switch(kr(e)){case"year":case"month":i[Yr(n)](0);case"day":i[Ur(n)](1);case"hour":i[Xr(n)](0);case"minute":i[Zr(n)](0);case"second":i[jr(n)](0),i[qr(n)](0)}return i.getTime()}Lh.registerClass(ap);const fp=ap;var gp=Lh.prototype,yp=Xh.prototype,mp=We,vp=Math.floor,xp=Math.ceil,_p=Math.pow,bp=Math.log,Sp=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Xh,t._interval=0,t}return t(n,e),n.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,o=e.getExtent(),r=yp.getTicks.call(this,t);return i(r,(function(t){var e=t.value,i=We(_p(this.base,e));return i=e===n[0]&&this._fixMin?Mp(i,o[0]):i,{value:i=e===n[1]&&this._fixMax?Mp(i,o[1]):i}}),this)},n.prototype.setExtent=function(t,e){var n=bp(this.base);t=bp(Math.max(0,t))/n,e=bp(Math.max(0,e))/n,yp.setExtent.call(this,t,e)},n.prototype.getExtent=function(){var t=this.base,e=gp.getExtent.call(this);e[0]=_p(t,e[0]),e[1]=_p(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=Mp(e[0],n[0])),this._fixMax&&(e[1]=Mp(e[1],n[1])),e},n.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=bp(t[0])/bp(e),t[1]=bp(t[1])/bp(e),gp.unionExtent.call(this,t)},n.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},n.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i,o=(i=n,Math.pow(10,$e(i)));for(t/n*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var r=[We(xp(e[0]/o)*o),We(vp(e[1]/o)*o)];this._interval=o,this._niceExtent=r}},n.prototype.calcNiceExtent=function(t){yp.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return Bh(t=bp(t)/bp(this.base),this._extent)},n.prototype.normalize=function(t){return Gh(t=bp(t)/bp(this.base),this._extent)},n.prototype.scale=function(t){return t=Fh(t,this._extent),_p(this.base,t)},n.type="log",n}(Lh),wp=Sp.prototype;function Mp(t,e){return mp(t,Ye(e))}wp.getMinorTicks=yp.getMinorTicks,wp.getLabel=yp.getLabel,Lh.registerClass(Sp);const Ip=Sp;var Dp=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[Cp[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[Tp[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),Tp={min:"_determinedMin",max:"_determinedMax"},Cp={min:"_dataMin",max:"_dataMax"};function Ap(t,e,n){var i=t.rawExtentInfo;return i||(i=new Dp(t,e,n),t.rawExtentInfo=i,i)}function Lp(t,e){return null==e?null:It(e)?NaN:t.parse(e)}function kp(t,e){var n=t.type,i=Ap(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var o=i.min,r=i.max,s=e.ecModel;if(s&&"time"===n){var l=Qh("bar",s),u=!1;if(a(l,(function(t){u=u||t.getBaseAxis()===e.axis})),u){var c=tp(l),d=function(t,e,n,i){var o=n.axis.getExtent(),r=o[1]-o[0],s=function(t,e,n){if(t&&e){var i=t[$h(e)];return null!=i&&null!=n?i[Jh(n)]:i}}(i,n.axis);if(void 0===s)return{min:t,max:e};var l=1/0;a(s,(function(t){l=Math.min(t.offset,l)}));var u=-1/0;a(s,(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],fixMin:i.minFixed,fixMax:i.maxFixed}}function Pp(t,e){var n=e,i=kp(t,n),o=i.extent,r=n.get("splitNumber");t instanceof Ip&&(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 Np(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Hh({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new fp({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Lh.getClass(e)||Xh)}}function Op(t){var n,i,o=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(i=o,function(e,n){return t.scale.getFormattedLabel(e,n,i)}):e(o)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(o):g(o)?(n=o,function(e,i){return null!=r&&(i=e.value-r),n(Rp(t,e),i,null!=e.level?{level:e.level}:null)}):function(e){return t.scale.getLabel(e)}}function Rp(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function Ep(t){var e=t.get("interval");return null==e?"auto":e}function Vp(t){return"category"===t.type&&0===Ep(t.getLabelModel())}function zp(t,e){var n={};return a(t.mapDimensionsAll(e),(function(e){n[Th(t,e)]=!0})),x(n)}var Bp=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),Gp=[];function Fp(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 a(i,(function(t){var e=t.geometry,i=e.encodeOffsets,o=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=qp(o,i,n);break;case"Polygon":case"MultiLineString":jp(o,i,n);break;case"MultiPolygon":a(o,(function(t,e){return jp(t,i[e],n)}))}})),e.UTF8Encoding=!1,e}(t),i(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 Yp(r[0],r.slice(1)));break;case"MultiPolygon":a(i.coordinates,(function(t){t[0]&&o.push(new Yp(t[0],t.slice(1)))}));break;case"LineString":o.push(new Up([i.coordinates]));break;case"MultiLineString":o.push(new Up(i.coordinates))}var s=new Xp(n[e||"name"],o,n.cp);return s.properties=n,s}))}var Jp=Mn();function $p(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=tf(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=Op(t);return{labels:i(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function Qp(t,e){return"category"===t.type?function(t,e){var n,o,r=ef(t,"ticks"),a=Ep(e),s=nf(r,a);if(s)return s;e.get("show")&&!t.scale.isBlank()||(n=[]);if(g(a))n=af(t,a,!0);else if("auto"===a){var l=tf(t,t.getLabelModel());o=l.labelCategoryInterval,n=i(l.labels,(function(t){return t.tickValue}))}else n=rf(t,o=a,!0);return of(r,a,{ticks:n,tickCategoryInterval:o})}(t,e):{ticks:i(t.scale.getTicks(),(function(t){return t.value}))}}function tf(t,e){var n,i,o=ef(t,"labels"),r=Ep(e),a=nf(o,r);return a||(g(r)?n=af(t,r):(i="auto"===r?function(t){var e=Jp(t).autoInterval;return null!=e?e:Jp(t).autoInterval=t.calculateCategoryInterval()}(t):r,n=rf(t,i)),of(o,r,{labels:n,labelCategoryInterval:i}))}function ef(t,e){return Jp(t)[e]||(Jp(t)[e]=[])}function nf(t,e){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=Vp(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 af(t,e,n){var i=t.scale,o=Op(t),r=[];return a(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 sf=[0,1];function lf(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}const uf=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 Ue(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&&lf(n=n.slice(),i.count()),Ge(t,sf,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&lf(n=n.slice(),i.count());var o=Ge(t,n,sf,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=Qp(this,e).ticks,o=i(n,(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,s,l=t.getExtent();if(1===o)e[0].coord=l[0],r=e[1]={coord:l[1]};else{var u=e[o-1].tickValue-e[0].tickValue,c=(e[o-1].coord-e[0].coord)/u;a(e,(function(t){t.coord-=c/2})),s=1+t.scale.getExtent()[1]-e[o-1].tickValue,r={coord:e[o-1].coord+c*s},e.push(r)}var d=l[0]>l[1];h(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift());i&&h(l[0],e[0].coord)&&e.unshift({coord:l[0]});h(l[1],r.coord)&&(i?r.coord=l[1]:e.pop());i&&h(r.coord,l[1])&&e.push({coord:l[1]});function h(t,e){return t=We(t),e=We(e),d?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return i(e,(function(t){return i(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return $p(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=Op(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=1/0),isNaN(v)&&(v=1/0);var x=Math.max(0,Math.floor(Math.min(m,v))),_=Jp(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}();var cf=2*Math.PI,df=Ot.CMD,hf=["top","right","bottom","left"];function pf(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 ff(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)%cf<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+=cf);var p=Math.atan2(s,a);if(p<0&&(p+=cf),p>=i&&p<=o||p+cf>=i&&p+cf<=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,_f.fromArray(t[0]),bf.fromArray(t[1]),Sf.fromArray(t[2]),Q.sub(wf,_f,bf),Q.sub(Mf,Sf,bf);var n=wf.len(),i=Mf.len();if(!(n<.001||i<.001)){wf.scale(1/n),Mf.scale(1/i);var o=wf.dot(Mf);if(Math.cos(e)1&&Q.copy(Tf,Sf),Tf.toArray(t[1])}}}}function Af(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,_f.fromArray(t[0]),bf.fromArray(t[1]),Sf.fromArray(t[2]),Q.sub(wf,bf,_f),Q.sub(Mf,Sf,bf);var i=wf.len(),o=Mf.len();if(!(i<.001||o<.001))if(wf.scale(1/i),Mf.scale(1/o),wf.dot(e)=a)Q.copy(Tf,Sf);else{Tf.scaleAndAdd(Mf,r/Math.tan(Math.PI/2-s));var l=Sf.x!==bf.x?(Tf.x-bf.x)/(Sf.x-bf.x):(Tf.y-bf.y)/(Sf.y-bf.y);if(isNaN(l))return;l<0?Q.copy(Tf,bf):l>1&&Q.copy(Tf,Sf)}Tf.toArray(t[1])}}}function Lf(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 kf(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&&r&&_(-c/a,0,a);var f,g,y=t[0],m=t[a-1];return v(),f<0&&b(-f,.8),g<0&&b(g,.8),v(),x(f,g,1),x(g,f,-1),v(),f<0&&S(-f),g<0&&S(g),u}function v(){f=y.rect[e]-i,g=o-m.rect[e]-m.rect[n]}function x(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){_(i*n,0,a);var o=i+t;o<0&&b(-o*n,1)}else b(-t*n,1)}}function _(n,i,o){0!==n&&(u=!0);for(var r=i;r0)for(l=0;l0;l--){_(-(r[l-1]*d),l,a)}}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?_(n,0,i+1):_(-n,a-i-1,a),(t-=n)<=0)return}}function Ef(t,e,n,i){return Rf(t,"y","height",e,n,i)}function Vf(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new J(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=0&&n.attr(f.oldLayoutSelect),d(u,"emphasis")>=0&&n.attr(f.oldLayoutEmphasis)),$i(n,s,e,a)}else if(n.attr(s),!Uo(n).valueAnimation){var c=_(n.style.opacity,1);n.style.opacity=0,Qi(n,{style:{opacity:c}},e,a)}if(f.oldLayout=s,n.states.select){var h=f.oldLayoutSelect={};Yf(h,s,Uf),Yf(h,n.states.select,Uf)}if(n.states.emphasis){var p=f.oldLayoutEmphasis={};Yf(p,s,Uf),Yf(p,n.states.emphasis,Uf)}Zo(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){o=(f=Hf(i)).oldLayout;var f,g={points:i.shape.points};o?(i.attr({shape:o}),$i(i,{shape:g},e)):(i.setShape(g),i.style.strokePercent=0,Qi(i,{style:{strokePercent:1}},e)),f.oldLayout=g}},t}();const Zf=Xf;var jf=Mn();const qf=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.hasSymbolVisual=!0,t}return t(n,e),n.prototype.getInitialData=function(t){return Ch(null,this,{useEncodeDefaulter:!0})},n.prototype.getLegendIcon=function(t){var e=new U,n=Cc("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),r="none"===i?"circle":i,a=.8*t.itemHeight,s=Cc(r,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?o:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),r.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},n.type="series.line",n.dependencies=["grid","polar"],n.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},n}(cu);function Kf(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var o=Qs(t,e,n[0]);return null!=o?o+"":null}if(i){for(var r=[],a=0;a=0&&i.push(e[a])}return i.join(" ")}var $f=function(e){function n(t,n,i,o){var r=e.call(this)||this;return r.updateData(t,n,i,o),r}return t(n,e),n.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();var r=Cc(t,-1,-1,2,2,null,o);r.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),r.drift=Qf,this._symbolType=t,this.add(r)},n.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},n.prototype.getSymbolType=function(){return this._symbolType},n.prototype.getSymbolPath=function(){return this.childAt(0)},n.prototype.highlight=function(){Di(this.childAt(0))},n.prototype.downplay=function(){Ti(this.childAt(0))},n.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},n.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},n.prototype.updateData=function(t,e,i,o){this.silent=!1;var r=t.getItemVisual(e,"symbol")||"circle",a=t.hostModel,s=n.getSymbolSize(t,e),l=r!==this._symbolType,u=o&&o.disableAnimation;if(l){var c=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(r,t,e,s,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):$i(h,d,a,e),oo(h)}if(this._updateCommon(t,e,s,i,o),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Qi(h,d,a,e)}}u&&this.childAt(0).stopAnimation("leave")},n.prototype._updateCommon=function(t,e,n,i,o){var r,a,s,l,u,c,d,h,p,g=this.childAt(0),y=t.hostModel;if(i&&(r=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,d=i.labelStatesModels,h=i.hoverScale,p=i.cursorStyle,c=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e),v=m.getModel("emphasis");r=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=Vo(m),h=v.getShallow("scale"),p=m.getShallow("cursor")}var x=t.getItemVisual(e,"symbolRotate");g.attr("rotation",(x||0)*Math.PI/180||0);var _=Lc(t.getItemVisual(e,"symbolOffset"),n);_&&(g.x=_[0],g.y=_[1]),p&&g.attr("cursor",p);var b=t.getItemVisual(e,"style"),w=b.fill;if(g instanceof S){var M=g.style;g.useStyle(f({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},b))}else g.__isEmptyBrush?g.useStyle(f({},b)):g.useStyle(b),g.style.decal=null,g.setColor(w,o&&o.symbolInnerColor),g.style.strokeNoScale=!0;var I=t.getItemVisual(e,"liftZ"),D=this._z2;null!=I?null==D&&(this._z2=g.z2,g.z2+=I):null!=D&&(g.z2=D,this._z2=null);var T=o&&o.useNameLabel;Eo(g,d,{labelFetcher:y,labelDataIndex:e,defaultText:function(e){return T?t.getName(e):Kf(t,e)},inheritColor:w,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var C=g.ensureState("emphasis");C.style=r,g.ensureState("select").style=s,g.ensureState("blur").style=a;var A=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;C.scaleX=this._sizeX*A,C.scaleY=this._sizeY*A,this.setSymbolScale(1),Gi(this,l,u,c)},n.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},n.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),o=Zn(this).dataIndex,r=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&eo(a,{style:{opacity:0}},e,{dataIndex:o,removeOpt:r,cb:function(){i.removeTextContent()}})}else i.removeTextContent();eo(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:o,cb:t,removeOpt:r})},n.getSymbolSize=function(t,e){return Ac(t.getItemVisual(e,"symbolSize"))},n}(U);function Qf(t,e){this.parent.drift(t,e)}const tg=$f;function eg(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function ng(t){return null==t||s(t)||(t={isIgnore:t}),t||{}}function ig(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Vo(e),cursorStyle:e.get("cursor")}}var og=function(){function t(t){this.group=new U,this._SymbolCtor=t||tg}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=ng(e);var n=this.group,i=t.hostModel,o=this._data,r=this._SymbolCtor,a=e.disableAnimation,s=ig(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||n.removeAll(),t.diff(o).add((function(i){var o=u(i);if(eg(t,o,i,e)){var a=new r(t,i,s,l);a.setPosition(o),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(c,d){var h=o.getItemGraphicEl(d),p=u(c);if(eg(t,p,c,e)){var f=t.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new r(t,c,s,l)).setPosition(p);else{h.updateData(t,c,s,l);var y={x:p[0],y:p[1]};a?h.attr(y):$i(h,y,i)}n.add(h),t.setItemGraphicEl(c,h)}else n.remove(h)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=ig(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=ng(n);for(var o=t.start;o0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),s=o.dim,l=r.dim,c=e.mapDimension(l),d=e.mapDimension(s),h="x"===l||"radius"===l?1:0,p=i(t.dimensions,(function(t){return e.mapDimension(t)})),f=!1,g=e.getCalculationInfo("stackResultDimension");return Dh(e,p[0])&&(f=!0,p[0]=g),Dh(e,p[1])&&(f=!0,p[1]=g),{dataDimsForPoint:p,valueStart:a,valueAxisDim:l,baseAxisDim:s,stacked:!!f,valueDim:c,baseDim:d,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function sg(t,e,n,i){var o=NaN;t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart);var r=t.baseDataOffset,a=[];return a[r]=n.get(t.baseDim,i),a[1-r]=o,e.dataToPoint(a)}var lg=Math.min,ug=Math.max;function cg(t,e){return isNaN(t)||isNaN(e)}function dg(t,e,n,i,o,r,a,s,l){for(var u,c,d,h,p,f,g=n,y=0;y=o||g<0)break;if(cg(m,v)){if(l){g+=r;continue}break}if(g===n)t[r>0?"moveTo":"lineTo"](m,v),d=m,h=v;else{var x=m-u,_=v-c;if(x*x+_*_<.5){g+=r;continue}if(a>0){for(var b=g+r,S=e[2*b],w=e[2*b+1];S===m&&w===v&&y=i||cg(S,w))p=m,f=v;else{D=S-u,T=w-c;var L=m-u,k=S-m,P=v-c,N=w-v,O=void 0,R=void 0;if("x"===s){var E=D>0?1:-1;p=m-E*(O=Math.abs(L))*a,f=v,C=m+E*(R=Math.abs(k))*a,A=v}else if("y"===s){var V=T>0?1:-1;p=m,f=v-V*(O=Math.abs(P))*a,C=m,A=v+V*(R=Math.abs(N))*a}else O=Math.sqrt(L*L+P*P),p=m-D*a*(1-(I=(R=Math.sqrt(k*k+N*N))/(R+O))),f=v-T*a*(1-I),A=v+T*a*I,C=lg(C=m+D*a*I,ug(S,m)),A=lg(A,ug(w,v)),C=ug(C,lg(S,m)),f=v-(T=(A=ug(A,lg(w,v)))-v)*O/R,p=lg(p=m-(D=C-m)*O/R,ug(u,m)),f=lg(f,ug(c,v)),C=m+(D=m-(p=ug(p,lg(u,m))))*R/O,A=v+(T=v-(f=ug(f,lg(c,v))))*R/O}t.bezierCurveTo(d,h,p,f,m,v),d=C,h=A}else t.lineTo(m,v)}u=m,c=v,g+=r}return y}var hg=function(){this.smooth=0,this.smoothConstraint=!0},pg=function(e){function n(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return t(n,e),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new hg},n.prototype.buildPath=function(t,e){var n=e.points,i=0,o=n.length/2;if(e.connectNulls){for(;o>0&&cg(n[2*o-2],n[2*o-1]);o--);for(;i=0){var y=a?(c-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=c;break;case r.C:u=o[l++],c=o[l++],d=o[l++],h=o[l++],p=o[l++],f=o[l++];var m=a?zt(n,u,d,p,t,s):zt(i,c,h,f,t,s);if(m>0)for(var v=0;v=0){y=a?Bt(i,c,h,f,x):Bt(n,u,d,p,x);return a?[t,y]:[y,t]}}n=p,i=f}}},n}(y),fg=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n}(hg),gg=function(e){function n(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return t(n,e),n.prototype.getDefaultShape=function(){return new fg},n.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,r=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;r>0&&cg(n[2*r-2],n[2*r-1]);r--);for(;o=0;l--){var u=t.getDimensionInfo(o[l].dimension);if("x"===(r=u&&u.coordDim)||"y"===r){s=o[l];break}}if(s){var c=e.getAxis(r),d=i(s.stops,(function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}})),h=d.length,p=s.outerColors.slice();h&&d[0].coord>d[h-1].coord&&(d.reverse(),p.reverse());var f=function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord,o=(n-i)/(e.coord-i);return{coord:n,color:Gt(o,[t.color,e.color])}}for(var s=0;se){i?o.push(a(i,l,e)):n&&o.push(a(n,l,0),a(n,l,e));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),i=l}}return o}(d,"x"===r?n.getWidth():n.getHeight()),g=f.length;if(!g&&h)return d[0].coord<0?p[1]?p[1]:d[h-1].color:p[0]?p[0]:d[0].color;var y=f[0].coord-10,m=f[g-1].coord+10,v=m-y;if(v<.001)return"transparent";a(f,(function(t){t.offset=(t.coord-y)/v})),f.push({offset:g?f[g-1].offset:.5,color:p[1]||"transparent"}),f.unshift({offset:g?f[0].offset:.5,color:p[0]||"transparent"});var x=new q(0,0,0,0,f,!0);return x[r]=y,x[r+"2"]=m,x}}}function Dg(t,e,n){var i=t.get("showAllSymbol"),o="auto"===i;if(!i||o){var r=n.getAxesByScale("ordinal")[0];if(r&&(!o||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;ai)return!1;return!0}(r,e))){var s=e.mapDimension(r.dim),l={};return a(r.getViewLabels(),(function(t){var e=r.scale.getRawOrdinalNumber(t.tickValue);l[e]=1})),function(t){return!l.hasOwnProperty(e.get(s,t))}}}}function Tg(t,e){return[t[2*e],t[2*e+1]]}function Cg(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);Zn(p).seriesIndex=t.seriesIndex,Gi(p,L,k,N);var O=wg(t.get("smooth")),R=t.get("smoothMonotone");if(p.setShape({smooth:O,smoothMonotone:R,connectNulls:S}),f){var E=a.getCalculationInfo("stackedOnSeries"),V=0;f.useStyle(P(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),E&&(V=wg(E.get("smooth"))),f.setShape({smooth:O,stackedOnSmooth:V,smoothMonotone:R,connectNulls:S}),Yi(f,t,"areaStyle"),Zn(f).seriesIndex=t.seriesIndex,Gi(f,L,k,N)}var z=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=z)})),this._polyline.onHoverStateChange=z,this._data=a,this._coordSys=o,this._stackedOnPoints=_,this._points=u,this._step=D,this._valueOrigin=v,t.get("triggerLineEvent")&&(this.packEventData(t,p),f&&this.packEventData(t,f))},n.prototype.packEventData=function(t,e){Zn(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},n.prototype.highlight=function(t,e,n,i){var o=t.getData(),r=wn(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&r>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],u=a[2*r+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,d=t.get("z")||0;(s=new tg(o,r)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Su.prototype.highlight.call(this,t,e,n,i)},n.prototype.downplay=function(t,e,n,i){var o=t.getData(),r=wn(o,i);if(this._changePolyState("normal"),null!=r&&r>=0){var a=o.getItemGraphicEl(r);a&&(a.__temp?(o.setItemGraphicEl(r,null),this.group.remove(a)):a.downplay())}else Su.prototype.downplay.call(this,t,e,n,i)},n.prototype._changePolyState=function(t){var e=this._polygon;bi(this._polyline,t),e&&bi(e,t)},n.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new pg({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},n.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new gg({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},n.prototype._initSymbolLabelAnimation=function(t,e,n){var i,o,r=e.getBaseAxis(),a=r.inverse;"cartesian2d"===e.type?(i=r.isHorizontal(),o=!1):"polar"===e.type&&(i="angle"===r.dim,o=!0);var s=t.hostModel,l=s.get("animationDuration");g(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=g(u)?u(null):u;t.eachItemGraphicEl((function(t,r){var s=t;if(s){var d=[t.x,t.y],h=void 0,p=void 0,f=void 0;if(n)if(o){var y=n,m=e.pointToCoord(d);i?(h=y.startAngle,p=y.endAngle,f=-m[1]/180*Math.PI):(h=y.r0,p=y.r,f=m[0])}else{var v=n;i?(h=v.x,p=v.x+v.width,f=t.x):(h=v.y+v.height,p=v.y,f=t.y)}var x=p===h?0:(f-h)/(p-h);a&&(x=1-x);var _=g(u)?u(r):l*x+c,b=s.getSymbolPath(),S=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),S&&S.animateFrom({style:{opacity:0}},{duration:300,delay:_}),b.disableLabelAnimation=!0}}))},n.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(Cg(t)){var o=t.getData(),r=this._polyline,a=o.getLayout("points");if(!a)return r.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new X({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(Eo(r,Vo(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?Jf(o,n):Kf(o,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),o=n.inverse,r=i?o?"right":"left":"center",a=i?"middle":o?"top":"bottom";return{normal:{align:t.get("align")||r,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},n.prototype._endLabelOnDuring=function(t,e,n,i,o,r,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=r.get("precision"),p=r.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,m=e.shape,v=y?g?m.x:m.y+m.height:g?m.x+m.width:m.y,x=(g?p:0)*(y?-1:1),_=(g?0:-p)*(y?-1:1),b=g?"x":"y",S=function(t,e,n){for(var i,o,r=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}else i=o;return{range:[s,l],t:(e-i)/(o-i)}}(u,v,b),w=S.range,M=w[1]-w[0],I=void 0;if(M>=1){if(M>1&&!d){var D=Tg(u,w[0]);s.attr({x:D[0]+x,y:D[1]+_}),o&&(I=c.getRawValue(w[0]))}else{(D=l.getPointOn(v,b))&&s.attr({x:D[0]+x,y:D[1]+_});var T=c.getRawValue(w[0]),C=c.getRawValue(w[1]);o&&(I=Nn(n,h,T,C,S.t))}i.lastFrameIndex=w[0]}else{var A=1===t||i.lastFrameIndex>0?w[0]:0;D=Tg(u,A);o&&(I=c.getRawValue(A)),s.attr({x:D[0]+x,y:D[1]+_})}if(o){var L=Uo(s);"function"==typeof L.setLabelText&&L.setLabelText(I)}}},n.prototype._doUpdateAnimation=function(t,e,n,i,o,r,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=function(t,e,n,i,o,r,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],c=[],d=[],h=[],p=[],f=[],g=[],y=ag(o,e,a),m=t.getLayout("points")||[],v=e.getLayout("points")||[],x=0;x3e3||l&&Sg(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:p}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),$i(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),$i(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],m=c.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne&&(e=r,n=o)}return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},Og=function(t){return Math.round(t.length/2)};function Rg(t){return{seriesType:t,reset:function(t,n,i){var o=t.getData(),r=t.get("sampling"),a=t.coordinateSystem,s=o.count();if(s>10&&"cartesian2d"===a.type&&r){var l=a.getBaseAxis(),u=a.getOtherAxis(l),c=l.getExtent(),d=i.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(d||1),p=Math.round(s/h);if(isFinite(p)&&p>1){"lttb"===r&&t.setData(o.lttbDownSample(o.mapDimension(u.dim),1/p));var f=void 0;e(r)?f=Ng[r]:g(r)&&(f=r),f&&t.setData(o.downSample(o.mapDimension(u.dim),1/p,f,Og))}}}}}var Eg=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.getInitialData=function(t,e){return Ch(null,this,{useEncodeDefaulter:!0})},n.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),r=i.dataToPoint(o);if(n)a(i.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=o[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(r[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,c=void 0,d=1,h=0;hs){c=(p+u)/2;break}1===h&&(d=f-i[0].tickValue)}null==c&&(u?u&&(c=i[i.length-1].coord):c=i[0].coord),r[n]=t.toGlobalCoord(c)}}));else{var s=this.getData(),l=s.getLayout("offset"),u=s.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;r[c]+=l+u/2}return r}return[NaN,NaN]},n.type="series.__base_bar__",n.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},n}(cu);cu.registerClass(Eg);const Vg=Eg;const zg=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.getInitialData=function(){return Ch(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},n.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},n.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},n.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},n.type="series.bar",n.dependencies=["grid","polar"],n.defaultOption=dr(Vg.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),n}(Vg);var Bg=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};const Gg=function(e){function n(t){var n=e.call(this,t)||this;return n.type="sausage",n}return t(n,e),n.prototype.getDefaultShape=function(){return new Bg},n.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),r=Math.max(e.r,0),a=.5*(r-o),s=o+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,d=2*Math.PI,h=c?u-lr)return!0;r=u}return!1},n.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),o=Math.max(0,i[0]),r=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=r;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},n.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var o=this._dataSort(t,n,e);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},n.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,o=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},n.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},n.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},n.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},n.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){io(e,t,Zn(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},n.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},n.type="bar",n}(Su),Zg={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var o=t.x+t.width,r=t.y+t.height,a=Yg(e.x,t.x),s=Ug(e.x+e.width,o),l=Yg(e.y,t.y),u=Ug(e.y+e.height,r),c=so?s:a,e.y=d&&l>r?u:l,e.width=c?0:s-a,e.height=d?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||d},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var o=Ug(e.r,t.r),r=Yg(e.r0,t.r0);e.r=o,e.r0=r;var a=o-r<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},jg={cartesian2d:function(t,e,n,i,o,r,a,s,l){var u=new F({shape:f({},i),z2:1});(u.__dataIndex=n,u.name="item",r)&&(u.shape[o?"height":"width"]=0);return u},polar:function(t,e,n,i,o,r,a,s,l){var u=!o&&l?Gg:V,c=new u({shape:i,z2:1});c.name="item";var d,h,p=ey(o);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===Gg}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return pt(t,e,n);var o=d(i),r=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,g=a.endAngle,y=(f+g)/2,m=h?Math.abs(u-c)/2:0,v=Math.cos,x=Math.sin,_=s+u*v(f),b=l+u*x(f),S="left",w="top";switch(o){case"startArc":_=s+(c-r)*v(y),b=l+(c-r)*x(y),S="center",w="top";break;case"insideStartArc":_=s+(c+r)*v(y),b=l+(c+r)*x(y),S="center",w="bottom";break;case"startAngle":_=s+p*v(f)+Fg(f,r+m,!1),b=l+p*x(f)+Wg(f,r+m,!1),S="right",w="middle";break;case"insideStartAngle":_=s+p*v(f)+Fg(f,-r+m,!1),b=l+p*x(f)+Wg(f,-r+m,!1),S="left",w="middle";break;case"middle":_=s+p*v(y),b=l+p*x(y),S="center",w="middle";break;case"endArc":_=s+(u+r)*v(y),b=l+(u+r)*x(y),S="center",w="bottom";break;case"insideEndArc":_=s+(u-r)*v(y),b=l+(u-r)*x(y),S="center",w="top";break;case"endAngle":_=s+p*v(g)+Fg(g,r+m,!0),b=l+p*x(g)+Wg(g,r+m,!0),S="left",w="middle";break;case"insideEndAngle":_=s+p*v(g)+Fg(g,-r+m,!0),b=l+p*x(g)+Wg(g,-r+m,!0),S="right",w="middle";break;default:return pt(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=S,t.verticalAlign=w,t}),r){var f=o?"r":"endAngle",g={};c.shape[f]=o?i.r0:i.startAngle,g[f]=i[f],(s?$i:Qi)(c,{shape:g},r)}return c}};function qg(t,e,n,i,o,r,a,s){var l,u;r?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?$i:Qi)(n,{shape:l},e,o,null),(a?$i:Qi)(n,{shape:u},e?t.baseAxis.model:null,o)}function Kg(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+r*o/2,y:i.y+a*o/2,width:i.width-r*o,height:i.height-a*o}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function ey(t){return e=t?"Arc":"Angle",function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}};var e}function ny(t,e,n,i,r,s,l,c){var d=e.getItemVisual(n,"style");if(c){if(!s.get("roundCap")){var h=t.shape,p=Hg(i.getModel("itemStyle"),h,!0);f(h,p),t.setShape(h)}}else{var g=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",g)}t.useStyle(d);var y=i.getShallow("cursor");y&&t.attr("cursor",y);var m=c?l?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":l?r.height>=0?"bottom":"top":r.width>=0?"right":"left",v=Vo(i);Eo(t,v,{labelFetcher:s,labelDataIndex:n,defaultText:Kf(s.getData(),n),inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:m});var x=t.getTextContent();if(c&&x){var _=i.get(["label","position"]);t.textConfig.inside="middle"===_||null,function(t,e,n,i){if(u(i))t.setTextConfig({rotation:i});else if(o(e))t.setTextConfig({rotation:0});else{var r,a=t.shape,s=a.clockwise?a.startAngle:a.endAngle,l=a.clockwise?a.endAngle:a.startAngle,c=(s+l)/2,d=n(e);switch(d){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=c;break;case"startAngle":case"insideStartAngle":r=s;break;case"endAngle":case"insideEndAngle":r=l;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===d&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===_?m:_,ey(l),i.get(["label","rotate"]))}Xo(x,v,s.getRawValue(n),(function(t){return Jf(e,t)}));var b=i.getModel(["emphasis"]);Gi(t,b.get("focus"),b.get("blurScope"),b.get("disabled")),Yi(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",a(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var iy=function(){},oy=function(e){function n(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return t(n,e),n.prototype.getDefaultShape=function(){return new iy},n.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,t.offsetX,t.offsetY);Zn(this).dataIndex=e>=0?e:null}),30,!1);function sy(t,e,n){if(xg(n,"cartesian2d")){var i=e,o=n.getArea();return{x:t?i.x:o.x,y:t?o.y:i.y,width:t?i.width:o.width,height:t?o.height:i.height}}var r=e;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:t?o.r0:r.r0,r:t?o.r:r.r,startAngle:t?r.startAngle:0,endAngle:t?r.endAngle:2*Math.PI}}const ly=Xg;var uy=2*Math.PI,cy=Math.PI/180;function dy(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function hy(t,e){var n=dy(t,e),i=t.get("center"),r=t.get("radius");o(r)||(r=[0,r]);var a,s,l=Fe(n.width,e.getWidth()),u=Fe(n.height,e.getHeight()),c=Math.min(l,u),d=Fe(r[0],c/2),h=Fe(r[1],c/2),p=t.coordinateSystem;if(p){var f=p.dataToPoint(i);a=f[0]||0,s=f[1]||0}else o(i)||(i=[i,i]),a=Fe(i[0],l)+n.x,s=Fe(i[1],u)+n.y;return{cx:a,cy:s,r0:d,r:h}}function py(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),o=dy(t,n),r=hy(t,n),a=r.cx,s=r.cy,l=r.r,u=r.r0,c=-t.get("startAngle")*cy,d=t.get("endAngle"),h=t.get("padAngle")*cy;d="auto"===d?c-uy:-d*cy;var p=t.get("minAngle")*cy+h,f=0;e.each(i,(function(t){!isNaN(t)&&f++}));var g=e.getSum(i),y=Math.PI/(g||f)*2,m=t.get("clockwise"),v=t.get("roseType"),x=t.get("stillShowZeroSum"),_=e.getDataExtent(i);_[0]=0;var b=m?1:-1,S=[c,d],w=b*h/2;Ft(S,!m),c=S[0],d=S[1];var M=Math.abs(d-c),I=M,D=0,T=c;if(e.setLayout({viewRect:o,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:a,cy:s,r0:u,r:v?NaN:l});else{(i="area"!==v?0===g&&x?y:t*y:M/f)i?c=r=T+b*i/2:(r=T+w,c=o-w),e.setItemLayout(n,{angle:i,startAngle:r,endAngle:c,clockwise:m,cx:a,cy:s,r0:u,r:v?Ge(t,_,[u,l]):l}),T=o}})),In?a:r,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-e-l.len2*o,h=i+l.len,f=Math.abs(d)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();r.width=g.width;var y=(i.style.margin||0)+2.1;r.height=g.height+y,r.y-=(r.height-d)/2}}}function vy(t){return"center"===t.position}function xy(t){var e,n,i=t.getData(),o=[],r=!1,s=(t.get("minShowLabelAngle")||0)*gy,l=i.getLayout("viewRect"),c=i.getLayout("r"),d=l.width,h=l.x,p=l.y,f=l.height;function g(t){t.ignore=!0}i.each((function(t){var l=i.getItemGraphicEl(t),p=l.shape,f=l.getTextContent(),y=l.getTextGuideLine(),m=i.getItemModel(t),v=m.getModel("label"),x=v.get("position")||m.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),b=v.get("alignTo"),S=Fe(v.get("edgeDistance"),d),w=v.get("bleedMargin"),M=m.getModel("labelLine"),I=M.get("length");I=Fe(I,d);var D=M.get("length2");if(D=Fe(D,d),Math.abs(p.endAngle-p.startAngle)0?"right":"left":P>0?"left":"right"}var G=Math.PI,F=0,W=v.get("rotate");if(u(W))F=W*(G/180);else if("center"===x)F=0;else if("radial"===W||!0===W){F=P<0?-k+G:-k}else if("tangential"===W&&"outside"!==x&&"outer"!==x){var H=Math.atan2(P,N);H<0&&(H=2*G+H),N>0&&(H=G+H),F=H-G}if(r=!!F,f.x=T,f.y=C,f.rotation=F,f.setStyle({verticalAlign:"middle"}),O){f.setStyle({align:L});var Y=f.states.select;Y&&(Y.x+=f.x,Y.y+=f.y)}else{var U=f.getBoundingRect().clone();U.applyTransform(f.getComputedTransform());var X=(f.style.margin||0)+2.1;U.y-=X/2,U.height+=X,o.push({label:f,labelLine:y,position:x,len:I,len2:D,minTurnAngle:M.get("minTurnAngle"),maxSurfaceAngle:M.get("maxSurfaceAngle"),surfaceNormal:new Q(P,N),linePoints:A,textAlign:L,labelDistance:_,labelAlignTo:b,edgeDistance:S,bleedMargin:w,rect:U,unconstrainedWidth:U.width,labelStyleWidth:f.style.width})}l.setTextConfig({inside:O})}})),!r&&t.get("avoidLabelOverlap")&&function(t,e,n,i,o,r,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h0){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},n.type="pie",n}(Su);function Sy(t,e,n){e=o(e)&&{coordDimensions:e}||f({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=_h(i,e).dimensions,a=new xh(r,t);return a.initData(i,n),a}const wy=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}();var My=Mn(),Iy=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return t(o,e),o.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new wy(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(t)},o.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},o.prototype.getInitialData=function(){return Sy(this,{coordDimensions:["value"],encodeDefaulter:at(Oa,this)})},o.prototype.getDataParams=function(t){var o=this.getData(),r=My(o),a=r.seats;if(!a){var s=[];o.each(o.mapDimension("value"),(function(t){s.push(t)})),a=r.seats=function(t,e){var o=n(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===o)return[];for(var r=Math.pow(10,e),a=i(t,(function(t){return(isNaN(t)?0:t)/o*r*100})),s=100*r,l=i(a,(function(t){return Math.floor(t)})),u=n(l,(function(t,e){return t+e}),0),c=i(a,(function(t,e){return t-l[e]}));ud&&(d=c[p],h=p);++l[h],c[h]=0,++u}return i(l,(function(t){return t/r}))}(s,o.hostModel.get("percentPrecision"))}var l=e.prototype.getDataParams.call(this,t);return l.percent=a[t]||0,l.$vars.push("percent"),l},o.prototype._defaultLabelLine=function(t){pn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},o.type="series.pie",o.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},o}(cu);const Dy=Iy;const Ty=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.hasSymbolVisual=!0,t}return t(n,e),n.prototype.getInitialData=function(t,e){return Ch(null,this,{useEncodeDefaulter:!0})},n.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},n.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},n.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},n.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},n.type="series.scatter",n.dependencies=["grid","polar","geo","singleAxis","calendar"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},n}(cu);var Cy=function(){},Ay=function(e){function n(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t(n,e),n.prototype.getDefaultShape=function(){return new Cy},n.prototype.reset=function(){this.notClear=!1,this._off=0},n.prototype.buildPath=function(t,e){var n,i=e.points,o=e.size,r=this.symbolProxy,a=r.shape,s=t.getContext?t.getContext():t,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-r/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+r&&e<=c+a)return s}return-1},n.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},n.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,o=i[0],r=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const ky=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},n.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},n.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},n.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Pg("").reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},n.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},n.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},n.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new Ly:new rg,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},n.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},n.prototype.dispose=function(){},n.type="scatter",n}(Su);const Py=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.type="grid",n.dependencies=["xAxis","yAxis"],n.layoutMode="box",n.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},n}(va);var Ny=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Cn).models[0]},n.type="cartesian2dAxis",n}(va);it(Ny,Bp);var Oy={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Ry=et({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Oy),Ey=et({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Oy);const Vy={category:Ry,value:Ey,time:et({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ey),log:P({logBase:10},Ey)};var zy={value:1,category:1,time:1,log:1};function By(e,n,i,o){a(zy,(function(r,a){var s=et(et({},Vy[a],!0),o,!0),l=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n+"Axis."+a,t}return t(i,e),i.prototype.mergeDefaultAndTheme=function(t,e){var n=ha(this),i=n?fa(t):{},o=e.getTheme();et(t,o.get(a+"Axis")),et(t,this.getDefaultOption()),t.type=Gy(t),n&&pa(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Nh.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=n+"Axis."+a,i.defaultOption=s,i}(i);e.registerComponentModel(l)})),e.registerSubTypeDefaulter(n+"Axis",Gy)}function Gy(t){return t.type||(t.data?"category":"value")}var Fy=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return i(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),lt(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}();var Wy=["x","y"];function Hy(t){return"interval"===t.type||"time"===t.type}var Yy=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Wy,t}return t(n,e),n.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(Hy(t)&&Hy(e)){var n=t.getExtent(),i=e.getExtent(),o=this.dataToPoint([n[0],i[0]]),r=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(r[0]-o[0])/a,u=(r[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-i[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=L([],h)}}},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},n.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},n.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},n.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),o=this.getArea(),r=new J(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(r)},n.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return k(n,t,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(o,e)),n},n.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),e},n.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return k(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=o.coordToData(o.toLocalCoord(t[1]),e),n},n.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},n.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,o=Math.min(n[0],n[1])-t,r=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-o+t;return new J(i,o,r,a)},n}(Fy);const Uy=function(e){function n(t,n,i,o,r){var a=e.call(this,t,n,i)||this;return a.index=0,a.type=o||"value",a.position=r||"bottom",a}return t(n,e),n.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},n.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},n.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},n.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},n}(uf);function Xy(t,e,n){n=n||{};var i=t.coordinateSystem,o=e.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}r.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?f[h[s]]-f[h.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Ht(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var y=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-y:y,r.z2=1,r}function Zy(t){return"cartesian2d"===t.get("coordinateSystem")}function jy(t){var e={xAxisModel:null,yAxisModel:null};return a(e,(function(n,i){var o=i.replace(/Model$/,""),r=t.getReferringComponents(o,Cn).models[0];e[i]=r})),e}var qy=Math.log;function Ky(t,e,n){var i=Xh.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,!0),a=o.length-1,s=i.getInterval.call(n),l=kp(t,e),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===t.type){var h=qy(t.base);u=[qy(u[0])/h,qy(u[1])/h]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=i.getExtent.call(t);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],y=u[1];if(c&&d)f=(y-g)/a;else if(c)for(y=u[0]+f*a;yu[0]&&isFinite(g)&&isFinite(u[0]);)f=Eh(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=Eh(f));var m=f*a;(g=We((y=Math.ceil(u[1]/f)*f)-m))<0&&u[0]>=0?(g=0,y=We(m)):y>0&&u[1]<=0&&(y=0,g=-We(m))}var v=(o[0].value-r[0].value)/s,x=(o[a].value-r[a].value)/s;i.setExtent.call(t,g+f*v,y+f*x),i.setInterval.call(t,f),(v||x)&&i.setNiceExtent.call(t,g+f,y-f)}var Jy=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Wy,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=x(t),i=n.length;if(i){for(var o=[],r=i-1;r>=0;r--){var s=t[+n[r]],l=s.model,u=s.scale;Oh(u)&&l.get("alignTicks")&&null==l.get("interval")?o.push(s):(Pp(u,l),Oh(u)&&(e=s))}o.length&&(e||Pp((e=o.pop()).scale,e.model),a(o,(function(t){Ky(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var o={};a(n.x,(function(t){Qy(n,"y",t,o)})),a(n.y,(function(t){Qy(n,"x",t,o)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),o=!n&&t.get("containLabel"),r=ca(i,{width:e.getWidth(),height:e.getHeight()});this._rect=r;var s=this._axesList;function l(){a(s,(function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?r.x:r.y)}))}l(),o&&(a(s,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,r=n.getExtent();o=n instanceof Hh?n.count():(i=n.getTicks()).length;var a,s,l,u,c,d,h,p=t.getLabelModel(),f=Op(t),g=1;o>40&&(g=Math.ceil(o/40));for(var y=0;y0&&i>0||n<0&&i<0)}(t)}const em=Jy;var nm=Math.PI,im=function(){function t(t,e){this.group=new U,this.opt=e,this.axisModel=t,P(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new U({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!om[t]},t.prototype.add=function(t){om[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,o,r=je(e-t);return qe(r)?(o=n>0?"top":"bottom",i="center"):qe(r-nm)?(o=n>0?"bottom":"top",i="center"):(o="middle",i=r>0&&r0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:o}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),om={axisLine:function(t,n,i,o){var r=n.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var s=n.axis.getExtent(),l=o.transform,c=[s[0],0],d=[s[1],0],h=c[0]>d[0];l&&(k(c,c,l),k(d,d,l));var p=f({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),g=new W({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:p,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});mo(g.shape,g.style.lineWidth),g.anid="line",i.add(g);var y=n.get(["axisLine","symbol"]);if(null!=y){var m=n.get(["axisLine","symbolSize"]);e(y)&&(y=[y,y]),(e(m)||u(m))&&(m=[m,m]);var v=Lc(n.get(["axisLine","symbolOffset"])||0,m),x=m[0],_=m[1];a([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((c[0]-d[0])*(c[0]-d[0])+(c[1]-d[1])*(c[1]-d[1]))}],(function(e,n){if("none"!==y[n]&&null!=y[n]){var o=Cc(y[n],-x/2,-_/2,x,_,p.stroke,!0),r=e.r+e.offset,a=h?d:c;o.attr({rotation:e.rotate,x:a[0]+r*Math.cos(t.rotation),y:a[1]-r*Math.sin(t.rotation),silent:!0,z2:11}),i.add(o)}}))}}},axisTickLabel:function(t,e,n,o){var r=function(t,e,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=r.getModel("lineStyle"),l=i.tickDirection*r.get("length"),u=lm(o.getTicksCoords(),e.transform,l,P(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;cd[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,sm(s)?t.labelOffset+l*c:0],f=e.get("nameRotate");null!=f&&(f=f*nm/180),sm(s)?r=im.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(r=function(t,e,n,i){var o,r,a=je(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;qe(a-nm/2)?(r=l?"bottom":"top",o="center"):qe(a-1.5*nm)?(r=l?"top":"bottom",o="center"):(r="middle",o=a<1.5*nm&&a>nm/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:r}}(t.rotation,s,f||0,d),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},m=y.ellipsis,v=Ht(t.nameTruncateMaxWidth,y.maxWidth,a),x=new X({x:p[0],y:p[1],rotation:r.rotation,silent:im.isLabelSilent(e),style:zo(u,{text:o,font:g,overflow:"truncate",width:v,ellipsis:m,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||r.textAlign,verticalAlign:u.get("verticalAlign")||r.textVerticalAlign}),z2:1});if(Ao({el:x,componentModel:e,itemName:o}),x.__fullText=o,x.anid="name",e.get("triggerEvent")){var _=im.makeAxisEventDataBase(e);_.targetType="axisName",_.name=o,Zn(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function rm(t){t&&(t.ignore=!0)}function am(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=T([]);return Yt(o,o,-t.rotation),n.applyTransform(C([],o,t.getLocalTransform())),i.applyTransform(C([],o,e.getLocalTransform())),n.intersect(i)}}function sm(t){return"middle"===t||"center"===t}function lm(t,e,n,i,o){for(var r=[],a=[],s=[],l=0;l=0||t===e}function hm(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[fm(t)]}function pm(t){return!!t.get(["handle","show"])}function fm(t){return t.type+"||"+t.id}var gm={};const ym=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,n,i,o){this.axisPointerClass&&function(t){var e=hm(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,o=n.option,r=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=pm(n);null==r&&(o.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!i.min?i.min=0:null!=i.min&&i.min<0&&!i.max&&(i.max=0);var p=l;null!=i.color&&(p=P({color:i.color},l));var f=et(nt(i),{boundaryGap:t,splitNumber:n,scale:o,axisLine:r,axisTick:a,axisLabel:s,name:i.text,showName:u,nameLocation:"end",nameGap:d,nameTextStyle:p,triggerEvent:h},!1);if(e(c)){var y=f.name;f.name=c.replace("{value}",null!=y?y:"")}else g(c)&&(f.name=c(f.name,f));var m=new lr(f,null,this.ecModel);return it(m,Bp.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m}),this);this._indicatorModels=p},o.prototype.getIndicatorModels=function(){return this._indicatorModels},o.type="radar",o.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:et({lineStyle:{color:"#bbb"}},Vm.axisLine),axisLabel:zm(Vm.axisLabel,!1),axisTick:zm(Vm.axisTick,!1),splitLine:zm(Vm.splitLine,!0),splitArea:zm(Vm.splitArea,!0),indicator:[]},o}(va);var Gm=["axisLine","axisTickLabel","axisName"],Fm=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},n.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),o=i(n,(function(t){var n=t.model.get("showName")?t.name:"";return new um(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));a(o,(function(t){a(Gm,t.add,t),this.group.add(t.getGroup())}),this)},n.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var r=t.get("shape"),s=t.getModel("splitLine"),l=t.getModel("splitArea"),u=s.getModel("lineStyle"),c=l.getModel("areaStyle"),d=s.get("show"),h=l.get("show"),p=u.get("color"),f=c.get("color"),g=o(p)?p:[p],y=o(f)?f:[f],m=[],v=[];if("circle"===r)for(var x=n[0].getTicksCoords(),_=e.cx,b=e.cy,S=0;S3?1.4:o>1?1.2:1.1;Km(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:r,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);Km(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}},n.prototype._pinchHandler=function(t){jm(this._zr,"globalPan")||Km(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},n}(vt);function tv(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function ev(t,e,n,i){var o=t.target,r=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,r){var s=r.min||0,l=r.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,o.x-=(n-o.x)*(u-1),o.y-=(i-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var nv={axisPointer:1,tooltip:1,brush:1};function iv(t,e,n){var i=e.getComponentByElement(t.topTarget),o=i&&i.coordinateSystem;return i&&i!==n&&!nv.hasOwnProperty(i.mainType)&&o&&o.model!==n}var ov=r(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),rv=function(){function t(t,e){this.type="geoSVG",this._usedGraphicMap=r(),this._freedGraphics=[],this._mapName=t,this._parsedXML=jt(e)}return t.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=function(t){var e=[],n=r();return a(t,(function(t){if(null==t.namedFrom){var i=new Zp(t.name,t.el);e.push(i),n.set(t.name,i)}})),{regions:e,regionsMap:n}}(t.named),n=e.regions,i=e.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){var e,n;try{n=(e=t&&qt(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,l(null!=n)}catch(m){throw new Error("Invalid svg format\n"+m.message)}var i=new U;i.add(n),i.isGeoSVGGraphicRoot=!0;var o=e.width,r=e.height,s=e.viewBoxRect,u=this._boundingRect;if(!u){var c=void 0,d=void 0,h=void 0,p=void 0;if(null!=o?(c=0,h=o):s&&(c=s.x,h=s.width),null!=r?(d=0,p=r):s&&(d=s.y,p=s.height),null==c||null==d){var f=n.getBoundingRect();null==c&&(c=f.x,h=f.width),null==d&&(d=f.y,p=f.height)}u=this._boundingRect=new J(c,d,h,p)}if(s){var g=Kt(s,u);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}i.setClipPath(new F({shape:u.plain()}));var y=[];return a(e.named,(function(t){var e;null!=ov.get(t.svgNodeTagLower)&&(y.push(t),(e=t.el).silent=!1,e.isGroup&&e.traverse((function(t){t.silent=!1})))})),{root:i,boundingRect:u,named:y}},t.prototype.useGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,n),n)},t.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);n&&(e.removeKey(t),this._freedGraphics.push(n))},t}();for(var av=[126,25],sv="南海诸岛",lv=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],uv=0;uv0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:r,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=r(),n=r(),i=this._regionsGroup,o=t.transformInfoRaw,s=t.mapOrGeoModel,l=t.data,u=t.geo.projection,c=u&&u.stream;function d(t,e){return e&&(t=e(t)),t&&[t[0]*o.scaleX+o.x,t[1]*o.scaleY+o.y]}function h(t){for(var e=[],n=!c&&u&&u.project,i=0;i=0)&&(h=o);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Eo(e,Vo(i),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=e.getTextContent();if(f&&(bv(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Tv(t,e,n,i,o,r){t.data?t.data.setItemGraphicEl(r,e):Zn(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:i&&i.option||{}}}function Cv(t,e,n,i,o){t.data||Ao({el:e,componentModel:o,itemName:n,itemTooltipOption:i.get("tooltip")})}function Av(t,e,n,i,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var r=i.getModel("emphasis"),a=r.get("focus");return Gi(e,a,r.get("blurScope"),r.get("disabled")),t.isGeo&&function(t,e,n){var i=Zn(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,o,n),a}function Lv(t,e,n){var i,o=[];function r(){i=[]}function s(){i.length&&(o.push(i),i=[])}var l=e({polygonStart:r,polygonEnd:s,lineStart:r,lineEnd:s,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&l.polygonStart(),a(t,(function(t){l.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},n.type="series.map",n.dependencies=["geo"],n.layoutMode="box",n.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},n}(cu);const Ov=Nv;function Rv(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),a(e,(function(t,e){for(var n,o,r,s=(n=i(t,(function(t){return t.getData()})),o=t[0].get("mapValueCalculation"),r={},a(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var i="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[i].length,c=0;c1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=x,p=ca(b,{width:m,height:v})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var Xv=function(){function t(){this.dimensions=Fv}return t.prototype.create=function(t,e){var n=[];function o(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,i){var r=t.get("map"),a=new Yv(r+i,r,f({nameMap:t.get("nameMap")},o(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=Uv,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),a(r,(function(t,r){var s=i(t,(function(t){return t.get("nameMap")})),l=new Yv(r,r,f({nameMap:ee(s)},o(t[0])));l.zoomLimit=Ht.apply(null,i(t,(function(t){return t.get("scaleLimit")}))),n.push(l),l.resize=Uv,l.resize(t[0],e),a(t,(function(t){t.coordinateSystem=l,function(t,e){a(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(l,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var o=(t||[]).slice(),s=r(),l=0;l=0;){var r=e[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,o+=r.hierNode.change,i+=r.hierNode.shift+o}}(t);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,u=r.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=ox(s),r=rx(r),s&&r;){o=ox(o),a=rx(a),o.hierNode.ancestor=t;var h=s.hierNode.prelim+d-r.hierNode.prelim-u+i(s,r);h>0&&(sx(ax(s,t,n),t,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,c+=a.hierNode.modifier}s&&!ox(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=d-l),r&&!rx(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-c,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||i[0],e)}function ex(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function nx(t){return arguments.length?t:lx}function ix(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function ox(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function rx(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function ax(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function sx(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function lx(t,e){return t.parentNode===e.parentNode?1:2}var ux=function(){this.parentPoint=[],this.childPoints=[]},cx=function(e){function n(t){return e.call(this,t)||this}return t(n,e),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new ux},n.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,o=e.parentPoint,r=n[0],a=n[i-1];if(1===i)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Fe(e.forkPosition,1),d=[];d[l]=o[l],d[u]=o[u]+(a[u]-o[u])*c,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(r[0],r[1]),d[l]=r[l],t.lineTo(d[0],d[1]),d[l]=a[l],t.lineTo(d[0],d[1]),t.lineTo(a[0],a[1]);for(var h=1;hv.x)||(_-=Math.PI);var w=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),D=I*(Math.PI/180),T=y.getTextContent();T&&(y.setTextConfig({position:M.get("position")||w,rotation:null==I?-_:D,origin:"center"}),T.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),A="relative"===C?dt(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===C?a.getAncestorsIndices():"descendant"===C?a.getDescendantIndices():null;A&&(Zn(n).focus=A),function(t,e,n,i,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),d=t.getOrient(),h=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new H({shape:yx(c,d,h,o,o)})),$i(g,{shape:yx(c,d,h,r,a)},t));else if("polyline"===u&&"orthogonal"===c&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,m=[],v=0;ve&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var o=i.getData().tree.root,r=t.targetNode;if(e(r)&&(r=o.getNodeById(r)),r&&o.contains(r))return{node:r};var a=t.targetNodeId;if(null!=a&&(r=o.getNodeById(a)))return{node:r}}}function kx(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Px(t,e){var n=kx(t);return d(n,e)>=0}function Nx(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}const Ox=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return t(n,e),n.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new lr(n,this,this.ecModel),o=Ax.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=o.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var r=0;o.eachNode("preorder",(function(t){t.depth>r&&(r=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),o.data},n.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},n.prototype.setZoom=function(t){this.option.zoom=t},n.prototype.setCenter=function(t){this.option.center=t},n.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,o=i.root.children[0],r=i.getNodeByDataIndex(t),a=r.getValue(),s=r.name;r&&r!==o;)s=r.parentNode.name+"."+s,r=r.parentNode;return Gl("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},n.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Nx(i,this),n.collapsed=!i.isExpand,n},n.type="series.tree",n.layoutMode="box",n.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},n}(cu);function Rx(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var r=o.length-1;r>=0;r--)i.push(o[r])}}function Ex(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,r=0,a=null;"radial"===i?(o=2*Math.PI,r=Math.min(n.height,n.width)/2,a=nx((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(o=n.width,r=n.height,a=nx());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,o=[e];n=o.pop();)if(i=n.children,n.isExpand&&i.length)for(var r=i.length-1;r>=0;r--){var a=i[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},o.push(a)}}(s),function(t,e,n){for(var i,o=[t],r=[];i=o.pop();)if(r.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=t),t.depth>d.depth&&(d=t)}));var h=u===c?1:a(u,c)/2,p=h-u.getLayout().x,f=0,g=0,y=0,m=0;if("radial"===i)f=o/(c.getLayout().x+h+p),g=r/(d.depth-1||1),Rx(l,(function(t){y=(t.getLayout().x+p)*f,m=(t.depth-1)*g;var e=ix(y,m);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:m},!0)}));else{var v=t.getOrient();"RL"===v||"LR"===v?(g=r/(c.getLayout().x+h+p),f=o/(d.depth-1||1),Rx(l,(function(t){m=(t.getLayout().x+p)*g,y="LR"===v?(t.depth-1)*f:o-(t.depth-1)*f,t.setLayout({x:y,y:m},!0)}))):"TB"!==v&&"BT"!==v||(f=o/(c.getLayout().x+h+p),g=r/(d.depth-1||1),Rx(l,(function(t){y=(t.getLayout().x+p)*f,m="TB"===v?(t.depth-1)*g:r-(t.depth-1)*g,t.setLayout({x:y,y:m},!0)})))}}}(t,e)}))}function Vx(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),i=e.ensureUniqueItemVisual(t.dataIndex,"style");f(i,n)}))}))}var zx=["treemapZoomToNode","treemapRender","treemapMove"];function Bx(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var o=Ua(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",o)}))}function Gx(t){var e=0;a(t.children,(function(t){Gx(t);var n=t.value;o(n)&&(n=n[0]),e+=n}));var n=t.value;o(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),o(t.value)?t.value[0]=n:t.value=n}const Fx=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.preventUsingHoverLayer=!0,t}return t(n,e),n.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};Gx(n);var o=t.levels||[],r=this.designatedVisualItemStyle={},s=new lr({itemStyle:r},this,e);o=t.levels=function(t,e){var n,i,o=hn(e.get("color")),r=hn(e.get(["aria","decal","decals"]));if(!o)return;t=t||[],a(t,(function(t){var e=new lr(t),o=e.get("color"),r=e.get("decal");(e.get(["itemStyle","color"])||o&&"none"!==o)&&(n=!0),(e.get(["itemStyle","decal"])||r&&"none"!==r)&&(i=!0)}));var s=t[0]||(t[0]={});n||(s.color=o.slice());!i&&r&&(s.decal=r.slice());return t}(o,e);var l=i(o||[],(function(t){return new lr(t,s,e)}),this),u=Ax.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=u.getNodeByDataIndex(e),i=n?l[n.depth]:null;return t.parentModel=i||s,t}))}));return u.data},n.prototype.optionUpdated=function(){this.resetViewRoot()},n.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t);return Gl("nameValue",{name:i.getName(t),value:o})},n.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Nx(i,this),n.treePathInfo=n.treeAncestors,n},n.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},f(this.layoutInfo,t)},n.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=r(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},n.prototype.getViewRoot=function(){return this._viewRoot},n.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},n.prototype.enableAriaDecal=function(){Bx(this)},n.type="series.treemap",n.layoutMode="box",n.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},n}(cu);var Wx=function(){function t(t){this.group=new U,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),o.get("show")&&n){var a=o.getModel("itemStyle"),s=o.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(t,c,a,s,l,u,i),da(r,c.pos,c.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var o=_n(i.getModel().get("name"),""),r=n.getTextRect(o),a=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:o,width:a})}},t.prototype._renderContent=function(t,e,n,i,o,r,a){for(var s,l,u,c,d,h,p,f,g,y=0,m=e.emptyItemWidth,v=t.get(["breadcrumb","height"]),x=(s=e.pos,l=e.box,c=l.width,d=l.height,h=Fe(s.left,c),p=Fe(s.top,d),f=Fe(s.right,c),g=Fe(s.bottom,d),(isNaN(h)||isNaN(parseFloat(s.left)))&&(h=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=c),(isNaN(p)||isNaN(parseFloat(s.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=d),u=$r(u||0),{width:Math.max(f-h-u[1]-u[3],0),height:Math.max(g-p-u[0]-u[2],0)}),_=e.totalWidth,b=e.renderList,S=i.getModel("itemStyle").getItemStyle(),w=b.length-1;w>=0;w--){var M=b[w],I=M.node,D=M.width,T=M.text;_>x.width&&(_-=D-m,D=m,T=null);var C=new B({shape:{points:Hx(y,0,D,v,w===b.length-1,0===w)},style:P(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new X({style:zo(o,{text:T})}),textConfig:{position:"inside"},z2:1e4*oi,onclick:at(a,I)});C.disableLabelAnimation=!0,C.getTextContent().ensureState("emphasis").style=zo(r,{text:T}),C.ensureState("emphasis").style=S,Gi(C,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(C),Yx(C,t,I),y+=D+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function Hx(t,e,n,i,o,r){var a=[[o?t:t-5,e],[t+n,e],[t+n,e+i],[o?t:t-5,e+i]];return!r&&a.splice(2,0,[t+n+5,e+i/2]),!o&&a.push([t,e+i/2]),a}function Yx(t,e,n){Zn(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Nx(n,e)}}const Ux=Wx;var Xx=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:o}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,o=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},n.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var r=new J(o.x,o.y,o.width,o.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=Qt();ie(s,s,[-e,-n]),oe(s,s,[t.scale,t.scale]),ie(s,s,[e,n]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},n.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var o=i.node;if(o.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var r=o.hostTree.data.getItemModel(o.dataIndex),a=r.get("link",!0),s=r.get("target",!0)||"blank";a&&oa(a,s)}}}}}),this)},n.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Ux(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(Px(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},n.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},n.prototype.dispose=function(){this._clearController()},n.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},n.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},n.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var o=this._storage.background[i.getRawIndex()];if(o){var r=o.transformCoordToLocal(t,e),a=o.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}}),this),n},n.type="treemap",n}(Su);const o_=i_;var r_=a,a_=s,s_=-1,l_=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=nt(e);this.type=i,this.mappingMethod=n,this._normalizeData=v_[n];var u=t.visualHandlers[i];this.applyVisual=u.applyVisual,this.getColorMapper=u.getColorMapper,this._normalizedToVisual=u._normalizedToVisual[n],"piecewise"===n?(u_(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,a(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(r_(e,(function(t,e){n[t]=e})),!o(i)){var r=[];s(i)?r_(i,(function(t,e){var i=n[e];r[null!=i?i:s_]=t})):r[s_]=i,i=m_(t,r)}for(var a=e.length-1;a>=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}(r):u_(r,!0):(l("linear"!==n||r.dataExtent),u_(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return ut(this._normalizeData,this)},t.listVisualTypes=function(){return x(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){s(t)?a(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,a=o(e)?[]:s(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var o=n.call(i,t,e);r?a=o:a[e]=o})),a},t.retrieveVisuals=function(e){var n,i={};return e&&r_(t.visualHandlers,(function(t,o){e.hasOwnProperty(o)&&(i[o]=e[o],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(o(t))t=t.slice();else{if(!a_(t))return[];var e=[];r_(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,n,i){for(var o,r=1/0,a=0,s=n.length;au[1]&&(u[1]=l);var c=e.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new __(d);return b_(h).drColorMappingBy=c,h}(0,o,r,0,c,g);a(g,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var r=function(t,e,n,i,o,r){var a=f({},e);if(o){var s=o.type,l="color"===s&&b_(o).drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=o.mapValueToVisual(u)}return a}(o,c,t,e,y,i);w_(t,r,n,i)}}))}else l=M_(c),d.fill=l}}function M_(t){var e=I_(t,"color");if(e){var n=I_(t,"colorAlpha"),i=I_(t,"colorSaturation");return i&&(e=le(e,null,null,i)),n&&(e=ue(e,n)),e}}function I_(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function D_(t,e){var n=t.get(e);return o(n)&&n.length?{name:e,range:n}:null}var T_=Math.max,C_=Math.min,A_=Ht,L_=a,k_=["itemStyle","borderWidth"],P_=["itemStyle","gapWidth"],N_=["upperLabel","show"],O_=["upperLabel","height"];const R_={seriesType:"treemap",reset:function(t,e,n,i){var o=n.getWidth(),r=n.getHeight(),a=t.option,s=ca(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Fe(A_(s.width,l[0]),o),c=Fe(A_(s.height,l[1]),r),d=i&&i.type,h=Lx(i,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===d||"treemapMove"===d?i.rootRect:null,g=t.getViewRoot(),y=kx(g);if("treemapMove"!==d){var m="treemapZoomToNode"===d?function(t,e,n,i,o){var r,a=(e||{}).node,s=[i,o];if(!a||a===n)return s;var l=i*o,u=l*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var c=0,d=r.children,h=0,p=d.length;hZe&&(u=Ze),a=r}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var u=o["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?T_(u*i/l,l/(u*o)):1/0}function z_(t,e,n,i,o){var r=e===n.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=e?t.area/e:0;(o||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,h=t.length;di&&(i=e);var a=i%2?i+2:i+3;r=[];for(var s=0;s0&&(v[0]=-v[0],v[1]=-v[1]);var _=m[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(m[1],m[0]);u[0].8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*f+l[0],i.y=-c[1]*g+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+S,d=m[0]<0?"right":"left",i.originX=-f*_,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+S,d=m[0]>=0?"right":"left",i.originX=f*_,i.originY=-S}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||h,align:i.__align||d})}}}function w(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},n}(U);const Ib=Mb;function Db(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:Vo(e)}}function Tb(t){return isNaN(t[0])||isNaN(t[1])}function Cb(t){return t&&!Tb(t[0])&&!Tb(t[1])}const Ab=function(){function t(t){this.group=new U,this._LineCtor=t||Ib}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,o=n._lineData;n._lineData=t,o||i.removeAll();var r=Db(t);t.diff(o).add((function(n){e._doAdd(t,n,r)})).update((function(n,i){e._doUpdate(o,t,i,n,r)})).remove((function(t){i.remove(o.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Db(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function Vb(t,e){var n=[],i=ve,o=[[],[],[]],r=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[ce(l[0]),ce(l[1])],l[2]&&l.__original.push(ce(l[2])));var d=l.__original;if(null!=l[2]){if(te(o[0],d[0]),te(o[1],d[2]),te(o[2],d[1]),u&&"none"!==u){var h=ob(t.node1),p=Eb(o,d[0],h*e);i(o[0][0],o[1][0],o[2][0],p,n),o[0][0]=n[3],o[1][0]=n[4],i(o[0][1],o[1][1],o[2][1],p,n),o[0][1]=n[3],o[1][1]=n[4]}if(c&&"none"!==c){h=ob(t.node2),p=Eb(o,d[1],h*e);i(o[0][0],o[1][0],o[2][0],p,n),o[1][0]=n[1],o[2][0]=n[2],i(o[0][1],o[1][1],o[2][1],p,n),o[1][1]=n[1],o[2][1]=n[2]}te(l[0],o[0]),te(l[1],o[2]),te(l[2],o[1])}else{if(te(r[0],d[0]),te(r[1],d[1]),fe(a,r[1],r[0]),de(a,a),u&&"none"!==u){h=ob(t.node1);me(r[0],r[0],a,h*e)}if(c&&"none"!==c){h=ob(t.node2);me(r[1],r[1],a,-h*e)}te(l[0],r[0]),te(l[1],r[1])}}))}function zb(t){return"view"===t.type}const Bb=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.init=function(t,e){var n=new rg,i=new Ab,o=this.group;this._controller=new Qm(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},n.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem;this._model=t;var r=this._symbolDraw,a=this._lineDraw,s=this.group;if(zb(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):$i(s,l,t)}Vb(t.getGraph(),ib(t));var u=t.getData();r.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,h=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h);var p=t.get("layout");u.graph.eachNode((function(e){var n=e.dataIndex,o=e.getGraphicEl(),r=e.getModel();if(o){o.off("drag").off("dragend");var a=r.get("draggable");a&&o.on("drag",(function(r){switch(p){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,h),d.setFixed(n),u.setItemLayout(n,[o.x,o.y]);break;case"circular":u.setItemLayout(n,[o.x,o.y]),e.setLayout({fixed:!0},!0),sb(t,"symbolSize",e,[r.offsetX,r.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(n,[o.x,o.y]),eb(t.getGraph(),t),i.updateLayout(t)}})).on("dragend",(function(){d&&d.setUnfixed(n)})),o.setDraggable(a,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(Zn(o).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(Zn(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode((function(t){ub(t,f,g,y)})),this._firstRender=!1},n.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},n.prototype._startForceLayoutIteration=function(t,e){var n=this;!function i(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())}))}()},n.prototype._updateController=function(t,e,n){var i=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker((function(e,i,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(i,o)&&!iv(e,n,t)})),zb(t.coordinateSystem)?(o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){tv(r,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){ev(r,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(),Vb(t.getGraph(),ib(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()}))):o.disable()},n.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=ib(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(n)}))},n.prototype.updateLayout=function(t){Vb(t.getGraph(),ib(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},n.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},n.type="graph",n}(Su);function Gb(t){return"_EC_"+t}var Fb=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[Gb(t)]){var i=new Wb(t,e);return i.hostGraph=this,this.nodes.push(i),n[Gb(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[Gb(t)]},t.prototype.addEdge=function(t,e,n){var i=this._nodesMap,o=this._edgesMap;if(u(t)&&(t=this.nodes[t]),u(e)&&(e=this.nodes[e]),t instanceof Wb||(t=i[Gb(t)]),e instanceof Wb||(e=i[Gb(e)]),t&&e){var r=t.id+"-"+e.id,a=new Hb(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),o[r]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof Wb&&(t=t.id),e instanceof Wb&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,o=0;o=0&&t.call(e,n[o],o)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,o=0;o=0&&n[o].node1.dataIndex>=0&&n[o].node2.dataIndex>=0&&t.call(e,n[o],o)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof Wb||(e=this._nodesMap[Gb(e)]),e){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r=0&&n.node2.dataIndex>=0}));for(o=0,r=i.length;o=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}it(Wb,Yb("hostGraph","data")),it(Hb,Yb("hostGraph","edgeData"));const Ub=Fb;function Xb(t,e,n,i,o){for(var r=new Ub(i),a=0;a "+p)),u++)}var f,g=n.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)f=Ch(t,n);else{var y=is.get(g),m=y&&y.dimensions||[];d(m,"value")<0&&m.concat(["value"]);var v=_h(t,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(f=new xh(v,n)).initData(t)}var x=new xh(["value"],n);return x.initData(l,s),o&&o(f,x),xx({mainData:f,struct:r,structAttr:"graph",datas:{node:f,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}const Zb=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.hasSymbolVisual=!0,t}return t(n,e),n.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new wy(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},n.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},n.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),pn(t,"edgeLabel",["show"])},n.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],o=t.data||t.nodes||[],r=this;if(o&&i){X_(n=this)&&(n.__curvenessList=[],n.__edgeMap={},Z_(n));var s=Xb(o,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=lr.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=o,i}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=o,t.getModel=i,t}))}));return a(s.edges,(function(t){!function(t,e,n,i){if(X_(n)){var o=j_(t,e,n),r=n.__edgeMap,a=r[q_(o)];r[o]&&!a?r[o].isForward=!0:a&&r[o]&&(a.isForward=!0,r[o].isForward=!1),r[o]=r[o]||[],r[o].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),s.data}},n.prototype.getGraph=function(){return this.getData().graph},n.prototype.getEdgeData=function(){return this.getGraph().edgeData},n.prototype.getCategoriesData=function(){return this._categoriesData},n.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),o=this.getDataParams(t,n),r=i.graph.getEdgeByIndex(t),a=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Gl("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return $l({series:this,dataIndex:t,multipleSeries:e})},n.prototype._updateCategoriesData=function(){var t=i(this.option.categories||[],(function(t){return null!=t.value?t:f({value:0},t)})),e=new xh(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},n.prototype.setZoom=function(t){this.option.zoom=t},n.prototype.setCenter=function(t){this.option.center=t},n.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},n.type="series.graph",n.dependencies=["grid","polar","geo","singleAxis","calendar"],n.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},n}(cu);var jb={type:"graphRoam",event:"graphRoam",update:"none"};var qb=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0};const Kb=function(e){function n(t){var n=e.call(this,t)||this;return n.type="pointer",n}return t(n,e),n.prototype.getDefaultShape=function(){return new qb},n.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-n(a)*r*(r>=o/3?1:2),l=e.y-i(a)*r*(r>=o/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*r,e.y+i(a)*r),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(a)*r,e.y-i(a)*r),t.lineTo(s,l)},n}(y);function Jb(t,n){var i=null==t?"":t+"";return n&&(e(n)?i=n.replace("{value}",i):g(n)&&(i=n(t))),i}var $b=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),r=Math.min(i,o);return{cx:Fe(n[0],e.getWidth()),cy:Fe(n[1],e.getHeight()),r:Fe(t.get("radius"),r/2)}}(t,n);this._renderMain(t,e,n,i,o),this._data=t.getData()},n.prototype.dispose=function(){},n.prototype._renderMain=function(t,e,n,i,o){var r=this.group,s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),d=c.get("roundCap")?Gg:V,h=c.get("show"),p=c.getModel("lineStyle"),f=p.get("width"),g=[l,u];Ft(g,!s);for(var y=(u=g[1])-(l=g[0]),m=l,v=[],x=0;h&&x=t&&(0===e?0:i[e-1][0])Math.PI/2&&(B+=Math.PI):"tangential"===z?B=-I-Math.PI/2:u(z)&&(B=z*Math.PI/180),0===B?h.add(new X({style:zo(_,{text:O,x:E,y:V,verticalAlign:d<-.8?"top":d>.8?"bottom":"middle",align:c<-.4?"left":c>.4?"right":"center"},{inheritColor:R}),silent:!0})):h.add(new X({style:zo(_,{text:O,x:E,y:V,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:E,originY:V,rotation:B}))}if(x.get("show")&&k!==b){N=(N=x.get("distance"))?N+l:l;for(var G=0;G<=S;G++){c=Math.cos(I),d=Math.sin(I);var F=new W({shape:{x1:c*(g-N)+p,y1:d*(g-N)+f,x2:c*(g-M-N)+p,y2:d*(g-M-N)+f},silent:!0,style:A});"auto"===A.stroke&&F.setStyle({stroke:i((k+G/S)/b)}),h.add(F),I+=T}I-=T}else I+=D}},n.prototype._renderPointer=function(t,e,n,i,o,r,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),v=m.mapDimension("value"),x=+t.get("min"),_=+t.get("max"),b=[x,_],w=[r,a];function M(e,n){var i,r=m.getItemModel(e).getModel("pointer"),a=Fe(r.get("width"),o.r),s=Fe(r.get("length"),o.r),l=t.get(["pointer","icon"]),u=r.get("offsetCenter"),c=Fe(u[0],o.r),d=Fe(u[1],o.r),h=r.get("keepAspect");return(i=l?Cc(l,c-a/2,d-s,a,s,null,h):new Kb({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=o.cx,i.y=o.cy,i}function I(t,e){var n=g.get("roundCap")?Gg:V,i=g.get("overlap"),a=i?g.get("width"):l/m.count(),u=i?o.r-a:o.r-(t+1)*a,c=i?o.r:o.r-t*a,d=new n({shape:{startAngle:r,endAngle:e,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return i&&(d.z2=_-m.get(v,t)%_),d}(y||p)&&(m.diff(c).add((function(e){var n=m.get(v,e);if(p){var i=M(e,r);Qi(i,{rotation:-((isNaN(+n)?w[0]:Ge(n,b,w,!0))+Math.PI/2)},t),u.add(i),m.setItemGraphicEl(e,i)}if(y){var o=I(e,r),a=g.get("clip");Qi(o,{shape:{endAngle:Ge(n,b,w,a)}},t),u.add(o),jn(t.seriesIndex,m.dataType,e,o),h[e]=o}})).update((function(e,n){var i=m.get(v,e);if(p){var o=c.getItemGraphicEl(n),a=o?o.rotation:r,s=M(e,a);s.rotation=a,$i(s,{rotation:-((isNaN(+i)?w[0]:Ge(i,b,w,!0))+Math.PI/2)},t),u.add(s),m.setItemGraphicEl(e,s)}if(y){var l=d[n],f=I(e,l?l.shape.endAngle:r),x=g.get("clip");$i(f,{shape:{endAngle:Ge(i,b,w,x)}},t),u.add(f),jn(t.seriesIndex,m.dataType,e,f),h[e]=f}})).execute(),m.each((function(t){var e=m.getItemModel(t),n=e.getModel("emphasis"),o=n.get("focus"),r=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(t),l=m.getItemVisual(t,"style"),u=l.fill;if(s instanceof S){var c=s.style;s.useStyle(f({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(Ge(m.get(v,t),b,[0,1],!0))),s.z2EmphasisLift=0,Yi(s,e),Gi(s,o,r,a)}if(y){var d=h[t];d.useStyle(m.getItemVisual(t,"style")),d.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,Yi(d,e),Gi(d,o,r,a)}})),this._progressEls=h)},n.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),o=n.get("icon"),r=n.get("offsetCenter"),a=n.get("keepAspect"),s=Cc(o,e.cx-i/2+Fe(r[0],e.r),e.cy-i/2+Fe(r[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},n.prototype._renderTitleAndDetail=function(t,e,n,i,o){var r=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new U,d=[],h=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){d[t]=new X({silent:!0}),h[t]=new X({silent:!0})})).update((function(t,e){d[t]=r._titleEls[e],h[t]=r._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),r=a.get(s,e),g=new U,y=i(Ge(r,[l,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),x=o.cx+Fe(v[0],o.r),_=o.cy+Fe(v[1],o.r);(C=d[e]).attr({z2:f?0:2,style:zo(m,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(C)}var b=n.getModel("detail");if(b.get("show")){var S=b.get("offsetCenter"),w=o.cx+Fe(S[0],o.r),M=o.cy+Fe(S[1],o.r),I=Fe(b.get("width"),o.r),D=Fe(b.get("height"),o.r),T=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,C=h[e],A=b.get("formatter");C.attr({z2:f?0:2,style:zo(b,{x:w,y:M,text:Jb(r,A),width:isNaN(I)?null:I,height:isNaN(D)?null:D,align:"center",verticalAlign:"middle"},{inheritColor:T})}),Xo(C,{normal:b},r,(function(t){return Jb(t,A)})),p&&Zo(C,e,a,t,{getFormattedLabel:function(t,e,n,i,o,a){return Jb(a?a.interpolatedValue:r,A)}}),g.add(C)}c.add(g)})),this.group.add(c),this._titleEls=d,this._detailEls=h},n.type="gauge",n}(Su);const Qb=$b;const tS=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.visualStyleAccessPath="itemStyle",t}return t(n,e),n.prototype.getInitialData=function(t,e){return Sy(this,["value"])},n.type="series.gauge",n.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},n}(cu);var eS=["itemStyle","opacity"],nS=function(e){function n(t,n){var i=e.call(this)||this,o=i,r=new G,a=new X;return o.setTextContent(a),i.setTextGuideLine(r),i.updateData(t,n,!0),i}return t(n,e),n.prototype.updateData=function(t,e,n){var i=this,o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e),s=r.getModel("emphasis"),l=r.get(eS);l=null==l?1:l,n||oo(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Qi(i,{style:{opacity:l}},o,e)):$i(i,{style:{opacity:l},shape:{points:a.points}},o,e),Yi(i,r),this._updateLabel(t,e),Gi(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},n.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),r=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;Eo(o,Vo(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new Q(c[0][0],c[0][1]):null},$i(o,{style:{x:s.x,y:s.y}},r,e),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Pf(n,Nf(a),{stroke:u})},n}(B);const iS=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.ignoreLabelLineUpdate=!0,t}return t(n,e),n.prototype.render=function(t,e,n){var i=t.getData(),o=this._data,r=this.group;i.diff(o).add((function(t){var e=new nS(i,t);i.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var n=o.getItemGraphicEl(e);n.updateData(i,t),r.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){io(o.getItemGraphicEl(e),t,e)})).execute(),this._data=i},n.prototype.remove=function(){this.group.removeAll(),this._data=null},n.prototype.dispose=function(){},n.type="funnel",n}(Su);const oS=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new wy(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(t)},n.prototype.getInitialData=function(t,e){return Sy(this,{coordDimensions:["value"],encodeDefaulter:at(Oa,this)})},n.prototype._defaultLabelLine=function(t){pn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},n.prototype.getDataParams=function(t){var n=this.getData(),i=e.prototype.getDataParams.call(this,t),o=n.mapDimension("value"),r=n.getSum(o);return i.percent=r?+(n.get(o,t)/r*100).toFixed(2):0,i.$vars.push("percent"),i},n.type="series.funnel",n.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},n}(cu);function rS(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),o=t.get("sort"),r=function(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=r.width,l=r.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),o=[],r="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&vS(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function vS(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}const xS=yS;const _S=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},n.prototype.mergeOption=function(t){var e=this.option;t&&et(e,t,!0),this._initDimensions()},n.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},n.prototype.setAxisExpand=function(t){a(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},n.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=lt(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);a(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},n.type="parallel",n.dependencies=["parallelAxis"],n.layoutMode="box",n.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},n}(va);const bS=function(e){function n(t,n,i,o,r){var a=e.call(this,t,n,i)||this;return a.type=o||"value",a.axisIndex=r,a}return t(n,e),n.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},n}(uf);function SS(t,e,n,i,o,r){t=t||0;var a=n[1]-n[0];if(null!=o&&(o=MS(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=MS(s,[0,a]),o=r=MS(s,[o,r]),i=0}e[0]=MS(e[0],n),e[1]=MS(e[1],n);var l=wS(e,i);e[i]+=t;var u,c=o||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,e[i]=MS(e[i],d),u=wS(e,i),null!=o&&(u.sign!==l.sign||u.spanr&&(e[1-i]=e[i]+u.sign*r),e}function wS(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function MS(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var IS=a,DS=Math.min,TS=Math.max,CS=Math.floor,AS=Math.ceil,LS=We,kS=Math.PI;function PS(t,e){return DS(TS(t,e[0]),e[1])}function NS(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function OS(t,e){var n,i,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t=n&&r<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();IS(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Pp(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],o=["width","height"],r=e.get("layout"),a="horizontal"===r?0:1,s=n[o[a]],l=[0,s],u=this.dimensions.length,c=PS(e.get("axisExpandWidth"),l),d=PS(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,p=e.get("axisExpandWindow");p?(t=PS(p[1]-p[0],l),p[1]=p[0]+t):(t=PS(c*(d-1),l),(p=[c*(e.get("axisExpandCenter")||CS(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-d);f<3&&(f=0);var g=[CS(LS(p[0]/c,1))+1,AS(LS(p[1]/c,1))-1],y=f/c*p[0];return{layout:r,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[o[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),o=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),IS(n,(function(e,n){var r=(i.axisExpandable?OS:NS)(n,i),a={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:kS/2,vertical:0},l=[a[o].x+t.x,a[o].y+t.y],u=s[o],c=Qt();Yt(c,c,u),ie(c,c,l),this._axesLayout[e]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var o=this._axesMap,r=this.dimensions,s=[],l=[];a(r,(function(e){s.push(t.mapDimension(e)),l.push(o.get(e).model)}));for(var u=this.hasAxisBrushed(),c=n;co*(1-c[0])?(l="jump",a=s-o*(1-c[2])):(a=s-o*c[1])>=0&&(a=s-o*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?SS(a,i,r,"all"):l="none";else{var h=i[1]-i[0];(i=[TS(0,r[1]*s/h-h/2)])[1]=DS(r[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:l}},t}();const ES={create:function(t,e){var n=[];return t.eachComponent("parallel",(function(i,o){var r=new RS(i,t,e);r.name="parallel_"+o,r.resize(i,e),i.coordinateSystem=r,r.model=i,n.push(r)})),t.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",Cn).models[0];t.coordinateSystem=e.coordinateSystem}})),n}};var VS=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.activeIntervals=[],t}return t(n,e),n.prototype.getAreaSelectStyle=function(){return Yn([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},n.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=nt(t);if(e)for(var n=e.length-1;n>=0;n--)He(e[n])},n.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;iYS}(t)||r){if(a&&!r){"single"===s.brushMode&&aw(t);var l=nt(s);l.brushType=ww(l.brushType,a),l.panelId=a===BS?null:a.panelId,r=t._creatingCover=$S(t,l),t._covers.push(r)}if(r){var u=Dw[ww(t._brushType,a)];r.__brushOption.range=u.getCreatingRange(xw(t,r,t._track)),i&&(QS(t,r),u.updateCommon(t,r)),tw(t,r),o={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&ow(t,e,n)&&aw(t)&&(o={isEnd:i,removeOnClick:!0});return o}function ww(t,e){return"auto"===t?e.defaultBrushType:t}var Mw={mousedown:function(t){if(this._dragging)Iw(this,t);else if(!t.target||!t.target.draggable){_w(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=ow(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=ow(t,e,n);if(!t._dragging)for(var a=0;a=0&&(r[o[a].depth]=new lr(o[a],this,e));if(i&&n)return Xb(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var o=i.depth,r=n.levelModels[o];r&&(t.parentModel=r)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var o=i.depth,r=n.levelModels[o];r&&(t.parentModel=r)}return t}))})).data},n.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},n.prototype.getGraph=function(){return this.getData().graph},n.prototype.getEdgeData=function(){return this.getGraph().edgeData},n.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var o=this.getDataParams(t,n),r=o.data,a=o.value;return Gl("nameValue",{name:r.source+" -- "+r.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return Gl("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},n.prototype.optionUpdated=function(){},n.prototype.getDataParams=function(t,n){var i=e.prototype.getDataParams.call(this,t,n);if(null==i.value&&"node"===n){var o=this.getGraph().getNodeByIndex(t).getLayout().value;i.value=o}return i},n.type="series.sankey",n.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},n}(cu);const Hw=Ww;function Yw(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),o=function(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=o;var r=o.width,s=o.height,l=t.getGraph(),u=l.nodes,c=l.edges;!function(t){a(t,(function(t){var e=tM(t.outEdges,Qw),n=tM(t.inEdges,Qw),i=t.getValue()||0,o=Math.max(e,n,i);t.setLayout({value:o},!0)}))}(u),function(t,e,n,i,o,r,s,l,u){(function(t,e,n,i,o,r,s){for(var l=[],u=[],c=[],d=[],h=0,p=0;p=0;v&&m.depth>f&&(f=m.depth),y.setLayout({depth:v?m.depth:h},!0),"vertical"===r?y.setLayout({dy:n},!0):y.setLayout({dx:n},!0);for(var x=0;xh-1?f:h-1;s&&"left"!==s&&function(t,e,n,i){if("right"===e){for(var o=[],r=t,s=0;r.length;){for(var l=0;l0;r--)Zw(l,u*=.99,s),Xw(l,o,n,i,s),eM(l,u,s),Xw(l,o,n,i,s)}(t,e,r,o,i,s,l),function(t,e){var n="vertical"===e?"x":"y";a(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),a(t,(function(t){var e=0,n=0;a(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),a(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,l)}(u,c,n,i,r,s,0!==lt(u,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function Uw(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function Xw(t,e,n,i,o){var r="vertical"===o?"x":"y";a(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[r]-e.getLayout()[r]}));for(var u=0,c=t.length,d="vertical"===o?"dx":"dy",h=0;h0&&(a=s.getLayout()[r]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]+s.getLayout()[d]+e;if((l=u-e-("vertical"===o?i:n))>0){a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(h=c-2;h>=0;--h)(l=(s=t[h]).getLayout()[r]+s.getLayout()[d]+e-u)>0&&(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]}}))}function Zw(t,e,n){a(t.slice().reverse(),(function(t){a(t,(function(t){if(t.outEdges.length){var i=tM(t.outEdges,jw,n)/tM(t.outEdges,Qw);if(isNaN(i)){var o=t.outEdges.length;i=o?tM(t.outEdges,qw,n)/o:0}if("vertical"===n){var r=t.getLayout().x+(i-$w(t,n))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(i-$w(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function jw(t,e){return $w(t.node2,e)*t.getValue()}function qw(t,e){return $w(t.node2,e)}function Kw(t,e){return $w(t.node1,e)*t.getValue()}function Jw(t,e){return $w(t.node1,e)}function $w(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Qw(t){return t.getValue()}function tM(t,e,n){for(var i=0,o=t.length,r=-1;++rr&&(r=e)})),a(n,(function(e){var n=new __({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}i.length&&a(i,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var iM=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),s=e.getComponent("yAxis",this.get("yAxisIndex")),l=r.get("type"),u=s.get("type");"category"===l?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===u?(t.layout="vertical",n=s.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var c=["x","y"],d="horizontal"===t.layout?0:1,h=this._baseAxisDim=c[d],p=c[1-d],g=[r,s],y=g[d].get("type"),m=g[1-d].get("type"),v=t.data;if(v&&i){var x=[];a(v,(function(t,e){var n;o(t)?(n=t.slice(),t.unshift(e)):o(t.value)?((n=f({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,x.push(n)})),t.data=x}var _=this.defaultValueDimensions,b=[{name:h,type:Jd(y),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:Jd(m),dimsDef:_.slice()}];return Sy(this,{coordDimensions:b,dimensionsCount:_.length+1,encodeDefaulter:at(Na,b,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),oM=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return t(n,e),n.type="series.boxplot",n.dependencies=["xAxis","yAxis","grid"],n.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},n}(cu);it(oM,iM,!0);const rM=oM;var aM=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){var i=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(r).add((function(t){if(i.hasValue(t)){var e=uM(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),o.add(e)}})).update((function(t,e){var n=r.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?(oo(n),cM(s,n,i,t)):n=uM(s,i,t,a),o.add(n),i.setItemGraphicEl(t,n)}else o.remove(n)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&o.remove(e)})).execute(),this._data=i},n.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},n.type="boxplot",n}(Su),sM=function(){},lM=function(e){function n(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return t(n,e),n.prototype.getDefaultShape=function(){return new sM},n.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();im){var S=[x,b];o.push(S)}}}return{boxData:i,outliers:o}}(n.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var yM=["color","borderColor"],mM=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},n.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},n.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},n.prototype.eachRendered=function(t){ko(this._progressiveEls||this.group,t)},n.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},n.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,o=e.getLayout("isSimpleBox"),r=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(r&&bM(s,a))return;var l=_M(a,n,!0);Qi(l,{shape:{points:a.ends}},t,n),SM(l,e,n,o),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);r&&bM(s,c)?i.remove(u):(u?($i(u,{shape:{points:c.ends}},t,a),oo(u)):u=_M(c),SM(u,e,a,o),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},n.prototype._renderLarge=function(t){this._clear(),DM(t,this.group);var e=t.get("clip",!0)?vg(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},n.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var r=_M(i.getItemLayout(n));SM(r,i,n,o),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},n.prototype._incrementalRenderLarge=function(t,e){DM(e,this.group,this._progressiveEls,!0)},n.prototype.remove=function(t){this._clear()},n.prototype._clear=function(){this.group.removeAll(),this._data=null},n.type="candlestick",n}(Su),vM=function(){},xM=function(e){function n(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return t(n,e),n.prototype.getDefaultShape=function(){return new vM},n.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},n}(y);function _M(t,e,n){var i=t.ends;return new xM({shape:{points:n?wM(i,t):i},z2:100})}function bM(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]);0===t&&(o=n.get(["itemStyle","borderColorDoji"]));var r=n.getModel("itemStyle").getItemStyle(yM);e.useStyle(r),e.style.fill=null,e.style.stroke=o}const CM=mM;var AM=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return t(n,e),n.prototype.getShadowDim=function(){return"open"},n.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},n.type="series.candlestick",n.dependencies=["xAxis","yAxis","grid"],n.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},n}(cu);it(AM,iM,!0);const LM=AM;function kM(t){t&&o(t.series)&&a(t.series,(function(t){s(t)&&"k"===t.type&&(t.type="candlestick")}))}var PM=["itemStyle","borderColor"],NM=["itemStyle","borderColor0"],OM=["itemStyle","borderColorDoji"],RM=["itemStyle","color"],EM=["itemStyle","color0"];const VM={seriesType:"candlestick",plan:pu(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?RM:EM)}function i(t,e){return e.get(0===t?OM:t>0?PM:NM)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var o;null!=(o=t.next());){var r=e.getItemModel(o),a=e.getItemLayout(o).sign,s=r.getItemStyle();s.fill=n(a,r),s.stroke=i(a,r)||s.fill;var l=e.ensureUniqueItemVisual(o,"style");f(l,s)}}}}};function zM(t,e,n,i,o,r){return n>i?-1:n0?t.get(o,e-1)<=i?1:-1:1}const BM={seriesType:"candlestick",plan:pu(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),o=function(t,e){var n,i=t.getBaseAxis(),o="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),r=Fe(_(t.get("barMaxWidth"),o),o),a=Fe(_(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Fe(s,o):Math.max(Math.min(o/2,r),a)}(t,n),r=["x","y"],a=n.getDimensionIndex(n.mapDimension(r[0])),s=i(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),l=s[0],u=s[1],c=s[2],d=s[3];if(n.setLayout({candleWidth:o,isSimpleBox:o<=1.3}),!(a<0||s.length<4))return{progress:t.pipelineContext.large?function(n,i){var o,r,s=qh(4*n.count),h=0,p=[],f=[],g=i.getStore(),y=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(r=n.next());){var m=g.get(a,r),v=g.get(l,r),x=g.get(u,r),_=g.get(c,r),b=g.get(d,r);isNaN(m)||isNaN(_)||isNaN(b)?(s[h++]=NaN,h+=3):(s[h++]=zM(g,r,v,x,u,y),p[0]=m,p[1]=_,o=e.dataToPoint(p,null,f),s[h++]=o?o[0]:NaN,s[h++]=o?o[1]:NaN,p[1]=b,o=e.dataToPoint(p,null,f),s[h++]=o?o[1]:NaN)}i.setLayout("largePoints",s)}:function(t,n){var i,r=n.getStore();for(;null!=(i=t.next());){var s=r.get(a,i),h=r.get(l,i),p=r.get(u,i),f=r.get(c,i),g=r.get(d,i),y=Math.min(h,p),m=Math.max(h,p),v=M(y,s),x=M(m,s),_=M(f,s),b=M(g,s),S=[];I(S,x,0),I(S,v,1),S.push(T(b),T(x),T(_),T(v));var w=!!n.getItemModel(i).get(["itemStyle","borderColorDoji"]);n.setItemLayout(i,{sign:zM(r,i,h,p,u,w),initBaseline:h>p?x[1]:v[1],ends:S,brushRect:D(f,g,s)})}function M(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function I(t,e,n){var i=e.slice(),r=e.slice();i[0]=vo(i[0]+o/2,1,!1),r[0]=vo(r[0]-o/2,1,!0),n?t.push(i,r):t.push(r,i)}function D(t,e,n){var i=M(t,n),r=M(e,n);return i[0]-=o/2,r[0]-=o/2,{x:i[0],y:i[1],width:o,height:r[1]-i[1]}}function T(t){return t[0]=vo(t[0],1),t}}}}};function GM(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var FM=function(e){function n(t,n){var i=e.call(this)||this,o=new tg(t,n),r=new U;return i.add(o),i.add(r),i.updateData(t,n),i}return t(n,e),n.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},n.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),r=0;r0&&(r=this._getLineLength(i)/l*1e3),r!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var c=void 0;c=g(u)?u(n):u,i.__t>0&&(c=-r*i.__t),this._animateSymbol(i,r,c,a,s)}this._period=r,this._loop=a,this._roundTrip=s}},n.prototype._animateSymbol=function(t,e,n,i,o){if(e>0){t.__t=0;var r=this,a=t.animate("",i).when(o?2*e:e,{__t:o?2:1}).delay(n).during((function(){r._updateSymbolPosition(t)}));i||a.done((function(){r.remove(t)})),a.start()}},n.prototype._getLineLength=function(t){return Lt(t.__p1,t.__cp1)+Lt(t.__cp1,t.__p2)},n.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},n.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},n.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,r=[t.x,t.y],a=r.slice(),s=xe,l=Se;r[0]=s(e[0],i[0],n[0],o),r[1]=s(e[1],i[1],n[1],o);var u=t.__t<1?l(e[0],i[0],n[0],o):l(n[0],i[0],e[0],1-o),c=t.__t<1?l(e[1],i[1],n[1],o):l(n[1],i[1],e[1],1-o);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[r]<=e);r--);r=Math.min(r,o-2)}else{for(r=a;re);r++);r=Math.min(r-1,o-2)}var s=(e-i[r])/(i[r+1]-i[r]),l=n[r],u=n[r+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var c=t.__t<1?u[0]-l[0]:l[0]-u[0],d=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},n}(UM);const jM=ZM;var qM=function(){this.polyline=!1,this.curveness=0,this.segs=[]},KM=function(e){function n(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t(n,e),n.prototype.reset=function(){this.notClear=!1,this._off=0},n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new qM},n.prototype.buildPath=function(t,e){var n,i=e.segs,o=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var d=(s+u)/2-(l-c)*o,h=(l+c)/2-(u-s)*o;t.quadraticCurveTo(d,h,u,c)}else t.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},n.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,o=n.curveness,r=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],c=i[s++],d=1;d0){if(Me(u,c,(u+h)/2-(c-p)*o,(c+p)/2-(h-u)*o,h,p,r,t,e))return a}else if(we(u,c,h,p,r,t,e))return a;a++}return-1},n.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},n.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,o=-1/0,r=-1/0,a=0;a0&&(r.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();var $M={seriesType:"lines",plan:pu(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(o,r){var a=[];if(i){var s=void 0,l=o.end-o.start;if(n){for(var u=0,c=o.start;c0&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(i);var u=t.get("clip",!0)&&vg(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},n.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},n.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},n.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},n.prototype.updateTransform=function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var r=QM.reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},n.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),r=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new JM:new Ab(o?i?jM:XM:i?UM:Ib),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=r),this.group.add(n.group),n},n.prototype._showEffect=function(t){return!!t.get(["effect","show"])},n.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},n.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},n.prototype.dispose=function(t,e){this.remove(t,e)},n.type="lines",n}(Su);var eI="undefined"==typeof Uint32Array?Array:Uint32Array,nI="undefined"==typeof Float64Array?Array:Float64Array;function iI(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=i(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),ee([e,t[0],t[1]])})))}var oI=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return t(n,e),n.prototype.init=function(t){t.data=t.data||[],iI(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},n.prototype.mergeOption=function(t){if(iI(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},n.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=dt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=dt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},n.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},n.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},n.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o ")})},n.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},n.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},n.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},n.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},n.type="series.lines",n.dependencies=["grid","polar","geo","calendar"],n.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},n}(cu);const rI=oI;function aI(t){return t instanceof Array||(t=[t,t]),t}const sI={seriesType:"lines",reset:function(t){var e=aI(t.get("symbol")),n=aI(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=aI(n.getShallow("symbol",!0)),o=aI(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1])}:null}}};var lI=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=yt.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=t.length;c.width=e,c.height=n;for(var p=0;p0){var I=r(m)?s:l;m>0&&(m=m*w+S),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*m*256}else _+=4}return d.putImageData(v,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=yt.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},t}();const uI=lI;function cI(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var dI=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):cI(o)&&this._renderOnGeo(o,t,i,n)},n.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},n.prototype.incrementalRender=function(t,e,n,i){var o=e.coordinateSystem;o&&(cI(o)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},n.prototype.eachRendered=function(t){ko(this._progressiveEls||this.group,t)},n.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,o){var r,a,s,l,u=t.coordinateSystem,c=xg(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");r=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),v=t.get(["itemStyle","borderRadius"]),x=Vo(t),_=t.getModel("emphasis"),b=_.get("focus"),S=_.get("blurScope"),w=_.get("disabled"),M=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||Al[1])continue;var L=u.dataToPoint([C,A]);D=new F({shape:{x:L[0]-r/2,y:L[1]-a/2,width:r,height:a},style:T})}else{if(isNaN(f.get(M[1],I)))continue;D=new F({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:T})}if(f.hasItemOption){var k=f.getItemModel(I),P=k.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),y=k.getModel(["blur","itemStyle"]).getItemStyle(),m=k.getModel(["select","itemStyle"]).getItemStyle(),v=k.get(["itemStyle","borderRadius"]),b=P.get("focus"),S=P.get("blurScope"),w=P.get("disabled"),x=Vo(k)}D.shape.r=v;var N=t.getRawValue(I),O="-";N&&null!=N[2]&&(O=N[2]+""),Eo(D,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:T.opacity,defaultText:O}),D.ensureState("emphasis").style=g,D.ensureState("blur").style=y,D.ensureState("select").style=m,Gi(D,b,S,w),D.incremental=o,o&&(D.states.emphasis.hoverLayer=!0),p.add(D),f.setItemGraphicEl(I,D),this._progressiveEls&&this._progressiveEls.push(D)}},n.prototype._renderOnGeo=function(t,e,n,o){var r=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,s=e.getData(),l=this._hmLayer||this._hmLayer||new uI;l.blurSize=e.get("blurSize"),l.pointSize=e.get("pointSize"),l.minOpacity=e.get("minOpacity"),l.maxOpacity=e.get("maxOpacity");var u=t.getViewRect().clone(),c=t.getRoamTransform();u.applyTransform(c);var d=Math.max(u.x,0),h=Math.max(u.y,0),p=Math.min(u.width+u.x,o.getWidth()),f=Math.min(u.height+u.y,o.getHeight()),g=p-d,y=f-h,m=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],v=s.mapArray(m,(function(e,n,i){var o=t.dataToPoint([e,n]);return o[0]-=d,o[1]-=h,o.push(i),o})),x=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(x,n.option.range):function(t,e,n){var o=t[1]-t[0],r=(e=i(e,(function(e){return{interval:[(e.interval[0]-t[0])/o,(e.interval[1]-t[0])/o]}}))).length,a=0;return function(t){var i;for(i=a;i=0;i--){var o;if((o=e[i].interval)[0]<=t&&t<=o[1]){a=i;break}}return i>=0&&i0?1:-1}(n,a,r,i,h),function(t,e,n,i,r,a,s,l,u,c){var d,h=u.valueDim,p=u.categoryDim,f=Math.abs(n[p.wh]),g=t.getItemVisual(e,"symbolSize");d=o(g)?g.slice():null==g?["100%","100%"]:[g,g];d[p.index]=Fe(d[p.index],f),d[h.index]=Fe(d[h.index],i?f:Math.abs(a)),c.symbolSize=d;var y=c.symbolScale=[d[0]/l,d[1]/l];y[h.index]*=(u.isHorizontal?-1:1)*s}(t,e,r,a,0,h.boundingLength,h.pxSign,c,i,h),function(t,e,n,i,o){var r=t.get(fI)||0;r&&(yI.attr({scaleX:e[0],scaleY:e[1],rotation:n}),yI.updateTransform(),r/=yI.getLineScale(),r*=e[i.valueDim.index]);o.valueLineWidth=r||0}(n,h.symbolScale,u,i,h);var p=h.symbolSize,g=Lc(n.get("symbolOffset"),p);return function(t,e,n,i,o,r,a,s,l,u,c,d){var h=c.categoryDim,p=c.valueDim,g=d.pxSign,y=Math.max(e[p.index]+s,0),m=y;if(i){var v=Math.abs(l),x=Ht(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1));var b=Fe(x,e[p.index]),S=Math.max(y+2*b,0),w=_?0:2*b,M=on(i),I=M?i:NI((v+w)/S);S=y+2*(b=(v-I*y)/2/(_?I:Math.max(I-1,1))),w=_?0:2*b,M||"fixed"===i||(I=u?NI((Math.abs(u)+w)/S):0),m=I*S-w,d.repeatTimes=I,d.symbolMargin=b}var D=g*(m/2),T=d.pathPosition=[];T[h.index]=n[h.wh]/2,T[p.index]="start"===a?D:"end"===a?l-D:l/2,r&&(T[0]+=r[0],T[1]+=r[1]);var C=d.bundlePosition=[];C[h.index]=n[h.xy],C[p.index]=n[p.xy];var A=d.barRectShape=f({},n);A[p.wh]=g*Math.max(Math.abs(n[p.wh]),Math.abs(T[p.index]+D)),A[h.wh]=n[h.wh];var L=d.clipShape={};L[h.xy]=-n[h.xy],L[h.wh]=c.ecSize[h.wh],L[p.xy]=0,L[p.wh]=n[p.wh]}(n,p,r,a,0,g,l,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function vI(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function xI(t){var e=t.symbolPatternSize,n=Cc(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function _I(t,e,n,i){var o=t.__pictorialBundle,r=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,c=0,d=r[e.valueDim.index]+a+2*n.symbolMargin;for(LI(t,(function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c0:i<0)&&(o=u-1-t),e[l.index]=d*(o-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function bI(t,e,n,i){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?kI(r,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(r=t.__pictorialMainPath=xI(n),o.add(r),kI(r,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function SI(t,e,n){var i=f({},e.barRectShape),o=t.__pictorialBarRect;o?kI(o,null,{shape:i},e,n):((o=t.__pictorialBarRect=new F({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function wI(t,e,n,i){if(n.symbolClip){var o=t.__pictorialClipPath,r=f({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(o)$i(o,{shape:r},s,l);else{r[a.wh]=0,o=new F({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[a.wh]=n.clipShape[a.wh],Po[i?"updateProps":"initProps"](o,{shape:u},s,l)}}}function MI(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=II,n.isAnimationEnabled=DI,n}function II(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function DI(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function TI(t,e,n,i){var o=new U,r=new U;return o.add(r),o.__pictorialBundle=r,r.x=n.bundlePosition[0],r.y=n.bundlePosition[1],n.symbolRepeat?_I(o,e,n):bI(o,0,n),SI(o,n,i),wI(o,e,n,i),o.__pictorialShapeStr=AI(t,n),o.__pictorialSymbolMeta=n,o}function CI(t,e,n,i){var o=i.__pictorialBarRect;o&&o.removeTextContent();var r=[];LI(i,(function(t){r.push(t)})),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),a(r,(function(t){eo(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function AI(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function LI(t,e,n){a(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function kI(t,e,n,i,o,r){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&Po[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,r)}function PI(t,e,n){var i=n.dataIndex,o=n.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),c=r.get("focus"),d=r.get("blurScope"),h=r.get("scale");LI(t,(function(t){if(t instanceof S){var e=t.style;t.useStyle(f({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,h&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var p=e.valueDim.posDesc[+(n.boundingLength>0)],g=t.__pictorialBarRect;g.ignoreClip=!0,Eo(g,Vo(o),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:Kf(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Gi(t,c,d,r.get("disabled"))}function NI(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const OI=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){var i=this.group,o=t.getData(),r=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:gI[+s],categoryDim:gI[1-+s]};o.diff(r).add((function(t){if(o.hasValue(t)){var e=MI(o,t),n=mI(o,t,e,u),r=TI(o,u,n);o.setItemGraphicEl(t,r),i.add(r),PI(r,u,n)}})).update((function(t,e){var n=r.getItemGraphicEl(e);if(o.hasValue(t)){var a=MI(o,t),s=mI(o,t,a,u),l=AI(o,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),o.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var i=n.animationModel,o=n.dataIndex,r=t.__pictorialBundle;$i(r,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,o),n.symbolRepeat?_I(t,e,n,!0):bI(t,e,n,!0);SI(t,n,!0),wI(t,e,n,!0)}(n,u,s):n=TI(o,u,s,!0),o.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),PI(n,u,s)}else i.remove(n)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&CI(r,t,e.__pictorialSymbolMeta.animationModel,e)})).execute();var c=t.get("clip",!0)?vg(t.coordinateSystem,!1,t):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},n.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl((function(e){CI(i,Zn(e).dataIndex,t,e)})):n.removeAll()},n.type="pictorialBar",n}(Su);const RI=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return t(n,e),n.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},n.type="series.pictorialBar",n.dependencies=["grid"],n.defaultOption=dr(Vg.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),n}(Vg);const EI=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t._layers=[],t}return t(n,e),n.prototype.render=function(t,e,n){var i=t.getData(),o=this,r=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}r.x=0,r.y=l.y+u[0];var d=new jd(this._layersSeries||[],a,c,c),h=[];function p(e,n,s){var l=o._layers;if("remove"!==e){for(var u,c,d=[],p=[],f=a[n].indices,g=0;gr&&(r=s),i.push(s)}for(var u=0;ur&&(r=d)}return{y0:o,max:r}}(u),d=c.y0,h=n/c.max,p=a.length,f=a[0].indices.length,g=0;gD&&!qe(C-D)&&C0?(o.virtualPiece?o.virtualPiece.updateData(!1,d,t,e,n):(o.virtualPiece=new FI(d,t,e,n),l.add(o.virtualPiece)),h.piece.off("click"),o.virtualPiece.on("click",(function(t){o._rootToNode(h.parentNode)}))):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null),this._initEvents(),this._oldChildren=c},n.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var o=i.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(i);else if("link"===o){var r=i.getModel(),a=r.get("link");if(a)oa(a,r.get("target",!0)||"_blank")}n=!0}}))}))},n.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:WI,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},n.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(i*i+o*o);return r<=n.r&&r>=n.r0}},n.type="sunburst",n}(Su);function XI(t){var e=0;a(t.children,(function(t){XI(t);var n=t.value;o(n)&&(n=n[0]),e+=n}));var n=t.value;o(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),o(t.value)?t.value[0]=n:t.value=n}const ZI=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.ignoreStyleOnData=!0,t}return t(n,e),n.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};XI(n);var o=this._levelModels=i(t.levels||[],(function(t){return new lr(t,this,e)}),this),r=Ax.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),i=o[n.depth];return i&&(t.parentModel=i),t}))}));return r.data},n.prototype.optionUpdated=function(){this.resetViewRoot()},n.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=Nx(i,this),n},n.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},n.prototype.getViewRoot=function(){return this._viewRoot},n.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},n.prototype.enableAriaDecal=function(){Bx(this)},n.type="series.sunburst",n.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},n}(cu);var jI=Math.PI/180;function qI(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");o(i)||(i=[0,i]),o(e)||(e=[e,e]);var r=n.getWidth(),s=n.getHeight(),l=Math.min(r,s),u=Fe(e[0],r),c=Fe(e[1],s),d=Fe(i[0],l/2),h=Fe(i[1],l/2),p=-t.get("startAngle")*jI,f=t.get("minAngle")*jI,g=t.getData().tree.root,y=t.getViewRoot(),m=y.depth,v=t.get("sort");null!=v&&KI(y,v);var x=0;a(y.children,(function(t){!isNaN(t.getValue())&&x++}));var _=y.getValue(),b=Math.PI/(_||x)*2,S=y.depth>0,w=y.height-(S?-1:1),M=(h-d)/(w||1),I=t.get("clockwise"),D=t.get("stillShowZeroSum"),T=I?1:-1,C=function(e,n){if(e){var i=n;if(e!==g){var o=e.getValue(),r=0===_&&D?b:o*b;r1;)r=r.parentNode;var a=i.getColorFromPalette(r.name||r.dataIndex+"",n);return t.depth>1&&e(a)&&(a=Ie(a,(t.depth-1)/(o-1)*.5)),a}(r,t,o.root.height));var s=i.ensureUniqueItemVisual(r.dataIndex,"style");f(s,a)}))}))}var $I={color:"fill",borderColor:"stroke"},QI={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},tD=Mn();const eD=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},n.prototype.getInitialData=function(t,e){return Ch(null,this)},n.prototype.getDataParams=function(t,n,i){var o=e.prototype.getDataParams.call(this,t,n);return i&&(o.info=tD(i).info),o},n.type="series.custom",n.dependencies=["grid","polar","geo","singleAxis","calendar"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},n}(cu);function nD(t,e){return e=e||[0,0],i(["x","y"],(function(n,i){var o=this.getAxis(n),r=e[i],a=t[i]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a))}),this)}function iD(t,e){return e=e||[0,0],i([0,1],(function(n){var i=e[n],o=t[n]/2,r=[],a=[];return r[n]=i-o,a[n]=i+o,r[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(a)[n])}),this)}function oD(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))}function rD(t,e){return e=e||[0,0],i(["Radius","Angle"],(function(n,i){var o=this["get"+n+"Axis"](),r=e[i],a=t[i]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function aD(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||N(t,"text")))}function sD(t,e,n){var i,o,r,s=t;if("text"===e)r=s;else{r={},N(s,"text")&&(r.text=s.text),N(s,"rich")&&(r.rich=s.rich),N(s,"textFill")&&(r.fill=s.textFill),N(s,"textStroke")&&(r.stroke=s.textStroke),N(s,"fontFamily")&&(r.fontFamily=s.fontFamily),N(s,"fontSize")&&(r.fontSize=s.fontSize),N(s,"fontStyle")&&(r.fontStyle=s.fontStyle),N(s,"fontWeight")&&(r.fontWeight=s.fontWeight),o={type:"text",style:r,silent:!0},i={};var l=N(s,"textPosition");n?i.position=l?s.textPosition:"inside":l&&(i.position=s.textPosition),N(s,"textPosition")&&(i.position=s.textPosition),N(s,"textOffset")&&(i.offset=s.textOffset),N(s,"textRotation")&&(i.rotation=s.textRotation),N(s,"textDistance")&&(i.distance=s.textDistance)}return lD(r,t),a(r.rich,(function(t){lD(t,t)})),{textConfig:i,textContent:o}}function lD(t,e){e&&(e.font=e.textFont||e.font,N(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),N(e,"textAlign")&&(t.align=e.textAlign),N(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),N(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),N(e,"textWidth")&&(t.width=e.textWidth),N(e,"textHeight")&&(t.height=e.textHeight),N(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),N(e,"textPadding")&&(t.padding=e.textPadding),N(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),N(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),N(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),N(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),N(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),N(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),N(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function uD(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var o=i.textPosition.indexOf("inside")>=0,r=t.fill||"#000";cD(i,e);var s=null==i.textFill;return o?s&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=r),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(s&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,a(e.rich,(function(t){cD(t,t)})),i}function cD(t,e){e&&(N(e,"fill")&&(t.textFill=e.fill),N(e,"stroke")&&(t.textStroke=e.fill),N(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),N(e,"font")&&(t.font=e.font),N(e,"fontStyle")&&(t.fontStyle=e.fontStyle),N(e,"fontWeight")&&(t.fontWeight=e.fontWeight),N(e,"fontSize")&&(t.fontSize=e.fontSize),N(e,"fontFamily")&&(t.fontFamily=e.fontFamily),N(e,"align")&&(t.textAlign=e.align),N(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),N(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),N(e,"width")&&(t.textWidth=e.width),N(e,"height")&&(t.textHeight=e.height),N(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),N(e,"padding")&&(t.textPadding=e.padding),N(e,"borderColor")&&(t.textBorderColor=e.borderColor),N(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),N(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),N(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),N(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),N(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),N(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),N(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),N(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),N(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),N(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var dD={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},hD=x(dD);n(De,(function(t,e){return t[e]=1,t}),{}),De.join(", ");var pD=["","style","shape","extra"],fD=Mn();function gD(t,e,n,i,o){var r=t+"Animation",a=Ki(t,i,o)||{},s=fD(e).userDuring;return a.duration>0&&(a.during=s?ut(SD,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),f(a,n[r]),a}function yD(t,e,n,i){var o=(i=i||{}).dataIndex,r=i.isInit,s=i.clearStyle,l=n.isAnimationEnabled(),u=fD(t),c=e.style;u.userDuring=e.during;var h={},p={};if(function(t,e,n){for(var i=0;i=0)){var h=t.getAnimationStyleProps(),p=h?h.style:null;if(p){!o&&(o=i.style={});var f=x(n);for(u=0;u0&&t.animateFrom(g,m)}else!function(t,e,n,i,o){if(o){var r=gD("update",t,e,i,n);r.duration>0&&t.animateFrom(o,r)}}(t,e,o||0,n,h);mD(t,e),c?t.dirty():t.markRedraw()}function mD(t,e){for(var n=fD(t).leaveToProps,i=0;i=0){!r&&(r=i[t]={});var p=x(a);for(c=0;ci[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var o=e.dataToRadius(i[0]),r=n.dataToAngle(i[1]),a=t.coordToPoint([o,r]);return a.push(o,r*Math.PI/180),a},size:ut(rD,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function FD(t){return t instanceof y}function WD(t){return t instanceof Jt}const HD=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n,i){this._progressiveEls=null;var o=this._data,r=t.getData(),a=this.group,s=jD(t,r,e,n);o||a.removeAll(),r.diff(o).add((function(e){KD(n,null,e,s(e,i),t,a,r)})).remove((function(e){var n=o.getItemGraphicEl(e);n&&vD(n,tD(n).option,t)})).update((function(e,l){var u=o.getItemGraphicEl(l);KD(n,u,e,s(e,i),t,a,r)})).execute();var l=t.get("clip",!0)?vg(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=r},n.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},n.prototype.incrementalRender=function(t,e,n,i,o){var r=e.getData(),a=jD(e,r,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?n.getStore().get(o,e):void 0}var r=n.get(i.name,e),a=i&&i.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(e,i){null==i&&(i=l);var o=x(i,LD).getItemStyle(),r=b(i,LD),a=zo(r,null,null,!0,!0);a.text=r.getShallow("show")?Wt(t.getFormattedLabel(i,LD),t.getFormattedLabel(i,kD),Kf(n,i)):null;var s=Bo(r,null,!0);return w(e,o),o=uD(o,a,s),e&&S(o,e),o.legacy=!0,o},visual:function(t,e){if(null==e&&(e=l),N($I,t)){var i=n.getItemVisual(e,"style");return i?i[$I[t]]:null}if(N(QI,t))return n.getItemVisual(e,t)},barLayout:function(t){if("cartesian2d"===a.type){var e=a.getBaseAxis();return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var o=n.getBandWidth(),r=0;r=d;f--){var g=e.childAt(f);nT(e,g,o)}}(t,h,n,i,o),a>=0?r.replaceAt(h,a):r.add(h),h}function $D(t,e,n){var i,o=tD(t),r=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=r&&r!==o.customGraphicType||"path"===r&&((i=a)&&(N(i,"pathData")||N(i,"d")))&&aT(a)!==o.customPathData||"image"===r&&N(s,"image")&&s.image!==o.customImagePath}function QD(t,e,n){var i=e?tT(t,e):t,o=e?eT(t,i,LD):t.style,r=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?tT(s,e):s:null;if(o&&(n.isLegacy||aD(o,r,!!a,!!l))){n.isLegacy=!0;var u=sD(o,r,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var d=e?n[e]:n.normal;d.cfg=a,d.conOpt=l}function tT(t,e){return e?t?t[e]:null:t}function eT(t,e,n){var i=e&&e.style;return null==i&&n===LD&&t&&(i=t.styleEmphasis),i}function nT(t,e,n){e&&vD(e,tD(t).option,n)}function iT(t,e){var n=t&&t.name;return null!=n?n:zD+e}function oT(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,o=null!=e?n.oldChildren[e]:null;JD(n.api,o,n.dataIndex,i,n.seriesModel,n.group)}function rT(t){var e=this.context,n=e.oldChildren[t];n&&vD(n,tD(n).option,e.seriesModel)}function aT(t){return t&&(t.pathData||t.d)}var sT=Mn(),lT=nt,uT=ut;function cT(t,e,n,i){dT(sT(n).lastProp,i)||(sT(n).lastProp=i,e?$i(n,i,t):(n.stopAnimation(),n.attr(i)))}function dT(t,e){if(s(t)&&s(e)){var n=!0;return a(e,(function(e,i){n=n&&dT(t[i],e)})),!!n}return t===e}function hT(t,e){t[e.get(["label","show"])?"show":"hide"]()}function pT(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function fT(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)}))}const gT=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var o=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(t,e);if(a){var d=at(cT,e,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,e)}else a=this._group=new U,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);fT(a,e,!0),this._renderHandle(o)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,o="category"===i.type,r=e.get("snap");if(!r&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&i.getBandWidth()>a)return!0;if(r){var s=hm(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,o){},t.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;if(o){var r=sT(t).pointerEl=new Po[o.type](lT(e.pointer));t.add(r)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var o=sT(t).labelEl=new X(lT(e.label));t.add(o),hT(o,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=sT(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var o=sT(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{x:e.label.x,y:e.label.y}),hT(o,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=n.getModel("handle"),s=n.get("status");if(!a.get("show")||!s||"hide"===s)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Io(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Zt(t.event)},onmousedown:uT(this._onHandleDragMove,this,0,0),drift:uT(this._onHandleDragMove,this),ondragend:uT(this._onHandleDragEnd,this)}),i.add(r)),fT(r,n,!1),r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");o(l)||(l=[l,l]),r.scaleX=l[0]/2,r.scaleY=l[1]/2,Tu(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){cT(this._axisPointerModel,!e&&this._moveAnimation,this._handle,pT(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(pT(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(pT(i)),sT(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Cu(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function yT(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function mT(t,e,n,i,o){var r=vT(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=$r(a.get("padding")||0),l=a.getFont(),u=At(r,l),c=o.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(t,e,n,i){var o=i.getWidth(),r=i.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+n,r)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,d,h,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:zo(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function vT(t,n,i,o,r){t=n.scale.parse(t);var s=n.scale.getLabel({value:t},{precision:r.precision}),l=r.formatter;if(l){var u={value:Rp(n,{value:t}),axisDimension:n.dim,axisIndex:n.index,seriesData:[]};a(o,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&u.seriesData.push(o)})),e(l)?s=l.replace("{value}",s):g(l)&&(s=l(u))}return s}function xT(t,e,n){var i=Qt();return Yt(i,i,n.rotation),ie(i,i,n.position),_o([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function _T(t,e,n,i,o,r){var a=um.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),mT(e,i,o,r,{position:xT(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function bT(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function ST(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function wT(t,e,n,i,o,r){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}var MT=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.grid,s=i.get("type"),l=IT(a,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(e,!0));if(s&&"none"!==s){var c=yT(i),d=DT[s](r,u,l);d.style=c,t.graphicKey=d.type,t.pointer=d}_T(e,t,Xy(a.model,n),n,i,o)},n.prototype.getHandleTransform=function(t,e,n){var i=Xy(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=xT(e.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),s=IT(r,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},n}(gT);function IT(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var DT={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bT([e,n[0]],[e,n[1]],TT(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:ST([e-i/2,n[0]],[i,o],TT(t))}}};function TT(t){return"x"===t.dim?0:1}const CT=MT;const AT=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="axisPointer",n.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},n}(va);var LT=Mn(),kT=a;function PT(t,e,n){if(!h.node){var i=e.getZr();LT(i).records||(LT(i).records={}),function(t,e){if(LT(t).initialized)return;function n(n,i){t.on(n,(function(n){var o=function(t){var e={showTip:[],hideTip:[]},n=function(i){var o=e[i.type];o?o.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);kT(LT(t).records,(function(t){t&&i(t,n,o.dispatchAction)})),function(t,e){var n,i=t.showTip.length,o=t.hideTip.length;i?n=t.showTip[i-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(o.pendings,e)}))}LT(t).initialized=!0,n("click",at(OT,"click")),n("mousemove",at(OT,"mousemove")),n("globalout",NT)}(i,e),(LT(i).records[t]||(LT(i).records[t]={})).handler=n}}function NT(t,e,n){t.handler("leave",null,n)}function OT(t,e,n,i){e.handler(t,n,i)}function RT(t,e){if(!h.node){var n=e.getZr();(LT(n).records||{})[t]&&(LT(n).records[t]=null)}}const ET=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";PT("axisPointer",n,(function(t,e,n){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},n.prototype.remove=function(t,e){RT("axisPointer",e)},n.prototype.dispose=function(t,e){RT("axisPointer",e)},n.type="axisPointer",n}(hu);function VT(t,e){var n,r=[],a=t.seriesIndex;if(null==a||!(n=e.getSeriesByIndex(a)))return{point:[]};var s=n.getData(),l=wn(s,t);if(null==l||l<0||o(l))return{point:[]};var u=s.getItemGraphicEl(l),c=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(l)||[];else if(c&&c.dataToPoint)if(t.isStacked){var d=c.getBaseAxis(),h=c.getOtherAxis(d).dim,p=d.dim,f="x"===h||"radius"===h?1:0,g=s.mapDimension(p),y=[];y[f]=s.get(g,l),y[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),r=c.dataToPoint(y)||[]}else r=c.dataToPoint(s.getValues(i(c.dimensions,(function(t){return s.mapDimension(t)})),l))||[];else if(u){var m=u.getBoundingRect().clone();m.applyTransform(u.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:u}}var zT=Mn();function BT(t,e,n){var i=t.currTrigger,o=[t.x,t.y],r=t,s=t.dispatchAction||ut(n.dispatchAction,n),l=e.getComponent("axisPointer").coordSysAxesInfo;if(l){YT(o)&&(o=VT({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var u=YT(o),c=r.axesInfo,d=l.axesInfo,h="leave"===i||YT(o),p={},f={},g={list:[],map:{}},y={showPointer:at(FT,f),showTooltip:at(WT,g)};a(l.coordSysMap,(function(t,e){var n=u||t.containPoint(o);a(l.coordSysAxesInfo[e],(function(t,e){var i=t.axis,r=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(c,t);if(!h&&n&&(!c||r)){var a=r&&r.value;null!=a||u||(a=i.pointToData(o)),null!=a&>(t,a,y,!1,p)}}))}));var m={};return a(d,(function(t,e){var n=t.linkGroup;n&&!f[e]&&a(n.axesInfo,(function(e,i){var o=f[i];if(e!==t&&o){var r=o.value;n.mapper&&(r=t.axis.scale.parse(n.mapper(r,HT(e),HT(t)))),m[t.key]=r}}))})),a(m,(function(t,e){GT(d[e],t,y,!0,p)})),function(t,e,n){var i=n.axesInfo=[];a(e,(function(e,n){var o=e.axisPointerModel.option,r=t[n];r?(!e.useHandle&&(o.status="show"),o.value=r.value,o.seriesDataIndices=(r.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})}))}(f,d,p),function(t,e,n,i){if(YT(e)||!t.list.length)return void i({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(g,o,t,s),function(t,e,n){var i=n.getZr(),o="axisPointerLastHighlights",r=zT(i)[o]||{},s=zT(i)[o]={};a(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&a(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;s[e]=t}))}));var l=[],u=[];a(r,(function(t,e){!s[e]&&u.push(t)})),a(s,(function(t,e){!r[e]&&l.push(t)})),u.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),l.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:l})}(d,0,n),p}}function GT(t,e,n,i,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=function(t,e){var n=e.axis,i=n.dim,o=t,r=[],s=Number.MAX_VALUE,l=-1;return a(e.seriesModels,(function(e,u){var c,d,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(h,t,n);d=p.dataIndices,c=p.nestestValue}else{if(!(d=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null)).length)return;c=e.getData().get(h[0],d[0])}if(null!=c&&isFinite(c)){var f=t-c,g=Math.abs(f);g<=s&&((g=0&&l<0)&&(s=g,l=f,o=c,r.length=0),a(d,(function(t){r.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:r,snapToValue:o}}(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&f(o,l[0]),!i&&t.snap&&r.containData(u)&&null!=u&&(e=u),n.showPointer(t,e,l),n.showTooltip(t,s,u)}else n.showPointer(t,e)}function FT(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function WT(t,e,n,i){var o=n.payloadBatch,r=e.axis,a=r.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=fm(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function HT(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function YT(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function UT(t){ym.registerAxisPointerClass("CartesianAxisPointer",CT),t.registerComponentModel(AT),t.registerComponentView(ET),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!o(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=cm(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},BT)}var XT=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,s=a.getOtherAxis(r).getExtent(),l=r.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var c=yT(i),d=ZT[u](r,a,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}var h=function(t,e,n,i,o){var r=e.axis,a=r.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=i.getRadiusAxis().getExtent();if("radius"===r.dim){var h=Qt();Yt(h,h,s),ie(h,h,[i.cx,i.cy]),l=_o([a,-o],h);var p=e.getModel("axisLabel").get("rotate")||0,f=um.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=d[1];l=i.coordToPoint([g+o,a]);var y=i.cx,m=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,n,0,a,i.get(["label","margin"]));mT(t,n,i,o,h)},n}(gT);var ZT={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:bT(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:wT(e.cx,e.cy,i[0],i[1],(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:wT(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}};const jT=XT;const qT=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},n.type="polar",n.dependencies=["radiusAxis","angleAxis"],n.defaultOption={z:0,center:["50%","50%"],radius:"80%"},n}(va);var KT=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Cn).models[0]},n.type="polarAxis",n}(va);it(KT,Bp);var JT=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="angleAxis",n}(KT),$T=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="radiusAxis",n}(KT),QT=function(e){function n(t,n){return e.call(this,"radius",t,n)||this}return t(n,e),n.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},n}(uf);QT.prototype.dataToRadius=uf.prototype.dataToCoord,QT.prototype.radiusToData=uf.prototype.coordToData;const tC=QT;var eC=Mn(),nC=function(e){function n(t,n){return e.call(this,"angle",t,n||[0,360])||this}return t(n,e),n.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},n.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var r=i[0],a=t.dataToCoord(r+1)-t.dataToCoord(r),s=Math.abs(a),l=At(null==r?"":r+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=eC(t.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-c)<=1&&Math.abs(p-o)<=1&&h>c?c=h:(d.lastTickCount=o,d.lastAutoInterval=c),c},n}(uf);nC.prototype.dataToAngle=uf.prototype.dataToCoord,nC.prototype.angleToData=uf.prototype.coordToData;const iC=nC;var oC=["radius","angle"];function rC(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const aC=function(){function t(t){this.dimensions=oC,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new tC,this._angleAxis=new iC,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),o=i.getExtent(),r=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);i.inverse?r=a-360:a=r+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,o=n*n+i*i-1e-4,r=this.r,a=this.r0;return o<=r*r&&o>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return rC(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return rC(e)===this?this.pointToData(n):null},t}();function sC(t,e){var n=this,i=n.getAngleAxis(),o=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();a(zp(e,"radius"),(function(t){o.scale.unionExtentFromData(e,t)})),a(zp(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),Pp(i.scale,i.model),Pp(o.scale,o.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),s=360/i.scale.count();i.inverse?r[1]+=s:r[1]-=s,i.setExtent(r[0],r[1])}}function lC(t,e){var n;if(t.type=e.get("type"),t.scale=Np(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),o=null!==(n=e.get("endAngle"))&&void 0!==n?n:i+(t.inverse?-360:360);t.setExtent(i,o)}e.axis=t,t.model=e}const uC={dimensions:oC,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new aC(i+"");r.update=sC;var a=r.getRadiusAxis(),s=r.getAngleAxis(),l=t.findAxisModel("radiusAxis"),u=t.findAxisModel("angleAxis");lC(a,l),lC(s,u),function(t,e,n){var i=e.get("center"),r=n.getWidth(),a=n.getHeight();t.cx=Fe(i[0],r),t.cy=Fe(i[1],a);var s=t.getRadiusAxis(),l=Math.min(r,a)/2,u=e.get("radius");null==u?u=[0,"100%"]:o(u)||(u=[0,u]);var c=[Fe(u[0],l),Fe(u[1],l)];s.inverse?s.setExtent(c[1],c[0]):s.setExtent(c[0],c[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Cn).models[0];t.coordinateSystem=e.coordinateSystem}})),n}};var cC=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function dC(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function hC(t){return t.getRadiusAxis().inverse?0:1}function pC(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var fC=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.axisPointerClass="PolarAxisPointer",t}return t(n,e),n.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,o=n.polar,r=o.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=i(n.getViewLabels(),(function(t){t=nt(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));pC(u),pC(s),a(cC,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||gC[e](this.group,t,o,s,l,r,u)}),this)}},n.type="angleAxis",n}(ym),gC={axisLine:function(t,e,n,i,o,r){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),d=hC(n),h=d?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===r[h]?new Po[p]({shape:{cx:n.cx,cy:n.cy,r:r[d],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new z({shape:{cx:n.cx,cy:n.cy,r:r[d],r0:r[h]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,o,r,a){var s=e.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),u=a[hC(n)],c=i(o,(function(t){return new W({shape:dC(n,[u,u+l],t.coord)})}));t.add(go(c,{style:P(s.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[hC(n)],c=[],d=0;dg?"left":"right",v=Math.abs(f[1]-y)/p<.3?"middle":f[1]>y?"top":"bottom";if(u&&u[l]){var x=u[l];s(x)&&x.textStyle&&(a=new lr(x.textStyle,c,c.ecModel))}var _=new X({silent:um.isLabelSilent(e),style:zo(a,{x:f[0],y:f[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(t.add(_),h){var b=um.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,Zn(_).eventData=b}}),this)},splitLine:function(t,e,n,i,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",D=_;v&&(i[s][M]||(i[s][M]={p:_,n:_}),D=i[s][M][I]);var T=void 0,C=void 0,A=void 0,L=void 0;if("radius"===d.dim){var k=d.dataToCoord(w)-_,P=r.dataToCoord(M);Math.abs(k)=L})}}}))}var IC={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},DC={splitNumber:5},TC=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="polar",n}(hu);function CC(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},r=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?u.vertical[r]:l[0],"horizontal"===a?u.horizontal[r]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Ht(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var c=e.rotate;return null==c&&(c=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-c:c,o.z2=1,o}var AC=["axisLine","axisTickLabel","axisName"],LC=["splitArea","splitLine"],kC=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.axisPointerClass="SingleAxisPointer",t}return t(n,e),n.prototype.render=function(t,n,i,o){var r=this.group;r.removeAll();var s=this._axisGroup;this._axisGroup=new U;var l=CC(t),u=new um(t,l);a(AC,u.add,u),r.add(this._axisGroup),r.add(u.getGroup()),a(LC,(function(e){t.get([e,"show"])&&PC[e](this,this.group,this._axisGroup,t)}),this),wo(s,this._axisGroup,t),e.prototype.render.call(this,t,n,i,o)},n.prototype.remove=function(){xm(this)},n.type="singleAxis",n}(ym),PC={splitLine:function(t,e,n,i){var o=i.axis;if(!o.scale.isBlank()){var r=i.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),c=o.isHorizontal(),d=[],h=0,p=o.getTicksCoords({tickModel:r}),f=[],g=[],y=0;y=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0===o?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return BC(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return BC(e)===this?this.pointToData(n):null},t}();function BC(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const GC={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,o){var r=new zC(i,t,e);r.name="single_"+o,r.resize(i,e),i.coordinateSystem=r,n.push(r)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Cn).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:VC};var FC=["x","y"],WC=["width","height"],HC=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.coordinateSystem,s=XC(a,1-UC(r)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var c=yT(i),d=YC[u](r,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}_T(e,t,CC(n),n,i,o)},n.prototype.getHandleTransform=function(t,e,n){var i=CC(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=xT(e.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.coordinateSystem,a=UC(o),s=XC(r,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=XC(r,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},n}(gT),YC={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bT([e,n[0]],[e,n[1]],UC(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:ST([e-i/2,n[0]],[i,o],UC(t))}}};function UC(t){return t.isHorizontal()?0:1}function XC(t,e){var n=t.getRect();return[n[FC[e]],n[FC[e]]+n[WC[e]]]}const ZC=HC;var jC=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="single",n}(hu);function qC(t,e){var n,r=t.cellSize;1===(n=o(r)?r:t.cellSize=[r,r]).length&&(n[1]=n[0]);var a=i([0,1],(function(t){return function(t,e){return null!=t[sa[e][0]]||null!=t[sa[e][1]]&&null!=t[sa[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));pa(t,e,{type:"box",ignoreSize:a})}const KC=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.init=function(t,n,i){var o=fa(t);e.prototype.init.apply(this,arguments),qC(t,o)},n.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),qC(this.option,t)},n.prototype.getCellSize=function(){return this.option.cellSize},n.type="calendar",n.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},n}(va);var JC=function(n){function o(){var t=null!==n&&n.apply(this,arguments)||this;return t.type=o.type,t}return t(o,n),o.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),a=o.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,r,i),this._renderLines(t,r,a,i),this._renderYearText(t,r,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,r,a,i)},o.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new F({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});n.add(u)}},o.prototype._renderLines=function(t,e,n,i){var o=this,r=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){h(u.formatedDate),0===c&&(u=r.getDateInfo(e.start.y+"-"+e.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}function h(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=o._getLinePointsOfOneWeek(t,e,n);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,i)}h(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,i)},o.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-e/2,i[1][o]=i[1][o]+e/2,i},o.prototype._drawSplitline=function(t,e,n){var i=new G({z2:20,shape:{points:t},style:e});n.add(i)},o.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,o=i.getDateInfo(e),r=[],a=0;a<7;a++){var s=i.getNextNDay(o.time,a),l=i.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return r},o.prototype._formatterLabel=function(t,n){return e(t)&&t?(i=t,a(n,(function(t,e){i=i.replace("{"+e+"}",o?rt(t):t)})),i):g(t)?t(n):n.nameMap;var i,o},o.prototype._yearTextPositionControl=function(t,e,n,i,o){var r=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=o,s=["center","top"]):"left"===i?r-=o:"right"===i?(r+=o,s=["center","top"]):a-=o;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:r,y:a,style:{align:s[0],verticalAlign:s[1]}}},o.prototype._renderYearText=function(t,e,n,i){var o=t.getModel("yearLabel");if(o.get("show")){var r=o.get("margin"),a=o.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},h=e.start.y;+e.end.y>+e.start.y&&(h=h+"-"+e.end.y);var p=o.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:h},g=this._formatterLabel(p,f),y=new X({z2:30,style:zo(o,{text:g})});y.attr(this._yearTextPositionControl(y,d[a],n,a,r)),i.add(y)}},o.prototype._monthTextPositionControl=function(t,e,n,i,o){var r="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=o,e&&(r="center"),"start"===i&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===i&&(r="right")),{x:s,y:l,align:r,verticalAlign:a}},o.prototype._renderMonthText=function(t,n,i,o){var r=t.getModel("monthLabel");if(r.get("show")){var a=r.get("nameMap"),s=r.get("margin"),l=r.get("position"),u=r.get("align"),c=[this._tlpoints,this._blpoints];a&&!e(a)||(a&&(n=xr(a)||n),a=n.get(["time","monthAbbr"])||[]);var d="start"===l?0:1,h="horizontal"===i?0:1;s="start"===l?-s:s;for(var p="center"===u,g=0;g=i.start.time&&n.times.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/QC)-Math.floor(n[0].time/QC)+1,o=new Date(n[0].time),r=o.getDate(),a=n[1].date.getDate();o.setDate(r+i-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-n[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-n[1].time)*l>0;)i-=l,o.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var o=7*(t-1)-i.fweek+e,r=new Date(i.start.time);return r.setDate(+i.start.d+o),this.getDateInfo(r)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(e){var n=new t(e);i.push(n),e.coordinateSystem=n})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function nA(t,e){var n;return a(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var iA=["transition","enterFrom","leaveTo"],oA=iA.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function rA(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?iA:oA,o=0;o=0;l--){var p,f,g;if(g=null!=(f=_n((p=n[l]).id,null))?o.get(f):null){var y=g.parent,m=(h=lA(y),{}),v=da(g,p,y===i?{width:r,height:a}:{width:h.width,height:h.height},null,{hv:p.hv,boundingMode:p.bounding},m);if(!lA(g).isNew&&v){for(var x=p.transition,_={},b=0;b=0)?_[S]=w:g[S]=w}$i(g,_,t,0)}else g.attr(m)}}},n.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){hA(n,lA(n).option,e,t._lastGraphicModel)})),this._elMap=r()},n.prototype.dispose=function(){this._clear()},n.type="graphic",n}(hu);function cA(t){var e=new(N(sA,t)?sA[t]:co(t))({});return lA(e).type=t,e}function dA(t,e,n,i){var o=cA(n);return e.add(o),i.set(t,o),lA(o).id=t,lA(o).isNew=!0,o}function hA(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){hA(t,e,n,i)})),vD(t,e,i),n.removeKey(lA(t).id))}function pA(t,e,n,i){t.isGroup||a([["cursor",Jt.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];N(e,i)?t[i]=_(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),a(x(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=g(i)?i:null}})),N(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var fA=["x","y","radius","angle","single"],gA=["cartesian2d","polar","singleAxis"];function yA(t){return t+"Axis"}function mA(t,e){var n,i=r(),o=[],a=r();t.eachComponent({mainType:"dataZoom",query:e},(function(t){a.get(t.uid)||l(t)}));do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!a.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var o=i.get(t);o&&o[n]&&(e=!0)})),e}(t)&&(l(t),n=!0)}function l(t){a.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return o}function vA(t){var e=t.ecModel,n={infoList:[],infoMap:r()};return t.eachTargetAxis((function(t,i){var o=e.getComponent(yA(t),i);if(o){var r=o.getCoordSysModel();if(r){var a=r.uid,s=n.infoMap.get(a);s||(s={model:r,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}})),n}var xA=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),_A=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return t(n,e),n.prototype.init=function(t,e,n){var i=bA(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},n.prototype.mergeOption=function(t){var e=bA(t);et(this.option,t,!0),et(this.settledOption,e,!0),this._doInit(e)},n.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;a([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},n.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=r();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},n.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return a(fA,(function(n){var i=this.getReferringComponents(yA(n),An);if(i.specified){e=!0;var o=new xA;a(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},n.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";r(n.findComponents({mainType:o+"Axis"}),o)}i&&r(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function r(e,n){var o=e[0];if(o){var r=new xA;if(r.add(o.componentIndex),t.set(n,r),i=!1,"x"===n||"y"===n){var s=o.getReferringComponents("grid",Cn).models[0];s&&a(e,(function(t){o.componentIndex!==t.componentIndex&&s===t.getReferringComponents("grid",Cn).models[0]&&r.add(t.componentIndex)}))}}}i&&a(fA,(function(e){if(i){var o=n.findComponents({mainType:yA(e),filter:function(t){return"category"===t.get("type",!0)}});if(o[0]){var r=new xA;r.add(o[0].componentIndex),t.set(e,r),i=!1}}}),this)},n.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},n.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},n.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");a([["start","startValue"],["end","endValue"]],(function(i,o){var r=null!=t[i[0]],a=null!=t[i[1]];r&&!a?e[o]="percent":!r&&a?e[o]="value":n?e[o]=n[o]:r&&(e[o]="percent")}))},n.prototype.noTarget=function(){return this._noTarget},n.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(yA(e),n))}),this),t},n.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){a(n.indexList,(function(n){t.call(e,i,n)}))}))},n.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},n.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(yA(t),e)},n.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;a([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},n.prototype.setCalculatedRange=function(t){var e=this.option;a(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},n.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},n.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},n.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=yA(this._dimName),i=e.getReferringComponents(n,Cn).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return nt(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],s=[];DA(["start","end"],(function(l,u){var c=t[l],d=t[l+"Value"];"percent"===o[u]?(null==c&&(c=r[u]),d=i.parse(Ge(c,r,n))):(e=!0,c=Ge(d=null==d?n[u]:i.parse(d),n,r)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?r[u]:c})),TA(s),TA(a);var l=this._minMaxSpan;function u(t,e,n,o,r){var a=r?"Span":"ValueSpan";SS(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Ge(t[s],n,o,!0),r&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,r,!1):u(a,s,r,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];DA(n,(function(t){!function(t,e,n){e&&a(zp(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var o=t.getAxisModel(),r=Ap(o.axis.scale,o,i).calculate();return[r.min,r.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,o=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&DA(o,(function(t){var e=t.getData(),o=e.mapDimensionsAll(n);if(o.length){if("weakFilter"===r){var s=e.getStore(),l=i(o,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,i,r=0;ra[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(e=!0),h&&(n=!0)}return i&&e&&n}))}else DA(o,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}}));DA(o,(function(t){e.setApproximateExtent(a,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;DA(["min","max"],(function(i){var o=e.get(i+"Span"),r=e.get(i+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?o=Ge(n[0]+r,n,[0,100],!0):null!=o&&(r=Ge(o,[0,100],n,!0)-n[0]),t[i+"Span"]=o,t[i+"ValueSpan"]=r}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Ue(n,[0,500]);i=Math.min(i,20);var o=t.axis.scale.rawExtentInfo;0!==e[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(i)),o.freeze()}},t}();const AA=CA;const LA={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,o){var r=t.getComponent(yA(i),o);e(i,o,r,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,o,r){o.__dzAxisProxy||(o.__dzAxisProxy=new AA(e,i,r,t),n.push(o.__dzAxisProxy))}));var i=r();return a(n,(function(t){a(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var kA=!1;function PA(t){kA||(kA=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,LA),function(t){t.registerAction("dataZoom",(function(t,e){var n=mA(e,t);a(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function NA(t){t.registerComponentModel(wA),t.registerComponentView(IA),PA(t)}var OA=function(){},RA={};function EA(t,e){RA[t]=e}function VA(t){return RA[t]}const zA=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;a(this.option.feature,(function(e,n){var i=VA(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),et(e,i.defaultOption))}))},n.type="toolbox",n.layoutMode={type:"box",ignoreSize:!0},n.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},n}(va);function BA(t,e){var n=$r(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new F({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}const GA=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.prototype.render=function(t,n,i,o){var r=this.group;if(r.removeAll(),t.get("show")){var s=+t.get("itemSize"),l="vertical"===t.get("orient"),u=t.get("feature")||{},c=this._features||(this._features={}),d=[];a(u,(function(t,e){d.push(e)})),new jd(this._featureNames||[],d).add(h).update(h).remove(at(h,null)).execute(),this._featureNames=d,function(t,e,n){var i=e.getBoxLayoutParams(),o=e.get("padding"),r={width:n.getWidth(),height:n.getHeight()},a=ca(i,r,o);ua(e.get("orient"),t,e.get("itemGap"),a.width,a.height),da(t,i,r,o)}(r,t,i),r.add(BA(r.getBoundingRect(),t)),l||r.eachChild((function(t){var e=t.__title,n=t.ensureState("emphasis"),o=n.textConfig||(n.textConfig={}),a=t.getTextContent(),l=a&&a.ensureState("emphasis");if(l&&!g(l)&&e){var u=l.style||(l.style={}),c=At(e,X.makeFont(u)),d=t.x+r.x,h=!1;t.y+r.y+s+c.height>i.getHeight()&&(o.position="top",h=!0);var p=h?-5-c.height:s+10;d+c.width/2>i.getWidth()?(o.position=["100%",p],u.align="right"):d-c.width/2<0&&(o.position=[0,p],u.align="left")}}))}function h(h,p){var f,g=d[h],y=d[p],m=u[g],v=new lr(m,t,t.ecModel);if(o&&null!=o.newTitle&&o.featureName===g&&(m.title=o.newTitle),g&&!y){if(function(t){return 0===t.indexOf("my")}(g))f={onclick:v.option.onclick,featureName:g};else{var x=VA(g);if(!x)return;f=new x}c[g]=f}else if(!(f=c[y]))return;f.uid=cr("toolbox-feature"),f.model=v,f.ecModel=n,f.api=i;var _=f instanceof OA;g||!y?!v.get("show")||_&&f.unusable?_&&f.remove&&f.remove(n,i):(!function(o,u,c){var d,h,p=o.getModel("iconStyle"),f=o.getModel(["emphasis","iconStyle"]),g=u instanceof OA&&u.getIcons?u.getIcons():o.get("icon"),y=o.get("title")||{};e(g)?(d={})[c]=g:d=g;e(y)?(h={})[c]=y:h=y;var m=o.iconPaths={};a(d,(function(e,a){var c=Io(e,{},{x:-s/2,y:-s/2,width:s,height:s});c.setStyle(p.getItemStyle()),c.ensureState("emphasis").style=f.getItemStyle();var d=new X({style:{text:h[a],align:f.get("textAlign"),borderRadius:f.get("textBorderRadius"),padding:f.get("textPadding"),fill:null,font:Yo({fontStyle:f.get("textFontStyle"),fontFamily:f.get("textFontFamily"),fontSize:f.get("textFontSize"),fontWeight:f.get("textFontWeight")},n)},ignore:!0});c.setTextContent(d),Ao({el:c,componentModel:t,itemName:a,formatterParamsExtra:{title:h[a]}}),c.__title=h[a],c.on("mouseover",(function(){var e=f.getItemStyle(),n=l?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";d.setStyle({fill:f.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:f.get("textBackgroundColor")}),c.setTextConfig({position:f.get("textPosition")||n}),d.ignore=!t.get("showTitle"),i.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==o.get(["iconStatus",a])&&i.leaveEmphasis(this),d.hide()})),("emphasis"===o.get(["iconStatus",a])?Di:Ti)(c),r.add(c),c.on("click",ut(u.onclick,u,n,i,a)),m[a]=c}))}(v,f,g),v.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Di:Ti)(i[t])},f instanceof OA&&f.render&&f.render(v,n,i,o)):_&&f.dispose&&f.dispose(n,i)}},i.prototype.updateView=function(t,e,n,i){a(this._features,(function(t){t instanceof OA&&t.updateView&&t.updateView(t.model,e,n,i)}))},i.prototype.remove=function(t,e){a(this._features,(function(n){n instanceof OA&&n.remove&&n.remove(t,e)})),this.group.removeAll()},i.prototype.dispose=function(t,e){a(this._features,(function(n){n instanceof OA&&n.dispose&&n.dispose(t,e)}))},i.type="toolbox",i}(hu);const FA=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=h.browser;if(g(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+r,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||o){var c=a.split(","),d=c[0].indexOf("base64")>-1,p=o?decodeURIComponent(c[1]):c[1];d&&(p=window.atob(p));var f=i+"."+r;if(window.navigator.msSaveOrOpenBlob){for(var y=p.length,m=new Uint8Array(y);y--;)m[y]=p.charCodeAt(y);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,f)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,b=_.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),_.focus(),b.execCommand("SaveAs",!0,f),document.body.removeChild(x)}}else{var S=n.get("lang"),w='',M=window.open();M.document.write(w),M.document.title=i}},n.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},n}(OA);var WA="__ec_magicType_stack__",HA=[["line","bar"],["stack"]],YA=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return a(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},n.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},n.prototype.onclick=function(t,e,n){var i=this.model,o=i.get(["seriesIndex",n]);if(UA[n]){var r,s={series:[]};a(HA,(function(t){d(t,n)>=0&&a(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(t){var e=t.subType,o=t.id,r=UA[n](e,o,t,i);r&&(P(r,t.option),s.series.push(r));var a=t.coordinateSystem;if(a&&"cartesian2d"===a.type&&("line"===n||"bar"===n)){var l=a.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=t.getReferringComponents(u,Cn).models[0].componentIndex;s[u]=s[u]||[];for(var d=0;d<=c;d++)s[u][c]=s[u][c]||{};s[u][c].boundaryGap="bar"===n}}}));var l=n;"stack"===n&&(r=et({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(l="tiled")),e.dispatchAction({type:"changeMagicType",currentType:l,newOption:s,newTitle:r,featureName:"magicType"})}},n}(OA),UA={line:function(t,e,n,i){if("bar"===t)return et({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return et({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var o=n.get("stack")===WA;if("line"===t||"bar"===t)return i.setIconStatus("stack",o?"normal":"emphasis"),et({id:e,stack:o?"":WA},i.get(["option","stack"])||{},!0)}};Ed({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));const XA=YA;var ZA=new Array(60).join("-"),jA="\t";function qA(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var KA=new RegExp("["+jA+"]+","g");function JA(t,e){var n=t.split(new RegExp("\n*"+ZA+"\n*","g")),o={series:[]};return a(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(jA)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=qA(e.shift()).split(KA),o=[],r=i(n,(function(t){return{name:t,data:[]}})),a=0;a=0)&&t(o,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=pL[t.brushType](0,n,e);t.__rangeOffset={offset:gL[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){a(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&a(i.coordSyses,(function(i){var o=pL[t.brushType](1,i,t.range,!0);n(t,o.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){a(t,(function(t){var n,i,o,r,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=pL[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?gL[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,o=mL(n),r=mL(i),a=[o[0]/r[0],o[1]/r[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return i(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:Aw(i),isTargetByCursor:kw(i,t,n.coordSysModel),getLinearBrushOtherExtent:Lw(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&d(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=uL(e,t),o=0;ot[1]&&t.reverse(),t}function uL(t,e){return Dn(t,e,{includeMainTypes:aL})}var cL={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,o=t.gridModels,s=r(),l={},u={};(n||i||o)&&(a(n,(function(t){var e=t.axis.grid.model;s.set(e.id,e),l[e.id]=!0})),a(i,(function(t){var e=t.axis.grid.model;s.set(e.id,e),u[e.id]=!0})),a(o,(function(t){s.set(t.id,t),l[t.id]=!0,u[t.id]=!0})),s.each((function(t){var o=t.coordinateSystem,r=[];a(o.getCartesians(),(function(t,e){(d(n,t.getAxis("x").model)>=0||d(i,t.getAxis("y").model)>=0)&&r.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:hL.grid,xAxisDeclared:l[t.id],yAxisDeclared:u[t.id]})})))},geo:function(t,e){a(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:hL.geo})}))}},dL=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,o=t.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&i&&(o=i.axis.grid.model),o&&o===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],hL={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(xo(t)),e}},pL={lineX:at(fL,0),lineY:at(fL,1),rect:function(t,e,n,i){var o=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),r=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[lL([o[0],r[0]]),lL([o[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,o){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:i(n,(function(n){var i=t?e.pointToData(n,o):e.dataToPoint(n,o);return r[0][0]=Math.min(r[0][0],i[0]),r[1][0]=Math.min(r[1][0],i[1]),r[0][1]=Math.max(r[0][1],i[0]),r[1][1]=Math.max(r[1][1],i[1]),i})),xyMinMax:r}}};function fL(t,e,n,o){var r=n.getAxis(["x","y"][t]),a=lL(i([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(o[t]),!0):r.toGlobalCoord(r.dataToCoord(o[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var gL={lineX:at(yL,0),lineY:at(yL,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return i(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function yL(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function mL(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const vL=sL;var xL,_L,bL=a,SL=dn+"toolbox-dataZoom_",wL=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new Cw(n.getZr()),this._brushController.on("brush",ut(this._onBrush,this)).mount()),function(t,e,n,i,o){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");var a=new vL(IL(t),e,{include:["grid"]}),s=a.makePanelOpts(o,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!r||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return iL(t).length}(e)>1?"emphasis":"normal")}(t,e)},n.prototype.onclick=function(t,e,n){ML[n].call(this)},n.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},n.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},n.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new vL(IL(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(o("x",n,e[0]),o("y",n,e[1])):o({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=iL(t);eL(e,(function(e,i){for(var o=n.length-1;o>=0&&!n[o][i];o--);if(o<0){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var a=r.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function o(t,e,o){var r=e.getAxis(t),a=r.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=SS(0,o.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},n.prototype._dispatchZoomAction=function(t){var e=[];bL(t,(function(t,n){e.push(nt(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},n.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},n}(OA),ML={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=iL(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return eL(n,(function(t,n){for(var o=e.length-1;o>=0;o--)if(t=e[o][n]){i[n]=t;break}})),i}(this.ecModel))}};function IL(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}xL="dataZoom",_L=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),o=[],r=Dn(t,IL(i));return bL(r.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),bL(r.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),o}function a(t,e,n){var r=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:SL+e+r};a[n]=r,o.push(a)}},l(null==za.get(xL)&&_L),za.set(xL,_L);const DL=wL;const TL=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="tooltip",n.dependencies=["axisPointer"],n.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},n}(va);function CL(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function AL(t){if(h.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(c+="top:50%",h+="translateY(-50%) rotate("+(s="left"===l?-225:-45)+"deg)"):(c+="left:50%",h+="translateX(-50%) rotate("+(s="top"===l?225:45)+"deg)");var p=s*Math.PI/180,f=u+r,g=f*Math.abs(Math.cos(p))+f*Math.abs(Math.sin(p)),y=n+" solid "+r+"px;";return'
'}(i,r,a)),e(t))s.innerHTML=t+l;else if(t){s.innerHTML="",o(t)||(t=[t]);for(var u=0;u=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},i.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(t,e,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},i.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!h.node&&n.getDom()){var o=ZL(i,n);this._ticket="";var r=i.dataByCoordSys,a=function(t,e,n){var i=Tn(t).queryOptionMap,o=i.keys()[0];if(!o||"series"===o)return;var r=Ln(e,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),a=r.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(e){var n=Zn(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s)return{componentMainType:o,componentIndex:a.componentIndex,el:s}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=YL;l.x=i.x,l.y=i.y,l.update(),Zn(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},o)}else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:r,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var u=VT(i,e),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:i.position,positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},i.prototype.manuallyHideTip=function(t,e,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(ZL(i,n))},i.prototype._manuallyAxisShowTip=function(t,e,n,i){var o=i.seriesIndex,r=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=e.getSeriesByIndex(o);if(s)if("axis"===XL([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},i.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var o,r;if("legend"===Zn(n).ssrType)return;this._lastDataByCoordSys=null,xc(n,(function(t){return null!=Zn(t).dataIndex?(o=t,!0):null!=Zn(t).tooltipConfig?(r=t,!0):void 0}),!0),o?this._showSeriesItemTooltip(t,o,e):r?this._showComponentItemTooltip(t,r,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},i.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=ut(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},i.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,o=[e.offsetX,e.offsetY],r=XL([e.tooltipOption],i),s=this._renderMode,l=[],u=Gl("section",{blocks:[],noHeader:!0}),c=[],d=new Jl;a(t,(function(t){a(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value;if(e&&null!=o){var r=vT(o,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),h=Gl("section",{header:r,noHeader:!tt(r),sortBlocks:!0,blocks:[]});u.blocks.push(h),a(t.seriesDataIndices,(function(a){var u=n.getSeriesByIndex(a.seriesIndex),p=a.dataIndexInside,g=u.getDataParams(p);if(!(g.dataIndex<0)){g.axisDim=t.axisDim,g.axisIndex=t.axisIndex,g.axisType=t.axisType,g.axisId=t.axisId,g.axisValue=Rp(e.axis,{value:o}),g.axisValueLabel=r,g.marker=d.makeTooltipMarker("item",ia(g.color),s);var y=nl(u.formatTooltip(p,!0,null)),m=y.frag;if(m){var v=XL([u],i).get("valueFormatter");h.blocks.push(v?f({valueFormatter:v},m):m)}y.text&&c.push(y.text),l.push(g)}}))}}))})),u.blocks.reverse(),c.reverse();var h=e.position,p=r.get("order"),g=Xl(u,d,s,p,n.get("useUTC"),r.get("textStyle"));g&&c.unshift(g);var y="richText"===s?"\n\n":"
",m=c.join(y);this._showOrMove(r,(function(){this._updateContentNotChangedOnAxis(t,l)?this._updatePosition(r,h,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(r,m,l,Math.random()+"",o[0],o[1],h,null,d)}))},i.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,o=Zn(e),r=o.seriesIndex,a=i.getSeriesByIndex(r),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,h=t.positionDefault,p=XL([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),g=p.get("trigger");if(null==g||"item"===g){var y=s.getDataParams(l,u),m=new Jl;y.marker=m.makeTooltipMarker("item",ia(y.color),d);var v=nl(s.formatTooltip(l,!1,u)),x=p.get("order"),_=p.get("valueFormatter"),b=v.frag,S=b?Xl(_?f({valueFormatter:_},b):b,m,d,x,i.get("useUTC"),p.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,S,y,w,t.offsetX,t.offsetY,t.position,t.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:r,from:this.uid})}},i.prototype._showComponentItemTooltip=function(t,n,i){var o=Zn(n),r=o.tooltipConfig.option||{};if(e(r)){r={content:r,formatter:r}}var a=[r],s=this._ecModel.getComponent(o.componentMainType,o.componentIndex);s&&a.push(s),a.push({formatter:r.content});var l=t.positionDefault,u=XL(a,this._tooltipModel,l?{position:l}:null),c=u.get("content"),d=Math.random()+"",h=new Jl;this._showOrMove(u,(function(){var e=nt(u.get("formatterParams")||{});this._showTooltipContent(u,c,e,d,t.offsetX,t.offsetY,t.position,n,h)})),i({type:"showTip",from:this.uid})},i.prototype._showTooltipContent=function(t,n,i,r,a,s,l,u,c){if(this._ticket="",t.get("showContent")&&t.get("show")){var d=this._tooltipContent;d.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var p=n,f=this._getNearestPoint([a,s],i,t.get("trigger"),t.get("borderColor")).color;if(h)if(e(h)){var y=t.ecModel.get("useUTC"),m=o(i)?i[0]:i;p=h,m&&m.axisType&&m.axisType.indexOf("time")>=0&&(p=Nr(m.axisValue,p,y)),p=na(p,i,!0)}else if(g(h)){var v=ut((function(e,n){e===this._ticket&&(d.setContent(n,c,t,f,l),this._updatePosition(t,l,a,s,d,i,u))}),this);this._ticket=r,p=h(i,r,v)}else p=h;d.setContent(p,c,t,f,l),d.show(t,f),this._updatePosition(t,l,a,s,d,i,u)}},i.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||o(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:o(e)?void 0:{color:i||e.color||e.borderColor}},i.prototype._updatePosition=function(t,n,i,r,a,l,u){var c=this._api.getWidth(),d=this._api.getHeight();n=n||t.get("position");var h=a.getSize(),p=t.get("align"),f=t.get("verticalAlign"),y=u&&u.getBoundingRect().clone();if(u&&y.applyTransform(u.transform),g(n)&&(n=n([i,r],l,a.el,y,{viewSize:[c,d],contentSize:h.slice()})),o(n))i=Fe(n[0],c),r=Fe(n[1],d);else if(s(n)){var m=n;m.width=h[0],m.height=h[1];var v=ca(m,{width:c,height:d});i=v.x,r=v.y,p=null,f=null}else if(e(n)&&u){var x=function(t,e,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+c/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+c+a;break;case"left":s=e.x-o-a,l=e.y+c/2-r/2;break;case"right":s=e.x+u+a,l=e.y+c/2-r/2}return[s,l]}(n,y,h,t.get("borderWidth"));i=x[0],r=x[1]}else{x=function(t,e,n,i,o,r,a){var s=n.getSize(),l=s[0],u=s[1];null!=r&&(t+l+r+2>i?t-=l+r:t+=r);null!=a&&(e+u+a>o?e-=u+a:e+=a);return[t,e]}(i,r,a,c,d,p?null:20,f?null:20);i=x[0],r=x[1]}if(p&&(i-=jL(p)?h[0]/2:"right"===p?h[0]:0),f&&(r-=jL(f)?h[1]/2:"bottom"===f?h[1]:0),CL(t)){x=function(t,e,n,i,o){var r=n.getSize(),a=r[0],s=r[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,r,a,c,d);i=x[0],r=x[1]}a.moveTo(i,r)},i.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&a(n,(function(n,r){var s=n.dataByAxis||[],l=(t[r]||{}).dataByAxis||[];(o=o&&s.length===l.length)&&a(s,(function(t,n){var r=l[n]||{},s=t.seriesDataIndices||[],u=r.seriesDataIndices||[];(o=o&&t.value===r.value&&t.axisType===r.axisType&&t.axisId===r.axisId&&s.length===u.length)&&a(s,(function(t,e){var n=u[e];o=o&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&a(t.seriesDataIndices,(function(t){var n=t.seriesIndex,r=e[n],a=i[n];r&&a&&a.data!==r.data&&(o=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!o},i.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},i.prototype.dispose=function(t,e){!h.node&&e.getDom()&&(Cu(this,"_updatePosition"),this._tooltipContent.dispose(),RT("itemTooltip",e))},i.type="tooltip",i}(hu);function XL(t,n,i){var o,r=n.ecModel;i?(o=new lr(i,r,r),o=new lr(n.option,o,r)):o=n;for(var a=t.length-1;a>=0;a--){var s=t[a];s&&(s instanceof lr&&(s=s.get("tooltip",!0)),e(s)&&(s={formatter:s}),s&&(o=new lr(s,o,r)))}return o}function ZL(t,e){return t.dispatchAction||ut(e.dispatchAction,e)}function jL(t){return"center"===t||"middle"===t}const qL=UL;var KL=["rect","polygon","keep","clear"];function JL(t,e){var n=hn(t?t.brush:[]);if(n.length){var i=[];a(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;o(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var s,l,u=r.feature||(r.feature={}),c=u.brush||(u.brush={}),d=c.type||(c.type=[]);d.push.apply(d,i),l={},a(s=d,(function(t){l[t]=1})),s.length=0,a(l,(function(t,e){s.push(e)})),e&&!d.length&&d.push.apply(d,KL)}}var $L=a;function QL(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function tk(t,e,n){var i={};return $L(e,(function(e){var o,r=i[e]=((o=function(){}).prototype.__hidden=o.prototype,new o);$L(t[e],(function(t,i){if(__.isValidType(i)){var o={type:i,visual:t};n&&n(o,e),r[i]=new __(o),"opacity"===i&&((o=nt(o)).type="colorAlpha",r.__hidden.__alphaForOpacity=new __(o))}}))})),i}function ek(t,e,n){var i;a(n,(function(t){e.hasOwnProperty(t)&&QL(e[t])&&(i=!0)})),i&&a(n,(function(n){e.hasOwnProperty(n)&&QL(e[n])?t[n]=nt(e[n]):delete t[n]}))}var nk={lineX:ik(0),lineY:ik(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Dt(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,l=i[0];return!!(Dt(i,o,r)||Dt(i,o+a,r)||Dt(i,o,r+s)||Dt(i,o+a,r+s)||J.create(t).contain(l[0],l[1])||Do(o,r,o+a,r,i)||Do(o,r,o,r+s,i)||Do(o+a,r,o+a,r+s,i)||Do(o,r+s,o+a,r+s,i))||void 0}}};function ik(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var o=i.range;return ok(e[t],o)}},rect:function(i,o,r){if(i){var a=r.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=r[0]),r[1]e[1][1]&&(e[1][1]=r[1])}return e&&pk(e)}};function pk(t){return new J(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}const fk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Cw(e.getZr())).on("brush",ut(this._onBrush,this)).mount()},n.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},n.prototype.updateTransform=function(t,e,n,i){lk(e),this._updateController(t,e,n,i)},n.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},n.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},n.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},n.prototype.dispose=function(){this._brushController.dispose()},n.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:nt(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:nt(n),$from:e})},n.type="brush",n}(hu);function gk(t,e){return et({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new lr(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const yk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.areas=[],t.brushOption={},t}return t(n,e),n.prototype.optionUpdated=function(t,e){var n=this.option;!e&&ek(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},n.prototype.setAreas=function(t){t&&(this.areas=i(t,(function(t){return gk(this.option,t)}),this))},n.prototype.setBrushOption=function(t){this.brushOption=gk(this.option,t),this.brushType=this.brushOption.brushType},n.type="brush",n.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],n.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},n}(va);var mk=["rect","polygon","lineX","lineY","keep","clear"];const vk=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.render=function(t,e,n){var i,o,r;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length})),this._brushType=i,this._brushMode=o,a(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?r:e===i)?"emphasis":"normal")}))},n.prototype.updateView=function(t,e,n){this.render(t,e,n)},n.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return a(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},n.prototype.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},n.getDefaultOption=function(t){return{show:!0,type:mk.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},n}(OA);var xk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.layoutMode={type:"box",ignoreSize:!0},t}return t(n,e),n.type="title",n.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},n}(va),_k=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,o=t.getModel("textStyle"),r=t.getModel("subtextStyle"),a=t.get("textAlign"),s=_(t.get("textBaseline"),t.get("textVerticalAlign")),l=new X({style:zo(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),d=new X({style:zo(r,{text:c,fill:r.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=t.get("link"),p=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",(function(){oa(h,"_"+t.get("target"))})),p&&d.on("click",(function(){oa(p,"_"+t.get("subtarget"))})),Zn(l).eventData=Zn(d).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),c&&i.add(d);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var m=ca(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.x=m.x,i.y=m.y,i.markRedraw();var v={align:a,verticalAlign:s};l.setStyle(v),d.setStyle(v),g=i.getBoundingRect();var x=m.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var S=new F({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(S)}},n.type="title",n}(hu);const bk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.layoutMode="box",t}return t(n,e),n.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},n.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},n.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},n.prototype.getCurrentIndex=function(){return this.option.currentIndex},n.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},n.prototype.setPlayState=function(t){this.option.autoPlay=!!t},n.prototype.getPlayState=function(){return!!this.option.autoPlay},n.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,o=this._names=[];"category"===i?(t=[],a(n,(function(e,n){var i,r=_n(gn(e),"");s(e)?(i=nt(e)).value=n:i=n,t.push(i),o.push(r)}))):t=n;var r={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new xh([{name:"value",type:r}],this)).initData(t,o)},n.prototype.getData=function(){return this._data},n.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},n.type="timeline",n.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},n}(va);var Sk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="timeline.slider",n.defaultOption=dr(bk.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),n}(bk);it(Sk,el.prototype);const wk=Sk;const Mk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="timeline",n}(hu);const Ik=function(e){function n(t,n,i,o){var r=e.call(this,t,n,i)||this;return r.type=o||"value",r}return t(n,e),n.prototype.getLabelModel=function(){return this.model.getModel("label")},n.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},n}(uf);var Dk=Math.PI,Tk=Mn(),Ck=function(n){function i(){var t=null!==n&&n.apply(this,arguments)||this;return t.type=i.type,t}return t(i,n),i.prototype.init=function(t,e){this.api=e},i.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),s=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return Gl("nameValue",{noName:!0,value:s.scale.getLabel({value:t})})},a(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,o,s,t)}),this),this._renderAxisLabel(i,r,s,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},i.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},i.prototype.dispose=function(){this._clearTimer()},i.prototype._layout=function(t,n){var i,o,r,a,s=t.get(["label","position"]),l=t.get("orient"),u=function(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,n),c={horizontal:"center",vertical:(i=null==s||"auto"===s?"horizontal"===l?u.y+u.height/2=0||"+"===i?"left":"right"},d={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Dk/2},p="vertical"===l?u.height:u.width,f=t.getModel("controlStyle"),g=f.get("show",!0),y=g?f.get("itemSize"):0,m=g?f.get("itemGap"):0,v=y+m,x=t.get(["label","rotate"])||0;x=x*Dk/180;var _=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),S=g&&f.get("showPrevBtn",!0),w=g&&f.get("showNextBtn",!0),M=0,I=p;"left"===_||"bottom"===_?(b&&(o=[0,0],M+=v),S&&(r=[M,0],M+=v),w&&(a=[I-y,0],I-=v)):(b&&(o=[I-y,0],I-=v),S&&(r=[0,0],M+=v),w&&(a=[I-y,0],I-=v));var D=[M,I];return t.get("inverse")&&D.reverse(),{viewRect:u,mainLength:p,orient:l,rotation:h[l],labelRotation:x,labelPosOpt:i,labelAlign:t.get(["label","align"])||c[l],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||d[l],playPosition:o,prevBtnPosition:r,nextBtnPosition:a,axisExtent:D,controlSize:y,controlGap:m}},i.prototype._position=function(t,n){var i=this._mainGroup,o=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var a=Qt(),s=r.x,l=r.y+r.height;ie(a,a,[-s,-l]),Yt(a,a,-Dk/2),ie(a,a,[s,l]),(r=r.clone()).applyTransform(a)}var u=m(r),c=m(i.getBoundingRect()),d=m(o.getBoundingRect()),h=[i.x,i.y],p=[o.x,o.y];p[0]=h[0]=u[0][0];var f,g=t.labelPosOpt;null==g||e(g)?(v(h,c,u,1,f="+"===g?0:1),v(p,d,u,1,1-f)):(v(h,c,u,1,f=g>=0?0:1),p[1]=h[1]+g);function y(t){t.originX=u[0][0]-t.x,t.originY=u[1][0]-t.y}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}i.setPosition(h),o.setPosition(p),i.rotation=o.rotation=t.rotation,y(i),y(o)},i.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Hh({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new fp({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Xh}}(e,i);o.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var r=n.getDataExtent("value");o.setExtent(r[0],r[1]),o.calcNiceTicks();var a=new Ik("value",o,t.axisExtent,i);return a.model=e,a},i.prototype._createGroup=function(t){var e=this[t]=new U;return this.group.add(e),e},i.prototype._renderAxisLine=function(t,e,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var r=new W({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:f({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(r);var a=this._progressLine=new W({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:P({lineCap:"round",lineWidth:r.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},i.prototype._renderAxisTick=function(t,e,n,i){var o=this,r=i.getData(),s=n.scale.getTicks();this._tickSymbols=[],a(s,(function(t){var a=n.dataToCoord(t.value),s=r.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:ut(o._changeTimeline,o,t.value)},h=Ak(s,l,e,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),Bi(h);var p=Zn(h);s.get("tooltip")?(p.dataIndex=t.value,p.dataModel=i):p.dataIndex=p.dataModel=null,o._tickSymbols.push(h)}))},i.prototype._renderAxisLabel=function(t,e,n,i){var o=this;if(n.getLabelModel().get("show")){var r=i.getData(),s=n.getViewLabels();this._tickLabels=[],a(s,(function(i){var a=i.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(i.tickValue),h=new X({x:d,y:0,rotation:t.labelRotation-t.rotation,onclick:ut(o._changeTimeline,o,a),silent:!1,style:zo(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});h.ensureState("emphasis").style=zo(u),h.ensureState("progress").style=zo(c),e.add(h),Bi(h),Tk(h).dataIndex=a,o._tickLabels.push(h)}))}},i.prototype._renderControl=function(t,e,n,i){var o=t.controlSize,r=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(t,n,l,u){if(t){var c=Mt(_(i.get(["controlStyle",n+"BtnSize"]),o),o),d=function(t,e,n,i){var o=i.style,r=Io(t.get(["controlStyle",e]),i||{},new J(n[0],n[1],n[2],n[3]));o&&r.setStyle(o);return r}(i,n+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:o/2,originY:0,rotation:u?-r:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,e.add(d),Bi(d)}}c(t.nextBtnPosition,"next",ut(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",ut(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",ut(this._handlePlayClick,this,!l),!0)},i.prototype._renderCurrentPointer=function(t,e,n,i){var o=i.getData(),r=i.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=ut(s._handlePointerDrag,s),t.ondragend=ut(s._handlePointerDragend,s),Lk(t,s._progressLine,r,n,i,!0)},onUpdate:function(t){Lk(t,s._progressLine,r,n,i)}};this._currentPointer=Ak(a,a,this._mainGroup,{},this._currentPointer,l)},i.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},i.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},i.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},i.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=He(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[r]=+a[r].toFixed(d)),[a,c]}var Hk={min:at(Wk,"min"),max:at(Wk,"max"),average:at(Wk,"average"),median:at(Wk,"median")};function Yk(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,r=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!o(e.coord)&&o(r)){var a=Uk(e,n,i,t);if((e=nt(e)).type&&Hk[e.type]&&a.baseAxis&&a.valueAxis){var s=d(r,a.baseAxis.dim),l=d(r,a.valueAxis.dim),u=Hk[e.type](n,a.baseDataDim,a.valueDataDim,s,l);e.coord=u[0],e.value=u[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&o(r))for(var c=e.coord,h=0;h<2;h++)Hk[c[h]]&&(c[h]=jk(n,n.mapDimension(r[h]),c[h]));else e.coord=[];return e}}function Uk(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function Xk(t,e){return!(t&&t.containData&&e.coord&&!Fk(e))||t.containData(e.coord)}function Zk(t,e){return t?function(t,n,i,o){return al(o<2?t.coord&&t.coord[o]:t.value,e[o])}:function(t,n,i,o){return al(t.value,e[o])}}function jk(t,e,n){if("average"===n){var i=0,o=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,o++)})),i/o}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var qk=Mn();const Kk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.init=function(){this.markerGroupMap=r()},n.prototype.render=function(t,e,n){var i=this,o=this.markerGroupMap;o.each((function(t){qk(t).keep=!1})),e.eachSeries((function(t){var o=Bk.getMarkerModelFromSeries(t,i.type);o&&i.renderSeries(t,o,e,n)})),o.each((function(t){!qk(t).keep&&i.group.remove(t.group)}))},n.prototype.markKeep=function(t){qk(t).keep=!0},n.prototype.toggleBlurSeries=function(t,e){var n=this;a(t,(function(t){var i=Bk.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?Ci(t):Ai(t))}))}))},n.type="marker",n}(hu);function Jk(t,e,n){var i=e.coordinateSystem;t.each((function(o){var r,a=t.getItemModel(o),s=Fe(a.get("x"),n.getWidth()),l=Fe(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(i){var u=t.get(i.dimensions[0],o),c=t.get(i.dimensions[1],o);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(o,r)}))}const $k=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Bk.getMarkerModelFromSeries(t,"markPoint");e&&(Jk(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},n.prototype.renderSeries=function(t,e,n,o){var r=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new rg),c=function(t,e,n){var o;o=t?i(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return f(f({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new xh(o,n),a=i(n.get("data"),at(Yk,e));t&&(a=lt(a,at(Xk,t)));var s=Zk(!!t,o);return r.initData(a,null,s),r}(r,t,e);e.setData(c),Jk(e.getData(),t,o),c.each((function(t){var n=c.getItemModel(t),i=n.getShallow("symbol"),o=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(g(i)||g(o)||g(r)||g(a)){var u=e.getRawValue(t),d=e.getDataParams(t);g(i)&&(i=i(u,d)),g(o)&&(o=o(u,d)),g(r)&&(r=r(u,d)),g(a)&&(a=a(u,d))}var h=n.getModel("itemStyle").getItemStyle(),p=gc(s,"color");h.fill||(h.fill=p),c.setItemVisual(t,{symbol:i,symbolSize:o,symbolRotate:r,symbolOffset:a,symbolKeepAspect:l,style:h})})),u.updateData(c),this.group.add(u.group),c.eachItemGraphicEl((function(t){t.traverse((function(t){Zn(t).dataModel=e}))})),this.markKeep(u),u.group.silent=e.get("silent")||t.get("silent")},n.type="markPoint",n}(Kk);const Qk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.createMarkerModelFromSeries=function(t,e,i){return new n(t,e,i)},n.type="markLine",n.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},n}(Bk);var tP=Mn(),eP=function(t,e,n,i){var r,a=t.getData();if(o(i))r=i;else{var s=i.type;if("min"===s||"max"===s||"average"===s||"median"===s||null!=i.xAxis||null!=i.yAxis){var l=void 0,c=void 0;if(null!=i.yAxis||null!=i.xAxis)l=e.getAxis(null!=i.yAxis?"y":"x"),c=Ht(i.yAxis,i.xAxis);else{var d=Uk(i,a,e,t);l=d.valueAxis,c=jk(a,Th(a,d.valueDataDim),s)}var h="x"===l.dim?0:1,p=1-h,g=nt(i),y={coord:[]};g.type=null,g.coord=[],g.coord[p]=-1/0,y.coord[p]=1/0;var m=n.get("precision");m>=0&&u(c)&&(c=+c.toFixed(Math.min(m,20))),g.coord[h]=y.coord[h]=c,r=[g,y,{type:s,valueIndex:i.valueIndex,value:c}]}else r=[]}var v=[Yk(t,r[0]),Yk(t,r[1]),f({},r[2])];return v[2].type=v[2].type||null,et(v[2],v[0]),et(v[2],v[1]),v};function nP(t){return!isNaN(t)&&!isFinite(t)}function iP(t,e,n,i){var o=1-t,r=i.dimensions[t];return nP(e[o])&&nP(n[o])&&e[t]===n[t]&&i.getAxis(r).containData(e[t])}function oP(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(iP(1,n,i,t)||iP(0,n,i,t)))return!0}return Xk(t,e[0])&&Xk(t,e[1])}function rP(t,e,n,i,o){var r,a=i.coordinateSystem,s=t.getItemModel(e),l=Fe(s.get("x"),o.getWidth()),u=Fe(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,d=t.get(c[0],e),h=t.get(c[1],e);r=a.dataToPoint([d,h])}if(xg(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;nP(t.get(c[0],e))?r[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):nP(t.get(c[1],e))&&(r[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];t.setItemLayout(e,r)}const aP=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Bk.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),o=tP(e).from,r=tP(e).to;o.each((function(e){rP(o,e,!0,t,n),rP(r,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[o.getItemLayout(t),r.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},n.prototype.renderSeries=function(t,e,n,r){var a=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Ab);this.group.add(c.group);var d=function(t,e,n){var o;o=t?i(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return f(f({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new xh(o,n),a=new xh(o,n),s=new xh([],n),l=i(n.get("data"),at(eP,e,t,n));t&&(l=lt(l,at(oP,t)));var u=Zk(!!t,o);return r.initData(i(l,(function(t){return t[0]})),null,u),a.initData(i(l,(function(t){return t[1]})),null,u),s.initData(i(l,(function(t){return t[2]}))),s.hasItemOption=!0,{from:r,to:a,line:s}}(a,t,e),h=d.from,p=d.to,g=d.line;tP(e).from=h,tP(e).to=p,e.setData(g);var y=e.get("symbol"),m=e.get("symbolSize"),v=e.get("symbolRotate"),x=e.get("symbolOffset");function b(e,n,i){var o=e.getItemModel(n);rP(e,n,i,t,r);var a=o.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=gc(l,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:_(o.get("symbolOffset",!0),x[i?0:1]),symbolRotate:_(o.get("symbolRotate",!0),v[i?0:1]),symbolSize:_(o.get("symbolSize"),m[i?0:1]),symbol:_(o.get("symbol",!0),y[i?0:1]),style:a})}o(y)||(y=[y,y]),o(m)||(m=[m,m]),o(v)||(v=[v,v]),o(x)||(x=[x,x]),d.from.each((function(t){b(h,t,!0),b(p,t,!1)})),g.each((function(t){var e=g.getItemModel(t).getModel("lineStyle").getLineStyle();g.setItemLayout(t,[h.getItemLayout(t),p.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),g.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:p.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(t,"symbolOffset"),toSymbolRotate:p.getItemVisual(t,"symbolRotate"),toSymbolSize:p.getItemVisual(t,"symbolSize"),toSymbol:p.getItemVisual(t,"symbol"),style:e})})),c.updateData(g),d.line.eachItemGraphicEl((function(t){Zn(t).dataModel=e,t.traverse((function(t){Zn(t).dataModel=e}))})),this.markKeep(c),c.group.silent=e.get("silent")||t.get("silent")},n.type="markLine",n}(Kk);const sP=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.createMarkerModelFromSeries=function(t,e,i){return new n(t,e,i)},n.type="markArea",n.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},n}(Bk);var lP=Mn(),uP=function(t,e,n,i){var o=i[0],r=i[1];if(o&&r){var a=Yk(t,o),s=Yk(t,r),l=a.coord,u=s.coord;l[0]=Ht(l[0],-1/0),l[1]=Ht(l[1],-1/0),u[0]=Ht(u[0],1/0),u[1]=Ht(u[1],1/0);var c=ee([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function cP(t){return!isNaN(t)&&!isFinite(t)}function dP(t,e,n,i){var o=1-t;return cP(e[o])&&cP(n[o])}function hP(t,e){var n=e.coord[0],i=e.coord[1],o={coord:n,x:e.x0,y:e.y0},r={coord:i,x:e.x1,y:e.y1};return xg(t,"cartesian2d")?!(!n||!i||!dP(1,n,i)&&!dP(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!Fk(e)&&!Fk(n))||t.containZone(e.coord,n.coord)}(t,o,r):Xk(t,o)||Xk(t,r)}function pP(t,e,n,i,o){var r,a=i.coordinateSystem,s=t.getItemModel(e),l=Fe(s.get(n[0]),o.getWidth()),u=Fe(s.get(n[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var c=t.getValues(["x0","y0"],e),d=t.getValues(["x1","y1"],e),h=a.clampData(c),p=a.clampData(d),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],r=i.getMarkerPosition(f,n,!0)}else{var g=[v=t.get(n[0],e),x=t.get(n[1],e)];a.clampData&&a.clampData(g,g),r=a.dataToPoint(g,!0)}if(xg(a,"cartesian2d")){var y=a.getAxis("x"),m=a.getAxis("y"),v=t.get(n[0],e),x=t.get(n[1],e);cP(v)?r[0]=y.toGlobalCoord(y.getExtent()["x0"===n[0]?0:1]):cP(x)&&(r[1]=m.toGlobalCoord(m.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var fP=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];const gP=function(n){function o(){var t=null!==n&&n.apply(this,arguments)||this;return t.type=o.type,t}return t(o,n),o.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Bk.getMarkerModelFromSeries(t,"markArea");if(e){var o=e.getData();o.each((function(e){var r=i(fP,(function(i){return pP(o,e,i,t,n)}));o.setItemLayout(e,r),o.getItemGraphicEl(e).setShape("points",r)}))}}),this)},o.prototype.renderSeries=function(t,n,o,r){var a=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new U});this.group.add(c.group),this.markKeep(c);var d=function(t,e,n){var o,r,a=["x0","y0","x1","y1"];if(t){var s=i(t&&t.dimensions,(function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return f(f({},i),{name:t,ordinalMeta:null})}));r=i(a,(function(t,e){return{name:t,type:s[e%2].type}})),o=new xh(r,n)}else o=new xh(r=[{name:"value",type:"float"}],n);var l=i(n.get("data"),at(uP,e,t,n));t&&(l=lt(l,at(hP,t)));var u=t?function(t,e,n,i){return al(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return al(t.value,r[i])};return o.initData(l,null,u),o.hasItemOption=!0,o}(a,t,n);n.setData(d),d.each((function(n){var o=i(fP,(function(e){return pP(d,n,e,t,r)})),s=a.getAxis("x").scale,u=a.getAxis("y").scale,c=s.getExtent(),h=u.getExtent(),p=[s.parse(d.get("x0",n)),s.parse(d.get("x1",n))],f=[u.parse(d.get("y0",n)),u.parse(d.get("y1",n))];He(p),He(f);var g=!!(c[0]>p[1]||c[1]f[1]||h[1]=0},s.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},s.type="legend.plain",s.dependencies=["series"],s.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},s}(va);const mP=yP;var vP=at,xP=a,_P=U;function bP(t,e,n,i){MP(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),wP(t,e,n,i)}function SP(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,o=n.length;i0?2:0),xP(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=0===t.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?Oc(d,a):i.decal,"inherit"===u.fill&&(u.fill=i[o]);"inherit"===u.stroke&&(u.stroke=i[c]);"inherit"===u.opacity&&(u.opacity=("fill"===o?i:n).opacity);s(u,i);var h=e.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!r){var f=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(u=x||u||"roundRect",o,s,l,h,y,d),b=new _P,S=o.getModel("textStyle");if(!g(t.getLegendIcon)||x&&"inherit"!==x){var w="inherit"===x&&t.getData().getVisual("symbol")?"inherit"===m?t.getData().getVisual("symbolRotate"):m:0;b.add(function(t){var e=t.icon||"roundRect",n=Cc(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:f,icon:u,iconRotate:w,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:v}))}else b.add(t.getLegendIcon({itemWidth:p,itemHeight:f,icon:u,iconRotate:m,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:v}));var M="left"===a?p+5:-5,I=a,D=r.get("formatter"),T=n;e(D)&&D?T=D.replace("{name}",null!=n?n:""):g(D)&&(T=D(n));var C=y?S.getTextColor():o.get("inactiveColor");b.add(new X({style:zo(S,{text:T,x:M,y:f/2,fill:C,align:I,verticalAlign:"middle"},{inheritColor:C})}));var A=new F({shape:b.getBoundingRect(),style:{fill:"transparent"}}),L=o.getModel("tooltip");return L.get("show")&&Ao({el:A,componentModel:r,itemName:n,itemTooltipOption:L.option}),b.add(A),b.eachChild((function(t){t.silent=!0})),A.silent=!c,this.getContentGroup().add(b),Bi(b),b.__legendDataIndex=i,b},i.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getContentGroup(),s=this.getSelectorGroup();ua(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){ua("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",y=0===p?"y":"x";"end"===r?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=l[f]+h+c[f],m[g]=Math.max(l[g],c[g]),m[y]=Math.min(0,c[y]+d[1-p]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},i.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},i.type="legend.plain",i}(hu);function DP(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;nn[o],f=[-d.x,-d.y];e||(f[i]=l[s]);var g=[0,0],y=[-h.x,-h.y],m=_(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[o]-h[o]:g[i]+=h[o]+m);y[1-i]+=d[r]/2-h[r]/2,l.setPosition(f),u.setPosition(g),c.setPosition(y);var v={x:0,y:0};if(v[o]=p?n[o]:d[o],v[r]=Math.max(d[r],h[r]),v[a]=Math.min(0,h[a]+y[1-i]),u.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-h[o]-m,0),x[r]=v[r],u.setClipPath(new F({shape:x})),u.__rectSize=x[o]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var b=this._getPageInfo(t);return null!=b.pageIndex&&$i(l,{x:b.contentPosition[0],y:b.contentPosition[1]},p?t:null),this._updatePageInfoView(t,b),v},i.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},i.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;a(["pagePrev","pageNext"],(function(e){var o=null!=n[e+"DataIndex"],r=i.childOfName(e);r&&(r.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),r.cursor=o?"pointer":"default")}));var o=i.childOfName("pageText"),r=t.get("pageFormatter"),s=n.pageIndex,l=null!=s?s+1:0,u=n.pageCount;o&&r&&o.setStyle("text",e(r)?r.replace("{current}",null==l?"":l+"").replace("{total}",null==u?"":u+""):r({current:l,total:u}))},i.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,r=PP[o],a=NP[o],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=v(u);h.contentPosition[o]=-p.s;for(var f=s+1,g=p,y=p,m=null;f<=c;++f)(!(m=v(l[f]))&&y.e>g.s+i||m&&!x(m,g.s))&&(g=y.i>g.i?y:m)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),y=m;for(f=s-1,g=p,y=p,m=null;f>=-1;--f)(m=v(l[f]))&&x(y,m.s)||!(g.i=e&&t.s<=e+i}},i.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,o){var r=i.__legendDataIndex;null==n&&null!=r&&(n=o),r===t&&(e=o)})),null!=e?e:n):0;var e,n},i.type="legend.scroll",i}(IP);const RP=OP;function EP(t){Yd(CP),t.registerComponentModel(LP),t.registerComponentView(RP),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}const VP=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="dataZoom.inside",n.defaultOption=dr(SA.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),n}(SA);var zP=Mn();function BP(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function GP(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function FP(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function WP(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=zP(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=r());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){var n=vA(t);a(n.infoList,(function(n){var o=n.model.uid,s=i.get(o)||i.set(o,function(t,e){var n={model:e,containsPoint:at(FP,e),dispatchAction:at(GP,t),dataZoomInfoMap:null,controller:null},i=n.controller=new Qm(t.getZr());return a(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(o){if(e.isAvailableBehavior(o.model.option)){var r=(o.getRange||{})[t],a=r&&r(o.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!o.model.get("disabled",!0)&&a&&i.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(s.dataZoomInfoMap||(s.dataZoomInfoMap=r())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,o=t.dataZoomInfoMap;if(o){var r=o.keys()[0];null!=r&&(e=o.get(r))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return t.each((function(t){var r=t.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),o=o&&r.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Tu(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else BP(i,t)}))}))}var HP=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return t(n,e),n.prototype.render=function(t,n,i){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(t,e,n){zP(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}(i,t,{pan:ut(YP.pan,this),zoom:ut(YP.zoom,this),scrollMove:ut(YP.scrollMove,this)}))},n.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},n.prototype._clear=function(){!function(t,e){for(var n=zP(t).coordSysRecordMap,i=n.keys(),o=0;o0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return SS(0,r,[0,100],0,c.minSpan,c.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}},pan:UP((function(t,e,n,i,o,r){var a=XP[i]([r.oldX,r.oldY],[r.newX,r.newY],e,o,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:UP((function(t,e,n,i,o,r){return XP[i]([0,0],[r.scrollDelta,r.scrollDelta],e,o,n).signal*(t[1]-t[0])*r.scrollDelta}))};function UP(t){return function(e,n,i,o){var r=this.range,a=r.slice(),s=e.axisModels[0];if(s)return SS(t(a,s,e,n,i,o),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}}var XP={grid:function(t,e,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(t,e,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,n,i,o){var r=n.axis,a=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}};const ZP=HP;function jP(t){PA(t),t.registerComponentModel(VP),t.registerComponentView(ZP),WP(t)}const qP=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.type="dataZoom.slider",n.layoutMode="box",n.defaultOption=dr(SA.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),n}(SA);var KP=F,JP="horizontal",$P="vertical",QP=["line","bar","candlestick","scatter"],tN={easing:"cubicOut",duration:100,delay:0},eN=function(n){function i(){var t=null!==n&&n.apply(this,arguments)||this;return t.type=i.type,t._displayables={},t}return t(i,n),i.prototype.init=function(t,e){this.api=e,this._onBrush=ut(this._onBrush,this),this._onBrushEnd=ut(this._onBrushEnd,this)},i.prototype.render=function(t,e,i,o){if(n.prototype.render.apply(this,arguments),Tu(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},i.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},i.prototype._clear=function(){Cu(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},i.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new U;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},i.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),o={width:e.getWidth(),height:e.getHeight()},r=this._orient===JP?{right:o.width-i.x-i.width,top:o.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},s=fa(t.option);a(["right","top","width","height"],(function(t){"ph"===s[t]&&(s[t]=r[t])}));var l=ca(s,o);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===$P&&this._size.reverse()},i.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==JP||o?n===JP&&o?{scaleY:a?1:-1,scaleX:-1}:n!==$P||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([r]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},i.prototype._getViewExtent=function(){return[0,this._size[0]]},i.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new KP({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new KP({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:ut(this._onClickPanel,this)}),r=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),n.add(o)},i.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),r=i.getShadowDim&&i.getShadowDim(),a=r&&o.getDimensionInfo(r)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=o.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,v=Math.round(o.count()/e[0]);o.each([a],(function(t,e){if(v>0&&e%v)m+=y;else{var n=null==t||isNaN(t)||""===t,i=n?0:Ge(t,u,h,!0);n&&!d&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([m,0]),g.push([m,0])),f.push([m,i]),g.push([m,i]),m+=y,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var x,_,b,S,w,M=this.dataZoomModel,I=0;I<3;I++){var D=(x=1===I,_=void 0,b=void 0,S=void 0,w=void 0,_=M.getModel(x?"selectedDataBackground":"dataBackground"),b=new U,S=new B({shape:{points:s},segmentIgnoreThreshold:1,style:_.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),w=new G({shape:{points:l},segmentIgnoreThreshold:1,style:_.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19}),b.add(S),b.add(w),b);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}}}},i.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(o,r){var s=t.getAxisProxy(o,r).getTargetSeriesModels();a(s,(function(t){if(!(n||!0!==e&&d(QP,t.get("type"))<0)){var a,s=i.getComponent(yA(o),r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},i.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],o=this._displayables.sliderGroup,r=this._size,s=this.dataZoomModel,l=this.api,u=s.get("borderRadius")||0,c=s.get("brushSelect"),d=e.filler=new KP({silent:c,style:{fill:s.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new KP({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:u},style:{stroke:s.get("dataBackgroundColor")||s.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),a([0,1],(function(e){var r=s.get("handleIcon");!Ic[r]&&r.indexOf("path://")<0&&r.indexOf("image://")<0&&(r="path://"+r);var a=Cc(r,-1,0,2,2,null,!0);a.attr({cursor:nN(this._orient),draggable:!0,drift:ut(this._onDragMove,this,e),ondragend:ut(this._onDragEnd,this),onmouseover:ut(this._showDataInfo,this,!0),onmouseout:ut(this._showDataInfo,this,!1),z2:5});var l=a.getBoundingRect(),u=s.get("handleSize");this._handleHeight=Fe(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,a.setStyle(s.getModel("handleStyle").getItemStyle()),a.style.strokeNoScale=!0,a.rectHover=!0,a.ensureState("emphasis").style=s.getModel(["emphasis","handleStyle"]).getItemStyle(),Bi(a);var c=s.get("handleColor");null!=c&&(a.style.fill=c),o.add(n[e]=a);var d=s.getModel("textStyle");t.add(i[e]=new X({silent:!0,invisible:!0,style:zo(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var h=d;if(c){var p=Fe(s.get("moveHandleSize"),r[1]),f=e.moveHandle=new F({style:s.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:p}}),g=.8*p,y=e.moveHandleIcon=Cc(s.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=r[1]+p/2-.5,f.ensureState("emphasis").style=s.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(r[1]/2,Math.max(p,10));(h=e.moveZone=new F({invisible:!0,shape:{y:r[1]-m,height:p+m}})).on("mouseover",(function(){l.enterEmphasis(f)})).on("mouseout",(function(){l.leaveEmphasis(f)})),o.add(f),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:nN(this._orient),drift:ut(this._onDragMove,this,"all"),ondragstart:ut(this._showDataInfo,this,!0),ondragend:ut(this._onDragEnd,this),onmouseover:ut(this._showDataInfo,this,!0),onmouseout:ut(this._showDataInfo,this,!1)})},i.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Ge(t[0],[0,100],e,!0),Ge(t[1],[0,100],e,!0)]},i.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];SS(e,i,o,n.get("zoomLock")?"all":t,null!=r.minSpan?Ge(r.minSpan,a,o,!0):null,null!=r.maxSpan?Ge(r.maxSpan,a,o,!0):null);var s=this._range,l=this._range=He([Ge(i[0],o,a,!0),Ge(i[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},i.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=He(n.slice()),o=this._size;a([0,1],(function(t){var i=e.handles[t],r=this._handleHeight;i.attr({scaleX:r/2,scaleY:r/2,x:n[t]+(t?-1:1),y:o[1]/2-r/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var r={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(r),e.moveZone.setShape(r),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",r.x+r.width/2));for(var s=e.dataShadowSegs,l=[0,i[0],i[1],o[0]],u=0;ue[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-o);this._updateView(),r&&this._dispatchZoomAction(!1)}},i.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Q(e,n),this._brushing=!0,this._brushStartTime=+new Date},i.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),o=[0,100];this._range=He([Ge(n.x,i,o,!0),Ge(n.x+n.width,i,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},i.prototype._onBrush=function(t){this._brushing&&(Zt(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},i.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new KP({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(r.x,r.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},i.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?tN:null,start:e[0],end:e[1]})},i.prototype._findCoordRect=function(){var t,e=vA(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:.2*i,y:.2*o,width:.6*i,height:.6*o}}return t},i.type="dataZoom.slider",i}(MA);function nN(t){return"vertical"===t?"ns-resize":"ew-resize"}const iN=eN;function oN(t){t.registerComponentModel(qP),t.registerComponentView(iN),PA(t)}var rN={get:function(t,e,n){var i=nt((aN[t]||{})[e]);return n&&o(i)?i[i.length-1]:i}},aN={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const sN=rN;var lN=__.mapVisual,uN=__.eachVisual,cN=o,dN=a,hN=He,pN=Ge,fN=function(n){function i(){var t=null!==n&&n.apply(this,arguments)||this;return t.type=i.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return t(i,n),i.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},i.prototype.optionUpdated=function(t,e){var n=this.option;!e&&ek(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},i.prototype.resetVisual=function(t){var e=this.stateList;t=ut(t,this),this.controllerVisuals=tk(this.option.controller,e,t),this.targetVisuals=tk(this.option.target,e,t)},i.prototype.getItemSymbol=function(){return null},i.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=hn(t),e},i.prototype.eachTargetSeries=function(t,e){a(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},i.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},i.prototype.formatValueText=function(t,n,i){var r,a=this.option,s=a.precision,l=this.dataBound,u=a.formatter;i=i||["<",">"],o(t)&&(t=t.slice(),r=!0);var c=n?t:r?[d(t[0]),d(t[1])]:d(t);return e(u)?u.replace("{value}",r?c[0]:c).replace("{value2}",r?c[1]:c):g(u)?r?u(t[0],t[1]):u(t):r?t[0]===l[0]?i[0]+" "+c[1]:t[1]===l[1]?i[1]+" "+c[0]:c[0]+" - "+c[1]:c;function d(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}},i.prototype.resetExtent=function(){var t=this.option,e=hN([t.min,t.max]);this._dataExtent=e},i.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return r.storeDimIndex}},i.prototype.getExtent=function(){return this._dataExtent.slice()},i.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),o=e.controller||(e.controller={});et(i,n),et(o,n);var r=this.isCategory();function a(n){cN(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,o),function(t,e,n){var i=t[e],o=t[n];i&&!o&&(o=t[n]={},dN(i,(function(t,e){if(__.isValidType(e)){var n=sN.get(e,"inactive",r);null!=n&&(o[e]=n,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";dN(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:r?i:[i]}),null==l.symbol&&(l.symbol=e&&nt(e)||(r?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&nt(n)||(r?s[0]:[s[0],s[0]])),l.symbol=lN(l.symbol,(function(t){return"none"===t?o:t}));var u=l.symbolSize;if(null!=u){var c=-1/0;uN(u,(function(t){t>c&&(c=t)})),l.symbolSize=lN(u,(function(t){return pN(t,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},i.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},i.prototype.isCategory=function(){return!!this.option.categories},i.prototype.setSelected=function(t){},i.prototype.getSelected=function(){return null},i.prototype.getValueState=function(t){return null},i.prototype.getVisualMeta=function(t){return null},i.type="visualMap",i.dependencies=["series"],i.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},i}(va);const gN=fN;var yN=[20,140];function mN(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],r=[],a=0;a<=200&&oe[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},n.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),a(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},n.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},n.prototype.getSelected=function(){var t=this.getExtent(),e=He((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},n.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},n.prototype.getVisualMeta=function(t){var e=mN(this,"outOfRange",this.getExtent()),n=mN(this,"inRange",this.option.range.slice()),i=[];function o(e,n){i.push({value:e,color:t(e,n)})}for(var r=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},n.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},n.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new U("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},n.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,r=n.handleLabels,a=i.itemSize,s=i.getExtent();MN([0,1],(function(l){var u=o[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var c=wN(t[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var h=_o(n.handleLabelPoints[l],xo(u,this.group));r[l].setStyle({x:h[0],y:h[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},n.prototype._showIndicator=function(t,e,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(t,"symbolSize"),h=wN(t,r,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=_o(l.indicatorLabelPoint,xo(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var m=this._applyTransform("left",l.mainGroup),v="horizontal"===this._orient;y.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:v?m:"middle",align:v?"center":m});var x={x:p,y:h,style:{fill:c}},_={style:{x:g[0],y:g[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var w=0;wo[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(e||AN(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(t,e){var n={},i={};return o(t||[],n),o(e||[],i,n),[r(n),r(i)];function o(t,e,n){for(var i=0,o=t.length;i=0&&(o.dimension=r,i.push(o))}})),t.getData().setVisual("visualMeta",i)}}];function RN(t,e,n,i){for(var o=e.targetVisuals[i],r=__.prepareVisualTypes(o),a={color:gc(t.getData(),"color")},s=0,l=r.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(PN,NN),a(ON,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(VN))}function FN(t){t.registerComponentModel(vN),t.registerComponentView(kN),GN(t)}var WN=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t._pieceList=[],t}return t(n,e),n.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var o=this._mode=this._determineMode();this._pieceList=[],HN[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===o?(t.mappingMethod="category",t.categories=nt(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=i(this._pieceList,(function(t){return t=nt(t),"inRange"!==e&&(t.visual=null),t})))}))},n.prototype.completeVisualOption=function(){var t=this.option,n={},i=__.listVisualTypes(),o=this.isCategory();function r(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}a(t.pieces,(function(t){a(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),a(n,(function(e,n){var i=!1;a(this.stateList,(function(e){i=i||r(t,e,n)||r(t.target,e,n)}),this),!i&&a(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=sN.get(n,"inRange"===e?"active":"inactive",o)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},n.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,o=(e?n:t).selected||{};if(n.selected=o,a(i,(function(t,e){var n=this.getSelectedMapKey(t);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var r=!1;a(i,(function(t,e){var n=this.getSelectedMapKey(t);o[n]&&(r?o[n]=!1:r=!0)}),this)}},n.prototype.getItemSymbol=function(){return this.get("itemSymbol")},n.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},n.prototype.getPieceList=function(){return this._pieceList},n.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},n.prototype.setSelected=function(t){this.option.selected=nt(t)},n.prototype.getValueState=function(t){var e=__.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},n.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var o=[],r=i.getData();r.each(this.getDataDimensionIndex(r),(function(e,i){__.findPieceIndex(e,n)===t&&o.push(i)}),this),e.push({seriesId:i.id,dataIndex:o})}),this),e},n.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},n.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),(r=o[o.length-1].interval[1])!==1/0&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return a(o,(function(t){var e=t.interval;e&&(e[0]>s&&l([s,e[0]],"outOfRange"),l(e.slice()),s=e[1])}),this),{stops:e,outerColors:n}}function l(o,r){var a=i.getRepresentValue({interval:o});r||(r=i.getValueState(a));var s=t(a,r);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:e.push({value:o[0],color:s},{value:o[1],color:s})}},n.type="visualMap.piecewise",n.defaultOption=dr(gN.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),n}(gN),HN={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var s=0,l=i[0];s","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function YN(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}const UN=WN;const XN=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return t(n,e),n.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,o=i.getFont(),r=i.getTextColor(),s=this._getItemAlign(),l=e.itemSize,u=this._getViewData(),c=u.endsText,d=Ht(e.get("showLabel",!0),!c);c&&this._renderEndsText(t,c[0],l,d,s),a(u.viewPieceList,(function(i){var a=i.piece,u=new U;u.onclick=ut(this._onItemClick,this,a),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(a);if(this._createItemSymbol(u,c,[0,0,l[0],l[1]]),d){var h=this.visualMapModel.getValueState(c);u.add(new X({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:a.text,verticalAlign:"middle",align:s,font:o,fill:r,opacity:"outOfRange"===h?.5:1}}))}t.add(u)}),this),c&&this._renderEndsText(t,c[1],l,d,s),ua(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},n.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:SN(i.findTargetDataIndices(e),i)})}},n.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return bN(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},n.prototype._renderEndsText=function(t,e,n,i,o){if(e){var r=new U,a=this.visualMapModel.textStyleModel;r.add(new X({style:zo(a,{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:e})})),t.add(r)}},n.prototype._getViewData=function(){var t=this.visualMapModel,e=i(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),o=t.get("orient"),r=t.get("inverse");return("horizontal"===o?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},n.prototype._createItemSymbol=function(t,e,n){t.add(Cc(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},n.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var o=nt(n.selected),r=e.getSelectedMapKey(t);"single"===i||!0===i?(o[r]=!0,a(o,(function(t,e){o[e]=e===r}))):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},n.type="visualMap.piecewise",n}(xN);function ZN(t){t.registerComponentModel(UN),t.registerComponentView(XN),GN(t)}var jN={label:{enabled:!0},decal:{show:!1}},qN=Mn(),KN={};function JN(t,n){var i=t.getModel("aria");if(i.get("enabled")){var o=nt(jN);et(o.label,t.getLocaleModel().get("aria"),!1),et(i.option,o,!1),function(){if(i.getModel("decal").get("show")){var e=r();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),qN(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(g(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=Ua(e.ecModel,e.name,KN,t.getSeriesCount()),o=n.getVisual("decal");n.setVisual("decal",u(o,i))}else{var r=e.getRawData(),a={},s=qN(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=r.count();r.each((function(t){var i=a[t],o=r.getName(t)||t+"",c=Ua(e.ecModel,o,s,l),d=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(d,c))}))}}function u(t,e){var n=t?f(f({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var e=t.getLocaleModel().get("aria"),o=i.getModel("label");if(o.option=P(o.option,e),!o.get("enabled"))return;var r=n.getZr().dom;if(o.get("description"))return void r.setAttribute("aria-label",o.get("description"));var a,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,c=o.get(["series","maxCount"])||10,d=Math.min(l,c);if(l<1)return;var h=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();a=h?s(o.get(["general","withTitle"]),{title:h}):o.get(["general","withoutTitle"]);var p=[];a+=s(l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",r]):o.get(["series","single",r]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,_=t.getLocaleModel().get(["series","typeNames"]),_[x]||_.chart)});var a=e.getData();if(a.count()>u)i+=s(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var c=o.get(["data","separator","middle"]),h=o.get(["data","separator","end"]),f=[],g=0;g":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},tO=function(){function t(t){if(null==(this._condVal=e(t)?new RegExp(t):Pe(t)?t:null)){ln("")}}return t.prototype.evaluate=function(t){var n=typeof t;return e(n)?this._condVal.test(t):!!u(n)&&this._condVal.test(t+"")},t}(),eO=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),nO=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}r=l.length;var u=Math.ceil(r/2);n[o].many=l.slice(u,r),n[s].many=l.slice(0,u),s++}return n}var yO={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);fO(t)&&(s=t,l=e),fO(e)&&(s=e,l=t);for(var d=s?s===t:t.length>e.length,h=s?gO(l,s):gO(d?e:t,[d?t:e]),p=0,f=0;fxO))for(var o=n.getIndices(),r=0;r0&&i.group.traverse((function(t){t instanceof y&&!t.animators.length&&t.animateFrom({style:{opacity:0}},o)}))}))}function kO(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function PO(t){return o(t)?t.sort().join(","):t}function NO(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function OO(t,e){for(var n=0;n=0&&o.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:NO(e.oldData[n]),groupIdDim:t.dimension})})),a(hn(t.to),(function(t){var i=OO(n.updatedSeries,t);if(i>=0){var o=n.updatedSeries[i].getData();r.push({dataGroupId:e.oldDataGroupIds[i],data:o,divide:NO(o),groupIdDim:t.dimension})}})),o.length>0&&r.length>0&&LO(o,r,i)}(t,i,n,e)}));else{var l=function(t,e){var n=r(),i=r(),s=r();return a(t.oldSeries,(function(e,n){var r=t.oldDataGroupIds[n],l=t.oldData[n],u=kO(e),c=PO(u);i.set(c,{dataGroupId:r,data:l}),o(u)&&a(u,(function(t){s.set(t,{key:c,dataGroupId:r,data:l})}))})),a(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),r=t.getData(),l=kO(t),u=PO(l),c=i.get(u);if(c)n.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:NO(c.data),data:c.data}],newSeries:[{dataGroupId:e,divide:NO(r),data:r}]});else if(o(l)){var d=[];a(l,(function(t){var e=i.get(t);e.data&&d.push({dataGroupId:e.dataGroupId,divide:NO(e.data),data:e.data})})),d.length&&n.set(u,{oldSeries:d,newSeries:[{dataGroupId:e,data:r,divide:NO(r)}]})}else{var h=s.get(l);if(h){var p=n.get(h.key);p||(p={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:NO(h.data)}],newSeries:[]},n.set(h.key,p)),p.newSeries.push({dataGroupId:e,data:r,divide:NO(r)})}}}})),n}(i,n);a(l.keys(),(function(t){var n=l.get(t);LO(n.oldSeries,n.newSeries,e)}))}a(n.updatedSeries,(function(t){t[eu]&&(t[eu]=!1)}))}for(var u=t.getSeries(),c=i.oldSeries=[],d=i.oldDataGroupIds=[],h=i.oldData=[],p=0;p