1document.addEventListener('DOMContentLoaded', () => { 2 const searchPlace = document.querySelector('.search-place'); 3 const searchForm = document.querySelector('.search-form'); 4 const searchInput = document.querySelector('.search-bar'); 5 let isInputFocused = false; 6 7 searchPlace.addEventListener('mouseenter', () => { 8 searchPlace.style.display = 'none'; 9 searchForm.style.display = 'flex'; 10 }); 11 12 searchInput.addEventListener('focus', () => { 13 isInputFocused = true; 14 }); 15 16 searchInput.addEventListener('blur', () => { 17 isInputFocused = false; 18 }); 19 20 searchForm.addEventListener('mouseleave', () => { 21 if (!isInputFocused) { 22 searchForm.style.display = 'none'; 23 searchPlace.style.display = 'flex'; 24 } 25 }); 26 27 document.addEventListener('click', (event) => { 28 if (!searchForm.contains(event.target) && !searchPlace.contains(event.target)) { 29 searchForm.style.display = 'none'; 30 searchPlace.style.display = 'flex'; 31 } 32 }); 33}); 34require(['Magento_Customer/js/customer-data'], function (customerData) { 35 customerData.getInitCustomerData().done(function () { 36 const sections = ['cart']; 37 customerData.invalidate(sections); 38 customerData.reload(sections, true).done(function (data) { 39 }); 40 }); 41});
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.