PageSourceSearch

https://snac.com/cdn/shop/t/10/assets/global.js?v=140284737970459042841783725749

js snac.com collected 2026-10-02 04:05:20 UTC 99,611 bytes, 2 lines download raw bytes

1window.themeDevice={mobile:window.matchMedia("(max-width: 749.98px)"),touchDevice:window.matchMedia("(hover: none) and (pointer: coarse)"),get isMobile(){return this.mobile.matches},get isTouchDevice(){return this.touchDevice.matches},get isTablet(){return!this.isMobile&&this.isTouchDevice},isRTL(element){return(element?.closest('[dir="rtl"]')||document.documentElement).dir==="rtl"}};const ON_CHANGE_DEBOUNCE_TIMER=300,PUB_SUB_EVENTS={cartRemove:"cart-remove",cartAdd:"cart-add",cartOpen:"cart-drawer-open",cartClose:"cart-drawer-closed",cartUpdate:"cart-update",quickViewOpen:"quick-view-open",quickViewClose:"quick-view-closed",quantityUpdate:"quantity-update",variantChange:"variant-change",cartError:"cart-error",optionValueSelectionChange:"option-value-selection-change"};let subscribers={};function subscribe(eventName,callback){return subscribers[eventName]===void 0&&(subscribers[eventName]=[]),subscribers[eventName]=[...subscribers[eventName],callback],function(){subscribers[eventName]=subscribers[eventName].filter(cb=>cb!==callback)}}function publish(eventName,data){let eventData={...data};if(eventName===PUB_SUB_EVENTS.cartUpdate&&(data.source==="product-form"?eventName=PUB_SUB_EVENTS.cartAdd:data.source==="cart-items"&&!data.variantId&&(eventName=PUB_SUB_EVENTS.cartRemove)),eventName===PUB_SUB_EVENTS.variantChange&&(eventData={...eventData.data},delete eventData.html),eventName===PUB_SUB_EVENTS.cartAdd&&(eventData.variantId=eventData.productVariantId,delete eventData.productVariantId),delete eventData.source,document.dispatchEvent(new CustomEvent(eventName,{detail:eventData})),subscribers[eventName]){const promises=subscribers[eventName].map(callback=>callback(data));return Promise.all(promises)}else return Promise.resolve()}class SectionId{static#separator="__";static parseId(qualifiedSectionId){return qualifiedSectionId.split(SectionId.#separator)[0]}static parseSectionName(qualifiedSectionId){return qualifiedSectionId.split(SectionId.#separator)[1]}static getIdForSection(sectionId,sectionName){return`${sectionId}${SectionId.#separator}${sectionName}`}}class HTMLUpdateUtility{static viewTransition(oldNode,newContent,preProcessCallbacks=[],postProcessCallbacks=[]){preProcessCallbacks?.forEach(callback=>callback(newContent));const newNodeWrapper=document.createElement("div");HTMLUpdateUtility.setInnerHTML(newNodeWrapper,newContent.outerHTML);const newNode=newNodeWrapper.firstChild,uniqueKey=Date.now();oldNode.querySelectorAll("[id], [form]").forEach(element=>{element.id&&(element.id=`${element.id}-${uniqueKey}`),element.form&&element.setAttribute("form",`${element.form.getAttribute("id")}-${uniqueKey}`)}),oldNode.parentNode.insertBefore(newNode,oldNode),oldNode.style.display="none",postProcessCallbacks?.forEach(callback=>callback(newNode)),setTimeout(()=>oldNode.remove(),500)}static setInnerHTML(element,html,stripTemplates=!0){element.innerHTML=html,element.querySelectorAll("script").forEach(oldScriptTag=>{const newScriptTag=document.createElement("script");Array.from(oldScriptTag.attributes).forEach(attribute=>{newScriptTag.setAttribute(attribute.name,attribute.value)}),newScriptTag.appendChild(document.createTextNode(oldScriptTag.innerHTML)),oldScriptTag.parentNode.replaceChild(newScriptTag,oldScriptTag)}),setTimeout(()=>{window.renderSelects(),window.loadDesktopOnlyTemplates(),window.stickersReinit?.()})}}(function(){(function(e,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?exports.NiceSelect=t():e.NiceSelect=t()})(self,(()=>(()=>{"use strict";var e={d:(t2,i2)=>{for(var s2 in i2)e.o(i2,s2)&&!e.o(t2,s2)&&Object.defineProperty(t2,s2,{enumerable:!0,get:i2[s2]})},o:(e2,t2)=>Object.prototype.hasOwnProperty.call(e2,t2),r:e2=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e2,"__esModule",{value:!0})}},t={};function i(e2){var t2=document.createEvent("MouseEvents");t2.initEvent("click",!0,!1),e2.dispatchEvent(t2)}function s(e2){var t2=document.createEvent("HTMLEvents");
1t2.initEvent("change",!0,!1),e2.dispatchEvent(t2)}function o(e2){var t2=document.createEvent("FocusEvent");t2.initEvent("focusin",!0,!1),e2.dispatchEvent(t2)}function n(e2){var t2=document.createEvent("FocusEvent");t2.initEvent("focusout",!0,!1),e2.dispatchEvent(t2)}function d(e2){var t2=document.createEvent("UIEvent");t2.initEvent("modalclose",!0,!1),e2.dispatchEvent(t2)}function l(e2,t2){t2=="invalid"?(c(this.dropdown,"invalid"),h(this.dropdown,"valid")):(c(this.dropdown,"valid"),h(this.dropdown,"invalid"))}function r(e2,t2){return e2[t2]!=null?e2[t2]:e2.getAttribute(t2)}function a(e2,t2){return!!e2&&e2.classList.contains(t2)}function c(e2,t2){if(e2)return e2.classList.add(t2)}function h(e2,t2){if(e2)return e2.classList.remove(t2)}e.r(t),e.d(t,{bind:()=>f,default:()=>u});var p={data:null,searchable:!1,showSelectedItems:!1};function u(e2,t2){this.el=e2,this.config=Object.assign({},p,t2||{}),this.data=this.config.data,this.selectedOptions=[],this.placeholder=r(this.el,"placeholder")||this.config.placeholder||"Select an option",this.searchtext=r(this.el,"searchtext")||this.config.searchtext||"Search",this.selectedtext=r(this.el,"selectedtext")||this.config.selectedtext||"selected",this.dropdown=null,this.multiple=r(this.el,"multiple"),this.disabled=r(this.el,"disabled"),this.create()}function f(e2,t2){return new u(e2,t2)}return u.prototype.create=function(){this.el.style.opacity="0",this.el.style.minWidth="0",this.el.setAttribute("tabindex","-1"),this.el.style.width="0",this.el.style.padding="0",this.el.style.height="0",this.data?this.processData(this.data):this.extractData(),this.renderDropdown(),this.bindEvent()},u.prototype.processData=function(e2){var t2=[];e2.forEach((e3=>{t2.push({data:e3,attributes:{selected:!!e3.selected,disabled:!!e3.disabled,optgroup:e3.value=="optgroup"}})})),this.options=t2},u.prototype.extractData=function(){var e2=this.el.querySelectorAll("option,optgroup"),t2=[],i2=[],s2=[];e2.forEach((e3=>{if(e3.tagName=="OPTGROUP")var s3={text:e3.label,value:"optgroup"};else{let t3=e3.innerText;e3.dataset.display!=null&&(t3=e3.dataset.display),s3={text:t3,value:e3.value,selected:e3.getAttribute("selected")!=null,disabled:e3.getAttribute("disabled")!=null}}var o2={selected:e3.getAttribute("selected")!=null,disabled:e3.getAttribute("disabled")!=null,optgroup:e3.tagName=="OPTGROUP"};t2.push(s3),i2.push({data:s3,attributes:o2})})),this.data=t2,this.options=i2,this.options.forEach((e3=>{e3.attributes.selected&&s2.push(e3)})),this.selectedOptions=s2},u.prototype.renderDropdown=function(){var e2=["nice-select",r(this.el,"class")||"",this.disabled?"disabled":"",this.multiple?"has-multiple":""];let t2='<div class="nice-select-search-box field">';t2+=`<input type="text" class="nice-select-search field__input visible-placeholder" placeholder="${this.searchtext}..." title="search"/>`,t2+="</div>";var i2=`<div class="${e2.join(" ")}" tabindex="${this.disabled?null:0}">`;i2+=`<span class="${this.multiple?"multiple-options":"current"}"></span>`,i2+='<div class="nice-select-dropdown custom-scrollbar">',i2+=`${this.config.searchable?t2:""}`,i2+='<ul class="nice-list"></ul>',i2+="</div>",i2+="</div>",this.el.insertAdjacentHTML("afterend",i2),this.dropdown=this.el.nextElementSibling,this._renderSelectedItems(),this._renderItems()},u.prototype._renderSelectedItems=function(){if(this.multiple){var e2="";this.config.showSelectedItems||this.config.showSelectedItems||window.getComputedStyle(this.dropdown).width=="auto"||this.selectedOptions.length<2?(this.selectedOptions.forEach((function(t3){e2+=`<span class="current">${t3.data.text}</span>`})),e2=e2==""?this.placeholder:e2):e2=this.selectedOptions.length+" "+this.selectedtext,this.dropdown.querySelector(".multiple-options").innerHTML=e2}else{var t2=this.selectedOptions.length>0?this.selectedOptions[0].data.text:this.placeholder;this.dropdown.querySelector(".current").innerHTML=t2}},u.prototype._renderItems=function(){var e2=this.dropdown.querySelector("ul");this.options.forEach((t2=>{e2.appendChild(this._renderItem(t2))}))},u.prototype._renderItem=function(e2){var t2=document.createElement("li");if(t2.innerHTML=e2.data.text,e2.attributes.optgroup)c(t2,"optgroup");else{t2.setAttribute("data-value",e2.data.value);var i2=["option",e2.attributes.selected?"selected":null,e2.attributes.disabled?"disabled":null];t2.addEventListener("click",this._onItemClicked.bind(this,e2)),t2.classList.add(...i2)}return e2.element=t2,t2},u.prototype.update=function(){if(this.extractData(),this.dropdown){var e2=a(this.dropdown,"open");this.dropdown.parentNode.removeChild(this.dropdown),this.create(),e2&&i(this.dropdown)}r(this.el,"disabled")?this.disable():this.enable()},u.prototype.disable=function(){this.disabled||(this.disabled=!0,c(this.dropdown,"disabled"))},u.prototype.enable=function(){this.disabled&&(this.disabled=!1,h(this.dropdown,"disabled"))},u.prototype.clear=function(){this.resetSelectValue(),this.selectedOptions=[],this._renderSelectedItems(),this.update(),s(this.el)},u.prototype.destroy=function(){this.dropdown&&(this.dropdown.parentNode.removeChild(this.dropdown),this.el.style.display="")},u.prototype.bindEvent=function(){this.dropdown.addEventListener("click",this._onClicked.bind(this)),this.dropdown.addEventListener("keydown",this._onKeyPressed.bind(this)),this.dropdown.addEventListener("focusin",o.bind(this,this.el)),this.dropdown.addEventListener("focusout",n.bind(this,this.el)),this.el.addEventListener("invalid",l.bind(this,this.el,"invali
1d")),window.addEventListener("click",this._onClickedOutside.bind(this)),this.config.searchable&&this._bindSearchEvent()},u.prototype._bindSearchEvent=function(){var e2=this.dropdown.querySelector(".nice-select-search");e2&&e2.addEventListener("click",(function(e3){return e3.stopPropagation(),!1})),e2.addEventListener("input",this._onSearchChanged.bind(this))},u.prototype._onClicked=function(e2){var t2,i2;if(e2.preventDefault(),a(this.dropdown,"open")?this.multiple||(h(this.dropdown,"open"),d(this.el)):(c(this.dropdown,"open"),t2=this.el,(i2=document.createEvent("UIEvent")).initEvent("modalopen",!0,!1),t2.dispatchEvent(i2)),a(this.dropdown,"open")){var s2=this.dropdown.querySelector(".nice-select-search");s2&&(s2.value="",s2.focus());var o2=this.dropdown.querySelector(".focus");h(o2,"focus"),c(o2=this.dropdown.querySelector(".selected"),"focus"),this.dropdown.querySelectorAll("ul li").forEach((function(e3){e3.style.display=""}))}else this.dropdown.focus()},u.prototype._onItemClicked=function(e2,t2){var i2=t2.target;a(i2,"disabled")||(this.multiple?a(i2,"selected")?(h(i2,"selected"),this.selectedOptions.splice(this.selectedOptions.indexOf(e2),1),this.el.querySelector(`option[value="${i2.dataset.value}"]`).removeAttribute("selected")):(c(i2,"selected"),this.selectedOptions.push(e2)):(this.selectedOptions.forEach((function(e3){h(e3.element,"selected")})),c(i2,"selected"),this.selectedOptions=[e2]),this._renderSelectedItems(),this.updateSelectValue())},u.prototype.updateSelectValue=function(){if(this.multiple){var e2=this.el;this.selectedOptions.forEach((function(t2){var i2=e2.querySelector(`option[value="${t2.data.value}"]`);i2&&i2.setAttribute("selected",!0)}))}else this.selectedOptions.length>0&&(this.el.value=this.selectedOptions[0].data.value);s(this.el)},u.prototype.resetSelectValue=function(){if(this.multiple){var e2=this.el;this.selectedOptions.forEach((function(t2){var i2=e2.querySelector(`option[value="${t2.data.value}"]`);i2&&i2.removeAttribute("selected")}))}else this.selectedOptions.length>0&&(this.el.selectedIndex=-1);s(this.el)},u.prototype._onClickedOutside=function(e2){this.dropdown.contains(e2.target)||(h(this.dropdown,"open"),d(this.el))},u.prototype._onKeyPressed=function(e2){var t2=this.dropdown.querySelector(".focus"),s2=a(this.dropdown,"open");if(e2.keyCode==13)i(s2?t2:this.dropdown);else if(e2.keyCode==40){if(s2){var o2=this._findNext(t2);o2&&(h(this.dropdown.querySelector(".focus"),"focus"),c(o2,"focus"))}else i(this.dropdown);e2.preventDefault()}else if(e2.keyCode==38){if(s2){var n2=this._findPrev(t2);n2&&(h(this.dropdown.querySelector(".focus"),"focus"),c(n2,"focus"))}else i(this.dropdown);e2.preventDefault()}else if(e2.keyCode==27&&s2)i(this.dropdown);else if(e2.keyCode===32&&s2)return!1;return!1},u.prototype._findNext=function(e2){for(e2=e2?e2.nextElementSibling:this.dropdown.querySelector(".list .option");e2;){if(!a(e2,"disabled")&&e2.style.display!="none")return e2;e2=e2.nextElementSibling}return null},u.prototype._findPrev=function(e2){for(e2=e2?e2.previousElementSibling:this.dropdown.querySelector(".list .option:last-child");e2;){if(!a(e2,"disabled")&&e2.style.display!="none")return e2;e2=e2.previousElementSibling}return null},u.prototype._onSearchChanged=function(e2){var t2=a(this.dropdown,"open"),i2=e2.target.value;if((i2=i2.toLowerCase())=="")this.options.forEach((function(e3){e3.element.style.display=""}));else if(t2){var s2=new RegExp(i2);this.options.forEach((function(e3){var t3=e3.data.text.toLowerCase(),i3=s2.test(t3);e3.element.style.display=i3?"":"none"}))}this.dropdown.querySelectorAll(".focus").forEach((function(e3){h(e3,"focus")})),c(this._findNext(null),"focus")},t})())),window.renderSelects=function(){window.matchMedia("(min-width: 750px)").matches?document.querySelectorAll("select.styled-select").forEach(select=>{select.classList.remove("styled-select"),select.classList.remove("styled-select-xs"),select.classList.add("nice__select"),NiceSelect.bind(select)}):document.querySelectorAll("select.styled-select-xs").forEach(select=>{select.classList.remove("styled-select"),select.classList.remove("styled-select-xs"),select.classList.add("nice__select"),NiceSelect.bind(select)})},document.addEventListener("DOMContentLoaded",window.renderSelects),Shopify.designMode&&document.addEventListener("shopify:section:load",window.renderSelects)})(),window.sectionInstances=new WeakMap,window.initScriptOnDemand=function(element,callback,threshold=300){window.theme?.settings.lazyLoadJs&&"IntersectionObserver"in window&&window.self===window.top?new IntersectionObserver((entries,obs)=>
1{for(const entry of entries)entry.isIntersecting&&(typeof callback=="function"&&requestAnimationFrame(()=>{"requestIdleCallback"in window?requestIdleCallback(()=>callback(),{timeout:300}):setTimeout(()=>callback(),0)}),obs.unobserve(entry.target))},{rootMargin:`0px 0px ${threshold}px 0px`}).observe(element):typeof callback=="function"&&requestAnimationFrame(()=>callback())};function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}document.querySelectorAll('[id^="Details-"] summary').forEach(summary=>{summary.setAttribute("role","button"),summary.setAttribute("aria-expanded",summary.parentNode.hasAttribute("open")),summary.nextElementSibling.getAttribute("id")&&summary.setAttribute("aria-controls",summary.nextElementSibling.id),summary.addEventListener("click",event=>{event.currentTarget.setAttribute("aria-expanded",!event.currentTarget.closest("details").hasAttribute("open"))}),!summary.closest("header-drawer, menu-drawer")&&summary.parentElement.addEventListener("keyup",onKeyUpEscape)});const trapFocusHandlers={};function trapFocus(container,elementToFocus=container,lastElement){var elements=getFocusableElements(container),first=elements[0],last=lastElement||elements[elements.length-1];removeTrapFocus(),trapFocusHandlers.focusin=event=>{event.target!==container&&event.target!==last&&event.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event){event.code.toUpperCase()==="TAB"&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),first.focus()),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),elementToFocus&&setTimeout(()=>{elementToFocus.focus(),elementToFocus.tagName==="INPUT"&&["search","text","email","url"].includes(elementToFocus.type)&&elementToFocus.value&&elementToFocus.setSelectionRange(0,elementToFocus.value.length)},300)}try{document.querySelector(":focus-visible")}catch{focusVisiblePolyfill()}function focusVisiblePolyfill(){const navKeys=["ARROWUP","ARROWDOWN","ARROWLEFT","ARROWRIGHT","TAB","ENTER","SPACE","ESCAPE","HOME","END","PAGEUP","PAGEDOWN"];let currentFocusedElement=null,mouseClick=null;window.addEventListener("keydown",event=>{navKeys.includes(event.code.toUpperCase())&&(mouseClick=!1)}),window.addEventListener("mousedown",event=>{mouseClick=!0}),window.addEventListener("focus",()=>{currentFocusedElement&&currentFocusedElement.classList.remove("focused"),!mouseClick&&(currentFocusedElement=document.activeElement,currentFocusedElement.classList.add("focused"))},!0)}function pauseAllMedia(){document.querySelectorAll(".js-youtube:not(.js-video-background)").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo:not(.js-video-background)").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video:not(.js-video-background)").forEach(video=>{video.paused||video.setAttribute("data-was-playing","true"),video.pause()}),document.querySelectorAll("product-model").forEach(model=>{if(model.modelViewerUI&&typeof model.modelViewerUI.pause=="function")try{model.modelViewerUI.pause()}catch{}})}function resumePreviouslyPlayingHTML5Video(){document.querySelectorAll('video[data-was-playing="true"]').forEach(video=>{video.muted=!0,video.play().catch(()=>{}),video.removeAttribute("data-was-playing")})}function loadTemplateContent(elem){return elem.querySelectorAll("template.deferred").forEach(template=>{if(template?.content?.childNodes){const fragment=document.createDocumentFragment();for(template.content.querySelectorAll("lazy-script").forEach(lazyScript=>{const script=document.createElement("script");script.textContent=lazyScript.textContent,Array.from(lazyScript.attributes).forEac
1h(attr=>{script.setAttribute(attr.name,attr.value)}),lazyScript.replaceWith(script)});template.content.firstChild;)fragment.appendChild(template.content.firstChild);template.parentNode.insertBefore(fragment,template.nextSibling),template.remove(),window.makeTablesResponsive(),window.renderSelects(),window.stickersReinit?.()}}),elem}document.addEventListener("DOMContentLoaded",()=>{document.body.addEventListener("click",event=>{const trigger=event.target.closest("[data-load-trigger]");if(!trigger)return;const selector=trigger.getAttribute("data-load-trigger"),template=document.querySelector(selector);template&&window.loadTemplateContent(template.parentNode)}),!("IntersectionObserver"in window)||window.self!==window.top?document.querySelectorAll("template.lazy-template").forEach(template=>{window.loadTemplateContent(template.parentNode)}):document.querySelectorAll("template.lazy-template").forEach(template=>{const margin=template.getAttribute("data-observe-margin")||"400px";new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{entry.isIntersecting&&(window.loadTemplateContent(entry.target.parentNode),observer2.unobserve(entry.target))})},{root:null,rootMargin:margin,threshold:0}).observe(template)})});function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&!elementToFocus.matches(".product__media-toggle")&&elementToFocus.focus()}function onKeyUpEscape(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");if(!openDetailsElement)return;const summaryElement=openDetailsElement.querySelector("summary");openDetailsElement.removeAttribute("open"),summaryElement.setAttribute("aria-expanded",!1),summaryElement.focus()}function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}function fetchConfig(type="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}function loadDesktopOnlyTemplates(){document.querySelectorAll("template.js-load-desktop-only").forEach(template=>{if(window.innerWidth>=750){const clone=document.importNode(template.content,!0);template.parentNode.replaceChild(clone,template)}})}typeof window.Shopify>"u"&&(window.Shopify={}),Shopify.bind=function(fn,scope){return function(){return fn.apply(scope,arguments)}},Shopify.setSelectorByValue=function(selector,value){for(var i=0,count=selector.options.length;i<count;i++){var option=selector.options[i];if(value==option.value||value==option.innerHTML)return selector.selectedIndex=i,i}},Shopify.addListener=function(target,eventName,callback){target.addEventListener?target.addEventListener(eventName,callback,!1):target.attachEvent("on"+eventName,callback)},Shopify.postLink=function(path,options){options=options||{};var method=options.method||"post",params=options.parameters||{},form=document.createElement("form");form.setAttribute("method",method),form.setAttribute("action",path);for(var key in params){var hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden"),hiddenField.setAttribute("name",key),hiddenField.setAttribute("value",params[key]),form.appendChild(hiddenField)}document.body.appendChild(form),form.submit(),document.body.removeChild(form)};class HTMLElementLazyInit extends HTMLElement{constructor(){super(),this.template=this.querySelector("template")}connectedCallback(){this.template?this.observeTemplateRemoval():this.init()}observeTemplateRemoval(){const observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.removedNodes.forEach(node=>{node===this.template&&(this.onTemplateRendered(),observer.disconnect())})})});this.template.parentNode&&observer.observe(this.template.parentNode,{childList:!0})}onTemplateRendered(){this.init()}}class QuantityInput extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.input.addEventListener("change",this.onInputChange.bind(this)),this.querySelectorAll("button").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this)))}quantityUpdateUnsubscriber=void 0;connectedCallback(){this.validateQtyRules(),this.quantityUpdateUnsubscriber=subscribe(PUB_SUB_EVENTS.quantityUpdate,this.validateQtyRules.bind(this))}disconnectedCallback(){this.quantityUpdateUnsubscriber&&this.quantityUpdateUnsubscriber()}onInputChange(event){this.validateQtyRules()}onButtonClick(event){event.preventDefault();const previousValue=this.input.value;event.target.name==="plus"?parseInt(this.input.dataset.min)>parseInt(this.input.step)&&this.input.value==0?this.input.value=this.input.dataset.min:this.input.stepUp():this.input.stepDown(),previousValue!==this.input.value&&this.input.dispatchEvent(this.changeEvent),this.input.dataset.min===previousValue&&event.target.name==="minus"&&(this.input.value=parseInt(this.input.min))}validateQtyRules(){const value=parseInt(this.input.value);if(this.input.min&&this.querySelector(".quantity__button[name='minus']").classList.toggle("disabled",parseInt(value)<=parseInt(this.input.min)),this.input.max){const max=parseInt(this.input.max);this.querySelector(".quantity__button[name='plus']").classList.toggle("disabled",value>=max)}}}customElements.define("quantity-input",QuantityInput);class MenuDrawer extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),document.addEventListener("shopify:section:load",()=>{this.mainDetailsToggle.classList.remove("menu-opening"),document.body.classList.remove("overflow-hidden")}),this.bindEvents()}bindEvents(){this.querySelectorAll("summary").forEach(summary=>summary.addEventListener("click",this.onSummaryClick.bind(this)))}onKeyUp(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");openDetailsElement&&(openDetailsElement===this.mainDetailsToggle?this.closeMenuDrawer(event,this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(openDetailsElement))}onSummaryClick(event){const summaryElement=event.currentTarget,detailsElement=summaryElement.parentNode,parentMenuElement=detailsElement.closest(".has-submenu"),isOpen=detailsElement.hasAttribute("open"),reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");function addTrapFocus(){if(summaryElement.closest("#menu-drawer")){const lastLi=summaryElement.nextElementSibling.querySelector(".menu-drawer__inner-submenu > .menu-drawer__menu > li:last-child");trapFocus(summaryElement.nextElementSibling,detailsElement.querySelector("button"),lastLi?.querySelector("summary"))}summaryElement.nextElementSibling.removeEventListener("transitionend",addTrapFocus)}detailsElement===this.mainDetailsToggle?(isOpen&&event.preventDefault(),isOpen?this.closeMenuDrawer(event,summaryElement):this.openMenuDrawer(summaryElement),window.matchMedia("(max-width: 989.98px)")&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)):setTimeout(()=>{detailsElement.classList.add("menu-opening"),summaryElement.setAttribute("aria-expanded",!0),parentMenuElement&&parentMenuElement.classList.add("submenu-open"),!reducedMotion||reducedMotion.matches?addTrapFocus():summaryElement.nextElementSibling.addEventListener("transitionend",addTrapFocus)},100)}openMenuDrawer(summaryElement){setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,summaryElement),document.body.classList.add("overflow-hidden")}closeMenuDrawer(event,elementToFocus=!1){event!==void 0&&(this.mainDetailsToggle.classList.remove("menu-opening"),document.body.classList.remove("overflow-hidden"),removeTrapFocus(elementToFocus),this.closeAnimation(this.mainDetailsToggle),event instanceof KeyboardEvent&&elementToFocus?.setAttribute("aria-expanded",!1))}onFocusOut(){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(event){const detailsElement=event.currentTarget.closest("details");detailsElement.classList.contains("menu-drawer-container")?this.mainDetailsToggle.querySelector("summary").click():this.closeSubmenu(detailsElement)}closeSubmenu(detailsElement){const parentMenuElement=detailsElement.closest(".submenu-open");parentMenuElement&&parentMenuElement.classList.remove("submenu-open"),detailsElement.classList.remove("menu-opening"),detailsElement.querySelector("summary").setAttribute("aria-expanded",!1),removeTrapFocus(detail
1sElement.querySelector("summary")),this.closeAnimation(detailsElement)}closeAnimation(detailsElement){let animationStart;const handleAnimation=time=>{if(animationStart===void 0&&(animationStart=time),time-animationStart<400)window.requestAnimationFrame(handleAnimation);else{detailsElement.removeAttribute("open");const closestDetails=detailsElement.closest("details[open]");if(closestDetails)if(closestDetails.matches(".js-header-drawer-sub")){const lastLi=closestDetails.querySelector(".menu-drawer__inner-submenu > .menu-drawer__menu > li:last-child");trapFocus(closestDetails.querySelector("summary").nextElementSibling,detailsElement.querySelector("summary"),lastLi?.querySelector("summary"))}else if(closestDetails.matches(".js-header-drawer-main")){const menuDrawer=document.getElementById("menu-drawer"),menuDrawerDisclosure=menuDrawer.querySelector("header-drawer .disclosure__button");trapFocus(menuDrawer,detailsElement.querySelector("summary"),menuDrawerDisclosure)}else trapFocus(closestDetails,detailsElement.querySelector("summary"))}};window.requestAnimationFrame(handleAnimation)}}customElements.define("menu-drawer",MenuDrawer);class HeaderDrawer extends MenuDrawer{constructor(){super()}bindEvents(){super.bindEvents(),this.querySelectorAll("button:not(.localization-selector):not(.country-selector__close-button):not(.country-filter__reset-button)").forEach(button=>button.addEventListener("click",this.onCloseButtonClick.bind(this)))}openMenuDrawer(summaryElement){this.header=this.header||document.querySelector(".section-header"),this.borderOffset=this.borderOffset||this.closest(".header-wrapper").classList.contains("header-wrapper--border-bottom")?1:0,document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)}px`),this.header.classList.add("menu-open"),setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),window.addEventListener("resize",this.onResize);const menuDrawerDisclosure=this.header.querySelector("header-drawer .disclosure__button");trapFocus(document.getElementById("menu-drawer"),summaryElement,menuDrawerDisclosure),document.body.classList.add("overflow-hidden")}closeMenuDrawer(event,elementToFocus){elementToFocus&&(super.closeMenuDrawer(event,elementToFocus),this.header.classList.remove("menu-open"),window.removeEventListener("resize",this.onResize),event.target.setAttribute("aria-expanded",!1))}onResize=()=>{this.header&&document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)}px`),document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)}}customElements.define("header-drawer",HeaderDrawer);class CustomNav extends HTMLElement{constructor(){super(),window.matchMedia("(hover: hover)").matches&&(this.listMenu=this.querySelector(".list-menu"),this.listMenu&&(this.mouseLeaveMenuHandler=this.onMouseMenuLeave.bind(this),this.listMenu.addEventListener("mouseleave",this.mouseLeaveMenuHandler)))}disconnectedCallback(){this.listMenu&&this.mouseLeaveMenuHandler&&this.listMenu.removeEventListener("mouseleave",this.mouseLeaveMenuHandler)}onMouseMenuLeave(){window.menuHoverIntentDelay=50}}customElements.define("custom-nav",CustomNav);class ModalDialog extends HTMLElement{constructor(){super(),this.isSocialVideoPopup=this.classList.contains("popup-modal--social-video"),this.addEventListener("click",this.handleComponentClick.bind(this)),this.dataset.preventClose||(this.addEventListener("keyup",event=>{event.code?.toUpperCase()==="ESCAPE"&&this.hide()}),this.classList.contains("media-modal")?this.addEventListener("pointerup",event=>{event.pointerType==="mouse"&&!event.target.closest("deferred-media, product-model")&&this.hide()}):this.addEventListener("click",event=>{event.target===this&&this.hide()}))}connectedCallback(){window.addEventListener("browserIsVeryIdle",()=>{this.dataset.section=this.closest(".shopify-section")?.id.replace("shopify-section-",""),window.loadTemplateContent(this)})}handleComponentClick(event){(event.target.closest('[id^="ModalClose-"]')||event.target.closest("[data-modal-close]"))&&this.hide(!1)}
1moveModal(){window.movedModals||(window.movedModals=[]),!window.movedModals.includes(this.id)&&window.requestAnimationFrame(()=>{this.closest(".shopify-section.no-move")||(window.movedModals.push(this.id),document.body.appendChild(this),window.loadTemplateContent(this))})}show(opener,modalClass){if(this.dataset.contentSelector){const content=[...document.querySelectorAll(this.dataset.contentSelector)],sectionContent=this.querySelector(".section-content");if(content.length&&sectionContent){const clonedContent=content.map(item=>{const clone=item.cloneNode(!0);return(clone.matches("video")?[clone]:[...clone.querySelectorAll("video")]).forEach(video=>{video.muted=!1,video.removeAttribute("muted"),video.autoplay=!1,video.removeAttribute("autoplay")}),clone});sectionContent.append(...clonedContent)}this.removeAttribute("data-content-selector")}this.moveModal(),window.loadTemplateContent(this),this.querySelectorAll("lazy-script").forEach(script=>script.loadScript()),this.querySelectorAll("deferred-media").forEach(deferredMedia=>{deferredMedia.loadContent?.()}),this.dataset.isAlert?this.setAttribute("open",""):(opener&&(this.openedBy=opener),setTimeout(()=>{const popup=this.querySelector(".template-popup");if(document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),popup&&popup.loadContent(),trapFocus(this,this.querySelector('[role="dialog"]')),window.pauseAllMedia(),this.classList.contains("quick-add-modal")&&publish("quick-buy-action-complete"),modalClass&&this.classList.add(modalClass),window.makeTablesResponsive(),this.isSocialVideoPopup){const openerVideo=opener.querySelector("video")||opener.closest("video"),sourceVideo=opener.querySelector("source")?.getAttribute("src"),seekTime=openerVideo?.currentTime||0;if(sourceVideo){const matchingVideo=[...this.querySelectorAll("video")].find(video=>[...video.querySelectorAll("source")].some(source=>source.getAttribute("src")===sourceVideo));if(matchingVideo){matchingVideo.scrollIntoView({block:"start",behavior:"instant"});const playMatchingVideo=()=>{matchingVideo.currentTime=seekTime;const playPromise=matchingVideo.play();playPromise!==void 0&&playPromise.catch(()=>{})};matchingVideo.readyState>=1?playMatchingVideo():(matchingVideo.addEventListener("loadedmetadata",playMatchingVideo,{once:!0}),matchingVideo.load())}}}},100))}hide(preventAnimation){const doHide=()=>{this.dataset.isAlert||(this.setAttribute("open",""),document.body.classList.remove("overflow-hidden"),this.openedBy&&removeTrapFocus(this.openedBy),window.pauseAllMedia()),document.body.dispatchEvent(new CustomEvent("modalClosed")),this.removeAttribute("open"),this.classList.remove("popup-modal--closing"),window.resumePreviouslyPlayingHTML5Video()};preventAnimation?doHide():(this.classList.add("popup-modal--closing"),setTimeout(doHide,320))}}customElements.define("modal-dialog",ModalDialog);class ProductCard extends HTMLElement{constructor(){super(),this.mouseEnterHandler=this.mouseEnterHandler||this.handleMouseEnter.bind(this),this.showSwatchHandler=this.showSwatchHandler||this.showSwatchImage.bind(this),this.hideSwatchHandler=this.hideSwatchHandler||this.hideSwatchImage.bind(this),this.hoverButtonHandler=this.hoverButtonHandler||this.clickHoverButton.bind(this),this.swatchesPreloaded=!1,this.hasSwatches=this.querySelector(".swatch[data-variant-media]")!==null,this.hoverButton=this.querySelector(".card__hover-button"),this.productForm=this.querySelector("product-form"),this.productBulkForm=this.querySelector("quick-add-bulk"),window.initScriptOnDemand(this,this.init.bind(this),0)}init(){this.hoverButton&&this.hoverButton.addEventListener("click",this.hoverButtonHandler),this.hasSwatches&&(this.createSwatchHoverImage(),this.addEventListener("mouseenter",this.mouseEnterHandler,{passive:!0}),this.addEventListener("mouseover",this.showSwatchHandler,{passive:!0}),this.addEventListener("mouseleave",this.hideSwatchHandler,{passive:!0}),this.addEventListener("focusin",this.showSwatchHandler,{passive:!0}),this.addEventListener("focusout",this.hideSwatchHandler,{passive:!0}),this.addEventListener("touchstart",this.showSwatchHandler,{passive:!0})),this.productForm&&customElements.whenDefined("product-form").then(()=>
1{this.productForm.init()}),this.productBulkForm&&customElements.whenDefined("quick-add-bulk").then(()=>{this.productBulkForm.init()})}disconnectedCallback(){this.hoverButton&&this.hoverButton.removeEventListener("click",this.hoverButtonHandler),this.hasSwatches&&(this.removeEventListener("mouseenter",this.mouseEnterHandler),this.removeEventListener("mouseover",this.showSwatchHandler),this.removeEventListener("mouseleave",this.hideSwatchHandler),this.removeEventListener("focusin",this.showSwatchHandler),this.removeEventListener("focusout",this.hideSwatchHandler),this.removeEventListener("touchstart",this.showSwatchHandler))}clickHoverButton(){this.hoverButton.setAttribute("aria-disabled",!0),this.hoverButton.classList.add("loading"),this.hoverButton.querySelector(".loading__spinner").classList.remove("hidden","spinning-complete"),document.addEventListener("quick-buy-action-complete",()=>{this.hoverButton.removeAttribute("aria-disabled"),this.hoverButton.classList.remove("loading"),this.hoverButton.querySelector(".loading__spinner").classList.add("hidden","spinning-complete")},{once:!0}),(this.querySelector("modal-opener .quick-add__submit")||this.querySelector("product-form .quick-add__submit")||this.querySelector("quick-add-bulk .quantity__button-increase"))?.click()}createSwatchHoverImage(){if(this.mediaContainer=this.querySelector(".card__media .media"),this.mediaContainer){const existingImg=this.mediaContainer.querySelector("img");this.swatchHoverImg=document.createElement("img"),this.swatchHoverImg.className=existingImg?existingImg.className:"",this.swatchHoverImg.style.display="none",this.swatchHoverImg.classList.add("swatch-hover-image"),this.swatchHoverImg.alt=existingImg?existingImg.alt:"",this.mediaContainer.appendChild(this.swatchHoverImg)}}handleMouseEnter(event){this.swatchesPreloaded||this.preloadSwatchImages()}hideSwatchImage(event){this.swatchHoverImg&&(this.swatchHoverImg.style.display="none",this.swatchHoverImg.classList.remove("show-swatch-image"))}showSwatchImage(event){if(event.target.matches("button.swatch[data-variant-media]")){const imageUrl=event.target.dataset.variantMedia;imageUrl&&this.swatchHoverImg&&(this.swatchHoverImg.src=imageUrl,this.swatchHoverImg.style.display="block",this.swatchHoverImg.classList.add("show-swatch-image"))}}preloadSwatchImages(){this.querySelectorAll(".swatch[data-variant-media]").forEach(swatch=>{if(swatch.dataset.variantMedia){const img=new Image;img.src=swatch.dataset.variantMedia}}),this.swatchesPreloaded=!0}}customElements.define("product-card",ProductCard);class CustomPopup extends ModalDialog{constructor(){if(super(),this.delaySeconds=parseInt(this.dataset.delaySeconds),this.timeToShow=this.dataset.timeOfDayToShow,Shopify.designMode&&!this.isSocialVideoPopup)this.dataset.teOnly?(JSON.parse(localStorage.getItem("theme-closed-elements"))||[]).includes(this.dataset.popupId)||this.setAttribute("open",""):(document.addEventListener("shopify:section:select",event=>{event.target===this.closest(".shopify-section")?this.show():this.hide(!0)}),document.addEventListener("shopify:section:load",event=>{event.target===this.closest(".shopify-section")&&this.show()}),document.addEventListener("shopify:section:deselect",()=>{this.hide(!0)}),(this.dataset.visibility==="mobile"&&window.matchMedia("(max-width: 749.98px)").matches||this.dataset.visibility==="desktop"&&window.matchMedia("(min-width: 750px)").matches||this.dataset.visibility==="both")&&this.dataset.trigger&&this.dataset.trigger==="click"&&this.bindGlobalClickTrigger());else{const hour=new Date().getHours();let timeOfDay="";if(hour>=5&&hour<12?timeOfDay="morning":hour>=12&&hour<17?timeOfDay="afternoon":hour>=17&&hour<21?timeOfDay="evening":timeOfDay="night",(this.dataset.visibility==="mobile"&&window.matchMedia("(max-width: 749.98px)").matches||this.dataset.visibility==="desktop"&&window.matchMedia("(min-width: 750px)").matches||this.dataset.visibility==="both")&&(!this.timeToShow||this.timeToShow.split(",").map(s=>s.trim()).includes(timeOfDay))){const closedElements=JSON.parse(localStorage.getItem("theme-closed-elements"))||[];(this.dataset.mode==="test"||this.dataset.trigger&&this.dataset.trigger==="click"||!closedElements.includes(this.dataset.popupId))&&(!this.dataset.trigger||this.dataset.trigger.length===0||this.dataset.trigger==="delay"?setTimeout(()=>{this.show(),this.dataset.autoClose&&this.dataset.autoClose>0&&setTimeout(()=>{this.hide()},this.dataset.autoClose*1e3)},this.delaySeconds*1e3):this.dataset.trigger==="exit_intent"?(this.storeLeaveHandler=this.storeLeaveHandler||this.handleStoreLeave.bind(this),document.body.addEventListener("mouseleave",this.storeLeaveHandler)):this.dataset.trigger==="copy_to_clipboard"?(this.copyToClipboardHandler=this.copyToClipboardHandler||this.handleCopyToClipboard.bind(this),document.addEventListener("copy",this.copyToClipboardHandler)):this.dataset.trigger==="click"&&this.bindGlobalClickTrigger())}}const ageVerifierNoButton=this.querySelector(".age_verifier__no-button");ageVerifierNoButton&&ageVerifierNoButton.addEventListener("click",event=>{event.target.classList.add("no-active")})}bindGlobalClickTrigger(){window.themeCustomPopupClickTriggerHandler||(window.themeCustomPopupClickTriggerHandler=event=>{document.querySelectorAll("custom-popup").forEach(popup=>{popup.handleClickTrigger(event)})},document.addEventListener("click",window.themeCustomPopupClickTriggerHandler))}handleClickTrigger(event){const id=this.dataset.popupTriggerId;if(!id)return;const trigger=event.target.closest(`a[href="#${id}"], button[data-open-popup="${id}"]`);trigger&&(event.preventDefault(),this.show(trigger))}handleCopyToClipboard(){const closedElements=JSON.parse(localStorage.getItem("theme-closed-elements"))||[];(this.dataset.mode==="test"||!closedElements.includes(this.dataset.popupId))&&this.show()}handleStoreLeave(event){const closedElements=JSON.parse(localStorage.getItem("theme-closed-elements"))||[];(this.dataset.mode==="test"||!closedElements.includes(this.dataset.popupId))&&event.clientY
1<0&&this.show()}hide(preventAnimation){if(!Shopify.designMode||this.dataset.teOnly){const closedElements=JSON.parse(localStorage.getItem("theme-closed-elements"))||[];closedElements.includes(this.dataset.popupId)||closedElements.push(this.dataset.popupId),localStorage.setItem("theme-closed-elements",JSON.stringify(closedElements))}super.hide(preventAnimation)}}customElements.define("custom-popup",CustomPopup);class ModalOpener extends HTMLElement{constructor(){super();const button=this.querySelector("button:not(.product__media-toggle-play)");button&&button.addEventListener("click",()=>{const elements=document.querySelectorAll(this.getAttribute("data-modal")),modal=elements.length?elements[elements.length-1]:null;modal&&modal.show(button,this.dataset.modalClass)})}}customElements.define("modal-opener",ModalOpener);class ScriptLoader{static loadedScripts={};static loadScript(url,onloadCallback){if(ScriptLoader.loadedScripts[url])return;const scriptTag=document.createElement("script");scriptTag.src=url,onloadCallback&&typeof onloadCallback=="function"&&(scriptTag.onload=onloadCallback);const firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(scriptTag,firstScriptTag),ScriptLoader.loadedScripts[url]=!0}}window.onYouTubeIframeAPIReady=()=>{document.dispatchEvent(new CustomEvent("youtubeApiLoaded"))};class CustomVideo extends HTMLElement{constructor(){super(),this.video=this.querySelector(".js-video"),this.contentTimerElem=this.closest("[data-content-timer]"),this.contentTimerElem&&(this.closest(".banner--mobile-bottom")&&window.matchMedia("(max-width: 749.98px)").matches?this.contentTimerElem.setAttribute("data-content-timer","show"):(this.playTime=0,this.timerCompleted=!1,this.contentTimer=parseInt(this.contentTimerElem.dataset.contentTimer))),this.video.classList.contains("js-youtube")?(this.type="youtube",this.aspectRatio=parseFloat(this.video.dataset.aspectRatio)):this.video.classList.contains("js-vimeo")?(this.type="vimeo",this.aspectRatio=parseFloat(this.video.dataset.aspectRatio)):this.type="html5",this.deferredMedia=this.closest(".deferred-media"),this.playButton=this.closest(".section").querySelector(".deferred-media__poster-button"),this.playButton&&(this.playButton.addEventListener("click",this.playPause.bind(this)),this.type==="youtube"&&document.body.classList.contains("tab-active")&&setTimeout(()=>{const focusableElements=getFocusableElements(this.closest(".section"));focusableElements&&focusableElements.length>0&&focusableElements[0].focus()},1e3))}connectedCallback(){this.type==="html5"?this.bindHtmlVideoListeners():this.type==="youtube"?this.bindYoutubeVideoListeners():this.type==="vimeo"&&this.bindVimeoVideoListeners()}scaleIframe(){const width=this.video.clientHeight*this.aspectRatio,divisor=this.video.clientWidth>width?this.video.clientWidth/width:width/this.video.clientWidth,scale=Math.ceil(divisor*100)/100+.2;this.style.setProperty("--scale-factor",scale.toString())}playbackStarted(isInit){isInit!==!0&&this.deferredMedia.setAttribute("data-state","loaded"),this.playButton&&isInit!==!0&&this.playButton.setAttribute("data-state","playing"),this.contentTimer&&!this.isTimedContent&&!this.timerCompleted?(this.logInterval=setInterval(()=>{this.isVideoPlaying&&(this.playTime++,this.playTime>=this.contentTimer&&(this.contentTimerElem.setAttribute("data-content-timer","show"),this.timerCompleted=!0,clearInterval(this.logInterval),this.isTimedContent=!1))},1e3),this.isTimedContent=!0,this.isVideoPlaying=!0):this.isVideoPlaying=!0}playbackPaused(){this.playButton&&this.playButton.setAttribute("data-state","paused"),this.contentTimer&&(this.isVideoPlaying=!1)}playbackEnded(){if(this.playButton&&this.playButton.setAttribute("data-state","ended"),this.dataset.endState==="pause_and_cover"){this.closest("deferred-media")?.classList.remove("deferred-media__poster-button--active");const stateElem=this.closest("[data-state]");stateElem&&stateElem.setAttribute("data-state","ended")}else this.dataset.endState==="loop"&&this.playPause();this.contentTimer&&(clearInterval(this.logInterval),this.logInterval=null,this.isTimedContent=!1)}playPause(){this.type==="html5"?this.video.paused?(requestAnimationFrame(()=>this.video.play()),this.playButton&&this.playButton.setAttribute("data-state","playing")):(this.video.pause(),this.playButton&&this.playButton.setAttribute("data-state","paused")):this.type==="youtube"?this.player.getPlayerState()===YT.PlayerState.PLAYING?this.player.pauseVideo():requestAnimationFrame(()=>this.player.playVideo()):this.type==="vimeo"&&this.player.getPaused().then(paused=>{paused?requestAnimationFrame(()=>this.player.play()):this.player.pause()}).catch(function(error){console.error("Error with Vimeo Player:",error)})}bindHtmlVideoListeners(){setTimeout(this.playbackStarted.bind(this,!0),500),this.video.addEventListener("playing",this.playbackStarted.bind(this)),this.video.addEventListener("pause",this.playbackPaused.bind(this)),this.video.addEventListener("ended",this.playbackEnded.bind(this))}bindYoutubeVideoListeners(){const initYoutubePlayer=()=>{setTimeout(this.playbackStarted.bind(this,!0),500),this.player=new YT.Player(this.dataset.videoId,{events:{onStateChange:event=>{switch(event.data){case YT.PlayerState.PLAYING:this.playbackStarted();break;case YT.PlayerState.PAUSED:this.playbackPaused();break;case YT.PlayerState.ENDED:this.playbackEnded();break}}}}),this.scaleIframe(),window.addEventListener("resizeend",this.scaleIframe.bind(this))};typeof YT>"u"?(document.addEventListener("youtubeApiLoaded",initYoutubePlayer,{once:!0}),ScriptLoader.loadScript("https://www.youtube.com/iframe_api")):initYoutubePlayer()}bindVimeoVideoListeners(){const initVimeoPlayer=()=>{setTimeout(this.playbackStarted.bind(this,!0),500),this.player=new Vimeo.Player(this.dataset.videoId),this.player.on("play",this.playbackStarted.bind(this)),this.player.on("pause",this.playbackPaused.bind(this)),this.player.on("ended",this.playbackEnded.bind(this)),this.scaleIframe(),window.addEventListener("resizeend",this.scaleIframe.bind(this))};typeof Vimeo>"u"?(document.addEventListener("vimeoApiLoaded",initVimeoPlayer,{once:!0}),ScriptLoader.loadScript("https://player.vimeo.com/api/player.js",()=>{document.dispatchEvent(new CustomEvent("vimeoApiLoaded"))})):initVimeoPlayer()}}customElements.define("custom-video",CustomVideo);class DeferredMedia extends HTMLElement{constructor(){super();const poster=this.querySelector('[id^="Deferred-Poster-"]');poster&&poster.addEventListener("click",()=>{this.classList.add("deferred-media__poster-button--active"),this.loadContent()},{once:!0}),(!this.closest(".product")||this.closest(".product__social-videos"))&&!Shopify.designMode&&this.addIntersectionObserver()}addIntersectionObserver(){if(!("IntersectionObserver"in window))return;const rootMargin=this.classList.contains("social-video-wrapper")?400:900,rootMarginValue=window.innerWidth<750?"0px 0px 500px 0px":`0px 0px ${rootMargin}px 0px`,observer=new IntersectionObserver(entries=>
1{entries.forEach(entry=>{entry.isIntersecting&&(this.loadContent(!1,!1),observer.unobserve(this))})},{rootMargin:rootMarginValue});observer.observe(this)}loadContent(focus=!0,pauseExistingMedia=!0){if(pauseExistingMedia&&window.pauseAllMedia(),this.getAttribute("loaded"))this.classList.contains("social-video-wrapper")&&window.matchMedia("(max-width: 749.98px)").matches&&this.querySelector("video")?.play();else{let content,media;this.tagName==="PRODUCT-MODEL"?(window.pauseAllMedia(),content=document.createElement("div"),content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),media=this.appendChild(content.querySelector("video, model-viewer, iframe"))):(content=this.querySelector("template").content.firstElementChild.cloneNode(!0),this.appendChild(content),media=content.querySelector("video, model-viewer, iframe")),this.setAttribute("loaded",!0),media&&(focus&&media.focus(),media.nodeName=="VIDEO"&&media.getAttribute("autoplay")&&media.play()),window.makeTablesResponsive()}}}customElements.define("deferred-media",DeferredMedia);class SliderComponent extends HTMLElement{constructor(){super(),this.DEBOUNCE_TIMEOUT=this.closest("media-gallery")?20:100,window.initScriptOnDemand(this,this.init.bind(this))}init(){if(this._layoutMode=null,this._layoutRAF=null,this._suppressLayoutUpdate=!1,this._isResizing=!1,this._scrollRAF=null,this._isFirstRun=!0,this.isQuickBuy=!!this.closest("quick-add-modal"),this.slider=this.querySelector('[id^="Slider-"]'),!!this.slider){if(this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.enableSliderLooping=!1,this.currentPageElement=this.querySelector(".slider-counter--current"),this.pageTotalElement=this.querySelector(".slider-counter--total"),this.prevButton=this.querySelector('button[name="previous"]'),this.nextButton=this.querySelector('button[name="next"]'),this.isStacked=this.slider.dataset.slideType==="stacked",this.isRTL=(this.closest('[dir="rtl"]')||document.documentElement).dir==="rtl",this.isRTL&&(this._rtlScrollType=this.detectRtlScrollType()),this.scrollTrack=this.querySelector(".slider-scrollbar__track"),this.scrollIndicator=this.querySelector(".slider-scrollbar__indicator"),this.debouncedInitPages=debounce(this.initPages.bind(this),Shopify.designMode?200:0),this.debouncedUpdate=window.debounce(this.update.bind(this),this.DEBOUNCE_TIMEOUT),this._onScroll=this.debouncedUpdate.bind(this),this._onButtonClick=this.onButtonClick.bind(this),this._onResize=()=>{this._isResizing=!0},this._onResizeEnd=()=>{this._isResizing=!1,this.initPages(),this.update(),this.sliderScrollHandler&&this.sliderScrollHandler()},this.sliderScrollHandler=this.onSliderScroll.bind(this),this.sliderMousedownHandler=this.onSliderMouseDown.bind(this),this.sliderMousemoveHandler=this.onSliderMouseMove.bind(this),this.sliderMouseupHandler=this.onSliderMouseUp.bind(this),this.scrollIndicatorMousedownHandler=this.onScrollIndicatorMouseDown.bind(this),this.scrollIndicatorMousemoveHandler=this.onScrollIndicatorMouseMove.bind(this),this.scrollIndicatorMouseupHandler=this.onScrollIndicatorMouseUp.bind(this),this._onTouchStart=this.onTouchStart.bind(this),this._onTouchMove=debounce(this.onTouchMove.bind(this),200),this.DRAG_THRESHOLD_PX=6,this._dragMoved=!1,this._downX=0,this._downY=0,this._suppressClick=!1,this._onDragStart=e=>{e.preventDefault()},this._onCaptureClick=e=>{this._suppressClick&&this.slider&&this.slider.contains(e.target)&&(e.preventDefault(),e.stopImmediatePropagation())},this.initPages(),this.resizeObserver=new ResizeObserver(()=>this.debouncedInitPages()),this.resizeObserver.observe(this.slider),this.slider.addEventListener("scroll",this._onScroll,{passive:!0}),this.slider.addEventListener("click",this._onCaptureClick,!0),this.slider.addEventListener("dragstart",this._onDragStart),this.nextButton&&this.prevButton&&(this.prevButton.addEventListener("click",this._onButtonClick),this.nextButton.addEventListener("click",this._onButtonClick)),this.scrollTrack&&this.scrollIndicator&&(this.slider.addEventListener("scroll",this.sliderScrollHandler,{passive:!0}),window.addEventListener("resizeend",this.sliderScrollHandler)),this.scrollTrack&&window.matchMedia("(pointer: fine)").matches&&(this.sliderLeft=window.innerWidth-this.slider.getBoundingClientRect().right,this.sliderLeft||(this.sliderLeft=0),this.slider.addEventListener("mousedown",this.sliderMousedownHandler),this.slider.addEventListener("mouseup",this.sliderMouseupHandler),this.slider.addEventListener("mouseleave",this.sliderMouseupHandler),this.slider.addEventListener("mousemove",this.sliderMousemoveHandler),this.scrollIndicator&&!this.isRTL)){this.scrollIndicatorLeft=window.innerWidth-this.scrollIndicator.getBoundingClientRect().right,this.scrollIndicatorLeft||(this.scrollIndicatorLeft=0);const numSlides=parseInt(this.scrollTrack.dataset.numSlides,10);Number.isFinite(numSlides)&&numSlides>0?this.scrollMultiplier=100/(100-100/numSlides):this.scrollMultiplier=1,this.scrollIndicator.addEventListener("mousedown",this.scrollIndicatorMousedownHandler),document.addEventListener("mouseup",this.scrollIndicatorMouseupHandler),document.addEventListener("mousemove",this.scrollIndicatorMousemoveHandler)}this.isStacked&&(this.addEventListener("touchstart",this._onTouchStart,{passive:!0}),this.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.slider.dataset.slideMobile==="true"&&(this._updateMobileSlideSettings=()=>{window.themeDevice.isMobile?this.slider.dataset.slideType!=="slide"&&(this.isStacked=!1,this.oldSlideAnimation=this.slider.dataset.slideAnimation,this.oldSlideType=this.slider.dataset.slideType,this.slider.setAttribute("data-sli
1de-animation","slide"),this.slider.setAttribute("data-slide-type","slide"),this.resetPages()):this.slider.dataset.slideType==="slide"&&(this.isStacked=!0,this.slider.setAttribute("data-slide-animation",this.oldSlideAnimation),this.slider.setAttribute("data-slide-type",this.oldSlideType),this.resetPages())},window.addEventListener("resizeend",this._updateMobileSlideSettings),this._updateMobileSlideSettings())),window.addEventListener("resize",this._onResize,{passive:!0}),window.addEventListener("resizeend",this._onResizeEnd),this._revealTimer=setTimeout(()=>{this.querySelectorAll(".slideshow__media.hidden").forEach(media=>media.classList.remove("hidden"))},4e3),this._isFirstRun=!1}}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect(),this._layoutRAF&&cancelAnimationFrame(this._layoutRAF),this._scrollRAF&&cancelAnimationFrame(this._scrollRAF),this._revealTimer&&clearTimeout(this._revealTimer),this.slider?.removeEventListener("scroll",this._onScroll),this._onCaptureClick&&this.slider?.removeEventListener("click",this._onCaptureClick,!0),this._onDragStart&&this.slider?.removeEventListener("dragstart",this._onDragStart),this.sliderScrollHandler&&(this.slider?.removeEventListener("scroll",this.sliderScrollHandler),window.removeEventListener("resizeend",this.sliderScrollHandler)),this.prevButton&&this.prevButton.removeEventListener("click",this._onButtonClick),this.nextButton&&this.nextButton.removeEventListener("click",this._onButtonClick),window.removeEventListener("resize",this._onResize),window.removeEventListener("resizeend",this._onResizeEnd),this.sliderMousedownHandler&&this.slider?.removeEventListener("mousedown",this.sliderMousedownHandler),this.sliderMouseupHandler&&(this.slider?.removeEventListener("mouseup",this.sliderMouseupHandler),this.slider?.removeEventListener("mouseleave",this.sliderMouseupHandler)),this.sliderMousemoveHandler&&this.slider?.removeEventListener("mousemove",this.sliderMousemoveHandler),this.scrollIndicatorMousedownHandler&&this.scrollIndicator?.removeEventListener("mousedown",this.scrollIndicatorMousedownHandler),this.scrollIndicatorMouseupHandler&&document.removeEventListener("mouseup",this.scrollIndicatorMouseupHandler),this.scrollIndicatorMousemoveHandler&&document.removeEventListener("mousemove",this.scrollIndicatorMousemoveHandler),this.removeEventListener("touchstart",this._onTouchStart),this.removeEventListener("touchmove",this._onTouchMove),this._updateMobileSlideSettings&&window.removeEventListener("resizeend",this._updateMobileSlideSettings)}detectRtlScrollType(){const scroller=document.createElement("div");scroller.dir="rtl",scroller.style.width="100px",scroller.style.height="1px",scroller.style.overflow="scroll",scroller.style.visibility="hidden";const inner=document.createElement("div");inner.style.width="200px",scroller.appendChild(inner),document.body.appendChild(scroller);let type;return scroller.scrollLeft>0?type="default":(scroller.scrollLeft=1,type=scroller.scrollLeft===0?"negative":"reverse"),document.body.removeChild(scroller),type}getEffectiveClientWidth(){const baseWidth=this.slider.clientWidth,style=getComputedStyle(this),inlineStart=parseFloat(style.marginInlineStart)||0,inlineEnd=parseFloat(style.marginInlineEnd)||0;if(inlineStart<0||inlineEnd<0){const negStart=inlineStart<0?inlineStart:0,negEnd=inlineEnd<0?inlineEnd:0;return baseWidth-negStart-negEnd}return baseWidth}getScrollMax(){const effectiveClientWidth=this.getEffectiveClientWidth();return Math.max(0,this.slider.scrollWidth-effectiveClientWidth)}getNormalizedScrollLeft(){if(!this.isRTL)return this.slider.scrollLeft;const max=this.getScrollMax();switch(this._rtlScrollType){case"negative":return-this.slider.scrollLeft;case"reverse":return max-this.slider.scrollLeft;default:return this.slider.scrollLeft}}applyIndicatorPos(px){const maxPx=this.scrollTrack.clientWidth-this.scrollIndicator.clientWidth,clamped=Math.max(0,Math.min(maxPx,px));this.isRTL?(this.scrollIndicator.style.right=`${clamped}px`,this.scrollIndicator.style.left="auto"):(this.scrollIndicator.style.left=`${clamped}px`,this.scrollIndicator.style.right="auto")}onSliderScroll(){this._scrollRAF||(this._scrollRAF=requestAnimationFrame(()=>{if(this._scrollRAF=null,!(!this.scrollTrack||!this.scrollIndicator)){if(this.isRTL){if(!this.indicatorMousedown){const maxScroll=this.getScrollMax(),normLeft=this.getNormalizedScrollLeft(),maxPx=this.scrollTrack.clientWidth-this.scrollIndicator.clientWidth,px=maxScroll>0?normLeft/maxScroll*maxPx:0;this.applyIndicatorPos(px)}}else if(!this.indicatorMousedown){const scrollableWidth=this.slider.scrollWidth-this.slider.clientWidth,scrollPosition=this.slider.scrollLeft,scrollPercentage=scrollableWidth>0?scrollPosition/scrollableWidth*100:0,maxLeft=this.scrollTrack.clientWidth-this.scrollIndicator.clientWidth,leftPosition=scrollPercentage*maxLeft/100;this.scrollIndicator.style.left=`${leftPosition}px`}}}))}onSliderMouseDown(event){event.button===0&&(this.mousedown=!0,this._dragMoved=!1,this._suppressClick=!1,this._downX=event.pageX,this._downY=event.pageY,this.slider.classList.add("drag-active"),this.sliderScrollLeft=this.slider.scrollLeft,this.sliderX=event.pageX-this.sliderLeft)}onSliderMouseUp(){this.slider.classList.remove("is-dragging"),this.mousedown=!1,this._dragMoved&&(this._suppressClick=!0,setTimeout(()=>{this._suppressClick=!1},0))}onSliderMouseMove(event){if(!this.mousedown)return;const dxFromDown=event.pageX-this._downX,dyFromDown=event.pageY-this._downY;if(!this._dragMoved){if(Math.hypot(dxFromDown,dyFromDown)<this.DRAG_THRESHOLD_PX)return;this._dragMoved=!0,this.slider.classList.add("is-dragging")}event.preventDefault(),this.slider.scrollLeft=this.sliderScrollLeft-(event.pageX-this.sliderLeft-this.sliderX)}onScrollIndicatorMouseDown(event){document.body.classList.add("body-drag-active"),this.slider.classList.add("drag-active"),this.indicatorMousedown=!0,this.scrollIndicatorScrollLeft=parseInt(this.scrollIndicator.style.left.replace("px",""),10)||0,this.scrollIndicatorX=event.pageX-this.scrollIndicatorLeft}onScrollIndicatorMouseUp(){document.body.classList.remove("body-drag-active"),this.indicatorMousedown=!1}onScrollIndicatorMouseMove(event){if(!this.indicatorMousedown)return;event.preventDefault();const left=this.scrollIndicatorScrollLeft+(event.pageX-this.scrollIndicatorLeft-this.scrollIndicatorX);let actualLeft;const maxLeft=this.scrollTrack.clientWidth-this.scrollIndicator.clientWidth;left<=0?actualLeft=0:left>maxLeft?actualLeft=maxLeft:actualLeft=left,this.scrollIndicator.style.left=`${actualLeft}px`;const scrollableWidth=this.scrollTrack.clientWidth,scrollPercentage=(scrollableWidth>0?actualLeft/scrollableWidth*100:0)*this.scrollMultiplier,scrollableSliderWidth=this.slider.scrollWidth-this.slider.clientWidth;this.slider.scrollLeft=scrollableSliderWidth*scrollPercentage/100}onTouchStart(event){this.isStacked&&(this.touchStart=event.changedTouches[0].screenX)}onTouchMove(event){this.isStacked&&this.prevButton&&this.nextButton?(event.changedTouches[0].screenX<this.touchStart-100&&this.nextButton.click(),event.changedTouches[0].screenX>this.touchStart+100&&this.prevButton.click()):this.pause?.()}initPages(){this.sliderItemsToShow=Array.from(this.sliderItems).filter(element=>element.clientWidth>0),!(this.sliderItemsToShow.length<2)&&(this.isStacked?this.slidesPerPage=1:(this.sliderItemOffset=this.sliderItemsToShow[1].offsetLeft-this.sliderItemsToShow[0].offsetLeft,this.slidesPerPage=Math.floor((this.slider.clientWidth-this.sliderItemsToShow[0].offsetLeft)/this.sliderItemOffset)),this.totalPages=this.sliderItemsToShow.length-this.slidesPerPage+1,this.update())}resetPages(){this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.initPages()}
1setLayoutMode(mode){this._layoutMode!==mode&&(this._layoutRAF&&cancelAnimationFrame(this._layoutRAF),this._layoutRAF=requestAnimationFrame(()=>{this._layoutMode=mode,this._suppressLayoutUpdate=!0,mode==="carousel"?(this.classList.contains("slider-component-desktop_")&&this.classList.replace("slider-component-desktop_","slider-component-desktop"),this.slider.classList.contains("slider--desktop_")&&this.slider.classList.replace("slider--desktop_","slider--desktop")):(this.classList.contains("slider-component-desktop")&&this.classList.replace("slider-component-desktop","slider-component-desktop_"),this.slider.classList.contains("slider--desktop")&&this.slider.classList.replace("slider--desktop","slider--desktop_")),requestAnimationFrame(()=>{this._suppressLayoutUpdate=!1})}))}getCurrentPageFromCenteredSnap(){const items=this.sliderItemsToShow;if(!items?.length)return 1;const EPSILON=1,scrollPos=this.isRTL?this.getNormalizedScrollLeft():this.slider.scrollLeft,scrollMax=this.getScrollMax();if(scrollPos<=EPSILON)return 1;if(scrollMax>0&&scrollPos>=scrollMax-EPSILON)return items.length;const sliderRect=this.slider.getBoundingClientRect(),sliderCenter=sliderRect.left+sliderRect.width/2;let closestIndex=0,closestDistance=1/0;return items.forEach((item,index)=>{const itemRect=item.getBoundingClientRect(),itemCenter=itemRect.left+itemRect.width/2,distance=Math.abs(itemCenter-sliderCenter);distance<closestDistance&&(closestDistance=distance,closestIndex=index)}),closestIndex+1}update(){if(!this.slider||this._isResizing)return;const previousPage=this.currentPage;if(this.isStacked){const visible=this.querySelector('.slideshow__slide[aria-hidden="false"]');visible&&(this.currentPage=parseInt(visible.dataset.slideIndex,10))}else this.sliderItemsToShow.some(item=>getComputedStyle(item).scrollSnapAlign.includes("center"))?this.currentPage=this.getCurrentPageFromCenteredSnap():this.currentPage=Math.round(this.slider.scrollLeft/this.sliderItemOffset)+1;if(this.currentPageElement&&this.pageTotalElement&&(this.currentPageElement.textContent=this.currentPage,this.isRTL||(this.pageTotalElement.textContent=this.totalPages)),this.currentPage!=previousPage){const currentSlideElem=this.sliderItemsToShow[this.currentPage-1];if(currentSlideElem?.nextElementSibling){const nextHiddenMedia=currentSlideElem.nextElementSibling.querySelector(".slideshow__media.hidden");nextHiddenMedia&&nextHiddenMedia.classList.remove("hidden")}this.dispatchEvent(new CustomEvent("slideChanged",{detail:{currentPage:this.currentPage,currentElement:currentSlideElem}}))}if(this.enableSliderLooping){this.slider.classList.add("slider--scroll-active");return}const{scrollWidth,clientWidth}=this.slider,items=this.sliderItemsToShow,firstItem=items[0],lastItem=items[items.length-1],EPSILON=1,hasHorizontalOverflow=scrollWidth-clientWidth>EPSILON,isWrapped=firstItem&&lastItem&&firstItem.offsetTop!==lastItem.offsetTop,isStillCarousel=this.isQuickBuy||hasHorizontalOverflow||isWrapped||this.isStacked;if(this.prevButton&&this.nextButton){const scrollMax=this.getScrollMax(),scrollPos=this.isRTL?this.getNormalizedScrollLeft():this.slider.scrollLeft,hasScrollRange=scrollMax>0||this.tagName!=="SLIDESHOW-COMPONENT",atStart=scrollPos<=EPSILON,atEnd=hasScrollRange&&scrollPos>=scrollMax-EPSILON;atStart?this.prevButton.setAttribute("disabled","disabled"):this.prevButton.removeAttribute("disabled"),atEnd&&!this.isQuickBuy?this.nextButton.setAttribute("disabled","disabled"):this.nextButton.removeAttribute("disabled")}this.slider.classList.toggle("slider--scroll-active",isStillCarousel),!this._suppressLayoutUpdate&&(this.slider.classList.contains("grid--scaled")||this._isFirstRun)&&this.setLayoutMode(isStillCarousel?"carousel":"wrapped")}isSlideVisible(element,offset=0){if(!element)return!1;if(this.isStacked)return element.getAttribute("aria-hidden")==="false";if(this._layoutMode==="wrapped")return this.sliderItemsToShow[0].offsetTop===element.offsetTop;const lastVisibleSlide=this.slider.clientWidth+this.slider.scrollLeft-offset;return element.offsetLeft+element.clientWidth<=lastVisibleSlide&&element.offsetLeft>=this.slider.scrollLeft}getClosestElementToLeft(position){let closest=null,closestDistance=1/0;for(const child of this.sliderItems){const childLeft=child.offsetLeft,distance=Math.abs(childLeft-position);distance<closestDistance&&(closest=child,closestDistance=distance)}return closest}setSlidePosition(position,nextPageElem){if(this.slider.classList.remove("drag-active"),this.isStacked&&nextPageElem){const previousPageElem=this.sliderItemsToShow[this.currentPage-1];this.sliderItemsToShow.length===2&&this.prevButton&&this.nextButton&&(this.nextButton.classList.add("pointer-events-none"),this.prevButton.classList.add("pointer-events-none")),this.slider.classList.add("pause
1-transition"),requestAnimationFrame(()=>this.slider.classList.remove("pause-transition")),requestAnimationFrame(()=>{previousPageElem?.classList.add("leaving"),nextPageElem.classList.remove("leaving"),previousPageElem?.setAttribute("aria-hidden","true"),nextPageElem.setAttribute("aria-hidden","false"),setTimeout(()=>previousPageElem?.classList.remove("leaving"),700),this.sliderItemsToShow.length===2&&this.prevButton&&this.nextButton&&setTimeout(()=>{this.nextButton.classList.remove("pointer-events-none"),this.prevButton.classList.remove("pointer-events-none")},1e3),this.debouncedUpdate()})}else{this.lastSlide&&this.lastSlide.classList.remove("is-incoming");const nextSlide=this.getClosestElementToLeft(position);nextSlide?.classList.add("is-incoming"),this.lastSlide=nextSlide,this.slider.scrollTo({left:position})}this.dispatchEvent(new CustomEvent("slideChange"))}onButtonClick(event){event.preventDefault(),this.setSlide(event)}setSlide(event,isNext){const step=event&&event.currentTarget.dataset.step||1;if(this.isStacked){let nextPage;event&&event.currentTarget.name==="next"||isNext?(this.slider.setAttribute("data-slide-direction","forwards"),nextPage=this.currentPage<this.sliderItemsToShow.length?this.currentPage+1:1):(this.slider.setAttribute("data-slide-direction","backwards"),nextPage=this.currentPage>1?this.currentPage-1:this.sliderItemsToShow.length);const nextPageElem=this.sliderItemsToShow[nextPage-1];this.setSlidePosition(null,nextPageElem)}else this.currentPage===this.sliderItemsToShow.length&&(!event||event.currentTarget.name==="next")?this.slideScrollPosition=0:this.slideScrollPosition=event&&event.currentTarget.name==="next"||isNext?this.slider.scrollLeft+step*this.sliderItemOffset:this.slider.scrollLeft-step*this.sliderItemOffset,this.setSlidePosition(this.slideScrollPosition)}}customElements.define("slider-component",SliderComponent);class SlideshowComponent extends SliderComponent{constructor(){super(),this.debouncedSetSlideVisibility=window.debounce(this.setSlideVisibility.bind(this),this.DEBOUNCE_TIMEOUT),Shopify.designMode&&document.addEventListener("shopify:block:select",event=>{this.contains(event.target)&&(this.init(),this.slider.classList.add("pause-transition"),this.pause(),this.slider.setAttribute("data-slide-direction","forwards"),setTimeout(()=>{super.setSlidePosition(event.target.offsetLeft,event.target)},100),setTimeout(()=>{this.slider.classList.remove("pause-transition")},300))})}init(){super.init(),this.sliderControlWrapper=this.querySelector(".slider-buttons"),this.enableSliderLooping=!0,this.sliderControlWrapper&&(this.sliderFirstItemNode=this.slider.querySelector(".slideshow__slide"),this.sliderItemsToShow.length>0&&(this.currentPage=1),this.announcementBarSlider=this.querySelector(".announcement-bar-slider"),this.announcerBarAnimationDelay=this.announcementBarSlider?250:0,this.sliderControlLinksArray=Array.from(this.sliderControlWrapper.querySelectorAll(".slider-counter__link")),this.sliderControlLinksArray.forEach(link=>link.addEventListener("click",this.linkToSlide.bind(this))),this.slider.addEventListener("scroll",this.debouncedSetSlideVisibility.bind(this),{passive:!0}),this.setSlideVisibility(),this.reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)"),this.reducedMotion.addEventListener("change",()=>{this.slider.getAttribute("data-autoplay")==="true"&&this.setAutoPlay()}),this.announcementBarSlider&&(this.announcementBarArrowButtonWasClicked=!1),this.slider.getAttribute("data-autoplay")==="true"&&this.setAutoPlay())}setAutoPlay(){this.autoplaySpeed=this.slider.dataset.speed*1e3,this.querySelectorAll(".banner__box").forEach(sli
1deContent=>slideContent.addEventListener("mouseover",this.focusInHandling.bind(this))),this.querySelectorAll(".banner__box").forEach(slideContent=>slideContent.addEventListener("mouseleave",this.focusOutHandling.bind(this))),this.addEventListener("focusin",this.focusInHandling.bind(this)),this.addEventListener("focusout",this.focusOutHandling.bind(this)),this.querySelector(".slideshow__autoplay")?(this.sliderAutoplayButton=this.querySelector(".slideshow__autoplay"),this.sliderAutoplayButton.addEventListener("click",this.autoPlayToggle.bind(this)),this.autoplayButtonIsSetToPlay=!0,this.play()):this.reducedMotion.matches||this.announcementBarArrowButtonWasClicked?this.pause():this.play()}onButtonClick(event){super.onButtonClick(event),event.target.classList.add("pointer-events-none"),setTimeout(()=>event.target.classList.remove("pointer-events-none"),1e3),this.wasClicked=!0;const isFirstSlide=this.currentPage===1,isLastSlide=this.currentPage===this.sliderItemsToShow.length;if(!isFirstSlide&&!isLastSlide){this.applyAnimationToAnnouncementBar(event.currentTarget.name);return}this.isStacked||(isFirstSlide&&event.currentTarget.name==="previous"?(this.slider.setAttribute("data-slide-direction","backwards"),this.slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*this.sliderItemsToShow.length):isLastSlide&&event.currentTarget.name==="next"&&(this.slider.setAttribute("data-slide-direction","forwards"),this.slideScrollPosition=0),this.setSlidePosition(this.slideScrollPosition)),this.applyAnimationToAnnouncementBar(event.currentTarget.name)}setSlidePosition(position,nextPageElem){this.slider.classList.remove("drag-active"),nextPageElem?super.setSlidePosition(null,nextPageElem):(this.setPositionTimeout&&clearTimeout(this.setPositionTimeout),this.setPositionTimeout=setTimeout(()=>{this.slider.scrollTo({left:position})},this.announcerBarAnimationDelay))}update(){super.update(),this.sliderControlButtons=this.querySelectorAll(".slider-counter__link"),this.prevButton&&this.prevButton.removeAttribute("disabled"),this.sliderControlButtons.length&&(this.sliderControlButtons.forEach(link=>{link.classList.remove("slider-counter__link--active"),link.removeAttribute("aria-current")}),this.sliderControlButtons[this.currentPage-1].classList.add("slider-counter__link--active"),this.sliderControlButtons[this.currentPage-1].setAttribute("aria-current",!0))}autoPlayToggle(){this.togglePlayButtonState(this.autoplayButtonIsSetToPlay),this.autoplayButtonIsSetToPlay?this.pause():this.play(),this.autoplayButtonIsSetToPlay=!this.autoplayButtonIsSetToPlay}focusOutHandling(event){if(this.sliderAutoplayButton){const focusedOnAutoplayButton=event.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(event.target);if(!this.autoplayButtonIsSetToPlay||focusedOnAutoplayButton)return;this.play()}else!this.reducedMotion.matches&&!this.announcementBarArrowButtonWasClicked&&this.play()}focusInHandling(event){this.sliderAutoplayButton?(event.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(event.target))&&this.autoplayButtonIsSetToPlay||this.autoplayButtonIsSetToPlay&&this.pause():this.announcementBarSlider&&this.announcementBarSlider.contains(event.target)&&this.pause()}play(){this.slider.setAttribute("aria-live","off"),this.setAttribute("data-paused","false"),clearInterval(this.autoplay),this.autoplay=setInterval(this.autoRotateSlides.bind(this),this.autoplaySpeed)}pause(){this.slider.setAttribute("aria-live","polite"),this.setAttribute("data-paused","true"),clearInterval(this.autoplay)}togglePlayButtonState(pauseAutoplay){pauseAutoplay?(this.sliderAutoplayButton.classList.add("slideshow__autoplay--paused"),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.playSlideshow)):(this.sliderAutoplayButton.classList.remove("slideshow__autoplay--paused"),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.pauseSlideshow))}autoRotateSlides(){this.setSlide(null,!0),this.applyAnimationToAnnouncementBar()}setSlideVisibility(event){this.sliderItemsToShow.forEach((item,index)=>{const linkElements=item.querySelectorAll("a,button");if(index===this.currentPage-1){if(linkElements.length&&linkElements.forEac
1h(button=>{button.removeAttribute("tabindex")}),item.setAttribute("aria-hidden","false"),item.removeAttribute("tabindex"),this.announcementBarSlider){const announcementBar=this.closest(".utility-bar");announcementBar.classList.forEach(className=>{className.startsWith("color-")&&(announcementBar.classList.remove(className),announcementBar.classList.add(item.dataset.colorScheme))})}}else linkElements.length&&linkElements.forEach(button=>{button.setAttribute("tabindex","-1")}),item.setAttribute("aria-hidden","true"),item.setAttribute("tabindex","-1")}),this.wasClicked=!1}applyAnimationToAnnouncementBar(button="next"){if(!this.announcementBarSlider)return;const itemsCount=this.sliderItems.length,increment=button==="next"?1:-1,currentIndex=this.currentPage-1;let nextIndex=(currentIndex+increment)%itemsCount;nextIndex=nextIndex===-1?itemsCount-1:nextIndex;const nextSlide=this.sliderItems[nextIndex],currentSlide=this.sliderItems[currentIndex],animationClassIn="announcement-bar-slider--fade-in",animationClassOut="announcement-bar-slider--fade-out",isFirstSlide=currentIndex===0,isLastSlide=currentIndex===itemsCount-1,direction=button==="next"&&!isLastSlide||button==="previous"&&isFirstSlide?"next":"previous";currentSlide.classList.add(`${animationClassOut}-${direction}`),nextSlide.classList.add(`${animationClassIn}-${direction}`),setTimeout(()=>{currentSlide.classList.remove(`${animationClassOut}-${direction}`),nextSlide.classList.remove(`${animationClassIn}-${direction}`)},this.announcerBarAnimationDelay*2)}linkToSlide(event){if(event.preventDefault(),this.isStacked){const slideIndex=parseInt(event.target.dataset.slideIndexTarget);super.setSlidePosition(null,this.sliderItemsToShow[slideIndex-1])}else{const slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*(this.sliderControlLinksArray.indexOf(event.currentTarget)+1-this.currentPage);this.slider.scrollTo({left:slideScrollPosition})}}}customElements.define("slideshow-component",SlideshowComponent);class VariantSelects extends HTMLElement{constructor(){super(),this.variantChangeHandler=this.onVariantChange.bind(this)}connectedCallback(){this.addEventListener("change",this.variantChangeHandler)}disconnectedCallback(){this.removeEventListener("change",this.variantChangeHandler)}onVariantChange(event){const target=this.getInputForEventTarget(event.target);this.updateSelectionMetadata(event),publish(PUB_SUB_EVENTS.optionValueSelectionChange,{data:{event,target,selectedOptionValues:this.selectedOptionValues}})}updateSelectionMetadata({target}){const{value,tagName}=target;if(tagName==="SELECT"&&target.selectedOptions.length){Array.from(target.options).find(option=>option.getAttribute("selected")).removeAttribute("selected"),target.selectedOptions[0].setAttribute("selected","selected");const swatchValue=target.selectedOptions[0].dataset.optionSwatchValue,selectedDropdownSwatchValue=target.closest(".product-form__input").querySelector("[data-selected-value] > .swatch");if(!selectedDropdownSwatchValue)return;swatchValue?(selectedDropdownSwatchValue.style.setProperty("--swatch--background",swatchValue),selectedDropdownSwatchValue.classList.remove("swatch--unavailable")):(selectedDropdownSwatchValue.style.setProperty("--swatch--background","unset"),selectedDropdownSwatchValue.classList.add("swatch--unavailable")),selectedDropdownSwatchValue.style.setProperty("--swatch-focal-point",target.selectedOptions[0].dataset.optionSwatchFocalPoint||"unset")}else if(tagName==="INPUT"&&target.type==="radio"){const selectedSwatchValue=target.closest(".product-form__input").querySelector("[data-selected-value]");selectedSwatchValue&&(selectedSwatchValue.innerHTML=value)}}getInputForEventTarget(target){return target.tagName==="SELECT"?target.selectedOptions[0]:target}get selectedOptionValues(){return Array.from(this.querySelectorAll("select option[selected], fieldset input:checked")).map(({dataset})=>dataset.optionValueId)}}customElements.define("variant-selects",VariantSelects);class ProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){this.closest(".product")&&window.addEventListener("DOMContentLoaded",()=>{setTimeout(this.fetchProductRecommendations.bind(this),500)});const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),this.fetchProductRecommendations())};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 400px 0px"}).observe(this)}fetchProductRecommendations(){fetch(`${this.dataset.url}&product_id=${this.dataset.productId}&section_id=${this.dataset.sectionId}`).then(response=>response.text()).then(text=>{let html=document.createElement("div");
1html.innerHTML=text.replace(/<template\b[^>]*>|<\/template>/g,"");const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML.replace(/<template(?![^>]*\bdata-prevent-interpolation\b)[^>]*>[\s\S]*?<\/template>/g,"")),!this.querySelector(".has-complementary-products")&&this.classList.contains("complementary-products")&&this.remove(),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded"),window.loadDesktopOnlyTemplates(),window.stickersReinit?.()}).catch(e=>{console.error(e)})}}customElements.define("product-recommendations",ProductRecommendations);class AccountIcon extends HTMLElement{constructor(){super(),this.icon=this.querySelector(".icon")}connectedCallback(){document.addEventListener("storefront:signincompleted",this.handleStorefrontSignInCompleted.bind(this))}handleStorefrontSignInCompleted(event){event?.detail?.avatar&&this.icon?.replaceWith(event.detail.avatar.cloneNode())}}customElements.define("account-icon",AccountIcon);class BulkAdd extends HTMLElement{constructor(){super(),this.queue=[],this.requestStarted=!1,this.ids=[],this.cart=document.querySelector("cart-drawer")}startQueue(id,quantity,element){this.queue.push({id,quantity});const interval=setInterval(()=>{this.queue.length>0?this.requestStarted||this.sendRequest(this.queue,element):clearInterval(interval)},250)}sendRequest(queue,element){this.requestStarted=!0;const items={};queue.forEach(queueItem=>{items[parseInt(queueItem.id)]=queueItem.quantity}),this.queue=this.queue.filter(queueElement=>!queue.includes(queueElement)),(this.closest("quick-order-list")||this.closest("quick-add-bulk")).updateMultipleQty(items,element)}resetQuantityInput(id){const input=this.querySelector(`#Quantity-${id}`);input.value=input.getAttribute("value"),this.isEnterPressed=!1}setValidity(event,index,message){event.target.setCustomValidity(message),event.target.reportValidity(),this.resetQuantityInput(index),event.target.select()}validateQuantity(event){const inputValue=parseInt(event.target.value),index=event.target.dataset.index;inputValue<event.target.dataset.min?this.setValidity(event,index,window.quickOrderListStrings.min_error.replace("[min]",event.target.dataset.min)):inputValue>parseInt(event.target.max)?this.setValidity(event,index,window.quickOrderListStrings.max_error.replace("[max]",event.target.max)):inputValue%parseInt(event.target.step)!=0?this.setValidity(event,index,window.quickOrderListStrings.step_error.replace("[step]",event.target.step)):(event.target.setCustomValidity(""),event.target.reportValidity(),this.startQueue(index,inputValue,event.target))}getSectionsUrl(){return window.pageNumber?`${window.location.pathname}?page=${window.pageNumber}`:window.location.href.includes(window.routes.search_url)?`${window.location.pathname}${window.location.search}`:window.location.pathname}getSectionInnerHTML(html,selector){return html=html.replace(/<template\b[^>]*>|<\/template>/g,""),new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}}customElements.get("bulk-add")||customElements.define("bulk-add",BulkAdd);class LazyScript extends HTMLElement{constructor(){super(),this.scriptLoaded=!1,this.isEnabled=window.theme?.settings.lazyLoadJs&&window.self===window.top}connectedCallback(){if(!this.isEnabled){this.loadScript();return}const watchElementSelector=this.getAttribute("data-watch-element");watchElementSelector?"IntersectionObserver"in window?this.observeElementVisibility(watchElementSelector):this.loadScript():"IntersectionObserver"in window?this.observeScriptVisibility():this.loadScript()}observeScriptVisibility(){const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&!this.scriptLoaded&&(this.loadScript(),observer.disconnect())})},{rootMargin:`0px 0px ${this.dataset.customThreshold||400}px 0px`});observer.observe(this)}observeElementVisibility(selector){const targetElements=document.querySelectorAll(selector);if(!targetElements.length)return;const observer=new IntersectionObserver((entries,obs)=>
1{entries.forEach(entry=>{entry.isIntersecting&&!this.scriptLoaded&&(this.loadScript(),obs.disconnect())})},{rootMargin:`0px 0px ${this.dataset.customThreshold||0}px 0px`});targetElements.forEach(element=>observer.observe(element))}loadScript(){const scriptUrl=this.getAttribute("src");if(!scriptUrl){console.warn('Load lazy script: Script source URL missing in the "src" attribute.');return}if(window.loadedScripts&&window.loadedScripts.includes(scriptUrl))return;window.loadedScripts||(window.loadedScripts=[]),window.loadedScripts.push(scriptUrl);const script=document.createElement("script");script.src=scriptUrl,script.defer=!0,script.onload=()=>{this.scriptLoaded=!0},script.onerror=error=>{console.error("Load lazy script: Error loading the script ",error)},document.body.appendChild(script)}}customElements.define("lazy-script",LazyScript);class CustomAccordion extends HTMLElement{constructor(){super(),this.detailsElem=this.querySelector("details"),this.summaryElem=this.querySelector("summary"),this.container=this.summaryElem.nextElementSibling,this.oneAtATime=this.dataset.oneAtATime,window.initScriptOnDemand(this,this.init.bind(this))}init(){!this.clickListener&&window.getComputedStyle(this.container).transitionDuration!=="0s"&&(this.closeListener=this.handleDetailsClose.bind(this),this.clickListener=this.handleSummaryClick.bind(this),this.detailsElem.addEventListener("transitionend",this.closeListener),this.summaryElem.addEventListener("click",this.clickListener))}reinit(){this.detailsElem.removeEventListener("transitionend",this.closeListener),this.summaryElem.removeEventListener("click",this.clickListener),this.init()}handleDetailsClose(evt,force){force!==!0&&evt.target!==this.container||(this.detailsElem.classList.contains("closing")&&(this.detailsElem.open=!1,this.detailsElem.classList.remove("closing")),this.container.removeAttribute("style"))}close(preventAnimation){this.detailsElem.open&&(preventAnimation?this.detailsElem.open=!1:(this.container.style.height=`${this.container.scrollHeight}px`,this.detailsElem.classList.add("closing"),requestAnimationFrame(()=>this.container.style.height="0"),setTimeout(this.closeListener.bind(this,null,!0),450)))}open(preventAnimation){if(!this.detailsElem.open&&(preventAnimation?this.detailsElem.open=!0:(this.container.style.height="0",this.detailsElem.open=!0,this.container.style.height=`${this.container.scrollHeight}px`,setTimeout(this.closeListener.bind(this,null,!0),450)),this.dataset.revealsImage)){const section=this.closest(".section");section.classList.add("interacted-with");const image=section.querySelector(this.dataset.revealsImage),currentImage=section.querySelector(".revealed-image.reveal");image&&(currentImage&&currentImage.classList.remove("reveal"),image.classList.add("reveal"))}}handleSummaryClick(evt){evt.preventDefault(),this.detailsElem.open?this.close():(this.oneAtATime&&this.closest(this.oneAtATime).querySelectorAll("custom-accordion").forEach(customAccordion=>{customAccordion.detailsElem.open&&customAccordion.close()}),this.open())}}customElements.define("custom-accordion",CustomAccordion);class DetailsDisclosure extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.summary=this.mainDetailsToggle.querySelector("summary"),this.content=this.summary.nextElementSibling,window.initScriptOnDemand(this,this.init.bind(this))}init(){this.mainDetailsToggle.addEventListener("focusout",this.onFocusOut.bind(this)),this.mainDetailsToggle.addEventListener("toggle",this.onToggle.bind(this))}onFocusOut(){setTimeout(()=>{this.contains(document.activeElement)||this.close()})}onToggle(){this.animations||(this.animations=this.content.getAnimations()),this.mainDetailsToggle.hasAttribute("open")?this.animations.forEach(animation=>animation.play()):this.animations.forEach(animation=>animation.cancel())}close(){this.mainDetailsToggle.removeAttribute("open"),this.mainDetailsToggle.querySelector("summary").setAttribute("aria-expanded",!1)}}customElements.define("details-disclosure",DetailsDisclosure);class AccordionSearch extends HTMLElement{constructor(){super(),window.initScriptOnDemand(this,this.init.bind(this))}init(){this.section=this.closest(".section"),this.accordionContainer=this.section.querySelector(".accordion-container"),this.addEventListener("keyup",this.onKeyUp.bind(this))}onKeyUp(evt){let hiddenFields=0,shownFields=0,isFirst=!0;const noMatches=this.accordionContainer.querySelector(".no-matches");noMatches&&noMatches.remove(),this.section.querySelectorAll(".accordion").forEach(searchableBlock=>{searchableBlock.textContent.trim().toLowerCase().includes(evt.target.value.toLowerCase())?(searchableBlock.removeAttribute("aria-hidden"),shownFields++,isFirst?(searchableBlock.querySelector("custom-accordion").open(!0),searchableBlock.classList.add("first-accordion"),isFirst=!1):(searchableBlock.classList.remove("first-accordion"),searchableBlock.querySelector("custom-accordion").close(!0))):(searchableBlock.classList.remove("first-accordion"),searchableBlock.querySelector("custom-accordion").close(!0),searchableBlock.setAttribute("aria-hidden","true"),hiddenFields++)}),hiddenFields===0&&this.section.querySelectorAll(".accordion").forEach(searchableBlock=>searchableBlock.classList.remove("first-accordion")),shownFields===0&&(this.accordionContainer.innerHTML+=`<p class="no-matches mb-0 mt-0 t1">${window.strings.sections.collapsibleRows.noResults}</p>`),this.section.querySelectorAll(".collapsible-content__heading,.collapsible-content__text,.collapsible-content__spacer").forEach(elem=>{elem.classList.toggle("hidden",hiddenFields>0)})}}customElements.define("accordion-search",AccordionSearch);class HeaderMenu extends DetailsDisclosure{constructor(){super(),Shopify.designMode&&(this.blockSelectHandler=this.blockSelectHandler||this.onBlockSelect.bind(this),this.blockDeselectHandler=this.blockDeselectHandler||this.onBlockDeselect.bind(this),document.addEventListener("shopify:block:select",this.blockSelectHandler),document.addEventListener("shopify:block:deselect",this.blockDeselectHandler))}init(){this.header=document.querySelector(".header-wrapper"),window.matchMedia("(hover: hover)").matches&&this.header?(this.mouseEnterHandler=this.onMouseEnter.bind(this),this.mouseLeaveHandler=this.onMouseLeave.bind(this),this.mouseLeaveSummaryHandler=this.onMouseLeaveSummary.bind(this),this.mouseOverSummaryHandler=this.onMouseOverSummary.bind(this),this.addEventListener("mouseenter",this.mouseEnterHandler),this.addEventListener("mouseleave",this.mouseLeaveHandler),this.summary.addEventListener("mouseleave",this.mouseLeaveSummaryHandler),this.summary.addEventListener("mouseover",this.mouseOverSummaryHandler)):this.header&&(this.clickHandler=this.onClick.bind(this),this.addEventListener("click",this.clickHandler))}disconnectedCallback(){Shopify.designMode&&(document.removeEventListener("shopify:block:select",this.blockSelectHandler),document.removeEventListener("shopify:block:deselect",this.blockDeselectHandler)),this.mouseEnterHandler&&(this.removeEventListener("mouseenter",this.mouseEnterHandler),this.removeEventListener("mouseleave",this.mouseLeaveHandler),this.summary.removeEventListener("mouseleave",this.mouseLeaveSummaryHandler),this.summary.removeEventListener("mouseover",this.mouseOverSummaryHandler)),this.clickHandler&&this.removeEventListener("click",this.clickHandler)}onBlockSelect(evt){evt.target.closest("header-menu")===this&&this.mainDetailsToggle.open===!1&&(this.summary.click(),this.preventHoverClose=!0,document.querySelector(".drawer-menu--on-scroll")?.classList.add("drawer
1-menu--on-scroll--paused"))}onBlockDeselect(evt){evt.target.closest("header-menu")===this&&this.mainDetailsToggle.open&&(this.summary.click(),this.preventHoverClose=!1),document.querySelector(".drawer-menu--on-scroll")?.classList.remove("drawer-menu--on-scroll--paused")}closeAnyOpenMenus(exceptThisOne){this.header.querySelectorAll("header-menu > details[open]").forEach(menu=>{if(menu===exceptThisOne)return;const headerMenu=menu.closest("header-menu");headerMenu&&headerMenu.summary.click()})}closeAnyOpenMegaMenus(){this.header.querySelectorAll(".mega-menu[open]").forEach(megaMenu=>{const headerMenu=megaMenu.closest("header-menu");headerMenu&&headerMenu.summary.click()}),document.querySelector(".drawer-menu--on-scroll")?.classList.remove("drawer-menu--on-scroll--paused")}onClick(evt){evt.target.closest("custom-accordion")||this.closeAnyOpenMenus(evt.target.closest("details"))}onMouseEnter(){window.menuHoverIntentDelay=typeof window.menuHoverIntentDelay===void 0?100:window.menuHoverIntentDelay,this.hoverIntentTimer=setTimeout(()=>{window.menuHoverIntentDelay=0,this.mainDetailsToggle.open===!1&&(this.closeAnyOpenMegaMenus(),this.classList.add("open"),this.style.setProperty("--link-end",`${Number.parseInt(this.offsetTop+this.getBoundingClientRect().height)-1}px`),this.style.setProperty("--header-zindex","1"),this.summary.click())},window.menuHoverIntentDelay)}onMouseLeave(){clearTimeout(this.hoverIntentTimer),this.mainDetailsToggle.open&&!this.preventHoverClose&&(this.classList.remove("open"),this.summary.click())}onMouseLeaveSummary(){this.mouseOverSummary=!1,setTimeout(()=>{this.mouseOverSummary||this.style.setProperty("--header-zindex","0")},300)}onMouseOverSummary(){this.mouseOverSummary=!0}onToggle(){this.header&&(this.header.preventHide=this.mainDetailsToggle.open,document.documentElement.style.getPropertyValue("--header-bottom-position-desktop")===""&&document.documentElement.style.setProperty("--header-bottom-position-desktop",`${Math.floor(this.header.getBoundingClientRect().bottom)}px`))}}customElements.define("header-menu",HeaderMenu),(function(){function dispatchResizeEndEvent(){const resizeEndEvent=new Event("resizeend");window.dispatchEvent(resizeEndEvent)}window.addEventListener("resize",debounce(dispatchResizeEndEvent,250))})(),(function(){window.findTallestHeight=function(){document.querySelectorAll("[data-find-tallest]").forEach(element=>{const selector=element.getAttribute("data-find-tallest"),childElements=element.querySelectorAll(selector);let tallestHeight=0;childElements.forEach(child=>{tallestHeight=Math.max(tallestHeight,child.offsetHeight)}),element.style.setProperty(`--${selector.replace(/\./g,"")}-tallest`,`${tallestHeight}px`)})},document.addEventListener("DOMContentLoaded",window.findTallestHeight),window.addEventListener("resizeend",window.findTallestHeight),Shopify.designMode&&document.addEventListener("shopify:section:load",window.findTallestHeight)})(),window.visualViewport&&(()=>{let resizeScheduled=!1;const updateViewportSize=()=>{resizeScheduled=!1;const height=window.visualViewport?window.visualViewport.height:window.innerHeight;requestAnimationFrame(()=>{document.documentElement.style.setProperty("--bvh",`${height}px`)})},scheduleUpdate=()=>{resizeScheduled||(resizeScheduled=!0,requestAnimationFrame(updateViewportSize))};document.addEventListener("DOMContentLoaded",updateViewportSize),window.addEventListener("orientationchange",scheduleUpdate),window.addEventListener("resizeend",scheduleUpdate),"visualViewport"in window&&visualViewport.addEventListener("resize",scheduleUpdate)})(),window.makeTablesResponsive=function(){document.querySelectorAll(".rte table").forEach(table=>{if(!table.closest(".responsive-table")){const scroller=document.createElement("div");scroller.className="responsive-table",table.parentNode.insertBefore(scroller,table),scroller.appendChild(table)}})},makeTablesResponsive(),Shopify.designMode&&document.addEventListener("shopify:section:load",makeTablesResponsive),(function(){const scrollbarWidth=window.innerWidth-document.documentElement.clientWidth;
1function adjustBodyPadding(hasOverflowHidden){const body=document.body;hasOverflowHidden?scrollbarWidth>0&&scrollbarWidth<25&&(body.style.paddingRight=`${scrollbarWidth}px`,document.body.style.setProperty("--temp-scrollbar-width",`${scrollbarWidth}px`)):(body.style.paddingRight="",document.body.style.setProperty("--temp-scrollbar-width",""))}new MutationObserver(mutations=>{mutations.forEach(mutation=>{if(mutation.type==="attributes"&&mutation.attributeName==="class"){const hasOverflowHidden=document.body.classList.contains("overflow-hidden");adjustBodyPadding(hasOverflowHidden)}})}).observe(document.body,{attributes:!0})})(),(function(){const bubble=document.getElementById("cart-icon-bubble");if(bubble){const callback=function(mutationsList,observer2){for(let mutation of mutationsList)if(mutation.type==="childList"){const cartCount=bubble.querySelector(".cart-count-bubble");cartCount&&(cartCount.classList.add("animate--pop"),setTimeout(()=>{cartCount.classList.remove("animate--pop")},250));break}};new MutationObserver(callback).observe(bubble,{childList:!0,subtree:!0})}})(),(function(){const header=document.querySelector(".section-header");header&&(document.documentElement.style.setProperty("--header-start-live",`${header.getBoundingClientRect().top<0?0:header.getBoundingClientRect().top}px`),window.addEventListener("scroll",()=>{requestAnimationFrame(()=>{document.documentElement.style.setProperty("--header-start-live",`${header.getBoundingClientRect().top<0?0:header.getBoundingClientRect().top}px`)})},{passive:!0}))})(),(function(){const dispatchIdleEvent=()=>{window.dispatchEvent(new Event("browserIsIdle")),"requestIdleCallback"in window&&setTimeout(()=>{window.dispatchEvent(new Event("browserIsVeryIdle"))},8e3)};"requestIdleCallback"in window?window.requestIdleCallback(()=>dispatchIdleEvent()):window.setTimeout(()=>dispatchIdleEvent(),8e3)})(),document.addEventListener("keydown",evt=>{evt.code==="Tab"&&document.body.classList.add("tab-active")}),document.addEventListener("DOMContentLoaded",()=>{if(loadDesktopOnlyTemplates(),Shopify.designMode&&document.addEventListener("shopify:section:load",window.loadDesktopOnlyTemplates),document.body.classList.remove("page-is-loading"),setTimeout(()=>{document.body.classList.remove("page-is-not-idle"),document.body.classList.add("page-is-idle")},1e3),window.theme?.settings.externalDomainLinks&&document.addEventListener("click",event=>{const target=event.target.tagName!=="A"?event.target.closest("a"):event.target,ignorePrefixes=["mailto:","tel:","file:","javascript:","#"];target&&target.tagName==="A"&&window.location.hostname!==new URL(target.href).hostname&&!ignorePrefixes.some(prefix=>target.href.startsWith(prefix))&&["http:","https:"].includes(new URL(target.href).protocol)&&(target.target="_blank")}),window.theme?.settings.browserTab.length>0){const originalTitle=document.title;let isBlurred=!1;document.addEventListener("visibilitychange",()=>{document.hidden?(isBlurred=!0,setTimeout(()=>{isBlurred&&(document.title=window.theme?.settings.browserTab)},2e3)):(isBlurred=!1,document.title=originalTitle)})}const url=new URL(window.location.href);if(url.search.includes("customer_posted")){const anchor=url.hash;anchor&&setTimeout(()=>{const target=document.querySelector(anchor);if(target&&!target.closest(".section-popup")){const targetPosition=target.getBoundingClientRect().top+window.pageYOffset-200;window.scrollTo({top:targetPosition,behavior:"smooth"})}},500)}}),document.addEventListener("keydown",event=>{event.key==="Enter"&&event.target.classList.contains("js-prevent-enter-submit")&&event.preventDefault()}),document.addEventListener("click",function(event){const anchor=event.target.closest('a[href^="#"]:not(.no-scroll)');if(!anchor)return;const targetId=anchor.getAttribute("href").slice(1),targetElement=document.getElementById(targetId);if(targetElement){event.preventDefault();const headerHeight=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--header-height-live")||"0");window.scrollTo({top:targetElement.getBoundingClientRect().top+window.scrollY-headerHeight,behavior:"smooth"})}});
2//# sourceMappingURL=/cdn/shop/t/10/assets/global.js.map?v=140284737970459042841783725749

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.