document.addEventListener("DOMContentLoaded",function(){(()=>{const a=document.querySelector("#formAuthentication");a&&typeof FormValidation<"u"&&FormValidation.formValidation(a,{fields:{username:{validators:{notEmpty:{message:"Please enter username"},stringLength:{min:6,message:"Username must be more than 6 characters"}}},email:{validators:{notEmpty:{message:"Please enter your email"},emailAddress:{message:"Please enter a valid email address"}}},"email-username":{validators:{notEmpty:{message:"Please enter email / username"},stringLength:{min:6,message:"Username must be more than 6 characters"}}},password:{validators:{notEmpty:{message:"Please enter your password"},stringLength:{min:6,message:"Password must be more than 6 characters"}}},"confirm-password":{validators:{notEmpty:{message:"Please confirm password"},identical:{compare:()=>a.querySelector('[name="password"]').value,message:"The password and its confirmation do not match"},stringLength:{min:6,message:"Password must be more than 6 characters"}}},terms:{validators:{notEmpty:{message:"Please agree to terms & conditions"}}}},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},init:e=>{e.on("plugins.message.placed",t=>{t.element.parentElement.classList.contains("input-group")&&t.element.parentElement.insertAdjacentElement("afterend",t.messageElement)})}});const s=document.querySelectorAll(".numeral-mask"),n=e=>e.replace(/\D/g,"");s.length>0&&s.forEach(e=>{e.addEventListener("input",t=>{e.value=n(t.target.value)})})})()});
