Socket
Socket
Sign inDemoInstall

validator

Package Overview
Dependencies
Maintainers
1
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validator - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

lib/isISSN.js

11

CHANGELOG.md

@@ -0,1 +1,12 @@

#### 6.1.0
- Added support for greater or less than in `isFloat()`
([#544](https://github.com/chriso/validator.js/issues/544))
- Added support for ISSN validation via `isISSN()`
([#593](https://github.com/chriso/validator.js/pull/593))
- Fixed a bug in `normalizeEmail()`
([#594](https://github.com/chriso/validator.js/issues/594))
- New locales
([#585](https://github.com/chriso/validator.js/pull/585))
#### 6.0.0

@@ -2,0 +13,0 @@

8

index.js

@@ -183,2 +183,6 @@ 'use strict';

var _isISSN = require('./lib/isISSN');
var _isISSN2 = _interopRequireDefault(_isISSN);
var _isMobilePhone = require('./lib/isMobilePhone');

@@ -250,3 +254,3 @@

var version = '6.0.0';
var version = '6.1.0';

@@ -274,3 +278,3 @@ var validator = {

isCreditCard: _isCreditCard2.default,
isISIN: _isISIN2.default, isISBN: _isISBN2.default,
isISIN: _isISIN2.default, isISBN: _isISBN2.default, isISSN: _isISSN2.default,
isMobilePhone: _isMobilePhone2.default,

@@ -277,0 +281,0 @@ isCurrency: _isCurrency2.default,

@@ -20,2 +20,3 @@ 'use strict';

'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
'uk-UA': /^[А-ЯЄIЇҐ]+$/i,
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/

@@ -38,2 +39,3 @@ };

'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
'uk-UA': /^[0-9А-ЯЄIЇҐ]+$/i,
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/

@@ -40,0 +42,0 @@ };

@@ -19,3 +19,3 @@ 'use strict';

function isAfter(str) {
var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1];
var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());

@@ -22,0 +22,0 @@ (0, _assertString2.default)(str);

@@ -17,3 +17,3 @@ 'use strict';

function isAlpha(str) {
var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1];
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';

@@ -20,0 +20,0 @@ (0, _assertString2.default)(str);

@@ -17,3 +17,3 @@ 'use strict';

function isAlphanumeric(str) {
var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1];
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';

@@ -20,0 +20,0 @@ (0, _assertString2.default)(str);

@@ -19,3 +19,3 @@ 'use strict';

function isBefore(str) {
var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1];
var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());

@@ -22,0 +22,0 @@ (0, _assertString2.default)(str);

@@ -7,3 +7,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -10,0 +10,0 @@ exports.default = isByteLength;

@@ -22,4 +22,4 @@ 'use strict';

}
return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max);
return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max) && (!options.hasOwnProperty('lt') || str < options.lt) && (!options.hasOwnProperty('gt') || str > options.gt);
}
module.exports = exports['default'];

@@ -7,3 +7,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -10,0 +10,0 @@ exports.default = isIn;

@@ -18,3 +18,3 @@ 'use strict';

function isIP(str) {
var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

@@ -21,0 +21,0 @@ (0, _assertString2.default)(str);

@@ -19,3 +19,3 @@ 'use strict';

function isISBN(str) {
var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

@@ -22,0 +22,0 @@ (0, _assertString2.default)(str);

@@ -7,3 +7,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -10,0 +10,0 @@ exports.default = isJSON;

@@ -7,3 +7,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -10,0 +10,0 @@ exports.default = isLength;

@@ -22,3 +22,3 @@ 'use strict';

function isUUID(str) {
var version = arguments.length <= 1 || arguments[1] === undefined ? 'all' : arguments[1];
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all';

@@ -25,0 +25,0 @@ (0, _assertString2.default)(str);

@@ -73,4 +73,8 @@ 'use strict';

}
var parts = email.split('@', 2);
var raw_parts = email.split('@');
var domain = raw_parts.pop();
var user = raw_parts.join('@');
var parts = [user, domain];
// The domain is always lowercased, as it's case-insensitive per RFC 1035

@@ -77,0 +81,0 @@ parts[1] = parts[1].toLowerCase();

@@ -8,3 +8,3 @@ 'use strict';

function merge() {
var obj = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var defaults = arguments[1];

@@ -11,0 +11,0 @@

@@ -7,3 +7,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -10,0 +10,0 @@ exports.default = toString;

{
"name": "validator",
"description": "String validation and sanitization",
"version": "6.0.0",
"version": "6.1.0",
"homepage": "http://github.com/chriso/validator.js",

@@ -34,6 +34,6 @@ "files": [

"devDependencies": {
"babel-cli": "^6.9.0",
"babel-cli": "^6.16.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-rollup": "^1.1.1",
"babel-preset-es2015": "^6.16.0",
"babel-preset-es2015-rollup": "^1.2.0",
"coveralls": "^2.11.9",

@@ -40,0 +40,0 @@ "eslint": "^2.11.1",

@@ -58,4 +58,4 @@ # validator.js

- **isAfter(str [, date])** - check if the string is a date that's after the specified date (defaults to now).
- **isAlpha(str [, locale])** - check if the string contains only letters (a-zA-Z). Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']`) and defaults to `en-US`.
- **isAlphanumeric(str [, locale])** - check if the string contains only letters and numbers. Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fr-BE', 'hu-HU', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']`) and defaults to `en-US`.
- **isAlpha(str [, locale])** - check if the string contains only letters (a-zA-Z). Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR', 'uk-UA']`) and defaults to `en-US`.
- **isAlphanumeric(str [, locale])** - check if the string contains only letters and numbers. Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fr-BE', 'hu-HU', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR', 'uk-UA']`) and defaults to `en-US`.
- **isAscii(str)** - check if the string contains ASCII chars only.

@@ -75,3 +75,3 @@ - **isBase64(str)** - check if a string is base64 encoded.

- **isFQDN(str [, options])** - check if the string is a fully qualified domain name (e.g. domain.com). `options` is an object which defaults to `{ require_tld: true, allow_underscores: false, allow_trailing_dot: false }`.
- **isFloat(str [, options])** - check if the string is a float. `options` is an object which can contain the keys `min` and/or `max` to validate the float is within boundaries (e.g. `{ min: 7.22, max: 9.55 }`).
- **isFloat(str [, options])** - check if the string is a float. `options` is an object which can contain the keys `min`, `max`, `gt`, and/or `lt` to validate the float is within boundaries (e.g. `{ min: 7.22, max: 9.55 }`). `min` and `max` are equivalent to 'greater or equal' and 'less or equal', respectively while `gt` and `lt` are their strict counterparts.
- **isFullWidth(str)** - check if the string contains any full-width chars.

@@ -83,2 +83,3 @@ - **isHalfWidth(str)** - check if the string contains any half-width chars.

- **isISBN(str [, version])** - check if the string is an ISBN (version 10 or 13).
- **isISSN(str [, options])** - check if the string is an [ISSN](https://en.wikipedia.org/wiki/International_Standard_Serial_Number). `options` is an object which defaults to `{ case_sensitive: false, require_hyphen: false }`. If `case_sensitive` is true, ISSNs with a lowercase `'x'` as the check digit are rejected.
- **isISIN(str)** - check if the string is an [ISIN][ISIN] (stock/security identifier).

@@ -85,0 +86,0 @@ - **isISO8601(str)** - check if the string is a valid [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date.

@@ -67,5 +67,118 @@ /*!

} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var asyncGenerator = function () {
function AwaitValue(value) {
this.value = value;
}
function AsyncGenerator(gen) {
var front, back;
function send(key, arg) {
return new Promise(function (resolve, reject) {
var request = {
key: key,
arg: arg,
resolve: resolve,
reject: reject,
next: null
};
if (back) {
back = back.next = request;
} else {
front = back = request;
resume(key, arg);
}
});
}
function resume(key, arg) {
try {
var result = gen[key](arg);
var value = result.value;
if (value instanceof AwaitValue) {
Promise.resolve(value.value).then(function (arg) {
resume("next", arg);
}, function (arg) {
resume("throw", arg);
});
} else {
settle(result.done ? "return" : "normal", result.value);
}
} catch (err) {
settle("throw", err);
}
}
function settle(type, value) {
switch (type) {
case "return":
front.resolve({
value: value,
done: true
});
break;
case "throw":
front.reject(value);
break;
default:
front.resolve({
value: value,
done: false
});
break;
}
front = front.next;
if (front) {
resume(front.key, front.arg);
} else {
back = null;
}
}
this._invoke = send;
if (typeof gen.return !== "function") {
this.return = undefined;
}
}
if (typeof Symbol === "function" && Symbol.asyncIterator) {
AsyncGenerator.prototype[Symbol.asyncIterator] = function () {
return this;
};
}
AsyncGenerator.prototype.next = function (arg) {
return this._invoke("next", arg);
};
AsyncGenerator.prototype.throw = function (arg) {
return this._invoke("throw", arg);
};
AsyncGenerator.prototype.return = function (arg) {
return this._invoke("return", arg);
};
return {
wrap: function (fn) {
return function () {
return new AsyncGenerator(fn.apply(this, arguments));
};
},
await: function (value) {
return new AwaitValue(value);
}
};
}();
function toString(input) {

@@ -98,3 +211,3 @@ if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && input !== null) {

function merge() {
var obj = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var defaults = arguments[1];

@@ -232,3 +345,3 @@

function isIP(str) {
var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

@@ -440,2 +553,3 @@ assertString(str);

'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
'uk-UA': /^[А-ЯЄIЇҐ]+$/i,
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/

@@ -458,2 +572,3 @@ };

'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
'uk-UA': /^[0-9А-ЯЄIЇҐ]+$/i,
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/

@@ -483,3 +598,3 @@ };

function isAlpha(str) {
var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1];
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';

@@ -494,3 +609,3 @@ assertString(str);

function isAlphanumeric(str) {
var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1];
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';

@@ -591,3 +706,3 @@ assertString(str);

}
return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max);
return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max) && (!options.hasOwnProperty('lt') || str < options.lt) && (!options.hasOwnProperty('gt') || str > options.gt);
}

@@ -668,3 +783,3 @@

function isUUID(str) {
var version = arguments.length <= 1 || arguments[1] === undefined ? 'all' : arguments[1];
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all';

@@ -777,3 +892,3 @@ assertString(str);

function isAfter(str) {
var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1];
var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());

@@ -787,3 +902,3 @@ assertString(str);

function isBefore(str) {
var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1];
var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());

@@ -887,3 +1002,3 @@ assertString(str);

function isISBN(str) {
var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

@@ -927,2 +1042,47 @@ assertString(str);

var issn = '^\\d{4}-?\\d{3}[\\dX]$';
function isISSN(str) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
assertString(str);
var testIssn = issn;
testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn;
testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i');
if (!testIssn.test(str)) {
return false;
}
var issnDigits = str.replace('-', '');
var position = 8;
var checksum = 0;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = issnDigits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var digit = _step.value;
var digitValue = digit.toUpperCase() === 'X' ? 10 : +digit;
checksum += digitValue * position;
--position;
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return checksum % 11 === 0;
}
/* eslint-disable max-len */

@@ -1182,4 +1342,8 @@ var phones = {

}
var parts = email.split('@', 2);
var raw_parts = email.split('@');
var domain = raw_parts.pop();
var user = raw_parts.join('@');
var parts = [user, domain];
// The domain is always lowercased, as it's case-insensitive per RFC 1035

@@ -1246,3 +1410,3 @@ parts[1] = parts[1].toLowerCase();

var version = '6.0.0';
var version = '6.1.0';

@@ -1270,3 +1434,3 @@ var validator = {

isCreditCard: isCreditCard,
isISIN: isISIN, isISBN: isISBN,
isISIN: isISIN, isISBN: isISBN, isISSN: isISSN,
isMobilePhone: isMobilePhone,

@@ -1273,0 +1437,0 @@ isCurrency: isCurrency,

@@ -23,2 +23,2 @@ /*!

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.validator=t()}(this,function(){"use strict";function e(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}function t(t){return e(t),t=Date.parse(t),isNaN(t)?null:new Date(t)}function o(t){return e(t),parseFloat(t)}function r(t,o){return e(t),parseInt(t,o||10)}function i(t,o){return e(t),o?"1"===t||"true"===t:"0"!==t&&"false"!==t&&""!==t}function n(t,o){return e(t),t===o}function l(e){return"object"===("undefined"==typeof e?"undefined":ge(e))&&null!==e?e="function"==typeof e.toString?e.toString():"[object Object]":(null===e||"undefined"==typeof e||isNaN(e)&&!e.length)&&(e=""),String(e)}function a(t,o){return e(t),t.indexOf(l(o))>=0}function u(t,o,r){return e(t),"[object RegExp]"!==Object.prototype.toString.call(o)&&(o=new RegExp(o,r)),o.test(t)}function s(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];for(var o in t)"undefined"==typeof e[o]&&(e[o]=t[o]);return e}function f(t,o){e(t);var r=void 0,i=void 0;"object"===("undefined"==typeof o?"undefined":ge(o))?(r=o.min||0,i=o.max):(r=arguments[1],i=arguments[2]);var n=encodeURI(t).split(/%..|./).length-1;return n>=r&&("undefined"==typeof i||n<=i)}function c(t,o){e(t),o=s(o,pe),o.allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));var r=t.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;l<r.length;l++){if(n=r[l],o.allow_underscores&&(n=n.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(n))return!1;if(/[\uff01-\uff5e]/.test(n))return!1;if("-"===n[0]||"-"===n[n.length-1])return!1}return!0}function d(t,o){if(e(t),o=s(o,me),o.allow_display_name){var r=t.match(he);r&&(t=r[1])}var i=t.split("@"),n=i.pop(),l=i.join("@"),a=n.toLowerCase();if("gmail.com"!==a&&"googlemail.com"!==a||(l=l.replace(/\./g,"").toLowerCase()),!f(l,{max:64})||!f(n,{max:256}))return!1;if(!c(n,{require_tld:o.require_tld}))return!1;if('"'===l[0])return l=l.slice(1,l.length-1),o.allow_utf8_local_part?$e.test(l):ve.test(l);for(var u=o.allow_utf8_local_part?Fe:_e,d=l.split("."),g=0;g<d.length;g++)if(!u.test(d[g]))return!1;return!0}function g(t){var o=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(e(t),o=String(o),!o)return g(t,4)||g(t,6);if("4"===o){if(!xe.test(t))return!1;var r=t.split(".").sort(function(e,t){return e-t});return r[3]<=255}if("6"===o){var i=t.split(":"),n=!1,l=g(i[i.length-1],4),a=l?7:8;if(i.length>a)return!1;if("::"===t)return!0;"::"===t.substr(0,2)?(i.shift(),i.shift(),n=!0):"::"===t.substr(t.length-2)&&(i.pop(),i.pop(),n=!0);for(var u=0;u<i.length;++u)if(""===i[u]&&u>0&&u<i.length-1){if(n)return!1;n=!0}else if(l&&u===i.length-1);else if(!Ae.test(i[u]))return!1;return n?i.length>=1:i.length===a}return!1}function p(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function m(e,t){for(var o=0;o<t.length;o++){var r=t[o];if(e===r||p(r)&&r.test(e))return!0}return!1}function h(t,o){if(e(t),!t||t.length>=2083||/\s/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;o=s(o,we);var r=void 0,i=void 0,n=void 0,l=void 0,a=void 0,u=void 0,f=void 0,d=void 0;if(f=t.split("#"),t=f.shift(),f=t.split("?"),t=f.shift(),f=t.split("://"),f.length>1){if(r=f.shift(),o.require_valid_protocol&&o.protocols.indexOf(r)===-1)return!1}else{if(o.require_protocol)return!1;o.allow_protocol_relative_urls&&"//"===t.substr(0,2)&&(f[0]=t.substr(2))}if(t=f.join("://"),f=t.split("/"),t=f.shift(),""===t&&!o.require_host)return!0;if(f=t.split("@"),f.length>1&&(i=f.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;l=f.join("@"),u=d=null;var p=l.match(be);return p?(n="",d=p[1],u=p[2]||null):(f=l.split(":"),n=f.shift(),f.length&&(u=f.join(":"))),!(null!==u&&(a=parseInt(u,10),!/^[0-9]+$/.test(u)||a<=0||a>65535))&&(!!(g(n)||c(n,o)||d&&g(d,6)||"localhost"===n)&&(n=n||d,!(o.host_whitelist&&!m(n,o.host_whitelist))&&(!o.host_blacklist||!m(n,o.host_blacklist))))}function _(t){return e(t),ye.test(t)}function v(t){return e(t),["true","false","1","0"].indexOf(t)>=0}function F(t){var o=arguments.length<=1||void 0===arguments[1]?"en-US":arguments[1];if(e(t),o in ke)return ke[o].test(t);throw new Error("Invalid locale '"+o+"'")}function $(t){var o=arguments.length<=1||void 0===arguments[1]?"en-US":arguments[1];if(e(t),o in De)return De[o].test(t);throw new Error("Invalid locale '"+o+"'")}function x(t){return e(t),Ie.test(t)}function A(t){return e(t),t===t.toLowerCase()}function w(t){return e(t),t===t.toUpperCase()}function b(t){return e(t),Re.test(t)}function y(t){return e(t),je.test(t)}function k(t){return e(t),ze.test(t)}function D(t){return e(t),je.test(t)&&ze.test(t)}function S(t){return e(t),Ne.test(t)}function E(t){return e(t),Ue.test(t)}function Z(t,o){e(t),o=o||{};var r=o.hasOwnProperty("allow_leading_zeroes")&&!o.allow_leading_zeroes?Be:Le,i=!o.hasOwnProperty("min")||t>=o.min,n=!o.hasOwnProperty("max")||t<=o.max;return r.test(t)&&i&&n}function O(t,o){return e(t),o=o||{},""!==t&&"."!==t&&(Pe.test(t)&&(!o.hasOwnProperty("min")||t>=o.min)&&(!o.hasOwnProperty("max")||t<=o.max))}function C(t){return e(t),""!==t&&qe.test(t)}function I(t){return e(t),Te.test(t)}function R(t,r){return e(t),o(t)%parseInt(r,10)===0}function j(t){return e(t),Me.test(t)}function z(t){return e(t),He.test(t)}function N(t){e(t);try{var o=JSON.parse(t);return!!o&&"object"===("undefined"==typeof o?"undefined":ge(o))}catch(e){}return!1}function U(t){return e(t),0===t.length}function B(t,o){e(t);var r=void 0,i=void 0;"object"===("undefined"==typeof o?"undefined":ge(o))?(r=o.min||0,i=o.max):(r=arguments[1],i=arguments[2]);var n=t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],l=t.length-n.length;return l>=r&&("undefined"==typeof i||l<=i)}function L(t){var o=arguments.length<=1||void 0===arguments[1]?"all":arguments[1];e(t);var r=We[o];return r&&r.test(t)}function P(t){return e(t),I(t)&&24===t.length}function q(t){return e(t),Ye.test(t)}function T(e){var t=e.match(Ye),o=void 0,r=void 0,i=void 0,n=void 0;if(t){if(o=t[21],!o)return t[12]?null:0;if("z"===o||"Z"===o)return 0;r=t[22],o.indexOf(":")!==-1?(i=parseInt(t[23],10),n=parseInt(t[24],10)):(i=0,n=parseInt(t[23],10))}else{if(e=e.toLowerCase(),o=e.match(/(?:\s|gmt\s*)(-|\+)(\d{1,4})(\s|$)/),!o)return e.indexOf("gmt")!==-1?0:null;r=o[1];var l=o[2];3===l.length&&(l="0"+l),l.length<=2?(i=0,n=parseInt(l,10)):(i=parseInt(l.slice(0,2),10),n=parseInt(l.slice(2,4),10))}return(60*i+n)*("-"===r?1:-1)}function M(t){e(t);var o=new Date(Date.parse(t));if(isNaN(o))return!1;var r=T(t);if(null!==r){var i=o.getTimezoneOffset()-r;o=new Date(o.getTime()+6e4*i)}var n=String(o.getDate()),l=void 0,a=void 0,u=void 0;return!(a=t.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g))||(l=a.map(function(e){return e.match(/\d+/g)[0]}).join("/"),u=String(o.getFullYear()).slice(-2),l===n||l===u||(l===""+n/u||l===""+u/n))}function H(o){var r=arguments.length<=1||void 0===arguments[1]?String(new Date):arguments[1];e(o);var i=t(r),n=t(o);return!!(n&&i&&n>i)}function W(o){var r=arguments.length<=1||void 0===arguments[1]?String(new Date):arguments[1];e(o);var i=t(r),n=t(o);return!!(n&&i&&n<i)}function Y(t,o){e(t);var r=void 0;if("[object Array]"===Object.prototype.toString.call(o)){var i=[];for(r in o)({}).hasOwnProperty.call(o,r)&&(i[r]=l(o[r]));return i.indexOf(t)>=0}return"object"===("undefined"==typeof o?"undefined":ge(o))?o.hasOwnProperty(t):!(!o||"function"!=typeof o.indexOf)&&o.indexOf(t)>=0}function G(t){e(t);var o=t.replace(/[^0-9]+/g,"");if(!Ge.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 J(t){if(e(t),!Je.test(t))return!1;for(var o=t.replace(/[A-Z]/g,function(e){return parseInt(e,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(t.substr(t.length-1),10)===(1e4-r)%10}function K(t){var o=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(e(t),o=String(o),!o)return K(t,10)||K(t,13);var r=t.replace(/[\s-]+/g,""),i=0,n=void 0;if("10"===o){if(!Ke.test(r))return!1;for(n=0;n<9;n++)i+=(n+1)*r.charAt(n);if(i+="X"===r.charAt(9)?100:10*r.charAt(9),i%11===0)return!!r}else if("13"===o){if(!Qe.test(r))return!1;for(n=0;n<12;n++)i+=Ve[n%2]*r.charAt(n);if(r.charAt(12)-(10-i%10)%10===0)return!!r}return!1}function Q(t,o){return e(t),o in Xe&&Xe[o].test(t)}function V(e){var t="(\\"+e.symbol.replace(/\./g,"\\.")+")"+(e.require_symbol?"":"?"),o="-?",r="[1-9]\\d*",i="[1-9]\\d{0,2}(\\"+e.thousands_separator+"\\d{3})*",n=["0",r,i],l="("+n.join("|")+")?",a="(\\"+e.decimal_separator+"\\d{2})?",u=l+a;return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?u+=o:e.negative_sign_before_digits&&(u=o+u)),e.allow_negative_sign_placeholder?u="( (?!\\-))?"+u:e.allow_space_after_symbol?u=" ?"+u:e.allow_space_after_digits&&(u+="( (?!$))?"),e.symbol_after_digits?u+=t:u=t+u,e.allow_negatives&&(e.parens_for_negatives?u="(\\("+u+"\\)|"+u+")":e.negative_sign_before_digits||e.negative_sign_after_digits||(u=o+u)),new RegExp("^(?!-? )(?=.*\\d)"+u+"$")}function X(t,o){return e(t),o=s(o,et),V(o).test(t)}function ee(t){e(t);var o=t.length;if(!o||o%4!==0||tt.test(t))return!1;var r=t.indexOf("=");return r===-1||r===o-1||r===o-2&&"="===t[o-1]}function te(t){return e(t),ot.test(t)}function oe(t,o){e(t);var r=o?new RegExp("^["+o+"]+","g"):/^\s+/g;return t.replace(r,"")}function re(t,o){e(t);for(var r=o?new RegExp("["+o+"]"):/\s/,i=t.length-1;i>=0&&r.test(t[i]);)i--;return i<t.length?t.substr(0,i+1):t}function ie(e,t){return re(oe(e,t),t)}function ne(t){return e(t),t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")}function le(t){return e(t),t.replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#96;/g,"`")}function ae(t,o){return e(t),t.replace(new RegExp("["+o+"]+","g"),"")}function ue(t,o){e(t);var r=o?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return ae(t,r)}function se(t,o){return e(t),t.replace(new RegExp("[^"+o+"]+","g"),"")}function fe(t,o){e(t);for(var r=t.length-1;r>=0;r--)if(o.indexOf(t[r])===-1)return!1;return!0}function ce(e,t){if(t=s(t,rt),!d(e))return!1;var o=e.split("@",2);if(o[1]=o[1].toLowerCase(),"gmail.com"===o[1]||"googlemail.com"===o[1]){if(t.gmail_remove_subaddress&&(o[0]=o[0].split("+")[0]),t.gmail_remove_dots&&(o[0]=o[0].replace(/\./g,"")),!o[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(o[0]=o[0].toLowerCase()),o[1]=t.gmail_convert_googlemaildotcom?"gmail.com":o[1]}else if(~it.indexOf(o[1])){if(t.icloud_remove_subaddress&&(o[0]=o[0].split("+")[0]),!o[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(o[0]=o[0].toLowerCase())}else if(~nt.indexOf(o[1])){if(t.outlookdotcom_remove_subaddress&&(o[0]=o[0].split("+")[0]),!o[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(o[0]=o[0].toLowerCase())}else if(~lt.indexOf(o[1])){if(t.yahoo_remove_subaddress){var r=o[0].split("-");o[0]=r.length>1?r.slice(0,-1).join("-"):r[0]}if(!o[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(o[0]=o[0].toLowerCase())}else t.all_lowercase&&(o[0]=o[0].toLowerCase());return o.join("@")}for(var de,ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},pe={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1},me={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},he=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,_e=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,ve=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,Fe=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,$e=/^([\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,xe=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,Ae=/^[0-9A-F]{1,4}$/i,we={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},be=/^\[([^\]]+)\](?::([0-9]+))?$/,ye=/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/,ke={"en-US":/^[A-Z]+$/i,"cs-CZ":/^[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,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},De={"en-US":/^[0-9A-Z]+$/i,"cs-CZ":/^[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,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},Se=["AU","GB","HK","IN","NZ","ZA","ZM"],Ee=0;Ee<Se.length;Ee++)de="en-"+Se[Ee],ke[de]=ke["en-US"],De[de]=De["en-US"];ke["pt-BR"]=ke["pt-PT"],De["pt-BR"]=De["pt-PT"];for(var Ze,Oe=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],Ce=0;Ce<Oe.length;Ce++)Ze="ar-"+Oe[Ce],ke[Ze]=ke.ar,De[Ze]=De.ar;var Ie=/^[-+]?[0-9]+$/,Re=/^[\x00-\x7F]+$/,je=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/,ze=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/,Ne=/[^\x00-\x7F]/,Ue=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,Be=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,Le=/^[-+]?[0-9]+$/,Pe=/^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/,qe=/^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/,Te=/^[0-9A-F]+$/i,Me=/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i,He=/^[a-f0-9]{32}$/,We={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i},Ye=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,Ge=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/,Je=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/,Ke=/^(?:[0-9]{9}X|[0-9]{10})$/,Qe=/^(?:[0-9]{13})$/,Ve=[1,3],Xe={"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"en-US":/^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"de-DE":/^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,"da-DK":/^(\+?45)?(\d{8})$/,"el-GR":/^(\+?30)?(69\d{8})$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-HK":/^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,"en-IN":/^(\+?91|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)2\d{7,9}$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"es-ES":/^(\+?34)?(6\d{1}|7[1234])\d{7}$/,"fi-FI":/^(\+?358|0)\s?(4(0|1|2|4|5)?|50)\s?(\d\s?){4,8}\d$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"hu-HU":/^(\+?36)(20|30|70)\d{7}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"ja-JP":/^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/,"ms-MY":/^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"nl-BE":/^(\+?32|0)4?\d{8}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"vi-VN":/^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,"zh-CN":/^(\+?0?86\-?)?1[345789]\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/};Xe["en-CA"]=Xe["en-US"],Xe["fr-BE"]=Xe["nl-BE"];var et={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_space_after_digits:!1},tt=/[^A-Z0-9+\/=]/i,ot=/^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9!\$&',\(\)\*\+,;=\-\._~:@\/\?%\s]*\s*$/i,rt={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},it=["icloud.com","me.com"],nt=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],lt=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],at="6.0.0",ut={version:at,toDate:t,toFloat:o,toInt:r,toBoolean:i,equals:n,contains:a,matches:u,isEmail:d,isURL:h,isMACAddress:_,isIP:g,isFQDN:c,isBoolean:v,isAlpha:F,isAlphanumeric:$,isNumeric:x,isLowercase:A,isUppercase:w,isAscii:b,isFullWidth:y,isHalfWidth:k,isVariableWidth:D,isMultibyte:S,isSurrogatePair:E,isInt:Z,isFloat:O,isDecimal:C,isHexadecimal:I,isDivisibleBy:R,isHexColor:j,isMD5:z,isJSON:N,isEmpty:U,isLength:B,isByteLength:f,isUUID:L,isMongoId:P,isDate:M,isAfter:H,isBefore:W,isIn:Y,isCreditCard:G,isISIN:J,isISBN:K,isMobilePhone:Q,isCurrency:X,isISO8601:q,isBase64:ee,isDataURI:te,ltrim:oe,rtrim:re,trim:ie,escape:ne,unescape:le,stripLow:ue,whitelist:se,blacklist:ae,isWhitelisted:fe,normalizeEmail:ce,toString:l};return ut});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.validator=t()}(this,function(){"use strict";function e(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}function t(t){return e(t),t=Date.parse(t),isNaN(t)?null:new Date(t)}function r(t){return e(t),parseFloat(t)}function o(t,r){return e(t),parseInt(t,r||10)}function n(t,r){return e(t),r?"1"===t||"true"===t:"0"!==t&&"false"!==t&&""!==t}function i(t,r){return e(t),t===r}function a(e){return"object"===("undefined"==typeof e?"undefined":he(e))&&null!==e?e="function"==typeof e.toString?e.toString():"[object Object]":(null===e||"undefined"==typeof e||isNaN(e)&&!e.length)&&(e=""),String(e)}function l(t,r){return e(t),t.indexOf(a(r))>=0}function u(t,r,o){return e(t),"[object RegExp]"!==Object.prototype.toString.call(r)&&(r=new RegExp(r,o)),r.test(t)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)"undefined"==typeof e[r]&&(e[r]=t[r]);return e}function c(t,r){e(t);var o=void 0,n=void 0;"object"===("undefined"==typeof r?"undefined":he(r))?(o=r.min||0,n=r.max):(o=arguments[1],n=arguments[2]);var i=encodeURI(t).split(/%..|./).length-1;return i>=o&&("undefined"==typeof n||i<=n)}function f(t,r){e(t),r=s(r,ge),r.allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));var o=t.split(".");if(r.require_tld){var n=o.pop();if(!o.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(n))return!1}for(var i,a=0;a<o.length;a++){if(i=o[a],r.allow_underscores&&(i=i.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(i))return!1;if(/[\uff01-\uff5e]/.test(i))return!1;if("-"===i[0]||"-"===i[i.length-1])return!1}return!0}function d(t,r){if(e(t),r=s(r,me),r.allow_display_name){var o=t.match(ve);o&&(t=o[1])}var n=t.split("@"),i=n.pop(),a=n.join("@"),l=i.toLowerCase();if("gmail.com"!==l&&"googlemail.com"!==l||(a=a.replace(/\./g,"").toLowerCase()),!c(a,{max:64})||!c(i,{max:256}))return!1;if(!f(i,{require_tld:r.require_tld}))return!1;if('"'===a[0])return a=a.slice(1,a.length-1),r.allow_utf8_local_part?xe.test(a):Fe.test(a);for(var u=r.allow_utf8_local_part?$e:_e,d=a.split("."),p=0;p<d.length;p++)if(!u.test(d[p]))return!1;return!0}function p(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e(t),r=String(r),!r)return p(t,4)||p(t,6);if("4"===r){if(!ye.test(t))return!1;var o=t.split(".").sort(function(e,t){return e-t});return o[3]<=255}if("6"===r){var n=t.split(":"),i=!1,a=p(n[n.length-1],4),l=a?7:8;if(n.length>l)return!1;if("::"===t)return!0;"::"===t.substr(0,2)?(n.shift(),n.shift(),i=!0):"::"===t.substr(t.length-2)&&(n.pop(),n.pop(),i=!0);for(var u=0;u<n.length;++u)if(""===n[u]&&u>0&&u<n.length-1){if(i)return!1;i=!0}else if(a&&u===n.length-1);else if(!we.test(n[u]))return!1;return i?n.length>=1:n.length===l}return!1}function h(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function g(e,t){for(var r=0;r<t.length;r++){var o=t[r];if(e===o||h(o)&&o.test(e))return!0}return!1}function m(t,r){if(e(t),!t||t.length>=2083||/\s/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;r=s(r,Ae);var o=void 0,n=void 0,i=void 0,a=void 0,l=void 0,u=void 0,c=void 0,d=void 0;if(c=t.split("#"),t=c.shift(),c=t.split("?"),t=c.shift(),c=t.split("://"),c.length>1){if(o=c.shift(),r.require_valid_protocol&&r.protocols.indexOf(o)===-1)return!1}else{if(r.require_protocol)return!1;r.allow_protocol_relative_urls&&"//"===t.substr(0,2)&&(c[0]=t.substr(2))}if(t=c.join("://"),c=t.split("/"),t=c.shift(),""===t&&!r.require_host)return!0;if(c=t.split("@"),c.length>1&&(n=c.shift(),n.indexOf(":")>=0&&n.split(":").length>2))return!1;a=c.join("@"),u=d=null;var h=a.match(be);return h?(i="",d=h[1],u=h[2]||null):(c=a.split(":"),i=c.shift(),c.length&&(u=c.join(":"))),!(null!==u&&(l=parseInt(u,10),!/^[0-9]+$/.test(u)||l<=0||l>65535))&&(!!(p(i)||f(i,r)||d&&p(d,6)||"localhost"===i)&&(i=i||d,!(r.host_whitelist&&!g(i,r.host_whitelist))&&(!r.host_blacklist||!g(i,r.host_blacklist))))}function v(t){return e(t),ke.test(t)}function _(t){return e(t),["true","false","1","0"].indexOf(t)>=0}function F(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if(e(t),r in Se)return Se[r].test(t);throw new Error("Invalid locale '"+r+"'")}function $(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if(e(t),r in De)return De[r].test(t);throw new Error("Invalid locale '"+r+"'")}function x(t){return e(t),Re.test(t)}function y(t){return e(t),t===t.toLowerCase()}function w(t){return e(t),t===t.toUpperCase()}function A(t){return e(t),je.test(t)}function b(t){return e(t),ze.test(t)}function k(t){return e(t),Ue.test(t)}function S(t){return e(t),ze.test(t)&&Ue.test(t)}function D(t){return e(t),Ne.test(t)}function E(t){return e(t),Pe.test(t)}function Z(t,r){e(t),r=r||{};var o=r.hasOwnProperty("allow_leading_zeroes")&&!r.allow_leading_zeroes?Be:Le,n=!r.hasOwnProperty("min")||t>=r.min,i=!r.hasOwnProperty("max")||t<=r.max;return o.test(t)&&n&&i}function I(t,r){return e(t),r=r||{},""!==t&&"."!==t&&(qe.test(t)&&(!r.hasOwnProperty("min")||t>=r.min)&&(!r.hasOwnProperty("max")||t<=r.max)&&(!r.hasOwnProperty("lt")||t<r.lt)&&(!r.hasOwnProperty("gt")||t>r.gt))}function O(t){return e(t),""!==t&&Te.test(t)}function C(t){return e(t),Me.test(t)}function R(t,o){return e(t),r(t)%parseInt(o,10)===0}function j(t){return e(t),He.test(t)}function z(t){return e(t),We.test(t)}function U(t){e(t);try{var r=JSON.parse(t);return!!r&&"object"===("undefined"==typeof r?"undefined":he(r))}catch(e){}return!1}function N(t){return e(t),0===t.length}function P(t,r){e(t);var o=void 0,n=void 0;"object"===("undefined"==typeof r?"undefined":he(r))?(o=r.min||0,n=r.max):(o=arguments[1],n=arguments[2]);var i=t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],a=t.length-i.length;return a>=o&&("undefined"==typeof n||a<=n)}function B(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";e(t);var o=Ye[r];return o&&o.test(t)}function L(t){return e(t),C(t)&&24===t.length}function q(t){return e(t),Ge.test(t)}function T(e){var t=e.match(Ge),r=void 0,o=void 0,n=void 0,i=void 0;if(t){if(r=t[21],!r)return t[12]?null:0;if("z"===r||"Z"===r)return 0;o=t[22],r.indexOf(":")!==-1?(n=parseInt(t[23],10),i=parseInt(t[24],10)):(n=0,i=parseInt(t[23],10))}else{if(e=e.toLowerCase(),r=e.match(/(?:\s|gmt\s*)(-|\+)(\d{1,4})(\s|$)/),!r)return e.indexOf("gmt")!==-1?0:null;o=r[1];var a=r[2];3===a.length&&(a="0"+a),a.length<=2?(n=0,i=parseInt(a,10)):(n=parseInt(a.slice(0,2),10),i=parseInt(a.slice(2,4),10))}return(60*n+i)*("-"===o?1:-1)}function M(t){e(t);var r=new Date(Date.parse(t));if(isNaN(r))return!1;var o=T(t);if(null!==o){var n=r.getTimezoneOffset()-o;r=new Date(r.getTime()+6e4*n)}var i=String(r.getDate()),a=void 0,l=void 0,u=void 0;return!(l=t.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g))||(a=l.map(function(e){return e.match(/\d+/g)[0]}).join("/"),u=String(r.getFullYear()).slice(-2),a===i||a===u||(a===""+i/u||a===""+u/i))}function H(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);e(r);var n=t(o),i=t(r);return!!(i&&n&&i>n)}function W(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);e(r);var n=t(o),i=t(r);return!!(i&&n&&i<n)}function Y(t,r){e(t);var o=void 0;if("[object Array]"===Object.prototype.toString.call(r)){var n=[];for(o in r)({}).hasOwnProperty.call(r,o)&&(n[o]=a(r[o]));return n.indexOf(t)>=0}return"object"===("undefined"==typeof r?"undefined":he(r))?r.hasOwnProperty(t):!(!r||"function"!=typeof r.indexOf)&&r.indexOf(t)>=0}function G(t){e(t);var r=t.replace(/[^0-9]+/g,"");if(!Je.test(r))return!1;for(var o=0,n=void 0,i=void 0,a=void 0,l=r.length-1;l>=0;l--)n=r.substring(l,l+1),i=parseInt(n,10),a?(i*=2,o+=i>=10?i%10+1:i):o+=i,a=!a;return!(o%10!==0||!r)}function J(t){if(e(t),!Ke.test(t))return!1;for(var r=t.replace(/[A-Z]/g,function(e){return parseInt(e,36)}),o=0,n=void 0,i=void 0,a=!0,l=r.length-2;l>=0;l--)n=r.substring(l,l+1),i=parseInt(n,10),a?(i*=2,o+=i>=10?i+1:i):o+=i,a=!a;return parseInt(t.substr(t.length-1),10)===(1e4-o)%10}function K(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e(t),r=String(r),!r)return K(t,10)||K(t,13);var o=t.replace(/[\s-]+/g,""),n=0,i=void 0;if("10"===r){if(!Qe.test(o))return!1;for(i=0;i<9;i++)n+=(i+1)*o.charAt(i);if(n+="X"===o.charAt(9)?100:10*o.charAt(9),n%11===0)return!!o}else if("13"===r){if(!Xe.test(o))return!1;for(i=0;i<12;i++)n+=Ve[i%2]*o.charAt(i);if(o.charAt(12)-(10-n%10)%10===0)return!!o}return!1}function Q(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(t);var o=et;if(o=r.require_hyphen?o.replace("?",""):o,o=r.case_sensitive?new RegExp(o):new RegExp(o,"i"),!o.test(t))return!1;var n=t.replace("-",""),i=8,a=0,l=!0,u=!1,s=void 0;try{for(var c,f=n[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){var d=c.value,p="X"===d.toUpperCase()?10:+d;a+=p*i,--i}}catch(e){u=!0,s=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw s}}return a%11===0}function X(t,r){return e(t),r in tt&&tt[r].test(t)}function V(e){var t="(\\"+e.symbol.replace(/\./g,"\\.")+")"+(e.require_symbol?"":"?"),r="-?",o="[1-9]\\d*",n="[1-9]\\d{0,2}(\\"+e.thousands_separator+"\\d{3})*",i=["0",o,n],a="("+i.join("|")+")?",l="(\\"+e.decimal_separator+"\\d{2})?",u=a+l;return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?u+=r:e.negative_sign_before_digits&&(u=r+u)),e.allow_negative_sign_placeholder?u="( (?!\\-))?"+u:e.allow_space_after_symbol?u=" ?"+u:e.allow_space_after_digits&&(u+="( (?!$))?"),e.symbol_after_digits?u+=t:u=t+u,e.allow_negatives&&(e.parens_for_negatives?u="(\\("+u+"\\)|"+u+")":e.negative_sign_before_digits||e.negative_sign_after_digits||(u=r+u)),new RegExp("^(?!-? )(?=.*\\d)"+u+"$")}function ee(t,r){return e(t),r=s(r,rt),V(r).test(t)}function te(t){e(t);var r=t.length;if(!r||r%4!==0||ot.test(t))return!1;var o=t.indexOf("=");return o===-1||o===r-1||o===r-2&&"="===t[r-1]}function re(t){return e(t),nt.test(t)}function oe(t,r){e(t);var o=r?new RegExp("^["+r+"]+","g"):/^\s+/g;return t.replace(o,"")}function ne(t,r){e(t);for(var o=r?new RegExp("["+r+"]"):/\s/,n=t.length-1;n>=0&&o.test(t[n]);)n--;return n<t.length?t.substr(0,n+1):t}function ie(e,t){return ne(oe(e,t),t)}function ae(t){return e(t),t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")}function le(t){return e(t),t.replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#96;/g,"`")}function ue(t,r){return e(t),t.replace(new RegExp("["+r+"]+","g"),"")}function se(t,r){e(t);var o=r?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return ue(t,o)}function ce(t,r){return e(t),t.replace(new RegExp("[^"+r+"]+","g"),"")}function fe(t,r){e(t);for(var o=t.length-1;o>=0;o--)if(r.indexOf(t[o])===-1)return!1;return!0}function de(e,t){if(t=s(t,it),!d(e))return!1;var r=e.split("@"),o=r.pop(),n=r.join("@"),i=[n,o];if(i[1]=i[1].toLowerCase(),"gmail.com"===i[1]||"googlemail.com"===i[1]){if(t.gmail_remove_subaddress&&(i[0]=i[0].split("+")[0]),t.gmail_remove_dots&&(i[0]=i[0].replace(/\./g,"")),!i[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(i[0]=i[0].toLowerCase()),i[1]=t.gmail_convert_googlemaildotcom?"gmail.com":i[1]}else if(~at.indexOf(i[1])){if(t.icloud_remove_subaddress&&(i[0]=i[0].split("+")[0]),!i[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(i[0]=i[0].toLowerCase())}else if(~lt.indexOf(i[1])){if(t.outlookdotcom_remove_subaddress&&(i[0]=i[0].split("+")[0]),!i[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(i[0]=i[0].toLowerCase())}else if(~ut.indexOf(i[1])){if(t.yahoo_remove_subaddress){var a=i[0].split("-");i[0]=a.length>1?a.slice(0,-1).join("-"):a[0]}if(!i[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(i[0]=i[0].toLowerCase())}else t.all_lowercase&&(i[0]=i[0].toLowerCase());return i.join("@")}for(var pe,he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge=(function(){function e(e){this.value=e}function t(t){function r(e,t){return new Promise(function(r,n){var l={key:e,arg:t,resolve:r,reject:n,next:null};a?a=a.next=l:(i=a=l,o(e,t))})}function o(r,i){try{var a=t[r](i),l=a.value;l instanceof e?Promise.resolve(l.value).then(function(e){o("next",e)},function(e){o("throw",e)}):n(a.done?"return":"normal",a.value)}catch(e){n("throw",e)}}function n(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}i=i.next,i?o(i.key,i.arg):a=null}var i,a;this._invoke=r,"function"!=typeof t.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)},{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}(),{require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1}),me={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},ve=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,_e=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,Fe=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,$e=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,xe=/^([\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,ye=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,we=/^[0-9A-F]{1,4}$/i,Ae={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},be=/^\[([^\]]+)\](?::([0-9]+))?$/,ke=/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/,Se={"en-US":/^[A-Z]+$/i,"cs-CZ":/^[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:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},De={"en-US":/^[0-9A-Z]+$/i,"cs-CZ":/^[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ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},Ee=["AU","GB","HK","IN","NZ","ZA","ZM"],Ze=0;Ze<Ee.length;Ze++)pe="en-"+Ee[Ze],Se[pe]=Se["en-US"],De[pe]=De["en-US"];Se["pt-BR"]=Se["pt-PT"],De["pt-BR"]=De["pt-PT"];for(var Ie,Oe=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],Ce=0;Ce<Oe.length;Ce++)Ie="ar-"+Oe[Ce],Se[Ie]=Se.ar,De[Ie]=De.ar;var Re=/^[-+]?[0-9]+$/,je=/^[\x00-\x7F]+$/,ze=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/,Ue=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/,Ne=/[^\x00-\x7F]/,Pe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,Be=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,Le=/^[-+]?[0-9]+$/,qe=/^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/,Te=/^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/,Me=/^[0-9A-F]+$/i,He=/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i,We=/^[a-f0-9]{32}$/,Ye={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i},Ge=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,Je=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/,Ke=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/,Qe=/^(?:[0-9]{9}X|[0-9]{10})$/,Xe=/^(?:[0-9]{13})$/,Ve=[1,3],et="^\\d{4}-?\\d{3}[\\dX]$",tt={"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"en-US":/^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"de-DE":/^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,"da-DK":/^(\+?45)?(\d{8})$/,"el-GR":/^(\+?30)?(69\d{8})$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-HK":/^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,"en-IN":/^(\+?91|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)2\d{7,9}$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"es-ES":/^(\+?34)?(6\d{1}|7[1234])\d{7}$/,"fi-FI":/^(\+?358|0)\s?(4(0|1|2|4|5)?|50)\s?(\d\s?){4,8}\d$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"hu-HU":/^(\+?36)(20|30|70)\d{7}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"ja-JP":/^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/,"ms-MY":/^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"nl-BE":/^(\+?32|0)4?\d{8}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"vi-VN":/^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,"zh-CN":/^(\+?0?86\-?)?1[345789]\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/};tt["en-CA"]=tt["en-US"],tt["fr-BE"]=tt["nl-BE"];var rt={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_space_after_digits:!1},ot=/[^A-Z0-9+\/=]/i,nt=/^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9!\$&',\(\)\*\+,;=\-\._~:@\/\?%\s]*\s*$/i,it={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},at=["icloud.com","me.com"],lt=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],ut=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],st="6.1.0",ct={version:st,toDate:t,toFloat:r,toInt:o,toBoolean:n,equals:i,contains:l,matches:u,isEmail:d,isURL:m,isMACAddress:v,isIP:p,isFQDN:f,isBoolean:_,isAlpha:F,isAlphanumeric:$,isNumeric:x,isLowercase:y,isUppercase:w,isAscii:A,isFullWidth:b,isHalfWidth:k,isVariableWidth:S,isMultibyte:D,isSurrogatePair:E,isInt:Z,isFloat:I,isDecimal:O,isHexadecimal:C,isDivisibleBy:R,isHexColor:j,isMD5:z,isJSON:U,isEmpty:N,isLength:P,isByteLength:c,isUUID:B,isMongoId:L,isDate:M,isAfter:H,isBefore:W,isIn:Y,isCreditCard:G,isISIN:J,isISBN:K,isISSN:Q,isMobilePhone:X,isCurrency:ee,isISO8601:q,isBase64:te,isDataURI:re,ltrim:oe,rtrim:ne,trim:ie,escape:ae,unescape:le,stripLow:se,whitelist:ce,blacklist:ue,isWhitelisted:fe,normalizeEmail:de,toString:a};return ct});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc