芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/vendor/bower-asset/inputmask/dist/min/inputmask/inputmask.min.js
/*! * inputmask.min.js * https://github.com/RobinHerbots/Inputmask * Copyright (c) 2010 - 2017 Robin Herbots * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) * Version: 3.3.11 */ !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){function a(t,n,o){if(!(this instanceof a))return new a(t,n,o);this.el=i,this.events={},this.maskset=i,this.refreshValue=!1,!0!==o&&(e.isPlainObject(t)?n=t:(n=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,r(this.opts.alias,n,this.opts))}function r(t,n,o){var s=a.prototype.aliases[t];return s?(s.alias&&r(s.alias,i,o),e.extend(!0,o,s),e.extend(!0,o,n),!0):(null===o.mask&&(o.mask=t),!1)}function o(t,n){function r(t,r,o){var s=!1;if(null!==t&&""!==t||((s=null!==o.regex)?t=(t=o.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(s=!0,t=".*")),1===t.length&&!1===o.greedy&&0!==o.repeat&&(o.placeholder=""),o.repeat>0||"*"===o.repeat||"+"===o.repeat){var l="*"===o.repeat?0:"+"===o.repeat?1:o.repeat;t=o.groupmarker.start+t+o.groupmarker.end+o.quantifiermarker.start+l+","+o.repeat+o.quantifiermarker.end}var c,u=s?"regex_"+o.regex:o.numericInput?t.split("").reverse().join(""):t;return a.prototype.masksCache[u]===i||!0===n?(c={mask:t,maskToken:a.prototype.analyseMask(t,s,o),validPositions:{},_buffer:i,buffer:i,tests:{},metadata:r,maskLength:i},!0!==n&&(a.prototype.masksCache[u]=c,c=e.extend(!0,{},a.prototype.masksCache[u]))):c=e.extend(!0,{},a.prototype.masksCache[u]),c}if(e.isFunction(t.mask)&&(t.mask=t.mask(t)),e.isArray(t.mask)){if(t.mask.length>1){t.keepStatic=null===t.keepStatic||t.keepStatic;var o=t.groupmarker.start;return e.each(t.numericInput?t.mask.reverse():t.mask,function(n,a){o.length>1&&(o+=t.groupmarker.end+t.alternatormarker+t.groupmarker.start),a.mask===i||e.isFunction(a.mask)?o+=a:o+=a.mask}),o+=t.groupmarker.end,r(o,t.mask,t)}t.mask=t.mask.pop()}return t.mask&&t.mask.mask!==i&&!e.isFunction(t.mask.mask)?r(t.mask.mask,t.mask,t):r(t.mask,t.mask,t)}function s(r,o,l){function h(e,t,n){t=t||0;var a,r,o,s=[],c=0,u=v();do{!0===e&&m().validPositions[c]?(r=(o=m().validPositions[c]).match,a=o.locator.slice(),s.push(!0===n?o.input:!1===n?r.nativeDef:G(c,r))):(r=(o=y(c,a,c-1)).match,a=o.locator.slice(),(!1===l.jitMasking||c
c)&&s.push(!1===n?r.nativeDef:G(c,r))),c++}while((W===i||c
c);return""===s[s.length-1]&&s.pop(),m().maskLength=c+1,s}function m(){return o}function d(e){var t=m();t.buffer=i,!0!==e&&(t.validPositions={},t.p=0)}function v(e,t,n){var a=-1,r=-1,o=n||m().validPositions;e===i&&(e=-1);for(var s in o){var l=parseInt(s);o[l]&&(t||!0!==o[l].generatedInput)&&(l<=e&&(a=l),l>=e&&(r=l))}return-1!==a&&e-a>1||r
=s;o--)m().validPositions[o]!==i&&(!0!==a&&(!m().validPositions[o].match.optionality&&function(e){var t=m().validPositions[e];if(t!==i&&null===t.match.fn){var n=m().validPositions[e-1],a=m().validPositions[e+1];return n!==i&&a!==i}return!1}(o)||!1===l.canClearPosition(m(),o,v(),r,l))||delete m().validPositions[o]);for(d(!0),o=s+1;o<=v();){for(;m().validPositions[s]!==i;)s++;if(o
1e4)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. "+m().mask;if(u===t&&o.matches===i)return p.push({match:o,locator:c.reverse(),cd:d}),!0;if(o.matches!==i){if(o.isGroup&&v!==o){if(o=f(n.matches[e.inArray(o,n.matches)+1],c))return!0}else if(o.isOptional){var y=o;if(o=r(o,a,c,v)){if(s=p[p.length-1].match,!g(s,y))return!0;h=!0,u=t}}else if(o.isAlternator){var b,P=o,E=[],C=p.slice(),A=c.length,_=a.length>0?a.shift():-1;if(-1===_||"string"==typeof _){var x,w=u,M=a.slice(),O=[];if("string"==typeof _)O=_.split(",");else for(x=0;x
D&&(o=f(n.matches[D],[D].concat(c.slice(1,c.length)),v))&&(O.push(D.toString()),e.each(p,function(e,t){t.alternation=c.length-1}))}b=p.slice(),u=w,p=[];for(var j=0;j
0,o=E.length>0,a=M.slice()}else o=f(P.matches[_]||n.matches[_],[_].concat(c),v);if(o)return!0}else if(o.isQuantifier&&v!==n.matches[e.inArray(o,n.matches)-1])for(var I=o,F=a.length>0?a.shift():0;F<(isNaN(I.quantifier.max)?F+1:I.quantifier.max)&&u<=t;F++){var N=n.matches[e.inArray(I,n.matches)-1];if(o=f(N,[F].concat(c),N)){if(s=p[p.length-1].match,s.optionalQuantifier=F>I.quantifier.min-1,g(s,N)){if(F>I.quantifier.min-1){h=!0,u=t;break}return!0}return!0}}else if(o=r(o,a,c,v))return!0}else u++}for(var v=a.length>0?a.shift():0;v
t)break}}function o(e){if(l.keepStatic&&t>0&&e.length>1+(""===e[e.length-1].match.def?1:0)&&!0!==e[0].match.optionality&&!0!==e[0].match.optionalQuantifier&&null===e[0].match.fn&&!/[0-9a-bA-Z]/.test(e[0].match.def)){if(m().validPositions[t-1]===i)return[k(e)];if(m().validPositions[t-1].alternation===e[0].alternation)return[k(e)];if(m().validPositions[t-1])return[k(e)]}return e}var s,c=m().maskToken,u=n?a:0,f=n?n.slice():[0],p=[],h=!1,d=n?n.join(""):"";if(t>-1){if(n===i){for(var v,g=t-1;(v=m().validPositions[g]||m().tests[g])===i&&g>-1;)g--;v!==i&&g>-1&&(f=function(t){var n=[];return e.isArray(t)||(t=[t]),t.length>0&&(t[0].alternation===i?0===(n=k(t.slice()).locator.slice()).length&&(n=t[0].locator.slice()):e.each(t,function(e,t){if(""!==t.def)if(0===n.length)n=t.locator.slice();else for(var i=0;i
t);y++);}return(0===p.length||h)&&p.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:d}),n!==i&&m().tests[t]?o(e.extend(!0,[],p)):(m().tests[t]=e.extend(!0,[],p),o(m().tests[t]))}function C(){return m()._buffer===i&&(m()._buffer=h(!1,1),m().buffer===i&&(m().buffer=m()._buffer.slice())),m()._buffer}function A(e){return m().buffer!==i&&!0!==e||(m().buffer=h(!0,v(),!0)),m().buffer}function _(e,t,n){var a,r;if(!0===e)d(),e=0,t=n.length;else for(a=e;a
1||e.begin-e.end==1:e.end-e.begin>1||e.end-e.begin==1;return t&&0===e.begin&&e.end===m().maskLength?"full":t}function f(n,a,r){var s=!1;return e.each(E(n),function(c,f){for(var h=f.match,k=a?1:0,y="",b=h.cardinality;b>k;b--)y+=j(n-(b-1));if(a&&(y+=a),A(!0),!1!==(s=null!=h.fn?h.fn.test(y,m(),n,r,l,u(t)):(a===h.def||a===l.skipOptionalPartCharacter)&&""!==h.def&&{c:G(n,h,!0)||h.def,pos:n})){var P=s.c!==i?s.c:a;P=P===l.skipOptionalPartCharacter&&null===h.fn?G(n,h,!0)||h.def:P;var E=n,C=A();if(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){g(t,t+1,!0)})),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){M(t.pos,t.c,!0,o)})),s.refreshFromBuffer){var w=s.refreshFromBuffer;if(_(!0===w?w:w.start,w.end,C),s.pos===i&&s.c===i)return s.pos=v(),!1;if((E=s.pos!==i?s.pos:n)!==n)return s=e.extend(s,M(E,P,!0,o)),!1}else if(!0!==s&&s.pos!==i&&s.pos!==n&&(E=s.pos,_(n,E,A().slice()),E!==n))return s=e.extend(s,M(E,P,!0)),!1;return(!0===s||s.pos!==i||s.c!==i)&&(c>0&&d(!0),p(E,e.extend({},f,{input:x(P,h,E)}),o,u(t))||(s=!1),!1)}}),s}function p(t,n,a,r){if(r||l.insertMode&&m().validPositions[t]!==i&&a===i){var o,s=e.extend(!0,{},m().validPositions),c=v(i,!0);for(o=t;o<=c;o++)delete m().validPositions[o];m().validPositions[t]=e.extend(!0,{},n);var u,f=!0,p=m().validPositions,g=!1,k=m().maskLength;for(o=u=t;o<=c;o++){var y=s[o];if(y!==i)for(var b=u;b
=m().maskLength-1)break;if(m().maskLength
-1&&!m().validPositions[n];n--);var a,r;for(n++;n
n)&&(""===(r=E(n,y(n-1).locator,n-1).slice())[r.length-1].match.def&&r.pop(),(a=k(r))&&(a.match.def===l.radixPointDefinitionSymbol||!O(n,!0)||e.inArray(l.radixPoint,A())
Math.abs(a-l)&&(c=t);break}u
=0;b--)if((c=m().validPositions[b])&&c.alternation!==i){if(r=b,s=m().validPositions[r].alternation,u.locator[c.alternation]!==c.locator[c.alternation])break;u=c}if(s!==i){g=parseInt(r);var P=u.locator[u.alternation||s]!==i?u.locator[u.alternation||s]:h[0];P.length>0&&(P=P.split(",")[0]);var C=m().validPositions[g],A=m().validPositions[g-1];e.each(E(g,A?A.locator:i,g-1),function(r,c){h=c.locator[s]?c.locator[s].toString().split(","):[];for(var u=0;u
0;){var w=b.shift();if(w!==l.skipOptionalPartCharacter&&!(y=M(v(i,!0)+1,w,!1,o,!0)))break}if(y){m().validPositions[g].locator=x;var O=v(t)+1;for(f=g+1;f
O?O:t,n,a,o,!0)}if(y)return!1;d(),m().validPositions=e.extend(!0,{},k)}}})}return y}(b,n,r)),!0===C&&(C={pos:b})}if(e.isFunction(l.postValidation)&&!1!==C&&!r&&!0!==o&&!0!==c){var I=l.postValidation(A(!0),C,l);if(I.refreshFromBuffer&&I.buffer){var F=I.refreshFromBuffer;_(!0===F?F:F.start,F.end,I.buffer)}C=!0===I?C:I}return C&&C.pos===i&&(C.pos=b),!1!==C&&!0!==c||(d(!0),m().validPositions=e.extend(!0,{},D)),C}function O(e,t){var n=y(e).match;if(""===n.def&&(n=b(e).match),null!=n.fn)return n.fn;if(!0!==t&&e>-1){var i=E(e);return i.length>1+(""===i[i.length-1].match.def?1:0)}return!1}function S(e,t){var n=m().maskLength;if(e>=n)return n;var i=e;for(E(n+1).length>1&&(h(!0,n+1,!0),n=m().maskLength);++i
0&&(!0===t&&!0!==b(i).match.newBlockMarker||!0!==t&&!O(i)&&((n=E(i)).length<2||2===n.length&&""===n[1].match.def)););return i}function j(e){return m().validPositions[e]===i?G(e):m().validPositions[e].input}function T(t,n,a,r,o){if(r&&e.isFunction(l.onBeforeWrite)){var s=l.onBeforeWrite.call(Z,r,n,a,l);if(s){if(s.refreshFromBuffer){var c=s.refreshFromBuffer;_(!0===c?c:c.start,c.end,s.buffer||n),n=A(!0)}a!==i&&(a=s.caret!==i?s.caret:a)}}t!==i&&(t.inputmask._valueSet(n.join("")),a===i||r!==i&&"blur"===r.type?V(t,a,0===n.length):p&&r&&"input"===r.type?setTimeout(function(){I(t,a)},0):I(t,a),!0===o&&(J=!0,e(t).trigger("input")))}function G(t,n,a){if((n=n||b(t).match).placeholder!==i||!0===a)return e.isFunction(n.placeholder)?n.placeholder(l):n.placeholder;if(null===n.fn){if(t>-1&&m().validPositions[t]===i){var r,o=E(t),s=[];if(o.length>1+(""===o[o.length-1].match.def?1:0))for(var c=0;c
1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return l.placeholder.charAt(t%l.placeholder.length)}return n.def}return l.placeholder.charAt(t%l.placeholder.length)}function L(t,r,o,s,c){function u(e,t){return-1!==C().slice(e,S(e)).join("").indexOf(t)&&!O(e)&&b(e).match.nativeDef===t.charAt(t.length-1)}var f=s.slice(),p="",h=-1,g=i;if(d(),o||!0===l.autoUnmask)h=S(h);else{var k=C().slice(0,S(-1)).join(""),P=f.join("").match(new RegExp("^"+a.escapeRegex(k),"g"));P&&P.length>0&&(f.splice(0,P.length*k.length),h=S(h))}if(-1===h?(m().p=S(h),h=0):m().p=h,e.each(f,function(n,a){if(a!==i)if(m().validPositions[n]===i&&f[n]===G(n)&&O(n,!0)&&!1===M(n,f[n],!0,i,i,!0))m().p++;else{var r=new e.Event("_checkval");r.which=a.charCodeAt(0),p+=a;var s=v(i,!0),c=m().validPositions[s],k=y(s+1,c?c.locator.slice():i,s);if(!u(h,p)||o||l.autoUnmask){var b=o?n:null==k.match.fn&&k.match.optionality&&s+1
e.scrollWidth?f:0,c||!1!==l.insertMode||a!==r||r++,e.setSelectionRange)e.selectionStart=a,e.selectionEnd=r;else if(t.getSelection){if(u=n.createRange(),e.firstChild===i||null===e.firstChild){var p=n.createTextNode("");e.appendChild(p)}u.setStart(e.firstChild,a
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]&&w(a.locator[c.alternation].toString().split(","),f.toString().split(","))&&""!==E(n)[0].def))&&r[n]===G(n,a.match));n--)o--;return t?{l:o,def:l[o]?l[o].match:i}:o}function N(e){for(var t,n=F(),a=e.length,r=m().validPositions[v()];n
=0;a--){var s=m().validPositions[a];if(s){if(!0!==s.generatedInput&&/[0-9a-bA-Z]/.test(s.input)&&n.push(s.input),delete m().validPositions[a],s.alternation!==i&&s.locator[s.alternation]!==o.locator[s.alternation])break;o=s}}if(a>-1)for(m().p=S(v(-1,!0));n.length>0;){var c=new e.Event("keypress");c.which=n.pop().charCodeAt(0),ne.keypressEvent.call(t,c,!0,!1,!1,m().p)}else m().validPositions=e.extend(!0,{},r)}}();var u=v(r.begin,!0);if(u
=e){var u=e-c,f=a.offsetWidth-e;a.innerHTML=l.charAt(t),t=(u-=a.offsetWidth/3)
"):(p=!0,f+="
")}function o(i){!0!==i&&h!==t.begin||n.activeElement!==e||(f+="
")}var s,c,u,f="",p=!1,h=0;if(q!==i){var d=A();if(t===i?t=I(e):t.begin===i&&(t={begin:t,end:t}),!0!==a){var g=v();do{o(),m().validPositions[h]?(c=m().validPositions[h],s=c.match,u=c.locator.slice(),r(),f+=d[h]):(c=y(h,u,h-1),s=c.match,u=c.locator.slice(),(!1===l.jitMasking||h
h)&&(r(),f+=G(h,s))),h++}while((W===i||h
h||p);-1===f.indexOf("im-caret")&&o(!0),p&&r()}var k=q.getElementsByTagName("div")[0];k.innerHTML=f,e.inputmask.positionColorMask(e,k)}}o=o||this.maskset,l=l||this.opts;var H,Q,W,q,Z=this,$=this.el,z=this.isRTL,X=!1,J=!1,Y=!1,ee=!1,te={on:function(t,n,r){var o=function(t){if(this.inputmask===i&&"FORM"!==this.nodeName){var n=e.data(this,"_inputmask_opts");n?new a(n).mask(this):te.off(this)}else{if("setvalue"===t.type||"FORM"===this.nodeName||!(this.disabled||this.readOnly&&!("keydown"===t.type&&t.ctrlKey&&67===t.keyCode||!1===l.tabThrough&&t.keyCode===a.keyCode.TAB))){switch(t.type){case"input":if(!0===J)return J=!1,t.preventDefault();break;case"keydown":X=!1,J=!1;break;case"keypress":if(!0===X)return t.preventDefault();X=!0;break;case"click":if(u||f){var o=this,s=arguments;return setTimeout(function(){r.apply(o,s)},0),!1}}var c=r.apply(this,arguments);return!1===c&&(t.preventDefault(),t.stopPropagation()),c}t.preventDefault()}};t.inputmask.events[n]=t.inputmask.events[n]||[],t.inputmask.events[n].push(o),-1!==e.inArray(n,["submit","reset"])?null!==t.form&&e(t.form).on(n,o):e(t).on(n,o)},off:function(t,n){if(t.inputmask&&t.inputmask.events){var i;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]})}}},ne={keydownEvent:function(t){var i=this,r=e(i),o=t.keyCode,s=I(i);if(o===a.keyCode.BACKSPACE||o===a.keyCode.DELETE||f&&o===a.keyCode.BACKSPACE_SAFARI||t.ctrlKey&&o===a.keyCode.X&&!function(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}("cut"))t.preventDefault(),K(i,o,s),T(i,A(!0),m().p,t,i.inputmask._valueGet()!==A().join("")),i.inputmask._valueGet()===C().join("")?r.trigger("cleared"):!0===R(A())&&r.trigger("complete");else if(o===a.keyCode.END||o===a.keyCode.PAGE_DOWN){t.preventDefault();var c=S(v());l.insertMode||c!==m().maskLength||t.shiftKey||c--,I(i,t.shiftKey?s.begin:c,c,!0)}else o===a.keyCode.HOME&&!t.shiftKey||o===a.keyCode.PAGE_UP?(t.preventDefault(),I(i,0,t.shiftKey?s.begin:0,!0)):(l.undoOnEscape&&o===a.keyCode.ESCAPE||90===o&&t.ctrlKey)&&!0!==t.altKey?(L(i,!0,!1,H.split("")),r.trigger("click")):o!==a.keyCode.INSERT||t.shiftKey||t.ctrlKey?!0===l.tabThrough&&o===a.keyCode.TAB?(!0===t.shiftKey?(null===b(s.begin).match.fn&&(s.begin=S(s.begin)),s.end=D(s.begin,!0),s.begin=D(s.end,!0)):(s.begin=S(s.begin,!0),s.end=S(s.begin,!0),s.end
A().length){var a=new e.Event("keypress");return a.which=l.radixPoint.charCodeAt(0),ne.keypressEvent.call(t,a,!0,!0,!1,i.begin-1),!1}}(n,i,r))return!1;if(i=i.replace(new RegExp("("+a.escapeRegex(C().join(""))+")*"),""),!1===function(t,n,i){if(u){var a=n.replace(A().join(""),"");if(1===a.length){var r=new e.Event("keypress");return r.which=a.charCodeAt(0),ne.keypressEvent.call(t,r,!0,!0,!1,m().validPositions[i.begin-1]?i.begin:i.begin-1),!1}}}(n,i,r))return!1;r.begin>i.length&&(I(n,i.length),r=I(n));var o=A().join(""),s=i.substr(0,r.begin),c=i.substr(r.begin),f=o.substr(0,r.begin),p=o.substr(r.begin),h=r,d="",v=!1;if(s!==f){h.begin=0;for(var g=(v=s.length>=f.length)?s.length:f.length,k=0;s.charAt(k)===f.charAt(k)&&k
p.length?v&&(h.end=h.begin):c.length
0?e.each(d.split(""),function(t,i){var a=new e.Event("keypress");a.which=i.charCodeAt(0),Y=!1,ne.keypressEvent.call(n,a)}):(h.begin===h.end-1&&I(n,D(h.begin+1),h.end),t.keyCode=a.keyCode.DELETE,ne.keydownEvent.call(n,t)),t.preventDefault()}},setValueEvent:function(t){this.inputmask.refreshValue=!1;var n=this,i=n.inputmask._valueGet(!0);e.isFunction(l.onBeforeMask)&&(i=l.onBeforeMask.call(Z,i,l)||i),i=i.split(""),L(n,!0,!1,z?i.reverse():i),H=A().join(""),(l.clearMaskOnLostFocus||l.clearIncomplete)&&n.inputmask._valueGet()===C().join("")&&n.inputmask._valueSet("")},focusEvent:function(e){var t=this,n=t.inputmask._valueGet();l.showMaskOnFocus&&(!l.showMaskOnHover||l.showMaskOnHover&&""===n)&&(t.inputmask._valueGet()!==A().join("")?T(t,A(),S(v())):!1===ee&&I(t,S(v()))),!0===l.positionCaretOnTab&&!1===ee&&""!==n&&(T(t,A(),I(t)),ne.clickEvent.apply(t,[e,!0])),H=A().join("")},mouseleaveEvent:function(e){var t=this;if(ee=!1,l.clearMaskOnLostFocus&&n.activeElement!==t){var i=A().slice(),a=t.inputmask._valueGet();a!==t.getAttribute("placeholder")&&""!==a&&(-1===v()&&a===C().join("")?i=[]:N(i),T(t,i))}},clickEvent:function(t,a){function r(t){if(""!==l.radixPoint){var n=m().validPositions;if(n[t]===i||n[t].input===G(t)){if(t
=d||s===u)&&(u=d)}I(o,u)}}}},0)},dblclickEvent:function(e){var t=this;setTimeout(function(){I(t,0,S(v()))},0)},cutEvent:function(i){var r=this,o=e(r),s=I(r),l=i.originalEvent||i,c=t.clipboardData||l.clipboardData,u=z?A().slice(s.end,s.begin):A().slice(s.begin,s.end);c.setData("text",z?u.reverse().join(""):u.join("")),n.execCommand&&n.execCommand("copy"),K(r,a.keyCode.DELETE,s),T(r,A(),m().p,i,H!==A().join("")),r.inputmask._valueGet()===C().join("")&&o.trigger("cleared")},blurEvent:function(t){var n=e(this),a=this;if(a.inputmask){var r=a.inputmask._valueGet(),o=A().slice();""!==r&&(l.clearMaskOnLostFocus&&(-1===v()&&r===C().join("")?o=[]:N(o)),!1===R(o)&&(setTimeout(function(){n.trigger("incomplete")},0),l.clearIncomplete&&(d(),o=l.clearMaskOnLostFocus?[]:C().slice())),T(a,o,i,t)),H!==A().join("")&&(H=o.join(""),n.trigger("change"))}},mouseenterEvent:function(e){var t=this;ee=!0,n.activeElement!==t&&l.showMaskOnHover&&t.inputmask._valueGet()!==A().join("")&&T(t,A())},submitEvent:function(e){H!==A().join("")&&Q.trigger("change"),l.clearMaskOnLostFocus&&-1===v()&&$.inputmask._valueGet&&$.inputmask._valueGet()===C().join("")&&$.inputmask._valueSet(""),l.removeMaskOnSubmit&&($.inputmask._valueSet($.inputmask.unmaskedvalue(),!0),setTimeout(function(){T($,A())},0))},resetEvent:function(e){$.inputmask.refreshValue=!0,setTimeout(function(){Q.trigger("setvalue")},0)}};a.prototype.positionColorMask=function(e,t){e.style.left=t.offsetLeft+"px"};var ie;if(r!==i)switch(r.action){case"isComplete":return $=r.el,R(A());case"unmaskedvalue":return $!==i&&r.value===i||(ie=r.value,ie=(e.isFunction(l.onBeforeMask)?l.onBeforeMask.call(Z,ie,l)||ie:ie).split(""),L(i,!1,!1,z?ie.reverse():ie),e.isFunction(l.onBeforeWrite)&&l.onBeforeWrite.call(Z,i,A(),0,l)),B($);case"mask":!function(t){te.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){function r(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==v()||!0!==a.nullable?n.activeElement===this&&a.clearMaskOnLostFocus?(z?N(A().slice()).reverse():N(A().slice())).join(""):s.call(this):"":s.call(this)}function o(t){l.call(this,t),this.inputmask&&e(this).trigger("setvalue")}var s,l;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 c=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"):i;c&&c.get&&c.set?(s=c.get,l=c.set,Object.defineProperty(t,"value",{get:r,set:o,configurable:!0})):"INPUT"!==t.tagName&&(s=function(){return this.textContent},l=function(e){this.textContent=e},Object.defineProperty(t,"value",{get:r,set:o,configurable:!0}))}else n.__lookupGetter__&&t.__lookupGetter__("value")&&(s=t.__lookupGetter__("value"),l=t.__lookupSetter__("value"),t.__defineGetter__("value",r),t.__defineSetter__("value",o));t.inputmask.__valueGet=s,t.inputmask.__valueSet=l}t.inputmask._valueGet=function(e){return z&&!0!==e?s.call(this.el).split("").reverse().join(""):s.call(this.el)},t.inputmask._valueSet=function(e,t){l.call(this.el,null===e||e===i?"":!0!==t&&z?e.split("").reverse().join(""):e)},s===i&&(s=function(){return this.value},l=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!==v(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"),i},inputmaskpatch:!0}}}(t.type),function(t){te.on(t,"mouseenter",function(t){var n=e(this);this.inputmask._valueGet()!==A().join("")&&n.trigger("setvalue")})}(t))}}(t):t.inputmask=i,o}(t,l);if(!1!==a&&($=t,Q=e($),-1===(W=$!==i?$.maxLength:i)&&(W=i),!0===l.colorMask&&U($),p&&($.hasOwnProperty("inputmode")&&($.inputmode=l.inputmode,$.setAttribute("inputmode",l.inputmode)),"rtfm"===l.androidHack&&(!0!==l.colorMask&&U($),$.type="password")),!0===a&&(te.on($,"submit",ne.submitEvent),te.on($,"reset",ne.resetEvent),te.on($,"mouseenter",ne.mouseenterEvent),te.on($,"blur",ne.blurEvent),te.on($,"focus",ne.focusEvent),te.on($,"mouseleave",ne.mouseleaveEvent),!0!==l.colorMask&&te.on($,"click",ne.clickEvent),te.on($,"dblclick",ne.dblclickEvent),te.on($,"paste",ne.pasteEvent),te.on($,"dragdrop",ne.pasteEvent),te.on($,"drop",ne.pasteEvent),te.on($,"cut",ne.cutEvent),te.on($,"complete",l.oncomplete),te.on($,"incomplete",l.onincomplete),te.on($,"cleared",l.oncleared),p||!0===l.inputEventOnly?$.removeAttribute("maxLength"):(te.on($,"keydown",ne.keydownEvent),te.on($,"keypress",ne.keypressEvent)),te.on($,"compositionstart",e.noop),te.on($,"compositionupdate",e.noop),te.on($,"compositionend",e.noop),te.on($,"keyup",e.noop),te.on($,"input",ne.inputFallBackEvent),te.on($,"beforeinput",e.noop)),te.on($,"setvalue",ne.setValueEvent),H=C().join(""),""!==$.inputmask._valueGet(!0)||!1===l.clearMaskOnLostFocus||n.activeElement===$)){var r=e.isFunction(l.onBeforeMask)?l.onBeforeMask.call(Z,$.inputmask._valueGet(!0),l)||$.inputmask._valueGet(!0):$.inputmask._valueGet(!0);""!==r&&L($,!0,!1,z?r.split("").reverse():r.split(""));var o=A().slice();H=o.join(""),!1===R(o)&&l.clearIncomplete&&d(),l.clearMaskOnLostFocus&&n.activeElement!==$&&(-1===v()?o=[]:N(o)),T($,o),n.activeElement===$&&I($,S(v()))}}($);break;case"format":return ie=(e.isFunction(l.onBeforeMask)?l.onBeforeMask.call(Z,r.value,l)||r.value:r.value).split(""),L(i,!0,!1,z?ie.reverse():ie),r.metadata?{value:z?A().slice().reverse().join(""):A().join(""),metadata:s.call(this,{action:"getmetadata"},o,l)}:z?A().slice().reverse().join(""):A().join("");case"isValid":r.value?(ie=r.value.split(""),L(i,!0,!0,z?ie.reverse():ie)):r.value=A().join("");for(var ae=A(),re=F(),oe=ae.length-1;oe>re&&!O(oe);oe--);return ae.splice(re,oe+1-re),R(ae)&&r.value===A().join("");case"getemptymask":return C().join("");case"remove":if($&&$.inputmask){Q=e($),$.inputmask._valueSet(l.autoUnmask?B($):$.inputmask._valueGet(!0)),te.off($);Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf($),"value")&&$.inputmask.__valueGet&&Object.defineProperty($,"value",{get:$.inputmask.__valueGet,set:$.inputmask.__valueSet,configurable:!0}):n.__lookupGetter__&&$.__lookupGetter__("value")&&$.inputmask.__valueGet&&($.__defineGetter__("value",$.inputmask.__valueGet),$.__defineSetter__("value",$.inputmask.__valueSet)),$.inputmask=i}return $;case"getmetadata":if(e.isArray(o.metadata)){var se=h(!0,0,!1).join("");return e.each(o.metadata,function(e,t){if(t.mask===se)return se=t,!1}),se}return o.metadata}}var l=navigator.userAgent,c=/mobile/i.test(l),u=/iemobile/i.test(l),f=/iphone/i.test(l)&&!u,p=/android/i.test(l)&&!u;return a.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},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:"",radixPointDefinitionSymbol:i,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],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,canClearPosition:e.noop,preValidation:null,postValidation:null,staticDefinitionSymbol:i,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},aliases:{},masksCache:{},mask:function(l){function c(n,a,o,s){function l(e,a){null!==(a=a!==i?a:n.getAttribute(s+"-"+e))&&("string"==typeof a&&(0===e.indexOf("on")?a=t[a]:"false"===a?a=!1:"true"===a&&(a=!0)),o[e]=a)}if(!0===a.importDataAttributes){var c,u,f,p,h=n.getAttribute(s);if(h&&""!==h&&(h=h.replace(new RegExp("'","g"),'"'),u=JSON.parse("{"+h+"}")),u){f=i;for(p in u)if("alias"===p.toLowerCase()){f=u[p];break}}l("alias",f),o.alias&&r(o.alias,o,a);for(c in a){if(u){f=i;for(p in u)if(p.toLowerCase()===c.toLowerCase()){f=u[p];break}}l(c,f)}}return e.extend(!0,a,o),("rtl"===n.dir||a.rightAlign)&&(n.style.textAlign="right"),("rtl"===n.dir||a.numericInput)&&(n.dir="ltr",n.removeAttribute("dir"),a.isRTL=!0),a}var u=this;return"string"==typeof l&&(l=n.getElementById(l)||n.querySelectorAll(l)),l=l.nodeName?[l]:l,e.each(l,function(t,n){var r=e.extend(!0,{},u.opts);c(n,r,e.extend(!0,{},u.userOptions),u.dataAttribute);var l=o(r,u.noMasksCache);l!==i&&(n.inputmask!==i&&(n.inputmask.opts.autoUnmask=!0,n.inputmask.remove()),n.inputmask=new a(i,i,!0),n.inputmask.opts=r,n.inputmask.noMasksCache=u.noMasksCache,n.inputmask.userOptions=e.extend(!0,{},u.userOptions),n.inputmask.isRTL=r.isRTL||r.numericInput,n.inputmask.el=n,n.inputmask.maskset=l,e.data(n,"_inputmask_opts",r),s.call(n.inputmask,{action:"mask"}))}),l&&l[0]?l[0].inputmask||this: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||o(this.opts,this.noMasksCache),s.call(this,{action:"unmaskedvalue",value:e})},remove:function(){return s.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||o(this.opts,this.noMasksCache),s.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||o(this.opts,this.noMasksCache),s.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||o(this.opts,this.noMasksCache),s.call(this,{action:"getmetadata"})},isValid:function(e){return this.maskset=this.maskset||o(this.opts,this.noMasksCache),s.call(this,{action:"isValid",value:e})},format:function(e,t){return this.maskset=this.maskset||o(this.opts,this.noMasksCache),s.call(this,{action:"format",value:e,metadata:t})},analyseMask:function(t,n,r){function o(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 s(t,o,s){s=s!==i?s:t.matches.length;var l=t.matches[s-1];if(n)0===o.indexOf("[")||b&&/\\d|\\s|\\w]/i.test(o)||"."===o?t.matches.splice(s++,0,{fn:new RegExp(o,r.casing?"i":""),cardinality:1,optionality:t.isOptional,newBlockMarker:l===i||l.def!==o,casing:null,def:o,placeholder:i,nativeDef:o}):(b&&(o=o[o.length-1]),e.each(o.split(""),function(e,n){l=t.matches[s-1],t.matches.splice(s++,0,{fn:null,cardinality:0,optionality:t.isOptional,newBlockMarker:l===i||l.def!==n&&null!==l.fn,casing:null,def:r.staticDefinitionSymbol||n,placeholder:r.staticDefinitionSymbol!==i?n:i,nativeDef:n})})),b=!1;else{var c=(r.definitions?r.definitions[o]:i)||a.prototype.definitions[o];if(c&&!b){for(var u=c.prevalidator,f=u?u.length:0,p=1;p
=p?u[p-1]:[],m=h.validator,d=h.cardinality;t.matches.splice(s++,0,{fn:m?"string"==typeof m?new RegExp(m,r.casing?"i":""):new function(){this.test=m}:new RegExp("."),cardinality:d||1,optionality:t.isOptional,newBlockMarker:l===i||l.def!==(c.definitionSymbol||o),casing:c.casing,def:c.definitionSymbol||o,placeholder:c.placeholder,nativeDef:o}),l=t.matches[s-1]}t.matches.splice(s++,0,{fn:c.validator?"string"==typeof c.validator?new RegExp(c.validator,r.casing?"i":""):new function(){this.test=c.validator}:new RegExp("."),cardinality:c.cardinality,optionality:t.isOptional,newBlockMarker:l===i||l.def!==(c.definitionSymbol||o),casing:c.casing,def:c.definitionSymbol||o,placeholder:c.placeholder,nativeDef:o})}else t.matches.splice(s++,0,{fn:null,cardinality:0,optionality:t.isOptional,newBlockMarker:l===i||l.def!==o&&null!==l.fn,casing:null,def:r.staticDefinitionSymbol||o,placeholder:r.staticDefinitionSymbol!==i?o:i,nativeDef:o}),b=!1}}function l(t){t&&t.matches&&e.each(t.matches,function(e,a){var o=t.matches[e+1];(o===i||o.matches===i||!1===o.isQuantifier)&&a&&a.isGroup&&(a.isGroup=!1,n||(s(a,r.groupmarker.start,0),!0!==a.openGroup&&s(a,r.groupmarker.end))),l(a)})}function c(){if(E.length>0){if(m=E[E.length-1],s(m,p),m.isAlternator){d=E.pop();for(var e=0;e
0?(m=E[E.length-1]).matches.push(d):P.matches.push(d)}}else s(P,p)}function u(e){e.matches=e.matches.reverse();for(var t in e.matches)if(e.matches.hasOwnProperty(t)){var n=parseInt(t);if(e.matches[t].isQuantifier&&e.matches[n+1]&&e.matches[n+1].isGroup){var a=e.matches[t];e.matches.splice(t,1),e.matches.splice(n+1,0,a)}e.matches[t].matches!==i?e.matches[t]=u(e.matches[t]):e.matches[t]=function(e){return e===r.optionalmarker.start?e=r.optionalmarker.end:e===r.optionalmarker.end?e=r.optionalmarker.start:e===r.groupmarker.start?e=r.groupmarker.end:e===r.groupmarker.end&&(e=r.groupmarker.start),e}(e.matches[t])}return e}var f,p,h,m,d,v,g,k=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,y=/\[\^?]?(?:[^\\\]]+|\\[\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,b=!1,P=new o,E=[],C=[];for(n&&(r.optionalmarker.start=i,r.optionalmarker.end=i);f=n?y.exec(t):k.exec(t);){if(p=f[0],n)switch(p.charAt(0)){case"?":p="{0,1}";break;case"+":case"*":p="{"+p+"}"}if(b)c();else switch(p.charAt(0)){case r.escapeChar:b=!0,n&&c();break;case r.optionalmarker.end:case r.groupmarker.end:if(h=E.pop(),h.openGroup=!1,h!==i)if(E.length>0){if((m=E[E.length-1]).matches.push(h),m.isAlternator){d=E.pop();for(var A=0;A
0?(m=E[E.length-1]).matches.push(d):P.matches.push(d)}}else P.matches.push(h);else c();break;case r.optionalmarker.start:E.push(new o(!1,!0));break;case r.groupmarker.start:E.push(new o(!0));break;case r.quantifiermarker.start:var _=new o(!1,!1,!0),x=(p=p.replace(/[{}]/g,"")).split(","),w=isNaN(x[0])?x[0]:parseInt(x[0]),M=1===x.length?w:isNaN(x[1])?x[1]:parseInt(x[1]);if("*"!==M&&"+"!==M||(w="*"===M?0:1),_.quantifier={min:w,max:M},E.length>0){var O=E[E.length-1].matches;(f=O.pop()).isGroup||((g=new o(!0)).matches.push(f),f=g),O.push(f),O.push(_)}else(f=P.matches.pop()).isGroup||(n&&null===f.fn&&"."===f.def&&(f.fn=new RegExp(f.def,r.casing?"i":"")),(g=new o(!0)).matches.push(f),f=g),P.matches.push(f),P.matches.push(_);break;case r.alternatormarker:if(E.length>0){var S=(m=E[E.length-1]).matches[m.matches.length-1];v=m.openGroup&&(S.matches===i||!1===S.isGroup&&!1===S.isAlternator)?E.pop():m.matches.pop()}else v=P.matches.pop();if(v.isAlternator)E.push(v);else if(v.alternatorGroup?(d=E.pop(),v.alternatorGroup=!1):d=new o(!1,!1,!1,!0),d.matches.push(v),E.push(d),v.openGroup){v.openGroup=!1;var D=new o(!0);D.alternatorGroup=!0,E.push(D)}break;default:c()}}for(;E.length>0;)h=E.pop(),P.matches.push(h);return P.matches.length>0&&(l(P),C.push(P)),(r.numericInput||r.isRTL)&&u(C[0]),C}},a.extendDefaults=function(t){e.extend(!0,a.prototype.defaults,t)},a.extendDefinitions=function(t){e.extend(!0,a.prototype.definitions,t)},a.extendAliases=function(t){e.extend(!0,a.prototype.aliases,t)},a.format=function(e,t,n){return a(t).format(e,n)},a.unmask=function(e,t){return a(t).unmaskedvalue(e)},a.isValid=function(e,t){return a(t).isValid(e)},a.remove=function(t){e.each(t,function(e,t){t.inputmask&&t.inputmask.remove()})},a.escapeRegex=function(e){var t=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return e.replace(new RegExp("(\\"+t.join("|\\")+")","gim"),"\\$1")},a.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,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,X:88},a});