1function d(t){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(t)}function o(t){var e=typeof t=="string"||t instanceof String;if(!e){var r=d(t);throw t===null?r="null":r==="object"&&(r=t.constructor.name),new TypeError("Expected a string but received a ".concat(r))}}function x(t){"@babel/helpers - typeof";return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(t)}function m(t,e){o(t);var r,l;x(e)==="object"?(r=e.min||0,l=e.max):(r=arguments[1],l=arguments[2]);var f=encodeURI(t).split(/%..|./).length-1;return f>=r&&(typeof l>"u"||f<=l)}function y(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var r in e)typeof t[r]>"u"&&(t[r]=e[r]);return t}var $={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function S(t,e){o(t),e=y(e,$),e.allow_trailing_dot&&t[t.length-1]==="."&&(t=t.substring(0,t.length-1)),e.allow_wildcard===!0&&t.indexOf("*.")===0&&(t=t.substring(2));var r=t.split("."),l=r[r.length-1];return e.require_tld&&(r.length<2||!e.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(l)||/\s/.test(l))||!e.allow_numeric_tld&&/^\d+$/.test(l)?!1:r.every(function(f){return!(f.length>63&&!e.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(f)||/[\uff01-\uff5e]/.test(f)||/^-|-$/.test(f)||!e.allow_underscores&&/_/.test(f))})}var w="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",u="(".concat(w,"[.]){3}").concat(w),E=new RegExp("^".concat(u,"$")),a="(?:[0-9a-fA-F]{1,4})",D=new RegExp("^("+"(?:".concat(a,":){7}(?:").concat(a,"|:)|")+"(?:".concat(a,":){6}(?:").concat(u,"|:").concat(a,"|:)|")+"(?:".concat(a,":){5}(?::").concat(u,"|(:").concat(a,"){1,2}|:)|")+"(?:".concat(a,":){4}(?:(:").concat(a,"){0,1}:").concat(u,"|(:").concat(a,"){1,3}|:)|")+"(?:".concat(a,":){3}(?:(:").concat(a,"){0,2}:").concat(u,"|(:").concat(a,"){1,4}|:)|")+"(?:".concat(a,":){2}(?:(:").concat(a,"){0,3}:").concat(u,"|(:").concat(a,"){1,5}|:)|")+"(?:".concat(a,":){1}(?:(:").concat(a,"){0,4}:").concat(u,"|(:").concat(a,"){1,6}|:)|")+"(?::((?::".concat(a,"){0,5}:").concat(u,"|(?::").concat(a,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function s(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return o(t),e=String(e),e?e==="4"?E.test(t):e==="6"?D.test(t):!1:s(t,4)||s(t,6)}var A={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blackl
1isted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},q=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,P=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,U=/^[a-z\d]+$/,z=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,I=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,R=254;function j(t){var e=t.replace(/^"(.+)"$/,"$1");if(!e.trim())return!1;var r=/[\.";<>]/.test(e);if(r){if(e===t)return!1;var l=e.split('"').length===e.split('\\"').length;if(!l)return!1}return!0}function L(t,e){if(o(t),e=y(e,A),e.require_display_name||e.allow_display_name){var r=t.match(q);if(r){var l=r[1];if(t=t.replace(l,"").replace(/(^<|>$)/g,""),l.endsWith(" ")&&(l=l.slice(0,-1)),!j(l))return!1}else if(e.require_display_name)return!1}if(!e.ignore_max_length&&t.length>R)return!1;var f=t.split("@"),c=f.pop(),i=c.toLowerCase();if(e.host_blacklist.includes(i)||e.host_whitelist.length>0&&!e.host_whitelist.includes(i))return!1;var n=f.join("@");if(e.domain_specific_validation&&(i==="gmail.com"||i==="googlemail.com")){n=n.toLowerCase();var v=n.split("+")[0];if(!m(v.replace(/\./g,""),{min:6,max:30}))return!1;for(var F=v.split("."),_=0;_<F.length;_++)if(!U.test(F[_]))return!1}if(e.ignore_max_length===!1&&(!m(n,{max:64})||!m(c,{max:254})))return!1;if(!S(c,{require_tld:e.require_tld,ignore_max_length:e.ignore_max_length,allow_underscores:e.allow_underscores})){if(!e.allow_ip_domain)return!1;if(!s(c)){if(!c.startsWith("[")||!c.endsWith("]"))return!1;var h=c.slice(1,-1);if(h.length===0||!s(h))return!1}}if(n[0]==='"')return n=n.slice(1,n.length-1),e.allow_utf8_local_part?C.test(n):z.test(n);for(var p=e.allow_utf8_local_part?I:P,b=n.split("."),g=0;g<b.length;g++)if(!p.test(b[g]))return!1;return!(e.blacklisted_chars&&n.search(new RegExp("[".concat(e.blacklisted_chars,"]+"),"g"))!==-1)}export{L as i};
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.