1import{j as R,a_ as x,r as O,Z as S,a$ as B,l as u,b0 as g}from"./DTmc-LR8.js";function D(p){const{elRef:m,sectionRef:a,scrollRef:c,type:o}=p,h=R(()=>c?.value?c.value:typeof window<"u"?window:void 0),b=x(h),r=O(void 0),f=S(m),{height:s}=B();function w(e){if(!e)return 0;const n=e.getBoundingClientRect();return(Math.min(n.bottom,s.value)-Math.max(n.top,0))/s.value*100}function y(e){if(!e)return 1/0;const n=e.getBoundingClientRect(),t=n.top+n.height/2;return Math.abs(s.value/2-t)}function v(e){if(!e)return;let n=1/0;for(let t=0;t<e.length;t++){const i=g(e[t]),l=i?y(i):0;l<n&&(n=l,r.value=t)}}function d(e){if(!e)return;let n=0;for(let t=0;t<e.length;t++){const i=g(e[t]),l=i?w(i):0;l>n&&(n=l,r.value=t)}}return u(()=>b.y.value,()=>{if(a.value)o==="distance"?v(a.value):o==="overlap"&&d(a.value);else return},{immediate:!0}),u(()=>f.value,e=>{e||(r.value=void 0)}),u(()=>a.value,e=>{if(e)o==="distance"?v(e):o==="overlap"&&d(e);else return},{immediate:!0}),{activeIndex:r,isVisible:f}}export{D as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.