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