import{a4 as e,y as a,a6 as t,a7 as s,a8 as n,a9 as o,aa as i,ab as r,ac as l,al as u,af as m,ag as p,ah as d}from"./echarts.js?v=1763625242172";import{d3 as v}from"./naive.js?v=1763625242172";import{k as c,r as f,w as h,n as g,o as y,b as w,R as j,S as _,I as b,V as x,ap as B}from"./vue.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./common.js?v=1763625242172";a([t,s,n,o,i,r,l,u,m,p,d]);const I=c({__name:"index",props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"200px"},dataZoom:{type:Boolean,default:!1},option:{type:Object,required:!0}},setup(a,{expose:t}){const s=a,n=f(null);let o=null;function i(){null!==n.value&&(o=e.getInstanceByDom(n.value),null==o&&(o=e.init(n.value)),o.setOption(s.option,!0))}h((()=>s.option),(e=>{e&&g((()=>{i()}))}),{immediate:!0,deep:!0});const r=B((function(){var a;null!==n.value&&(null==(a=e.getInstanceByDom(n.value))||a.resize())}),300,{maxWait:800});return y((()=>{i(),window.addEventListener("resize",r)})),w((()=>{var a;n.value&&(null==(a=e.getInstanceByDom(n.value))||a.dispose(),window.removeEventListener("resize",r))})),t({getChart:()=>o}),(e,t)=>(j(),_("div",{ref_key:"chartRef",ref:n,style:b({width:x(v)(a.width),height:x(v)(a.height)})},null,4))}});export{I as default};
