import{ref as e,watchEffect as t}from"vue";var n={width:0,height:0,left:0,top:0};function r(r,i){let a=e(new Map);return t(()=>{let e=new Map,t=r.value,o=i.value.get(t[0]?.key)||n,s=o.left+o.width;for(let r=0;r<t.length;r+=1){let{key:a}=t[r],o=i.value.get(a);o||(o=i.value.get(t[r-1]?.key)||n);let c=e.get(a)||{...o};c.right=s-c.left-c.width,e.set(a,c)}a.value=new Map(e)}),a}export{r as default};