PageSourceSearch

https://heraclothing.com/cdn/shop/t/826/assets/ajaxinate.js?v=6361648841330762391791274306

js heraclothing.com collected 2026-10-06 21:54:39 UTC 5,222 bytes, 16 lines download raw bytes

1"use strict";/* ===================================================================================== @preserve =
2 ___  _   _    _
3/   || | | |  | |
4\__  | | | |  | |  __
5/    |/  |/_) |/  /  \_/\/
6\___/|__/| \_/|__/\__/  /\_/
7              |\
8              |/
9Ajaxinate
10version v2.0.4
11https://github.com/Elkfox/Ajaxinate
12Copyright (c) 2017 Elkfox Co Pty Ltd
13https://elkfox.com
14MIT License
15================================================================================================= */var Ajaxinate=function(config){var settings=config||{},defaultSettings={method:"scroll",container:"#product-grid",pagination:"#ProductGridPagination",offset:100,callback:adilTrigger};function adilTrigger(){document.querySelectorAll("desktop-variant-selector").forEach(button=>{button.addEventListener("click",function(event){event.stopPropagation(),document.querySelectorAll(".product-add-form").forEach(div=>{div.classList.remove("show")});const target=this.parentElement.querySelector(".product-add-form");target&&target.classList.add("show")})}),document.querySelectorAll(".product-add-form").forEach(form=>{form.addEventListener("click",function(event){event.stopPropagation()})}),document.addEventListener("click",function(){document.querySelectorAll(".product-add-form").forEach(div=>{div.classList.remove("show")})})}this.settings=Object.assign(defaultSettings,settings),this.addScrollListeners=this.addScrollListeners.bind(this),this.addClickListener=this.addClickListener.bind(this),this.checkIfPaginationInView=this.checkIfPaginationInView.bind(this),this.stopMultipleClicks=this.stopMultipleClicks.bind(this),this.removeClickListener=this.removeClickListener.bind(this),this.removeScrollListener=this.removeScrollListener.bind(this),this.destroy=this.destroy.bind(this),this.containerElement=document.querySelector(this.settings.container),this.paginationElement=document.querySelector(this.settings.pagination),this.initialize()};Ajaxinate.prototype.initialize=function(){if(this.containerElement){var initializers={click:this.addClickListener,scroll:this.addScrollListeners};initializers[this.settings.method]()}},Ajaxinate.prototype.addScrollListeners=function(){this.paginationElement&&(document.addEventListener("scroll",this.checkIfPaginationInView),window.addEventListener("resize",this.checkIfPaginationInView),window.addEventListener("orientationchange",this.checkIfPaginationInView))},Ajaxinate.prototype.addClickListener=function(){this.paginationElement&&(this.nextPageLinkElement=this.paginationElement.querySelector("a"),this.clickActive=!0,typeof this.nextPageLinkElement<"u"&&this.nextPageLinkElement!==null&&this.nextPageLinkElement.addEventListener("click",this.stopMultipleClicks))},Ajaxinate.prototype.stopMultipleClicks=function(event){event.preventDefault(),this.clickActive&&(this.nextPageUrl=this.nextPageLinkElement.href,this.clickActive=!1,this.loadMore())},Ajaxinate.prototype.checkIfPaginationInView=function(){var top=this.paginationElement.getBoundingClientRect().top-this.settings.offset,bottom=this.paginationElement.getBoundingClientRect().bottom+this.settings.offset;this.paginationElement.querySelector(".hera-spinner").classList.add("hidden"),top<=window.innerHeight&&bottom>=0&&(this.paginationElement.querySelector(".hera-spinner").classList.remove("hidden"),this.nextPageLinkElement=this.paginationElement.querySelector("a"),this.removeScrollListener(),this.nextPageLinkElement&&(this.nextPageUrl=this.nextPageLinkElement.href,this.loadMore()))},Ajaxinate.prototype.loadMore=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){if(this.request.readyState===4&&this.request.status===200){var newContainer=this.request.responseXML.querySelectorAll(this.settings.container)[0],newPagination=this.request.responseXML.querySelectorAll(this.settings.pagination)[0];this.containerElement.insertAdjacentHTML("beforeend",newContainer.innerHTML),this.paginationElement.innerHTML=newPagination.innerHTML,this.settings.callback&&typeof this.settings.callback=="function"&&this.settings.callback(this.request.responseXML),this.initialize(),document.dispatchEvent(new CustomEvent("swym:collections-loaded")),yotpoWidgetsContainer.initWidgets(),document.querySelectorAll(".thumbs-carousel").forEach(carousel=>{new Swiper(carousel,{loop:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0},slidesPerView:1,spaceBetween:10})})}}.bind(this),this.request.open("GET",this.nextPageUrl),this.request.responseType="document",this.request.send()},Ajaxinate.prototype.removeClickListener=function(){this.nextPageLinkElement.removeEventListener("click",this.stopMultipleClicks)},Ajaxinate.prototype.removeScrollListener=function(){document.removeEventListener("scroll",this.checkIfPaginationInView),window.removeEventListener("resize",this.checkIfPaginationInView),window.removeEventListener("orientationchange",this.checkIfPaginationInView)},Ajaxinate.prototype.destroy=function(){var destroyers={click:this.removeClickListener,scroll:this.removeScrollListener};return destroyers[this.settings.method](),this};
16//# sourceMappingURL=/cdn/shop/t/826/assets/ajaxinate.js.map?v=6361648841330762391791274306

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.