!function(r,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var t in n)("object"==typeof exports?exports:r)[t]=n[t]}}(this,(()=>(()=>{"use strict";var r={d:(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e),r:r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},e={};r.r(e),r.d(e,{cnpjIsValid:()=>o,cpfIsValid:()=>t,default:()=>Ar,getOnlyEmail:()=>d,identifyFlagCard:()=>$,isAscii:()=>L,isBase64:()=>j,isCEP:()=>c,isCreditCardValid:()=>I,isDate:()=>Z,isDecimal:()=>C,isEmail:()=>y,isEmpty:()=>V,isMACAddress:()=>P,isMD5:()=>O,isNumber:()=>N,isPort:()=>D,isPostalCode:()=>k,isTime:()=>U,isValidAudio:()=>gr,isValidImage:()=>dr,isValidPdf:()=>mr,isValidTxt:()=>Tr,isValidVideo:()=>xr,passwordStrengthTester:()=>_,validateBRPhoneNumber:()=>F,validateEmail:()=>p,validateName:()=>nr,validatePassportNumber:()=>z,validatePassword:()=>E,validatePhoneNumber:()=>J,validateSurname:()=>X,validateTextarea:()=>or,validateUSPhoneNumber:()=>B,validateUsername:()=>M});var n=["CPF invalid","CPF must have 11 numerical digits","CPF is not valid"];const t=function(r,e){var t,i;if(void 0===e&&(e=n),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new TypeError("Must be an Array");try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),a=o.next();!a.done;a=o.next()){var l=a.value;if(null!=l&&"string"!=typeof l)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){t={error:r}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}}function u(r){var t=e?e[r]:null;return null!=t?t:n[r]}if(!r)return{isValid:!1,errorMsg:u(0)};var s=r.replace(/\D+/g,"");if(/^(\d)\1{10}$/.test(s))return{isValid:!1,errorMsg:u(2)};if(11!==s.length)return{isValid:!1,errorMsg:u(1)};var f=s.split("").map(Number),d=function(r){return r%11<2?0:11-r%11},c=f.slice(0,9).reduce((function(r,e,n){return r+e*(10-n)}),0),y=f.slice(0,10).reduce((function(r,e,n){return r+e*(11-n)}),0);return f[9]===d(c)&&f[10]===d(y)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:u(2)}};var i=["CNPJ invalid","CNPJ must have 14 numerical digits","CNPJ is not valid"];const o=function(r,e){var n,t;if(void 0===e&&(e=i),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("Must be an Array");try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),a=o.next();!a.done;a=o.next()){var l=a.value;if(null!=l&&"string"!=typeof l)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(n)throw n.error}}}function u(r){var n=e?e[r]:null;return null!=n?n:i[r]}if(!r)return{isValid:!1,errorMsg:u(0)};if(14!==r.length&&18!==r.length)return{isValid:!1,errorMsg:u(1)};var s=r.replace(/\D+/g,"").split("").map(Number),f=function(r){for(var e=[5,4,3,2,9,8,7,6,5,4,3,2],n=0,t=0;t<12;t+=1)n+=r[t]*e[t];var i=n%11;return i<2?0:11-i}(s.slice(0,12)),d=function(r,e){for(var n=[6,5,4,3,2,9,8,7,6,5,4,3,2],t=0,i=0;i<12;i+=1)t+=r[i]*n[i];var o=(t+=e*n[12])%11;return o<2?0:11-o}(s.slice(0,12).concat(f),f);return s[12]===f&&s[13]===d?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:u(2)}};var a=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=function(r,e){var n="function"==typeof Symbol&&r[Symbol.iterator];if(!n)return r;var t,i,o=n.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(t=o.next()).done;)a.push(t.value)}catch(r){i={error:r}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},u=function(r,e,n){if(n||2===arguments.length)for(var t,i=0,o=e.length;i10)&&8===r.replace(/\D/g,"").length},y=function(r){if("string"!=typeof r)throw new TypeError("Invalid input, must be a string");if(!r)throw new Error("Value cannot be null or empty");if(/^[^a-zA-Z0-9]/.test(r))return!1;if(Number(r[0]))return!1;if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(r))return!1;var e=r.indexOf("@"),n=r.indexOf("@")+1;if(Number(r[n]))return!1;if(r.substring(0,e).includes(".."))return!1;if(r.substring(0,e).endsWith("."))return!1;var t=r.split(".");if(t.length>2&&t[t.length-2]===t[t.length-3])return!1;if(r.substring(n).includes(".."))return!1;var i=r.split("@")[1].split("."),o=Array.from(new Set(i));return i.length===o.length};var h=["Email cannot be empty","This e-mail is not valid","Email too big, try again","This email is not valid in the country","Email domain is not allowed."],g=["@gmail.com","@outlook.com","@yahoo.com","@icloud.com","@hotmail.com","@mail.ru","@yandex.ru","@gmx.com","@zoho.com","@protonmail.com","@protonmail.ch"],m={maxLength:void 0,country:"",errorMsg:h,validDomains:!1};function v(r,e,n){var t=e?e[r]:h[r];return"Email too big, try again"===t?"Email cannot be greater than ".concat(n.toString()," characters"):null!=t?t:h[r]}const p=function(r,e){var n=void 0===e?m:e,t=n.maxLength,i=n.country,o=n.errorMsg,a=n.validDomains;if("string"!=typeof r)throw new TypeError("The input should be a string.");var l=function(r){if(Array.isArray(r)&&r.length>0){var e=r.map((function(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));return new RegExp("".concat(e.join("|"),"$"),"i")}return r?new RegExp("".concat(g.join("|"),"$"),"i"):null}(null!=a&&a);!function(r){var e,n;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var t=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=t.next();!i.done;i=t.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}}}(o);var u=function(r){if((r||0===r)&&(r<1||"number"!=typeof r))throw new Error("maxLength must be a number and cannot be less than 1");return null!=r?r:400}(t);return r?l&&!l.test(r)?{isValid:!1,errorMsg:v(4,o,u)}:y(r)?r.length>u?{isValid:!1,errorMsg:v(2,o,u)}:i&&!r.endsWith(".".concat(i))?{isValid:!1,errorMsg:v(3,o,u)}:{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:v(1,o,u)}:{isValid:!1,errorMsg:v(0,o,u)}};var b=["This password is too long","Password too short","Password requires at least one capital letter","Password requires at least one special character","Password requires at least one number","Password requires at least one letter"],w={minLength:void 0,maxLength:void 0,options:{requireUppercase:!1,requireSpecialChar:!1,requireNumber:!1,requireString:!1},errorMsg:b};function x(r,e,n,t){var i=t?t[r]:b[r];return"This password is too long"===i||"Password too short"===i?n===1/0?"Password must be greater than ".concat(e.toString()," characters"):"Password must be between ".concat(e.toString()," and ").concat(n.toString()," characters"):null!=i?i:b[r]}const E=function(r,e){var n=void 0===e?w:e,t=n.minLength,i=n.maxLength,o=n.options,a=n.errorMsg;if("string"!=typeof r)throw new TypeError("The input should be a string.");!function(r){var e,n;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var t=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=t.next();!i.done;i=t.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}}}(a);var l=null!=t?t:1,u=null!=i?i:1/0;!function(r,e){if("number"!=typeof r||"number"!=typeof e)throw new Error("maxLength and/or minLength must be a number");if(r>e)throw new Error("the minimum size cannot be larger than the maximum");if(r<1||e<1)throw new Error("No size can be smaller than 1")}(l,u);var s=function(r,e,n,t){return r.length>n?x(0,e,n,t):r.length]/.test(r)?x(3,0,0,n):(null==e?void 0:e.requireNumber)&&!/\d/.test(r)?x(4,0,0,n):(null==e?void 0:e.requireString)&&!/[a-zA-Z]/.test(r)?x(5,0,0,n):null}(r,o,a);return f?{isValid:!1,errorMsg:f}:{isValid:!0,errorMsg:null}};var T=["Username cannot be empty","Username too short","This username is too long","Invalid username"],A={minLength:void 0,maxLength:void 0,cbValidate:void 0,errorMsg:T};function S(r,e,n,t){var i=e?e[r]:T[r];return"Username too short"===i||"This username is too long"===i?"Username must be between ".concat(n.toString()," and ").concat(t.toString()," characters"):null!=i?i:T[r]}const M=function(r,e){var n=void 0===e?A:e,t=n.minLength,i=n.maxLength,o=n.cbValidate,a=n.errorMsg;if("string"!=typeof r)throw new TypeError("The input should be a string.");!function(r){var e,n;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var t=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=t.next();!i.done;i=t.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}}}(a);var l=null!=t?t:1,u=null!=i?i:1/0;return r?(function(r,e){if("number"!=typeof r||"number"!=typeof e)throw new Error("maxLength or minLength must be a number");if(r>e)throw new Error("Minimum cannot be greater than maximum");if(r<1||e<1)throw new Error("Size parameters cannot be less than one")}(l,u),r.lengthu?{isValid:!1,errorMsg:S(2,a,l,u)}:o&&!o(r)?{isValid:!1,errorMsg:S(3,a,l,u)}:{isValid:!0,errorMsg:null}):{isValid:!1,errorMsg:S(0,a,l,u)}},V=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");return 0===r.trim().length},N=function(r){return null!=r&&"boolean"!=typeof r&&("string"==typeof r?!Number.isNaN(parseFloat(r))&&Number.isFinite(parseFloat(r)):"number"==typeof r&&Number.isFinite(r))},I=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");var e=r.replace(/\D/g,"");if(V(e)||!N(e))return!1;for(var n=r.replace(/\D+/g,"").split("").map(Number),t=0,i=!1,o=n.length-1;o>=0;o-=1){var a=n[o];i&&(a*=2)>9&&(a-=9),t+=a,i=!i}return t%10==0},$=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");var e=[{name:"Visa",interval:/^4/},{name:"Mastercard",interval:/^5[1-5]/},{name:"American Express",interval:/^3[47]/},{name:"Discover",interval:/^6(?:011|5)/},{name:"JCB",interval:/^(?:2131|1800|35\d{3})/},{name:"Diners Club",interval:/^3(?:0[0-5]|[68])/},{name:"Maestro",interval:/^(?:5[0678]\d\d|6304|6390|67\d\d)/},{name:"UnionPay",interval:/^(62|88)/},{name:"Elo",interval:/^63[789]/},{name:"Hipercard",interval:/^(3841|60)/}].find((function(e){return e.interval.test(r)}));return e?e.name:"Unknown"},P=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");var e=r.replace(/[^0-9A-Fa-f]/g,"");return 12===e.length&&/^([0-9A-Fa-f]{2}){6}$/.test(e)},L=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");if(0===r.trim().length)throw new Error("Input value must not be an empty string.");for(var e=0;e127)return!1}return!0},j=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");if(0===r.trim().length)throw new Error("Input value must not be an empty string.");return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)},Z=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");if(0===r.trim().length)throw new Error("Input value must not be an empty string.");var e,n,t,i=/^\d{4}[-/]\d{2}[-/]\d{2}$/,o=/^\d{2}[-/]\d{2}[-/]\d{4}$/;if(!i.test(r)&&!o.test(r)&&!/^[A-Za-z]+\s\d{1,2}, \d{4}$/.test(r))return!1;if(i.test(r)){var a=r.split(/[-/]/);e=parseInt(a[0],10),n=parseInt(a[1],10),t=parseInt(a[2],10)}else o.test(r)?(a=r.split(/[-/]/),n=parseInt(a[0],10),t=parseInt(a[1],10),e=parseInt(a[2],10)):(a=r.split(/[\s,]+/),n=new Date(Date.parse(a[0]+" 1, 2000")).getMonth()+1,t=parseInt(a[1],10),e=parseInt(a[2],10));return!(e<1e3||e>9999||n<1||n>12||t<1||t>31||t>[31,e%4==0&&e%100!=0||e%400==0?29:28,31,30,31,30,31,31,30,31,30,31][n-1])},C=function(r){var e=r;if(function(r){if("number"==typeof r&&Number.isNaN(r))throw new TypeError("Input value must not be NaN.");if("number"==typeof r&&!isFinite(r))throw new TypeError("Input value must not be Infinity, -Infinity or NaN.");if("string"!=typeof r&&"number"!=typeof r)throw new TypeError("Input value must be a string or a number.")}(e),"number"==typeof e){if(Number.isInteger(e))return!1;e=e.toString()}if(0===e.trim().length)throw new Error("Input value must not be an empty string.");return!function(r){return/^\d+$/.test(r)}(e)&&!!function(r){return/^[-+]?(?:\d+(?:[,.]\d*)?|\d*[,.]\d+)$/.test(r)}(e)},O=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");var e=r.trim();return 32===e.length&&!/^(\d)\1+$/.test(e)&&!["d41d8cd98f00b204e9800998ecf8427e"].includes(e)};const z=function(r){var e,n;if("string"!=typeof r)throw new TypeError("The input should be a string.");var t=r.replace(/\s/g,"");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}([{country:"United States",regex:/^\d{9}$/},{country:"United Kingdom",regex:/^[A-Z]{2}\d{6}$/},{country:"Germany",regex:/^[A-Z]{2}\d{8}$/},{country:"Canada",regex:/^[A-Z]\d{7}$/},{country:"Australia",regex:/^[A-Z]\d{7}$/},{country:"Brazil",regex:/^\d{9}$/},{country:"France",regex:/^[A-Z]{2}\d{7}$/},{country:"Italy",regex:/^[A-Z]\d{7}$/},{country:"India",regex:/^[A-Z]\d{7}$/},{country:"China",regex:/^[A-Z]\d{8}$/}]),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.regex.test(t))return{isValid:!0,country:a.country}}}catch(r){e={error:r}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{isValid:!1,country:null}},D=function(r){if("string"!=typeof r&&"number"!=typeof r)throw new TypeError("Input value must be a string or a number.");var e=parseInt(String(r),10);return Number.isInteger(e)&&e>=1&&e<=65535},k=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");return/^\d{5}(-\d{4})?$/.test(r)||/^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/.test(r)||/^[A-Za-z]{1,2}\d[A-Za-z\d]?\s\d[A-Za-z]{2}$/.test(r)||/^\d{5}$/.test(r)||/^\d{4}$/.test(r)||/^\d{3}-\d{4}$/.test(r)||/^\d{5}$/.test(r)||/^\d{4}$/.test(r)||/^\d{5}$/.test(r)||/^\d{4}$/.test(r)||/^\d{5}-\d{3}$/.test(r)||/^\d{5}$/.test(r)||/^\d{5}$/.test(r)},U=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");return/^(?:2[0-3]|1\d|0?\d):[0-5]\d(?::[0-5]\d)?(?: [APap][Mm])?$/.test(r)};var q=["Field phone number cannot be empty","Invalid phone number"];const F=function(r,e){var n,t;if(void 0===e&&(e=q),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("errorMsg must be an Array");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(null!=a&&"string"!=typeof a)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){n={error:r}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}}function l(r){var n=e?e[r]:null;return null!=n?n:q[r]}return r?/^\(\d{2}\) \d{5}-\d{4}$/.test(r)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:l(1)}:{isValid:!1,errorMsg:l(0)}};var R=["US phone number cannot be empty","Invalid phone number"];const B=function(r,e){var n,t;if(void 0===e&&(e=R),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("errorMsg must be an Array or null");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(null!=a&&"string"!=typeof a)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){n={error:r}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}}function l(r){var n=e?e[r]:null;return null!=n?n:R[r]}return r?/^(1\s?)?(\(\d{3}\)|\d{3})(\s?|-)\d{3}(\s?|-)\d{4}$/.test(r)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:l(1)}:{isValid:!1,errorMsg:l(0)}};var W=["Phone number cannot be empty","Invalid phone number"];const J=function(r,e){var n,t;if(void 0===e&&(e=W),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("errorMsg must be an Array or null");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(null!=a&&"string"!=typeof a)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){n={error:r}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}}function l(r){var n=e?e[r]:null;return null!=n?n:W[r]}return r?/^\(\d{3}\) \d{3}-\d{4}$/.test(r)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:l(1)}:{isValid:!1,errorMsg:l(0)}},_=function(r,e){var n=e.isVeryWeak,t=e.isWeak,i=e.isRegular,o=e.isStrong,a=e.isVeryStrong;if("string"!=typeof r)throw new TypeError("The input should be a string.");var l,u=r.length;switch(!0){case n(r,u):l="Very weak";break;case t(r,u):l="Weak";break;case i(r,u):l="Regular";break;case o(r,u):l="Strong";break;case a(r,u):l="Very strong";break;default:l="Not classified"}return l};var G=["Surname cannot be empty","Surname cannot contain numbers","Surname cannot contain special characters","This surname is not valid","Surname too big, try again"],H={minLength:void 0,maxLength:void 0,errorMsg:G};function K(r,e){return{isValid:!1,errorMsg:Q(r,e)}}function Q(r,e){var n=e?e[r]:null;return null!=n?n:G[r]}const X=function(r,e){var n=void 0===e?H:e,t=n.minLength,i=n.maxLength,o=n.errorMsg;if("string"!=typeof r)throw new TypeError("The input should be a string.");!function(r){var e,n;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var t=function(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=t.next();!i.done;i=t.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}}}(o);var a=null!=t?t:1,l=null!=i?i:25;return function(r,e){if(e<1||r<1||"number"!=typeof r||"number"!=typeof e)throw new Error("maxLength or minLength must be a number and cannot be less than 1");if(r>e)throw new Error("minLength cannot be greater than maxLength")}(a,l),r?r.length>l?K(4,o):r.length=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=t.next();!i.done;i=t.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}}}(o);var a=null!=t?t:1,l=null!=i?i:20;!function(r,e){if(e<1||r<1||"number"!=typeof r||"number"!=typeof e)throw new Error("maxLength or minLength must be a number and cannot be less than 1");if(r>e)throw new Error("minLength cannot be greater than maxLength")}(a,l);var u=function(r){return function(e){var n=r?r[e]:null;return null!=n?n:Y[e]}}(o);return r?r.length>l?er(u(4)):r.length=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(l),s=u.next();!s.done;s=u.next()){var f=s.value;if(null!=f&&"string"!=typeof f)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){n={error:r}}finally{try{s&&!s.done&&(t=u.return)&&t.call(u)}finally{if(n)throw n.error}}}var d=null!=a?a:50;function c(r){var e=l?l[r]:tr[r];return"This textarea is too big"===e?"Textarea cannot exceed ".concat(d.toString()," characters"):null!=e?e:tr[r]}if(d<1||"number"!=typeof d)throw new Error("maxLength or minLength must be a number and cannot be less than 1");return""===r&&o?{isValid:!1,errorMsg:c(1)}:r.length>d?{isValid:!1,errorMsg:c(0)}:{isValid:!0,errorMsg:null}};function ar(r){var e=71===r[0]&&73===r[1]&&70===r[2]&&56===r[3]&&(57===r[4]||55===r[4])&&97===r[5];if(e){var n=r.length;return 0===r[n-2]&&59===r[n-1]}return e}function lr(r){return 0===r[0]&&0===r[1]&&1===r[2]&&0===r[3]}function ur(r){var e=255===r[0]&&216===r[1]&&255===r[2];if(e){var n=r.length;return 255===r[n-2]&&217===r[n-1]}return e}function sr(r){var e=137===r[0]&&80===r[1]&&78===r[2]&&71===r[3]&&13===r[4]&&10===r[5]&&26===r[6]&&10===r[7];if(e)for(var n=r.length,t=[73,69,78,68,174,66,96,130],i=0;i=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Tr(r){var e,n;if(0===r.length)return!1;try{for(var t=Er(r),i=t.next();!i.done;i=t.next()){var o=i.value;if((o<32||o>126)&&10!==o&&13!==o)return!1}}catch(r){e={error:r}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}return!0}const Ar={cpfIsValid:t,cnpjIsValid:o,isEmail:y,validateEmail:p,isCEP:c,validateUsername:M,validatePassword:E,getOnlyEmail:d,isCreditCardValid:I,identifyFlagCard:$,isMACAddress:P,isAscii:L,isBase64:j,isDate:Z,isDecimal:C,isEmpty:V,isMD5:O,isPort:D,isPostalCode:k,isTime:U,validatePassportNumber:z,validateBRPhoneNumber:F,validateUSPhoneNumber:B,validatePhoneNumber:J,isNumber:N,passwordStrengthTester:_,validateName:nr,validateSurname:X,validateTextarea:or,isValidImage:dr,isValidAudio:gr,isValidPdf:mr,isValidVideo:xr,isValidTxt:Tr};return e})()));