text-mask-addons
Advanced tools
Comparing version 3.5.0 to 3.5.1
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.createNumberMask=t():e.createNumberMask=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){e.exports=o(2)},,function(e,t){"use strict";function o(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=e.length;if(e===l||e[0]===y[0]&&1===t)return y.split(l).concat([m]).concat(g.split(l));var o=e.lastIndexOf(k),c=o!==-1,u=e[0]===d&&B,a=void 0,b=void 0,h=void 0;if(e.slice(Z*-1)===g&&(e=e.slice(0,Z*-1)),c&&(w||_)?(a=e.slice(e.slice(0,T)===y?T:0,o),b=e.slice(o+1,t),b=n(b.replace(f,l))):a=e.slice(0,T)===y?e.slice(T):e,R&&("undefined"==typeof R?"undefined":r(R))===p){var S="."===N?"[.]":""+N,j=(a.match(new RegExp(S,"g"))||[]).length;a=a.slice(0,R+j*$)}return a=a.replace(f,l),I||(a=String(Number(a))),a=x?i(a,N):a,h=n(a),(c&&w||_===!0)&&(e[o-1]!==k&&h.push(v),h.push(k,v),b&&(("undefined"==typeof L?"undefined":r(L))===p&&(b=b.slice(0,L)),h=h.concat(b)),_===!0&&e[o-1]===k&&h.push(m)),T>0&&(h=y.split(l).concat(h)),u&&(h.length===T&&h.push(m),h=[s].concat(h)),g.length>0&&(h=h.concat(g.split(l))),h}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.prefix,y=void 0===o?c:o,b=t.suffix,g=void 0===b?l:b,h=t.includeThousandsSeparator,x=void 0===h||h,S=t.thousandsSeparatorSymbol,N=void 0===S?u:S,j=t.allowDecimal,w=void 0!==j&&j,M=t.decimalSymbol,k=void 0===M?a:M,D=t.decimalLimit,L=void 0===D?2:D,O=t.requireDecimal,_=void 0!==O&&O,q=t.allowNegative,B=void 0!==q&&q,E=t.allowLeadingZeroes,I=void 0!==E&&E,P=t.integerLimit,R=void 0===P?null:P,T=y&&y.length||0,Z=g&&g.length||0,$=N&&N.length||0;return e.instanceOf="createNumberMask",e}function n(e){return e.split(l).map(function(e){return m.test(e)?m:e})}function i(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=o;var c="$",l="",u=",",a=".",d="-",s=/-/,f=/\D+/g,p="number",m=/\d/,v="[]"}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.createNumberMask=t():e.createNumberMask=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){e.exports=o(2)},,function(e,t){"use strict";function o(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=e.length;if(e===l||e[0]===y[0]&&1===t)return y.split(l).concat([v]).concat(h.split(l));var o=e.lastIndexOf(k),c=o!==-1,u=e[0]===d&&q,a=void 0,b=void 0,g=void 0;if(e.slice(T*-1)===h&&(e=e.slice(0,T*-1)),c&&(M||$)?(a=e.slice(e.slice(0,R)===y?R:0,o),b=e.slice(o+1,t),b=n(b.replace(f,l))):a=e.slice(0,R)===y?e.slice(R):e,P&&("undefined"==typeof P?"undefined":r(P))===p){var S="."===j?"[.]":""+j,w=(a.match(new RegExp(S,"g"))||[]).length;a=a.slice(0,P+w*Z)}return a=a.replace(f,l),E||(a=a.replace(/^0+(0$|[^0])/,"$1")),a=x?i(a,j):a,g=n(a),(c&&M||$===!0)&&(e[o-1]!==k&&g.push(m),g.push(k,m),b&&(("undefined"==typeof L?"undefined":r(L))===p&&(b=b.slice(0,L)),g=g.concat(b)),$===!0&&e[o-1]===k&&g.push(v)),R>0&&(g=y.split(l).concat(g)),u&&(g.length===R&&g.push(v),g=[s].concat(g)),h.length>0&&(g=g.concat(h.split(l))),g}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.prefix,y=void 0===o?c:o,b=t.suffix,h=void 0===b?l:b,g=t.includeThousandsSeparator,x=void 0===g||g,S=t.thousandsSeparatorSymbol,j=void 0===S?u:S,w=t.allowDecimal,M=void 0!==w&&w,N=t.decimalSymbol,k=void 0===N?a:N,D=t.decimalLimit,L=void 0===D?2:D,O=t.requireDecimal,$=void 0!==O&&O,_=t.allowNegative,q=void 0!==_&&_,B=t.allowLeadingZeroes,E=void 0!==B&&B,I=t.integerLimit,P=void 0===I?null:I,R=y&&y.length||0,T=h&&h.length||0,Z=j&&j.length||0;return e.instanceOf="createNumberMask",e}function n(e){return e.split(l).map(function(e){return v.test(e)?v:e})}function i(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=o;var c="$",l="",u=",",a=".",d="-",s=/-/,f=/\D+/g,p="number",v=/\d/,m="[]"}])}); |
@@ -1,1 +0,1 @@ | ||
{"errors":[],"warnings":[],"version":"1.14.0","hash":"da16a8e4b9a4609c063e","publicPath":"","assetsByChunkName":{"textMaskAddons":"textMaskAddons.js","emailMask":"emailMask.js","createNumberMask":"createNumberMask.js","createAutoCorrectedDatePipe":"createAutoCorrectedDatePipe.js"},"assets":[{"name":"textMaskAddons.js","size":5175,"chunks":[0],"chunkNames":["textMaskAddons"],"emitted":true},{"name":"emailMask.js","size":2171,"chunks":[1],"chunkNames":["emailMask"],"emitted":true},{"name":"createNumberMask.js","size":2414,"chunks":[2],"chunkNames":["createNumberMask"],"emitted":true},{"name":"createAutoCorrectedDatePipe.js","size":1124,"chunks":[3],"chunkNames":["createAutoCorrectedDatePipe"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":13727,"names":["textMaskAddons"],"files":["textMaskAddons.js"],"hash":"b451b8a83002cdf82092","parents":[],"modules":[{"id":0,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":1,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1597,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmy]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":5847,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n var isNegative = rawValue[0] === minus && allowNegative;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = String(Number(integer));\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","moduleName":"./addons/src/index.js","loc":"","name":"textMaskAddons","reasons":[]}]},{"id":1,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":5447,"names":["emailMask"],"files":["emailMask.js"],"hash":"58c5a19613807ab3e3c6","parents":[],"modules":[{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":3,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi emailMask","moduleIdentifier":"multi emailMask","moduleName":"multi emailMask","loc":"","name":"emailMask","reasons":[]}]},{"id":2,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":5875,"names":["createNumberMask"],"files":["createNumberMask.js"],"hash":"dc215f123f284f621a13","parents":[],"modules":[{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":2,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":5847,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n var isNegative = rawValue[0] === minus && allowNegative;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = String(Number(integer));\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createNumberMask","moduleIdentifier":"multi createNumberMask","moduleName":"multi createNumberMask","loc":"","name":"createNumberMask","reasons":[]}]},{"id":3,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":1625,"names":["createAutoCorrectedDatePipe"],"files":["createAutoCorrectedDatePipe.js"],"hash":"ab143c00270ac604fa40","parents":[],"modules":[{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1597,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmy]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createAutoCorrectedDatePipe","moduleIdentifier":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","loc":"","name":"createAutoCorrectedDatePipe","reasons":[]}]}],"modules":[{"id":0,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1597,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmy]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":5847,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n var isNegative = rawValue[0] === minus && allowNegative;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = String(Number(integer));\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"children":[]} | ||
{"errors":[],"warnings":[],"version":"1.14.0","hash":"9513d4755caf55272def","publicPath":"","assetsByChunkName":{"textMaskAddons":"textMaskAddons.js","emailMask":"emailMask.js","createNumberMask":"createNumberMask.js","createAutoCorrectedDatePipe":"createAutoCorrectedDatePipe.js"},"assets":[{"name":"textMaskAddons.js","size":5188,"chunks":[0],"chunkNames":["textMaskAddons"],"emitted":true},{"name":"emailMask.js","size":2171,"chunks":[1],"chunkNames":["emailMask"],"emitted":true},{"name":"createNumberMask.js","size":2427,"chunks":[2],"chunkNames":["createNumberMask"],"emitted":true},{"name":"createAutoCorrectedDatePipe.js","size":1124,"chunks":[3],"chunkNames":["createAutoCorrectedDatePipe"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":13741,"names":["textMaskAddons"],"files":["textMaskAddons.js"],"hash":"5038299c4dcec3f0e5c1","parents":[],"modules":[{"id":0,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":1,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1597,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmy]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":5861,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n var isNegative = rawValue[0] === minus && allowNegative;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","moduleName":"./addons/src/index.js","loc":"","name":"textMaskAddons","reasons":[]}]},{"id":1,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":5447,"names":["emailMask"],"files":["emailMask.js"],"hash":"58c5a19613807ab3e3c6","parents":[],"modules":[{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":3,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi emailMask","moduleIdentifier":"multi emailMask","moduleName":"multi emailMask","loc":"","name":"emailMask","reasons":[]}]},{"id":2,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":5889,"names":["createNumberMask"],"files":["createNumberMask.js"],"hash":"7a5f71306490a612db57","parents":[],"modules":[{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":2,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":5861,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n var isNegative = rawValue[0] === minus && allowNegative;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createNumberMask","moduleIdentifier":"multi createNumberMask","moduleName":"multi createNumberMask","loc":"","name":"createNumberMask","reasons":[]}]},{"id":3,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":1625,"names":["createAutoCorrectedDatePipe"],"files":["createAutoCorrectedDatePipe.js"],"hash":"ab143c00270ac604fa40","parents":[],"modules":[{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1597,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmy]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createAutoCorrectedDatePipe","moduleIdentifier":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","loc":"","name":"createAutoCorrectedDatePipe","reasons":[]}]}],"modules":[{"id":0,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1597,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmy]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":5861,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n var isNegative = rawValue[0] === minus && allowNegative;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/Loz/Documents/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/Loz/Documents/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"children":[]} |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.textMaskAddons=t():e.textMaskAddons=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);Object.defineProperty(t,"createAutoCorrectedDatePipe",{enumerable:!0,get:function(){return r(o).default}});var i=n(2);Object.defineProperty(t,"createNumberMask",{enumerable:!0,get:function(){return r(i).default}});var u=n(3);Object.defineProperty(t,"emailMask",{enumerable:!0,get:function(){return r(u).default}})},function(e,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy";return function(t){var n=[],r=e.split(/[^dmy]+/),o={dd:31,mm:12,yy:99,yyyy:9999},i={dd:1,mm:1,yy:0,yyyy:1},u=t.split("");r.forEach(function(t){var r=e.indexOf(t),i=parseInt(o[t].toString().substr(0,1),10);parseInt(u[r],10)>i&&(u[r+1]=u[r],u[r]=0,n.push(r))});var c=r.some(function(n){var r=e.indexOf(n),u=n.length,c=t.substr(r,u).replace(/\D/g,""),l=parseInt(c,10);return l>o[n]||c.length===u&&l<i[n]});return!c&&{value:u.join(""),indexesOfPipedChars:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){"use strict";function n(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=e.length;if(e===c||e[0]===g[0]&&1===t)return g.split(c).concat([v]).concat(m.split(c));var n=e.lastIndexOf(S),u=n!==-1,l=e[0]===s&&I,a=void 0,h=void 0,b=void 0;if(e.slice(q*-1)===m&&(e=e.slice(0,q*-1)),u&&(M||D)?(a=e.slice(e.slice(0,V)===g?V:0,n),h=e.slice(n+1,t),h=r(h.replace(f,c))):a=e.slice(0,V)===g?e.slice(V):e,L&&("undefined"==typeof L?"undefined":i(L))===p){var O="."===_?"[.]":""+_,j=(a.match(new RegExp(O,"g"))||[]).length;a=a.slice(0,L+j*B)}return a=a.replace(f,c),R||(a=String(Number(a))),a=x?o(a,_):a,b=r(a),(u&&M||D===!0)&&(e[n-1]!==S&&b.push(y),b.push(S,y),h&&(("undefined"==typeof C?"undefined":i(C))===p&&(h=h.slice(0,C)),b=b.concat(h)),D===!0&&e[n-1]===S&&b.push(v)),V>0&&(b=g.split(c).concat(b)),l&&(b.length===V&&b.push(v),b=[d].concat(b)),m.length>0&&(b=b.concat(m.split(c))),b}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefix,g=void 0===n?u:n,h=t.suffix,m=void 0===h?c:h,b=t.includeThousandsSeparator,x=void 0===b||b,O=t.thousandsSeparatorSymbol,_=void 0===O?l:O,j=t.allowDecimal,M=void 0!==j&&j,P=t.decimalSymbol,S=void 0===P?a:P,w=t.decimalLimit,C=void 0===w?2:w,k=t.requireDecimal,D=void 0!==k&&k,E=t.allowNegative,I=void 0!==E&&E,N=t.allowLeadingZeroes,R=void 0!==N&&N,A=t.integerLimit,L=void 0===A?null:A,V=g&&g.length||0,q=m&&m.length||0,B=_&&_.length||0;return e.instanceOf="createNumberMask",e}function r(e){return e.split(c).map(function(e){return v.test(e)?v:e})}function o(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var i="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};t.default=n;var u="$",c="",l=",",a=".",s="-",d=/-/,f=/\D+/g,p="number",v=/\d/,y="[]"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){e=e.replace(O,v);var n=t.placeholderChar,r=t.currentCaretPosition,o=e.indexOf(y),s=e.lastIndexOf(p),d=s<o?-1:s,f=i(e,o+1,y),g=i(e,d-1,p),h=u(e,o,n),m=c(e,o,d,n),b=l(e,d,n,r);h=a(h),m=a(m),b=a(b,!0);var x=h.concat(f).concat(m).concat(g).concat(b);return x}function i(e,t,n){var r=[];return e[t]===n?r.push(n):r.push(g,n),r.push(g),r}function u(e,t){return t===-1?e:e.slice(0,t)}function c(e,t,n,r){var o=v;return t!==-1&&(o=n===-1?e.slice(t+1,e.length):e.slice(t+1,n)),o=o.replace(new RegExp("[\\s"+r+"]",m),v),o===y?f:o.length<1?h:o[o.length-1]===p?o.slice(0,o.length-1):o}function l(e,t,n,r){var o=v;return t!==-1&&(o=e.slice(t+1,e.length)),o=o.replace(new RegExp("[\\s"+n+".]",m),v),0===o.length?e[t-1]===p&&r!==e.length?f:v:o}function a(e,t){return e.split(v).map(function(e){return e===h?e:t?x:b})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),d=r(s),f="*",p=".",v="",y="@",g="[]",h=" ",m="g",b=/[^\s]/,x=/[^.\s]/,O=/\s/g;t.default={mask:o,pipe:d.default}},function(e,t){"use strict";function n(e,t){var n=t.currentCaretPosition,i=t.rawValue,f=t.previousConformedValue,p=t.placeholderChar,v=e;v=r(v);var y=v.indexOf(c),g=null===i.match(new RegExp("[^@\\s."+p+"]"));if(g)return u;if(v.indexOf(a)!==-1||y!==-1&&n!==y+1||i.indexOf(o)===-1&&f!==u&&i.indexOf(l)!==-1)return!1;var h=v.indexOf(o),m=v.slice(h+1,v.length);return(m.match(d)||s).length>1&&v.substr(-1)===l&&n!==i.length&&(v=v.slice(0,v.length-1)),v}function r(e){var t=0;return e.replace(i,function(){return t++,1===t?o:u})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var o="@",i=/@/g,u="",c="@.",l=".",a="..",s=[],d=/\./g}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.textMaskAddons=t():e.textMaskAddons=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);Object.defineProperty(t,"createAutoCorrectedDatePipe",{enumerable:!0,get:function(){return r(o).default}});var i=n(2);Object.defineProperty(t,"createNumberMask",{enumerable:!0,get:function(){return r(i).default}});var u=n(3);Object.defineProperty(t,"emailMask",{enumerable:!0,get:function(){return r(u).default}})},function(e,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy";return function(t){var n=[],r=e.split(/[^dmy]+/),o={dd:31,mm:12,yy:99,yyyy:9999},i={dd:1,mm:1,yy:0,yyyy:1},u=t.split("");r.forEach(function(t){var r=e.indexOf(t),i=parseInt(o[t].toString().substr(0,1),10);parseInt(u[r],10)>i&&(u[r+1]=u[r],u[r]=0,n.push(r))});var c=r.some(function(n){var r=e.indexOf(n),u=n.length,c=t.substr(r,u).replace(/\D/g,""),l=parseInt(c,10);return l>o[n]||c.length===u&&l<i[n]});return!c&&{value:u.join(""),indexesOfPipedChars:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){"use strict";function n(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=e.length;if(e===c||e[0]===h[0]&&1===t)return h.split(c).concat([v]).concat(m.split(c));var n=e.lastIndexOf(S),u=n!==-1,l=e[0]===s&&I,a=void 0,g=void 0,b=void 0;if(e.slice(V*-1)===m&&(e=e.slice(0,V*-1)),u&&(M||D)?(a=e.slice(e.slice(0,$)===h?$:0,n),g=e.slice(n+1,t),g=r(g.replace(f,c))):a=e.slice(0,$)===h?e.slice($):e,N&&("undefined"==typeof N?"undefined":i(N))===p){var O="."===_?"[.]":""+_,j=(a.match(new RegExp(O,"g"))||[]).length;a=a.slice(0,N+j*q)}return a=a.replace(f,c),A||(a=a.replace(/^0+(0$|[^0])/,"$1")),a=x?o(a,_):a,b=r(a),(u&&M||D===!0)&&(e[n-1]!==S&&b.push(y),b.push(S,y),g&&(("undefined"==typeof C?"undefined":i(C))===p&&(g=g.slice(0,C)),b=b.concat(g)),D===!0&&e[n-1]===S&&b.push(v)),$>0&&(b=h.split(c).concat(b)),l&&(b.length===$&&b.push(v),b=[d].concat(b)),m.length>0&&(b=b.concat(m.split(c))),b}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefix,h=void 0===n?u:n,g=t.suffix,m=void 0===g?c:g,b=t.includeThousandsSeparator,x=void 0===b||b,O=t.thousandsSeparatorSymbol,_=void 0===O?l:O,j=t.allowDecimal,M=void 0!==j&&j,P=t.decimalSymbol,S=void 0===P?a:P,w=t.decimalLimit,C=void 0===w?2:w,k=t.requireDecimal,D=void 0!==k&&k,E=t.allowNegative,I=void 0!==E&&E,R=t.allowLeadingZeroes,A=void 0!==R&&R,L=t.integerLimit,N=void 0===L?null:L,$=h&&h.length||0,V=m&&m.length||0,q=_&&_.length||0;return e.instanceOf="createNumberMask",e}function r(e){return e.split(c).map(function(e){return v.test(e)?v:e})}function o(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var i="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};t.default=n;var u="$",c="",l=",",a=".",s="-",d=/-/,f=/\D+/g,p="number",v=/\d/,y="[]"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){e=e.replace(O,v);var n=t.placeholderChar,r=t.currentCaretPosition,o=e.indexOf(y),s=e.lastIndexOf(p),d=s<o?-1:s,f=i(e,o+1,y),h=i(e,d-1,p),g=u(e,o,n),m=c(e,o,d,n),b=l(e,d,n,r);g=a(g),m=a(m),b=a(b,!0);var x=g.concat(f).concat(m).concat(h).concat(b);return x}function i(e,t,n){var r=[];return e[t]===n?r.push(n):r.push(h,n),r.push(h),r}function u(e,t){return t===-1?e:e.slice(0,t)}function c(e,t,n,r){var o=v;return t!==-1&&(o=n===-1?e.slice(t+1,e.length):e.slice(t+1,n)),o=o.replace(new RegExp("[\\s"+r+"]",m),v),o===y?f:o.length<1?g:o[o.length-1]===p?o.slice(0,o.length-1):o}function l(e,t,n,r){var o=v;return t!==-1&&(o=e.slice(t+1,e.length)),o=o.replace(new RegExp("[\\s"+n+".]",m),v),0===o.length?e[t-1]===p&&r!==e.length?f:v:o}function a(e,t){return e.split(v).map(function(e){return e===g?e:t?x:b})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),d=r(s),f="*",p=".",v="",y="@",h="[]",g=" ",m="g",b=/[^\s]/,x=/[^.\s]/,O=/\s/g;t.default={mask:o,pipe:d.default}},function(e,t){"use strict";function n(e,t){var n=t.currentCaretPosition,i=t.rawValue,f=t.previousConformedValue,p=t.placeholderChar,v=e;v=r(v);var y=v.indexOf(c),h=null===i.match(new RegExp("[^@\\s."+p+"]"));if(h)return u;if(v.indexOf(a)!==-1||y!==-1&&n!==y+1||i.indexOf(o)===-1&&f!==u&&i.indexOf(l)!==-1)return!1;var g=v.indexOf(o),m=v.slice(g+1,v.length);return(m.match(d)||s).length>1&&v.substr(-1)===l&&n!==i.length&&(v=v.slice(0,v.length-1)),v}function r(e){var t=0;return e.replace(i,function(){return t++,1===t?o:u})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var o="@",i=/@/g,u="",c="@.",l=".",a="..",s=[],d=/\./g}])}); |
{ | ||
"name": "text-mask-addons", | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"description": "Addons for Text Mask https://github.com/text-mask/text-mask", | ||
@@ -5,0 +5,0 @@ "main": "dist/textMaskAddons.js", |
@@ -75,3 +75,3 @@ const dollarSign = '$' | ||
if (!allowLeadingZeroes) { | ||
integer = String(Number(integer)) | ||
integer = integer.replace(/^0+(0$|[^0])/, '$1') | ||
} | ||
@@ -78,0 +78,0 @@ |
@@ -110,2 +110,10 @@ const createNumberMask = (isVerify()) ? | ||
it('works with large numbers when leading zeroes is false', function() { | ||
let numberMask = createNumberMask({allowLeadingZeroes: false}) | ||
expect(numberMask('111111111111111111111111')).to.deep.equal([ | ||
'$', /\d/, /\d/, /\d/, ',', /\d/, /\d/, /\d/, ',', /\d/, /\d/, /\d/, ',', /\d/, /\d/, /\d/, ',', | ||
/\d/, /\d/, /\d/, ',', /\d/, /\d/, /\d/, ',', /\d/, /\d/, /\d/, ',', /\d/, /\d/, /\d/ | ||
]) | ||
}) | ||
describe('integer limiting', () => { | ||
@@ -112,0 +120,0 @@ it('can limit the length of the integer part', () => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101860
668