import{g as N}from"./vendor-react-DX7tU9aY.js";import{r as L,a as $,b as z,d as W,c as H}from"./isIP-BBY240SU.js";var g={exports:{}},h={exports:{}},C;function O(){return C||(C=1,(function(o,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=F;var v=x(L());function x(a){return a&&a.__esModule?a:{default:a}}function f(a){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f(a)}function F(a,l){(0,v.default)(a);var u,_;f(l)==="object"?(u=l.min||0,_=l.max):(u=arguments[1],_=arguments[2]);var c=encodeURI(a).split(/%..|./).length-1;return c>=u&&(typeof _>"u"||c<=_)}o.exports=i.default,o.exports.default=i.default})(h,h.exports)),h.exports}var I;function Q(){return I||(I=1,(function(o,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=A;var v=u(L()),x=u(z()),f=u(O()),F=u(W()),a=u(H()),l=u($());function u(r){return r&&r.__esModule?r:{default:r}}var _={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},c=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,S=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,U=/^[a-z\d]+$/,k=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,P=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,M=/^([\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(r){var e=r.replace(/^"(.+)"$/,"$1");if(!e.trim())return!1;var d=/[\.";<>]/.test(e);if(d){if(e===r)return!1;var s=e.split('"').length===e.split('\\"').length;if(!s)return!1}return!0}function A(r,e){if((0,v.default)(r),e=(0,l.default)(e,_),e.require_display_name||e.allow_display_name){var d=r.match(c);if(d){var s=d[1];if(r=r.replace(s,"").replace(/(^<|>$)/g,""),s.endsWith(" ")&&(s=s.slice(0,-1)),!j(s))return!1}else if(e.require_display_name)return!1}if(!e.ignore_max_length&&r.length>R)return!1;var y=r.split("@"),n=y.pop(),m=n.toLowerCase();if(e.host_blacklist.length>0&&(0,x.default)(m,e.host_blacklist)||e.host_whitelist.length>0&&!(0,x.default)(m,e.host_whitelist))return!1;var t=y.join("@");if(e.domain_specific_validation&&(m==="gmail.com"||m==="googlemail.com")){t=t.toLowerCase();var q=t.split("+")[0];if(!(0,f.default)(q.replace(/\./g,""),{min:6,max:30}))return!1;for(var w=q.split("."),p=0;p<w.length;p++)if(!U.test(w[p]))return!1}if(e.ignore_max_length===!1&&(!(0,f.default)(t,{max:64})||!(0,f.default)(n,{max:254})))return!1;if(!(0,F.default)(n,{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(!(0,a.default)(n)){if(!n.startsWith("[")||!n.endsWith("]"))return!1;var D=n.slice(1,-1);if(D.length===0||!(0,a.default)(D))return!1}}if(e.blacklisted_chars&&t.search(new RegExp("[".concat(e.blacklisted_chars,"]+"),"g"))!==-1)return!1;if(t[0]==='"'&&t[t.length-1]==='"')return t=t.slice(1,t.length-1),e.allow_utf8_local_part?M.test(t):k.test(t);for(var B=e.allow_utf8_local_part?P:S,E=t.split("."),b=0;b<E.length;b++)if(!B.test(E[b]))return!1;return!0}o.exports=i.default,o.exports.default=i.default})(g,g.exports)),g.exports}var X=Q();const K=N(X);export{K as C};
