1function e(e,t){return`/api/resources/${encodeURIComponent(e)}/files/${encodeURIComponent(t)}`}function t(e){return/\.(mp4|webm|ogg|mov|m4v)(\?|#|$)/i.test(e)}function n(e,n,r){let i=`${e} ${n} ${r}`.toLowerCase();return i.includes(`pdf`)||i.endsWith(`.pdf`)?`pdf`:i.includes(`image/`)||/\.(png|jpe?g|webp|gif|svg)(\?|#|$)/i.test(r)?`image`:i.includes(`video/`)||t(r)?`video`:/\.(zip|rar|7z)(\?|#|$)/i.test(r)?`archive`:/\.(xls|xlsx|csv)(\?|#|$)/i.test(r)?`sheet`:/\.(doc|docx|ppt|pptx)(\?|#|$)/i.test(r)?`doc`:`file`}function r(e,t){let n=e.toLowerCase(),r=t.toLowerCase(),i=new Map([[`application/pdf`,`pdf`],[`image/png`,`png`],[`image/jpeg`,`jpeg`],[`image/webp`,`webp`]]).get(n),a=new Map([[`.pdf`,`pdf`],[`.png`,`png`],[`.jpg`,`jpeg`],[`.jpeg`,`jpeg`],[`.webp`,`webp`]]).get(r);return n&&!i||r&&!a||!i&&!a?!1:!i||!a||i===a}function i(e,t){return t?t.replace(`.`,``).toUpperCase():e===`pdf`?`PDF`:e===`image`?`IMG`:e===`video`?`VIDEO`:e===`archive`?`ZIP`:e===`sheet`?`XLS`:e===`doc`?`DOC`:`FILE`}export{e as i,n,i as r,r 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.