PageSourceSearch

https://capezio.uk/cdn/shop/t/11/assets/cap-chunk-index-bc9c9ca0.js

js capezio.uk collected 2026-10-09 01:29:12 UTC 2,979 bytes, 1 lines download raw bytes

1const d="overflow-hidden",l=o=>{o.data("facets",c=>({searchParamsPrev:"",initialSearchParam:c,filterData:[],isOpen:!1,loading:!1,swymEventName:"swym:filters-applied",init(){this.searchParamsPrev=window.location.search.slice(1),this.addSwymEvent()},addSwymEvent(){const t=n=>{document.addEventListener(this.swymEventName,()=>{n.initializeActionButtons("#ProductGridContainer")})};window.SwymCallbacks||(window.SwymCallbacks=[]),window.SwymCallbacks.push(t)},reinitStamped(){window.StampedFn&&window.StampedFn.reloadUGC()},openFacets(){document.body.classList.add(d),this.isOpen=!0},closeFacets(){document.body.classList.remove(d),this.isOpen=!1},updateFacets(t){this.loading=!0,this.onSubmitHandler(t)},onSubmitHandler(t){const n=document.querySelectorAll(".facet-form"),e=Array.from(n).map(r=>this.createSearchParams(r));this.initialSearchParam&&e.push(this.initialSearchParam),this.onSubmitForm(e.join("&"),t)},createSearchParams(t){const n=new FormData(t);return new URLSearchParams(n).toString()},onSubmitForm(t,n){this.renderPage(t,n)},renderPage(t,n,e=!0){const r=this.getSections();this.searchParamsPrev=t,r.forEach(i=>{const a=`${window.location.pathname}?section_id=${i.section}&${t}`,s=m=>m.url===a;this.filterData.some(s)?this.renderSectionFromCache(s,n):this.renderSectionFromFetch(a,n)}),e&&this.updateURLHash(t)},renderSectionFromCache(t,n){var r;const e=(r=this.filterData.find(t))==null?void 0:r.html;e&&(this.renderFilters(e,n),this.renderProductCount(e),this.renderProductGridContainer(e),this.$nextTick(()=>{var i;(i=document.getElementById("CollectionContainer"))==null||i.scrollIntoView({behavior:"smooth"}),this.reinitStamped(),document.dispatchEvent(new CustomEvent(this.swymEventName)),this.loading=!1}))},renderSectionFromFetch(t,n){fetch(t).then(e=>e.text()).then(e=>{const r=e;this.filterData=[...this.filterData,{html:r,url:t}],this.renderFilters(r,n),this.renderProductCount(r),this.renderProductGridContainer(r),this.$nextTick(()=>{var i;(i=document.getElementById("CollectionContainer"))==null||i.scrollIntoView({behavior:"smooth"}),this.reinitStamped(),document.dispatchEvent(new CustomEvent(this.swymEventName)),this.loading=!1})})},renderProductGridContainer(t){const n=document.getElementById("ProductGridContainer"),e=new DOMParser().parseFromString(t,"text/html").getElementById("ProductGridContainer");n&&e&&(n.innerHTML=e.innerHTML)},renderProductCount(t){var i;const e=(i=new DOMParser().parseFromString(t,"text/html").getElementById("ProductCount"))==null?void 0:i.innerHTML,r=document.getElementById("ProductCount");r&&e&&(r.innerHTML=e)},renderFilters(t,n){const e=document.getElementById("Facets"),r=new DOMParser().parseFromString(t,"text/html").getElementById("Facets");e&&r&&o.morph(e,r,{})},getSections(){const t=document.getElementById("product-grid");return[{section:t==null?void 0:t.dataset.id}]},updateURLHash(t){history.pushState({searchParams:t},"",`${window.location.pathname}${t&&"?".concat(t)}`)}}))};export{l as default};

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.