From 7db18dece81e9d5466c572476b1fe5ce1fdb75ad Mon Sep 17 00:00:00 2001 From: Michal Tikotzky Date: Wed, 28 Jun 2017 16:38:44 -0400 Subject: [PATCH] update build files --- lib/isCreditCard.js | 2 +- validator.js | 2 +- validator.min.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/isCreditCard.js b/lib/isCreditCard.js index 6dec7445b..2e204ef5c 100644 --- a/lib/isCreditCard.js +++ b/lib/isCreditCard.js @@ -17,7 +17,7 @@ var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][ function isCreditCard(str) { (0, _assertString2.default)(str); - var sanitized = str.replace(/[^0-9]+/g, ''); + var sanitized = str.replace(/[- ]+/g, ''); if (!creditCard.test(sanitized)) { return false; } diff --git a/validator.js b/validator.js index b14413b59..9343c2669 100644 --- a/validator.js +++ b/validator.js @@ -732,7 +732,7 @@ var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][ function isCreditCard(str) { assertString(str); - var sanitized = str.replace(/[^0-9]+/g, ''); + var sanitized = str.replace(/[- ]+/g, ''); if (!creditCard.test(sanitized)) { return false; } diff --git a/validator.min.js b/validator.min.js index c78d3a760..be7b1c532 100644 --- a/validator.min.js +++ b/validator.min.js @@ -20,4 +20,4 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.validator=e()}(this,function(){"use strict";function t(t){if(!("string"==typeof t||t instanceof String))throw new TypeError("This library (validator.js) validates strings only")}function e(e){return t(e),e=Date.parse(e),isNaN(e)?null:new Date(e)}function o(e){return t(e),parseFloat(e)}function r(t){return"object"===(void 0===t?"undefined":v(t))&&null!==t?t="function"==typeof t.toString?t.toString():"[object Object]":(null===t||void 0===t||isNaN(t)&&!t.length)&&(t=""),String(t)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];for(var o in e)void 0===t[o]&&(t[o]=e[o]);return t}function n(e,o){t(e);var r=void 0,i=void 0;"object"===(void 0===o?"undefined":v(o))?(r=o.min||0,i=o.max):(r=arguments[1],i=arguments[2]);var n=encodeURI(e).split(/%..|./).length-1;return n>=r&&(void 0===i||n<=i)}function l(e,o){t(e),(o=i(o,F)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(o.require_tld){var n=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(n))return!1}for(var l,a=0;a1&&void 0!==arguments[1]?arguments[1]:"";if(t(e),!(o=String(o)))return u(e,4)||u(e,6);if("4"===o)return!!k.test(e)&&e.split(".").sort(function(t,e){return t-e})[3]<=255;if("6"===o){var r=e.split(":"),i=!1,n=u(r[r.length-1],4),l=n?7:8;if(r.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(r.shift(),r.shift(),i=!0):"::"===e.substr(e.length-2)&&(r.pop(),r.pop(),i=!0);for(var a=0;a0&&a=1:r.length===l}return!1}function s(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function d(t,e){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:"";if(t(e),!(o=String(o)))return f(e,10)||f(e,13);var r=e.replace(/[\s-]+/g,""),i=0,n=void 0;if("10"===o){if(!et.test(r))return!1;for(n=0;n<9;n++)i+=(n+1)*r.charAt(n);if("X"===r.charAt(9)?i+=100:i+=10*r.charAt(9),i%11==0)return!!r}else if("13"===o){if(!ot.test(r))return!1;for(n=0;n<12;n++)i+=rt[n%2]*r.charAt(n);if(r.charAt(12)-(10-i%10)%10==0)return!!r}return!1}function p(t){var e="(\\"+t.symbol.replace(/\./g,"\\.")+")"+(t.require_symbol?"":"?"),o="("+["0","[1-9]\\d*","[1-9]\\d{0,2}(\\"+t.thousands_separator+"\\d{3})*"].join("|")+")?"+("(\\"+t.decimal_separator+"\\d{2})?");return t.allow_negatives&&!t.parens_for_negatives&&(t.negative_sign_after_digits?o+="-?":t.negative_sign_before_digits&&(o="-?"+o)),t.allow_negative_sign_placeholder?o="( (?!\\-))?"+o:t.allow_space_after_symbol?o=" ?"+o:t.allow_space_after_digits&&(o+="( (?!$))?"),t.symbol_after_digits?o+=e:o=e+o,t.allow_negatives&&(t.parens_for_negatives?o="(\\("+o+"\\)|"+o+")":t.negative_sign_before_digits||t.negative_sign_after_digits||(o="-?"+o)),new RegExp("^(?!-? )(?=.*\\d)"+o+"$")}function g(e,o){t(e);var r=o?new RegExp("^["+o+"]+","g"):/^\s+/g;return e.replace(r,"")}function h(e,o){t(e);for(var r=o?new RegExp("["+o+"]"):/\s/,i=e.length-1;i>=0&&r.test(e[i]);)i--;return i$/i,A=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,w=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,y=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,b=/^([\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,k=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,S=/^[0-9A-F]{1,4}$/i,D={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},Z=/^\[([^\]]+)\](?::([0-9]+))?$/,E=/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/,O={"en-US":/^[A-Z]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"nl-NL":/^[A-ZÉËÏÓÖÜ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},R={"en-US":/^[0-9A-Z]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nl-NL":/^[0-9A-ZÉËÏÓÖÜ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},C=["AU","GB","HK","IN","NZ","ZA","ZM"],I=0;I=0},matches:function(e,o,r){return t(e),"[object RegExp]"!==Object.prototype.toString.call(o)&&(o=new RegExp(o,r)),o.test(e)},isEmail:a,isURL:function(e,o){if(t(e),!e||e.length>=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;o=i(o,D);var r=void 0,n=void 0,a=void 0,s=void 0,c=void 0,f=void 0,p=void 0,g=void 0;if(p=e.split("#"),e=p.shift(),p=e.split("?"),e=p.shift(),(p=e.split("://")).length>1){if(r=p.shift(),o.require_valid_protocol&&-1===o.protocols.indexOf(r))return!1}else{if(o.require_protocol)return!1;o.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(p[0]=e.substr(2))}if(e=p.join("://"),p=e.split("/"),""===(e=p.shift())&&!o.require_host)return!0;if((p=e.split("@")).length>1&&(n=p.shift()).indexOf(":")>=0&&n.split(":").length>2)return!1;f=null,g=null;var h=(s=p.join("@")).match(Z);return h?(a="",g=h[1],f=h[2]||null):(a=(p=s.split(":")).shift(),p.length&&(f=p.join(":"))),!(null!==f&&(c=parseInt(f,10),!/^[0-9]+$/.test(f)||c<=0||c>65535)||!(u(a)||l(a,o)||g&&u(g,6)||"localhost"===a)||(a=a||g,o.host_whitelist&&!d(a,o.host_whitelist)||o.host_blacklist&&d(a,o.host_blacklist)))},isMACAddress:function(e){return t(e),E.test(e)},isIP:u,isFQDN:l,isBoolean:function(e){return t(e),["true","false","1","0"].indexOf(e)>=0},isAlpha:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if(t(e),o in O)return O[o].test(e);throw new Error("Invalid locale '"+o+"'")},isAlphanumeric:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if(t(e),o in R)return R[o].test(e);throw new Error("Invalid locale '"+o+"'")},isNumeric:function(e){return t(e),P.test(e)},isLowercase:function(e){return t(e),e===e.toLowerCase()},isUppercase:function(e){return t(e),e===e.toUpperCase()},isAscii:function(e){return t(e),L.test(e)},isFullWidth:function(e){return t(e),N.test(e)},isHalfWidth:function(e){return t(e),B.test(e)},isVariableWidth:function(e){return t(e),N.test(e)&&B.test(e)},isMultibyte:function(e){return t(e),q.test(e)},isSurrogatePair:function(e){return t(e),T.test(e)},isInt:function(e,o){t(e);var r=(o=o||{}).hasOwnProperty("allow_leading_zeroes")&&!o.allow_leading_zeroes?H:K,i=!o.hasOwnProperty("min")||e>=o.min,n=!o.hasOwnProperty("max")||e<=o.max,l=!o.hasOwnProperty("lt")||eo.gt;return r.test(e)&&i&&n&&l&&a},isFloat:function(e,o){return t(e),o=o||{},""!==e&&"."!==e&&M.test(e)&&(!o.hasOwnProperty("min")||e>=o.min)&&(!o.hasOwnProperty("max")||e<=o.max)&&(!o.hasOwnProperty("lt")||eo.gt)},isDecimal:function(e){return t(e),""!==e&&W.test(e)},isHexadecimal:c,isDivisibleBy:function(e,r){return t(e),o(e)%parseInt(r,10)==0},isHexColor:function(e){return t(e),Y.test(e)},isISRC:function(e){return t(e),J.test(e)},isMD5:function(e){return t(e),Q.test(e)},isJSON:function(e){t(e);try{var o=JSON.parse(e);return!!o&&"object"===(void 0===o?"undefined":v(o))}catch(t){}return!1},isEmpty:function(e){return t(e),0===e.length},isLength:function(e,o){t(e);var r=void 0,i=void 0;"object"===(void 0===o?"undefined":v(o))?(r=o.min||0,i=o.max):(r=arguments[1],i=arguments[2]);var n=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],l=e.length-n.length;return l>=r&&(void 0===i||l<=i)},isByteLength:n,isUUID:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";t(e);var r=X[o];return r&&r.test(e)},isMongoId:function(e){return t(e),c(e)&&24===e.length},isAfter:function(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);t(o);var i=e(r),n=e(o);return!!(n&&i&&n>i)},isBefore:function(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);t(o);var i=e(r),n=e(o);return!!(n&&i&&n=0}return"object"===(void 0===o?"undefined":v(o))?o.hasOwnProperty(e):!(!o||"function"!=typeof o.indexOf)&&o.indexOf(e)>=0},isCreditCard:function(e){t(e);var o=e.replace(/[^0-9]+/g,"");if(!V.test(o))return!1;for(var r=0,i=void 0,n=void 0,l=void 0,a=o.length-1;a>=0;a--)i=o.substring(a,a+1),n=parseInt(i,10),r+=l&&(n*=2)>=10?n%10+1:n,l=!l;return!(r%10!=0||!o)},isISIN:function(e){if(t(e),!tt.test(e))return!1;for(var o=e.replace(/[A-Z]/g,function(t){return parseInt(t,36)}),r=0,i=void 0,n=void 0,l=!0,a=o.length-2;a>=0;a--)i=o.substring(a,a+1),n=parseInt(i,10),r+=l&&(n*=2)>=10?n+1:n,l=!l;return parseInt(e.substr(e.length-1),10)===(1e4-r)%10},isISBN:f,isISSN:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e);var r=it;if(r=o.require_hyphen?r.replace("?",""):r,!(r=o.case_sensitive?new RegExp(r):new RegExp(r,"i")).test(e))return!1;var i=e.replace("-",""),n=8,l=0,a=!0,u=!1,s=void 0;try{for(var d,c=i[Symbol.iterator]();!(a=(d=c.next()).done);a=!0){var f=d.value;l+=("X"===f.toUpperCase()?10:+f)*n,--n}}catch(t){u=!0,s=t}finally{try{!a&&c.return&&c.return()}finally{if(u)throw s}}return l%11==0},isMobilePhone:function(e,o){return t(e),o in nt?nt[o].test(e):"any"===o&&!!Object.values(nt).find(function(t){return t.test(e)})},isCurrency:function(e,o){return t(e),o=i(o,lt),p(o).test(e)},isISO8601:function(e){return t(e),at.test(e)},isBase64:function(e){t(e);var o=e.length;if(!o||o%4!=0||ut.test(e))return!1;var r=e.indexOf("=");return-1===r||r===o-1||r===o-2&&"="===e[o-1]},isDataURI:function(e){return t(e),st.test(e)},ltrim:g,rtrim:h,trim:function(t,e){return h(g(t,e),e)},escape:function(e){return t(e),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")},unescape:function(e){return t(e),e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/`/g,"`")},stripLow:function(e,o){return t(e),m(e,o?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F")},whitelist:function(e,o){return t(e),e.replace(new RegExp("[^"+o+"]+","g"),"")},blacklist:m,isWhitelisted:function(e,o){t(e);for(var r=e.length-1;r>=0;r--)if(-1===o.indexOf(e[r]))return!1;return!0},normalizeEmail:function(t,e){if(e=i(e,dt),!a(t))return!1;var o=t.split("@"),r=o.pop(),n=[o.join("@"),r];if(n[1]=n[1].toLowerCase(),"gmail.com"===n[1]||"googlemail.com"===n[1]){if(e.gmail_remove_subaddress&&(n[0]=n[0].split("+")[0]),e.gmail_remove_dots&&(n[0]=n[0].replace(/\./g,"")),!n[0].length)return!1;(e.all_lowercase||e.gmail_lowercase)&&(n[0]=n[0].toLowerCase()),n[1]=e.gmail_convert_googlemaildotcom?"gmail.com":n[1]}else if(~ct.indexOf(n[1])){if(e.icloud_remove_subaddress&&(n[0]=n[0].split("+")[0]),!n[0].length)return!1;(e.all_lowercase||e.icloud_lowercase)&&(n[0]=n[0].toLowerCase())}else if(~ft.indexOf(n[1])){if(e.outlookdotcom_remove_subaddress&&(n[0]=n[0].split("+")[0]),!n[0].length)return!1;(e.all_lowercase||e.outlookdotcom_lowercase)&&(n[0]=n[0].toLowerCase())}else if(~pt.indexOf(n[1])){if(e.yahoo_remove_subaddress){var l=n[0].split("-");n[0]=l.length>1?l.slice(0,-1).join("-"):l[0]}if(!n[0].length)return!1;(e.all_lowercase||e.yahoo_lowercase)&&(n[0]=n[0].toLowerCase())}else e.all_lowercase&&(n[0]=n[0].toLowerCase());return n.join("@")},toString:r}}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.validator=e()}(this,function(){"use strict";function t(t){if(!("string"==typeof t||t instanceof String))throw new TypeError("This library (validator.js) validates strings only")}function e(e){return t(e),e=Date.parse(e),isNaN(e)?null:new Date(e)}function o(e){return t(e),parseFloat(e)}function r(e,o){return t(e),parseInt(e,o||10)}function i(e,o){return t(e),o?"1"===e||"true"===e:"0"!==e&&"false"!==e&&""!==e}function n(e,o){return t(e),e===o}function l(t){return"object"===(void 0===t?"undefined":ht(t))&&null!==t?t="function"==typeof t.toString?t.toString():"[object Object]":(null===t||void 0===t||isNaN(t)&&!t.length)&&(t=""),String(t)}function a(e,o){return t(e),e.indexOf(l(o))>=0}function u(e,o,r){return t(e),"[object RegExp]"!==Object.prototype.toString.call(o)&&(o=new RegExp(o,r)),o.test(e)}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];for(var o in e)void 0===t[o]&&(t[o]=e[o]);return t}function c(e,o){t(e);var r=void 0,i=void 0;"object"===(void 0===o?"undefined":ht(o))?(r=o.min||0,i=o.max):(r=arguments[1],i=arguments[2]);var n=encodeURI(e).split(/%..|./).length-1;return n>=r&&(void 0===i||n<=i)}function d(e,o){t(e),o=s(o,pt),o.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(o.require_tld){var i=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1}for(var n,l=0;l1&&void 0!==arguments[1]?arguments[1]:"";if(t(e),!(o=String(o)))return h(e,4)||h(e,6);if("4"===o){if(!xt.test(e))return!1;return e.split(".").sort(function(t,e){return t-e})[3]<=255}if("6"===o){var r=e.split(":"),i=!1,n=h(r[r.length-1],4),l=n?7:8;if(r.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(r.shift(),r.shift(),i=!0):"::"===e.substr(e.length-2)&&(r.pop(),r.pop(),i=!0);for(var a=0;a0&&a=1:r.length===l}return!1}function p(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function g(t,e){for(var o=0;o=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;o=s(o,yt);var r=void 0,i=void 0,n=void 0,l=void 0,a=void 0,u=void 0,c=void 0,f=void 0;if(c=e.split("#"),e=c.shift(),c=e.split("?"),e=c.shift(),c=e.split("://"),c.length>1){if(r=c.shift(),o.require_valid_protocol&&-1===o.protocols.indexOf(r))return!1}else{if(o.require_protocol)return!1;o.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(c[0]=e.substr(2))}if(e=c.join("://"),c=e.split("/"),""===(e=c.shift())&&!o.require_host)return!0;if(c=e.split("@"),c.length>1&&(i=c.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;l=c.join("@"),u=null,f=null;var p=l.match(wt);return p?(n="",f=p[1],u=p[2]||null):(c=l.split(":"),n=c.shift(),c.length&&(u=c.join(":"))),!(null!==u&&(a=parseInt(u,10),!/^[0-9]+$/.test(u)||a<=0||a>65535))&&(!!(h(n)||d(n,o)||f&&h(f,6)||"localhost"===n)&&(n=n||f,!(o.host_whitelist&&!g(n,o.host_whitelist))&&(!o.host_blacklist||!g(n,o.host_blacklist))))}function v(e){return t(e),bt.test(e)}function _(e){return t(e),["true","false","1","0"].indexOf(e)>=0}function F(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if(t(e),o in kt)return kt[o].test(e);throw new Error("Invalid locale '"+o+"'")}function $(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if(t(e),o in St)return St[o].test(e);throw new Error("Invalid locale '"+o+"'")}function x(e){return t(e),It.test(e)}function A(e){return t(e),e===e.toLowerCase()}function y(e){return t(e),e===e.toUpperCase()}function w(e){return t(e),Ct.test(e)}function b(e){return t(e),jt.test(e)}function k(e){return t(e),Ut.test(e)}function S(e){return t(e),jt.test(e)&&Ut.test(e)}function D(e){return t(e),Pt.test(e)}function Z(e){return t(e),zt.test(e)}function E(e,o){t(e),o=o||{};var r=o.hasOwnProperty("allow_leading_zeroes")&&!o.allow_leading_zeroes?Lt:Nt,i=!o.hasOwnProperty("min")||e>=o.min,n=!o.hasOwnProperty("max")||e<=o.max,l=!o.hasOwnProperty("lt")||eo.gt;return r.test(e)&&i&&n&&l&&a}function O(e,o){return t(e),o=o||{},""!==e&&"."!==e&&(Bt.test(e)&&(!o.hasOwnProperty("min")||e>=o.min)&&(!o.hasOwnProperty("max")||e<=o.max)&&(!o.hasOwnProperty("lt")||eo.gt))}function R(e){return t(e),""!==e&&qt.test(e)}function I(e){return t(e),Tt.test(e)}function C(e,r){return t(e),o(e)%parseInt(r,10)==0}function j(e){return t(e),Ht.test(e)}function U(e){return t(e),Kt.test(e)}function P(e){return t(e),Mt.test(e)}function z(e){t(e);try{var o=JSON.parse(e);return!!o&&"object"===(void 0===o?"undefined":ht(o))}catch(t){}return!1}function L(e){return t(e),0===e.length}function N(e,o){t(e);var r=void 0,i=void 0;"object"===(void 0===o?"undefined":ht(o))?(r=o.min||0,i=o.max):(r=arguments[1],i=arguments[2]);var n=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],l=e.length-n.length;return l>=r&&(void 0===i||l<=i)}function B(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";t(e);var r=Wt[o];return r&&r.test(e)}function q(e){return t(e),I(e)&&24===e.length}function T(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);t(o);var i=e(r),n=e(o);return!!(n&&i&&n>i)}function H(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);t(o);var i=e(r),n=e(o);return!!(n&&i&&n=0}return"object"===(void 0===o?"undefined":ht(o))?o.hasOwnProperty(e):!(!o||"function"!=typeof o.indexOf)&&o.indexOf(e)>=0}function M(e){t(e);var o=e.replace(/[- ]+/g,"");if(!Gt.test(o))return!1;for(var r=0,i=void 0,n=void 0,l=void 0,a=o.length-1;a>=0;a--)i=o.substring(a,a+1),n=parseInt(i,10),l?(n*=2,r+=n>=10?n%10+1:n):r+=n,l=!l;return!(r%10!=0||!o)}function W(e){if(t(e),!Yt.test(e))return!1;for(var o=e.replace(/[A-Z]/g,function(t){return parseInt(t,36)}),r=0,i=void 0,n=void 0,l=!0,a=o.length-2;a>=0;a--)i=o.substring(a,a+1),n=parseInt(i,10),l?(n*=2,r+=n>=10?n+1:n):r+=n,l=!l;return parseInt(e.substr(e.length-1),10)===(1e4-r)%10}function G(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t(e),!(o=String(o)))return G(e,10)||G(e,13);var r=e.replace(/[\s-]+/g,""),i=0,n=void 0;if("10"===o){if(!Jt.test(r))return!1;for(n=0;n<9;n++)i+=(n+1)*r.charAt(n);if("X"===r.charAt(9)?i+=100:i+=10*r.charAt(9),i%11==0)return!!r}else if("13"===o){if(!Qt.test(r))return!1;for(n=0;n<12;n++)i+=Xt[n%2]*r.charAt(n);if(r.charAt(12)-(10-i%10)%10==0)return!!r}return!1}function Y(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e);var r=Vt;if(r=o.require_hyphen?r.replace("?",""):r,r=o.case_sensitive?new RegExp(r):new RegExp(r,"i"),!r.test(e))return!1;var i=e.replace("-",""),n=8,l=0,a=!0,u=!1,s=void 0;try{for(var c,d=i[Symbol.iterator]();!(a=(c=d.next()).done);a=!0){var f=c.value;l+=("X"===f.toUpperCase()?10:+f)*n,--n}}catch(t){u=!0,s=t}finally{try{!a&&d.return&&d.return()}finally{if(u)throw s}}return l%11==0}function J(e,o){return t(e),o in te?te[o].test(e):"any"===o&&!!Object.values(te).find(function(t){return t.test(e)})}function Q(t){var e="(\\"+t.symbol.replace(/\./g,"\\.")+")"+(t.require_symbol?"":"?"),o="[1-9]\\d{0,2}(\\"+t.thousands_separator+"\\d{3})*",r=["0","[1-9]\\d*",o],i="("+r.join("|")+")?",n="(\\"+t.decimal_separator+"\\d{2})?",l=i+n;return t.allow_negatives&&!t.parens_for_negatives&&(t.negative_sign_after_digits?l+="-?":t.negative_sign_before_digits&&(l="-?"+l)),t.allow_negative_sign_placeholder?l="( (?!\\-))?"+l:t.allow_space_after_symbol?l=" ?"+l:t.allow_space_after_digits&&(l+="( (?!$))?"),t.symbol_after_digits?l+=e:l=e+l,t.allow_negatives&&(t.parens_for_negatives?l="(\\("+l+"\\)|"+l+")":t.negative_sign_before_digits||t.negative_sign_after_digits||(l="-?"+l)),new RegExp("^(?!-? )(?=.*\\d)"+l+"$")}function X(e,o){return t(e),o=s(o,ee),Q(o).test(e)}function V(e){return t(e),oe.test(e)}function tt(e){t(e);var o=e.length;if(!o||o%4!=0||re.test(e))return!1;var r=e.indexOf("=");return-1===r||r===o-1||r===o-2&&"="===e[o-1]}function et(e){return t(e),ie.test(e)}function ot(e,o){t(e);var r=o?new RegExp("^["+o+"]+","g"):/^\s+/g;return e.replace(r,"")}function rt(e,o){t(e);for(var r=o?new RegExp("["+o+"]"):/\s/,i=e.length-1;i>=0&&r.test(e[i]);)i--;return i/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}function lt(e){return t(e),e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/`/g,"`")}function at(e,o){return t(e),e.replace(new RegExp("["+o+"]+","g"),"")}function ut(e,o){return t(e),at(e,o?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F")}function st(e,o){return t(e),e.replace(new RegExp("[^"+o+"]+","g"),"")}function ct(e,o){t(e);for(var r=e.length-1;r>=0;r--)if(-1===o.indexOf(e[r]))return!1;return!0}function dt(t,e){if(e=s(e,ne),!f(t))return!1;var o=t.split("@"),r=o.pop(),i=o.join("@"),n=[i,r];if(n[1]=n[1].toLowerCase(),"gmail.com"===n[1]||"googlemail.com"===n[1]){if(e.gmail_remove_subaddress&&(n[0]=n[0].split("+")[0]),e.gmail_remove_dots&&(n[0]=n[0].replace(/\./g,"")),!n[0].length)return!1;(e.all_lowercase||e.gmail_lowercase)&&(n[0]=n[0].toLowerCase()),n[1]=e.gmail_convert_googlemaildotcom?"gmail.com":n[1]}else if(~le.indexOf(n[1])){if(e.icloud_remove_subaddress&&(n[0]=n[0].split("+")[0]),!n[0].length)return!1;(e.all_lowercase||e.icloud_lowercase)&&(n[0]=n[0].toLowerCase())}else if(~ae.indexOf(n[1])){if(e.outlookdotcom_remove_subaddress&&(n[0]=n[0].split("+")[0]),!n[0].length)return!1;(e.all_lowercase||e.outlookdotcom_lowercase)&&(n[0]=n[0].toLowerCase())}else if(~ue.indexOf(n[1])){if(e.yahoo_remove_subaddress){var l=n[0].split("-");n[0]=l.length>1?l.slice(0,-1).join("-"):l[0]}if(!n[0].length)return!1;(e.all_lowercase||e.yahoo_lowercase)&&(n[0]=n[0].toLowerCase())}else e.all_lowercase&&(n[0]=n[0].toLowerCase());return n.join("@")}for(var ft,ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt=(function(){function t(t){this.value=t}function e(e){function o(t,e){return new Promise(function(o,i){var a={key:t,arg:e,resolve:o,reject:i,next:null};l?l=l.next=a:(n=l=a,r(t,e))})}function r(o,n){try{var l=e[o](n),a=l.value;a instanceof t?Promise.resolve(a.value).then(function(t){r("next",t)},function(t){r("throw",t)}):i(l.done?"return":"normal",l.value)}catch(t){i("throw",t)}}function i(t,e){switch(t){case"return":n.resolve({value:e,done:!0});break;case"throw":n.reject(e);break;default:n.resolve({value:e,done:!1})}n=n.next,n?r(n.key,n.arg):l=null}var n,l;this._invoke=o,"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),{require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1}),gt={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},mt=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,vt=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,_t=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,Ft=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,$t=/^([\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,xt=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,At=/^[0-9A-F]{1,4}$/i,yt={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},wt=/^\[([^\]]+)\](?::([0-9]+))?$/,bt=/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/,kt={"en-US":/^[A-Z]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"nl-NL":/^[A-ZÉËÏÓÖÜ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},St={"en-US":/^[0-9A-Z]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nl-NL":/^[0-9A-ZÉËÏÓÖÜ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},Dt=["AU","GB","HK","IN","NZ","ZA","ZM"],Zt=0;Zt