1import{wt as e}from"./B5yTkftw.js";import{I as t,q as n}from"./DlSTr-OQ.js";import{t as r}from"./DWEoD8ZB2.js";var i=0;function a(){e(e=>{if(!t)return;let n=document.querySelectorAll(`[data-reka-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,n[0]??o()),document.body.insertAdjacentElement(`beforeend`,n[1]??o()),i++,e(()=>{i===1&&document.querySelectorAll(`[data-reka-focus-guard]`).forEach(e=>e.remove()),i--})})}function o(){let e=document.createElement(`span`);return e.setAttribute(`data-reka-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function s(e){let t=n(``,1e3);return{search:t,handleTypeaheadSearch:(n,i)=>{if(t.value+=n,e)e(n);else{let e=r(),n=i.map(e=>({...e,textValue:e.value?.textValue??e.ref.textContent?.trim()??``})),a=n.find(t=>t.ref===e),o=l(n.map(e=>e.textValue),t.value,a?.textValue),s=n.find(e=>e.textValue===o);return s&&s.ref.focus(),s?.ref}},resetTypeahead:()=>{t.value=``}}}function c(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function l(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=c(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}export{s as n,a as r,l as t};
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.