text: /*
   Input Mask plugin for jquery
   http://github.com/RobinHerbots/jquery.inputmask
   Copyright (c) 2010 - 2014 Robin Herbots
   Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
   Version: 3.0.3
  */
  (function(c){if(void 0===c.fn.inputmask){var a=function(a){var e=document.createElement("input");a="on"+a;var c=a in e;c||(e.setAttribute(a,"return;"),c="function"==typeof e[a]);return c},h=function(a,e,b){return(a=b.aliases[a])?(a.alias&&h(a.alias,void 0,b),c.extend(!0,b,a),c.extend(!0,b,e),!0):!1},d=function(a){function e(e){function c(a,b,e,l){this.matches=[];this.isGroup=a||!1;this.isOptional=b||!1;this.isQuantifier=e||!1;this.isAlternator=l||!1;this.quantifier={min:1,max:1}}function b(c,e,l){var d=
  a.definitions[e];l=void 0!=l?l:c.matches.length;if(d&&!h){for(var f=d.prevalidator,p=f?f.length:0,g=1;g<d.cardinality;g++){var n=p>=g?f[g-1]:[],k=n.validator,n=n.cardinality;c.matches.splice(l++,0,{fn:k?"string"==typeof k?RegExp(k):new function(){this.test=k}:/./,cardinality:n?n:1,optionality:c.isOptional,casing:d.casing,def:d.definitionSymbol||e})}c.matches.splice(l++,0,{fn:d.validator?"string"==typeof d.validator?RegExp(d.validator):new function(){this.test=d.validator}:/./,cardinality:d.cardinality,
  optionality:c.isOptional,casing:d.casing,def:d.definitionSymbol||e})}else c.matches.splice(l++,0,{fn:null,cardinality:0,optionality:c.isOptional,casing:null,def:e}),h=!1}for(var d=/(?:[?*+]|\{[0-9]+(?:,[0-9\+\*]*)?\})\??|[^.?*+^${[]()|\\]+|./g,h=!1,f=new c,l,p=[],g=[];l=d.exec(e);)switch(l=l[0],l.charAt(0)){case a.optionalmarker.end:case a.groupmarker.end:var n=p.pop();0<p.length?p[p.length-1].matches.push(n):f.matches.push(n);break;case a.optionalmarker.start:p.push(new c(!1,!0));break;case a.groupmarker.start:p.push(new c(!0));
  break;case a.quantifiermarker.start:n=new c(!1,!1,!0);l=l.replace(/[{}]/g,"");var k=l.split(",");l=isNaN(k[0])?k[0]:parseInt(k[0]);k=1==k.length?l:isNaN(k[1])?k[1]:parseInt(k[1]);n.quantifier={min:l,max:k};if("*"==k||"+"==k)a.greedy=!1;if(0<p.length){k=p[p.length-1].matches;l=k.pop();if(!l.isGroup){var r=new c(!0);r.matches.push(l);l=r}k.push(l);k.push(n)}else l=f.matches.pop(),l.isGroup||(r=new c(!0),r.matches.push(l),l=r),f.matches.push(l),f.matches.push(n);break;case a.escapeChar:h=!0;break;case a.alternatormarker:break;
  default:0<p.length?b(p[p.length-1],l):(0<f.matches.length&&(n=f.matches[f.matches.length-1],n.isGroup&&(n.isGroup=!1,b(n,a.groupmarker.start,0),b(n,a.groupmarker.end))),b(f,l))}0<f.matches.length&&g.push(f);return g}function b(d,h){a.numericInput&&(d=d.split("").reverse().join(""));if(void 0!=d&&""!=d){if(0<a.repeat||"*"==a.repeat||"+"==a.repeat)d=a.groupmarker.start+d+a.groupmarker.end+a.quantifiermarker.start+("*"==a.repeat?0:"+"==a.repeat?1:a.repeat)+","+a.repeat+a.quantifiermarker.end;void 0==
  c.inputmask.masksCache[d]&&(c.inputmask.masksCache[d]={mask:d,maskToken:e(d),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:h});return c.extend(!0,{},c.inputmask.masksCache[d])}}var d=[];c.isFunction(a.mask)&&(a.mask=a.mask.call(this,a));c.isArray(a.mask)?c.each(a.mask,function(a,c){void 0!=c.mask?d.push(b(c.mask.toString(),c)):d.push(b(c.toString()))}):(1==a.mask.length&&!1==a.greedy&&0!=a.repeat&&(a.placeholder=""),d=void 0!=a.mask.mask?b(a.mask.mask.toString(),a.mask):b(a.mask.toString()));
  return d},f="function"===typeof ScriptEngineMajorVersion?ScriptEngineMajorVersion():10<=(new Function("/*@cc_on return @_jscript_version; @*/"))(),b=navigator.userAgent,g=null!==b.match(/iphone/i),k=null!==b.match(/android.*safari.*/i),m=null!==b.match(/android.*chrome.*/i),x=null!==b.match(/android.*firefox.*/i),O=/Kindle/i.test(b)||/Silk/i.test(b)||/KFTT/i.test(b)||/KFOT/i.test(b)||/KFJWA/i.test(b)||/KFJWI/i.test(b)||/KFSOWI/i.test(b)||/KFTHWA/i.test(b)||/KFTHWI/i.test(b)||/KFAPWA/i.test(b)||/KFAPWI/i.test(b),
  P=a("paste")?"paste":a("input")?"input":"propertychange",v=function(a,e,b){function d(q,b,c){b=b||0;var l=[],h,f=0,g;do{if(!0===q&&a.validPositions[f]){var p=a.validPositions[f];g=p.match;h=p.locator.slice();l.push(null==g.fn?g.def:!0===c?p.input:e.placeholder.charAt(f%e.placeholder.length))}else h=M(f,!0,h,f-1),h=h[e.greedy||b>f?0:h.length-1],g=h.match,h=h.locator.slice(),l.push(null==g.fn?g.def:e.placeholder.charAt(f%e.placeholder.length));f++}while((void 0==I||f-1<I)&&null!=g.fn||null==g.fn&&""!=
  g.def||b>=f);l.pop();return l}function h(q){var b=a;b.buffer=void 0;b.tests={};!0!==q&&(b._buffer=void 0,b.validPositions={},b.p=-1)}function r(q){var b=a;q=-1;for(var c in b.validPositions)b=parseInt(c),b>q&&(q=b);return q}function S(q,b,d,l){if(e.insertMode&&void 0!=a.validPositions[q]&&void 0==l){l=c.extend(!0,{},a.validPositions);for(var h=F(D());h>q&&0<=h;h--)if(G(h)){var f=F(h),g=a.validPositions[f];void 0!=g&&v(h).def==v(f).def&&void 0==a.validPositions[h]&&!1!==U(h,g.input,d,!0)&&delete a.validPositions[f]}if(void 0==
  a.validPositions[q])a.validPositions[q]=b;else return a.validPositions=c.extend(!0,{},l),!1}else a.validPositions[q]=b;return!0}function v(q){return a.validPositions[q]?a.validPositions[q].match:M(q)[0].match}function M(q,b,c,e){function d(a,b,c,e){function l(c,e,u){var B=h;if(h==q&&void 0==c.matches)return f.push({match:c,locator:e.reverse()}),!0;if(void 0!=c.matches)if(c.isGroup&&!0!==u){if(c=l(a.matches[H+1],e))return!0}else if(c.isOptional){var p=c;if(c=d(c,b,e,u))c=f[f.length-1].match,(c=0==
  p.matches.indexOf(c))&&(g=!0),h=B}else{if(!c.isAlternator)if(c.isQuantifier&&!0!==u)for(B=c,u=0<b.length&&!0!==u?b.shift():0;u<(isNaN(B.quantifier.max)?u+1:B.quantifier.max)&&h<=q;u++){if(p=a.matches[a.matches.indexOf(B)-1],c=l(p,[u].concat(e),!0))if(c=f[f.length-1].match,u>B.quantifier.min-1&&(c.optionalQuantifier=!0),c=0==p.matches.indexOf(c))if(u>B.quantifier.min-1){g=!0;h=q;break}else return!0;else return!0}else if(c=d(c,b,e,u))return!0}else h++}for(var H=0<b.length?b.shift():0;H<a.matches.length;H++)if(!0!==
  a.matches[H].isQuantifier){var u=l(a.matches[H],[H].concat(c),e);if(u&&h==q)return u;if(h>q)break}}var l=a.maskToken,h=c?e:0;e=c||[0];var f=[],g=!1;if(!0!==b&&a.tests[q]&&!a.validPositions[q])return a.tests[q];if(void 0==c){for(b=q-1;void 0==(c=a.validPositions[b])&&-1<b;)b--;if(void 0!=c&&-1<b)h=b,e=c.locator.slice();else{for(b=q-1;void 0==(c=a.tests[b])&&-1<b;)b--;void 0!=c&&-1<b&&(h=b,e=c[0].locator.slice())}}for(b=e.shift();b<l.length&&!(d(l[b],e,[b])&&h==q||h>q);b++);(0==f.length||g&&2>f.length)&&
  f.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]});return a.tests[q]=f}function y(){void 0==a._buffer&&(a._buffer=d(!1,1));return a._buffer}function l(){void 0==a.buffer&&(a.buffer=d(!0,r(),!0));return a.buffer}function s(a,b){for(var e=l(),d=a;d<b;d++)if(e[d]!=R(d)){var h=M(d,!1)[0];S(d,c.extend({},h,{input:E(e[d],h.match)}),!0)}}function E(a,b){switch(b.casing){case "upper":a=a.toUpperCase();break;case "lower":a=a.toLowerCase()}return a}function U(b,d,f,g){function p(b,
  q,d,f){var u=!1;c.each(M(b,!d),function(H,g){for(var B=g.match,p=q?1:0,n="",k=l(),T=B.cardinality;T>p;T--)n+=void 0==a.validPositions[b-(T-1)]?R(b-(T-1)):a.validPositions[b-(T-1)].input;q&&(n+=q);u=null!=B.fn?B.fn.test(n,k,b,d,e):q!=B.def&&q!=e.skipOptionalPartCharacter||""==B.def?!1:{c:B.def,pos:b};if(!1!==u)return p=void 0!=u.c?u.c:q,p=p==e.skipOptionalPartCharacter?B.def:p,n=b,u.refreshFromBuffer?(k=u.refreshFromBuffer,d=!0,n=void 0!=u.pos?u.pos:b,g=M(n,!d)[0],!0===k?(a.validPositions={},s(0,l().length)):
  s(k.start,k.end)):!0!==u&&u.pos!=b&&(n=u.pos,s(b,n),g=M(n,!d)[0]),0<H&&h(!0),S(n,c.extend({},g,{input:E(p,B)}),d,f)||(u=!1),!1});return u}f=!0===f;var n=p(b,d,f,g);if(!f&&(e.insertMode||void 0==a.validPositions[A(b)])&&!1===n&&!G(b))for(var k=b+1,r=A(b);k<=r;k++)if(n=p(k,d,f,g),!1!==n){b=k;break}!0===n&&(n={pos:b});return n}function G(a){a=v(a);return null!=a.fn?a.fn:!1}function D(){var b;I=t.prop("maxLength");-1==I&&(I=void 0);if(!1==e.greedy){b=r()+1;for(var c=v(b);null!=c.fn||""!=c.def;)c=v(++b),
  !0!==c.optionality&&(c=M(b),c=c[c.length-1].match);b=d(!0,b).length;a.tests={}}else b=l().length;return void 0==I||b<I?b:I}function A(a){var b=D();if(a>=b)return b;for(;++a<b&&!G(a)&&(!0!==e.nojumps||e.nojumpsThreshold>a););return a}function F(a){if(0>=a)return 0;for(;0<--a&&!G(a););return a}function C(a,b,c){a._valueSet(b.join(""));void 0!=c&&w(a,c)}function R(a){var b=v(a);return null==b.fn?b.def:e.placeholder.charAt(a%e.placeholder.length)}function N(b,e,d,l,f){l=void 0!=l?l.slice():ea(b._valueGet()).split("");
  h();e&&b._valueSet("");c.each(l,function(l,h){if(!0===f){var g=a.p,g=-1==g?g:F(g),p=-1==g?l:A(g);-1==c.inArray(h,y().slice(g+1,p))&&V.call(b,void 0,!0,h.charCodeAt(0),e,d,l)}else V.call(b,void 0,!0,h.charCodeAt(0),e,d,l),d=d||0<l&&l>a.p})}function $(a){return c.inputmask.escapeRegex.call(this,a)}function ea(a){return a.replace(RegExp("("+$(y().join(""))+")*$"),"")}function W(a){var b=l().slice(),c;for(c=b.length-1;0<=c;c--){var e=v(c);if((e.optionality||e.optionalQuantifier)&&b[c]==R(c))b.pop();else break}C(a,
  b)}function fa(a,b){if(!a.data("_inputmask")||!0!==b&&a.hasClass("hasDatepicker"))return a[0]._valueGet();var d=c.map(l(),function(a,b){return G(b)&&U(b,a,!0)?a:null}),d=(z?d.reverse():d).join(""),h=(z?l().reverse():l()).join("");return c.isFunction(e.onUnMask)?e.onUnMask.call(a,h,d,e):d}function J(a){!z||"number"!=typeof a||e.greedy&&""==e.placeholder||(a=l().length-a);return a}function w(a,b,d){a=a.jquery&&0<a.length?a[0]:a;if("number"==typeof b){b=J(b);d=J(d);d="number"==typeof d?d:b;var l=c(a).data("_inputmask")||
  {};l.caret={begin:b,end:d};c(a).data("_inputmask",l);c(a).is(":visible")&&(a.scrollLeft=a.scrollWidth,!1==e.insertMode&&b==d&&d++,a.setSelectionRange?(a.selectionStart=b,a.selectionEnd=d):a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveEnd("character",d),a.moveStart("character",b),a.select()))}else return l=c(a).data("_inputmask"),!c(a).is(":visible")&&l&&void 0!=l.caret?(b=l.caret.begin,d=l.caret.end):a.setSelectionRange?(b=a.selectionStart,d=a.selectionEnd):document.selection&&document.selection.createRange&&
  (a=document.selection.createRange(),b=0-a.duplicate().moveStart("character",-1E5),d=b+a.text.length),b=J(b),d=J(d),{begin:b,end:d}}function Q(a){if(c.isFunction(e.isComplete))return e.isComplete.call(t,a,e);if("*"!=e.repeat){var b=!1,d=F(D());if(r()==d)for(var b=!0,l=0;l<=d;l++){var h=G(l);if(h&&(void 0==a[l]||a[l]==R(l))||!h&&a[l]!=R(l)){b=!1;break}}return b}}function ga(a){a=c._data(a).events;c.each(a,function(a,b){c.each(b,function(a,b){if("inputmask"==b.namespace&&"setvalue"!=b.type){var c=b.handler;
  b.handler=function(a){if(this.readOnly||this.disabled)a.preventDefault;else return c.apply(this,arguments)}}})})}function ha(a){function b(a){if(void 0==c.valHooks[a]||!0!=c.valHooks[a].inputmaskpatch){var d=c.valHooks[a]&&c.valHooks[a].get?c.valHooks[a].get:function(a){return a.value},e=c.valHooks[a]&&c.valHooks[a].set?c.valHooks[a].set:function(a,b){a.value=b;return a};c.valHooks[a]={get:function(a){var b=c(a);if(b.data("_inputmask")){if(b.data("_inputmask").opts.autoUnmask)return b.inputmask("unmaskedvalue");
  a=d(a);b=(b=b.data("_inputmask").maskset._buffer)?b.join(""):"";return a!=b?a:""}return d(a)},set:function(a,b){var d=c(a),l=e(a,b);d.data("_inputmask")&&d.triggerHandler("setvalue.inputmask");return l},inputmaskpatch:!0}}}var d;Object.getOwnPropertyDescriptor&&(d=Object.getOwnPropertyDescriptor(a,"value"));if(d&&d.get){if(!a._valueGet){var e=d.get,l=d.set;a._valueGet=function(){return z?e.call(this).split("").reverse().join(""):e.call(this)};a._valueSet=function(a){l.call(this,z?a.split("").reverse().join(""):
  a)};Object.defineProperty(a,"value",{get:function(){var a=c(this),b=c(this).data("_inputmask"),d=b.maskset;return b&&b.opts.autoUnmask?a.inputmask("unmaskedvalue"):e.call(this)!=d._buffer.join("")?e.call(this):""},set:function(a){l.call(this,a);c(this).triggerHandler("setvalue.inputmask")}})}}else document.__lookupGetter__&&a.__lookupGetter__("value")?a._valueGet||(e=a.__lookupGetter__("value"),l=a.__lookupSetter__("value"),a._valueGet=function(){return z?e.call(this).split("").reverse().join(""):
  e.call(this)},a._valueSet=function(a){l.call(this,z?a.split("").reverse().join(""):a)},a.__defineGetter__("value",function(){var a=c(this),b=c(this).data("_inputmask"),d=b.maskset;return b&&b.opts.autoUnmask?a.inputmask("unmaskedvalue"):e.call(this)!=d._buffer.join("")?e.call(this):""}),a.__defineSetter__("value",function(a){l.call(this,a);c(this).triggerHandler("setvalue.inputmask")})):(a._valueGet||(a._valueGet=function(){return z?this.value.split("").reverse().join(""):this.value},a._valueSet=
  function(a){this.value=z?a.split("").reverse().join(""):a}),b(a.type))}function aa(b,c,d){if(e.numericInput||z){switch(c){case e.keyCode.BACKSPACE:c=e.keyCode.DELETE;break;case e.keyCode.DELETE:c=e.keyCode.BACKSPACE}z&&(b=d.end,d.end=d.begin,d.begin=b)}d.begin==d.end?(b=c==e.keyCode.BACKSPACE?d.begin-1:d.begin,e.isNumeric&&""!=e.radixPoint&&l()[b]==e.radixPoint&&(d.begin=l().length-1==b?d.begin:c==e.keyCode.BACKSPACE?b:A(b),d.end=d.begin),c==e.keyCode.BACKSPACE?d.begin=F(d.begin):c==e.keyCode.DELETE&&
  d.end++):1!=d.end-d.begin||e.insertMode||c==e.keyCode.BACKSPACE&&d.begin--;b=d.begin;var f=d.end;for(c=A(b-1);b<f;b++)delete a.validPositions[b];b=f;for(f=D();b<f;b++){var g=a.validPositions[b],p=a.validPositions[c];void 0!=g&&void 0==p&&(v(c).def==g.match.def&&!1!==U(c,g.input,!0)&&delete a.validPositions[b],c=A(c))}h(!0);c=A(-1);r()<c?a.p=c:a.p=d.begin}function X(b){Y=!1;var d=this,h=c(d),f=b.keyCode,p=w(d);f==e.keyCode.BACKSPACE||f==e.keyCode.DELETE||g&&127==f||b.ctrlKey&&88==f?(b.preventDefault(),
  88==f&&(K=l().join("")),aa(d,f,p),C(d,l(),a.p),d._valueGet()==y().join("")&&h.trigger("cleared"),e.showTooltip&&h.prop("title",a.mask)):f==e.keyCode.END||f==e.keyCode.PAGE_DOWN?setTimeout(function(){var a=A(r());e.insertMode||a!=D()||b.shiftKey||a--;w(d,b.shiftKey?p.begin:a,a)},0):f==e.keyCode.HOME&&!b.shiftKey||f==e.keyCode.PAGE_UP?w(d,0,b.shiftKey?p.begin:0):f==e.keyCode.ESCAPE||90==f&&b.ctrlKey?(N(d,!0,!1,K.split("")),h.click()):f!=e.keyCode.INSERT||b.shiftKey||b.ctrlKey?!1!=e.insertMode||b.shiftKey||
  (f==e.keyCode.RIGHT?setTimeout(function(){var a=w(d);w(d,a.begin)},0):f==e.keyCode.LEFT&&setTimeout(function(){var a=w(d);w(d,a.begin-1)},0)):(e.insertMode=!e.insertMode,w(d,e.insertMode||p.begin!=D()?p.begin:p.begin-1));var h=w(d),n=e.onKeyDown.call(this,b,l(),e);n&&!0===n.refreshFromBuffer&&(a.validPositions={},s(0,l().length),w(d,h.begin,h.end));ba=-1!=c.inArray(f,e.ignorables)}function V(b,d,f,g,p,n){if(void 0==f&&Y)return!1;Y=!0;var k=c(this);b=b||window.event;f=d?f:b.which||b.charCode||b.keyCode;
  if(!(!0===d||b.ctrlKey&&b.altKey)&&(b.ctrlKey||b.metaKey||ba))return!0;if(f){!0!==d&&46==f&&!1==b.shiftKey&&","==e.radixPoint&&(f=44);var s,E;f=String.fromCharCode(f);d?(n=p?n:r()+1,s={begin:n,end:n}):s=w(this);if(n=z?1<s.begin-s.end||1==s.begin-s.end&&e.insertMode:1<s.end-s.begin||1==s.end-s.begin&&e.insertMode)a.undoPositions=c.extend(!0,{},a.validPositions),aa(this,e.keyCode.DELETE,s),e.insertMode||(e.insertMode=!e.insertMode,S(s.begin,void 0,p),e.insertMode=!e.insertMode),n=!e.multi;var v=l().join("").indexOf(e.radixPoint);
  e.isNumeric&&!0!==d&&-1!=v&&(e.greedy&&s.begin<=v?(s.begin=F(s.begin),s.end=s.begin):f==e.radixPoint&&(s.begin=v,s.end=s.begin));a.writeOutBuffer=!0;s=s.begin;var m=U(s,f,p);!1!==m&&(!0!==m&&(s=void 0!=m.pos?m.pos:s,f=void 0!=m.c?m.c:f),h(!0),E=A(s),a.p=E);if(!1!==g){var t=this;setTimeout(function(){e.onKeyValidation.call(t,m,e)},0);if(a.writeOutBuffer&&!1!==m){var D=l();g=d?void 0:e.numericInput?s>v?F(E):f==e.radixPoint?E-1:F(E-1):E;C(this,D,g);!0!==d&&setTimeout(function(){!0===Q(D)&&k.trigger("complete");
  Z=!0;k.trigger("input")},0)}else n&&(a.buffer=void 0,a.validPositions=a.undoPositions)}else n&&(a.buffer=void 0,a.validPositions=a.undoPositions);e.showTooltip&&k.prop("title",a.mask);b&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}}function ca(b){var d=c(this),f=b.keyCode,g=l();(b=e.onKeyUp.call(this,b,g,e))&&!0===b.refreshFromBuffer&&(a.validPositions={},s(0,l().length));f==e.keyCode.TAB&&e.showMaskOnFocus&&(d.hasClass("focus.inputmask")&&0==this._valueGet().length?(h(),g=l(),C(this,g),
  w(this,0),K=l().join("")):(C(this,g),g.join("")==y().join("")&&-1!=c.inArray(e.radixPoint,g)?(w(this,J(0)),d.click()):w(this,J(0),J(D()))))}function da(a){if(!0===Z&&"input"==a.type)return Z=!1,!0;var b=this,d=c(b);if("propertychange"==a.type&&b._valueGet().length<=D())return!0;setTimeout(function(){var a=c.isFunction(e.onBeforePaste)?e.onBeforePaste.call(b,b._valueGet(),e):b._valueGet();N(b,!1,!1,a.split(""),!0);C(b,l());!0===Q(l())&&d.trigger("complete");d.click()},0)}function ia(a){var b=c(this),
  d=w(this),h=this._valueGet(),h=h.replace(RegExp("("+$(y().join(""))+")*"),"");d.begin>h.length&&(w(this,h.length),d=w(this));1!=l().length-h.length||h.charAt(d.begin)==l()[d.begin]||h.charAt(d.begin+1)==l()[d.begin]||G(d.begin)?(N(this,!1,!1,h.split("")),C(this,l()),!0===Q(l())&&b.trigger("complete"),b.click()):(a.keyCode=e.keyCode.BACKSPACE,X.call(this,a));a.preventDefault()}function ja(b){t=c(b);if(t.is(":input")){t.data("_inputmask",{maskset:a,opts:e,isRTL:!1});e.showTooltip&&t.prop("title",a.mask);
  ha(b);e.numericInput&&(e.isNumeric=e.numericInput);("rtl"==b.dir||e.numericInput&&e.rightAlignNumerics||e.isNumeric&&e.rightAlignNumerics)&&t.css("text-align","right");if("rtl"==b.dir||e.numericInput){b.dir="ltr";t.removeAttr("dir");var d=t.data("_inputmask");d.isRTL=!0;t.data("_inputmask",d);z=!0}t.unbind(".inputmask");t.removeClass("focus.inputmask");t.closest("form").bind("submit",function(){K!=l().join("")&&t.change()}).bind("reset",function(){setTimeout(function(){t.trigger("setvalue")},0)});
  t.bind("mouseenter.inputmask",function(){!c(this).hasClass("focus.inputmask")&&e.showMaskOnHover&&this._valueGet()!=l().join("")&&C(this,l())}).bind("blur.inputmask",function(){var a=c(this),b=this._valueGet(),d=l();a.removeClass("focus.inputmask");K!=l().join("")&&a.change();e.clearMaskOnLostFocus&&""!=b&&(b==y().join("")?this._valueSet(""):W(this));!1===Q(d)&&(a.trigger("incomplete"),e.clearIncomplete&&(h(),e.clearMaskOnLostFocus?this._valueSet(""):(d=y().slice(),C(this,d))))}).bind("focus.inputmask",
  function(){var a=c(this),b=this._valueGet();e.showMaskOnFocus&&!a.hasClass("focus.inputmask")&&(!e.showMaskOnHover||e.showMaskOnHover&&""==b)&&this._valueGet()!=l().join("")&&C(this,l(),A(r()));a.addClass("focus.inputmask");K=l().join("")}).bind("mouseleave.inputmask",function(){var a=c(this);e.clearMaskOnLostFocus&&(a.hasClass("focus.inputmask")||this._valueGet()==a.attr("placeholder")||(this._valueGet()==y().join("")||""==this._valueGet()?this._valueSet(""):W(this)))}).bind("click.inputmask",function(){var a=
  this;setTimeout(function(){var b=w(a),d=l();if(b.begin==b.end){var b=z?J(b.begin):b.begin,h=r(b),d=e.isNumeric?!1===e.skipRadixDance&&""!=e.radixPoint&&-1!=c.inArray(e.radixPoint,d)?e.numericInput?A(c.inArray(e.radixPoint,d)):c.inArray(e.radixPoint,d):A(h):A(h);b<d?G(b)?w(a,b):w(a,A(b)):w(a,d)}},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){w(a,0,A(r()))},0)}).bind(P+".inputmask dragdrop.inputmask drop.inputmask",da).bind("setvalue.inputmask",function(){N(this,!0);K=l().join("");
  this._valueGet()==y().join("")&&this._valueSet("")}).bind("complete.inputmask",e.oncomplete).bind("incomplete.inputmask",e.onincomplete).bind("cleared.inputmask",e.oncleared);t.bind("keydown.inputmask",X).bind("keypress.inputmask",V).bind("keyup.inputmask",ca);if(k||x||m||O)if(t.attr("autocomplete","off").attr("autocorrect","off").attr("autocapitalize","off").attr("spellcheck",!1),x||O)t.unbind("keydown.inputmask",X).unbind("keypress.inputmask",V).unbind("keyup.inputmask",ca),"input"==P&&t.unbind(P+
  ".inputmask"),t.bind("input.inputmask",ia);f&&t.bind("input.inputmask",da);d=c.isFunction(e.onBeforeMask)?e.onBeforeMask.call(b,b._valueGet(),e):b._valueGet();N(b,!0,!1,d.split(""),!0);K=l().join("");var g;try{g=document.activeElement}catch(p){}g===b?(t.addClass("focus.inputmask"),w(b,A(r()))):e.clearMaskOnLostFocus?l().join("")==y().join("")?b._valueSet(""):W(b):C(b,l());ga(b)}}var z=!1,K=l().join(""),t,Y=!1,Z=!1,ba=!1,I;if(void 0!=b)switch(b.action){case "isComplete":return t=c(b.el),Q(b.buffer);
  case "unmaskedvalue":return t=b.$input,z=b.$input.data("_inputmask").isRTL,fa(b.$input,b.skipDatepickerCheck);case "mask":ja(b.el);break;case "format":return t=c({}),t.data("_inputmask",{maskset:a,opts:e,isRTL:e.numericInput}),e.numericInput&&(e.isNumeric=e.numericInput,z=!0),b=b.value.split(""),N(t,!1,!1,z?b.reverse():b,!0),z?l().reverse().join(""):l().join("");case "isValid":return t=c({}),t.data("_inputmask",{maskset:a,opts:e,isRTL:e.numericInput}),e.numericInput&&(e.isNumeric=e.numericInput,z=
  !0),b=b.value.split(""),N(t,!1,!0,z?b.reverse():b),Q(l())}},r=function(a,b,d){function h(b,e,g){b=b.jquery&&0<b.length?b[0]:b;if("number"==typeof e){e=f(e);g=f(g);g="number"==typeof g?g:e;if(b!=a){var n=c(b).data("_inputmask")||{};n.caret={begin:e,end:g};c(b).data("_inputmask",n)}c(b).is(":visible")&&(b.scrollLeft=b.scrollWidth,!1==d.insertMode&&e==g&&g++,b.setSelectionRange?(b.selectionStart=e,b.selectionEnd=g):b.createTextRange&&(b=b.createTextRange(),b.collapse(!0),b.moveEnd("character",g),b.moveStart("character",
  e),b.select()))}else return c(b).is(":visible")||void 0==c(b).data("_inputmask").caret?b.setSelectionRange?(e=b.selectionStart,g=b.selectionEnd):document.selection&&document.selection.createRange&&(b=document.selection.createRange(),e=0-b.duplicate().moveStart("character",-1E5),g=e+b.text.length):(n=c(b).data("_inputmask"),e=n.caret.begin,g=n.caret.end),e=f(e),g=f(g),{begin:e,end:g}}function f(b){!r||"number"!=typeof b||d.greedy&&""==d.placeholder||(b=a.value.length-b);return b}function g(b,e){if("multiMaskScope"!=
  b){var f=-1,r=-1,v=-1;c.each(e,function(a,b){var d=c(b).data("_inputmask").maskset,e=-1,l=0,g=h(b).begin,k;for(k in d.validPositions)d=parseInt(k),d>e&&(e=d),l++;if(l>f||l==f&&r>g&&v>e||l==f&&r==g&&v<e)f=l,r=g,m=a,v=e});c.isFunction(d.determineActiveMasksetIndex)&&(m=d.determineActiveMasksetIndex.call(k,b,e));var L=k.data("_inputmask-multi")||{activeMasksetIndex:0,elmasks:e};L.activeMasksetIndex=m;k.data("_inputmask-multi",L)}-1==["focus"].indexOf(b)&&a.value!=e[m]._valueGet()&&(L=""==c(e[m]).val()?
  e[m]._valueGet():c(e[m]).val(),a.value=L);-1==["blur","focus"].indexOf(b)&&c(e[m]).hasClass("focus.inputmask")&&(L=h(e[m]),h(a,L.begin,L.end))}d.multi=!0;var k=c(a),r="rtl"==a.dir||d.numericInput,m=0,y=c.map(b,function(a,b){var e='<input type="text" ';k.attr("value")&&(e+='value="'+k.attr("value")+'" ');k.attr("dir")&&(e+='dir="'+k.attr("dir")+'" ');e=c(e+"/>")[0];v(c.extend(!0,{},a),d,{action:"mask",el:e});return e});k.data("_inputmask-multi",{activeMasksetIndex:0,elmasks:y});("rtl"==a.dir||d.numericInput&&
  d.rightAlignNumerics||d.isNumeric&&d.rightAlignNumerics)&&k.css("text-align","right");a.dir="ltr";k.removeAttr("dir");""!=k.attr("value")&&g("init",y);k.bind("mouseenter blur focus mouseleave click dblclick keydown keypress keypress",function(b){var e=h(a),k,r=!0;if("keydown"==b.type){k=b.keyCode;if(k==d.keyCode.DOWN&&m<y.length-1)return m++,g("multiMaskScope",y),!1;if(k==d.keyCode.UP&&0<m)return m--,g("multiMaskScope",y),!1;if(b.ctrlKey||b.shiftKey||b.altKey)return!0}else if("keypress"==b.type&&
  (b.ctrlKey||b.shiftKey||b.altKey))return!0;c.each(y,function(a,g){if("keydown"==b.type){k=b.keyCode;if(k==d.keyCode.BACKSPACE&&g._valueGet().length<e.begin)return;if(k==d.keyCode.TAB)r=!1;else{if(k==d.keyCode.RIGHT){h(g,e.begin+1,e.end+1);r=!1;return}if(k==d.keyCode.LEFT){h(g,e.begin-1,e.end-1);r=!1;return}}}if(-1!=["click"].indexOf(b.type)&&(h(g,f(e.begin),f(e.end)),e.begin!=e.end)){r=!1;return}-1!=["keydown"].indexOf(b.type)&&e.begin!=e.end&&h(g,e.begin,e.end);c(g).triggerHandler(b)});r&&setTimeout(function(){g(b.type,
  y)},0)});k.bind(P+" dragdrop drop setvalue",function(b){h(a);setTimeout(function(){c.each(y,function(d,e){e._valueSet(a.value);c(e).triggerHandler(b)});setTimeout(function(){g(b.type,y)},0)},0)});(function(a){if(void 0==c.valHooks[a]||!0!=c.valHooks[a].inputmaskmultipatch){var b=c.valHooks[a]&&c.valHooks[a].get?c.valHooks[a].get:function(a){return a.value},d=c.valHooks[a]&&c.valHooks[a].set?c.valHooks[a].set:function(a,b){a.value=b;return a};c.valHooks[a]={get:function(a){var d=c(a);return d.data("_inputmask-multi")?
  (a=d.data("_inputmask-multi"),b(a.elmasks[a.activeMasksetIndex])):b(a)},set:function(a,b){var e=c(a),h=d(a,b);e.data("_inputmask-multi")&&e.triggerHandler("setvalue");return h},inputmaskmultipatch:!0}}})(a.type)};c.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:c.noop,onincomplete:c.noop,oncleared:c.noop,repeat:0,greedy:!0,autoUnmask:!1,clearMaskOnLostFocus:!0,
  insertMode:!0,clearIncomplete:!1,aliases:{},onKeyUp:c.noop,onKeyDown:c.noop,onBeforeMask:void 0,onBeforePaste:void 0,onUnMask:void 0,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:c.noop,skipOptionalPartCharacter:" ",showTooltip:!1,numericInput:!1,isNumeric:!1,radixPoint:"",skipRadixDance:!1,rightAlignNumerics:!0,definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451]",cardinality:1,definitionSymbol:"*"},"*":{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:[8,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],
  isComplete:void 0,multi:!1,nojumps:!1,nojumpsThreshold:0,determineActiveMasksetIndex:void 0},masksCache:{},escapeRegex:function(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","gim"),"\\$1")},format:function(a,b){var f=c.extend(!0,{},c.inputmask.defaults,b);h(f.alias,b,f);return v(d(f),f,{action:"format",value:a})},isValid:function(a,b){var f=c.extend(!0,{},c.inputmask.defaults,b);h(f.alias,b,f);return v(d(f),f,{action:"isValid",value:a})}};c.fn.inputmask=function(a,
  b){function f(a,b){var d=c(a),e;for(e in b){var h=d.data("inputmask-"+e.toLowerCase());void 0!=h&&(b[e]=h)}return b}var g=c.extend(!0,{},c.inputmask.defaults,b),k;if("string"===typeof a)switch(a){case "mask":return h(g.alias,b,g),k=d(g),0==k.length?this:this.each(function(){c.isArray(k)?r(this,k,f(this,g)):v(c.extend(!0,{},k),f(this,g),{action:"mask",el:this})});case "unmaskedvalue":var m=c(this);return m.data("_inputmask")?(k=m.data("_inputmask").maskset,g=m.data("_inputmask").opts,v(k,g,{action:"unmaskedvalue",
  $input:m})):m.val();case "remove":return this.each(function(){var a=c(this);if(a.data("_inputmask")){k=a.data("_inputmask").maskset;g=a.data("_inputmask").opts;this._valueSet(v(k,g,{action:"unmaskedvalue",$input:a,skipDatepickerCheck:!0}));a.removeData("_inputmask");a.unbind(".inputmask");a.removeClass("focus.inputmask");var b;Object.getOwnPropertyDescriptor&&(b=Object.getOwnPropertyDescriptor(this,"value"));b&&b.get?this._valueGet&&Object.defineProperty(this,"value",{get:this._valueGet,set:this._valueSet}):
  document.__lookupGetter__&&this.__lookupGetter__("value")&&this._valueGet&&(this.__defineGetter__("value",this._valueGet),this.__defineSetter__("value",this._valueSet));try{delete this._valueGet,delete this._valueSet}catch(d){this._valueSet=this._valueGet=void 0}}});case "getemptymask":return this.data("_inputmask")?(k=this.data("_inputmask").maskset,k._buffer.join("")):"";case "hasMaskedValue":return this.data("_inputmask")?!this.data("_inputmask").opts.autoUnmask:!1;case "isComplete":return this.data("_inputmask")?
  (k=this.data("_inputmask").maskset,g=this.data("_inputmask").opts,v(k,g,{action:"isComplete",buffer:this[0]._valueGet().split(""),el:this})):!0;case "getmetadata":if(this.data("_inputmask"))return k=this.data("_inputmask").maskset,k.metadata;break;default:return h(a,b,g)||(g.mask=a),k=d(g),void 0==k?this:this.each(function(){c.isArray(k)?r(this,k,f(this,g)):v(c.extend(!0,{},k),f(this,g),{action:"mask",el:this})})}else{if("object"==typeof a)return g=c.extend(!0,{},c.inputmask.defaults,a),h(g.alias,
  a,g),k=d(g),void 0==k?this:this.each(function(){c.isArray(k)?r(this,k,f(this,g)):v(c.extend(!0,{},k),f(this,g),{action:"mask",el:this})});if(void 0==a)return this.each(function(){var a=c(this).attr("data-inputmask");if(a&&""!=a)try{var a=a.replace(RegExp("'","g"),'"'),d=c.parseJSON("{"+a+"}");c.extend(!0,d,b);g=c.extend(!0,{},c.inputmask.defaults,d);h(g.alias,d,g);g.alias=void 0;c(this).inputmask(g)}catch(f){}})}}}})(jQuery);
  (function(c){c.extend(c.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"}});c.extend(c.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(a,c,d,f,b){return!0},cardinality:8,prevalidator:function(){for(var a=[],c=0;8>c;c++)a[c]=function(){var a=c;return{validator:function(c,b,h,k,m){if(m.regex["urlpre"+(a+1)]){var x=c;0<a+1-c.length&&(x=b.join("").substring(0,a+1-c.length)+""+x);c=m.regex["urlpre"+(a+1)].test(x);if(!k&&!c){h-=a;for(k=0;k<m.defaultPrefix.length;k++)b[h]=m.defaultPrefix[k],h++;for(k=0;k<x.length-1;k++)b[h]=x[k],h++;return{pos:h}}return c}return!1},
  cardinality:a}}();return a}()},r:{validator:".",cardinality:50}},insertMode:!1,autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,c,d,f,b){-1<d-1&&"."!=c[d-1]?(a=c[d-1]+a,a=-1<d-2&&"."!=c[d-2]?c[d-2]+a:"0"+a):a="00"+a;return/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/.test(a)},cardinality:1}}},email:{mask:"*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}.*{2,6}[.*{1,2}]",greedy:!1}})})(jQuery);
  (function(c){c.extend(c.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}]}});c.extend(c.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=c.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|[12][0-9]|3[01])"+a+"[01])")},val2:function(a){a=c.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,c,d){if(isNaN(a))return!1;var f=parseInt(a.concat(c.toString().slice(a.length)));a=parseInt(a.concat(d.toString().slice(a.length)));return(isNaN(f)?!1:c<=f&&f<=d)||(isNaN(a)?!1:c<=a&&a<=d)},determinebaseyear:function(a,c,d){var f=(new Date).getFullYear();if(a>f)return a;if(c<f){for(var f=c.toString().slice(0,2),b=c.toString().slice(2,4);c<f+d;)f--;c=f+b;return a>c?a:c}return f},onKeyUp:function(a,h,d){h=
  c(this);a.ctrlKey&&a.keyCode==d.keyCode.RIGHT&&(a=new Date,h.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()))},definitions:{1:{validator:function(a,c,d,f,b){var g=b.regex.val1.test(a);return f||g||a.charAt(1)!=b.separator&&-1=="-./".indexOf(a.charAt(1))||!(g=b.regex.val1.test("0"+a.charAt(0)))?g:(c[d-1]="0",{refreshFromBuffer:{start:d-1,end:d},pos:d,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,c,d,f,b){isNaN(c[d+1])||(a+=c[d+1]);var g=1==a.length?
  b.regex.val1pre.test(a):b.regex.val1.test(a);return f||g||!(g=b.regex.val1.test("0"+a))?g:(c[d]="0",d++,{pos:d})},cardinality:1}]},2:{validator:function(a,c,d,f,b){var g=b.mask.indexOf("2")==b.mask.length-1?c.join("").substr(5,3):c.join("").substr(0,3);-1!=g.indexOf(b.placeholder[0])&&(g="01"+b.separator);var k=b.regex.val2(b.separator).test(g+a);if(!(f||k||a.charAt(1)!=b.separator&&-1=="-./".indexOf(a.charAt(1)))&&(k=b.regex.val2(b.separator).test(g+"0"+a.charAt(0))))return c[d-1]="0",{refreshFromBuffer:{start:d-
  1,end:d},pos:d,c:a.charAt(0)};if(b.mask.indexOf("2")==b.mask.length-1&&k){if(c.join("").substr(4,4)+a!=b.leapday)return!0;a=parseInt(c.join("").substr(0,4),10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return k},cardinality:2,prevalidator:[{validator:function(a,c,d,f,b){isNaN(c[d+1])||(a+=c[d+1]);var g=b.mask.indexOf("2")==b.mask.length-1?c.join("").substr(5,3):c.join("").substr(0,3);-1!=g.indexOf(b.placeholder[0])&&(g="01"+b.separator);var k=1==a.length?b.regex.val2pre(b.separator).test(g+a):
  b.regex.val2(b.separator).test(g+a);return f||k||!(k=b.regex.val2(b.separator).test(g+"0"+a))?k:(c[d]="0",d++,{pos:d})},cardinality:1}]},y:{validator:function(a,c,d,f,b){if(b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)){if(c.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,c,d,f,b){var g=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!f&&!g){f=b.determinebaseyear(b.yearrange.minyear,
  b.yearrange.maxyear,a+"0").toString().slice(0,1);if(g=b.isInYearRange(f+a,b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=f[0],{pos:d};f=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear,a+"0").toString().slice(0,2);if(g=b.isInYearRange(f+a,b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=f[0],c[d++]=f[1],{pos:d}}return g},cardinality:1},{validator:function(a,c,d,f,b){var g=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!f&&!g){f=b.determinebaseyear(b.yearrange.minyear,
  b.yearrange.maxyear,a).toString().slice(0,2);if(g=b.isInYearRange(a[0]+f[1]+a[1],b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=f[1],{pos:d};f=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear,a).toString().slice(0,2);b.isInYearRange(f+a,b.yearrange.minyear,b.yearrange.maxyear)?c.join("").substr(0,6)!=b.leapday?g=!0:(b=parseInt(a,10),g=0===b%4?0===b%100?0===b%400?!0:!1:!0:!1):g=!1;if(g)return c[d-1]=f[0],c[d++]=f[1],c[d++]=a[0],{refreshFromBuffer:{start:d-3,end:d},pos:d}}return g},
  cardinality:2},{validator:function(a,c,d,f,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=c.inputmask.escapeRegex.call(this,a);return RegExp("((0[13-9]|1[012])"+a+"[0-3])|(02"+a+"[0-2])")},val2:function(a){a=c.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,h,d){h=c(this);a.ctrlKey&&a.keyCode==d.keyCode.RIGHT&&(a=new Date,h.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()))}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyUp:function(a,h,d){h=c(this);a.ctrlKey&&a.keyCode==d.keyCode.RIGHT&&(a=new Date,h.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()))}},"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-4]|1[3-9]/,hrs:/[01][0-9]|2[0-4]/,ampm:/^[a|p|A|P][m|M]/},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,c,d,f,b){if("24"==b.hourFormat&&24==parseInt(a,10))return c[d-1]="0",c[d]="0",{refreshFromBuffer:{start:d-1,end:d},c:"0"};var g=b.regex.hrs.test(a);return f||g||a.charAt(1)!=b.timeseparator&&
  -1=="-.:".indexOf(a.charAt(1))||!(g=b.regex.hrs.test("0"+a.charAt(0)))?g&&"24"!==b.hourFormat&&b.regex.hrs24.test(a)?(a=parseInt(a,10),c[d+5]=24==a?"a":"p",c[d+6]="m",a-=12,10>a?(c[d]=a.toString(),c[d-1]="0"):(c[d]=a.toString().charAt(1),c[d-1]=a.toString().charAt(0)),{refreshFromBuffer:{start:d-1,end:d+6},c:c[d]}):g:(c[d-1]="0",c[d]=a.charAt(0),d++,{refreshFromBuffer:{start:d-2,end:d},pos:d,c:b.timeseparator})},cardinality:2,prevalidator:[{validator:function(a,c,d,f,b){var g=b.regex.hrspre.test(a);
  return f||g||!(g=b.regex.hrs.test("0"+a))?g:(c[d]="0",d++,{pos:d})},cardinality:1}]},t:{validator:function(a,c,d,f,b){return b.regex.ampm.test(a+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",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"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"}})})(jQuery);
  (function(c){c.extend(c.inputmask.defaults.aliases,{decimal:{mask:"~",placeholder:"",repeat:"*",greedy:!1,numericInput:!1,isNumeric:!0,digits:"*",groupSeparator:"",radixPoint:".",groupSize:3,autoGroup:!1,allowPlus:!0,allowMinus:!0,integerDigits:"*",defaultValue:"",prefix:"",suffix:"",postFormat:function(a,h,d,f){if(""==f.groupSeparator)return h;var b=a.slice();c.inArray(f.radixPoint,a);d||b.splice(h,0,"?");b=b.join("");if(f.autoGroup||d&&-1!=b.indexOf(f.groupSeparator)){for(var g=c.inputmask.escapeRegex.call(this,
  f.groupSeparator),b=b.replace(RegExp(g,"g"),""),g=b.split(f.radixPoint),b=g[0],k=RegExp("([-+]?[\\d?]+)([\\d?]{"+f.groupSize+"})");k.test(b);)b=b.replace(k,"$1"+f.groupSeparator+"$2"),b=b.replace(f.groupSeparator+f.groupSeparator,f.groupSeparator);1<g.length&&(b+=f.radixPoint+g[1])}a.length=b.length;f=0;for(g=b.length;f<g;f++)a[f]=b.charAt(f);b=c.inArray("?",a);d||a.splice(b,1);return d?h:b},regex:{number:function(a){var h=c.inputmask.escapeRegex.call(this,a.radixPoint),d=isNaN(a.digits)?a.digits:
  "{0,"+a.digits+"}",f=isNaN(a.integerDigits)?a.integerDigits:"{1,"+a.integerDigits+"}";return RegExp("^"+(a.allowPlus||a.allowMinus?"["+(a.allowPlus?"+":"")+(a.allowMinus?"-":"")+"]?":"")+"\\d"+f+"("+h+"\\d"+d+")?$")}},onKeyDown:function(a,h,d){var f=c(this);if(a.keyCode==d.keyCode.TAB){if(a=c.inArray(d.radixPoint,h),-1!=a){for(var b=f.data("_inputmask").masksets,f=f.data("_inputmask").activeMasksetIndex,g=1;g<=d.digits&&g<d.getMaskLength(b[f]._buffer,d.greedy,d.repeat,h,d);g++)if(void 0==h[a+g]||
  ""==h[a+g])h[a+g]="0";return{refreshFromBuffer:!0}}}else if(a.keyCode==d.keyCode.DELETE||a.keyCode==d.keyCode.BACKSPACE)return d.postFormat(h,0,!0,d),this._valueSet(h.join("")),{refreshFromBuffer:!0}},definitions:{"~":{validator:function(a,h,d,f,b){var g=c.extend({},b,{digits:f?"*":b.digits});if(""==a)return!1;if(!f&&1>=d&&"0"===h[0]&&/[\d-]/.test(a)&&1==h.join("").length)return h[0]="",{pos:0};var k=f?h.slice(0,d):h.slice();k.splice(d,0,a);var k=k.join(""),m=c.inputmask.escapeRegex.call(this,b.groupSeparator),
  k=k.replace(RegExp(m,"g"),"");f&&k.lastIndexOf(b.radixPoint)==k.length-1&&(m=c.inputmask.escapeRegex.call(this,b.radixPoint),k=k.replace(RegExp(m,"g"),""));if(!f&&""==k)return!1;m=b.regex.number(g).test(k);if(!m&&(k+="0",m=b.regex.number(g).test(k),!m)){m=k.lastIndexOf(b.groupSeparator);for(m=k.length-m;3>=m;m++)k+="0";m=b.regex.number(g).test(k);if(!m&&!f&&a==b.radixPoint&&(m=b.regex.number(g).test("0"+k+"0")))return h[d]="0",d++,{pos:d}}return!1==m||f||a==b.radixPoint?m:{pos:b.postFormat(h,d,"-"==
  a||"+"==a?!0:!1,b),refreshFromBuffer:!0}},cardinality:1,prevalidator:null}},insertMode:!0,autoUnmask:!1},integer:{regex:{number:function(a){var h=c.inputmask.escapeRegex.call(this,a.groupSeparator);return RegExp("^"+(a.allowPlus||a.allowMinus?"["+(a.allowPlus?"+":"")+(a.allowMinus?"-":"")+"]?":"")+"(\\d+|\\d{1,"+a.groupSize+"}(("+h+"\\d{"+a.groupSize+"})?)+)$")}},alias:"decimal"}})})(jQuery);
  (function(c){c.extend(c.inputmask.defaults.aliases,{Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(a,c){return RegExp(c.regex).test(a.join(""))},definitions:{r:{validator:function(a,c,d,f,b){function g(a,b){this.matches=
  [];this.isGroup=a||!1;this.isQuantifier=b||!1;this.quantifier={min:1,max:1};this.repeaterPart=void 0}function k(){var a=new g,c,d=[];for(b.regexTokens=[];c=b.tokenizer.exec(b.regex);)switch(c=c[0],c.charAt(0)){case "(":d.push(new g(!0));break;case ")":var e=d.pop();0<d.length?d[d.length-1].matches.push(e):a.matches.push(e);break;case "{":case "+":case "*":var f=new g(!1,!0);c=c.replace(/[{}]/g,"");e=c.split(",");c=isNaN(e[0])?e[0]:parseInt(e[0]);e=1==e.length?c:isNaN(e[1])?e[1]:parseInt(e[1]);f.quantifier=
  {min:c,max:e};if(0<d.length){var h=d[d.length-1].matches;c=h.pop();c.isGroup||(e=new g(!0),e.matches.push(c),c=e);h.push(c);h.push(f)}else c=a.matches.pop(),c.isGroup||(e=new g(!0),e.matches.push(c),c=e),a.matches.push(c),a.matches.push(f);break;default:0<d.length?d[d.length-1].matches.push(c):a.matches.push(c)}0<a.matches.length&&b.regexTokens.push(a)}function m(a,b){var c=!1;b&&(x+="(",O++);for(var d=0;d<a.matches.length;d++){var f=a.matches[d];if(!0==f.isGroup)c=m(f,!0);else if(!0==f.isQuantifier){var g=
  a.matches.indexOf(f),g=a.matches[g-1],h=x;if(isNaN(f.quantifier.max)){for(;f.repeaterPart&&f.repeaterPart!=x&&f.repeaterPart.length>x.length&&!(c=m(g,!0)););(c=c||m(g,!0))&&(f.repeaterPart=x);x=h+f.quantifier.max}else{for(var k=0,S=f.quantifier.max-1;k<S&&!(c=m(g,!0));k++);x=h+"{"+f.quantifier.min+","+f.quantifier.max+"}"}}else if(void 0!=f.matches)for(g=0;g<f.length&&!(c=m(f[g],b));g++);else{if("["==f[0]){c=x;c+=f;for(k=0;k<O;k++)c+=")";c=RegExp("^("+c+")$");c=c.test(P)}else for(g=0,h=f.length;g<
  h;g++)if("\\"!=f[g]){c=x;c+=f.substr(0,g+1);c=c.replace(/\|$/,"");for(k=0;k<O;k++)c+=")";c=RegExp("^("+c+")$");if(c=c.test(P))break}x+=f}if(c)break}b&&(x+=")",O--);return c}null==b.regexTokens&&k();f=c.slice();var x="";c=!1;var O=0;f.splice(d,0,a);var P=f.join("");for(a=0;a<b.regexTokens.length&&!(g=b.regexTokens[a],c=m(g,g.isGroup));a++);return c},cardinality:1}}}})})(jQuery);
  (function(c){c.extend(c.inputmask.defaults.aliases,{phone:{url:"phone-codes/phone-codes.json",mask:function(a){a.definitions={p:{validator:function(){return!1},cardinality:1},"#":{validator:"[0-9]",cardinality:1}};var h=[];c.ajax({url:a.url,async:!1,dataType:"json",success:function(a){h=a}});h.splice(0,0,"+p(ppp)ppp-pppp");return h},nojumps:!0,nojumpsThreshold:1},phonebe:{url:"phone-codes/phone-be.json",mask:function(a){a.definitions={p:{validator:function(){return!1},cardinality:1},"#":{validator:"[0-9]",
  cardinality:1}};var h=[];c.ajax({url:a.url,async:!1,dataType:"json",success:function(a){h=a}});h.splice(0,0,"+32(ppp)ppp-pppp");return h},nojumps:!0,nojumpsThreshold:4}})})(jQuery);
  