Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix for NumericInput + change default radixpoint to none

  • Loading branch information...
commit 664936b8a41ca000d43314acb482a282f9b309e9 1 parent f702a18
@RobinHerbots authored
View
8 README.md
@@ -153,6 +153,14 @@ $(document).ready(function(){
});
```
+If you define a radixPoint the caret will always jump to the integer part, until you type the radixpoint.
+
+```javascript
+$(document).ready(function(){
+ $('#test').inputmask('€ 999.999.999,99', { numericInput: true, radixPoint: "," });
+});
+```
+
### remove the inputmask
```javascript
View
2  build.properties
@@ -7,7 +7,7 @@ distdir = dist
build.major = 1
build.minor = 3
-build.revision = 4
+build.revision = 5
target = jquery.inputmask.bundle.js
target.min = jquery.inputmask.bundle.min.js
View
3  build.xml
@@ -14,7 +14,8 @@
<replaceregexp file="${srcdir}/jquery.inputmask.extensions.js" match="Version:.*" replace="Version: ${build.major}.${build.minor}.${build.revision}" byline="true"/>
<replaceregexp file="${srcdir}/jquery.inputmask.date.extensions.js" match="Version:.*" replace="Version: ${build.major}.${build.minor}.${build.revision}" byline="true"/>
<replaceregexp file="${srcdir}/jquery.inputmask.numeric.extensions.js" match="Version:.*" replace="Version: ${build.major}.${build.minor}.${build.revision}" byline="true"/>
- </target>
+ <replaceregexp file="./jquery.inputmask.jquery.json" match="&quot;version&quot;:.*" replace="&quot;version&quot;: &quot;${build.major}.${build.minor}.${build.revision}&quot;" byline="true"/>
+ </target>
<target name="resetVersions">
<replaceregexp file="nuget/jquery.inputmask.nuspec" match="&lt;version&gt;.*&lt;/version&gt;" replace="&lt;version&gt;0.0.0&lt;/version&gt;" />
View
BIN  dist/jQuery.InputMask.1.3.4.nupkg
Binary file not shown
View
BIN  dist/jQuery.InputMask.1.3.5.nupkg
Binary file not shown
View
20 dist/jquery.inputmask.bundle.js
@@ -3,7 +3,7 @@
* http://github.com/RobinHerbots/jquery.inputmask
* Copyright (c) 2010 - 2012 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 1.3.4
+* Version: 1.3.5
*/
(function ($) {
@@ -34,7 +34,7 @@
onKeyValidation: $.noop, //executes on every key-press with the result of isValid
//numeric basic properties
numericInput: false, //numericInput input direction style (input shifts to the left while holding the caret position)
- radixPoint: ".", // | ","
+ radixPoint: "", //".", // | ","
//numeric basic properties
definitions: {
'9': {
@@ -484,7 +484,7 @@
if (clearInvalid) {
writeBuffer(input, buffer);
}
- return isRTL ? (opts.numericInput ? ($.inArray(opts.radixPoint, buffer) != -1 && skipRadixHandling !== true ? $.inArray(opts.radixPoint, buffer) : seekNext(buffer, maskL)) : seekNext(buffer, rtlMatch)) : seekNext(buffer, lastMatch);
+ return isRTL ? (opts.numericInput ? (opts.radixPoint != "" && $.inArray(opts.radixPoint, buffer) != -1 && skipRadixHandling !== true ? $.inArray(opts.radixPoint, buffer) : seekNext(buffer, maskL)) : seekNext(buffer, rtlMatch)) : seekNext(buffer, lastMatch);
}
function escapeRegex(str) {
@@ -892,7 +892,7 @@
var input = this, k = e.keyCode, pos = caret(input);
//set input direction according the position to the radixPoint
- if (opts.numericInput) {
+ if (opts.numericInput && opts.radixPoint != "") {
var nptStr = input._valueGet();
var radixPosition = nptStr.indexOf(opts.radixPoint);
if (radixPosition != -1) {
@@ -917,9 +917,13 @@
beginPos = firstMaskPos;
}
if (beginPos >= firstMaskPos) {
+ console.log('before delete ' + buffer);
if (opts.numericInput && opts.greedy && k == opts.keyCode.DELETE && buffer[beginPos] == opts.radixPoint) {
beginPos = seekNext(buffer, beginPos);
isRTL = false;
+ } else if (opts.numericInput && opts.greedy && k == opts.keyCode.BACKSPACE && buffer[beginPos] == opts.radixPoint) {
+ beginPos--;
+ isRTL = true;
}
if (isRTL) {
beginPos = shiftR(firstMaskPos, beginPos, getPlaceHolder(beginPos), true);
@@ -1020,7 +1024,7 @@
} else writeOutBuffer = false;
} else setBufferElement(buffer, p, c);
if (writeOutBuffer) {
- writeBuffer(input, buffer, opts.numericInput ? seekNext(buffer, p) : p);
+ writeBuffer(input, buffer, opts.numericInput ? p + 1 : p);
setTimeout(function () { //timeout needed for IE
if (isComplete(input))
$input.trigger("complete");
@@ -1085,7 +1089,7 @@ Input Mask plugin extensions
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2013 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 1.3.4
+Version: 1.3.5
Optional extensions on the jquery.inputmask base
*/
@@ -1182,7 +1186,7 @@ Input Mask plugin extensions
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2012 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 1.3.4
+Version: 1.3.5
Optional extensions on the jquery.inputmask base
*/
@@ -1660,7 +1664,7 @@ Input Mask plugin extensions
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2012 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 1.3.4
+Version: 1.3.5
Optional extensions on the jquery.inputmask base
*/
View
106 dist/jquery.inputmask.bundle.min.js
@@ -3,60 +3,60 @@
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2012 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- Version: 1.3.4
+ Version: 1.3.5
*/
-(function(f){void 0==f.fn.inputmask&&(f.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},escapeChar:"\\",mask:null,oncomplete:f.noop,onincomplete:f.noop,oncleared:f.noop,repeat:0,greedy:!0,autoUnmask:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},onKeyUp:f.noop,onKeyDown:f.noop,showMaskOnHover:!0,onKeyValidation:f.noop,numericInput:!1,radixPoint:".",definitions:{9:{validator:"[0-9]",cardinality:1},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451]",cardinality:1},
+(function(e){void 0==e.fn.inputmask&&(e.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},escapeChar:"\\",mask:null,oncomplete:e.noop,onincomplete:e.noop,oncleared:e.noop,repeat:0,greedy:!0,autoUnmask:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},onKeyUp:e.noop,onKeyDown:e.noop,showMaskOnHover:!0,onKeyValidation:e.noop,numericInput:!1,radixPoint:"",definitions:{9:{validator:"[0-9]",cardinality:1},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451]",cardinality:1},
"*":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",cardinality:1}},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},ignorables:[9,13,19,27,33,34,35,36,37,38,39,40,45,46,
-93,112,113,114,115,116,117,118,119,120,121,122,123]},val:f.fn.val,escapeRegex:function(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","gim"),"\\$1")},getMaskLength:function(a,e,c){var d=a.length;!e&&1<c&&(d+=a.length*(c-1));return d}},f.fn.inputmask=function(a,e){function c(a,b){var d=g.aliases[a];return d?(d.alias&&c(d.alias),f.extend(!0,g,d),f.extend(!0,g,b),!0):!1}function d(){var a=!1,b=0,c=g.mask.toString();1==c.length&&!1==g.greedy&&(g.placeholder="");for(var c=
-f.map(c.split(""),function(c){var d=[];if(c==g.escapeChar)a=true;else if(c!=g.optionalmarker.start&&c!=g.optionalmarker.end||a){var e=g.definitions[c];if(e&&!a)for(c=0;c<e.cardinality;c++)d.push(u(b+c));else{d.push(c);a=false}b=b+d.length;return d}}),d=c.slice(),e=1;e<g.repeat&&g.greedy;e++)d=d.concat(c.slice());return d}function b(){var a=!1,b=!1,c=!1;return f.map(g.mask.toString().split(""),function(d){var e=[];if(d==g.escapeChar)b=!0;else if(d==g.optionalmarker.start&&!b)c=a=!0;else if(d==g.optionalmarker.end&&
-!b)a=!1,c=!0;else{var j=g.definitions[d];if(j&&!b){for(var f=j.prevalidator,l=f?f.length:0,k=1;k<j.cardinality;k++){var m=l>=k?f[k-1]:[],h=m.validator,m=m.cardinality;e.push({fn:h?"string"==typeof h?RegExp(h):new function(){this.test=h}:/./,cardinality:m?m:1,optionality:a,newBlockMarker:!0==a?c:!1,offset:0,casing:j.casing,def:d});!0==a&&(c=!1)}e.push({fn:j.validator?"string"==typeof j.validator?RegExp(j.validator):new function(){this.test=j.validator}:/./,cardinality:j.cardinality,optionality:a,newBlockMarker:c,
-offset:0,casing:j.casing,def:d})}else e.push({fn:null,cardinality:0,optionality:a,newBlockMarker:c,offset:0,casing:null,def:d}),b=!1;c=!1;return e}})}function j(a,b,c,d){var e=!1;if(0<=a&&a<q()){for(var j=a%m.length,f=b?1:0,l="",k=m[j].cardinality;k>f;k--)l+=x(c,j-(k-1));b&&(l+=b);e=null!=m[j].fn?m[j].fn.test(l,c,a,d,g):!1}setTimeout(function(){g.onKeyValidation.call(this,e,g)},0);return e}function l(a){a=m[a%m.length];return void 0!=a?a.fn:!1}function u(a){return g.placeholder.charAt(a%g.placeholder.length)}
-function q(){return f.inputmask.getMaskLength(k,g.greedy,g.repeat)}function z(a,b){var c=q();if(b>=c)return c;for(var d=b;++d<c&&!l(d););return d}function H(a,b){var c=b;if(0>=c)return 0;for(;0<--c&&!l(c););return c}function E(a,b,c){var d=m[b%m.length],e=c;if(void 0!=e)switch(d.casing){case "upper":e=c.toUpperCase();break;case "lower":e=c.toLowerCase()}a[b]=e}function x(a,b,c){c&&(b=O(a,b));return a[b]}function O(a,b,c){if(c)for(;0>b&&a.length<q();){c=k.length-1;for(b=k.length;void 0!==k[c];)a.unshift(k[c--])}else for(;void 0==
-a[b]&&a.length<q();)for(c=0;void 0!==k[c];)a.push(k[c++]);return b}function B(a,b,c){a._valueSet(b.join(""));void 0!=c&&(D?setTimeout(function(){p(a,c)},100):p(a,c))}function P(a,b,c){for(var d=q();b<c&&b<d;b++)E(a,b,x(k.slice(),b))}function G(a,b){E(a,b,x(k,b%m.length))}function s(a,b,c,d){var e=f(a).data("inputmask").isRTL,p=K(a._valueGet(),e).split("");if(e){var s=q(),w=p.reverse();w.length=s;for(var o=0;o<s;o++){var v=(s-(o+1))%m.length;null==m[v].fn&&w[o]!=x(k,v)?(w.splice(o,0,x(k,v)),w.length=
-s):w[o]=w[o]||x(k,v)}p=w.reverse()}P(b,0,b.length);b.length=k.length;for(var h=w=-1,C,s=q(),D=p.length,v=0==D?s:-1,o=0;o<D;o++)for(var t=h+1;t<s;t++)if(l(t)){var y=p[o];!1!==(C=j(t,y,b,!c))?(!0!==C&&(t=void 0!=C.pos?C.pos:t,y=void 0!=C.c?C.c:y),E(b,t,y),w=h=t):(G(b,t),y==u(t)&&(v=h=t));break}else if(G(b,t),w==h&&(w=t),h=t,p[o]==x(b,t))break;if(!1==g.greedy)for(o=K(b.join(""),e).split("");b.length!=o.length;)e?b.shift():b.pop();c&&B(a,b);return e?g.numericInput?-1!=f.inArray(g.radixPoint,b)&&!0!==
-d?f.inArray(g.radixPoint,b):z(b,s):z(b,v):z(b,w)}function L(a){return f.inputmask.escapeRegex.call(this,a)}function K(a,b){return b?a.replace(RegExp("^("+L(k.join(""))+")*"),""):a.replace(RegExp("("+L(k.join(""))+")*$"),"")}function R(a,b){s(a,b,!1);var c=b.slice();if(f(a).data("inputmask").isRTL)for(var d=0;d<=c.length-1;d++){var e=d%m.length;if(m[e].optionality)if(u(d)==b[d]||!l(d))c.splice(0,1);else break;else break}else for(d=c.length-1;0<=d;d--)if(e=d%m.length,m[e].optionality)if(u(d)==b[d]||
-!l(d))c.pop();else break;else break;B(a,c)}function I(a,b){var c=a[0];if(m&&(!0===b||!a.hasClass("hasDatepicker"))){var d=k.slice();s(c,d);return f.map(d,function(a,b){return l(b)&&a!=x(k.slice(),b)?a:null}).join("")}return c._valueGet()}function p(a,b,c){a=a.jquery&&0<a.length?a[0]:a;if("number"==typeof b){c="number"==typeof c?c:b;!1==g.insertMode&&b==c&&c++;if(a.setSelectionRange)a.setSelectionRange(b,c);else if(a.createTextRange){var d=a.createTextRange();d.collapse(!0);d.moveEnd("character",c);
-d.moveStart("character",b);d.select()}a.focus()}else{var e=D?d:null,d=null;null==e&&(a.setSelectionRange?(b=a.selectionStart,c=a.selectionEnd):document.selection&&document.selection.createRange&&(d=document.selection.createRange(),b=0-d.duplicate().moveStart("character",-1E5),c=b+d.text.length),e={begin:b,end:c});return e}}function M(a){for(var b=!0,a=a._valueGet(),c=a.length,d=0;d<c;d++)if(l(d)&&a.charAt(d)==u(d)){b=!1;break}return b}function J(a){function b(a){a=f._data(a).events;f.each(a,function(a,
-b){f.each(b,function(a,b){if("inputmask"==b.namespace){var c=b.handler;b.handler=function(){return this.readOnly||this.disabled?!1:c.apply(this,arguments)}}})})}function c(a){var b;Object.getOwnPropertyDescriptor&&(b=Object.getOwnPropertyDescriptor(a,"value"));if(b&&b.get)a._valueGet||(a._valueGet=b.get,a._valueSet=b.set,Object.defineProperty(a,"value",{get:function(){var a=f(this),b=f(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?
-this._valueGet():""},set:function(a){this._valueSet(a);f(this).triggerHandler("setvalue.inputmask")}}));else if(document.__lookupGetter__&&a.__lookupGetter__("value"))a._valueGet||(a._valueGet=a.__lookupGetter__("value"),a._valueSet=a.__lookupSetter__("value"),a.__defineGetter__("value",function(){var a=f(this),b=f(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?this._valueGet():""}),a.__defineSetter__("value",function(a){this._valueSet(a);
-f(this).triggerHandler("setvalue.inputmask")}));else if(a._valueGet||(a._valueGet=function(){return this.value},a._valueSet=function(a){this.value=a}),!0!=f.fn.val.inputmaskpatch)f.fn.val=function(){if(arguments.length==0){var a=f(this);if(a.data("inputmask")){if(a.data("inputmask").autoUnmask)return a.inputmask("unmaskedvalue");var b=f.inputmask.val.apply(a);return b!=a.data("inputmask")._buffer.join("")?b:""}return f.inputmask.val.apply(a)}var c=arguments;return this.each(function(){var a=f(this),
-b=f.inputmask.val.apply(a,c);a.data("inputmask")&&a.triggerHandler("setvalue.inputmask");return b})},f.extend(f.fn.val,{inputmaskpatch:!0})}function d(a,b,c){for(;!l(a)&&0<=a-1;)a--;for(var e=a;e<b&&e<q();e++)if(l(e)){G(h,e);var g=z(h,e),f=x(h,g);if(f!=u(g))if(g<q()&&!1!==j(e,f,h,!0)&&m[e%m.length].def==m[g%m.length].def)E(h,e,x(h,g)),G(h,g);else{if(l(e))break}else if(void 0==c)break}else G(h,e);void 0!=c&&E(h,A?b:H(h,b),c);h=K(h.join(""),A).split("");0==h.length&&(h=k.slice());return a}function e(a,
-b,c,d){for(;a<=b&&a<q();a++)if(l(a)){var g=x(h,a);E(h,a,c);if(g!=u(a))if(c=z(h,a),c<q())if(!1!==j(c,g,h,!0)&&m[a%m.length].def==m[c%m.length].def)c=g;else if(l(c))break;else c=g;else break;else if(!0!==d)break}else G(h,a);d=h.length;h=K(h.join(""),A).split("");0==h.length&&(h=k.slice());return b-(d-h.length)}function J(a){Q=!1;var b=this,c=a.keyCode,j=p(b);if(g.numericInput){var l=b._valueGet().indexOf(g.radixPoint);-1!=l&&(A=j.begin<=l||j.end<=l)}if(c==g.keyCode.BACKSPACE||c==g.keyCode.DELETE||T&&
-127==c){l=q();if(0==j.begin&&j.end==l)h=k.slice(),B(b,h),p(b,s(b,h,!1));else if(1<j.end-j.begin||1==j.end-j.begin&&g.insertMode)P(h,j.begin,j.end),B(b,h),p(A?s(b,h,!1):j.begin);else{var n=j.begin-(c==g.keyCode.DELETE?0:1);n<F&&c==g.keyCode.DELETE&&(n=F);n>=F&&(g.numericInput&&(g.greedy&&c==g.keyCode.DELETE&&h[n]==g.radixPoint)&&(n=z(h,n),A=!1),A?(n=e(F,n,u(n),!0),n=g.numericInput&&g.greedy&&c==g.keyCode.BACKSPACE&&h[n+1]==g.radixPoint?n+1:z(h,n)):n=d(n,l),B(b,h,n))}b._valueGet()==k.join("")&&f(b).trigger("cleared");
-a.preventDefault()}else c==g.keyCode.END||c==g.keyCode.PAGE_DOWN?setTimeout(function(){var c=s(b,h,!1,!0);!g.insertMode&&(c==q()&&!a.shiftKey)&&c--;p(b,a.shiftKey?j.begin:c,c)},0):c==g.keyCode.HOME||c==g.keyCode.PAGE_UP?p(b,0,a.shiftKey?j.begin:0):c==g.keyCode.ESCAPE?(b._valueSet(C),p(b,0,s(b,h))):c==g.keyCode.INSERT?(g.insertMode=!g.insertMode,p(b,!g.insertMode&&j.begin==q()?j.begin-1:j.begin)):a.ctrlKey&&88==c?setTimeout(function(){p(b,s(b,h,!0))},0):g.insertMode||(c==g.keyCode.RIGHT?(l=j.begin==
-j.end?j.end+1:j.end,l=l<q()?l:j.end,p(b,a.shiftKey?j.begin:l,a.shiftKey?l+1:l)):c==g.keyCode.LEFT&&(l=j.begin-1,l=0<l?l:0,p(b,l,a.shiftKey?j.end:l)));g.onKeyDown.call(this,a,g);t=-1!=f.inArray(c,g.ignorables)}function L(a){if(Q)return!1;Q=!0;var b=this,c=f(b),a=a||window.event,l=a.which||a.charCode||a.keyCode,k=String.fromCharCode(l);if(g.numericInput&&k==g.radixPoint){var n=b._valueGet().indexOf(g.radixPoint);p(b,z(h,-1!=n?n:q()))}if(a.ctrlKey||a.altKey||a.metaKey||t)return!0;if(l){c.trigger("input");
-var m=p(b),o=q(),l=!0;P(h,m.begin,m.end);if(A){var n=H(h,m.end),r;if(!1!==(r=j(n==o||x(h,n)==g.radixPoint?H(h,n):n,k,h,!1))){!0!==r&&(n=void 0!=r.pos?r.pos:n,k=void 0!=r.c?r.c:k);r=F;if(!0==g.insertMode){if(!0==g.greedy)for(var N=h.slice();x(N,r,!0)!=u(r)&&r<=n;)r=r==o?o+1:z(h,r);r<=n&&(g.greedy||h.length<o)?(h[F]!=u(F)&&h.length<o&&(o=O(h,-1,A),0!=m.end&&(n+=o),o=h.length),d(r,n,k)):l=!1}else E(h,n,k);l&&(B(b,h,g.numericInput?z(h,n):n),setTimeout(function(){M(b)&&c.trigger("complete")},0))}else D&&
-B(b,h,m.begin)}else if(n=z(h,m.begin-1),O(h,n,A),!1!==(r=j(n,k,h,!1))){!0!==r&&(n=void 0!=r.pos?r.pos:n,k=void 0!=r.c?r.c:k);if(!0==g.insertMode){m=q();for(N=h.slice();x(N,m,!0)!=u(m)&&m>=n;)m=0==m?-1:H(h,m);m>=n?e(n,h.length,k):l=!1}else E(h,n,k);l&&(k=z(h,n),B(b,h,k),setTimeout(function(){M(b)&&c.trigger("complete")},0))}else D&&B(b,h,m.begin);a.preventDefault()}}function w(a){var b=f(this),c=a.keyCode;g.onKeyUp.call(this,a,g);c==g.keyCode.TAB&&(b.hasClass("focus.inputmask")&&0==this._valueGet().length)&&
-(h=k.slice(),B(this,h),A||p(this,0),C=this._valueGet())}var o=f(a);if(o.is(":input")){g.greedy=g.greedy?g.greedy:0==g.repeat;var v=o.prop("maxLength");q()>v&&-1<v&&(v<k.length&&(k.length=v),!1==g.greedy&&(g.repeat=Math.round(v/k.length)),o.prop("maxLength",2*q()));o.data("inputmask",{tests:m,_buffer:k,greedy:g.greedy,repeat:g.repeat,autoUnmask:g.autoUnmask,definitions:g.definitions,isRTL:!1});c(a);var h=k.slice(),C=a._valueGet(),Q=!1,t=!1,y=-1,F=z(h,-1);H(h,q());var A=!1;if("rtl"==a.dir||g.numericInput)a.dir=
-"ltr",o.css("text-align","right"),o.removeAttr("dir"),v=o.data("inputmask"),v.isRTL=!0,o.data("inputmask",v),A=!0;o.unbind(".inputmask");o.removeClass("focus.inputmask");o.bind("mouseenter.inputmask",function(){if(!f(this).hasClass("focus.inputmask")&&g.showMaskOnHover){var a=this._valueGet().length;a<h.length&&(0==a&&(h=k.slice()),B(this,h))}}).bind("blur.inputmask",function(){var a=f(this),b=this._valueGet();a.removeClass("focus.inputmask");b!=C&&a.change();g.clearMaskOnLostFocus&&""!=b&&(b==k.join("")?
-this._valueSet(""):R(this,h));M(this)||(a.trigger("incomplete"),g.clearIncomplete&&(g.clearMaskOnLostFocus?this._valueSet(""):(h=k.slice(),B(this,h))))}).bind("focus.inputmask",function(){var a=f(this),b=this._valueGet();if(!a.hasClass("focus.inputmask")&&(!g.showMaskOnHover||g.showMaskOnHover&&""==b))b=b.length,b<h.length&&(0==b&&(h=k.slice()),p(this,s(this,h,!0)));a.addClass("focus.inputmask");C=this._valueGet()}).bind("mouseleave.inputmask",function(){var a=f(this);g.clearMaskOnLostFocus&&(a.hasClass("focus.inputmask")||
-(this._valueGet()==k.join("")||""==this._valueGet()?this._valueSet(""):R(this,h)))}).bind("click.inputmask",function(){var a=this;setTimeout(function(){var b=p(a);b.begin==b.end&&(b=b.begin,y=s(a,h,!1),A?p(a,b>y&&(!1!==j(b,h[b],h,!0)||!l(b))?b:y):p(a,b<y&&(!1!==j(b,h[b],h,!0)||!l(b))?b:y))},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){p(a,0,y)},0)}).bind("keydown.inputmask",J).bind("keypress.inputmask",L).bind("keyup.inputmask",w).bind(U+".inputmask dragdrop.inputmask drop.inputmask",
-function(){var a=this;setTimeout(function(){p(a,s(a,h,!0))},0)}).bind("setvalue.inputmask",function(){C=this._valueGet();s(this,h,!0);this._valueGet()==k.join("")&&this._valueSet("")}).bind("complete.inputmask",g.oncomplete).bind("incomplete.inputmask",g.onincomplete).bind("cleared.inputmask",g.oncleared);var y=s(a,h,!0),I;try{I=document.activeElement}catch(S){}I===a?(o.addClass("focus.inputmask"),p(a,y)):g.clearMaskOnLostFocus&&(a._valueGet()==k.join("")?a._valueSet(""):R(a,h));b(a)}}var g=f.extend(!0,
-{},f.inputmask.defaults,e),U=function(a){var b=document.createElement("input"),a="on"+a,c=a in b;c||(b.setAttribute(a,"return;"),c="function"==typeof b[a]);return c}("paste")?"paste":"input",T=null!=navigator.userAgent.match(/iphone/i),D=null!=navigator.userAgent.match(/android.*mobile safari.*/i);if(D)var S=navigator.userAgent.match(/mobile safari.*/i),D=533>=parseInt(RegExp(/[0-9]+/).exec(S));if("string"==typeof a)switch(a){case "mask":c(g.alias,e);var k=d(),m=b();return this.each(function(){J(this)});
-case "unmaskedvalue":return m=this.data("inputmask").tests,k=this.data("inputmask")._buffer,g.greedy=this.data("inputmask").greedy,g.repeat=this.data("inputmask").repeat,g.definitions=this.data("inputmask").definitions,I(this);case "remove":return this.each(function(){var a=f(this),b=this;setTimeout(function(){if(a.data("inputmask")){m=a.data("inputmask").tests;k=a.data("inputmask")._buffer;g.greedy=a.data("inputmask").greedy;g.repeat=a.data("inputmask").repeat;g.definitions=a.data("inputmask").definitions;
-b._valueSet(I(a,!0));a.removeData("inputmask");a.unbind(".inputmask");a.removeClass("focus.inputmask");var c;Object.getOwnPropertyDescriptor&&(c=Object.getOwnPropertyDescriptor(b,"value"));c&&c.get?b._valueGet&&Object.defineProperty(b,"value",{get:b._valueGet,set:b._valueSet}):document.__lookupGetter__&&b.__lookupGetter__("value")&&b._valueGet&&(b.__defineGetter__("value",b._valueGet),b.__defineSetter__("value",b._valueSet));delete b._valueGet;delete b._valueSet}},0)});case "getemptymask":return this.data("inputmask")?
-this.data("inputmask")._buffer.join(""):"";case "hasMaskedValue":return this.data("inputmask")?!this.data("inputmask").autoUnmask:!1;case "isComplete":return m=this.data("inputmask").tests,k=this.data("inputmask")._buffer,g.greedy=this.data("inputmask").greedy,g.repeat=this.data("inputmask").repeat,g.definitions=this.data("inputmask").definitions,M(this[0]);default:return c(a,e)||(g.mask=a),k=d(),m=b(),this.each(function(){J(this)})}else{if("object"==typeof a)return g=f.extend(!0,{},f.inputmask.defaults,
-a),c(g.alias,a),k=d(),m=b(),this.each(function(){J(this)});if(void 0==a)return this.each(function(){var a=f(this).attr("data-inputmask");if(a&&""!=a)try{var a=a.replace(RegExp("'","g"),'"'),b=f.parseJSON("{"+a+"}");g=f.extend(!0,{},f.inputmask.defaults,b);c(g.alias,b);g.alias=void 0;f(this).inputmask(g)}catch(d){}})}return this})})(jQuery);
-(function(f){f.extend(f.inputmask.defaults.definitions,{A:{validator:"[A-Za-z]",cardinality:1,casing:"upper"},"#":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",cardinality:1,casing:"upper"}});f.extend(f.inputmask.defaults.aliases,{url:{mask:"ir",placeholder:"",separator:"",defaultPrefix:"http://",regex:{urlpre1:/[fh]/,urlpre2:/(ft|ht)/,urlpre3:/(ftp|htt)/,urlpre4:/(ftp:|http|ftps)/,urlpre5:/(ftp:\/|ftps:|http:|https)/,urlpre6:/(ftp:\/\/|ftps:\/|http:\/|https:)/,urlpre7:/(ftp:\/\/|ftps:\/\/|http:\/\/|https:\/)/,
-urlpre8:/(ftp:\/\/|ftps:\/\/|http:\/\/|https:\/\/)/},definitions:{i:{validator:function(){return!0},cardinality:8,prevalidator:function(){for(var a=[],e=0;8>e;e++)a[e]=function(){var a=e;return{validator:function(d,b,e,f,u){if(u.regex["urlpre"+(a+1)]){var q=d;0<a+1-d.length&&(q=b.join("").substring(0,a+1-d.length)+""+q);d=u.regex["urlpre"+(a+1)].test(q);if(!f&&!d){e-=a;for(f=0;f<u.defaultPrefix.length;f++)b[e]=u.defaultPrefix[f],e++;for(f=0;f<q.length-1;f++)b[e]=q[f],e++;return{pos:e}}return d}return!1},
+93,112,113,114,115,116,117,118,119,120,121,122,123]},val:e.fn.val,escapeRegex:function(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","gim"),"\\$1")},getMaskLength:function(a,f,c){var d=a.length;!f&&1<c&&(d+=a.length*(c-1));return d}},e.fn.inputmask=function(a,f){function c(a,b){var d=g.aliases[a];return d?(d.alias&&c(d.alias),e.extend(!0,g,d),e.extend(!0,g,b),!0):!1}function d(){var a=!1,b=0,c=g.mask.toString();1==c.length&&!1==g.greedy&&(g.placeholder="");for(var c=
+e.map(c.split(""),function(c){var d=[];if(c==g.escapeChar)a=true;else if(c!=g.optionalmarker.start&&c!=g.optionalmarker.end||a){var f=g.definitions[c];if(f&&!a)for(c=0;c<f.cardinality;c++)d.push(u(b+c));else{d.push(c);a=false}b=b+d.length;return d}}),d=c.slice(),f=1;f<g.repeat&&g.greedy;f++)d=d.concat(c.slice());return d}function b(){var a=!1,b=!1,c=!1;return e.map(g.mask.toString().split(""),function(d){var f=[];if(d==g.escapeChar)b=!0;else if(d==g.optionalmarker.start&&!b)c=a=!0;else if(d==g.optionalmarker.end&&
+!b)a=!1,c=!0;else{var j=g.definitions[d];if(j&&!b){for(var e=j.prevalidator,l=e?e.length:0,k=1;k<j.cardinality;k++){var m=l>=k?e[k-1]:[],h=m.validator,m=m.cardinality;f.push({fn:h?"string"==typeof h?RegExp(h):new function(){this.test=h}:/./,cardinality:m?m:1,optionality:a,newBlockMarker:!0==a?c:!1,offset:0,casing:j.casing,def:d});!0==a&&(c=!1)}f.push({fn:j.validator?"string"==typeof j.validator?RegExp(j.validator):new function(){this.test=j.validator}:/./,cardinality:j.cardinality,optionality:a,newBlockMarker:c,
+offset:0,casing:j.casing,def:d})}else f.push({fn:null,cardinality:0,optionality:a,newBlockMarker:c,offset:0,casing:null,def:d}),b=!1;c=!1;return f}})}function j(a,b,c,d){var f=!1;if(0<=a&&a<q()){for(var j=a%m.length,e=b?1:0,l="",k=m[j].cardinality;k>e;k--)l+=x(c,j-(k-1));b&&(l+=b);f=null!=m[j].fn?m[j].fn.test(l,c,a,d,g):!1}setTimeout(function(){g.onKeyValidation.call(this,f,g)},0);return f}function l(a){a=m[a%m.length];return void 0!=a?a.fn:!1}function u(a){return g.placeholder.charAt(a%g.placeholder.length)}
+function q(){return e.inputmask.getMaskLength(k,g.greedy,g.repeat)}function A(a,b){var c=q();if(b>=c)return c;for(var d=b;++d<c&&!l(d););return d}function H(a,b){var c=b;if(0>=c)return 0;for(;0<--c&&!l(c););return c}function E(a,b,c){var d=m[b%m.length],g=c;if(void 0!=g)switch(d.casing){case "upper":g=c.toUpperCase();break;case "lower":g=c.toLowerCase()}a[b]=g}function x(a,b,c){c&&(b=O(a,b));return a[b]}function O(a,b,c){if(c)for(;0>b&&a.length<q();){c=k.length-1;for(b=k.length;void 0!==k[c];)a.unshift(k[c--])}else for(;void 0==
+a[b]&&a.length<q();)for(c=0;void 0!==k[c];)a.push(k[c++]);return b}function B(a,b,c){a._valueSet(b.join(""));void 0!=c&&(D?setTimeout(function(){p(a,c)},100):p(a,c))}function P(a,b,c){for(var d=q();b<c&&b<d;b++)E(a,b,x(k.slice(),b))}function G(a,b){E(a,b,x(k,b%m.length))}function s(a,b,c,d){var f=e(a).data("inputmask").isRTL,p=K(a._valueGet(),f).split("");if(f){var s=q(),w=p.reverse();w.length=s;for(var o=0;o<s;o++){var v=(s-(o+1))%m.length;null==m[v].fn&&w[o]!=x(k,v)?(w.splice(o,0,x(k,v)),w.length=
+s):w[o]=w[o]||x(k,v)}p=w.reverse()}P(b,0,b.length);b.length=k.length;for(var h=w=-1,C,s=q(),D=p.length,v=0==D?s:-1,o=0;o<D;o++)for(var t=h+1;t<s;t++)if(l(t)){var y=p[o];!1!==(C=j(t,y,b,!c))?(!0!==C&&(t=void 0!=C.pos?C.pos:t,y=void 0!=C.c?C.c:y),E(b,t,y),w=h=t):(G(b,t),y==u(t)&&(v=h=t));break}else if(G(b,t),w==h&&(w=t),h=t,p[o]==x(b,t))break;if(!1==g.greedy)for(o=K(b.join(""),f).split("");b.length!=o.length;)f?b.shift():b.pop();c&&B(a,b);return f?g.numericInput?""!=g.radixPoint&&-1!=e.inArray(g.radixPoint,
+b)&&!0!==d?e.inArray(g.radixPoint,b):A(b,s):A(b,v):A(b,w)}function L(a){return e.inputmask.escapeRegex.call(this,a)}function K(a,b){return b?a.replace(RegExp("^("+L(k.join(""))+")*"),""):a.replace(RegExp("("+L(k.join(""))+")*$"),"")}function R(a,b){s(a,b,!1);var c=b.slice();if(e(a).data("inputmask").isRTL)for(var d=0;d<=c.length-1;d++){var g=d%m.length;if(m[g].optionality)if(u(d)==b[d]||!l(d))c.splice(0,1);else break;else break}else for(d=c.length-1;0<=d;d--)if(g=d%m.length,m[g].optionality)if(u(d)==
+b[d]||!l(d))c.pop();else break;else break;B(a,c)}function I(a,b){var c=a[0];if(m&&(!0===b||!a.hasClass("hasDatepicker"))){var d=k.slice();s(c,d);return e.map(d,function(a,b){return l(b)&&a!=x(k.slice(),b)?a:null}).join("")}return c._valueGet()}function p(a,b,c){a=a.jquery&&0<a.length?a[0]:a;if("number"==typeof b){c="number"==typeof c?c:b;!1==g.insertMode&&b==c&&c++;if(a.setSelectionRange)a.setSelectionRange(b,c);else if(a.createTextRange){var d=a.createTextRange();d.collapse(!0);d.moveEnd("character",
+c);d.moveStart("character",b);d.select()}a.focus()}else{var f=D?d:null,d=null;null==f&&(a.setSelectionRange?(b=a.selectionStart,c=a.selectionEnd):document.selection&&document.selection.createRange&&(d=document.selection.createRange(),b=0-d.duplicate().moveStart("character",-1E5),c=b+d.text.length),f={begin:b,end:c});return f}}function M(a){for(var b=!0,a=a._valueGet(),c=a.length,d=0;d<c;d++)if(l(d)&&a.charAt(d)==u(d)){b=!1;break}return b}function J(a){function b(a){a=e._data(a).events;e.each(a,function(a,
+b){e.each(b,function(a,b){if("inputmask"==b.namespace){var c=b.handler;b.handler=function(){return this.readOnly||this.disabled?!1:c.apply(this,arguments)}}})})}function c(a){var b;Object.getOwnPropertyDescriptor&&(b=Object.getOwnPropertyDescriptor(a,"value"));if(b&&b.get)a._valueGet||(a._valueGet=b.get,a._valueSet=b.set,Object.defineProperty(a,"value",{get:function(){var a=e(this),b=e(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?
+this._valueGet():""},set:function(a){this._valueSet(a);e(this).triggerHandler("setvalue.inputmask")}}));else if(document.__lookupGetter__&&a.__lookupGetter__("value"))a._valueGet||(a._valueGet=a.__lookupGetter__("value"),a._valueSet=a.__lookupSetter__("value"),a.__defineGetter__("value",function(){var a=e(this),b=e(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?this._valueGet():""}),a.__defineSetter__("value",function(a){this._valueSet(a);
+e(this).triggerHandler("setvalue.inputmask")}));else if(a._valueGet||(a._valueGet=function(){return this.value},a._valueSet=function(a){this.value=a}),!0!=e.fn.val.inputmaskpatch)e.fn.val=function(){if(arguments.length==0){var a=e(this);if(a.data("inputmask")){if(a.data("inputmask").autoUnmask)return a.inputmask("unmaskedvalue");var b=e.inputmask.val.apply(a);return b!=a.data("inputmask")._buffer.join("")?b:""}return e.inputmask.val.apply(a)}var c=arguments;return this.each(function(){var a=e(this),
+b=e.inputmask.val.apply(a,c);a.data("inputmask")&&a.triggerHandler("setvalue.inputmask");return b})},e.extend(e.fn.val,{inputmaskpatch:!0})}function d(a,b,c){for(;!l(a)&&0<=a-1;)a--;for(var f=a;f<b&&f<q();f++)if(l(f)){G(h,f);var g=A(h,f),e=x(h,g);if(e!=u(g))if(g<q()&&!1!==j(f,e,h,!0)&&m[f%m.length].def==m[g%m.length].def)E(h,f,x(h,g)),G(h,g);else{if(l(f))break}else if(void 0==c)break}else G(h,f);void 0!=c&&E(h,z?b:H(h,b),c);h=K(h.join(""),z).split("");0==h.length&&(h=k.slice());return a}function f(a,
+b,c,d){for(;a<=b&&a<q();a++)if(l(a)){var g=x(h,a);E(h,a,c);if(g!=u(a))if(c=A(h,a),c<q())if(!1!==j(c,g,h,!0)&&m[a%m.length].def==m[c%m.length].def)c=g;else if(l(c))break;else c=g;else break;else if(!0!==d)break}else G(h,a);d=h.length;h=K(h.join(""),z).split("");0==h.length&&(h=k.slice());return b-(d-h.length)}function J(a){Q=!1;var b=this,c=a.keyCode,j=p(b);if(g.numericInput&&""!=g.radixPoint){var l=b._valueGet().indexOf(g.radixPoint);-1!=l&&(z=j.begin<=l||j.end<=l)}if(c==g.keyCode.BACKSPACE||c==g.keyCode.DELETE||
+T&&127==c){l=q();if(0==j.begin&&j.end==l)h=k.slice(),B(b,h),p(b,s(b,h,!1));else if(1<j.end-j.begin||1==j.end-j.begin&&g.insertMode)P(h,j.begin,j.end),B(b,h),p(z?s(b,h,!1):j.begin);else{var n=j.begin-(c==g.keyCode.DELETE?0:1);n<F&&c==g.keyCode.DELETE&&(n=F);n>=F&&(console.log("before delete "+h),g.numericInput&&g.greedy&&c==g.keyCode.DELETE&&h[n]==g.radixPoint?(n=A(h,n),z=!1):g.numericInput&&(g.greedy&&c==g.keyCode.BACKSPACE&&h[n]==g.radixPoint)&&(n--,z=!0),z?(n=f(F,n,u(n),!0),n=g.numericInput&&g.greedy&&
+c==g.keyCode.BACKSPACE&&h[n+1]==g.radixPoint?n+1:A(h,n)):n=d(n,l),B(b,h,n))}b._valueGet()==k.join("")&&e(b).trigger("cleared");a.preventDefault()}else c==g.keyCode.END||c==g.keyCode.PAGE_DOWN?setTimeout(function(){var c=s(b,h,!1,!0);!g.insertMode&&(c==q()&&!a.shiftKey)&&c--;p(b,a.shiftKey?j.begin:c,c)},0):c==g.keyCode.HOME||c==g.keyCode.PAGE_UP?p(b,0,a.shiftKey?j.begin:0):c==g.keyCode.ESCAPE?(b._valueSet(C),p(b,0,s(b,h))):c==g.keyCode.INSERT?(g.insertMode=!g.insertMode,p(b,!g.insertMode&&j.begin==
+q()?j.begin-1:j.begin)):a.ctrlKey&&88==c?setTimeout(function(){p(b,s(b,h,!0))},0):g.insertMode||(c==g.keyCode.RIGHT?(l=j.begin==j.end?j.end+1:j.end,l=l<q()?l:j.end,p(b,a.shiftKey?j.begin:l,a.shiftKey?l+1:l)):c==g.keyCode.LEFT&&(l=j.begin-1,l=0<l?l:0,p(b,l,a.shiftKey?j.end:l)));g.onKeyDown.call(this,a,g);t=-1!=e.inArray(c,g.ignorables)}function L(a){if(Q)return!1;Q=!0;var b=this,c=e(b),a=a||window.event,l=a.which||a.charCode||a.keyCode,k=String.fromCharCode(l);if(g.numericInput&&k==g.radixPoint){var n=
+b._valueGet().indexOf(g.radixPoint);p(b,A(h,-1!=n?n:q()))}if(a.ctrlKey||a.altKey||a.metaKey||t)return!0;if(l){c.trigger("input");var m=p(b),o=q(),l=!0;P(h,m.begin,m.end);if(z){var n=H(h,m.end),r;if(!1!==(r=j(n==o||x(h,n)==g.radixPoint?H(h,n):n,k,h,!1))){!0!==r&&(n=void 0!=r.pos?r.pos:n,k=void 0!=r.c?r.c:k);r=F;if(!0==g.insertMode){if(!0==g.greedy)for(var N=h.slice();x(N,r,!0)!=u(r)&&r<=n;)r=r==o?o+1:A(h,r);r<=n&&(g.greedy||h.length<o)?(h[F]!=u(F)&&h.length<o&&(o=O(h,-1,z),0!=m.end&&(n+=o),o=h.length),
+d(r,n,k)):l=!1}else E(h,n,k);l&&(B(b,h,g.numericInput?n+1:n),setTimeout(function(){M(b)&&c.trigger("complete")},0))}else D&&B(b,h,m.begin)}else if(n=A(h,m.begin-1),O(h,n,z),!1!==(r=j(n,k,h,!1))){!0!==r&&(n=void 0!=r.pos?r.pos:n,k=void 0!=r.c?r.c:k);if(!0==g.insertMode){m=q();for(N=h.slice();x(N,m,!0)!=u(m)&&m>=n;)m=0==m?-1:H(h,m);m>=n?f(n,h.length,k):l=!1}else E(h,n,k);l&&(k=A(h,n),B(b,h,k),setTimeout(function(){M(b)&&c.trigger("complete")},0))}else D&&B(b,h,m.begin);a.preventDefault()}}function w(a){var b=
+e(this),c=a.keyCode;g.onKeyUp.call(this,a,g);c==g.keyCode.TAB&&(b.hasClass("focus.inputmask")&&0==this._valueGet().length)&&(h=k.slice(),B(this,h),z||p(this,0),C=this._valueGet())}var o=e(a);if(o.is(":input")){g.greedy=g.greedy?g.greedy:0==g.repeat;var v=o.prop("maxLength");q()>v&&-1<v&&(v<k.length&&(k.length=v),!1==g.greedy&&(g.repeat=Math.round(v/k.length)),o.prop("maxLength",2*q()));o.data("inputmask",{tests:m,_buffer:k,greedy:g.greedy,repeat:g.repeat,autoUnmask:g.autoUnmask,definitions:g.definitions,
+isRTL:!1});c(a);var h=k.slice(),C=a._valueGet(),Q=!1,t=!1,y=-1,F=A(h,-1);H(h,q());var z=!1;if("rtl"==a.dir||g.numericInput)a.dir="ltr",o.css("text-align","right"),o.removeAttr("dir"),v=o.data("inputmask"),v.isRTL=!0,o.data("inputmask",v),z=!0;o.unbind(".inputmask");o.removeClass("focus.inputmask");o.bind("mouseenter.inputmask",function(){if(!e(this).hasClass("focus.inputmask")&&g.showMaskOnHover){var a=this._valueGet().length;a<h.length&&(0==a&&(h=k.slice()),B(this,h))}}).bind("blur.inputmask",function(){var a=
+e(this),b=this._valueGet();a.removeClass("focus.inputmask");b!=C&&a.change();g.clearMaskOnLostFocus&&""!=b&&(b==k.join("")?this._valueSet(""):R(this,h));M(this)||(a.trigger("incomplete"),g.clearIncomplete&&(g.clearMaskOnLostFocus?this._valueSet(""):(h=k.slice(),B(this,h))))}).bind("focus.inputmask",function(){var a=e(this),b=this._valueGet();if(!a.hasClass("focus.inputmask")&&(!g.showMaskOnHover||g.showMaskOnHover&&""==b))b=b.length,b<h.length&&(0==b&&(h=k.slice()),p(this,s(this,h,!0)));a.addClass("focus.inputmask");
+C=this._valueGet()}).bind("mouseleave.inputmask",function(){var a=e(this);g.clearMaskOnLostFocus&&(a.hasClass("focus.inputmask")||(this._valueGet()==k.join("")||""==this._valueGet()?this._valueSet(""):R(this,h)))}).bind("click.inputmask",function(){var a=this;setTimeout(function(){var b=p(a);b.begin==b.end&&(b=b.begin,y=s(a,h,!1),z?p(a,b>y&&(!1!==j(b,h[b],h,!0)||!l(b))?b:y):p(a,b<y&&(!1!==j(b,h[b],h,!0)||!l(b))?b:y))},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){p(a,
+0,y)},0)}).bind("keydown.inputmask",J).bind("keypress.inputmask",L).bind("keyup.inputmask",w).bind(U+".inputmask dragdrop.inputmask drop.inputmask",function(){var a=this;setTimeout(function(){p(a,s(a,h,!0))},0)}).bind("setvalue.inputmask",function(){C=this._valueGet();s(this,h,!0);this._valueGet()==k.join("")&&this._valueSet("")}).bind("complete.inputmask",g.oncomplete).bind("incomplete.inputmask",g.onincomplete).bind("cleared.inputmask",g.oncleared);var y=s(a,h,!0),I;try{I=document.activeElement}catch(S){}I===
+a?(o.addClass("focus.inputmask"),p(a,y)):g.clearMaskOnLostFocus&&(a._valueGet()==k.join("")?a._valueSet(""):R(a,h));b(a)}}var g=e.extend(!0,{},e.inputmask.defaults,f),U=function(a){var b=document.createElement("input"),a="on"+a,c=a in b;c||(b.setAttribute(a,"return;"),c="function"==typeof b[a]);return c}("paste")?"paste":"input",T=null!=navigator.userAgent.match(/iphone/i),D=null!=navigator.userAgent.match(/android.*mobile safari.*/i);if(D)var S=navigator.userAgent.match(/mobile safari.*/i),D=533>=
+parseInt(RegExp(/[0-9]+/).exec(S));if("string"==typeof a)switch(a){case "mask":c(g.alias,f);var k=d(),m=b();return this.each(function(){J(this)});case "unmaskedvalue":return m=this.data("inputmask").tests,k=this.data("inputmask")._buffer,g.greedy=this.data("inputmask").greedy,g.repeat=this.data("inputmask").repeat,g.definitions=this.data("inputmask").definitions,I(this);case "remove":return this.each(function(){var a=e(this),b=this;setTimeout(function(){if(a.data("inputmask")){m=a.data("inputmask").tests;
+k=a.data("inputmask")._buffer;g.greedy=a.data("inputmask").greedy;g.repeat=a.data("inputmask").repeat;g.definitions=a.data("inputmask").definitions;b._valueSet(I(a,!0));a.removeData("inputmask");a.unbind(".inputmask");a.removeClass("focus.inputmask");var c;Object.getOwnPropertyDescriptor&&(c=Object.getOwnPropertyDescriptor(b,"value"));c&&c.get?b._valueGet&&Object.defineProperty(b,"value",{get:b._valueGet,set:b._valueSet}):document.__lookupGetter__&&b.__lookupGetter__("value")&&b._valueGet&&(b.__defineGetter__("value",
+b._valueGet),b.__defineSetter__("value",b._valueSet));delete b._valueGet;delete b._valueSet}},0)});case "getemptymask":return this.data("inputmask")?this.data("inputmask")._buffer.join(""):"";case "hasMaskedValue":return this.data("inputmask")?!this.data("inputmask").autoUnmask:!1;case "isComplete":return m=this.data("inputmask").tests,k=this.data("inputmask")._buffer,g.greedy=this.data("inputmask").greedy,g.repeat=this.data("inputmask").repeat,g.definitions=this.data("inputmask").definitions,M(this[0]);
+default:return c(a,f)||(g.mask=a),k=d(),m=b(),this.each(function(){J(this)})}else{if("object"==typeof a)return g=e.extend(!0,{},e.inputmask.defaults,a),c(g.alias,a),k=d(),m=b(),this.each(function(){J(this)});if(void 0==a)return this.each(function(){var a=e(this).attr("data-inputmask");if(a&&""!=a)try{var a=a.replace(RegExp("'","g"),'"'),b=e.parseJSON("{"+a+"}");g=e.extend(!0,{},e.inputmask.defaults,b);c(g.alias,b);g.alias=void 0;e(this).inputmask(g)}catch(d){}})}return this})})(jQuery);
+(function(e){e.extend(e.inputmask.defaults.definitions,{A:{validator:"[A-Za-z]",cardinality:1,casing:"upper"},"#":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",cardinality:1,casing:"upper"}});e.extend(e.inputmask.defaults.aliases,{url:{mask:"ir",placeholder:"",separator:"",defaultPrefix:"http://",regex:{urlpre1:/[fh]/,urlpre2:/(ft|ht)/,urlpre3:/(ftp|htt)/,urlpre4:/(ftp:|http|ftps)/,urlpre5:/(ftp:\/|ftps:|http:|https)/,urlpre6:/(ftp:\/\/|ftps:\/|http:\/|https:)/,urlpre7:/(ftp:\/\/|ftps:\/\/|http:\/\/|https:\/)/,
+urlpre8:/(ftp:\/\/|ftps:\/\/|http:\/\/|https:\/\/)/},definitions:{i:{validator:function(){return!0},cardinality:8,prevalidator:function(){for(var a=[],f=0;8>f;f++)a[f]=function(){var a=f;return{validator:function(d,b,f,e,u){if(u.regex["urlpre"+(a+1)]){var q=d;0<a+1-d.length&&(q=b.join("").substring(0,a+1-d.length)+""+q);d=u.regex["urlpre"+(a+1)].test(q);if(!e&&!d){f-=a;for(e=0;e<u.defaultPrefix.length;e++)b[f]=u.defaultPrefix[e],f++;for(e=0;e<q.length-1;e++)b[f]=q[e],f++;return{pos:f}}return d}return!1},
cardinality:a}}();return a}()}},insertMode:!1,autoUnmask:!1},ip:{mask:"i.i.i.i",definitions:{i:{validator:"25[0-5]|2[0-4][0-9]|[01][0-9][0-9]",cardinality:3,prevalidator:[{validator:"[0-2]",cardinality:1},{validator:"2[0-5]|[01][0-9]",cardinality:2}]}}}})})(jQuery);
-(function(f){f.extend(f.inputmask.defaults.definitions,{h:{validator:"[01][0-9]|2[0-3]",cardinality:2,prevalidator:[{validator:"[0-2]",cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:"[0-5]",cardinality:1}]},d:{validator:"0[1-9]|[12][0-9]|3[01]",cardinality:2,prevalidator:[{validator:"[0-3]",cardinality:1}]},m:{validator:"0[1-9]|1[012]",cardinality:2,prevalidator:[{validator:"[01]",cardinality:1}]},y:{validator:"(19|20)\\d{2}",cardinality:4,prevalidator:[{validator:"[12]",
-cardinality:1},{validator:"(19|20)",cardinality:2},{validator:"(19|20)\\d",cardinality:3}]}});f.extend(f.inputmask.defaults.aliases,{"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:/[0-3]/,val1:/0[1-9]|[12][0-9]|3[01]/,val2pre:function(a){a=f.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|[12][0-9]|3[01])"+a+"[01])")},val2:function(a){a=f.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|[12][0-9])"+a+"(0[1-9]|1[012]))|(30"+a+"(0[13-9]|1[012]))|(31"+a+"(0[13578]|1[02]))")}},
-leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,e,c){var d=parseInt(a.concat(e.toString().slice(a.length))),a=parseInt(a.concat(c.toString().slice(a.length)));return(NaN!=d?e<=d&&d<=c:!1)||(NaN!=a?e<=a&&a<=c:!1)},determinebaseyear:function(a,e){var c=(new Date).getFullYear();return a>c?a:e<c?e:c},onKeyUp:function(a,e){var c=f(this);if(a.ctrlKey&&a.keyCode==e.keyCode.RIGHT){var d=new Date;c.val(d.getDate().toString()+(d.getMonth()+1).toString()+d.getFullYear().toString())}},
-definitions:{1:{validator:function(a,e,c,d,b){var j=b.regex.val1.test(a);if(!d&&!j&&(a.charAt(1)==b.separator||-1!="-./".indexOf(a.charAt(1))))if(j=b.regex.val1.test("0"+a.charAt(0)))return e[c-1]="0",{pos:c,c:a.charAt(0)};return j},cardinality:2,prevalidator:[{validator:function(a,e,c,d,b){var j=b.regex.val1pre.test(a);return!d&&!j&&(j=b.regex.val1.test("0"+a))?(e[c]="0",c++,{pos:c}):j},cardinality:1}]},2:{validator:function(a,e,c,d,b){var j=e.join("").substr(0,3),f=b.regex.val2(b.separator).test(j+
-a);if(!d&&!f&&(a.charAt(1)==b.separator||-1!="-./".indexOf(a.charAt(1))))if(f=b.regex.val2(b.separator).test(j+"0"+a.charAt(0)))return e[c-1]="0",{pos:c,c:a.charAt(0)};return f},cardinality:2,prevalidator:[{validator:function(a,e,c,d,b){var j=e.join("").substr(0,3),f=b.regex.val2pre(b.separator).test(j+a);return!d&&!f&&(f=b.regex.val2(b.separator).test(j+"0"+a))?(e[c]="0",c++,{pos:c}):f},cardinality:1}]},y:{validator:function(a,e,c,d,b){if(b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)){if(e.join("").substr(0,
-6)!=b.leapday)return!0;a=parseInt(a,10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return!1},cardinality:4,prevalidator:[{validator:function(a,e,c,d,b){var j=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!d&&!j){d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,1);if(j=b.isInYearRange(d+a,b.yearrange.minyear,b.yearrange.maxyear))return e[c++]=d[0],{pos:c};d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,2);if(j=b.isInYearRange(d+
-a,b.yearrange.minyear,b.yearrange.maxyear))return e[c++]=d[0],e[c++]=d[1],{pos:c}}return j},cardinality:1},{validator:function(a,e,c,d,b){var j=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!d&&!j){d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,2);if(j=b.isInYearRange(d+a[1],b.yearrange.minyear,b.yearrange.maxyear))return e[c++]=d[1],{pos:c};d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,2);b.isInYearRange(d+a,b.yearrange.minyear,
-b.yearrange.maxyear)?e.join("").substr(0,6)!=b.leapday?j=!0:(b=parseInt(a,10),j=0===b%4?0===b%100?0===b%400?!0:!1:!0:!1):j=!1;if(j)return e[c-1]=d[0],e[c++]=d[1],e[c++]=a[0],{pos:c}}return j},cardinality:2},{validator:function(a,e,c,d,b){return b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(a){a=f.inputmask.escapeRegex.call(this,a);return RegExp("((0[13-9]|1[012])"+
-a+"[0-3])|(02"+a+"[0-2])")},val2:function(a){a=f.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|1[012])"+a+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+a+"30)|((0[13578]|1[02])"+a+"31)")},val1pre:/[01]/,val1:/0[1-9]|1[012]/},leapday:"02/29/",onKeyUp:function(a,e){var c=f(this);if(a.ctrlKey&&a.keyCode==e.keyCode.RIGHT){var d=new Date;c.val((d.getMonth()+1).toString()+d.getDate().toString()+d.getFullYear().toString())}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",
-leapday:"/02/29",onKeyUp:function(a,e){var c=f(this);if(a.ctrlKey&&a.keyCode==e.keyCode.RIGHT){var d=new Date;c.val(d.getFullYear().toString()+(d.getMonth()+1).toString()+d.getDate().toString())}},definitions:{2:{validator:function(a,e,c,d,b){var j=e.join("").substr(5,3),f=b.regex.val2(b.separator).test(j+a);if(!d&&!f&&(a.charAt(1)==b.separator||-1!="-./".indexOf(a.charAt(1))))if(f=b.regex.val2(b.separator).test(j+"0"+a.charAt(0)))return e[c-1]="0",{pos:c,c:a.charAt(0)};if(f){if(e.join("").substr(4,
-4)+a!=b.leapday)return!0;a=parseInt(e.join("").substr(0,4),10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return f},cardinality:2,prevalidator:[{validator:function(a,e,c,d,b){var j=e.join("").substr(5,3),f=b.regex.val2pre(b.separator).test(j+a);return!d&&!f&&(f=b.regex.val2(b.separator).test(j+"0"+a))?(e[c]="0",c++,{pos:c}):f},cardinality:1}]}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",
+(function(e){e.extend(e.inputmask.defaults.definitions,{h:{validator:"[01][0-9]|2[0-3]",cardinality:2,prevalidator:[{validator:"[0-2]",cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:"[0-5]",cardinality:1}]},d:{validator:"0[1-9]|[12][0-9]|3[01]",cardinality:2,prevalidator:[{validator:"[0-3]",cardinality:1}]},m:{validator:"0[1-9]|1[012]",cardinality:2,prevalidator:[{validator:"[01]",cardinality:1}]},y:{validator:"(19|20)\\d{2}",cardinality:4,prevalidator:[{validator:"[12]",
+cardinality:1},{validator:"(19|20)",cardinality:2},{validator:"(19|20)\\d",cardinality:3}]}});e.extend(e.inputmask.defaults.aliases,{"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:/[0-3]/,val1:/0[1-9]|[12][0-9]|3[01]/,val2pre:function(a){a=e.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|[12][0-9]|3[01])"+a+"[01])")},val2:function(a){a=e.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|[12][0-9])"+a+"(0[1-9]|1[012]))|(30"+a+"(0[13-9]|1[012]))|(31"+a+"(0[13578]|1[02]))")}},
+leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,f,c){var d=parseInt(a.concat(f.toString().slice(a.length))),a=parseInt(a.concat(c.toString().slice(a.length)));return(NaN!=d?f<=d&&d<=c:!1)||(NaN!=a?f<=a&&a<=c:!1)},determinebaseyear:function(a,f){var c=(new Date).getFullYear();return a>c?a:f<c?f:c},onKeyUp:function(a,f){var c=e(this);if(a.ctrlKey&&a.keyCode==f.keyCode.RIGHT){var d=new Date;c.val(d.getDate().toString()+(d.getMonth()+1).toString()+d.getFullYear().toString())}},
+definitions:{1:{validator:function(a,f,c,d,b){var j=b.regex.val1.test(a);if(!d&&!j&&(a.charAt(1)==b.separator||-1!="-./".indexOf(a.charAt(1))))if(j=b.regex.val1.test("0"+a.charAt(0)))return f[c-1]="0",{pos:c,c:a.charAt(0)};return j},cardinality:2,prevalidator:[{validator:function(a,f,c,d,b){var j=b.regex.val1pre.test(a);return!d&&!j&&(j=b.regex.val1.test("0"+a))?(f[c]="0",c++,{pos:c}):j},cardinality:1}]},2:{validator:function(a,f,c,d,b){var j=f.join("").substr(0,3),e=b.regex.val2(b.separator).test(j+
+a);if(!d&&!e&&(a.charAt(1)==b.separator||-1!="-./".indexOf(a.charAt(1))))if(e=b.regex.val2(b.separator).test(j+"0"+a.charAt(0)))return f[c-1]="0",{pos:c,c:a.charAt(0)};return e},cardinality:2,prevalidator:[{validator:function(a,f,c,d,b){var j=f.join("").substr(0,3),e=b.regex.val2pre(b.separator).test(j+a);return!d&&!e&&(e=b.regex.val2(b.separator).test(j+"0"+a))?(f[c]="0",c++,{pos:c}):e},cardinality:1}]},y:{validator:function(a,f,c,d,b){if(b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)){if(f.join("").substr(0,
+6)!=b.leapday)return!0;a=parseInt(a,10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return!1},cardinality:4,prevalidator:[{validator:function(a,f,c,d,b){var j=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!d&&!j){d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,1);if(j=b.isInYearRange(d+a,b.yearrange.minyear,b.yearrange.maxyear))return f[c++]=d[0],{pos:c};d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,2);if(j=b.isInYearRange(d+
+a,b.yearrange.minyear,b.yearrange.maxyear))return f[c++]=d[0],f[c++]=d[1],{pos:c}}return j},cardinality:1},{validator:function(a,f,c,d,b){var j=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!d&&!j){d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,2);if(j=b.isInYearRange(d+a[1],b.yearrange.minyear,b.yearrange.maxyear))return f[c++]=d[1],{pos:c};d=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear).toString().slice(0,2);b.isInYearRange(d+a,b.yearrange.minyear,
+b.yearrange.maxyear)?f.join("").substr(0,6)!=b.leapday?j=!0:(b=parseInt(a,10),j=0===b%4?0===b%100?0===b%400?!0:!1:!0:!1):j=!1;if(j)return f[c-1]=d[0],f[c++]=d[1],f[c++]=a[0],{pos:c}}return j},cardinality:2},{validator:function(a,f,c,d,b){return b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(a){a=e.inputmask.escapeRegex.call(this,a);return RegExp("((0[13-9]|1[012])"+
+a+"[0-3])|(02"+a+"[0-2])")},val2:function(a){a=e.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|1[012])"+a+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+a+"30)|((0[13578]|1[02])"+a+"31)")},val1pre:/[01]/,val1:/0[1-9]|1[012]/},leapday:"02/29/",onKeyUp:function(a,f){var c=e(this);if(a.ctrlKey&&a.keyCode==f.keyCode.RIGHT){var d=new Date;c.val((d.getMonth()+1).toString()+d.getDate().toString()+d.getFullYear().toString())}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",
+leapday:"/02/29",onKeyUp:function(a,f){var c=e(this);if(a.ctrlKey&&a.keyCode==f.keyCode.RIGHT){var d=new Date;c.val(d.getFullYear().toString()+(d.getMonth()+1).toString()+d.getDate().toString())}},definitions:{2:{validator:function(a,f,c,d,b){var j=f.join("").substr(5,3),e=b.regex.val2(b.separator).test(j+a);if(!d&&!e&&(a.charAt(1)==b.separator||-1!="-./".indexOf(a.charAt(1))))if(e=b.regex.val2(b.separator).test(j+"0"+a.charAt(0)))return f[c-1]="0",{pos:c,c:a.charAt(0)};if(e){if(f.join("").substr(4,
+4)+a!=b.leapday)return!0;a=parseInt(f.join("").substr(0,4),10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return e},cardinality:2,prevalidator:[{validator:function(a,f,c,d,b){var j=f.join("").substr(5,3),e=b.regex.val2pre(b.separator).test(j+a);return!d&&!e&&(e=b.regex.val2(b.separator).test(j+"0"+a))?(f[c]="0",c++,{pos:c}):e},cardinality:1}]}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",
leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",
-alias:"dd/mm/yyyy",regex:{hrspre:/[012]/,hrs24:/2[0-9]|1[3-9]/,hrs:/[01][0-9]|2[0-3]/,ampmpre:/[apAP]/,ampm:/^[a|p|A|P][m|M]/},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,e,c,d,b){var f=b.regex.hrs.test(a);if(!d&&!f&&(a.charAt(1)==b.timeseparator||-1!="-.:".indexOf(a.charAt(1))))if(f=b.regex.hrs.test("0"+a.charAt(0)))return e[c-1]="0",e[c]=a.charAt(0),c++,{pos:c};return f&&"24"!==b.hourFormat&&b.regex.hrs24.test(a)?(a=parseInt(a,10),e[c+5]=24==a?"a":"p",e[c+6]="m",a-=12,
-10>a?(e[c]=a.toString(),e[c-1]="0"):(e[c]=a.toString().charAt(1),e[c-1]=a.toString().charAt(0)),{pos:c,c:e[c]}):f},cardinality:2,prevalidator:[{validator:function(a,e,c,d,b){var f=b.regex.hrspre.test(a);return!d&&!f&&(f=b.regex.hrs.test("0"+a))?(e[c]="0",c++,{pos:c}):f},cardinality:1}]},t:{validator:function(a,e,c,d,b){var f=b.regex.ampm.test(a);return!d&&!f&&(f=b.regex.ampm.test(a+"m"))?(e[c-1]=a.charAt(0),e[c]="m",c++,c):f},casing:"lower",cardinality:2,prevalidator:[{validator:function(a,e,c,d,
-b){if(d=b.regex.ampmpre.test(a))if(d=b.regex.ampm.test(a+"m"))return e[c]=a,e[c+1]="m",c;return d},cardinality:1}]}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm t":{mask:"h:s t",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",autoUnmask:!1},"hh:mm":{mask:"h:s",autoUnmask:!1},date:{alias:"dd/mm/yyyy"}})})(jQuery);
-(function(f){f.extend(f.inputmask.defaults.aliases,{decimal:{mask:"~",placeholder:"",repeat:10,greedy:!1,numericInput:!0,digits:"*",groupSeparator:",",groupSize:3,autoGroup:!1,postFormat:function(a,e,c,d){var b=a.slice();c||b.splice(e,0,"?");b=b.join("");if(d.autoGroup||c&&-1!=b.indexOf(d.groupSeparator))for(var b=b.replace(RegExp("\\"+d.groupSeparator,"g"),""),j=RegExp("(-?[\\d?]+)([\\d?]{"+d.groupSize+"})");j.test(b);)b=b.replace(j,"$1"+d.groupSeparator+"$2");a.length=b.length;d=0;for(j=b.length;d<
-j;d++)a[d]=b.charAt(d);e=c?e:f.inArray("?",a);c||a.splice(e,1);return e},regex:{number:function(a,e,c,d){a=f.inputmask.escapeRegex.call(this,a);c=f.inputmask.escapeRegex.call(this,c);d=isNaN(d)?d:"{0,"+d+"}";return RegExp("^[+-]?(\\d+|\\d{1,"+e+"}(("+a+"\\d{"+e+"})?)+)("+c+"\\d"+d+")?$")}},onKeyDown:function(a,e){var c=f(this);if(a.keyCode==e.keyCode.TAB){var d=this._valueGet(),b=d.indexOf(e.radixPoint);if(-1!=b){for(var j=1;j<e.digits;j++)d[b+j]&&(d+="0");d!==c.val()&&c.val(d)}}else if(a.keyCode==
-e.keyCode.DELETE||a.keyCode==e.keyCode.BACKSPACE)d=this._valueGet(),c=d.split(""),e.postFormat(c,0,!0,e),d=c.join(""),this._valueSet(d)},definitions:{"~":{validator:function(a,e,c,d,b){if(""==a)return!1;if(1==c&&"0"===e[0]&&/[\d|-]/.test(a))return e[0]="",{pos:0};var f=d?e.slice(0,c):e.slice();f.splice(c,0,a);f=f.join("");b.autoGroup&&(f=f.replace(RegExp("\\"+b.groupSeparator,"g"),""));var l=b.regex.number(b.groupSeparator,b.groupSize,b.radixPoint,b.digits).test(f);if(!l&&(f+="0",l=b.regex.number(b.groupSeparator,
-b.groupSize,b.radixPoint,b.digits).test(f),!l)){l=f.lastIndexOf(b.groupSeparator);for(i=f.length-l;3>=i;i++)f+="0";l=b.regex.number(b.groupSeparator,b.groupSize,b.radixPoint,b.digits).test(f);if(!l&&!d&&a==b.radixPoint&&(l=b.regex.number(b.groupSeparator,b.groupSize,b.radixPoint,b.digits).test("0"+f+"0")))return e[c]="0",c++,{pos:c}}return!1!=l&&!d?{pos:b.postFormat(e,c,!1,b)}:l},cardinality:1,prevalidator:null}},insertMode:!0,autoUnmask:!1},"non-negative-decimal":{regex:{number:function(a,e,c,d){a=
-f.inputmask.escapeRegex.call(this,a);c=f.inputmask.escapeRegex.call(this,c);d=isNaN(d)?d:"{0,"+d+"}";return RegExp("^[+]?(\\d+|\\d{1,"+e+"}(("+a+"\\d{"+e+"})?)+)("+c+"\\d"+d+")?$")}},alias:"decimal"},integer:{regex:{number:function(){return/^([+-]?\d*)$/}},alias:"decimal"}})})(jQuery);
+alias:"dd/mm/yyyy",regex:{hrspre:/[012]/,hrs24:/2[0-9]|1[3-9]/,hrs:/[01][0-9]|2[0-3]/,ampmpre:/[apAP]/,ampm:/^[a|p|A|P][m|M]/},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,f,c,d,b){var e=b.regex.hrs.test(a);if(!d&&!e&&(a.charAt(1)==b.timeseparator||-1!="-.:".indexOf(a.charAt(1))))if(e=b.regex.hrs.test("0"+a.charAt(0)))return f[c-1]="0",f[c]=a.charAt(0),c++,{pos:c};return e&&"24"!==b.hourFormat&&b.regex.hrs24.test(a)?(a=parseInt(a,10),f[c+5]=24==a?"a":"p",f[c+6]="m",a-=12,
+10>a?(f[c]=a.toString(),f[c-1]="0"):(f[c]=a.toString().charAt(1),f[c-1]=a.toString().charAt(0)),{pos:c,c:f[c]}):e},cardinality:2,prevalidator:[{validator:function(a,f,c,d,b){var e=b.regex.hrspre.test(a);return!d&&!e&&(e=b.regex.hrs.test("0"+a))?(f[c]="0",c++,{pos:c}):e},cardinality:1}]},t:{validator:function(a,f,c,d,b){var e=b.regex.ampm.test(a);return!d&&!e&&(e=b.regex.ampm.test(a+"m"))?(f[c-1]=a.charAt(0),f[c]="m",c++,c):e},casing:"lower",cardinality:2,prevalidator:[{validator:function(a,f,c,d,
+b){if(d=b.regex.ampmpre.test(a))if(d=b.regex.ampm.test(a+"m"))return f[c]=a,f[c+1]="m",c;return d},cardinality:1}]}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm t":{mask:"h:s t",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",autoUnmask:!1},"hh:mm":{mask:"h:s",autoUnmask:!1},date:{alias:"dd/mm/yyyy"}})})(jQuery);
+(function(e){e.extend(e.inputmask.defaults.aliases,{decimal:{mask:"~",placeholder:"",repeat:10,greedy:!1,numericInput:!0,digits:"*",groupSeparator:",",groupSize:3,autoGroup:!1,postFormat:function(a,f,c,d){var b=a.slice();c||b.splice(f,0,"?");b=b.join("");if(d.autoGroup||c&&-1!=b.indexOf(d.groupSeparator))for(var b=b.replace(RegExp("\\"+d.groupSeparator,"g"),""),j=RegExp("(-?[\\d?]+)([\\d?]{"+d.groupSize+"})");j.test(b);)b=b.replace(j,"$1"+d.groupSeparator+"$2");a.length=b.length;d=0;for(j=b.length;d<
+j;d++)a[d]=b.charAt(d);f=c?f:e.inArray("?",a);c||a.splice(f,1);return f},regex:{number:function(a,f,c,d){a=e.inputmask.escapeRegex.call(this,a);c=e.inputmask.escapeRegex.call(this,c);d=isNaN(d)?d:"{0,"+d+"}";return RegExp("^[+-]?(\\d+|\\d{1,"+f+"}(("+a+"\\d{"+f+"})?)+)("+c+"\\d"+d+")?$")}},onKeyDown:function(a,f){var c=e(this);if(a.keyCode==f.keyCode.TAB){var d=this._valueGet(),b=d.indexOf(f.radixPoint);if(-1!=b){for(var j=1;j<f.digits;j++)d[b+j]&&(d+="0");d!==c.val()&&c.val(d)}}else if(a.keyCode==
+f.keyCode.DELETE||a.keyCode==f.keyCode.BACKSPACE)d=this._valueGet(),c=d.split(""),f.postFormat(c,0,!0,f),d=c.join(""),this._valueSet(d)},definitions:{"~":{validator:function(a,f,c,d,b){if(""==a)return!1;if(1==c&&"0"===f[0]&&/[\d|-]/.test(a))return f[0]="",{pos:0};var e=d?f.slice(0,c):f.slice();e.splice(c,0,a);e=e.join("");b.autoGroup&&(e=e.replace(RegExp("\\"+b.groupSeparator,"g"),""));var l=b.regex.number(b.groupSeparator,b.groupSize,b.radixPoint,b.digits).test(e);if(!l&&(e+="0",l=b.regex.number(b.groupSeparator,
+b.groupSize,b.radixPoint,b.digits).test(e),!l)){l=e.lastIndexOf(b.groupSeparator);for(i=e.length-l;3>=i;i++)e+="0";l=b.regex.number(b.groupSeparator,b.groupSize,b.radixPoint,b.digits).test(e);if(!l&&!d&&a==b.radixPoint&&(l=b.regex.number(b.groupSeparator,b.groupSize,b.radixPoint,b.digits).test("0"+e+"0")))return f[c]="0",c++,{pos:c}}return!1!=l&&!d?{pos:b.postFormat(f,c,!1,b)}:l},cardinality:1,prevalidator:null}},insertMode:!0,autoUnmask:!1},"non-negative-decimal":{regex:{number:function(a,f,c,d){a=
+e.inputmask.escapeRegex.call(this,a);c=e.inputmask.escapeRegex.call(this,c);d=isNaN(d)?d:"{0,"+d+"}";return RegExp("^[+]?(\\d+|\\d{1,"+f+"}(("+a+"\\d{"+f+"})?)+)("+c+"\\d"+d+")?$")}},alias:"decimal"},integer:{regex:{number:function(){return/^([+-]?\d*)$/}},alias:"decimal"}})})(jQuery);
View
64 dist/min/jquery.inputmask.js
@@ -3,37 +3,37 @@
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2012 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- Version: 1.3.43
+ Version: 1.3.5
*/
-(function(e){void 0==e.fn.inputmask&&(e.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},escapeChar:"\\",mask:null,oncomplete:e.noop,onincomplete:e.noop,oncleared:e.noop,repeat:0,greedy:!0,autoUnmask:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},onKeyUp:e.noop,onKeyDown:e.noop,showMaskOnHover:!0,onKeyValidation:e.noop,numericInput:!1,radixPoint:".",definitions:{9:{validator:"[0-9]",cardinality:1},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451]",cardinality:1},
+(function(d){void 0==d.fn.inputmask&&(d.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},escapeChar:"\\",mask:null,oncomplete:d.noop,onincomplete:d.noop,oncleared:d.noop,repeat:0,greedy:!0,autoUnmask:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},onKeyUp:d.noop,onKeyDown:d.noop,showMaskOnHover:!0,onKeyValidation:d.noop,numericInput:!1,radixPoint:"",definitions:{9:{validator:"[0-9]",cardinality:1},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451]",cardinality:1},
"*":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",cardinality:1}},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},ignorables:[9,13,19,27,33,34,35,36,37,38,39,40,45,46,
-93,112,113,114,115,116,117,118,119,120,121,122,123]},val:e.fn.val,escapeRegex:function(e){return e.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","gim"),"\\$1")},getMaskLength:function(e,C,z){var D=e.length;!C&&1<z&&(D+=e.length*(z-1));return D}},e.fn.inputmask=function(s,C){function z(d,b){var c=a.aliases[d];return c?(c.alias&&z(c.alias),e.extend(!0,a,c),e.extend(!0,a,b),!0):!1}function D(){var d=!1,b=0,c=a.mask.toString();1==c.length&&!1==a.greedy&&(a.placeholder="");for(var c=
-e.map(c.split(""),function(c){var e=[];if(c==a.escapeChar)d=true;else if(c!=a.optionalmarker.start&&c!=a.optionalmarker.end||d){var E=a.definitions[c];if(E&&!d)for(c=0;c<E.cardinality;c++)e.push(A(b+c));else{e.push(c);d=false}b=b+e.length;return e}}),E=c.slice(),g=1;g<a.repeat&&a.greedy;g++)E=E.concat(c.slice());return E}function I(){var d=!1,b=!1,c=!1;return e.map(a.mask.toString().split(""),function(e){var g=[];if(e==a.escapeChar)b=!0;else if(e==a.optionalmarker.start&&!b)c=d=!0;else if(e==a.optionalmarker.end&&
-!b)d=!1,c=!0;else{var i=a.definitions[e];if(i&&!b){for(var j=i.prevalidator,k=j?j.length:0,h=1;h<i.cardinality;h++){var l=k>=h?j[h-1]:[],f=l.validator,l=l.cardinality;g.push({fn:f?"string"==typeof f?RegExp(f):new function(){this.test=f}:/./,cardinality:l?l:1,optionality:d,newBlockMarker:!0==d?c:!1,offset:0,casing:i.casing,def:e});!0==d&&(c=!1)}g.push({fn:i.validator?"string"==typeof i.validator?RegExp(i.validator):new function(){this.test=i.validator}:/./,cardinality:i.cardinality,optionality:d,newBlockMarker:c,
-offset:0,casing:i.casing,def:e})}else g.push({fn:null,cardinality:0,optionality:d,newBlockMarker:c,offset:0,casing:null,def:e}),b=!1;c=!1;return g}})}function G(d,b,c,e){var g=!1;if(0<=d&&d<n()){for(var j=d%i.length,r=b?1:0,k="",h=i[j].cardinality;h>r;h--)k+=t(c,j-(h-1));b&&(k+=b);g=null!=i[j].fn?i[j].fn.test(k,c,d,e,a):!1}setTimeout(function(){a.onKeyValidation.call(this,g,a)},0);return g}function r(d){d=i[d%i.length];return void 0!=d?d.fn:!1}function A(d){return a.placeholder.charAt(d%a.placeholder.length)}
-function n(){return e.inputmask.getMaskLength(g,a.greedy,a.repeat)}function v(d,a){var c=n();if(a>=c)return c;for(var e=a;++e<c&&!r(e););return e}function L(d,a){var c=a;if(0>=c)return 0;for(;0<--c&&!r(c););return c}function F(d,a,c){var e=i[a%i.length],g=c;if(void 0!=g)switch(e.casing){case "upper":g=c.toUpperCase();break;case "lower":g=c.toLowerCase()}d[a]=g}function t(a,b,c){c&&(b=P(a,b));return a[b]}function P(a,b,c){if(c)for(;0>b&&a.length<n();){c=g.length-1;for(b=g.length;void 0!==g[c];)a.unshift(g[c--])}else for(;void 0==
-a[b]&&a.length<n();)for(c=0;void 0!==g[c];)a.push(g[c++]);return b}function x(a,b,c){a._valueSet(b.join(""));void 0!=c&&(J?setTimeout(function(){j(a,c)},100):j(a,c))}function Q(a,b,c){for(var e=n();b<c&&b<e;b++)F(a,b,t(g.slice(),b))}function K(a,b){F(a,b,t(g,b%i.length))}function m(d,b,c,E){var j=e(d).data("inputmask").isRTL,m=M(d._valueGet(),j).split("");if(j){var B=n(),k=m.reverse();k.length=B;for(var h=0;h<B;h++){var l=(B-(h+1))%i.length;null==i[l].fn&&k[h]!=t(g,l)?(k.splice(h,0,t(g,l)),k.length=
-B):k[h]=k[h]||t(g,l)}m=k.reverse()}Q(b,0,b.length);b.length=g.length;for(var f=k=-1,y,B=n(),s=m.length,l=0==s?B:-1,h=0;h<s;h++)for(var q=f+1;q<B;q++)if(r(q)){var u=m[h];!1!==(y=G(q,u,b,!c))?(!0!==y&&(q=void 0!=y.pos?y.pos:q,u=void 0!=y.c?y.c:u),F(b,q,u),k=f=q):(K(b,q),u==A(q)&&(l=f=q));break}else if(K(b,q),k==f&&(k=q),f=q,m[h]==t(b,q))break;if(!1==a.greedy)for(h=M(b.join(""),j).split("");b.length!=h.length;)j?b.shift():b.pop();c&&x(d,b);return j?a.numericInput?-1!=e.inArray(a.radixPoint,b)&&!0!==
-E?e.inArray(a.radixPoint,b):v(b,B):v(b,l):v(b,k)}function S(a){return e.inputmask.escapeRegex.call(this,a)}function M(a,b){return b?a.replace(RegExp("^("+S(g.join(""))+")*"),""):a.replace(RegExp("("+S(g.join(""))+")*$"),"")}function R(a,b){m(a,b,!1);var c=b.slice();if(e(a).data("inputmask").isRTL)for(var g=0;g<=c.length-1;g++){var j=g%i.length;if(i[j].optionality)if(A(g)==b[g]||!r(g))c.splice(0,1);else break;else break}else for(g=c.length-1;0<=g;g--)if(j=g%i.length,i[j].optionality)if(A(g)==b[g]||
-!r(g))c.pop();else break;else break;x(a,c)}function T(a,b){var c=a[0];if(i&&(!0===b||!a.hasClass("hasDatepicker"))){var j=g.slice();m(c,j);return e.map(j,function(a,b){return r(b)&&a!=t(g.slice(),b)?a:null}).join("")}return c._valueGet()}function j(d,b,c){d=d.jquery&&0<d.length?d[0]:d;if("number"==typeof b){c="number"==typeof c?c:b;!1==a.insertMode&&b==c&&c++;if(d.setSelectionRange)d.setSelectionRange(b,c);else if(d.createTextRange){var e=d.createTextRange();e.collapse(!0);e.moveEnd("character",c);
-e.moveStart("character",b);e.select()}d.focus()}else{var g=J?e:null,e=null;null==g&&(d.setSelectionRange?(b=d.selectionStart,c=d.selectionEnd):document.selection&&document.selection.createRange&&(e=document.selection.createRange(),b=0-e.duplicate().moveStart("character",-1E5),c=b+e.text.length),g={begin:b,end:c});return g}}function N(a){for(var b=!0,a=a._valueGet(),e=a.length,g=0;g<e;g++)if(r(g)&&a.charAt(g)==A(g)){b=!1;break}return b}function O(d){function b(a){a=e._data(a).events;e.each(a,function(a,
-b){e.each(b,function(a,b){if("inputmask"==b.namespace){var f=b.handler;b.handler=function(){return this.readOnly||this.disabled?!1:f.apply(this,arguments)}}})})}function c(a){var b;Object.getOwnPropertyDescriptor&&(b=Object.getOwnPropertyDescriptor(a,"value"));if(b&&b.get)a._valueGet||(a._valueGet=b.get,a._valueSet=b.set,Object.defineProperty(a,"value",{get:function(){var a=e(this),b=e(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?
-this._valueGet():""},set:function(a){this._valueSet(a);e(this).triggerHandler("setvalue.inputmask")}}));else if(document.__lookupGetter__&&a.__lookupGetter__("value"))a._valueGet||(a._valueGet=a.__lookupGetter__("value"),a._valueSet=a.__lookupSetter__("value"),a.__defineGetter__("value",function(){var a=e(this),b=e(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?this._valueGet():""}),a.__defineSetter__("value",function(a){this._valueSet(a);
-e(this).triggerHandler("setvalue.inputmask")}));else if(a._valueGet||(a._valueGet=function(){return this.value},a._valueSet=function(a){this.value=a}),!0!=e.fn.val.inputmaskpatch)e.fn.val=function(){if(arguments.length==0){var a=e(this);if(a.data("inputmask")){if(a.data("inputmask").autoUnmask)return a.inputmask("unmaskedvalue");var b=e.inputmask.val.apply(a);return b!=a.data("inputmask")._buffer.join("")?b:""}return e.inputmask.val.apply(a)}var f=arguments;return this.each(function(){var a=e(this),
-b=e.inputmask.val.apply(a,f);a.data("inputmask")&&a.triggerHandler("setvalue.inputmask");return b})},e.extend(e.fn.val,{inputmaskpatch:!0})}function s(a,b,e){for(;!r(a)&&0<=a-1;)a--;for(var c=a;c<b&&c<n();c++)if(r(c)){K(f,c);var d=v(f,c),p=t(f,d);if(p!=A(d))if(d<n()&&!1!==G(c,p,f,!0)&&i[c%i.length].def==i[d%i.length].def)F(f,c,t(f,d)),K(f,d);else{if(r(c))break}else if(void 0==e)break}else K(f,c);void 0!=e&&F(f,w?b:L(f,b),e);f=M(f.join(""),w).split("");0==f.length&&(f=g.slice());return a}function z(a,
-b,c,e){for(;a<=b&&a<n();a++)if(r(a)){var d=t(f,a);F(f,a,c);if(d!=A(a))if(c=v(f,a),c<n())if(!1!==G(c,d,f,!0)&&i[a%i.length].def==i[c%i.length].def)c=d;else if(r(c))break;else c=d;else break;else if(!0!==e)break}else K(f,a);e=f.length;f=M(f.join(""),w).split("");0==f.length&&(f=g.slice());return b-(e-f.length)}function D(b){C=!1;var c=this,d=b.keyCode,i=j(c);if(a.numericInput){var h=c._valueGet().indexOf(a.radixPoint);-1!=h&&(w=i.begin<=h||i.end<=h)}if(d==a.keyCode.BACKSPACE||d==a.keyCode.DELETE||U&&
-127==d){h=n();if(0==i.begin&&i.end==h)f=g.slice(),x(c,f),j(c,m(c,f,!1));else if(1<i.end-i.begin||1==i.end-i.begin&&a.insertMode)Q(f,i.begin,i.end),x(c,f),j(w?m(c,f,!1):i.begin);else{var p=i.begin-(d==a.keyCode.DELETE?0:1);p<H&&d==a.keyCode.DELETE&&(p=H);p>=H&&(a.numericInput&&(a.greedy&&d==a.keyCode.DELETE&&f[p]==a.radixPoint)&&(p=v(f,p),w=!1),w?(p=z(H,p,A(p),!0),p=a.numericInput&&a.greedy&&d==a.keyCode.BACKSPACE&&f[p+1]==a.radixPoint?p+1:v(f,p)):p=s(p,h),x(c,f,p))}c._valueGet()==g.join("")&&e(c).trigger("cleared");
-b.preventDefault()}else d==a.keyCode.END||d==a.keyCode.PAGE_DOWN?setTimeout(function(){var d=m(c,f,!1,!0);!a.insertMode&&(d==n()&&!b.shiftKey)&&d--;j(c,b.shiftKey?i.begin:d,d)},0):d==a.keyCode.HOME||d==a.keyCode.PAGE_UP?j(c,0,b.shiftKey?i.begin:0):d==a.keyCode.ESCAPE?(c._valueSet(y),j(c,0,m(c,f))):d==a.keyCode.INSERT?(a.insertMode=!a.insertMode,j(c,!a.insertMode&&i.begin==n()?i.begin-1:i.begin)):b.ctrlKey&&88==d?setTimeout(function(){j(c,m(c,f,!0))},0):a.insertMode||(d==a.keyCode.RIGHT?(h=i.begin==
-i.end?i.end+1:i.end,h=h<n()?h:i.end,j(c,b.shiftKey?i.begin:h,b.shiftKey?h+1:h)):d==a.keyCode.LEFT&&(h=i.begin-1,h=0<h?h:0,j(c,h,b.shiftKey?i.end:h)));a.onKeyDown.call(this,b,a);q=-1!=e.inArray(d,a.ignorables)}function B(b){if(C)return!1;C=!0;var c=this,d=e(c),b=b||window.event,g=b.which||b.charCode||b.keyCode,i=String.fromCharCode(g);if(a.numericInput&&i==a.radixPoint){var h=c._valueGet().indexOf(a.radixPoint);j(c,v(f,-1!=h?h:n()))}if(b.ctrlKey||b.altKey||b.metaKey||q)return!0;if(g){d.trigger("input");
-var k=j(c),l=n(),g=!0;Q(f,k.begin,k.end);if(w){var h=L(f,k.end),o;if(!1!==(o=G(h==l||t(f,h)==a.radixPoint?L(f,h):h,i,f,!1))){!0!==o&&(h=void 0!=o.pos?o.pos:h,i=void 0!=o.c?o.c:i);o=H;if(!0==a.insertMode){if(!0==a.greedy)for(var m=f.slice();t(m,o,!0)!=A(o)&&o<=h;)o=o==l?l+1:v(f,o);o<=h&&(a.greedy||f.length<l)?(f[H]!=A(H)&&f.length<l&&(l=P(f,-1,w),0!=k.end&&(h+=l),l=f.length),s(o,h,i)):g=!1}else F(f,h,i);g&&(x(c,f,a.numericInput?v(f,h):h),setTimeout(function(){N(c)&&d.trigger("complete")},0))}else J&&
-x(c,f,k.begin)}else if(h=v(f,k.begin-1),P(f,h,w),!1!==(o=G(h,i,f,!1))){!0!==o&&(h=void 0!=o.pos?o.pos:h,i=void 0!=o.c?o.c:i);if(!0==a.insertMode){k=n();for(m=f.slice();t(m,k,!0)!=A(k)&&k>=h;)k=0==k?-1:L(f,k);k>=h?z(h,f.length,i):g=!1}else F(f,h,i);g&&(i=v(f,h),x(c,f,i),setTimeout(function(){N(c)&&d.trigger("complete")},0))}else J&&x(c,f,k.begin);b.preventDefault()}}function k(b){var c=e(this),d=b.keyCode;a.onKeyUp.call(this,b,a);d==a.keyCode.TAB&&(c.hasClass("focus.inputmask")&&0==this._valueGet().length)&&
-(f=g.slice(),x(this,f),w||j(this,0),y=this._valueGet())}var h=e(d);if(h.is(":input")){a.greedy=a.greedy?a.greedy:0==a.repeat;var l=h.prop("maxLength");n()>l&&-1<l&&(l<g.length&&(g.length=l),!1==a.greedy&&(a.repeat=Math.round(l/g.length)),h.prop("maxLength",2*n()));h.data("inputmask",{tests:i,_buffer:g,greedy:a.greedy,repeat:a.repeat,autoUnmask:a.autoUnmask,definitions:a.definitions,isRTL:!1});c(d);var f=g.slice(),y=d._valueGet(),C=!1,q=!1,u=-1,H=v(f,-1);L(f,n());var w=!1;if("rtl"==d.dir||a.numericInput)d.dir=
-"ltr",h.css("text-align","right"),h.removeAttr("dir"),l=h.data("inputmask"),l.isRTL=!0,h.data("inputmask",l),w=!0;h.unbind(".inputmask");h.removeClass("focus.inputmask");h.bind("mouseenter.inputmask",function(){if(!e(this).hasClass("focus.inputmask")&&a.showMaskOnHover){var b=this._valueGet().length;b<f.length&&(0==b&&(f=g.slice()),x(this,f))}}).bind("blur.inputmask",function(){var b=e(this),c=this._valueGet();b.removeClass("focus.inputmask");c!=y&&b.change();a.clearMaskOnLostFocus&&""!=c&&(c==g.join("")?
-this._valueSet(""):R(this,f));N(this)||(b.trigger("incomplete"),a.clearIncomplete&&(a.clearMaskOnLostFocus?this._valueSet(""):(f=g.slice(),x(this,f))))}).bind("focus.inputmask",function(){var b=e(this),c=this._valueGet();if(!b.hasClass("focus.inputmask")&&(!a.showMaskOnHover||a.showMaskOnHover&&""==c))c=c.length,c<f.length&&(0==c&&(f=g.slice()),j(this,m(this,f,!0)));b.addClass("focus.inputmask");y=this._valueGet()}).bind("mouseleave.inputmask",function(){var b=e(this);a.clearMaskOnLostFocus&&(b.hasClass("focus.inputmask")||
-(this._valueGet()==g.join("")||""==this._valueGet()?this._valueSet(""):R(this,f)))}).bind("click.inputmask",function(){var a=this;setTimeout(function(){var b=j(a);b.begin==b.end&&(b=b.begin,u=m(a,f,!1),w?j(a,b>u&&(!1!==G(b,f[b],f,!0)||!r(b))?b:u):j(a,b<u&&(!1!==G(b,f[b],f,!0)||!r(b))?b:u))},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){j(a,0,u)},0)}).bind("keydown.inputmask",D).bind("keypress.inputmask",B).bind("keyup.inputmask",k).bind(V+".inputmask dragdrop.inputmask drop.inputmask",
-function(){var a=this;setTimeout(function(){j(a,m(a,f,!0))},0)}).bind("setvalue.inputmask",function(){y=this._valueGet();m(this,f,!0);this._valueGet()==g.join("")&&this._valueSet("")}).bind("complete.inputmask",a.oncomplete).bind("incomplete.inputmask",a.onincomplete).bind("cleared.inputmask",a.oncleared);var u=m(d,f,!0),I;try{I=document.activeElement}catch(O){}I===d?(h.addClass("focus.inputmask"),j(d,u)):a.clearMaskOnLostFocus&&(d._valueGet()==g.join("")?d._valueSet(""):R(d,f));b(d)}}var a=e.extend(!0,
-{},e.inputmask.defaults,C),V=function(a){var b=document.createElement("input"),a="on"+a,c=a in b;c||(b.setAttribute(a,"return;"),c="function"==typeof b[a]);return c}("paste")?"paste":"input",U=null!=navigator.userAgent.match(/iphone/i),J=null!=navigator.userAgent.match(/android.*mobile safari.*/i);if(J)var W=navigator.userAgent.match(/mobile safari.*/i),J=533>=parseInt(RegExp(/[0-9]+/).exec(W));if("string"==typeof s)switch(s){case "mask":z(a.alias,C);var g=D(),i=I();return this.each(function(){O(this)});
-case "unmaskedvalue":return i=this.data("inputmask").tests,g=this.data("inputmask")._buffer,a.greedy=this.data("inputmask").greedy,a.repeat=this.data("inputmask").repeat,a.definitions=this.data("inputmask").definitions,T(this);case "remove":return this.each(function(){var d=e(this),b=this;setTimeout(function(){if(d.data("inputmask")){i=d.data("inputmask").tests;g=d.data("inputmask")._buffer;a.greedy=d.data("inputmask").greedy;a.repeat=d.data("inputmask").repeat;a.definitions=d.data("inputmask").definitions;
-b._valueSet(T(d,!0));d.removeData("inputmask");d.unbind(".inputmask");d.removeClass("focus.inputmask");var c;Object.getOwnPropertyDescriptor&&(c=Object.getOwnPropertyDescriptor(b,"value"));c&&c.get?b._valueGet&&Object.defineProperty(b,"value",{get:b._valueGet,set:b._valueSet}):document.__lookupGetter__&&b.__lookupGetter__("value")&&b._valueGet&&(b.__defineGetter__("value",b._valueGet),b.__defineSetter__("value",b._valueSet));delete b._valueGet;delete b._valueSet}},0)});case "getemptymask":return this.data("inputmask")?
-this.data("inputmask")._buffer.join(""):"";case "hasMaskedValue":return this.data("inputmask")?!this.data("inputmask").autoUnmask:!1;case "isComplete":return i=this.data("inputmask").tests,g=this.data("inputmask")._buffer,a.greedy=this.data("inputmask").greedy,a.repeat=this.data("inputmask").repeat,a.definitions=this.data("inputmask").definitions,N(this[0]);default:return z(s,C)||(a.mask=s),g=D(),i=I(),this.each(function(){O(this)})}else{if("object"==typeof s)return a=e.extend(!0,{},e.inputmask.defaults,
-s),z(a.alias,s),g=D(),i=I(),this.each(function(){O(this)});if(void 0==s)return this.each(function(){var d=e(this).attr("data-inputmask");if(d&&""!=d)try{var d=d.replace(RegExp("'","g"),'"'),b=e.parseJSON("{"+d+"}");a=e.extend(!0,{},e.inputmask.defaults,b);z(a.alias,b);a.alias=void 0;e(this).inputmask(a)}catch(c){}})}return this})})(jQuery);
+93,112,113,114,115,116,117,118,119,120,121,122,123]},val:d.fn.val,escapeRegex:function(d){return d.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","gim"),"\\$1")},getMaskLength:function(d,C,z){var D=d.length;!C&&1<z&&(D+=d.length*(z-1));return D}},d.fn.inputmask=function(s,C){function z(f,b){var c=a.aliases[f];return c?(c.alias&&z(c.alias),d.extend(!0,a,c),d.extend(!0,a,b),!0):!1}function D(){var f=!1,b=0,c=a.mask.toString();1==c.length&&!1==a.greedy&&(a.placeholder="");for(var c=
+d.map(c.split(""),function(c){var d=[];if(c==a.escapeChar)f=true;else if(c!=a.optionalmarker.start&&c!=a.optionalmarker.end||f){var E=a.definitions[c];if(E&&!f)for(c=0;c<E.cardinality;c++)d.push(A(b+c));else{d.push(c);f=false}b=b+d.length;return d}}),E=c.slice(),g=1;g<a.repeat&&a.greedy;g++)E=E.concat(c.slice());return E}function I(){var f=!1,b=!1,c=!1;return d.map(a.mask.toString().split(""),function(d){var g=[];if(d==a.escapeChar)b=!0;else if(d==a.optionalmarker.start&&!b)c=f=!0;else if(d==a.optionalmarker.end&&
+!b)f=!1,c=!0;else{var i=a.definitions[d];if(i&&!b){for(var j=i.prevalidator,k=j?j.length:0,h=1;h<i.cardinality;h++){var l=k>=h?j[h-1]:[],e=l.validator,l=l.cardinality;g.push({fn:e?"string"==typeof e?RegExp(e):new function(){this.test=e}:/./,cardinality:l?l:1,optionality:f,newBlockMarker:!0==f?c:!1,offset:0,casing:i.casing,def:d});!0==f&&(c=!1)}g.push({fn:i.validator?"string"==typeof i.validator?RegExp(i.validator):new function(){this.test=i.validator}:/./,cardinality:i.cardinality,optionality:f,newBlockMarker:c,
+offset:0,casing:i.casing,def:d})}else g.push({fn:null,cardinality:0,optionality:f,newBlockMarker:c,offset:0,casing:null,def:d}),b=!1;c=!1;return g}})}function G(f,b,c,d){var g=!1;if(0<=f&&f<n()){for(var j=f%i.length,r=b?1:0,k="",h=i[j].cardinality;h>r;h--)k+=t(c,j-(h-1));b&&(k+=b);g=null!=i[j].fn?i[j].fn.test(k,c,f,d,a):!1}setTimeout(function(){a.onKeyValidation.call(this,g,a)},0);return g}function r(f){f=i[f%i.length];return void 0!=f?f.fn:!1}function A(f){return a.placeholder.charAt(f%a.placeholder.length)}
+function n(){return d.inputmask.getMaskLength(g,a.greedy,a.repeat)}function w(f,a){var c=n();if(a>=c)return c;for(var d=a;++d<c&&!r(d););return d}function L(a,b){var c=b;if(0>=c)return 0;for(;0<--c&&!r(c););return c}function F(a,b,c){var d=i[b%i.length],g=c;if(void 0!=g)switch(d.casing){case "upper":g=c.toUpperCase();break;case "lower":g=c.toLowerCase()}a[b]=g}function t(a,b,c){c&&(b=P(a,b));return a[b]}function P(a,b,c){if(c)for(;0>b&&a.length<n();){c=g.length-1;for(b=g.length;void 0!==g[c];)a.unshift(g[c--])}else for(;void 0==
+a[b]&&a.length<n();)for(c=0;void 0!==g[c];)a.push(g[c++]);return b}function x(a,b,c){a._valueSet(b.join(""));void 0!=c&&(J?setTimeout(function(){j(a,c)},100):j(a,c))}function Q(a,b,c){for(var d=n();b<c&&b<d;b++)F(a,b,t(g.slice(),b))}function K(a,b){F(a,b,t(g,b%i.length))}function m(f,b,c,E){var j=d(f).data("inputmask").isRTL,m=M(f._valueGet(),j).split("");if(j){var B=n(),k=m.reverse();k.length=B;for(var h=0;h<B;h++){var l=(B-(h+1))%i.length;null==i[l].fn&&k[h]!=t(g,l)?(k.splice(h,0,t(g,l)),k.length=
+B):k[h]=k[h]||t(g,l)}m=k.reverse()}Q(b,0,b.length);b.length=g.length;for(var e=k=-1,y,B=n(),s=m.length,l=0==s?B:-1,h=0;h<s;h++)for(var q=e+1;q<B;q++)if(r(q)){var u=m[h];!1!==(y=G(q,u,b,!c))?(!0!==y&&(q=void 0!=y.pos?y.pos:q,u=void 0!=y.c?y.c:u),F(b,q,u),k=e=q):(K(b,q),u==A(q)&&(l=e=q));break}else if(K(b,q),k==e&&(k=q),e=q,m[h]==t(b,q))break;if(!1==a.greedy)for(h=M(b.join(""),j).split("");b.length!=h.length;)j?b.shift():b.pop();c&&x(f,b);return j?a.numericInput?""!=a.radixPoint&&-1!=d.inArray(a.radixPoint,
+b)&&!0!==E?d.inArray(a.radixPoint,b):w(b,B):w(b,l):w(b,k)}function S(a){return d.inputmask.escapeRegex.call(this,a)}function M(a,b){return b?a.replace(RegExp("^("+S(g.join(""))+")*"),""):a.replace(RegExp("("+S(g.join(""))+")*$"),"")}function R(a,b){m(a,b,!1);var c=b.slice();if(d(a).data("inputmask").isRTL)for(var g=0;g<=c.length-1;g++){var j=g%i.length;if(i[j].optionality)if(A(g)==b[g]||!r(g))c.splice(0,1);else break;else break}else for(g=c.length-1;0<=g;g--)if(j=g%i.length,i[j].optionality)if(A(g)==
+b[g]||!r(g))c.pop();else break;else break;x(a,c)}function T(a,b){var c=a[0];if(i&&(!0===b||!a.hasClass("hasDatepicker"))){var j=g.slice();m(c,j);return d.map(j,function(a,b){return r(b)&&a!=t(g.slice(),b)?a:null}).join("")}return c._valueGet()}function j(d,b,c){d=d.jquery&&0<d.length?d[0]:d;if("number"==typeof b){c="number"==typeof c?c:b;!1==a.insertMode&&b==c&&c++;if(d.setSelectionRange)d.setSelectionRange(b,c);else if(d.createTextRange){var g=d.createTextRange();g.collapse(!0);g.moveEnd("character",
+c);g.moveStart("character",b);g.select()}d.focus()}else{var j=J?g:null,g=null;null==j&&(d.setSelectionRange?(b=d.selectionStart,c=d.selectionEnd):document.selection&&document.selection.createRange&&(g=document.selection.createRange(),b=0-g.duplicate().moveStart("character",-1E5),c=b+g.text.length),j={begin:b,end:c});return j}}function N(a){for(var b=!0,a=a._valueGet(),d=a.length,g=0;g<d;g++)if(r(g)&&a.charAt(g)==A(g)){b=!1;break}return b}function O(f){function b(a){a=d._data(a).events;d.each(a,function(a,
+b){d.each(b,function(a,b){if("inputmask"==b.namespace){var d=b.handler;b.handler=function(){return this.readOnly||this.disabled?!1:d.apply(this,arguments)}}})})}function c(a){var b;Object.getOwnPropertyDescriptor&&(b=Object.getOwnPropertyDescriptor(a,"value"));if(b&&b.get)a._valueGet||(a._valueGet=b.get,a._valueSet=b.set,Object.defineProperty(a,"value",{get:function(){var a=d(this),b=d(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?
+this._valueGet():""},set:function(a){this._valueSet(a);d(this).triggerHandler("setvalue.inputmask")}}));else if(document.__lookupGetter__&&a.__lookupGetter__("value"))a._valueGet||(a._valueGet=a.__lookupGetter__("value"),a._valueSet=a.__lookupSetter__("value"),a.__defineGetter__("value",function(){var a=d(this),b=d(this).data("inputmask");return b&&b.autoUnmask?a.inputmask("unmaskedvalue"):this._valueGet()!=b._buffer.join("")?this._valueGet():""}),a.__defineSetter__("value",function(a){this._valueSet(a);
+d(this).triggerHandler("setvalue.inputmask")}));else if(a._valueGet||(a._valueGet=function(){return this.value},a._valueSet=function(a){this.value=a}),!0!=d.fn.val.inputmaskpatch)d.fn.val=function(){if(arguments.length==0){var a=d(this);if(a.data("inputmask")){if(a.data("inputmask").autoUnmask)return a.inputmask("unmaskedvalue");var b=d.inputmask.val.apply(a);return b!=a.data("inputmask")._buffer.join("")?b:""}return d.inputmask.val.apply(a)}var e=arguments;return this.each(function(){var a=d(this),
+b=d.inputmask.val.apply(a,e);a.data("inputmask")&&a.triggerHandler("setvalue.inputmask");return b})},d.extend(d.fn.val,{inputmaskpatch:!0})}function s(a,b,d){for(;!r(a)&&0<=a-1;)a--;for(var c=a;c<b&&c<n();c++)if(r(c)){K(e,c);var f=w(e,c),o=t(e,f);if(o!=A(f))if(f<n()&&!1!==G(c,o,e,!0)&&i[c%i.length].def==i[f%i.length].def)F(e,c,t(e,f)),K(e,f);else{if(r(c))break}else if(void 0==d)break}else K(e,c);void 0!=d&&F(e,v?b:L(e,b),d);e=M(e.join(""),v).split("");0==e.length&&(e=g.slice());return a}function z(a,
+b,d,c){for(;a<=b&&a<n();a++)if(r(a)){var f=t(e,a);F(e,a,d);if(f!=A(a))if(d=w(e,a),d<n())if(!1!==G(d,f,e,!0)&&i[a%i.length].def==i[d%i.length].def)d=f;else if(r(d))break;else d=f;else break;else if(!0!==c)break}else K(e,a);c=e.length;e=M(e.join(""),v).split("");0==e.length&&(e=g.slice());return b-(c-e.length)}function D(b){C=!1;var c=this,f=b.keyCode,i=j(c);if(a.numericInput&&""!=a.radixPoint){var h=c._valueGet().indexOf(a.radixPoint);-1!=h&&(v=i.begin<=h||i.end<=h)}if(f==a.keyCode.BACKSPACE||f==a.keyCode.DELETE||
+U&&127==f){h=n();if(0==i.begin&&i.end==h)e=g.slice(),x(c,e),j(c,m(c,e,!1));else if(1<i.end-i.begin||1==i.end-i.begin&&a.insertMode)Q(e,i.begin,i.end),x(c,e),j(v?m(c,e,!1):i.begin);else{var o=i.begin-(f==a.keyCode.DELETE?0:1);o<H&&f==a.keyCode.DELETE&&(o=H);o>=H&&(console.log("before delete "+e),a.numericInput&&a.greedy&&f==a.keyCode.DELETE&&e[o]==a.radixPoint?(o=w(e,o),v=!1):a.numericInput&&(a.greedy&&f==a.keyCode.BACKSPACE&&e[o]==a.radixPoint)&&(o--,v=!0),v?(o=z(H,o,A(o),!0),o=a.numericInput&&a.greedy&&
+f==a.keyCode.BACKSPACE&&e[o+1]==a.radixPoint?o+1:w(e,o)):o=s(o,h),x(c,e,o))}c._valueGet()==g.join("")&&d(c).trigger("cleared");b.preventDefault()}else f==a.keyCode.END||f==a.keyCode.PAGE_DOWN?setTimeout(function(){var d=m(c,e,!1,!0);!a.insertMode&&(d==n()&&!b.shiftKey)&&d--;j(c,b.shiftKey?i.begin:d,d)},0):f==a.keyCode.HOME||f==a.keyCode.PAGE_UP?j(c,0,b.shiftKey?i.begin:0):f==a.keyCode.ESCAPE?(c._valueSet(y),j(c,0,m(c,e))):f==a.keyCode.INSERT?(a.insertMode=!a.insertMode,j(c,!a.insertMode&&i.begin==
+n()?i.begin-1:i.begin)):b.ctrlKey&&88==f?setTimeout(function(){j(c,m(c,e,!0))},0):a.insertMode||(f==a.keyCode.RIGHT?(h=i.begin==i.end?i.end+1:i.end,h=h<n()?h:i.end,j(c,b.shiftKey?i.begin:h,b.shiftKey?h+1:h)):f==a.keyCode.LEFT&&(h=i.begin-1,h=0<h?h:0,j(c,h,b.shiftKey?i.end:h)));a.onKeyDown.call(this,b,a);q=-1!=d.inArray(f,a.ignorables)}function B(b){if(C)return!1;C=!0;var c=this,f=d(c),b=b||window.event,g=b.which||b.charCode||b.keyCode,i=String.fromCharCode(g);if(a.numericInput&&i==a.radixPoint){var h=
+c._valueGet().indexOf(a.radixPoint);j(c,w(e,-1!=h?h:n()))}if(b.ctrlKey||b.altKey||b.metaKey||q)return!0;if(g){f.trigger("input");var k=j(c),l=n(),g=!0;Q(e,k.begin,k.end);if(v){var h=L(e,k.end),p;if(!1!==(p=G(h==l||t(e,h)==a.radixPoint?L(e,h):h,i,e,!1))){!0!==p&&(h=void 0!=p.pos?p.pos:h,i=void 0!=p.c?p.c:i);p=H;if(!0==a.insertMode){if(!0==a.greedy)for(var m=e.slice();t(m,p,!0)!=A(p)&&p<=h;)p=p==l?l+1:w(e,p);p<=h&&(a.greedy||e.length<l)?(e[H]!=A(H)&&e.length<l&&(l=P(e,-1,v),0!=k.end&&(h+=l),l=e.length),
+s(p,h,i)):g=!1}else F(e,h,i);g&&(x(c,e,a.numericInput?h+1:h),setTimeout(function(){N(c)&&f.trigger("complete")},0))}else J&&x(c,e,k.begin)}else if(h=w(e,k.begin-1),P(e,h,v),!1!==(p=G(h,i,e,!1))){!0!==p&&(h=void 0!=p.pos?p.pos:h,i=void 0!=p.c?p.c:i);if(!0==a.insertMode){k=n();for(m=e.slice();t(m,k,!0)!=A(k)&&k>=h;)k=0==k?-1:L(e,k);k>=h?z(h,e.length,i):g=!1}else F(e,h,i);g&&(i=w(e,h),x(c,e,i),setTimeout(function(){N(c)&&f.trigger("complete")},0))}else J&&x(c,e,k.begin);b.preventDefault()}}function k(b){var c=
+d(this),f=b.keyCode;a.onKeyUp.call(this,b,a);f==a.keyCode.TAB&&(c.hasClass("focus.inputmask")&&0==this._valueGet().length)&&(e=g.slice(),x(this,e),v||j(this,0),y=this._valueGet())}var h=d(f);if(h.is(":input")){a.greedy=a.greedy?a.greedy:0==a.repeat;var l=h.prop("maxLength");n()>l&&-1<l&&(l<g.length&&(g.length=l),!1==a.greedy&&(a.repeat=Math.round(l/g.length)),h.prop("maxLength",2*n()));h.data("inputmask",{tests:i,_buffer:g,greedy:a.greedy,repeat:a.repeat,autoUnmask:a.autoUnmask,definitions:a.definitions,
+isRTL:!1});c(f);var e=g.slice(),y=f._valueGet(),C=!1,q=!1,u=-1,H=w(e,-1);L(e,n());var v=!1;if("rtl"==f.dir||a.numericInput)f.dir="ltr",h.css("text-align","right"),h.removeAttr("dir"),l=h.data("inputmask"),l.isRTL=!0,h.data("inputmask",l),v=!0;h.unbind(".inputmask");h.removeClass("focus.inputmask");h.bind("mouseenter.inputmask",function(){if(!d(this).hasClass("focus.inputmask")&&a.showMaskOnHover){var b=this._valueGet().length;b<e.length&&(0==b&&(e=g.slice()),x(this,e))}}).bind("blur.inputmask",function(){var b=
+d(this),c=this._valueGet();b.removeClass("focus.inputmask");c!=y&&b.change();a.clearMaskOnLostFocus&&""!=c&&(c==g.join("")?this._valueSet(""):R(this,e));N(this)||(b.trigger("incomplete"),a.clearIncomplete&&(a.clearMaskOnLostFocus?this._valueSet(""):(e=g.slice(),x(this,e))))}).bind("focus.inputmask",function(){var b=d(this),c=this._valueGet();if(!b.hasClass("focus.inputmask")&&(!a.showMaskOnHover||a.showMaskOnHover&&""==c))c=c.length,c<e.length&&(0==c&&(e=g.slice()),j(this,m(this,e,!0)));b.addClass("focus.inputmask");
+y=this._valueGet()}).bind("mouseleave.inputmask",function(){var b=d(this);a.clearMaskOnLostFocus&&(b.hasClass("focus.inputmask")||(this._valueGet()==g.join("")||""==this._valueGet()?this._valueSet(""):R(this,e)))}).bind("click.inputmask",function(){var a=this;setTimeout(function(){var b=j(a);b.begin==b.end&&(b=b.begin,u=m(a,e,!1),v?j(a,b>u&&(!1!==G(b,e[b],e,!0)||!r(b))?b:u):j(a,b<u&&(!1!==G(b,e[b],e,!0)||!r(b))?b:u))},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){j(a,
+0,u)},0)}).bind("keydown.inputmask",D).bind("keypress.inputmask",B).bind("keyup.inputmask",k).bind(V+".inputmask dragdrop.inputmask drop.inputmask",function(){var a=this;setTimeout(function(){j(a,m(a,e,!0))},0)}).bind("setvalue.inputmask",function(){y=this._valueGet();m(this,e,!0);this._valueGet()==g.join("")&&this._valueSet("")}).bind("complete.inputmask",a.oncomplete).bind("incomplete.inputmask",a.onincomplete).bind("cleared.inputmask",a.oncleared);var u=m(f,e,!0),I;try{I=document.activeElement}catch(O){}I===
+f?(h.addClass("focus.inputmask"),j(f,u)):a.clearMaskOnLostFocus&&(f._valueGet()==g.join("")?f._valueSet(""):R(f,e));b(f)}}var a=d.extend(!0,{},d.inputmask.defaults,C),V=function(a){var b=document.createElement("input"),a="on"+a,c=a in b;c||(b.setAttribute(a,"return;"),c="function"==typeof b[a]);return c}("paste")?"paste":"input",U=null!=navigator.userAgent.match(/iphone/i),J=null!=navigator.userAgent.match(/android.*mobile safari.*/i);if(J)var W=navigator.userAgent.match(/mobile safari.*/i),J=533>=
+parseInt(RegExp(/[0-9]+/).exec(W));if("string"==typeof s)switch(s){case "mask":z(a.alias,C);var g=D(),i=I();return this.each(function(){O(this)});case "unmaskedvalue":return i=this.data("inputmask").tests,g=this.data("inputmask")._buffer,a.greedy=this.data("inputmask").greedy,a.repeat=this.data("inputmask").repeat,a.definitions=this.data("inputmask").definitions,T(this);case "remove":return this.each(function(){var f=d(this),b=this;setTimeout(function(){if(f.data("inputmask")){i=f.data("inputmask").tests;
+g=f.data("inputmask")._buffer;a.greedy=f.data("inputmask").greedy;a.repeat=f.data("inputmask").repeat;a.definitions=f.data("inputmask").definitions;b._valueSet(T(f,!0));f.removeData("inputmask");f.unbind(".inputmask");f.removeClass("focus.inputmask");var c;Object.getOwnPropertyDescriptor&&(c=Object.getOwnPropertyDescriptor(b,"value"));c&&c.get?b._valueGet&&Object.defineProperty(b,"value",{get:b._valueGet,set:b._valueSet}):document.__lookupGetter__&&b.__lookupGetter__("value")&&b._valueGet&&(b.__defineGetter__("value",
+b._valueGet),b.__defineSetter__("value",b._valueSet));delete b._valueGet;delete b._valueSet}},0)});case "getemptymask":return this.data("inputmask")?this.data("inputmask")._buffer.join(""):"";case "hasMaskedValue":return this.data("inputmask")?!this.data("inputmask").autoUnmask:!1;case "isComplete":return i=this.data("inputmask").tests,g=this.data("inputmask")._buffer,a.greedy=this.data("inputmask").greedy,a.repeat=this.data("inputmask").repeat,a.definitions=this.data("inputmask").definitions,N(this[0]);
+default:return z(s,C)||(a.mask=s),g=D(),i=I(),this.each(function(){O(this)})}else{if("object"==typeof s)return a=d.extend(!0,{},d.inputmask.defaults,s),z(a.alias,s),g=D(),i=I(),this.each(function(){O(this)});if(void 0==s)return this.each(function(){var f=d(this).attr("data-inputmask");if(f&&""!=f)try{var f=f.replace(RegExp("'","g"),'"'),b=d.parseJSON("{"+f+"}");a=d.extend(!0,{},d.inputmask.defaults,b);z(a.alias,b);a.alias=void 0;d(this).inputmask(a)}catch(c){}})}return this})})(jQuery);
View
2  jquery.inputmask.jquery.json
@@ -8,7 +8,7 @@
"inputmask",
"mask"
],
- "version": "1.3.4",
+ "version": "1.3.5"
"author": {
"name": "Robin Herbots",
"url": "http://github.com/RobinHerbots/jquery.inputmask"
View
12 js/jquery.inputmask.js
@@ -34,7 +34,7 @@
onKeyValidation: $.noop, //executes on every key-press with the result of isValid
//numeric basic properties
numericInput: false, //numericInput input direction style (input shifts to the left while holding the caret position)
- radixPoint: ".", // | ","
+ radixPoint: "", //".", // | ","
//numeric basic properties
definitions: {
'9': {
@@ -484,7 +484,7 @@
if (clearInvalid) {
writeBuffer(input, buffer);
}
- return isRTL ? (opts.numericInput ? ($.inArray(opts.radixPoint, buffer) != -1 && skipRadixHandling !== true ? $.inArray(opts.radixPoint, buffer) : seekNext(buffer, maskL)) : seekNext(buffer, rtlMatch)) : seekNext(buffer, lastMatch);
+ return isRTL ? (opts.numericInput ? (opts.radixPoint != "" && $.inArray(opts.radixPoint, buffer) != -1 && skipRadixHandling !== true ? $.inArray(opts.radixPoint, buffer) : seekNext(buffer, maskL)) : seekNext(buffer, rtlMatch)) : seekNext(buffer, lastMatch);
}
function escapeRegex(str) {
@@ -892,7 +892,7 @@
var input = this, k = e.keyCode, pos = caret(input);
//set input direction according the position to the radixPoint
- if (opts.numericInput) {
+ if (opts.numericInput && opts.radixPoint != "") {
var nptStr = input._valueGet();
var radixPosition = nptStr.indexOf(opts.radixPoint);
if (radixPosition != -1) {
@@ -917,9 +917,13 @@
beginPos = firstMaskPos;
}
if (beginPos >= firstMaskPos) {
+ console.log('before delete ' + buffer);
if (opts.numericInput && opts.greedy && k == opts.keyCode.DELETE && buffer[beginPos] == opts.radixPoint) {
beginPos = seekNext(buffer, beginPos);
isRTL = false;
+ } else if (opts.numericInput && opts.greedy && k == opts.keyCode.BACKSPACE && buffer[beginPos] == opts.radixPoint) {
+ beginPos--;
+ isRTL = true;
}
if (isRTL) {
beginPos = shiftR(firstMaskPos, beginPos, getPlaceHolder(beginPos), true);
@@ -1020,7 +1024,7 @@
} else writeOutBuffer = false;
} else setBufferElement(buffer, p, c);
if (writeOutBuffer) {
- writeBuffer(input, buffer, opts.numericInput ? seekNext(buffer, p) : p);
+ writeBuffer(input, buffer, opts.numericInput ? p + 1 : p);
setTimeout(function () { //timeout needed for IE
if (isComplete(input))
$input.trigger("complete");
Please sign in to comment.
Something went wrong with that request. Please try again.