const input = document.querySelector('input');
input.addEventListener('input', (event) => {
const value = event.target.value
.replace(/^\+?[78]/, '')
.replace(/[^0-9]/g, '')
.slice(0, 10);
event.target.value = value;
});
IMask(document.querySelector('input'), { mask: '000 000 00 00' });