PageSourceSearch

https://zugu.com/cdn/shop/t/190/assets/product-price.js?v=155327248385622931941787631051

js zugu.com collected 2026-10-09 16:57:20 UTC 6,489 bytes, 10 lines download raw bytes

1import{ThemeEvents}from"@theme/events";import{Component}from"@theme/component";class ProductPrice extends Component{connectedCallback(){super.connectedCallback();const closestSection=this.closest(".shopify-section, dialog");closestSection&&closestSection.addEventListener(ThemeEvents.variantUpdate,this.updatePrice)}disconnectedCallback(){super.disconnectedCallback();const closestSection=this.closest(".shopify-section, dialog");closestSection&&closestSection.removeEventListener(ThemeEvents.variantUpdate,this.updatePrice)}updatePrice=event=>{const variantTitle=event.detail.resource.title;if(console.log(variantTitle),document.getElementById("thumbnail-gallery")&&filterGalleryByVariant(variantTitle),event.detail.data.newProduct)this.dataset.productId=event.detail.data.newProduct.id;else if(event.target instanceof HTMLElement&&event.target.dataset.productId!==this.dataset.productId)return;const newProductPrice=event.detail.data.html.querySelector(`product-price[data-block-id="${this.dataset.blockId}"]`);if(!newProductPrice)return;const newPrice=newProductPrice.querySelector('[ref="priceContainer"]'),currentPrice=this.querySelector('[ref="priceContainer"]');newPrice&&currentPrice&&currentPrice.replaceWith(newPrice);const currentNote=this.querySelector(".volume-pricing-note"),newNote=newProductPrice.querySelector(".volume-pricing-note");newNote?currentNote?currentNote.replaceWith(newNote):this.querySelector('[ref="priceContainer"]')?.insertAdjacentElement("afterend",newNote.cloneNode(!0)):currentNote?.remove()}}customElements.get("product-price")||customElements.define("product-price",ProductPrice);var $mainSlider=$(".custom-main-slider"),$thumbSlider=$(".custom-thumbnail-slider"),slickOptions={main:{slidesToShow:1,slidesToScroll:1,arrows:!0,prevArrow:"<button type='button' class='slick-prev small-icon'><svg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10ZM11.7071 6.29289C12.0976 6.68342 12.0976 7.31658 11.7071 7.70711L9.41421 10L11.7071 12.2929C12.0976 12.6834 12.0976 13.3166 11.7071 13.7071C11.3166 14.0976 10.6834 14.0976 10.2929 13.7071L7.29289 10.7071C6.90237 10.3166 6.90237 9.68342 7.29289 9.29289L10.2929 6.29289C10.6834 5.90237 11.3166 5.90237 11.7071 6.29289Z' fill='Currentcolor'/></svg></button>",nextArrow:"<button type='button' class='slick-next small-icon'><svg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10ZM8.29289 6.29289C8.68342 5.90237 9.31658 5.90237 9.70711 6.29289L12.7071 9.29289C13.0976 9.68342 13.0976 10.3166 12.7071 10.7071L9.70711 13.7071C9.31658 14.0976 8.68342 14.0976 8.29289 13.7071C7.90237 13.3166 7.90237 12.6834 8.29289 12.2929L10.5858 10L8.29289 7.70711C7.90237 7.31658 7.90237 6.68342 8.29289 6.29289Z' fill='currentcolor'/></svg></button>",adaptiveHeight:!0,dots:!1,fade:!0,asNavFor:".product_thumb"},thumb:{slidesToShow:6,slidesToScroll:1,asNavFor:".product_for",arrows:!1,vertical:!0,dots:!1,prevArrow:"<button type='button' class='slick-prev small-icon'><svg width='10' height='15' viewBox='0 0 10 15' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3.84087 7.50004L9.60226 2.15191C10.1326 1.65963 10.1326 0.861486 9.60226 0.369206C9.07194 -0.12307 8.21212 -0.123069 7.68181 0.369211L0 7.50004L7.68182 14.6308C8.21213 15.1231 9.07193 15.1231 9.60225 14.6308C10.1326 14.1385 10.1326 13.3404 9.60225 12.8481L3.84087 7.50004Z' fill='Currentcolor'/></svg></button>",nextArrow:"<button type='button' class='slick-next small-icon'><svg width='10' height='15' viewBox='0 0 10 15' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M6.15913 7.50005L0.397739 2.15191C-0.132581 1.65963 -0.132579 0.861486 0.397742 0.369207C0.928061 -0.12307 1.78787 -0.123069 2.31819 0.369211L10 7.50005L2.31818 14.6308C1.78787 15.1231 0.928067 15.1231 0.397752 14.6308C-0.132573 14.1385 -0.132573 13.3404 0.397753 12.8481L6.15913 7.50005Z' fill='currentcolor'/></svg></button>",centerMode:!1,focusOnSelect:!0,responsive:[{breakpoint:992,settings:{vertical:!1,arrows:!1}
1}]}};function initSlick(){$(".product_for").slick(slickOptions.main),$(".product_thumb").slick(slickOptions.thumb);const thumbImgs=$(".product_thumb img").toArray();let loaded=0;const total=thumbImgs.length;function onAllLoaded(){$(".product_for").slick("setPosition"),$(".product_thumb").slick("setPosition"),$(window).trigger("resize")}if(total===0){onAllLoaded();return}thumbImgs.forEach(function(img){img.complete?(loaded++,loaded===total&&onAllLoaded()):$(img).one("load error",function(){loaded++,loaded===total&&onAllLoaded()})}),setTimeout(onAllLoaded,600)}function destroySlick(){$(".product_for").hasClass("slick-initialized")&&$(".product_for").slick("unslick"),$(".product_thumb").hasClass("slick-initialized")&&$(".product_thumb").slick("unslick")}function filterGalleryByVariant(variantTitle){const title=variantTitle.toLowerCase(),gallery=document.getElementById("thumbnail-gallery"),matched=images.filter(img=>{const alt=(img.alt||"").toLowerCase();return alt===""||title.includes(alt)||alt.includes(title)}),toShow=matched.length>0?matched:images;destroySlick();const mainSlider=gallery.querySelector(".product_for");mainSlider.innerHTML=toShow.map(img=>`
2    <div class="item">
3      <img src="${img.url}" alt="${img.alt}" class="img-fluid">
4    </div>
5  `).join("");const thumbSlider=gallery.querySelector(".product_thumb");thumbSlider.innerHTML=toShow.map((img,i)=>`
6    <div class="item${i===0?" active":""}">
7      <img src="${img.url2}" alt="${img.alt}" class="img-fluid">
8    </div>
9  `).join(""),initSlick()}$mainSlider.on("beforeChange",function(){$mainSlider.find("video").each(function(){this.pause(),this.currentTime=0})}),$mainSlider.on("afterChange",function(event,slick,currentSlide){var $currentSlide=$(slick.$slides.get(currentSlide)),video=$currentSlide.find("video").get(0);video&&video.play()});
10//# sourceMappingURL=/cdn/shop/t/190/assets/product-price.js.map?v=155327248385622931941787631051

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.