PageSourceSearch

https://frigidfluid.com/cdn/shop/t/51/assets/theme.js?v=16178382323407779661791128405

js frigidfluid.com collected 2026-10-10 01:10:38 UTC 54,459 bytes, 2 lines download raw bytes

1const installMediaQueryWatcher=(mediaQuery,changedCallback)=>{const mq=window.matchMedia(mediaQuery);mq.addEventListener("change",e=>changedCallback(e.matches)),changedCallback(mq.matches)},deferScriptLoad=(name,src,onload,requestVisualChange=!1)=>{window.Eurus.loadedScript.add(name),(events=>{const loadScript=()=>{events.forEach(type=>window.removeEventListener(type,loadScript)),clearTimeout(autoloadScript);const initScript=()=>{const script=document.createElement("script");script.setAttribute("src",src),script.setAttribute("defer",""),script.onload=()=>{document.dispatchEvent(new CustomEvent(name+" loaded")),onload()},document.head.appendChild(script)};requestVisualChange?window.requestIdleCallback?requestIdleCallback(initScript):requestAnimationFrame(initScript):initScript()};let autoloadScript;if(Shopify.designMode)loadScript();else{const wait=window.innerWidth>767?2e3:5e3;events.forEach(type=>window.addEventListener(type,loadScript,{once:!0,passive:!0})),autoloadScript=setTimeout(()=>{loadScript()},wait)}})(["touchstart","mouseover","wheel","scroll","keydown"])},getSectionInnerHTML=(html,selector=".shopify-section")=>new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML,xParseJSON=jsonString=>(jsonString=String.raw`${jsonString}`,jsonString=jsonString.replaceAll("\\","\\\\").replaceAll('\\"','"'),JSON.parse(jsonString));window.addEventListener("pageshow",()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xMiniCart")&&(Alpine.store("xMiniCart").needReload&&Alpine.store("xMiniCart").reLoad(),document.getElementById("main-cart-items")&&Alpine.store("xMiniCart").needReload&&location.reload(),Alpine.store("xMiniCart").needReload=!0)})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xDarkMode",{alias:"btn-theme-mode",toggleThemeMode(){Alpine.store("xDOM").rePainting=this.alias,setTimeout(()=>{document.documentElement.classList.contains("dark")?(localStorage.eurus_theme=0,document.documentElement.classList.remove("dark")):(localStorage.eurus_theme=1,document.documentElement.classList.add("dark")),Alpine.store("xHeaderMenu").setTopStickyHeader(),Alpine.store("pseudoIconTheme").updatePseudoIconInputTheme(),Alpine.store("xDOM").rePainting=null},200)},toggleLightMode(){Alpine.store("xDOM").rePainting=this.alias,setTimeout(()=>{localStorage.eurus_theme=0,document.documentElement.classList.remove("dark"),Alpine.store("xHeaderMenu").setTopStickyHeader(),Alpine.store("pseudoIconTheme").updatePseudoIconInputTheme(),Alpine.store("xDOM").rePainting=null},200)},toggleDarkMode(){Alpine.store("xDOM").rePainting=this.alias,setTimeout(()=>{localStorage.eurus_theme=1,document.documentElement.classList.add("dark"),Alpine.store("xHeaderMenu").setTopStickyHeader(),Alpine.store("pseudoIconTheme").updatePseudoIconInputTheme(),Alpine.store("xDOM").rePainting=null},200)}}),Alpine.store("pseudoIconTheme",{init(){this.updatePseudoIconInputTheme()},updatePseudoIconInputTheme(){const themeMode=localStorage.getItem("eurus_theme");document.querySelectorAll('input[type="date"], input[type="time"]').forEach(input=>{themeMode==="1"?input.style.colorScheme="dark":input.removeAttribute("style")})}}),Alpine.store("xHelper",{toUpdate:[],requestControllers:new Map,eventControllers:new Map,fbtProductListDraft:[],cancelRequest(key){const controller=this.requestControllers.get(key);controller&&(controller.abort(),this.requestControllers.delete(key))},cancelEvent(key){const controller=this.eventControllers.get(key);controller&&(controller.abort(),this.eventControllers.delete(key))},formatMoney(amount,formatString){var placeholderRegex=/\{\{\s*(\w+)\s*\}\}/;switch(formatString.match(placeholderRegex)[1]){case"amount":value=this.formatWithDelimiters(amount,2);break;case"amount_no_decimals":value=this.formatWithDelimiters(amount,0);break;case"amount_with_comma_separator":value=this.formatWithDelimiters(amount,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=this.formatWithDelimiters(amount,0,".",",");break}return formatString.replace(placeholderRegex,value)},defaultOption(opt,def){return typeof opt>"u"?def:opt},formatWithDelimiters(number,precision,thousands,decimal){if(precision=this.defaultOption(precision,2),thousands=this.defaultOption(thousands,","),decimal=this.defaultOption(decimal,"."),isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollars=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),cents=parts[
11]?decimal+parts[1]:"";return dollars+cents},countdown(configs,callback){let endDate=new Date(configs.end_year,configs.end_month-1,configs.end_day,configs.end_hour,configs.end_minute),reset=configs.reset,duration=configs.duration,endTime=endDate.getTime()+(-1*configs.timezone*60-endDate.getTimezoneOffset())*60*1e3,startTime;if(configs.start_year){let startDate=new Date(configs.start_year,configs.start_month-1,configs.start_day,configs.start_hour,configs.start_minute);startTime=startDate.getTime()+(-1*configs.timezone*60-startDate.getTimezoneOffset())*60*1e3,reset&&(endDate=new Date(startTime+duration),endTime=endDate.getTime())}else reset?(startTime=endTime,endDate=new Date(startTime+duration),endTime=endDate.getTime()):startTime=new Date().getTime();if(new Date().getTime()<startTime){callback(!1,0,0,0,0);return}const startInterval=()=>{let x=setInterval(()=>{let now=new Date().getTime(),distance=0;if(distance=endTime-now,distance<0)if(clearInterval(x),reset){let attempt=0;for(;distance<0&&attempt<100;){if(attempt++,attempt==1){let elapsed=now-startTime,loopOffset=Math.floor(elapsed/duration)-1;startTime=startTime+loopOffset*duration}else startTime=endTime;endDate=new Date(startTime+duration),endTime=endDate.getTime(),distance=endTime-now}if(attempt>=100){callback(!1,0,0,0,0);return}startInterval()}else{callback(!1,0,0,0,0);return}if(distance>0){var days=Math.floor(distance/864e5),hours=Math.floor(distance%(1e3*60*60*24)/(1e3*60*60)),minutes=Math.floor(distance%(1e3*60*60)/(1e3*60)),seconds=Math.floor(distance%(1e3*60)/1e3);minutes=minutes<10?"0"+minutes:""+minutes,seconds=seconds<10?"0"+seconds:""+seconds,callback(!0,seconds,minutes,hours,days)}},1e3)};startInterval()},canShow(configs){let endDate=new Date(configs.end_year,configs.end_month-1,configs.end_day,configs.end_hour,configs.end_minute);const endTime=endDate.getTime()+(-1*configs.timezone*60-endDate.getTimezoneOffset())*60*1e3;let startTime;if(configs.start_year){let startDate=new Date(configs.start_year,configs.start_month-1,configs.start_day,configs.start_hour,configs.start_minute);startTime=startDate.getTime()+(-1*configs.timezone*60-startDate.getTimezoneOffset())*60*1e3}else startTime=new Date().getTime();let now=new Date().getTime();return!(endTime-now<0||startTime>now)},handleTime(configs){let endDate=new Date(configs.end_year,configs.end_month-1,configs.end_day,configs.end_hour,configs.end_minute);const endTime=endDate.getTime()+(-1*configs.timezone*60-endDate.getTimezoneOffset())*60*1e3;let startTime;if(configs.start_year){let startDate=new Date(configs.start_year,configs.start_month-1,configs.start_day,configs.start_hour,configs.start_minute);startTime=startDate.getTime()+(-1*configs.timezone*60-startDate.getTimezoneOffset())*60*1e3}else startTime=new Date().getTime();let now=new Date().getTime(),distance=endTime-now;return{startTime,endTime,now,distance}},centerElement(el){let resizeTimeout,currTranslate=0;const update=()=>{window.requestAnimationFrame(()=>{const rect=el.getBoundingClientRect(),translate=rect.left+Math.abs(currTranslate)-(document.documentElement.clientWidth-rect.width)/2;el.style.transform=`translateX(-${translate}px)`,currTranslate=translate})};window.addEventListener("resize",()=>{clearTimeout(resizeTimeout),resizeTimeout=setTimeout(update,150)}),update()}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xCart",()=>({t:"",loading:!1,customFieldInitOpened:!1,updateItemQty(itemId,line,inventory_policy,track_inventory,maxQty){let qty=parseInt(document.getElementById(`cart-qty-${itemId}`).value);this.validateQty(qty)&&(track_inventory||inventory_policy!=="continue"?this._postUpdateItem(itemId,line,qty,maxQty):this._postUpdateItem(itemId,line,qty,qty))},minusItemQty(itemId,line,inventory_policy,track_inventory,maxQty){let qty=parseInt(document.getElementById(`cart-qty-${itemId}`).value);this.validateQty(qty)&&(qty>0&&(qty-=1,document.getElementById(`cart-qty-${itemId}`).value=qty),track_inventory||inventory_policy!=="continue"?this._postUpdateItem(itemId,line,qty,maxQty):this._postUpdateItem(itemId,line,qty,qty))},plusItemQty(itemId,line,inventory_policy,track_inventory,maxQty){let qty=parseInt(document.getElementById(`cart-qty-${itemId}`).value);this.validateQty(qty)&&(qty>=0&&(qty+=1,document.getElementById(`cart-qty-${itemId}`).value=qty),track_inventory||inventory_policy!=="continue"?this._postUpdateItem(itemId,line,qty,maxQty):this._postUpdateItem(itemId,line,qty,qty))},removeItem(itemId,line,isShippingInsurance){this._postUpdateItem(itemId,line,0,0,500,isShippingInsurance)},handleKeydown(evt,el){evt.key==="Enter"&&(evt.preventDefault(),el.blur(),el.focus())}
1,_postUpdateItem(itemId,line,qty,maxQty,wait=500,isShippingInsurance){isShippingInsurance&&(Alpine.store("xPopupInsurance").loading=!0),clearTimeout(this.t);const func=async()=>{this.loading=!0,await Alpine.store("xCartHelper").waitForCartUpdate(),window.updatingCart=!0;let removeEl=document.getElementById(`remove-${itemId}`);removeEl&&(removeEl.style.display="none"),document.getElementById(`loading-${itemId}`)?.classList?.remove("hidden");let updateData={line:`${line}`,quantity:`${qty}`,sections:Alpine.store("xCartHelper").getSectionsToRender().map(s=>s.id),sections_url:window.location.pathname},productIds=[];fetch(`${Shopify.routes.root}cart/change.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(updateData)}).then(response=>response.json()).then(parsedState=>{parsedState.status=="422"?(this._addErrorMessage(itemId,parsedState.message),this.updateCart(line,itemId)):(parsedState.items.forEach(item=>{productIds.push(item.product_id)}),this.updateCartUI(parsedState,itemId,line,qty),document.dispatchEvent(new CustomEvent("eurus:cart:items-changed")))}).finally(()=>{window.updatingCart=!1,productIds.forEach(id=>{document.dispatchEvent(new CustomEvent(`eurus:product-card:clear:${id}`))}),isShippingInsurance&&(Alpine.store("xPopupInsurance").loading=!1)})};this.t=setTimeout(()=>{func()},wait)},updateCartUI(parsedState,itemId,line,qty){const items=document.querySelectorAll(".cart-item");if(parsedState.errors){this._addErrorMessage(itemId,parsedState.errors);return}Alpine.store("xCartHelper").reRenderSections(parsedState.sections),Alpine.store("xCartHelper").currentItemCount=parseInt(document.querySelector("#cart-icon-bubble span").innerHTML);const currentItemCount=Alpine.store("xCartHelper").currentItemCount;Alpine.store("xCartHelper").currentItemCount=parsedState.item_count,currentItemCount!=parsedState.item_count&&document.dispatchEvent(new CustomEvent("eurus:cart:items-changed"));const lineItemError=document.getElementById(`LineItemError-${itemId}`);lineItemError&&lineItemError.classList.add("hidden");const updatedValue=parsedState.items[line-1]?parsedState.items[line-1].quantity:void 0;if(items.length===parsedState.items.length&&updatedValue!==parseInt(qty)){let message="";typeof updatedValue>"u"?message=window.Eurus.cart_error:message=window.Eurus.cart_quantity_error_html.replace("[quantity]",updatedValue),this._addErrorMessage(itemId,message)}let loadingEl=document.getElementById(`loading-${itemId}`),removeEl=document.getElementById(`remove-${itemId}`);removeEl&&(removeEl.style.display="block"),loadingEl&&loadingEl.classList.add("hidden"),this.loading=!1},updateCart(line,itemId){let url="";window.location.pathname!=="/cart"?url=`${window.location.pathname}?section_id=cart-drawer`:url=`${window.location.pathname}`,fetch(url).then(reponse=>reponse.text()).then(response=>{const html=new DOMParser().parseFromString(response,"text/html"),rpCartFooter=html.getElementById("main-cart-footer"),cartFooter=document.getElementById("main-cart-footer");rpCartFooter&&cartFooter&&(cartFooter.innerHTML=rpCartFooter.innerHTML);const rpItemInput=html.querySelector(".cart-item-qty-"+line),itemInput=document.querySelector(".cart-item-qty-"+line);rpItemInput&&itemInput&&(itemInput.value=rpItemInput.value);const rpItemTotal=html.querySelector(".cart-item-price-"+line),itemTotal=document.querySelector(".cart-item-price-"+line);itemTotal&&rpItemTotal&&(itemTotal.innerHTML=rpItemTotal.innerHTML);const rpPriceTotal=html.querySelector(".cart-drawer-price-total"),priceTotal=document.querySelector(".cart-drawer-price-total");rpPriceTotal&&priceTotal&&(priceTotal.innerHTML=rpPriceTotal.innerHTML);const rpCartIcon=html.querySelector("cart-icon-bubble"),cartIcon=document.querySelector("cart-icon-bubble");cartIcon&&rpCartIcon&&(cartIcon.innerHTML=rpCartIcon.innerHTML)}).finally(()=>{let loadingEl=document.getElementById(`loading-${itemId}`);loadingEl&&loadingEl.classList.add("hidden"),this.loading=!1})},clearCart(itemId){let removeEl=document.getElementById(`remove-${itemId}`);removeEl&&(removeEl.style.display="none"),document.getElementById(`loading-${itemId}`)?.classList?.remove("hidden"),fetch(window.Shopify.routes.root+"cart/clear.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sections:Alpine.store("xCartHelper").getSectionsToRender().map(section=>section.id)})}).then(response=>response.json()).then(response=>{requestAnimationFrame(()=>{setTimeout(()=>{Alpine.store("xCartHelper").reRenderSections(response.sections),Alpine.store("xCartHelper").currentItemCount=parseInt(document.querySelector("#cart-icon-bubble span").innerHTML),document.dispatchEvent(new CustomEvent("eurus:cart:items-changed"))},0)})}).catch(error=>{console.error("Error:",error)}).finally(()=>{document.cookie="eurus_insurance=; path=/"})},async addShippingInsurance(productId){Alpine.store("xPopupInsurance").loading=!0,Alpine.store("xPopupInsurance").openInsuranceNoti=!1;let item=[{id:productId,quantity:1}];await Alpine.store("xCartHelper").waitForCartUpdate(),window.updatingCart=!0,fetch(window.Shopify.routes.root+"cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:item,sections:Alpine.store("xCartHelper").getSectionsToRender().map(section=>section.id)})}).then(response=>response.json()).then(response=>{Alpine.store("xCartHelper").reRenderSections(response.sections),Alpine.store("xCartHelper").currentItemCount=parseInt(document.querySelector("#cart-icon-bubble span").innerHTML)}).catch(error=>{console.error("Error:",error)}).finally(()=>{window.updatingCart=!1,document.cookie=`eurus_insurance=${productId}; path=/`,Alpine.store("xPopupInsurance").loading=!1,Alpine.store("xPopupInsurance").openInsuranceNotification()})},updateEstimateShippingAll(el){const cartItems=el.getElementsByClassName("cart-item");
1Array.from(cartItems).forEach((item,index)=>{window.requestAnimationFrame(()=>{item.dispatchEvent(new CustomEvent(`eurus:cart-item:updateEstimateShipping:${index+1}`))})})},waitForEstimateUpdate(){return new Promise(resolve=>{function check(){window.updatingEstimate?requestAnimationFrame(check):resolve()}check()})},async updateEstimateShipping(el,line,qty,itemId,cutOffHour,cutOffMinute,hour,minutes,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage,shippingInsuranceId,cartSize){el.addEventListener(`eurus:cart-item:updateEstimateShipping:${line}`,async()=>{if(shippingInsuranceId===itemId||window.location.search.includes("share_cart:true")&&!Alpine.store("xCartShare").shared)return;const key=el.getAttribute("x-data-update-estimate-key");let estimateProperty=el.getAttribute("x-data-update-estimate-property"),properties=JSON.parse(el.getAttribute("x-data-properties"));estimateProperty!==""&&estimateProperty.includes("time_to_cut_off")&&(Alpine.store("xEstimateDelivery").noti==""&&Alpine.store("xEstimateDelivery").countdownCutOffTime(cutOffHour,cutOffMinute,hour,minutes,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage),estimateProperty=estimateProperty.replace("time_to_cut_off",Alpine.store("xEstimateDelivery").noti),properties[key]=estimateProperty,await this.waitForEstimateUpdate(),window.updatingEstimate=!0,await fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({line,quantity:qty,properties})}).finally(()=>{window.updatingEstimate=!1}))})},async updateDate(date){await Alpine.store("xCartHelper").waitForCartUpdate();var formData={attributes:{"datetime-updated":`${date}`}};fetch(Shopify.routes.root+"cart/update",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(formData)})},_addErrorMessage(itemId,message){const lineItemError=document.getElementById(`LineItemError-${itemId}`);lineItemError&&(lineItemError.classList.remove("hidden"),lineItemError.getElementsByClassName("cart-item__error-text")[0].innerHTML=message)},validateQty:function(number){return!(parseFloat(number)!=parseInt(number)&&isNaN(number))}})),Alpine.store("xCartHelper",{currentItemCount:0,validated:!0,openField:"",openDeliveryDateField:"",openDiscountField:"",updateCart:async function(data,needValidate=!1){await Alpine.store("xCartHelper").waitForCartUpdate();const formData=JSON.stringify(data);fetch(Shopify.routes.root+"cart/update",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:formData}).then(response=>(needValidate&&this.validateCart(),response.json())).then(response=>{document.dispatchEvent(new CustomEvent("eurus:cart-drawer:order-note:update",{detail:{message:response.note}}))})},cartValidationRequest(){this.validateCart(),Alpine.store("xMiniCart").openCart()},validateCart:function(isCheckOut=!1){this.validated=!0,document.dispatchEvent(new CustomEvent("eurus:cart:validate",{detail:{isCheckOut}}))},goToCheckout(e){if(this.validateCart(!0),this.validated){let formData={attributes:{"collection-pagination":null,"blog-pagination":null,choose_option_id:null,"datetime-updated":null}};fetch(Shopify.routes.root+"cart/update",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(formData)})}else e.preventDefault()},waitForCartUpdate(){return new Promise(resolve=>{function check(){!window.updatingCart&&!window.updatingEstimate?resolve():requestAnimationFrame(check)}check()})},getSectionsToRender(){const cartItemEl=document.getElementById("main-cart-items");if(cartItemEl){const templateId=cartItemEl.closest(".shopify-section").id.replace("cart-items","").replace("shopify-section-","");return[{id:templateId+"cart-items",selector:"#main-cart-items"},{id:templateId+"cart-footer",selector:"#main-cart-footer"},{id:templateId+"cart-upsell",selector:"#main-cart-upsell"},{id:"cart-icon-bubble",selector:"#cart-icon-bubble"},{id:"mobile-cart-icon-bubble",selector:"#mobile-cart-icon-bubble"}
1,{id:"cart-icon-bubble-mobile-dock",selector:"#cart-icon-bubble-mobile-dock"}]}return[{id:"cart-icon-bubble",selector:"#cart-icon-bubble"},{id:"mobile-cart-icon-bubble",selector:"#mobile-cart-icon-bubble"},{id:"cart-icon-bubble-mobile-dock",selector:"#cart-icon-bubble-mobile-dock"},{id:"cart-drawer",selector:"#CartDrawer"}]},async reRenderSections(sections){let resSection=sections;const sectionsToRender=this.getSectionsToRender();if(!resSection){const sectionsToRenderIds=sectionsToRender.map(s=>s.id);if(sectionsToRender.length>4){const results=await Promise.all(sectionsToRenderIds.map(id=>fetch(`${window.location.pathname}?sections=${id}`).then(res=>res.json())));resSection=Object.assign({},...results)}else resSection=await(await fetch(`${window.location.pathname}?sections=${sectionsToRender}`)).json()}this.getSectionsToRender().forEach((section=>{section.selector.split(",").forEach(selector=>{const sectionElement=document.querySelector(selector);sectionElement&&resSection[section.id]&&(sectionElement.innerHTML=getSectionInnerHTML(resSection[section.id],selector))})}))}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xModalSearch",(type,desktopMaximunResults,mobileMaximunResults,productTypeSelected)=>({open_search:"",t:"",result:"",query:"",cachedResults:[],openResults:!1,productTypeSelected,showSuggest:!1,loading:!1,open(refName){this.$refs[refName]?.classList.remove("popup-hidden");const input_search=document.getElementById("search-in-modal");input_search&&setTimeout(()=>{input_search.focus()},100)},close(refName){this.$refs[refName]?.classList.add("popup-hidden")},keyUp(){return this.query=this.$el.value,()=>{clearTimeout(this.t),this.t=setTimeout(()=>{this.query!=""?(this.showSuggest=!1,this.getSearchResult(this.query)):(this.showSuggest=!0,this.result="")},300)}},getSearchResult(query){this.openResults=!0;const limit=window.innerWidth>767?desktopMaximunResults:mobileMaximunResults;let q=this.productTypeSelected!=productTypeSelected?`${this.productTypeSelected} AND ${query}`:query;const queryKey=q.replace(" ","-").toLowerCase()+"_"+limit;if(this.cachedResults[queryKey]){this.result=this.cachedResults[queryKey];return}this.loading=!0,fetch(`${Shopify.routes.root}search/suggest?q=${encodeURIComponent(q)}&${encodeURIComponent("resources[type]")}=${encodeURIComponent(type)}&${encodeURIComponent("resources[options][fields]")}=${encodeURIComponent("author,body,product_type,tag,title,variants.barcode,variants.sku,variants.title,vendor")}&${encodeURIComponent("resources[limit]")}=${encodeURIComponent(limit)}&section_id=predictive-search`).then(response=>response.text()).then(response=>{const text=new DOMParser().parseFromString(response,"text/html");this.result=text.querySelector("#shopify-section-predictive-search").innerHTML,this.cachedResults[queryKey]=this.result}).catch(error=>{throw error}),this.loading=!1},setProductType(value2,input){this.productTypeSelected=value2,document.getElementById(input).value=value2,this.query!=""&&this.getSearchResult(this.query)},focusForm(){this.$el.value!=""?this.showSuggest=!1:this.showSuggest=!0}}))})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xHeaderMenu",{isSticky:!1,stickyCalulating:!1,openHamburgerMenu:!1,isTouch:!!("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),sectionId:"",stickyType:"none",lastScrollTop:0,themeModeChanged:!1,showLogoTransparent:!0,offsetTop:0,clickedHeader:!1,mobileHeaderLayout:"",overlay:!1,scrollDir:"",isTransparent:!1,isMenuOpen:!1,mobileDock:document.getElementsByClassName("section-mobile-dock")[0],hasMobileDock(){return document.getElementsByClassName("section-mobile-dock").length>0},renderAjax(el,id,element){fetch(`${window.location.pathname}?sections=${id}`).then(response=>response.json()).then(response=>{let html=getSectionInnerHTML(response[id],element);el?.closest('[data-breakpoint="tablet"]')&&(html=html?.replace('id="search-in-modal"','id="search-in-modal-mobile"')),el.innerHTML=html})},setPosition(el,level,hamburger=!1){let spacing=0;hamburger?level=level-.5:level=level-1,requestAnimationFrame(()=>{const elm=el.closest(".tree-menu"),widthEl=elm.getElementsByClassName("toggle-menu")[0],elRect=elm.getBoundingClientRect();var left=elRect.left-widthEl.offsetWidth*level<0,right=elRect.right+widthEl.offsetWidth*level>(window.innerWidth||document.documentElement.clientWidth);document.querySelector("body").classList.contains("rtl")?left?(el.classList.add("right-0"),widthEl.classList.add("left-0"),elm.classList.remove("position-left")):(el.classList.add("left-0"),widthEl.classList.add("right-0"),elm.classList.add("position-left")):right?(el.classList.add("left-0"),widthEl.classList.add("right-0"),elm.classList.add("position-left")):(el.classList.add("right-0"),widthEl.classList.add("left-0"),elm.classList.remove("position-left"))})},resizeWindow(el,level,hamburger=!1){const onResize=((func,wait)=>{let timeout;return function(...args){clearTimeout(timeout),timeout=setTimeout(()=>func.apply(this,args),wait)}})(()=>{this.setPosition(el,level,hamburger)},100);addEventListener("resize",onResize)},selectItem(el,isSub=!1){this.isTransparent?el.style.setProperty("--header-container-height",document.getElementById("sticky-header-content").offsetHeight+"px"):el.style.setProperty("--header-container-height",document.getElementById("x-header-container").offsetHeight+"px"),el.closest(".toggle-menu")&&el.style.setProperty("--mega-menu-height",el.offsetTop+el.clientHeight+"px"),this.setAnimationMenu(el,isSub);const itemSelector=isSub?".toggle-menu-sub":".toggle-menu";var items=isSub?el.closest(".toggle-menu").querySelectorAll(itemSelector):document.querySelectorAll(itemSelector);if(isSub){for(var subMenuLinks=el.parentElement.querySelectorAll(".sub-menu
1-item"),i=0;i<subMenuLinks.length;i++)subMenuLinks[i].classList.remove("is-active");el.classList.add("is-active")}for(var i=0;i<items.length;i++)isSub?(items[i].classList.remove("open"),items[i].classList.add("toggle-menu-sub-hidden")):(items[i].classList.add("toggle-menu-hidden"),items[i].querySelector(".toggle-menu-sub.open")?.classList.add("toggle-menu-sub-hidden"));let toggleMenu=el.querySelector(itemSelector);toggleMenu&&(isSub?(el.closest(".toggle-menu").classList.contains("mega-menu-vertical")&&toggleMenu.classList.add("open"),toggleMenu.classList.remove("toggle-menu-sub-hidden")):(toggleMenu.classList.remove("toggle-menu-hidden"),el.querySelector(".toggle-menu-sub.open")?.classList.remove("toggle-menu-sub-hidden"))),this.toggleOverlay()},toggleOverlay(){let countMenu=document.querySelectorAll(".toggle-menu"),countMenuHidden=document.querySelectorAll(".toggle-menu-hidden");countMenu.length==countMenuHidden.length?this.overlay=!1:this.overlay=!0},hideMenu(el,isSub=!1){var items=isSub?document.querySelectorAll(".toggle-menu-sub"):document.querySelectorAll(".toggle-menu");if(isSub)for(var subMenuLinks=el.parentElement.querySelectorAll(".sub-menu-item"),i=0;i<subMenuLinks.length;i++)subMenuLinks[i].classList.remove("is-active");else{const itemClicked=document.querySelector(".clicked");itemClicked&&itemClicked.classList.remove("clicked")}for(var i=0;i<items.length;i++)isSub?items[i].classList.add("toggle-menu-sub-hidden"):(items[i].classList.add("toggle-menu-hidden"),items[i].querySelector(".toggle-menu-sub.open")?.classList.add("toggle-menu-sub-hidden"));this.toggleOverlay(),this.isMenuOpen=!1},hideMenuHorizontal(el){el.querySelector(".toggle-menu-sub")&&(el.querySelector(".toggle-menu-sub").classList.contains("toggle-menu-sub-hidden")||(el.querySelector(".click-sub")?.classList.remove("click-sub"),this.hideMenu(el,!0)))},touchItem(el,isSub=!1){const touchClass=isSub?"touched-sub":"touched";el.addEventListener("touchend",e=>{if(el.classList.contains(touchClass))window.location.replace(el.getAttribute("href"));else{e.preventDefault();for(var dropdown=document.querySelectorAll(`.${touchClass}`),i=0;i<dropdown.length;i++)dropdown[i].classList.remove(touchClass);el.classList.add(touchClass),this.selectItem(el.closest(".has-dropdown"),isSub)}})},clickItem(el,e,isSub=!1,isMenu,open_new_window=!1){const clickClass=isSub?"click-sub":"clicked";if(e.preventDefault(),el.classList.contains(clickClass))this.hideMenu();else{this.isMenuOpen=!0;for(var dropdown=document.querySelectorAll(`.${clickClass}`),i=0;i<dropdown.length;i++)dropdown[i].classList.remove(clickClass);el.classList.add(clickClass),isMenu||this.selectItem(el.closest(".has-dropdown"),isSub)}},initSticky(el,sectionId,stickyType,transparent){this.isTransparent=transparent,this.sectionId=sectionId,this.stickyType=stickyType,this.offsetTop=el.offsetTop,this.isSticky?document.querySelector("#sticky-header").classList.contains("on-scroll-up-animation")&&document.querySelector("#sticky-header").classList.contains("header-up")?this.setVariableHeightHeader(!1):this.setVariableHeightHeader(!0):this.setVariableHeightHeader(!1),window.addEventListener("resize",()=>{transparent||(el.style.height=document.getElementById("sticky-header").offsetHeight+"px"),this.isSticky?document.querySelector("#sticky-header").classList.contains("on-scroll-up-animation")&&document.querySelector("#sticky-header").classList.contains("header-up")?this.setVariableHeightHeader(!1):this.setVariableHeightHeader(!0):this.setVariableHeightHeader(!1),this.setPositionTop()}),this.setPositionTop(),el.style.height=document.getElementById("sticky-header").offsetHeight+"px"},setPositionTop(){let top_height=0,announcement_height=0,header_height=0;const announcement=document.querySelector("#x-announcement"),header=document.querySelector("#x-header-container"),sectionAnnouncement=document.querySelector(".section-announcement"),stickyHeader=document.querySelector("#sticky-header");if(this.setTopStickyHeader(),announcement&&announcement.dataset.isSticky=="true"&&(announcement_height=announcement.offsetHeight,header.style.setProperty("--announcement-height",announcement_height+"px"),Alpine.store("xMiniCart").open?sectionAnnouncement.style.zIndex=55:setTimeout(()=>{sectionAnnouncement.style.zIndex=61},500),sectionAnnouncement.style.top="0px"),header.dataset.isSticky=="true"&&(header_height=stickyHeader.offsetHeight),document.querySelectorAll(".section-header ~ .section-announcement").length>0)this.isSticky?stickyHeader.classList.contains("header-up")?(stickyHeader.style.top="calc(-1 * (var(--top-header) + var(--announcement-height)))",sectionAnnouncement.style.top="0px"):(stickyHeader.style.top="0px",sectionAnnouncement.style.top=header_height+"px"):sectionAnnouncement.style.top="0px";else if(document.querySelectorAll(".section-announcement ~ .section-header").length>0){const xAnnouncementEl=document.getElementById("x-announcement");xAnnouncementEl&&(xAnnouncementEl.style.zIndex=55),this.isSticky&&(stickyHeader.classList.contains("header-up")?stickyHeader.style.top="calc(-1 * (var(--top-header) + var(--announcement-height)))":stickyHeader.style.top=announcement_height+"px")}else this.isSticky&&(stickyHeader.classList.contains("header-up")?stickyHeader.style.top="calc(-1 * (var(--top-header) + var(--announcement-height)))":stickyHeader.style.top=announcement_height+"px")},handleAlwaysSticky(){const scrollPos=window.scrollY||document.documentElement.scrollTop,stickyLine=document.getElementById(this.sectionId).offsetTop;scrollPos>stickyLine&&!this.mobileDockExists&&this.addStickyHeader()},async handelOnScrollSticky(){const scrollTop=window.scrollY||document.documentElement.scrollTop;scrollTop<this.offsetTop&&requestAnimationFrame(()=>{document.getElementById("sticky-header").classList.remove("sticky-header")}),Math.abs(scrollTop-this.lastScrollTop)>10&&(scrollTop<this.lastScrollTop?(this.scrollDir="up",document.getElementById("sticky-header").classList.remove("header-up","opacity-0"),this.setVariableHeightHeader(!0),await new Promise(r=>setTimeout(r,250))):this.themeModeChanged||(this.scrollDir="down",document.getElementById("sticky-header").classList.add("header-up"),this.setVariableHeightHeader(!1),await new Promise(r=>setTimeout(r,250))),this.lastScrollTop=scrollTop),this.themeModeChanged=!1,this.setPositionTop()}
1,addStickyHeader(){if(window.innerWidth<768&&this.hasMobileDock()){this.isSticky=!1,requestAnimationFrame(()=>{document.getElementById("sticky-header")?.classList.remove("sticky-header","reduce-logo-size","always-animation","on-scroll-up-animation"),this.setVariableHeightHeader(!1),this.setPositionTop()});return}let isMiniCartOpen=!1;Alpine.store("xMiniCart").open&&this.stickyType!="on-scroll-up"&&(isMiniCartOpen=!0,requestAnimationFrame(()=>{Alpine.store("xMiniCart").hideCart()})),requestAnimationFrame(()=>{document.getElementById("sticky-header").classList.add("sticky-header","reduce-logo-size"),this.isSticky=!0,this.showLogoTransparent=!1}),requestAnimationFrame(()=>{let stickyEl=document.getElementById("sticky-header");this.stickyType=="on-scroll-up"&&setTimeout(()=>{stickyEl.classList.add("on-scroll-up-animation")},250),(!Alpine.store("xMiniCart").open||window.innerWidth>768)&&(this.stickyType=="always"||this.stickyType=="reduce-logo-size")&&stickyEl.classList.add("always-animation")}),isMiniCartOpen&&requestAnimationFrame(()=>{Alpine.store("xMiniCart").openCart()}),requestAnimationFrame(()=>{this.setPositionTop()})},removeStickyHeader(){const scrollPos=window.scrollY||document.documentElement.scrollTop,stickyLine=document.getElementById(this.sectionId)?.offsetTop;scrollPos<=stickyLine&&(this.isSticky=!1,document.getElementById("sticky-header-content")?.classList.contains("sticky-header-active")?this.showLogoTransparent=!1:this.showLogoTransparent=!0,document.getElementById("sticky-header-content")?.classList.contains("background-header")||(this.clickedHeader=!1),requestAnimationFrame(()=>{document.getElementById("sticky-header").classList.remove("sticky-header","reduce-logo-size","always-animation","on-scroll-up-animation"),this.setVariableHeightHeader(!1),this.setPositionTop()})),window.requestAnimationFrame(()=>this.removeStickyHeader())},handleChangeThemeMode(){this.themeModeChanged=!0,this.reCalculateHeaderHeight()},reCalculateHeaderHeight(){this.isTransparent||(document.getElementById("x-header-container").style.height=document.getElementById("sticky-header").offsetHeight+"px")},setVariableHeightHeader(sticky){let root=document.documentElement;if(sticky){let height_header=document.getElementById("sticky-header")?document.getElementById("sticky-header").offsetHeight:0;document.querySelector("#x-announcement")&&document.querySelector("#x-announcement")?.dataset.isSticky=="true"&&(height_header=document.querySelector(".section-announcement").offsetHeight+height_header),root.style.setProperty("--height-header",height_header+"px")}else document.querySelector("#x-announcement")&&document.querySelector("#x-announcement")?.dataset.isSticky=="true"?root.style.setProperty("--height-header",document.querySelector(".section-announcement").offsetHeight+"px"):root.style.setProperty("--height-header","0px")},setTopStickyHeader(){let root=document.documentElement,top_height=document.getElementById("sticky-header-content").offsetHeight;root.style.setProperty("--top-header",top_height+"px")},setHeightScroll(el,index){let toggleMenu=el.querySelector(".toggle-menu-sub");if(el.classList.contains("sub-menu-item")||(toggleMenu=el.closest(".sub-menu-item").querySelector(".toggle-menu-sub")),toggleMenu){if(index){index==1&&el.parentElement.getBoundingClientRect().height<toggleMenu.getBoundingClientRect().height&&(el.parentElement.style.height=toggleMenu.getBoundingClientRect().height.toFixed(2)+"px");return}el.parentElement.style.height="auto",el.parentElement.getBoundingClientRect().height<toggleMenu.getBoundingClientRect().height&&(el.parentElement.style.height=toggleMenu.getBoundingClientRect().height.toFixed(2)+"px")}},setAnimationMenu(element,isSub){let el=element;if(isSub&&(el=el.closest(".toggle-menu").closest(".has-dropdown")),el.classList.contains("tabbed-animation-change"))if(isSub==!1){if(el.querySelector(".toggle-menu")&&el.querySelector(".toggle-menu").children[0]){let subMenuHeight=el.querySelector(".toggle-menu")?.children[0].querySelector(".toggle-menu-sub")?.clientHeight,initHeight=el.style.getPropertyValue("--init-menu-height");subMenuHeight>initHeight?el.style.setProperty("--menu-height",subMenuHeight+"px"):el.style.setProperty("--menu-height",initHeight+"px")}}else{let subMenuHeight=element.querySelector(".toggle-menu-sub")?.clientHeight,initHeight=el.style.getPropertyValue("--init-menu-height");subMenuHeight>initHeight?el.querySelector(".toggle-menu").style.setProperty("--menu-height",subMenuHeight+"px"):el.querySelector(".toggle-menu").style.setProperty("--menu-height",initHeight+"px")}else if(isSub==!1){let menuHeight=el.style.getPropertyValue("--init-menu-height")?el.style.getPropertyValue("--init-menu-height"):el.querySelector(".toggle-menu")?.children[0]?.clientHeight;el.style.setProperty("--menu-height",menuHeight+"px")}},initToggleMenuHeight(el){let menuHeight=el.querySelector(".toggle-menu")?.children[0]?.clientHeight;el.style.setProperty("--init-menu-height",menuHeight)},tongleHorizontalHeight(el){let height=el.querySelector(".toggle-menu-sub")?.offsetHeight,menuHeight=el.style.getPropertyValue("--mega-menu-height").replace("px",""),initHeight=window.getComputedStyle(el).getPropertyValue("--init-menu-height");
1Number(height)+Number(menuHeight)>Number(initHeight)?el.closest(".toggle-menu").style.setProperty("--menu-height",Number(height)+Number(menuHeight)+10+"px"):el.closest(".toggle-menu").style.setProperty("--menu-height",Number(initHeight)+"px")}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xMobileNav",{show:!1,loading:!1,currentMenuLinks:[],open(){this.show=!0,Alpine.store("xPopup").open=!0},close(){this.show=!1,Alpine.store("xPopup").close()},setActiveLink(linkId){this.currentMenuLinks.push(linkId)},removeActiveLink(linkId){const index=this.currentMenuLinks.indexOf(linkId);index!==-1&&this.currentMenuLinks.splice(index,1)},resetMenu(){this.currentMenuLinks=[]},scrollTop(el=null){document.getElementById("menu-navigation").scrollTop=0,el&&(el.closest(".scrollbar-body").scrollTop=0)}}),Alpine.store("xPopup",{open:!1,setWidthScrollbar(){const root=document.documentElement,clientWidth=root.clientWidth,width=Math.abs(window.innerWidth-clientWidth);root.style.setProperty("--width-scrollbar",width+"px")},close(){document.dispatchEvent(new CustomEvent("eurus:popup:close")),setTimeout(()=>{this.open=!1},500)}}),Alpine.store("xShowCookieBanner",{show:!1}),Alpine.store("xMiniCart",{open:!1,type:"",loading:!1,needReload:!1,reLoad(){this.loading=!0;const sections=Alpine.store("xCartHelper").getSectionsToRender().map(s=>s.id).join(",");fetch(`${window.location.pathname}?sections=${sections}`).then(response=>response.json()).then(response=>{requestAnimationFrame(()=>{setTimeout(()=>{Alpine.store("xCartHelper").getSectionsToRender().forEach((section=>{section.selector.split(",").forEach(selector=>{const sectionElement=document.querySelector(selector);sectionElement&&response[section.id]&&(sectionElement.innerHTML=getSectionInnerHTML(response[section.id],selector))})})),this.loading=!1},0)})})},openCart(){window.location.pathname!="/cart"&&(requestAnimationFrame(()=>{Alpine.store("xQuickView")&&Alpine.store("xQuickView").show&&(Alpine.store("xQuickView").show=!1)}),requestAnimationFrame(()=>{document.getElementById("sticky-header").classList.remove("on-scroll-up-animation"),(window.innerWidth<768||this.type=="drawer")&&setTimeout(()=>{Alpine.store("xPopup").open=!0},50),requestAnimationFrame(()=>{document.getElementById("sticky-header").classList.remove("header-up"),this.open=!0,document.querySelector(".section-announcement")&&(document.querySelector(".section-announcement").style.zIndex=55)}),Alpine.store("xHeaderMenu").stickyType=="on-scroll-up"&&setTimeout(()=>{requestAnimationFrame(()=>{document.getElementById("sticky-header").classList.add("on-scroll-up-animation")})},200)}))},hideCart(){requestAnimationFrame(()=>{this.open=!1,Alpine.store("xPopup").close()})}}),Alpine.store("xModal",{activeElement:"",focused:!1,setActiveElement(element){this.activeElement=element},focus(container,elementFocus){this.focused=!0,Alpine.store("xFocusElement").trapFocus(container,elementFocus)},removeFocus(){this.focused=!1;const openedBy=document.getElementById(this.activeElement);Alpine.store("xFocusElement").removeTrapFocus(openedBy)}}),Alpine.store("xFocusElement",{focusableElements:['button, [href], input, select, textarea, [tabindex]:not([tabindex^="-"])'],listeners:{},trapFocus(container,elementFocus){if(window.innerWidth<1025)return;let c=document.getElementById(container),e=document.getElementById(elementFocus);this.listeners=this.listeners||{};const elements=Array.from(c.querySelectorAll(this.focusableElements));var first=elements[0],last=elements[elements.length-1];this.removeTrapFocus(),this.listeners.focusin=event=>{event.target!==c&&event.target!==last&&event.target!==first||document.addEventListener("keydown",this.listeners.keydown)},this.listeners.focusout=()=>{document.removeEventListener("keydown",this.listeners.keydown)},this.listeners.keydown=e2=>{e2.code.toUpperCase()==="TAB"&&(e2.target===last&&!e2.shiftKey&&(e2.preventDefault(),first.focus()),(e2.target===first||e2.target==c)&&e2.shiftKey&&(e2.preventDefault(),last.focus()))},document.addEventListener("focusout",this.listeners.focusout),document.addEventListener("focusin",this.listeners.focusin),e.focus()},removeTrapFocus(elementToFocus=null){window.innerWidth<1025||(document.removeEventListener("focusin",()=>{document.addEventListener("keydown",this.listeners.focusin)}),document.removeEventListener("focusout",()=>{document.removeEventListener("keydown",this.listeners.focusout)}),document.removeEventListener("keydown",this.listeners.keydown),elementToFocus&&elementToFocus.focus())}}),Alpine.data("xTruncateText",()=>({truncateEl:"",truncateInnerEl:"",truncated:!1,truncatable:!1,label:"",expanded:!1,load(truncateEl){const truncateRect=truncateEl.getBoundingClientRect();truncateEl.style.setProperty("--truncate-height",`${truncateRect.height}px`)},setTruncate(element){element.offsetHeight<element.scrollHeight||element.offsetWidth<element.scrollWidth?(this.truncated=!0,this.truncatable=!0,this.expanded=!1):(this.truncated=!1,this.truncatable=!1,this.expanded=!0)},open(el,newLabel){const truncateEl=el.closest(".truncate-container").querySelector(".truncate-text");if(this.expanded=!0,this.label=newLabel,truncateEl.classList.contains("truncate-expanded"))this.truncated=!0;else{const truncateInnerEl=truncateEl.querySelector(".truncate-inner");window.requestAnimationFrame(()=>{const truncateInnerRect=truncateInnerEl.getBoundingClientRect();truncateEl.style.setProperty("--truncate-height-expanded",`${truncateInnerRect.height}px`),truncateEl.classList.add("truncate-expanded")}),this.truncated=!1}},close(el,newLabel,isQuickview=!1){this.label=newLabel;const truncateEl=el.closest(".truncate-container").querySelector(".truncate-text"),isInViewport=()=>{const rect=truncateEl.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth)};if(this.truncated=!0,!isInViewport()&&!isQuickview){const scrollPosition=truncateEl.getBoundingClientRect().top+window.scrollY-500;window.scrollTo({top:scrollPosition,behavior:"smooth"}),truncateEl.style.transition="none",setTimeout(()=>{truncateEl.style.transition=""},1e3)}truncateEl.classList.remove("truncate-expanded"),this.expanded=!1}})),Alpine.store("xPopupPriceDetail",{open:!1,cachedResults:[],show(event,productID,price,priceMax,priceMiddle,priceMin,shopUrl,pageHandle){event.preventDefault();let content=document.getElementById("popup-price-content");
1if(this.cachedResults[productID])return content.innerHTML=this.cachedResults[productID],this.open=!0,!0;let url=`${shopUrl}/pages/${pageHandle}`;fetch(url,{method:"GET"}).then(response=>response.text()).then(responseText=>{let updatedContent=new DOMParser().parseFromString(responseText,"text/html").querySelector(".page__container .page__body>div").innerHTML.replace("{price}",`${price}`).replace("{max_price}",`${priceMax}`).replace("{middle_price}",`${priceMiddle}`).replace("{min_price}",`${priceMin}`);content.innerHTML=updatedContent,this.cachedResults[productID]=updatedContent}).finally(()=>{this.open=!0})},close(){this.open=!1}}),Alpine.store("xEstimateDelivery",{day:0,hour:0,minute:0,noti:"",countdownCutOffTime(cutOffHour,cutOffMinute,hrsText,minsText,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage){if(this.noti!="")return;const holidayArray=holidayList?holidayList.split(",").map(holiday=>{const parts=holiday.trim().split(" "),day=parts.pop().padStart(2,"0");return`${parts.join(" ")} ${day}`}):[],now=new Date,currentHour=now.getHours(),currentMinute=now.getMinutes(),current=new Date(now.getFullYear(),now.getMonth(),now.getDate(),currentHour,currentMinute),cutOff=new Date(now.getFullYear(),now.getMonth(),now.getDate(),cutOffHour,cutOffMinute);if(current>=cutOff&&cutOff.setDate(cutOff.getDate()+1),calculationType=="working"){let isInvalid=!0;for(;isInvalid;){if(isInvalid=!1,excludeDay==="saturday_sunday"&&(cutOff.getDay()===6||cutOff.getDay()===0)){cutOff.getDay()===6?cutOff.setDate(cutOff.getDate()+2):cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="saturday"&&cutOff.getDay()===6){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="sunday"&&cutOff.getDay()===0){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(holidayArray.length>0){const dayOfMonth=cutOff.getDate(),dateString=`${new Intl.DateTimeFormat(currentLanguage,{month:"long"}).format(cutOff)} ${dayOfMonth<10?`0${dayOfMonth}`:dayOfMonth}`;if(holidayArray.includes(dateString)){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}}}}const diffMs=cutOff-current;return this.day=Math.floor(diffMs/1e3/60/60/24),this.hour=Math.floor(diffMs/1e3/60/60%24),this.minute=Math.floor(diffMs/1e3/60%60),this.noti=this.day>0?this.day+" "+(this.day>1?daysText:dayText)+" ":"",this.noti+=this.hour>0?this.hour+" "+(this.hour>1?hrsText:hrText)+" "+this.minute+" "+(this.minute>1?minsText:minText):this.minute+" "+(this.minute>1?minsText:minText),this.noti},calculateCutOffTime(el,cutOffHour,cutOffMinute,hrsText,minsText,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage){const holidayArray=holidayList?holidayList.split(",").map(holiday=>{const parts=holiday.trim().split(" "),day2=parts.pop().padStart(2,"0");return`${parts.join(" ")} ${day2}`}):[],now=new Date,currentHour=now.getHours(),currentMinute=now.getMinutes(),current=new Date(now.getFullYear(),now.getMonth(),now.getDate(),currentHour,currentMinute),cutOff=new Date(now.getFullYear(),now.getMonth(),now.getDate(),cutOffHour,cutOffMinute);if(current>=cutOff&&cutOff.setDate(cutOff.getDate()+1),calculationType=="working"){let isInvalid=!0;for(;isInvalid;){if(isInvalid=!1,excludeDay==="saturday_sunday"&&(cutOff.getDay()===6||cutOff.getDay()===0)){cutOff.getDay()===6?cutOff.setDate(cutOff.getDate()+2):cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="saturday"&&cutOff.getDay()===6){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="sunday"&&cutOff.getDay()===0){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(holidayArray.length>0){const dayOfMonth=cutOff.getDate(),dateString=`${new Intl.DateTimeFormat(currentLanguage,{month:"long"}).format(cutOff)} ${dayOfMonth<10?`0${dayOfMonth}`:dayOfMonth}`;if(holidayArray.includes(dateString)){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}}}}const diffMs=cutOff-current,day=Math.floor(diffMs/1e3/60/60/24),hour=Math.floor(diffMs/1e3/60/60%24),minute=Math.floor(diffMs/1e3/60%60);let noti=day>0?day+" "+(day>1?daysText:dayText)+" ":"";noti+=hour>0?hour+" "+(hour>1?hrsText:hrText)+" "+minute+" "+(minute>1?minsText:minText):minute+" "+(minute>1?minsText:minText),this.noti=noti,el.value=el.value.replace("time_to_cut_off",noti)}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xCartAnalytics",{viewCart(){fetch("/cart.js").then(response=>response.text()).then(cart=>{cart=JSON.parse(cart),cart.items.length>0&&Shopify.analytics.publish("view_cart",{cart})})}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xCustomerEvent",{fire(eventName,el,data){if(Shopify.designMode)return;const formatedData=data||xParseJSON(el.getAttribute("x-customer-event-data"));Shopify.analytics.publish(eventName,formatedData)}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xSplide",{load(el,configs){const initSlider=()=>{const id=el.getAttribute("id");configs.classes!=null&&(configs.classes.arrow||(configs.classes.arrow="arrow w-8 h-8 p-2 absolute z-10 top-1/2 -translate-y-1/2 hidden md:flex items-center justify-center"),configs.classes.next||(configs.classes.next="right-0"),configs.classes.prev||(configs.classes.prev="-rotate-180"));let splide=new Splide("#"+id,configs);if(configs.thumbs){let thumbsRoot=document.getElementById(configs.thumbs),thumbs=thumbsRoot.getElementsByClassName("x-thumbnail"),current,_this=this;for(let i=0;i<thumbs.length;i++)thumbs[i]==current?thumbs[i].classList.remove("opacity-30"):thumbs[i].classList.add("opacity-30"),thumbs[i].addEventListener("click",function(){_this.moveThumbn
1ail(i,thumbs[i],thumbsRoot,configs.thumbs_direction,configs.direction),splide.go(i)});splide.on("refresh",function(){for(let i=0;i<thumbs.length;i++)thumbs[i].removeEventListener("click",function(){_this.moveThumbnail(i,thumbs[i],thumbsRoot2,configs.thumbs_direction,configs.direction),splide.go(i)});let thumbsRoot2=document.getElementById(configs.thumbs),thumbsNew=thumbsRoot2.getElementsByClassName("x-thumbnail");for(let i=0;i<thumbsNew.length;i++)i==0?thumbsNew[i].classList.remove("opacity-30"):thumbsNew[i].classList.add("opacity-30"),thumbsNew[i].addEventListener("click",function(){_this.moveThumbnail(i,thumbsNew[i],thumbsRoot2,configs.thumbs_direction,configs.direction),splide.go(i)})}),splide.on("mounted move",function(){let thumbnail=thumbs[splide.index];thumbnail&&(current&&current.classList.add("opacity-30"),thumbnail.classList.remove("opacity-30"),current=thumbnail,_this.moveThumbnail(splide.index,thumbnail,thumbsRoot,configs.thumbs_direction,configs.direction))})}if(configs.hotspot){let hotspots=document.getElementById(configs.hotspot).getElementsByClassName("x-hotspot"),current;if(configs.disableHoverOnTouch&&("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints))for(let i=0;i<hotspots.length;i++)hotspots[i].addEventListener("click",function(){splide.go(i)});else for(let i=0;i<hotspots.length;i++)hotspots[i].addEventListener("mouseover",function(){splide.go(i)}),hotspots[i].addEventListener("focus",function(){splide.go(i)});splide.on("mounted move",function(){let hotspot=hotspots[splide.index];hotspot&&(current&&current.classList.remove("active-hotspot"),hotspot.classList.add("active-hotspot"),current=hotspot)})}if(configs.cardHover){let cardImage=document.getElementById(configs.cardHover);window.innerWidth>1024&&(cardImage.addEventListener("mousemove",function(e){let left=e.offsetX,width=cardImage.getBoundingClientRect().width,spacing=left/width,index=Math.floor(spacing*configs.maxSlide);splide.go(index)}),cardImage.addEventListener("mouseleave",function(e){splide.go(0)}))}if(configs.progressBar){var bar=splide.root.querySelector(".splide-progress-bar");splide.on("mounted move",function(){var end=configs.progressBar;configs.progressBarHeader&&(end=splide.Components.Slides.getLength());var rate=100*(splide.index/end);if(bar){var widthBar=window.getComputedStyle(bar).getPropertyValue("width").replace("px",""),widthProgressBar=window.getComputedStyle(bar.closest(".splide-progress")).getPropertyValue("width").replace("px",""),percentBar=100*(Number(widthBar)/Number(widthProgressBar)),rateBar=rate+percentBar,maxRate=100-percentBar;rateBar>100&&(rate=maxRate),document.querySelector("body").classList.contains("rtl")?bar.style.marginRight=rate+"%":bar.style.marginLeft=rate+"%"}})}if(el.classList.contains("card-product-img")&&splide.on("resized",function(){var height=splide.root.querySelector(".splide__track").offsetHeight;splide.Components.Slides.get().forEach(item=>{item.slide.style.height=height+"px"})}),configs.events&&configs.events.forEach(e=>{splide.on(e.event,e.callback)}),el.splide=splide,splide.mount(),configs.videoProduct){const move=splide.Components.Move;move.translate(move.toPosition(0))}configs.playOnHover&&(splide.Components.Autoplay.pause(),el.onmouseover=function(){splide.Components.Autoplay.play()},el.onmouseout=function(){splide.Components.Autoplay.pause()})};window.Eurus.loadedScript.has("slider")?window.Splide?initSlider():document.addEventListener("slider loaded",()=>{initSlider()}):deferScriptLoad("slider",window.Eurus.sliderScript,initSlider,!0)},togglePlayPause(el){if(!el||!el.splide||!el.splide.Components.Autoplay)return;const splide=el.splide,autoplay=splide.Components.Autoplay;autoplay.isPaused()?autoplay.play():(splide.go(0),autoplay.pause())},moveThumbnail(index,thumbnail,thumbsRoot,direction){thumbnail&&(direction=="vertical"?setTimeout(()=>{thumbsRoot.scrollTop=(index+1)*thumbnail.offsetHeight-thumbsRoot.offsetHeight*.5+thumbnail.offsetHeight*.5+index*6},50):thumbsRoot.scrollLeft=(index-2)*thumbnail.offsetWidth)}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xParallax",()=>({debounce(func,wait){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,func.apply(context,args)};clearTimeout(timeout),timeout=setTimeout(later,wait)}},load(disable){if(!disable&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window){let handleIntersect2=function(entries){entries.forEac
1h(function(entry){entry.isIntersecting?(el=entry.target,window.addEventListener("scroll",parallax,{passive:!0,capture:!1})):window.removeEventListener("scroll",parallax,{passive:!0,capture:!1})})};var handleIntersect=handleIntersect2;const observerOptions={root:null,rootMargin:"0px 0px",threshold:0};var observer=new IntersectionObserver(handleIntersect2,observerOptions),el;observer.observe(this.$el);var parallax=this.debounce(function(){var rect=el.getBoundingClientRect(),speed=window.innerHeight/el.parentElement.offsetHeight*20,shiftDistance=(rect.top-window.innerHeight)/speed,maxShiftDistance=el.parentElement.offsetHeight/11;(shiftDistance<-maxShiftDistance||shiftDistance>maxShiftDistance)&&(shiftDistance=-maxShiftDistance),el.style.transform="translate3d(0, "+shiftDistance+"px, 0)"},10)}}}))})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xDOM",{rePainting:null})})});
2//# sourceMappingURL=/cdn/shop/t/51/assets/theme.js.map?v=16178382323407779661791128405

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.