ai-dev-analytics 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +52 -0
  2. package/README.zh-CN.md +52 -0
  3. package/dist/cli/commands/init.d.ts.map +1 -1
  4. package/dist/cli/commands/init.js +124 -4
  5. package/dist/cli/commands/init.js.map +1 -1
  6. package/dist/cli/commands/reindex.d.ts +4 -0
  7. package/dist/cli/commands/reindex.d.ts.map +1 -1
  8. package/dist/cli/commands/reindex.js +48 -3
  9. package/dist/cli/commands/reindex.js.map +1 -1
  10. package/dist/cli/commands/rules.d.ts.map +1 -1
  11. package/dist/cli/commands/rules.js +12 -10
  12. package/dist/cli/commands/rules.js.map +1 -1
  13. package/dist/cli/commands/start.d.ts.map +1 -1
  14. package/dist/cli/commands/start.js +1 -5
  15. package/dist/cli/commands/start.js.map +1 -1
  16. package/dist/cli/commands/status.d.ts.map +1 -1
  17. package/dist/cli/commands/status.js +1 -5
  18. package/dist/cli/commands/status.js.map +1 -1
  19. package/dist/cli/commands/update.d.ts.map +1 -1
  20. package/dist/cli/commands/update.js +14 -0
  21. package/dist/cli/commands/update.js.map +1 -1
  22. package/dist/mcp/server.d.ts.map +1 -1
  23. package/dist/mcp/server.js +86 -57
  24. package/dist/mcp/server.js.map +1 -1
  25. package/dist/utils/fs.d.ts +9 -0
  26. package/dist/utils/fs.d.ts.map +1 -1
  27. package/dist/utils/fs.js +39 -0
  28. package/dist/utils/fs.js.map +1 -1
  29. package/dist/utils/git.d.ts +10 -1
  30. package/dist/utils/git.d.ts.map +1 -1
  31. package/dist/utils/git.js +76 -8
  32. package/dist/utils/git.js.map +1 -1
  33. package/dist/utils/guide.d.ts +17 -1
  34. package/dist/utils/guide.d.ts.map +1 -1
  35. package/dist/utils/guide.js +95 -10
  36. package/dist/utils/guide.js.map +1 -1
  37. package/dist/utils/run-data.d.ts +1 -1
  38. package/dist/utils/run-data.d.ts.map +1 -1
  39. package/dist/utils/run-data.js +2 -7
  40. package/dist/utils/run-data.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/dashboard/assets/index-B8QcPcg7.css +1 -0
  43. package/src/dashboard/assets/{index-E4BP-QJG.js → index-DcAl6lhS.js} +1 -1
  44. package/src/dashboard/demo/run.en.json +1169 -0
  45. package/src/dashboard/demo/run.zh.json +1169 -0
  46. package/src/dashboard/index.html +2 -2
  47. package/src/dashboard/assets/index-CwXn3nJb.css +0 -1
@@ -106,6 +106,6 @@ yyyy`);var a=ba(e),n=t?"getUTC":"get",i=a[n+"FullYear"](),o=a[n+"Month"]()+1,l=a
106
106
 
107
107
  `:"<br/>",b=h.join(_);this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(l,p,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(l,b,u,Math.random()+"",o[0],o[1],p,null,d)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=Mt(a),l=o.seriesIndex,s=i.getSeriesByIndex(l),u=o.dataModel||s,c=o.dataIndex,h=o.dataType,d=u.getData(h),p=this._renderMode,y=t.positionDefault,m=$c([d.getItemModel(c),u,s&&(s.coordinateSystem||{}).model],this._tooltipModel,y?{position:y}:null),_=m.get("trigger");if(!(_!=null&&_!=="item")){var b=u.getDataParams(c,h),x=new x_;b.marker=x.makeTooltipMarker("item",vs(b.color),p);var w=cR(u.formatTooltip(c,!1,h)),A=m.get("order"),M=m.get("valueFormatter"),D=w.frag,L=D?yR(M?rt({valueFormatter:M},D):D,x,p,A,i.get("useUTC"),m.get("textStyle")):w.text,R="item_"+u.name+"_"+c;this._showOrMove(m,function(){this._showTooltipContent(m,L,b,R,t.offsetX,t.offsetY,t.position,t.target,x)}),n({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:l,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=Mt(a),l=o.tooltipConfig,s=l.option||{},u=s.encodeHTMLContent;if(vt(s)){var c=s;s={content:c,formatter:c},u=!0}u&&i&&s.content&&(s=Tt(s),s.content=Rr(s.content));var h=[s],d=this._ecModel.getComponent(o.componentMainType,o.componentIndex);d&&h.push(d),h.push({formatter:s.content});var p=t.positionDefault,y=$c(h,this._tooltipModel,p?{position:p}:null),m=y.get("content"),_=Math.random()+"",b=new x_;this._showOrMove(y,function(){var x=Tt(y.get("formatterParams")||{});this._showTooltipContent(y,m,x,_,t.offsetX,t.offsetY,t.position,a,b)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,l,s,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var d=t.get("formatter");s=s||t.get("position");var p=a,y=this._getNearestPoint([o,l],n,t.get("trigger"),t.get("borderColor")),m=y.color;if(d)if(vt(d)){var _=t.ecModel.get("useUTC"),b=it(n)?n[0]:n,x=b&&b.axisType&&b.axisType.indexOf("time")>=0;p=d,x&&(p=bv(b.axisValue,p,_)),p=Vw(p,n,!0)}else if(_t(d)){var w=dt(function(A,M){A===this._ticket&&(h.setContent(M,c,t,m,s),this._updatePosition(t,s,o,l,h,n,u))},this);this._ticket=i,p=d(n,i,w)}else p=d;h.setContent(p,c,t,m,s),h.show(t,m),this._updatePosition(t,s,o,l,h,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i){if(n==="axis"||it(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!it(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,l,s){var u=this._api.getWidth(),c=this._api.getHeight();a=a||t.get("position");var h=o.getSize(),d=t.get("align"),p=t.get("verticalAlign"),y=s&&s.getBoundingRect().clone();if(s&&y.applyTransform(s.transform),_t(a)&&(a=a([n,i],l,o.el,y,{viewSize:[u,c],contentSize:h.slice()})),it(a))n=ht(a[0],u),i=ht(a[1],c);else if(xt(a)){var m=a;m.width=h[0],m.height=h[1];var _=Xe(m,{width:u,height:c});n=_.x,i=_.y,d=null,p=null}else if(vt(a)&&s){var b=cnt(a,y,h,t.get("borderWidth"));n=b[0],i=b[1]}else{var b=unt(n,i,o,u,c,d?null:20,p?null:20);n=b[0],i=b[1]}if(d&&(n-=AN(d)?h[0]/2:d==="right"?h[0]:0),p&&(i-=AN(p)?h[1]/2:p==="bottom"?h[1]:0),vV(t)){var b=fnt(n,i,o,u,c);n=b[0],i=b[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&N(n,function(l,s){var u=l.dataByAxis||[],c=t[s]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&N(u,function(d,p){var y=h[p]||{},m=d.seriesDataIndices||[],_=y.seriesDataIndices||[];o=o&&d.value===y.value&&d.axisType===y.axisType&&d.axisId===y.axisId&&m.length===_.length,o&&N(m,function(b,x){var w=_[x];o=o&&b.seriesIndex===w.seriesIndex&&b.dataIndex===w.dataIndex}),i&&N(d.seriesDataIndices,function(b){var x=b.seriesIndex,w=a[x],A=i[x];w&&A&&A.data!==w.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){Ft.node||!a.getDom()||(Zh(this,"_updatePosition"),this._tooltipContent.dispose(),Ox("itemTooltip",a))},e.type="tooltip",e})(we);function $c(r,e,t){var a=e.ecModel,n;t?(n=new ee(t,a,a),n=new ee(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ee&&(o=o.get("tooltip",!0)),vt(o)&&(o={formatter:o}),o&&(n=new ee(o,n,a)))}return n}function TN(r,e){return r.dispatchAction||dt(e.dispatchAction,e)}function unt(r,e,t,a,n,i,o){var l=t.getSize(),s=l[0],u=l[1];return i!=null&&(r+s+i+2>a?r-=s+i:r+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function fnt(r,e,t,a,n){var i=t.getSize(),o=i[0],l=i[1];return r=Math.min(r+o,a)-o,e=Math.min(e+l,n)-l,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function cnt(r,e,t,a){var n=t[0],i=t[1],o=Math.ceil(Math.SQRT2*a)+8,l=0,s=0,u=e.width,c=e.height;switch(r){case"inside":l=e.x+u/2-n/2,s=e.y+c/2-i/2;break;case"top":l=e.x+u/2-n/2,s=e.y-i-o;break;case"bottom":l=e.x+u/2-n/2,s=e.y+c+o;break;case"left":l=e.x-n-o,s=e.y+c/2-i/2;break;case"right":l=e.x+u+o,s=e.y+c/2-i/2}return[l,s]}function AN(r){return r==="center"||r==="middle"}function hnt(r,e,t){var a=pw(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=pv(e,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var l=t.getViewOfComponentModel(o),s;if(l.group.traverse(function(u){var c=Mt(u).tooltipConfig;if(c&&c.name===r.name)return s=u,!0}),s)return{componentMainType:n,componentIndex:o.componentIndex,el:s}}}}function vnt(r){Gt(Iv),r.registerComponentModel(qat),r.registerComponentView(snt),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Pe),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Pe)}var dnt=["rect","polygon","keep","clear"];function pnt(r,e){var t=de(r?r.brush:[]);if(t.length){var a=[];N(t,function(s){var u=s.hasOwnProperty("toolbox")?s.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;it(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),l=o.type||(o.type=[]);l.push.apply(l,a),gnt(l),e&&!l.length&&l.push.apply(l,dnt)}}function gnt(r){var e={};N(r,function(t){e[t]=1}),r.length=0,N(e,function(t,a){r.push(a)})}var CN=N;function DN(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Vx(r,e,t){var a={};return CN(e,function(i){var o=a[i]=n();CN(r[i],function(l,s){if(ar.isValidType(s)){var u={type:s,visual:l};t&&t(u,i),o[s]=new ar(u),s==="opacity"&&(u=Tt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ar(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function yV(r,e,t){var a;N(t,function(n){e.hasOwnProperty(n)&&DN(e[n])&&(a=!0)}),a&&N(t,function(n){e.hasOwnProperty(n)&&DN(e[n])?r[n]=Tt(e[n]):delete r[n]})}function ynt(r,e,t,a,n,i){var o={};N(r,function(h){var d=ar.prepareVisualTypes(e[h]);o[h]=d});var l;function s(h){return qw(t,l,h)}function u(h,d){P5(t,l,h,d)}t.each(c);function c(h,d){l=h;var p=t.getRawDataItem(l);if(!(p&&p.visualMap===!1))for(var y=a.call(n,h),m=e[y],_=o[y],b=0,x=_.length;b<x;b++){var w=_[b];m[w]&&m[w].applyVisual(h,s,u)}}}function mnt(r,e,t,a){var n={};return N(r,function(i){var o=ar.prepareVisualTypes(e[i]);n[i]=o}),{progress:function(o,l){var s;a!=null&&(s=l.getDimensionIndex(a));function u(M){return qw(l,h,M)}function c(M,D){P5(l,h,M,D)}for(var h,d=l.getStore();(h=o.next())!=null;){var p=l.getRawDataItem(h);if(!(p&&p.visualMap===!1))for(var y=a!=null?d.get(s,h):h,m=t(y),_=e[m],b=n[m],x=0,w=b.length;x<w;x++){var A=b[x];_[A]&&_[A].applyVisual(y,u,c)}}}}}function _nt(r){var e=r.brushType,t={point:function(a){return MN[e].point(a,t,r)},rect:function(a){return MN[e].rect(a,t,r)}};return t}var MN={lineX:LN(0),lineY:LN(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Ul(t.range,r[0],r[1])},rect:function(r,e,t){var a=t.range;if(!r||a.length<=1)return!1;var n=r.x,i=r.y,o=r.width,l=r.height,s=a[0];if(Ul(a,n,i)||Ul(a,n+o,i)||Ul(a,n,i+l)||Ul(a,n+o,i+l)||kt.create(r).contain(s[0],s[1])||sh(n,i,n+o,i,a)||sh(n,i,n,i+l,a)||sh(n+o,i,n+o,i+l,a)||sh(n,i+l,n+o,i+l,a))return!0}}};function LN(r){var e=["x","y"],t=["width","height"];return{point:function(a,n,i){if(a){var o=i.range,l=a[r];return Kc(l,o)}},rect:function(a,n,i){if(a){var o=i.range,l=[a[e[r]],a[e[r]]+a[t[r]]];return l[1]<l[0]&&l.reverse(),Kc(l[0],o)||Kc(l[1],o)||Kc(o[0],l)||Kc(o[1],l)}}}}function Kc(r,e){return e[0]<=r&&r<=e[1]}var RN=["inBrush","outOfBrush"],BS="__ecBrushSelect",Gx="__ecInBrushSelectEvent";function mV(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new f2(e.option,r);t.setInputRanges(e.areas,r)})}function Snt(r,e,t){var a=[],n,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),mV(r),r.eachComponent({mainType:"brush"},function(o,l){var s={brushId:o.id,brushIndex:l,brushName:o.name,areas:Tt(o.areas),selected:[]};a.push(s);var u=o.option,c=u.brushLink,h=[],d=[],p=[],y=!1;l||(n=u.throttleType,i=u.throttleDelay);var m=ot(o.areas,function(M){var D=Tnt[M.brushType],L=St({boundingRect:D?D(M):void 0},M);return L.selectors=_nt(L),L}),_=Vx(o.option,RN,function(M){M.mappingMethod="fixed"});it(c)&&N(c,function(M){h[M]=1});function b(M){return c==="all"||!!h[M]}function x(M){return!!M.length}r.eachSeries(function(M,D){var L=p[D]=[];M.subType==="parallel"?w(M,D):A(M,D,L)});function w(M,D){var L=M.coordinateSystem;y=y||L.hasAxisBrushed(),b(D)&&L.eachActiveState(M.getData(),function(R,E){R==="active"&&(d[E]=1)})}function A(M,D,L){if(!(!M.brushSelector||wnt(o,D))&&(N(m,function(E){o.brushTargetManager.controlSeries(E,M,r)&&L.push(E),y=y||x(L)}),b(D)&&x(L))){var R=M.getData();R.each(function(E){EN(M,L,R,E)&&(d[E]=1)})}}r.eachSeries(function(M,D){var L={seriesId:M.id,seriesIndex:D,seriesName:M.name,dataIndex:[]};s.selected.push(L);var R=p[D],E=M.getData(),O=b(D)?function(P){return d[P]?(L.dataIndex.push(E.getRawIndex(P)),"inBrush"):"outOfBrush"}:function(P){return EN(M,R,E,P)?(L.dataIndex.push(E.getRawIndex(P)),"inBrush"):"outOfBrush"};(b(D)?y:x(R))&&ynt(RN,_,E,O)})}),bnt(e,n,i,a,t)}function bnt(r,e,t,a,n){if(n){var i=r.getZr();if(!i[Gx]){i[BS]||(i[BS]=xnt);var o=Af(i,BS,t,e);o(r,a)}}}function xnt(r,e){if(!r.isDisposed()){var t=r.getZr();t[Gx]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[Gx]=!1}}function EN(r,e,t,a){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(r.brushSelector(a,t,o.selectors,o))return!0}}function wnt(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(it(t)?Bt(t,e)<0:e!==t)}var Tnt={rect:function(r){return IN(r.range)},polygon:function(r){for(var e,t=r.range,a=0,n=t.length;a<n;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[a];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&IN(e)}};function IN(r){return new kt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Ant=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new kT(a.getZr())).on("brush",dt(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){mV(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:Tt(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:Tt(n),$from:a})},e.type="brush",e})(we),Cnt="#ddd",Dnt=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&yV(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:Cnt},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=ot(t,function(a){return ON(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=ON(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e})(Ht);function ON(r,e){return It({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new ee(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Mnt=["rect","polygon","lineX","lineY","keep","clear"],Lnt=(function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,l;a.eachComponent({mainType:"brush"},function(s){i=s.brushType,o=s.brushOption.brushMode||"single",l=l||!!s.areas.length}),this._brushType=i,this._brushMode=o,N(t.get("type",!0),function(s){t.setIconStatus(s,(s==="keep"?o==="multiple":s==="clear"?l:s===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return N(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:Mnt.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e})(ja);function Rnt(r){r.registerComponentView(Ant),r.registerComponentModel(Dnt),r.registerPreprocessor(pnt),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Snt),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Pe),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Pe),Bu("brush",Lnt)}var Ent=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e})(Ht),Int=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),l=t.getModel("subtextStyle"),s=t.get("textAlign"),u=Rt(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Xt({style:_e(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),d=t.get("subtext"),p=new Xt({style:_e(l,{text:d,fill:l.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),y=t.get("link"),m=t.get("sublink"),_=t.get("triggerEvent",!0);c.silent=!y&&!_,p.silent=!m&&!_,y&&c.on("click",function(){Hg(y,"_"+t.get("target"))}),m&&p.on("click",function(){Hg(m,"_"+t.get("subtarget"))}),Mt(c).eventData=Mt(p).eventData=_?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),d&&i.add(p);var b=i.getBoundingRect(),x=t.getBoxLayoutParams();x.width=b.width,x.height=b.height;var w=Xe(x,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));s||(s=t.get("left")||t.get("right"),s==="middle"&&(s="center"),s==="right"?w.x+=w.width:s==="center"&&(w.x+=w.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),i.x=w.x,i.y=w.y,i.markRedraw();var A={align:s,verticalAlign:u};c.setStyle(A),p.setStyle(A),b=i.getBoundingRect();var M=w.margin,D=t.getItemStyle(["color","opacity"]);D.fill=t.get("backgroundColor");var L=new Wt({shape:{x:b.x-M[3],y:b.y-M[0],width:b.width+M[1]+M[3],height:b.height+M[0]+M[2],r:t.get("borderRadius")},style:D,subPixelOptimize:!0,silent:!0});i.add(L)}},e.type="title",e})(we);function Ont(r){r.registerComponentModel(Ent),r.registerComponentView(Int)}var NN=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],N(a,function(u,c){var h=Ke(hf(u),""),d;xt(u)?(d=Tt(u),d.value=c):d=c,o.push(d),i.push(h)})):o=a;var l={category:"ordinal",time:"time",value:"number"}[n]||"number",s=this._data=new Er([{name:"value",type:l}],this);s.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e})(Ht),_V=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Xo(NN.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e})(NN);ze(_V,qy.prototype);var Nnt=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(we),Pnt=(function(r){Z(e,r);function e(t,a,n,i){var o=r.call(this,t,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(en),VS=Math.PI,PN=$t(),znt=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,n){if(this.model=t,this.api=n,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),l=this._createGroup("_labelGroup"),s=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=s.scale.getLabel({value:u});return ir("nameValue",{noName:!0,value:c})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,s,t)},this),this._renderAxisLabel(i,l,s,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var n=t.get(["label","position"]),i=t.get("orient"),o=Bnt(t,a),l;n==null||n==="auto"?l=i==="horizontal"?o.y+o.height/2<a.getHeight()/2?"-":"+":o.x+o.width/2<a.getWidth()/2?"+":"-":vt(n)?l={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]:l=n;var s={horizontal:"center",vertical:l>=0||l==="+"?"left":"right"},u={horizontal:l>=0||l==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:VS/2},h=i==="vertical"?o.height:o.width,d=t.getModel("controlStyle"),p=d.get("show",!0),y=p?d.get("itemSize"):0,m=p?d.get("itemGap"):0,_=y+m,b=t.get(["label","rotate"])||0;b=b*VS/180;var x,w,A,M=d.get("position",!0),D=p&&d.get("showPlayBtn",!0),L=p&&d.get("showPrevBtn",!0),R=p&&d.get("showNextBtn",!0),E=0,O=h;M==="left"||M==="bottom"?(D&&(x=[0,0],E+=_),L&&(w=[E,0],E+=_),R&&(A=[O-y,0],O-=_)):(D&&(x=[O-y,0],O-=_),L&&(w=[0,0],E+=_),R&&(A=[O-y,0],O-=_));var P=[E,O];return t.get("inverse")&&P.reverse(),{viewRect:o,mainLength:h,orient:i,rotation:c[i],labelRotation:b,labelPosOpt:l,labelAlign:t.get(["label","align"])||s[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:x,prevBtnPosition:w,nextBtnPosition:A,axisExtent:P,controlSize:y,controlGap:m}},e.prototype._position=function(t,a){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var l=na(),s=o.x,u=o.y+o.height;Sn(l,l,[-s,-u]),Yo(l,l,-VS/2),Sn(l,l,[s,u]),o=o.clone(),o.applyTransform(l)}var c=x(o),h=x(n.getBoundingRect()),d=x(i.getBoundingRect()),p=[n.x,n.y],y=[i.x,i.y];y[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(m==null||vt(m)){var _=m==="+"?0:1;w(p,h,c,1,_),w(y,d,c,1,1-_)}else{var _=m>=0?0:1;w(p,h,c,1,_),y[1]=p[1]+m}n.setPosition(p),i.setPosition(y),n.rotation=i.rotation=t.rotation,b(n),b(i);function b(A){A.originX=c[0][0]-A.x,A.originY=c[1][0]-A.y}function x(A){return[[A.x,A.x+A.width],[A.y,A.y+A.height]]}function w(A,M,D,L,R){A[L]+=D[L][R]-M[L][R]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=knt(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var l=n.getDataExtent("value");o.setExtent(l[0],l[1]),o.calcNiceTicks();var s=new Pnt("value",o,t.axisExtent,i);return s.model=a,s},e.prototype._createGroup=function(t){var a=this[t]=new Ct;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var l=new Qe({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:rt({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(l);var s=this._progressLine=new Qe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:St({lineCap:"round",lineWidth:l.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(s)}},e.prototype._renderAxisTick=function(t,a,n,i){var o=this,l=i.getData(),s=n.scale.getTicks();this._tickSymbols=[],N(s,function(u){var c=n.dataToCoord(u.value),h=l.getItemModel(u.value),d=h.getModel("itemStyle"),p=h.getModel(["emphasis","itemStyle"]),y=h.getModel(["progress","itemStyle"]),m={x:c,y:0,onclick:dt(o._changeTimeline,o,u.value)},_=zN(h,d,a,m);_.ensureState("emphasis").style=p.getItemStyle(),_.ensureState("progress").style=y.getItemStyle(),Io(_);var b=Mt(_);h.get("tooltip")?(b.dataIndex=u.value,b.dataModel=i):b.dataIndex=b.dataModel=null,o._tickSymbols.push(_)})},e.prototype._renderAxisLabel=function(t,a,n,i){var o=this,l=n.getLabelModel();if(l.get("show")){var s=i.getData(),u=n.getViewLabels();this._tickLabels=[],N(u,function(c){var h=c.tickValue,d=s.getItemModel(h),p=d.getModel("label"),y=d.getModel(["emphasis","label"]),m=d.getModel(["progress","label"]),_=n.dataToCoord(c.tickValue),b=new Xt({x:_,y:0,rotation:t.labelRotation-t.rotation,onclick:dt(o._changeTimeline,o,h),silent:!1,style:_e(p,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});b.ensureState("emphasis").style=_e(y),b.ensureState("progress").style=_e(m),a.add(b),Io(b),PN(b).dataIndex=h,o._tickLabels.push(b)})}},e.prototype._renderControl=function(t,a,n,i){var o=t.controlSize,l=t.rotation,s=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),h=i.get("inverse",!0);d(t.nextBtnPosition,"next",dt(this._changeTimeline,this,h?"-":"+")),d(t.prevBtnPosition,"prev",dt(this._changeTimeline,this,h?"+":"-")),d(t.playPosition,c?"stop":"play",dt(this._handlePlayClick,this,!c),!0);function d(p,y,m,_){if(p){var b=bn(Rt(i.get(["controlStyle",y+"BtnSize"]),o),o),x=[0,-b/2,b,b],w=Vnt(i,y+"Icon",x,{x:p[0],y:p[1],originX:o/2,originY:0,rotation:_?-l:0,rectHover:!0,style:s,onclick:m});w.ensureState("emphasis").style=u,a.add(w),Io(w)}}},e.prototype._renderCurrentPointer=function(t,a,n,i){var o=i.getData(),l=i.getCurrentIndex(),s=o.getItemModel(l).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=dt(u._handlePointerDrag,u),h.ondragend=dt(u._handlePointerDragend,u),kN(h,u._progressLine,l,n,i,!0)},onUpdate:function(h){kN(h,u._progressLine,l,n,i)}};this._currentPointer=zN(s,s,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var n=this._toAxisCoord(t)[0],i=this._axis,o=ma(i.getExtent().slice());n>o[1]&&(n=o[1]),n<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var l=this._progressLine;l&&(l.shape.x2=n,l.dirty());var s=this._findNearestTick(n),u=this.model;(a||s!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(s)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var a=t.model;t._changeTimeline(a.getCurrentIndex()+(a.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var a=this._mainGroup.getLocalTransform();return mn(t,a,!0)},e.prototype._findNearestTick=function(t){var a=this.model.getData(),n=1/0,i,o=this._axis;return a.each(["value"],function(l,s){var u=o.dataToCoord(l),c=Math.abs(u-t);c<n&&(n=c,i=s)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var a=this.model.getCurrentIndex();t==="+"?t=a+1:t==="-"&&(t=a-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),a=this._tickSymbols,n=this._tickLabels;if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",i<t);if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",PN(n[i]).dataIndex<=t)},e.type="timeline.slider",e})(Nnt);function knt(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new am({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new uT({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Pi}}function Bnt(r,e){return Xe(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function Vnt(r,e,t,a){var n=a.style,i=mf(r.get(["controlStyle",e]),a||{},new kt(t[0],t[1],t[2],t[3]));return n&&i.setStyle(n),i}function zN(r,e,t,a,n,i){var o=e.get("color");if(n)n.setColor(o),t.add(n),i&&i.onUpdate(n);else{var l=r.get("symbol");n=Ge(l,-1,-1,2,2,o),n.setStyle("strokeNoScale",!0),t.add(n),i&&i.onCreate(n)}var s=e.getItemStyle(["color"]);n.setStyle(s),a=It({rectHover:!0,z2:100},a,!0);var u=Cf(r.get("symbolSize"));a.scaleX=u[0]/2,a.scaleY=u[1]/2;var c=xs(r.get("symbolOffset"),u);c&&(a.x=(a.x||0)+c[0],a.y=(a.y||0)+c[1]);var h=r.get("symbolRotate");return a.rotation=(h||0)*Math.PI/180||0,n.attr(a),n.updateTransform(),n}function kN(r,e,t,a,n,i){if(!r.dragging){var o=n.getModel("checkpointStyle"),l=a.dataToCoord(n.getData().get("value",t));if(i||!o.get("animation",!0))r.attr({x:l,y:0}),e&&e.attr({shape:{x2:l}});else{var s={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:l,y:0},s),e&&e.animateTo({shape:{x2:l}},s)}}}function Gnt(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,a){var n=t.getComponent("timeline");return n&&e.currentIndex!=null&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),a.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),St({currentIndex:n.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var a=t.getComponent("timeline");a&&e.playState!=null&&a.setPlayState(e.playState)})}function Hnt(r){var e=r&&r.timeline;it(e)||(e=e?[e]:[]),N(e,function(t){t&&Fnt(t)})}function Fnt(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),BN(r),Xl(r,"controlPosition")){var a=r.controlStyle||(r.controlStyle={});Xl(a,"position")||(a.position=r.controlPosition),a.position==="none"&&!Xl(a,"show")&&(a.show=!1,delete a.position),delete r.controlPosition}N(r.data||[],function(n){xt(n)&&!it(n)&&(!Xl(n,"value")&&Xl(n,"name")&&(n.value=n.name),BN(n))})}function BN(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),a=r.label||r.label||{},n=a.normal||(a.normal={}),i={normal:1,emphasis:1};N(a,function(o,l){!i[l]&&!Xl(n,l)&&(n[l]=o)}),t.label&&!Xl(a,"emphasis")&&(a.emphasis=t.label,delete t.label)}function Xl(r,e){return r.hasOwnProperty(e)}function Unt(r){r.registerComponentModel(_V),r.registerComponentView(znt),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),Gnt(r),r.registerPreprocessor(Hnt)}function v2(r,e){if(!r)return!1;for(var t=it(r)?r:[r],a=0;a<t.length;a++)if(t[a]&&t[a][e])return!0;return!1}function Zp(r){us(r,"label",["show"])}var qp=$t(),ki=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Ft.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,a){this._mergeOption(t,a,!1,!1)},e.prototype._mergeOption=function(t,a,n,i){var o=this.mainType;n||a.eachSeries(function(l){var s=l.get(this.mainType,!0),u=qp(l)[o];if(!s||!s.data){qp(l)[o]=null;return}u?u._mergeOption(s,a,!0):(i&&Zp(s),N(s.data,function(c){c instanceof Array?(Zp(c[0]),Zp(c[1])):Zp(c)}),u=this.createMarkerModelFromSeries(s,this,a),rt(u,{mainType:this.mainType,seriesIndex:l.seriesIndex,name:l.name,createdBySelf:!0}),u.__hostSeries=l),qp(l)[o]=u},this)},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),l=i.getName(t);return ir("section",{header:this.name,blocks:[ir("nameValue",{name:l,value:o,noName:!l,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,a){var n=qy.prototype.getDataParams.call(this,t,a),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},e.getMarkerModelFromSeries=function(t,a){return qp(t)[a]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(Ht);ze(ki,qy.prototype);var Ynt=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e})(ki);function Hx(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function jnt(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function $p(r,e,t,a,n,i){var o=[],l=Ni(e,a),s=l?e.getCalculationInfo("stackResultDimension"):a,u=d2(e,s,r),c=e.indicesOfNearest(s,u)[0];o[n]=e.get(t,c),o[i]=e.get(s,c);var h=e.get(a,c),d=vn(e.get(a,c));return d=Math.min(d,20),d>=0&&(o[i]=+o[i].toFixed(d)),[o,h]}var GS={min:Et($p,"min"),max:Et($p,"max"),average:Et($p,"average"),median:Et($p,"median")};function sv(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!jnt(e)&&!it(e.coord)&&it(n)){var i=SV(e,t,a,r);if(e=Tt(e),e.type&&GS[e.type]&&i.baseAxis&&i.valueAxis){var o=Bt(n,i.baseAxis.dim),l=Bt(n,i.valueAxis.dim),s=GS[e.type](t,i.baseDataDim,i.valueDataDim,o,l);e.coord=s[0],e.value=s[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!it(n))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)GS[u[c]]&&(u[c]=d2(t,t.mapDimension(n[c]),u[c]));return e}}function SV(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(Xnt(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function Xnt(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function uv(r,e){return r&&r.containData&&e.coord&&!Hx(e)?r.containData(e.coord):!0}function Wnt(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Hx(e)&&!Hx(t)?r.containZone(e.coord,t.coord):!0}function bV(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Po(o,e[i])}:function(t,a,n,i){return Po(t.value,e[i])}}function d2(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var HS=$t(),p2=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=mt()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(l){HS(l).keep=!1}),a.eachSeries(function(l){var s=ki.getMarkerModelFromSeries(l,i.type);s&&i.renderSeries(l,s,a,n)}),o.each(function(l){!HS(l).keep&&i.group.remove(l.group)})},e.prototype.markKeep=function(t){HS(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;N(t,function(i){var o=ki.getMarkerModelFromSeries(i,n.type);if(o){var l=o.getData();l.eachItemGraphicEl(function(s){s&&(a?hz(s):xw(s))})}})},e.type="marker",e})(we);function VN(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,l=ht(i.get("x"),t.getWidth()),s=ht(i.get("y"),t.getHeight());if(!isNaN(l)&&!isNaN(s))o=[l,s];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),c=r.get(a.dimensions[1],n);o=a.dataToPoint([u,c])}isNaN(l)||(o[0]=l),isNaN(s)||(o[1]=s),r.setItemLayout(n,o)})}var Znt=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=ki.getMarkerModelFromSeries(i,"markPoint");o&&(VN(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,c=u.get(l)||u.set(l,new Av),h=qnt(o,t,a);a.setData(h),VN(a.getData(),t,i),h.each(function(d){var p=h.getItemModel(d),y=p.getShallow("symbol"),m=p.getShallow("symbolSize"),_=p.getShallow("symbolRotate"),b=p.getShallow("symbolOffset"),x=p.getShallow("symbolKeepAspect");if(_t(y)||_t(m)||_t(_)||_t(b)){var w=a.getRawValue(d),A=a.getDataParams(d);_t(y)&&(y=y(w,A)),_t(m)&&(m=m(w,A)),_t(_)&&(_=_(w,A)),_t(b)&&(b=b(w,A))}var M=p.getModel("itemStyle").getItemStyle(),D=xv(s,"color");M.fill||(M.fill=D),h.setItemVisual(d,{symbol:y,symbolSize:m,symbolRotate:_,symbolOffset:b,symbolKeepAspect:x,style:M})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(d){d.traverse(function(p){Mt(p).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e})(p2);function qnt(r,e,t){var a;r?a=ot(r&&r.dimensions,function(l){var s=e.getData().getDimensionInfo(e.getData().mapDimension(l))||{};return rt(rt({},s),{name:l,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Er(a,t),i=ot(t.get("data"),Et(sv,e));r&&(i=te(i,Et(uv,r)));var o=bV(!!r,a);return n.initData(i,null,o),n}function $nt(r){r.registerComponentModel(Ynt),r.registerComponentView(Znt),r.registerPreprocessor(function(e){v2(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Knt=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e})(ki),Kp=$t(),Qnt=function(r,e,t,a){var n=r.getData(),i;if(it(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var l=void 0,s=void 0;if(a.yAxis!=null||a.xAxis!=null)l=e.getAxis(a.yAxis!=null?"y":"x"),s=er(a.yAxis,a.xAxis);else{var u=SV(a,n,e,r);l=u.valueAxis;var c=lT(n,u.valueDataDim);s=d2(n,c,o)}var h=l.dim==="x"?0:1,d=1-h,p=Tt(a),y={coord:[]};p.type=null,p.coord=[],p.coord[d]=-1/0,y.coord[d]=1/0;var m=t.get("precision");m>=0&&Qt(s)&&(s=+s.toFixed(Math.min(m,20))),p.coord[h]=y.coord[h]=s,i=[p,y,{type:o,valueIndex:a.valueIndex,value:s}]}else i=[]}var _=[sv(r,i[0]),sv(r,i[1]),rt({},i[2])];return _[2].type=_[2].type||null,It(_[2],_[0]),It(_[2],_[1]),_};function dy(r){return!isNaN(r)&&!isFinite(r)}function GN(r,e,t,a){var n=1-r,i=a.dimensions[r];return dy(e[n])&&dy(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function Jnt(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(GN(1,t,a,r)||GN(0,t,a,r)))return!0}return uv(r,e[0])&&uv(r,e[1])}function FS(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),l,s=ht(o.get("x"),n.getWidth()),u=ht(o.get("y"),n.getHeight());if(!isNaN(s)&&!isNaN(u))l=[s,u];else{if(a.getMarkerPosition)l=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,h=r.get(c[0],e),d=r.get(c[1],e);l=i.dataToPoint([h,d])}if(ws(i,"cartesian2d")){var p=i.getAxis("x"),y=i.getAxis("y"),c=i.dimensions;dy(r.get(c[0],e))?l[0]=p.toGlobalCoord(p.getExtent()[t?0:1]):dy(r.get(c[1],e))&&(l[1]=y.toGlobalCoord(y.getExtent()[t?0:1]))}isNaN(s)||(l[0]=s),isNaN(u)||(l[1]=u)}r.setItemLayout(e,l)}var tit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=ki.getMarkerModelFromSeries(i,"markLine");if(o){var l=o.getData(),s=Kp(o).from,u=Kp(o).to;s.each(function(c){FS(s,c,!0,i,n),FS(u,c,!1,i,n)}),l.each(function(c){l.setItemLayout(c,[s.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,c=u.get(l)||u.set(l,new zT);this.group.add(c.group);var h=eit(o,t,a),d=h.from,p=h.to,y=h.line;Kp(a).from=d,Kp(a).to=p,a.setData(y);var m=a.get("symbol"),_=a.get("symbolSize"),b=a.get("symbolRotate"),x=a.get("symbolOffset");it(m)||(m=[m,m]),it(_)||(_=[_,_]),it(b)||(b=[b,b]),it(x)||(x=[x,x]),h.from.each(function(A){w(d,A,!0),w(p,A,!1)}),y.each(function(A){var M=y.getItemModel(A).getModel("lineStyle").getLineStyle();y.setItemLayout(A,[d.getItemLayout(A),p.getItemLayout(A)]),M.stroke==null&&(M.stroke=d.getItemVisual(A,"style").fill),y.setItemVisual(A,{fromSymbolKeepAspect:d.getItemVisual(A,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(A,"symbolOffset"),fromSymbolRotate:d.getItemVisual(A,"symbolRotate"),fromSymbolSize:d.getItemVisual(A,"symbolSize"),fromSymbol:d.getItemVisual(A,"symbol"),toSymbolKeepAspect:p.getItemVisual(A,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(A,"symbolOffset"),toSymbolRotate:p.getItemVisual(A,"symbolRotate"),toSymbolSize:p.getItemVisual(A,"symbolSize"),toSymbol:p.getItemVisual(A,"symbol"),style:M})}),c.updateData(y),h.line.eachItemGraphicEl(function(A){Mt(A).dataModel=a,A.traverse(function(M){Mt(M).dataModel=a})});function w(A,M,D){var L=A.getItemModel(M);FS(A,M,D,t,i);var R=L.getModel("itemStyle").getItemStyle();R.fill==null&&(R.fill=xv(s,"color")),A.setItemVisual(M,{symbolKeepAspect:L.get("symbolKeepAspect"),symbolOffset:Rt(L.get("symbolOffset",!0),x[D?0:1]),symbolRotate:Rt(L.get("symbolRotate",!0),b[D?0:1]),symbolSize:Rt(L.get("symbolSize"),_[D?0:1]),symbol:Rt(L.get("symbol",!0),m[D?0:1]),style:R})}this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e})(p2);function eit(r,e,t){var a;r?a=ot(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return rt(rt({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Er(a,t),i=new Er(a,t),o=new Er([],t),l=ot(t.get("data"),Et(Qnt,e,r,t));r&&(l=te(l,Et(Jnt,r)));var s=bV(!!r,a);return n.initData(ot(l,function(u){return u[0]}),null,s),i.initData(ot(l,function(u){return u[1]}),null,s),o.initData(ot(l,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function rit(r){r.registerComponentModel(Knt),r.registerComponentView(tit),r.registerPreprocessor(function(e){v2(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var ait=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(ki),Qp=$t(),nit=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=sv(r,n),l=sv(r,i),s=o.coord,u=l.coord;s[0]=er(s[0],-1/0),s[1]=er(s[1],-1/0),u[0]=er(u[0],1/0),u[1]=er(u[1],1/0);var c=Ty([{},o,l]);return c.coord=[o.coord,l.coord],c.x0=o.x,c.y0=o.y,c.x1=l.x,c.y1=l.y,c}};function py(r){return!isNaN(r)&&!isFinite(r)}function HN(r,e,t,a){var n=1-r;return py(e[n])&&py(t[n])}function iit(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return ws(r,"cartesian2d")?t&&a&&(HN(1,t,a)||HN(0,t,a))?!0:Wnt(r,n,i):uv(r,n)||uv(r,i)}function FN(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),l,s=ht(o.get(t[0]),n.getWidth()),u=ht(o.get(t[1]),n.getHeight());if(!isNaN(s)&&!isNaN(u))l=[s,u];else{if(a.getMarkerPosition){var c=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),d=i.clampData(c),p=i.clampData(h),y=[];t[0]==="x0"?y[0]=d[0]>p[0]?h[0]:c[0]:y[0]=d[0]>p[0]?c[0]:h[0],t[1]==="y0"?y[1]=d[1]>p[1]?h[1]:c[1]:y[1]=d[1]>p[1]?c[1]:h[1],l=a.getMarkerPosition(y,t,!0)}else{var m=r.get(t[0],e),_=r.get(t[1],e),b=[m,_];i.clampData&&i.clampData(b,b),l=i.dataToPoint(b,!0)}if(ws(i,"cartesian2d")){var x=i.getAxis("x"),w=i.getAxis("y"),m=r.get(t[0],e),_=r.get(t[1],e);py(m)?l[0]=x.toGlobalCoord(x.getExtent()[t[0]==="x0"?0:1]):py(_)&&(l[1]=w.toGlobalCoord(w.getExtent()[t[1]==="y0"?0:1]))}isNaN(s)||(l[0]=s),isNaN(u)||(l[1]=u)}return l}var UN=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],oit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=ki.getMarkerModelFromSeries(i,"markArea");if(o){var l=o.getData();l.each(function(s){var u=ot(UN,function(h){return FN(l,s,h,i,n)});l.setItemLayout(s,u);var c=l.getItemGraphicEl(s);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,c=u.get(l)||u.set(l,{group:new Ct});this.group.add(c.group),this.markKeep(c);var h=lit(o,t,a);a.setData(h),h.each(function(d){var p=ot(UN,function(R){return FN(h,d,R,t,i)}),y=o.getAxis("x").scale,m=o.getAxis("y").scale,_=y.getExtent(),b=m.getExtent(),x=[y.parse(h.get("x0",d)),y.parse(h.get("x1",d))],w=[m.parse(h.get("y0",d)),m.parse(h.get("y1",d))];ma(x),ma(w);var A=!(_[0]>x[1]||_[1]<x[0]||b[0]>w[1]||b[1]<w[0]),M=!A;h.setItemLayout(d,{points:p,allClipped:M});var D=h.getItemModel(d).getModel("itemStyle").getItemStyle(),L=xv(s,"color");D.fill||(D.fill=L,vt(D.fill)&&(D.fill=Bh(D.fill,.4))),D.stroke||(D.stroke=L),h.setItemVisual(d,"style",D)}),h.diff(Qp(c).data).add(function(d){var p=h.getItemLayout(d);if(!p.allClipped){var y=new Nr({shape:{points:p.points}});h.setItemGraphicEl(d,y),c.group.add(y)}}).update(function(d,p){var y=Qp(c).data.getItemGraphicEl(p),m=h.getItemLayout(d);m.allClipped?y&&c.group.remove(y):(y?Jt(y,{shape:{points:m.points}},a,d):y=new Nr({shape:{points:m.points}}),h.setItemGraphicEl(d,y),c.group.add(y))}).remove(function(d){var p=Qp(c).data.getItemGraphicEl(d);c.group.remove(p)}).execute(),h.eachItemGraphicEl(function(d,p){var y=h.getItemModel(p),m=h.getItemVisual(p,"style");d.useStyle(h.getItemVisual(p,"style")),xr(d,nr(y),{labelFetcher:a,labelDataIndex:p,defaultText:h.getName(p)||"",inheritColor:vt(m.fill)?Bh(m.fill,1):"#000"}),br(d,y),Ee(d,null,null,y.get(["emphasis","disabled"])),Mt(d).dataModel=a}),Qp(c).data=h,c.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e})(p2);function lit(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=ot(r&&r.dimensions,function(u){var c=e.getData(),h=c.getDimensionInfo(c.mapDimension(u))||{};return rt(rt({},h),{name:u,ordinalMeta:null})});n=ot(i,function(u,c){return{name:u,type:o[c%2].type}}),a=new Er(n,t)}else n=[{name:"value",type:"float"}],a=new Er(n,t);var l=ot(t.get("data"),Et(nit,e,r,t));r&&(l=te(l,Et(iit,r)));var s=r?function(u,c,h,d){var p=u.coord[Math.floor(d/2)][d%2];return Po(p,n[d])}:function(u,c,h,d){return Po(u.value,n[d])};return a.initData(l,null,s),a.hasItemOption=!0,a}function sit(r){r.registerComponentModel(ait),r.registerComponentView(oit),r.registerPreprocessor(function(e){v2(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var uit=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Fx=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,n=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),it(a)&&N(a,function(i,o){vt(i)&&(i={type:i}),a[o]=It(i,uit(n,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),a=!0;break}}!a&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var a=[],n=[];t.eachRawSeries(function(s){var u=s.name;n.push(u);var c;if(s.legendVisualProvider){var h=s.legendVisualProvider,d=h.getAllNames();t.isSeriesFiltered(s)||(n=n.concat(d)),d.length?a=a.concat(d):c=!0}else c=!0;c&&dw(s)&&a.push(s.name)}),this._availableNames=n;var i=this.get("data")||a,o=mt(),l=ot(i,function(s){return(vt(s)||Qt(s))&&(s={name:s}),o.get(s.name)?null:(o.set(s.name,!0),new ee(s,this,this.ecModel))},this);this._data=te(l,function(s){return!!s})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var a=this.option.selected,n=this.get("selectedMode");if(n==="single"){var i=this._data;N(i,function(o){a[o.get("name")]=!1})}a[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var a=this.option.selected;a.hasOwnProperty(t)||(a[t]=!0),this[a[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,a=this.option.selected;N(t,function(n){a[n.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,a=this.option.selected;N(t,function(n){var i=n.get("name",!0);a.hasOwnProperty(i)||(a[i]=!0),a[i]=!a[i]})},e.prototype.isSelected=function(t){var a=this.option.selected;return!(a.hasOwnProperty(t)&&!a[t])&&Bt(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e})(Ht),Mu=Et,Ux=N,Jp=Ct,xV=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Jp),this.group.add(this._selectorGroup=new Jp),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),l=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&l==="vertical"?"right":"left");var s=t.get("selector",!0),u=t.get("selectorPosition",!0);s&&(!u||u==="auto")&&(u=l==="horizontal"?"end":"start"),this.renderInner(o,t,a,n,s,l,u);var c=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},d=t.get("padding"),p=Xe(c,h,d),y=this.layoutInner(t,o,p,i,s,u),m=Xe(St({width:y.width,height:y.height},c),h,d);this.group.x=m.x-y.x,this.group.y=m.y-y.y,this.group.markRedraw(),this.group.add(this._backgroundEl=fV(y,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,n,i,o,l,s){var u=this.getContentGroup(),c=mt(),h=a.get("selectedMode"),d=[];n.eachRawSeries(function(p){!p.get("legendHoverLink")&&d.push(p.id)}),Ux(a.getData(),function(p,y){var m=p.get("name");if(!this.newlineDisabled&&(m===""||m===`
108
108
  `)){var _=new Jp;_.newline=!0,u.add(_);return}var b=n.getSeriesByName(m)[0];if(!c.get(m))if(b){var x=b.getData(),w=x.getVisual("legendLineStyle")||{},A=x.getVisual("legendIcon"),M=x.getVisual("style"),D=this._createItem(b,m,y,p,a,t,w,M,A,h,i);D.on("click",Mu(YN,m,null,i,d)).on("mouseover",Mu(Yx,b.name,null,i,d)).on("mouseout",Mu(jx,b.name,null,i,d)),n.ssr&&D.eachChild(function(L){var R=Mt(L);R.seriesIndex=b.seriesIndex,R.dataIndex=y,R.ssrType="legend"}),c.set(m,!0)}else n.eachRawSeries(function(L){if(!c.get(m)&&L.legendVisualProvider){var R=L.legendVisualProvider;if(!R.containName(m))return;var E=R.indexOfName(m),O=R.getItemVisual(E,"style"),P=R.getItemVisual(E,"legendIcon"),k=Fr(O.fill);k&&k[3]===0&&(k[3]=.2,O=rt(rt({},O),{fill:yn(k,"rgba")}));var V=this._createItem(L,m,y,p,a,t,{},O,P,h,i);V.on("click",Mu(YN,null,m,i,d)).on("mouseover",Mu(Yx,null,m,i,d)).on("mouseout",Mu(jx,null,m,i,d)),n.ssr&&V.eachChild(function(H){var U=Mt(H);U.seriesIndex=L.seriesIndex,U.dataIndex=y,U.ssrType="legend"}),c.set(m,!0)}},this)},this),o&&this._createSelector(o,a,i,l,s)},e.prototype._createSelector=function(t,a,n,i,o){var l=this.getSelectorGroup();Ux(t,function(u){var c=u.type,h=new Xt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});l.add(h);var d=a.getModel("selectorLabel"),p=a.getModel(["emphasis","selectorLabel"]);xr(h,{normal:d,emphasis:p},{defaultText:u.title}),Io(h)})},e.prototype._createItem=function(t,a,n,i,o,l,s,u,c,h,d){var p=t.visualDrawType,y=o.get("itemWidth"),m=o.get("itemHeight"),_=o.isSelected(a),b=i.get("symbolRotate"),x=i.get("symbolKeepAspect"),w=i.get("icon");c=w||c||"roundRect";var A=fit(c,i,s,u,p,_,d),M=new Jp,D=i.getModel("textStyle");if(_t(t.getLegendIcon)&&(!w||w==="inherit"))M.add(t.getLegendIcon({itemWidth:y,itemHeight:m,icon:c,iconRotate:b,itemStyle:A.itemStyle,lineStyle:A.lineStyle,symbolKeepAspect:x}));else{var L=w==="inherit"&&t.getData().getVisual("symbol")?b==="inherit"?t.getData().getVisual("symbolRotate"):b:0;M.add(cit({itemWidth:y,itemHeight:m,icon:c,iconRotate:L,itemStyle:A.itemStyle,symbolKeepAspect:x}))}var R=l==="left"?y+5:-5,E=l,O=o.get("formatter"),P=a;vt(O)&&O?P=O.replace("{name}",a??""):_t(O)&&(P=O(a));var k=_?D.getTextColor():i.get("inactiveColor");M.add(new Xt({style:_e(D,{text:P,x:R,y:m/2,fill:k,align:E,verticalAlign:"middle"},{inheritColor:k})}));var V=new Wt({shape:M.getBoundingRect(),style:{fill:"transparent"}}),H=i.getModel("tooltip");return H.get("show")&&_s({el:V,componentModel:o,itemName:a,itemTooltipOption:H.option}),M.add(V),M.eachChild(function(U){U.silent=!0}),V.silent=!h,this.getContentGroup().add(M),Io(M),M.__legendDataIndex=n,M},e.prototype.layoutInner=function(t,a,n,i,o,l){var s=this.getContentGroup(),u=this.getSelectorGroup();ns(t.get("orient"),s,t.get("itemGap"),n.width,n.height);var c=s.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),s.markRedraw(),o){ns("horizontal",u,t.get("selectorItemGap",!0));var d=u.getBoundingRect(),p=[-d.x,-d.y],y=t.get("selectorButtonGap",!0),m=t.getOrient().index,_=m===0?"width":"height",b=m===0?"height":"width",x=m===0?"y":"x";l==="end"?p[m]+=c[_]+y:h[m]+=d[_]+y,p[1-m]+=c[b]/2-d[b]/2,u.x=p[0],u.y=p[1],s.x=h[0],s.y=h[1];var w={x:0,y:0};return w[_]=c[_]+y+d[_],w[b]=Math.max(c[b],d[b]),w[x]=Math.min(0,d[x]+p[1-m]),w}else return s.x=h[0],s.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(we);function fit(r,e,t,a,n,i,o){function l(_,b){_.lineWidth==="auto"&&(_.lineWidth=b.lineWidth>0?2:0),Ux(_,function(x,w){_[w]==="inherit"&&(_[w]=b[w])})}var s=e.getModel("itemStyle"),u=s.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=s.getShallow("decal");u.decal=!h||h==="inherit"?a.decal:nf(h,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:t).opacity),l(u,a);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(l(p,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),p.stroke==="auto"&&(p.stroke=a.fill),!i){var y=e.get("inactiveBorderWidth"),m=u[c];u.lineWidth=y==="auto"?a.lineWidth>0&&m?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}function cit(r){var e=r.icon||"roundRect",t=Ge(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function YN(r,e,t,a){jx(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Yx(r,e,t,a)}function wV(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,n=e.length;a<n&&!(t=e[a].states.emphasis);)a++;return t&&t.hoverLayer}function Yx(r,e,t,a){wV(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:a})}function jx(r,e,t,a){wV(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:a})}function hit(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var a=0;a<e.length;a++)if(!e[a].isSelected(t.name))return!1;return!0})}function Qc(r,e,t){var a=r==="allSelect"||r==="inverseSelect",n={},i=[];t.eachComponent({mainType:"legend",query:e},function(l){a?l[r]():l[r](e.name),jN(l,n),i.push(l.componentIndex)});var o={};return t.eachComponent("legend",function(l){N(n,function(s,u){l[s?"select":"unSelect"](u)}),jN(l,o)}),a?{selected:o,legendIndex:i}:{name:e.name,selected:o}}function jN(r,e){var t=e||{};return N(r.getData(),function(a){var n=a.get("name");if(!(n===`
109
- `||n==="")){var i=r.isSelected(n);gt(t,n)?t[n]=t[n]&&i:t[n]=i}}),t}function vit(r){r.registerAction("legendToggleSelect","legendselectchanged",Et(Qc,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Et(Qc,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Et(Qc,"inverseSelect")),r.registerAction("legendSelect","legendselected",Et(Qc,"select")),r.registerAction("legendUnSelect","legendunselected",Et(Qc,"unSelect"))}function TV(r){r.registerComponentModel(Fx),r.registerComponentView(xV),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,hit),r.registerSubTypeDefaulter("legend",function(){return"plain"}),vit(r)}var dit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,a,n){var i=bf(t);r.prototype.init.call(this,t,a,n),XN(this,t,i)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),XN(this,this.option,t)},e.type="legend.scroll",e.defaultOption=Xo(Fx.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e})(Fx);function XN(r,e,t){var a=r.getOrient(),n=[1,1];n[a.index]=0,Go(e,t,{type:"box",ignoreSize:!!n})}var WN=Ct,US=["width","height"],YS=["x","y"],pit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new WN),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new WN)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,a,n,i,o,l,s){var u=this;r.prototype.renderInner.call(this,t,a,n,i,o,l,s);var c=this._controllerGroup,h=a.get("pageIconSize",!0),d=it(h)?h:[h,h];y("pagePrev",0);var p=a.getModel("pageTextStyle");c.add(new Xt({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),y("pageNext",1);function y(m,_){var b=m+"DataIndex",x=mf(a.get("pageIcons",!0)[a.getOrient().name][_],{onclick:dt(u._pageGo,u,b,a,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});x.name=m,c.add(x)}},e.prototype.layoutInner=function(t,a,n,i,o,l){var s=this.getSelectorGroup(),u=t.getOrient().index,c=US[u],h=YS[u],d=US[1-u],p=YS[1-u];o&&ns("horizontal",s,t.get("selectorItemGap",!0));var y=t.get("selectorButtonGap",!0),m=s.getBoundingRect(),_=[-m.x,-m.y],b=Tt(n);o&&(b[c]=n[c]-m[c]-y);var x=this._layoutContentAndController(t,i,b,u,c,d,p,h);if(o){if(l==="end")_[u]+=x[c]+y;else{var w=m[c]+y;_[u]-=w,x[h]-=w}x[c]+=m[c]+y,_[1-u]+=x[p]+x[d]/2-m[d]/2,x[d]=Math.max(x[d],m[d]),x[p]=Math.min(x[p],m[p]+_[1-u]),s.x=_[0],s.y=_[1],s.markRedraw()}return x},e.prototype._layoutContentAndController=function(t,a,n,i,o,l,s,u){var c=this.getContentGroup(),h=this._containerGroup,d=this._controllerGroup;ns(t.get("orient"),c,t.get("itemGap"),i?n.width:null,i?null:n.height),ns("horizontal",d,t.get("pageButtonItemGap",!0));var p=c.getBoundingRect(),y=d.getBoundingRect(),m=this._showController=p[o]>n[o],_=[-p.x,-p.y];a||(_[i]=c[u]);var b=[0,0],x=[-y.x,-y.y],w=Rt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(m){var A=t.get("pageButtonPosition",!0);A==="end"?x[i]+=n[o]-y[o]:b[i]+=y[o]+w}x[1-i]+=p[l]/2-y[l]/2,c.setPosition(_),h.setPosition(b),d.setPosition(x);var M={x:0,y:0};if(M[o]=m?n[o]:p[o],M[l]=Math.max(p[l],y[l]),M[s]=Math.min(0,y[s]+x[1-i]),h.__rectSize=n[o],m){var D={x:0,y:0};D[o]=Math.max(n[o]-y[o]-w,0),D[l]=M[l],h.setClipPath(new Wt({shape:D})),h.__rectSize=D[o]}else d.eachChild(function(R){R.attr({invisible:!0,silent:!0})});var L=this._getPageInfo(t);return L.pageIndex!=null&&Jt(c,{x:L.contentPosition[0],y:L.contentPosition[1]},m?t:null),this._updatePageInfoView(t,L),M},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var n=this._controllerGroup;N(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",d=a[h]!=null,p=n.childOfName(c);p&&(p.setStyle("fill",d?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),p.cursor=d?"pointer":"default")});var i=n.childOfName("pageText"),o=t.get("pageFormatter"),l=a.pageIndex,s=l!=null?l+1:0,u=a.pageCount;i&&o&&i.setStyle("text",vt(o)?o.replace("{current}",s==null?"":s+"").replace("{total}",u==null?"":u+""):o({current:s,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,l=US[o],s=YS[o],u=this._findTargetItemIndex(a),c=n.children(),h=c[u],d=c.length,p=d?1:0,y={contentPosition:[n.x,n.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return y;var m=A(h);y.contentPosition[o]=-m.s;for(var _=u+1,b=m,x=m,w=null;_<=d;++_)w=A(c[_]),(!w&&x.e>b.s+i||w&&!M(w,b.s))&&(x.i>b.i?b=x:b=w,b&&(y.pageNextDataIndex==null&&(y.pageNextDataIndex=b.i),++y.pageCount)),x=w;for(var _=u-1,b=m,x=m,w=null;_>=-1;--_)w=A(c[_]),(!w||!M(x,w.s))&&b.i<x.i&&(x=b,y.pagePrevDataIndex==null&&(y.pagePrevDataIndex=b.i),++y.pageCount,++y.pageIndex),b=w;return y;function A(D){if(D){var L=D.getBoundingRect(),R=L[s]+D[s];return{s:R,e:R+L[l],i:D.__legendDataIndex}}}function M(D,L){return D.e>=L&&D.s<=L+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,l){var s=o.__legendDataIndex;i==null&&s!=null&&(i=l),s===t&&(a=l)}),a??i},e.type="legend.scroll",e})(xV);function git(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function yit(r){Gt(TV),r.registerComponentModel(dit),r.registerComponentView(pit),git(r)}function mit(r){Gt(TV),Gt(yit)}var _it=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Xo(lv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(lv),g2=$t();function Sit(r,e,t){g2(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function bit(r,e){for(var t=g2(r).coordSysRecordMap,a=t.keys(),n=0;n<a.length;n++){var i=a[n],o=t.get(i),l=o.dataZoomInfoMap;if(l){var s=e.uid,u=l.get(s);u&&(l.removeKey(s),l.keys().length||AV(t,o))}}}function AV(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function xit(r,e){var t={model:e,containsPoint:Et(Tit,e),dispatchAction:Et(wit,r),dataZoomInfoMap:null,controller:null},a=t.controller=new Rv(r.getZr());return N(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];t.dataZoomInfoMap.each(function(l){if(i.isAvailableBehavior(l.model.option)){var s=(l.getRange||{})[n],u=s&&s(l.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!l.model.get("disabled",!0)&&u&&o.push({dataZoomId:l.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function wit(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Tit(r,e,t,a){return r.coordinateSystem.containPoint([t,a])}function Ait(r){var e,t="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return r.each(function(i){var o=i.model,l=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;a[t+l]>a[t+e]&&(e=l),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Cit(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=g2(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=mt());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=lV(i);N(o.infoList,function(l){var s=l.model.uid,u=n.get(s)||n.set(s,xit(t,l.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=mt());c.set(i.uid,{dzReferCoordSysInfo:l,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,l,s=i.dataZoomInfoMap;if(s){var u=s.keys()[0];u!=null&&(l=s.get(u))}if(!l){AV(n,i);return}var c=Ait(s);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),Af(i,"dispatchAction",l.model.get("throttle",!0),"fixRate")})})}var Dit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Sit(n,t,{pan:dt(jS.pan,this),zoom:dt(jS.zoom,this),scrollMove:dt(jS.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){bit(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(l2),jS={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var l=XS[e](null,[a.originX,a.originY],o,t,r),s=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-s)*u+s,i[1]=(i[1]-s)*u+s;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(As(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:ZN(function(r,e,t,a,n,i){var o=XS[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:ZN(function(r,e,t,a,n,i){var o=XS[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function ZN(r){return function(e,t,a,n){var i=this.range,o=i.slice(),l=e.axisModels[0];if(l){var s=r(o,l,e,t,a,n);if(As(s,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var XS={grid:function(r,e,t,a,n){var i=t.axis,o={},l=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=l.width,o.pixelStart=l.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=l.height,o.pixelStart=l.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},l=n.model.coordinateSystem,s=l.getRadiusAxis().getExtent(),u=l.getAngleAxis().getExtent();return r=r?l.pointToCoord(r):[0,0],e=l.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=s[1]-s[0],o.pixelStart=s[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),l={};return r=r||[0,0],i.orient==="horizontal"?(l.pixel=e[0]-r[0],l.pixelLength=o.width,l.pixelStart=o.x,l.signal=i.inverse?1:-1):(l.pixel=e[1]-r[1],l.pixelLength=o.height,l.pixelStart=o.y,l.signal=i.inverse?-1:1),l}};function CV(r){s2(r),r.registerComponentModel(_it),r.registerComponentView(Dit),Cit(r)}var Mit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Xo(lv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e})(lv),Jc=Wt,qN=7,Lit=1,WS=30,Rit=7,th="horizontal",$N="vertical",Eit=5,Iit=["line","bar","candlestick","scatter"],Oit={easing:"cubicOut",duration:100,delay:0},Nit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=dt(this._onBrush,this),this._onBrushEnd=dt(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),Af(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Zh(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new Ct;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?Rit:0,o=this._findCoordRect(),l={width:a.getWidth(),height:a.getHeight()},s=this._orient===th?{right:l.width-o.x-o.width,top:l.height-WS-qN-i,width:o.width,height:WS}:{right:qN,top:o.y,width:WS,height:o.height},u=bf(t.option);N(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=s[h])});var c=Xe(u,l);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===$N&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),l=this._displayables.sliderGroup,s=(this._dataShadowInfo||{}).otherAxisInverse;l.attr(n===th&&!o?{scaleY:s?1:-1,scaleX:1}:n===th&&o?{scaleY:s?1:-1,scaleX:-1}:n===$N&&!o?{scaleY:s?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:s?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([l]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Jc({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Jc({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:dt(this._onClickPanel,this)}),l=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",l.on("mousemove",this._onBrush),l.on("mouseup",this._onBrushEnd)):(l.off("mousemove",this._onBrush),l.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),l=i.getShadowDim&&i.getShadowDim(),s=l&&o.getDimensionInfo(l)?i.getShadowDim():t.otherDim;if(s==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var h=o.getDataExtent(s),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var p=[0,a[1]],y=[0,a[0]],m=[[a[0],0],[0,0]],_=[],b=y[1]/(o.count()-1),x=0,w=Math.round(o.count()/a[0]),A;o.each([s],function(E,O){if(w>0&&O%w){x+=b;return}var P=E==null||isNaN(E)||E==="",k=P?0:oe(E,h,p,!0);P&&!A&&O?(m.push([m[m.length-1][0],0]),_.push([_[_.length-1][0],0])):!P&&A&&(m.push([x,0]),_.push([x,0])),m.push([x,k]),_.push([x,k]),x+=b,A=P}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=_}this._shadowData=o,this._shadowDim=s,this._shadowSize=[a[0],a[1]];var M=this.dataZoomModel;function D(E){var O=M.getModel(E?"selectedDataBackground":"dataBackground"),P=new Ct,k=new Nr({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new zr({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(V),P}for(var L=0;L<3;L++){var R=D(L===1);this._displayables.sliderGroup.add(R),this._displayables.dataShadowSegs.push(R)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,l){var s=t.getAxisProxy(o,l).getTargetSeriesModels();N(s,function(u){if(!n&&!(a!==!0&&Bt(Iit,u.get("type"))<0)){var c=i.getComponent(Lo(o),l).axis,h=Pit(o),d,p=u.coordinateSystem;h!=null&&p.getOtherAxis&&(d=p.getOtherAxis(c).inverse),h=u.getData().mapDimension(h),n={thisAxis:c,series:u,thisDim:o,otherDim:h,otherAxisInverse:d}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,l=this._size,s=this.dataZoomModel,u=this.api,c=s.get("borderRadius")||0,h=s.get("brushSelect"),d=a.filler=new Jc({silent:h,style:{fill:s.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new Jc({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:l[0],height:l[1],r:c},style:{stroke:s.get("dataBackgroundColor")||s.get("borderColor"),lineWidth:Lit,fill:"rgba(0,0,0,0)"}})),N([0,1],function(w){var A=s.get("handleIcon");!Yg[A]&&A.indexOf("path://")<0&&A.indexOf("image://")<0&&(A="path://"+A);var M=Ge(A,-1,0,2,2,null,!0);M.attr({cursor:KN(this._orient),draggable:!0,drift:dt(this._onDragMove,this,w),ondragend:dt(this._onDragEnd,this),onmouseover:dt(this._showDataInfo,this,!0),onmouseout:dt(this._showDataInfo,this,!1),z2:5});var D=M.getBoundingRect(),L=s.get("handleSize");this._handleHeight=ht(L,this._size[1]),this._handleWidth=D.width/D.height*this._handleHeight,M.setStyle(s.getModel("handleStyle").getItemStyle()),M.style.strokeNoScale=!0,M.rectHover=!0,M.ensureState("emphasis").style=s.getModel(["emphasis","handleStyle"]).getItemStyle(),Io(M);var R=s.get("handleColor");R!=null&&(M.style.fill=R),o.add(n[w]=M);var E=s.getModel("textStyle"),O=s.get("handleLabel")||{},P=O.show||!1;t.add(i[w]=new Xt({silent:!0,invisible:!P,style:_e(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var p=d;if(h){var y=ht(s.get("moveHandleSize"),l[1]),m=a.moveHandle=new Wt({style:s.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:l[1]-.5,height:y}}),_=y*.8,b=a.moveHandleIcon=Ge(s.get("moveHandleIcon"),-_/2,-_/2,_,_,"#fff",!0);b.silent=!0,b.y=l[1]+y/2-.5,m.ensureState("emphasis").style=s.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var x=Math.min(l[1]/2,Math.max(y,10));p=a.moveZone=new Wt({invisible:!0,shape:{y:l[1]-x,height:y+x}}),p.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(b),o.add(p)}p.attr({draggable:!0,cursor:KN(this._orient),drift:dt(this._onDragMove,this,"all"),ondragstart:dt(this._showDataInfo,this,!0),ondragend:dt(this._onDragEnd,this),onmouseover:dt(this._showDataInfo,this,!0),onmouseout:dt(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[oe(t[0],[0,100],a,!0),oe(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),l=n.findRepresentativeAxisProxy().getMinMaxSpan(),s=[0,100];As(a,i,o,n.get("zoomLock")?"all":t,l.minSpan!=null?oe(l.minSpan,s,o,!0):null,l.maxSpan!=null?oe(l.maxSpan,s,o,!0):null);var u=this._range,c=this._range=ma([oe(i[0],o,s,!0),oe(i[1],o,s,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=ma(n.slice()),o=this._size;N([0,1],function(p){var y=a.handles[p],m=this._handleHeight;y.attr({scaleX:m/2,scaleY:m/2,x:n[p]+(p?-1:1),y:o[1]/2-m/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var l={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(l),a.moveZone.setShape(l),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",l.x+l.width/2));for(var s=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<s.length;c++){var h=s[c],d=h.getClipPath();d||(d=new Wt,h.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,l=["",""];if(a.get("showDetail")){var s=a.findRepresentativeAxisProxy();if(s){var u=s.getAxisModel().axis,c=this._range,h=t?s.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:s.getDataValueWindow();l=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var d=ma(this._handleEnds.slice());p.call(this,0),p.call(this,1);function p(y){var m=Oo(n.handles[y].parent,this.group),_=Hy(y===0?"right":"left",m),b=this._handleWidth/2+Eit,x=mn([d[y]+(y===0?-b:b),this._size[1]/2],m);i[y].setStyle({x:x[0],y:x[1],verticalAlign:o===th?"middle":_,align:o===th?_:"center",text:l[y]})}},e.prototype._formatLabel=function(t,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var l=t==null||isNaN(t)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return _t(i)?i(t,l):vt(i)?i.replace("{value}",l):l},e.prototype._showDataInfo=function(t){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,l=t||this._dragging?o:n,s=this._displayables,u=s.handleLabels;u[0].attr("invisible",!l),u[1].attr("invisible",!l),s.moveHandle&&this.api[l?"enterEmphasis":"leaveEmphasis"](s.moveHandle,1)},e.prototype._onDragMove=function(t,a,n,i){this._dragging=!0,Ri(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),l=mn([a,n],o,!0),s=this._updateInterval(t,l[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),s&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,l=this._updateInterval("all",n[0]-o);this._updateView(),l&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new zt(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),l=[0,100];this._range=ma([oe(n.x,o,l,!0),oe(n.x+n.width,o,l,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Ri(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Jc({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var l=this._brushStart,s=this._displayables.sliderGroup,u=s.transformCoordToLocal(t,a),c=s.transformCoordToLocal(l.x,l.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Oit:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=lV(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(l2);function Pit(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function KN(r){return r==="vertical"?"ns-resize":"ew-resize"}function DV(r){r.registerComponentModel(Mit),r.registerComponentView(Nit),s2(r)}function zit(r){Gt(CV),Gt(DV)}var MV={get:function(r,e,t){var a=Tt((kit[r]||{})[e]);return t&&it(a)?a[a.length-1]:a}},kit={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]}},QN=ar.mapVisual,Bit=ar.eachVisual,Vit=it,JN=N,Git=ma,Hit=oe,gy=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&yV(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=dt(t,this),this.controllerVisuals=Vx(this.option.controller,a,t),this.targetVisuals=Vx(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=de(t),a},e.prototype.eachTargetSeries=function(t,a){N(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,l=this.dataBound,s=i.formatter,u;n=n||["<",">"],it(t)&&(t=t.slice(),u=!0);var c=a?t:u?[h(t[0]),h(t[1])]:h(t);if(vt(s))return s.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(_t(s))return u?s(t[0],t[1]):s(t);if(u)return t[0]===l[0]?n[0]+" "+c[1]:t[1]===l[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(d){return d===l[0]?"min":d===l[1]?"max":(+d).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=Git([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],l=t.getDimensionInfo(o);if(!l.isCalculationCoord)return l.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});It(i,n),It(o,n);var l=this.isCategory();s.call(this,i),s.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function s(h){Vit(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,d,p){var y=h[d],m=h[p];y&&!m&&(m=h[p]={},JN(y,function(_,b){if(ar.isValidType(b)){var x=MV.get(b,"inactive",l);x!=null&&(m[b]=x,b==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function c(h){var d=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,p=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,y=this.get("inactiveColor"),m=this.getItemSymbol(),_=m||"roundRect";JN(this.stateList,function(b){var x=this.itemSize,w=h[b];w||(w=h[b]={color:l?y:[y]}),w.symbol==null&&(w.symbol=d&&Tt(d)||(l?_:[_])),w.symbolSize==null&&(w.symbolSize=p&&Tt(p)||(l?x[0]:[x[0],x[0]])),w.symbol=QN(w.symbol,function(D){return D==="none"?_:D});var A=w.symbolSize;if(A!=null){var M=-1/0;Bit(A,function(D){D>M&&(M=D)}),w.symbolSize=QN(A,function(D){return Hit(D,[0,M],[0,x[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e})(Ht),t3=[20,140],Fit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=t3[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=t3[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):it(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),N(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=ma((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]<t[0]&&(a[0]=t[0]),a[1]<t[0]&&(a[1]=t[0]),a},e.prototype.getValueState=function(t){var a=this.option.range,n=this.getExtent();return(a[0]<=n[0]||a[0]<=t)&&(a[1]>=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(l,s){t[0]<=l&&l<=t[1]&&i.push(s)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=e3(this,"outOfRange",this.getExtent()),n=e3(this,"inRange",this.option.range.slice()),i=[];function o(p,y){i.push({value:p,color:t(p,y)})}for(var l=0,s=0,u=n.length,c=a.length;s<c&&(!n.length||a[s]<=n[0]);s++)a[s]<n[l]&&o(a[s],"outOfRange");for(var h=1;l<u;l++,h=0)h&&i.length&&o(n[l],"outOfRange"),o(n[l],"inRange");for(var h=1;s<c;s++)(!n.length||n[n.length-1]<a[s])&&(h&&(i.length&&o(i[i.length-1].value,"outOfRange"),h=0),o(a[s],"outOfRange"));var d=i.length;return{stops:i,outerColors:[d?i[0].color:"transparent",d?i[d-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Xo(gy.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e})(gy);function e3(r,e,t){if(t[0]===t[1])return t.slice();for(var a=200,n=(t[1]-t[0])/a,i=t[0],o=[],l=0;l<=a&&i<t[1];l++)o.push(i),i+=n;return o.push(t[1]),o}var LV=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a},e.prototype.render=function(t,a,n,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,a,n,i)},e.prototype.renderBackground=function(t){var a=this.visualMapModel,n=bs(a.get("padding")||0),i=t.getBoundingRect();t.add(new Wt({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,l={};if(a==="color"){var s=o.get("contentColor");l.color=s}function u(p){return l[p]}function c(p,y){l[p]=y}var h=o.controllerVisuals[i||o.getValueState(t)],d=ar.prepareVisualTypes(h);return N(d,function(p){var y=h[p];n.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",y=h.__alphaForOpacity),ar.dependsOn(p,a)&&y&&y.applyVisual(t,u,c)}),l[a]},e.prototype.positionGroup=function(t){var a=this.visualMapModel,n=this.api;Wy(t,a.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,a,n,i){},e.type="visualMap",e})(we),r3=[["left","right","width"],["top","bottom","height"]];function RV(r,e,t){var a=r.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:e.getWidth(),height:e.getHeight()},o=a.orient==="horizontal"?1:0,l=r3[o],s=[0,null,10],u={},c=0;c<3;c++)u[r3[1-o][c]]=s[c],u[l[c]]=c===2?t[0]:a[l[c]];var h=[["x","width",3],["y","height",0]][o],d=Xe(u,i,a.padding);return l[(d.margin[h[2]]||0)+d[h[0]]+d[h[1]]*.5<i[h[1]]*.5?0:1]}function Sg(r,e){return N(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var Nn=oe,Uit=N,a3=Math.min,ZS=Math.max,Yit=12,jit=6,Xit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,a){r.prototype.init.call(this,t,a),this._hoverLinkFromSeriesMouseOver=dt(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=dt(this._hideIndicator,this)},e.prototype.doRender=function(t,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,a=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(a);var n=t.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},e.prototype._renderEndsText=function(t,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,l=o.get("textGap"),s=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([s[0]/2,n===0?-l:s[1]+l],u),h=this._applyTransform(n===0?"bottom":"top",u),d=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new Xt({style:_e(p,{x:c[0],y:c[1],verticalAlign:d==="horizontal"?"middle":h,align:d==="horizontal"?h:"center",text:i})}))}},e.prototype._renderBar=function(t){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,l=this._useHandle,s=RV(a,this.api,i),u=n.mainGroup=this._createBarGroup(s),c=new Ct;u.add(c),c.add(n.outOfRange=n3()),c.add(n.inRange=n3(null,l?o3(this._orient):null,dt(this._dragHandle,this,"all",!1),dt(this._dragHandle,this,"all",!0))),c.setClipPath(new Wt({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var h=a.textStyleModel.getTextRect("国"),d=ZS(h.width,h.height);l&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,d,o),this._createHandle(a,u,1,i,d,o)),this._createIndicator(a,u,i,d,o),t.add(u)},e.prototype._createHandle=function(t,a,n,i,o,l){var s=dt(this._dragHandle,this,n,!1),u=dt(this._dragHandle,this,n,!0),c=bn(t.get("handleSize"),i[0]),h=Ge(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=o3(this._orient);h.attr({cursor:d,draggable:!0,drift:s,ondragend:u,onmousemove:function(b){Ri(b.event)}}),h.x=i[0]/2,h.useStyle(t.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ql(h,!0),a.add(h);var p=this.visualMapModel.textStyleModel,y=new Xt({cursor:d,draggable:!0,drift:s,onmousemove:function(b){Ri(b.event)},ondragend:u,style:_e(p,{x:0,y:0,text:""})});y.ensureState("blur").style={opacity:.1},y.stateTransition={duration:200},this.group.add(y);var m=[c,0],_=this._shapes;_.handleThumbs[n]=h,_.handleLabelPoints[n]=m,_.handleLabels[n]=y},e.prototype._createIndicator=function(t,a,n,i,o){var l=bn(t.get("indicatorSize"),n[0]),s=Ge(t.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);s.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(s instanceof or){var c=s.style;s.useStyle(rt({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else s.useStyle(u);a.add(s);var h=this.visualMapModel.textStyleModel,d=new Xt({silent:!0,invisible:!0,style:_e(h,{x:0,y:0,text:""})});this.group.add(d);var p=[(o==="horizontal"?i/2:jit)+n[0]/2,0],y=this._shapes;y.indicator=s,y.indicatorLabel=d,y.indicatorLabelPoint=p,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():i3(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,a=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Nn(a[0],n,i,!0),Nn(a[1],n,i,!0)]},e.prototype._updateInterval=function(t,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];As(a,i,o,t,0);var l=n.getExtent();this._dataInterval=[Nn(i[0],o,l,!0),Nn(i[1],o,l,!0)]},e.prototype._updateView=function(t){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],l=t?o:this._handleEnds,s=this._createBarVisual(this._dataInterval,n,l,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(l,s)},e.prototype._createBarVisual=function(t,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},l=this._makeColorGradient(t,o),s=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(n,s);return{barColor:new gf(0,0,0,1,l),barPoints:u,handlesColor:[l[0].color,l[l.length-1].color]}},e.prototype._makeColorGradient=function(t,a){var n=100,i=[],o=(t[1]-t[0])/n;i.push({color:this.getControllerVisual(t[0],"color",a),offset:0});for(var l=1;l<n;l++){var s=t[0]+o*l;if(s>t[1])break;i.push({color:this.getControllerVisual(s,"color",a),offset:l/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new Ct(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,l=n.handleLabels,s=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",n.mainGroup);Uit([0,1],function(h){var d=o[h];d.setStyle("fill",a.handlesColor[h]),d.y=t[h];var p=Nn(t[h],[0,s[1]],u,!0),y=this.getControllerVisual(p,"symbolSize");d.scaleX=d.scaleY=y/s[0],d.x=s[0]-y/2;var m=mn(n.handleLabelPoints[h],Oo(d,this.group));if(this._orient==="horizontal"){var _=c==="left"||c==="top"?(s[0]-y)/2:(s[0]-y)/-2;m[1]+=_}l[h].setStyle({x:m[0],y:m[1],text:i.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,n,i){var o=this.visualMapModel,l=o.getExtent(),s=o.itemSize,u=[0,s[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var d={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",d),y=this.getControllerVisual(t,"symbolSize"),m=Nn(t,l,u,!0),_=s[0]-y/2,b={x:h.x,y:h.y};h.y=m,h.x=_;var x=mn(c.indicatorLabelPoint,Oo(h,this.group)),w=c.indicatorLabel;w.attr("invisible",!1);var A=this._applyTransform("left",c.mainGroup),M=this._orient,D=M==="horizontal";w.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:D?A:"middle",align:D?"center":A});var L={x:_,y:m,style:{fill:p}},R={style:{x:x[0],y:x[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};h.x=b.x,h.y=b.y,h.animateTo(L,E),w.animateTo(R,E)}else h.attr(L),w.attr(R);this._firstShowIndicator=!1;var O=this._shapes.handleLabels;if(O)for(var P=0;P<O.length;P++)this.api.enterBlur(O[P])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(a){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([a.offsetX,a.offsetY],t._shapes.mainGroup,!0,!0);i[1]=a3(ZS(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],l=n.getExtent();t=a3(ZS(o[0],t),o[1]);var s=Wit(n,l,o),u=[t-s,t+s],c=Nn(t,o,l,!0),h=[Nn(u[0],o,l,!0),Nn(u[1],o,l,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",s):h[1]===1/0?this._showIndicator(c,h[0],"> ",s):this._showIndicator(c,c,"≈ ",s));var d=this._hoverLinkDataIndices,p=[];(a||i3(n))&&(p=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var y=k7(d,p);this._dispatchHighDown("downplay",Sg(y[0],n)),this._dispatchHighDown("highlight",Sg(y[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Kl(t.target,function(s){var u=Mt(s);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),l=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Sg(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,a,n,i){var o=Oo(a,i?null:this.group);return it(t)?mn(t,o,n):Hy(t,o,n)},e.prototype._dispatchHighDown=function(t,a){a&&a.length&&this.api.dispatchAction({type:t,batch:a})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(LV);function n3(r,e,t,a){return new Nr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(n){Ri(n.event)},ondragend:a})}function Wit(r,e,t){var a=Yit/2,n=r.get("hoverLinkDataSize");return n&&(a=Nn(n,e,t,!0)/2),a}function i3(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function o3(r){return r==="vertical"?"ns-resize":"ew-resize"}var Zit={type:"selectDataRange",event:"dataRangeSelected",update:"update"},qit=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},$it=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(a){var n=r.pipelineContext;!a.isTargetSeries(r)||n&&n.large||t.push(mnt(a.stateList,a.targetVisuals,dt(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),a=[];e.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var i=n.getVisualMeta(dt(Kit,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(t);o>=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function Kit(r,e,t,a){for(var n=e.targetVisuals[a],i=ar.prepareVisualTypes(n),o={color:xv(r.getData(),"color")},l=0,s=i.length;l<s;l++){var u=i[l],c=n[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,h,d)}return o.color;function h(p){return o[p]}function d(p,y){o[p]=y}}var l3=N;function Qit(r){var e=r&&r.visualMap;it(e)||(e=e?[e]:[]),l3(e,function(t){if(t){Lu(t,"splitList")&&!Lu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var a=t.pieces;a&&it(a)&&l3(a,function(n){xt(n)&&(Lu(n,"start")&&!Lu(n,"min")&&(n.min=n.start),Lu(n,"end")&&!Lu(n,"max")&&(n.max=n.end))})}})}function Lu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var s3=!1;function EV(r){s3||(s3=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Zit,qit),N($it,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Qit))}function IV(r){r.registerComponentModel(Fit),r.registerComponentView(Xit),EV(r)}var Jit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],tot[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var i=this.option.categories;this.resetVisual(function(o,l){n==="categories"?(o.mappingMethod="category",o.categories=Tt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ot(this._pieceList,function(s){return s=Tt(s),l!=="inRange"&&(s.visual=null),s}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=ar.listVisualTypes(),i=this.isCategory();N(t.pieces,function(l){N(n,function(s){l.hasOwnProperty(s)&&(a[s]=1)})}),N(a,function(l,s){var u=!1;N(this.stateList,function(c){u=u||o(t,c,s)||o(t.target,c,s)},this),!u&&N(this.stateList,function(c){(t[c]||(t[c]={}))[s]=MV.get(s,c==="inRange"?"active":"inactive",i)})},this);function o(l,s,u){return l&&l[s]&&l[s].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).selected||{};if(n.selected=o,N(i,function(s,u){var c=this.getSelectedMapKey(s);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var l=!1;N(i,function(s,u){var c=this.getSelectedMapKey(s);o[c]&&(l?o[c]=!1:l=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Tt(t)},e.prototype.getValueState=function(t){var a=ar.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],l=i.getData();l.each(this.getDataDimensionIndex(l),function(s,u){var c=ar.findPieceIndex(s,n);c===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(c,h){var d=i.getRepresentValue({interval:c});h||(h=i.getValueState(d));var p=t(d,h);c[0]===-1/0?n[0]=p:c[1]===1/0?n[1]=p:a.push({value:c[0],color:p},{value:c[1],color:p})}var l=this._pieceList.slice();if(!l.length)l.push({interval:[-1/0,1/0]});else{var s=l[0].interval[0];s!==-1/0&&l.unshift({interval:[-1/0,s]}),s=l[l.length-1].interval[1],s!==1/0&&l.push({interval:[s,1/0]})}var u=-1/0;return N(l,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=Xo(gy.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e})(gy),tot={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,l=a[0];o<n;l+=i,o++){var s=o===n-1?a[1]:l+i;r.push({interval:[l,s],close:[1,1]})}e.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),Db(r),N(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;N(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),u3(e,r)},pieces:function(r){var e=this.option;N(e.pieces,function(t,a){xt(t)||(t={value:t});var n={text:"",index:a};if(t.label!=null&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],l=n.close=[0,0],s=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var d=[["gte","gt","min"],["lte","lt","max"]][h],p=0;p<3&&o[h]==null;p++)o[h]=t[d[p]],l[h]=s[p],c[h]=p===2;o[h]==null&&(o[h]=u[h])}c[0]&&o[1]===1/0&&(l[0]=0),c[1]&&o[0]===-1/0&&(l[1]=0),o[0]===o[1]&&l[0]&&l[1]&&(n.value=o[0])}n.visual=ar.retrieveVisuals(t),r.push(n)},this),u3(e,r),Db(r),N(r,function(t){var a=t.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function u3(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var eot=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=i.getFont(),l=i.getTextColor(),s=this._getItemAlign(),u=a.itemSize,c=this._getViewData(),h=c.endsText,d=er(a.get("showLabel",!0),!h),p=!a.get("selectedMode");h&&this._renderEndsText(t,h[0],u,d,s),N(c.viewPieceList,function(y){var m=y.piece,_=new Ct;_.onclick=dt(this._onItemClick,this,m),this._enableHoverLink(_,y.indexInModelPieceList);var b=a.getRepresentValue(m);if(this._createItemSymbol(_,b,[0,0,u[0],u[1]],p),d){var x=this.visualMapModel.getValueState(b);_.add(new Xt({style:{x:s==="right"?-n:u[0]+n,y:u[1]/2,text:m.text,verticalAlign:"middle",align:s,font:o,fill:l,opacity:x==="outOfRange"?.5:1},silent:p}))}t.add(_)},this),h&&this._renderEndsText(t,h[1],u,d,s),ns(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var l=n.visualMapModel;l.option.hoverLink&&n.api.dispatchAction({type:o,batch:Sg(l.findTargetDataIndices(a),l)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return RV(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(a){var l=new Ct,s=this.visualMapModel.textStyleModel;l.add(new Xt({style:_e(s,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(l)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=ot(t.getPieceList(),function(l,s){return{piece:l,indexInModelPieceList:s}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n,i){var o=Ge(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=Tt(n.selected),l=a.getSelectedMapKey(t);i==="single"||i===!0?(o[l]=!0,N(o,function(s,u){o[u]=u===l})):o[l]=!o[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e})(LV);function OV(r){r.registerComponentModel(Jit),r.registerComponentView(eot),EV(r)}function rot(r){Gt(IV),Gt(OV)}var aot={label:{enabled:!0},decal:{show:!1}},f3=$t(),not={};function iot(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=Tt(aot);It(a.label,r.getLocaleModel().get("aria"),!1),It(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),c=u.get("show");if(c){var h=mt();r.eachSeries(function(d){if(!d.isColorBySeries()){var p=h.get(d.type);p||(p={},h.set(d.type,p)),f3(d).scope=p}}),r.eachRawSeries(function(d){if(r.isSeriesFiltered(d))return;if(_t(d.enableAriaDecal)){d.enableAriaDecal();return}var p=d.getData();if(d.isColorBySeries()){var x=Ub(d.ecModel,d.name,not,r.getSeriesCount()),w=p.getVisual("decal");p.setVisual("decal",A(w,x))}else{var y=d.getRawData(),m={},_=f3(d).scope;p.each(function(M){var D=p.getRawIndex(M);m[D]=M});var b=y.count();y.each(function(M){var D=m[M],L=y.getName(M)||M+"",R=Ub(d.ecModel,L,_,b),E=p.getItemVisual(D,"decal");p.setItemVisual(D,"decal",A(E,R))})}function A(M,D){var L=M?rt(rt({},D),M):D;return L.dirty=!0,L}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=St(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var d=r.getSeriesCount(),p=h.get(["data","maxCount"])||10,y=h.get(["series","maxCount"])||10,m=Math.min(d,y),_;if(!(d<1)){var b=l();if(b){var x=h.get(["general","withTitle"]);_=o(x,{title:b})}else _=h.get(["general","withoutTitle"]);var w=[],A=d>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);_+=o(A,{seriesCount:d}),r.eachSeries(function(R,E){if(E<m){var O=void 0,P=R.get("name"),k=P?"withName":"withoutName";O=d>1?h.get(["series","multiple",k]):h.get(["series","single",k]),O=o(O,{seriesId:R.seriesIndex,seriesName:R.get("name"),seriesType:s(R.subType)});var V=R.getData();if(V.count()>p){var H=h.get(["data","partialData"]);O+=o(H,{displayCnt:p})}else O+=h.get(["data","allData"]);for(var U=h.get(["data","separator","middle"]),z=h.get(["data","separator","end"]),Y=h.get(["data","excludeDimensionId"]),j=[],$=0;$<V.count();$++)if($<p){var tt=V.getName($),F=Y?te(V.getValues($),function(at,lt){return Bt(Y,lt)===-1}):V.getValues($),W=h.get(["data",tt?"withName":"withoutName"]);j.push(o(W,{name:tt,value:F.join(U)}))}O+=j.join(U)+z,w.push(O)}});var M=h.getModel(["series","multiple","separator"]),D=M.get("middle"),L=M.get("end");_+=w.join(D)+L,u.setAttribute("aria-label",_)}}}}function o(u,c){if(!vt(u))return u;var h=u;return N(c,function(d,p){h=h.replace(new RegExp("\\{\\s*"+p+"\\s*\\}","g"),d)}),h}function l(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function s(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function oot(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},N(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function lot(r){r.registerPreprocessor(oot),r.registerVisual(r.PRIORITY.VISUAL.ARIA,iot)}var c3={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},sot=(function(){function r(e){var t=this._condVal=vt(e)?new RegExp(e):nP(e)?e:null;if(t==null){var a="";le(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return vt(t)?this._condVal.test(e):Qt(t)?this._condVal.test(e+""):!1},r})(),uot=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),fot=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r})(),cot=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r})(),hot=(function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r})(),vot=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,a=t(this.valueGetterParam),n=e?this.valueParser(a):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:a))return!1;return!0},r})();function y2(r,e){if(r===!0||r===!1){var t=new uot;return t.value=r,t}var a="";return NV(r)||le(a),r.and?h3("and",r,e):r.or?h3("or",r,e):r.not?dot(r,e):pot(r,e)}function h3(r,e,t){var a=e[r],n="";it(a)||le(n),a.length||le(n);var i=r==="and"?new fot:new cot;return i.children=ot(a,function(o){return y2(o,t)}),i.children.length||le(n),i}function dot(r,e){var t=r.not,a="";NV(t)||le(a);var n=new hot;return n.child=y2(t,e),n.child||le(a),n}function pot(r,e){for(var t="",a=e.prepareGetValue(r),n=[],i=Yt(r),o=r.parser,l=o?h5(o):null,s=0;s<i.length;s++){var u=i[s];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=gt(c3,u)?c3[u]:u,h=r[u],d=l?l(h):h,p=B9(c,d)||c==="reg"&&new sot(d);p||le(t),n.push(p)}}n.length||le(t);var y=new vot;return y.valueGetterParam=a,y.valueParser=l,y.getValue=e.getValue,y.subCondList=n,y}function NV(r){return xt(r)&&!Sr(r)}var got=(function(){function r(e,t){this._cond=y2(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r})();function yot(r,e){return new got(r,e)}var mot={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,a=yot(r.config,{valueGetterAttrMap:mt({dimension:!0}),prepareGetValue:function(l){var s="",u=l.dimension;gt(l,"dimension")||le(s);var c=e.getDimensionInfo(u);return c||le(s),{dimIdx:c.index}},getValue:function(l){return e.retrieveValueFromItem(t,l.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),a.evaluate()&&n.push(t);return{data:n}}},_ot={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,a="",n=de(t);n.length||le(a);var i=[];N(n,function(c){var h=c.dimension,d=c.order,p=c.parser,y=c.incomparable;if(h==null&&le(a),d!=="asc"&&d!=="desc"&&le(a),y&&y!=="min"&&y!=="max"){var m="";le(m)}if(d!=="asc"&&d!=="desc"){var _="";le(_)}var b=e.getDimensionInfo(h);b||le(a);var x=p?h5(p):null;p&&!x&&le(a),i.push({dimIdx:b.index,parser:x,comparator:new d5(d,y)})});var o=e.sourceFormat;o!==Pr&&o!==tn&&le(a);for(var l=[],s=0,u=e.count();s<u;s++)l.push(e.getRawDataItem(s));return l.sort(function(c,h){for(var d=0;d<i.length;d++){var p=i[d],y=e.retrieveValueFromItem(c,p.dimIdx),m=e.retrieveValueFromItem(h,p.dimIdx);p.parser&&(y=p.parser(y),m=p.parser(m));var _=p.comparator.evaluate(y,m);if(_!==0)return _}return 0}),{data:l}}};function Sot(r){r.registerTransform(mot),r.registerTransform(_ot)}var bot=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,a,n){r.prototype.init.call(this,t,a,n),this._sourceManager=new m5(this),pR(this)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),pR(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Un},e})(Ht),xot=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(we);function wot(r){r.registerComponentModel(bot),r.registerComponentView(xot)}var In=Xn.CMD;function Uu(r,e){return Math.abs(r-e)<1e-5}function Xx(r){var e=r.data,t=r.len(),a=[],n,i=0,o=0,l=0,s=0;function u(V,H){n&&n.length>2&&a.push(n),n=[V,H]}function c(V,H,U,z){Uu(V,U)&&Uu(H,z)||n.push(V,H,U,z,U,z)}function h(V,H,U,z,Y,j){var $=Math.abs(H-V),tt=Math.tan($/4)*4/3,F=H<V?-1:1,W=Math.cos(V),at=Math.sin(V),lt=Math.cos(H),ct=Math.sin(H),bt=W*Y+U,Pt=at*j+z,wt=lt*Y+U,pt=ct*j+z,Ot=Y*tt*F,yt=j*tt*F;n.push(bt-Ot*at,Pt+yt*W,wt+Ot*ct,pt-yt*lt,wt,pt)}for(var d,p,y,m,_=0;_<t;){var b=e[_++],x=_===1;switch(x&&(i=e[_],o=e[_+1],l=i,s=o,(b===In.L||b===In.C||b===In.Q)&&(n=[l,s])),b){case In.M:i=l=e[_++],o=s=e[_++],u(l,s);break;case In.L:d=e[_++],p=e[_++],c(i,o,d,p),i=d,o=p;break;case In.C:n.push(e[_++],e[_++],e[_++],e[_++],i=e[_++],o=e[_++]);break;case In.Q:d=e[_++],p=e[_++],y=e[_++],m=e[_++],n.push(i+2/3*(d-i),o+2/3*(p-o),y+2/3*(d-y),m+2/3*(p-m),y,m),i=y,o=m;break;case In.A:var w=e[_++],A=e[_++],M=e[_++],D=e[_++],L=e[_++],R=e[_++]+L;_+=1;var E=!e[_++];d=Math.cos(L)*M+w,p=Math.sin(L)*D+A,x?(l=d,s=p,u(l,s)):c(i,o,d,p),i=Math.cos(R)*M+w,o=Math.sin(R)*D+A;for(var O=(E?-1:1)*Math.PI/2,P=L;E?P>R:P<R;P+=O){var k=E?Math.max(P+O,R):Math.min(P+O,R);h(P,k,w,A,M,D)}break;case In.R:l=i=e[_++],s=o=e[_++],d=l+e[_++],p=s+e[_++],u(d,s),c(d,s,d,p),c(d,p,l,p),c(l,p,l,s),c(l,s,d,s);break;case In.Z:n&&c(i,o,l,s),i=l,o=s;break}}return n&&n.length>2&&a.push(n),a}function Wx(r,e,t,a,n,i,o,l,s,u){if(Uu(r,t)&&Uu(e,a)&&Uu(n,o)&&Uu(i,l)){s.push(o,l);return}var c=2/u,h=c*c,d=o-r,p=l-e,y=Math.sqrt(d*d+p*p);d/=y,p/=y;var m=t-r,_=a-e,b=n-o,x=i-l,w=m*m+_*_,A=b*b+x*x;if(w<h&&A<h){s.push(o,l);return}var M=d*m+p*_,D=-d*b-p*x,L=w-M*M,R=A-D*D;if(L<h&&M>=0&&R<h&&D>=0){s.push(o,l);return}var E=[],O=[];Bo(r,t,n,o,.5,E),Bo(e,a,i,l,.5,O),Wx(E[0],O[0],E[1],O[1],E[2],O[2],E[3],O[3],s,u),Wx(E[4],O[4],E[5],O[5],E[6],O[6],E[7],O[7],s,u)}function Tot(r,e){var t=Xx(r),a=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],l=i[0],s=i[1];o.push(l,s);for(var u=2;u<i.length;){var c=i[u++],h=i[u++],d=i[u++],p=i[u++],y=i[u++],m=i[u++];Wx(l,s,c,h,d,p,y,m,o,e),l=y,s=m}a.push(o)}return a}function PV(r,e,t){var a=r[e],n=r[1-e],i=Math.abs(a/n),o=Math.ceil(Math.sqrt(i*t)),l=Math.floor(t/o);l===0&&(l=1,o=t);for(var s=[],u=0;u<o;u++)s.push(l);var c=o*l,h=t-c;if(h>0)for(var u=0;u<h;u++)s[u%o]+=1;return s}function v3(r,e,t){for(var a=r.r0,n=r.r,i=r.startAngle,o=r.endAngle,l=Math.abs(o-i),s=l*n,u=n-a,c=s>Math.abs(u),h=PV([s,u],c?0:1,e),d=(c?l:u)/h.length,p=0;p<h.length;p++)for(var y=(c?u:l)/h[p],m=0;m<h[p];m++){var _={};c?(_.startAngle=i+d*p,_.endAngle=i+d*(p+1),_.r0=a+y*m,_.r=a+y*(m+1)):(_.startAngle=i+y*m,_.endAngle=i+y*(m+1),_.r0=a+d*p,_.r=a+d*(p+1)),_.clockwise=r.clockwise,_.cx=r.cx,_.cy=r.cy,t.push(_)}}function Aot(r,e,t){for(var a=r.width,n=r.height,i=a>n,o=PV([a,n],i?0:1,e),l=i?"width":"height",s=i?"height":"width",u=i?"x":"y",c=i?"y":"x",h=r[l]/o.length,d=0;d<o.length;d++)for(var p=r[s]/o[d],y=0;y<o[d];y++){var m={};m[u]=d*h,m[c]=y*p,m[l]=h,m[s]=p,m.x+=r.x,m.y+=r.y,t.push(m)}}function d3(r,e,t,a){return r*a-t*e}function Cot(r,e,t,a,n,i,o,l){var s=t-r,u=a-e,c=o-n,h=l-i,d=d3(c,h,s,u);if(Math.abs(d)<1e-6)return null;var p=r-n,y=e-i,m=d3(p,y,c,h)/d;return m<0||m>1?null:new zt(m*s+r,m*u+e)}function Dot(r,e,t){var a=new zt;zt.sub(a,t,e),a.normalize();var n=new zt;zt.sub(n,r,e);var i=n.dot(a);return i}function Ru(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function Mot(r,e,t){for(var a=r.length,n=[],i=0;i<a;i++){var o=r[i],l=r[(i+1)%a],s=Cot(o[0],o[1],l[0],l[1],e.x,e.y,t.x,t.y);s&&n.push({projPt:Dot(s,e,t),pt:s,idx:i})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(_,b){return _.projPt-b.projPt});var u=n[0],c=n[n.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var d=[u.pt.x,u.pt.y],p=[c.pt.x,c.pt.y],y=[d],m=[p],i=u.idx+1;i<=c.idx;i++)Ru(y,r[i].slice());Ru(y,p),Ru(y,d);for(var i=c.idx+1;i<=u.idx+a;i++)Ru(m,r[i%a].slice());return Ru(m,d),Ru(m,p),[{points:y},{points:m}]}function p3(r){var e=r.points,t=[],a=[];zy(e,t,a);var n=new kt(t[0],t[1],a[0]-t[0],a[1]-t[1]),i=n.width,o=n.height,l=n.x,s=n.y,u=new zt,c=new zt;return i>o?(u.x=c.x=l+i/2,u.y=s,c.y=s+o):(u.y=c.y=s+o/2,u.x=l,c.x=l+i),Mot(e,u,c)}function yy(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);yy(r,i[0],n,a),yy(r,i[1],t-n,a)}return a}function Lot(r,e){for(var t=[],a=0;a<e;a++)t.push(Tw(r));return t}function Rot(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function Eot(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function Iot(r,e){var t=[],a=r.shape,n;switch(r.type){case"rect":Aot(a,e,t),n=Wt;break;case"sector":v3(a,e,t),n=Or;break;case"circle":v3({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,t),n=Or;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,l=ot(Tot(r.getUpdatedPathProxy(),o),function(b){return Eot(b)}),s=l.length;if(s===0)yy(p3,{points:l[0]},e,t);else if(s===e)for(var u=0;u<s;u++)t.push({points:l[u]});else{var c=0,h=ot(l,function(b){var x=[],w=[];zy(b,x,w);var A=(w[1]-x[1])*(w[0]-x[0]);return c+=A,{poly:b,area:A}});h.sort(function(b,x){return x.area-b.area});for(var d=e,u=0;u<s;u++){var p=h[u];if(d<=0)break;var y=u===s-1?d:Math.ceil(p.area/c*e);y<0||(yy(p3,{points:p.poly},y,t),d-=y)}}n=Nr;break}if(!n)return Lot(r,e);for(var m=[],u=0;u<t.length;u++){var _=new n;_.setShape(t[u]),Rot(r,_),m.push(_)}return m}function Oot(r,e){var t=r.length,a=e.length;if(t===a)return[r,e];for(var n=[],i=[],o=t<a?r:e,l=Math.min(t,a),s=Math.abs(a-t)/6,u=(l-2)/6,c=Math.ceil(s/u)+1,h=[o[0],o[1]],d=s,p=2;p<l;){var y=o[p-2],m=o[p-1],_=o[p++],b=o[p++],x=o[p++],w=o[p++],A=o[p++],M=o[p++];if(d<=0){h.push(_,b,x,w,A,M);continue}for(var D=Math.min(d,c-1)+1,L=1;L<=D;L++){var R=L/D;Bo(y,_,x,A,R,n),Bo(m,b,w,M,R,i),y=n[3],m=i[3],h.push(n[1],i[1],n[2],i[2],y,m),_=n[5],b=i[5],x=n[6],w=i[6]}d-=D-1}return o===r?[h,e]:[r,h]}function g3(r,e){for(var t=r.length,a=r[t-2],n=r[t-1],i=[],o=0;o<e.length;)i[o++]=a,i[o++]=n;return i}function Not(r,e){for(var t,a,n,i=[],o=[],l=0;l<Math.max(r.length,e.length);l++){var s=r[l],u=e[l],c=void 0,h=void 0;s?u?(t=Oot(s,u),c=t[0],h=t[1],a=c,n=h):(h=g3(n||s,s),c=s):(c=g3(a||u,u),h=u),i.push(c),o.push(h)}return[i,o]}function y3(r){for(var e=0,t=0,a=0,n=r.length,i=0,o=n-2;i<n;o=i,i+=2){var l=r[o],s=r[o+1],u=r[i],c=r[i+1],h=l*c-u*s;e+=h,t+=(l+u)*h,a+=(s+c)*h}return e===0?[r[0]||0,r[1]||0]:[t/e/3,a/e/3,e]}function Pot(r,e,t,a){for(var n=(r.length-2)/6,i=1/0,o=0,l=r.length,s=l-2,u=0;u<n;u++){for(var c=u*6,h=0,d=0;d<l;d+=2){var p=d===0?c:(c+d-2)%s+2,y=r[p]-t[0],m=r[p+1]-t[1],_=e[d]-a[0],b=e[d+1]-a[1],x=_-y,w=b-m;h+=x*x+w*w}h<i&&(i=h,o=u)}return o}function zot(r){for(var e=[],t=r.length,a=0;a<t;a+=2)e[a]=r[t-a-2],e[a+1]=r[t-a-1];return e}function kot(r,e,t,a){for(var n=[],i,o=0;o<r.length;o++){var l=r[o],s=e[o],u=y3(l),c=y3(s);i==null&&(i=u[2]<0!=c[2]<0);var h=[],d=[],p=0,y=1/0,m=[],_=l.length;i&&(l=zot(l));for(var b=Pot(l,s,u,c)*6,x=_-2,w=0;w<x;w+=2){var A=(b+w)%x+2;h[w+2]=l[A]-u[0],h[w+3]=l[A+1]-u[1]}h[0]=l[b]-u[0],h[1]=l[b+1]-u[1];for(var M=a/t,D=-a/2;D<=a/2;D+=M){for(var L=Math.sin(D),R=Math.cos(D),E=0,w=0;w<l.length;w+=2){var O=h[w],P=h[w+1],k=s[w]-c[0],V=s[w+1]-c[1],H=k*R-V*L,U=k*L+V*R;m[w]=H,m[w+1]=U;var z=H-O,Y=U-P;E+=z*z+Y*Y}if(E<y){y=E,p=D;for(var j=0;j<m.length;j++)d[j]=m[j]}}n.push({from:h,to:d,fromCp:u,toCp:c,rotation:-p})}return n}function my(r){return r.__isCombineMorphing}var zV="__mOriginal_";function _y(r,e,t){var a=zV+e,n=r[a]||r[e];r[a]||(r[a]=r[e]);var i=t.replace,o=t.after,l=t.before;r[e]=function(){var s=arguments,u;return l&&l.apply(this,s),i?u=i.apply(this,s):u=n.apply(this,s),o&&o.apply(this,s),u}}function Oh(r,e){var t=zV+e;r[t]&&(r[e]=r[t],r[t]=null)}function m3(r,e){for(var t=0;t<r.length;t++)for(var a=r[t],n=0;n<a.length;){var i=a[n],o=a[n+1];a[n++]=e[0]*i+e[2]*o+e[4],a[n++]=e[1]*i+e[3]*o+e[5]}}function kV(r,e){var t=r.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),n=Not(Xx(t),Xx(a)),i=n[0],o=n[1],l=r.getComputedTransform(),s=e.getComputedTransform();function u(){this.transform=null}l&&m3(i,l),s&&m3(o,s),_y(e,"updateTransform",{replace:u}),e.transform=null;var c=kot(i,o,10,Math.PI),h=[];_y(e,"buildPath",{replace:function(d){for(var p=e.__morphT,y=1-p,m=[],_=0;_<c.length;_++){var b=c[_],x=b.from,w=b.to,A=b.rotation*p,M=b.fromCp,D=b.toCp,L=Math.sin(A),R=Math.cos(A);_h(m,M,D,p);for(var E=0;E<x.length;E+=2){var O=x[E],P=x[E+1],k=w[E],V=w[E+1],H=O*y+k*p,U=P*y+V*p;h[E]=H*R-U*L+m[0],h[E+1]=H*L+U*R+m[1]}var z=h[0],Y=h[1];d.moveTo(z,Y);for(var E=2;E<x.length;){var k=h[E++],V=h[E++],j=h[E++],$=h[E++],tt=h[E++],F=h[E++];z===k&&Y===V&&j===tt&&$===F?d.lineTo(tt,F):d.bezierCurveTo(k,V,j,$,tt,F),z=tt,Y=F}}}})}function m2(r,e,t){if(!r||!e)return e;var a=t.done,n=t.during;kV(r,e),e.__morphT=0;function i(){Oh(e,"buildPath"),Oh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},St({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),a&&a()}},t)),e}function Bot(r,e,t,a,n,i){var o=16;r=n===t?0:Math.round(32767*(r-t)/(n-t)),e=i===a?0:Math.round(32767*(e-a)/(i-a));for(var l=0,s,u=(1<<o)/2;u>0;u/=2){var c=0,h=0;(r&u)>0&&(c=1),(e&u)>0&&(h=1),l+=u*u*(3*c^h),h===0&&(c===1&&(r=u-1-r,e=u-1-e),s=r,r=e,e=s)}return l}function Sy(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=ot(r,function(l){var s=l.getBoundingRect(),u=l.getComputedTransform(),c=s.x+s.width/2+(u?u[4]:0),h=s.y+s.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(h,t),a=Math.max(c,a),n=Math.max(h,n),[c,h]}),o=ot(i,function(l,s){return{cp:l,z:Bot(l[0],l[1],e,t,a,n),path:r[s]}});return o.sort(function(l,s){return l.z-s.z}).map(function(l){return l.path})}function BV(r){return Iot(r.path,r.count)}function Zx(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Vot(r,e,t){var a=[];function n(M){for(var D=0;D<M.length;D++){var L=M[D];my(L)?n(L.childrenRef()):L instanceof Ut&&a.push(L)}}n(r);var i=a.length;if(!i)return Zx();var o=t.dividePath||BV,l=o({path:e,count:i});if(l.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Zx();a=Sy(a),l=Sy(l);for(var s=t.done,u=t.during,c=t.individualDelay,h=new Ci,d=0;d<i;d++){var p=a[d],y=l[d];y.parent=e,y.copyTransform(h),c||kV(p,y)}e.__isCombineMorphing=!0,e.childrenRef=function(){return l};function m(M){for(var D=0;D<l.length;D++)l[D].addSelfToZr(M)}_y(e,"addSelfToZr",{after:function(M){m(M)}}),_y(e,"removeSelfFromZr",{after:function(M){for(var D=0;D<l.length;D++)l[D].removeSelfFromZr(M)}});function _(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Oh(e,"addSelfToZr"),Oh(e,"removeSelfFromZr")}var b=l.length;if(c)for(var x=b,w=function(){x--,x===0&&(_(),s&&s())},d=0;d<b;d++){var A=c?St({delay:(t.delay||0)+c(d,b,a[d],l[d]),done:w},t):t;m2(a[d],l[d],A)}else e.__morphT=0,e.animateTo({__morphT:1},St({during:function(M){for(var D=0;D<b;D++){var L=l[D];L.__morphT=e.__morphT,L.dirtyShape()}u&&u(M)},done:function(){_();for(var M=0;M<r.length;M++)Oh(r[M],"updateTransform");s&&s()}},t));return e.__zr&&m(e.__zr),{fromIndividuals:a,toIndividuals:l,count:b}}function Got(r,e,t){var a=e.length,n=[],i=t.dividePath||BV;function o(p){for(var y=0;y<p.length;y++){var m=p[y];my(m)?o(m.childrenRef()):m instanceof Ut&&n.push(m)}}if(my(r)){o(r.childrenRef());var l=n.length;if(l<a)for(var s=0,u=l;u<a;u++)n.push(Tw(n[s++%l]));n.length=a}else{n=i({path:r,count:a});for(var c=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(c);if(n.length!==a)return console.error("Invalid morphing: unmatched splitted path"),Zx()}n=Sy(n),e=Sy(e);for(var h=t.individualDelay,u=0;u<a;u++){var d=h?St({delay:(t.delay||0)+h(u,a,n[u],e[u])},t):t;m2(n[u],e[u],d)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function _3(r){return it(r[0])}function S3(r,e){for(var t=[],a=r.length,n=0;n<a;n++)t.push({one:r[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%a].many.push(e[n][o])}for(var l=0,n=a-1;n>=0;n--)if(!t[n].many.length){var s=t[l].many;if(s.length<=1)if(l)l=0;else return t;var i=s.length,u=Math.ceil(i/2);t[n].many=s.slice(u,i),t[l].many=s.slice(0,u),l++}return t}var Hot={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var n=Tw(r.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function qS(r,e,t,a,n,i){if(!r.length||!e.length)return;var o=yf("update",a,n);if(!(o&&o.duration>0))return;var l=a.getModel("universalTransition").get("delay"),s=Object.assign({setToFinal:!0},o),u,c;_3(r)&&(u=r,c=e),_3(e)&&(u=e,c=r);function h(b,x,w,A,M){var D=b.many,L=b.one;if(D.length===1&&!M){var R=x?D[0]:L,E=x?L:D[0];if(my(R))h({many:[R],one:E},!0,w,A,!0);else{var O=l?St({delay:l(w,A)},s):s;m2(R,E,O),i(R,E,R,E,O)}}else for(var P=St({dividePath:Hot[t],individualDelay:l&&function(Y,j,$,tt){return l(Y+w,A)}},s),k=x?Vot(D,L,P):Got(L,D,P),V=k.fromIndividuals,H=k.toIndividuals,U=V.length,z=0;z<U;z++){var O=l?St({delay:l(z,U)},s):s;i(V[z],H[z],x?D[z]:b.one,x?b.one:D[z],O)}}for(var d=u?u===r:r.length>e.length,p=u?S3(c,u):S3(d?e:r,[d?r:e]),y=0,m=0;m<p.length;m++)y+=p[m].many.length;for(var _=0,m=0;m<p.length;m++)h(p[m],d,_,y),_+=p[m].many.length}function Fl(r){if(!r)return[];if(it(r)){for(var e=[],t=0;t<r.length;t++)e.push(Fl(r[t]));return e}var a=[];return r.traverse(function(n){n instanceof Ut&&!n.disableMorphing&&!n.invisible&&!n.ignore&&a.push(n)}),a}var VV=1e4,Fot=0,b3=1,x3=2,Uot=$t();function Yot(r,e){for(var t=r.dimensions,a=0;a<t.length;a++){var n=r.getDimensionInfo(t[a]);if(n&&n.otherDims[e]===0)return t[a]}}function jot(r,e,t){var a=r.getDimensionInfo(t),n=a&&a.ordinalMeta;if(a){var i=r.get(a.name,e);return n&&n.categories[i]||i+""}}function w3(r,e,t,a){var n=a?"itemChildGroupId":"itemGroupId",i=Yot(r,n);if(i){var o=jot(r,e,i);return o}var l=r.getRawDataItem(e),s=a?"childGroupId":"groupId";if(l&&l[s])return l[s]+"";if(!a)return t||r.getId(e)}function T3(r){var e=[];return N(r,function(t){var a=t.data,n=t.dataGroupId;if(!(a.count()>VV))for(var i=a.getIndices(),o=0;o<i.length;o++)e.push({data:a,groupId:w3(a,o,n,!1),childGroupId:w3(a,o,n,!0),divide:t.divide,dataIndex:o})}),e}function $S(r,e,t){r.traverse(function(a){a instanceof Ut&&De(a,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function KS(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Eu(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Xot(r,e,t){var a=yf("update",t,e);a&&r.traverse(function(n){if(n instanceof $a){var i=xU(n);i&&n.animateFrom({style:i},a)}})}function Wot(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++){var n=r[a],i=e[a];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function GV(r,e,t){var a=T3(r),n=T3(e);function i(w,A,M,D,L){(M||w)&&A.animateFrom({style:M&&M!==w?rt(rt({},M.style),w.style):w.style},L)}var o=!1,l=Fot,s=mt(),u=mt();a.forEach(function(w){w.groupId&&s.set(w.groupId,!0),w.childGroupId&&u.set(w.childGroupId,!0)});for(var c=0;c<n.length;c++){var h=n[c].groupId;if(u.get(h)){l=b3;break}var d=n[c].childGroupId;if(d&&s.get(d)){l=x3;break}}function p(w,A){return function(M){var D=M.data,L=M.dataIndex;return A?D.getId(L):w?l===b3?M.childGroupId:M.groupId:l===x3?M.childGroupId:M.groupId}}var y=Wot(a,n),m={};if(!y)for(var c=0;c<n.length;c++){var _=n[c],b=_.data.getItemGraphicEl(_.dataIndex);b&&(m[b.id]=!0)}function x(w,A){var M=a[A],D=n[w],L=D.data.hostModel,R=M.data.getItemGraphicEl(M.dataIndex),E=D.data.getItemGraphicEl(D.dataIndex);if(R===E){E&&Xot(E,D.dataIndex,L);return}R&&m[R.id]||E&&(Eu(E),R?(Eu(R),KS(R),o=!0,qS(Fl(R),Fl(E),D.divide,L,w,i)):$S(E,L,w))}new Oi(a,n,p(!0,y),p(!1,y),null,"multiple").update(x).updateManyToOne(function(w,A){var M=n[w],D=M.data,L=D.hostModel,R=D.getItemGraphicEl(M.dataIndex),E=te(ot(A,function(O){return a[O].data.getItemGraphicEl(a[O].dataIndex)}),function(O){return O&&O!==R&&!m[O.id]});R&&(Eu(R),E.length?(N(E,function(O){Eu(O),KS(O)}),o=!0,qS(Fl(E),Fl(R),M.divide,L,w,i)):$S(R,L,M.dataIndex))}).updateOneToMany(function(w,A){var M=a[A],D=M.data.getItemGraphicEl(M.dataIndex);if(!(D&&m[D.id])){var L=te(ot(w,function(E){return n[E].data.getItemGraphicEl(n[E].dataIndex)}),function(E){return E&&E!==D}),R=n[w[0]].data.hostModel;L.length&&(N(L,function(E){return Eu(E)}),D?(Eu(D),KS(D),o=!0,qS(Fl(D),Fl(L),M.divide,R,w[0],i)):N(L,function(E){return $S(E,R,w[0])}))}}).updateManyToMany(function(w,A){new Oi(A,w,function(M){return a[M].data.getId(a[M].dataIndex)},function(M){return n[M].data.getId(n[M].dataIndex)}).update(function(M,D){x(w[M],A[D])}).execute()}).execute(),o&&N(e,function(w){var A=w.data,M=A.hostModel,D=M&&t.getViewOfSeriesModel(M),L=yf("update",M,0);D&&M.isAnimationEnabled()&&L&&L.duration>0&&D.group.traverse(function(R){R instanceof Ut&&!R.animators.length&&R.animateFrom({style:{opacity:0}},L)})})}function A3(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function C3(r){return it(r)?r.sort().join(","):r}function xo(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Zot(r,e){var t=mt(),a=mt(),n=mt();return N(r.oldSeries,function(i,o){var l=r.oldDataGroupIds[o],s=r.oldData[o],u=A3(i),c=C3(u);a.set(c,{dataGroupId:l,data:s}),it(u)&&N(u,function(h){n.set(h,{key:c,dataGroupId:l,data:s})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),l=i.getData(),s=A3(i),u=C3(s),c=a.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:xo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:xo(l),data:l}]});else if(it(s)){var h=[];N(s,function(y){var m=a.get(y);m.data&&h.push({dataGroupId:m.dataGroupId,divide:xo(m.data),data:m.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:l,divide:xo(l)}]})}else{var d=n.get(s);if(d){var p=t.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:xo(d.data)}],newSeries:[]},t.set(d.key,p)),p.newSeries.push({dataGroupId:o,data:l,divide:xo(l)})}}}}),t}function D3(r,e){for(var t=0;t<r.length;t++){var a=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(a)return t}}function qot(r,e,t,a){var n=[],i=[];N(de(r.from),function(o){var l=D3(e.oldSeries,o);l>=0&&n.push({dataGroupId:e.oldDataGroupIds[l],data:e.oldData[l],divide:xo(e.oldData[l]),groupIdDim:o.dimension})}),N(de(r.to),function(o){var l=D3(t.updatedSeries,o);if(l>=0){var s=t.updatedSeries[l].getData();i.push({dataGroupId:e.oldDataGroupIds[l],data:s,divide:xo(s),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&GV(n,i,a)}function $ot(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){N(de(a.seriesTransition),function(n){N(de(n.to),function(i){for(var o=a.updatedSeries,l=0;l<o.length;l++)(i.seriesIndex!=null&&i.seriesIndex===o[l].seriesIndex||i.seriesId!=null&&i.seriesId===o[l].id)&&(o[l][vg]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,a){var n=Uot(t);if(n.oldSeries&&a.updatedSeries&&a.optionChanged){var i=a.seriesTransition;if(i)N(de(i),function(p){qot(p,n,a,t)});else{var o=Zot(n,a);N(o.keys(),function(p){var y=o.get(p);GV(y.oldSeries,y.newSeries,t)})}N(a.updatedSeries,function(p){p[vg]&&(p[vg]=!1)})}for(var l=e.getSeries(),s=n.oldSeries=[],u=n.oldDataGroupIds=[],c=n.oldData=[],h=0;h<l.length;h++){var d=l[h].getData();d.count()<VV&&(s.push(l[h]),u.push(l[h].get("dataGroupId")),c.push(d))}})}Gt([nZ]);Gt([JW]);Gt([TZ,VZ,qZ,Mq,Vq,A$,J$,zK,nQ,fQ,_Q,vJ,BJ,qJ,ctt,ptt,Att,Itt,Utt,qtt,iet,Yet]);Gt(urt);Gt(Prt);Gt(BB);Gt(Zrt);Gt(w4);Gt(Qrt);Gt(lat);Gt(Zat);Gt(vnt);Gt(Iv);Gt(Rnt);Gt(Ont);Gt(Unt);Gt($nt);Gt(rit);Gt(sit);Gt(mit);Gt(zit);Gt(CV);Gt(DV);Gt(rot);Gt(IV);Gt(OV);Gt(lot);Gt(Sot);Gt(wot);Gt($ot);Gt(_W);const Kot=Object.freeze(Object.defineProperty({__proto__:null,Axis:en,ChartView:fe,ComponentModel:Ht,ComponentView:we,List:Er,Model:ee,PRIORITY:W5,SeriesModel:pe,color:HH,connect:Mj,dataTool:Pj,dependencies:fj,disConnect:Lj,disconnect:ek,dispose:Rj,env:Ft,extendChartView:oW,extendComponentModel:aW,extendComponentView:nW,extendSeriesModel:iW,format:XX,getCoordinateSystemDimensions:Ij,getInstanceByDom:eT,getInstanceById:Ej,getMap:Nj,graphic:jX,helper:kX,init:Dj,innerDrawElementOnCanvas:Kw,matrix:_H,number:UX,parseGeoJSON:nx,parseGeoJson:nx,registerAction:wn,registerCoordinateSystem:nk,registerLayout:ik,registerLoading:oT,registerLocale:Ow,registerMap:ok,registerPostInit:rk,registerPostUpdate:ak,registerPreprocessor:aT,registerProcessor:nT,registerTheme:rT,registerTransform:lk,registerUpdateLifecycle:Jy,registerVisual:Wo,setCanvasCreator:Oj,setPlatformAPI:J3,throttle:Ky,time:YX,use:Gt,util:WX,vector:iH,version:uj,zrUtil:Q8,zrender:x7},Symbol.toStringTag,{value:"Module"}));var mi={},_i={},QS={},M3;function Qot(){return M3||(M3=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1;r.default=function(){return"".concat(e++)}})(QS)),QS}var eh={},rh={},JS={},L3;function HV(){return L3||(L3=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){for(var i=this,o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];clearTimeout(n),n=setTimeout(function(){t.apply(i,l)},a)}}})(JS)),JS}var Si={},R3;function _2(){return R3||(R3=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.SizeSensorId=Si.SensorTabIndex=Si.SensorClassName=void 0,Si.SizeSensorId="size-sensor-id",Si.SensorClassName="size-sensor-object",Si.SensorTabIndex="-1"),Si}var E3;function Jot(){if(E3)return rh;E3=1,Object.defineProperty(rh,"__esModule",{value:!0}),rh.createSensor=void 0;var r=t(HV()),e=_2();function t(a){return a&&a.__esModule?a:{default:a}}return rh.createSensor=function(n,i){var o=void 0,l=[],s=function(){getComputedStyle(n).position==="static"&&(n.style.position="relative");var y=document.createElement("object");return y.onload=function(){y.contentDocument.defaultView.addEventListener("resize",u),u()},y.style.display="block",y.style.position="absolute",y.style.top="0",y.style.left="0",y.style.height="100%",y.style.width="100%",y.style.overflow="hidden",y.style.pointerEvents="none",y.style.zIndex="-1",y.style.opacity="0",y.setAttribute("class",e.SensorClassName),y.setAttribute("tabindex",e.SensorTabIndex),y.type="text/html",n.appendChild(y),y.data="about:blank",y},u=(0,r.default)(function(){l.forEach(function(p){p(n)})}),c=function(y){o||(o=s()),l.indexOf(y)===-1&&l.push(y)},h=function(){o&&o.parentNode&&(o.contentDocument&&o.contentDocument.defaultView.removeEventListener("resize",u),o.parentNode.removeChild(o),n.removeAttribute(e.SizeSensorId),o=void 0,l=[],i&&i())},d=function(y){var m=l.indexOf(y);m!==-1&&l.splice(m,1),l.length===0&&o&&h()};return{element:n,bind:c,destroy:h,unbind:d}},rh}var ah={},I3;function tlt(){if(I3)return ah;I3=1,Object.defineProperty(ah,"__esModule",{value:!0}),ah.createSensor=void 0;var r=_2(),e=t(HV());function t(a){return a&&a.__esModule?a:{default:a}}return ah.createSensor=function(n,i){var o=void 0,l=[],s=(0,e.default)(function(){l.forEach(function(p){p(n)})}),u=function(){var y=new ResizeObserver(s);return y.observe(n),s(),y},c=function(y){o||(o=u()),l.indexOf(y)===-1&&l.push(y)},h=function(){o&&o.disconnect(),l=[],o=void 0,n.removeAttribute(r.SizeSensorId),i&&i()},d=function(y){var m=l.indexOf(y);m!==-1&&l.splice(m,1),l.length===0&&o&&h()};return{element:n,bind:c,destroy:h,unbind:d}},ah}var O3;function elt(){if(O3)return eh;O3=1,Object.defineProperty(eh,"__esModule",{value:!0}),eh.createSensor=void 0;var r=Jot(),e=tlt();return eh.createSensor=typeof ResizeObserver<"u"?e.createSensor:r.createSensor,eh}var N3;function rlt(){if(N3)return _i;N3=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.removeSensor=_i.getSensor=_i.Sensors=void 0;var r=a(Qot()),e=elt(),t=_2();function a(o){return o&&o.__esModule?o:{default:o}}var n=_i.Sensors={};function i(o){o&&n[o]&&delete n[o]}return _i.getSensor=function(l){var s=l.getAttribute(t.SizeSensorId);if(s&&n[s])return n[s];var u=(0,r.default)();l.setAttribute(t.SizeSensorId,u);var c=(0,e.createSensor)(l,function(){return i(u)});return n[u]=c,c},_i.removeSensor=function(l){var s=l.element.getAttribute(t.SizeSensorId);l.destroy(),i(s)},_i}var P3;function alt(){if(P3)return mi;P3=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.ver=mi.clear=mi.bind=void 0;var r=rlt();return mi.bind=function(t,a){var n=(0,r.getSensor)(t);return n.bind(a),function(){n.unbind(a)}},mi.clear=function(t){var a=(0,r.getSensor)(t);(0,r.removeSensor)(a)},mi.ver="1.0.3",mi}var z3=alt();function k3(r,e){var t={};return e.forEach(function(a){t[a]=r[a]}),t}function tb(r){return typeof r=="function"}function nlt(r){return typeof r=="string"}var eb,B3;function ilt(){return B3||(B3=1,eb=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var a,n,i;if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(n=a;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),a=i.length,a!==Object.keys(t).length)return!1;for(n=a;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=a;n--!==0;){var o=i[n];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}),eb}var olt=ilt();const Iu=W3(olt);var llt=(function(r){Z(e,r);function e(t){var a=r.call(this,t)||this;return a.echarts=t.echarts,a.ele=null,a.isInitialResize=!0,a.eventHandlerRefs={},a}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var a=this.props.shouldSetOption;if(!(tb(a)&&!a(t,this.props))){if(!Iu(t.theme,this.props.theme)||!Iu(t.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var n=this.getEchartsInstance();Iu(t.onEvents,this.props.onEvents)||(this.unbindEvents(n),this.bindEvents(n,this.props.onEvents));var i=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];Iu(k3(this.props,i),k3(t,i))||this.updateEChartsOption(),(!Iu(t.style,this.props.style)||!Iu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.initEchartsInstance=function(){return LM(this,void 0,void 0,function(){var t=this;return RM(this,function(a){return[2,new Promise(function(n){t.echarts.init(t.ele,t.props.theme,t.props.opts);var i=t.getEchartsInstance();i.on("finished",function(){var o=t.ele.clientWidth,l=t.ele.clientHeight;t.echarts.dispose(t.ele);var s=gh({width:o,height:l},t.props.opts);n(t.echarts.init(t.ele,t.props.theme,s))})})]})})},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},e.prototype.dispose=function(){if(this.ele){try{z3.clear(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){return LM(this,void 0,void 0,function(){var t,a,n,i,o,l,s=this;return RM(this,function(u){switch(u.label){case 0:return t=this.props,a=t.onEvents,n=t.onChartReady,i=t.autoResize,o=i===void 0?!0:i,[4,this.initEchartsInstance()];case 1:return u.sent(),l=this.updateEChartsOption(),this.bindEvents(l,a||{}),tb(n)&&n(l),this.ele&&o&&z3.bind(this.ele,function(){s.resize()}),[2]}})})},e.prototype.bindEvents=function(t,a){var n=this,i=function(l,s){if(nlt(l)&&tb(s)){var u=function(c){s(c,t)};t.on(l,u),n.eventHandlerRefs[l]=u}};for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&i(o,a[o])},e.prototype.unbindEvents=function(t){for(var a=0,n=Object.entries(this.eventHandlerRefs);a<n.length;a++){var i=n[a],o=i[0],l=i[1];t.off(o,l)}this.eventHandlerRefs={}},e.prototype.updateEChartsOption=function(){var t=this.props,a=t.option,n=t.notMerge,i=n===void 0?!1:n,o=t.replaceMerge,l=o===void 0?null:o,s=t.lazyUpdate,u=s===void 0?!1:s,c=t.showLoading,h=t.loadingOption,d=h===void 0?null:h,p=this.getEchartsInstance();return p.setOption(a,{notMerge:i,replaceMerge:l,lazyUpdate:u}),c?p.showLoading(d):p.hideLoading(),p},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize({width:"auto",height:"auto"})}catch(a){console.warn(a)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,a=this.props,n=a.style,i=a.className,o=i===void 0?"":i;a.echarts,a.option,a.theme,a.notMerge,a.replaceMerge,a.lazyUpdate,a.showLoading,a.loadingOption,a.opts,a.onChartReady,a.onEvents,a.shouldSetOption,a.autoResize;var l=P8(a,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),s=gh({height:300},n);return c8.createElement("div",gh({ref:function(u){t.ele=u},style:s,className:"echarts-for-react ".concat(o)},l))},e})(Oe.PureComponent),xa=(function(r){Z(e,r);function e(t){var a=r.call(this,t)||this;return a.echarts=Kot,a}return e})(llt);const wa={backgroundColor:"transparent",textStyle:{color:"#94a3b8"},legend:{textStyle:{color:"#94a3b8"}},title:{textStyle:{color:"#e0e6ed"}}},tg=[["#1d4ed8","#60a5fa"],["#7c3aed","#c084fc"],["#16a34a","#4ade80"],["#b45309","#fbbf24"],["#dc2626","#f87171"]];function V3(r){return r<60?`${Math.round(r)}s`:r<3600?`${Math.round(r/60)}m`:`${(r/3600).toFixed(1)}h`}function slt({tasks:r,prdPhases:e}){const{t}=vr(),a=[],n={};for(const h of r){const d=h.stageName||t.stageUncategorized;n[d]||(a.push(d),n[d]={count:0,prd:h.prdPhase||"",seconds:0}),n[d].count++,h.startedAt&&h.completedAt&&(n[d].seconds+=(new Date(h.completedAt).getTime()-new Date(h.startedAt).getTime())/1e3)}const i={},o=e||[...new Set(r.map(h=>h.prdPhase).filter(Boolean))];o.forEach((h,d)=>{i[h]=tg[d%tg.length]});const l=a.map(h=>Kx(h,t)),s=a.map(h=>n[h].count),u=[...l].reverse(),c={...wa,tooltip:{trigger:"axis",formatter:h=>{const d=Array.isArray(h)?h[0]:h,p=a.length-1-u.indexOf(d.name),y=a[p],m=n[y];let _=`<b>${d.name}</b><br/>${t.tipTaskCount}: ${m.count}`;return m.seconds>0&&(_+=`<br/>${t.tipDuration}: ${V3(m.seconds)}`),_}},grid:{left:10,right:80,top:5,bottom:5,containLabel:!0},yAxis:{type:"category",data:u,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:[...s].reverse().map((h,d)=>{const p=a.length-1-d,y=n[a[p]].prd,[m,_]=i[y]||tg[0];return{value:h,itemStyle:{borderRadius:[0,4,4,0],color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:m},{offset:1,color:_}]}}}}),label:{show:!0,position:"right",color:"#94a3b8",fontSize:10,formatter:h=>{const d=a.length-1-h.dataIndex,p=a[d],y=n[p];let m=`${h.value}`;return y.seconds>0&&(m+=` · ${V3(y.seconds)}`),m}},barWidth:"55%"}]};return G.jsxs("div",{children:[G.jsx(xa,{option:c,style:{height:Math.max(300,l.length*40)}}),o.length>0&&G.jsx("div",{className:"flex gap-4 justify-center mt-3",children:o.map(h=>{const[d,p]=i[h]||tg[0];return G.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-[#6b7b8d]",children:[G.jsx("span",{className:"w-2.5 h-2.5 rounded-sm inline-block",style:{background:`linear-gradient(180deg, ${p}, ${d})`}}),h]},h)})})]})}const G3=["#ef4444","#f59e0b","#06b6d4","#a855f7","#3b82f6","#22c55e","#f97316","#ec4899"];function ult({deviations:r}){const{t:e}=vr(),t={};for(const o of r){const l=K3(o.rootCauseCategory,e);t[l]=(t[l]||0)+1}let a=0;const n=Object.entries(t).sort((o,l)=>l[1]-o[1]).map(([o,l])=>({value:l,name:o,itemStyle:{color:G3[a++%G3.length]}}));if(n.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoDeviation});const i={...wa,tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},series:[{type:"pie",radius:["42%","70%"],center:["50%","52%"],label:{color:"#94a3b8",fontSize:12},data:n,emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}}}]};return G.jsx(xa,{option:i,style:{height:320}})}const flt={"ui-spacing":"#f59e0b",layout:"#3b82f6","component-usage":"#a855f7",i18n:"#06b6d4",logic:"#ef4444",process:"#22c55e",other:"#94a3b8"};function clt({deviations:r}){const{t:e}=vr(),t={},a={};for(const s of r){const u=Vu(s.deviationCategory,e);t[u]=(t[u]||0)+1,a[u]=s.deviationCategory}if(Object.keys(t).length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoDeviation});const n=Object.entries(t).sort((s,u)=>s[1]-u[1]),i=n.map(([s])=>s),o=n.map(([s,u])=>({value:u,itemStyle:{color:flt[a[s]]||"#94a3b8"}})),l={...wa,tooltip:{trigger:"axis"},grid:{left:20,right:20,top:10,bottom:5,containLabel:!0},yAxis:{type:"category",data:i,axisLabel:{color:"#6b7b8d",fontSize:11},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:o,label:{show:!0,position:"right",color:"#94a3b8",fontSize:12},barWidth:"45%",itemStyle:{borderRadius:[0,4,4,0]}}]};return G.jsx(xa,{option:l,style:{height:320}})}const hlt=/\.(md|mdx|txt|docx|doc|pdf|png|jpg|jpeg|svg|ico)$/i;function H3(r){return!!r&&!hlt.test(r)}function vlt({deviations:r,bugs:e}){const{t}=vr(),a={};for(const s of r)if(s.files)for(const u of s.files)H3(u)&&(a[u]=(a[u]||0)+1);for(const s of e)if(s.files)for(const u of s.files)H3(u)&&(a[u]=(a[u]||0)+1);const n=Object.entries(a).sort((s,u)=>s[1]-u[1]),i=n.map(([s])=>s),o=n.map(([,s])=>s);if(i.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:t.chartNoFileHotspot});const l={...wa,tooltip:{trigger:"axis"},grid:{left:20,right:30,top:10,bottom:5,containLabel:!0},yAxis:{type:"category",data:i,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:o.map(s=>({value:s,itemStyle:{borderRadius:[0,4,4,0],color:s>=10?"#ef4444":s>=5?"#f59e0b":s>=3?"#3b82f6":"#22c55e"}})),label:{show:!0,position:"right",color:"#94a3b8",fontSize:11},barWidth:"50%"}]};return G.jsx(xa,{option:l,style:{height:Math.max(200,i.length*30)}})}function dlt({deviations:r,rules:e}){var u,c;const{t}=vr();if(r.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:t.chartNoTrend});const a=4,n=[],i=[],o=[];for(let h=0;h<r.length;h+=a){const d=r.slice(h,h+a),p=((u=d[0])==null?void 0:u.deviationId)||"",y=((c=d[d.length-1])==null?void 0:c.deviationId)||"";n.push(p===y?p:`${p}
109
+ `||n==="")){var i=r.isSelected(n);gt(t,n)?t[n]=t[n]&&i:t[n]=i}}),t}function vit(r){r.registerAction("legendToggleSelect","legendselectchanged",Et(Qc,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Et(Qc,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Et(Qc,"inverseSelect")),r.registerAction("legendSelect","legendselected",Et(Qc,"select")),r.registerAction("legendUnSelect","legendunselected",Et(Qc,"unSelect"))}function TV(r){r.registerComponentModel(Fx),r.registerComponentView(xV),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,hit),r.registerSubTypeDefaulter("legend",function(){return"plain"}),vit(r)}var dit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,a,n){var i=bf(t);r.prototype.init.call(this,t,a,n),XN(this,t,i)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),XN(this,this.option,t)},e.type="legend.scroll",e.defaultOption=Xo(Fx.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e})(Fx);function XN(r,e,t){var a=r.getOrient(),n=[1,1];n[a.index]=0,Go(e,t,{type:"box",ignoreSize:!!n})}var WN=Ct,US=["width","height"],YS=["x","y"],pit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new WN),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new WN)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,a,n,i,o,l,s){var u=this;r.prototype.renderInner.call(this,t,a,n,i,o,l,s);var c=this._controllerGroup,h=a.get("pageIconSize",!0),d=it(h)?h:[h,h];y("pagePrev",0);var p=a.getModel("pageTextStyle");c.add(new Xt({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),y("pageNext",1);function y(m,_){var b=m+"DataIndex",x=mf(a.get("pageIcons",!0)[a.getOrient().name][_],{onclick:dt(u._pageGo,u,b,a,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});x.name=m,c.add(x)}},e.prototype.layoutInner=function(t,a,n,i,o,l){var s=this.getSelectorGroup(),u=t.getOrient().index,c=US[u],h=YS[u],d=US[1-u],p=YS[1-u];o&&ns("horizontal",s,t.get("selectorItemGap",!0));var y=t.get("selectorButtonGap",!0),m=s.getBoundingRect(),_=[-m.x,-m.y],b=Tt(n);o&&(b[c]=n[c]-m[c]-y);var x=this._layoutContentAndController(t,i,b,u,c,d,p,h);if(o){if(l==="end")_[u]+=x[c]+y;else{var w=m[c]+y;_[u]-=w,x[h]-=w}x[c]+=m[c]+y,_[1-u]+=x[p]+x[d]/2-m[d]/2,x[d]=Math.max(x[d],m[d]),x[p]=Math.min(x[p],m[p]+_[1-u]),s.x=_[0],s.y=_[1],s.markRedraw()}return x},e.prototype._layoutContentAndController=function(t,a,n,i,o,l,s,u){var c=this.getContentGroup(),h=this._containerGroup,d=this._controllerGroup;ns(t.get("orient"),c,t.get("itemGap"),i?n.width:null,i?null:n.height),ns("horizontal",d,t.get("pageButtonItemGap",!0));var p=c.getBoundingRect(),y=d.getBoundingRect(),m=this._showController=p[o]>n[o],_=[-p.x,-p.y];a||(_[i]=c[u]);var b=[0,0],x=[-y.x,-y.y],w=Rt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(m){var A=t.get("pageButtonPosition",!0);A==="end"?x[i]+=n[o]-y[o]:b[i]+=y[o]+w}x[1-i]+=p[l]/2-y[l]/2,c.setPosition(_),h.setPosition(b),d.setPosition(x);var M={x:0,y:0};if(M[o]=m?n[o]:p[o],M[l]=Math.max(p[l],y[l]),M[s]=Math.min(0,y[s]+x[1-i]),h.__rectSize=n[o],m){var D={x:0,y:0};D[o]=Math.max(n[o]-y[o]-w,0),D[l]=M[l],h.setClipPath(new Wt({shape:D})),h.__rectSize=D[o]}else d.eachChild(function(R){R.attr({invisible:!0,silent:!0})});var L=this._getPageInfo(t);return L.pageIndex!=null&&Jt(c,{x:L.contentPosition[0],y:L.contentPosition[1]},m?t:null),this._updatePageInfoView(t,L),M},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var n=this._controllerGroup;N(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",d=a[h]!=null,p=n.childOfName(c);p&&(p.setStyle("fill",d?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),p.cursor=d?"pointer":"default")});var i=n.childOfName("pageText"),o=t.get("pageFormatter"),l=a.pageIndex,s=l!=null?l+1:0,u=a.pageCount;i&&o&&i.setStyle("text",vt(o)?o.replace("{current}",s==null?"":s+"").replace("{total}",u==null?"":u+""):o({current:s,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,l=US[o],s=YS[o],u=this._findTargetItemIndex(a),c=n.children(),h=c[u],d=c.length,p=d?1:0,y={contentPosition:[n.x,n.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return y;var m=A(h);y.contentPosition[o]=-m.s;for(var _=u+1,b=m,x=m,w=null;_<=d;++_)w=A(c[_]),(!w&&x.e>b.s+i||w&&!M(w,b.s))&&(x.i>b.i?b=x:b=w,b&&(y.pageNextDataIndex==null&&(y.pageNextDataIndex=b.i),++y.pageCount)),x=w;for(var _=u-1,b=m,x=m,w=null;_>=-1;--_)w=A(c[_]),(!w||!M(x,w.s))&&b.i<x.i&&(x=b,y.pagePrevDataIndex==null&&(y.pagePrevDataIndex=b.i),++y.pageCount,++y.pageIndex),b=w;return y;function A(D){if(D){var L=D.getBoundingRect(),R=L[s]+D[s];return{s:R,e:R+L[l],i:D.__legendDataIndex}}}function M(D,L){return D.e>=L&&D.s<=L+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,l){var s=o.__legendDataIndex;i==null&&s!=null&&(i=l),s===t&&(a=l)}),a??i},e.type="legend.scroll",e})(xV);function git(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function yit(r){Gt(TV),r.registerComponentModel(dit),r.registerComponentView(pit),git(r)}function mit(r){Gt(TV),Gt(yit)}var _it=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Xo(lv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(lv),g2=$t();function Sit(r,e,t){g2(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function bit(r,e){for(var t=g2(r).coordSysRecordMap,a=t.keys(),n=0;n<a.length;n++){var i=a[n],o=t.get(i),l=o.dataZoomInfoMap;if(l){var s=e.uid,u=l.get(s);u&&(l.removeKey(s),l.keys().length||AV(t,o))}}}function AV(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function xit(r,e){var t={model:e,containsPoint:Et(Tit,e),dispatchAction:Et(wit,r),dataZoomInfoMap:null,controller:null},a=t.controller=new Rv(r.getZr());return N(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];t.dataZoomInfoMap.each(function(l){if(i.isAvailableBehavior(l.model.option)){var s=(l.getRange||{})[n],u=s&&s(l.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!l.model.get("disabled",!0)&&u&&o.push({dataZoomId:l.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function wit(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Tit(r,e,t,a){return r.coordinateSystem.containPoint([t,a])}function Ait(r){var e,t="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return r.each(function(i){var o=i.model,l=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;a[t+l]>a[t+e]&&(e=l),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Cit(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=g2(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=mt());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=lV(i);N(o.infoList,function(l){var s=l.model.uid,u=n.get(s)||n.set(s,xit(t,l.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=mt());c.set(i.uid,{dzReferCoordSysInfo:l,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,l,s=i.dataZoomInfoMap;if(s){var u=s.keys()[0];u!=null&&(l=s.get(u))}if(!l){AV(n,i);return}var c=Ait(s);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),Af(i,"dispatchAction",l.model.get("throttle",!0),"fixRate")})})}var Dit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Sit(n,t,{pan:dt(jS.pan,this),zoom:dt(jS.zoom,this),scrollMove:dt(jS.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){bit(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(l2),jS={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var l=XS[e](null,[a.originX,a.originY],o,t,r),s=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-s)*u+s,i[1]=(i[1]-s)*u+s;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(As(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:ZN(function(r,e,t,a,n,i){var o=XS[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:ZN(function(r,e,t,a,n,i){var o=XS[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function ZN(r){return function(e,t,a,n){var i=this.range,o=i.slice(),l=e.axisModels[0];if(l){var s=r(o,l,e,t,a,n);if(As(s,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var XS={grid:function(r,e,t,a,n){var i=t.axis,o={},l=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=l.width,o.pixelStart=l.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=l.height,o.pixelStart=l.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},l=n.model.coordinateSystem,s=l.getRadiusAxis().getExtent(),u=l.getAngleAxis().getExtent();return r=r?l.pointToCoord(r):[0,0],e=l.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=s[1]-s[0],o.pixelStart=s[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),l={};return r=r||[0,0],i.orient==="horizontal"?(l.pixel=e[0]-r[0],l.pixelLength=o.width,l.pixelStart=o.x,l.signal=i.inverse?1:-1):(l.pixel=e[1]-r[1],l.pixelLength=o.height,l.pixelStart=o.y,l.signal=i.inverse?-1:1),l}};function CV(r){s2(r),r.registerComponentModel(_it),r.registerComponentView(Dit),Cit(r)}var Mit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Xo(lv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e})(lv),Jc=Wt,qN=7,Lit=1,WS=30,Rit=7,th="horizontal",$N="vertical",Eit=5,Iit=["line","bar","candlestick","scatter"],Oit={easing:"cubicOut",duration:100,delay:0},Nit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=dt(this._onBrush,this),this._onBrushEnd=dt(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),Af(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Zh(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new Ct;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?Rit:0,o=this._findCoordRect(),l={width:a.getWidth(),height:a.getHeight()},s=this._orient===th?{right:l.width-o.x-o.width,top:l.height-WS-qN-i,width:o.width,height:WS}:{right:qN,top:o.y,width:WS,height:o.height},u=bf(t.option);N(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=s[h])});var c=Xe(u,l);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===$N&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),l=this._displayables.sliderGroup,s=(this._dataShadowInfo||{}).otherAxisInverse;l.attr(n===th&&!o?{scaleY:s?1:-1,scaleX:1}:n===th&&o?{scaleY:s?1:-1,scaleX:-1}:n===$N&&!o?{scaleY:s?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:s?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([l]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Jc({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Jc({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:dt(this._onClickPanel,this)}),l=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",l.on("mousemove",this._onBrush),l.on("mouseup",this._onBrushEnd)):(l.off("mousemove",this._onBrush),l.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),l=i.getShadowDim&&i.getShadowDim(),s=l&&o.getDimensionInfo(l)?i.getShadowDim():t.otherDim;if(s==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var h=o.getDataExtent(s),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var p=[0,a[1]],y=[0,a[0]],m=[[a[0],0],[0,0]],_=[],b=y[1]/(o.count()-1),x=0,w=Math.round(o.count()/a[0]),A;o.each([s],function(E,O){if(w>0&&O%w){x+=b;return}var P=E==null||isNaN(E)||E==="",k=P?0:oe(E,h,p,!0);P&&!A&&O?(m.push([m[m.length-1][0],0]),_.push([_[_.length-1][0],0])):!P&&A&&(m.push([x,0]),_.push([x,0])),m.push([x,k]),_.push([x,k]),x+=b,A=P}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=_}this._shadowData=o,this._shadowDim=s,this._shadowSize=[a[0],a[1]];var M=this.dataZoomModel;function D(E){var O=M.getModel(E?"selectedDataBackground":"dataBackground"),P=new Ct,k=new Nr({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new zr({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(V),P}for(var L=0;L<3;L++){var R=D(L===1);this._displayables.sliderGroup.add(R),this._displayables.dataShadowSegs.push(R)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,l){var s=t.getAxisProxy(o,l).getTargetSeriesModels();N(s,function(u){if(!n&&!(a!==!0&&Bt(Iit,u.get("type"))<0)){var c=i.getComponent(Lo(o),l).axis,h=Pit(o),d,p=u.coordinateSystem;h!=null&&p.getOtherAxis&&(d=p.getOtherAxis(c).inverse),h=u.getData().mapDimension(h),n={thisAxis:c,series:u,thisDim:o,otherDim:h,otherAxisInverse:d}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,l=this._size,s=this.dataZoomModel,u=this.api,c=s.get("borderRadius")||0,h=s.get("brushSelect"),d=a.filler=new Jc({silent:h,style:{fill:s.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new Jc({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:l[0],height:l[1],r:c},style:{stroke:s.get("dataBackgroundColor")||s.get("borderColor"),lineWidth:Lit,fill:"rgba(0,0,0,0)"}})),N([0,1],function(w){var A=s.get("handleIcon");!Yg[A]&&A.indexOf("path://")<0&&A.indexOf("image://")<0&&(A="path://"+A);var M=Ge(A,-1,0,2,2,null,!0);M.attr({cursor:KN(this._orient),draggable:!0,drift:dt(this._onDragMove,this,w),ondragend:dt(this._onDragEnd,this),onmouseover:dt(this._showDataInfo,this,!0),onmouseout:dt(this._showDataInfo,this,!1),z2:5});var D=M.getBoundingRect(),L=s.get("handleSize");this._handleHeight=ht(L,this._size[1]),this._handleWidth=D.width/D.height*this._handleHeight,M.setStyle(s.getModel("handleStyle").getItemStyle()),M.style.strokeNoScale=!0,M.rectHover=!0,M.ensureState("emphasis").style=s.getModel(["emphasis","handleStyle"]).getItemStyle(),Io(M);var R=s.get("handleColor");R!=null&&(M.style.fill=R),o.add(n[w]=M);var E=s.getModel("textStyle"),O=s.get("handleLabel")||{},P=O.show||!1;t.add(i[w]=new Xt({silent:!0,invisible:!P,style:_e(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var p=d;if(h){var y=ht(s.get("moveHandleSize"),l[1]),m=a.moveHandle=new Wt({style:s.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:l[1]-.5,height:y}}),_=y*.8,b=a.moveHandleIcon=Ge(s.get("moveHandleIcon"),-_/2,-_/2,_,_,"#fff",!0);b.silent=!0,b.y=l[1]+y/2-.5,m.ensureState("emphasis").style=s.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var x=Math.min(l[1]/2,Math.max(y,10));p=a.moveZone=new Wt({invisible:!0,shape:{y:l[1]-x,height:y+x}}),p.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(b),o.add(p)}p.attr({draggable:!0,cursor:KN(this._orient),drift:dt(this._onDragMove,this,"all"),ondragstart:dt(this._showDataInfo,this,!0),ondragend:dt(this._onDragEnd,this),onmouseover:dt(this._showDataInfo,this,!0),onmouseout:dt(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[oe(t[0],[0,100],a,!0),oe(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),l=n.findRepresentativeAxisProxy().getMinMaxSpan(),s=[0,100];As(a,i,o,n.get("zoomLock")?"all":t,l.minSpan!=null?oe(l.minSpan,s,o,!0):null,l.maxSpan!=null?oe(l.maxSpan,s,o,!0):null);var u=this._range,c=this._range=ma([oe(i[0],o,s,!0),oe(i[1],o,s,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=ma(n.slice()),o=this._size;N([0,1],function(p){var y=a.handles[p],m=this._handleHeight;y.attr({scaleX:m/2,scaleY:m/2,x:n[p]+(p?-1:1),y:o[1]/2-m/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var l={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(l),a.moveZone.setShape(l),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",l.x+l.width/2));for(var s=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<s.length;c++){var h=s[c],d=h.getClipPath();d||(d=new Wt,h.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,l=["",""];if(a.get("showDetail")){var s=a.findRepresentativeAxisProxy();if(s){var u=s.getAxisModel().axis,c=this._range,h=t?s.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:s.getDataValueWindow();l=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var d=ma(this._handleEnds.slice());p.call(this,0),p.call(this,1);function p(y){var m=Oo(n.handles[y].parent,this.group),_=Hy(y===0?"right":"left",m),b=this._handleWidth/2+Eit,x=mn([d[y]+(y===0?-b:b),this._size[1]/2],m);i[y].setStyle({x:x[0],y:x[1],verticalAlign:o===th?"middle":_,align:o===th?_:"center",text:l[y]})}},e.prototype._formatLabel=function(t,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var l=t==null||isNaN(t)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return _t(i)?i(t,l):vt(i)?i.replace("{value}",l):l},e.prototype._showDataInfo=function(t){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,l=t||this._dragging?o:n,s=this._displayables,u=s.handleLabels;u[0].attr("invisible",!l),u[1].attr("invisible",!l),s.moveHandle&&this.api[l?"enterEmphasis":"leaveEmphasis"](s.moveHandle,1)},e.prototype._onDragMove=function(t,a,n,i){this._dragging=!0,Ri(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),l=mn([a,n],o,!0),s=this._updateInterval(t,l[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),s&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,l=this._updateInterval("all",n[0]-o);this._updateView(),l&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new zt(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),l=[0,100];this._range=ma([oe(n.x,o,l,!0),oe(n.x+n.width,o,l,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Ri(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Jc({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var l=this._brushStart,s=this._displayables.sliderGroup,u=s.transformCoordToLocal(t,a),c=s.transformCoordToLocal(l.x,l.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Oit:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=lV(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(l2);function Pit(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function KN(r){return r==="vertical"?"ns-resize":"ew-resize"}function DV(r){r.registerComponentModel(Mit),r.registerComponentView(Nit),s2(r)}function zit(r){Gt(CV),Gt(DV)}var MV={get:function(r,e,t){var a=Tt((kit[r]||{})[e]);return t&&it(a)?a[a.length-1]:a}},kit={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]}},QN=ar.mapVisual,Bit=ar.eachVisual,Vit=it,JN=N,Git=ma,Hit=oe,gy=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&yV(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=dt(t,this),this.controllerVisuals=Vx(this.option.controller,a,t),this.targetVisuals=Vx(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=de(t),a},e.prototype.eachTargetSeries=function(t,a){N(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,l=this.dataBound,s=i.formatter,u;n=n||["<",">"],it(t)&&(t=t.slice(),u=!0);var c=a?t:u?[h(t[0]),h(t[1])]:h(t);if(vt(s))return s.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(_t(s))return u?s(t[0],t[1]):s(t);if(u)return t[0]===l[0]?n[0]+" "+c[1]:t[1]===l[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(d){return d===l[0]?"min":d===l[1]?"max":(+d).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=Git([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],l=t.getDimensionInfo(o);if(!l.isCalculationCoord)return l.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});It(i,n),It(o,n);var l=this.isCategory();s.call(this,i),s.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function s(h){Vit(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,d,p){var y=h[d],m=h[p];y&&!m&&(m=h[p]={},JN(y,function(_,b){if(ar.isValidType(b)){var x=MV.get(b,"inactive",l);x!=null&&(m[b]=x,b==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function c(h){var d=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,p=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,y=this.get("inactiveColor"),m=this.getItemSymbol(),_=m||"roundRect";JN(this.stateList,function(b){var x=this.itemSize,w=h[b];w||(w=h[b]={color:l?y:[y]}),w.symbol==null&&(w.symbol=d&&Tt(d)||(l?_:[_])),w.symbolSize==null&&(w.symbolSize=p&&Tt(p)||(l?x[0]:[x[0],x[0]])),w.symbol=QN(w.symbol,function(D){return D==="none"?_:D});var A=w.symbolSize;if(A!=null){var M=-1/0;Bit(A,function(D){D>M&&(M=D)}),w.symbolSize=QN(A,function(D){return Hit(D,[0,M],[0,x[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e})(Ht),t3=[20,140],Fit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=t3[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=t3[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):it(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),N(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=ma((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]<t[0]&&(a[0]=t[0]),a[1]<t[0]&&(a[1]=t[0]),a},e.prototype.getValueState=function(t){var a=this.option.range,n=this.getExtent();return(a[0]<=n[0]||a[0]<=t)&&(a[1]>=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(l,s){t[0]<=l&&l<=t[1]&&i.push(s)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=e3(this,"outOfRange",this.getExtent()),n=e3(this,"inRange",this.option.range.slice()),i=[];function o(p,y){i.push({value:p,color:t(p,y)})}for(var l=0,s=0,u=n.length,c=a.length;s<c&&(!n.length||a[s]<=n[0]);s++)a[s]<n[l]&&o(a[s],"outOfRange");for(var h=1;l<u;l++,h=0)h&&i.length&&o(n[l],"outOfRange"),o(n[l],"inRange");for(var h=1;s<c;s++)(!n.length||n[n.length-1]<a[s])&&(h&&(i.length&&o(i[i.length-1].value,"outOfRange"),h=0),o(a[s],"outOfRange"));var d=i.length;return{stops:i,outerColors:[d?i[0].color:"transparent",d?i[d-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Xo(gy.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e})(gy);function e3(r,e,t){if(t[0]===t[1])return t.slice();for(var a=200,n=(t[1]-t[0])/a,i=t[0],o=[],l=0;l<=a&&i<t[1];l++)o.push(i),i+=n;return o.push(t[1]),o}var LV=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a},e.prototype.render=function(t,a,n,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,a,n,i)},e.prototype.renderBackground=function(t){var a=this.visualMapModel,n=bs(a.get("padding")||0),i=t.getBoundingRect();t.add(new Wt({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,l={};if(a==="color"){var s=o.get("contentColor");l.color=s}function u(p){return l[p]}function c(p,y){l[p]=y}var h=o.controllerVisuals[i||o.getValueState(t)],d=ar.prepareVisualTypes(h);return N(d,function(p){var y=h[p];n.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",y=h.__alphaForOpacity),ar.dependsOn(p,a)&&y&&y.applyVisual(t,u,c)}),l[a]},e.prototype.positionGroup=function(t){var a=this.visualMapModel,n=this.api;Wy(t,a.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,a,n,i){},e.type="visualMap",e})(we),r3=[["left","right","width"],["top","bottom","height"]];function RV(r,e,t){var a=r.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:e.getWidth(),height:e.getHeight()},o=a.orient==="horizontal"?1:0,l=r3[o],s=[0,null,10],u={},c=0;c<3;c++)u[r3[1-o][c]]=s[c],u[l[c]]=c===2?t[0]:a[l[c]];var h=[["x","width",3],["y","height",0]][o],d=Xe(u,i,a.padding);return l[(d.margin[h[2]]||0)+d[h[0]]+d[h[1]]*.5<i[h[1]]*.5?0:1]}function Sg(r,e){return N(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var Nn=oe,Uit=N,a3=Math.min,ZS=Math.max,Yit=12,jit=6,Xit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,a){r.prototype.init.call(this,t,a),this._hoverLinkFromSeriesMouseOver=dt(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=dt(this._hideIndicator,this)},e.prototype.doRender=function(t,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,a=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(a);var n=t.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},e.prototype._renderEndsText=function(t,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,l=o.get("textGap"),s=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([s[0]/2,n===0?-l:s[1]+l],u),h=this._applyTransform(n===0?"bottom":"top",u),d=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new Xt({style:_e(p,{x:c[0],y:c[1],verticalAlign:d==="horizontal"?"middle":h,align:d==="horizontal"?h:"center",text:i})}))}},e.prototype._renderBar=function(t){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,l=this._useHandle,s=RV(a,this.api,i),u=n.mainGroup=this._createBarGroup(s),c=new Ct;u.add(c),c.add(n.outOfRange=n3()),c.add(n.inRange=n3(null,l?o3(this._orient):null,dt(this._dragHandle,this,"all",!1),dt(this._dragHandle,this,"all",!0))),c.setClipPath(new Wt({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var h=a.textStyleModel.getTextRect("国"),d=ZS(h.width,h.height);l&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,d,o),this._createHandle(a,u,1,i,d,o)),this._createIndicator(a,u,i,d,o),t.add(u)},e.prototype._createHandle=function(t,a,n,i,o,l){var s=dt(this._dragHandle,this,n,!1),u=dt(this._dragHandle,this,n,!0),c=bn(t.get("handleSize"),i[0]),h=Ge(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=o3(this._orient);h.attr({cursor:d,draggable:!0,drift:s,ondragend:u,onmousemove:function(b){Ri(b.event)}}),h.x=i[0]/2,h.useStyle(t.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ql(h,!0),a.add(h);var p=this.visualMapModel.textStyleModel,y=new Xt({cursor:d,draggable:!0,drift:s,onmousemove:function(b){Ri(b.event)},ondragend:u,style:_e(p,{x:0,y:0,text:""})});y.ensureState("blur").style={opacity:.1},y.stateTransition={duration:200},this.group.add(y);var m=[c,0],_=this._shapes;_.handleThumbs[n]=h,_.handleLabelPoints[n]=m,_.handleLabels[n]=y},e.prototype._createIndicator=function(t,a,n,i,o){var l=bn(t.get("indicatorSize"),n[0]),s=Ge(t.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);s.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(s instanceof or){var c=s.style;s.useStyle(rt({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else s.useStyle(u);a.add(s);var h=this.visualMapModel.textStyleModel,d=new Xt({silent:!0,invisible:!0,style:_e(h,{x:0,y:0,text:""})});this.group.add(d);var p=[(o==="horizontal"?i/2:jit)+n[0]/2,0],y=this._shapes;y.indicator=s,y.indicatorLabel=d,y.indicatorLabelPoint=p,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():i3(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,a=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Nn(a[0],n,i,!0),Nn(a[1],n,i,!0)]},e.prototype._updateInterval=function(t,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];As(a,i,o,t,0);var l=n.getExtent();this._dataInterval=[Nn(i[0],o,l,!0),Nn(i[1],o,l,!0)]},e.prototype._updateView=function(t){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],l=t?o:this._handleEnds,s=this._createBarVisual(this._dataInterval,n,l,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(l,s)},e.prototype._createBarVisual=function(t,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},l=this._makeColorGradient(t,o),s=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(n,s);return{barColor:new gf(0,0,0,1,l),barPoints:u,handlesColor:[l[0].color,l[l.length-1].color]}},e.prototype._makeColorGradient=function(t,a){var n=100,i=[],o=(t[1]-t[0])/n;i.push({color:this.getControllerVisual(t[0],"color",a),offset:0});for(var l=1;l<n;l++){var s=t[0]+o*l;if(s>t[1])break;i.push({color:this.getControllerVisual(s,"color",a),offset:l/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new Ct(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,l=n.handleLabels,s=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",n.mainGroup);Uit([0,1],function(h){var d=o[h];d.setStyle("fill",a.handlesColor[h]),d.y=t[h];var p=Nn(t[h],[0,s[1]],u,!0),y=this.getControllerVisual(p,"symbolSize");d.scaleX=d.scaleY=y/s[0],d.x=s[0]-y/2;var m=mn(n.handleLabelPoints[h],Oo(d,this.group));if(this._orient==="horizontal"){var _=c==="left"||c==="top"?(s[0]-y)/2:(s[0]-y)/-2;m[1]+=_}l[h].setStyle({x:m[0],y:m[1],text:i.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,n,i){var o=this.visualMapModel,l=o.getExtent(),s=o.itemSize,u=[0,s[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var d={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",d),y=this.getControllerVisual(t,"symbolSize"),m=Nn(t,l,u,!0),_=s[0]-y/2,b={x:h.x,y:h.y};h.y=m,h.x=_;var x=mn(c.indicatorLabelPoint,Oo(h,this.group)),w=c.indicatorLabel;w.attr("invisible",!1);var A=this._applyTransform("left",c.mainGroup),M=this._orient,D=M==="horizontal";w.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:D?A:"middle",align:D?"center":A});var L={x:_,y:m,style:{fill:p}},R={style:{x:x[0],y:x[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};h.x=b.x,h.y=b.y,h.animateTo(L,E),w.animateTo(R,E)}else h.attr(L),w.attr(R);this._firstShowIndicator=!1;var O=this._shapes.handleLabels;if(O)for(var P=0;P<O.length;P++)this.api.enterBlur(O[P])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(a){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([a.offsetX,a.offsetY],t._shapes.mainGroup,!0,!0);i[1]=a3(ZS(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],l=n.getExtent();t=a3(ZS(o[0],t),o[1]);var s=Wit(n,l,o),u=[t-s,t+s],c=Nn(t,o,l,!0),h=[Nn(u[0],o,l,!0),Nn(u[1],o,l,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",s):h[1]===1/0?this._showIndicator(c,h[0],"> ",s):this._showIndicator(c,c,"≈ ",s));var d=this._hoverLinkDataIndices,p=[];(a||i3(n))&&(p=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var y=k7(d,p);this._dispatchHighDown("downplay",Sg(y[0],n)),this._dispatchHighDown("highlight",Sg(y[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Kl(t.target,function(s){var u=Mt(s);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),l=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Sg(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,a,n,i){var o=Oo(a,i?null:this.group);return it(t)?mn(t,o,n):Hy(t,o,n)},e.prototype._dispatchHighDown=function(t,a){a&&a.length&&this.api.dispatchAction({type:t,batch:a})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(LV);function n3(r,e,t,a){return new Nr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(n){Ri(n.event)},ondragend:a})}function Wit(r,e,t){var a=Yit/2,n=r.get("hoverLinkDataSize");return n&&(a=Nn(n,e,t,!0)/2),a}function i3(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function o3(r){return r==="vertical"?"ns-resize":"ew-resize"}var Zit={type:"selectDataRange",event:"dataRangeSelected",update:"update"},qit=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},$it=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(a){var n=r.pipelineContext;!a.isTargetSeries(r)||n&&n.large||t.push(mnt(a.stateList,a.targetVisuals,dt(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),a=[];e.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var i=n.getVisualMeta(dt(Kit,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(t);o>=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function Kit(r,e,t,a){for(var n=e.targetVisuals[a],i=ar.prepareVisualTypes(n),o={color:xv(r.getData(),"color")},l=0,s=i.length;l<s;l++){var u=i[l],c=n[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,h,d)}return o.color;function h(p){return o[p]}function d(p,y){o[p]=y}}var l3=N;function Qit(r){var e=r&&r.visualMap;it(e)||(e=e?[e]:[]),l3(e,function(t){if(t){Lu(t,"splitList")&&!Lu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var a=t.pieces;a&&it(a)&&l3(a,function(n){xt(n)&&(Lu(n,"start")&&!Lu(n,"min")&&(n.min=n.start),Lu(n,"end")&&!Lu(n,"max")&&(n.max=n.end))})}})}function Lu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var s3=!1;function EV(r){s3||(s3=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Zit,qit),N($it,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Qit))}function IV(r){r.registerComponentModel(Fit),r.registerComponentView(Xit),EV(r)}var Jit=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],tot[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var i=this.option.categories;this.resetVisual(function(o,l){n==="categories"?(o.mappingMethod="category",o.categories=Tt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ot(this._pieceList,function(s){return s=Tt(s),l!=="inRange"&&(s.visual=null),s}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=ar.listVisualTypes(),i=this.isCategory();N(t.pieces,function(l){N(n,function(s){l.hasOwnProperty(s)&&(a[s]=1)})}),N(a,function(l,s){var u=!1;N(this.stateList,function(c){u=u||o(t,c,s)||o(t.target,c,s)},this),!u&&N(this.stateList,function(c){(t[c]||(t[c]={}))[s]=MV.get(s,c==="inRange"?"active":"inactive",i)})},this);function o(l,s,u){return l&&l[s]&&l[s].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).selected||{};if(n.selected=o,N(i,function(s,u){var c=this.getSelectedMapKey(s);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var l=!1;N(i,function(s,u){var c=this.getSelectedMapKey(s);o[c]&&(l?o[c]=!1:l=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Tt(t)},e.prototype.getValueState=function(t){var a=ar.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],l=i.getData();l.each(this.getDataDimensionIndex(l),function(s,u){var c=ar.findPieceIndex(s,n);c===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(c,h){var d=i.getRepresentValue({interval:c});h||(h=i.getValueState(d));var p=t(d,h);c[0]===-1/0?n[0]=p:c[1]===1/0?n[1]=p:a.push({value:c[0],color:p},{value:c[1],color:p})}var l=this._pieceList.slice();if(!l.length)l.push({interval:[-1/0,1/0]});else{var s=l[0].interval[0];s!==-1/0&&l.unshift({interval:[-1/0,s]}),s=l[l.length-1].interval[1],s!==1/0&&l.push({interval:[s,1/0]})}var u=-1/0;return N(l,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=Xo(gy.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e})(gy),tot={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,l=a[0];o<n;l+=i,o++){var s=o===n-1?a[1]:l+i;r.push({interval:[l,s],close:[1,1]})}e.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),Db(r),N(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;N(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),u3(e,r)},pieces:function(r){var e=this.option;N(e.pieces,function(t,a){xt(t)||(t={value:t});var n={text:"",index:a};if(t.label!=null&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],l=n.close=[0,0],s=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var d=[["gte","gt","min"],["lte","lt","max"]][h],p=0;p<3&&o[h]==null;p++)o[h]=t[d[p]],l[h]=s[p],c[h]=p===2;o[h]==null&&(o[h]=u[h])}c[0]&&o[1]===1/0&&(l[0]=0),c[1]&&o[0]===-1/0&&(l[1]=0),o[0]===o[1]&&l[0]&&l[1]&&(n.value=o[0])}n.visual=ar.retrieveVisuals(t),r.push(n)},this),u3(e,r),Db(r),N(r,function(t){var a=t.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function u3(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var eot=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=i.getFont(),l=i.getTextColor(),s=this._getItemAlign(),u=a.itemSize,c=this._getViewData(),h=c.endsText,d=er(a.get("showLabel",!0),!h),p=!a.get("selectedMode");h&&this._renderEndsText(t,h[0],u,d,s),N(c.viewPieceList,function(y){var m=y.piece,_=new Ct;_.onclick=dt(this._onItemClick,this,m),this._enableHoverLink(_,y.indexInModelPieceList);var b=a.getRepresentValue(m);if(this._createItemSymbol(_,b,[0,0,u[0],u[1]],p),d){var x=this.visualMapModel.getValueState(b);_.add(new Xt({style:{x:s==="right"?-n:u[0]+n,y:u[1]/2,text:m.text,verticalAlign:"middle",align:s,font:o,fill:l,opacity:x==="outOfRange"?.5:1},silent:p}))}t.add(_)},this),h&&this._renderEndsText(t,h[1],u,d,s),ns(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var l=n.visualMapModel;l.option.hoverLink&&n.api.dispatchAction({type:o,batch:Sg(l.findTargetDataIndices(a),l)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return RV(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(a){var l=new Ct,s=this.visualMapModel.textStyleModel;l.add(new Xt({style:_e(s,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(l)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=ot(t.getPieceList(),function(l,s){return{piece:l,indexInModelPieceList:s}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n,i){var o=Ge(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=Tt(n.selected),l=a.getSelectedMapKey(t);i==="single"||i===!0?(o[l]=!0,N(o,function(s,u){o[u]=u===l})):o[l]=!o[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e})(LV);function OV(r){r.registerComponentModel(Jit),r.registerComponentView(eot),EV(r)}function rot(r){Gt(IV),Gt(OV)}var aot={label:{enabled:!0},decal:{show:!1}},f3=$t(),not={};function iot(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=Tt(aot);It(a.label,r.getLocaleModel().get("aria"),!1),It(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),c=u.get("show");if(c){var h=mt();r.eachSeries(function(d){if(!d.isColorBySeries()){var p=h.get(d.type);p||(p={},h.set(d.type,p)),f3(d).scope=p}}),r.eachRawSeries(function(d){if(r.isSeriesFiltered(d))return;if(_t(d.enableAriaDecal)){d.enableAriaDecal();return}var p=d.getData();if(d.isColorBySeries()){var x=Ub(d.ecModel,d.name,not,r.getSeriesCount()),w=p.getVisual("decal");p.setVisual("decal",A(w,x))}else{var y=d.getRawData(),m={},_=f3(d).scope;p.each(function(M){var D=p.getRawIndex(M);m[D]=M});var b=y.count();y.each(function(M){var D=m[M],L=y.getName(M)||M+"",R=Ub(d.ecModel,L,_,b),E=p.getItemVisual(D,"decal");p.setItemVisual(D,"decal",A(E,R))})}function A(M,D){var L=M?rt(rt({},D),M):D;return L.dirty=!0,L}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=St(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var d=r.getSeriesCount(),p=h.get(["data","maxCount"])||10,y=h.get(["series","maxCount"])||10,m=Math.min(d,y),_;if(!(d<1)){var b=l();if(b){var x=h.get(["general","withTitle"]);_=o(x,{title:b})}else _=h.get(["general","withoutTitle"]);var w=[],A=d>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);_+=o(A,{seriesCount:d}),r.eachSeries(function(R,E){if(E<m){var O=void 0,P=R.get("name"),k=P?"withName":"withoutName";O=d>1?h.get(["series","multiple",k]):h.get(["series","single",k]),O=o(O,{seriesId:R.seriesIndex,seriesName:R.get("name"),seriesType:s(R.subType)});var V=R.getData();if(V.count()>p){var H=h.get(["data","partialData"]);O+=o(H,{displayCnt:p})}else O+=h.get(["data","allData"]);for(var U=h.get(["data","separator","middle"]),z=h.get(["data","separator","end"]),Y=h.get(["data","excludeDimensionId"]),j=[],$=0;$<V.count();$++)if($<p){var tt=V.getName($),F=Y?te(V.getValues($),function(at,lt){return Bt(Y,lt)===-1}):V.getValues($),W=h.get(["data",tt?"withName":"withoutName"]);j.push(o(W,{name:tt,value:F.join(U)}))}O+=j.join(U)+z,w.push(O)}});var M=h.getModel(["series","multiple","separator"]),D=M.get("middle"),L=M.get("end");_+=w.join(D)+L,u.setAttribute("aria-label",_)}}}}function o(u,c){if(!vt(u))return u;var h=u;return N(c,function(d,p){h=h.replace(new RegExp("\\{\\s*"+p+"\\s*\\}","g"),d)}),h}function l(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function s(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function oot(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},N(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function lot(r){r.registerPreprocessor(oot),r.registerVisual(r.PRIORITY.VISUAL.ARIA,iot)}var c3={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},sot=(function(){function r(e){var t=this._condVal=vt(e)?new RegExp(e):nP(e)?e:null;if(t==null){var a="";le(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return vt(t)?this._condVal.test(e):Qt(t)?this._condVal.test(e+""):!1},r})(),uot=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),fot=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r})(),cot=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r})(),hot=(function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r})(),vot=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,a=t(this.valueGetterParam),n=e?this.valueParser(a):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:a))return!1;return!0},r})();function y2(r,e){if(r===!0||r===!1){var t=new uot;return t.value=r,t}var a="";return NV(r)||le(a),r.and?h3("and",r,e):r.or?h3("or",r,e):r.not?dot(r,e):pot(r,e)}function h3(r,e,t){var a=e[r],n="";it(a)||le(n),a.length||le(n);var i=r==="and"?new fot:new cot;return i.children=ot(a,function(o){return y2(o,t)}),i.children.length||le(n),i}function dot(r,e){var t=r.not,a="";NV(t)||le(a);var n=new hot;return n.child=y2(t,e),n.child||le(a),n}function pot(r,e){for(var t="",a=e.prepareGetValue(r),n=[],i=Yt(r),o=r.parser,l=o?h5(o):null,s=0;s<i.length;s++){var u=i[s];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=gt(c3,u)?c3[u]:u,h=r[u],d=l?l(h):h,p=B9(c,d)||c==="reg"&&new sot(d);p||le(t),n.push(p)}}n.length||le(t);var y=new vot;return y.valueGetterParam=a,y.valueParser=l,y.getValue=e.getValue,y.subCondList=n,y}function NV(r){return xt(r)&&!Sr(r)}var got=(function(){function r(e,t){this._cond=y2(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r})();function yot(r,e){return new got(r,e)}var mot={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,a=yot(r.config,{valueGetterAttrMap:mt({dimension:!0}),prepareGetValue:function(l){var s="",u=l.dimension;gt(l,"dimension")||le(s);var c=e.getDimensionInfo(u);return c||le(s),{dimIdx:c.index}},getValue:function(l){return e.retrieveValueFromItem(t,l.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),a.evaluate()&&n.push(t);return{data:n}}},_ot={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,a="",n=de(t);n.length||le(a);var i=[];N(n,function(c){var h=c.dimension,d=c.order,p=c.parser,y=c.incomparable;if(h==null&&le(a),d!=="asc"&&d!=="desc"&&le(a),y&&y!=="min"&&y!=="max"){var m="";le(m)}if(d!=="asc"&&d!=="desc"){var _="";le(_)}var b=e.getDimensionInfo(h);b||le(a);var x=p?h5(p):null;p&&!x&&le(a),i.push({dimIdx:b.index,parser:x,comparator:new d5(d,y)})});var o=e.sourceFormat;o!==Pr&&o!==tn&&le(a);for(var l=[],s=0,u=e.count();s<u;s++)l.push(e.getRawDataItem(s));return l.sort(function(c,h){for(var d=0;d<i.length;d++){var p=i[d],y=e.retrieveValueFromItem(c,p.dimIdx),m=e.retrieveValueFromItem(h,p.dimIdx);p.parser&&(y=p.parser(y),m=p.parser(m));var _=p.comparator.evaluate(y,m);if(_!==0)return _}return 0}),{data:l}}};function Sot(r){r.registerTransform(mot),r.registerTransform(_ot)}var bot=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,a,n){r.prototype.init.call(this,t,a,n),this._sourceManager=new m5(this),pR(this)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),pR(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Un},e})(Ht),xot=(function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(we);function wot(r){r.registerComponentModel(bot),r.registerComponentView(xot)}var In=Xn.CMD;function Uu(r,e){return Math.abs(r-e)<1e-5}function Xx(r){var e=r.data,t=r.len(),a=[],n,i=0,o=0,l=0,s=0;function u(V,H){n&&n.length>2&&a.push(n),n=[V,H]}function c(V,H,U,z){Uu(V,U)&&Uu(H,z)||n.push(V,H,U,z,U,z)}function h(V,H,U,z,Y,j){var $=Math.abs(H-V),tt=Math.tan($/4)*4/3,F=H<V?-1:1,W=Math.cos(V),at=Math.sin(V),lt=Math.cos(H),ct=Math.sin(H),bt=W*Y+U,Pt=at*j+z,wt=lt*Y+U,pt=ct*j+z,Ot=Y*tt*F,yt=j*tt*F;n.push(bt-Ot*at,Pt+yt*W,wt+Ot*ct,pt-yt*lt,wt,pt)}for(var d,p,y,m,_=0;_<t;){var b=e[_++],x=_===1;switch(x&&(i=e[_],o=e[_+1],l=i,s=o,(b===In.L||b===In.C||b===In.Q)&&(n=[l,s])),b){case In.M:i=l=e[_++],o=s=e[_++],u(l,s);break;case In.L:d=e[_++],p=e[_++],c(i,o,d,p),i=d,o=p;break;case In.C:n.push(e[_++],e[_++],e[_++],e[_++],i=e[_++],o=e[_++]);break;case In.Q:d=e[_++],p=e[_++],y=e[_++],m=e[_++],n.push(i+2/3*(d-i),o+2/3*(p-o),y+2/3*(d-y),m+2/3*(p-m),y,m),i=y,o=m;break;case In.A:var w=e[_++],A=e[_++],M=e[_++],D=e[_++],L=e[_++],R=e[_++]+L;_+=1;var E=!e[_++];d=Math.cos(L)*M+w,p=Math.sin(L)*D+A,x?(l=d,s=p,u(l,s)):c(i,o,d,p),i=Math.cos(R)*M+w,o=Math.sin(R)*D+A;for(var O=(E?-1:1)*Math.PI/2,P=L;E?P>R:P<R;P+=O){var k=E?Math.max(P+O,R):Math.min(P+O,R);h(P,k,w,A,M,D)}break;case In.R:l=i=e[_++],s=o=e[_++],d=l+e[_++],p=s+e[_++],u(d,s),c(d,s,d,p),c(d,p,l,p),c(l,p,l,s),c(l,s,d,s);break;case In.Z:n&&c(i,o,l,s),i=l,o=s;break}}return n&&n.length>2&&a.push(n),a}function Wx(r,e,t,a,n,i,o,l,s,u){if(Uu(r,t)&&Uu(e,a)&&Uu(n,o)&&Uu(i,l)){s.push(o,l);return}var c=2/u,h=c*c,d=o-r,p=l-e,y=Math.sqrt(d*d+p*p);d/=y,p/=y;var m=t-r,_=a-e,b=n-o,x=i-l,w=m*m+_*_,A=b*b+x*x;if(w<h&&A<h){s.push(o,l);return}var M=d*m+p*_,D=-d*b-p*x,L=w-M*M,R=A-D*D;if(L<h&&M>=0&&R<h&&D>=0){s.push(o,l);return}var E=[],O=[];Bo(r,t,n,o,.5,E),Bo(e,a,i,l,.5,O),Wx(E[0],O[0],E[1],O[1],E[2],O[2],E[3],O[3],s,u),Wx(E[4],O[4],E[5],O[5],E[6],O[6],E[7],O[7],s,u)}function Tot(r,e){var t=Xx(r),a=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],l=i[0],s=i[1];o.push(l,s);for(var u=2;u<i.length;){var c=i[u++],h=i[u++],d=i[u++],p=i[u++],y=i[u++],m=i[u++];Wx(l,s,c,h,d,p,y,m,o,e),l=y,s=m}a.push(o)}return a}function PV(r,e,t){var a=r[e],n=r[1-e],i=Math.abs(a/n),o=Math.ceil(Math.sqrt(i*t)),l=Math.floor(t/o);l===0&&(l=1,o=t);for(var s=[],u=0;u<o;u++)s.push(l);var c=o*l,h=t-c;if(h>0)for(var u=0;u<h;u++)s[u%o]+=1;return s}function v3(r,e,t){for(var a=r.r0,n=r.r,i=r.startAngle,o=r.endAngle,l=Math.abs(o-i),s=l*n,u=n-a,c=s>Math.abs(u),h=PV([s,u],c?0:1,e),d=(c?l:u)/h.length,p=0;p<h.length;p++)for(var y=(c?u:l)/h[p],m=0;m<h[p];m++){var _={};c?(_.startAngle=i+d*p,_.endAngle=i+d*(p+1),_.r0=a+y*m,_.r=a+y*(m+1)):(_.startAngle=i+y*m,_.endAngle=i+y*(m+1),_.r0=a+d*p,_.r=a+d*(p+1)),_.clockwise=r.clockwise,_.cx=r.cx,_.cy=r.cy,t.push(_)}}function Aot(r,e,t){for(var a=r.width,n=r.height,i=a>n,o=PV([a,n],i?0:1,e),l=i?"width":"height",s=i?"height":"width",u=i?"x":"y",c=i?"y":"x",h=r[l]/o.length,d=0;d<o.length;d++)for(var p=r[s]/o[d],y=0;y<o[d];y++){var m={};m[u]=d*h,m[c]=y*p,m[l]=h,m[s]=p,m.x+=r.x,m.y+=r.y,t.push(m)}}function d3(r,e,t,a){return r*a-t*e}function Cot(r,e,t,a,n,i,o,l){var s=t-r,u=a-e,c=o-n,h=l-i,d=d3(c,h,s,u);if(Math.abs(d)<1e-6)return null;var p=r-n,y=e-i,m=d3(p,y,c,h)/d;return m<0||m>1?null:new zt(m*s+r,m*u+e)}function Dot(r,e,t){var a=new zt;zt.sub(a,t,e),a.normalize();var n=new zt;zt.sub(n,r,e);var i=n.dot(a);return i}function Ru(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function Mot(r,e,t){for(var a=r.length,n=[],i=0;i<a;i++){var o=r[i],l=r[(i+1)%a],s=Cot(o[0],o[1],l[0],l[1],e.x,e.y,t.x,t.y);s&&n.push({projPt:Dot(s,e,t),pt:s,idx:i})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(_,b){return _.projPt-b.projPt});var u=n[0],c=n[n.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var d=[u.pt.x,u.pt.y],p=[c.pt.x,c.pt.y],y=[d],m=[p],i=u.idx+1;i<=c.idx;i++)Ru(y,r[i].slice());Ru(y,p),Ru(y,d);for(var i=c.idx+1;i<=u.idx+a;i++)Ru(m,r[i%a].slice());return Ru(m,d),Ru(m,p),[{points:y},{points:m}]}function p3(r){var e=r.points,t=[],a=[];zy(e,t,a);var n=new kt(t[0],t[1],a[0]-t[0],a[1]-t[1]),i=n.width,o=n.height,l=n.x,s=n.y,u=new zt,c=new zt;return i>o?(u.x=c.x=l+i/2,u.y=s,c.y=s+o):(u.y=c.y=s+o/2,u.x=l,c.x=l+i),Mot(e,u,c)}function yy(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);yy(r,i[0],n,a),yy(r,i[1],t-n,a)}return a}function Lot(r,e){for(var t=[],a=0;a<e;a++)t.push(Tw(r));return t}function Rot(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function Eot(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function Iot(r,e){var t=[],a=r.shape,n;switch(r.type){case"rect":Aot(a,e,t),n=Wt;break;case"sector":v3(a,e,t),n=Or;break;case"circle":v3({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,t),n=Or;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,l=ot(Tot(r.getUpdatedPathProxy(),o),function(b){return Eot(b)}),s=l.length;if(s===0)yy(p3,{points:l[0]},e,t);else if(s===e)for(var u=0;u<s;u++)t.push({points:l[u]});else{var c=0,h=ot(l,function(b){var x=[],w=[];zy(b,x,w);var A=(w[1]-x[1])*(w[0]-x[0]);return c+=A,{poly:b,area:A}});h.sort(function(b,x){return x.area-b.area});for(var d=e,u=0;u<s;u++){var p=h[u];if(d<=0)break;var y=u===s-1?d:Math.ceil(p.area/c*e);y<0||(yy(p3,{points:p.poly},y,t),d-=y)}}n=Nr;break}if(!n)return Lot(r,e);for(var m=[],u=0;u<t.length;u++){var _=new n;_.setShape(t[u]),Rot(r,_),m.push(_)}return m}function Oot(r,e){var t=r.length,a=e.length;if(t===a)return[r,e];for(var n=[],i=[],o=t<a?r:e,l=Math.min(t,a),s=Math.abs(a-t)/6,u=(l-2)/6,c=Math.ceil(s/u)+1,h=[o[0],o[1]],d=s,p=2;p<l;){var y=o[p-2],m=o[p-1],_=o[p++],b=o[p++],x=o[p++],w=o[p++],A=o[p++],M=o[p++];if(d<=0){h.push(_,b,x,w,A,M);continue}for(var D=Math.min(d,c-1)+1,L=1;L<=D;L++){var R=L/D;Bo(y,_,x,A,R,n),Bo(m,b,w,M,R,i),y=n[3],m=i[3],h.push(n[1],i[1],n[2],i[2],y,m),_=n[5],b=i[5],x=n[6],w=i[6]}d-=D-1}return o===r?[h,e]:[r,h]}function g3(r,e){for(var t=r.length,a=r[t-2],n=r[t-1],i=[],o=0;o<e.length;)i[o++]=a,i[o++]=n;return i}function Not(r,e){for(var t,a,n,i=[],o=[],l=0;l<Math.max(r.length,e.length);l++){var s=r[l],u=e[l],c=void 0,h=void 0;s?u?(t=Oot(s,u),c=t[0],h=t[1],a=c,n=h):(h=g3(n||s,s),c=s):(c=g3(a||u,u),h=u),i.push(c),o.push(h)}return[i,o]}function y3(r){for(var e=0,t=0,a=0,n=r.length,i=0,o=n-2;i<n;o=i,i+=2){var l=r[o],s=r[o+1],u=r[i],c=r[i+1],h=l*c-u*s;e+=h,t+=(l+u)*h,a+=(s+c)*h}return e===0?[r[0]||0,r[1]||0]:[t/e/3,a/e/3,e]}function Pot(r,e,t,a){for(var n=(r.length-2)/6,i=1/0,o=0,l=r.length,s=l-2,u=0;u<n;u++){for(var c=u*6,h=0,d=0;d<l;d+=2){var p=d===0?c:(c+d-2)%s+2,y=r[p]-t[0],m=r[p+1]-t[1],_=e[d]-a[0],b=e[d+1]-a[1],x=_-y,w=b-m;h+=x*x+w*w}h<i&&(i=h,o=u)}return o}function zot(r){for(var e=[],t=r.length,a=0;a<t;a+=2)e[a]=r[t-a-2],e[a+1]=r[t-a-1];return e}function kot(r,e,t,a){for(var n=[],i,o=0;o<r.length;o++){var l=r[o],s=e[o],u=y3(l),c=y3(s);i==null&&(i=u[2]<0!=c[2]<0);var h=[],d=[],p=0,y=1/0,m=[],_=l.length;i&&(l=zot(l));for(var b=Pot(l,s,u,c)*6,x=_-2,w=0;w<x;w+=2){var A=(b+w)%x+2;h[w+2]=l[A]-u[0],h[w+3]=l[A+1]-u[1]}h[0]=l[b]-u[0],h[1]=l[b+1]-u[1];for(var M=a/t,D=-a/2;D<=a/2;D+=M){for(var L=Math.sin(D),R=Math.cos(D),E=0,w=0;w<l.length;w+=2){var O=h[w],P=h[w+1],k=s[w]-c[0],V=s[w+1]-c[1],H=k*R-V*L,U=k*L+V*R;m[w]=H,m[w+1]=U;var z=H-O,Y=U-P;E+=z*z+Y*Y}if(E<y){y=E,p=D;for(var j=0;j<m.length;j++)d[j]=m[j]}}n.push({from:h,to:d,fromCp:u,toCp:c,rotation:-p})}return n}function my(r){return r.__isCombineMorphing}var zV="__mOriginal_";function _y(r,e,t){var a=zV+e,n=r[a]||r[e];r[a]||(r[a]=r[e]);var i=t.replace,o=t.after,l=t.before;r[e]=function(){var s=arguments,u;return l&&l.apply(this,s),i?u=i.apply(this,s):u=n.apply(this,s),o&&o.apply(this,s),u}}function Oh(r,e){var t=zV+e;r[t]&&(r[e]=r[t],r[t]=null)}function m3(r,e){for(var t=0;t<r.length;t++)for(var a=r[t],n=0;n<a.length;){var i=a[n],o=a[n+1];a[n++]=e[0]*i+e[2]*o+e[4],a[n++]=e[1]*i+e[3]*o+e[5]}}function kV(r,e){var t=r.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),n=Not(Xx(t),Xx(a)),i=n[0],o=n[1],l=r.getComputedTransform(),s=e.getComputedTransform();function u(){this.transform=null}l&&m3(i,l),s&&m3(o,s),_y(e,"updateTransform",{replace:u}),e.transform=null;var c=kot(i,o,10,Math.PI),h=[];_y(e,"buildPath",{replace:function(d){for(var p=e.__morphT,y=1-p,m=[],_=0;_<c.length;_++){var b=c[_],x=b.from,w=b.to,A=b.rotation*p,M=b.fromCp,D=b.toCp,L=Math.sin(A),R=Math.cos(A);_h(m,M,D,p);for(var E=0;E<x.length;E+=2){var O=x[E],P=x[E+1],k=w[E],V=w[E+1],H=O*y+k*p,U=P*y+V*p;h[E]=H*R-U*L+m[0],h[E+1]=H*L+U*R+m[1]}var z=h[0],Y=h[1];d.moveTo(z,Y);for(var E=2;E<x.length;){var k=h[E++],V=h[E++],j=h[E++],$=h[E++],tt=h[E++],F=h[E++];z===k&&Y===V&&j===tt&&$===F?d.lineTo(tt,F):d.bezierCurveTo(k,V,j,$,tt,F),z=tt,Y=F}}}})}function m2(r,e,t){if(!r||!e)return e;var a=t.done,n=t.during;kV(r,e),e.__morphT=0;function i(){Oh(e,"buildPath"),Oh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},St({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),a&&a()}},t)),e}function Bot(r,e,t,a,n,i){var o=16;r=n===t?0:Math.round(32767*(r-t)/(n-t)),e=i===a?0:Math.round(32767*(e-a)/(i-a));for(var l=0,s,u=(1<<o)/2;u>0;u/=2){var c=0,h=0;(r&u)>0&&(c=1),(e&u)>0&&(h=1),l+=u*u*(3*c^h),h===0&&(c===1&&(r=u-1-r,e=u-1-e),s=r,r=e,e=s)}return l}function Sy(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=ot(r,function(l){var s=l.getBoundingRect(),u=l.getComputedTransform(),c=s.x+s.width/2+(u?u[4]:0),h=s.y+s.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(h,t),a=Math.max(c,a),n=Math.max(h,n),[c,h]}),o=ot(i,function(l,s){return{cp:l,z:Bot(l[0],l[1],e,t,a,n),path:r[s]}});return o.sort(function(l,s){return l.z-s.z}).map(function(l){return l.path})}function BV(r){return Iot(r.path,r.count)}function Zx(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Vot(r,e,t){var a=[];function n(M){for(var D=0;D<M.length;D++){var L=M[D];my(L)?n(L.childrenRef()):L instanceof Ut&&a.push(L)}}n(r);var i=a.length;if(!i)return Zx();var o=t.dividePath||BV,l=o({path:e,count:i});if(l.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Zx();a=Sy(a),l=Sy(l);for(var s=t.done,u=t.during,c=t.individualDelay,h=new Ci,d=0;d<i;d++){var p=a[d],y=l[d];y.parent=e,y.copyTransform(h),c||kV(p,y)}e.__isCombineMorphing=!0,e.childrenRef=function(){return l};function m(M){for(var D=0;D<l.length;D++)l[D].addSelfToZr(M)}_y(e,"addSelfToZr",{after:function(M){m(M)}}),_y(e,"removeSelfFromZr",{after:function(M){for(var D=0;D<l.length;D++)l[D].removeSelfFromZr(M)}});function _(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Oh(e,"addSelfToZr"),Oh(e,"removeSelfFromZr")}var b=l.length;if(c)for(var x=b,w=function(){x--,x===0&&(_(),s&&s())},d=0;d<b;d++){var A=c?St({delay:(t.delay||0)+c(d,b,a[d],l[d]),done:w},t):t;m2(a[d],l[d],A)}else e.__morphT=0,e.animateTo({__morphT:1},St({during:function(M){for(var D=0;D<b;D++){var L=l[D];L.__morphT=e.__morphT,L.dirtyShape()}u&&u(M)},done:function(){_();for(var M=0;M<r.length;M++)Oh(r[M],"updateTransform");s&&s()}},t));return e.__zr&&m(e.__zr),{fromIndividuals:a,toIndividuals:l,count:b}}function Got(r,e,t){var a=e.length,n=[],i=t.dividePath||BV;function o(p){for(var y=0;y<p.length;y++){var m=p[y];my(m)?o(m.childrenRef()):m instanceof Ut&&n.push(m)}}if(my(r)){o(r.childrenRef());var l=n.length;if(l<a)for(var s=0,u=l;u<a;u++)n.push(Tw(n[s++%l]));n.length=a}else{n=i({path:r,count:a});for(var c=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(c);if(n.length!==a)return console.error("Invalid morphing: unmatched splitted path"),Zx()}n=Sy(n),e=Sy(e);for(var h=t.individualDelay,u=0;u<a;u++){var d=h?St({delay:(t.delay||0)+h(u,a,n[u],e[u])},t):t;m2(n[u],e[u],d)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function _3(r){return it(r[0])}function S3(r,e){for(var t=[],a=r.length,n=0;n<a;n++)t.push({one:r[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%a].many.push(e[n][o])}for(var l=0,n=a-1;n>=0;n--)if(!t[n].many.length){var s=t[l].many;if(s.length<=1)if(l)l=0;else return t;var i=s.length,u=Math.ceil(i/2);t[n].many=s.slice(u,i),t[l].many=s.slice(0,u),l++}return t}var Hot={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var n=Tw(r.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function qS(r,e,t,a,n,i){if(!r.length||!e.length)return;var o=yf("update",a,n);if(!(o&&o.duration>0))return;var l=a.getModel("universalTransition").get("delay"),s=Object.assign({setToFinal:!0},o),u,c;_3(r)&&(u=r,c=e),_3(e)&&(u=e,c=r);function h(b,x,w,A,M){var D=b.many,L=b.one;if(D.length===1&&!M){var R=x?D[0]:L,E=x?L:D[0];if(my(R))h({many:[R],one:E},!0,w,A,!0);else{var O=l?St({delay:l(w,A)},s):s;m2(R,E,O),i(R,E,R,E,O)}}else for(var P=St({dividePath:Hot[t],individualDelay:l&&function(Y,j,$,tt){return l(Y+w,A)}},s),k=x?Vot(D,L,P):Got(L,D,P),V=k.fromIndividuals,H=k.toIndividuals,U=V.length,z=0;z<U;z++){var O=l?St({delay:l(z,U)},s):s;i(V[z],H[z],x?D[z]:b.one,x?b.one:D[z],O)}}for(var d=u?u===r:r.length>e.length,p=u?S3(c,u):S3(d?e:r,[d?r:e]),y=0,m=0;m<p.length;m++)y+=p[m].many.length;for(var _=0,m=0;m<p.length;m++)h(p[m],d,_,y),_+=p[m].many.length}function Fl(r){if(!r)return[];if(it(r)){for(var e=[],t=0;t<r.length;t++)e.push(Fl(r[t]));return e}var a=[];return r.traverse(function(n){n instanceof Ut&&!n.disableMorphing&&!n.invisible&&!n.ignore&&a.push(n)}),a}var VV=1e4,Fot=0,b3=1,x3=2,Uot=$t();function Yot(r,e){for(var t=r.dimensions,a=0;a<t.length;a++){var n=r.getDimensionInfo(t[a]);if(n&&n.otherDims[e]===0)return t[a]}}function jot(r,e,t){var a=r.getDimensionInfo(t),n=a&&a.ordinalMeta;if(a){var i=r.get(a.name,e);return n&&n.categories[i]||i+""}}function w3(r,e,t,a){var n=a?"itemChildGroupId":"itemGroupId",i=Yot(r,n);if(i){var o=jot(r,e,i);return o}var l=r.getRawDataItem(e),s=a?"childGroupId":"groupId";if(l&&l[s])return l[s]+"";if(!a)return t||r.getId(e)}function T3(r){var e=[];return N(r,function(t){var a=t.data,n=t.dataGroupId;if(!(a.count()>VV))for(var i=a.getIndices(),o=0;o<i.length;o++)e.push({data:a,groupId:w3(a,o,n,!1),childGroupId:w3(a,o,n,!0),divide:t.divide,dataIndex:o})}),e}function $S(r,e,t){r.traverse(function(a){a instanceof Ut&&De(a,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function KS(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Eu(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Xot(r,e,t){var a=yf("update",t,e);a&&r.traverse(function(n){if(n instanceof $a){var i=xU(n);i&&n.animateFrom({style:i},a)}})}function Wot(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++){var n=r[a],i=e[a];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function GV(r,e,t){var a=T3(r),n=T3(e);function i(w,A,M,D,L){(M||w)&&A.animateFrom({style:M&&M!==w?rt(rt({},M.style),w.style):w.style},L)}var o=!1,l=Fot,s=mt(),u=mt();a.forEach(function(w){w.groupId&&s.set(w.groupId,!0),w.childGroupId&&u.set(w.childGroupId,!0)});for(var c=0;c<n.length;c++){var h=n[c].groupId;if(u.get(h)){l=b3;break}var d=n[c].childGroupId;if(d&&s.get(d)){l=x3;break}}function p(w,A){return function(M){var D=M.data,L=M.dataIndex;return A?D.getId(L):w?l===b3?M.childGroupId:M.groupId:l===x3?M.childGroupId:M.groupId}}var y=Wot(a,n),m={};if(!y)for(var c=0;c<n.length;c++){var _=n[c],b=_.data.getItemGraphicEl(_.dataIndex);b&&(m[b.id]=!0)}function x(w,A){var M=a[A],D=n[w],L=D.data.hostModel,R=M.data.getItemGraphicEl(M.dataIndex),E=D.data.getItemGraphicEl(D.dataIndex);if(R===E){E&&Xot(E,D.dataIndex,L);return}R&&m[R.id]||E&&(Eu(E),R?(Eu(R),KS(R),o=!0,qS(Fl(R),Fl(E),D.divide,L,w,i)):$S(E,L,w))}new Oi(a,n,p(!0,y),p(!1,y),null,"multiple").update(x).updateManyToOne(function(w,A){var M=n[w],D=M.data,L=D.hostModel,R=D.getItemGraphicEl(M.dataIndex),E=te(ot(A,function(O){return a[O].data.getItemGraphicEl(a[O].dataIndex)}),function(O){return O&&O!==R&&!m[O.id]});R&&(Eu(R),E.length?(N(E,function(O){Eu(O),KS(O)}),o=!0,qS(Fl(E),Fl(R),M.divide,L,w,i)):$S(R,L,M.dataIndex))}).updateOneToMany(function(w,A){var M=a[A],D=M.data.getItemGraphicEl(M.dataIndex);if(!(D&&m[D.id])){var L=te(ot(w,function(E){return n[E].data.getItemGraphicEl(n[E].dataIndex)}),function(E){return E&&E!==D}),R=n[w[0]].data.hostModel;L.length&&(N(L,function(E){return Eu(E)}),D?(Eu(D),KS(D),o=!0,qS(Fl(D),Fl(L),M.divide,R,w[0],i)):N(L,function(E){return $S(E,R,w[0])}))}}).updateManyToMany(function(w,A){new Oi(A,w,function(M){return a[M].data.getId(a[M].dataIndex)},function(M){return n[M].data.getId(n[M].dataIndex)}).update(function(M,D){x(w[M],A[D])}).execute()}).execute(),o&&N(e,function(w){var A=w.data,M=A.hostModel,D=M&&t.getViewOfSeriesModel(M),L=yf("update",M,0);D&&M.isAnimationEnabled()&&L&&L.duration>0&&D.group.traverse(function(R){R instanceof Ut&&!R.animators.length&&R.animateFrom({style:{opacity:0}},L)})})}function A3(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function C3(r){return it(r)?r.sort().join(","):r}function xo(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Zot(r,e){var t=mt(),a=mt(),n=mt();return N(r.oldSeries,function(i,o){var l=r.oldDataGroupIds[o],s=r.oldData[o],u=A3(i),c=C3(u);a.set(c,{dataGroupId:l,data:s}),it(u)&&N(u,function(h){n.set(h,{key:c,dataGroupId:l,data:s})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),l=i.getData(),s=A3(i),u=C3(s),c=a.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:xo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:xo(l),data:l}]});else if(it(s)){var h=[];N(s,function(y){var m=a.get(y);m.data&&h.push({dataGroupId:m.dataGroupId,divide:xo(m.data),data:m.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:l,divide:xo(l)}]})}else{var d=n.get(s);if(d){var p=t.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:xo(d.data)}],newSeries:[]},t.set(d.key,p)),p.newSeries.push({dataGroupId:o,data:l,divide:xo(l)})}}}}),t}function D3(r,e){for(var t=0;t<r.length;t++){var a=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(a)return t}}function qot(r,e,t,a){var n=[],i=[];N(de(r.from),function(o){var l=D3(e.oldSeries,o);l>=0&&n.push({dataGroupId:e.oldDataGroupIds[l],data:e.oldData[l],divide:xo(e.oldData[l]),groupIdDim:o.dimension})}),N(de(r.to),function(o){var l=D3(t.updatedSeries,o);if(l>=0){var s=t.updatedSeries[l].getData();i.push({dataGroupId:e.oldDataGroupIds[l],data:s,divide:xo(s),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&GV(n,i,a)}function $ot(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){N(de(a.seriesTransition),function(n){N(de(n.to),function(i){for(var o=a.updatedSeries,l=0;l<o.length;l++)(i.seriesIndex!=null&&i.seriesIndex===o[l].seriesIndex||i.seriesId!=null&&i.seriesId===o[l].id)&&(o[l][vg]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,a){var n=Uot(t);if(n.oldSeries&&a.updatedSeries&&a.optionChanged){var i=a.seriesTransition;if(i)N(de(i),function(p){qot(p,n,a,t)});else{var o=Zot(n,a);N(o.keys(),function(p){var y=o.get(p);GV(y.oldSeries,y.newSeries,t)})}N(a.updatedSeries,function(p){p[vg]&&(p[vg]=!1)})}for(var l=e.getSeries(),s=n.oldSeries=[],u=n.oldDataGroupIds=[],c=n.oldData=[],h=0;h<l.length;h++){var d=l[h].getData();d.count()<VV&&(s.push(l[h]),u.push(l[h].get("dataGroupId")),c.push(d))}})}Gt([nZ]);Gt([JW]);Gt([TZ,VZ,qZ,Mq,Vq,A$,J$,zK,nQ,fQ,_Q,vJ,BJ,qJ,ctt,ptt,Att,Itt,Utt,qtt,iet,Yet]);Gt(urt);Gt(Prt);Gt(BB);Gt(Zrt);Gt(w4);Gt(Qrt);Gt(lat);Gt(Zat);Gt(vnt);Gt(Iv);Gt(Rnt);Gt(Ont);Gt(Unt);Gt($nt);Gt(rit);Gt(sit);Gt(mit);Gt(zit);Gt(CV);Gt(DV);Gt(rot);Gt(IV);Gt(OV);Gt(lot);Gt(Sot);Gt(wot);Gt($ot);Gt(_W);const Kot=Object.freeze(Object.defineProperty({__proto__:null,Axis:en,ChartView:fe,ComponentModel:Ht,ComponentView:we,List:Er,Model:ee,PRIORITY:W5,SeriesModel:pe,color:HH,connect:Mj,dataTool:Pj,dependencies:fj,disConnect:Lj,disconnect:ek,dispose:Rj,env:Ft,extendChartView:oW,extendComponentModel:aW,extendComponentView:nW,extendSeriesModel:iW,format:XX,getCoordinateSystemDimensions:Ij,getInstanceByDom:eT,getInstanceById:Ej,getMap:Nj,graphic:jX,helper:kX,init:Dj,innerDrawElementOnCanvas:Kw,matrix:_H,number:UX,parseGeoJSON:nx,parseGeoJson:nx,registerAction:wn,registerCoordinateSystem:nk,registerLayout:ik,registerLoading:oT,registerLocale:Ow,registerMap:ok,registerPostInit:rk,registerPostUpdate:ak,registerPreprocessor:aT,registerProcessor:nT,registerTheme:rT,registerTransform:lk,registerUpdateLifecycle:Jy,registerVisual:Wo,setCanvasCreator:Oj,setPlatformAPI:J3,throttle:Ky,time:YX,use:Gt,util:WX,vector:iH,version:uj,zrUtil:Q8,zrender:x7},Symbol.toStringTag,{value:"Module"}));var mi={},_i={},QS={},M3;function Qot(){return M3||(M3=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1;r.default=function(){return"".concat(e++)}})(QS)),QS}var eh={},rh={},JS={},L3;function HV(){return L3||(L3=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){for(var i=this,o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];clearTimeout(n),n=setTimeout(function(){t.apply(i,l)},a)}}})(JS)),JS}var Si={},R3;function _2(){return R3||(R3=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.SizeSensorId=Si.SensorTabIndex=Si.SensorClassName=void 0,Si.SizeSensorId="size-sensor-id",Si.SensorClassName="size-sensor-object",Si.SensorTabIndex="-1"),Si}var E3;function Jot(){if(E3)return rh;E3=1,Object.defineProperty(rh,"__esModule",{value:!0}),rh.createSensor=void 0;var r=t(HV()),e=_2();function t(a){return a&&a.__esModule?a:{default:a}}return rh.createSensor=function(n,i){var o=void 0,l=[],s=function(){getComputedStyle(n).position==="static"&&(n.style.position="relative");var y=document.createElement("object");return y.onload=function(){y.contentDocument.defaultView.addEventListener("resize",u),u()},y.style.display="block",y.style.position="absolute",y.style.top="0",y.style.left="0",y.style.height="100%",y.style.width="100%",y.style.overflow="hidden",y.style.pointerEvents="none",y.style.zIndex="-1",y.style.opacity="0",y.setAttribute("class",e.SensorClassName),y.setAttribute("tabindex",e.SensorTabIndex),y.type="text/html",n.appendChild(y),y.data="about:blank",y},u=(0,r.default)(function(){l.forEach(function(p){p(n)})}),c=function(y){o||(o=s()),l.indexOf(y)===-1&&l.push(y)},h=function(){o&&o.parentNode&&(o.contentDocument&&o.contentDocument.defaultView.removeEventListener("resize",u),o.parentNode.removeChild(o),n.removeAttribute(e.SizeSensorId),o=void 0,l=[],i&&i())},d=function(y){var m=l.indexOf(y);m!==-1&&l.splice(m,1),l.length===0&&o&&h()};return{element:n,bind:c,destroy:h,unbind:d}},rh}var ah={},I3;function tlt(){if(I3)return ah;I3=1,Object.defineProperty(ah,"__esModule",{value:!0}),ah.createSensor=void 0;var r=_2(),e=t(HV());function t(a){return a&&a.__esModule?a:{default:a}}return ah.createSensor=function(n,i){var o=void 0,l=[],s=(0,e.default)(function(){l.forEach(function(p){p(n)})}),u=function(){var y=new ResizeObserver(s);return y.observe(n),s(),y},c=function(y){o||(o=u()),l.indexOf(y)===-1&&l.push(y)},h=function(){o&&o.disconnect(),l=[],o=void 0,n.removeAttribute(r.SizeSensorId),i&&i()},d=function(y){var m=l.indexOf(y);m!==-1&&l.splice(m,1),l.length===0&&o&&h()};return{element:n,bind:c,destroy:h,unbind:d}},ah}var O3;function elt(){if(O3)return eh;O3=1,Object.defineProperty(eh,"__esModule",{value:!0}),eh.createSensor=void 0;var r=Jot(),e=tlt();return eh.createSensor=typeof ResizeObserver<"u"?e.createSensor:r.createSensor,eh}var N3;function rlt(){if(N3)return _i;N3=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.removeSensor=_i.getSensor=_i.Sensors=void 0;var r=a(Qot()),e=elt(),t=_2();function a(o){return o&&o.__esModule?o:{default:o}}var n=_i.Sensors={};function i(o){o&&n[o]&&delete n[o]}return _i.getSensor=function(l){var s=l.getAttribute(t.SizeSensorId);if(s&&n[s])return n[s];var u=(0,r.default)();l.setAttribute(t.SizeSensorId,u);var c=(0,e.createSensor)(l,function(){return i(u)});return n[u]=c,c},_i.removeSensor=function(l){var s=l.element.getAttribute(t.SizeSensorId);l.destroy(),i(s)},_i}var P3;function alt(){if(P3)return mi;P3=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.ver=mi.clear=mi.bind=void 0;var r=rlt();return mi.bind=function(t,a){var n=(0,r.getSensor)(t);return n.bind(a),function(){n.unbind(a)}},mi.clear=function(t){var a=(0,r.getSensor)(t);(0,r.removeSensor)(a)},mi.ver="1.0.3",mi}var z3=alt();function k3(r,e){var t={};return e.forEach(function(a){t[a]=r[a]}),t}function tb(r){return typeof r=="function"}function nlt(r){return typeof r=="string"}var eb,B3;function ilt(){return B3||(B3=1,eb=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var a,n,i;if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(n=a;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),a=i.length,a!==Object.keys(t).length)return!1;for(n=a;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=a;n--!==0;){var o=i[n];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}),eb}var olt=ilt();const Iu=W3(olt);var llt=(function(r){Z(e,r);function e(t){var a=r.call(this,t)||this;return a.echarts=t.echarts,a.ele=null,a.isInitialResize=!0,a.eventHandlerRefs={},a}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var a=this.props.shouldSetOption;if(!(tb(a)&&!a(t,this.props))){if(!Iu(t.theme,this.props.theme)||!Iu(t.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var n=this.getEchartsInstance();Iu(t.onEvents,this.props.onEvents)||(this.unbindEvents(n),this.bindEvents(n,this.props.onEvents));var i=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];Iu(k3(this.props,i),k3(t,i))||this.updateEChartsOption(),(!Iu(t.style,this.props.style)||!Iu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.initEchartsInstance=function(){return LM(this,void 0,void 0,function(){var t=this;return RM(this,function(a){return[2,new Promise(function(n){t.echarts.init(t.ele,t.props.theme,t.props.opts);var i=t.getEchartsInstance();i.on("finished",function(){var o=t.ele.clientWidth,l=t.ele.clientHeight;t.echarts.dispose(t.ele);var s=gh({width:o,height:l},t.props.opts);n(t.echarts.init(t.ele,t.props.theme,s))})})]})})},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},e.prototype.dispose=function(){if(this.ele){try{z3.clear(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){return LM(this,void 0,void 0,function(){var t,a,n,i,o,l,s=this;return RM(this,function(u){switch(u.label){case 0:return t=this.props,a=t.onEvents,n=t.onChartReady,i=t.autoResize,o=i===void 0?!0:i,[4,this.initEchartsInstance()];case 1:return u.sent(),l=this.updateEChartsOption(),this.bindEvents(l,a||{}),tb(n)&&n(l),this.ele&&o&&z3.bind(this.ele,function(){s.resize()}),[2]}})})},e.prototype.bindEvents=function(t,a){var n=this,i=function(l,s){if(nlt(l)&&tb(s)){var u=function(c){s(c,t)};t.on(l,u),n.eventHandlerRefs[l]=u}};for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&i(o,a[o])},e.prototype.unbindEvents=function(t){for(var a=0,n=Object.entries(this.eventHandlerRefs);a<n.length;a++){var i=n[a],o=i[0],l=i[1];t.off(o,l)}this.eventHandlerRefs={}},e.prototype.updateEChartsOption=function(){var t=this.props,a=t.option,n=t.notMerge,i=n===void 0?!1:n,o=t.replaceMerge,l=o===void 0?null:o,s=t.lazyUpdate,u=s===void 0?!1:s,c=t.showLoading,h=t.loadingOption,d=h===void 0?null:h,p=this.getEchartsInstance();return p.setOption(a,{notMerge:i,replaceMerge:l,lazyUpdate:u}),c?p.showLoading(d):p.hideLoading(),p},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize({width:"auto",height:"auto"})}catch(a){console.warn(a)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,a=this.props,n=a.style,i=a.className,o=i===void 0?"":i;a.echarts,a.option,a.theme,a.notMerge,a.replaceMerge,a.lazyUpdate,a.showLoading,a.loadingOption,a.opts,a.onChartReady,a.onEvents,a.shouldSetOption,a.autoResize;var l=P8(a,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),s=gh({height:300},n);return c8.createElement("div",gh({ref:function(u){t.ele=u},style:s,className:"echarts-for-react ".concat(o)},l))},e})(Oe.PureComponent),xa=(function(r){Z(e,r);function e(t){var a=r.call(this,t)||this;return a.echarts=Kot,a}return e})(llt);const wa={backgroundColor:"transparent",textStyle:{color:"#94a3b8"},legend:{textStyle:{color:"#94a3b8"}},title:{textStyle:{color:"#e0e6ed"}}},tg=[["#1d4ed8","#60a5fa"],["#7c3aed","#c084fc"],["#16a34a","#4ade80"],["#b45309","#fbbf24"],["#dc2626","#f87171"]];function V3(r){return r<60?`${Math.round(r)}s`:r<3600?`${Math.round(r/60)}m`:`${(r/3600).toFixed(1)}h`}function slt({tasks:r,prdPhases:e}){const{t}=vr(),a=[],n={};for(const p of r){const y=p.stageName||t.stageUncategorized;n[y]||(a.push(y),n[y]={count:0,prd:p.prdPhase||"",seconds:0}),n[y].count++,p.startedAt&&p.completedAt&&(n[y].seconds+=(new Date(p.completedAt).getTime()-new Date(p.startedAt).getTime())/1e3)}const i={},o=e||[...new Set(r.map(p=>p.prdPhase).filter(Boolean))];o.forEach((p,y)=>{i[p]=tg[y%tg.length]});const l=a.map(p=>Kx(p,t)),s=a.map(p=>n[p].count),u=[...l].reverse(),c={...wa,tooltip:{trigger:"axis",formatter:p=>{const y=Array.isArray(p)?p[0]:p,m=a.length-1-u.indexOf(y.name),_=a[m],b=n[_];let x=`<b>${y.name}</b><br/>${t.tipTaskCount}: ${b.count}`;return b.seconds>0&&(x+=`<br/>${t.tipDuration}: ${V3(b.seconds)}`),x}},grid:{left:10,right:80,top:5,bottom:5,containLabel:!0},yAxis:{type:"category",data:u,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:[...s].reverse().map((p,y)=>{const m=a.length-1-y,_=n[a[m]].prd,[b,x]=i[_]||tg[0];return{value:p,itemStyle:{borderRadius:[0,4,4,0],color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:b},{offset:1,color:x}]}}}}),label:{show:!0,position:"right",color:"#94a3b8",fontSize:10,formatter:p=>{const y=a.length-1-p.dataIndex,m=a[y],_=n[m];let b=`${p.value}`;return _.seconds>0&&(b+=` · ${V3(_.seconds)}`),b}},barWidth:"55%"}]},h=Math.max(300,l.length*40),d=h>480;return G.jsxs("div",{children:[G.jsx("div",{style:d?{maxHeight:480,overflowY:"auto"}:void 0,children:G.jsx(xa,{option:c,style:{height:h}})}),o.length>0&&G.jsx("div",{className:"flex gap-4 justify-center mt-3",children:o.map(p=>{const[y,m]=i[p]||tg[0];return G.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-[#6b7b8d]",children:[G.jsx("span",{className:"w-2.5 h-2.5 rounded-sm inline-block",style:{background:`linear-gradient(180deg, ${m}, ${y})`}}),p]},p)})})]})}const G3=["#ef4444","#f59e0b","#06b6d4","#a855f7","#3b82f6","#22c55e","#f97316","#ec4899"];function ult({deviations:r}){const{t:e}=vr(),t={};for(const o of r){const l=K3(o.rootCauseCategory,e);t[l]=(t[l]||0)+1}let a=0;const n=Object.entries(t).sort((o,l)=>l[1]-o[1]).map(([o,l])=>({value:l,name:o,itemStyle:{color:G3[a++%G3.length]}}));if(n.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoDeviation});const i={...wa,tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},series:[{type:"pie",radius:["42%","70%"],center:["50%","52%"],label:{color:"#94a3b8",fontSize:12},data:n,emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}}}]};return G.jsx(xa,{option:i,style:{height:320}})}const flt={"ui-spacing":"#f59e0b",layout:"#3b82f6","component-usage":"#a855f7",i18n:"#06b6d4",logic:"#ef4444",process:"#22c55e",other:"#94a3b8"};function clt({deviations:r}){const{t:e}=vr(),t={},a={};for(const s of r){const u=Vu(s.deviationCategory,e);t[u]=(t[u]||0)+1,a[u]=s.deviationCategory}if(Object.keys(t).length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoDeviation});const n=Object.entries(t).sort((s,u)=>s[1]-u[1]),i=n.map(([s])=>s),o=n.map(([s,u])=>({value:u,itemStyle:{color:flt[a[s]]||"#94a3b8"}})),l={...wa,tooltip:{trigger:"axis"},grid:{left:20,right:20,top:10,bottom:5,containLabel:!0},yAxis:{type:"category",data:i,axisLabel:{color:"#6b7b8d",fontSize:11},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:o,label:{show:!0,position:"right",color:"#94a3b8",fontSize:12},barWidth:"45%",itemStyle:{borderRadius:[0,4,4,0]}}]};return G.jsx(xa,{option:l,style:{height:320}})}const hlt=/\.(md|mdx|txt|docx|doc|pdf|png|jpg|jpeg|svg|ico)$/i;function H3(r){return!!r&&!hlt.test(r)}function vlt({deviations:r,bugs:e}){const{t}=vr(),a={};for(const s of r)if(s.files)for(const u of s.files)H3(u)&&(a[u]=(a[u]||0)+1);for(const s of e)if(s.files)for(const u of s.files)H3(u)&&(a[u]=(a[u]||0)+1);const n=Object.entries(a).sort((s,u)=>s[1]-u[1]),i=n.map(([s])=>s),o=n.map(([,s])=>s);if(i.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:t.chartNoFileHotspot});const l={...wa,tooltip:{trigger:"axis"},grid:{left:20,right:30,top:10,bottom:5,containLabel:!0},yAxis:{type:"category",data:i,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:o.map(s=>({value:s,itemStyle:{borderRadius:[0,4,4,0],color:s>=10?"#ef4444":s>=5?"#f59e0b":s>=3?"#3b82f6":"#22c55e"}})),label:{show:!0,position:"right",color:"#94a3b8",fontSize:11},barWidth:"50%"}]};return G.jsx(xa,{option:l,style:{height:Math.max(200,i.length*30)}})}function dlt({deviations:r,rules:e}){var u,c;const{t}=vr();if(r.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:t.chartNoTrend});const a=4,n=[],i=[],o=[];for(let h=0;h<r.length;h+=a){const d=r.slice(h,h+a),p=((u=d[0])==null?void 0:u.deviationId)||"",y=((c=d[d.length-1])==null?void 0:c.deviationId)||"";n.push(p===y?p:`${p}
110
110
  ~${y}`),i.push(d.length)}const l=r.map(h=>h.deviationId);for(let h=0;h<n.length;h++){const d=Math.min((h+1)*a,r.length),p=new Set(l.slice(0,d)),y=e.filter(m=>m.status!=="pending"&&m.sourceDeviation&&p.has(m.sourceDeviation)).length;o.push(y)}const s={...wa,tooltip:{trigger:"axis"},grid:{left:20,right:20,top:30,bottom:30,containLabel:!0},legend:{data:[t.chartDeviationCount,t.chartAccumRules],textStyle:{color:"#6b7b8d"},top:0},xAxis:{type:"category",data:n,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},yAxis:[{type:"value",name:t.chartQuantity,axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}},nameTextStyle:{color:"#6b7b8d"}},{type:"value",name:t.chartRules,axisLabel:{color:"#6b7b8d"},splitLine:{show:!1},nameTextStyle:{color:"#6b7b8d"}}],series:[{name:t.chartDeviationCount,type:"bar",data:i,itemStyle:{color:"#f59e0b",borderRadius:[4,4,0,0]},barWidth:"40%"},{name:t.chartAccumRules,type:"line",yAxisIndex:1,data:o,lineStyle:{color:"#22c55e",width:2},itemStyle:{color:"#22c55e"},symbol:"circle",symbolSize:8}]};return G.jsx(xa,{option:s,style:{height:320}})}const F3=["#3b82f6","#ef4444","#f59e0b","#a855f7","#06b6d4","#22c55e","#ec4899","#f97316"];function rb(r){return r<60?`${Math.round(r)}s`:r<3600?`${Math.round(r/60)}m`:`${(r/3600).toFixed(1)}h`}function plt({metrics:r}){const{t:e}=vr(),t=r.nodeTimeBreakdown;if(!t||Object.keys(t).length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoNodeTime});const a=Object.entries(t).sort((l,s)=>l[1]-s[1]),n=a.map(([l])=>Kx(l,e)),i=a.map(([,l])=>l),o={...wa,tooltip:{trigger:"axis",formatter:l=>{var c;const u=(c=(Array.isArray(l)?l:[l])[0])==null?void 0:c.dataIndex;return u==null?"":`<b>${n[u]}</b><br/>${e.tipDuration}: ${rb(i[u])}`}},grid:{left:20,right:60,top:10,bottom:5,containLabel:!0},yAxis:{type:"category",data:n,axisLabel:{color:"#6b7b8d",fontSize:11},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d",formatter:l=>rb(l)},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:i.map((l,s)=>({value:l,itemStyle:{borderRadius:[0,4,4,0],color:F3[s%F3.length]}})),label:{show:!0,position:"right",color:"#94a3b8",fontSize:10,formatter:l=>rb(l.value)},barWidth:"50%"}]};return G.jsx(xa,{option:o,style:{height:Math.max(200,n.length*45)}})}function ab(r){return r<60?`${Math.round(r)}s`:r<3600?`${Math.round(r/60)}m`:`${(r/3600).toFixed(1)}h`}function glt({tasks:r}){const{t:e}=vr(),t=r.filter(l=>l.startedAt&&l.completedAt).map(l=>({id:l.taskId,title:l.title,startedAt:l.startedAt,seconds:(new Date(l.completedAt).getTime()-new Date(l.startedAt).getTime())/1e3})).filter(l=>l.seconds>0).sort((l,s)=>new Date(s.startedAt).getTime()-new Date(l.startedAt).getTime()).slice(0,15);if(t.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoTaskTime});const a=[...t].reverse(),n=a.map(l=>`${l.id} ${l.title.length>12?l.title.slice(0,12)+"...":l.title}`),i=a.map(l=>l.seconds),o={...wa,tooltip:{trigger:"axis",formatter:l=>{const s=Array.isArray(l)?l[0]:l,u=a.find(c=>s.name.startsWith(c.id));return`${(u==null?void 0:u.title)||s.name}: ${ab(s.value)}`}},grid:{left:20,right:40,top:10,bottom:5,containLabel:!0},yAxis:{type:"category",data:n,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d",formatter:l=>ab(l)},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:i.map(l=>({value:l,itemStyle:{borderRadius:[0,4,4,0],color:l>=3600?"#ef4444":l>=1800?"#f59e0b":l>=600?"#3b82f6":"#22c55e"}})),label:{show:!0,position:"right",color:"#94a3b8",fontSize:11,formatter:l=>ab(l.value)},barWidth:"50%"}]};return G.jsx(xa,{option:o,style:{height:Math.max(250,t.length*35)}})}const U3=["#3b82f6","#22c55e","#f59e0b","#a855f7","#06b6d4","#ef4444","#ec4899","#f97316"];function ylt(r){return r<60?`${Math.round(r)}s`:r<3600?`${Math.round(r/60)}m`:`${(r/3600).toFixed(1)}h`}function mlt({workflow:r}){const{t:e}=vr(),t={};for(const o of r)if(o.startTime&&o.endTime){const l=(new Date(o.endTime).getTime()-new Date(o.startTime).getTime())/1e3;l>0&&(t[o.stage]=(t[o.stage]||0)+l)}const a=Object.entries(t).filter(([,o])=>o>0);if(a.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoStageTime});const n=a.map(([o,l],s)=>({name:Kx(o,e),value:Math.round(l),itemStyle:{color:U3[s%U3.length]}})),i={...wa,tooltip:{trigger:"item",formatter:o=>`${o.name}: ${ylt(o.value)} (${o.percent.toFixed(1)}%)`},series:[{type:"pie",radius:["42%","70%"],center:["50%","52%"],label:{color:"#94a3b8",fontSize:11,formatter:o=>`${o.name}
111
111
  ${o.percent.toFixed(1)}%`},data:n,emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}}}]};return G.jsx(xa,{option:i,style:{height:320}})}function _lt({reviews:r}){var o,l;const{t:e}=vr();if(r.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoReviewData});const t=3,a=[],n=[];for(let s=0;s<r.length;s+=t){const u=r.slice(s,s+t),c=((o=u[0])==null?void 0:o.reviewId)||"",h=((l=u[u.length-1])==null?void 0:l.reviewId)||"";a.push(c===h?c:`${c}~${h}`);const d=u.filter(p=>p.result==="pass").length;n.push(Math.round(d/u.length*100))}const i={...wa,tooltip:{trigger:"axis",formatter:s=>{const u=Array.isArray(s)?s[0]:s;return`${u.name}: ${u.value}%`}},grid:{left:20,right:20,top:30,bottom:30,containLabel:!0},xAxis:{type:"category",data:a,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},yAxis:{type:"value",min:0,max:100,axisLabel:{color:"#6b7b8d",formatter:"{value}%"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"line",data:n,smooth:!0,lineStyle:{color:"#22c55e",width:2},itemStyle:{color:"#22c55e"},symbol:"circle",symbolSize:8,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(34,197,94,0.25)"},{offset:1,color:"rgba(34,197,94,0.02)"}]}},markLine:{silent:!0,data:[{yAxis:80,label:{formatter:"80%",color:"#6b7b8d",fontSize:10},lineStyle:{color:"#f59e0b",type:"dashed"}}]}}]};return G.jsx(xa,{option:i,style:{height:320}})}const Y3=["#ef4444","#f59e0b","#3b82f6","#a855f7","#06b6d4","#22c55e","#ec4899","#f97316"];function Slt({reviews:r}){const{t:e}=vr(),t={};for(const s of r)if(s.issues)for(const u of s.issues){const c=u.length>30?u.slice(0,30)+"...":u;t[c]=(t[c]||0)+1}const a=Object.entries(t).sort((s,u)=>s[1]-u[1]);if(a.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoReviewIssue});const n=a.slice(-10),i=n.map(([s])=>s),o=n.map(([,s])=>s),l={...wa,tooltip:{trigger:"axis"},grid:{left:20,right:30,top:10,bottom:5,containLabel:!0},yAxis:{type:"category",data:i,axisLabel:{color:"#6b7b8d",fontSize:10},axisLine:{lineStyle:{color:"#1e2d3d"}}},xAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{type:"bar",data:o.map((s,u)=>({value:s,itemStyle:{borderRadius:[0,4,4,0],color:Y3[u%Y3.length]}})),label:{show:!0,position:"right",color:"#94a3b8",fontSize:11},barWidth:"50%"}]};return G.jsx(xa,{option:l,style:{height:Math.max(250,n.length*35)}})}const blt={critical:"#dc2626",high:"#ef4444",medium:"#f59e0b",low:"#3b82f6"};function xlt({bugs:r}){const{t:e}=vr(),t={critical:e.bugCritical,high:e.bugHigh,medium:e.bugMedium,low:e.bugLow},a={};for(const s of r)a[s.severity]=(a[s.severity]||0)+1;if(Object.entries(a).length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoBug});const o=["critical","high","medium","low"].filter(s=>a[s]).map(s=>({name:t[s]||s,value:a[s],itemStyle:{color:blt[s]||"#94a3b8"}})),l={...wa,tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},series:[{type:"pie",radius:["42%","70%"],center:["50%","52%"],label:{color:"#94a3b8",fontSize:12},data:o,emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}}}]};return G.jsx(xa,{option:l,style:{height:320}})}const eg={},j3=[{bg:"#1e3a5f",text:"#60a5fa"},{bg:"#3b1f5e",text:"#c084fc"},{bg:"#14532d",text:"#4ade80"},{bg:"#422006",text:"#fbbf24"}];function nb(r){if(!eg[r]){const e=Object.keys(eg).length;eg[r]=j3[e%j3.length]}return eg[r]}function wlt({items:r,prdPhases:e}){const{t}=vr();return e&&e.forEach(a=>nb(a)),r.length===0?G.jsx("div",{className:"text-[#6b7b8d] text-sm py-8 text-center",children:t.chartNoTimeline}):G.jsx("div",{className:"px-5 max-h-[420px] overflow-y-auto",children:r.map((a,n)=>G.jsxs("div",{className:"flex items-start gap-4 py-2 border-l-2 border-[#1e2d3d] ml-2 pl-4 relative before:content-[''] before:w-2.5 before:h-2.5 before:rounded-full before:bg-green-500 before:absolute before:left-[-6px] before:top-3",children:[G.jsx("div",{className:"text-[11px] text-[#6b7b8d] min-w-[80px] shrink-0",children:q3(a.timestamp)}),G.jsxs("div",{className:"text-xs",children:[a.title,a.prdPhase&&G.jsx("span",{className:"inline-block px-2 py-0.5 rounded ml-1.5 text-[11px]",style:{backgroundColor:nb(a.prdPhase).bg,color:nb(a.prdPhase).text},children:a.prdPhase})]})]},n))})}function Tlt({rules:r,deviations:e}){const{t}=vr(),a=r.filter(i=>i.status!=="pending"),n=r.filter(i=>i.status==="pending");return r.length===0?G.jsx("div",{className:"text-[#6b7b8d] text-sm py-4 text-center",children:t.rulesNoData}):G.jsxs("table",{className:"w-full border-collapse text-[13px]",children:[G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium min-w-[80px]",children:t.rulesSource}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium min-w-[100px]",children:t.rulesCategory}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium min-w-[200px]",children:t.rulesRule}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium min-w-[150px]",children:t.rulesTargetFile})]})}),G.jsxs("tbody",{children:[a.map(i=>{const o=e.find(s=>s.deviationId===i.sourceDeviation),l=i.category?Vu(i.category,t):o?Vu(o.deviationCategory,t):"";return G.jsxs("tr",{className:"hover:bg-[#1a2e40]",children:[G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] min-w-[80px]",children:i.sourceDeviation||"-"}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] min-w-[100px]",children:l&&G.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-[11px] font-medium bg-[#1e3a5f] text-[#60a5fa]",children:l})}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] min-w-[200px]",children:i.content}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-xs text-[#6b7b8d] min-w-[150px]",children:i.file})]},i.ruleId)}),n.map(i=>{const o=e.find(s=>s.deviationId===i.sourceDeviation),l=i.category?Vu(i.category,t):o?Vu(o.deviationCategory,t):"";return G.jsxs("tr",{className:"hover:bg-[#1a2e40] opacity-60",children:[G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] min-w-[80px]",children:i.sourceDeviation||"-"}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] min-w-[100px]",children:G.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-[11px] font-medium bg-[#1e2d3d] text-[#94a3b8]",children:l})}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] min-w-[200px]",children:i.content}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-xs text-[#6b7b8d] italic min-w-[150px]",children:t.rulesPending})]},i.ruleId)})]})]})}const X3=["#3b82f6","#22c55e","#f59e0b","#a855f7","#06b6d4","#ef4444","#ec4899","#f97316"];function Alt({developers:r}){const{t:e}=vr();if(r.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoTeam});const t=r.slice(0,10),a=t.map(i=>i.name),n={...wa,tooltip:{trigger:"axis"},legend:{data:[e.chartCompletedTasks,e.chartDeviations,e.chartBugs],textStyle:{color:"#6b7b8d"},top:0},grid:{left:20,right:20,top:40,bottom:5,containLabel:!0},xAxis:{type:"category",data:a,axisLabel:{color:"#6b7b8d",fontSize:11},axisLine:{lineStyle:{color:"#1e2d3d"}}},yAxis:{type:"value",axisLabel:{color:"#6b7b8d"},splitLine:{lineStyle:{color:"#1e2d3d"}}},series:[{name:e.chartCompletedTasks,type:"bar",data:t.map((i,o)=>({value:i.completedTasks,itemStyle:{color:X3[o%X3.length]}})),barWidth:"20%",itemStyle:{borderRadius:[4,4,0,0]}},{name:e.chartDeviations,type:"bar",data:t.map(i=>({value:i.deviations,itemStyle:{color:"#f59e0b"}})),barWidth:"20%",itemStyle:{borderRadius:[4,4,0,0]}},{name:e.chartBugs,type:"bar",data:t.map(i=>({value:i.bugs,itemStyle:{color:"#ef4444"}})),barWidth:"20%",itemStyle:{borderRadius:[4,4,0,0]}}]};return G.jsx(xa,{option:n,style:{height:320}})}const Clt={completed:"#22c55e","in-progress":"#f59e0b",pending:"#6b7b8d",failed:"#ef4444"};function Dlt({runs:r}){const{t:e}=vr(),t={completed:e.reqCompleted,"in-progress":e.reqInProgress,in_progress:e.reqInProgress,pending:e.reqPending,failed:e.reqFailed},a={};for(const l of r){const s=l.status||"pending";a[s]=(a[s]||0)+1}const n=Object.entries(a);if(n.length===0)return G.jsx("div",{className:"h-80 flex items-center justify-center text-[#6b7b8d] text-sm",children:e.chartNoReqData});const i=n.map(([l,s])=>({name:t[l]||l,value:s,itemStyle:{color:Clt[l]||"#94a3b8"}})),o={...wa,tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},series:[{type:"pie",radius:["42%","70%"],center:["50%","52%"],label:{color:"#94a3b8",fontSize:12},data:i,emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}}}]};return G.jsx(xa,{option:o,style:{height:320}})}function Mlt(r){return r<60?`${Math.round(r)}s`:r<3600?`${Math.round(r/60)}m`:`${(r/3600).toFixed(1)}h`}function Llt(r){const e={};for(const t of r)for(const a of t.developers||[]){const n=a.modules||[];if(!e[a.name])e[a.name]={...a,modules:[...n]};else{const i=e[a.name];i.tasks+=a.tasks,i.completedTasks+=a.completedTasks,i.bugs+=a.bugs,i.deviations+=a.deviations,i.linesAdded+=a.linesAdded,i.linesRemoved+=a.linesRemoved,i.actualWorkSeconds+=a.actualWorkSeconds,i.totalTokens+=a.totalTokens;for(const o of n)i.modules.includes(o)||i.modules.push(o)}}for(const t of Object.values(e))t.firstPassRate=t.tasks>0?t.completedTasks/t.tasks:0;return Object.values(e).sort((t,a)=>a.completedTasks-t.completedTasks)}function Rlt({data:r,onSelectBranch:e}){const{t}=vr(),a=r.runs,n=Llt(a),i=a.reduce((y,m)=>y+m.totals.tasks,0),o=a.reduce((y,m)=>y+m.totals.completedTasks,0),l=a.reduce((y,m)=>y+m.totals.bugs,0),s=a.reduce((y,m)=>y+m.totals.deviations,0),u=a.reduce((y,m)=>y+m.totals.linesAdded,0),c=a.filter(y=>y.status!=="completed").length,h=a.filter(y=>y.status==="completed").length,d=[{label:t.ovTotalReqs,value:`${a.length}`,color:"text-blue-500"},{label:t.ovInProgress,value:`${c}`,color:"text-amber-500"},{label:t.ovCompleted,value:`${h}`,color:"text-green-500"},{label:t.ovTaskCompletion,value:`${o}/${i}`,color:"text-cyan-500"},{label:t.ovTotalDeviations,value:`${s}`,color:"text-amber-500"},{label:t.ovTotalBugs,value:`${l}`,color:"text-red-500"},{label:t.ovCodeLines,value:u>1e3?`${(u/1e3).toFixed(1)}k`:`${u}`,color:"text-purple-500"}],p=a.flatMap(y=>y.highlights.map(m=>({...m,branch:y.branch}))).sort((y,m)=>new Date(m.createdAt).getTime()-new Date(y.createdAt).getTime()).slice(0,10);return G.jsxs("div",{children:[G.jsx("div",{className:"grid grid-cols-4 gap-4 px-8 py-5 max-lg:grid-cols-2 max-sm:grid-cols-2",children:d.map(y=>G.jsxs("div",{className:"bg-[#162231] border border-[#1e2d3d] rounded-[10px] px-5 py-[18px] text-center",children:[G.jsx("div",{className:`text-[28px] font-bold mb-1 ${y.color}`,children:y.value}),G.jsx("div",{className:"text-xs text-[#6b7b8d] uppercase tracking-wide",children:y.label})]},y.label))}),G.jsxs("div",{className:"grid grid-cols-2 gap-4 px-8 pb-5 max-md:grid-cols-1",children:[G.jsx(fr,{title:t.ovReqStatus,children:G.jsx(Dlt,{runs:a})}),G.jsx(fr,{title:t.ovTeamEfficiency,children:G.jsx(Alt,{developers:n})}),G.jsx(fr,{title:t.ovReqList,full:!0,children:G.jsxs("table",{className:"w-full border-collapse text-[13px]",children:[G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovBranch}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovTitle}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovStatus}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovTasks}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovDeviations}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:"Bug"}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovDeveloper}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovStartTime})]})}),G.jsx("tbody",{children:a.map(y=>G.jsxs("tr",{className:"hover:bg-[#1a2e40] cursor-pointer",onClick:()=>e(y.branch),children:[G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-blue-400 hover:underline",children:y.branch}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d]",children:y.title||"-"}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d]",children:G.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-[11px] ${y.status==="completed"?"bg-green-900/30 text-green-400":y.status==="in-progress"?"bg-amber-900/30 text-amber-400":"bg-[#1e2d3d] text-[#6b7b8d]"}`,children:y.status})}),G.jsxs("td",{className:"px-3 py-2 border-b border-[#1e2d3d]",children:[y.totals.completedTasks,"/",y.totals.tasks]}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-amber-500",children:y.totals.deviations}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-red-500",children:y.totals.bugs}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-xs text-[#6b7b8d]",children:y.developers.map(m=>m.name).join(", ")}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-xs text-[#6b7b8d]",children:xg(y.startTime)})]},y.branch))})]})}),G.jsx(fr,{title:t.ovTeamSummary,full:!0,children:G.jsxs("table",{className:"w-full border-collapse text-[13px]",children:[G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovDeveloper}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovTasks}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovDeviations}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:"Bug"}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovLinesAdded}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovAiHours}),G.jsx("th",{className:"text-left px-3 py-2 text-[#6b7b8d] border-b border-[#1e2d3d] font-medium",children:t.ovModule})]})}),G.jsx("tbody",{children:n.map(y=>G.jsxs("tr",{className:"hover:bg-[#1a2e40]",children:[G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] font-medium text-[#e0e6ed]",children:y.name}),G.jsxs("td",{className:"px-3 py-2 border-b border-[#1e2d3d]",children:[G.jsx("span",{className:"text-green-500",children:y.completedTasks}),"/",y.tasks]}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-amber-500",children:y.deviations}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-red-500",children:y.bugs}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d]",children:y.linesAdded.toLocaleString()}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-teal-500",children:Mlt(y.actualWorkSeconds)}),G.jsx("td",{className:"px-3 py-2 border-b border-[#1e2d3d] text-xs text-[#6b7b8d]",children:y.modules.join(", ")||"-"})]},y.name))})]})}),p.length>0&&G.jsx(fr,{title:t.ovHighlights,full:!0,children:G.jsx("div",{className:"space-y-3",children:p.map((y,m)=>G.jsxs("div",{className:"flex items-start gap-3 py-2 border-b border-[#1e2d3d] last:border-b-0",children:[G.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-[11px] shrink-0 mt-0.5 ${y.source==="auto"?"bg-blue-900/30 text-blue-400":"bg-purple-900/30 text-purple-400"}`,children:y.source==="auto"?t.ovAi:t.ovManual}),G.jsx("div",{className:"flex-1 text-[13px] text-[#e0e6ed]",children:y.content}),G.jsxs("div",{className:"text-[11px] text-[#6b7b8d] shrink-0",children:[G.jsx("span",{className:"text-blue-400",children:y.branch})," ",xg(y.createdAt)]})]},m))})})]})]})}function Elt(){const[r,e]=Oe.useState(L8),t=M8(r),a=y=>{e(y),R8(y)},{runs:n,currentRunId:i,setCurrentRunId:o,runData:l,loading:s,connected:u}=w8(),{data:c,loading:h}=T8(),d=i===bg;if(s&&!l&&!d&&n.length!==0)return G.jsx(Ou.Provider,{value:{locale:r,setLocale:a,t},children:G.jsx("div",{className:"min-h-screen flex items-center justify-center text-[#6b7b8d]",children:t.loading})});if(d&&h&&!c)return G.jsx(Ou.Provider,{value:{locale:r,setLocale:a,t},children:G.jsx("div",{className:"min-h-screen flex items-center justify-center text-[#6b7b8d]",children:t.loading})});const p=y=>{const m=n.find(_=>_.branch===y);m&&o(m.runId)};return!d&&!l?G.jsx(Ou.Provider,{value:{locale:r,setLocale:a,t},children:G.jsxs("div",{children:[G.jsx(R1,{runs:n,currentRunId:i,onSelectRun:o,meta:null,connected:u}),G.jsxs("div",{className:"text-center py-20 text-[#6b7b8d]",children:[G.jsx("h2",{className:"text-lg mb-2 text-[#e0e6ed]",children:t.noRunData}),G.jsx("p",{dangerouslySetInnerHTML:{__html:t.noRunDataHint},className:"[&_code]:bg-[#162231] [&_code]:px-2 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-[13px]"})]})]})}):d?G.jsx(Ou.Provider,{value:{locale:r,setLocale:a,t},children:G.jsxs("div",{children:[G.jsx(R1,{runs:n,currentRunId:i,onSelectRun:o,meta:null,connected:u}),c?G.jsx(Rlt,{data:c,onSelectBranch:p}):G.jsxs("div",{className:"text-center py-20 text-[#6b7b8d]",children:[G.jsx("h2",{className:"text-lg mb-2 text-[#e0e6ed]",children:t.noOverviewData}),G.jsx("p",{dangerouslySetInnerHTML:{__html:t.noOverviewDataHint},className:"[&_code]:bg-[#162231] [&_code]:px-2 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-[13px]"})]}),G.jsx("div",{className:"text-center py-6 text-[#3d4f5f] text-xs border-t border-[#1e2d3d] mt-5",children:t.footerOverview})]})}):G.jsx(Ou.Provider,{value:{locale:r,setLocale:a,t},children:G.jsxs("div",{children:[G.jsx(R1,{runs:n,currentRunId:i,onSelectRun:o,meta:l.meta,connected:u}),G.jsx(N8,{data:l}),G.jsxs("div",{className:"grid grid-cols-2 gap-4 px-8 pb-5 max-md:grid-cols-1",children:[Object.keys(l.metrics.nodeTimeBreakdown||{}).length>0&&G.jsx(fr,{title:t.chartNodeTime,children:G.jsx(plt,{metrics:l.metrics})}),l.tasks.length>0&&G.jsx(fr,{title:t.chartTaskRanking,children:G.jsx(glt,{tasks:l.tasks})}),l.workflow.length>0&&G.jsx(fr,{title:t.chartStageTime,children:G.jsx(mlt,{workflow:l.workflow})}),G.jsx(fr,{title:t.chartTimeline,children:G.jsx(wlt,{items:l.timeline,prdPhases:l.meta.prdPhases})}),l.tasks.length>0&&G.jsx(fr,{title:t.chartTaskCompletion,children:G.jsx(slt,{tasks:l.tasks,prdPhases:l.meta.prdPhases})}),l.reviews.length>0&&G.jsx(fr,{title:t.chartFirstPassRate,children:G.jsx(_lt,{reviews:l.reviews})}),l.deviations.length>0&&G.jsx(fr,{title:t.chartDeviationPie,children:G.jsx(ult,{deviations:l.deviations})}),l.deviations.length>0&&G.jsx(fr,{title:t.chartDeviationBar,children:G.jsx(clt,{deviations:l.deviations})}),l.bugs.length>0&&G.jsx(fr,{title:t.chartBugSeverity,children:G.jsx(xlt,{bugs:l.bugs})}),l.reviews.length>0&&G.jsx(fr,{title:t.chartReviewIssues,children:G.jsx(Slt,{reviews:l.reviews})}),(l.deviations.length>0||l.bugs.length>0)&&G.jsx(fr,{title:t.chartFileHotspot,children:G.jsx(vlt,{deviations:l.deviations,bugs:l.bugs})}),l.deviations.length>0&&G.jsx(fr,{title:t.chartDeviationTrend,children:G.jsx(dlt,{deviations:l.deviations,rules:l.rules})}),l.rules.length>0&&G.jsx(fr,{title:t.chartRulesTable,full:!0,children:G.jsx(Tlt,{rules:l.rules,deviations:l.deviations})})]}),G.jsx("div",{className:"text-center py-6 text-[#3d4f5f] text-xs border-t border-[#1e2d3d] mt-5",children:t.footerDashboard})]})})}m8.createRoot(document.getElementById("root")).render(G.jsx(Oe.StrictMode,{children:G.jsx(Elt,{})}));