import{ref as e,shallowRef as t,watchEffect as n}from"vue";function r(r){let i=e(0),a=t();return n(()=>{let e=new Map,t=0,n=r.value||{};for(let r in n)if(Object.prototype.hasOwnProperty.call(n,r)){let i=n[r],{level:a}=i,o=e.get(a);o||(o=new Set,e.set(a,o)),o.add(i),t=Math.max(t,a)}i.value=t,a.value=e}),{maxLevel:i,levelEntities:a}}export{r as default};