PageSourceSearch

https://decoltesti.ro/cdn/shop/t/4/assets/quick-view.js?v=137984924065178416561762194860

js decoltesti.ro collected 2026-10-07 20:43:13 UTC 6,493 bytes, 2 lines download raw bytes

1requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xQuickView",{sectionId:window.xQuickView.sectionId,enabled:window.xQuickView.enabled,buttonLabel:window.xQuickView.buttonLabel,show_atc_button:window.xQuickView.show_atc_button,btn_atc_bottom:window.xQuickView.atc_btn_bottom,atc_btn_image_desktop:window.xQuickView.atc_btn_image_desktop,show:!1,loading:!1,currentVariant:"",cachedResults:[],cachedfetch:[],loadingUrls:[],loadedChooseOptions:[],loadedChooseOptionsID:[],selected:!1,loadingChooseOption:!1,isMiniCart:!1,buttonQuickView:"",addListener(){document.addEventListener("eurus:cart:items-changed",()=>{this.cachedResults=[]})},showBtn(enable,showATCButton,showQTYSelector,textBtn){this.enabled=enable,this.buttonLabel=textBtn,this.show_atc_button=showATCButton},load(url,el,optionId){this.loading=!0,requestAnimationFrame(()=>{setTimeout(()=>{this.buttonQuickView==""&&(this.buttonQuickView=el);let variant=document.getElementById("current-variant-"+optionId)?.innerText,productUrl=variant?`${url}?variant=${variant}&section_id=${this.sectionId}`:`${url}?section_id=${this.sectionId}`;return productUrl=productUrl.replace(/\s+/g,""),this.cachedResults[productUrl]?(document.getElementById("quickview-product-content").innerHTML=this.cachedResults[productUrl],this.loading=!1,!0):(this.cachedfetch[productUrl]||(this.cachedfetch[productUrl]=!0,fetch(productUrl).then(reponse=>reponse.text()).then(response=>{const content=new DOMParser().parseFromString(response,"text/html").getElementById("quickview-product-content").innerHTML;document.getElementById("quickview-product-content").innerHTML=content,this.cachedResults[productUrl]=content}).finally(()=>{this.loading=!1,this.cachedfetch[productUrl]=!1})),!0)},0)})},async loadChooseOptions(url,el,optionId,index){setTimeout(async()=>{let getVariant=document.getElementById("current-variant-"+optionId)?.innerText,urlProduct=getVariant?`${url}?variant=${getVariant}&section_id=choose-option&page=${index}`:`${url}?section_id=choose-option&page=${index}`,destinationElm=document.getElementById("choose-options-"+optionId)?.querySelector(".choose-options"),destinationElmMobile=document.getElementById("choose-options-mobile"),loadingEl=document.getElementById("choose-options-"+optionId)?.querySelector(".icon-loading");if(this.loadedChooseOptions[urlProduct])return window.innerWidth>767?(el.closest(".card-product").querySelector("#choose-options-"+optionId)?.querySelector(".choose-options-content")||(destinationElm&&(destinationElm.innerHTML=this.loadedChooseOptions[urlProduct]),destinationElmMobile&&(destinationElmMobile.innerHTML="")),destinationElm&&(destinationElm.querySelector(".add_to_cart_button")&&(destinationElm.querySelector(".add_to_cart_button").style.display="block"),destinationElm.querySelector(".label-btn-quickview")&&(destinationElm.querySelector(".label-btn-quickview").style.display="none"))):(el.closest(".card-product").querySelector("#choose-options-mobile")||(destinationElmMobile&&(destinationElmMobile.innerHTML=this.loadedChooseOptions[urlProduct]),destinationElm&&(destinationElm.innerHTML="")),destinationElmMobile&&(destinationElmMobile.querySelector(".add_to_cart_button")&&(destinationElmMobile.querySelector(".add_to_cart_button").style.display="block"),destinationElmMobile.querySelector(".label-btn-quickview")&&(destinationElmMobile.querySelector(".label-btn-quickview").style.display="none"))),!0;try{loadingEl&&loadingEl.classList.remove("hidden"),this.loadingChooseOption=!0,this.loadingUrls.includes(urlProduct)||(this.loadingUrls.push(urlProduct),await fetch(urlProduct).then(response=>response.text()).then(content=>{const parsedContent=new DOMParser().parseFromString(content,"text/html").getElementById("choose-options-content").innerHTML;parsedContent&&(window.innerWidth>767?(destinationElmMobile&&(destinationElmMobile.innerHTML=""),destinationElm&&(destinationElm.innerHTML=parsedContent)):(destinationElmMobile&&(destinationElmMobile.innerHTML=parsedContent),destinationElm&&(destinationElm.innerHTML="")),this.loadedChooseOptions[urlProduct]=parsedContent),loadingEl&&loadingEl.classList.add("hidden")}).finally(()=>{const index2=this.loadingUrls.indexOf(urlProduct);index2!==-1&&this.loadingUrls.splice(index2,1),window.innerWidth>767?destinationElm&&(destinationElm.querySelector(".add_to_cart_button")&&(destinationElm.querySelector(".add_to_cart_button").style.display="block"),destinationElm.querySelector(".label-btn-quickview")&&(destinationElm.querySelector(".label-btn-quickview").style.display="none")):destinationElmMobile&&(destinationElmMobile.querySelector(".add_to_cart_button")&&(destinationElmMobile.querySelector(".add_to_cart_button").style.display="block"),destinationElmMobile.querySelector(".label-btn-quickview")&&(destinationElmMobile.querySelector(".label-btn-quickview").style.display="none"))})),this.loadingChooseOption=!1}catch(error){console.log(error)}},0)},open(isMiniCart=!1){this.show=!0,this.isMiniCart=isMiniCart,Alpine.store("xPopup").open=!0},close(){this.show=!1,this.buttonQuickView="",Alpine.store("xMiniCart").open||Alpine.store("xPopup").close()},focusQuickView(quickView,btnClose){this.selected||Alpine.store("xFocusElement").trapFocus(quickView,btnClose)},removeFocusQuickView(){if(!this.selected){const elementActive=document.getElementById("button_quickview");Alpine.store("xFocusElement").removeTrapFocus(elementActive)}},closePopupMobile(){this.openPopupMobile=!1},showChooseOption(id,el){this.openPopupMobile=!0;const product=el.closest(".card-product"),addToCartBtn=product.querySelector(".choose-options")?.querySelector(".add_to_cart_button"),iconAddToCartBtn=product.querySelector(".choose-options")?.querySelector(".label-btn-quickview"),addToCartBtnMobile=document.querySelector(".choose-options-mobile")?.querySelector(".add_to_cart_button"),iconAddToCartBtnMobile=document.querySelector(".choose-options-mobile")?.querySelector(".label-btn-quickview");addToCartBtn&&iconAddToCartBtn&&window.innerWidth>
1767?(addToCartBtn.style.display="block",iconAddToCartBtn.style.display="none"):addToCartBtnMobile&&iconAddToCartBtnMobile&&(addToCartBtnMobile.style.display="block",iconAddToCartBtnMobile.style.display="none")},clickInsideQuickView(evt,$el){this.isMiniCart&&(evt.stopPropagation(),this.show=!1,Alpine.store("xPopup").close())},clickInsideContentQuickView(evt){evt.stopPropagation()}})})});
2//# sourceMappingURL=/cdn/shop/t/4/assets/quick-view.js.map?v=137984924065178416561762194860

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.