1/*! pre,oversea,b3706f52,2026-09-29 18:29:09 */ 2import{t as __commonJSMin}from"./rolldown-runtime-BhlO2Fkx.js";var require_constants=__commonJSMin(exports=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.BLANK_URL=exports.relativeFirstCharacters=exports.whitespaceEscapeCharsRegex=exports.urlSchemeRegex=exports.ctrlCharactersRegex=exports.htmlCtrlEntityRegex=exports.htmlEntitiesRegex=exports.invalidProtocolRegex=void 0,exports.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,exports.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,exports.htmlCtrlEntityRegex=/&(newline|tab);/gi,exports.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,exports.urlSchemeRegex=/^.+(:|:)/gim,exports.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,exports.relativeFirstCharacters=[".","/"],exports.BLANK_URL="about:blank"}),require_dist=__commonJSMin(exports=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.sanitizeUrl=void 0;var constants_1=require_constants();function decodeHtmlCharacters(str){return str.replace(constants_1.ctrlCharactersRegex,"").replace(constants_1.htmlEntitiesRegex,function(match,dec){return String.fromCharCode(dec)})}function decodeURI(uri){try{return decodeURIComponent(uri)}catch(e){return uri}}exports.sanitizeUrl=function(url){if(!url)return constants_1.BLANK_URL;var charsToDecode,decodedUrl=decodeURI(url.trim());do{charsToDecode=(decodedUrl=decodeURI(decodedUrl=decodeHtmlCharacters(decodedUrl).replace(constants_1.htmlCtrlEntityRegex,"").replace(constants_1.ctrlCharactersRegex,"").replace(constants_1.whitespaceEscapeCharsRegex,"").trim())).match(constants_1.ctrlCharactersRegex)||decodedUrl.match(constants_1.htmlEntitiesRegex)||decodedUrl.match(constants_1.htmlCtrlEntityRegex)||decodedUrl.match(constants_1.whitespaceEscapeCharsRegex)}while(charsToDecode&&charsToDecode.length>0);var sanitizedUrl=decodedUrl;if(!sanitizedUrl)return constants_1.BLANK_URL;if(function(url){return constants_1.relativeFirstCharacters.indexOf(url[0])>-1}(sanitizedUrl))return sanitizedUrl;var trimmedUrl=sanitizedUrl.trimStart(),urlSchemeParseResults=trimmedUrl.match(constants_1.urlSchemeRegex);if(!urlSchemeParseResults)return sanitizedUrl;var urlScheme=urlSchemeParseResults[0].toLowerCase().trim();if(constants_1.invalidProtocolRegex.test(urlScheme))return constants_1.BLANK_URL;var backSanitized=trimmedUrl.replace(/\\/g,"/");if("mailto:"===urlScheme||urlScheme.includes("://"))return backSanitized;
2if("http:"===urlScheme||"https:"===urlScheme){if(!function(url){return URL.canParse(url)}(backSanitized))return constants_1.BLANK_URL;var url_1=new URL(backSanitized);return url_1.protocol=url_1.protocol.toLowerCase(),url_1.hostname=url_1.hostname.toLowerCase(),url_1.toString()}return backSanitized}});export{require_dist as t}; 3//# sourceMappingURL=dist-DREJE6pX.js.map
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.