1const n=["pdf","doc","docx","txt","rtf","odt","epub","md","tex","xls","xlsx","csv","ods","ppt","pptx","pps","odp","key","zip","rar","7z","jpg","jpeg","png","gif","bmp","svg","webp","mp3","wav","ogg","flac","aac","m4a","mp4","mov","avi","wmv","flv","mkv","webm","xml","json"],o=r=>{const s=r.split("#")[0].split("?")[0];return n.reduce((e,t)=>e||s.toLowerCase().endsWith(`.${t}`),!1)},a=()=>{var r,s;return!!(typeof window<"u"&&((s=(r=window.themeSettings)==null?void 0:r.links)!=null&&s.openDocumentsInNewTab))},l=(r=document)=>{Array.from(r.querySelectorAll("a[href]")).forEach(e=>{const t=e.getAttribute("href");if(t&&!e.hasAttribute("target")&&!t.startsWith("#")&&!t.startsWith("javascript:")&&!t.startsWith("mailto:")&&!t.startsWith("tel:")&&o(t)){e.setAttribute("target","_blank");const i=(e.getAttribute("rel")||"").split(" ").filter(Boolean);i.includes("noopener")||i.push("noopener"),e.setAttribute("rel",i.join(" "))}})},u=()=>{a()&&l()};export{u as initializeFileLinkHandler,o as isFileLink,l as processFileLinks,a as shouldOpenDocsInNewTab};
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.