PageSourceSearch

https://parfium.bg/cdn/shop/t/4/assets/quick-add.js?v=165145132117098586201790927104

js parfium.bg collected 2026-10-08 05:19:29 UTC 4,670 bytes, 2 lines download raw bytes

1customElements.get("quick-add-modal")||customElements.define("quick-add-modal",class extends ModalDialog{constructor(){super(),this.modalContent=this.querySelector('[id^="QuickAddInfo-"]'),this.addEventListener("product-info:loaded",({target})=>{target.addPreProcessCallback(this.preprocessHTML.bind(this))})}hide(preventFocus=!1){const cartNotification=document.querySelector("cart-notification")||document.querySelector("cart-drawer");cartNotification&&cartNotification.setActiveElement(this.openedBy),this.modalContent.innerHTML="",this.openedBy?.setAttribute("aria-expanded","false"),preventFocus&&(this.openedBy=null),super.hide()}show(opener){opener.setAttribute("aria-disabled",!0),opener.classList.add("loading"),opener.querySelector(".loading__spinner").classList.remove("hidden");const productUrl=opener.getAttribute("data-product-url");fetch(productUrl).then(response=>response.text()).then(responseText=>{const responseHTML=new DOMParser().parseFromString(responseText,"text/html"),productElement=responseHTML.querySelector("product-info");if(!productElement){console.warn(`[quick-add] No <product-info> in the response for ${productUrl}; opening the product page. Response title: "${responseHTML.title}"`),window.location.href=productUrl;return}this.preprocessHTML(productElement),HTMLUpdateUtility.setInnerHTML(this.modalContent,productElement.outerHTML),window.Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init(),window.ProductModel&&window.ProductModel.loadShopifyXR(),this.modalContent.querySelector("product-component")?.dispatchViewEvent?.(),super.show(opener),opener.setAttribute("aria-expanded","true")}).finally(()=>{opener.removeAttribute("aria-disabled"),opener.classList.remove("loading"),opener.querySelector(".loading__spinner").classList.add("hidden")})}preprocessHTML(productElement){productElement.classList.forEach(classApplied=>{(classApplied.startsWith("color-")||classApplied==="gradient")&&this.modalContent.classList.add(classApplied)}),this.removeExcludedBlocks(productElement),this.preventDuplicatedIDs(productElement),this.removeDOMElements(productElement),this.removeGalleryListSemantic(productElement),this.updateImageSizes(productElement),this.preventVariantURLSwitching(productElement)}preventVariantURLSwitching(productElement){productElement.setAttribute("data-update-url","false")}removeDOMElements(productElement){const pickupAvailability=productElement.querySelector("pickup-availability");pickupAvailability&&pickupAvailability.remove();const productModal=productElement.querySelector("product-modal");productModal&&productModal.remove();const modalDialog=productElement.querySelectorAll("modal-dialog");modalDialog&&modalDialog.forEach(modal=>modal.remove())}removeExcludedBlocks(productElement){const isMarker=(node,data)=>node.nodeType===Node.COMMENT_NODE&&node.data.trim()===data,walker=productElement.ownerDocument.createTreeWalker(productElement,NodeFilter.SHOW_COMMENT),starts=[];for(;walker.nextNode();)isMarker(walker.currentNode,"quick-add-exclude")&&starts.push(walker.currentNode);starts.forEach(start=>{let node=start.nextSibling;for(;node&&!isMarker(node,"/quick-add-exclude");){const next=node.nextSibling;node.remove(),node=next}node?.remove(),start.remove()})}preventDuplicatedIDs(productElement){const sectionId=productElement.dataset.section,oldId=sectionId,newId=`quickadd-${sectionId}`;productElement.innerHTML=productElement.innerHTML.replaceAll(oldId,newId),Array.from(productElement.attributes).forEach(attribute=>{attribute.value.includes(oldId)&&productElement.setAttribute(attribute.name,attribute.value.replace(oldId,newId))}),productElement.dataset.originalSection=sectionId}removeGalleryListSemantic(productElement){const galleryList=productElement.querySelector('[id^="Slider-Gallery"]');galleryList&&(galleryList.setAttribute("role","presentation"),galleryList.querySelectorAll('[id^="Slide-"]').forEach(li=>li.setAttribute("role","presentation")))}updateImageSizes(productElement){const product=productElement.querySelector(".product");if(!product?.classList.contains("product--columns"))return;const mediaImages=product.querySelectorAll(".product__media img");if(!mediaImages.length)return;let mediaImageSizes="(min-width: 1000px) 715px, (min-width: 750px) calc((100vw - 11.5rem) / 2), calc(100vw - 4rem)";product.classList.contains("product--medium")?mediaImageSizes=mediaImageSizes.replace("715px","605px"):product.classList.contains("product--small")&&(mediaImageSizes=mediaImageSizes.replace("715px","495px")),mediaImages.forEac
1h(img=>img.setAttribute("sizes",mediaImageSizes))}});
2//# sourceMappingURL=/cdn/shop/t/4/assets/quick-add.js.map?v=165145132117098586201790927104

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.