1(function(){function digitsOnly(value){return(value||'').replace(/\D/g,'')} 2function formatLocalPhone(value){var digits=digitsOnly(value).slice(0,15);if(digits.length<=3){return digits} 3if(digits.length<=6){return'('+digits.slice(0,3)+') '+digits.slice(3)} 4return'('+digits.slice(0,3)+') '+digits.slice(3,6)+'-'+digits.slice(6)} 5function formatInternationalPhone(value){var cleaned=(value||'').replace(/[^\d+\-\(\)\.\s]/g,'');cleaned=cleaned.replace(/(?!^)\+/g,'');return cleaned.slice(0,25)} 6function handlePhoneMask(event){var input=event.target;if(!input||input.tagName!=='INPUT'){return} 7if(!input.classList.contains('sws-rcp-field-type-phone')){return} 8var mode=input.getAttribute('data-sws-rcp-phone-mask')||'local';if(mode==='international'){input.value=formatInternationalPhone(input.value);return} 9input.value=formatLocalPhone(input.value)} 10document.addEventListener('input',handlePhoneMask,!1)})()
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.