PageSourceSearch

https://nutristar.in/cdn/shop/t/2/assets/custom-pagination.aio.min.js?v=50471702352513116901763647884

js nutristar.in collected 2026-09-25 03:12:41 UTC 3,964 bytes, 5 lines download raw bytes

1/*
2Generated time: November 20, 2025 14:11
3This file was created by the app developer. Feel free to contact the original developer with any questions. It was minified (compressed) by AVADA. AVADA do NOT own this script.
4*/
5if(!customElements.get("custom-pagination")){class a extends HTMLElement{constructor(){super(),this.init(),document.addEventListener("on:bfcache:load-restore",this.reload.bind(this))}disconnectedCallback(){this.destroy()}init(){this.infiniteScroll="true"===this.dataset.infiniteScroll,this.pagination=this.querySelector(".js-pagination"),this.loadMoreButton=this.querySelector(".js-pagination-load-more"),this.results=this.querySelectorAll(".js-pagination-result"),this.controller=null,this.resultClickHandler=this.resultClickHandler||this.handleResultClick.bind(this),this.addEventListener("click",this.resultClickHandler),this.loadMoreClickHandler=this.loadMoreClickHandler||this.handleLoadMoreClick.bind(this),this.pagination&&this.pagination.dataset.isMoreResults&&this.results&&(this.loadMoreButton&&this.loadMoreButton.addEventListener("click",this.loadMoreClickHandler),this.infiniteScroll)&&(this.paginationObserver=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?(this.loadMore(),this.intersectingTimer=setInterval(this.loadMore.bind(this),1e3)):this.intersectingTimer&&clearInterval(this.intersectingTimer)})},{rootMargin:1.5*window.innerHeight+"px 0px"}),this.paginationObserver.observe(this.pagination))}destroy(){this.intersectingTimer&&clearInterval(this.intersectingTimer),this.paginationObserver&&this.paginationObserver.disconnect(),this.loadMoreButton&&this.loadMoreButton.removeEventListener("click",this.loadMoreClickHandler),this.removeEventListener("click",this.resultClickHandler),this.loadMoreClickHandler=null}reload(){this.destroy(),this.init()}handleLoadMoreClick(t){t.preventDefault(),this.loadMore()}handleResultClick(t){t.target.closest("a")&&t.target.closest(".js-pagination-result")&&this.controller&&this.controller.abort()}async loadMore(){if(!this.isFetching&&"false"===this.dataset.pauseInfiniteScroll){this.isFetching=!0,this.controller=new AbortController;try{if(!this.loadMoreButton)throw new Error("No 'Load more' button found.");this.loadMoreButton.classList.add("is-loading"),this.loadMoreButton.setAttribute("aria-disabled","true"),"traditional"===this.pagination.dataset.paginationStyle&&this.pagination.classList.add("is-loading");var t=await fetch(this.loadMoreButton.href,{signal:this.controller.signal});if(!t.ok)throw new Error(t.status);if("true"===this.dataset.pauseInfiniteScroll)throw new Error("Infinite scroll was interrupted.");var i=document.createElement("template");i.innerHTML=await t.text();let e="";var n=this.results[this.results.length-1],s=(i.content.querySelectorAll(".js-pagination-result").forEach(t=>{e+=t.outerHTML}),n.insertAdjacentHTML("afterend",e),window.initLazyImages(),this.results=this.querySelectorAll(".js-pagination-result"),i.content.querySelector(".js-pagination"));s.dataset.isMoreResults?(this.pagination.innerHTML=s.innerHTML,this.loadMoreButton&&(this.loadMoreButton.removeEventListener("click",this.loadMoreClickHandler),this.loadMoreButton=this.querySelector(".js-pagination-load-more"),this.loadMoreButton.addEventListener("click",this.loadMoreClickHandler))):(this.pagination.remove(),this.intersectingTimer&&clearInterval(this.intersectingTimer),this.paginationObserver&&this.paginationObserver.disconnect(),document.querySelectorAll(".js-when-paginated-only").forEach(t=>t.remove()))}catch(t){console.log("Unable to fetch next page of results",t),this.intersectingTimer&&clearInterval(this.intersectingTimer)}finally{this.controller=null,this.loadMoreButton&&(this.loadMoreButton.classList.remove("is-loading"),this.loadMoreButton.removeAttribute("aria-disabled")),this.isFetching=!1,"traditional"===this.pagination.dataset.paginationStyle&&this.pagination.classList.remove("is-loading")}}}}customElements.define("custom-pagination",a)}

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.