1import{isPalm}from"./helperLib.min.js";import BackgroundFocus from"../Components/BackgroundFocus/background-focus.min.js";const lazyBgImgSelector=".js-lazybg",lazyContentImgSelector=".js-lazyimg";export const lazyImageLoader=function(){const t="js-lazy-is-loaded",e=document.querySelectorAll(".js-lazybg"),s=document.querySelectorAll(".js-lazyimg"),n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o=window.matchMedia("print"),r={root:null,rootMargin:"0px",threshold:.1},a=function(e){if(!(e.classList.contains(t)||isPalm()&&e.classList.contains("no-mobile-bg-image"))){if(e.dataset.hasOwnProperty("srcset")){const s=c(e.dataset.srcset.split(", "));e.style.backgroundImage=`url(${s})`,e.classList.add(t)}if(e.dataset.hasOwnProperty("focus"))try{BackgroundFocus.observe(e,JSON.parse(e.dataset.focus))}catch(t){}}},i=function(e){if(e.classList.contains(t))return;const s=e.offsetWidth;if(e.hasAttribute("srcset")&&e.setAttribute("sizes",s+"px"),e.dataset.hasOwnProperty("srcset")){(function(t){const e=[];t.length>0&&t.forEach((function(t){e.push({src:t.substr(0,t.indexOf(" ")),mediaquery:t.substr(t.indexOf(" ")+1)})}))})(e.dataset.srcset.split(", "));e.setAttribute("srcset",e.dataset.srcset),e.setAttribute("sizes",s+"px"),e.classList.add(t)}if(e.dataset.hasOwnProperty("focus"))try{BackgroundFocus.observe(e,JSON.parse(e.dataset.focus))}catch(t){}},c=function(t){let e=null;if(t.length>0){let s=[];t.forEach((function(t){s.push({src:t.substr(0,t.indexOf(" ")),mediaquery:t.substr(t.indexOf(" ")+1)})}));for(let t=0;t<s.length;t++){const n=s[t];if(!(n.mediaquery.length>0)){e=n.src;break}if(window.matchMedia(n.mediaquery).matches){e=n.src;break}}}return e},u=new IntersectionObserver((function(t,e){t.forEach((function(t){t.intersectionRatio>0&&a(t.target)}))}),r),f=new IntersectionObserver((function(t,e){t.forEach((function(t){t.intersectionRatio>0&&i(t.target)}))}),r);return{init:function(){e.forEach((function(t){u.observe(t)})),s.forEach((function(t){f.observe(t)})),window.addEventListener("resize",(function(){document.querySelectorAll("."+t).forEach((function(e){e.classList.remove(t)}))}));const r=function(){e.forEach((function(t){a(t)})),s.forEach((function(t){i(t)}))};n?o.addListener((function(t){t.matches&&r()})):window.onbeforeprint=function(){r()}},loadBgImage:a,loadContentImage:i}}();null!==document.querySelector(".js-lazybg,.js-lazyimg")&&lazyImageLoader.init();
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.