document.addEventListener("DOMContentLoaded",function(){{var e=document.querySelector(".numeral-mask-wrapper");let o=document.querySelector("#twoStepsForm");if(e&&Array.from(e.children).forEach(t=>{t.addEventListener("keyup",e=>{/^\d$/.test(e.key)?t.nextElementSibling&&t.value.length===parseInt(t.getAttribute("maxlength"))&&t.nextElementSibling.focus():"Backspace"===e.key&&t.previousElementSibling&&t.previousElementSibling.focus()}),t.addEventListener("keypress",e=>{"-"===e.key&&e.preventDefault()})}),o){let e=o.querySelectorAll(".numeral-mask"),t=()=>{let t=!0,n="";e.forEach(e=>{""===e.value&&(t=!1),n+=e.value}),o.querySelector('[name="otp"]').value=t?n:""};e.forEach(e=>{e.addEventListener("keyup",t)}),"undefined"!=typeof FormValidation&&FormValidation.formValidation(o,{fields:{otp:{validators:{notEmpty:{message:"Please enter OTP"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap5:new FormValidation.plugins.Bootstrap5({eleValidClass:"",rowSelector:".form-control-validation"}),submitButton:new FormValidation.plugins.SubmitButton,defaultSubmit:new FormValidation.plugins.DefaultSubmit,autoFocus:new FormValidation.plugins.AutoFocus}})}}});