@syncfusion/ej2-inputs
Version:
A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.
10 lines • 396 kB
JavaScript
/*!
* filename: ej2-inputs.min.js
* version : 26.2.4
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
this.ej=this.ej||{},this.ej.inputs=function(e,t,i,s){"use strict";function n(){if(t.attributes(this.element,{role:"textbox",autocomplete:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive"}),this.mask){for(var e=this.mask.split("]"),i=0;i<e.length;i++)if("\\"===e[i][e[i].length-1]){e[i]=e[i]+"]";for(var s=e[i].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),m.call(this,s[n])}else if((s=e[i].split("[")).length>1)for(var a=!1,n=0;n<s.length;n++)"\\"===s[n]?(this.customRegExpCollec.push("["),this.hiddenMask+=s[n]+"["):""===s[n]?a=!0:""!==s[n]&&a||n===s.length-1?(this.customRegExpCollec.push("["+s[n]+"]"),this.hiddenMask+=this.promptChar,a=!1):m.call(this,s[n]);else m.call(this,s[0]);if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!t.isNullOrUndefined(this.customCharacters))for(i=0;i<this.promptMask.length;i++)t.isNullOrUndefined(this.customCharacters[this.promptMask[i]])||(this.promptMask=this.promptMask.replace(new RegExp(this.promptMask[i],"g"),this.promptChar));var r=0;if(this.hiddenMask.match(new RegExp(/\\/)))for(i=0;i<this.hiddenMask.length;i++){n=0;i>=1&&(n=i),n-=r=this.hiddenMask.length-this.promptMask.length,i>0&&"\\"!==this.hiddenMask[i-1]&&(">"===this.hiddenMask[i]||"<"===this.hiddenMask[i]||"|"===this.hiddenMask[i])&&(this.promptMask=this.promptMask.substring(0,n)+this.promptMask.substring(i+1-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue.substring(i+1-r,this.escapeMaskValue.length)),"\\"===this.hiddenMask[i]&&(this.promptMask=this.promptMask.substring(0,n)+this.hiddenMask[i+1]+this.promptMask.substring(i+2-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue[i+1]+this.escapeMaskValue.substring(i+2-r,this.escapeMaskValue.length))}else this.promptMask=this.promptMask.replace(/[>|<]/g,""),this.escapeMaskValue=this.hiddenMask.replace(/[>|<]/g,"");t.attributes(this.element,{"aria-invalid":"false"})}}function a(){z.call(this,this.promptMask),D.call(this,this.value)}function r(){t.EventHandler.add(this.element,"keydown",k,this),t.EventHandler.add(this.element,"keypress",H,this),t.EventHandler.add(this.element,"keyup",N,this),t.EventHandler.add(this.element,"input",T,this),t.EventHandler.add(this.element,"focus",g,this),t.EventHandler.add(this.element,"blur",C,this),t.EventHandler.add(this.element,"paste",E,this),t.EventHandler.add(this.element,"cut",x,this),t.EventHandler.add(this.element,"drop",S,this),t.EventHandler.add(this.element,"mousedown",v,this),t.EventHandler.add(this.element,"mouseup",f,this),this.enabled&&(o.call(this),this.formElement&&t.EventHandler.add(this.formElement,"reset",u,this))}function l(){t.EventHandler.remove(this.element,"keydown",k),t.EventHandler.remove(this.element,"keypress",H),t.EventHandler.remove(this.element,"keyup",N),t.EventHandler.remove(this.element,"input",T),t.EventHandler.remove(this.element,"focus",g),t.EventHandler.remove(this.element,"blur",C),t.EventHandler.remove(this.element,"paste",E),t.EventHandler.remove(this.element,"cut",x),t.EventHandler.remove(this.element,"drop",S),t.EventHandler.remove(this.element,"mousedown",v),t.EventHandler.remove(this.element,"mouseup",f),this.formElement&&t.EventHandler.remove(this.formElement,"reset",u)}function o(){this.showClearButton&&t.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",h,this)}function h(e){e.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(d.call(this,e),this.value="")}function d(e){var t=this.element.value;z.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),w.call(this,e,t),this.element.setSelectionRange(0,0)}function u(){"EJS-MASKEDTEXTBOX"===this.element.tagName?z.call(this,this.promptMask):this.value=this.initInputValue}function p(e){return e.value}function c(e,i){var s="",n=0,a=!1,r=t.isNullOrUndefined(i)?t.isNullOrUndefined(e)||t.isNullOrUndefined(this)?i:e.value:i;if(r!==this.promptMask)for(var l=0;l<this.customRegExpCollec.length;l++)a&&(a=!1),">"!==this.customRegExpCollec[n]&&"<"!==this.customRegExpCollec[n]&&"|"!==this.customRegExpCollec[n]&&"\\"!==this.customRegExpCollec[n]||(--l,a=!0),a||r[l]!==this.promptChar&&!t.isNullOrUndefined(this.customRegExpCollec[n])&&(this._callPasteHandler||!t.isNullOrUndefined(this.regExpCollec[this.customRegExpCollec[n]])||this.customRegExpCollec[n].length>2&&"["===this.customRegExpCollec[n][0]&&"]"===this.customRegExpCollec[n][this.customRegExpCollec[n].length-1]||!t.isNullOrUndefined(this.customCharacters)&&!t.isNullOrUndefined(this.customCharacters[this.customRegExpCollec[n]]))&&""!==r&&(s+=r[l]),++n;return(null===this.mask||""===this.mask&&void 0!==this.value)&&(s=r),s}function m(e){for(var t=0;t<e.length;t++)this.hiddenMask+=e[t],"\\"!==e[t]&&this.customRegExpCollec.push(e[t])}function v(){this.isClicked=!0}function f(){this.isClicked=!1}function g(e){var i=this,s=this.element,n=0,a=c.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||y.call(this,o,s),this.mask&&(null!==a&&""!==a||"Always"===this.floatLabelType||null===this.placeholder||""===this.placeholder||(s.value=this.promptMask),setTimeout(function(){if(s.selectionStart===i.promptMask.length||s.value[s.selectionStart]===i.promptChar)r=!0;else for(var e=s.selectionStart;e<i.promptMask.length;e++){if(s.value[e]===i.promptChar){r=!0;break}if(s.value[e]!==i.promptMask[e]){r=!1;break}}}),setTimeout(function(){var e=s.selectionStart-1;if(e===i.promptMask.length-1||s.value[e]===i.promptChar)l=!0;else for(var t=e;t>=0;t--){if(s.value[t]===i.promptChar){l=!0;break}if(s.value[t]!==i.promptMask[t]){l=!1;break}}}),this.isClicked||"Always"!==this.floatLabelType&&(null===a||""===a)&&null!==this.placeholder&&""!==this.placeholder)){for(n=0;n<this.promptMask.length;n++)if(s.value[n]===this.promptChar){setTimeout(function(){(r||l)&&(s.selectionEnd=n,s.selectionStart=n),o={selectionStart:s.selectionStart,event:e,value:i.value,maskedValue:s.value,container:t.isNullOrUndefined(i.inputObj)?i.inputObj:i.inputObj.container,selectionEnd:s.selectionEnd},y.call(i,o,s)},110);break}t.isNullOrUndefined(s.value.match(b(this.promptChar)))&&(o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd},y.call(this,o,s)),this.isClicked=!1}}function y(e,t){this.trigger("focus",e,function(e){t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd})}function b(e){return t.isNullOrUndefined(e)?e:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function C(e){if(this.blurEventArgs={event:e,value:this.value,maskedValue:this.element.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){z.call(this,"");var i=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!t.isNullOrUndefined(i)&&i.classList.contains(re)&&t.removeClass([i],re)}}function E(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;z.call(this,""),this._callPasteHandler=!0,setTimeout(function(){var a=t.element.value.replace(/ /g,"");t.redoCollec.length>0&&t.redoCollec[0].value===t.element.value&&(a=c.call(t,t.element)),z.call(t,n),t.element.selectionStart=i,t.element.selectionEnd=s;var r=0;t.maskKeyPress=!0;do{U.call(t,a[r],!1,null),++r}while(r<a.length);if(t.maskKeyPress=!1,t._callPasteHandler=!1,t.element.value===n){var l=0;t.maskKeyPress=!0;do{U.call(t,a[l],!1,null),++l}while(l<a.length);t.maskKeyPress=!1}else w.call(t,e,n)},1)}}function x(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.value,s=this.element.selectionStart,n=this.element.selectionEnd;this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd});var a=this.element.value.substring(0,s)+this.promptMask.substring(s,n)+this.element.value.substring(n);setTimeout(function(){z.call(t,a),t.element.selectionStart=t.element.selectionEnd=s,t.element.value!==i&&w.call(t,e,null)},0)}}function S(e){e.preventDefault()}function T(e){if(!0!==t.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){var i={ctrlKey:!1,keyCode:229};if(t.extend(e,i),this.mask){if(""===this.element.value&&this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this._callPasteHandler||O.call(this,e),this.element.value.length>this.promptMask.length){var s=this.element.selectionStart,n=this.element.value.length-this.promptMask.length,a=this.element.value.substring(s-n,s);this.maskKeyPress=!1;var r=0;do{U.call(this,a[r],e.ctrlKey,e),++r}while(r<a.length);this.element.value!==this.preEleVal&&w.call(this,e,null)}var l=c.call(this,this.element);this.prevValue=l,this.value=l,""===l&&(z.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function k(e){if(this.mask&&!this.readonly){229!==e.keyCode&&(!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||e.preventDefault(),O.call(this,e));var t=this.element.value;if(e.ctrlKey&&(89===e.keyCode||90===e.keyCode)){var i=void 0;90===e.keyCode&&this.undoCollec.length>0&&t!==this.undoCollec[this.undoCollec.length-1].value?(i=this.undoCollec[this.undoCollec.length-1],this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===e.keyCode&&this.redoCollec.length>0&&t!==this.redoCollec[0].value&&(i=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.redoCollec.splice(0,1))}}}function L(){var e,t=this.element.selectionStart,i=this.element.selectionEnd;this.redoCollec.length>0?(e=this.redoCollec[0],z.call(this,e.value),e.startIndex-t==1?(this.element.selectionStart=e.startIndex,this.element.selectionEnd=e.endIndex):(this.element.selectionStart=t+1,this.element.selectionEnd=i+1)):(z.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=t)}function P(e,t,i){return"input"===i.type&&(e=!1,t=this.element.value,z.call(this,this.promptMask),D.call(this,t)),e}function O(e){var i,s=!1,n=!1;this.element.value.length<this.promptMask.length&&(s=!0,i=this.element.value,s=P.call(this,s,i,e),L.call(this)),this.element.value.length>=this.promptMask.length&&"input"===e.type&&(s=P.call(this,s,i,e));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),d=h[l-1],u=this.element.selectionEnd;if(s||8===e.keyCode||46===e.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:o});var p=!1,c=this.element.value;if(l>0||(8===e.keyCode||46===e.keyCode)&&l<this.element.value.length&&this.element.selectionEnd-l!==this.element.value.length){var m=l;l!==o?(l=o,46===e.keyCode&&(p=!0)):46===e.keyCode?++m:--m;for(var v=l;8===e.keyCode||s||p?v>m:v<m;8===e.keyCode||s||p?v--:v++)for(var f=l;8===e.keyCode||s||p?f>0:f<this.element.value.length;8===e.keyCode||s||p?f--:f++){var g=void 0;(8===e.keyCode||p)&&(a!==r&&a!==l||a===r)||s?(d=h[f-1],g=l-1):(d=h[f],g=l,++l);var y=this.element.value[g];if(t.isNullOrUndefined(this.regExpCollec[""+d])&&!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[""+d])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,e.preventDefault(),46!==e.keyCode||p||++this.element.selectionStart;else{var b=this.element.value,C=this.promptChar,E=b.substring(0,g)+C+b.substring(l,b.length);z.call(this,E),e.preventDefault(),46!==e.keyCode||p||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===e.keyCode||p||!n&&46!==e.keyCode?g=l-1:(g=l,n=!1),y=this.element.value[g],a!==r&&this.element.selectionStart===a||this.promptMask[g]===this.promptChar||y!==this.promptMask[g]&&this.promptMask[g]!==this.promptChar&&!t.isNullOrUndefined(this.customCharacters))break}}46===e.keyCode&&p&&n&&(this.element.selectionStart=this.element.selectionEnd=u),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(z.call(this,this.promptMask),e.preventDefault(),this.element.selectionStart=this.element.selectionEnd=l),this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),this.element.value!==c&&w.call(this,e,i)}}function H(e){if(this.mask&&!this.readonly){var t=this.element.value;if(!e.ctrlKey&&!e.metaKey||(e.ctrlKey||e.metaKey)&&"KeyA"!==e.code&&"KeyY"!==e.code&&"KeyZ"!==e.code&&"KeyX"!==e.code&&"KeyC"!==e.code&&"KeyV"!==e.code){this.maskKeyPress=!0;var i=e.key;"Spacebar"===i&&(i=String.fromCharCode(e.keyCode)),i?i&&1===i.length&&(U.call(this,i,e.ctrlKey,e),e.preventDefault()):(this.isIosInvalid=!0,U.call(this,String.fromCharCode(e.keyCode),e.ctrlKey,e),e.preventDefault(),this.isIosInvalid=!1),32===e.keyCode&&" "===i&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-i.length)}this.element.value!==t&&w.call(this,e,t)}}function w(e,i){var s=this.isProtectedOnChange;if(!t.isNullOrUndefined(this.changeEventArgs)&&!this.isInitial){var n={};this.changeEventArgs={value:this.element.value,maskedValue:this.element.value,isInteraction:!1,isInteracted:!1},this.mask&&(this.changeEventArgs.value=c.call(this,this.element)),t.isNullOrUndefined(e)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=e),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,t.merge(n,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",n)}this.preEleVal=this.element.value,this.prevValue=c.call(this,this.element)}function N(e){if(this.mask&&!this.readonly){var i=void 0;if(this.maskKeyPress||229!==e.keyCode)F.call(this);else{var s=void 0;if(1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this.element.value.length>this.promptMask.length){var n=this.element.selectionStart,a=this.element.value.length-this.promptMask.length,r=this.element.value.substring(n-a,n);if(this.undoCollec.length>0){i=this.undoCollec[this.undoCollec.length-1];var l=this.element.selectionStart;s=i.value;var o=i.value.substring(l-a,l);i=this.redoCollec[0],r=r.trim();var h=t.Browser.isAndroid&&""===r;h||o===r||i.value.substring(l-a,l)===r?h&&R.call(this,e,l-1,this.element.selectionEnd-1,r,e.ctrlKey,!1):U.call(this,r,e.ctrlKey,e)}else s=this.promptMask,U.call(this,r,e.ctrlKey,e);this.maskKeyPress=!1,w.call(this,e,s)}}var d=c.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==d||""===d&&this.value!==d)&&(this.prevValue=d,this.value=d)}else w.call(this,e);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var u=this.element;setTimeout(function(){u.setSelectionRange(0,0)},0)}}function A(e){if(e.length>1&&this.promptMask.length+e.length<this.element.value.length){var t=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+e+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);z.call(this,t),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+e.length}this.element.selectionStart=this.element.selectionStart-e.length,this.element.selectionEnd=this.element.selectionEnd-e.length}function B(e){this.maskKeyPress||A.call(this,e)}function U(e,i,s){if(B.call(this,e),!t.isNullOrUndefined(this)&&!t.isNullOrUndefined(e))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,d=!1,u=!1,p=0;p<e.length;p++){var c=e[p];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=p),!this.maskKeyPress||r<this.promptMask.length){for(v=r;v<this.promptMask.length;v++)n=this.escapeMaskValue[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===e&&(u=!0),(t.isNullOrUndefined(this.regExpCollec[""+n])&&(t.isNullOrUndefined(this.customCharacters)||!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[""+n]))&&this.hiddenMask[r]!==this.promptChar&&"["!==this.customRegExpCollec[r][0]&&"]"!==this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]||this.promptMask[r]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters)||this.promptChar===n&&this.escapeMaskValue===this.mask)&&(this.element.selectionStart=this.element.selectionEnd=r+1,r=this.element.selectionStart,n=this.hiddenMask[r]);if(t.isNullOrUndefined(this.customCharacters)||t.isNullOrUndefined(this.customCharacters[""+n]))!t.isNullOrUndefined(this.regExpCollec[""+n])&&c.match(new RegExp(this.regExpCollec[""+n]))&&this.promptMask[r]===this.promptChar?o=!0:this.promptMask[r]===this.promptChar&&"["===this.customRegExpCollec[r][0]&&"]"===this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]&&c.match(new RegExp(this.customRegExpCollec[r]))&&(o=!0);else for(var m=this.customCharacters[""+n].split(","),v=0;v<m.length;v++)if(c.match(new RegExp("["+m[v]+"]"))){o=!0;break}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===p)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var f=this.element.selectionStart,g=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,z.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,z.call(this,a)),this.element.selectionStart=f,this.element.selectionEnd=g}r=this.element.selectionStart,I.call(this,s,r,c,a,u),d=!0,p===e.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),o=!1}else r=this.element.selectionStart,R.call(this,s,r,l,e,i,d);p!==e.length-1||o||(!t.Browser.isAndroid||t.Browser.isAndroid&&r<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==e.length||i||t.isNullOrUndefined(s)||V.call(this)}}function I(e,t,i,s,n){if(this.hiddenMask.length>this.promptMask.length&&(i=M.call(this,i,this.element.value)),!n){var a=this.element.value,r=a.substring(0,t)+i+a.substring(t+1,a.length);z.call(this,r),this.element.selectionStart=this.element.selectionEnd=t+1}}function R(e,i,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;i>=this.promptMask.length?z.call(this,l.substring(0,i)):(s===i?z.call(this,l.substring(0,i)+l.substring(i+1,l.length)):this.promptMask.length===this.element.value.length?z.call(this,l.substring(0,i)+l.substring(i,l.length)):z.call(this,l.substring(0,s)+l.substring(s+1,l.length)),this.element.selectionStart=this.element.selectionEnd=r||this.element.value[s]!==this.promptChar?i:s),V.call(this)}1!==n.length||a||t.isNullOrUndefined(e)||V.call(this)}function V(){var e=this,i=this.element.parentNode,s=200;i.classList.contains(se)||i.classList.contains(ne)?t.addClass([i],ie):t.addClass([this.element],ie),!0===this.isIosInvalid&&(s=400),t.attributes(this.element,{"aria-invalid":"true"}),setTimeout(function(){e.maskKeyPress||F.call(e)},s)}function F(){var e=this.element.parentNode;t.isNullOrUndefined(e)||t.removeClass([e],ie),t.removeClass([this.element],ie),t.attributes(this.element,{"aria-invalid":"false"})}function M(e,t){var i,s,n=t,a=0;for(s=0;s<this.hiddenMask.length;s++)if("\\"===this.hiddenMask[s]&&(i=n.substring(0,s)+"\\"+n.substring(s,n.length)),">"!==this.hiddenMask[s]&&"<"!==this.hiddenMask[s]&&"|"!==this.hiddenMask[s]||(this.hiddenMask[s]!==n[s]&&(i=n.substring(0,s)+this.hiddenMask[s]+n.substring(s,n.length)),++a),i){if(i[s]===this.promptChar&&s>this.element.selectionStart||this.element.value.indexOf(this.promptChar)<0&&this.element.selectionStart+a===s){a=0;break}n=i}for(;s>=0&&i;){if(0===s||"\\"!==i[s-1]){if(">"===i[s]){e=e.toUpperCase();break}if("<"===i[s]){e=e.toLowerCase();break}if("|"===i[s])break}--s}return e}function D(e){if(this.mask&&void 0!==e&&(void 0===this.prevValue||this.prevValue!==e)){if(this.maskKeyPress=!0,z.call(this,this.promptMask),""===e||null===e&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==e)for(var i=0;i<e.length;i++)U.call(this,e[i],!1,null);var s=c.call(this,this.element);this.prevValue=s,this.value=s,w.call(this,null,null),this.maskKeyPress=!1;var n=this.element.parentNode.querySelector(".e-float-text");this.element.value===this.promptMask&&"Auto"===this.floatLabelType&&this.placeholder&&!t.isNullOrUndefined(n)&&n.classList.contains(re)&&!this.isFocus&&(t.removeClass([n],re),t.addClass([n],le),z.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&z.call(this,this.value)}function z(i,s){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&t.isNullOrUndefined(this.value)&&(i="");var n=c.call(this,s||this.element,i);null===n||""===n?(e.Input.setValue(i,s||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):e.Input.setValue(i,s||this.element,this.floatLabelType,this.showClearButton)}function W(e){var t=q(e);a.call(t);var i=c.call(this,this.element);this.prevValue=i,this.value=i,e.mask&&(l.call(t),r.call(t))}function q(e){t.addClass([e.element],ae);var i={element:e.element,mask:e.mask,promptMask:"",hiddenMask:"",escapeMaskValue:"",promptChar:e.promptChar?e.promptChar.length>1?e.promptChar=e.promptChar[0]:e.promptChar:"_",value:e.value?e.value:null,regExpCollec:oe,customRegExpCollec:[],customCharacters:e.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return n.call(i),i}function j(e){return c.call(X(e),e.element)}function _(e){return p.call(X(e),e.element)}function X(e){var i;return!t.isNullOrUndefined(e)&&e.element.classList.contains(ae)&&(i=q(e)),i}var K={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",TEXTAREA:"e-multi-line-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",FLOATTEXTCONTENT:"e-float-text-content",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"},Y=["title","style","class"];!function(e){function i(e,i){e.element.__eventHandlers={};var s=t.isNullOrUndefined(i)?t.createElement:i,n={container:null,buttons:[],clearButton:null};if(ue=e.floatLabelType,pe=e.bindClearAction,t.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(n.container=N(e,K.INPUTGROUP,K.INPUTCUSTOMTAG,"span",s),e.element.parentNode.insertBefore(n.container,e.element),t.addClass([e.element],K.INPUT),n.container.appendChild(e.element)):v(e,n,s),r(e),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(z(e.properties.showClearButton,e.element,n,!0,s),n.clearButton.setAttribute("role","button"),n.container.classList.contains(K.FLOATINPUT)&&t.addClass([n.container],K.INPUTGROUP)),!t.isNullOrUndefined(e.buttons))for(var a=0;a<e.buttons.length;a++)n.buttons.push(ne(e.buttons[a],n.container,s));return t.isNullOrUndefined(e.element)||"TEXTAREA"!==e.element.tagName||t.addClass([n.container],K.TEXTAREA),ae(n.container,e.element),n=y(e,n),X(n.container,s),n}function s(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function n(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function a(e){o(e.floatLabelType,e.element)}function r(e){o(e.floatLabelType,e.element);var t=function(){return s(e)},i=function(){return n(e)},r=function(){return a(e)};e.element.addEventListener("focus",t),e.element.addEventListener("blur",i),e.element.addEventListener("input",r),e.element.__eventHandlers.inputFocusHandler={focusHandler:t},e.element.__eventHandlers.inputBlurHandler={blurHandler:i},e.element.__eventHandlers.inputHandler={inputHandler:r}}function l(e){if(!t.isNullOrUndefined(e.element)&&!(t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.inputFocusHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputBlurHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputHandler))){var i=e.element.__eventHandlers.inputFocusHandler.focusHandler,s=e.element.__eventHandlers.inputBlurHandler.blurHandler,n=e.element.__eventHandlers.inputHandler.inputHandler;e.element.removeEventListener("focus",i),e.element.removeEventListener("blur",s),e.element.removeEventListener("input",n),delete e.element.__eventHandlers.inputFocusHandler,delete e.element.__eventHandlers.inputBlurHandler,delete e.element.__eventHandlers.inputHandler}}function o(e,i){var s=i.value,n=i.parentElement,a=n&&n.parentElement;""===s||t.isNullOrUndefined(s)?"Always"!==e&&(n&&n.classList.contains("e-input-group")?n.classList.remove("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.remove("e-valid-input")):n&&n.classList.contains("e-input-group")?n.classList.add("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.add("e-valid-input")}function h(){var e=E(this).getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(e)||(t.addClass([e],K.LABELTOP),e.classList.contains(K.LABELBOTTOM)&&t.removeClass([e],K.LABELBOTTOM))}function d(){var e=E(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var i=e.getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(i)||(i.classList.contains(K.LABELTOP)&&t.removeClass([i],K.LABELTOP),t.addClass([i],K.LABELBOTTOM))}}function u(e){e.addEventListener("focus",h),e.addEventListener("blur",d)}function p(e){t.isNullOrUndefined(e)||(e.removeEventListener("focus",h),e.removeEventListener("blur",d))}function c(e){w(e.element,e.floatLabelType)}function m(e){w(e.element,e.floatLabelType)}function v(e,i,s){var n=t.isNullOrUndefined(s)?t.createElement:s;"Auto"===e.floatLabelType&&u(e.element),t.isNullOrUndefined(i.container)?(i.container=N(e,K.FLOATINPUT,K.FLOATCUSTOMTAG,"div",n),i.container.classList.add(K.INPUTGROUP),e.element.parentNode&&e.element.parentNode.insertBefore(i.container,e.element)):(t.isNullOrUndefined(e.customTag)||i.container.classList.add(K.FLOATCUSTOMTAG),i.container.classList.add(K.FLOATINPUT));var a=n("span",{className:K.FLOATLINE}),r=n("label",{className:K.FLOATTEXT});if(t.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),t.attributes(e.element,{"aria-labelledby":r.id})),t.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerText=A(e.element.placeholder),e.element.removeAttribute("placeholder")),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerText=A(e.properties.placeholder)),r.innerText||i.container.classList.add(K.NOFLOATLABEL),i.container.classList.contains("e-float-icon-left")){var l=i.container.querySelector(".e-input-in-wrap");l.appendChild(e.element),l.appendChild(a),l.appendChild(r)}else i.container.appendChild(e.element),i.container.appendChild(a),i.container.appendChild(r);if(C(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(K.LABELBOTTOM)&&t.removeClass([r],K.LABELBOTTOM),t.addClass([r],K.LABELTOP)),"Auto"===e.floatLabelType){var o=function(){return c(e)},h=function(){return m(e)};e.element.addEventListener("input",o),e.element.addEventListener("blur",h),e.element.__eventHandlers.floatInputHandler={inputFloatHandler:o},e.element.__eventHandlers.floatBlurHandler={blurFloatHandler:h}}else f(e);t.isNullOrUndefined(e.element.getAttribute("id"))||r.setAttribute("for",e.element.getAttribute("id"))}function f(e){if(!(t.isNullOrUndefined(e.element)||t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.floatInputHandler)||t.isNullOrUndefined(e.element.__eventHandlers.floatBlurHandler))){var i=e.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=e.element.__eventHandlers.floatBlurHandler.blurFloatHandler;e.element.removeEventListener("input",i),e.element.removeEventListener("blur",s),delete e.element.__eventHandlers.floatInputHandler,delete e.element.__eventHandlers.floatBlurHandler}}function g(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function y(e,i){if(!t.isNullOrUndefined(e.properties))for(var s=0,n=Object.keys(e.properties);s<n.length;s++)switch(n[s]){case"cssClass":U(e.properties.cssClass,[i.container]),g(e.floatLabelType,i.container);break;case"enabled":D(e.properties.enabled,e.element,e.floatLabelType,i.container);break;case"enableRtl":M(e.properties.enableRtl,[i.container]);break;case"placeholder":V(e.properties.placeholder,e.element);break;case"readonly":F(e.properties.readonly,e.element)}return i}function b(e,i,s){t.isNullOrUndefined(i)||(e&&!s?t.removeClass([i],K.CLEARICONHIDE):t.addClass([i],K.CLEARICONHIDE))}function C(e,i,s){void 0===s&&(s=null),e?(t.addClass([i],K.LABELTOP),i.classList.contains(K.LABELBOTTOM)&&t.removeClass([i],K.LABELBOTTOM)):(null==s||s!==document.activeElement)&&(i.classList.contains(K.LABELTOP)&&t.removeClass([i],K.LABELTOP),t.addClass([i],K.LABELBOTTOM))}function E(e){var i=t.isNullOrUndefined(e.parentNode)?e:e.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function x(e,i,s,n){var a=(t.isNullOrUndefined(n)?t.createElement:n)("span",{className:K.CLEARICON}),r=i.container;return t.isNullOrUndefined(s)?(i.container.classList.contains(K.FLOATINPUT)?i.container.querySelector("."+K.FLOATTEXT):e).insertAdjacentElement("afterend",a):r.appendChild(a),t.addClass([a],K.CLEARICONHIDE),P(e,a),a.setAttribute("aria-label","close"),a}function S(e,i,s){i.classList.contains(K.DISABLE)||i.readOnly||(e.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",t.addClass([s],K.CLEARICONHIDE))}function T(e,t){b(e.value,t)}function k(e,t){b(e.value,t,e.readOnly)}function L(e,i){setTimeout(function(){t.isNullOrUndefined(i)||(t.addClass([i],K.CLEARICONHIDE),i=!t.isNullOrUndefined(e)&&e.classList.contains("e-combobox")?null:i)},200)}function P(e,t,i){if(void 0===pe||pe){var s=function(i){return S(i,e,t)};t.addEventListener("click",s),e.__eventHandlers.clearClickHandler={clickHandlerEvent:s}}var n=function(){return T(e,t)},a=function(){return k(e,t)},r=function(){return L(e,t)};e.addEventListener("input",n),e.addEventListener("focus",a),e.addEventListener("blur",r),e.__eventHandlers.clearInputHandler={inputHandlerEvent:n},e.__eventHandlers.clearFocusHandler={focusHandlerEvent:a},e.__eventHandlers.clearBlurHandler={blurHandlerEvent:r}}function O(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(e.__eventHandlers)){if(!t.isNullOrUndefined(e.__eventHandlers.clearClickHandler)){var s=e.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===pe||pe)&&(t.isNullOrUndefined(i)||i.removeEventListener("click",s)),delete e.__eventHandlers.clearClickHandler}if(!t.isNullOrUndefined(e.__eventHandlers.clearInputHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearFocusHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearBlurHandler)){var n=e.__eventHandlers.clearInputHandler.inputHandlerEvent,a=e.__eventHandlers.clearFocusHandler.focusHandlerEvent,r=e.__eventHandlers.clearBlurHandler.blurHandlerEvent;e.removeEventListener("input",n),e.removeEventListener("focus",a),e.removeEventListener("blur",r),delete e.__eventHandlers.clearInputHandler,delete e.__eventHandlers.clearFocusHandler,delete e.__eventHandlers.clearBlurHandler}}}function H(e,i){void 0===i&&(i=null),l(e),"Auto"===e.floatLabelType&&f(e),e.properties.showClearButton&&O(e.element,i),t.isNullOrUndefined(e.buttons)||G(!1,null,e.buttons),p(e.element),t.isNullOrUndefined(e.element)||(delete e.element.__eventHandlers,e.element.classList.contains(K.INPUT)&&e.element.classList.remove(K.INPUT))}function w(e,t){if(E(e).classList.contains(K.FLOATINPUT)&&"Auto"===t){var i=E(e).getElementsByClassName("e-float-text")[0];C(e.value,i,e)}}function N(e,i,s,n,a){var r,l=t.isNullOrUndefined(a)?t.createElement:a;return t.isNullOrUndefined(e.customTag)?r=l(n,{className:i}):(r=l(e.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function A(e){var i="";if(!t.isNullOrUndefined(e)&&""!==e){var s=document.createElement("span");s.innerHTML='<input placeholder="'+e+'"/>',i=s.children[0].placeholder}return i}function B(e,i,s,n){if(i.value=e,"Never"!==s&&I(i,i.parentElement),t.isNullOrUndefined(s)||"Auto"!==s||w(i,s),!t.isNullOrUndefined(n)&&n){var a=E(i);if(!t.isNullOrUndefined(a)){var r=a.getElementsByClassName(K.CLEARICON)[0];t.isNullOrUndefined(r)||(i.value&&!t.isNullOrUndefined(a)&&a.classList.contains("e-input-focus")?t.removeClass([r],K.CLEARICONHIDE):t.addClass([r],K.CLEARICONHIDE))}}o(s,i)}function U(e,i,s){t.isNullOrUndefined(s)||""===s||t.removeClass(i,s.split(" ")),t.isNullOrUndefined(e)||""===e||t.addClass(i,e.split(" "))}function I(e,i,s){if("multiselect"===s||$(e)){var n="multiselect"===s?e:e.clientWidth-parseInt(getComputedStyle(e,null).getPropertyValue("padding-left"),10);t.isNullOrUndefined(i)||t.isNullOrUndefined(i.getElementsByClassName("e-float-text-content")[0])||(i.getElementsByClassName("e-float-text-content")[0].classList.contains("e-float-text-overflow")&&i.getElementsByClassName("e-float-text-content")[0].classList.remove("e-float-text-overflow"),(n<i.getElementsByClassName("e-float-text-content")[0].clientWidth||n===i.getElementsByClassName("e-float-text-content")[0].clientWidth)&&i.getElementsByClassName("e-float-text-content")[0].classList.add("e-float-text-overflow"))}}function R(e,i){"number"==typeof e?i.style.width=t.formatUnit(e):"string"==typeof e&&(i.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)),I(i.firstChild,i)}function V(e,i){e=A(e);var s=E(i);if(s.classList.contains(K.FLOATINPUT))if(t.isNullOrUndefined(e)||""===e){s.classList.add(K.NOFLOATLABEL);var n=s.getElementsByClassName("e-float-text-content")[0];n?n.children[0].textContent="":s.getElementsByClassName(K.FLOATTEXT)[0].textContent=""}else(n=s.getElementsByClassName("e-float-text-content")[0])&&n.children[0]?n.children[0].textContent=e:s.getElementsByClassName(K.FLOATTEXT)[0].textContent=e,s.classList.remove(K.NOFLOATLABEL),i.removeAttribute("placeholder");else t.isNullOrUndefined(e)||""===e?i.removeAttribute("placeholder"):t.attributes(i,{placeholder:e})}function F(e,i,s){e?t.attributes(i,{readonly:""}):i.removeAttribute("readonly"),t.isNullOrUndefined(s)||w(i,s)}function M(e,i){e?t.addClass(i,K.RTL):t.removeClass(i,K.RTL)}function D(e,i,s,n){var a={disabled:"","aria-disabled":"true"},r=!t.isNullOrUndefined(n);e?(i.classList.remove(K.DISABLE),W(a,i),r&&t.removeClass([n],K.DISABLE)):(i.classList.add(K.DISABLE),q(a,i),r&&t.addClass([n],K.DISABLE)),t.isNullOrUndefined(s)||w(i,s)}function z(e,i,s,n,a){var r=t.isNullOrUndefined(a)?t.createElement:a;e?s.clearButton=x(i,s,n,r):(t.remove(s.clearButton),s.clearButton=null)}function W(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.classList.remove(K.DISABLE),"disabled"===n&&a.classList.contains(K.INPUTGROUP)&&a.classList.remove(K.DISABLE),"placeholder"===n&&a.classList.contains(K.FLOATINPUT)?a.getElementsByClassName(K.FLOATTEXT)[0].textContent="":t.removeAttribute(n)}}function q(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.classList.add(K.DISABLE),"disabled"===n&&a.classList.contains(K.INPUTGROUP)&&a.classList.add(K.DISABLE),"placeholder"===n&&a.classList.contains(K.FLOATINPUT)?a.getElementsByClassName(K.FLOATTEXT)[0].textContent=e[""+n]:t.setAttribute(n,e[""+n])}}function j(e){var i=e.container;if(!t.isNullOrUndefined(i)&&i.classList.contains(K.FLOATINPUT)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),n=i.querySelector("."+K.FLOATTEXT).textContent,a=null!==i.querySelector(".e-clear-icon");t.detach(i.querySelector("."+K.FLOATLINE)),t.detach(i.querySelector("."+K.FLOATTEXT)),t.classList(i,[K.INPUTGROUP],[K.FLOATINPUT]),p(s),t.attributes(s,{placeholder:n}),s.classList.add(K.INPUT),a||"INPUT"!==s.tagName||s.removeAttribute("required")}}function _(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=t.closest(e,"."+K.INPUTGROUP);ue=i;var l=r.tagName,o={element:e,floatLabelType:i,customTag:l="DIV"!==l&&"SPAN"!==l?l:null,properties:{placeholder:s}};if("Never"!==i){var h=r.querySelector(".e-clear-icon"),d={container:r};e.classList.remove(K.INPUT),v(o,d,a),X(d.container,a),I(o.element,d.container);var u=r.classList.contains("e-float-icon-left");if(t.isNullOrUndefined(h)&&(h=u?r.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon"):r.querySelector(".e-input-group-icon")),t.isNullOrUndefined(h))u&&(h=r.querySelector(".e-input-group-icon"));else{var p=r.querySelector("."+K.FLOATLINE),c=r.querySelector("."+K.FLOATTEXT),m=u?r.querySelector(".e-input-in-wrap"):r;m.insertBefore(e,h),m.insertBefore(p,h),m.insertBefore(c,h)}}else f(o);g(i,e.parentElement)}function X(e,t){if(e.classList.contains("e-outline")&&e.getElementsByClassName("e-float-text")[0]){var i=t("span",{className:K.FLOATTEXTCONTENT});i.innerHTML=e.getElementsByClassName("e-float-text")[0].innerHTML,e.getElementsByClassName("e-float-text")[0].innerHTML="",e.getElementsByClassName("e-float-text")[0].appendChild(i)}}function Z(e,t){for(var i=0;i<t.length;i++)G(e,t[parseInt(i.toString(),10)].container)}function G(e,i,s){var n=[];n.push(s);var a=t.isNullOrUndefined(s)?i.querySelectorAll(".e-input-group-icon"):n;if(e&&a.length>0)for(r=0;r<a.length;r++)a[parseInt(r.toString(),10)].addEventListener("mousedown",Q,!1),a[parseInt(r.toString(),10)].addEventListener("mouseup",ee,!1);else if(a.length>0)for(var r=0;r<a.length;r++)a[parseInt(r.toString(),10)].removeEventListener("mousedown",Q,this),a[parseInt(r.toString(),10)].removeEventListener("mouseup",ee,this)}function J(e,t){e.classList.contains("e-disabled")||e.querySelector("input").readOnly||t.classList.add("e-input-btn-ripple")}function $(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if("none"===window.getComputedStyle(t).display)return!1;t=t.parentElement}return!0}function Q(){for(var e=this,t=this.parentElement;!t.classList.contains("e-input-group");)t=t.parentElement;J(t,e)}function ee(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}function te(e,t){var i=t("span",{className:e});return i.classList.add("e-input-group-icon"),i}function ie(e,t,i,s,n){var a="string"==typeof t?t.split(","):t;if("append"===e.toLowerCase())for(var r=0,l=a;r<l.length;r++)ne(d=l[r],i,n);else for(var o=0,h=a;o<h.length;o++){var d=h[o];se(d,i,s,n)}i.getElementsByClassName("e-input-group-icon")[0]&&i.getElementsByClassName("e-float-text-overflow")[0]&&i.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon")}function se(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=te(e,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if(t.isNullOrUndefined(l)){l=a("span",{className:"e-input-in-wrap"}),s.parentNode.insertBefore(l,s);var o=i.querySelectorAll(s.tagName+" ~ *");l.appendChild(s);for(var h=0;h<o.length;h++){var d=o[parseInt(h.toString(),10)],u=l.parentElement;d.classList.contains("e-float-line")&&(u&&u.classList.contains("e-filled")||!u)||l.appendChild(d)}}return l.parentNode.insertBefore(r,l),G(!0,i,r),r}function ne(e,i,s){var n=te(e,t.isNullOrUndefined(s)?t.createElement:s);return(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),G(!0,i,n),n}function ae(e,t){"hidden"===t.type?e.classList.add("e-hidden"):e.classList.contains("e-hidden")&&e.classList.remove("e-hidden")}function re(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];Y.indexOf(a)<0&&i.setAttribute(a,e[""+a])}}function le(e,t,i){U(oe(e),[i],oe(t))}function oe(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i}function he(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];if(Y.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(e[""+a]);""!==r&&t.addClass([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=t.isNullOrUndefined(l)?e[""+a]:l+e[""+a],i.setAttribute(a,l)}else i.setAttribute(a,e[""+a])}}function de(e){return!e||/^\s*$/.test(e)}var ue,pe=!0;e.createInput=i,e.bindInitialEvent=r,e.wireFloatingEvents=u,e.wireClearBtnEvents=P,e.destroy=H,e.setValue=B,e.setCssClass=U,e.calculateWidth=I,e.setWidth=R,e.setPlaceholder=V,e.setReadonly=F,e.setEnableRtl=M,e.setEnabled=D,e.setClearButton=z,e.removeAttributes=W,e.addAttributes=q,e.removeFloating=j,e.addFloating=_,e.createSpanElement=X,e.setRipple=Z,e.addIcon=ie,e.prependSpan=se,e.appendSpan=ne,e.validateInputType=ae,e.updateHTMLAttributesToElement=re,e.updateCssClass=le,e.getInputValidClassList=oe,e.updateHTMLAttributesToWrapper=he,e.isBlank=de}(e.Input||(e.Input={}));var Z=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),G=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},J="e-input-group-icon",$=new RegExp("^(-)?(\\d*)$"),Q=["title","style","class"],ee=0,te=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.preventChange=!1,s.isDynamicChange=!1,s.numericOptions=e,s}return Z(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=t.closest(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var i=this.createElement("input"),s=0;for(s;s<this.element.attributes.length;s++){var n=this.element.attributes[s].nodeName;"id"!==n&&"class"!==n?(i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML):"class"===n&&i.setAttribute(n,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "))}this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-numerictextbox"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}t.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var a={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new t.L10n("numerictextbox",a,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("numerictextbox")),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.prevValue=this.value,this.updateHTMLAttrToElement(),this.checkAttributes(!1),this.formEle&&(this.inputEleValue=this.value),this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),this.setElementWidth(this.width),this.container.classList.contains("e-input-group")||this.container.classList.add("e-input-group"),this.changeValue(null===this.value||isNaN(this.value)?null:this.strictMode?this.trimValue(this.value):this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0),(this.element.getAttribute("value")||this.value)&&(this.element.setAttribute("value",this.element.value),this.hiddenInput.setAttribute("value",this.hiddenInput.value)),this.elementPrevValue=this.element.value,this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.setAttribute("aria-label","numerictextbox"),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","step","disabled","readonly","style","name","placeholder"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.value||e){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties(t.setValue(n,l,{}),!e)}break;case"min":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.min||e){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties(t.setValue(n,o,{}),!e)}break;case"max":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.max||e){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties(t.setValue(n,h,{}),!e)}break;case"step":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.step||e){var d=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===d||isNaN(d)||this.setProperties(t.setValue(n,d,{}),!e)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var u=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==u&&!isNaN(u)||"value"===n)&&this.setProperties(t.setValue(n,u,{}),!0)}}},s.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},s.prototype.initCultureFunc=function(){this.instance=new t.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==t.getValue("currency",this)&&(t.setValue("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:i,enableRtl:this.enableRtl,showClearButton:this.showClearButton,enabled:this.enabled}},this.createElement);this.inputWrapper=s,this.c