1const s=/\/[^/?#]+\.[a-z0-9]{1,8}$/i;function o(e){if(!e)return e;try{const t=new URL(e);return t.pathname!=="/"&&!t.pathname.endsWith("/")&&!s.test(t.pathname)&&(t.pathname=`${t.pathname}/`),t.toString()}catch{const[t="",n=""]=e.split("#",2),[r="",a=""]=t.split("?",2);return`${r!=="/"&&!r.endsWith("/")&&!s.test(r)?`${r}/`:r}${a?`?${a}`:""}${n?`#${n}`:""}`}}function c(e,t){const n=new URL(t,e);return n.search="",n.hash="",o(n.toString())}function h(e){return e.map(t=>!t.href||t.rel!=="canonical"&&t.rel!=="alternate"?t:{...t,href:o(t.href)})}function u(e,t){const n=String(e||"").replace(/\s+/g," ").trim();if(n.length<=t)return n;const r=n.slice(0,Math.max(1,t-1)).trim(),a=r.lastIndexOf(" ");return`${(a>=Math.floor(t*.65)?r.slice(0,a):r).replace(/[,:;\-ââ]+$/u,"").trim()}â¦`}export{c as b,h as n,u as t,o as w};
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.