@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 • 433 kB
JavaScript
/*!
* filename: ej2-inputs.min.js
* version : 29.1.33
* Copyright Syncfusion Inc. 2001 - 2024. 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(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons"),require("SyncfusionButtons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionSplitbuttons","SyncfusionButtons"],e):"object"==typeof exports?exports.SyncfusionInputs=e(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons"),require("SyncfusionButtons")):t.SyncfusionInputs=e(t.SyncfusionBase,t.SyncfusionPopups,t.SyncfusionSplitbuttons,t.SyncfusionButtons)}(self,((t,e,i,s)=>(()=>{"use strict";var n={766:e=>{e.exports=t},741:t=>{t.exports=s},197:t=>{t.exports=e},295:t=>{t.exports=i}},a={};function r(t){var e=a[t];if(void 0!==e)return e.exports;var i=a[t]={exports:{}};return n[t](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var l={};return(()=>{r.r(l),r.d(l,{AsyncSettings:()=>Vi,ButtonSettings:()=>bn,ButtonsProps:()=>Ri,ChatMessageRole:()=>$e,ColorPicker:()=>gs,ColorRangeData:()=>Wt,ErrorOption:()=>At,FilesProp:()=>Ui,FormValidator:()=>Qe,Input:()=>t,LabelPosition:()=>Us,LimitData:()=>qt,MaskUndo:()=>Nt,MaskedTextBox:()=>It,NumericTextBox:()=>U,OtpInput:()=>vn,OtpInputStyle:()=>on,OtpInputType:()=>ln,PrecisionType:()=>Rs,Rating:()=>un,Signature:()=>js,SignatureBase:()=>zs,Slider:()=>Ye,SmartTextArea:()=>Vs,SpeechToText:()=>En,SpeechToTextState:()=>mn,TEXTBOX_FOCUS:()=>E,TextArea:()=>Ts,TextBox:()=>Cs,TextTransform:()=>hn,TicksData:()=>zt,TooltipData:()=>jt,TooltipSettings:()=>Cn,Uploader:()=>Ii,applyMask:()=>q,bindClearEvent:()=>K,containerAttributes:()=>C,createMask:()=>W,escapeRegExp:()=>st,getMaskedVal:()=>Lt,getVal:()=>Tt,maskInput:()=>wt,maskInputBlurHandler:()=>nt,maskInputDropHandler:()=>lt,maskInputFocusHandler:()=>et,maskInputMouseDownHandler:()=>Q,maskInputMouseUpHandler:()=>tt,mobileRemoveFunction:()=>ut,regex:()=>Ge,regularExpressions:()=>z,setElementValue:()=>Pt,setMaskValue:()=>kt,strippedValue:()=>G,triggerFocus:()=>it,unstrippedValue:()=>J,unwireEvents:()=>_,wireEvents:()=>j});var t,e=r(766),i="e-rtl",s="e-disabled",n="e-input",a="e-multi-line-input",o="e-input-group",h="e-float-input",u="e-float-line",p="e-float-text",d="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(t){var r=!0;function l(e){E(e.floatLabelType,e.element);var i=function(){return function(e){var i=A(e.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==e.floatLabelType&&setTimeout((function(){t.calculateWidth(e.element,i)}),80)}(e)},s=function(){return function(e){var i=A(e.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==e.floatLabelType&&setTimeout((function(){t.calculateWidth(e.element,i)}),80)}(e)},n=function(){return function(t){E(t.floatLabelType,t.element)}(e)};e.element.addEventListener("focus",i),e.element.addEventListener("blur",s),e.element.addEventListener("input",n),e.element.__eventHandlers.inputFocusHandler={focusHandler:i},e.element.__eventHandlers.inputBlurHandler={blurHandler:s},e.element.__eventHandlers.inputHandler={inputHandler:n}}function E(t,i){var s=i.value,n=i.parentElement,a=n&&n.parentElement;""===s||(0,e.isNullOrUndefined)(s)?"Always"!==t&&(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 S(){var t=A(this).getElementsByClassName("e-float-text")[0];(0,e.isNullOrUndefined)(t)||((0,e.addClass)([t],v),t.classList.contains(f)&&(0,e.removeClass)([t],f))}function x(){var t=A(this);if(t.getElementsByTagName("textarea")[0]?""===t.getElementsByTagName("textarea")[0].value:""===t.getElementsByTagName("input")[0].value){var i=t.getElementsByClassName("e-float-text")[0];(0,e.isNullOrUndefined)(i)||(i.classList.contains(v)&&(0,e.removeClass)([i],v),(0,e.addClass)([i],f))}}function k(t){t.addEventListener("focus",S),t.addEventListener("blur",x)}function P(t){(0,e.isNullOrUndefined)(t)||(t.removeEventListener("focus",S),t.removeEventListener("blur",x))}function w(t,i,s){var n=(0,e.isNullOrUndefined)(s)?e.createElement:s;"Auto"===t.floatLabelType&&k(t.element),(0,e.isNullOrUndefined)(i.container)?(i.container=U(t,h,b,"div",n),i.container.classList.add(o),t.element.parentNode&&t.element.parentNode.insertBefore(i.container,t.element)):((0,e.isNullOrUndefined)(t.customTag)||i.container.classList.add(b),i.container.classList.add(h));var a=n("span",{className:u}),r=n("label",{className:p});if((0,e.isNullOrUndefined)(t.element.id)||""===t.element.id||(r.id="label_"+t.element.id.replace(/ /g,"_"),(0,e.attributes)(t.element,{"aria-labelledby":r.id})),(0,e.isNullOrUndefined)(t.element.placeholder)||""===t.element.placeholder||(r.innerText=R(t.element.placeholder),t.element.removeAttribute("placeholder")),(0,e.isNullOrUndefined)(t.properties)||(0,e.isNullOrUndefined)(t.properties.placeholder)||""===t.properties.placeholder||(r.innerText=R(t.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(t.element),l.appendChild(a),l.appendChild(r)}else i.container.appendChild(t.element),i.container.appendChild(a),i.container.appendChild(r);if(H(t.element.value,r),"Always"===t.floatLabelType&&(r.classList.contains(f)&&(0,e.removeClass)([r],f),(0,e.addClass)([r],v)),"Auto"===t.floatLabelType){var d=function(){return function(t){B(t.element,t.floatLabelType)}(t)},c=function(){return function(t){B(t.element,t.floatLabelType)}(t)};t.element.addEventListener("input",d),t.element.addEventListener("blur",c),t.element.__eventHandlers.floatInputHandler={inputFloatHandler:d},t.element.__eventHandlers.floatBlurHandler={blurFloatHandler:c}}else O(t);(0,e.isNullOrUndefined)(t.element.getAttribute("id"))||r.setAttribute("for",t.element.getAttribute("id"))}function O(t){if(!((0,e.isNullOrUndefined)(t.element)||(0,e.isNullOrUndefined)(t.element.__eventHandlers)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.floatInputHandler)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.floatBlurHandler))){var i=t.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=t.element.__eventHandlers.floatBlurHandler.blurFloatHandler;t.element.removeEventListener("input",i),t.element.removeEventListener("blur",s),delete t.element.__eventHandlers.floatInputHandler,delete t.element.__eventHandlers.floatBlurHandler}}function T(t,e){"Always"===t&&e.classList.contains("e-outline")&&e.classList.add("e-valid-input")}function L(t,i,s){(0,e.isNullOrUndefined)(i)||(t&&!s?(0,e.removeClass)([i],m):(0,e.addClass)([i],m))}function H(t,i,s){(void 0===s&&(s=null),t)?((0,e.addClass)([i],v),i.classList.contains(f)&&(0,e.removeClass)([i],f)):(null==s||s!==document.activeElement)&&(i.classList.contains(v)&&(0,e.removeClass)([i],v),(0,e.addClass)([i],f))}function A(t){var i=(0,e.isNullOrUndefined)(t.parentNode)?t:t.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function N(t,i,n){if(void 0===r||r){var a=function(n){return function(t,i,n){i.classList.contains(s)||i.readOnly||(t.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",(0,e.addClass)([n],m))}(n,t,i)};i.addEventListener("click",a),t.__eventHandlers.clearClickHandler={clickHandlerEvent:a}}var l=function(){return function(t,e){L(t.value,e)}(t,i)},o=function(){return function(t,e){L(t.value,e,t.readOnly)}(t,i)},h=function(){return function(t,i){setTimeout((function(){(0,e.isNullOrUndefined)(i)||((0,e.addClass)([i],m),i=!(0,e.isNullOrUndefined)(t)&&t.classList.contains("e-combobox")?null:i)}),200)}(t,i)};t.addEventListener("input",l),t.addEventListener("focus",o),t.addEventListener("blur",h),t.__eventHandlers.clearInputHandler={inputHandlerEvent:l},t.__eventHandlers.clearFocusHandler={focusHandlerEvent:o},t.__eventHandlers.clearBlurHandler={blurHandlerEvent:h}}function B(t,e){if(A(t).classList.contains(h)&&"Auto"===e){var i=A(t).getElementsByClassName("e-float-text")[0];H(t.value,i,t)}}function U(t,i,s,n,a){var r,l=(0,e.isNullOrUndefined)(a)?e.createElement:a;return(0,e.isNullOrUndefined)(t.customTag)?r=l(n,{className:i}):(r=l(t.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function R(t){var i="";if(!(0,e.isNullOrUndefined)(t)&&""!==t){var s=document.createElement("span");s.innerHTML='<input placeholder="'+t+'"/>',i=s.children[0].placeholder}return i}function V(t,i,s){(0,e.isNullOrUndefined)(s)||""===s||(0,e.removeClass)(i,s.split(" ")),(0,e.isNullOrUndefined)(t)||""===t||(0,e.addClass)(i,t.split(" "))}function I(t,i,s){if("multiselect"===s||function(t){if(!t)return!1;var e=t;for(;e&&e!==document.body;){if("none"===window.getComputedStyle(e).display)return!1;e=e.parentElement}return!0}(t)){var n="multiselect"===s?t:t.clientWidth-parseInt(getComputedStyle(t,null).getPropertyValue("padding-left"),10);(0,e.isNullOrUndefined)(i)||(0,e.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 F(t,i){t=R(t);var s,n=A(i);n.classList.contains(h)?(0,e.isNullOrUndefined)(t)||""===t?(n.classList.add(g),(s=n.getElementsByClassName("e-float-text-content")[0])?s.children[0].textContent="":n.getElementsByClassName(p)[0].textContent=""):((s=n.getElementsByClassName("e-float-text-content")[0])&&s.children[0]?s.children[0].textContent=t:n.getElementsByClassName(p)[0].textContent=t,n.classList.remove(g),i.removeAttribute("placeholder")):(0,e.isNullOrUndefined)(t)||""===t?i.removeAttribute("placeholder"):(0,e.attributes)(i,{placeholder:t})}function M(t,i,s){t?(0,e.attributes)(i,{readonly:""}):i.removeAttribute("readonly"),(0,e.isNullOrUndefined)(s)||B(i,s)}function D(t,s){t?(0,e.addClass)(s,i):(0,e.removeClass)(s,i)}function z(t,i,n,a){var r={disabled:"","aria-disabled":"true"},l=!(0,e.isNullOrUndefined)(a);t?(i.classList.remove(s),q(r,i),l&&(0,e.removeClass)([a],s)):(i.classList.add(s),j(r,i),l&&(0,e.addClass)([a],s)),(0,e.isNullOrUndefined)(n)||B(i,n)}function W(t,i,s,n,a){var r=(0,e.isNullOrUndefined)(a)?e.createElement:a;t?s.clearButton=function(t,i,s,n){var a=((0,e.isNullOrUndefined)(n)?e.createElement:n)("span",{className:c}),r=i.container;return(0,e.isNullOrUndefined)(s)?(i.container.classList.contains(h)?i.container.querySelector("."+p):t).insertAdjacentElement("afterend",a):r.appendChild(a),(0,e.addClass)([a],m),N(t,a),a.setAttribute("aria-label","close"),a}(i,s,n,r):((0,e.remove)(s.clearButton),s.clearButton=null)}function q(t,e){for(var i=0,n=Object.keys(t);i<n.length;i++){var a=n[i],r=A(e);"disabled"===a&&e.classList.remove(s),"disabled"===a&&r.classList.contains(o)&&r.classList.remove(s),"placeholder"===a&&r.classList.contains(h)?r.getElementsByClassName(p)[0].textContent="":e.removeAttribute(a)}}function j(t,e){for(var i=0,n=Object.keys(t);i<n.length;i++){var a=n[i],r=A(e);"disabled"===a&&e.classList.add(s),"disabled"===a&&r.classList.contains(o)&&r.classList.add(s),"placeholder"===a&&r.classList.contains(h)?r.getElementsByClassName(p)[0].textContent=t[""+a]:e.setAttribute(a,t[""+a])}}function _(t,e){if(t.classList.contains("e-outline")&&t.getElementsByClassName("e-float-text")[0]){var i=e("span",{className:d});i.innerHTML=t.getElementsByClassName("e-float-text")[0].innerHTML,t.getElementsByClassName("e-float-text")[0].innerHTML="",t.getElementsByClassName("e-float-text")[0].appendChild(i)}}function K(t,i,s){var n=[];n.push(s);var a=(0,e.isNullOrUndefined)(s)?i.querySelectorAll(".e-input-group-icon"):n;if(t&&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 t,e,i=this.parentElement;!i.classList.contains("e-input-group");)i=i.parentElement;e=this,(t=i).classList.contains("e-disabled")||t.querySelector("input").readOnly||e.classList.add("e-input-btn-ripple")}function Y(){var t=this;setTimeout((function(){t.classList.remove("e-input-btn-ripple")}),500)}function Z(t,e){var i=e("span",{className:t});return i.classList.add("e-input-group-icon"),i}function J(t,i,s,n){var a=(0,e.isNullOrUndefined)(n)?e.createElement:n,r=Z(t,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if((0,e.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)],p=l.parentElement;u.classList.contains("e-float-line")&&(p&&p.classList.contains("e-filled")||!p)||l.appendChild(u)}}return l.parentNode.insertBefore(r,l),K(!0,i,r),r}function G(t,i,s){var n=Z(t,(0,e.isNullOrUndefined)(s)?e.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 $(t,e){"hidden"===e.type?t.classList.add("e-hidden"):t.classList.contains("e-hidden")&&t.classList.remove("e-hidden")}function Q(t){var i=t;return(0,e.isNullOrUndefined)(t)||""===t||(i=t.replace(/\s+/g," ").trim()),i}t.createInput=function(t,i){t.element.__eventHandlers={};var s=(0,e.isNullOrUndefined)(i)?e.createElement:i,u={container:null,buttons:[],clearButton:null};if(t.floatLabelType,r=t.bindClearAction,(0,e.isNullOrUndefined)(t.floatLabelType)||"Never"===t.floatLabelType?(u.container=U(t,o,y,"span",s),t.element.parentNode.insertBefore(u.container,t.element),(0,e.addClass)([t.element],n),u.container.appendChild(t.element)):w(t,u,s),l(t),(0,e.isNullOrUndefined)(t.properties)||(0,e.isNullOrUndefined)(t.properties.showClearButton)||!t.properties.showClearButton||(W(t.properties.showClearButton,t.element,u,!0,s),u.clearButton.setAttribute("role","button"),u.container.classList.contains(h)&&(0,e.addClass)([u.container],o)),!(0,e.isNullOrUndefined)(t.buttons))for(var p=0;p<t.buttons.length;p++)u.buttons.push(G(t.buttons[p],u.container,s));return(0,e.isNullOrUndefined)(t.element)||"TEXTAREA"!==t.element.tagName||(0,e.addClass)([u.container],a),$(u.container,t.element),_((u=function(t,i){if(!(0,e.isNullOrUndefined)(t.properties))for(var s=0,n=Object.keys(t.properties);s<n.length;s++){switch(n[s]){case"cssClass":V(t.properties.cssClass,[i.container]),T(t.floatLabelType,i.container);break;case"enabled":z(t.properties.enabled,t.element,t.floatLabelType,i.container);break;case"enableRtl":D(t.properties.enableRtl,[i.container]);break;case"placeholder":F(t.properties.placeholder,t.element);break;case"readonly":M(t.properties.readonly,t.element)}}return i}(t,u)).container,s),u},t.bindInitialEvent=l,t.wireFloatingEvents=k,t.wireClearBtnEvents=N,t.destroy=function(t,i){void 0===i&&(i=null),function(t){if(!(0,e.isNullOrUndefined)(t.element)&&!((0,e.isNullOrUndefined)(t.element.__eventHandlers)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.inputFocusHandler)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.inputBlurHandler)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.inputHandler))){var i=t.element.__eventHandlers.inputFocusHandler.focusHandler,s=t.element.__eventHandlers.inputBlurHandler.blurHandler,n=t.element.__eventHandlers.inputHandler.inputHandler;t.element.removeEventListener("focus",i),t.element.removeEventListener("blur",s),t.element.removeEventListener("input",n),delete t.element.__eventHandlers.inputFocusHandler,delete t.element.__eventHandlers.inputBlurHandler,delete t.element.__eventHandlers.inputHandler}}(t),"Auto"===t.floatLabelType&&O(t),t.properties.showClearButton&&function(t,i){if(!(0,e.isNullOrUndefined)(t)&&!(0,e.isNullOrUndefined)(t.__eventHandlers)){if(!(0,e.isNullOrUndefined)(t.__eventHandlers.clearClickHandler)){var s=t.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===r||r)&&((0,e.isNullOrUndefined)(i)||i.removeEventListener("click",s)),delete t.__eventHandlers.clearClickHandler}if(!(0,e.isNullOrUndefined)(t.__eventHandlers.clearInputHandler)&&!(0,e.isNullOrUndefined)(t.__eventHandlers.clearFocusHandler)&&!(0,e.isNullOrUndefined)(t.__eventHandlers.clearBlurHandler)){var n=t.__eventHandlers.clearInputHandler.inputHandlerEvent,a=t.__eventHandlers.clearFocusHandler.focusHandlerEvent,l=t.__eventHandlers.clearBlurHandler.blurHandlerEvent;t.removeEventListener("input",n),t.removeEventListener("focus",a),t.removeEventListener("blur",l),delete t.__eventHandlers.clearInputHandler,delete t.__eventHandlers.clearFocusHandler,delete t.__eventHandlers.clearBlurHandler}}}(t.element,i),(0,e.isNullOrUndefined)(t.buttons)||K(!1,null,t.buttons),P(t.element),(0,e.isNullOrUndefined)(t.element)||(delete t.element.__eventHandlers,t.element.classList.contains(n)&&t.element.classList.remove(n))},t.setValue=function(t,i,s,n){if(i.value=t,"Never"!==s&&I(i,i.parentElement),(0,e.isNullOrUndefined)(s)||"Auto"!==s||B(i,s),!(0,e.isNullOrUndefined)(n)&&n){var a=A(i);if(!(0,e.isNullOrUndefined)(a)){var r=a.getElementsByClassName(c)[0];(0,e.isNullOrUndefined)(r)||(i.value&&!(0,e.isNullOrUndefined)(a)&&a.classList.contains("e-input-focus")?(0,e.removeClass)([r],m):(0,e.addClass)([r],m))}}E(s,i)},t.setCssClass=V,t.calculateWidth=I,t.setWidth=function(t,i){"number"==typeof t?i.style.width=(0,e.formatUnit)(t):"string"==typeof t&&(i.style.width=t.match(/px|%|em/)?t:(0,e.formatUnit)(t)),I(i.firstChild,i)},t.setPlaceholder=F,t.setReadonly=M,t.setEnableRtl=D,t.setEnabled=z,t.setClearButton=W,t.removeAttributes=q,t.addAttributes=j,t.removeFloating=function(t){var i=t.container;if(!(0,e.isNullOrUndefined)(i)&&i.classList.contains(h)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),a=i.querySelector("."+p).textContent,r=null!==i.querySelector(".e-clear-icon");(0,e.detach)(i.querySelector("."+u)),(0,e.detach)(i.querySelector("."+p)),(0,e.classList)(i,[o],[h]),P(s),(0,e.attributes)(s,{placeholder:a}),s.classList.add(n),r||"INPUT"!==s.tagName||s.removeAttribute("required")}},t.addFloating=function(t,i,s,a){var r=(0,e.isNullOrUndefined)(a)?e.createElement:a,l=(0,e.closest)(t,"."+o);0;var h=l.tagName,d={element:t,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};t.classList.remove(n),w(d,m,r),_(m.container,r),I(d.element,m.container);var v=l.classList.contains("e-float-icon-left");if((0,e.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,e.isNullOrUndefined)(c))v&&(c=l.querySelector(".e-input-group-icon"));else{var f=l.querySelector("."+u),g=l.querySelector("."+p),y=v?l.querySelector(".e-input-in-wrap"):l;y.insertBefore(t,c),y.insertBefore(f,c),y.insertBefore(g,c)}}else O(d);T(i,t.parentElement)},t.createSpanElement=_,t.setRipple=function(t,e){for(var i=0;i<e.length;i++)K(t,e[parseInt(i.toString(),10)].container)},t.addIcon=function(t,e,i,s,n){var a="string"==typeof e?e.split(","):e;if("append"===t.toLowerCase())for(var r=0,l=a;r<l.length;r++){G(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")},t.prependSpan=J,t.appendSpan=G,t.validateInputType=$,t.updateHTMLAttributesToElement=function(t,i){if(!(0,e.isNullOrUndefined)(t))for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];C.indexOf(a)<0&&i.setAttribute(a,t[""+a])}},t.updateCssClass=function(t,e,i){V(Q(t),[i],Q(e))},t.getInputValidClassList=Q,t.updateHTMLAttributesToWrapper=function(t,i){if(!(0,e.isNullOrUndefined)(t))for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];if(C.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(t[""+a]);""!==r&&(0,e.addClass)([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=(0,e.isNullOrUndefined)(l)?t[""+a]:l+t[""+a],i.setAttribute(a,l)}else i.setAttribute(a,t[""+a])}},t.isBlank=function(t){return!t||/^\s*$/.test(t)}}(t||(t={}));var S,x=(S=function(t,e){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},S(t,e)},function(t,e){function i(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),k=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},P="e-input-group-icon",w="e-spin-up",O="e-error",T="increment",L="decrement",H=new RegExp("^(-)?(\\d*)$"),A="e-input-focus",N=["title","style","class"],B=0,U=function(i){function s(t,e){var s=i.call(this,t,e)||this;return s.preventChange=!1,s.isDynamicChange=!1,s.numericOptions=t,s}return x(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var t=(0,e.getValue)("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),(0,e.removeClass)([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=(0,e.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(t){return 0!==t.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,e.setValue)("ej2_instances",t,this.element)}(0,e.attributes)(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var a={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new e.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,e.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.hasAttribute("aria-label")||this.element.setAttribute("aria-label","numerictextbox"),!(0,e.isNullOrUndefined)((0,e.closest)(this.element,"fieldset"))&&(0,e.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},s.prototype.checkAttributes=function(t){for(var i=0,s=t?(0,e.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,e.isNullOrUndefined)(this.element.getAttribute(n)))switch(n){case"disabled":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.enabled||t){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!t)}break;case"readonly":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.readonly||t){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!t)}break;case"placeholder":((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.placeholder||t)&&this.setProperties({placeholder:this.element.placeholder},!t);break;case"value":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.value||t){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties((0,e.setValue)(n,l,{}),!t)}break;case"min":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.min||t){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties((0,e.setValue)(n,o,{}),!t)}break;case"max":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.max||t){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties((0,e.setValue)(n,h,{}),!t)}break;case"step":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.step||t){var u=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===u||isNaN(u)||this.setProperties((0,e.setValue)(n,u,{}),!t)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var p=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==p&&!isNaN(p)||"value"===n)&&this.setProperties((0,e.setValue)(n,p,{}),!0)}}},s.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},s.prototype.initCultureFunc=function(){this.instance=new e.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==(0,e.getValue)("currency",this)&&((0,e.setValue)("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;(0,e.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=t.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,e.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,e.attributes)(this.hiddenInput,{name:this.cloneElement.id}):(0,e.attributes)(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&(0,e.attributes)(this.container,{style:this.inputStyle})},s.prototype.updateDataAttribute=function(t){var e={};if(t)e=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)e[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];0===a.indexOf("data")&&this.hiddenInput.setAttribute(a,e[""+a])}},s.prototype.updateHTMLAttrToElement=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];N.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(e,i){t.setCssClass(this.getNumericValidClassList(e),[this.container],this.getNumericValidClassList(i))},s.prototype.getNumericValidClassList=function(t){var i=t;return(0,e.isNullOrUndefined)(t)||""===t||(i=t.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];if(N.indexOf(s)>-1)if("class"===s){var n=this.getNumericValidClassList(this.htmlAttributes[""+s]);""!==n&&(0,e.addClass)([this.container],n.split(" "))}else if("style"===s){var a=this.container.getAttribute(s);a=(0,e.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(t){(0,e.isNullOrUndefined)(t)||("number"==typeof t?this.container.style.width=(0,e.formatUnit)(t):"string"==typeof t&&(this.container.style.width=t.match(/px|%|em/)?t:(0,e.formatUnit)(t)))},s.prototype.spinBtnCreation=function(){this.spinDown=t.appendSpan(P+" e-spin-down",this.container,this.createElement),(0,e.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle")}),this.spinUp=t.appendSpan(P+" "+w,this.container,this.createElement),(0,e.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,e.attributes)(this.element,{"aria-valuemin":this.min.toString()}),this.max!==Number.MAX_VALUE&&(0,e.attributes)(this.element,{"aria-valuemax":this.max.toString()})},s.prototype.formattedValue=function(t,e){return this.instance.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(e)},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(t,e){this.isInteract=!0;var i=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(i,this.step,t)),this.raiseChangeEvent(e)},s.prototype.checkErrorClass=function(){this.isValidState?(0,e.removeClass)([this.container],O):(0,e.addClass)([this.container],O),(0,e.attributes)(this.element,{"aria-invalid":this.isValidState?"false":"true"})},s.prototype.bindClearEvent=function(){this.showClearButton&&e.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},s.prototype.resetHandler=function(t){t.preventDefault(),this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputWrapper.container.classList.contains("e-static-clear")||this.clear(t),this.isInteract=!0,this.raiseChangeEvent(t)},s.prototype.clear=function(t){if(this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",(0,e.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,e.isNullOrUndefined)(this.spinDown)||(0,e.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),(0,e.isNullOrUndefined)(this.spinUp)||(0,e.attributes)(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},s.prototype.wireEvents=function(){e.EventHandler.add(this.element,"focus",this.focusHandler,this),e.EventHandler.add(this.element,"blur",this.focusOutHandler,this),e.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),e.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),e.EventHandler.add(this.element,"input",this.inputHandler,this),e.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),e.EventHandler.add(this.element,"change",this.changeHandler,this),e.EventHandler.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&e.EventHandler.add(this.formEle,"reset",this.resetFormHandler,this))},s.prototype.wireSpinBtnEvents=function(){e.EventHandler.add(this.spinUp,e.Browser.touchStartEvent,this.mouseDownOnSpinner,this),e.EventHandler.add(this.spinDown,e.Browser.touchStartEvent,this.mouseDownOnSpinner,this),e.EventHandler.add(this.spinUp,e.Browser.touchEndEvent,this.mouseUpOnSpinner,this),e.EventHandler.add(this.spinDown,e.Browser.touchEndEvent,this.mouseUpOnSpinner,this),e.EventHandler.add(this.spinUp,e.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),e.EventHandler.add(this.spinDown,e.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},s.prototype.unwireEvents=function(){e.EventHandler.remove(this.element,"focus",this.focusHandler),e.EventHandler.remove(this.element,"blur",this.focusOutHandler),e.EventHandler.remove(this.element,"keyup",this.keyUpHandler),e.EventHandler.remove(this.element,"input",this.inputHandler),e.EventHandler.remove(this.element,"keydown",this.keyDownHandler),e.EventHandler.remove(this.element,"keypress",this.keyPressHandler),e.EventHandler.remove(this.element,"change",this.changeHandler),e.EventHandler.remove(this.element,"paste",this.pasteHandler),this.formEle&&e.EventHandler.remove(this.formEle,"reset",this.resetFormHandler)},s.prototype.unwireSpinBtnEvents=function(){e.EventHandler.remove(this.spinUp,e.Browser.touchStartEvent,this.mouseDownOnSpinner),e.EventHandler.remove(this.spinDown,e.Browser.touchStartEvent,this.mouseDownOnSpinner),e.EventHandler.remove(this.spinUp,e.Browser.touchEndEvent,this.mouseUpOnSpinner),e.EventHandler.remove(this.spinDown,e.Browser.touchEndEvent,this.mouseUpOnSpinner),e.EventHandler.remove(this.spinUp,e.Browser.touchMoveEvent,this.touchMoveOnSpinner),e.EventHandler.remove(this.spinDown,e.Browser.touchMoveEvent,this.touchMoveOnSpinner)},s.prototype.changeHandler=function(t){t.stopPropagation(),this.element.value.length||this.setProperties({value:null},!0);var e=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(e,t)},s.prototype.raiseChangeEvent=function(t){if(this.inputValue=(0,e.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:t},t&&(this.changeEventArgs.event=t),void 0===this.changeEventArgs.event&&(this.changeEventArgs.isInteracted=!1,this.changeEventArgs.isInteraction=!1),(0,e.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 t=this;if(this.enabled&&!this.readonly){var e=this.element.value;setTimeout((function(){t.numericRegex().test(t.element.value)||t.setElementValue(e)}))}},s.prototype.preventHandler=function(){var t=this,i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout((function(){if(t.element.selectionStart>0){var s=t.element.selectionStart,n=t.element.selectionStart-1,a=t.element.value.split(""),r=(0,e.getNumericObject)(t.locale),l=(0,e.getValue)("decimal",r),o=l.charCodeAt(0);" "===t.element.value[n]&&t.element.selectionStart>0&&!i?((0,e.isNullOrUndefined)(t.prevVal)?t.element.value=t.element.value.trim():0!==n?t.element.value=t.prevVal:0===n&&(t.element.value=t.element.value.trim()),t.element.setSelectionRange(n,n)):isNaN(parseFloat(t.element.value[t.element.selectionStart-1]))&&45!==t.element.value[t.element.selectionStart-1].charCodeAt(0)?(a.indexOf(t.element.value[t.element.selectionStart-1])!==a.lastIndexOf(t.element.value[t.element.selectionStart-1])&&t.element.value[t.element.selectionStart-1].charCodeAt(0)===o||t.element.value[t.element.selectionStart-1].charCodeAt(0)!==o)&&(t.element.value=t.element.value.substring(0,n)+t.element.value.substring(s,t.element.value.length),t.element.setSelectionRange(n,n),isNaN(parseFloat(t.element.value[t.element.selectionStart-1]))&&t.element.selectionStart>0&&t.element.value.length&&t.preventHandler()):isNaN(parseFloat(t.element.value[t.element.selectionStart-2]))&&t.element.selectionStart>1&&45!==t.element.value[t.element.selectionStart-2].charCodeAt(0)&&(a.indexOf(t.element.value[t.element.selectionStart-2])!==a.lastIndexOf(t.element.value[t.element.selectionStart-2])&&t.element.value[t.element.selectionStart-2].charCodeAt(0)===o||t.element.value[t.element.selectionStart-2].charCodeAt(0)!==o)&&(t.element.setSelectionRange(n,n),t.nextEle=t.element.value[t.element.selectionStart],t.cursorPosChanged=!0,t.preventHandler()),!0===t.cursorPosChanged&&t.element.value[t.element.selectionStart]===t.nextEle&&isNaN(parseFloat(t.element.value[t.element.selectionStart-1]))&&(t.element.setSelectionRange(t.element.selectionStart+1,t.element.selectionStart+1),t.cursorPosChanged=!1,t.nextEle=null),""===t.element.value.trim()&&t.element.setSelectionRange(0,0),t.element.selectionStart>0&&(45===t.element.value[t.element.selectionStart-1].charCodeAt(0)&&t.element.selectionStart>1&&((0,e.isNullOrUndefined)(t.prevVal)||(t.element.value=t.prevVal),t.element.setSelectionRange(t.element.selectionStart,t.element.selectionStart)),t.element.value[t.element.selectionStart-1]===l&&0===t.decimals&&t.validateDecimalOnType&&(t.element.value=t.element.value.substring(0,n)+t.element.value.substring(s,t.element.value.length))),t.prevVal=t.element.value}}))},s.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&e.Browser.isDevice&&this.preventHandler();var t=this.instance.getNumberParser({format:"n"})(this.element.value);if(t=null===t||isNaN(t)?null:t,this.hiddenInput.value=t||0===t?t.toString():null,(0,e.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(t){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)&&e.Browser.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==(0,e.getValue)("decimal",(0,e.getNumericObject)(this.locale))&&this.element.value!==(0,e.getValue)("minusSign",(0,e.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:t,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(t){if(!this.readonly)switch(t.keyCode){case 38:t.preventDefault(),this.action(T,t);break;case 40:t.preventDefault(),this.action(L,t)}},s.prototype.performAction=function(t,e,i){(null===t||isNaN(t))&&(t=0);var s=i===T?t+e:t-e;return s=this.correctRounding(t,e,s),this.strictMode?this.trimValue(s):s},s.prototype.correctRounding=function(t,e,i){var s=new RegExp("[,.](.*)"),n=s.test(t.toString()),a=s.test(e.toString());if(n||a){var r=n?s.exec(t.toString())[0].length:0,l=a?s.exec(e.toString())[0].length:0,o=Math.max(r,l);return this.roundValue(i,o)}return i},s.prototype.roundValue=function(t,e){e=e||0;var i=Math.pow(10,e);return t*=i,Math.round(t)/i},s.prototype.updateValue=function(t,e){e&&(this.isInteract=!0),null===t||isNaN(t)||this.decimals&&(t=this.roundNumber(t,this.decimals)),this.inputValue=t,this.changeValue(null===t||isNaN(t)?null:this.strictMode?this.trimValue(t):t),this.isDynamicChange||this.raiseChangeEvent(e)},s.prototype.updateCurrency=function(t,i){(0,e.setValue)(t,i,this.cultureInfo),this.updateValue(this.value)},s.prototype.changeValue=function(t){if(t||0===t){var e=this.getNumberOfDecimals(t);this.setProperties({value:this.roundNumber(t,e)},!0)}else t=null,this.setProperties({value:t},!0);this.modifyText(),this.strictMode||this.validateState()},s.prototype.modifyText=function(){if(this.value||0===this.value){var t=this.formatNumber(),i=this.isFocused?t:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(i),(0,e.attributes)(this.element,{"aria-valuenow":t}),(0,e.isNullOrUndefined)(this.hiddenInput)||(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(e,i){t.setValue(e,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(t){var i,s=new RegExp("[eE][-+]?([0-9]+)"),n=t.toString();if(s.test(n)){var a=s.exec(n);(0,e.isNullOrUndefined)(a)||(n=t.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 t=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(this.value)},s.prototype.trimValue=function(t){return t>this.max?this.max:t<this.min?this.min:t},s.prototype.roundNumber=function(t,e){var i=t,s=e||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(t){return t.preventDefault(),!1},s.prototype.keyPressHandler=function(t){if(!this.enabled||this.readonly)return!0;if(!e.Browser.isDevice&&"11.0"===e.Browser.info.version&&13===t.keyCode){var i=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(i,t),!0}if(0===t.which||t.metaKey||t.ctrlKey||8===t.keyCode||13===t.keyCode)return!0;var s=String.fromCharCode(t.which),n=(0,e.getValue)("decimal",(0,e.getNumericObject)(this.locale)),a="NumpadDecimal"===t.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),t.preventDefault(),t.stopPropagation()}return!0}return t.preventDefault(),t.stopPropagation(),!1},s.prototype.numericRegex=function(){var t=(0,e.getNumericObject)(this.locale),i=(0,e.getValue)("decimal",t),s="*";return"."===i&&(i="\\"+i),0===this.decimals&&this.validateDecimalOnType?H:(this.decimals&&this.validateDecimalOnType&&(s="{0,"+this.decimals+"}"),new RegExp("^\\s*(-)?(((\\d+("+i+"\\d"+s+")?)|("+i+"\\d"+s+")))?$"))},s.prototype.mouseWheel=function(t){var e;t.preventDefault();var i=t;i.wheelDelta?e=i.wheelDelta/120:i.detail&&(e=-i.detail/3),e>0?this.action(T,t):e<0&&this.action(L,t),this.cancelEvent(t)},s.prototype.focusHandler=function(t){var i=this;if(clearTimeout(B),this.focusEventArgs={event:t,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,this.prevValue=this.value,this.value||0===this.value){var s=this.formatNumber();if(this.setElementValue(s),!this.isPrevFocused)if(e.Browser.isDevice||"11.0"!==e.Browser.info.version){var n=e.Browser.isDevice&&e.Browser.isIos?600:0;B=setTimeout((function(){i.element.setSelectionRange(0,s.length)}),n)}else this.element.setSelectionRange(0,s.length)}e.Browser.isDevice||e.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},s.prototype.focusOutHandler=function(t){var i=this;if(this.blurEventArgs={event:t,value:this.value,container:this.container},this.trigger("blur",this.blurEventArgs),this.enabled&&!this.readonly){if(this.isPrevFocused){if(t.preventDefault(),e.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),e.Browser.isDevice||e.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}if((0,e.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(t){var i=this;if(this.isFocused&&(this.isPrevFocused=!0,t.preventDefault()),this.getElementData(t)){this.getElementData(t);var s=t.currentTarget,n=s.classList.contains(w)?T:L;e.EventHandler.add(s,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval((function(){i.isCalled=!0,i.action(n,t)}),150),e.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},s.prototype.touchMoveOnSpinner=function(t){var e;if("touchmove"===t.type){var i=t.touches;e=i.length&&document.elementFromPoint(i[0].pageX,i[0].pageY)}else e=document.elementFromPoint(t.clientX,t.clientY);e.classList.contains(P)||clearInterval(this.timeOut)},s.prototype.mouseUpOnSpinner=function(t){if(this.prevValue=this.value,this.isPrevFocused&&(this.element.focus(),e.Browser.isDevice||(this.isPrevFocused=!1)),e.Browser.isDevice||t.preventDefault(),this.getElementData(t)){var i=t.currentTarget,s=i.classList.contains(w)?T:L;if(e.EventHandler.remove(i,"mouseleave",this.mouseUpClick),this.isCalled||this.action(s,t),this.isCalled=!1,e.EventHandler.remove(document,"mouseup",this.mouseUpClick),(0,e.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(t){return!(t.which&&3===t.which||t.button&&2===t.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},s.prototype.floatLabelTypeUpdate=function(){t.removeFloating(this.inputWrapper);var e=this.hiddenInput;this.hiddenInput.remove(),t.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(e,this.container.childNodes[1])},s.prototype.mouseUpClick=function(t){t.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,this.spinUp&&e.EventHandler.remove(this.spinUp,"mous