@ovalbee/reportifact 0.0.1
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.
- package/README.md +841 -0
- package/dist/Chart.vue_vue_type_style_index_0_lang-B4novMFC.cjs +1 -0
- package/dist/Chart.vue_vue_type_style_index_0_lang-BYILFTfl.js +5895 -0
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-BB4dG0CB.cjs +1 -0
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-DPY6mSdA.js +191 -0
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-BZbc-Wkf.js +49 -0
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-WpuALh8Z.cjs +1 -0
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-CDPSu7no.cjs +1 -0
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-CfxCCXmB.js +33 -0
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-BzrxoJW4.cjs +1 -0
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-CO9HvYfr.js +132 -0
- package/dist/Reportifact.vue.d.ts +40 -0
- package/dist/ReportifactWidgetHost-A73gQ3bT.cjs +1 -0
- package/dist/ReportifactWidgetHost-BjKBwCWI.js +17 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BIyC7N9b.cjs +2 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BnrgKBMh.js +2598 -0
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs +1 -0
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-D-oXqmI2.js +59 -0
- package/dist/components/TableOfContents.vue.d.ts +15 -0
- package/dist/composables/useDelayedLoading.d.ts +6 -0
- package/dist/composables/useFetch.d.ts +13 -0
- package/dist/customWidgets.d.ts +18 -0
- package/dist/entries/chart.d.ts +3 -0
- package/dist/entries/contracts.d.ts +3 -0
- package/dist/entries/figure.d.ts +1 -0
- package/dist/entries/host.d.ts +1 -0
- package/dist/entries/imageGallery.d.ts +3 -0
- package/dist/entries/metricCallout.d.ts +2 -0
- package/dist/entries/metricCards.d.ts +2 -0
- package/dist/entries/metricsTable.d.ts +2 -0
- package/dist/entries/timeline.d.ts +2 -0
- package/dist/index-DFz2A8yJ.js +21229 -0
- package/dist/index-DmTzvbys.cjs +47 -0
- package/dist/index.d.ts +6 -0
- package/dist/markdownTable-B5207r3E.js +32 -0
- package/dist/markdownTable-Cbn1Du3L.cjs +2 -0
- package/dist/mediaResolver.d.ts +18 -0
- package/dist/middleware.cjs +1 -0
- package/dist/middleware.d.ts +21 -0
- package/dist/middleware.js +177 -0
- package/dist/portable/ReportifactFigure.vue.d.ts +36 -0
- package/dist/portable/ReportifactWidgetHost.vue.d.ts +17 -0
- package/dist/portable/contracts.d.ts +54 -0
- package/dist/reportifact.cjs +67 -0
- package/dist/reportifact.d.ts +2 -0
- package/dist/reportifact.js +5272 -0
- package/dist/style.css +13 -0
- package/dist/useFetch-BfOAq-Kg.cjs +1 -0
- package/dist/useFetch-CHQm_TmB.js +35 -0
- package/dist/utils/createMarked.d.ts +7 -0
- package/dist/utils/parseIndexMd.d.ts +29 -0
- package/dist/utils/tfeventsParser.cjs +1 -0
- package/dist/utils/tfeventsParser.d.ts +21 -0
- package/dist/utils/tfeventsParser.js +336 -0
- package/dist/widgets/Card.vue.d.ts +6 -0
- package/dist/widgets/Chart.vue.d.ts +26 -0
- package/dist/widgets/HelpTooltip.vue.d.ts +5 -0
- package/dist/widgets/ImageGallery.vue.d.ts +26 -0
- package/dist/widgets/Markdown.vue.d.ts +8 -0
- package/dist/widgets/MetricCallout.vue.d.ts +19 -0
- package/dist/widgets/MetricCards.vue.d.ts +13 -0
- package/dist/widgets/MetricTable.vue.d.ts +6 -0
- package/dist/widgets/MetricsTable.vue.d.ts +17 -0
- package/dist/widgets/ModelClassComparison.vue.d.ts +7 -0
- package/dist/widgets/ModelComparisonGallery.vue.d.ts +15 -0
- package/dist/widgets/Notice.vue.d.ts +6 -0
- package/dist/widgets/ReportifactWidget.vue.d.ts +23 -0
- package/dist/widgets/Scope.vue.d.ts +8 -0
- package/dist/widgets/Table.vue.d.ts +18 -0
- package/dist/widgets/Tensorboard.vue.d.ts +13 -0
- package/dist/widgets/Timeline.vue.d.ts +21 -0
- package/dist/widgets/WidgetWrapper.vue.d.ts +28 -0
- package/dist/widgets/chart-config/barGradient.d.ts +2 -0
- package/dist/widgets/chart-config/barGrouped.d.ts +2 -0
- package/dist/widgets/chart-config/barNormalized.d.ts +2 -0
- package/dist/widgets/chart-config/barStacked.d.ts +2 -0
- package/dist/widgets/chart-config/customGauge.d.ts +2 -0
- package/dist/widgets/chart-config/gaugeGrade.d.ts +2 -0
- package/dist/widgets/chart-config/heatmap.d.ts +2 -0
- package/dist/widgets/chart-config/index.d.ts +4 -0
- package/dist/widgets/chart-config/line.d.ts +2 -0
- package/dist/widgets/chart-config/pie.d.ts +2 -0
- package/dist/widgets/chart-config/radar.d.ts +2 -0
- package/dist/widgets/chart-config/shared.d.ts +15 -0
- package/dist/widgets/chart-config/types.d.ts +96 -0
- package/dist/widgets/chart.cjs +1 -0
- package/dist/widgets/chart.d.ts +6 -0
- package/dist/widgets/chart.js +5 -0
- package/dist/widgets/chartSizing.d.ts +1 -0
- package/dist/widgets/contracts.cjs +1 -0
- package/dist/widgets/contracts.d.ts +2 -0
- package/dist/widgets/contracts.js +1 -0
- package/dist/widgets/figure.cjs +1 -0
- package/dist/widgets/figure.d.ts +6 -0
- package/dist/widgets/figure.js +84 -0
- package/dist/widgets/host.cjs +1 -0
- package/dist/widgets/host.d.ts +6 -0
- package/dist/widgets/host.js +5 -0
- package/dist/widgets/image-gallery.cjs +1 -0
- package/dist/widgets/image-gallery.d.ts +6 -0
- package/dist/widgets/image-gallery.js +5 -0
- package/dist/widgets/markdownTable.d.ts +4 -0
- package/dist/widgets/metric-callout.cjs +1 -0
- package/dist/widgets/metric-callout.d.ts +6 -0
- package/dist/widgets/metric-callout.js +5 -0
- package/dist/widgets/metric-cards.cjs +1 -0
- package/dist/widgets/metric-cards.d.ts +6 -0
- package/dist/widgets/metric-cards.js +5 -0
- package/dist/widgets/metrics-table.cjs +1 -0
- package/dist/widgets/metrics-table.d.ts +6 -0
- package/dist/widgets/metrics-table.js +5 -0
- package/dist/widgets/scope.d.ts +77 -0
- package/dist/widgets/timeline.cjs +1 -0
- package/dist/widgets/timeline.d.ts +6 -0
- package/dist/widgets/timeline.js +5 -0
- package/package.json +125 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const W=require("vue"),s=require("./index-DmTzvbys.cjs"),gr=require("./useFetch-BfOAq-Kg.cjs"),dr=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs");function Ut(i,r,e,t,a,n,o,l){var u=a-i,h=n-r,c=e-i,v=t-r,g=Math.sqrt(c*c+v*v);c/=g,v/=g;var p=u*c+h*v,f=p/g;f*=g;var d=o[0]=i+f*c,S=o[1]=r+f*v;return Math.sqrt((d-a)*(d-a)+(S-n)*(S-n))}var ae=new s.Point,U=new s.Point,$=new s.Point,ie=new s.Point,q=new s.Point,Te=[],Z=new s.Point;function mr(i,r){if(r<=180&&r>0){r=r/180*Math.PI,ae.fromArray(i[0]),U.fromArray(i[1]),$.fromArray(i[2]),s.Point.sub(ie,ae,U),s.Point.sub(q,$,U);var e=ie.len(),t=q.len();if(!(e<.001||t<.001)){ie.scale(1/e),q.scale(1/t);var a=ie.dot(q),n=Math.cos(r);if(n<a){var o=Ut(U.x,U.y,$.x,$.y,ae.x,ae.y,Te);Z.fromArray(Te),Z.scaleAndAdd(q,o/Math.tan(Math.PI-r));var l=$.x!==U.x?(Z.x-U.x)/($.x-U.x):(Z.y-U.y)/($.y-U.y);if(isNaN(l))return;l<0?s.Point.copy(Z,U):l>1&&s.Point.copy(Z,$),Z.toArray(i[1])}}}}function yr(i,r,e){if(e<=180&&e>0){e=e/180*Math.PI,ae.fromArray(i[0]),U.fromArray(i[1]),$.fromArray(i[2]),s.Point.sub(ie,U,ae),s.Point.sub(q,$,U);var t=ie.len(),a=q.len();if(!(t<.001||a<.001)){ie.scale(1/t),q.scale(1/a);var n=ie.dot(r),o=Math.cos(e);if(n<o){var l=Ut(U.x,U.y,$.x,$.y,ae.x,ae.y,Te);Z.fromArray(Te);var u=Math.PI/2,h=Math.acos(q.dot(r)),c=u+h-e;if(c>=u)s.Point.copy(Z,$);else{Z.scaleAndAdd(q,l/Math.tan(Math.PI/2-c));var v=$.x!==U.x?(Z.x-U.x)/($.x-U.x):(Z.y-U.y)/($.y-U.y);if(isNaN(v))return;v<0?s.Point.copy(Z,U):v>1&&s.Point.copy(Z,$)}Z.toArray(i[1])}}}}function Ge(i,r,e,t){var a=e==="normal",n=a?i:i.ensureState(e);n.ignore=r;var o=t.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var l=t.getModel("lineStyle").getLineStyle();a?i.useStyle(l):n.style=l}function Sr(i,r){var e=r.smooth,t=r.points;if(t)if(i.moveTo(t[0][0],t[0][1]),e>0&&t.length>=3){var a=s.dist(t[0],t[1]),n=s.dist(t[1],t[2]);if(!a||!n){i.lineTo(t[1][0],t[1][1]),i.lineTo(t[2][0],t[2][1]);return}var o=Math.min(a,n)*e,l=s.lerp([],t[1],t[0],o/a),u=s.lerp([],t[1],t[2],o/n),h=s.lerp([],l,u,.5);i.bezierCurveTo(l[0],l[1],l[0],l[1],h[0],h[1]),i.bezierCurveTo(u[0],u[1],u[0],u[1],t[2][0],t[2][1])}else for(var c=1;c<t.length;c++)i.lineTo(t[c][0],t[c][1])}function br(i,r,e){var t=i.getTextGuideLine(),a=i.getTextContent();if(!a){t&&i.removeTextGuideLine();return}for(var n=r.normal,o=n.get("show"),l=a.ignore,u=0;u<s.DISPLAY_STATES.length;u++){var h=s.DISPLAY_STATES[u],c=r[h],v=h==="normal";if(c){var g=c.get("show"),p=v?l:s.retrieve2(a.states[h]&&a.states[h].ignore,l);if(p||!s.retrieve2(g,o)){var f=v?t:t&&t.states[h];f&&(f.ignore=!0),t&&Ge(t,!0,h,c);continue}t||(t=new s.Polyline,i.setTextGuideLine(t),!v&&(l||!o)&&Ge(t,!0,"normal",r.normal),i.stateProxy&&(t.stateProxy=i.stateProxy)),Ge(t,!1,h,c)}}if(t){s.defaults(t.style,e),t.style.fill=null;var d=n.get("showAbove"),S=i.textGuideLineConfig=i.textGuideLineConfig||{};S.showAbove=d||!1,t.buildPath=Sr}}function xr(i,r){r=r||"labelLine";for(var e={normal:i.getModel(r)},t=0;t<s.SPECIAL_STATES.length;t++){var a=s.SPECIAL_STATES[t];e[a]=i.getModel([a,r])}return e}var _r=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.hasSymbolVisual=!0,e}return r.prototype.getInitialData=function(e){if(process.env.NODE_ENV!=="production"){var t=e.coordinateSystem;if(t!=="polar"&&t!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return s.createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getLegendIcon=function(e){var t=new s.Group,a=s.createSymbol("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(a),a.setStyle(e.lineStyle);var n=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),l=n==="none"?"circle":n,u=e.itemHeight*.8,h=s.createSymbol(l,(e.itemWidth-u)/2,(e.itemHeight-u)/2,u,u,e.itemStyle.fill);t.add(h),h.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?o:e.iconRotate||0;return h.rotation=c*Math.PI/180,h.setOrigin([e.itemWidth/2,e.itemHeight/2]),l.indexOf("empty")>-1&&(h.style.stroke=h.style.fill,h.style.fill=s.tokens.color.neutral00,h.style.lineWidth=2),t},r.type="series.line",r.dependencies=["grid","polar"],r.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},r})(s.SeriesModel),Ke=(function(i){s.__extends(r,i);function r(e,t,a,n){var o=i.call(this)||this;return o.updateData(e,t,a,n),o}return r.prototype._createSymbol=function(e,t,a,n,o,l){this.removeAll();var u=s.createSymbol(e,-1,-1,2,2,null,l);u.attr({z2:s.retrieve2(o,100),culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),u.drift=Ar,this._symbolType=e,this.add(u)},r.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},r.prototype.getSymbolType=function(){return this._symbolType},r.prototype.getSymbolPath=function(){return this.childAt(0)},r.prototype.highlight=function(){s.enterEmphasis(this.childAt(0))},r.prototype.downplay=function(){s.leaveEmphasis(this.childAt(0))},r.prototype.setZ=function(e,t){var a=this.childAt(0);a.zlevel=e,a.z=t},r.prototype.setDraggable=function(e,t){var a=this.childAt(0);a.draggable=e,a.cursor=!t&&e?"move":a.cursor},r.prototype.updateData=function(e,t,a,n){this.silent=!1;var o=e.getItemVisual(t,"symbol")||"circle",l=e.hostModel,u=r.getSymbolSize(e,t),h=r.getSymbolZ2(e,t),c=o!==this._symbolType,v=n&&n.disableAnimation;if(c){var g=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(o,e,t,u,h,g)}else{var p=this.childAt(0);p.silent=!1;var f={scaleX:u[0]/2,scaleY:u[1]/2};v?p.attr(f):s.updateProps(p,f,l,t),s.saveOldStyle(p)}if(this._updateCommon(e,t,u,a,n),c){var p=this.childAt(0);if(!v){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,s.initProps(p,f,l,t)}}v&&this.childAt(0).stopAnimation("leave")},r.prototype._updateCommon=function(e,t,a,n,o){var l=this.childAt(0),u=e.hostModel,h,c,v,g,p,f,d,S,m;if(n&&(h=n.emphasisItemStyle,c=n.blurItemStyle,v=n.selectItemStyle,g=n.focus,p=n.blurScope,d=n.labelStatesModels,S=n.hoverScale,m=n.cursorStyle,f=n.emphasisDisabled),!n||e.hasItemOption){var y=n&&n.itemModel?n.itemModel:e.getItemModel(t),b=y.getModel("emphasis");h=b.getModel("itemStyle").getItemStyle(),v=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),g=b.get("focus"),p=b.get("blurScope"),f=b.get("disabled"),d=s.getLabelStatesModels(y),S=b.getShallow("scale"),m=y.getShallow("cursor")}var I=e.getItemVisual(t,"symbolRotate");l.attr("rotation",(I||0)*Math.PI/180||0);var D=s.normalizeSymbolOffset(e.getItemVisual(t,"symbolOffset"),a);D&&(l.x=D[0],l.y=D[1]),m&&l.attr("cursor",m);var _=e.getItemVisual(t,"style"),x=_.fill;if(l instanceof s.ZRImage){var A=l.style;l.useStyle(s.extend({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},_))}else l.__isEmptyBrush?l.useStyle(s.extend({},_)):l.useStyle(_),l.style.decal=null,l.setColor(x,o&&o.symbolInnerColor),l.style.strokeNoScale=!0;var C=e.getItemVisual(t,"liftZ"),w=this._z2;C!=null?w==null&&(this._z2=l.z2,l.z2+=C):w!=null&&(l.z2=w,this._z2=null);var M=o&&o.useNameLabel;s.setLabelStyle(l,d,{labelFetcher:u,labelDataIndex:t,defaultText:L,inheritColor:x,defaultOpacity:_.opacity});function L(T){return M?e.getName(T):s.getDefaultLabel(e,T)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var P=l.ensureState("emphasis");P.style=h,l.ensureState("select").style=v,l.ensureState("blur").style=c;var E=S==null||S===!0?Math.max(1.1,3/this._sizeY):isFinite(S)&&S>0?+S:1;P.scaleX=this._sizeX*E,P.scaleY=this._sizeY*E,this.setSymbolScale(1),s.toggleHoverEmphasis(this,g,p,f)},r.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},r.prototype.fadeOut=function(e,t,a){var n=this.childAt(0),o=s.getECData(this).dataIndex,l=a&&a.animation;if(this.silent=n.silent=!0,a&&a.fadeLabel){var u=n.getTextContent();u&&s.removeElement(u,{style:{opacity:0}},t,{dataIndex:o,removeOpt:l,cb:function(){n.removeTextContent()}})}else n.removeTextContent();s.removeElement(n,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:l})},r.getSymbolSize=function(e,t){return s.normalizeSymbolSize(e.getItemVisual(t,"symbolSize"))},r.getSymbolZ2=function(e,t){return e.getItemVisual(t,"z2")},r})(s.Group);function Ar(i,r){this.parent.drift(i,r)}function He(i,r,e,t){return r&&!isNaN(r[0])&&!isNaN(r[1])&&!(t.isIgnore&&t.isIgnore(e))&&!(t.clipShape&&!t.clipShape.contain(r[0],r[1]))&&i.getItemVisual(e,"symbol")!=="none"}function at(i){return i!=null&&!s.isObject(i)&&(i={isIgnore:i}),i||{}}function it(i){var r=i.hostModel,e=r.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:r.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:r.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:s.getLabelStatesModels(r),cursorStyle:r.get("cursor")}}var wr=(function(){function i(r){this.group=new s.Group,this._SymbolCtor=r||Ke}return i.prototype.updateData=function(r,e){this._progressiveEls=null,e=at(e);var t=this.group,a=r.hostModel,n=this._data,o=this._SymbolCtor,l=e.disableAnimation,u=it(r),h={disableAnimation:l},c=e.getSymbolPoint||function(v){return r.getItemLayout(v)};n||t.removeAll(),r.diff(n).add(function(v){var g=c(v);if(He(r,g,v,e)){var p=new o(r,v,u,h);p.setPosition(g),r.setItemGraphicEl(v,p),t.add(p)}}).update(function(v,g){var p=n.getItemGraphicEl(g),f=c(v);if(!He(r,f,v,e)){t.remove(p);return}var d=r.getItemVisual(v,"symbol")||"circle",S=p&&p.getSymbolType&&p.getSymbolType();if(!p||S&&S!==d)t.remove(p),p=new o(r,v,u,h),p.setPosition(f);else{p.updateData(r,v,u,h);var m={x:f[0],y:f[1]};l?p.attr(m):s.updateProps(p,m,a)}t.add(p),r.setItemGraphicEl(v,p)}).remove(function(v){var g=n.getItemGraphicEl(v);g&&g.fadeOut(function(){t.remove(g)},a)}).execute(),this._getSymbolPoint=c,this._data=r},i.prototype.updateLayout=function(){var r=this,e=this._data;e&&e.eachItemGraphicEl(function(t,a){var n=r._getSymbolPoint(a);t.setPosition(n),t.markRedraw()})},i.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=it(r),this._data=null,this.group.removeAll()},i.prototype.incrementalUpdate=function(r,e,t){this._progressiveEls=[],t=at(t);function a(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var n=r.start;n<r.end;n++){var o=e.getItemLayout(n);if(He(e,o,n,t)){var l=new this._SymbolCtor(e,n,this._seriesScope);l.traverse(a),l.setPosition(o),this.group.add(l),e.setItemGraphicEl(n,l),this._progressiveEls.push(l)}}},i.prototype.eachRendered=function(r){s.traverseElements(this._progressiveEls||this.group,r)},i.prototype.remove=function(r){var e=this.group,t=this._data;t&&r?t.eachItemGraphicEl(function(a){a.fadeOut(function(){e.remove(a)},t.hostModel)}):e.removeAll()},i})();function $t(i,r,e){var t=i.getBaseAxis(),a=i.getOtherAxis(t),n=Mr(a,e),o=t.dim,l=a.dim,u=r.mapDimension(l),h=r.mapDimension(o),c=l==="x"||l==="radius"?1:0,v=s.map(i.dimensions,function(f){return r.mapDimension(f)}),g=!1,p=r.getCalculationInfo("stackResultDimension");return s.isDimensionStacked(r,v[0])&&(g=!0,v[0]=p),s.isDimensionStacked(r,v[1])&&(g=!0,v[1]=p),{dataDimsForPoint:v,valueStart:n,valueAxisDim:l,baseAxisDim:o,stacked:!!g,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:r.getCalculationInfo("stackedOverDimension")}}function Mr(i,r){var e=0,t=i.scale.getExtent();return r==="start"?e=t[0]:r==="end"?e=t[1]:s.isNumber(r)&&!isNaN(r)?e=r:t[0]>0?e=t[0]:t[1]<0&&(e=t[1]),e}function Xt(i,r,e,t){var a=NaN;i.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),t)),isNaN(a)&&(a=i.valueStart);var n=i.baseDataOffset,o=[];return o[n]=e.get(i.baseDim,t),o[1-n]=a,r.dataToPoint(o)}function Dr(i,r){var e=[];return r.diff(i).add(function(t){e.push({cmd:"+",idx:t})}).update(function(t,a){e.push({cmd:"=",idx:a,idx1:t})}).remove(function(t){e.push({cmd:"-",idx:t})}).execute(),e}function Ir(i,r,e,t,a,n,o,l){for(var u=Dr(i,r),h=[],c=[],v=[],g=[],p=[],f=[],d=[],S=$t(a,r,o),m=i.getLayout("points")||[],y=r.getLayout("points")||[],b=0;b<u.length;b++){var I=u[b],D=!0,_=void 0,x=void 0;switch(I.cmd){case"=":_=I.idx*2,x=I.idx1*2;var A=m[_],C=m[_+1],w=y[x],M=y[x+1];(isNaN(A)||isNaN(C))&&(A=w,C=M),h.push(A,C),c.push(w,M),v.push(e[_],e[_+1]),g.push(t[x],t[x+1]),d.push(r.getRawIndex(I.idx1));break;case"+":var L=I.idx,P=S.dataDimsForPoint,E=a.dataToPoint([r.get(P[0],L),r.get(P[1],L)]);x=L*2,h.push(E[0],E[1]),c.push(y[x],y[x+1]);var T=Xt(S,a,r,L);v.push(T[0],T[1]),g.push(t[x],t[x+1]),d.push(r.getRawIndex(L));break;case"-":D=!1}D&&(p.push(I),f.push(f.length))}f.sort(function(B,J){return d[B]-d[J]});for(var k=h.length,N=s.createFloat32Array(k),V=s.createFloat32Array(k),O=s.createFloat32Array(k),R=s.createFloat32Array(k),z=[],b=0;b<f.length;b++){var G=f[b],H=b*2,F=G*2;N[H]=h[F],N[H+1]=h[F+1],V[H]=c[F],V[H+1]=c[F+1],O[H]=v[F],O[H+1]=v[F+1],R[H]=g[F],R[H+1]=g[F+1],z[b]=p[G]}return{current:N,next:V,stackedOnCurrent:O,stackedOnNext:R,status:z}}var ee=Math.min,te=Math.max;function oe(i,r){return isNaN(i)||isNaN(r)}function Ze(i,r,e,t,a,n,o,l,u){for(var h,c,v,g,p,f,d=e,S=0;S<t;S++){var m=r[d*2],y=r[d*2+1];if(d>=a||d<0)break;if(oe(m,y)){if(u){d+=n;continue}break}if(d===e)i[n>0?"moveTo":"lineTo"](m,y),v=m,g=y;else{var b=m-h,I=y-c;if(b*b+I*I<.5){d+=n;continue}if(o>0){for(var D=d+n,_=r[D*2],x=r[D*2+1];_===m&&x===y&&S<t;)S++,D+=n,d+=n,_=r[D*2],x=r[D*2+1],m=r[d*2],y=r[d*2+1],b=m-h,I=y-c;var A=S+1;if(u)for(;oe(_,x)&&A<t;)A++,D+=n,_=r[D*2],x=r[D*2+1];var C=.5,w=0,M=0,L=void 0,P=void 0;if(A>=t||oe(_,x))p=m,f=y;else{w=_-h,M=x-c;var E=m-h,T=_-m,k=y-c,N=x-y,V=void 0,O=void 0;if(l==="x"){V=Math.abs(E),O=Math.abs(T);var R=w>0?1:-1;p=m-R*V*o,f=y,L=m+R*O*o,P=y}else if(l==="y"){V=Math.abs(k),O=Math.abs(N);var z=M>0?1:-1;p=m,f=y-z*V*o,L=m,P=y+z*O*o}else V=Math.sqrt(E*E+k*k),O=Math.sqrt(T*T+N*N),C=O/(O+V),p=m-w*o*(1-C),f=y-M*o*(1-C),L=m+w*o*C,P=y+M*o*C,L=ee(L,te(_,m)),P=ee(P,te(x,y)),L=te(L,ee(_,m)),P=te(P,ee(x,y)),w=L-m,M=P-y,p=m-w*V/O,f=y-M*V/O,p=ee(p,te(h,m)),f=ee(f,te(c,y)),p=te(p,ee(h,m)),f=te(f,ee(c,y)),w=m-p,M=y-f,L=m+w*O/V,P=y+M*O/V}i.bezierCurveTo(v,g,p,f,m,y),v=L,g=P}else i.lineTo(m,y)}h=m,c=y,d+=n}return S}var Zt=(function(){function i(){this.smooth=0,this.smoothConstraint=!0}return i})(),Lr=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="ec-polyline",t}return r.prototype.getDefaultStyle=function(){return{stroke:s.tokens.color.neutral99,fill:null}},r.prototype.getDefaultShape=function(){return new Zt},r.prototype.buildPath=function(e,t){var a=t.points,n=0,o=a.length/2;if(t.connectNulls){for(;o>0&&oe(a[o*2-2],a[o*2-1]);o--);for(;n<o&&oe(a[n*2],a[n*2+1]);n++);}for(;n<o;)n+=Ze(e,a,n,o,o,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},r.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,n=a.data,o=s.PathProxy.CMD,l,u,h=t==="x",c=[],v=0;v<n.length;){var g=n[v++],p=void 0,f=void 0,d=void 0,S=void 0,m=void 0,y=void 0,b=void 0;switch(g){case o.M:l=n[v++],u=n[v++];break;case o.L:if(p=n[v++],f=n[v++],b=h?(e-l)/(p-l):(e-u)/(f-u),b<=1&&b>=0){var I=h?(f-u)*b+u:(p-l)*b+l;return h?[e,I]:[I,e]}l=p,u=f;break;case o.C:p=n[v++],f=n[v++],d=n[v++],S=n[v++],m=n[v++],y=n[v++];var D=h?s.cubicRootAt(l,p,d,m,e,c):s.cubicRootAt(u,f,S,y,e,c);if(D>0)for(var _=0;_<D;_++){var x=c[_];if(x<=1&&x>=0){var I=h?s.cubicAt(u,f,S,y,x):s.cubicAt(l,p,d,m,x);return h?[e,I]:[I,e]}}l=m,u=y;break}}},r})(s.Path),Cr=(function(i){s.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r})(Zt),Pr=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="ec-polygon",t}return r.prototype.getDefaultShape=function(){return new Cr},r.prototype.buildPath=function(e,t){var a=t.points,n=t.stackedOnPoints,o=0,l=a.length/2,u=t.smoothMonotone;if(t.connectNulls){for(;l>0&&oe(a[l*2-2],a[l*2-1]);l--);for(;o<l&&oe(a[o*2],a[o*2+1]);o++);}for(;o<l;){var h=Ze(e,a,o,l,l,1,t.smooth,u,t.connectNulls);Ze(e,n,o+h-1,h,l,-1,t.stackedOnSmooth,u,t.connectNulls),o+=h+1,e.closePath()}},r})(s.Path);function me(i,r){return i.type===r}function nt(i,r){if(i.length===r.length){for(var e=0;e<i.length;e++)if(i[e]!==r[e])return;return!0}}function ot(i){for(var r=1/0,e=1/0,t=-1/0,a=-1/0,n=0;n<i.length;){var o=i[n++],l=i[n++];isNaN(o)||(r=Math.min(o,r),t=Math.max(o,t)),isNaN(l)||(e=Math.min(l,e),a=Math.max(l,a))}return[[r,e],[t,a]]}function st(i,r){var e=ot(i),t=e[0],a=e[1],n=ot(r),o=n[0],l=n[1];return Math.max(Math.abs(t[0]-o[0]),Math.abs(t[1]-o[1]),Math.abs(a[0]-l[0]),Math.abs(a[1]-l[1]))}function lt(i){return s.isNumber(i)?i:i?.5:0}function Tr(i,r,e){if(!e.valueDim)return[];for(var t=r.count(),a=s.createFloat32Array(t*2),n=0;n<t;n++){var o=Xt(e,i,r,n);a[n*2]=o[0],a[n*2+1]=o[1]}return a}function re(i,r,e,t,a){var n=e.getBaseAxis(),o=n.dim==="x"||n.dim==="radius"?0:1,l=[],u=0,h=[],c=[],v=[],g=[];if(a){for(u=0;u<i.length;u+=2){var p=r||i;!isNaN(p[u])&&!isNaN(p[u+1])&&g.push(i[u],i[u+1])}i=g}for(u=0;u<i.length-2;u+=2)switch(v[0]=i[u+2],v[1]=i[u+3],c[0]=i[u],c[1]=i[u+1],l.push(c[0],c[1]),t){case"end":h[o]=v[o],h[1-o]=c[1-o],l.push(h[0],h[1]);break;case"middle":var f=(c[o]+v[o])/2,d=[];h[o]=d[o]=f,h[1-o]=c[1-o],d[1-o]=v[1-o],l.push(h[0],h[1]),l.push(d[0],d[1]);break;default:h[o]=c[o],h[1-o]=v[1-o],l.push(h[0],h[1])}return l.push(i[u++],i[u++]),l}function Vr(i,r){var e=[],t=i.length,a,n;function o(c,v,g){var p=c.coord,f=(g-p)/(v.coord-p),d=s.lerp$1(f,[c.color,v.color]);return{coord:g,color:d}}for(var l=0;l<t;l++){var u=i[l],h=u.coord;if(h<0)a=u;else if(h>r){n?e.push(o(n,u,r)):a&&e.push(o(a,u,0),o(a,u,r));break}else a&&(e.push(o(a,u,0)),a=null),e.push(u),n=u}return e}function kr(i,r,e){var t=i.getVisual("visualMeta");if(!(!t||!t.length||!i.count())){if(r.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,n,o=t.length-1;o>=0;o--){var l=i.getDimensionInfo(t[o].dimension);if(a=l&&l.coordDim,a==="x"||a==="y"){n=t[o];break}}if(!n){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=r.getAxis(a),h=s.map(n.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),c=h.length,v=n.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),v.reverse());var g=Vr(h,a==="x"?e.getWidth():e.getHeight()),p=g.length;if(!p&&c)return h[0].coord<0?v[1]?v[1]:h[c-1].color:v[0]?v[0]:h[0].color;var f=10,d=g[0].coord-f,S=g[p-1].coord+f,m=S-d;if(m<.001)return"transparent";s.each(g,function(b){b.offset=(b.coord-d)/m}),g.push({offset:p?g[p-1].offset:.5,color:v[1]||"transparent"}),g.unshift({offset:p?g[0].offset:.5,color:v[0]||"transparent"});var y=new s.LinearGradient(0,0,0,0,g,!0);return y[a]=d,y[a+"2"]=S,y}}function Er(i,r,e){var t=i.get("showAllSymbol"),a=t==="auto";if(!(t&&!a)){var n=e.getAxesByScale("ordinal")[0];if(n&&!(a&&Nr(n,r))){var o=r.mapDimension(n.dim),l={};return s.each(n.getViewLabels(),function(u){var h=n.scale.getRawOrdinalNumber(u.tickValue);l[h]=1}),function(u){return!l.hasOwnProperty(r.get(o,u))}}}}function Nr(i,r){var e=i.getExtent(),t=Math.abs(e[1]-e[0])/i.scale.count();isNaN(t)&&(t=0);for(var a=r.count(),n=Math.max(1,Math.round(a/5)),o=0;o<a;o+=n)if(Ke.getSymbolSize(r,o)[i.isHorizontal()?1:0]*1.5>t)return!1;return!0}function Or(i,r){return isNaN(i)||isNaN(r)}function Rr(i){for(var r=i.length/2;r>0&&Or(i[r*2-2],i[r*2-1]);r--);return r-1}function ut(i,r){return[i[r*2],i[r*2+1]]}function zr(i,r,e){for(var t=i.length/2,a=e==="x"?0:1,n,o,l=0,u=-1,h=0;h<t;h++)if(o=i[h*2+a],!(isNaN(o)||isNaN(i[h*2+1-a]))){if(h===0){n=o;continue}if(n<=r&&o>=r||n>=r&&o<=r){u=h;break}l=h,n=o}return{range:[l,u],t:(r-n)/(o-n)}}function Yt(i){if(i.get(["endLabel","show"]))return!0;for(var r=0;r<s.SPECIAL_STATES.length;r++)if(i.get([s.SPECIAL_STATES[r],"endLabel","show"]))return!0;return!1}function Fe(i,r,e,t){if(me(r,"cartesian2d")){var a=t.getModel("endLabel"),n=a.get("valueAnimation"),o=t.getData(),l={lastFrameIndex:0},u=Yt(t)?function(p,f){i._endLabelOnDuring(p,f,o,l,n,a,r)}:null,h=r.getBaseAxis().isHorizontal(),c=s.createGridClipPath(r,e,t,function(){var p=i._endLabel;p&&e&&l.originalX!=null&&p.attr({x:l.originalX,y:l.originalY})},u);if(!t.get("clip",!0)){var v=c.shape,g=Math.max(v.width,v.height);h?(v.y-=g,v.height+=g*2):(v.x-=g,v.width+=g*2)}return u&&u(1,c),c}else return process.env.NODE_ENV!=="production"&&t.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),s.createPolarClipPath(r,e,t)}function Gr(i,r){var e=r.getBaseAxis(),t=e.isHorizontal(),a=e.inverse,n=t?a?"right":"left":"center",o=t?"middle":a?"top":"bottom";return{normal:{align:i.get("align")||n,verticalAlign:i.get("verticalAlign")||o}}}var Hr=(function(i){s.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.init=function(){var e=new s.Group,t=new wr;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=s.bind(this._changePolyState,this)},r.prototype.render=function(e,t,a){var n=e.coordinateSystem,o=this.group,l=e.getData(),u=e.getModel("lineStyle"),h=e.getModel("areaStyle"),c=l.getLayout("points")||[],v=n.type==="polar",g=this._coordSys,p=this._symbolDraw,f=this._polyline,d=this._polygon,S=this._lineGroup,m=!t.ssr&&e.get("animation"),y=!h.isEmpty(),b=h.get("origin"),I=$t(n,l,b),D=y&&Tr(n,l,I),_=e.get("showSymbol"),x=e.get("connectNulls"),A=_&&!v&&Er(e,l,n),C=this._data;C&&C.eachItemGraphicEl(function(B,J){B.__temp&&(o.remove(B),C.setItemGraphicEl(J,null))}),_||p.remove(),o.add(S);var w=v?!1:e.get("step"),M;n&&n.getArea&&e.get("clip",!0)&&(M=n.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var L=kr(l,n,a)||l.getVisual("style")[l.getVisual("drawType")];if(!(f&&g.type===n.type&&w===this._step))_&&p.updateData(l,{isIgnore:A,clipShape:M,disableAnimation:!0,getSymbolPoint:function(B){return[c[B*2],c[B*2+1]]}}),m&&this._initSymbolLabelAnimation(l,n,M),w&&(D&&(D=re(D,c,n,w,x)),c=re(c,null,n,w,x)),f=this._newPolyline(c),y?d=this._newPolygon(c,D):d&&(S.remove(d),d=this._polygon=null),v||this._initOrUpdateEndLabel(e,n,s.convertToColorString(L)),S.setClipPath(Fe(this,n,!0,e));else{y&&!d?d=this._newPolygon(c,D):d&&!y&&(S.remove(d),d=this._polygon=null),v||this._initOrUpdateEndLabel(e,n,s.convertToColorString(L));var P=S.getClipPath();if(P){var E=Fe(this,n,!1,e);s.initProps(P,{shape:E.shape},e)}else S.setClipPath(Fe(this,n,!0,e));_&&p.updateData(l,{isIgnore:A,clipShape:M,disableAnimation:!0,getSymbolPoint:function(B){return[c[B*2],c[B*2+1]]}}),(!nt(this._stackedOnPoints,D)||!nt(this._points,c))&&(m?this._doUpdateAnimation(l,D,n,a,w,b,x):(w&&(D&&(D=re(D,c,n,w,x)),c=re(c,null,n,w,x)),f.setShape({points:c}),d&&d.setShape({points:c,stackedOnPoints:D})))}var T=e.getModel("emphasis"),k=T.get("focus"),N=T.get("blurScope"),V=T.get("disabled");if(f.useStyle(s.defaults(u.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),s.setStatesStylesFromModel(f,e,"lineStyle"),f.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var O=f.getState("emphasis").style;O.lineWidth=+f.style.lineWidth+1}s.getECData(f).seriesIndex=e.seriesIndex,s.toggleHoverEmphasis(f,k,N,V);var R=lt(e.get("smooth")),z=e.get("smoothMonotone");if(f.setShape({smooth:R,smoothMonotone:z,connectNulls:x}),d){var G=l.getCalculationInfo("stackedOnSeries"),H=0;d.useStyle(s.defaults(h.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),G&&(H=lt(G.get("smooth"))),d.setShape({smooth:R,stackedOnSmooth:H,smoothMonotone:z,connectNulls:x}),s.setStatesStylesFromModel(d,e,"areaStyle"),s.getECData(d).seriesIndex=e.seriesIndex,s.toggleHoverEmphasis(d,k,N,V)}var F=this._changePolyState;l.eachItemGraphicEl(function(B){B&&(B.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=l,this._coordSys=n,this._stackedOnPoints=D,this._points=c,this._step=w,this._valueOrigin=b,e.get("triggerLineEvent")&&(this.packEventData(e,f),d&&this.packEventData(e,d))},r.prototype.packEventData=function(e,t){s.getECData(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},r.prototype.highlight=function(e,t,a,n){var o=e.getData(),l=s.queryDataIndex(o,n);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var u=o.getLayout("points"),h=o.getItemGraphicEl(l);if(!h){var c=u[l*2],v=u[l*2+1];if(isNaN(c)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,v))return;var g=e.get("zlevel")||0,p=e.get("z")||0;h=new Ke(o,l),h.x=c,h.y=v,h.setZ(g,p);var f=h.getSymbolPath().getTextContent();f&&(f.zlevel=g,f.z=p,f.z2=this._polyline.z2+1),h.__temp=!0,o.setItemGraphicEl(l,h),h.stopSymbolAnimation(!0),this.group.add(h)}h.highlight()}else s.ChartView.prototype.highlight.call(this,e,t,a,n)},r.prototype.downplay=function(e,t,a,n){var o=e.getData(),l=s.queryDataIndex(o,n);if(this._changePolyState("normal"),l!=null&&l>=0){var u=o.getItemGraphicEl(l);u&&(u.__temp?(o.setItemGraphicEl(l,null),this.group.remove(u)):u.downplay())}else s.ChartView.prototype.downplay.call(this,e,t,a,n)},r.prototype._changePolyState=function(e){var t=this._polygon;s.setStatesFlag(this._polyline,e),t&&s.setStatesFlag(t,e)},r.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Lr({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},r.prototype._newPolygon=function(e,t){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new Pr({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},r.prototype._initSymbolLabelAnimation=function(e,t,a){var n,o,l=t.getBaseAxis(),u=l.inverse;t.type==="cartesian2d"?(n=l.isHorizontal(),o=!1):t.type==="polar"&&(n=l.dim==="angle",o=!0);var h=e.hostModel,c=h.get("animationDuration");s.isFunction(c)&&(c=c(null));var v=h.get("animationDelay")||0,g=s.isFunction(v)?v(null):v;e.eachItemGraphicEl(function(p,f){var d=p;if(d){var S=[p.x,p.y],m=void 0,y=void 0,b=void 0;if(a)if(o){var I=a,D=t.pointToCoord(S);n?(m=I.startAngle,y=I.endAngle,b=-D[1]/180*Math.PI):(m=I.r0,y=I.r,b=D[0])}else{var _=a;n?(m=_.x,y=_.x+_.width,b=p.x):(m=_.y+_.height,y=_.y,b=p.y)}var x=y===m?0:(b-m)/(y-m);u&&(x=1-x);var A=s.isFunction(v)?v(f):c*x+g,C=d.getSymbolPath(),w=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:A}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:A}),C.disableLabelAnimation=!0}})},r.prototype._initOrUpdateEndLabel=function(e,t,a){var n=e.getModel("endLabel");if(Yt(e)){var o=e.getData(),l=this._polyline,u=o.getLayout("points");if(!u){l.removeTextContent(),this._endLabel=null;return}var h=this._endLabel;h||(h=this._endLabel=new s.ZRText({z2:200}),h.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var c=Rr(u);c>=0&&(s.setLabelStyle(l,s.getLabelStatesModels(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:c,defaultText:function(v,g,p){return p!=null?s.getDefaultInterpolatedLabel(o,p):s.getDefaultLabel(o,v)},enableTextSetter:!0},Gr(n,t)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},r.prototype._endLabelOnDuring=function(e,t,a,n,o,l,u){var h=this._endLabel,c=this._polyline;if(h){e<1&&n.originalX==null&&(n.originalX=h.x,n.originalY=h.y);var v=a.getLayout("points"),g=a.hostModel,p=g.get("connectNulls"),f=l.get("precision"),d=l.get("distance")||0,S=u.getBaseAxis(),m=S.isHorizontal(),y=S.inverse,b=t.shape,I=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,D=(m?d:0)*(y?-1:1),_=(m?0:-d)*(y?-1:1),x=m?"x":"y",A=zr(v,I,x),C=A.range,w=C[1]-C[0],M=void 0;if(w>=1){if(w>1&&!p){var L=ut(v,C[0]);h.attr({x:L[0]+D,y:L[1]+_}),o&&(M=g.getRawValue(C[0]))}else{var L=c.getPointOn(I,x);L&&h.attr({x:L[0]+D,y:L[1]+_});var P=g.getRawValue(C[0]),E=g.getRawValue(C[1]);o&&(M=s.interpolateRawValues(a,f,P,E,A.t))}n.lastFrameIndex=C[0]}else{var T=e===1||n.lastFrameIndex>0?C[0]:0,L=ut(v,T);o&&(M=g.getRawValue(T)),h.attr({x:L[0]+D,y:L[1]+_})}if(o){var k=s.labelInner(h);typeof k.setLabelText=="function"&&k.setLabelText(M)}}},r.prototype._doUpdateAnimation=function(e,t,a,n,o,l,u){var h=this._polyline,c=this._polygon,v=e.hostModel,g=Ir(this._data,e,this._stackedOnPoints,t,this._coordSys,a,this._valueOrigin),p=g.current,f=g.stackedOnCurrent,d=g.next,S=g.stackedOnNext;if(o&&(f=re(g.stackedOnCurrent,g.current,a,o,u),p=re(g.current,null,a,o,u),S=re(g.stackedOnNext,g.next,a,o,u),d=re(g.next,null,a,o,u)),st(p,d)>3e3||c&&st(f,S)>3e3){h.stopAnimation(),h.setShape({points:d}),c&&(c.stopAnimation(),c.setShape({points:d,stackedOnPoints:S}));return}h.shape.__points=g.current,h.shape.points=p;var m={shape:{points:d}};g.current!==p&&(m.shape.__points=g.next),h.stopAnimation(),s.updateProps(h,m,v),c&&(c.setShape({points:p,stackedOnPoints:f}),c.stopAnimation(),s.updateProps(c,{shape:{stackedOnPoints:S}},v),h.shape.points!==c.shape.points&&(c.shape.points=h.shape.points));for(var y=[],b=g.status,I=0;I<b.length;I++){var D=b[I].cmd;if(D==="="){var _=e.getItemGraphicEl(b[I].idx1);_&&y.push({el:_,ptIdx:I})}}h.animators&&h.animators.length&&h.animators[0].during(function(){c&&c.dirtyShape();for(var x=h.shape.__points,A=0;A<y.length;A++){var C=y[A].el,w=y[A].ptIdx*2;C.x=x[w],C.y=x[w+1],C.markRedraw()}})},r.prototype.remove=function(e){var t=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(n,o){n.__temp&&(t.remove(n),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},r.type="line",r})(s.ChartView);function Fr(i,r){return{seriesType:i,plan:s.createRenderPlanner(),reset:function(e){var t=e.getData(),a=e.coordinateSystem;if(e.pipelineContext,!!a){var n=s.map(a.dimensions,function(v){return t.mapDimension(v)}).slice(0,2),o=n.length,l=t.getCalculationInfo("stackResultDimension");s.isDimensionStacked(t,n[0])&&(n[0]=l),s.isDimensionStacked(t,n[1])&&(n[1]=l);var u=t.getStore(),h=t.getDimensionIndex(n[0]),c=t.getDimensionIndex(n[1]);return o&&{progress:function(v,g){for(var p=v.end-v.start,f=s.createFloat32Array(p*o),d=[],S=[],m=v.start,y=0;m<v.end;m++){var b=void 0;if(o===1){var I=u.get(h,m);b=a.dataToPoint(I,null,S)}else d[0]=u.get(h,m),d[1]=u.get(c,m),b=a.dataToPoint(d,null,S);f[y++]=b[0],f[y++]=b[1]}g.setLayout("points",f)}}}}}}var Br={average:function(i){for(var r=0,e=0,t=0;t<i.length;t++)isNaN(i[t])||(r+=i[t],e++);return e===0?NaN:r/e},sum:function(i){for(var r=0,e=0;e<i.length;e++)r+=i[e]||0;return r},max:function(i){for(var r=-1/0,e=0;e<i.length;e++)i[e]>r&&(r=i[e]);return isFinite(r)?r:NaN},min:function(i){for(var r=1/0,e=0;e<i.length;e++)i[e]<r&&(r=i[e]);return isFinite(r)?r:NaN},nearest:function(i){return i[0]}},Wr=function(i){return Math.round(i.length/2)};function qt(i){return{seriesType:i,reset:function(r,e,t){var a=r.getData(),n=r.get("sampling"),o=r.coordinateSystem,l=a.count();if(l>10&&o.type==="cartesian2d"&&n){var u=o.getBaseAxis(),h=o.getOtherAxis(u),c=u.getExtent(),v=t.getDevicePixelRatio(),g=Math.abs(c[1]-c[0])*(v||1),p=Math.round(l/g);if(isFinite(p)&&p>1){n==="lttb"?r.setData(a.lttbDownSample(a.mapDimension(h.dim),1/p)):n==="minmax"&&r.setData(a.minmaxDownSample(a.mapDimension(h.dim),1/p));var f=void 0;s.isString(n)?f=Br[n]:s.isFunction(n)&&(f=n),f&&r.setData(a.downSample(a.mapDimension(h.dim),1/p,f,Wr))}}}}}function jt(i){i.registerChartView(Hr),i.registerSeriesModel(_r),i.registerLayout(Fr("line")),i.registerVisual({seriesType:"line",reset:function(r){var e=r.getData(),t=r.getModel("lineStyle").getLineStyle();t&&!t.stroke&&(t.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",t)}}),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,qt("line"))}var Ye=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(e,t){return s.createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getMarkerPosition=function(e,t,a){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(e),l=n.dataToPoint(o);if(a)s.each(n.getAxes(),function(g,p){if(g.type==="category"&&t!=null){var f=g.getTicksCoords(),d=g.getTickModel().get("alignWithLabel"),S=o[p],m=t[p]==="x1"||t[p]==="y1";if(m&&!d&&(S+=1),f.length<2)return;if(f.length===2){l[p]=g.toGlobalCoord(g.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,I=1,D=0;D<f.length;D++){var _=f[D].coord,x=D===f.length-1?f[D-1].tickValue+I:f[D].tickValue;if(x===S){b=_;break}else if(x<S)y=_;else if(y!=null&&x>S){b=(_+y)/2;break}D===1&&(I=x-f[0].tickValue)}b==null&&(y?y&&(b=f[f.length-1].coord):b=f[0].coord),l[p]=g.toGlobalCoord(b)}});else{var u=this.getData(),h=u.getLayout("offset"),c=u.getLayout("size"),v=n.getBaseAxis().isHorizontal()?0:1;l[v]+=h+c/2}return l}return[NaN,NaN]},r.type="series.__base_bar__",r.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},r})(s.SeriesModel);s.SeriesModel.registerClass(Ye);var Ur=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(){return s.createSeriesData(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},r.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},r.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},r.prototype.brushSelector=function(e,t,a){return a.rect(t.getItemLayout(e))},r.type="series.bar",r.dependencies=["grid","polar"],r.defaultOption=s.inheritDefaultOption(Ye.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:s.tokens.color.primary,borderWidth:2}},realtimeSort:!1}),r})(Ye),$r=(function(){function i(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return i})(),Ve=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="sausage",t}return r.prototype.getDefaultShape=function(){return new $r},r.prototype.buildPath=function(e,t){var a=t.cx,n=t.cy,o=Math.max(t.r0||0,0),l=Math.max(t.r,0),u=(l-o)*.5,h=o+u,c=t.startAngle,v=t.endAngle,g=t.clockwise,p=Math.PI*2,f=g?v-c<p:c-v<p;f||(c=v-(g?p:-p));var d=Math.cos(c),S=Math.sin(c),m=Math.cos(v),y=Math.sin(v);f?(e.moveTo(d*o+a,S*o+n),e.arc(d*h+a,S*h+n,u,-Math.PI+c,c,!g)):e.moveTo(d*l+a,S*l+n),e.arc(a,n,l,c,v,!g),e.arc(m*h+a,y*h+n,u,v-Math.PI*2,v-Math.PI,!g),o!==0&&e.arc(a,n,o,v,c,g)},r})(s.Path);function Xr(i,r){r=r||{};var e=r.isRoundCap;return function(t,a,n){var o=a.position;if(!o||o instanceof Array)return s.calculateTextPosition(t,a,n);var l=i(o),u=a.distance!=null?a.distance:5,h=this.shape,c=h.cx,v=h.cy,g=h.r,p=h.r0,f=(g+p)/2,d=h.startAngle,S=h.endAngle,m=(d+S)/2,y=e?Math.abs(g-p)/2:0,b=Math.cos,I=Math.sin,D=c+g*b(d),_=v+g*I(d),x="left",A="top";switch(l){case"startArc":D=c+(p-u)*b(m),_=v+(p-u)*I(m),x="center",A="top";break;case"insideStartArc":D=c+(p+u)*b(m),_=v+(p+u)*I(m),x="center",A="bottom";break;case"startAngle":D=c+f*b(d)+_e(d,u+y,!1),_=v+f*I(d)+Ae(d,u+y,!1),x="right",A="middle";break;case"insideStartAngle":D=c+f*b(d)+_e(d,-u+y,!1),_=v+f*I(d)+Ae(d,-u+y,!1),x="left",A="middle";break;case"middle":D=c+f*b(m),_=v+f*I(m),x="center",A="middle";break;case"endArc":D=c+(g+u)*b(m),_=v+(g+u)*I(m),x="center",A="bottom";break;case"insideEndArc":D=c+(g-u)*b(m),_=v+(g-u)*I(m),x="center",A="top";break;case"endAngle":D=c+f*b(S)+_e(S,u+y,!0),_=v+f*I(S)+Ae(S,u+y,!0),x="left",A="middle";break;case"insideEndAngle":D=c+f*b(S)+_e(S,-u+y,!0),_=v+f*I(S)+Ae(S,-u+y,!0),x="right",A="middle";break;default:return s.calculateTextPosition(t,a,n)}return t=t||{},t.x=D,t.y=_,t.align=x,t.verticalAlign=A,t}}function Zr(i,r,e,t){if(s.isNumber(t)){i.setTextConfig({rotation:t});return}else if(s.isArray(r)){i.setTextConfig({rotation:0});return}var a=i.shape,n=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,l=(n+o)/2,u,h=e(r);switch(h){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=l;break;case"startAngle":case"insideStartAngle":u=n;break;case"endAngle":case"insideEndAngle":u=o;break;default:i.setTextConfig({rotation:0});return}var c=Math.PI*1.5-u;h==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),i.setTextConfig({rotation:c})}function _e(i,r,e){return r*Math.sin(i)*(e?-1:1)}function Ae(i,r,e){return r*Math.cos(i)*(e?1:-1)}function ge(i,r,e){var t=i.get("borderRadius");if(t==null)return e?{cornerRadius:0}:null;s.isArray(t)||(t=[t,t,t,t]);var a=Math.abs(r.r||0-r.r0||0);return{cornerRadius:s.map(t,function(n){return s.parsePercent$1(n,a)})}}var Be=Math.max,We=Math.min;function Yr(i,r){var e=i.getArea&&i.getArea();if(me(i,"cartesian2d")){var t=i.getBaseAxis();if(t.type!=="category"||!t.onBand){var a=r.getLayout("bandWidth");t.isHorizontal()?(e.x-=a,e.width+=a*2):(e.y-=a,e.height+=a*2)}}return e}var qr=(function(i){s.__extends(r,i);function r(){var e=i.call(this)||this;return e.type=r.type,e._isFirstFrame=!0,e}return r.prototype.render=function(e,t,a,n){this._model=e,this._removeOnRenderedListener(a),this._updateDrawMode(e);var o=e.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,a):this._renderNormal(e,t,a,n)):process.env.NODE_ENV!=="production"&&s.warn("Only cartesian2d and polar supported for bar.")},r.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},r.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},r.prototype.eachRendered=function(e){s.traverseElements(this._progressiveEls||this.group,e)},r.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},r.prototype._renderNormal=function(e,t,a,n){var o=this.group,l=e.getData(),u=this._data,h=e.coordinateSystem,c=h.getBaseAxis(),v;h.type==="cartesian2d"?v=c.isHorizontal():h.type==="polar"&&(v=c.dim==="angle");var g=e.isAnimationEnabled()?e:null,p=jr(e,h);p&&this._enableRealtimeSort(p,l,a);var f=e.get("clip",!0)||p,d=Yr(h,l);o.removeClipPath();var S=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),b=y.get("borderRadius")||0,I=[],D=this._backgroundEls,_=n&&n.isInitSort,x=n&&n.type==="changeAxisOrder";function A(M){var L=we[h.type](l,M);if(!L)return null;var P=aa(h,v,L);return P.useStyle(y.getItemStyle()),h.type==="cartesian2d"?P.setShape("r",b):P.setShape("cornerRadius",b),I[M]=P,P}l.diff(u).add(function(M){var L=l.getItemModel(M),P=we[h.type](l,M,L);if(P&&(m&&A(M),!(!l.hasValue(M)||!ft[h.type](P)))){var E=!1;f&&(E=ct[h.type](d,P));var T=ht[h.type](e,l,M,P,v,g,c.model,!1,S);p&&(T.forceLabelAnimation=!0),gt(T,l,M,L,P,e,v,h.type==="polar"),_?T.attr({shape:P}):p?vt(p,g,T,P,M,v,!1,!1):s.initProps(T,{shape:P},e,M),l.setItemGraphicEl(M,T),o.add(T),T.ignore=E}}).update(function(M,L){var P=l.getItemModel(M),E=we[h.type](l,M,P);if(E){if(m){var T=void 0;D.length===0?T=A(L):(T=D[L],T.useStyle(y.getItemStyle()),h.type==="cartesian2d"?T.setShape("r",b):T.setShape("cornerRadius",b),I[M]=T);var k=we[h.type](l,M),N=Jt(v,k,h);s.updateProps(T,{shape:N},g,M)}var V=u.getItemGraphicEl(L);if(!l.hasValue(M)||!ft[h.type](E)){o.remove(V);return}var O=!1;f&&(O=ct[h.type](d,E),O&&o.remove(V));var R=V&&(V.type==="sector"&&S||V.type==="sausage"&&!S);if(R&&(V&&s.removeElementWithFadeOut(V,e,L),V=null),V?s.saveOldStyle(V):V=ht[h.type](e,l,M,E,v,g,c.model,!0,S),p&&(V.forceLabelAnimation=!0),x){var z=V.getTextContent();if(z){var G=s.labelInner(z);G.prevValue!=null&&(G.prevValue=G.value)}}else gt(V,l,M,P,E,e,v,h.type==="polar");_?V.attr({shape:E}):p?vt(p,g,V,E,M,v,!0,x):s.updateProps(V,{shape:E},e,M,null),l.setItemGraphicEl(M,V),V.ignore=O,o.add(V)}}).remove(function(M){var L=u.getItemGraphicEl(M);L&&s.removeElementWithFadeOut(L,e,M)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new s.Group);C.removeAll();for(var w=0;w<I.length;++w)C.add(I[w]);o.add(C),this._backgroundEls=I,this._data=l},r.prototype._renderLarge=function(e,t,a){this._clear(),mt(e,this.group),this._updateLargeClip(e)},r.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),mt(t,this.group,this._progressiveEls,!0)},r.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&s.createClipPath(e.coordinateSystem,!1,e),a=this.group;t?a.setClipPath(t):a.removeClipPath()},r.prototype._enableRealtimeSort=function(e,t,a){var n=this;if(t.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,a),this._isFirstFrame=!1;else{var l=function(u){var h=t.getItemGraphicEl(u),c=h&&h.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){n._updateSortWithinSameData(t,l,o,a)},a.getZr().on("rendered",this._onRendered)}}},r.prototype._dataSort=function(e,t,a){var n=[];return e.each(e.mapDimension(t.dim),function(o,l){var u=a(l);u=u??NaN,n.push({dataIndex:l,mappedValue:u,ordinalNumber:o})}),n.sort(function(o,l){return l.mappedValue-o.mappedValue}),{ordinalNumbers:s.map(n,function(o){return o.ordinalNumber})}},r.prototype._isOrderChangedWithinSameData=function(e,t,a){for(var n=a.scale,o=e.mapDimension(a.dim),l=Number.MAX_VALUE,u=0,h=n.getOrdinalMeta().categories.length;u<h;++u){var c=e.rawIndexOf(o,n.getRawOrdinalNumber(u)),v=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(v>l)return!0;l=v}return!1},r.prototype._isOrderDifferentInView=function(e,t){for(var a=t.scale,n=a.getExtent(),o=Math.max(0,n[0]),l=Math.min(n[1],a.getOrdinalMeta().categories.length-1);o<=l;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},r.prototype._updateSortWithinSameData=function(e,t,a,n){if(this._isOrderChangedWithinSameData(e,t,a)){var o=this._dataSort(e,a,t);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},r.prototype._dispatchInitSort=function(e,t,a){var n=t.baseAxis,o=this._dataSort(e,n,function(l){return e.get(e.mapDimension(t.otherAxis.dim),l)});a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},r.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},r.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},r.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},r.prototype._clear=function(e){var t=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(n){s.removeElementWithFadeOut(n,e,s.getECData(n).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},r.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},r.type="bar",r})(s.ChartView),ct={cartesian2d:function(i,r){var e=r.width<0?-1:1,t=r.height<0?-1:1;e<0&&(r.x+=r.width,r.width=-r.width),t<0&&(r.y+=r.height,r.height=-r.height);var a=i.x+i.width,n=i.y+i.height,o=Be(r.x,i.x),l=We(r.x+r.width,a),u=Be(r.y,i.y),h=We(r.y+r.height,n),c=l<o,v=h<u;return r.x=c&&o>a?l:o,r.y=v&&u>n?h:u,r.width=c?0:l-o,r.height=v?0:h-u,e<0&&(r.x+=r.width,r.width=-r.width),t<0&&(r.y+=r.height,r.height=-r.height),c||v},polar:function(i,r){var e=r.r0<=r.r?1:-1;if(e<0){var t=r.r;r.r=r.r0,r.r0=t}var a=We(r.r,i.r),n=Be(r.r0,i.r0);r.r=a,r.r0=n;var o=a-n<0;if(e<0){var t=r.r;r.r=r.r0,r.r0=t}return o}},ht={cartesian2d:function(i,r,e,t,a,n,o,l,u){var h=new s.Rect({shape:s.extend({},t),z2:1});if(h.__dataIndex=e,h.name="item",n){var c=h.shape,v=a?"height":"width";c[v]=0}return h},polar:function(i,r,e,t,a,n,o,l,u){var h=!a&&u?Ve:s.Sector,c=new h({shape:t,z2:1});c.name="item";var v=Kt(a);if(c.calculateTextPosition=Xr(v,{isRoundCap:h===Ve}),n){var g=c.shape,p=a?"r":"endAngle",f={};g[p]=a?t.r0:t.startAngle,f[p]=t[p],(l?s.updateProps:s.initProps)(c,{shape:f},n)}return c}};function jr(i,r){var e=i.get("realtimeSort",!0),t=r.getBaseAxis();if(process.env.NODE_ENV!=="production"&&e&&(t.type!=="category"&&s.warn("`realtimeSort` will not work because this bar series is not based on a category axis."),r.type!=="cartesian2d"&&s.warn("`realtimeSort` will not work because this bar series is not on cartesian2d.")),e&&t.type==="category"&&r.type==="cartesian2d")return{baseAxis:t,otherAxis:r.getOtherAxis(t)}}function vt(i,r,e,t,a,n,o,l){var u,h;n?(h={x:t.x,width:t.width},u={y:t.y,height:t.height}):(h={y:t.y,height:t.height},u={x:t.x,width:t.width}),l||(o?s.updateProps:s.initProps)(e,{shape:u},r,a,null);var c=r?i.baseAxis.model:null;(o?s.updateProps:s.initProps)(e,{shape:h},c,a)}function pt(i,r){for(var e=0;e<r.length;e++)if(!isFinite(i[r[e]]))return!0;return!1}var Kr=["x","y","width","height"],Jr=["cx","cy","r","startAngle","endAngle"],ft={cartesian2d:function(i){return!pt(i,Kr)},polar:function(i){return!pt(i,Jr)}},we={cartesian2d:function(i,r,e){var t=i.getItemLayout(r);if(!t)return null;var a=e?ea(e,t):0,n=t.width>0?1:-1,o=t.height>0?1:-1;return{x:t.x+n*a/2,y:t.y+o*a/2,width:t.width-n*a,height:t.height-o*a}},polar:function(i,r,e){var t=i.getItemLayout(r);return{cx:t.cx,cy:t.cy,r0:t.r0,r:t.r,startAngle:t.startAngle,endAngle:t.endAngle,clockwise:t.clockwise}}};function Qr(i){return i.startAngle!=null&&i.endAngle!=null&&i.startAngle===i.endAngle}function Kt(i){return(function(r){var e=r?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}})(i)}function gt(i,r,e,t,a,n,o,l){var u=r.getItemVisual(e,"style");if(l){if(!n.get("roundCap")){var c=i.shape,v=ge(t.getModel("itemStyle"),c,!0);s.extend(c,v),i.setShape(c)}}else{var h=t.get(["itemStyle","borderRadius"])||0;i.setShape("r",h)}i.useStyle(u);var g=t.getShallow("cursor");g&&i.attr("cursor",g);var p=l?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",f=s.getLabelStatesModels(t);s.setLabelStyle(i,f,{labelFetcher:n,labelDataIndex:e,defaultText:s.getDefaultLabel(n.getData(),e),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:p});var d=i.getTextContent();if(l&&d){var S=t.get(["label","position"]);i.textConfig.inside=S==="middle"?!0:null,Zr(i,S==="outside"?p:S,Kt(o),t.get(["label","rotate"]))}s.setLabelValueAnimation(d,f,n.getRawValue(e),function(y){return s.getDefaultInterpolatedLabel(r,y)});var m=t.getModel(["emphasis"]);s.toggleHoverEmphasis(i,m.get("focus"),m.get("blurScope"),m.get("disabled")),s.setStatesStylesFromModel(i,t),Qr(a)&&(i.style.fill="none",i.style.stroke="none",s.each(i.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function ea(i,r){var e=i.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var t=i.get(["itemStyle","borderWidth"])||0,a=isNaN(r.width)?Number.MAX_VALUE:Math.abs(r.width),n=isNaN(r.height)?Number.MAX_VALUE:Math.abs(r.height);return Math.min(t,a,n)}var ta=(function(){function i(){}return i})(),dt=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="largeBar",t}return r.prototype.getDefaultShape=function(){return new ta},r.prototype.buildPath=function(e,t){for(var a=t.points,n=this.baseDimIdx,o=1-this.baseDimIdx,l=[],u=[],h=this.barWidth,c=0;c<a.length;c+=3)u[n]=h,u[o]=a[c+2],l[n]=a[c+n],l[o]=a[c+o],e.rect(l[0],l[1],u[0],u[1])},r})(s.Path);function mt(i,r,e,t){var a=i.getData(),n=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),l=a.getLayout("size"),u=i.getModel("backgroundStyle"),h=a.getLayout("largeBackgroundPoints");if(h){var c=new dt({shape:{points:h},incremental:!!t,silent:!0,z2:0});c.baseDimIdx=n,c.largeDataIndices=o,c.barWidth=l,c.useStyle(u.getItemStyle()),r.add(c),e&&e.push(c)}var v=new dt({shape:{points:a.getLayout("largePoints")},incremental:!!t,ignoreCoarsePointer:!0,z2:1});v.baseDimIdx=n,v.largeDataIndices=o,v.barWidth=l,r.add(v),v.useStyle(a.getVisual("style")),v.style.stroke=null,s.getECData(v).seriesIndex=i.seriesIndex,i.get("silent")||(v.on("mousedown",yt),v.on("mousemove",yt)),e&&e.push(v)}var yt=s.throttle(function(i){var r=this,e=ra(r,i.offsetX,i.offsetY);s.getECData(r).dataIndex=e>=0?e:null},30,!1);function ra(i,r,e){for(var t=i.baseDimIdx,a=1-t,n=i.shape.points,o=i.largeDataIndices,l=[],u=[],h=i.barWidth,c=0,v=n.length/3;c<v;c++){var g=c*3;if(u[t]=h,u[a]=n[g+2],l[t]=n[g+t],l[a]=n[g+a],u[a]<0&&(l[a]+=u[a],u[a]=-u[a]),r>=l[0]&&r<=l[0]+u[0]&&e>=l[1]&&e<=l[1]+u[1])return o[c]}return-1}function Jt(i,r,e){if(me(e,"cartesian2d")){var t=r,a=e.getArea();return{x:i?t.x:a.x,y:i?a.y:t.y,width:i?t.width:a.width,height:i?a.height:t.height}}else{var a=e.getArea(),n=r;return{cx:a.cx,cy:a.cy,r0:i?a.r0:n.r0,r:i?a.r:n.r,startAngle:i?n.startAngle:0,endAngle:i?n.endAngle:Math.PI*2}}}function aa(i,r,e){var t=i.type==="polar"?s.Sector:s.Rect;return new t({shape:Jt(r,e,i),silent:!0,z2:0})}function ia(i){i.registerChartView(qr),i.registerSeriesModel(Ur),i.registerLayout(i.PRIORITY.VISUAL.LAYOUT,s.curry(s.layout,"bar")),i.registerLayout(i.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,s.createProgressiveLayout("bar")),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,qt("bar")),i.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(r,e){var t=r.componentType||"series";e.eachComponent({mainType:t,query:r},function(a){r.sortInfo&&a.axis.setCategorySortInfo(r.sortInfo)})})}var St=Math.PI*2,Me=Math.PI/180;function na(i,r,e){r.eachSeriesByType(i,function(t){var a=t.getData(),n=a.mapDimension("value"),o=s.getCircleLayout(t,e),l=o.cx,u=o.cy,h=o.r,c=o.r0,v=o.viewRect,g=-t.get("startAngle")*Me,p=t.get("endAngle"),f=t.get("padAngle")*Me;p=p==="auto"?g-St:-p*Me;var d=t.get("minAngle")*Me,S=d+f,m=0;a.each(n,function(N){!isNaN(N)&&m++});var y=a.getSum(n),b=Math.PI/(y||m)*2,I=t.get("clockwise"),D=t.get("roseType"),_=t.get("stillShowZeroSum"),x=a.getDataExtent(n);x[0]=0;var A=I?1:-1,C=[g,p],w=A*f/2;s.normalizeArcAngles(C,!I),g=C[0],p=C[1];var M=Qt(t);M.startAngle=g,M.endAngle=p,M.clockwise=I,M.cx=l,M.cy=u,M.r=h,M.r0=c;var L=Math.abs(p-g),P=L,E=0,T=g;if(a.setLayout({viewRect:v,r:h}),a.each(n,function(N,V){var O;if(isNaN(N)){a.setItemLayout(V,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:I,cx:l,cy:u,r0:c,r:D?NaN:h});return}D!=="area"?O=y===0&&_?b:N*b:O=L/m,O<S?(O=S,P-=S):E+=N;var R=T+A*O,z=0,G=0;f>O?(z=T+A*O/2,G=z):(z=T+w,G=R-w),a.setItemLayout(V,{angle:O,startAngle:z,endAngle:G,clockwise:I,cx:l,cy:u,r0:c,r:D?s.linearMap(N,x,[c,h]):h}),T=R}),P<St&&m)if(P<=.001){var k=L/m;a.each(n,function(N,V){if(!isNaN(N)){var O=a.getItemLayout(V);O.angle=k;var R=0,z=0;k<f?(R=g+A*(V+1/2)*k,z=R):(R=g+A*V*k+w,z=g+A*(V+1)*k-w),O.startAngle=R,O.endAngle=z}})}else b=P/E,T=g,a.each(n,function(N,V){if(!isNaN(N)){var O=a.getItemLayout(V),R=O.angle===S?S:N*b,z=0,G=0;R<f?(z=T+A*R/2,G=z):(z=T+w,G=T+A*R-w),O.startAngle=z,O.endAngle=G,T+=A*R}})})}var Qt=s.makeInner();function er(i){return{seriesType:i,reset:function(r,e){var t=e.findComponents({mainType:"legend"});if(!(!t||!t.length)){var a=r.getData();a.filterSelf(function(n){for(var o=a.getName(n),l=0;l<t.length;l++)if(!t[l].isSelected(o))return!1;return!0})}}}}var oa=Math.PI/180;function bt(i,r,e,t,a,n,o,l,u,h){if(i.length<2)return;function c(d){for(var S=d.rB,m=S*S,y=0;y<d.list.length;y++){var b=d.list[y],I=Math.abs(b.label.y-e),D=t+b.len,_=D*D,x=Math.sqrt(Math.abs((1-I*I/m)*_)),A=r+(x+b.len2)*a,C=A-b.label.x,w=b.targetTextWidth-C*a;tr(b,w,!0),b.label.x=A}}function v(d){for(var S={list:[],maxY:0},m={list:[],maxY:0},y=0;y<d.length;y++)if(d[y].labelAlignTo==="none"){var b=d[y],I=b.label.y>e?m:S,D=Math.abs(b.label.y-e);if(D>=I.maxY){var _=b.label.x-r-b.len2*a,x=t+b.len,A=Math.abs(_)<x?Math.sqrt(D*D/(1-_*_/x/x)):x;I.rB=A,I.maxY=D}I.list.push(b)}c(S),c(m)}for(var g=i.length,p=0;p<g;p++)if(i[p].position==="outer"&&i[p].labelAlignTo==="labelLine"){var f=i[p].label.x-h;i[p].linePoints[1][0]+=f,i[p].label.x=h}s.shiftLayoutOnXY(i,1,u,u+o)&&v(i)}function sa(i,r,e,t,a,n,o,l){for(var u=[],h=[],c=Number.MAX_VALUE,v=-Number.MAX_VALUE,g=0;g<i.length;g++){var p=i[g].label;Ue(i[g])||(p.x<r?(c=Math.min(c,p.x),u.push(i[g])):(v=Math.max(v,p.x),h.push(i[g])))}for(var g=0;g<i.length;g++){var f=i[g];if(!Ue(f)&&f.linePoints){if(f.labelStyleWidth!=null)continue;var p=f.label,d=f.linePoints,S=void 0;f.labelAlignTo==="edge"?p.x<r?S=d[2][0]-f.labelDistance-o-f.edgeDistance:S=o+a-f.edgeDistance-d[2][0]-f.labelDistance:f.labelAlignTo==="labelLine"?p.x<r?S=c-o-f.bleedMargin:S=o+a-v-f.bleedMargin:p.x<r?S=p.x-o-f.bleedMargin:S=o+a-p.x-f.bleedMargin,f.targetTextWidth=S,tr(f,S,!1)}}bt(h,r,e,t,1,a,n,o,l,v),bt(u,r,e,t,-1,a,n,o,l,c);for(var g=0;g<i.length;g++){var f=i[g];if(!Ue(f)&&f.linePoints){var p=f.label,d=f.linePoints,m=f.labelAlignTo==="edge",y=p.style.padding,b=y?y[1]+y[3]:0,I=p.style.backgroundColor?0:b,D=f.rect.width+I,_=d[1][0]-d[2][0];m?p.x<r?d[2][0]=o+f.edgeDistance+D+f.labelDistance:d[2][0]=o+a-f.edgeDistance-D-f.labelDistance:(p.x<r?d[2][0]=p.x+f.labelDistance:d[2][0]=p.x-f.labelDistance,d[1][0]=d[2][0]+_),d[1][1]=d[2][1]=p.y}}}function tr(i,r,e){if(i.labelStyleWidth==null){var t=i.label,a=t.style,n=i.rect,o=a.backgroundColor,l=a.padding,u=l?l[1]+l[3]:0,h=a.overflow,c=n.width+(o?0:u);if(r<c||e){if(h&&h.match("break")){t.setStyle("backgroundColor",null),t.setStyle("width",r-u);var v=t.getBoundingRect();t.setStyle("width",Math.ceil(v.width)),t.setStyle("backgroundColor",o)}else{var g=r-u,p=r<c?g:e?g>i.unconstrainedWidth?null:g:null;t.setStyle("width",p)}rr(n,t)}}}function rr(i,r){xt.rect=i,s.computeLabelGeometry(xt,r,la)}var la={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},xt={};function Ue(i){return i.position==="center"}function ua(i){var r=i.getData(),e=[],t,a,n=!1,o=(i.get("minShowLabelAngle")||0)*oa,l=r.getLayout("viewRect"),u=r.getLayout("r"),h=l.width,c=l.x,v=l.y,g=l.height;function p(_){_.ignore=!0}function f(_){if(!_.ignore)return!0;for(var x in _.states)if(_.states[x].ignore===!1)return!0;return!1}r.each(function(_){var x=r.getItemGraphicEl(_),A=x.shape,C=x.getTextContent(),w=x.getTextGuideLine(),M=r.getItemModel(_),L=M.getModel("label"),P=L.get("position")||M.get(["emphasis","label","position"]),E=L.get("distanceToLabelLine"),T=L.get("alignTo"),k=s.parsePercent(L.get("edgeDistance"),h),N=L.get("bleedMargin");N==null&&(N=Math.min(h,g)>200?10:2);var V=M.getModel("labelLine"),O=V.get("length");O=s.parsePercent(O,h);var R=V.get("length2");if(R=s.parsePercent(R,h),Math.abs(A.endAngle-A.startAngle)<o){s.each(C.states,p),C.ignore=!0,w&&(s.each(w.states,p),w.ignore=!0);return}if(f(C)){var z=(A.startAngle+A.endAngle)/2,G=Math.cos(z),H=Math.sin(z),F,B,J,xe;t=A.cx,a=A.cy;var se=P==="inside"||P==="inner";if(P==="center")F=A.cx,B=A.cy,xe="center";else{var Ne=(se?(A.r+A.r0)/2*G:A.r*G)+t,Oe=(se?(A.r+A.r0)/2*H:A.r*H)+a;if(F=Ne+G*3,B=Oe+H*3,!se){var Qe=Ne+G*(O+u-A.r),et=Oe+H*(O+u-A.r),tt=Qe+(G<0?-1:1)*R,rt=et;T==="edge"?F=G<0?c+k:c+h-k:F=tt+(G<0?-E:E),B=rt,J=[[Ne,Oe],[Qe,et],[tt,rt]]}xe=se?"center":T==="edge"?G>0?"right":"left":G>0?"left":"right"}var he=Math.PI,le=0,ve=L.get("rotate");if(s.isNumber(ve))le=ve*(he/180);else if(P==="center")le=0;else if(ve==="radial"||ve===!0){var pr=G<0?-z+he:-z;le=pr}else if(ve==="tangential"&&P!=="outside"&&P!=="outer"){var ue=Math.atan2(G,H);ue<0&&(ue=he*2+ue);var fr=H>0;fr&&(ue=he+ue),le=ue-he}if(n=!!le,C.x=F,C.y=B,C.rotation=le,C.setStyle({verticalAlign:"middle"}),se){C.setStyle({align:xe});var ze=C.states.select;ze&&(ze.x+=C.x,ze.y+=C.y)}else{var Re=new s.BoundingRect(0,0,0,0);rr(Re,C),e.push({label:C,labelLine:w,position:P,len:O,len2:R,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new s.Point(G,H),linePoints:J,textAlign:xe,labelDistance:E,labelAlignTo:T,edgeDistance:k,bleedMargin:N,rect:Re,unconstrainedWidth:Re.width,labelStyleWidth:C.style.width})}x.setTextConfig({inside:se})}}),!n&&i.get("avoidLabelOverlap")&&sa(e,t,a,u,h,g,c,v);for(var d=0;d<e.length;d++){var S=e[d],m=S.label,y=S.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:S.textAlign}),b&&(s.each(m.states,p),m.ignore=!0);var I=m.states.select;I&&(I.x+=m.x,I.y+=m.y)}if(y){var D=S.linePoints;b||!D?(s.each(y.states,p),y.ignore=!0):(mr(D,S.minTurnAngle),yr(D,S.surfaceNormal,S.maxSurfaceAngle),y.setShape({points:D}),m.__hostTarget.textGuideLineConfig={anchor:new s.Point(D[0][0],D[0][1])})}}}var ca=(function(i){s.__extends(r,i);function r(e,t,a){var n=i.call(this)||this;n.z2=2;var o=new s.ZRText;return n.setTextContent(o),n.updateData(e,t,a,!0),n}return r.prototype.updateData=function(e,t,a,n){var o=this,l=e.hostModel,u=e.getItemModel(t),h=u.getModel("emphasis"),c=e.getItemLayout(t),v=s.extend(ge(u.getModel("itemStyle"),c,!0),c);if(isNaN(v.startAngle)){o.setShape(v);return}if(n){o.setShape(v);var g=l.getShallow("animationType");l.ecModel.ssr?(s.initProps(o,{scaleX:0,scaleY:0},l,{dataIndex:t,isFrom:!0}),o.originX=v.cx,o.originY=v.cy):g==="scale"?(o.shape.r=c.r0,s.initProps(o,{shape:{r:c.r}},l,t)):a!=null?(o.setShape({startAngle:a,endAngle:a}),s.initProps(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},l,t)):(o.shape.endAngle=c.startAngle,s.updateProps(o,{shape:{endAngle:c.endAngle}},l,t))}else s.saveOldStyle(o),s.updateProps(o,{shape:v},l,t);o.useStyle(e.getItemVisual(t,"style")),s.setStatesStylesFromModel(o,u);var p=(c.startAngle+c.endAngle)/2,f=l.get("selectedOffset"),d=Math.cos(p)*f,S=Math.sin(p)*f,m=u.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(l,e,t),o.ensureState("emphasis").shape=s.extend({r:c.r+(h.get("scale")&&h.get("scaleSize")||0)},ge(h.getModel("itemStyle"),c)),s.extend(o.ensureState("select"),{x:d,y:S,shape:ge(u.getModel(["select","itemStyle"]),c)}),s.extend(o.ensureState("blur"),{shape:ge(u.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&s.extend(y.ensureState("select"),{x:d,y:S}),s.extend(b.ensureState("select"),{x:d,y:S}),s.toggleHoverEmphasis(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},r.prototype._updateLabel=function(e,t,a){var n=this,o=t.getItemModel(a),l=o.getModel("labelLine"),u=t.getItemVisual(a,"style"),h=u&&u.fill,c=u&&u.opacity;s.setLabelStyle(n,s.getLabelStatesModels(o),{labelFetcher:t.hostModel,labelDataIndex:a,inheritColor:h,defaultOpacity:c,defaultText:e.getFormattedLabel(a,"normal")||t.getName(a)});var v=n.getTextContent();n.setTextConfig({position:null,rotation:null}),v.attr({z2:10});var g=o.get(["label","position"]);if(g!=="outside"&&g!=="outer")n.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new s.Polyline,this.setTextGuideLine(p)),br(this,xr(o),{stroke:h,opacity:s.retrieve3(l.get(["lineStyle","opacity"]),c,1)})}},r})(s.Sector),ha=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return r.prototype.render=function(e,t,a,n){var o=e.getData(),l=this._data,u=this.group,h;if(!l&&o.count()>0){for(var c=o.getItemLayout(0),v=1;isNaN(c&&c.startAngle)&&v<o.count();++v)c=o.getItemLayout(v);c&&(h=c.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var g=Qt(e),p=new s.Sector({shape:s.clone(g)});p.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=p,u.add(p)}o.diff(l).add(function(f){var d=new ca(o,f,h);o.setItemGraphicEl(f,d),u.add(d)}).update(function(f,d){var S=l.getItemGraphicEl(d);S.updateData(o,f,h),S.off("click"),u.add(S),o.setItemGraphicEl(f,S)}).remove(function(f){var d=l.getItemGraphicEl(f);s.removeElementWithFadeOut(d,e,f)}).execute(),ua(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},r.prototype.dispose=function(){},r.prototype.containPoint=function(e,t){var a=t.getData(),n=a.getItemLayout(0);if(n){var o=e[0]-n.cx,l=e[1]-n.cy,u=Math.sqrt(o*o+l*l);return u<=n.r&&u>=n.r0}},r.type="pie",r})(s.ChartView);function Je(i,r,e){r=s.isArray(r)&&{coordDimensions:r}||s.extend({encodeDefine:i.getEncode()},r);var t=i.getSource(),a=s.prepareSeriesDataSchema(t,r).dimensions,n=new s.SeriesData(a,i);return n.initData(t,e),n}var ar=(function(){function i(r,e){this._getDataWithEncodedVisual=r,this._getRawData=e}return i.prototype.getAllNames=function(){var r=this._getRawData();return r.mapArray(r.getName)},i.prototype.containName=function(r){var e=this._getRawData();return e.indexOfName(r)>=0},i.prototype.indexOfName=function(r){var e=this._getDataWithEncodedVisual();return e.indexOfName(r)},i.prototype.getItemVisual=function(r,e){var t=this._getDataWithEncodedVisual();return t.getItemVisual(r,e)},i})(),va=s.makeInner(),ir=(function(i){s.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.init=function(e){i.prototype.init.apply(this,arguments),this.legendVisualProvider=new ar(s.bind(this.getData,this),s.bind(this.getRawData,this)),this._defaultLabelLine(e)},r.prototype.mergeOption=function(){i.prototype.mergeOption.apply(this,arguments)},r.prototype.getInitialData=function(){return Je(this,{coordDimensions:["value"],encodeDefaulter:s.curry(s.makeSeriesEncodeForNameBased,this)})},r.prototype.getDataParams=function(e){var t=this.getData(),a=va(t),n=a.seats;if(!n){var o=[];t.each(t.mapDimension("value"),function(u){o.push(u)}),n=a.seats=s.getPercentSeats(o,t.hostModel.get("percentPrecision"))}var l=i.prototype.getDataParams.call(this,e);return l.percent=n[e]||0,l.$vars.push("percent"),l},r.prototype._defaultLabelLine=function(e){s.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,a=e.emphasis.labelLine;t.show=t.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},r.type="series.pie",r.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},r})(s.SeriesModel);s.registerLayOutOnCoordSysUsage({fullType:ir.type,getCoord2:function(i){return i.getShallow("center")}});function pa(i){return{seriesType:i,reset:function(r,e){var t=r.getData();t.filterSelf(function(a){var n=t.mapDimension("value"),o=t.get(n,a);return!(s.isNumber(o)&&!isNaN(o)&&o<0)})}}}function fa(i){i.registerChartView(ha),i.registerSeriesModel(ir),s.createLegacyDataSelectAction("pie",i.registerAction),i.registerLayout(s.curry(na,"pie")),i.registerProcessor(er("pie")),i.registerProcessor(pa("pie"))}function ga(i){i.eachSeriesByType("radar",function(r){var e=r.getData(),t=[],a=r.coordinateSystem;if(a){var n=a.getIndicatorAxes();s.each(n,function(o,l){e.each(e.mapDimension(n[l].dim),function(u,h){t[h]=t[h]||[];var c=a.dataToPoint(u,l);t[h][l]=_t(c)?c:At(a)})}),e.each(function(o){var l=s.find(t[o],function(u){return _t(u)})||At(a);t[o].push(l.slice()),e.setItemLayout(o,t[o])})}})}function _t(i){return!isNaN(i[0])&&!isNaN(i[1])}function At(i){return[i.cx,i.cy]}function da(i){var r=i.polar;if(r){s.isArray(r)||(r=[r]);var e=[];s.each(r,function(t,a){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),i.radar=i.radar||[],s.isArray(i.radar)||(i.radar=[i.radar]),i.radar.push(t)):e.push(t)}),i.polar=e}s.each(i.series,function(t){t&&t.type==="radar"&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}var ma=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n=e.coordinateSystem,o=this.group,l=e.getData(),u=this._data;function h(g,p){var f=g.getItemVisual(p,"symbol")||"circle";if(f!=="none"){var d=s.normalizeSymbolSize(g.getItemVisual(p,"symbolSize")),S=s.createSymbol(f,-1,-1,2,2),m=g.getItemVisual(p,"symbolRotate")||0;return S.attr({style:{strokeNoScale:!0},z2:100,scaleX:d[0]/2,scaleY:d[1]/2,rotation:m*Math.PI/180||0}),S}}function c(g,p,f,d,S,m){f.removeAll();for(var y=0;y<p.length-1;y++){var b=h(d,S);b&&(b.__dimIdx=y,g[y]?(b.setPosition(g[y]),s.graphic[m?"initProps":"updateProps"](b,{x:p[y][0],y:p[y][1]},e,S)):b.setPosition(p[y]),f.add(b))}}function v(g){return s.map(g,function(p){return[n.cx,n.cy]})}l.diff(u).add(function(g){var p=l.getItemLayout(g);if(p){var f=new s.Polygon,d=new s.Polyline,S={shape:{points:p}};f.shape.points=v(p),d.shape.points=v(p),s.initProps(f,S,e,g),s.initProps(d,S,e,g);var m=new s.Group,y=new s.Group;m.add(d),m.add(f),m.add(y),c(d.shape.points,p,y,l,g,!0),l.setItemGraphicEl(g,m)}}).update(function(g,p){var f=u.getItemGraphicEl(p),d=f.childAt(0),S=f.childAt(1),m=f.childAt(2),y={shape:{points:l.getItemLayout(g)}};y.shape.points&&(c(d.shape.points,y.shape.points,m,l,g,!1),s.saveOldStyle(S),s.saveOldStyle(d),s.updateProps(d,y,e),s.updateProps(S,y,e),l.setItemGraphicEl(g,f))}).remove(function(g){o.remove(u.getItemGraphicEl(g))}).execute(),l.eachItemGraphicEl(function(g,p){var f=l.getItemModel(p),d=g.childAt(0),S=g.childAt(1),m=g.childAt(2),y=l.getItemVisual(p,"style"),b=y.fill;o.add(g),d.useStyle(s.defaults(f.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:b})),s.setStatesStylesFromModel(d,f,"lineStyle"),s.setStatesStylesFromModel(S,f,"areaStyle");var I=f.getModel("areaStyle"),D=I.isEmpty()&&I.parentModel.isEmpty();S.ignore=D,s.each(["emphasis","select","blur"],function(x){var A=f.getModel([x,"areaStyle"]),C=A.isEmpty()&&A.parentModel.isEmpty();S.ensureState(x).ignore=C&&D;var w=f.getModel([x,"lineStyle"]).getLineStyle();d.ensureState(x).style=w;var M=A.getAreaStyle();S.ensureState(x).style=M;var L=f.getModel([x,"itemStyle"]).getItemStyle();m.eachChild(function(P){P.ensureState(x).style=s.clone(L)})}),S.useStyle(s.defaults(f.getModel("areaStyle").getAreaStyle(),{fill:b,opacity:.7,decal:y.decal}));var _=f.getModel("emphasis");m.eachChild(function(x){if(x instanceof s.ZRImage){var A=x.style;x.useStyle(s.extend({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},y))}else x.useStyle(y),x.setColor(b),x.style.strokeNoScale=!0;var C=l.getStore().get(l.getDimensionIndex(x.__dimIdx),p);(C==null||isNaN(C))&&(C=""),s.setLabelStyle(x,s.getLabelStatesModels(f),{labelFetcher:l.hostModel,labelDataIndex:p,labelDimIndex:x.__dimIdx,defaultText:C,inheritColor:b,defaultOpacity:y.opacity})}),s.toggleHoverEmphasis(g,_.get("focus"),_.get("blurScope"),_.get("disabled"))}),this._data=l},r.prototype.remove=function(){this.group.removeAll(),this._data=null},r.type="radar",r})(s.ChartView),ya=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.hasSymbolVisual=!0,e}return r.prototype.init=function(e){i.prototype.init.apply(this,arguments),this.legendVisualProvider=new ar(s.bind(this.getData,this),s.bind(this.getRawData,this))},r.prototype.getInitialData=function(e,t){return Je(this,{generateCoord:"indicator_",generateCoordCount:1/0})},r.prototype.formatTooltip=function(e,t,a){var n=this.getData(),o=this.coordinateSystem,l=o.getIndicatorAxes(),u=this.getData().getName(e),h=u===""?this.name:u,c=s.retrieveVisualColorForTooltipMarker(this,e);return s.createTooltipMarkup("section",{header:h,sortBlocks:!0,blocks:s.map(l,function(v){var g=n.get(n.mapDimension(v.dim),e);return s.createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:c,name:v.name,value:g,sortParam:g})})})},r.prototype.getTooltipPosition=function(e){if(e!=null){for(var t=this.getData(),a=this.coordinateSystem,n=t.getValues(s.map(a.dimensions,function(h){return t.mapDimension(h)}),e),o=0,l=n.length;o<l;o++)if(!isNaN(n[o])){var u=a.getIndicatorAxes();return a.coordToPoint(u[o].dataToCoord(n[o]),o)}}},r.type="series.radar",r.dependencies=["radar"],r.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},r})(s.SeriesModel),pe=s.axisDefault.value;function De(i,r){return s.defaults({show:r},i)}var Sa=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),a=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),l=this.get("axisLabel"),u=this.get("axisName"),h=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),v=this.get("axisNameGap"),g=this.get("triggerEvent"),p=s.map(this.get("indicator")||[],function(f){f.max!=null&&f.max>0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var d=u;f.color!=null&&(d=s.defaults({color:f.color},u));var S=s.merge(s.clone(f),{boundaryGap:e,splitNumber:t,scale:a,axisLine:n,axisTick:o,axisLabel:l,name:f.text,showName:h,nameLocation:"end",nameGap:v,nameTextStyle:d,triggerEvent:g},!1);if(s.isString(c)){var m=S.name;S.name=c.replace("{value}",m??"")}else s.isFunction(c)&&(S.name=c(S.name,S));var y=new s.Model(S,null,this.ecModel);return s.mixin(y,s.AxisModelCommonMixin.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=p},r.prototype.getIndicatorModels=function(){return this._indicatorModels},r.type="radar",r.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:s.tokens.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:s.merge({lineStyle:{color:s.tokens.color.neutral20}},pe.axisLine),axisLabel:De(pe.axisLabel,!1),axisTick:De(pe.axisTick,!1),splitLine:De(pe.splitLine,!0),splitArea:De(pe.splitArea,!0),indicator:[]},r})(s.ComponentModel),ba=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n=this.group;n.removeAll(),this._buildAxes(e,a),this._buildSplitLineAndArea(e)},r.prototype._buildAxes=function(e,t){var a=e.coordinateSystem,n=a.getIndicatorAxes(),o=s.map(n,function(l){var u=l.model.get("showName")?l.name:"",h=new s.AxisBuilder(l.model,t,{axisName:u,position:[a.cx,a.cy],rotation:l.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return h});s.each(o,function(l){l.build(),this.group.add(l.group)},this)},r.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,a=t.getIndicatorAxes();if(!a.length)return;var n=e.get("shape"),o=e.getModel("splitLine"),l=e.getModel("splitArea"),u=o.getModel("lineStyle"),h=l.getModel("areaStyle"),c=o.get("show"),v=l.get("show"),g=u.get("color"),p=h.get("color"),f=s.isArray(g)?g:[g],d=s.isArray(p)?p:[p],S=[],m=[];function y(T,k,N){var V=N%k.length;return T[V]=T[V]||[],V}if(n==="circle")for(var b=a[0].getTicksCoords(),I=t.cx,D=t.cy,_=0;_<b.length;_++){if(c){var x=y(S,f,_);S[x].push(new s.Circle({shape:{cx:I,cy:D,r:b[_].coord}}))}if(v&&_<b.length-1){var x=y(m,d,_);m[x].push(new s.Ring({shape:{cx:I,cy:D,r0:b[_].coord,r:b[_+1].coord}}))}}else for(var A,C=s.map(a,function(T,k){var N=T.getTicksCoords();return A=A==null?N.length-1:Math.min(N.length-1,A),s.map(N,function(V){return t.coordToPoint(V.coord,k)})}),w=[],_=0;_<=A;_++){for(var M=[],L=0;L<a.length;L++)M.push(C[L][_]);if(M[0]?M.push(M[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+_),c){var x=y(S,f,_);S[x].push(new s.Polyline({shape:{points:M}}))}if(v&&w){var x=y(m,d,_-1);m[x].push(new s.Polygon({shape:{points:M.concat(w)}}))}w=M.slice().reverse()}var P=u.getLineStyle(),E=h.getAreaStyle();s.each(m,function(T,k){this.group.add(s.mergePath(T,{style:s.defaults({stroke:"none",fill:d[k%d.length]},E),silent:!0}))},this),s.each(S,function(T,k){this.group.add(s.mergePath(T,{style:s.defaults({fill:"none",stroke:f[k%f.length]},P),silent:!0}))},this)},r.type="radar",r})(s.ComponentView),xa=(function(i){s.__extends(r,i);function r(e,t,a){var n=i.call(this,e,t,a)||this;return n.type="value",n.angle=0,n.name="",n}return r})(s.Axis),_a=(function(){function i(r,e,t){this.dimensions=[],this._model=r,this._indicatorAxes=s.map(r.getIndicatorModels(),function(a,n){var o="indicator_"+n,l=new xa(o,new s.IntervalScale);return l.name=a.get("name"),l.model=a,a.axis=l,this.dimensions.push(o),l},this),this.resize(r,t)}return i.prototype.getIndicatorAxes=function(){return this._indicatorAxes},i.prototype.dataToPoint=function(r,e){var t=this._indicatorAxes[e];return this.coordToPoint(t.dataToCoord(r),e)},i.prototype.coordToPoint=function(r,e){var t=this._indicatorAxes[e],a=t.angle,n=this.cx+r*Math.cos(a),o=this.cy-r*Math.sin(a);return[n,o]},i.prototype.pointToData=function(r){var e=r[0]-this.cx,t=r[1]-this.cy,a=Math.sqrt(e*e+t*t);e/=a,t/=a;for(var n=Math.atan2(-t,e),o=1/0,l,u=-1,h=0;h<this._indicatorAxes.length;h++){var c=this._indicatorAxes[h],v=Math.abs(n-c.angle);v<o&&(l=c,u=h,o=v)}return[u,+(l&&l.coordToData(a))]},i.prototype.resize=function(r,e){var t=s.createBoxLayoutReference(r,e).refContainer,a=r.get("center"),n=Math.min(t.width,t.height)/2;this.cx=s.parsePercent(a[0],t.width)+t.x,this.cy=s.parsePercent(a[1],t.height)+t.y,this.startAngle=r.get("startAngle")*Math.PI/180;var o=r.get("radius");(s.isString(o)||s.isNumber(o))&&(o=[0,o]),this.r0=s.parsePercent(o[0],n),this.r=s.parsePercent(o[1],n),s.each(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var h=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;h=Math.atan2(Math.sin(h),Math.cos(h)),l.angle=h},this)},i.prototype.update=function(r,e){var t=this._indicatorAxes,a=this._model;s.each(t,function(l){l.scale.setExtent(1/0,-1/0)}),r.eachSeriesByType("radar",function(l,u){if(!(l.get("coordinateSystem")!=="radar"||r.getComponent("radar",l.get("radarIndex"))!==a)){var h=l.getData();s.each(t,function(c){c.scale.unionExtentFromData(h,h.mapDimension(c.dim))})}},this);var n=a.get("splitNumber"),o=new s.IntervalScale;o.setExtent(0,n),o.setInterval(1),s.each(t,function(l,u){s.alignScaleTicks(l.scale,l.model,o)})},i.prototype.convertToPixel=function(r,e,t){return console.warn("Not implemented."),null},i.prototype.convertFromPixel=function(r,e,t){return console.warn("Not implemented."),null},i.prototype.containPoint=function(r){return console.warn("Not implemented."),!1},i.create=function(r,e){var t=[];return r.eachComponent("radar",function(a){var n=new i(a,r,e);t.push(n),a.coordinateSystem=n}),r.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=t[a.get("radarIndex")||0])}),t},i.dimensions=[],i})();function nr(i){i.registerCoordinateSystem("radar",_a),i.registerComponentModel(Sa),i.registerComponentView(ba),i.registerVisual({seriesType:"radar",reset:function(r){var e=r.getData();e.each(function(t){e.setItemVisual(t,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function Aa(i){s.use(nr),i.registerChartView(ma),i.registerSeriesModel(ya),i.registerLayout(ga),i.registerProcessor(er("radar")),i.registerPreprocessor(da)}var ye=s.each,wa=s.isObject,ke=-1,X=(function(){function i(r){var e=r.mappingMethod,t=r.type,a=this.option=s.clone(r);this.type=t,this.mappingMethod=e,this._normalizeData=Ia[e];var n=i.visualHandlers[t];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[e],e==="piecewise"?($e(a),Ma(a)):e==="category"?a.categories?Da(a):$e(a,!0):(s.assert(e!=="linear"||a.dataExtent),$e(a))}return i.prototype.mapValueToVisual=function(r){var e=this._normalizeData(r);return this._normalizedToVisual(e,r)},i.prototype.getNormalizer=function(){return s.bind(this._normalizeData,this)},i.listVisualTypes=function(){return s.keys(i.visualHandlers)},i.isValidType=function(r){return i.visualHandlers.hasOwnProperty(r)},i.eachVisual=function(r,e,t){s.isObject(r)?s.each(r,e,t):e.call(t,r)},i.mapVisual=function(r,e,t){var a,n=s.isArray(r)?[]:s.isObject(r)?{}:(a=!0,null);return i.eachVisual(r,function(o,l){var u=e.call(t,o,l);a?n=u:n[l]=u}),n},i.retrieveVisuals=function(r){var e={},t;return r&&ye(i.visualHandlers,function(a,n){r.hasOwnProperty(n)&&(e[n]=r[n],t=!0)}),t?e:null},i.prepareVisualTypes=function(r){if(s.isArray(r))r=r.slice();else if(wa(r)){var e=[];ye(r,function(t,a){e.push(a)}),r=e}else return[];return r.sort(function(t,a){return a==="color"&&t!=="color"&&t.indexOf("color")===0?1:-1}),r},i.dependsOn=function(r,e){return e==="color"?!!(r&&r.indexOf(e)===0):r===e},i.findPieceIndex=function(r,e,t){for(var a,n=1/0,o=0,l=e.length;o<l;o++){var u=e[o].value;if(u!=null){if(u===r||s.isString(u)&&u===r+"")return o;t&&g(u,o)}}for(var o=0,l=e.length;o<l;o++){var h=e[o],c=h.interval,v=h.close;if(c){if(c[0]===-1/0){if(Le(v[1],r,c[1]))return o}else if(c[1]===1/0){if(Le(v[0],c[0],r))return o}else if(Le(v[0],c[0],r)&&Le(v[1],r,c[1]))return o;t&&g(c[0],o),t&&g(c[1],o)}}if(t)return r===1/0?e.length-1:r===-1/0?0:a;function g(p,f){var d=Math.abs(p-r);d<n&&(n=d,a=f)}},i.visualHandlers={color:{applyVisual:fe("color"),getColorMapper:function(){var r=this.option;return s.bind(r.mappingMethod==="category"?function(e,t){return!t&&(e=this._normalizeData(e)),de.call(this,e)}:function(e,t,a){var n=!!a;return!t&&(e=this._normalizeData(e)),a=s.fastLerp(e,r.parsedVisual,a),n?a:s.stringify(a,"rgba")},this)},_normalizedToVisual:{linear:function(r){return s.stringify(s.fastLerp(r,this.option.parsedVisual),"rgba")},category:de,piecewise:function(r,e){var t=je.call(this,e);return t==null&&(t=s.stringify(s.fastLerp(r,this.option.parsedVisual),"rgba")),t},fixed:ne}},colorHue:Ie(function(r,e){return s.modifyHSL(r,e)}),colorSaturation:Ie(function(r,e){return s.modifyHSL(r,null,e)}),colorLightness:Ie(function(r,e){return s.modifyHSL(r,null,null,e)}),colorAlpha:Ie(function(r,e){return s.modifyAlpha(r,e)}),decal:{applyVisual:fe("decal"),_normalizedToVisual:{linear:null,category:de,piecewise:null,fixed:null}},opacity:{applyVisual:fe("opacity"),_normalizedToVisual:qe([0,1])},liftZ:{applyVisual:fe("liftZ"),_normalizedToVisual:{linear:ne,category:ne,piecewise:ne,fixed:ne}},symbol:{applyVisual:function(r,e,t){var a=this.mapValueToVisual(r);t("symbol",a)},_normalizedToVisual:{linear:wt,category:de,piecewise:function(r,e){var t=je.call(this,e);return t==null&&(t=wt.call(this,r)),t},fixed:ne}},symbolSize:{applyVisual:fe("symbolSize"),_normalizedToVisual:qe([0,1])}},i})();function Ma(i){var r=i.pieceList;i.hasSpecialVisual=!1,s.each(r,function(e,t){e.originIndex=t,e.visual!=null&&(i.hasSpecialVisual=!0)})}function Da(i){var r=i.categories,e=i.categoryMap={},t=i.visual;if(ye(r,function(o,l){e[o]=l}),!s.isArray(t)){var a=[];s.isObject(t)?ye(t,function(o,l){var u=e[l];a[u??ke]=o}):a[ke]=t,t=or(i,a)}for(var n=r.length-1;n>=0;n--)t[n]==null&&(delete e[r[n]],r.pop())}function $e(i,r){var e=i.visual,t=[];s.isObject(e)?ye(e,function(n){t.push(n)}):e!=null&&t.push(e);var a={color:1,symbol:1};!r&&t.length===1&&!a.hasOwnProperty(i.type)&&(t[1]=t[0]),or(i,t)}function Ie(i){return{applyVisual:function(r,e,t){var a=this.mapValueToVisual(r);t("color",i(e("color"),a))},_normalizedToVisual:qe([0,1])}}function wt(i){var r=this.option.visual;return r[Math.round(s.linearMap(i,[0,1],[0,r.length-1],!0))]||{}}function fe(i){return function(r,e,t){t(i,this.mapValueToVisual(r))}}function de(i){var r=this.option.visual;return r[this.option.loop&&i!==ke?i%r.length:i]}function ne(){return this.option.visual[0]}function qe(i){return{linear:function(r){return s.linearMap(r,i,this.option.visual,!0)},category:de,piecewise:function(r,e){var t=je.call(this,e);return t==null&&(t=s.linearMap(r,i,this.option.visual,!0)),t},fixed:ne}}function je(i){var r=this.option,e=r.pieceList;if(r.hasSpecialVisual){var t=X.findPieceIndex(i,e),a=e[t];if(a&&a.visual)return a.visual[this.type]}}function or(i,r){return i.visual=r,i.type==="color"&&(i.parsedVisual=s.map(r,function(e){var t=s.parse(e);return!t&&process.env.NODE_ENV!=="production"&&s.warn("'"+e+"' is an illegal color, fallback to '#000000'",!0),t||[0,0,0,1]})),r}var Ia={linear:function(i){return s.linearMap(i,this.option.dataExtent,[0,1],!0)},piecewise:function(i){var r=this.option.pieceList,e=X.findPieceIndex(i,r,!0);if(e!=null)return s.linearMap(e,[0,r.length-1],[0,1],!0)},category:function(i){var r=this.option.categories?this.option.categoryMap[i]:i;return r??ke},fixed:s.noop};function Le(i,r,e){return i?r<=e:r<e}var La=(function(){function i(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return i})(),Ca=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="pointer",t}return r.prototype.getDefaultShape=function(){return new La},r.prototype.buildPath=function(e,t){var a=Math.cos,n=Math.sin,o=t.r,l=t.width,u=t.angle,h=t.x-a(u)*l*(l>=o/3?1:2),c=t.y-n(u)*l*(l>=o/3?1:2);u=t.angle-Math.PI/2,e.moveTo(h,c),e.lineTo(t.x+a(u)*l,t.y+n(u)*l),e.lineTo(t.x+a(t.angle)*o,t.y+n(t.angle)*o),e.lineTo(t.x-a(u)*l,t.y-n(u)*l),e.lineTo(h,c)},r})(s.Path);function Pa(i,r){var e=i.get("center"),t=r.getWidth(),a=r.getHeight(),n=Math.min(t,a),o=s.parsePercent(e[0],r.getWidth()),l=s.parsePercent(e[1],r.getHeight()),u=s.parsePercent(i.get("radius"),n/2);return{cx:o,cy:l,r:u}}function Ce(i,r){var e=i==null?"":i+"";return r&&(s.isString(r)?e=r.replace("{value}",e):s.isFunction(r)&&(e=r(i))),e}var Ta=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){this.group.removeAll();var n=e.get(["axisLine","lineStyle","color"]),o=Pa(e,a);this._renderMain(e,t,a,n,o),this._data=e.getData()},r.prototype.dispose=function(){},r.prototype._renderMain=function(e,t,a,n,o){var l=this.group,u=e.get("clockwise"),h=-e.get("startAngle")/180*Math.PI,c=-e.get("endAngle")/180*Math.PI,v=e.getModel("axisLine"),g=v.get("roundCap"),p=g?Ve:s.Sector,f=v.get("show"),d=v.getModel("lineStyle"),S=d.get("width"),m=[h,c];s.normalizeArcAngles(m,!u),h=m[0],c=m[1];for(var y=c-h,b=h,I=[],D=0;f&&D<n.length;D++){var _=Math.min(Math.max(n[D][0],0),1);c=h+y*_;var x=new p({shape:{startAngle:b,endAngle:c,cx:o.cx,cy:o.cy,clockwise:u,r0:o.r-S,r:o.r},silent:!0});x.setStyle({fill:n[D][1]}),x.setStyle(d.getLineStyle(["color","width"])),I.push(x),b=c}I.reverse(),s.each(I,function(C){return l.add(C)});var A=function(C){if(C<=0)return n[0][1];var w;for(w=0;w<n.length;w++)if(n[w][0]>=C&&(w===0?0:n[w-1][0])<C)return n[w][1];return n[w-1][1]};this._renderTicks(e,t,a,A,o,h,c,u,S),this._renderTitleAndDetail(e,t,a,A,o),this._renderAnchor(e,o),this._renderPointer(e,t,a,A,o,h,c,u,S)},r.prototype._renderTicks=function(e,t,a,n,o,l,u,h,c){for(var v=this.group,g=o.cx,p=o.cy,f=o.r,d=+e.get("min"),S=+e.get("max"),m=e.getModel("splitLine"),y=e.getModel("axisTick"),b=e.getModel("axisLabel"),I=e.get("splitNumber"),D=y.get("splitNumber"),_=s.parsePercent(m.get("length"),f),x=s.parsePercent(y.get("length"),f),A=l,C=(u-l)/I,w=C/D,M=m.getModel("lineStyle").getLineStyle(),L=y.getModel("lineStyle").getLineStyle(),P=m.get("distance"),E,T,k=0;k<=I;k++){if(E=Math.cos(A),T=Math.sin(A),m.get("show")){var N=P?P+c:c,V=new s.Line({shape:{x1:E*(f-N)+g,y1:T*(f-N)+p,x2:E*(f-_-N)+g,y2:T*(f-_-N)+p},style:M,silent:!0});M.stroke==="auto"&&V.setStyle({stroke:n(k/I)}),v.add(V)}if(b.get("show")){var N=b.get("distance")+P,O=Ce(s.round(k/I*(S-d)+d),b.get("formatter")),R=n(k/I),z=E*(f-_-N)+g,G=T*(f-_-N)+p,H=b.get("rotate"),F=0;H==="radial"?(F=-A+2*Math.PI,F>Math.PI/2&&(F+=Math.PI)):H==="tangential"?F=-A-Math.PI/2:s.isNumber(H)&&(F=H*Math.PI/180),F===0?v.add(new s.ZRText({style:s.createTextStyle(b,{text:O,x:z,y:G,verticalAlign:T<-.8?"top":T>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:R}),silent:!0})):v.add(new s.ZRText({style:s.createTextStyle(b,{text:O,x:z,y:G,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:z,originY:G,rotation:F}))}if(y.get("show")&&k!==I){var N=y.get("distance");N=N?N+c:c;for(var B=0;B<=D;B++){E=Math.cos(A),T=Math.sin(A);var J=new s.Line({shape:{x1:E*(f-N)+g,y1:T*(f-N)+p,x2:E*(f-x-N)+g,y2:T*(f-x-N)+p},silent:!0,style:L});L.stroke==="auto"&&J.setStyle({stroke:n((k+B/D)/I)}),v.add(J),A+=w}A-=w}else A+=C}},r.prototype._renderPointer=function(e,t,a,n,o,l,u,h,c){var v=this.group,g=this._data,p=this._progressEls,f=[],d=e.get(["pointer","show"]),S=e.getModel("progress"),m=S.get("show"),y=e.getData(),b=y.mapDimension("value"),I=+e.get("min"),D=+e.get("max"),_=[I,D],x=[l,u];function A(w,M){var L=y.getItemModel(w),P=L.getModel("pointer"),E=s.parsePercent(P.get("width"),o.r),T=s.parsePercent(P.get("length"),o.r),k=e.get(["pointer","icon"]),N=P.get("offsetCenter"),V=s.parsePercent(N[0],o.r),O=s.parsePercent(N[1],o.r),R=P.get("keepAspect"),z;return k?z=s.createSymbol(k,V-E/2,O-T,E,T,null,R):z=new Ca({shape:{angle:-Math.PI/2,width:E,r:T,x:V,y:O}}),z.rotation=-(M+Math.PI/2),z.x=o.cx,z.y=o.cy,z}function C(w,M){var L=S.get("roundCap"),P=L?Ve:s.Sector,E=S.get("overlap"),T=E?S.get("width"):c/y.count(),k=E?o.r-T:o.r-(w+1)*T,N=E?o.r:o.r-w*T,V=new P({shape:{startAngle:l,endAngle:M,cx:o.cx,cy:o.cy,clockwise:h,r0:k,r:N}});return E&&(V.z2=s.linearMap(y.get(b,w),[I,D],[100,0],!0)),V}(m||d)&&(y.diff(g).add(function(w){var M=y.get(b,w);if(d){var L=A(w,l);s.initProps(L,{rotation:-((isNaN(+M)?x[0]:s.linearMap(M,_,x,!0))+Math.PI/2)},e),v.add(L),y.setItemGraphicEl(w,L)}if(m){var P=C(w,l),E=S.get("clip");s.initProps(P,{shape:{endAngle:s.linearMap(M,_,x,E)}},e),v.add(P),s.setCommonECData(e.seriesIndex,y.dataType,w,P),f[w]=P}}).update(function(w,M){var L=y.get(b,w);if(d){var P=g.getItemGraphicEl(M),E=P?P.rotation:l,T=A(w,E);T.rotation=E,s.updateProps(T,{rotation:-((isNaN(+L)?x[0]:s.linearMap(L,_,x,!0))+Math.PI/2)},e),v.add(T),y.setItemGraphicEl(w,T)}if(m){var k=p[M],N=k?k.shape.endAngle:l,V=C(w,N),O=S.get("clip");s.updateProps(V,{shape:{endAngle:s.linearMap(L,_,x,O)}},e),v.add(V),s.setCommonECData(e.seriesIndex,y.dataType,w,V),f[w]=V}}).execute(),y.each(function(w){var M=y.getItemModel(w),L=M.getModel("emphasis"),P=L.get("focus"),E=L.get("blurScope"),T=L.get("disabled");if(d){var k=y.getItemGraphicEl(w),N=y.getItemVisual(w,"style"),V=N.fill;if(k instanceof s.ZRImage){var O=k.style;k.useStyle(s.extend({image:O.image,x:O.x,y:O.y,width:O.width,height:O.height},N))}else k.useStyle(N),k.type!=="pointer"&&k.setColor(V);k.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",n(s.linearMap(y.get(b,w),_,[0,1],!0))),k.z2EmphasisLift=0,s.setStatesStylesFromModel(k,M),s.toggleHoverEmphasis(k,P,E,T)}if(m){var R=f[w];R.useStyle(y.getItemVisual(w,"style")),R.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),R.z2EmphasisLift=0,s.setStatesStylesFromModel(R,M),s.toggleHoverEmphasis(R,P,E,T)}}),this._progressEls=f)},r.prototype._renderAnchor=function(e,t){var a=e.getModel("anchor"),n=a.get("show");if(n){var o=a.get("size"),l=a.get("icon"),u=a.get("offsetCenter"),h=a.get("keepAspect"),c=s.createSymbol(l,t.cx-o/2+s.parsePercent(u[0],t.r),t.cy-o/2+s.parsePercent(u[1],t.r),o,o,null,h);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},r.prototype._renderTitleAndDetail=function(e,t,a,n,o){var l=this,u=e.getData(),h=u.mapDimension("value"),c=+e.get("min"),v=+e.get("max"),g=new s.Group,p=[],f=[],d=e.isAnimationEnabled(),S=e.get(["pointer","showAbove"]);u.diff(this._data).add(function(m){p[m]=new s.ZRText({silent:!0}),f[m]=new s.ZRText({silent:!0})}).update(function(m,y){p[m]=l._titleEls[y],f[m]=l._detailEls[y]}).execute(),u.each(function(m){var y=u.getItemModel(m),b=u.get(h,m),I=new s.Group,D=n(s.linearMap(b,[c,v],[0,1],!0)),_=y.getModel("title");if(_.get("show")){var x=_.get("offsetCenter"),A=o.cx+s.parsePercent(x[0],o.r),C=o.cy+s.parsePercent(x[1],o.r),w=p[m];w.attr({z2:S?0:2,style:s.createTextStyle(_,{x:A,y:C,text:u.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:D})}),I.add(w)}var M=y.getModel("detail");if(M.get("show")){var L=M.get("offsetCenter"),P=o.cx+s.parsePercent(L[0],o.r),E=o.cy+s.parsePercent(L[1],o.r),T=s.parsePercent(M.get("width"),o.r),k=s.parsePercent(M.get("height"),o.r),N=e.get(["progress","show"])?u.getItemVisual(m,"style").fill:D,w=f[m],V=M.get("formatter");w.attr({z2:S?0:2,style:s.createTextStyle(M,{x:P,y:E,text:Ce(b,V),width:isNaN(T)?null:T,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:N})}),s.setLabelValueAnimation(w,{normal:M},b,function(R){return Ce(R,V)}),d&&s.animateLabelValue(w,m,u,e,{getFormattedLabel:function(R,z,G,H,F,B){return Ce(B?B.interpolatedValue:b,V)}}),I.add(w)}g.add(I)}),this.group.add(g),this._titleEls=p,this._detailEls=f},r.type="gauge",r})(s.ChartView),Va=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.visualStyleAccessPath="itemStyle",e}return r.prototype.getInitialData=function(e,t){return Je(this,["value"])},r.type="series.gauge",r.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,s.tokens.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:s.tokens.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:s.tokens.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:s.tokens.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:s.tokens.color.neutral00,borderWidth:0,borderColor:s.tokens.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:s.tokens.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:s.tokens.color.transparent,borderWidth:0,borderColor:s.tokens.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:s.tokens.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},r})(s.SeriesModel);function ka(i){i.registerChartView(Ta),i.registerSeriesModel(Va)}var Ea=256,Na=(function(){function i(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var r=s.platformApi.createCanvas();this.canvas=r}return i.prototype.update=function(r,e,t,a,n,o){var l=this._getBrush(),u=this._getGradient(n,"inRange"),h=this._getGradient(n,"outOfRange"),c=this.pointSize+this.blurSize,v=this.canvas,g=v.getContext("2d"),p=r.length;v.width=e,v.height=t;for(var f=0;f<p;++f){var d=r[f],S=d[0],m=d[1],y=d[2],b=a(y);g.globalAlpha=b,g.drawImage(l,S-c,m-c)}if(!v.width||!v.height)return v;for(var I=g.getImageData(0,0,v.width,v.height),D=I.data,_=0,x=D.length,A=this.minOpacity,C=this.maxOpacity,w=C-A;_<x;){var b=D[_+3]/256,M=Math.floor(b*(Ea-1))*4;if(b>0){var L=o(b)?u:h;b>0&&(b=b*w+A),D[_++]=L[M],D[_++]=L[M+1],D[_++]=L[M+2],D[_++]=L[M+3]*b*256}else _+=4}return g.putImageData(I,0,0),v},i.prototype._getBrush=function(){var r=this._brushCanvas||(this._brushCanvas=s.platformApi.createCanvas()),e=this.pointSize+this.blurSize,t=e*2;r.width=t,r.height=t;var a=r.getContext("2d");return a.clearRect(0,0,t,t),a.shadowOffsetX=t,a.shadowBlur=this.blurSize,a.shadowColor=s.tokens.color.neutral99,a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),r},i.prototype._getGradient=function(r,e){for(var t=this._gradientPixels,a=t[e]||(t[e]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,l=0;l<256;l++)r[e](l/255,!0,n),a[o++]=n[0],a[o++]=n[1],a[o++]=n[2],a[o++]=n[3];return a},i})();function Oa(i,r,e){var t=i[1]-i[0];r=s.map(r,function(o){return{interval:[(o.interval[0]-i[0])/t,(o.interval[1]-i[0])/t]}});var a=r.length,n=0;return function(o){var l;for(l=n;l<a;l++){var u=r[l].interval;if(u[0]<=o&&o<=u[1]){n=l;break}}if(l===a)for(l=n-1;l>=0;l--){var u=r[l].interval;if(u[0]<=o&&o<=u[1]){n=l;break}}return l>=0&&l<a&&e[l]}}function Ra(i,r){var e=i[1]-i[0];return r=[(r[0]-i[0])/e,(r[1]-i[0])/e],function(t){return t>=r[0]&&t<=r[1]}}function Mt(i){var r=i.dimensions;return r[0]==="lng"&&r[1]==="lat"}var za=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n;if(t.eachComponent("visualMap",function(l){l.eachTargetSeries(function(u){u===e&&(n=l)})}),process.env.NODE_ENV!=="production"&&!n)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,a,0,e.getData().count()):Mt(o)&&this._renderOnGeo(o,e,n,a)},r.prototype.incrementalPrepareRender=function(e,t,a){this.group.removeAll()},r.prototype.incrementalRender=function(e,t,a,n){var o=t.coordinateSystem;o&&(Mt(o)?this.render(t,a,n):(this._progressiveEls=[],this._renderOnGridLike(t,n,e.start,e.end,!0)))},r.prototype.eachRendered=function(e){s.traverseElements(this._progressiveEls||this.group,e)},r.prototype._renderOnGridLike=function(e,t,a,n,o){var l=e.coordinateSystem,u=me(l,"cartesian2d"),h=me(l,"matrix"),c,v,g,p;if(u){var f=l.getAxis("x"),d=l.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(f.type==="category"&&d.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(f.onBand&&d.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}c=f.getBandWidth()+.5,v=d.getBandWidth()+.5,g=f.scale.getExtent(),p=d.scale.getExtent()}for(var S=this.group,m=e.getData(),y=e.getModel(["emphasis","itemStyle"]).getItemStyle(),b=e.getModel(["blur","itemStyle"]).getItemStyle(),I=e.getModel(["select","itemStyle"]).getItemStyle(),D=e.get(["itemStyle","borderRadius"]),_=s.getLabelStatesModels(e),x=e.getModel("emphasis"),A=x.get("focus"),C=x.get("blurScope"),w=x.get("disabled"),M=u||h?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],L=a;L<n;L++){var P=void 0,E=m.getItemVisual(L,"style");if(u){var T=m.get(M[0],L),k=m.get(M[1],L);if(isNaN(m.get(M[2],L))||isNaN(T)||isNaN(k)||T<g[0]||T>g[1]||k<p[0]||k>p[1])continue;var N=l.dataToPoint([T,k]);P=new s.Rect({shape:{x:N[0]-c/2,y:N[1]-v/2,width:c,height:v},style:E})}else if(h){var V=l.dataToLayout([m.get(M[0],L),m.get(M[1],L)]).rect;if(s.eqNaN(V.x))continue;P=new s.Rect({z2:1,shape:V,style:E})}else{if(isNaN(m.get(M[1],L)))continue;var O=l.dataToLayout([m.get(M[0],L)]),V=O.contentRect||O.rect;if(s.eqNaN(V.x)||s.eqNaN(V.y))continue;P=new s.Rect({z2:1,shape:V,style:E})}if(m.hasItemOption){var R=m.getItemModel(L),z=R.getModel("emphasis");y=z.getModel("itemStyle").getItemStyle(),b=R.getModel(["blur","itemStyle"]).getItemStyle(),I=R.getModel(["select","itemStyle"]).getItemStyle(),D=R.get(["itemStyle","borderRadius"]),A=z.get("focus"),C=z.get("blurScope"),w=z.get("disabled"),_=s.getLabelStatesModels(R)}P.shape.r=D;var G=e.getRawValue(L),H="-";G&&G[2]!=null&&(H=G[2]+""),s.setLabelStyle(P,_,{labelFetcher:e,labelDataIndex:L,defaultOpacity:E.opacity,defaultText:H}),P.ensureState("emphasis").style=y,P.ensureState("blur").style=b,P.ensureState("select").style=I,s.toggleHoverEmphasis(P,A,C,w),P.incremental=o,o&&(P.states.emphasis.hoverLayer=!0),S.add(P),m.setItemGraphicEl(L,P),this._progressiveEls&&this._progressiveEls.push(P)}},r.prototype._renderOnGeo=function(e,t,a,n){var o=a.targetVisuals.inRange,l=a.targetVisuals.outOfRange,u=t.getData(),h=this._hmLayer||this._hmLayer||new Na;h.blurSize=t.get("blurSize"),h.pointSize=t.get("pointSize"),h.minOpacity=t.get("minOpacity"),h.maxOpacity=t.get("maxOpacity");var c=e.getViewRect().clone(),v=e.getRoamTransform();c.applyTransform(v);var g=Math.max(c.x,0),p=Math.max(c.y,0),f=Math.min(c.width+c.x,n.getWidth()),d=Math.min(c.height+c.y,n.getHeight()),S=f-g,m=d-p,y=[u.mapDimension("lng"),u.mapDimension("lat"),u.mapDimension("value")],b=u.mapArray(y,function(x,A,C){var w=e.dataToPoint([x,A]);return w[0]-=g,w[1]-=p,w.push(C),w}),I=a.getExtent(),D=a.type==="visualMap.continuous"?Ra(I,a.option.range):Oa(I,a.getPieceList(),a.option.selected);h.update(b,S,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},D);var _=new s.ZRImage({style:{width:S,height:m,x:g,y:p,image:h.canvas},silent:!0});this.group.add(_)},r.type="heatmap",r})(s.ChartView),Ga=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(e,t){return s.createSeriesData(null,this,{generateCoord:"value"})},r.prototype.preventIncremental=function(){var e=s.CoordinateSystemManager.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},r.type="series.heatmap",r.dependencies=["grid","geo","calendar","matrix"],r.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:s.tokens.color.primary}}},r})(s.SeriesModel);function Ha(i){i.registerChartView(za),i.registerSeriesModel(Ga)}var Dt=s.each;function It(i){if(i){for(var r in i)if(i.hasOwnProperty(r))return!0}}function Lt(i,r,e){var t={};return Dt(r,function(n){var o=t[n]=a();Dt(i[n],function(l,u){if(X.isValidType(u)){var h={type:u,visual:l};e&&e(h,n),o[u]=new X(h),u==="opacity"&&(h=s.clone(h),h.type="colorAlpha",o.__hidden.__alphaForOpacity=new X(h))}})}),t;function a(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function Fa(i,r,e){var t;s.each(e,function(a){r.hasOwnProperty(a)&&It(r[a])&&(t=!0)}),t&&s.each(e,function(a){r.hasOwnProperty(a)&&It(r[a])?i[a]=s.clone(r[a]):delete i[a]})}function Ba(i,r,e,t){var a={};return s.each(i,function(n){var o=X.prepareVisualTypes(r[n]);a[n]=o}),{progress:function(o,l){var u;t!=null&&(u=l.getDimensionIndex(t));function h(D){return s.getItemVisualFromData(l,v,D)}function c(D,_){s.setItemVisualFromData(l,v,D,_)}for(var v,g=l.getStore();(v=o.next())!=null;){var p=l.getRawDataItem(v);if(!(p&&p.visualMap===!1))for(var f=t!=null?g.get(u,v):v,d=e(f),S=r[d],m=a[d],y=0,b=m.length;y<b;y++){var I=m[y];S[I]&&S[I].applyVisual(f,h,c)}}}}}var sr={get:function(i,r,e){var t=s.clone((Wa[i]||{})[r]);return e&&s.isArray(t)?t[t.length-1]:t}},Wa={color:{active:["#006edd","#e0ffff"],inactive:[s.tokens.color.transparent]},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]}},Ct=X.mapVisual,Ua=X.eachVisual,$a=s.isArray,Pt=s.each,Xa=s.asc,Za=s.linearMap,Ee=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return r.prototype.init=function(e,t,a){this.mergeDefaultAndTheme(e,a)},r.prototype.optionUpdated=function(e,t){var a=this.option;!t&&Fa(a,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},r.prototype.resetVisual=function(e){var t=this.stateList;e=s.bind(e,this),this.controllerVisuals=Lt(this.option.controller,t,e),this.targetVisuals=Lt(this.option.target,t,e)},r.prototype.getItemSymbol=function(){return null},r.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,t=this.option.seriesIndex;t==null&&e==null&&(t="all");var a=s.queryReferringComponents(this.ecModel,"series",{index:t,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return s.map(a,function(n){return n.componentIndex})},r.prototype.eachTargetSeries=function(e,t){s.each(this.getTargetSeriesIndices(),function(a){var n=this.ecModel.getSeriesByIndex(a);n&&e.call(t,n)},this)},r.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(a){a===e&&(t=!0)}),t},r.prototype.formatValueText=function(e,t,a){var n=this.option,o=n.precision,l=this.dataBound,u=n.formatter,h;a=a||["<",">"],s.isArray(e)&&(e=e.slice(),h=!0);var c=t?e:h?[v(e[0]),v(e[1])]:v(e);if(s.isString(u))return u.replace("{value}",h?c[0]:c).replace("{value2}",h?c[1]:c);if(s.isFunction(u))return h?u(e[0],e[1]):u(e);if(h)return e[0]===l[0]?a[0]+" "+c[1]:e[1]===l[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function v(g){return g===l[0]?"min":g===l[1]?"max":(+g).toFixed(Math.min(o,20))}},r.prototype.resetExtent=function(){var e=this.option,t=Xa([e.min,e.max]);this._dataExtent=t},r.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(t!=null)return e.getDimensionIndex(t);for(var a=e.dimensions,n=a.length-1;n>=0;n--){var o=a[n],l=e.getDimensionInfo(o);if(!l.isCalculationCoord)return l.storeDimIndex}},r.prototype.getExtent=function(){return this._dataExtent.slice()},r.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,a={inRange:t.inRange,outOfRange:t.outOfRange},n=t.target||(t.target={}),o=t.controller||(t.controller={});s.merge(n,a),s.merge(o,a);var l=this.isCategory();u.call(this,n),u.call(this,o),h.call(this,n,"inRange","outOfRange"),c.call(this,o);function u(v){$a(t.color)&&!v.inRange&&(v.inRange={color:t.color.slice().reverse()}),v.inRange=v.inRange||{color:e.get("gradientColor")}}function h(v,g,p){var f=v[g],d=v[p];f&&!d&&(d=v[p]={},Pt(f,function(S,m){if(X.isValidType(m)){var y=sr.get(m,"inactive",l);y!=null&&(d[m]=y,m==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function c(v){var g=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,p=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,f=this.get("inactiveColor"),d=this.getItemSymbol(),S=d||"roundRect";Pt(this.stateList,function(m){var y=this.itemSize,b=v[m];b||(b=v[m]={color:l?f:[f]}),b.symbol==null&&(b.symbol=g&&s.clone(g)||(l?S:[S])),b.symbolSize==null&&(b.symbolSize=p&&s.clone(p)||(l?y[0]:[y[0],y[0]])),b.symbol=Ct(b.symbol,function(_){return _==="none"?S:_});var I=b.symbolSize;if(I!=null){var D=-1/0;Ua(I,function(_){_>D&&(D=_)}),b.symbolSize=Ct(I,function(_){return Za(_,[0,D],[0,y[0]],!0)})}},this)}},r.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},r.prototype.isCategory=function(){return!!this.option.categories},r.prototype.setSelected=function(e){},r.prototype.getSelected=function(){return null},r.prototype.getValueState=function(e){return null},r.prototype.getVisualMeta=function(e){return null},r.type="visualMap",r.dependencies=["series"],r.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:s.tokens.color.transparent,borderColor:s.tokens.color.borderTint,contentColor:s.tokens.color.theme[0],inactiveColor:s.tokens.color.disabled,borderWidth:0,padding:s.tokens.size.m,textGap:10,precision:0,textStyle:{color:s.tokens.color.secondary}},r})(s.ComponentModel),Tt=[20,140],Ya=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.optionUpdated=function(e,t){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},r.prototype.resetItemSize=function(){i.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Tt[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Tt[1])},r.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):s.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},r.prototype.completeVisualOption=function(){i.prototype.completeVisualOption.apply(this,arguments),s.each(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},r.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},r.prototype.getSelected=function(){var e=this.getExtent(),t=s.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},r.prototype.getValueState=function(e){var t=this.option.range,a=this.getExtent(),n=s.retrieve2(this.option.unboundedRange,!0);return(n&&t[0]<=a[0]||t[0]<=e)&&(n&&t[1]>=a[1]||e<=t[1])?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(a){var n=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(l,u){e[0]<=l&&l<=e[1]&&n.push(u)},this),t.push({seriesId:a.id,dataIndex:n})},this),t},r.prototype.getVisualMeta=function(e){var t=Vt(this,"outOfRange",this.getExtent()),a=Vt(this,"inRange",this.option.range.slice()),n=[];function o(p,f){n.push({value:p,color:e(p,f)})}for(var l=0,u=0,h=a.length,c=t.length;u<c&&(!a.length||t[u]<=a[0]);u++)t[u]<a[l]&&o(t[u],"outOfRange");for(var v=1;l<h;l++,v=0)v&&n.length&&o(a[l],"outOfRange"),o(a[l],"inRange");for(var v=1;u<c;u++)(!a.length||a[a.length-1]<t[u])&&(v&&(n.length&&o(n[n.length-1].value,"outOfRange"),v=0),o(t[u],"outOfRange"));var g=n.length;return{stops:n,outerColors:[g?n[0].color:"transparent",g?n[g-1].color:"transparent"]}},r.type="visualMap.continuous",r.defaultOption=s.inheritDefaultOption(Ee.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:s.tokens.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:s.tokens.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:s.tokens.color.shadow}}),r})(Ee);function Vt(i,r,e){if(e[0]===e[1])return e.slice();for(var t=200,a=(e[1]-e[0])/t,n=e[0],o=[],l=0;l<=t&&n<e[1];l++)o.push(n),n+=a;return o.push(e[1]),o}var lr=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return r.prototype.init=function(e,t){this.ecModel=e,this.api=t},r.prototype.render=function(e,t,a,n){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,t,a,n)},r.prototype.renderBackground=function(e){var t=this.visualMapModel,a=s.normalizeCssArray(t.get("padding")||0),n=e.getBoundingRect();e.add(new s.Rect({z2:-1,silent:!0,shape:{x:n.x-a[3],y:n.y-a[0],width:n.width+a[3]+a[1],height:n.height+a[0]+a[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},r.prototype.getControllerVisual=function(e,t,a){a=a||{};var n=a.forceState,o=this.visualMapModel,l={};if(t==="color"){var u=o.get("contentColor");l.color=u}function h(p){return l[p]}function c(p,f){l[p]=f}var v=o.controllerVisuals[n||o.getValueState(e)],g=X.prepareVisualTypes(v);return s.each(g,function(p){var f=v[p];a.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",f=v.__alphaForOpacity),X.dependsOn(p,t)&&f&&f.applyVisual(e,h,c)}),l[t]},r.prototype.positionGroup=function(e){var t=this.visualMapModel,a=this.api,n=s.createBoxLayoutReference(t,a).refContainer;s.positionElement(e,t.getBoxLayoutParams(),n)},r.prototype.doRender=function(e,t,a,n){},r.type="visualMap",r})(s.ComponentView),kt=[["left","right","width"],["top","bottom","height"]];function ur(i,r,e){var t=i.option,a=t.align;if(a!=null&&a!=="auto")return a;for(var n={width:r.getWidth(),height:r.getHeight()},o=t.orient==="horizontal"?1:0,l=kt[o],u=[0,null,10],h={},c=0;c<3;c++)h[kt[1-o][c]]=u[c],h[l[c]]=c===2?e[0]:t[l[c]];var v=[["x","width",3],["y","height",0]][o],g=s.getLayoutRect(h,n,t.padding);return l[(g.margin[v[2]]||0)+g[v[0]]+g[v[1]]*.5<n[v[1]]*.5?0:1]}function Pe(i,r){return s.each(i||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(r?r.componentIndex:"")}),i}var Y=s.linearMap,qa=s.each,Et=Math.min,Xe=Math.max,ja=12,Ka=6,Ja=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return r.prototype.init=function(e,t){i.prototype.init.call(this,e,t),this._hoverLinkFromSeriesMouseOver=s.bind(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=s.bind(this._hideIndicator,this)},r.prototype.doRender=function(e,t,a,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},r.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var a=e.get("text");this._renderEndsText(t,a,0),this._renderEndsText(t,a,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},r.prototype._renderEndsText=function(e,t,a){if(t){var n=t[1-a];n=n!=null?n+"":"";var o=this.visualMapModel,l=o.get("textGap"),u=o.itemSize,h=this._shapes.mainGroup,c=this._applyTransform([u[0]/2,a===0?-l:u[1]+l],h),v=this._applyTransform(a===0?"bottom":"top",h),g=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new s.ZRText({style:s.createTextStyle(p,{x:c[0],y:c[1],verticalAlign:p.get("verticalAlign")||(g==="horizontal"?"middle":v),align:p.get("align")||(g==="horizontal"?v:"center"),text:n})}))}},r.prototype._renderBar=function(e){var t=this.visualMapModel,a=this._shapes,n=t.itemSize,o=this._orient,l=this._useHandle,u=ur(t,this.api,n),h=a.mainGroup=this._createBarGroup(u),c=new s.Group;h.add(c),c.add(a.outOfRange=Nt()),c.add(a.inRange=Nt(null,l?Rt(this._orient):null,s.bind(this._dragHandle,this,"all",!1),s.bind(this._dragHandle,this,"all",!0))),c.setClipPath(new s.Rect({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var v=t.textStyleModel.getTextRect("国"),g=Xe(v.width,v.height);l&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(t,h,0,n,g,o),this._createHandle(t,h,1,n,g,o)),this._createIndicator(t,h,n,g,o),e.add(h)},r.prototype._createHandle=function(e,t,a,n,o,l){var u=s.bind(this._dragHandle,this,a,!1),h=s.bind(this._dragHandle,this,a,!0),c=s.parsePercent$1(e.get("handleSize"),n[0]),v=s.createSymbol(e.get("handleIcon"),-c/2,-c/2,c,c,null,!0),g=Rt(this._orient);v.attr({cursor:g,draggable:!0,drift:u,ondragend:h,onmousemove:function(m){s.stop(m.event)}}),v.x=n[0]/2,v.useStyle(e.getModel("handleStyle").getItemStyle()),v.setStyle({strokeNoScale:!0,strokeFirst:!0}),v.style.lineWidth*=2,v.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),s.setAsHighDownDispatcher(v,!0),t.add(v);var p=this.visualMapModel.textStyleModel,f=new s.ZRText({cursor:g,draggable:!0,drift:u,onmousemove:function(m){s.stop(m.event)},ondragend:h,style:s.createTextStyle(p,{x:0,y:0,text:""})});f.ensureState("blur").style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var d=[c,0],S=this._shapes;S.handleThumbs[a]=v,S.handleLabelPoints[a]=d,S.handleLabels[a]=f},r.prototype._createIndicator=function(e,t,a,n,o){var l=s.parsePercent$1(e.get("indicatorSize"),a[0]),u=s.createSymbol(e.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);u.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var h=e.getModel("indicatorStyle").getItemStyle();if(u instanceof s.ZRImage){var c=u.style;u.useStyle(s.extend({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},h))}else u.useStyle(h);t.add(u);var v=this.visualMapModel.textStyleModel,g=new s.ZRText({silent:!0,invisible:!0,style:s.createTextStyle(v,{x:0,y:0,text:""})});this.group.add(g);var p=[(o==="horizontal"?n/2:Ka)+a[0]/2,0],f=this._shapes;f.indicator=u,f.indicatorLabel=g,f.indicatorLabelPoint=p,this._firstShowIndicator=!0},r.prototype._dragHandle=function(e,t,a,n){if(this._useHandle){if(this._dragging=!t,!t){var o=this._applyTransform([a,n],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():Ot(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},r.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),a=e.getExtent(),n=[0,e.itemSize[1]];this._handleEnds=[Y(t[0],a,n,!0),Y(t[1],a,n,!0)]},r.prototype._updateInterval=function(e,t){t=t||0;var a=this.visualMapModel,n=this._handleEnds,o=[0,a.itemSize[1]];s.sliderMove(t,n,o,e,0);var l=a.getExtent();this._dataInterval=[Y(n[0],o,l,!0),Y(n[1],o,l,!0)]},r.prototype._updateView=function(e){var t=this.visualMapModel,a=t.getExtent(),n=this._shapes,o=[0,t.itemSize[1]],l=e?o:this._handleEnds,u=this._createBarVisual(this._dataInterval,a,l,"inRange"),h=this._createBarVisual(a,a,o,"outOfRange");n.inRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),n.outOfRange.setStyle({fill:h.barColor}).setShape("points",h.barPoints),this._updateHandle(l,u)},r.prototype._createBarVisual=function(e,t,a,n){var o={forceState:n,convertOpacityToAlpha:!0},l=this._makeColorGradient(e,o),u=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],h=this._createBarPoints(a,u);return{barColor:new s.LinearGradient(0,0,0,1,l),barPoints:h,handlesColor:[l[0].color,l[l.length-1].color]}},r.prototype._makeColorGradient=function(e,t){var a=100,n=[],o=(e[1]-e[0])/a;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var l=1;l<a;l++){var u=e[0]+o*l;if(u>e[1])break;n.push({color:this.getControllerVisual(u,"color",t),offset:l/a})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},r.prototype._createBarPoints=function(e,t){var a=this.visualMapModel.itemSize;return[[a[0]-t[0],e[0]],[a[0],e[0]],[a[0],e[1]],[a[0]-t[1],e[1]]]},r.prototype._createBarGroup=function(e){var t=this._orient,a=this.visualMapModel.get("inverse");return new s.Group(t==="horizontal"&&!a?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:t==="horizontal"&&a?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:t==="vertical"&&!a?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},r.prototype._updateHandle=function(e,t){if(this._useHandle){var a=this._shapes,n=this.visualMapModel,o=a.handleThumbs,l=a.handleLabels,u=n.itemSize,h=n.getExtent(),c=this._applyTransform("left",a.mainGroup);qa([0,1],function(v){var g=o[v];g.setStyle("fill",t.handlesColor[v]),g.y=e[v];var p=Y(e[v],[0,u[1]],h,!0),f=this.getControllerVisual(p,"symbolSize");g.scaleX=g.scaleY=f/u[0],g.x=u[0]-f/2;var d=s.applyTransform(a.handleLabelPoints[v],s.getTransform(g,this.group));if(this._orient==="horizontal"){var S=c==="left"||c==="top"?(u[0]-f)/2:(u[0]-f)/-2;d[1]+=S}l[v].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},r.prototype._showIndicator=function(e,t,a,n){var o=this.visualMapModel,l=o.getExtent(),u=o.itemSize,h=[0,u[1]],c=this._shapes,v=c.indicator;if(v){v.attr("invisible",!1);var g={convertOpacityToAlpha:!0},p=this.getControllerVisual(e,"color",g),f=this.getControllerVisual(e,"symbolSize"),d=Y(e,l,h,!0),S=u[0]-f/2,m={x:v.x,y:v.y};v.y=d,v.x=S;var y=s.applyTransform(c.indicatorLabelPoint,s.getTransform(v,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var I=this._applyTransform("left",c.mainGroup),D=this._orient,_=D==="horizontal";b.setStyle({text:(a||"")+o.formatValueText(t),verticalAlign:_?I:"middle",align:_?"center":I});var x={x:S,y:d,style:{fill:p}},A={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};v.x=m.x,v.y=m.y,v.animateTo(x,C),b.animateTo(A,C)}else v.attr(x),b.attr(A);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var M=0;M<w.length;M++)this.api.enterBlur(w[M])}},r.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var a=e.visualMapModel.itemSize,n=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);n[1]=Et(Xe(0,n[1]),a[1]),e._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=a[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},r.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},r.prototype._doHoverLinkToSeries=function(e,t){var a=this.visualMapModel,n=a.itemSize;if(a.option.hoverLink){var o=[0,n[1]],l=a.getExtent();e=Et(Xe(o[0],e),o[1]);var u=Qa(a,l,o),h=[e-u,e+u],c=Y(e,o,l,!0),v=[Y(h[0],o,l,!0),Y(h[1],o,l,!0)];h[0]<o[0]&&(v[0]=-1/0),h[1]>o[1]&&(v[1]=1/0),t&&(v[0]===-1/0?this._showIndicator(c,v[1],"< ",u):v[1]===1/0?this._showIndicator(c,v[0],"> ",u):this._showIndicator(c,c,"≈ ",u));var g=this._hoverLinkDataIndices,p=[];(t||Ot(a))&&(p=this._hoverLinkDataIndices=a.findTargetDataIndices(v));var f=s.compressBatches(g,p);this._dispatchHighDown("downplay",Pe(f[0],a)),this._dispatchHighDown("highlight",Pe(f[1],a))}},r.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(s.findEventDispatcher(e.target,function(u){var h=s.getECData(u);if(h.dataIndex!=null)return t=h,!0},!0),!!t){var a=this.ecModel.getSeriesByIndex(t.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(a)){var o=a.getData(t.dataType),l=o.getStore().get(n.getDataDimensionIndex(o),t.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},r.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var a=0;a<t.length;a++)this.api.leaveBlur(t[a])},r.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Pe(e,this.visualMapModel)),e.length=0},r.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},r.prototype._applyTransform=function(e,t,a,n){var o=s.getTransform(t,n?null:this.group);return s.isArray(e)?s.applyTransform(e,o,a):s.transformDirection(e,o,a)},r.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},r.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},r.type="visualMap.continuous",r})(lr);function Nt(i,r,e,t){return new s.Polygon({shape:{points:i},draggable:!!e,cursor:r,drift:e,onmousemove:function(a){s.stop(a.event)},ondragend:t})}function Qa(i,r,e){var t=ja/2,a=i.get("hoverLinkDataSize");return a&&(t=Y(a,r,e,!0)/2),t}function Ot(i){var r=i.get("hoverLinkOnHandle");return!!(r??i.get("realtime"))}function Rt(i){return i==="vertical"?"ns-resize":"ew-resize"}var ei={type:"selectDataRange",event:"dataRangeSelected",update:"update"},ti=function(i,r){r.eachComponent({mainType:"visualMap",query:i},function(e){e.setSelected(i.selected)})},ri=[{createOnAllSeries:!0,reset:function(i,r){var e=[];return r.eachComponent("visualMap",function(t){var a=i.pipelineContext;!t.isTargetSeries(i)||a&&a.large||e.push(Ba(t.stateList,t.targetVisuals,s.bind(t.getValueState,t),t.getDataDimensionIndex(i.getData())))}),e}},{createOnAllSeries:!0,reset:function(i,r){var e=i.getData(),t=[];r.eachComponent("visualMap",function(a){if(a.isTargetSeries(i)){var n=a.getVisualMeta(s.bind(ai,null,i,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(e);o>=0&&(n.dimension=o,t.push(n))}}),i.getData().setVisual("visualMeta",t)}}];function ai(i,r,e,t){for(var a=r.targetVisuals[t],n=X.prepareVisualTypes(a),o={color:s.getVisualFromData(i.getData(),"color")},l=0,u=n.length;l<u;l++){var h=n[l],c=a[h==="opacity"?"__alphaForOpacity":h];c&&c.applyVisual(e,v,g)}return o.color;function v(p){return o[p]}function g(p,f){o[p]=f}}var zt=s.each;function ii(i){var r=i&&i.visualMap;s.isArray(r)||(r=r?[r]:[]),zt(r,function(e){if(e){ce(e,"splitList")&&!ce(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&s.isArray(t)&&zt(t,function(a){s.isObject(a)&&(ce(a,"start")&&!ce(a,"min")&&(a.min=a.start),ce(a,"end")&&!ce(a,"max")&&(a.max=a.end))})}})}function ce(i,r){return i&&i.hasOwnProperty&&i.hasOwnProperty(r)}var Gt=!1;function cr(i){Gt||(Gt=!0,i.registerSubTypeDefaulter("visualMap",function(r){return!r.categories&&(!(r.pieces?r.pieces.length>0:r.splitNumber>0)||r.calculable)?"continuous":"piecewise"}),i.registerAction(ei,ti),s.each(ri,function(r){i.registerVisual(i.PRIORITY.VISUAL.COMPONENT,r)}),i.registerPreprocessor(ii))}function ni(i){i.registerComponentModel(Ya),i.registerComponentView(Ja),cr(i)}var oi=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e._pieceList=[],e}return r.prototype.optionUpdated=function(e,t){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],si[this._mode].call(this,this._pieceList),this._resetSelected(e,t);var n=this.option.categories;this.resetVisual(function(o,l){a==="categories"?(o.mappingMethod="category",o.categories=s.clone(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=s.map(this._pieceList,function(u){return u=s.clone(u),l!=="inRange"&&(u.visual=null),u}))})},r.prototype.completeVisualOption=function(){var e=this.option,t={},a=X.listVisualTypes(),n=this.isCategory();s.each(e.pieces,function(l){s.each(a,function(u){l.hasOwnProperty(u)&&(t[u]=1)})}),s.each(t,function(l,u){var h=!1;s.each(this.stateList,function(c){h=h||o(e,c,u)||o(e.target,c,u)},this),!h&&s.each(this.stateList,function(c){(e[c]||(e[c]={}))[u]=sr.get(u,c==="inRange"?"active":"inactive",n)})},this);function o(l,u,h){return l&&l[u]&&l[u].hasOwnProperty(h)}i.prototype.completeVisualOption.apply(this,arguments)},r.prototype._resetSelected=function(e,t){var a=this.option,n=this._pieceList,o=(t?a:e).selected||{};if(a.selected=o,s.each(n,function(u,h){var c=this.getSelectedMapKey(u);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var l=!1;s.each(n,function(u,h){var c=this.getSelectedMapKey(u);o[c]&&(l?o[c]=!1:l=!0)},this)}},r.prototype.getItemSymbol=function(){return this.get("itemSymbol")},r.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},r.prototype.getPieceList=function(){return this._pieceList},r.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},r.prototype.setSelected=function(e){this.option.selected=s.clone(e)},r.prototype.getValueState=function(e){var t=X.findPieceIndex(e,this._pieceList);return t!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(e){var t=[],a=this._pieceList;return this.eachTargetSeries(function(n){var o=[],l=n.getData();l.each(this.getDataDimensionIndex(l),function(u,h){var c=X.findPieceIndex(u,a);c===e&&o.push(h)},this),t.push({seriesId:n.id,dataIndex:o})},this),t},r.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var a=e.interval||[];t=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return t},r.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],a=["",""],n=this;function o(c,v){var g=n.getRepresentValue({interval:c});v||(v=n.getValueState(g));var p=e(g,v);c[0]===-1/0?a[0]=p:c[1]===1/0?a[1]=p:t.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 u=l[0].interval[0];u!==-1/0&&l.unshift({interval:[-1/0,u]}),u=l[l.length-1].interval[1],u!==1/0&&l.push({interval:[u,1/0]})}var h=-1/0;return s.each(l,function(c){var v=c.interval;v&&(v[0]>h&&o([h,v[0]],"outOfRange"),o(v.slice()),h=v[1])},this),{stops:t,outerColors:a}},r.type="visualMap.piecewise",r.defaultOption=s.inheritDefaultOption(Ee.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}),r})(Ee),si={splitNumber:function(i){var r=this.option,e=Math.min(r.precision,20),t=this.getExtent(),a=r.splitNumber;a=Math.max(parseInt(a,10),1),r.splitNumber=a;for(var n=(t[1]-t[0])/a;+n.toFixed(e)!==n&&e<5;)e++;r.precision=e,n=+n.toFixed(e),r.minOpen&&i.push({interval:[-1/0,t[0]],close:[0,0]});for(var o=0,l=t[0];o<a;l+=n,o++){var u=o===a-1?t[1]:l+n;i.push({interval:[l,u],close:[1,1]})}r.maxOpen&&i.push({interval:[t[1],1/0],close:[0,0]}),s.reformIntervals(i),s.each(i,function(h,c){h.index=c,h.text=this.formatValueText(h.interval)},this)},categories:function(i){var r=this.option;s.each(r.categories,function(e){i.push({text:this.formatValueText(e,!0),value:e})},this),Ht(r,i)},pieces:function(i){var r=this.option;s.each(r.pieces,function(e,t){s.isObject(e)||(e={value:e});var a={text:"",index:t};if(e.label!=null&&(a.text=e.label),e.hasOwnProperty("value")){var n=a.value=e.value;a.interval=[n,n],a.close=[1,1]}else{for(var o=a.interval=[],l=a.close=[0,0],u=[1,0,1],h=[-1/0,1/0],c=[],v=0;v<2;v++){for(var g=[["gte","gt","min"],["lte","lt","max"]][v],p=0;p<3&&o[v]==null;p++)o[v]=e[g[p]],l[v]=u[p],c[v]=p===2;o[v]==null&&(o[v]=h[v])}c[0]&&o[1]===1/0&&(l[0]=0),c[1]&&o[0]===-1/0&&(l[1]=0),process.env.NODE_ENV!=="production"&&o[0]>o[1]&&console.warn("Piece "+t+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&l[0]&&l[1]&&(a.value=o[0])}a.visual=X.retrieveVisuals(e),i.push(a)},this),Ht(r,i),s.reformIntervals(i),s.each(i,function(e){var t=e.close,a=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,a)},this)}};function Ht(i,r){var e=i.inverse;(i.orient==="vertical"?!e:e)&&r.reverse()}var li=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,a=t.get("textGap"),n=t.textStyleModel,o=this._getItemAlign(),l=t.itemSize,u=this._getViewData(),h=u.endsText,c=s.retrieve(t.get("showLabel",!0),!h),v=!t.get("selectedMode");h&&this._renderEndsText(e,h[0],l,c,o),s.each(u.viewPieceList,function(g){var p=g.piece,f=new s.Group;f.onclick=s.bind(this._onItemClick,this,p),this._enableHoverLink(f,g.indexInModelPieceList);var d=t.getRepresentValue(p);if(this._createItemSymbol(f,d,[0,0,l[0],l[1]],v),c){var S=this.visualMapModel.getValueState(d),m=n.get("align")||o;f.add(new s.ZRText({style:s.createTextStyle(n,{x:m==="right"?-a:l[0]+a,y:l[1]/2,text:p.text,verticalAlign:n.get("verticalAlign")||"middle",align:m,opacity:s.retrieve2(n.get("opacity"),S==="outOfRange"?.5:1)}),silent:v}))}e.add(f)},this),h&&this._renderEndsText(e,h[1],l,c,o),s.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},r.prototype._enableHoverLink=function(e,t){var a=this;e.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var l=a.visualMapModel;l.option.hoverLink&&a.api.dispatchAction({type:o,batch:Pe(l.findTargetDataIndices(t),l)})}},r.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient==="vertical")return ur(e,this.api,e.itemSize);var a=t.align;return(!a||a==="auto")&&(a="left"),a},r.prototype._renderEndsText=function(e,t,a,n,o){if(t){var l=new s.Group,u=this.visualMapModel.textStyleModel;l.add(new s.ZRText({style:s.createTextStyle(u,{x:n?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:n?o:"center",text:t})})),e.add(l)}},r.prototype._getViewData=function(){var e=this.visualMapModel,t=s.map(e.getPieceList(),function(l,u){return{piece:l,indexInModelPieceList:u}}),a=e.get("text"),n=e.get("orient"),o=e.get("inverse");return(n==="horizontal"?o:!o)?t.reverse():a&&(a=a.slice().reverse()),{viewPieceList:t,endsText:a}},r.prototype._createItemSymbol=function(e,t,a,n){var o=s.createSymbol(this.getControllerVisual(t,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(t,"color"));o.silent=n,e.add(o)},r.prototype._onItemClick=function(e){var t=this.visualMapModel,a=t.option,n=a.selectedMode;if(n){var o=s.clone(a.selected),l=t.getSelectedMapKey(e);n==="single"||n===!0?(o[l]=!0,s.each(o,function(u,h){o[h]=h===l})):o[l]=!o[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},r.type="visualMap.piecewise",r})(lr);function ui(i){i.registerComponentModel(oi),i.registerComponentView(li),cr(i)}function ci(i){s.use(ni),s.use(ui)}function Se(i,r,e){const t=i==null?void 0:i[r];return typeof t=="string"?t:e}function j(){return{animationDurationUpdate:0,backgroundColor:"transparent"}}function K(i,r,e={}){return{text:Se(i,"title",r),left:"center",top:4,...e,textStyle:{...e.textStyle??{},fontSize:14}}}function be(i="15%"){return{left:"3%",right:"4%",bottom:i,containLabel:!0}}function Q(i={}){return{...i,textStyle:{fontSize:12,...i.textStyle??{}}}}function hr(i){const r=typeof i=="object"&&i!==null&&"value"in i?i.value:i;if(!Array.isArray(r)||r.length<3)return null;const e=r.slice(0,3).map(Number);return e.every(Number.isFinite)?e:null}function hi(i){if(!i.length)return{min:0,max:0};const r=i.map(e=>{var t;return(t=hr(e))==null?void 0:t[2]}).filter(e=>typeof e=="number");return r.length?{min:Math.min(...r),max:Math.max(...r)}:{min:0,max:0}}function Ft(i,r,e){const[t,a]=e?[1,0]:[0,1];return new s.LinearGradient(0,0,t,a,[{offset:0,color:i},{offset:1,color:r}])}const vi=(i,r)=>{const e=(r==null?void 0:r.horizontal)===!0||(r==null?void 0:r.horizontal)==="true",t={type:"category",data:i.xAxis,axisLabel:{rotate:e?0:90}},a={type:"value"};return{...j(),title:K(r,"Gradient Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"}}),grid:be(),xAxis:e?a:t,yAxis:e?{...t,inverse:!0}:a,series:[{type:"bar",barMaxWidth:32,data:i.data,itemStyle:{color:Ft("#83bff6","#188df0",e)},emphasis:{itemStyle:{color:Ft("#2378f7","#83bff6",e)}}}]}},pi=(i,r)=>({...j(),title:K(r,"Grouped Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"}}),legend:{data:i.legend,bottom:0},grid:be(),xAxis:{type:"category",data:i.xAxis,axisLabel:{rotate:i.xAxis.length>8?30:0}},yAxis:{type:"value"},series:i.series.map(e=>({name:e.name,type:"bar",emphasis:{focus:"series"},data:e.data}))});function Bt(i){if(typeof i=="number")return i;if(typeof i=="object"&&i!==null&&"value"in i){const r=Number(i.value);return Number.isFinite(r)?r:0}return 0}function fi(i){if(typeof i=="object"&&i!==null&&"clickId"in i){const r=i.clickId;return typeof r=="string"?r:void 0}}function gi(i,r){return r.map((e,t)=>{const a=Bt(e),n=i.reduce((u,h)=>u+Bt(h.data[t]),0),o=n?a/n:0,l=fi(e);return l?{value:o,clickId:l}:o})}const di=(i,r)=>({...j(),title:K(r,"Normalized Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{const t=e.reduce((a,n)=>a+n.value,0);return e.map(a=>{const n=t?(a.value/t*100).toFixed(1):0;return`${a.seriesName}: ${a.value} (${n}%)`}).join("<br/>")}}),legend:{data:i.legend,bottom:0},grid:be(),xAxis:{type:"category",data:i.xAxis},yAxis:{type:"value",max:1,axisLabel:{formatter:e=>`${e*100}%`}},series:i.series.map(e=>({name:e.name,type:"bar",stack:"total",emphasis:{focus:"series"},data:gi(i.series,e.data)}))}),mi=(i,r)=>({...j(),title:K(r,"Stacked Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"}}),legend:{data:i.legend,bottom:0},grid:be(),xAxis:{type:"category",data:i.xAxis,axisLabel:{rotate:i.xAxis.length>8?30:0}},yAxis:{type:"value"},series:i.series.map(e=>({name:e.name,type:"bar",stack:"total",emphasis:{focus:"series"},...e.color?{itemStyle:{color:e.color}}:{},data:e.data}))});function Wt(i,r){return`${Number.isInteger(i)?String(i):i.toFixed(2).replace(/\.?0+$/,"")}${r}`}const yi=(i,r)=>{const e=i.unit??Se(r,"unit","%"),t=i.name??Se(r,"seriesName",""),a=Number(i.value)||0,n=Wt(a,e);return{...j(),title:K(r,t||"Gauge",{top:8}),tooltip:Q({formatter:`{b}: {c}${e}`}),series:[{type:"gauge",startAngle:200,endAngle:-20,min:0,max:100,splitNumber:10,center:["50%","55%"],radius:"74%",itemStyle:{color:"#58D9F9",shadowColor:"rgba(0,138,255,0.45)",shadowBlur:7,shadowOffsetX:1,shadowOffsetY:1},progress:{show:!0,roundCap:!0,width:10},pointer:{icon:"path://M2090.36389,615.30999 L2090.36389,615.30999 C2091.48372,615.30999 2092.40383,616.194028 2092.44859,617.312956 L2096.90698,728.755929 C2097.05155,732.369577 2094.2393,735.416212 2090.62566,735.56078 C2090.53845,735.564269 2090.45117,735.566014 2090.36389,735.566014 L2090.36389,735.566014 C2086.74736,735.566014 2083.81557,732.63423 2083.81557,729.017692 C2083.81557,728.930412 2083.81732,728.84314 2083.82081,728.755929 L2088.2792,617.312956 C2088.32396,616.194028 2089.24407,615.30999 2090.36389,615.30999 Z",length:"64%",width:12,offsetCenter:[0,"5%"]},axisLine:{roundCap:!0,lineStyle:{width:10}},axisTick:{splitNumber:2,length:7,lineStyle:{width:1.5,color:"#999"}},splitLine:{length:9,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:14,color:"#999",fontSize:9},title:{show:!1},detail:{backgroundColor:"#fff",borderColor:"#999",borderWidth:2,width:Math.max(72,Math.min(104,n.length*11+16)),lineHeight:28,height:28,borderRadius:7,offsetCenter:[0,"42%"],valueAnimation:!0,formatter:o=>Wt(Number(o)||0,e),rich:{},color:"#464646",fontSize:n.length>=7?18:20,fontWeight:"bolder"},data:[{value:a,name:t}]}]}},Si=(i,r)=>{const e=Number(i.value)||0,t=i.grade??bi(e);return{...j(),title:K(r,"Assistance Score",{top:8}),series:[{type:"gauge",startAngle:180,endAngle:0,center:["50%","69%"],radius:"78%",min:0,max:1,splitNumber:20,axisLine:{lineStyle:{width:7,color:[[.3,"#FF6E76"],[.6,"#FDDD60"],[.9,"#58D9F9"],[1,"#7CFFB2"]]}},pointer:{icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"10%",width:16,offsetCenter:[0,"-55%"],itemStyle:{color:"auto"}},axisTick:{length:7,lineStyle:{color:"auto",width:1}},splitLine:{length:10,lineStyle:{color:"auto",width:2}},axisLabel:{color:"#464646",fontSize:9,distance:-30,rotate:"tangential",formatter(a){return Math.abs(a-.15)<.001?"Minimal":Math.abs(a-.45)<.001?"Partial":Math.abs(a-.75)<.001?"Strong":Math.abs(a-.95)<.001?"Production":""}},title:{offsetCenter:[0,"26%"],fontSize:14},detail:{fontSize:24,offsetCenter:[0,"-20%"],valueAnimation:!0,formatter(a){return a.toFixed(2)},color:"inherit"},data:[{value:e,name:t}]}]}};function bi(i){return i>=.9?"Production-grade":i>=.6?"Strong assist":i>=.3?"Partial assist":"Minimal assist"}const xi=(i,r)=>{const{min:e,max:t}=hi(i.data);return{...j(),title:K(r,"Heatmap"),tooltip:Q({position:"top",formatter:a=>{const[n,o,l]=hr(a.data)??[0,0,0];return`${i.yAxis[o]} / ${i.xAxis[n]}: ${l}`}}),grid:{height:"60%",top:"14%"},xAxis:{type:"category",data:i.xAxis,splitArea:{show:!0}},yAxis:{type:"category",data:i.yAxis,splitArea:{show:!0}},visualMap:{min:e,max:t,calculable:!0,orient:"horizontal",left:"center",bottom:0},series:[{type:"heatmap",data:i.data,label:{show:!0},emphasis:{itemStyle:{shadowBlur:10}}}]}},_i=(i,r)=>({...j(),title:K(r,"Line Chart"),tooltip:Q({trigger:"axis"}),legend:{data:i.legend||[],left:"center",bottom:0},grid:be(),xAxis:{type:"category",boundaryGap:!1,data:i.xAxis||[]},yAxis:{type:"value"},series:(i.series||[]).map(e=>({type:"line",smooth:(r==null?void 0:r.smooth)!==!1,...e}))});function Ai(i){return i.includes(",")?i.split(",").map(r=>r.trim()):i}const wi=(i,r)=>({...j(),title:K(r,"Pie Chart"),tooltip:Q({trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"}),legend:{orient:"vertical",left:"left"},series:[{name:Se(r,"seriesName","Data"),type:"pie",radius:Ai(Se(r,"radius","50%")),data:Array.isArray(i)?i:i.data,label:{textBorderWidth:0},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}),Mi=(i,r)=>{const e=i.series.length>1;return{...j(),title:K(r,"Radar Chart"),tooltip:Q(),legend:e?{data:i.legend||i.series.map(t=>t.name),bottom:0}:void 0,radar:{indicator:i.indicator},series:[{type:"radar",data:i.series.map(t=>({name:t.name,value:t.value}))}]}},Di={pie:wi,line:_i,radar:Mi,"bar-normalized":di,heatmap:xi,"bar-gradient":vi,"bar-grouped":pi,"bar-stacked":mi,"custom-gauge":yi,"gauge-grade":Si};function Ii(i,r,e){const t=Di[i];return t(r,e)}const Li="400px";function vr(i,r=Li){const e=i==null?void 0:i.height;return typeof e=="number"&&Number.isFinite(e)&&e>0?`${e}px`:typeof e=="string"&&e.trim()?e:r}const Ci=W.defineComponent({__name:"Chart",props:{url:{default:void 0},src:{default:void 0},data:{default:void 0},type:{},options:{default:void 0}},emits:["row-click"],setup(i,{expose:r,emit:e}){s.use([s.install,fa,jt,Aa,ia,Ha,ka,s.install$1,s.install$2,s.install$3,s.install$4,nr,ci]);const t=W.ref(!1);let a=null;W.onMounted(()=>{t.value=document.documentElement.classList.contains("dark"),a=new MutationObserver(()=>{t.value=document.documentElement.classList.contains("dark")}),a.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),W.onUnmounted(()=>{a==null||a.disconnect()});const n=i,o=e,l=W.ref(null),u=W.ref(null),h=W.computed(()=>n.data===void 0?n.src??n.url??"":""),c=W.computed(()=>vr(n.options));function v(x){const A=m(x)?x:null;u.value=(A==null?void 0:A.click)??null,l.value=I(Ii(n.type,x,n.options),u.value)}const{loading:g,error:p,fetchData:f}=gr.useFetch(h,{async onSuccess(x){v(await x.json())}}),d=W.computed(()=>n.data===void 0&&g.value),S=W.computed(()=>n.data!==void 0?null:n.src||n.url?p.value:"Resource not found in asset");W.watch(()=>n.data,x=>{x!==void 0&&v(x)},{immediate:!0,deep:!0});function m(x){return typeof x=="object"&&x!==null}function y(x){const A=b(x);A&&o("row-click",A)}function b(x){var w,M;if(!m(x)||!m(x.data))return null;const A=x.data.clickId;if(typeof A!="string")return null;const C=(M=(w=u.value)==null?void 0:w.payloads)==null?void 0:M[A];return C===void 0?null:m(C)?"payload"in C?C.payload:typeof C.src=="string"?{action:"load-report-payload",src:C.src}:null:C}function I(x,A){const C=(A==null?void 0:A.payloads)??{},w=x.series,M=Array.isArray(w)?w.map(L=>D(L,C)):D(w,C);return{...x,series:M}}function D(x,A){if(!m(x))return x;const C=Array.isArray(x.data)?x.data.map(w=>!m(w)||typeof w.clickId!="string"?w:w.clickId in A?{...w,cursor:"pointer"}:w):x.data;return{...x,cursor:"default",data:C}}function _(){n.data!==void 0?v(n.data):f()}return r({refresh:_}),(x,A)=>(W.openBlock(),W.createBlock(dr._sfc_main,{loading:!l.value&&d.value,error:S.value},{skeleton:W.withCtx(()=>[W.createElementVNode("div",{class:"reportifact-chart-skeleton",style:W.normalizeStyle({"--reportifact-chart-height":c.value})},[...A[0]||(A[0]=[W.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"200px",height:"24px","margin-bottom":"16px"}},null,-1),W.createElementVNode("div",{class:"reportifact-skeleton-line reportifact-chart-skeleton-body"},null,-1)])],4)]),default:W.withCtx(()=>[W.createElementVNode("div",{class:"reportifact-chart-container",style:W.normalizeStyle({"--reportifact-chart-height":c.value})},[l.value?(W.openBlock(),W.createBlock(W.unref(s.src_default),{key:0,option:l.value,theme:t.value?"dark":void 0,autoresize:!0,class:"reportifact-chart",onClick:y},null,8,["option","theme"])):W.createCommentVNode("",!0)],4)]),_:1},8,["loading","error"]))}});exports._sfc_main=Ci;exports.install=jt;exports.resolveChartHeight=vr;
|