{"version":3,"file":"lazyBackgroundLoader.js","mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,EACvE,CACA,CATD,CASGC,MAAM,I,gLCTHC,EAAAA,WACJ,WAAYC,I,4FAAS,SACnBF,KAAKE,QAAUA,EACfF,KAAKG,MACN,C,2CAED,WAAO,WACD,yBAA0BC,QAC5BJ,KAAKK,SAAW,IAAIC,sBAAqB,SAACC,GACxCA,EAAQC,SAAQ,SAACC,GACXA,EAAMC,iBACR,EAAKC,oBAAoBF,EAAMG,QAC/B,EAAKP,SAASQ,UAAUJ,EAAMG,QAEjC,GACF,IAEDZ,KAAKK,SAASS,QAAQd,KAAKE,UAG3BF,KAAKW,oBAAoBX,KAAKE,QAEjC,G,iCAED,SAAoBA,GAClB,IAAMa,EAAWb,EAAQc,aAAa,eAClCD,IACFb,EAAQe,MAAMC,gBAAd,eAAwCH,EAAxC,MAEH,M,gFA7BGd,G,OAgCNkB,SAASC,iBAAiB,iBAAiBZ,SAAQ,SAAAN,GAClD,IAAID,EAAqBC,EACzB,I","sources":["webpack://octopus.public.web/webpack/universalModuleDefinition","webpack://octopus.public.web/./Assets/js/lazyBackgroundLoader.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, () => {\nreturn ","class LazyBackgroundLoader {\n constructor(element) {\n this.element = element;\n this.init();\n }\n\n init() {\n if (\"IntersectionObserver\" in window) {\n this.observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n this.loadBackgroundImage(entry.target);\n this.observer.unobserve(entry.target);\n }\n });\n });\n\n this.observer.observe(this.element);\n } else {\n // Fallback for browsers that do not support IntersectionObserver\n this.loadBackgroundImage(this.element);\n }\n }\n\n loadBackgroundImage(element) {\n const imageUrl = element.getAttribute(\"data-bg-url\");\n if (imageUrl) {\n element.style.backgroundImage = `url('${imageUrl}')`;\n }\n }\n}\n\ndocument.querySelectorAll('[data-bg-url]').forEach(element => {\n\tnew LazyBackgroundLoader(element);\n});"],"names":["root","factory","exports","module","define","amd","a","i","this","LazyBackgroundLoader","element","init","window","observer","IntersectionObserver","entries","forEach","entry","isIntersecting","loadBackgroundImage","target","unobserve","observe","imageUrl","getAttribute","style","backgroundImage","document","querySelectorAll"],"sourceRoot":""}