PageSourceSearch

https://www.emmerdalevillagetour.co.uk/app/brands/emmerdale/7331.3ccdc1ff469d7be5bb3c.js

js emmerdalevillagetour.co.uk collected 2026-10-04 13:25:20 UTC 7,108 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkloop_web=globalThis.webpackChunkloop_web||[]).push([[7331],{7331(t,e,i){i.r(e),i.d(e,{createFrom:()=>x});var s=i(8300);const o={responsive:!0,breakpointCols:{"min-width: 1500px":6,"min-width: 1200px":5,"min-width: 992px":4,"min-width: 768px":3,"min-width: 576px":2},numCols:4};let r=null,n={},a=[];function h(){a.forEach(function(t){d(t)})}function l(){r&&window.cancelAnimationFrame(r),r=window.requestAnimationFrame(function(){f()})}function d(t){if(u()<2)return void t.style.removeProperty("height");let e=[];Array.from(t.children).forEach(function(t){if(t.classList.contains("flexmasonry-break"))return;const i=window.getComputedStyle(t),s=i.getPropertyValue("order"),o=i.getPropertyValue("height");e[s-1]||(e[s-1]=0),e[s-1]+=Math.ceil(parseFloat(o))});const i=Math.max(...e);t.style.height=i+"px"}function m(t){const e=t.querySelectorAll(".flexmasonry-break");if(Array.from(e).length!==u()-1)for(let e=1;e<u();e++){const i=document.createElement("div");i.classList.add("flexmasonry-break"),i.classList.add("flexmasonry-break-"+e),t.appendChild(i)}}function c(t){t.classList.contains("flexmasonry-cols-"+u())||(t.className=t.className.replace(/(flexmasonry-cols-\d+)/,""),t.classList.add("flexmasonry-cols-"+u()))}function u(){if(!n.responsive)return n.numCols;const t=Object.keys(n.breakpointCols);for(const e of t)if(window.matchMedia("("+e+")").matches)return n.breakpointCols[e];return 1}function g(t,e={}){return n=Object.assign(o,e),c(t),function(t){const e=t.querySelectorAll(".flexmasonry-break");Array.from(e).length!==u()-1&&Array.from(e).forEach(function(t){t.parentNode.removeChild(t)})}(t),m(t),d(t),this}function f(t={}){return a.forEach(function(e){g(e,t)}),this}const p={init:function(t,e={}){return a="string"==typeof t?document.querySelectorAll(t):t,n=Object.assign(o,e),a.forEach(function(t){!function(t){t.classList.add("flexmasonry"),n.responsive&&t.classList.add("flexmasonry-responsive");c(t),Array.from(t.children).forEach(function(t){t.classList.add("flexmasonry-item")}),m(t)}(t),d(t)}),window.addEventListener("load",h),window.addEventListener("resize",l),this},refresh:g,refreshAll:f,destroyAll:function(){window.removeEventListener("load",h),window.removeEventListener("resize",l)}},y=window.masonryGalleryEndpoint;class w{constructor(t){this.el=t,this.width=0,this.grid=this.el.querySelector(".masonry-gallery--grid"),this.focusIndex=0,this.maxItems=0;let e=this.el.dataset.maxItems;if(void 0!==e&&(this.maxItems=parseInt(e)),this.items=[],this.moreButton=this.el.querySelector(".masonry-gallery--control button"),null!=this.grid&&(this.initItems=this.grid.querySelectorAll(".masonry-gallery--grid--item a"),this.itemsCount=this.initItems.length,this.imageIds=this.el.dataset.imageIds,this.page=1,this.pageSize=this.el.dataset.pageSize,this.itemsCount>0)){p.init([this.grid],{responsive:!0,breakpointCols:{"min-width: 1200px":6,"min-width: 992px":5,"min-width: 768px":4,"min-width: 576px":3,"min-width: 320px":2}}),this.addItems(this.initItems),this.updateMoreButton(!1),this.moreButton.onclick=()=>{this.updateMoreButton(!0),this.loadMore()},this.grid.querySelectorAll(".masonry-gallery--grid--item a img").forEach(t=>{t.addEventListener("load",()=>{p.refresh(this.grid)})}),this.ro=new ResizeObserver(t=>{for(let e of t){const t=e.contentRect;t.width!=this.width&&(this.width=t.width,p.refresh(this.grid))}}),this.ro.observe(this.el),this.grid.addEventListener("keydown",t=>{this.keyControl(t)})}}updateMoreButton(t){t?this.moreButton.setAttribute("disabled",!0):0==this.maxItems||this.maxItems>0&&this.itemsCount<this.maxItems?(this.moreButton.classList.remove("hidden"),this.moreButton.removeAttribute("disabled")):this.maxItems>0&&this.itemsCount>=this.maxItems&&(this.moreButton.classList.add("hidden"),this.moreButton.setAttribute("disabled",!0))}loadMore(){let t=window.scrollY,e=this.itemsCount;this.page=this.page+1,async function(t,e,i){var s={masonryRequest:{PageSize:e,Ids:t.split(","),Page:i}};return await(await window.fetch(y,{method:"POST",headers:{Accept:"application/json","Content-type":"application/json"},mode:"cors",body:JSON.stringify(s.masonryRequest)})).text()}(this.imageIds,this.pageSize,this.page).then(i=>{let s=document.createElement("div");s.innerHTML=i;let o=s.querySelectorAll(".flexmasonry-item"),r=this.grid.querySelector(".flexmasonry-break-1");o.forEach(t=>{null!=r?this.grid.insertBefore(t,r):this.grid.appendChild(t)}),s=null,p.refresh(this.grid),window.scrollTo(0,t),this.grid.querySelectorAll(".masonry-gallery--grid--item a:not(.parsed) img").forEach(t=>{t.addEventListener("load",()=>{p.refresh(this.grid)})});let n=this.grid.querySelectorAll(".masonry-gallery--grid--item a:not(.parsed)");this.addItems(n),this.itemsCount=this.grid.querySelectorAll(".flexmasonry-item").length,this.updateMoreButton(!1),this.items[e].obj.focus()})}keyControl(t){let e=1;this.grid.classList.contains("flexmasonry-cols-6")?e=6:this.grid.classList.contains("flexmasonry-cols-5")?e=5:this.grid.classList.contains("flexmasonry-cols-4")?e=4:this.grid.classList.contains("flexmasonry-cols-3")?e=3:this.grid.classList.contains("flexmasonry-cols-2")&&(e=2);let i=this.focusIndex;switch(t.key){case"Left":case"ArrowLeft":t.preventDefault(),i-=1,i<0&&(i=this.itemsCount-1);break;case"Right":case"ArrowRight":t.preventDefault(),i+=1,i>=this.itemsCount&&(i=0);break;case"Up":case"ArrowUp":t.preventDefault(),i-=e,i<0&&(i=this.itemsCount+i);break;case"Down":case"ArrowDown":t.preventDefault(),i+=e,i>=this.itemsCount&&(i=0)}i!=this.focusIndex&&this.items[i].obj.focus()}addItems(t){[...t].forEach(t=>{let e=t.dataset.pswpWidth,i=t.dataset.pswpHeight;this.items.push({obj:t,src:t.getAttribute("href"),width:parseFloat(e)>0?parseFloat(e):0,height:parseFloat(i)>0?parseFloat(i):0,alt:t.querySelector("figcaption").innerText});let s=this.items.length-1;s>0&&t.setAttribute("tabIndex","-1"),t.onfocus=()=>{this.focusIndex=s},this.imageSizesOkay=this.items[s].width>0&&this.items[s].height>0;let o=this;
1t.onclick=t=>{t.stopPropagation(),t.preventDefault(),o.imageSizesOkay?this.createLightbox(s):o.getImageDimensions(s)},t.classList.add("parsed")})}getImageDimensions(t){if(0==this.items[t].width||0==this.items[t].height){this.items[t].image=new Image,this.items[t].image.onload=()=>{this.imageLoaded(t,!0)},this.items[t].image.src=this.items[t].src}else this.createLightbox(t);for(var e=0;e<this.items.length;e++)if(e!==t&&(0==this.items[e].width||0==this.items[e].height)){let t=e;this.items[e].image=new Image,this.items[e].image.onload=()=>{this.imageLoaded(t,!1)},this.items[e].image.src=this.items[e].src}}imageLoaded(t,e){let i=this.items[t].image.width,o=this.items[t].image.height;this.items[t].width=i,this.items[t].height=o,e?(this.lightbox=new s.A({dataSource:this.items,loop:this.loop,index:t}),this.lightbox.init()):(this.lightbox.options.dataSource[t].width=i,this.lightbox.options.dataSource[t].height=o,this.lightbox.refreshSlideContent(t))}createLightbox(t){this.lightbox=new s.A({dataSource:this.items,loop:this.loop,index:t}),this.lightbox.init()}}function x(t){t.forEach(t=>{1===t.nodeType&&new w(t)})}}}]);

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.