quick-admin-vue3-core
Version:
以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板
2 lines (1 loc) • 27.9 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("vue"),i=require("./Chart.vue_vue_type_script_setup_true_lang-Dad6RzlR.cjs"),gt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");var ft=function(e){i.__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(a,r,l,o,c){var u=l.axis;u.dim==="angle"&&(this.animationThreshold=Math.PI/18);var n=u.polar,d=n.getOtherAxis(u),s=d.getExtent(),v=u.dataToCoord(r),h=o.get("type");if(h&&h!=="none"){var p=i.buildElStyle(o),x=yt[h](u,n,v,s);x.style=p,a.graphicKey=x.type,a.pointer=x}var f=o.get(["label","margin"]),y=pt(r,l,o,n,f);i.buildLabelElOption(a,l,o,c,y)},t}(i.BaseAxisPointer);function pt(e,t,a,r,l){var o=t.axis,c=o.dataToCoord(e),u=r.getAngleAxis().getExtent()[0];u=u/180*Math.PI;var n=r.getRadiusAxis().getExtent(),d,s,v;if(o.dim==="radius"){var h=i.create();i.rotate(h,h,u),i.translate(h,h,[r.cx,r.cy]),d=i.applyTransform$1([c,-l],h);var p=t.getModel("axisLabel").get("rotate")||0,x=i.AxisBuilder.innerTextLayout(u,p*Math.PI/180,-1);s=x.textAlign,v=x.textVerticalAlign}else{var f=n[1];d=r.coordToPoint([f+l,c]);var y=r.cx,w=r.cy;s=Math.abs(d[0]-y)/f<.3?"center":d[0]>y?"left":"right",v=Math.abs(d[1]-w)/f<.3?"middle":d[1]>w?"top":"bottom"}return{position:d,align:s,verticalAlign:v}}var yt={line:function(e,t,a,r){return e.dim==="angle"?{type:"Line",shape:i.makeLineShape(t.coordToPoint([r[0],a]),t.coordToPoint([r[1],a]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:a}}},shadow:function(e,t,a,r){var l=Math.max(1,e.getBandWidth()),o=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:i.makeSectorShape(t.cx,t.cy,r[0],r[1],(-a-l/2)*o,(-a+l/2)*o)}:{type:"Sector",shape:i.makeSectorShape(t.cx,t.cy,a-l/2,a+l/2,0,Math.PI*2)}}},xt=function(e){i.__extends(t,e);function t(){var a=e!==null&&e.apply(this,arguments)||this;return a.type=t.type,a}return t.prototype.findAxisModel=function(a){var r,l=this.ecModel;return l.eachComponent(a,function(o){o.getCoordSysModel()===this&&(r=o)},this),r},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(i.ComponentModel),et=function(e){i.__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",i.SINGLE_REFERRING).models[0]},t.type="polarAxis",t}(i.ComponentModel);i.mixin(et,i.AxisModelCommonMixin);var mt=function(e){i.__extends(t,e);function t(){var a=e!==null&&e.apply(this,arguments)||this;return a.type=t.type,a}return t.type="angleAxis",t}(et),At=function(e){i.__extends(t,e);function t(){var a=e!==null&&e.apply(this,arguments)||this;return a.type=t.type,a}return t.type="radiusAxis",t}(et),at=function(e){i.__extends(t,e);function t(a,r){return e.call(this,"radius",a,r)||this}return t.prototype.pointToData=function(a,r){return this.polar.pointToData(a,r)[this.dim==="radius"?0:1]},t}(i.Axis);at.prototype.dataToRadius=i.Axis.prototype.dataToCoord;at.prototype.radiusToData=i.Axis.prototype.coordToData;var St=i.makeInner(),rt=function(e){i.__extends(t,e);function t(a,r){return e.call(this,"angle",a,r||[0,360])||this}return t.prototype.pointToData=function(a,r){return this.polar.pointToData(a,r)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var a=this,r=a.getLabelModel(),l=a.scale,o=l.getExtent(),c=l.count();if(o[1]-o[0]<1)return 0;var u=o[0],n=a.dataToCoord(u+1)-a.dataToCoord(u),d=Math.abs(n),s=i.getBoundingRect(u==null?"":u+"",r.getFont(),"center","top"),v=Math.max(s.height,7),h=v/d;isNaN(h)&&(h=1/0);var p=Math.max(0,Math.floor(h)),x=St(a.model),f=x.lastAutoInterval,y=x.lastTickCount;return f!=null&&y!=null&&Math.abs(f-p)<=1&&Math.abs(y-c)<=1&&f>p?p=f:(x.lastTickCount=c,x.lastAutoInterval=p),p},t}(i.Axis);rt.prototype.dataToAngle=i.Axis.prototype.dataToCoord;rt.prototype.angleToData=i.Axis.prototype.coordToData;var ut=["radius","angle"],wt=function(){function e(t){this.dimensions=ut,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new at,this._angleAxis=new rt,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var a=this.pointToCoord(t);return this._radiusAxis.contain(a[0])&&this._angleAxis.contain(a[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var a="_"+t+"Axis";return this[a]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var a=[],r=this._angleAxis,l=this._radiusAxis;return r.scale.type===t&&a.push(r),l.scale.type===t&&a.push(l),a},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var a=this._angleAxis;return t===a?this._radiusAxis:a},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var a=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[a],otherAxes:[this.getOtherAxis(a)]}},e.prototype.dataToPoint=function(t,a){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],a),this._angleAxis.dataToAngle(t[1],a)])},e.prototype.pointToData=function(t,a){var r=this.pointToCoord(t);return[this._radiusAxis.radiusToData(r[0],a),this._angleAxis.angleToData(r[1],a)]},e.prototype.pointToCoord=function(t){var a=t[0]-this.cx,r=t[1]-this.cy,l=this.getAngleAxis(),o=l.getExtent(),c=Math.min(o[0],o[1]),u=Math.max(o[0],o[1]);l.inverse?c=u-360:u=c+360;var n=Math.sqrt(a*a+r*r);a/=n,r/=n;for(var d=Math.atan2(-r,a)/Math.PI*180,s=d<c?1:-1;d<c||d>u;)d+=s*360;return[n,d]},e.prototype.coordToPoint=function(t){var a=t[0],r=t[1]/180*Math.PI,l=Math.cos(r)*a+this.cx,o=-Math.sin(r)*a+this.cy;return[l,o]},e.prototype.getArea=function(){var t=this.getAngleAxis(),a=this.getRadiusAxis(),r=a.getExtent().slice();r[0]>r[1]&&r.reverse();var l=t.getExtent(),o=Math.PI/180,c=1e-4;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-l[0]*o,endAngle:-l[1]*o,clockwise:t.inverse,contain:function(u,n){var d=u-this.cx,s=n-this.cy,v=d*d+s*s,h=this.r,p=this.r0;return h!==p&&v-c<=h*h&&v+c>=p*p}}},e.prototype.convertToPixel=function(t,a,r){var l=ot(a);return l===this?this.dataToPoint(r):null},e.prototype.convertFromPixel=function(t,a,r){var l=ot(a);return l===this?this.pointToData(r):null},e}();function ot(e){var t=e.seriesModel,a=e.polarModel;return a&&a.coordinateSystem||t&&t.coordinateSystem}function Pt(e,t,a){var r=t.get("center"),l=a.getWidth(),o=a.getHeight();e.cx=i.parsePercent(r[0],l),e.cy=i.parsePercent(r[1],o);var c=e.getRadiusAxis(),u=Math.min(l,o)/2,n=t.get("radius");n==null?n=[0,"100%"]:i.isArray(n)||(n=[0,n]);var d=[i.parsePercent(n[0],u),i.parsePercent(n[1],u)];c.inverse?c.setExtent(d[1],d[0]):c.setExtent(d[0],d[1])}function bt(e,t){var a=this,r=a.getAngleAxis(),l=a.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),l.scale.setExtent(1/0,-1/0),e.eachSeries(function(u){if(u.coordinateSystem===a){var n=u.getData();i.each(i.getDataDimensionsOnAxis(n,"radius"),function(d){l.scale.unionExtentFromData(n,d)}),i.each(i.getDataDimensionsOnAxis(n,"angle"),function(d){r.scale.unionExtentFromData(n,d)})}}),i.niceScaleExtent(r.scale,r.model),i.niceScaleExtent(l.scale,l.model),r.type==="category"&&!r.onBand){var o=r.getExtent(),c=360/r.scale.count();r.inverse?o[1]+=c:o[1]-=c,r.setExtent(o[0],o[1])}}function Tt(e){return e.mainType==="angleAxis"}function lt(e,t){var a;if(e.type=t.get("type"),e.scale=i.createScaleByModel(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),Tt(t)){e.inverse=e.inverse!==t.get("clockwise");var r=t.get("startAngle"),l=(a=t.get("endAngle"))!==null&&a!==void 0?a:r+(e.inverse?-360:360);e.setExtent(r,l)}t.axis=e,e.model=t}var Mt={dimensions:ut,create:function(e,t){var a=[];return e.eachComponent("polar",function(r,l){var o=new wt(l+"");o.update=bt;var c=o.getRadiusAxis(),u=o.getAngleAxis(),n=r.findAxisModel("radiusAxis"),d=r.findAxisModel("angleAxis");lt(c,n),lt(u,d),Pt(o,r,t),a.push(o),r.coordinateSystem=o,o.model=r}),e.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var l=r.getReferringComponents("polar",i.SINGLE_REFERRING).models[0];if(process.env.NODE_ENV!=="production"&&!l)throw new Error('Polar "'+i.retrieve(r.get("polarIndex"),r.get("polarId"),0)+'" not found');r.coordinateSystem=l.coordinateSystem}}),a}},Lt=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function J(e,t,a){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],a]),l=e.coordToPoint([t[1],a]);return{x1:r[0],y1:r[1],x2:l[0],y2:l[1]}}function Q(e){var t=e.getRadiusAxis();return t.inverse?0:1}function st(e){var t=e[0],a=e[e.length-1];t&&a&&Math.abs(Math.abs(t.coord-a.coord)-360)<1e-4&&e.pop()}var Ct=function(e){i.__extends(t,e);function t(){var a=e!==null&&e.apply(this,arguments)||this;return a.type=t.type,a.axisPointerClass="PolarAxisPointer",a}return t.prototype.render=function(a,r){if(this.group.removeAll(),!!a.get("show")){var l=a.axis,o=l.polar,c=o.getRadiusAxis().getExtent(),u=l.getTicksCoords(),n=l.getMinorTicksCoords(),d=i.map(l.getViewLabels(),function(s){s=i.clone(s);var v=l.scale,h=v.type==="ordinal"?v.getRawOrdinalNumber(s.tickValue):s.tickValue;return s.coord=l.dataToCoord(h),s});st(d),st(u),i.each(Lt,function(s){a.get([s,"show"])&&(!l.scale.isBlank()||s==="axisLine")&&kt[s](this.group,a,o,u,n,c,d)},this)}},t.type="angleAxis",t}(i.AxisView),kt={axisLine:function(e,t,a,r,l,o){var c=t.getModel(["axisLine","lineStyle"]),u=a.getAngleAxis(),n=Math.PI/180,d=u.getExtent(),s=Q(a),v=s?0:1,h,p=Math.abs(d[1]-d[0])===360?"Circle":"Arc";o[v]===0?h=new i.graphic[p]({shape:{cx:a.cx,cy:a.cy,r:o[s],startAngle:-d[0]*n,endAngle:-d[1]*n,clockwise:u.inverse},style:c.getLineStyle(),z2:1,silent:!0}):h=new i.Ring({shape:{cx:a.cx,cy:a.cy,r:o[s],r0:o[v]},style:c.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,e.add(h)},axisTick:function(e,t,a,r,l,o){var c=t.getModel("axisTick"),u=(c.get("inside")?-1:1)*c.get("length"),n=o[Q(a)],d=i.map(r,function(s){return new i.Line({shape:J(a,[n,n+u],s.coord)})});e.add(i.mergePath(d,{style:i.defaults(c.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,a,r,l,o){if(l.length){for(var c=t.getModel("axisTick"),u=t.getModel("minorTick"),n=(c.get("inside")?-1:1)*u.get("length"),d=o[Q(a)],s=[],v=0;v<l.length;v++)for(var h=0;h<l[v].length;h++)s.push(new i.Line({shape:J(a,[d,d+n],l[v][h].coord)}));e.add(i.mergePath(s,{style:i.defaults(u.getModel("lineStyle").getLineStyle(),i.defaults(c.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,a,r,l,o,c){var u=t.getCategories(!0),n=t.getModel("axisLabel"),d=n.get("margin"),s=t.get("triggerEvent");i.each(c,function(v,h){var p=n,x=v.tickValue,f=o[Q(a)],y=a.coordToPoint([f+d,v.coord]),w=a.cx,E=a.cy,_=Math.abs(y[0]-w)/f<.3?"center":y[0]>w?"left":"right",D=Math.abs(y[1]-E)/f<.3?"middle":y[1]>E?"top":"bottom";if(u&&u[x]){var L=u[x];i.isObject(L)&&L.textStyle&&(p=new i.Model(L.textStyle,n,n.ecModel))}var H=new i.ZRText({silent:i.AxisBuilder.isLabelSilent(t),style:i.createTextStyle(p,{x:y[0],y:y[1],fill:p.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:_,verticalAlign:D})});if(e.add(H),s){var Y=i.AxisBuilder.makeAxisEventDataBase(t);Y.targetType="axisLabel",Y.value=v.rawLabel,i.getECData(H).eventData=Y}},this)},splitLine:function(e,t,a,r,l,o){var c=t.getModel("splitLine"),u=c.getModel("lineStyle"),n=u.get("color"),d=0;n=n instanceof Array?n:[n];for(var s=[],v=0;v<r.length;v++){var h=d++%n.length;s[h]=s[h]||[],s[h].push(new i.Line({shape:J(a,o,r[v].coord)}))}for(var v=0;v<s.length;v++)e.add(i.mergePath(s[v],{style:i.defaults({stroke:n[v%n.length]},u.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,a,r,l,o){if(l.length){for(var c=t.getModel("minorSplitLine"),u=c.getModel("lineStyle"),n=[],d=0;d<l.length;d++)for(var s=0;s<l[d].length;s++)n.push(new i.Line({shape:J(a,o,l[d][s].coord)}));e.add(i.mergePath(n,{style:u.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,a,r,l,o){if(r.length){var c=t.getModel("splitArea"),u=c.getModel("areaStyle"),n=u.get("color"),d=0;n=n instanceof Array?n:[n];for(var s=[],v=Math.PI/180,h=-r[0].coord*v,p=Math.min(o[0],o[1]),x=Math.max(o[0],o[1]),f=t.get("clockwise"),y=1,w=r.length;y<=w;y++){var E=y===w?r[0].coord:r[y].coord,_=d++%n.length;s[_]=s[_]||[],s[_].push(new i.Sector({shape:{cx:a.cx,cy:a.cy,r0:p,r:x,startAngle:h,endAngle:-E*v,clockwise:f},silent:!0})),h=-E*v}for(var y=0;y<s.length;y++)e.add(i.mergePath(s[y],{style:i.defaults({fill:n[y%n.length]},u.getAreaStyle()),silent:!0}))}}},Et=["axisLine","axisTickLabel","axisName"],_t=["splitLine","splitArea","minorSplitLine"],Dt=function(e){i.__extends(t,e);function t(){var a=e!==null&&e.apply(this,arguments)||this;return a.type=t.type,a.axisPointerClass="PolarAxisPointer",a}return t.prototype.render=function(a,r){if(this.group.removeAll(),!!a.get("show")){var l=this._axisGroup,o=this._axisGroup=new i.Group;this.group.add(o);var c=a.axis,u=c.polar,n=u.getAngleAxis(),d=c.getTicksCoords(),s=c.getMinorTicksCoords(),v=n.getExtent()[0],h=c.getExtent(),p=Rt(u,a,v),x=new i.AxisBuilder(a,p);i.each(Et,x.add,x),o.add(x.getGroup()),i.groupTransition(l,o,a),i.each(_t,function(f){a.get([f,"show"])&&!c.scale.isBlank()&&It[f](this.group,a,u,v,h,d,s)},this)}},t.type="radiusAxis",t}(i.AxisView),It={splitLine:function(e,t,a,r,l,o){var c=t.getModel("splitLine"),u=c.getModel("lineStyle"),n=u.get("color"),d=0,s=a.getAngleAxis(),v=Math.PI/180,h=s.getExtent(),p=Math.abs(h[1]-h[0])===360?"Circle":"Arc";n=n instanceof Array?n:[n];for(var x=[],f=0;f<o.length;f++){var y=d++%n.length;x[y]=x[y]||[],x[y].push(new i.graphic[p]({shape:{cx:a.cx,cy:a.cy,r:Math.max(o[f].coord,0),startAngle:-h[0]*v,endAngle:-h[1]*v,clockwise:s.inverse}}))}for(var f=0;f<x.length;f++)e.add(i.mergePath(x[f],{style:i.defaults({stroke:n[f%n.length],fill:null},u.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,a,r,l,o,c){if(c.length){for(var u=t.getModel("minorSplitLine"),n=u.getModel("lineStyle"),d=[],s=0;s<c.length;s++)for(var v=0;v<c[s].length;v++)d.push(new i.Circle({shape:{cx:a.cx,cy:a.cy,r:c[s][v].coord}}));e.add(i.mergePath(d,{style:i.defaults({fill:null},n.getLineStyle()),silent:!0}))}},splitArea:function(e,t,a,r,l,o){if(o.length){var c=t.getModel("splitArea"),u=c.getModel("areaStyle"),n=u.get("color"),d=0;n=n instanceof Array?n:[n];for(var s=[],v=o[0].coord,h=1;h<o.length;h++){var p=d++%n.length;s[p]=s[p]||[],s[p].push(new i.Sector({shape:{cx:a.cx,cy:a.cy,r0:v,r:o[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),v=o[h].coord}for(var h=0;h<s.length;h++)e.add(i.mergePath(s[h],{style:i.defaults({fill:n[h%n.length]},u.getAreaStyle()),silent:!0}))}}};function Rt(e,t,a){return{position:[e.cx,e.cy],rotation:a/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}function dt(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function vt(e,t){return t.dim+e.model.componentIndex}function Bt(e,t,a){var r={},l=Wt(i.filter(t.getSeriesByType(e),function(o){return!t.isSeriesFiltered(o)&&o.coordinateSystem&&o.coordinateSystem.type==="polar"}));t.eachSeriesByType(e,function(o){if(o.coordinateSystem.type==="polar"){var c=o.getData(),u=o.coordinateSystem,n=u.getBaseAxis(),d=vt(u,n),s=dt(o),v=l[d][s],h=v.offset,p=v.width,x=u.getOtherAxis(n),f=o.coordinateSystem.cx,y=o.coordinateSystem.cy,w=o.get("barMinHeight")||0,E=o.get("barMinAngle")||0;r[s]=r[s]||[];for(var _=c.mapDimension(x.dim),D=c.mapDimension(n.dim),L=i.isDimensionStacked(c,_),H=n.dim!=="radius"||!o.get("roundCap",!0),Y=x.model,tt=Y.get("startValue"),B=x.dataToCoord(tt||0),N=0,U=c.count();N<U;N++){var O=c.get(_,N),W=c.get(D,N),K=O>=0?"p":"n",F=B;L&&(r[s][W]||(r[s][W]={p:B,n:B}),F=r[s][W][K]);var q=void 0,$=void 0,g=void 0,m=void 0;if(x.dim==="radius"){var A=x.dataToCoord(O)-B,b=n.dataToCoord(W);Math.abs(A)<w&&(A=(A<0?-1:1)*w),q=F,$=F+A,g=b-h,m=g-p,L&&(r[s][W][K]=$)}else{var S=x.dataToCoord(O,H)-B,P=n.dataToCoord(W);Math.abs(S)<E&&(S=(S<0?-1:1)*E),q=P+h,$=q+p,g=F,m=F+S,L&&(r[s][W][K]=m)}c.setItemLayout(N,{cx:f,cy:y,r0:q,r:$,startAngle:-g*Math.PI/180,endAngle:-m*Math.PI/180,clockwise:g>=m})}}})}function Wt(e){var t={};i.each(e,function(r,l){var o=r.getData(),c=r.coordinateSystem,u=c.getBaseAxis(),n=vt(c,u),d=u.getExtent(),s=u.type==="category"?u.getBandWidth():Math.abs(d[1]-d[0])/o.count(),v=t[n]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=v.stacks;t[n]=v;var p=dt(r);h[p]||v.autoWidthCount++,h[p]=h[p]||{width:0,maxWidth:0};var x=i.parsePercent(r.get("barWidth"),s),f=i.parsePercent(r.get("barMaxWidth"),s),y=r.get("barGap"),w=r.get("barCategoryGap");x&&!h[p].width&&(x=Math.min(v.remainedWidth,x),h[p].width=x,v.remainedWidth-=x),f&&(h[p].maxWidth=f),y!=null&&(v.gap=y),w!=null&&(v.categoryGap=w)});var a={};return i.each(t,function(r,l){a[l]={};var o=r.stacks,c=r.bandWidth,u=i.parsePercent(r.categoryGap,c),n=i.parsePercent(r.gap,1),d=r.remainedWidth,s=r.autoWidthCount,v=(d-u)/(s+(s-1)*n);v=Math.max(v,0),i.each(o,function(f,y){var w=f.maxWidth;w&&w<v&&(w=Math.min(w,d),f.width&&(w=Math.min(w,f.width)),d-=w,f.width=w,s--)}),v=(d-u)/(s+(s-1)*n),v=Math.max(v,0);var h=0,p;i.each(o,function(f,y){f.width||(f.width=v),p=f,h+=f.width*(1+n)}),p&&(h-=p.width*n);var x=-h/2;i.each(o,function(f,y){a[l][y]=a[l][y]||{offset:x,width:f.width},x+=f.width*(1+n)})}),a}var Vt={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},Gt={splitNumber:5},Nt=function(e){i.__extends(t,e);function t(){var a=e!==null&&e.apply(this,arguments)||this;return a.type=t.type,a}return t.type="polar",t}(i.ComponentView);function Ot(e){i.use(i.install),i.AxisView.registerAxisPointerClass("PolarAxisPointer",ft),e.registerCoordinateSystem("polar",Mt),e.registerComponentModel(xt),e.registerComponentView(Nt),i.axisModelCreator(e,"angle",mt,Vt),i.axisModelCreator(e,"radius",At,Gt),e.registerComponentView(Ct),e.registerComponentView(Dt),e.registerLayout(i.curry(Bt,"bar"))}i.use([i.install$1,i.install$2]);i.use(i.installLabelLayout);i.extendSeriesModel({type:"series.liquidFill",optionUpdated:function(){var e=this.option;e.gridSize=Math.max(Math.floor(e.gridSize),4)},getInitialData:function(e,t){var a=i.createDimensions(e.data,{coordDimensions:["value"]}),r=new i.SeriesData(a,this);return r.initData(e.data),r},defaultOption:{color:["#294D99","#156ACF","#1598ED","#45BDFF"],center:["50%","50%"],radius:"50%",amplitude:"8%",waveLength:"80%",phase:"auto",period:"auto",direction:"right",shape:"circle",waveAnimation:!0,animationEasing:"linear",animationEasingUpdate:"linear",animationDuration:2e3,animationDurationUpdate:1e3,outline:{show:!0,borderDistance:8,itemStyle:{color:"none",borderColor:"#294D99",borderWidth:8,shadowBlur:20,shadowColor:"rgba(0, 0, 0, 0.25)"}},backgroundStyle:{color:"#E3F7FF"},itemStyle:{opacity:.95,shadowBlur:50,shadowColor:"rgba(0, 0, 0, 0.4)"},label:{show:!0,color:"#294D99",insideColor:"#fff",fontSize:50,fontWeight:"bold",align:"center",baseline:"middle",position:"inside"},emphasis:{itemStyle:{opacity:.8}}}});const zt=i.extendShape({type:"ec-liquid-fill",shape:{waveLength:0,radius:0,radiusY:0,cx:0,cy:0,waterLevel:0,amplitude:0,phase:0,inverse:!1},buildPath:function(e,t){t.radiusY==null&&(t.radiusY=t.radius);for(var a=Math.max(Math.ceil(2*t.radius/t.waveLength*4)*2,8);t.phase<-Math.PI*2;)t.phase+=Math.PI*2;for(;t.phase>0;)t.phase-=Math.PI*2;var r=t.phase/Math.PI/2*t.waveLength,l=t.cx-t.radius+r-t.radius*2;e.moveTo(l,t.waterLevel);for(var o=0,c=0;c<a;++c){var u=c%4,n=Ft(c*t.waveLength/4,u,t.waveLength,t.amplitude);e.bezierCurveTo(n[0][0]+l,-n[0][1]+t.waterLevel,n[1][0]+l,-n[1][1]+t.waterLevel,n[2][0]+l,-n[2][1]+t.waterLevel),c===a-1&&(o=n[2][0])}t.inverse?(e.lineTo(o+l,t.cy-t.radiusY),e.lineTo(l,t.cy-t.radiusY),e.lineTo(l,t.waterLevel)):(e.lineTo(o+l,t.cy+t.radiusY),e.lineTo(l,t.cy+t.radiusY),e.lineTo(l,t.waterLevel)),e.closePath()}});function Ft(e,t,a,r){return t===0?[[e+1/2*a/Math.PI/2,r/2],[e+1/2*a/Math.PI,r],[e+a/4,r]]:t===1?[[e+1/2*a/Math.PI/2*(Math.PI-2),r],[e+1/2*a/Math.PI/2*(Math.PI-1),r/2],[e+a/4,0]]:t===2?[[e+1/2*a/Math.PI/2,-r/2],[e+1/2*a/Math.PI,-r],[e+a/4,-r]]:[[e+1/2*a/Math.PI/2*(Math.PI-2),-r],[e+1/2*a/Math.PI/2*(Math.PI-1),-r/2],[e+a/4,0]]}var z=i.parsePercent;function ct(e){return e&&e.indexOf("path://")===0}i.extendChartView({type:"liquidFill",render:function(e,t,a){var r=this,l=this.group;l.removeAll();var o=e.getData(),c=o.getItemModel(0),u=c.get("center"),n=c.get("radius"),d=a.getWidth(),s=a.getHeight(),v=Math.min(d,s),h=0,p=0,x=e.get("outline.show");x&&(h=e.get("outline.borderDistance"),p=z(e.get("outline.itemStyle.borderWidth"),v));var f=z(u[0],d),y=z(u[1],s),w,E,_,D=!1,L=e.get("shape");if(L==="container"?(D=!0,w=[d/2,s/2],E=[w[0]-p/2,w[1]-p/2],_=[z(h,d),z(h,s)],n=[Math.max(E[0]-_[0],0),Math.max(E[1]-_[1],0)]):(w=z(n,v)/2,E=w-p/2,_=z(h,v),n=Math.max(E-_,0)),x){var H=W();H.style.lineWidth=p,l.add(W())}var Y=D?0:f-n,tt=D?0:y-n,B=null;l.add(K());var N=this._data,U=[];o.diff(N).add(function(g){var m=F(g,!1),A=m.shape.waterLevel;m.shape.waterLevel=D?s/2:n,i.initProps(m,{shape:{waterLevel:A}},e),m.z2=2,q(g,m,null),l.add(m),o.setItemGraphicEl(g,m),U.push(m)}).update(function(g,m){for(var A=N.getItemGraphicEl(m),b=F(g,!1,A),S={},P=["amplitude","cx","cy","phase","radius","radiusY","waterLevel","waveLength"],C=0;C<P.length;++C){var T=P[C];b.shape.hasOwnProperty(T)&&(S[T]=b.shape[T])}for(var I={},k=["fill","opacity","shadowBlur","shadowColor"],C=0;C<k.length;++C){var T=k[C];b.style.hasOwnProperty(T)&&(I[T]=b.style[T])}D&&(S.radiusY=s/2),i.updateProps(A,{shape:S,x:b.x,y:b.y},e),e.isUniversalTransitionEnabled&&e.isUniversalTransitionEnabled()?i.updateProps(A,{style:I},e):A.useStyle(I);var R=A.getClipPath(),V=b.getClipPath();A.setClipPath(b.getClipPath()),A.shape.inverse=b.inverse,R&&V&&r._shape===L&&!ct(L)&&i.updateProps(V,{shape:R.shape},e,{isFrom:!0}),q(g,A,A),l.add(A),o.setItemGraphicEl(g,A),U.push(A)}).remove(function(g){var m=N.getItemGraphicEl(g);l.remove(m)}).execute(),c.get("label.show")&&l.add($(U)),this._shape=L,this._data=o;function O(g,m){if(L)if(ct(L)){var A=i.makePath(L.slice(7),{}),b=A.getBoundingRect(),S=b.width,P=b.height;S>P?(P=g*2/S*P,S=g*2):(S=g*2/P*S,P=g*2);var C=m?0:f-S/2,T=m?0:y-P/2;return A=i.makePath(L.slice(7),{},new i.BoundingRect(C,T,S,P)),m&&(A.x=-S/2,A.y=-P/2),A}else if(D){var I=m?-g[0]:f-g[0],k=m?-g[1]:y-g[1];return i.createSymbol("rect",I,k,g[0]*2,g[1]*2)}else{var I=m?-g:f-g,k=m?-g:y-g;return L==="pin"?k+=g:L==="arrow"&&(k-=g),i.createSymbol(L,I,k,g*2,g*2)}return new i.Circle({shape:{cx:m?0:f,cy:m?0:y,r:g}})}function W(){var g=O(w);return g.style.fill=null,g.setStyle(e.getModel("outline.itemStyle").getItemStyle()),g}function K(){var g=O(n);g.setStyle(e.getModel("backgroundStyle").getItemStyle()),g.style.fill=null,g.z2=5;var m=O(n);m.setStyle(e.getModel("backgroundStyle").getItemStyle()),m.style.stroke=null;var A=new i.Group;return A.add(g),A.add(m),A}function F(g,m,A){var b=D?n[0]:n,S=D?s/2:n,P=o.getItemModel(g),C=P.getModel("itemStyle"),T=P.get("phase"),I=z(P.get("amplitude"),S*2),k=z(P.get("waveLength"),b*2),R=o.get("value",g),V=S-R*S*2;T=A?A.shape.phase:T==="auto"?g*Math.PI/4:T;var G=C.getItemStyle();if(!G.fill){var j=e.get("color"),Z=g%j.length;G.fill=j[Z]}var ht=b*2,X=new zt({shape:{waveLength:k,radius:b,radiusY:S,cx:ht,cy:0,waterLevel:V,amplitude:I,phase:T,inverse:m},style:G,x:f,y});X.shape._waterLevel=V;var it=P.getModel("emphasis.itemStyle").getItemStyle();it.lineWidth=0,X.ensureState("emphasis").style=it,i.enableHoverEmphasis(X);var nt=O(n,!0);return nt.setStyle({fill:"white"}),X.setClipPath(nt),X}function q(g,m,A){var b=o.getItemModel(g),S=b.get("period"),P=b.get("direction"),C=o.get("value",g),T=b.get("phase");T=A?A.shape.phase:T==="auto"?g*Math.PI/4:T;var I=function(V){var G=o.count();return G===0?V:V*(.2+(G-g)/G*.8)},k=0;S==="auto"?k=I(5e3):k=typeof S=="function"?S(C,g):S;var R=0;P==="right"||P==null?R=Math.PI:P==="left"?R=-Math.PI:P==="none"?R=0:console.error("Illegal direction value for liquid fill."),P!=="none"&&b.get("waveAnimation")&&m.animate("shape",!0).when(0,{phase:T}).when(k/2,{phase:R+T}).when(k,{phase:R*2+T}).during(function(){B&&B.dirty(!0)}).start()}function $(g){var m=c.getModel("label");function A(){var G=e.getFormattedLabel(0,"normal"),j=o.get("value",0)*100,Z=o.getName(0)||e.name;return isNaN(j)||(Z=j.toFixed(0)+"%"),G??Z}var b={z2:10,shape:{x:Y,y:tt,width:(D?n[0]:n)*2,height:(D?n[1]:n)*2},style:{fill:"transparent"},textConfig:{position:m.get("position")||"inside"},silent:!0},S={style:{text:A(),textAlign:m.get("align"),textVerticalAlign:m.get("baseline")}};Object.assign(S.style,i.createTextStyle$1(m));var P=new i.Rect(b),C=new i.Rect(b);C.disableLabelAnimation=!0,P.disableLabelAnimation=!0;var T=new i.ZRText(S),I=new i.ZRText(S);P.setTextContent(T),C.setTextContent(I);var k=m.get("insideColor");I.style.fill=k;var R=new i.Group;R.add(P),R.add(C);var V=O(n,!0);return B=new i.CompoundPath({shape:{paths:g},x:f,y}),B.setClipPath(V),C.setClipPath(B),R}},dispose:function(){}});const Yt={class:"real-time-tourist"},qt={class:"actual-total f-fe-c"},Ht={class:"actual-total f-fe-c"},$t=M.defineComponent({__name:"RealTimeTourist",setup(e){const t=M.ref("216908"),a={title:[{text:(.5*100).toFixed(0)+"%",left:"49%",top:"35%",textAlign:"center",textStyle:{fontSize:"16",fontWeight:"normal",color:"#ffffff",align:"center",textBorderColor:"rgba(0, 0, 0, 0)",textShadowColor:"#000",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:1}},{text:"预约量",left:"49%",top:"25%",textAlign:"center",textStyle:{fontSize:"15",fontWeight:"normal",color:"#ffffff",align:"center",textBorderColor:"rgba(0, 0, 0, 0)",textShadowColor:"#000",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:1}}],grid:{top:"0",left:"0px",right:"0px",bottom:"0",containLabel:!0},polar:{radius:["75%","85%"],center:["50%","50%"]},angleAxis:{max:120,clockwise:!1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1},startAngle:188},radiusAxis:{type:"category",show:!0,axisLabel:{show:!1},axisLine:{show:!1},axisTick:{show:!1}},series:[{type:"liquidFill",radius:"70%",z:2,center:["50%","50%"],data:[.4,.4,.4],itemStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#35FAB6"},{offset:1,color:"rgba(40, 209, 247,0.3)"}],global:!1}},outline:{borderDistance:0,itemStyle:{borderWidth:2,borderColor:"#31d8d5",shadowBlur:20,shadowColor:"#50c1a7"}},label:{show:!1},backgroundStyle:{borderWidth:1,color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#0D2648"},{offset:.8,color:"#0D2648"},{offset:1,color:"#228E7D"}],global:!1}}},{type:"pie",radius:["80%","80%"],center:["50%","50%"],z:1,label:{show:!1},silent:!0,itemStyle:{borderWidth:2,borderType:[8,10],borderDashOffset:15,borderColor:"#31d8d5",color:"#11144e",borderCap:"round"},data:[100]},{type:"bar",data:[55],z:10,coordinateSystem:"polar",roundCap:!0,color:"#31d8d5"}]};return(r,l)=>(M.openBlock(),M.createElementBlock("div",Yt,[M.createElementVNode("div",qt,[l[1]||(l[1]=M.createElementVNode("div",{class:"expect-total"},[M.createTextVNode("可预约总量"),M.createElementVNode("i",null,"999999"),M.createTextVNode("人")],-1)),M.createElementVNode("div",Ht,[(M.openBlock(!0),M.createElementBlock(M.Fragment,null,M.renderList(t.value.split(""),(o,c)=>(M.openBlock(),M.createElementBlock("div",{key:c,class:"actual-item f-c-c"},M.toDisplayString(o),1))),128)),l[0]||(l[0]=M.createElementVNode("div",{class:"actual-item f-c-c"},"人",-1))])]),M.createVNode(i._sfc_main,{option:a,height:"260px",use:[M.unref(Ot)]},null,8,["use"])]))}}),Ut=gt._export_sfc($t,[["__scopeId","data-v-08aadf4c"]]);exports.default=Ut;