text: /*!
  * inputmask.min.js
  * https://github.com/RobinHerbots/Inputmask
  * Copyright (c) 2010 - 2018 Robin Herbots
  * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  * Version: 4.0.0-beta.33
  */
  
  !function(e){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./global/window","./global/document"],e):"object"==typeof exports?module.exports=e(require("./dependencyLibs/inputmask.dependencyLib"),require("./global/window"),require("./global/document")):window.Inputmask=e(window.dependencyLib||jQuery,window,document)}(function(e,t,n,i){var a=navigator.userAgent,r=f("touchstart"),o=/iemobile/i.test(a),s=/iphone/i.test(a)&&!o;function l(t,n,a){if(!(this instanceof l))return new l(t,n,a);this.el=i,this.events={},this.maskset=i,this.refreshValue=!1,!0!==a&&(e.isPlainObject(t)?n=t:(n=n||{},t&&(n.alias=t)),this.opts=e.extend(!0,{},this.defaults,n),this.noMasksCache=n&&n.definitions!==i,this.userOptions=n||{},this.isRTL=this.opts.numericInput,c(this.opts.alias,n,this.opts))}function c(t,n,a){var r=l.prototype.aliases[t];return r?(r.alias&&c(r.alias,i,a),e.extend(!0,a,r),e.extend(!0,a,n),!0):(null===a.mask&&(a.mask=t),!1)}function u(t,n){function a(t,a,r){var o=!1;if(null!==t&&""!==t||((o=null!==r.regex)?t=(t=r.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(o=!0,t=".*")),1===t.length&&!1===r.greedy&&0!==r.repeat&&(r.placeholder=""),r.repeat>0||"*"===r.repeat||"+"===r.repeat){var s="*"===r.repeat?0:"+"===r.repeat?1:r.repeat;t=r.groupmarker[0]+t+r.groupmarker[1]+r.quantifiermarker[0]+s+","+r.repeat+r.quantifiermarker[1]}var c,u=o?"regex_"+r.regex:r.numericInput?t.split("").reverse().join(""):t;return l.prototype.masksCache[u]===i||!0===n?(c={mask:t,maskToken:l.prototype.analyseMask(t,o,r),validPositions:{},_buffer:i,buffer:i,tests:{},excludes:{},metadata:a,maskLength:i},!0!==n&&(l.prototype.masksCache[u]=c,c=e.extend(!0,{},l.prototype.masksCache[u]))):c=e.extend(!0,{},l.prototype.masksCache[u]),c}if(e.isFunction(t.mask)&&(t.mask=t.mask(t)),e.isArray(t.mask)){if(t.mask.length>1){if(null===t.keepStatic){t.keepStatic="auto";for(var r=0;r<t.mask.length;r++)if(t.mask[r].charAt(0)!==t.mask[0].charAt(0)){t.keepStatic=!0;break}}var o=t.groupmarker[0];return e.each(t.isRTL?t.mask.reverse():t.mask,function(n,a){o.length>1&&(o+=t.groupmarker[1]+t.alternatormarker+t.groupmarker[0]),a.mask===i||e.isFunction(a.mask)?o+=a:o+=a.mask}),a(o+=t.groupmarker[1],t.mask,t)}t.mask=t.mask.pop()}return t.mask&&t.mask.mask!==i&&!e.isFunction(t.mask.mask)?a(t.mask.mask,t.mask,t):a(t.mask,t.mask,t)}function f(e){var t=n.createElement("input"),i="on"+e,a=i in t;return a||(t.setAttribute(i,"return;"),a="function"==typeof t[i]),t=null,a}function p(a,c,u){c=c||this.maskset,u=u||this.opts;var h,m,d,v,k=this,g=this.el,b=this.isRTL,y=!1,P=!1,C=!1,E=!1,x=!1;function _(e,t,n){t=t||0;var a,r,o,s=[],l=0,c=O();do{if(!0===e&&A().validPositions[l])r=(o=A().validPositions[l]).match,a=o.locator.slice(),s.push(!0===n?o.input:!1===n?r.nativeDef:$(l,r));else{r=(o=D(l,a,l-1)).match,a=o.locator.slice();var f=!1!==u.jitMasking?u.jitMasking:r.jit;(!1===f||f===i||l<c||"number"==typeof f&&isFinite(f)&&f>l)&&s.push(!1===n?r.nativeDef:$(l,r))}"auto"===u.keepStatic&&r.newBlockMarker&&null!==r.fn&&(u.keepStatic=l-1),l++}while((d===i||l<d)&&(null!==r.fn||""!==r.def)||t>l);return""===s[s.length-1]&&s.pop(),!1===n&&A().maskLength!==i||(A().maskLength=l-1),s}function A(){return c}function w(e){var t=A();t.buffer=i,!0!==e&&(t.validPositions={},t.p=0)}function O(e,t,n){var a=-1,r=-1,o=n||A().validPositions;for(var s in e===i&&(e=-1),o){var l=parseInt(s);o[l]&&(t||!0!==o[l].generatedInput)&&(l<=e&&(a=l),l>=e&&(r=l))}return-1===a||a==e?r:-1==r?a:e-a<r-e?a:r}function S(e,t,n){for(var a,r=G(e=e>0?e-1:0,t),o=r.alternation!==i?r.locator[r.alternation].toString().split(","):[],s=0;s<t.length&&(!((a=t[s]).match&&(u.greedy&&!0!==a.match.optionalQuantifier||(!1===a.match.optionality||!1===a.match.newBlockMarker)&&!0!==a.match.optionalQuantifier)&&(r.alternation===i||r.alternation!==a.alternation||a.locator[r.alternation]!==i&&N(a.locator[r.alternation].toString().split(","),o)))||!0===n&&(null!==a.match.fn||/[0-9a-bA-Z]/.test(a.match.def)));s++);return a}function M(e){var t=e.locator[e.alternation];return"string"==typeof t&&t.length>0&&(t=t.split(",")[0]),t!==i?t.toString():""}function j(e,t){for(var n=(e.alternation!=i?e.mloc[M(e)]:e.locator).join("");n.length<t;)n+="0";return n}function D(e,t,n){return A().validPositions[e]||S(e,B(e,t?t.slice():t,n))}function G(e,t){return A().validPositions[e]?A().validPositions[e]:(t||B(e))[0]}function T(e,t){for(var n=!1,i=B(e),a=0;a<i.length;a++)if(i[a].match&&i[a].match.def===t){n=!0;break}return n}function B(t,n,a){var r,o,s,l,c=A().maskToken,f=n?a:0,p=n?n.slice():[0],h=[],m=!1,d=n?n.join(""):"";function v(n,a,o,s){function l(o,s,c){function p(t,n){var i=0===e.inArray(t,n.matches);return i||e.each(n.matches,function(e,a){if(!0===a.isQuantifier?i=p(t,n.matches[e-1]):!0===a.isOptional?i=p(t,a):!0===a.isAlternate&&(i=p(t,a)),i)return!1}),i}function k(t,n,a){var r,o;if((A().tests[t]||A().validPositions[t])&&e.each(A().tests[t]||[A().validPositions[t]],function(e,t){if(t.mloc[n])return r=t,!1;var s=a!==i?a:t.alternation,l=t.locator[s]!==i?t.locator[s].toString().indexOf(n):-1;(o===i||l<o)&&-1!==l&&(r=t,o=l)}),r){var s=r.locator[r.alternation];return(r.mloc[n]||r.mloc[s]||r.locator).slice((a!==i?a:r.alternation)+1)}return a!==i?k(t,n):i}function g(e,t){function n(e){for(var t,n,i=[],a=0,r=e.length;a<r;a++)if("-"===e.charAt(a))for(n=e.charCodeAt(a+1);++t<n;)i.push(String.fromCharCode(t));else t=e.charCodeAt(a),i.push(e.charAt(a));return i.join("")}return u.regex&&null!==e.match.fn&&null!==t.match.fn?-1!==n(t.match.def.replace(/[\[\]]/g,"")).indexOf(n(e.match.def.replace(/[\[\]]/g,""))):e.match.def===t.match.nativeDef}function b(e,t){if(t===i||e.alternation===t.alternation&&-1===e.locator[e.alternation].toString().indexOf(t.locator[t.alternation])){e.mloc=e.mloc||{};var n=e.locator[e.alternation];if(n!==i){if("string"==typeof n&&(n=n.split(",")[0]),e.mloc[n]===i&&(e.mloc[n]=e.locator.slice()),t!==i){for(var a in t.mloc)"string"==typeof a&&(a=a.split(",")[0]),e.mloc[a]===i&&(e.mloc[a]=t.mloc[a]);e.locator[e.alternation]=Object.keys(e.mloc).join(",")}return!0}e.alternation=i}return!1}if(f>5e3)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+A().mask;if(f===t&&o.matches===i)return h.push({match:o,locator:s.reverse(),cd:d,mloc:{}}),!0;if(o.matches!==i){if(o.isGroup&&c!==o){if(o=l(n.matches[e.inArray(o,n.matches)+1],s))return!0}else if(o.isOptional){var y=o;if(o=v(o,a,s,c)){if(r=h[h.length-1].match,c!==i||!p(r,y))return!0;m=!0,f=t}}else if(o.isAlternator){var P,C=o,E=[],x=h.slice(),_=s.length,w=a.length>0?a.shift():-1;if(-1===w||"string"==typeof w){var O,S=f,M=a.slice(),j=[];if("string"==typeof w)j=w.split(",");else for(O=0;O<C.matches.length;O++)j.push(O.toString());if(A().excludes[t]){for(var D=j.slice(),G=0,T=A().excludes[t].length;G<T;G++)j.splice(j.indexOf(A().excludes[t][G].toString()),1);0===j.length&&(A().excludes[t]=i,j=D)}(!0===u.keepStatic||isFinite(parseInt(u.keepStatic))&&S>=u.keepStatic)&&(j=j.slice(0,1));for(var B=0;B<j.length;B++){O=parseInt(j[B]),h=[],a=k(f,O,_)||M.slice(),C.matches[O]&&l(C.matches[O],[O].concat(s),c)&&(o=!0),P=h.slice(),f=S,h=[];for(var L=0;L<P.length;L++){var I=P[L],F=!1;I.alternation=I.alternation||_,b(I);for(var N=0;N<E.length;N++){var R=E[N];if("string"!=typeof w||I.alternation!==i&&-1!==e.inArray(I.locator[I.alternation].toString(),j)){if(I.match.nativeDef===R.match.nativeDef){F=!0,b(R,I);break}if(g(I,R)){b(I,R)&&(F=!0,E.splice(E.indexOf(R),0,I));break}if(g(R,I)){b(R,I);break}if(Q=R,null===(q=I).match.fn&&null!==Q.match.fn&&Q.match.fn.test(q.match.def,A(),t,!1,u,!1)){b(I,R)&&(F=!0,E.splice(E.indexOf(R),0,I));break}}}F||E.push(I)}}h=x.concat(E),f=t,m=h.length>0,o=E.length>0,a=M.slice()}else o=l(C.matches[w]||n.matches[w],[w].concat(s),c);if(o)return!0}else if(o.isQuantifier&&c!==n.matches[e.inArray(o,n.matches)-1])for(var K=o,V=a.length>0?a.shift():0;V<(isNaN(K.quantifier.max)?V+1:K.quantifier.max)&&f<=t;V++){var H=n.matches[e.inArray(K,n.matches)-1];if(o=l(H,[V].concat(s),H)){if((r=h[h.length-1].match).optionalQuantifier=V>K.quantifier.min-1,r.jit=V+H.matches.indexOf(r)>=K.quantifier.jit,p(r,H)&&V>K.quantifier.min-1){m=!0,f=t;break}if(K.quantifier.jit!==i&&isNaN(K.quantifier.max)&&r.optionalQuantifier&&A().validPositions[t-1]===i){h.pop(),m=!0,f=t,d=i;break}return!0}}else if(o=v(o,a,s,c))return!0}else f++;var q,Q}for(var c=a.length>0?a.shift():0;c<n.matches.length;c++)if(!0!==n.matches[c].isQuantifier){var p=l(n.matches[c],[c].concat(o),s);if(p&&f===t)return p;if(f>t)break}}if(t>-1){if(n===i){for(var k,g=t-1;(k=A().validPositions[g]||A().tests[g])===i&&g>-1;)g--;k!==i&&g>-1&&(o=g,s=k,l=[],e.isArray(s)||(s=[s]),s.length>0&&(s[0].alternation===i?0===(l=S(o,s.slice()).locator.slice()).length&&(l=s[0].locator.slice()):e.each(s,function(e,t){if(""!==t.def)if(0===l.length)l=t.locator.slice();else for(var n=0;n<l.length;n++)t.locator[n]&&-1===l[n].toString().indexOf(t.locator[n])&&(l[n]+=","+t.locator[n])})),d=(p=l).join(""),f=g)}if(A().tests[t]&&A().tests[t][0].cd===d)return A().tests[t];for(var b=p.shift();b<c.length;b++){if(v(c[b],p,[b])&&f===t||f>t)break}}return(0===h.length||m)&&h.push({match:{fn:null,optionality:!0,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:d}),n!==i&&A().tests[t]?e.extend(!0,[],h):(A().tests[t]=e.extend(!0,[],h),A().tests[t])}function L(){return A()._buffer===i&&(A()._buffer=_(!1,1),A().buffer===i&&(A().buffer=A()._buffer.slice())),A()._buffer}function I(e){return A().buffer!==i&&!0!==e||(A().buffer=_(!0,O(),!0)),A().buffer}function F(e,t,n){var a,r;if(!0===e)w(),e=0,t=n.length;else for(a=e;a<t;a++)delete A().validPositions[a];for(r=e,a=e;a<t;a++)if(w(!0),n[a]!==u.skipOptionalPartCharacter){var o=K(r,n[a],!0,!0);!1!==o&&(w(!0),r=o.caret!==i?o.caret:o.pos+1)}}function N(t,n,a){for(var r,o=u.greedy?n:n.slice(0,1),s=!1,l=a!==i?a.split(","):[],c=0;c<l.length;c++)-1!==(r=t.indexOf(l[c]))&&t.splice(r,1);for(var f=0;f<t.length;f++)if(-1!==e.inArray(t[f],o)){s=!0;break}return s}function R(t,n,a,r,o){var s,l,c,f,p,h,m,d=e.extend(!0,{},A().validPositions),v=!1,k=o!==i?o:O();if(-1===k&&o===i)l=(f=G(s=0)).alternation;else for(;k>=0;k--)if((c=A().validPositions[k])&&c.alternation!==i){if(f&&f.locator[c.alternation]!==c.locator[c.alternation])break;s=k,l=A().validPositions[s].alternation,f=c}if(l!==i){m=parseInt(s),A().excludes[m]=A().excludes[m]||[],!0!==t&&A().excludes[m].push(M(f));var g=[],b=0;for(p=m;p<O(i,!0)+1;p++)(h=A().validPositions[p])&&!0!==h.generatedInput&&/[0-9a-bA-Z]/.test(h.input)?g.push(h.input):p<t&&b++,delete A().validPositions[p];for(;A().excludes[m]&&A().excludes[m].length<10;){var y=-1*b,P=g.slice();for(A().tests[m]=i,w(!0),v=!0;P.length>0;){var C=P.shift();if(C!==u.skipOptionalPartCharacter&&!(v=K(O(i,!0)+1,C,!1,r,!0)))break}if(v&&n!==i){var E=O(t)+1;for(p=m;p<O()+1;p++)((h=A().validPositions[p])===i||null==h.match.fn)&&p<t+y&&y++;v=K((t+=y)>E?E:t,n,a,r,!0)}if(v)break;if(w(),f=G(m),A().validPositions=e.extend(!0,{},d),!A().excludes[m]){v=R(t,n,a,r,m-1);break}var x=M(f);if(-1!==A().excludes[m].indexOf(x)){v=R(t,n,a,r,m-1);break}for(A().excludes[m].push(x),p=m;p<O(i,!0)+1;p++)delete A().validPositions[p]}}return A().excludes[m]=i,v}function K(t,n,a,r,o,s){function c(e){return b?e.begin-e.end>1||e.begin-e.end==1:e.end-e.begin>1||e.end-e.begin==1}a=!0===a;var f=t;function p(n,a,o){var s=!1;return e.each(B(n),function(f,p){var h=p.match;if(I(!0),!1!==(s=null!=h.fn?h.fn.test(a,A(),n,o,u,c(t)):(a===h.def||a===u.skipOptionalPartCharacter)&&""!==h.def&&{c:$(n,h,!0)||h.def,pos:n})){var m=s.c!==i?s.c:a,d=n;return m=m===u.skipOptionalPartCharacter&&null===h.fn?$(n,h,!0)||h.def:m,s.remove!==i&&(e.isArray(s.remove)||(s.remove=[s.remove]),e.each(s.remove.sort(function(e,t){return t-e}),function(e,t){H({begin:t,end:t+1})})),s.insert!==i&&(e.isArray(s.insert)||(s.insert=[s.insert]),e.each(s.insert.sort(function(e,t){return e-t}),function(e,t){K(t.pos,t.c,!0,r)})),!0!==s&&s.pos!==i&&s.pos!==n&&(d=s.pos),!0!==s&&s.pos===i&&s.c===i?!1:(H(t,e.extend({},p,{input:function(t,n,i){switch(u.casing||n.casing){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase();break;case"title":var a=A().validPositions[i-1];t=0===i||a&&a.input===String.fromCharCode(l.keyCode.SPACE)?t.toUpperCase():t.toLowerCase();break;default:if(e.isFunction(u.casing)){var r=Array.prototype.slice.call(arguments);r.push(A().validPositions),t=u.casing.apply(this,r)}}return t}(m,h,d)}),r,d)||(s=!1),!1)}}),s}t.begin!==i&&(f=b?t.end:t.begin);var h=!0,m=e.extend(!0,{},A().validPositions);if(e.isFunction(u.preValidation)&&!a&&!0!==r&&!0!==s&&(h=u.preValidation(I(),f,n,c(t),u,A())),!0===h){if(V(i,f,!0),(d===i||f<d)&&(h=p(f,n,a),(!a||!0===r)&&!1===h&&!0!==s)){var v=A().validPositions[f];if(!v||null!==v.match.fn||v.match.def!==n&&n!==u.skipOptionalPartCharacter){if((u.insertMode||A().validPositions[Q(f)]===i)&&!q(f,!0))for(var k=f+1,g=Q(f);k<=g;k++)if(!1!==(h=p(k,n,a))){h=V(f,h.pos!==i?h.pos:k)||h,f=k;break}}else h={caret:Q(f)}}!1!==h||null===u.keepStatic||!1===u.keepStatic||a||!0===o||(h=R(f,n,a,r)),!0===h&&(h={pos:f})}if(e.isFunction(u.postValidation)&&!1!==h&&!a&&!0!==r&&!0!==s){var y=u.postValidation(I(!0),h,u);if(y!==i){if(y.refreshFromBuffer&&y.buffer){var P=y.refreshFromBuffer;F(!0===P?P:P.start,P.end,y.buffer)}h=!0===y?h:y}}return h&&h.pos===i&&(h.pos=f),!1!==h&&!0!==s||(w(!0),A().validPositions=e.extend(!0,{},m)),h}function V(t,n,a){var r;if(t===i)for(t=n-1;t>0&&!A().validPositions[t];t--);for(var o=t;o<n;o++)if(A().validPositions[o]===i&&!q(o,!0)){var s=0==o?G(o):A().validPositions[o-1];if(s){var l,c=j(s),u=B(o).slice(),f=i,p=G(o);if(""===u[u.length-1].match.def&&u.pop(),e.each(u,function(e,t){l=j(t,c.length);var n=Math.abs(l-c);(f===i||n<f)&&null===t.match.fn&&!0!==t.match.optionality&&!0!==t.match.optionalQuantifier&&(f=n,p=t)}),(p=e.extend({},p,{input:$(o,p.match,!0)||p.match.def})).generatedInput=!0,H(o,p,!0),!0!==a){var h=A().validPositions[n].input;A().validPositions[n]=i,r=K(n,h,!0,!0)}}}return r}function H(t,n,a,r){function o(e,t,n){var a=t[e];if(a!==i&&(null===a.match.fn&&!0!==a.match.optionality||a.input===u.radixPoint)){var r=n.begin<=e-1?t[e-1]&&null===t[e-1].match.fn&&t[e-1]:t[e-1],o=n.end>e+1?t[e+1]&&null===t[e+1].match.fn&&t[e+1]:t[e+1];return r&&o}return!1}var s=t.begin!==i?t.begin:t,l=t.end!==i?t.end:t;if(t.begin>t.end&&(s=t.end,l=t.begin),r=r!==i?r:s,s!==l||u.insertMode&&A().validPositions[r]!==i&&a===i){var c=e.extend(!0,{},A().validPositions),f=O(i,!0);for(A().p=s,v=f;v>=s;v--)A().validPositions[v]&&"+"===A().validPositions[v].match.nativeDef&&(u.isNegative=!1),delete A().validPositions[v];var p=!0,h=r,m=(A().validPositions,!1),d=h,v=h;for(n&&(A().validPositions[r]=e.extend(!0,{},n),d++,h++,s<l&&v++);v<=f;v++){var k=c[v];if(k!==i&&(v>=l||v>=s&&!0!==k.generatedInput&&o(v,c,{begin:s,end:l}))){for(;""!==G(d).match.def;){if(!1===m&&c[d]&&c[d].match.nativeDef===k.match.nativeDef)A().validPositions[d]=e.extend(!0,{},c[d]),A().validPositions[d].input=k.input,V(i,d,!0),h=d+1,p=!0;else if(T(d,k.match.def)){var g=K(d,k.input,!0,!0);p=!1!==g,h=g.caret||g.insert?O():d+1,m=!0}else if(!(p=!0===k.generatedInput||k.input===u.radixPoint&&!0===u.numericInput)&&""===G(d).match.def)break;if(p)break;d++}""==G(d).match.def&&(p=!1),d=h}if(!p)break}if(!p)return A().validPositions=e.extend(!0,{},c),w(!0),!1}else n&&(A().validPositions[r]=e.extend(!0,{},n));return w(!0),!0}function q(e,t){var n=D(e).match;if(""===n.def&&(n=G(e).match),null!=n.fn)return n.fn;if(!0!==t&&e>-1){var i=B(e);return i.length>1+(""===i[i.length-1].match.def?1:0)}return!1}function Q(e,t){for(var n=e+1;""!==G(n).match.def&&(!0===t&&(!0!==G(n).match.newBlockMarker||!q(n))||!0!==t&&!q(n));)n++;return n}function U(e,t){var n,i=e;if(i<=0)return 0;for(;--i>0&&(!0===t&&!0!==G(i).match.newBlockMarker||!0!==t&&!q(i)&&((n=B(i)).length<2||2===n.length&&""===n[1].match.def)););return i}function W(t,n,a,r,o){if(r&&e.isFunction(u.onBeforeWrite)){var s=u.onBeforeWrite.call(k,r,n,a,u);if(s){if(s.refreshFromBuffer){var l=s.refreshFromBuffer;F(!0===l?l:l.start,l.end,s.buffer||n),n=I(!0)}a!==i&&(a=s.caret!==i?s.caret:a)}}t!==i&&(t.inputmask._valueSet(n.join("")),a===i||r!==i&&"blur"===r.type?se(t,a,0===n.length):te(t,a),!0===o&&(P=!0,e(t).trigger("input")))}function $(t,n,a){if((n=n||G(t).match).placeholder!==i||!0===a)return e.isFunction(n.placeholder)?n.placeholder(u):n.placeholder;if(null===n.fn){if(t>-1&&A().validPositions[t]===i){var r,o=B(t),s=[];if(o.length>1+(""===o[o.length-1].match.def?1:0))for(var l=0;l<o.length;l++)if(!0!==o[l].match.optionality&&!0!==o[l].match.optionalQuantifier&&(null===o[l].match.fn||r===i||!1!==o[l].match.fn.test(r.match.def,A(),t,!0,u))&&(s.push(o[l]),null===o[l].match.fn&&(r=o[l]),s.length>1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return u.placeholder.charAt(t%u.placeholder.length)}return n.def}return u.placeholder.charAt(t%u.placeholder.length)}var Z,z={on:function(t,n,a){var c=function(t){var n=this;if(n.inputmask===i&&"FORM"!==this.nodeName){var c=e.data(n,"_inputmask_opts");c?new l(c).mask(n):z.off(n)}else{if("setvalue"===t.type||"FORM"===this.nodeName||!(n.disabled||n.readOnly&&!("keydown"===t.type&&t.ctrlKey&&67===t.keyCode||!1===u.tabThrough&&t.keyCode===l.keyCode.TAB))){switch(t.type){case"input":if(!0===P)return P=!1,t.preventDefault();r&&(x=!0);break;case"keydown":y=!1,P=!1;break;case"keypress":if(!0===y)return t.preventDefault();y=!0;break;case"click":if(o||s){var f=arguments;return setTimeout(function(){a.apply(n,f)},0),!1}}var p=a.apply(n,arguments);return x&&(x=!1,setTimeout(function(){te(n,n.inputmask.caretPos,i,!0)})),!1===p&&(t.preventDefault(),t.stopPropagation()),p}t.preventDefault()}};t.inputmask.events[n]=t.inputmask.events[n]||[],t.inputmask.events[n].push(c),-1!==e.inArray(n,["submit","reset"])?null!==t.form&&e(t.form).on(n,c):e(t).on(n,c)},off:function(t,n){var i;t.inputmask&&t.inputmask.events&&(n?(i=[])[n]=t.inputmask.events[n]:i=t.inputmask.events,e.each(i,function(n,i){for(;i.length>0;){var a=i.pop();-1!==e.inArray(n,["submit","reset"])?null!==t.form&&e(t.form).off(n,a):e(t).off(n,a)}delete t.inputmask.events[n]}))}},X={keydownEvent:function(t){var n=this,i=e(n),a=t.keyCode,r=te(n);if(a===l.keyCode.BACKSPACE||a===l.keyCode.DELETE||s&&a===l.keyCode.BACKSPACE_SAFARI||t.ctrlKey&&a===l.keyCode.X&&!f("cut"))t.preventDefault(),re(n,a,r),W(n,I(!0),A().p,t,n.inputmask._valueGet()!==I().join("")),n.inputmask._valueGet()===L().join("")?i.trigger("cleared"):!0===ae(I())&&i.trigger("complete");else if(a===l.keyCode.END||a===l.keyCode.PAGE_DOWN){t.preventDefault();var o=Q(O());u.insertMode||o!==A().maskLength||t.shiftKey||o--,te(n,t.shiftKey?r.begin:o,o,!0)}else a===l.keyCode.HOME&&!t.shiftKey||a===l.keyCode.PAGE_UP?(t.preventDefault(),te(n,0,t.shiftKey?r.begin:0,!0)):(u.undoOnEscape&&a===l.keyCode.ESCAPE||90===a&&t.ctrlKey)&&!0!==t.altKey?(J(n,!0,!1,h.split("")),i.trigger("click")):a!==l.keyCode.INSERT||t.shiftKey||t.ctrlKey?!0===u.tabThrough&&a===l.keyCode.TAB?(!0===t.shiftKey?(null===G(r.begin).match.fn&&(r.begin=Q(r.begin)),r.end=U(r.begin,!0),r.begin=U(r.end,!0)):(r.begin=Q(r.begin,!0),r.end=Q(r.begin,!0),r.end<A().maskLength&&r.end--),r.begin<A().maskLength&&(t.preventDefault(),te(n,r.begin,r.end))):t.shiftKey||!1===u.insertMode&&(a===l.keyCode.RIGHT?setTimeout(function(){var e=te(n);te(n,e.begin)},0):a===l.keyCode.LEFT&&setTimeout(function(){var e=te(n);te(n,b?e.begin+1:e.begin-1)},0)):(u.insertMode=!u.insertMode,te(n,u.insertMode||r.begin!==A().maskLength?r.begin:r.begin-1));u.onKeyDown.call(this,t,I(),te(n).begin,u),C=-1!==e.inArray(a,u.ignorables)},keypressEvent:function(t,n,a,r,o){var s=this,c=e(s),f=t.which||t.charCode||t.keyCode;if(!(!0===n||t.ctrlKey&&t.altKey)&&(t.ctrlKey||t.metaKey||C))return f===l.keyCode.ENTER&&h!==I().join("")&&(h=I().join(""),setTimeout(function(){c.trigger("change")},0)),!0;if(f){46===f&&!1===t.shiftKey&&""!==u.radixPoint&&(f=u.radixPoint.charCodeAt(0));var p,m=n?{begin:o,end:o}:te(s),d=String.fromCharCode(f),v=0;if(u._radixDance&&u.numericInput){var k=I().indexOf(u.radixPoint.charAt(0))+1;m.begin<=k&&(f===u.radixPoint.charCodeAt(0)&&(v=1),m.begin-=1,m.end-=1)}A().writeOutBuffer=!0;var g=K(m,d,r);if(!1!==g&&(w(!0),p=g.caret!==i?g.caret:Q(g.pos.begin?g.pos.begin:g.pos),A().p=p),p=(u.numericInput&&g.caret===i?U(p):p)+v,!1!==a&&(setTimeout(function(){u.onKeyValidation.call(s,f,g,u)},0),A().writeOutBuffer&&!1!==g)){var b=I();W(s,b,p,t,!0!==n),!0!==n&&setTimeout(function(){!0===ae(b)&&c.trigger("complete")},0)}if(t.preventDefault(),n)return!1!==g&&(g.forwardPosition=p),g}},pasteEvent:function(n){var i,a=this,r=n.originalEvent||n,o=e(a),s=a.inputmask._valueGet(!0),l=te(a);b&&(i=l.end,l.end=l.begin,l.begin=i);var c=s.substr(0,l.begin),f=s.substr(l.end,s.length);if(c===(b?L().reverse():L()).slice(0,l.begin).join("")&&(c=""),f===(b?L().reverse():L()).slice(l.end).join("")&&(f=""),b&&(i=c,c=f,f=i),t.clipboardData&&t.clipboardData.getData)s=c+t.clipboardData.getData("Text")+f;else{if(!r.clipboardData||!r.clipboardData.getData)return!0;s=c+r.clipboardData.getData("text/plain")+f}var p=s;if(e.isFunction(u.onBeforePaste)){if(!1===(p=u.onBeforePaste.call(k,s,u)))return n.preventDefault();p||(p=s)}return J(a,!1,!1,b?p.split("").reverse():p.toString().split("")),W(a,I(),Q(O()),n,h!==I().join("")),!0===ae(I())&&o.trigger("complete"),n.preventDefault()},inputFallBackEvent:function(t){var n,i,a=this,r=a.inputmask._valueGet();if(I().join("")!==r){var s=te(a);if(i=s,"."===(n=r).charAt(i.begin-1)&&""!==u.radixPoint&&((n=n.split(""))[i.begin-1]=u.radixPoint.charAt(0),n=n.join("")),r=function(e,t,n){if(o){var i=t.replace(I().join(""),"");if(1===i.length){var a=t.split("");a.splice(n.begin,0,i),t=a.join("")}}return t}(0,r=n,s),I().join("")!==r){var c=I().join(""),f=!u.numericInput&&r.length>c.length?-1:0,p=r.substr(0,s.begin),h=r.substr(s.begin),m=c.substr(0,s.begin+f),d=c.substr(s.begin+f),v=s,k="",g=!1;if(p!==m){for(var b=(g=p.length>=m.length)?p.length:m.length,y=0;p.charAt(y)===m.charAt(y)&&y<b;y++);g&&(0===f&&(v.begin=y),k+=p.slice(y,v.end))}if(h!==d&&(h.length>d.length?k+=h.slice(0,1):h.length<d.length&&(v.end+=d.length-h.length,g||""===u.radixPoint||""!==h||p.charAt(v.begin+f-1)!==u.radixPoint||(v.begin--,k=u.radixPoint))),W(a,I(),{begin:v.begin+f,end:v.end+f}),k.length>0)e.each(k.split(""),function(t,n){var i=new e.Event("keypress");i.which=n.charCodeAt(0),C=!1,X.keypressEvent.call(a,i)});else{v.begin===v.end-1&&(v.begin=U(v.begin+1),v.begin===v.end-1?te(a,v.begin):te(a,v.begin,v.end));var P=new e.Event("keydown");P.keyCode=u.numericInput?l.keyCode.BACKSPACE:l.keyCode.DELETE,X.keydownEvent.call(a,P),!1===u.insertMode&&te(a,te(a).begin-1)}t.preventDefault()}}},setValueEvent:function(t){this.inputmask.refreshValue=!1;var n=(n=t&&t.detail?t.detail[0]:arguments[1])||this.inputmask._valueGet(!0);e.isFunction(u.onBeforeMask)&&(n=u.onBeforeMask.call(k,n,u)||n),n=n.split(""),J(this,!0,!1,b?n.reverse():n),h=I().join(""),(u.clearMaskOnLostFocus||u.clearIncomplete)&&this.inputmask._valueGet()===L().join("")&&this.inputmask._valueSet("")},focusEvent:function(e){var t=this,n=t.inputmask._valueGet();u.showMaskOnFocus&&(!u.showMaskOnHover||u.showMaskOnHover&&""===n)&&(t.inputmask._valueGet()!==I().join("")?W(t,I(),Q(O())):!1===E&&te(t,Q(O()))),!0===u.positionCaretOnTab&&!1===E&&X.clickEvent.apply(t,[e,!0]),h=I().join("")},mouseleaveEvent:function(e){if(E=!1,u.clearMaskOnLostFocus&&n.activeElement!==this){var t=I().slice(),i=this.inputmask._valueGet();i!==this.getAttribute("placeholder")&&""!==i&&(-1===O()&&i===L().join("")?t=[]:ie(t),W(this,t))}},clickEvent:function(t,a){var r=this;setTimeout(function(){if(n.activeElement===r){var t=te(r);if(a&&(b?t.end=t.begin:t.begin=t.end),t.begin===t.end)switch(u.positionCaretOnClick){case"none":break;case"select":te(r,0,I().length);break;case"radixFocus":if(function(t){if(""!==u.radixPoint){var n=A().validPositions;if(n[t]===i||n[t].input===$(t)){if(t<Q(-1))return!0;var a=e.inArray(u.radixPoint,I());if(-1!==a){for(var r in n)if(a<r&&n[r].input!==$(r))return!1;return!0}}}return!1}(t.begin)){var o=I().join("").indexOf(u.radixPoint);te(r,u.numericInput?Q(o):o);break}default:var s=t.begin,l=O(s,!0),c=Q(l);if(s<c)te(r,q(s,!0)||q(s-1,!0)?s:Q(s));else{var f=A().validPositions[l],p=D(c,f?f.match.locator:i,f),h=$(c,p.match);if(""!==h&&I()[c]!==h&&!0!==p.match.optionalQuantifier&&!0!==p.match.newBlockMarker||!q(c,!0)&&p.match.def===h){var m=Q(c);(s>=m||s===c)&&(c=m)}te(r,c)}}}},0)},dblclickEvent:function(e){var t=this;setTimeout(function(){te(t,0,Q(O()))},0)},cutEvent:function(i){var a=this,r=e(a),o=te(a),s=i.originalEvent||i,c=t.clipboardData||s.clipboardData,u=b?I().slice(o.end,o.begin):I().slice(o.begin,o.end);c.setData("text",b?u.reverse().join(""):u.join("")),n.execCommand&&n.execCommand("copy"),re(a,l.keyCode.DELETE,o),W(a,I(),A().p,i,h!==I().join("")),a.inputmask._valueGet()===L().join("")&&r.trigger("cleared")},blurEvent:function(t){var n=e(this);if(this.inputmask){var a=this.inputmask._valueGet(),r=I().slice();""===a&&v===i||(u.clearMaskOnLostFocus&&(-1===O()&&a===L().join("")?r=[]:ie(r)),!1===ae(r)&&(setTimeout(function(){n.trigger("incomplete")},0),u.clearIncomplete&&(w(),r=u.clearMaskOnLostFocus?[]:L().slice())),W(this,r,i,t)),h!==I().join("")&&(h=r.join(""),n.trigger("change"))}},mouseenterEvent:function(e){E=!0,n.activeElement!==this&&u.showMaskOnHover&&this.inputmask._valueGet()!==I().join("")&&W(this,I())},submitEvent:function(e){h!==I().join("")&&m.trigger("change"),u.clearMaskOnLostFocus&&-1===O()&&g.inputmask._valueGet&&g.inputmask._valueGet()===L().join("")&&g.inputmask._valueSet(""),u.clearIncomplete&&!1===ae(I())&&g.inputmask._valueSet(""),u.removeMaskOnSubmit&&(g.inputmask._valueSet(g.inputmask.unmaskedvalue(),!0),setTimeout(function(){W(g,I())},0))},resetEvent:function(e){g.inputmask.refreshValue=!0,setTimeout(function(){m.trigger("setvalue")},0)}};function J(t,n,a,r,o){var s=r.slice(),c="",f=-1,p=i;if(w(),a||!0===u.autoUnmask)f=Q(f);else{var h=L().slice(0,Q(-1)).join(""),m=s.join("").match(new RegExp("^"+l.escapeRegex(h),"g"));m&&m.length>0&&(s.splice(0,m.length*h.length),f=Q(f))}-1===f?(A().p=Q(f),f=0):A().p=f,e.each(s,function(n,r){if(r!==i)if(A().validPositions[n]===i&&s[n]===$(n)&&q(n,!0)&&!1===K(n,s[n],!0,i,i,!0))A().p++;else{var o=new e.Event("_checkval");o.which=r.charCodeAt(0),c+=r;var l=O(i,!0),h=G(l),m=D(l+1,h?h.locator.slice():i,l);if(v=f,k=c,-1===_(!0,0,!1).slice(v,Q(v)).join("").indexOf(k)||q(v)||G(v).match.nativeDef!==k.charAt(0)&&(" "!==G(v).match.nativeDef||G(v+1).match.nativeDef!==k.charAt(0))||a||u.autoUnmask){var d=a?n:null==m.match.fn&&m.match.optionality&&l+1<A().p?l+1:A().p;(p=X.keypressEvent.call(t,o,!0,!1,a,d))&&(f=d+1,c="")}else p=X.keypressEvent.call(t,o,!0,!1,!0,l+1);W(i,I(),p.forwardPosition,o,!1)}var v,k}),n&&W(t,I(),p?p.forwardPosition:i,o||new e.Event("checkval"),o&&"input"===o.type)}function Y(t){if(t){if(t.inputmask===i)return t.value;t.inputmask&&t.inputmask.refreshValue&&X.setValueEvent.call(t)}var n=[],a=A().validPositions;for(var r in a)a[r].match&&null!=a[r].match.fn&&n.push(a[r].input);var o=0===n.length?"":(b?n.reverse():n).join("");if(e.isFunction(u.onUnMask)){var s=(b?I().slice().reverse():I()).join("");o=u.onUnMask.call(k,s,o,u)}return o}function ee(e){return!b||"number"!=typeof e||u.greedy&&""===u.placeholder||(e=g.inputmask._valueGet().length-e),e}function te(a,r,o,l){var c;if(r===i)return a.setSelectionRange?(r=a.selectionStart,o=a.selectionEnd):t.getSelection?(c=t.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==a&&c.commonAncestorContainer!==a||(r=c.startOffset,o=c.endOffset):n.selection&&n.selection.createRange&&(o=(r=0-(c=n.selection.createRange()).duplicate().moveStart("character",-a.inputmask._valueGet().length))+c.text.length),{begin:l?r:ee(r),end:l?o:ee(o)};if(e.isArray(r)&&(o=b?r[0]:r[1],r=b?r[1]:r[0]),r.begin!==i&&(o=b?r.begin:r.end,r=b?r.end:r.begin),"number"==typeof r){r=l?r:ee(r),o="number"==typeof(o=l?o:ee(o))?o:r;var f=parseInt(((a.ownerDocument.defaultView||t).getComputedStyle?(a.ownerDocument.defaultView||t).getComputedStyle(a,null):a.currentStyle).fontSize)*o;if(a.scrollLeft=f>a.scrollWidth?f:0,s||!1!==u.insertMode||r!==o||o++,a.inputmask.caretPos={begin:r,end:o},a.setSelectionRange)a.selectionStart=r,a.selectionEnd=o;else if(t.getSelection){if(c=n.createRange(),a.firstChild===i||null===a.firstChild){var p=n.createTextNode("");a.appendChild(p)}c.setStart(a.firstChild,r<a.inputmask._valueGet().length?r:a.inputmask._valueGet().length),c.setEnd(a.firstChild,o<a.inputmask._valueGet().length?o:a.inputmask._valueGet().length),c.collapse(!0);var h=t.getSelection();h.removeAllRanges(),h.addRange(c)}else a.createTextRange&&((c=a.createTextRange()).collapse(!0),c.moveEnd("character",o),c.moveStart("character",r),c.select());se(a,{begin:r,end:o})}}function ne(t){var n,a,r=I(),o=r.length,s=O(),l={},c=A().validPositions[s],u=c!==i?c.locator.slice():i;for(n=s+1;n<r.length;n++)u=(a=D(n,u,n-1)).locator.slice(),l[n]=e.extend(!0,{},a);var f=c&&c.alternation!==i?c.locator[c.alternation]:i;for(n=o-1;n>s&&(((a=l[n]).match.optionality||a.match.optionalQuantifier&&a.match.newBlockMarker||f&&(f!==l[n].locator[c.alternation]&&null!=a.match.fn||null===a.match.fn&&a.locator[c.alternation]&&N(a.locator[c.alternation].toString().split(","),f.toString().split(","))&&""!==B(n)[0].def))&&r[n]===$(n,a.match));n--)o--;return t?{l:o,def:l[o]?l[o].match:i}:o}function ie(e){for(var t,n=ne(),a=e.length,r=A().validPositions[O()];n<a&&!q(n,!0)&&(t=r!==i?D(n,r.locator.slice(""),r):G(n))&&!0!==t.match.optionality&&(!0!==t.match.optionalQuantifier&&!0!==t.match.newBlockMarker||n+1===a&&""===(r!==i?D(n+1,r.locator.slice(""),r):G(n+1)).match.def);)n++;for(;(t=A().validPositions[n-1])&&t&&t.match.optionality&&t.input===u.skipOptionalPartCharacter;)n--;return e.splice(n),e}function ae(t){if(e.isFunction(u.isComplete))return u.isComplete(t,u);if("*"===u.repeat)return i;var n=!1,a=ne(!0),r=U(a.l);if(a.def===i||a.def.newBlockMarker||a.def.optionality||a.def.optionalQuantifier){n=!0;for(var o=0;o<=r;o++){var s=D(o).match;if(null!==s.fn&&A().validPositions[o]===i&&!0!==s.optionality&&!0!==s.optionalQuantifier||null===s.fn&&t[o]!==$(o,s)){n=!1;break}}}return n}function re(e,t,n,a,r){if((u.numericInput||b)&&(t===l.keyCode.BACKSPACE?t=l.keyCode.DELETE:t===l.keyCode.DELETE&&(t=l.keyCode.BACKSPACE),b)){var o=n.end;n.end=n.begin,n.begin=o}if(t===l.keyCode.BACKSPACE&&(n.end-n.begin<1||!1===u.insertMode)?(n.begin=U(n.begin),A().validPositions[n.begin]!==i&&A().validPositions[n.begin].input===u.groupSeparator&&n.begin--,!1===u.insertMode&&n.end!==A().maskLength&&n.end--):t===l.keyCode.DELETE&&n.begin===n.end&&(n.end=q(n.end,!0)&&A().validPositions[n.end]&&A().validPositions[n.end].input!==u.radixPoint?n.end+1:Q(n.end)+1,A().validPositions[n.begin]!==i&&A().validPositions[n.begin].input===u.groupSeparator&&n.end++),H(n),!0!==a&&null!==u.keepStatic&&!1!==u.keepStatic){var s=R(!0);s&&(n.begin=s.caret!==i?s.caret:s.pos?Q(s.pos.begin?s.pos.begin:s.pos):O(-1,!0))}var c=O(n.begin,!0);if(c<n.begin||-1===n.begin)A().p=Q(c);else if(!0!==a&&(A().p=n.begin,!0!==r))for(;A().p<c&&A().validPositions[A().p]===i;)A().p++}function oe(i){var a=(i.ownerDocument.defaultView||t).getComputedStyle(i,null);var r=n.createElement("div");r.style.width=a.width,r.style.textAlign=a.textAlign,v=n.createElement("div"),i.inputmask.colorMask=v,v.className="im-colormask",i.parentNode.insertBefore(v,i),i.parentNode.removeChild(i),v.appendChild(i),v.appendChild(r),i.style.left=r.offsetLeft+"px",e(v).on("mouseleave",function(e){return X.mouseleaveEvent.call(i,[e])}),e(v).on("mouseenter",function(e){return X.mouseenterEvent.call(i,[e])}),e(v).on("click",function(e){return te(i,function(e){var t,r=n.createElement("span");for(var o in a)isNaN(o)&&-1!==o.indexOf("font")&&(r.style[o]=a[o]);r.style.textTransform=a.textTransform,r.style.letterSpacing=a.letterSpacing,r.style.position="absolute",r.style.height="auto",r.style.width="auto",r.style.visibility="hidden",r.style.whiteSpace="nowrap",n.body.appendChild(r);var s,l=i.inputmask._valueGet(),c=0;for(t=0,s=l.length;t<=s;t++){if(r.innerHTML+=l.charAt(t)||"_",r.offsetWidth>=e){var u=e-c,f=r.offsetWidth-e;r.innerHTML=l.charAt(t),t=(u-=r.offsetWidth/3)<f?t-1:t;break}c=r.offsetWidth}return n.body.removeChild(r),t}(e.clientX)),X.clickEvent.call(i,[e])}),e(i).on("keydown",function(e){e.shiftKey||!1===u.insertMode||setTimeout(function(){se(i)},0)})}function se(e,t,a){var r,o,s,l=[],c=!1,f=0;function p(e){if(e===i&&(e=""),c||null!==r.fn&&o.input!==i)if(c&&(null!==r.fn&&o.input!==i||""===r.def)){c=!1;var t=l.length;l[t-1]=l[t-1]+"</span>",l.push(e)}else l.push(e);else c=!0,l.push("<span class='im-static'>"+e)}if(v!==i){var h=I();if(t===i?t=te(e):t.begin===i&&(t={begin:t,end:t}),!0!==a){var m=O();do{A().validPositions[f]?(o=A().validPositions[f],r=o.match,s=o.locator.slice(),p(h[f])):(o=D(f,s,f-1),r=o.match,s=o.locator.slice(),(!1===u.jitMasking||f<m||"number"==typeof u.jitMasking&&isFinite(u.jitMasking)&&u.jitMasking>f)&&p($(f,r))),f++}while((d===i||f<d)&&(null!==r.fn||""!==r.def)||m>f||c);c&&p(),n.activeElement===e&&(l.splice(t.begin,0,t.begin===t.end||t.end>A().maskLength?'<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">':'<mark class="im-caret-select">'),l.splice(t.end+1,0,"</mark>"))}var k=v.getElementsByTagName("div")[0];k.innerHTML=l.join(""),e.inputmask.positionColorMask(e,k)}}if(l.prototype.positionColorMask=function(e,t){e.style.left=t.offsetLeft+"px"},a!==i)switch(a.action){case"isComplete":return g=a.el,ae(I());case"unmaskedvalue":return g!==i&&a.value===i||(Z=a.value,Z=(e.isFunction(u.onBeforeMask)&&u.onBeforeMask.call(k,Z,u)||Z).split(""),J(i,!1,!1,b?Z.reverse():Z),e.isFunction(u.onBeforeWrite)&&u.onBeforeWrite.call(k,i,I(),0,u)),Y(g);case"mask":!function(t){z.off(t);var a=function(t,a){var r=t.getAttribute("type"),o="INPUT"===t.tagName&&-1!==e.inArray(r,a.supportsInputType)||t.isContentEditable||"TEXTAREA"===t.tagName;if(!o)if("INPUT"===t.tagName){var s=n.createElement("input");s.setAttribute("type",r),o="text"===s.type,s=null}else o="partial";return!1!==o?function(t){var r,o,s;function l(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==O()||!0!==a.nullable?n.activeElement===this&&a.clearMaskOnLostFocus?(b?ie(I().slice()).reverse():ie(I().slice())).join(""):r.call(this):"":r.call(this)}function c(t){o.call(this,t),this.inputmask&&e(this).trigger("setvalue",[t])}if(!t.inputmask.__valueGet){if(!0!==a.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(e){return e.__proto__}:function(e){return e.constructor.prototype});var u=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"):i;u&&u.get&&u.set?(r=u.get,o=u.set,Object.defineProperty(t,"value",{get:l,set:c,configurable:!0})):"INPUT"!==t.tagName&&(r=function(){return this.textContent},o=function(e){this.textContent=e},Object.defineProperty(t,"value",{get:l,set:c,configurable:!0}))}else n.__lookupGetter__&&t.__lookupGetter__("value")&&(r=t.__lookupGetter__("value"),o=t.__lookupSetter__("value"),t.__defineGetter__("value",l),t.__defineSetter__("value",c));t.inputmask.__valueGet=r,t.inputmask.__valueSet=o}t.inputmask._valueGet=function(e){return b&&!0!==e?r.call(this.el).split("").reverse().join(""):r.call(this.el)},t.inputmask._valueSet=function(e,t){o.call(this.el,null===e||e===i?"":!0!==t&&b?e.split("").reverse().join(""):e)},r===i&&(r=function(){return this.value},o=function(e){this.value=e},function(t){if(e.valHooks&&(e.valHooks[t]===i||!0!==e.valHooks[t].inputmaskpatch)){var n=e.valHooks[t]&&e.valHooks[t].get?e.valHooks[t].get:function(e){return e.value},r=e.valHooks[t]&&e.valHooks[t].set?e.valHooks[t].set:function(e,t){return e.value=t,e};e.valHooks[t]={get:function(e){if(e.inputmask){if(e.inputmask.opts.autoUnmask)return e.inputmask.unmaskedvalue();var t=n(e);return-1!==O(i,i,e.inputmask.maskset.validPositions)||!0!==a.nullable?t:""}return n(e)},set:function(t,n){var i,a=e(t);return i=r(t,n),t.inputmask&&a.trigger("setvalue",[n]),i},inputmaskpatch:!0}}}(t.type),s=t,z.on(s,"mouseenter",function(t){var n=e(this);this.inputmask._valueGet()!==I().join("")&&n.trigger("setvalue")}))}}(t):t.inputmask=i,o}(t,u);if(!1!==a&&(m=e(g=t),-1===(d=g!==i?g.maxLength:i)&&(d=i),!0===u.colorMask&&oe(g),r&&("inputmode"in g&&(g.inputmode=u.inputmode,g.setAttribute("inputmode",u.inputmode)),!0===u.disablePredictiveText&&("autocorrect"in g?g.autocorrect=!1:(!0!==u.colorMask&&oe(g),g.type="password"))),!0===a&&(z.on(g,"submit",X.submitEvent),z.on(g,"reset",X.resetEvent),z.on(g,"blur",X.blurEvent),z.on(g,"focus",X.focusEvent),!0!==u.colorMask&&(z.on(g,"click",X.clickEvent),z.on(g,"mouseleave",X.mouseleaveEvent),z.on(g,"mouseenter",X.mouseenterEvent)),z.on(g,"dblclick",X.dblclickEvent),z.on(g,"paste",X.pasteEvent),z.on(g,"dragdrop",X.pasteEvent),z.on(g,"drop",X.pasteEvent),z.on(g,"cut",X.cutEvent),z.on(g,"complete",u.oncomplete),z.on(g,"incomplete",u.onincomplete),z.on(g,"cleared",u.oncleared),r||!0===u.inputEventOnly?g.removeAttribute("maxLength"):(z.on(g,"keydown",X.keydownEvent),z.on(g,"keypress",X.keypressEvent)),z.on(g,"compositionstart",e.noop),z.on(g,"compositionupdate",e.noop),z.on(g,"compositionend",e.noop),z.on(g,"keyup",e.noop),z.on(g,"input",X.inputFallBackEvent),z.on(g,"beforeinput",e.noop)),z.on(g,"setvalue",X.setValueEvent),h=L().join(""),""!==g.inputmask._valueGet(!0)||!1===u.clearMaskOnLostFocus||n.activeElement===g)){var o=e.isFunction(u.onBeforeMask)&&u.onBeforeMask.call(k,g.inputmask._valueGet(!0),u)||g.inputmask._valueGet(!0);""!==o&&J(g,!0,!1,b?o.split("").reverse():o.split(""));var s=I().slice();h=s.join(""),!1===ae(s)&&u.clearIncomplete&&w(),u.clearMaskOnLostFocus&&n.activeElement!==g&&(-1===O()?s=[]:ie(s)),W(g,s),n.activeElement===g&&te(g,Q(O()))}}(g);break;case"format":return Z=(e.isFunction(u.onBeforeMask)&&u.onBeforeMask.call(k,a.value,u)||a.value).split(""),J(i,!0,!1,b?Z.reverse():Z),a.metadata?{value:b?I().slice().reverse().join(""):I().join(""),metadata:p.call(this,{action:"getmetadata"},c,u)}:b?I().slice().reverse().join(""):I().join("");case"isValid":a.value?(Z=a.value.split(""),J(i,!0,!0,b?Z.reverse():Z)):a.value=I().join("");for(var le=I(),ce=ne(),ue=le.length-1;ue>ce&&!q(ue);ue--);return le.splice(ce,ue+1-ce),ae(le)&&a.value===I().join("");case"getemptymask":return L().join("");case"remove":if(g&&g.inputmask)e.data(g,"_inputmask_opts",null),m=e(g),g.inputmask._valueSet(u.autoUnmask?Y(g):g.inputmask._valueGet(!0)),z.off(g),g.inputmask.colorMask&&((v=g.inputmask.colorMask).removeChild(g),v.parentNode.insertBefore(g,v),v.parentNode.removeChild(v)),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(g),"value")&&g.inputmask.__valueGet&&Object.defineProperty(g,"value",{get:g.inputmask.__valueGet,set:g.inputmask.__valueSet,configurable:!0}):n.__lookupGetter__&&g.__lookupGetter__("value")&&g.inputmask.__valueGet&&(g.__defineGetter__("value",g.inputmask.__valueGet),g.__defineSetter__("value",g.inputmask.__valueSet)),g.inputmask=i;return g;case"getmetadata":if(e.isArray(c.metadata)){var fe=_(!0,0,!1).join("");return e.each(c.metadata,function(e,t){if(t.mask===fe)return fe=t,!1}),fe}return c.metadata}}return l.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:e.noop,onincomplete:e.noop,oncleared:e.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:e.noop,onBeforeMask:null,onBeforePaste:function(t,n){return e.isFunction(n.onBeforeMask)?n.onBeforeMask.call(this,t,n):t},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:e.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password","search"],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,0,229],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:i,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,disablePredictiveText:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-9１-９]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-9１-９A-Za-zА-яЁёÀ-ÿµ]"}},aliases:{},masksCache:{},mask:function(a){var r=this;return"string"==typeof a&&(a=n.getElementById(a)||n.querySelectorAll(a)),a=a.nodeName?[a]:a,e.each(a,function(n,a){var o=e.extend(!0,{},r.opts);if(function(n,a,r,o){if(!0===a.importDataAttributes){var s,l,u,f,p=n.getAttribute(o);function h(e,a){null!==(a=a!==i?a:n.getAttribute(o+"-"+e))&&("string"==typeof a&&(0===e.indexOf("on")?a=t[a]:"false"===a?a=!1:"true"===a&&(a=!0)),r[e]=a)}if(p&&""!==p&&(p=p.replace(/'/g,'"'),l=JSON.parse("{"+p+"}")),l)for(f in u=i,l)if("alias"===f.toLowerCase()){u=l[f];break}for(s in h("alias",u),r.alias&&c(r.alias,r,a),a){if(l)for(f in u=i,l)if(f.toLowerCase()===s.toLowerCase()){u=l[f];break}h(s,u)}}return e.extend(!0,a,r),("rtl"===n.dir||a.rightAlign)&&(n.style.textAlign="right"),("rtl"===n.dir||a.numericInput)&&(n.dir="ltr",n.removeAttribute("dir"),a.isRTL=!0),Object.keys(r).length}(a,o,e.extend(!0,{},r.userOptions),r.dataAttribute)){var s=u(o,r.noMasksCache);s!==i&&(a.inputmask!==i&&(a.inputmask.opts.autoUnmask=!0,a.inputmask.remove()),a.inputmask=new l(i,i,!0),a.inputmask.opts=o,a.inputmask.noMasksCache=r.noMasksCache,a.inputmask.userOptions=e.extend(!0,{},r.userOptions),a.inputmask.isRTL=o.isRTL||o.numericInput,a.inputmask.el=a,a.inputmask.maskset=s,e.data(a,"_inputmask_opts",o),p.call(a.inputmask,{action:"mask"}))}}),a&&a[0]&&a[0].inputmask||this},option:function(t,n){return"string"==typeof t?this.opts[t]:"object"==typeof t?(e.extend(this.userOptions,t),this.el&&!0!==n&&this.mask(this.el),this):void 0},unmaskedvalue:function(e){return this.maskset=this.maskset||u(this.opts,this.noMasksCache),p.call(this,{action:"unmaskedvalue",value:e})},remove:function(){return p.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||u(this.opts,this.noMasksCache),p.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||u(this.opts,this.noMasksCache),p.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||u(this.opts,this.noMasksCache),p.call(this,{action:"getmetadata"})},isValid:function(e){return this.maskset=this.maskset||u(this.opts,this.noMasksCache),p.call(this,{action:"isValid",value:e})},format:function(e,t){return this.maskset=this.maskset||u(this.opts,this.noMasksCache),p.call(this,{action:"format",value:e,metadata:t})},setValue:function(t){this.el&&e(this.el).trigger("setvalue",[t])},analyseMask:function(t,n,a){var r,o,s,c,u,f,p=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,h=/\[\^?]?(?:[^\\\]]+|\\[\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,m=!1,d=new g,v=[],k=[];function g(e,t,n,i){this.matches=[],this.openGroup=e||!1,this.alternatorGroup=!1,this.isGroup=e||!1,this.isOptional=t||!1,this.isQuantifier=n||!1,this.isAlternator=i||!1,this.quantifier={min:1,max:1}}function b(t,r,o){o=o!==i?o:t.matches.length;var s=t.matches[o-1];if(n)0===r.indexOf("[")||m&&/\\d|\\s|\\w]/i.test(r)||"."===r?t.matches.splice(o++,0,{fn:new RegExp(r,a.casing?"i":""),optionality:t.isOptional,newBlockMarker:s===i||s.def!==r,casing:null,def:r,placeholder:i,nativeDef:r}):(m&&(r=r[r.length-1]),e.each(r.split(""),function(e,n){s=t.matches[o-1],t.matches.splice(o++,0,{fn:null,optionality:t.isOptional,newBlockMarker:s===i||s.def!==n&&null!==s.fn,casing:null,def:a.staticDefinitionSymbol||n,placeholder:a.staticDefinitionSymbol!==i?n:i,nativeDef:n})})),m=!1;else{var c=(a.definitions?a.definitions[r]:i)||l.prototype.definitions[r];c&&!m?t.matches.splice(o++,0,{fn:c.validator?"string"==typeof c.validator?new RegExp(c.validator,a.casing?"i":""):new function(){this.test=c.validator}:new RegExp("."),optionality:t.isOptional,newBlockMarker:s===i||s.def!==(c.definitionSymbol||r),casing:c.casing,def:c.definitionSymbol||r,placeholder:c.placeholder,nativeDef:r}):(t.matches.splice(o++,0,{fn:null,optionality:t.isOptional,newBlockMarker:s===i||s.def!==r&&null!==s.fn,casing:null,def:a.staticDefinitionSymbol||r,placeholder:a.staticDefinitionSymbol!==i?r:i,nativeDef:r}),m=!1)}}function y(){if(v.length>0){if(b(c=v[v.length-1],o),c.isAlternator){u=v.pop();for(var e=0;e<u.matches.length;e++)u.matches[e].isGroup&&(u.matches[e].isGroup=!1);v.length>0?(c=v[v.length-1]).matches.push(u):d.matches.push(u)}}else b(d,o)}function P(e){var t=new g(!0);return t.openGroup=!1,t.matches=e,t}for(n&&(a.optionalmarker[0]=i,a.optionalmarker[1]=i);r=n?h.exec(t):p.exec(t);){if(o=r[0],n)switch(o.charAt(0)){case"?":o="{0,1}";break;case"+":case"*":o="{"+o+"}"}if(m)y();else switch(o.charAt(0)){case a.escapeChar:m=!0,n&&y();break;case a.optionalmarker[1]:case a.groupmarker[1]:if((s=v.pop()).openGroup=!1,s!==i)if(v.length>0){if((c=v[v.length-1]).matches.push(s),c.isAlternator){u=v.pop();for(var C=0;C<u.matches.length;C++)u.matches[C].isGroup=!1,u.matches[C].alternatorGroup=!1;v.length>0?(c=v[v.length-1]).matches.push(u):d.matches.push(u)}}else d.matches.push(s);else y();break;case a.optionalmarker[0]:v.push(new g(!1,!0));break;case a.groupmarker[0]:v.push(new g(!0));break;case a.quantifiermarker[0]:var E=new g(!1,!1,!0),x=(o=o.replace(/[{}]/g,"")).split("|"),_=x[0].split(","),A=isNaN(_[0])?_[0]:parseInt(_[0]),w=1===_.length?A:isNaN(_[1])?_[1]:parseInt(_[1]);"*"!==w&&"+"!==w||(A="*"===w?0:1),E.quantifier={min:A,max:w,jit:x[1]};var O=v.length>0?v[v.length-1].matches:d.matches;if((r=O.pop()).isAlternator){O.push(r),O=r.matches;var S=new g(!0),M=O.pop();O.push(S),O=S.matches,r=M}r.isGroup||(n&&null===r.fn&&"."===r.def&&(r.fn=new RegExp(r.def,a.casing?"i":"")),r=P([r])),O.push(r),O.push(E);break;case a.alternatormarker:function j(e){var t=e.pop();return t.isQuantifier&&(t=P([e.pop(),t])),t}if(v.length>0){var D=(c=v[v.length-1]).matches[c.matches.length-1];f=c.openGroup&&(D.matches===i||!1===D.isGroup&&!1===D.isAlternator)?v.pop():j(c.matches)}else f=j(d.matches);if(f.isAlternator)v.push(f);else if(f.alternatorGroup?(u=v.pop(),f.alternatorGroup=!1):u=new g(!1,!1,!1,!0),u.matches.push(f),v.push(u),f.openGroup){f.openGroup=!1;var G=new g(!0);G.alternatorGroup=!0,v.push(G)}break;default:y()}}for(;v.length>0;)s=v.pop(),d.matches.push(s);return d.matches.length>0&&(!function t(r){r&&r.matches&&e.each(r.matches,function(e,o){var s=r.matches[e+1];(s===i||s.matches===i||!1===s.isQuantifier)&&o&&o.isGroup&&(o.isGroup=!1,n||(b(o,a.groupmarker[0],0),!0!==o.openGroup&&b(o,a.groupmarker[1]))),t(o)})}(d),k.push(d)),(a.numericInput||a.isRTL)&&function e(t){for(var n in t.matches=t.matches.reverse(),t.matches)if(t.matches.hasOwnProperty(n)){var r=parseInt(n);if(t.matches[n].isQuantifier&&t.matches[r+1]&&t.matches[r+1].isGroup){var o=t.matches[n];t.matches.splice(n,1),t.matches.splice(r+1,0,o)}t.matches[n].matches!==i?t.matches[n]=e(t.matches[n]):t.matches[n]=((s=t.matches[n])===a.optionalmarker[0]?s=a.optionalmarker[1]:s===a.optionalmarker[1]?s=a.optionalmarker[0]:s===a.groupmarker[0]?s=a.groupmarker[1]:s===a.groupmarker[1]&&(s=a.groupmarker[0]),s)}var s;return t}(k[0]),k}},l.extendDefaults=function(t){e.extend(!0,l.prototype.defaults,t)},l.extendDefinitions=function(t){e.extend(!0,l.prototype.definitions,t)},l.extendAliases=function(t){e.extend(!0,l.prototype.aliases,t)},l.format=function(e,t,n){return l(t).format(e,n)},l.unmask=function(e,t){return l(t).unmaskedvalue(e)},l.isValid=function(e,t){return l(t).isValid(e)},l.remove=function(t){"string"==typeof t&&(t=n.getElementById(t)||n.querySelectorAll(t)),t=t.nodeName?[t]:t,e.each(t,function(e,t){t.inputmask&&t.inputmask.remove()})},l.setValue=function(t,i){"string"==typeof t&&(t=n.getElementById(t)||n.querySelectorAll(t)),t=t.nodeName?[t]:t,e.each(t,function(t,n){n.inputmask?n.inputmask.setValue(i):e(n).trigger("setvalue",[i])})},l.escapeRegex=function(e){return e.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},l.keyCode={BACKSPACE:8,BACKSPACE_SAFARI:127,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SPACE:32,TAB:9,UP:38,X:88,CONTROL:17},l});