UNPKG

@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
/*! * 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. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionSplitbuttons"],t):"object"==typeof exports?exports.SyncfusionInputs=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons")):e.SyncfusionInputs=t(e.SyncfusionBase,e.SyncfusionPopups,e.SyncfusionSplitbuttons)}(self,((e,t,i)=>(()=>{"use strict";var s={766:t=>{t.exports=e},197:e=>{e.exports=t},295:e=>{e.exports=i}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return s[e](i,i.exports,a),i.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{a.r(r),a.d(r,{AsyncSettings:()=>Vi,ButtonsProps:()=>Ri,ColorPicker:()=>gs,ColorRangeData:()=>We,ErrorOption:()=>Ne,FilesProp:()=>Ui,FormValidator:()=>Qt,Input:()=>e,LabelPosition:()=>$t,LimitData:()=>qe,MaskUndo:()=>Ae,MaskedTextBox:()=>Fe,NumericTextBox:()=>U,OtpInput:()=>tn,OtpInputStyle:()=>Js,OtpInputType:()=>Zs,PrecisionType:()=>Gt,Rating:()=>$s,Signature:()=>Bs,SignatureBase:()=>Hs,Slider:()=>Xt,TEXTBOX_FOCUS:()=>E,TextArea:()=>ws,TextBox:()=>Cs,TicksData:()=>ze,TooltipData:()=>je,Uploader:()=>Fi,applyMask:()=>q,bindClearEvent:()=>K,containerAttributes:()=>C,createMask:()=>W,escapeRegExp:()=>se,getMaskedVal:()=>Te,getVal:()=>we,maskInput:()=>Le,maskInputBlurHandler:()=>ne,maskInputDropHandler:()=>le,maskInputFocusHandler:()=>te,maskInputMouseDownHandler:()=>Q,maskInputMouseUpHandler:()=>ee,mobileRemoveFunction:()=>ue,regex:()=>Jt,regularExpressions:()=>z,setElementValue:()=>Pe,setMaskValue:()=>ke,strippedValue:()=>$,triggerFocus:()=>ie,unstrippedValue:()=>J,unwireEvents:()=>_,wireEvents:()=>j});var e,t=a(766),i="e-rtl",s="e-disabled",n="e-input",l="e-multi-line-input",o="e-input-group",h="e-float-input",u="e-float-line",d="e-float-text",p="e-float-text-content",c="e-clear-icon",m="e-clear-icon-hide",v="e-label-top",f="e-label-bottom",g="e-no-float-label",y="e-input-custom-tag",b="e-float-custom-tag",C=["title","style","class"],E="e-input-focus";!function(e){var a=!0;function r(t){E(t.floatLabelType,t.element);var i=function(){return function(t){var i=N(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)}(t)},s=function(){return function(t){var i=N(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)}(t)},n=function(){return function(e){E(e.floatLabelType,e.element)}(t)};t.element.addEventListener("focus",i),t.element.addEventListener("blur",s),t.element.addEventListener("input",n),t.element.__eventHandlers.inputFocusHandler={focusHandler:i},t.element.__eventHandlers.inputBlurHandler={blurHandler:s},t.element.__eventHandlers.inputHandler={inputHandler:n}}function E(e,i){var s=i.value,n=i.parentElement,a=n&&n.parentElement;""===s||(0,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 x(){var e=N(this).getElementsByClassName("e-float-text")[0];(0,t.isNullOrUndefined)(e)||((0,t.addClass)([e],v),e.classList.contains(f)&&(0,t.removeClass)([e],f))}function S(){var e=N(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var i=e.getElementsByClassName("e-float-text")[0];(0,t.isNullOrUndefined)(i)||(i.classList.contains(v)&&(0,t.removeClass)([i],v),(0,t.addClass)([i],f))}}function k(e){e.addEventListener("focus",x),e.addEventListener("blur",S)}function P(e){(0,t.isNullOrUndefined)(e)||(e.removeEventListener("focus",x),e.removeEventListener("blur",S))}function L(e,i,s){var n=(0,t.isNullOrUndefined)(s)?t.createElement:s;"Auto"===e.floatLabelType&&k(e.element),(0,t.isNullOrUndefined)(i.container)?(i.container=U(e,h,b,"div",n),i.container.classList.add(o),e.element.parentNode&&e.element.parentNode.insertBefore(i.container,e.element)):((0,t.isNullOrUndefined)(e.customTag)||i.container.classList.add(b),i.container.classList.add(h));var a=n("span",{className:u}),r=n("label",{className:d});if((0,t.isNullOrUndefined)(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),(0,t.attributes)(e.element,{"aria-labelledby":r.id})),(0,t.isNullOrUndefined)(e.element.placeholder)||""===e.element.placeholder||(r.innerText=R(e.element.placeholder),e.element.removeAttribute("placeholder")),(0,t.isNullOrUndefined)(e.properties)||(0,t.isNullOrUndefined)(e.properties.placeholder)||""===e.properties.placeholder||(r.innerText=R(e.properties.placeholder)),r.innerText||i.container.classList.add(g),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(H(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(f)&&(0,t.removeClass)([r],f),(0,t.addClass)([r],v)),"Auto"===e.floatLabelType){var p=function(){return function(e){B(e.element,e.floatLabelType)}(e)},c=function(){return function(e){B(e.element,e.floatLabelType)}(e)};e.element.addEventListener("input",p),e.element.addEventListener("blur",c),e.element.__eventHandlers.floatInputHandler={inputFloatHandler:p},e.element.__eventHandlers.floatBlurHandler={blurFloatHandler:c}}else O(e);(0,t.isNullOrUndefined)(e.element.getAttribute("id"))||r.setAttribute("for",e.element.getAttribute("id"))}function O(e){if(!((0,t.isNullOrUndefined)(e.element)||(0,t.isNullOrUndefined)(e.element.__eventHandlers)||(0,t.isNullOrUndefined)(e.element.__eventHandlers.floatInputHandler)||(0,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 w(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function T(e,i,s){(0,t.isNullOrUndefined)(i)||(e&&!s?(0,t.removeClass)([i],m):(0,t.addClass)([i],m))}function H(e,i,s){(void 0===s&&(s=null),e)?((0,t.addClass)([i],v),i.classList.contains(f)&&(0,t.removeClass)([i],f)):(null==s||s!==document.activeElement)&&(i.classList.contains(v)&&(0,t.removeClass)([i],v),(0,t.addClass)([i],f))}function N(e){var i=(0,t.isNullOrUndefined)(e.parentNode)?e:e.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function A(e,i,n){if(void 0===a||a){var r=function(n){return function(e,i,n){i.classList.contains(s)||i.readOnly||(e.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",(0,t.addClass)([n],m))}(n,e,i)};i.addEventListener("click",r),e.__eventHandlers.clearClickHandler={clickHandlerEvent:r}}var l=function(){return function(e,t){T(e.value,t)}(e,i)},o=function(){return function(e,t){T(e.value,t,e.readOnly)}(e,i)},h=function(){return function(e,i){setTimeout((function(){(0,t.isNullOrUndefined)(i)||((0,t.addClass)([i],m),i=!(0,t.isNullOrUndefined)(e)&&e.classList.contains("e-combobox")?null:i)}),200)}(e,i)};e.addEventListener("input",l),e.addEventListener("focus",o),e.addEventListener("blur",h),e.__eventHandlers.clearInputHandler={inputHandlerEvent:l},e.__eventHandlers.clearFocusHandler={focusHandlerEvent:o},e.__eventHandlers.clearBlurHandler={blurHandlerEvent:h}}function B(e,t){if(N(e).classList.contains(h)&&"Auto"===t){var i=N(e).getElementsByClassName("e-float-text")[0];H(e.value,i,e)}}function U(e,i,s,n,a){var r,l=(0,t.isNullOrUndefined)(a)?t.createElement:a;return(0,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 R(e){var i="";if(!(0,t.isNullOrUndefined)(e)&&""!==e){var s=document.createElement("span");s.innerHTML='<input placeholder="'+e+'"/>',i=s.children[0].placeholder}return i}function V(e,i,s){(0,t.isNullOrUndefined)(s)||""===s||(0,t.removeClass)(i,s.split(" ")),(0,t.isNullOrUndefined)(e)||""===e||(0,t.addClass)(i,e.split(" "))}function F(e,i,s){if("multiselect"===s||function(e){if(!e)return!1;var t=e;for(;t&&t!==document.body;){if("none"===window.getComputedStyle(t).display)return!1;t=t.parentElement}return!0}(e)){var n="multiselect"===s?e:e.clientWidth-parseInt(getComputedStyle(e,null).getPropertyValue("padding-left"),10);(0,t.isNullOrUndefined)(i)||(0,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 M(e,i){e=R(e);var s,n=N(i);n.classList.contains(h)?(0,t.isNullOrUndefined)(e)||""===e?(n.classList.add(g),(s=n.getElementsByClassName("e-float-text-content")[0])?s.children[0].textContent="":n.getElementsByClassName(d)[0].textContent=""):((s=n.getElementsByClassName("e-float-text-content")[0])&&s.children[0]?s.children[0].textContent=e:n.getElementsByClassName(d)[0].textContent=e,n.classList.remove(g),i.removeAttribute("placeholder")):(0,t.isNullOrUndefined)(e)||""===e?i.removeAttribute("placeholder"):(0,t.attributes)(i,{placeholder:e})}function I(e,i,s){e?(0,t.attributes)(i,{readonly:""}):i.removeAttribute("readonly"),(0,t.isNullOrUndefined)(s)||B(i,s)}function D(e,s){e?(0,t.addClass)(s,i):(0,t.removeClass)(s,i)}function z(e,i,n,a){var r={disabled:"","aria-disabled":"true"},l=!(0,t.isNullOrUndefined)(a);e?(i.classList.remove(s),q(r,i),l&&(0,t.removeClass)([a],s)):(i.classList.add(s),j(r,i),l&&(0,t.addClass)([a],s)),(0,t.isNullOrUndefined)(n)||B(i,n)}function W(e,i,s,n,a){var r=(0,t.isNullOrUndefined)(a)?t.createElement:a;e?s.clearButton=function(e,i,s,n){var a=((0,t.isNullOrUndefined)(n)?t.createElement:n)("span",{className:c}),r=i.container;return(0,t.isNullOrUndefined)(s)?(i.container.classList.contains(h)?i.container.querySelector("."+d):e).insertAdjacentElement("afterend",a):r.appendChild(a),(0,t.addClass)([a],m),A(e,a),a.setAttribute("aria-label","close"),a}(i,s,n,r):((0,t.remove)(s.clearButton),s.clearButton=null)}function q(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){var a=n[i],r=N(t);"disabled"===a&&t.classList.remove(s),"disabled"===a&&r.classList.contains(o)&&r.classList.remove(s),"placeholder"===a&&r.classList.contains(h)?r.getElementsByClassName(d)[0].textContent="":t.removeAttribute(a)}}function j(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){var a=n[i],r=N(t);"disabled"===a&&t.classList.add(s),"disabled"===a&&r.classList.contains(o)&&r.classList.add(s),"placeholder"===a&&r.classList.contains(h)?r.getElementsByClassName(d)[0].textContent=e[""+a]:t.setAttribute(a,e[""+a])}}function _(e,t){if(e.classList.contains("e-outline")&&e.getElementsByClassName("e-float-text")[0]){var i=t("span",{className:p});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 K(e,i,s){var n=[];n.push(s);var a=(0,t.isNullOrUndefined)(s)?i.querySelectorAll(".e-input-group-icon"):n;if(e&&a.length>0)for(var r=0;r<a.length;r++)a[parseInt(r.toString(),10)].addEventListener("mousedown",X,!1),a[parseInt(r.toString(),10)].addEventListener("mouseup",Y,!1);else if(a.length>0)for(r=0;r<a.length;r++)a[parseInt(r.toString(),10)].removeEventListener("mousedown",X,this),a[parseInt(r.toString(),10)].removeEventListener("mouseup",Y,this)}function X(){for(var e,t,i=this.parentElement;!i.classList.contains("e-input-group");)i=i.parentElement;t=this,(e=i).classList.contains("e-disabled")||e.querySelector("input").readOnly||t.classList.add("e-input-btn-ripple")}function Y(){var e=this;setTimeout((function(){e.classList.remove("e-input-btn-ripple")}),500)}function Z(e,t){var i=t("span",{className:e});return i.classList.add("e-input-group-icon"),i}function J(e,i,s,n){var a=(0,t.isNullOrUndefined)(n)?t.createElement:n,r=Z(e,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if((0,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 u=o[parseInt(h.toString(),10)],d=l.parentElement;u.classList.contains("e-float-line")&&(d&&d.classList.contains("e-filled")||!d)||l.appendChild(u)}}return l.parentNode.insertBefore(r,l),K(!0,i,r),r}function $(e,i,s){var n=Z(e,(0,t.isNullOrUndefined)(s)?t.createElement:s);return(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),K(!0,i,n),n}function G(e,t){"hidden"===t.type?e.classList.add("e-hidden"):e.classList.contains("e-hidden")&&e.classList.remove("e-hidden")}function Q(e){var i=e;return(0,t.isNullOrUndefined)(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i}e.createInput=function(e,i){e.element.__eventHandlers={};var s=(0,t.isNullOrUndefined)(i)?t.createElement:i,u={container:null,buttons:[],clearButton:null};if(e.floatLabelType,a=e.bindClearAction,(0,t.isNullOrUndefined)(e.floatLabelType)||"Never"===e.floatLabelType?(u.container=U(e,o,y,"span",s),e.element.parentNode.insertBefore(u.container,e.element),(0,t.addClass)([e.element],n),u.container.appendChild(e.element)):L(e,u,s),r(e),(0,t.isNullOrUndefined)(e.properties)||(0,t.isNullOrUndefined)(e.properties.showClearButton)||!e.properties.showClearButton||(W(e.properties.showClearButton,e.element,u,!0,s),u.clearButton.setAttribute("role","button"),u.container.classList.contains(h)&&(0,t.addClass)([u.container],o)),!(0,t.isNullOrUndefined)(e.buttons))for(var d=0;d<e.buttons.length;d++)u.buttons.push($(e.buttons[d],u.container,s));return(0,t.isNullOrUndefined)(e.element)||"TEXTAREA"!==e.element.tagName||(0,t.addClass)([u.container],l),G(u.container,e.element),_((u=function(e,i){if(!(0,t.isNullOrUndefined)(e.properties))for(var s=0,n=Object.keys(e.properties);s<n.length;s++){switch(n[s]){case"cssClass":V(e.properties.cssClass,[i.container]),w(e.floatLabelType,i.container);break;case"enabled":z(e.properties.enabled,e.element,e.floatLabelType,i.container);break;case"enableRtl":D(e.properties.enableRtl,[i.container]);break;case"placeholder":M(e.properties.placeholder,e.element);break;case"readonly":I(e.properties.readonly,e.element)}}return i}(e,u)).container,s),u},e.bindInitialEvent=r,e.wireFloatingEvents=k,e.wireClearBtnEvents=A,e.destroy=function(e,i){void 0===i&&(i=null),function(e){if(!(0,t.isNullOrUndefined)(e.element)&&!((0,t.isNullOrUndefined)(e.element.__eventHandlers)||(0,t.isNullOrUndefined)(e.element.__eventHandlers.inputFocusHandler)||(0,t.isNullOrUndefined)(e.element.__eventHandlers.inputBlurHandler)||(0,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}}(e),"Auto"===e.floatLabelType&&O(e),e.properties.showClearButton&&function(e,i){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(e.__eventHandlers)){if(!(0,t.isNullOrUndefined)(e.__eventHandlers.clearClickHandler)){var s=e.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===a||a)&&((0,t.isNullOrUndefined)(i)||i.removeEventListener("click",s)),delete e.__eventHandlers.clearClickHandler}if(!(0,t.isNullOrUndefined)(e.__eventHandlers.clearInputHandler)&&!(0,t.isNullOrUndefined)(e.__eventHandlers.clearFocusHandler)&&!(0,t.isNullOrUndefined)(e.__eventHandlers.clearBlurHandler)){var n=e.__eventHandlers.clearInputHandler.inputHandlerEvent,r=e.__eventHandlers.clearFocusHandler.focusHandlerEvent,l=e.__eventHandlers.clearBlurHandler.blurHandlerEvent;e.removeEventListener("input",n),e.removeEventListener("focus",r),e.removeEventListener("blur",l),delete e.__eventHandlers.clearInputHandler,delete e.__eventHandlers.clearFocusHandler,delete e.__eventHandlers.clearBlurHandler}}}(e.element,i),(0,t.isNullOrUndefined)(e.buttons)||K(!1,null,e.buttons),P(e.element),(0,t.isNullOrUndefined)(e.element)||(delete e.element.__eventHandlers,e.element.classList.contains(n)&&e.element.classList.remove(n)),null},e.setValue=function(e,i,s,n){if(i.value=e,"Never"!==s&&F(i,i.parentElement),(0,t.isNullOrUndefined)(s)||"Auto"!==s||B(i,s),!(0,t.isNullOrUndefined)(n)&&n){var a=N(i);if(!(0,t.isNullOrUndefined)(a)){var r=a.getElementsByClassName(c)[0];(0,t.isNullOrUndefined)(r)||(i.value&&!(0,t.isNullOrUndefined)(a)&&a.classList.contains("e-input-focus")?(0,t.removeClass)([r],m):(0,t.addClass)([r],m))}}E(s,i)},e.setCssClass=V,e.calculateWidth=F,e.setWidth=function(e,i){"number"==typeof e?i.style.width=(0,t.formatUnit)(e):"string"==typeof e&&(i.style.width=e.match(/px|%|em/)?e:(0,t.formatUnit)(e)),F(i.firstChild,i)},e.setPlaceholder=M,e.setReadonly=I,e.setEnableRtl=D,e.setEnabled=z,e.setClearButton=W,e.removeAttributes=q,e.addAttributes=j,e.removeFloating=function(e){var i=e.container;if(!(0,t.isNullOrUndefined)(i)&&i.classList.contains(h)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),a=i.querySelector("."+d).textContent,r=null!==i.querySelector(".e-clear-icon");(0,t.detach)(i.querySelector("."+u)),(0,t.detach)(i.querySelector("."+d)),(0,t.classList)(i,[o],[h]),P(s),(0,t.attributes)(s,{placeholder:a}),s.classList.add(n),r||"INPUT"!==s.tagName||s.removeAttribute("required")}},e.addFloating=function(e,i,s,a){var r=(0,t.isNullOrUndefined)(a)?t.createElement:a,l=(0,t.closest)(e,"."+o);i;var h=l.tagName,p={element:e,floatLabelType:i,customTag:h="DIV"!==h&&"SPAN"!==h?h:null,properties:{placeholder:s}};if("Never"!==i){var c=l.querySelector(".e-clear-icon"),m={container:l};e.classList.remove(n),L(p,m,r),_(m.container,r),F(p.element,m.container);var v=l.classList.contains("e-float-icon-left");if((0,t.isNullOrUndefined)(c))if(v)c=l.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon");else c=l.querySelector(".e-input-group-icon");if((0,t.isNullOrUndefined)(c))v&&(c=l.querySelector(".e-input-group-icon"));else{var f=l.querySelector("."+u),g=l.querySelector("."+d),y=v?l.querySelector(".e-input-in-wrap"):l;y.insertBefore(e,c),y.insertBefore(f,c),y.insertBefore(g,c)}}else O(p);w(i,e.parentElement)},e.createSpanElement=_,e.setRipple=function(e,t){for(var i=0;i<t.length;i++)K(e,t[parseInt(i.toString(),10)].container)},e.addIcon=function(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++){$(l[r],i,n)}else for(var o=0,h=a;o<h.length;o++){J(h[o],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")},e.prependSpan=J,e.appendSpan=$,e.validateInputType=G,e.updateHTMLAttributesToElement=function(e,i){if(!(0,t.isNullOrUndefined)(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];C.indexOf(a)<0&&i.setAttribute(a,e[""+a])}},e.updateCssClass=function(e,t,i){V(Q(e),[i],Q(t))},e.getInputValidClassList=Q,e.updateHTMLAttributesToWrapper=function(e,i){if(!(0,t.isNullOrUndefined)(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];if(C.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(e[""+a]);""!==r&&(0,t.addClass)([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=(0,t.isNullOrUndefined)(l)?e[""+a]:l+e[""+a],i.setAttribute(a,l)}else i.setAttribute(a,e[""+a])}},e.isBlank=function(e){return!e||/^\s*$/.test(e)}}(e||(e={}));var x,S=(x=function(e,t){return x=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])},x(e,t)},function(e,t){function i(){this.constructor=e}x(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),k=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},P="e-input-group-icon",L="e-spin-up",O="e-error",w="increment",T="decrement",H=new RegExp("^(-)?(\\d*)$"),N="e-input-focus",A=["title","style","class"],B=0,U=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 S(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=(0,t.getValue)("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),(0,t.removeClass)([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=(0,t.closest)(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var i=this.createElement("input"),s=0;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,(0,t.setValue)("ej2_instances",e,this.element)}(0,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",(0,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"),!(0,t.isNullOrUndefined)((0,t.closest)(this.element,"fieldset"))&&(0,t.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},s.prototype.checkAttributes=function(e){for(var i=0,s=e?(0,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(!(0,t.isNullOrUndefined)(this.element.getAttribute(n)))switch(n){case"disabled":if((0,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((0,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":((0,t.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if((0,t.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.value||e){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties((0,t.setValue)(n,l,{}),!e)}break;case"min":if((0,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((0,t.setValue)(n,o,{}),!e)}break;case"max":if((0,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((0,t.setValue)(n,h,{}),!e)}break;case"step":if((0,t.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.step||e){var u=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===u||isNaN(u)||this.setProperties((0,t.setValue)(n,u,{}),!e)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var d=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==d&&!isNaN(d)||"value"===n)&&this.setProperties((0,t.setValue)(n,d,{}),!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!==(0,t.getValue)("currency",this)&&((0,t.setValue)("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;(0,t.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=e.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.container=s.container,this.container.setAttribute("class","e-control-wrapper e-numeric "+this.container.getAttribute("class")),this.updateHTMLAttrToWrapper(),this.readonly&&(0,t.attributes)(this.element,{"aria-readonly":"true"}),this.hiddenInput=this.createElement("input",{attrs:{type:"text",validateHidden:"true","aria-label":"hidden",class:"e-numeric-hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),this.isAngular&&"EJS-NUMERICTEXTBOX"===this.angularTagName&&this.cloneElement.id.length>0?(0,t.attributes)(this.hiddenInput,{name:this.cloneElement.id}):(0,t.attributes)(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&(0,t.attributes)(this.container,{style:this.inputStyle})},s.prototype.updateDataAttribute=function(e){var t={};if(e)t=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)t[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];0===a.indexOf("data")&&this.hiddenInput.setAttribute(a,t[""+a])}},s.prototype.updateHTMLAttrToElement=function(){if(!(0,t.isNullOrUndefined)(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];A.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(t,i){e.setCssClass(this.getNumericValidClassList(t),[this.container],this.getNumericValidClassList(i))},s.prototype.getNumericValidClassList=function(e){var i=e;return(0,t.isNullOrUndefined)(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!(0,t.isNullOrUndefined)(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(A.indexOf(s)>-1)if("class"===s){var n=this.getNumericValidClassList(this.htmlAttributes[""+s]);""!==n&&(0,t.addClass)([this.container],n.split(" "))}else if("style"===s){var a=this.container.getAttribute(s);a=(0,t.isNullOrUndefined)(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.container.setAttribute(s,a)}else this.container.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.setElementWidth=function(e){(0,t.isNullOrUndefined)(e)||("number"==typeof e?this.container.style.width=(0,t.formatUnit)(e):"string"==typeof e&&(this.container.style.width=e.match(/px|%|em/)?e:(0,t.formatUnit)(e)))},s.prototype.spinBtnCreation=function(){this.spinDown=e.appendSpan(P+" e-spin-down",this.container,this.createElement),(0,t.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle")}),this.spinUp=e.appendSpan(P+" "+L,this.container,this.createElement),(0,t.attributes)(this.spinUp,{title:this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},s.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),this.min!==-Number.MAX_VALUE&&(0,t.attributes)(this.element,{"aria-valuemin":this.min.toString()}),this.max!==Number.MAX_VALUE&&(0,t.attributes)(this.element,{"aria-valuemax":this.max.toString()})},s.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},s.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},s.prototype.action=function(e,t){this.isInteract=!0;var i=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(i,this.step,e)),this.raiseChangeEvent(t)},s.prototype.checkErrorClass=function(){this.isValidState?(0,t.removeClass)([this.container],O):(0,t.addClass)([this.container],O),(0,t.attributes)(this.element,{"aria-invalid":this.isValidState?"false":"true"})},s.prototype.bindClearEvent=function(){this.showClearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},s.prototype.resetHandler=function(e){e.preventDefault(),this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputWrapper.container.classList.contains("e-static-clear")||this.clear(e),this.isInteract=!0,this.raiseChangeEvent(e)},s.prototype.clear=function(e){if(this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",(0,t.closest)(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}},s.prototype.resetFormHandler=function(){"EJS-NUMERICTEXTBOX"===this.element.tagName?this.updateValue(null):this.updateValue(this.inputEleValue)},s.prototype.setSpinButton=function(){(0,t.isNullOrUndefined)(this.spinDown)||(0,t.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),(0,t.isNullOrUndefined)(this.spinUp)||(0,t.attributes)(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"blur",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"input",this.inputHandler,this),t.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&t.EventHandler.add(this.formEle,"reset",this.resetFormHandler,this))},s.prototype.wireSpinBtnEvents=function(){t.EventHandler.add(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},s.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"blur",this.focusOutHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"input",this.inputHandler),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keypress",this.keyPressHandler),t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(this.element,"paste",this.pasteHandler),this.formEle&&t.EventHandler.remove(this.formEle,"reset",this.resetFormHandler)},s.prototype.unwireSpinBtnEvents=function(){t.EventHandler.remove(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner)},s.prototype.changeHandler=function(e){e.stopPropagation(),this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},s.prototype.raiseChangeEvent=function(e){if(this.inputValue=(0,t.isNullOrUndefined)(this.inputValue)||isNaN(this.inputValue)?null:this.inputValue,this.prevValue!==this.value||this.prevValue!==this.inputValue){var i={};this.changeEventArgs={value:this.value,previousValue:this.prevValue,isInteracted:this.isInteract,isInteraction:this.isInteract,event:e},e&&(this.changeEventArgs.event=e),void 0===this.changeEventArgs.event&&(this.changeEventArgs.isInteracted=!1,this.changeEventArgs.isInteraction=!1),(0,t.merge)(i,this.changeEventArgs),this.prevValue=this.value,this.isInteract=!1,this.elementPrevValue=this.element.value,this.preventChange=!1,this.trigger("change",i)}},s.prototype.pasteHandler=function(){var e=this;if(this.enabled&&!this.readonly){var t=this.element.value;setTimeout((function(){e.numericRegex().test(e.element.value)||e.setElementValue(t)}))}},s.prototype.preventHandler=function(){var e=this,i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout((function(){if(e.element.selectionStart>0){var s=e.element.selectionStart,n=e.element.selectionStart-1,a=e.element.value.split(""),r=(0,t.getNumericObject)(e.locale),l=(0,t.getValue)("decimal",r),o=l.charCodeAt(0);" "===e.element.value[n]&&e.element.selectionStart>0&&!i?((0,t.isNullOrUndefined)(e.prevVal)?e.element.value=e.element.value.trim():0!==n?e.element.value=e.prevVal:0===n&&(e.element.value=e.element.value.trim()),e.element.setSelectionRange(n,n)):isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&45!==e.element.value[e.element.selectionStart-1].charCodeAt(0)?(a.indexOf(e.element.value[e.element.selectionStart-1])!==a.lastIndexOf(e.element.value[e.element.selectionStart-1])&&e.element.value[e.element.selectionStart-1].charCodeAt(0)===o||e.element.value[e.element.selectionStart-1].charCodeAt(0)!==o)&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(s,e.element.value.length),e.element.setSelectionRange(n,n),isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&e.element.selectionStart>0&&e.element.value.length&&e.preventHandler()):isNaN(parseFloat(e.element.value[e.element.selectionStart-2]))&&e.element.selectionStart>1&&45!==e.element.value[e.element.selectionStart-2].charCodeAt(0)&&(a.indexOf(e.element.value[e.element.selectionStart-2])!==a.lastIndexOf(e.element.value[e.element.selectionStart-2])&&e.element.value[e.element.selectionStart-2].charCodeAt(0)===o||e.element.value[e.element.selectionStart-2].charCodeAt(0)!==o)&&(e.element.setSelectionRange(n,n),e.nextEle=e.element.value[e.element.selectionStart],e.cursorPosChanged=!0,e.preventHandler()),!0===e.cursorPosChanged&&e.element.value[e.element.selectionStart]===e.nextEle&&isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&(e.element.setSelectionRange(e.element.selectionStart+1,e.element.selectionStart+1),e.cursorPosChanged=!1,e.nextEle=null),""===e.element.value.trim()&&e.element.setSelectionRange(0,0),e.element.selectionStart>0&&(45===e.element.value[e.element.selectionStart-1].charCodeAt(0)&&e.element.selectionStart>1&&((0,t.isNullOrUndefined)(e.prevVal)||(e.element.value=e.prevVal),e.element.setSelectionRange(e.element.selectionStart,e.element.selectionStart)),e.element.value[e.element.selectionStart-1]===l&&0===e.decimals&&e.validateDecimalOnType&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(s,e.element.value.length))),e.prevVal=e.element.value}}))},s.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&t.Browser.isDevice&&this.preventHandler();var e=this.instance.getNumberParser({format:"n"})(this.element.value);if(e=null===e||isNaN(e)?null:e,this.hiddenInput.value=e||0===e?e.toString():null,(0,t.closest)(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}}},s.prototype.inputHandler=function(e){var i=this;if(this.enabled&&!this.readonly){var s=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);if((navigator.userAgent.toLowerCase().indexOf("firefox")>-1||s)&&t.Browser.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==(0,t.getValue)("decimal",(0,t.getNumericObject)(this.locale))&&this.element.value!==(0,t.getValue)("minusSign",(0,t.getNumericObject)(this.locale))){var n=this.instance.getNumberParser({format:"n"})(this.element.value);n=isNaN(n)?null:n,i.localChange({value:n}),this.preventChange=!0}if(this.isVue){var a=this.instance.getNumberParser({format:"n"})(this.element.value),r=this.instance.getNumberParser({format:"n"})(this.elementPrevValue);(new RegExp("[^0-9]+$").test(this.element.value)||(-1!==this.elementPrevValue.indexOf(".")||-1!==this.elementPrevValue.indexOf("-"))&&"0"===this.element.value[this.element.value.length-1])&&(a=this.value);var l={event:e,value:null===a||isNaN(a)?null:a,previousValue:null===r||isNaN(r)?null:r};this.preventChange=!0,this.elementPrevValue=this.element.value,this.trigger("input",l)}}},s.prototype.keyDownHandler=function(e){if(!this.readonly)switch(e.keyCode){case 38:e.preventDefault(),this.action(w,e);break;case 40:e.preventDefault(),this.action(T,e)}},s.prototype.performAction=function(e,t,i){(null===e||isNaN(e))&&(e=0);var s=i===w?e+t:e-t;return s=this.correctRounding(e,t,s),this.strictMode?this.trimValue(s):s},s.prototype.correctRounding=function(e,t,i){var s=new RegExp("[,.](.*)"),n=s.test(e.toString()),a=s.test(t.toString());if(n||a){var r=n?s.exec(e.toString())[0].length:0,l=a?s.exec(t.toString())[0].length:0,o=Math.max(r,l);return this.roundValue(i,o)}return i},s.prototype.roundValue=function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,Math.round(e)/i},s.prototype.updateValue=function(e,t){t&&(this.isInteract=!0),null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.inputValue=e,this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.isDynamicChange||this.raiseChangeEvent(t)},s.prototype.updateCurrency=function(e,i){(0,t.setValue)(e,i,this.cultureInfo),this.updateValue(this.value)},s.prototype.changeValue=function(e){if(e||0===e){var t=this.getNumberOfDecimals(e);this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},s.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),i=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(i),(0,t.attributes)(this.element,{"aria-valuenow":e}),this.hiddenInput.value=this.value.toString(),null!==this.value&&this.serverDecimalSeparator&&(this.hiddenInput.value=this.hiddenInput.value.replace(".",this.serverDecimalSeparator))}else this.setElementValue(""),this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},s.prototype.setElementValue=function(t,i){e.setValue(t,i||this.element,this.floatLabelType,this.showClearButton)},s.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},s.prototype.getNumberOfDecimals=function(e){var i,s=new RegExp("[eE][-+]?([0-9]+)"),n=e.toString();if(s.test(n)){var a=s.exec(n);(0,t.isNullOrUndefined)(a)||(n=e.toFixed(Math.min(parseInt(a[1],10),20)))}var r=n.split(".")[1];return i=r&&r.length?r.length:0,null!==this.decimals&&(i=i<this.decimals?i:this.decimals),i},s.prototype.formatNumber=function(){var e=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},s.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},s.prototype.roundNumber=function(e,t){var i=e,s=t||0,n=i.toString().split("e"),a=(i=Math.round(Number(n[0]+"e"+(n[1]?Number(n[1])+s:s)))).toString().split("e");return i=Number(a[0]+"e"+(a[1]?Number(a[1])-s:-s)),Number(i.toFixed(s))},s.prototype.cancelEvent=function(e){return e.preventDefault(),!1},s.prototype.keyPressHandler=function(e){if(!this.enabled||this.readonly)return!0;if(!t.Browser.isDevice&&"11.0"===t.Browser.info.version&&13===e.keyCode){var i=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(i,e),!0}if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var s=String.fromCharCode(e.which),n=(0,t.getValue)("decimal",(0,t.getNumericObject)(this.locale)),a="NumpadDecimal"===e.code&&s!==n;a&&(s=n);var r=this.element.value;if(r=r.substring(0,this.element.selectionStart)+s+r.substring(this.element.selectionEnd),this.numericRegex().test(r)){if(a){var l=this.element.selectionStart+1;this.element.value=r,this.element.setSelectionRange(l,l),e.preventDefault(),e.stopPropagation()}return!0}return e.preventDefault(),e.stopPropagation(),!1},s.prototype.numericRegex=function(){var e=(0,t.getNumericObject)(this.locale),i=(0,t.getValue)("decimal",e),s="*";return"."===i&&(i="\\"+i),0===this.decimals&&this.validateDecimalOnType?H:(this.decimals&&this.validateDecimalOnType&&(s="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+i+"\\d"+s+")?)|("+i+"\\d"+s+")))?$"))},s.prototype.mouseWheel=function(e){var t;e.preventDefault();var i=e;i.wheelDelta?t=i.wheelDelta/120:i.detail&&(t=-i.detail/3),t>0?this.action(w,e):t<0&&this.action(T,e),this.cancelEvent(e)},s.prototype.focusHandler=function(e){var i=this;if(clearTimeout(B),this.focusEventArgs={event:e,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,(0,t.removeClass)([this.container],O),this.prevValue=this.value,this.value||0===this.value){var s=this.formatNumber();if(this.setElementValue(s),!this.isPrevFocused)if(t.Browser.isDevice||"11.0"!==t.Browser.info.version){var n=t.Browser.isDevice&&t.Browser.isIos?600:0;B=setTimeout((function(){i.element.setSelectionRange(0,s.length)}),n)}else this.element.setSelectionRange(0,s.length)}t.Browser.isDevice||t.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},s.prototype.focusOutHandler=function(e){var i=this;if(this.blurEventArgs={event:e,value:this.value,container:this.container},this.trigger("blur",this.blurEventArgs),this.enabled&&!this.readonly){if(this.isPrevFocused){if(e.preventDefault(),t.Browser.isDevice){var s=this.element.value;this.element.focus(),this.isPrevFocused=!1;var n=this.element;setTimeout((function(){i.setElementValue(s,n)}),200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var a=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(a),t.Browser.isDevice||t.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}if((0,t.closest)(this.element,"form")){var r=this.element.nextElementSibling,l=document.createEvent("FocusEvent");l.initEvent("focusout",!1,!0),r.dispatchEvent(l)}}},s.prototype.mouseDownOnSpinner=function(e){var i=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){this.getElementData(e);var s=e.currentTarget,n=s.classList.contains(L)?w:T;t.EventHandler.add(s,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval((function(){i.isCalled=!0,i.action(n,e)}),150),t.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},s.prototype.touchMoveOnSpinner=function(e){var t;if("touchmove"===e.type){var i=e.touches;t=i.length&&document.elementFromPoint(i[0].pageX,i[0].pageY)}else t=document.elementFromPoint(e.clientX,e.clientY);t.classList.contains(P)||clearInterval(this.timeOut)},s.prototype.mouseUpOnSpinner=function(e){if(this.prevValue=this.value,this.isPrevFocused&&(this.element.focus(),t.Browser.isDevice||(this.isPrevFocused=!1)),t.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var i=e.currentTarget,s=i.classList.contains(L)?w:T;if(t.EventHandler.remove(i,"mouseleave",this.mouseUpClick),this.isCalled||this.action(s,e),this.isCalled=!1,t.EventHandler.remove(document,"mouseup",this.mouseUpClick),(0,t.closest)(this.element,"form")){var n=this.element.nextElementSibling,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}}},s.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},s.prototype.floatLabelTypeUpdate=function(){e.removeFloating(this.inputWrapper);var t=this.hiddenInput;this.hiddenInput.remove(),e.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(t,this.container.childNodes[1])},s.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,this.spinUp&&t.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),this.spinDown&&t.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},s.prototype.increment=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,w)),this.raiseChangeEvent()},s.prototype.decrement=function(e){void 0===e&&(e=this.st