var L=Object.defineProperty,k=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var _=(t,e,a)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,g=(t,e)=>{for(var a in e||(e={}))R.call(e,a)&&_(t,a,e[a]);if(m)for(var a of m(e))V.call(e,a)&&_(t,a,e[a]);return t},v=(t,e)=>k(t,$(e));var C=(t,e,a)=>new Promise((f,i)=>{var l=s=>{try{r(a.next(s))}catch(n){i(n)}},c=s=>{try{r(a.throw(s))}catch(n){i(n)}},r=s=>s.done?f(s.value):Promise.resolve(s.value).then(l,c);r((a=a.apply(t,e)).next())});import{d as Y,q as F,r as y,aA as T,E as z,an as N,_ as P,P as w,o as X,i as j,s as D,h,w as E,v as I,m as q}from"./index.600742c0.js";import G from"./Box.a0684c06.js";import{u as M}from"./useECharts.7e254417.js";import{f as O}from"./other.a0e0a1bb.js";import{u as H}from"./visualization.b0d62ae5.js";import{c as S}from"./colors.d19e85ff.js";import J from"./Circle.a8ae1237.js";import{u as K}from"./useVContext.b155cbd7.js";import"ant-design-vue";const Q=Y({components:{Box:G,Circle:J},setup(){const{rootEmitter:t}=K(),e=F({x_axis:[],series:[]}),a=y(!0);function f(){a.value=!a.value}const i=y(null),l=H(),{setOptions:c,getInstance:r}=M(i);function s(){return C(this,null,function*(){const o=yield O({year:l.getYear});e.x_axis=o.x_axis,e.series=o.series,A()})}let n=[];const A=()=>{const o={legendData:[],series:[]};e.series.forEach(({name:u,data:p},b)=>{const x=S[b%S.length];o.legendData.push(u),o.series.push({name:u,data:p,smooth:!1,type:"line",itemStyle:{color:x.itemColor},areaStyle:{color:x.areaColor}})}),n=o.legendData,c({grid:{left:"2%",right:"4%",top:"10%",bottom:"2%",containLabel:!0},legend:{data:o.legendData,top:"0%",right:"0",textStyle:{color:"#ffffff"}},tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:1,color:"#019680"}}},xAxis:{type:"category",data:e.x_axis,boundaryGap:!1,axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"#fff"}},yAxis:[{type:"value",axisTick:{show:!1},splitLine:{lineStyle:{type:"solid",color:"#8EEEFF",opacity:.3}},axisLabel:{color:"#fff"}}],series:o.series}),B()};let d=null;function B(){let o=0;d&&clearInterval(d),d=setInterval(()=>{var p;const u=o%n.length;(p=r())==null||p.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:u}),o++},3e3)}return T(()=>{s(),t.on("interval:auto",()=>{s()})}),z(()=>l.getYear,()=>s()),v(g({isChart:a,changeChart:f},N(e)),{chartRef:i})}}),U={class:"h-full flex flex-col"},W={class:"flex-1",ref:"chartRef"};function Z(t,e,a,f,i,l){const c=w("Circle"),r=w("Box");return X(),j(r,{title:"\u7A3B\u867E\u4EA7\u4E1A"},{right:D(()=>[h("div",{class:"text-[#76E9F0] text-13px cursor-pointer",onClick:e[0]||(e[0]=(...s)=>t.changeChart&&t.changeChart(...s))},"\u5207\u6362")]),default:D(()=>[h("div",U,[E(h("div",W,null,512),[[I,t.isChart]]),E(q(c,{class:"flex-1",axis:t.x_axis,data:t.series},null,8,["axis","data"]),[[I,!t.isChart]])])]),_:1})}var fe=P(Q,[["render",Z],["__scopeId","data-v-c1202958"]]);export{fe as default};