PageSourceSearch

https://www.med24.dk/resources/compiled/js/1790942466/lazysizes.js?c=1EJTO2

js med24.dk collected 2026-10-02 12:08:44 UTC 12,766 bytes, 2 lines download raw bytes

1!function(window,factory){factory=factory(window,window.document);window.lazySizes=factory,"object"==typeof module&&module.exports&&(module.exports=factory)}(window,function(window,document){"use strict";if(document.getElementsByClassName){var lazySizesConfig,running,waiting,firstFns,secondFns,fns,prop,docElem=document.documentElement,Date=window.Date,supportPicture=window.HTMLPictureElement,_addEventListener="addEventListener",_getAttribute="getAttribute",addEventListener=window[_addEventListener],setTimeout=window.setTimeout,requestAnimationFrame=window.requestAnimationFrame||setTimeout,requestIdleCallback=window.requestIdleCallback,regPicture=/^picture$/i,loadEvents=["load","error","lazyincluded","_lazyloaded"],regClassCache={},forEach=Array.prototype.forEach,hasClass=function(ele,cls){return regClassCache[cls]||(regClassCache[cls]=new RegExp("(\\s|^)"+cls+"(\\s|$)")),regClassCache[cls].test(ele[_getAttribute]("class")||"")&&regClassCache[cls]},addClass=function(ele,cls){hasClass(ele,cls)||ele.setAttribute("class",(ele[_getAttribute]("class")||"").trim()+" "+cls)},removeClass=function(ele,cls){(cls=hasClass(ele,cls))&&ele.setAttribute("class",(ele[_getAttribute]("class")||"").replace(cls," "))},addRemoveLoadEvents=function(dom,fn,add){var action=add?_addEventListener:"removeEventListener";add&&addRemoveLoadEvents(dom,fn),loadEvents.forEach(function(evt){dom[action](evt,fn)})},triggerEvent=function(elem,name,detail,noBubbles,noCancelable){var event=document.createEvent("Event");return(detail=detail||{}).instance=lazysizes,event.initEvent(name,!noBubbles,!noCancelable),event.detail=detail,elem.dispatchEvent(event),event},updatePolyfill=function(el,full){var polyfill;!supportPicture&&(polyfill=window.picturefill||lazySizesConfig.pf)?(full&&full.src&&!el[_getAttribute]("srcset")&&el.setAttribute("srcset",full.src),polyfill({reevaluate:!0,elements:[el]})):full&&full.src&&(el.src=full.src)},getCSS=function(elem,style){return(getComputedStyle(elem,null)||{})[style]},getWidth=function(elem,parent,width){for(width=width||elem.offsetWidth;width<lazySizesConfig.minSize&&parent&&!elem._lazysizesWidth;)width=parent.offsetWidth,parent=parent.parentNode;return width},rAF=(secondFns=[],fns=firstFns=[],rafBatch._lsFlush=run,rafBatch),rAFIt=function(fn,simple){return simple?function(){rAF(fn)}:function(){var that=this,args=arguments;rAF(function(){fn.apply(that,args)})}},debounce=function(func){function later(){var last=Date.now()-timestamp;last<99?setTimeout(later,99-last):(requestIdleCallback||run)(run)}var timeout,timestamp,run=function(){timeout=null,func()};return function(){timestamp=Date.now(),timeout=timeout||setTimeout(later,99)}},lazySizesDefaults={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(prop in lazySizesConfig=window.lazySizesConfig||window.lazysizesConfig||{},lazySizesDefaults)prop in lazySizesConfig||(lazySizesConfig[prop]=lazySizesDefaults[prop]);window.lazySizesConfig=lazySizesConfig,setTimeout(function(){lazySizesConfig.init&&init()});var autosizesElems,sizeElement,debouncedUpdateElementsSizes,lazysizes,loader=function(){function resetPreloading(e){isLoading--,e&&e.target&&addRemoveLoadEvents(e.target,resetPreloading),e&&!(isLoading<0)&&e.target||(isLoading=0)}function checkElements(){var eLlen,i,rect,autoLoadElem,loadedSomething,elemExpand,elemNegativeExpand,elemExpandVal,beforeExpandVal,lazyloadElems=lazysizes.elements;if((loadMode=lazySizesConfig.loadMode)&&isLoading<8&&(eLlen=lazyloadElems.length)){i=0,lowRuns++,null==preloadExpand&&("expand"in lazySizesConfig||(lazySizesConfig.expand=500<docElem.clientHeight&&500<docElem.clientWidth?500:370),defaultExpand=lazySizesConfig.expand,preloadExpand=defaultExpand*lazySizesConfig.expFactor),currentExpand<preloadExpand&&isLoading<1&&2<lowRuns&&2<loadMode&&!document.hidden?(currentExpand=preloadExpand,lowRuns=0):currentExpand=1<loadMode&&1<lowRuns&&isLoading<6?defaultExpand:0;for(;i<eLlen;i++)if(lazyloadElems[i]&&!lazyloadElems[i]._lazyRace)if(supportScroll)if(beforeExpandVal!==(elemExpand=(elemExpandVal=lazyloadElems[i][_getAttribute]("data-expand"))&&(elemE
1xpand=+elemExpandVal)?elemExpand:currentExpand)&&(eLvW=innerWidth+elemExpand*hFac,elvH=innerHeight+elemExpand,elemNegativeExpand=-1*elemExpand,beforeExpandVal=elemExpand),rect=lazyloadElems[i].getBoundingClientRect(),(eLbottom=rect.bottom)>=elemNegativeExpand&&(eLtop=rect.top)<=elvH&&(eLright=rect.right)>=elemNegativeExpand*hFac&&(eLleft=rect.left)<=eLvW&&(eLbottom||eLright||eLleft||eLtop)&&(lazySizesConfig.loadHidden||"hidden"!=getCSS(lazyloadElems[i],"visibility"))&&(isCompleted&&isLoading<3&&!elemExpandVal&&(loadMode<3||lowRuns<4)||function(elem,elemExpand){var outerRect,parent=elem,visible="hidden"==getCSS(document.body,"visibility")||"hidden"!=getCSS(elem.parentNode,"visibility")&&"hidden"!=getCSS(elem,"visibility");for(eLtop-=elemExpand,eLbottom+=elemExpand,eLleft-=elemExpand,eLright+=elemExpand;visible&&(parent=parent.offsetParent)&&parent!=document.body&&parent!=docElem;)(visible=0<(getCSS(parent,"opacity")||1))&&"visible"!=getCSS(parent,"overflow")&&(outerRect=parent.getBoundingClientRect(),visible=eLright>outerRect.left&&eLleft<outerRect.right&&eLbottom>outerRect.top-1&&eLtop<outerRect.bottom+1);return visible}(lazyloadElems[i],elemExpand))){if(unveilElement(lazyloadElems[i]),loadedSomething=!0,9<isLoading)break}else!loadedSomething&&isCompleted&&!autoLoadElem&&isLoading<4&&lowRuns<4&&2<loadMode&&(preloadElems[0]||lazySizesConfig.preloadAfterLoad)&&(preloadElems[0]||!elemExpandVal&&(eLbottom||eLright||eLleft||eLtop||"auto"!=lazyloadElems[i][_getAttribute](lazySizesConfig.sizesAttr)))&&(autoLoadElem=preloadElems[0]||lazyloadElems[i]);else unveilElement(lazyloadElems[i]);autoLoadElem&&!loadedSomething&&unveilElement(autoLoadElem)}}var preloadElems,isCompleted,resetPreloadingTimer,loadMode,started,eLvW,elvH,eLtop,eLleft,eLright,eLbottom,defaultExpand,preloadExpand,hFac,fn,running,lastTime,gDelay,rICTimeout,idleCallback,regImg=/^img$/i,regIframe=/^iframe$/i,supportScroll="onscroll"in window&&!/(gle|ing)bot/.test(navigator.userAgent),currentExpand=0,isLoading=0,lowRuns=-1,throttledCheckElements=(fn=checkElements,lastTime=0,gDelay=lazySizesConfig.throttleDelay,rICTimeout=lazySizesConfig.ricTimeout,idleCallback=requestIdleCallback&&49<rICTimeout?function(){requestIdleCallback(run,{timeout:rICTimeout}),rICTimeout!==lazySizesConfig.ricTimeout&&(rICTimeout=lazySizesConfig.ricTimeout)}:rAFIt(function(){setTimeout(run)},!0),function(isPriority){var delay;(isPriority=!0===isPriority)&&(rICTimeout=33),running||(running=!0,(delay=gDelay-(Date.now()-lastTime))<0&&(delay=0),isPriority||delay<9?idleCallback():setTimeout(idleCallback,delay))});function run(){running=!1,lastTime=Date.now(),fn()}function switchLoadingClass(e){addClass(e.target,lazySizesConfig.loadedClass),removeClass(e.target,lazySizesConfig.loadingClass),addRemoveLoadEvents(e.target,rafSwitchLoadingClass),triggerEvent(e.target,"lazyloaded")}function handleSources(source){var customMedia,sourceSrcset=source[_getAttribute](lazySizesConfig.srcsetAttr);(customMedia=lazySizesConfig.customMedia[source[_getAttribute]("data-media")||source[_getAttribute]("media")])&&source.setAttribute("media",customMedia),sourceSrcset&&source.setAttribute("srcset",sourceSrcset)}function onload(){var afterScroll;isCompleted||(Date.now()-started<999?setTimeout(onload,999):(afterScroll=debounce(function(){lazySizesConfig.loadMode=3,throttledCheckElements()}),isCompleted=!0,lazySizesConfig.loadMode=3,throttledCheckElements(),addEventListener("scroll",function(){3==lazySizesConfig.loadMode&&(lazySizesConfig.loadMode=2),afterScroll()},!0)))}var rafedSwitchLoadingClass=rAFIt(switchLoadingClass),rafSwitchLoadingClass=function(e){rafedSwitchLoadingClass({target:e.target})},lazyUnveil=rAFIt(function(elem,detail,isAuto,sizes,isImg){var parent,isPicture,event,firesLoad;(event=triggerEvent(elem,"lazybeforeunveil",detail)).defaultPrevented||(sizes&&(isAuto?addClass(elem,lazySizesConfig.autosizesClass):elem.setAttribute("sizes",sizes)),isAuto=elem[_getAttribute](lazySizesConfig.srcsetAttr),sizes=elem[_getAttribute](lazySizesConfig.srcAttr),isImg&&(isPicture=(parent=elem.parentNode)&&regPicture.test(parent.nodeName||"")),firesLoad=detail.firesLoad||"src"in elem&&(isAuto||sizes||isPicture),event={target:elem},firesLoad&&(addRemoveLoadEvents(elem,resetPreloading,!0),clearTimeout(resetPreloadingTimer),resetPreloadingTimer=setTimeout(resetPreloading,2500),addClass(elem,lazySizesConfig.loadingClass),addRemoveLoadEvents(elem,rafSwitchLoadingClass,!0)),isPicture&&forEac
1h.call(parent.getElementsByTagName("source"),handleSources),isAuto?elem.setAttribute("srcset",isAuto):sizes&&!isPicture&&(regIframe.test(elem.nodeName)?function(elem,src){try{elem.contentWindow.location.replace(src)}catch(e){elem.src=src}}(elem,sizes):elem.src=sizes),isImg&&(isAuto||isPicture)&&updatePolyfill(elem,{src:sizes})),elem._lazyRace&&delete elem._lazyRace,removeClass(elem,lazySizesConfig.lazyClass),rAF(function(){(!firesLoad||elem.complete&&1<elem.naturalWidth)&&(firesLoad?resetPreloading(event):isLoading--,switchLoadingClass(event))},!0)}),unveilElement=function(elem){var detail,isImg=regImg.test(elem.nodeName),sizes=isImg&&(elem[_getAttribute](lazySizesConfig.sizesAttr)||elem[_getAttribute]("sizes")),isAuto="auto"==sizes;(!isAuto&&isCompleted||!isImg||!elem[_getAttribute]("src")&&!elem.srcset||elem.complete||hasClass(elem,lazySizesConfig.errorClass)||!hasClass(elem,lazySizesConfig.lazyClass))&&(detail=triggerEvent(elem,"lazyunveilread").detail,isAuto&&autoSizer.updateElem(elem,!0,elem.offsetWidth),elem._lazyRace=!0,isLoading++,lazyUnveil(elem,detail,isAuto,sizes,isImg))};return{_:function(){started=Date.now(),lazysizes.elements=document.getElementsByClassName(lazySizesConfig.lazyClass),preloadElems=document.getElementsByClassName(lazySizesConfig.lazyClass+" "+lazySizesConfig.preloadClass),hFac=lazySizesConfig.hFac,addEventListener("scroll",throttledCheckElements,!0),addEventListener("resize",throttledCheckElements,!0),window.MutationObserver?new MutationObserver(throttledCheckElements).observe(docElem,{childList:!0,subtree:!0,attributes:!0}):(docElem[_addEventListener]("DOMNodeInserted",throttledCheckElements,!0),docElem[_addEventListener]("DOMAttrModified",throttledCheckElements,!0),setInterval(throttledCheckElements,999)),addEventListener("hashchange",throttledCheckElements,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(name){document[_addEventListener](name,throttledCheckElements,!0)}),/d$|^c/.test(document.readyState)?onload():(addEventListener("load",onload),document[_addEventListener]("DOMContentLoaded",throttledCheckElements),setTimeout(onload,2e4)),lazysizes.elements.length?(checkElements(),rAF._lsFlush()):throttledCheckElements()},checkElems:throttledCheckElements,unveil:unveilElement}}(),autoSizer=(sizeElement=rAFIt(function(elem,parent,event,width){var sources,i,len;if(elem._lazysizesWidth=width,elem.setAttribute("sizes",width+="px"),regPicture.test(parent.nodeName||""))for(i=0,len=(sources=parent.getElementsByTagName("source")).length;i<len;i++)sources[i].setAttribute("sizes",width);event.detail.dataAttr||updatePolyfill(elem,event.detail)}),{_:function(){autosizesElems=document.getElementsByClassName(lazySizesConfig.autosizesClass),addEventListener("resize",debouncedUpdateElementsSizes)},checkElems:debouncedUpdateElementsSizes=debounce(function(){var i,len=autosizesElems.length;if(len)for(i=0;i<len;i++)getSizeElement(autosizesElems[i])}),updateElem:getSizeElement}),init=function(){init.i||(init.i=!0,autoSizer._(),loader._())};return lazysizes={cfg:lazySizesConfig,autoSizer:autoSizer,loader:loader,init:init,uP:updatePolyfill,aC:addClass,rC:removeClass,hC:hasClass,fire:triggerEvent,gW:getWidth,rAF:rAF}}function run(){var runFns=fns;for(fns=firstFns.length?secondFns:firstFns,waiting=!(running=!0);runFns.length;)runFns.shift()();running=!1}function rafBatch(fn,queue){running&&!queue?fn.apply(this,arguments):(fns.push(fn),waiting||(waiting=!0,(document.hidden?setTimeout:requestAnimationFrame)(run)))}function getSizeElement(elem,dataAttr,width){var parent=elem.parentNode;parent&&(width=getWidth(elem,parent,width),(dataAttr=triggerEvent(elem,"lazybeforesizes",{width:width,dataAttr:!!dataAttr})).defaultPrevented||(width=dataAttr.detail.width)&&width!==elem._lazysizesWidth&&sizeElement(elem,parent,dataAttr,width))}});
2//# sourceMappingURL=/resources/compiled/js/lazysizes.js.map

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.