1(function(){"use strict";const imageLoads=new WeakMap;function loadDemandImage(img){if(!img||img.tagName!=="IMG")return Promise.resolve(!0);if(imageLoads.has(img))return imageLoads.get(img);const promise=new Promise(resolve=>{let settled=!1;const finish=ok=>{settled||(settled=!0,clearTimeout(timeout),img.removeEventListener("load",loaded),img.removeEventListener("error",failed),resolve(ok))},loaded=()=>{img.decode?img.decode().then(()=>finish(!0),()=>finish(img.naturalWidth>0)):finish(img.naturalWidth>0)},failed=()=>finish(!1),timeout=setTimeout(()=>finish(!1),15e3);img.addEventListener("load",loaded),img.addEventListener("error",failed),img.loading="eager";const picture=img.closest("picture");picture&&picture.querySelectorAll("source[data-demand-srcset]").forEach(source=>{source.srcset=source.dataset.demandSrcset}),img.dataset.demandSrcset&&(img.srcset=img.dataset.demandSrcset),img.dataset.demandSrc&&(img.src=img.dataset.demandSrc),img.complete&&img.naturalWidth>0&&loaded()});return imageLoads.set(img,promise),promise.then(()=>imageLoads.delete(img)),promise}document.querySelectorAll("[data-ps-section]").forEach(initShowcase),document.addEventListener("shopify:section:load",function(event){event.target.querySelectorAll("[data-ps-section]").forEach(initShowcase)});function initShowcase(section){if(section.dataset.psInitialized)return;section.dataset.psInitialized="true";var stages=section.querySelectorAll(".ps-product-stage"),railRows=section.querySelectorAll(".ps-rail__row"),counter=section.querySelector(".ps-hint__counter"),total=stages.length,activeIdx=0,navigation=0;if(!stages.length||!railRows.length)return;async function setStageImg(stage,imgIdx){var request=++navigation,imgs=stage.querySelectorAll(".ps-stage__img"),thumbs=stage.querySelectorAll(".ps-stage__thumb"),ready=await loadDemandImage(imgs[imgIdx]);!ready||request!==navigation||!section.isConnected||(imgs.forEach(function(img,i){img.classList.toggle("is-active",i===imgIdx)}),thumbs.forEach(function(t,i){t.classList.toggle("is-active",i===imgIdx)}))}
1stages.forEach(function(stage){stage.querySelectorAll(".ps-stage__thumb").forEach(function(thumb,ti){thumb.addEventListener("click",function(e){e.stopPropagation(),setStageImg(stage,ti)})})});async function switchTo(idx){var request=++navigation;if(idx!==activeIdx){var stage=stages[idx];if(stage){var ready=await loadDemandImage(stage.querySelector(".ps-stage__img"));!ready||request!==navigation||!section.isConnected||(stage.querySelectorAll(".ps-stage__thumb img[data-demand-src]").forEach(loadDemandImage),stage.querySelectorAll(".ps-stage__img").forEach(function(img,i){img.classList.toggle("is-active",i===0)}),stage.querySelectorAll(".ps-stage__thumb").forEach(function(thumb,i){thumb.classList.toggle("is-active",i===0)}),stages[activeIdx].classList.remove("is-active"),railRows[activeIdx].classList.remove("is-active"),activeIdx=idx,stages[activeIdx].classList.add("is-active"),railRows[activeIdx].classList.add("is-active"),counter&&(counter.textContent=activeIdx+1+" of "+total),railRows[activeIdx].scrollIntoView({block:"nearest",behavior:"smooth"}))}}}railRows.forEach(function(row,i){row.addEventListener("click",function(){switchTo(i)})}),counter&&(counter.textContent="1 of "+total)}})(); 2//# sourceMappingURL=/cdn/shop/t/753/assets/product-showcase.js.map?v=158288980335886729091789344948
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.