import{u as te,a as se,b as ve,c as ue,d as de,f as he,S as fe,g as ce,h as ge,j as ye,k as _,G as $,l as me,m as pe,R as X,Z as J,C as we,p as Pe,n as K,B as Se,o as Q,q as be}from"./index-Csvj-veb.js";te([se,ve]);te(ue);de({type:"series.liquidFill",optionUpdated:function(){var t=this.option;t.gridSize=Math.max(Math.floor(t.gridSize),4)},getInitialData:function(t,a){var u=he(t.data,{coordDimensions:["value"]}),f=new fe(u,this);return f.initData(t.data),f},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 Ie=ce({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(t,a){a.radiusY==null&&(a.radiusY=a.radius);for(var u=Math.max(Math.ceil(2*a.radius/a.waveLength*4)*2,8);a.phase<-Math.PI*2;)a.phase+=Math.PI*2;for(;a.phase>0;)a.phase-=Math.PI*2;var f=a.phase/Math.PI/2*a.waveLength,d=a.cx-a.radius+f-a.radius*2;t.moveTo(d,a.waterLevel);for(var g=0,w=0;wl?(l=e*2/n*l,n=e*2):(n=e*2/l*n,l=e*2);var h=r?0:L-n/2,v=r?0:T-l/2;return i=K(p.slice(7),{},new Se(h,v,n,l)),r&&(i.x=-n/2,i.y=-l/2),i}else if(P){var y=r?-e[0]:L-e[0],c=r?-e[1]:T-e[1];return Q("rect",y,c,e[0]*2,e[1]*2)}else{var y=r?-e:L-e,c=r?-e:T-e;return p==="pin"?c+=e:p==="arrow"&&(c-=e),Q(p,y,c,e*2,e*2)}return new be({shape:{cx:r?0:L,cy:r?0:T,r:e}})}function N(){var e=W(C);return e.style.fill=null,e.setStyle(t.getModel("outline.itemStyle").getItemStyle()),e}function le(){var e=W(o);e.setStyle(t.getModel("backgroundStyle").getItemStyle()),e.style.fill=null,e.z2=5;var r=W(o);r.setStyle(t.getModel("backgroundStyle").getItemStyle()),r.style.stroke=null;var i=new $;return i.add(e),i.add(r),i}function V(e,r,i){var s=P?o[0]:o,n=P?M/2:o,l=g.getItemModel(e),h=l.getModel("itemStyle"),v=l.get("phase"),y=I(l.get("amplitude"),n*2),c=I(l.get("waveLength"),s*2),m=g.get("value",e),S=n-m*n*2;v=i?i.shape.phase:v==="auto"?e*Math.PI/4:v;var b=h.getItemStyle();if(!b.fill){var Y=t.get("color"),z=e%Y.length;b.fill=Y[z]}var oe=s*2,x=new Ie({shape:{waveLength:c,radius:s,radiusY:n,cx:oe,cy:0,waterLevel:S,amplitude:y,phase:v,inverse:r},style:b,x:L,y:T});x.shape._waterLevel=S;var H=l.getModel("emphasis.itemStyle").getItemStyle();H.lineWidth=0,x.ensureState("emphasis").style=H,me(x);var Z=W(o,!0);return Z.setStyle({fill:"white"}),x.setClipPath(Z),x}function j(e,r,i){var s=g.getItemModel(e),n=s.get("period"),l=s.get("direction"),h=g.get("value",e),v=s.get("phase");v=i?i.shape.phase:v==="auto"?e*Math.PI/4:v;var y=function(S){var b=g.count();return b===0?S:S*(.2+(b-e)/b*.8)},c=0;n==="auto"?c=y(5e3):c=typeof n=="function"?n(h,e):n;var m=0;l==="right"||l==null?m=Math.PI:l==="left"?m=-Math.PI:l==="none"?m=0:console.error("Illegal direction value for liquid fill."),l!=="none"&&s.get("waveAnimation")&&r.animate("shape",!0).when(0,{phase:v}).when(c/2,{phase:m+v}).when(c,{phase:m*2+v}).during(function(){A&&A.dirty(!0)}).start()}function ne(e){var r=w.getModel("label");function i(){var b=t.getFormattedLabel(0,"normal"),Y=g.get("value",0)*100,z=g.getName(0)||t.name;return isNaN(Y)||(z=Y.toFixed(0)+"%"),b??z}var s={z2:10,shape:{x:re,y:ie,width:(P?o[0]:o)*2,height:(P?o[1]:o)*2},style:{fill:"transparent"},textConfig:{position:r.get("position")||"inside"},silent:!0},n={style:{text:i(),textAlign:r.get("align"),textVerticalAlign:r.get("baseline")}};Object.assign(n.style,pe(r));var l=new X(s),h=new X(s);h.disableLabelAnimation=!0,l.disableLabelAnimation=!0;var v=new J(n),y=new J(n);l.setTextContent(v),h.setTextContent(y);var c=r.get("insideColor");y.style.fill=c;var m=new $;m.add(l),m.add(h);var S=W(o,!0);return A=new we({shape:{paths:e},x:L,y:T}),A.setClipPath(S),h.setClipPath(A),m}},dispose:function(){}});