1/* 2* @license 3* Palo Alto Theme (c) 4* 5* This file is included for advanced development by 6* Shopify Agencies. Modified versions of the theme 7* code are not supported by Shopify or Presidio Creative. 8* 9* In order to use this file you will need to change 10* theme.js to theme.dev.js in /layout/theme.liquid 11* 12*/(function(Ajaxinate,scrollLock){"use strict";(function(){const env={NODE_ENV:"production"};try{if(process){process.env=Object.assign({},process.env),Object.assign(process.env,env);return}}catch{}globalThis.process={env}})(),window.theme=window.theme||{},window.theme.cart=window.theme.cart||{},window.theme.sizes={mobile:480,small:768,large:1024,widescreen:1440},window.theme.keyboardKeys={TAB:"Tab",ENTER:"Enter",NUMPADENTER:"NumpadEnter",ESCAPE:"Escape",SPACE:"Space",LEFTARROW:"ArrowLeft",RIGHTARROW:"ArrowRight"},window.theme.focusable='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',window.theme.getWindowWidth=function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},window.theme.getWindowHeight=function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},window.theme.isDesktop=function(){return window.theme.getWindowWidth()>=window.theme.sizes.small},window.theme.isMobile=function(){return window.theme.getWindowWidth()<window.theme.sizes.small};const moneyFormat="${{amount}}";window.theme.formatMoney=function(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));let value="";const placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision=2,thousands=",",decimal="."){if(isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);const parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${thousands}`),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_with_apostrophe_separator":value=formatWithDelimiters(cents,2,"'",".");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ","");break;case"amount_with_space_separator":value=formatWithDelimiters(cents,2," ",",");break;case"amount_with_period_and_space_separator":value=formatWithDelimiters(cents,2," ",".");break}return formatString.replace(placeholderRegex,value)},window.theme.debounce=function(fn,time){let timeout;return function(){if(fn){const functionCall=()=>fn.apply(this,arguments);clearTimeout(timeout),timeout=setTimeout(functionCall,time)}}};const selectors$1m={body:"body",main:"[data-main]",collectionFilters:"[data-collection-filters]",footer:'[data-section-type*="footer"]',header:"[data-header-height]",stickyHeader:'[data-site-header][data-position="fixed"]',announcementBar:"[data-announcement-bar]",collectionStickyBar:"[data-collection-sticky-bar]",logoTextLink:"[data-logo-text-link]"},classes$1c={templateCollection:"template-collection",templateSearch:"template-search",supportsTransparentHeader:"supports-transparent-header"};window.theme.getScreenOrientation=function(){if(window.matchMedia("(orientation: portrait)").matches)return"portrait";if(window.matchMedia("(orientation: landscape)").matches)return"landscape"};let screenOrientation=window.theme.getScreenOrientation();window.theme.readHeights=function(){const h={};return h.windowHeight=Math.min(window.screen.height,window.innerHeight),h.footerHeight=getHeight(selectors$1m.footer),h.headerHeight=getHeight(selectors$1m.header),h.stickyHeaderHeight=isHeaderSticky()?window.stickyHeaderHeight:0,h.headerInitialHeight=parseInt(document.querySelector(selectors$1m.header)?.dataset.height||document.querySelector(selectors$1m.header)?.offsetHeight)||0,h.announcementBarHeight=getHeight(selectors$1m.announcementBar),h.collectionStickyBarHeight=getHeight(selectors$1m.collectionStickyBar),h};function setVarsOnResize(){document.addEventListener("theme:resize",resizeVars),window.theme.setVars(),document.dispatchEvent(new CustomEvent("theme:vars"),{bubbles:!1})}window.theme.setVars=function(){calcVars()};function resizeVars(){calcVars(!0)}function calcVars(checkOrientation=!1){const body=document.querySelector(selectors$1m.body),hasCollectionFilters=document.querySelector(selectors$1m.collectionFilters),hasLogoTextLink=document.querySelector(selectors$1m.logoTextLink)!==null;let{windowHeight,headerHeight,headerInitialHeight,announcementBarHeight,footerHeight,collectionStickyBarHeight}=window.theme.readHeights();hasLogoTextLink&&(headerHeight=recalcHeaderHeight());const contentFullHeight=window.isHeaderTransparent&&checkFirstSectionTransparency()?windowHeight-announcementBarHeight:windowHeight-headerInitialHeight-announcementBarHeight;let fullHeight=isHeaderSticky()?windowHeight-window.stickyHeaderHeight:windowHeight;
12const isCollectionPage=body.classList.contains(classes$1c.templateCollection),isSearchPage=body.classList.contains(classes$1c.templateSearch),isPageWithFilters=isCollectionPage&&hasCollectionFilters||isSearchPage&&hasCollectionFilters;if(document.documentElement.style.setProperty("--footer-height",`${footerHeight}px`),document.documentElement.style.setProperty("--content-full",`${contentFullHeight}px`),document.documentElement.style.setProperty("--content-min",`${windowHeight-headerHeight-footerHeight}px`),document.documentElement.style.setProperty("--collection-sticky-bar-height",`${collectionStickyBarHeight}px`),isPageWithFilters&&(fullHeight=windowHeight),!checkOrientation){document.documentElement.style.setProperty("--full-height",`${fullHeight}px`);return}const currentScreenOrientation=window.theme.getScreenOrientation();currentScreenOrientation!==screenOrientation&&(document.documentElement.style.setProperty("--full-height",`${fullHeight}px`),screenOrientation=currentScreenOrientation)}function getHeight(selector){const el=document.querySelector(selector);return el?el.clientHeight:0}function checkFirstSectionTransparency(){return document.querySelector(selectors$1m.main).firstElementChild.classList.contains(classes$1c.supportsTransparentHeader)}function isHeaderSticky(){return document.querySelector(selectors$1m.stickyHeader)}function recalcHeaderHeight(){document.documentElement.style.setProperty("--header-height","auto"),document.documentElement.style.setProperty("--header-sticky-height","auto");const resetHeight=document.querySelector(selectors$1m.header).offsetHeight;return requestAnimationFrame(()=>{document.documentElement.style.setProperty("--header-height",`${resetHeight}px`),document.documentElement.style.setProperty("--header-sticky-height",`${resetHeight}px`)}),resetHeight}window.addEventListener("DOMContentLoaded",setVarsOnResize),document.addEventListener("shopify:section:load",setVarsOnResize),window.theme.scrollTo=elementTop=>{const{stickyHeaderHeight}=window.theme.readHeights();window.scrollTo({top:elementTop+Math.round(window.scrollY)-stickyHeaderHeight,left:0,behavior:"smooth"})};const a11y={state:{firstFocusable:null,lastFocusable:null,trigger:null,mainTrigger:null},trapFocus:function(options2){var focusableElements=Array.from(options2.container.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex^="-"])')).filter(function(element){var width=element.offsetWidth,height=element.offsetHeight;return width!==0&&height!==0&&getComputedStyle(element).getPropertyValue("display")!=="none"});focusableElements=focusableElements.filter(function(element){return!element.classList.contains("deferred-media__poster")}),this.state.firstFocusable=focusableElements[0],this.state.lastFocusable=focusableElements[focusableElements.length-1],options2.elementToFocus||(options2.elementToFocus=this.state.firstFocusable||options2.container),this._setupHandlers(),document.addEventListener("focusin",this._onFocusInHandler),document.addEventListener("focusout",this._onFocusOutHandler),options2.container.setAttribute("tabindex","-1"),options2.elementToFocus.focus()},removeTrapFocus:function(options2){const focusVisible=!document.body.classList.contains("no-outline");options2&&options2.container&&options2.container.removeAttribute("tabindex"),document.removeEventListener("focusin",this._onFocusInHandler),this.state.trigger&&focusVisible&&this.state.trigger.focus()},_manageFocus:function(evt){evt.code===theme.keyboardKeys.TAB&&(evt.target===this.state.lastFocusable&&!evt.shiftKey&&(evt.preventDefault(),this.state.firstFocusable.focus()),evt.target===this.state.firstFocusable&&evt.shiftKey&&(evt.preventDefault(),this.state.lastFocusable.focus()))},_onFocusOut:function(){document.removeEventListener("keydown",this._manageFocusHandler)},_onFocusIn:function(evt){evt.target!==this.state.lastFocusable&&evt.target!==this.state.firstFocusable||document.addEventListener("keydown",this._manageFocusHandler)},_setupHandlers:function(){this._onFocusInHandler||(this._onFocusInHandler=this._onFocusIn.bind(this)),this._onFocusOutHandler||(this._onFocusOutHandler=this._onFocusIn.bind(this)),this._manageFocusHandler||(this._manageFocusHandler=this._manageFocus.bind(this))}};window.theme=window.theme||{},window.theme.a11y=a11y,window.theme.throttle=(fn,wait)=>{let prev2,next;return function invokeFn(...args){const now=Date.now();next=clearTimeout(next),!prev2||now-prev2>=wait?(fn.apply(null,args),prev2=now):next=setTimeout(invokeFn.bind(null,...args),wait-(now-prev2))}},window.theme.wrap=(toWrap,wrapperClass="",wrapperOption)=>{const wrapper=wrapperOption||document.createElement("div");return wrapper.classList.add(wrapperClass),wrapper.setAttribute("data-scroll-lock-scrollable",""),toWrap.parentNode.insertBefore(wrapper,toWrap),wrapper.appendChild(toWrap)},window.theme.wrapElements=function(container){container.querySelectorAll("table").forEach(table=>{window.theme.wrap(table,"table-wrapper")})},window.addEventListener("DOMContentLoaded",window.theme.wrapElements(document)),document.addEventListener("shopify:section:load",e=>window.theme.wrapElements(e.target));function getScript(url,callback,callbackError){let head=document.getElementsByTagName("head")[0],done=!1,script=document.createElement("script");script.src=url,script.onload=script.onreadystatechange=function(){!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")?(done=!0,callback()):callbackError()},head.appendChild(script)}const loaders={};window.isYoutubeAPILoaded=!1,window.isVimeoAPILoaded=!1;function loadScript(options2={}){if(options2.type||(options2.type="json"),options2.url)return loaders[options2.url]?loaders[options2.url]:getScriptWithPromise(options2.url,options2.type);if(options2.json)return loaders[options2.json]?Promise.resolve(loaders[options2.json]):window.fetch(options2.json).then(response=>response.json()).then(response=>(loaders[options2.json]=response,response));if(options2.name){const key="".concat(options2.name,options2.version);
12return loaders[key]?loaders[key]:loadShopifyWithPromise(options2)}else return Promise.reject()}function getScriptWithPromise(url,type){const loader=new Promise((resolve,reject)=>{type==="text"?fetch(url).then(response=>response.text()).then(data=>{resolve(data)}).catch(error=>{reject(error)}):getScript(url,function(){resolve()},function(){reject()})});return loaders[url]=loader,loader}function loadShopifyWithPromise(options2){const key="".concat(options2.name,options2.version),loader=new Promise((resolve,reject)=>{try{window.Shopify.loadFeatures([{name:options2.name,version:options2.version,onLoad:err=>{onLoadFromShopify(resolve,reject,err)}}])}catch(err){reject(err)}});return loaders[key]=loader,loader}function onLoadFromShopify(resolve,reject,err){return err?reject(err):resolve()}const selectors$1l={videoIframe:"[data-video-id]"},classes$1b={loaded:"loaded"},attributes$Y={dataEnableSound:"data-enable-sound",dataEnableBackground:"data-enable-background",dataEnableAutoplay:"data-enable-autoplay",dataEnableLoop:"data-enable-loop",dataVideoId:"data-video-id",dataVideoType:"data-video-type"};class LoadVideoVimeo{constructor(container){this.container=container,this.player=this.container.querySelector(selectors$1l.videoIframe),this.player&&(this.videoID=this.player.getAttribute(attributes$Y.dataVideoId),this.videoType=this.player.getAttribute(attributes$Y.dataVideoType),this.enableBackground=this.player.getAttribute(attributes$Y.dataEnableBackground)==="true",this.disableSound=this.player.getAttribute(attributes$Y.dataEnableSound)==="false",this.enableAutoplay=this.player.getAttribute(attributes$Y.dataEnableAutoplay)!=="false",this.enableLoop=this.player.getAttribute(attributes$Y.dataEnableLoop)!=="false",this.videoType=="vimeo"&&this.init())}init(){this.loadVimeoPlayer()}loadVimeoPlayer(){const oembedUrl="https://vimeo.com/api/oembed.json",vimeoUrl="https://vimeo.com/"+this.videoID;let paramsString="";const state=this.player,params={url:vimeoUrl,background:this.enableBackground,muted:this.disableSound,autoplay:this.enableAutoplay,loop:this.enableLoop};for(let key in params)paramsString+=encodeURIComponent(key)+"="+encodeURIComponent(params[key])+"&";fetch(`${oembedUrl}?${paramsString}`).then(response=>response.json()).then(function(data){state.innerHTML=data.html,setTimeout(function(){state.parentElement.classList.add(classes$1b.loaded)},1e3)}).catch(function(){})}}const selectors$1k={videoIframe:"[data-video-id]",videoWrapper:".video-wrapper",youtubeWrapper:"[data-youtube-wrapper]"},attributes$X={dataSectionId:"data-section-id",dataEnableSound:"data-enable-sound",dataHideOptions:"data-hide-options",dataCheckPlayerVisibility:"data-check-player-visibility",dataVideoId:"data-video-id",dataVideoType:"data-video-type"},classes$1a={loaded:"loaded"},players=[];class LoadVideoYT{constructor(container){this.container=container,this.player=this.container.querySelector(selectors$1k.videoIframe),this.player&&(this.videoOptionsVars={},this.videoID=this.player.getAttribute(attributes$X.dataVideoId),this.videoType=this.player.getAttribute(attributes$X.dataVideoType),this.videoType=="youtube"&&(this.checkPlayerVisibilityFlag=this.player.getAttribute(attributes$X.dataCheckPlayerVisibility)==="true",this.playerID=this.player.querySelector(selectors$1k.youtubeWrapper)?this.player.querySelector(selectors$1k.youtubeWrapper).id:this.player.id,this.player.hasAttribute(selectors$1k.dataHideOptions)&&(this.videoOptionsVars={cc_load_policy:0,iv_load_policy:3,modestbranding:1,playsinline:1,autohide:0,controls:0,branding:0,showinfo:0,rel:0,fs:0,wmode:"opaque"}),this.init(),this.container.addEventListener("touchstart",function(e){if(e.target.matches(selectors$1k.videoWrapper)||e.target.closest(selectors$1k.videoWrapper)){const playerID=e.target.querySelector(selectors$1k.videoIframe).id;players[playerID].playVideo()}},{passive:!0})))}init(){window.isYoutubeAPILoaded?this.loadYoutubePlayer():loadScript({url:"https://www.youtube.com/iframe_api"}).then(()=>this.loadYoutubePlayer())}loadYoutubePlayer(){const currentYoutubeOptions={...{height:"720",width:"1280",playerVars:this.videoOptionsVars,events:{onReady:event=>{const id=event.target.getIframe().id;document.querySelector(`#${id}`).getAttribute(attributes$X.dataEnableSound)==="true"?event.target.unMute():event.target.mute(),event.target.playVideo(),this.checkPlayerVisibilityFlag&&(this.checkPlayerVisibility(id),window.addEventListener("scroll",window.theme.throttle(()=>{this.checkPlayerVisibility(id)},150)))},onStateChange:event=>{event.data==0&&event.target.playVideo(),event.data==1&&event.target.getIframe().parentElement.classList.add(classes$1a.loaded)}}}};currentYoutubeOptions.videoId=this.videoID,this.videoID.length&&YT.ready(()=>{players[this.playerID]=new YT.Player(this.playerID,currentYoutubeOptions)}),window.isYoutubeAPILoaded=!0}checkPlayerVisibility(id){let playerID;if(typeof id=="string")playerID=id;else if(id.data!=null)playerID=id.data.id;else return;const playerElement=document.getElementById(playerID+"-container");if(!playerElement)return;const player=players[playerID],box=playerElement.getBoundingClientRect();let isVisible=visibilityHelper.isElementPartiallyVisible(playerElement)||visibilityHelper.isElementTotallyVisible(playerElement);box.top<0&&playerElement.clientHeight+box.top>=0&&(isVisible=!0),isVisible&&player&&typeof player.playVideo=="function"?player.playVideo():!isVisible&&player&&typeof player.pauseVideo=="function"&&player.pauseVideo()}onUnload(){const playerID="youtube-"+this.container.getAttribute(attributes$X.dataSectionId);players[playerID]&&players[playerID].destroy()}}const selectors$1j={notificationForm:"[data-notification-form]",notification:"[data-notification]",popupClose:"[data-popup-close]"}
12,classes$19={popupSuccess:"pswp--success",notificationPopupVisible:"notification-popup-visible"};class LoadNotification{constructor(popup,pswpElement){this.popup=popup,this.pswpElement=pswpElement,this.notificationForm=null,this.notificationStopSubmit=!0,this.sessionStorage=window.sessionStorage;const notificationWrapper=this.pswpElement.querySelector(selectors$1j.notification);this.outerCloseEvent=e=>{notificationWrapper.contains(e.target)||this.popup.close()},this.init()}init(){this.popup.listen("preventDragEvent",(e,isDown,preventObj)=>{preventObj.prevent=!1});const notificationFormSuccess=window.location.search.indexOf("?contact_posted=true")!==-1;this.notificationForm=this.pswpElement.querySelector(selectors$1j.notificationForm);const closeBtn=this.pswpElement.querySelector(selectors$1j.popupClose);document.body.classList.add(classes$19.notificationPopupVisible),this.pswpElement.addEventListener("mousedown",()=>{this.popup.framework.unbind(window,"pointermove pointerup pointercancel",this.popup)}),notificationFormSuccess&&this.pswpElement.classList.add(classes$19.popupSuccess),this.notificationForm.addEventListener("submit",e=>this.notificationSubmitEvent(e)),this.pswpElement.addEventListener("click",this.outerCloseEvent),closeBtn.addEventListener("click",()=>{this.popup.close()}),this.popup.listen("destroy",()=>{this.notificationRemoveStorage(),this.pswpElement.removeEventListener("click",this.outerCloseEvent),document.body.classList.remove(classes$19.notificationPopupVisible)})}notificationSubmitEvent(e){this.notificationStopSubmit&&(e.preventDefault(),this.notificationRemoveStorage(),this.notificationWriteStorage(),this.notificationStopSubmit=!1,this.notificationForm.submit())}notificationWriteStorage(){this.sessionStorage!==void 0&&this.sessionStorage.setItem("notification_form_id",this.notificationForm.id)}notificationRemoveStorage(){this.sessionStorage.removeItem("notification_form_id")}}const hosts={html5:"html5",youtube:"youtube",vimeo:"vimeo"},selectors$1i={deferredMedia:"[data-deferred-media]",deferredMediaButton:"[data-deferred-media-button]",productMediaWrapper:"[data-product-single-media-wrapper]",mediaContainer:"[data-video]",mediaHidden:".media--hidden"},classes$18={mediaHidden:"media--hidden"},attributes$W={loaded:"loaded",sectionId:"data-section-id",dataAutoplayVideo:"data-autoplay-video",mediaId:"data-media-id"};class ProductVideo{constructor(container){this.container=container,this.id=this.container.getAttribute(attributes$W.sectionId),this.autoplayVideo=this.container.getAttribute(attributes$W.dataAutoplayVideo)==="true",this.players={},this.pauseContainerMedia=(mediaId,container2=this.container)=>this.pauseOtherMedia(mediaId,container2),this.init()}init(){this.container.querySelectorAll(selectors$1i.mediaContainer).forEach(mediaContainer=>{const deferredMediaButton=mediaContainer.querySelector(selectors$1i.deferredMediaButton);deferredMediaButton&&deferredMediaButton.addEventListener("click",this.loadContent.bind(this,mediaContainer)),this.autoplayVideo&&this.loadContent(mediaContainer)})}loadContent(mediaContainer){if(mediaContainer.querySelector(selectors$1i.deferredMedia).getAttribute(attributes$W.loaded))return;const content=document.createElement("div");content.appendChild(mediaContainer.querySelector("template").content.firstElementChild.cloneNode(!0));const mediaId=mediaContainer.dataset.mediaId,element=content.querySelector("video, iframe"),host=this.hostFromVideoElement(element),deferredMedia=mediaContainer.querySelector(selectors$1i.deferredMedia);deferredMedia.appendChild(element),deferredMedia.setAttribute("loaded",!0),this.players[mediaId]={mediaId,sectionId:this.id,c
12ontainer:mediaContainer,element,host,ready:()=>{this.createPlayer(mediaId)}};const video=this.players[mediaId];switch(video.host){case hosts.html5:this.loadVideo(video,hosts.html5);break;case hosts.vimeo:window.isVimeoAPILoaded?this.loadVideo(video,hosts.vimeo):loadScript({url:"https://player.vimeo.com/api/player.js"}).then(()=>this.loadVideo(video,hosts.vimeo));break;case hosts.youtube:window.isYoutubeAPILoaded?this.loadVideo(video,hosts.youtube):loadScript({url:"https://www.youtube.com/iframe_api"}).then(()=>this.loadVideo(video,hosts.youtube));break}}hostFromVideoElement(video){if(video.tagName==="VIDEO")return hosts.html5;if(video.tagName==="IFRAME"){if(/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(video.src))return hosts.youtube;if(video.src.includes("vimeo.com"))return hosts.vimeo}return null}loadVideo(video,host){video.host===host&&video.ready()}createPlayer(mediaId){const video=this.players[mediaId];switch(video.host){case hosts.html5:video.element.addEventListener("play",()=>{video.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0})}),video.element.addEventListener("pause",()=>{video.container.dispatchEvent(new CustomEvent("theme:media:pause"),{bubbles:!0})}),this.autoplayVideo&&this.observeVideo(video,mediaId);break;case hosts.vimeo:video.player=new Vimeo.Player(video.element),video.player.play(),video.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0}),window.isVimeoAPILoaded=!0,video.player.on("play",()=>{video.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0})}),video.player.on("pause",()=>{video.container.dispatchEvent(new CustomEvent("theme:media:pause"),{bubbles:!0})}),this.autoplayVideo&&this.observeVideo(video,mediaId);break;case hosts.youtube:if(video.host==hosts.youtube&&video.player)return;YT.ready(()=>{const videoId=video.container.dataset.videoId;video.player=new YT.Player(video.element,{videoId,events:{onReady:event=>{event.target.playVideo(),video.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0})},onStateChange:event=>{event.data==1&&video.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0}),event.data==2&&video.container.dispatchEvent(new CustomEvent("theme:media:pause"),{bubbles:!0}),event.data==0&&video.container.dispatchEvent(new CustomEvent("theme:media:pause"),{bubbles:!0})}}}),window.isYoutubeAPILoaded=!0,this.autoplayVideo&&this.observeVideo(video,mediaId)});break}video.container.addEventListener("theme:media:visible",event=>this.onVisible(event)),video.container.addEventListener("theme:media:hidden",event=>this.onHidden(event)),video.container.addEventListener("xrLaunch",event=>this.onHidden(event))}observeVideo(video){new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{const outsideViewport=entry.intersectionRatio==0,isVisible=!video.element.closest(selectors$1i.mediaHidden);outsideViewport?this.pauseVideo(video):isVisible&&this.playVideo(video)})},{rootMargin:"200px",threshold:[0,.25,.75,1]}).observe(video.element)}playVideo(video){video.player&&video.player.playVideo?video.player.playVideo():video.element&&video.element.play?video.element.play():video.player&&video.player.play&&video.player.play(),video.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0})}pauseVideo(video){video.player&&video.player.pauseVideo?video.player.playerInfo.playerState=="1"&&video.player.pauseVideo():video.player&&video.player.pause?video.player.pause():video.element&&!video.element.paused&&typeof video.element.pause=="function"&&video.element?.pause()}onHidden(event){if(typeof event.target.dataset.mediaId<"u"){const mediaId=event.target.dataset.mediaId,video=this.players[mediaId];this.pauseVideo(video)}}onVisible(event){if(typeof event.target.dataset.mediaId<"u"){const mediaId=event.target.dataset.mediaId,video=this.players[mediaId];setTimeout(()=>{this.playVideo(video)},50),this.pauseContainerMedia(mediaId)}}pauseOtherMedia(mediaId,container){const currentMedia=`[${attributes$W.mediaId}="${mediaId}"]`,otherMedia=container.querySelectorAll(`${selectors$1i.productMediaWrapper}:not(${currentMedia})`);
12otherMedia.length&&otherMedia.forEach(media=>{media.dispatchEvent(new CustomEvent("theme:media:hidden"),{bubbles:!0}),media.classList.add(classes$18.mediaHidden)})}}const selectors$1h={collapsible:"[data-collapsible]",toggleEllipsis:"toggle-ellipsis",content:"[data-content]",actions:"[data-actions]",height:"[data-height]",collapsibleContent:"[data-collapsible-content]",collapsibleContainer:"[data-collapsible-container]",single:"[data-collapsible-single]",trigger:"[data-collapsible-trigger]"},classes$17={isExpanded:"is-expanded",isOpen:"is-open"},attributes$V={expanded:"aria-expanded",controls:"aria-controls",triggerMobile:"data-collapsible-trigger-mobile",transitionOverride:"data-collapsible-transition-override"},settings$b={animationDelay:500},sections$J={};class Collapsible{constructor(container){this.container=container,this.single=this.container.querySelector(selectors$1h.single),this.triggers=this.container.querySelectorAll(selectors$1h.trigger),this.resetHeightTimer=0,this.isTransitioning=!1,this.transitionOverride=this.container.hasAttribute(attributes$V.transitionOverride),this.collapsibleToggleEvent=event=>window.theme.throttle(this.collapsibleToggle(event),1250),this.onResizeEvent=()=>this.onResize(),this.init()}init(){window.addEventListener("theme:resize:width",this.onResizeEvent),this.triggers.forEach(trigger=>{trigger.addEventListener("click",this.collapsibleToggleEvent),trigger.addEventListener("keyup",this.collapsibleToggleEvent)}),this.container.addEventListener("theme:ellipsis:toggle",event=>{this.handleEllipsisToggle(event)})}handleEllipsisToggle(event){const{dropdownHeight=0,isExpanded=!1}=event.detail,productAccordion=event.target.closest(selectors$1h.collapsible);if(!productAccordion)return;const trigger=productAccordion.querySelector(selectors$1h.trigger);if(!trigger)return;const dropdownId=trigger.getAttribute(attributes$V.controls),dropdown=document.getElementById(dropdownId);if(!dropdown)return;const heightElement=productAccordion.querySelector(selectors$1h.height),ellipsisClosedHeight=heightElement&&parseInt(heightElement.dataset.height,10)||0;this.setDropdownHeight(dropdown,isExpanded?dropdownHeight:ellipsisClosedHeight)}collapsibleToggle(e){e.preventDefault();const trigger=e.target.matches(selectors$1h.trigger)?e.target:e.target.closest(selectors$1h.trigger),dropdownId=trigger.getAttribute(attributes$V.controls),dropdown=document.getElementById(dropdownId),triggerMobile=trigger.hasAttribute(attributes$V.triggerMobile),isExpanded=trigger.classList.contains(classes$17.isExpanded),isSpace=e.code===theme.keyboardKeys.SPACE,isEscape=e.code===theme.keyboardKeys.ESCAPE,isMobile=window.innerWidth<theme.sizes.small;this.isTransitioning&&!this.transitionOverride||e.code&&!isSpace&&!isEscape||!isExpanded&&isEscape||triggerMobile&&!isMobile||(this.isTransitioning=!0,trigger.disabled=!0,this.single&&this.closeOtherItems(trigger),requestAnimationFrame(()=>{isExpanded?this.closeItem(dropdown,trigger):this.openItem(dropdown,trigger)}))}closeOtherItems(trigger){const triggerContainer=trigger.closest(selectors$1h.single);this.triggers.forEach(otherTrigger=>{if(trigger===otherTrigger||!otherTrigger.classList.contains(classes$17.isExpanded))return;const otherTriggerContainer=otherTrigger.closest(selectors$1h.single);if(triggerContainer!==otherTriggerContainer)return;const dropdown=document.getElementById(otherTrigger.getAttribute(attributes$V.controls));requestAnimationFrame(()=>this.closeItem(dropdown,otherTrigger))})}openItem(dropdown,trigger){const dropdownHeight=dropdown.querySelector(selectors$1h.collapsibleContent).offsetHeight;this.setDropdownHeight(dropdown,dropdownHeight),this.handleTransitioning(dropdown,!0),this.updateAttributes(trigger,dropdown,!0),trigger.dispatchEvent(new CustomEvent("theme:form:sticky",{bubbles:!0,detail:{element:"accordion"}}))}closeItem(dropdown,trigger){let dropdownHeight=dropdown.querySelector(selectors$1h.collapsibleContent).offsetHeight;this.setDropdownHeight(dropdown,dropdownHeight),this.handleTransitioning(dropdown,!1),this.updateAttributes(trigger,dropdown,!1),requestAnimationFrame(()=>{dropdownHeight=0,this.setDropdownHeight(dropdown,0)})}setDropdownHeight(dropdown,height){dropdown.style.height=`${height}px`}handleTransitioning(dropdown,isExpanded=!1){this.resetHeightTimer&&clearTimeout(this.resetHeightTimer),isExpanded?this.resetHeightTimer=setTimeout(()=>{dropdown.querySelector(selectors$1h.toggleEllipsis)||(dropdown.style.height="auto"),this.isTransitioning=!1},settings$b.animationDelay):(this.isTransitioning=!1,this.resetHeightTimer=setTimeout(()=>{dropdown.style.height=""},settings$b.animationDelay))}updateAttributes(trigger,dropdown,isExpanded){dropdown.classList.toggle(classes$17.isExpanded,isExpanded),trigger.setAttribute(attributes$V.expanded,isExpanded),trigger.classList.toggle(classes$17.isExpanded,isExpanded),setTimeout(()=>{trigger.disabled=!1},settings$b.animationDelay)}
12onResize(){if(!this.container.querySelector(`.${classes$17.isExpanded}`))return;const expandedDropdowns=Array.from(document.querySelectorAll(`${selectors$1h.collapsible}:has(.${classes$17.isExpanded})`)),openedEllipsis=document.querySelectorAll(`${selectors$1h.collapsible}:has(${selectors$1h.toggleEllipsis}.${classes$17.isOpen})`);expandedDropdowns.forEach(dropdown=>{dropdown.querySelector(selectors$1h.toggleEllipsis)?.classList.contains(classes$17.isOpen)&&this.updateDropdownHeight(dropdown)}),openedEllipsis.forEach(accordion=>{expandedDropdowns.includes(accordion)||this.updateDropdownHeight(accordion,!0)})}updateDropdownHeight=(dropdown,ellipsis=!1)=>{const container=dropdown.querySelector(selectors$1h.collapsibleContainer),toggleEllipsis=dropdown.querySelector(selectors$1h.toggleEllipsis),actions=toggleEllipsis.querySelector(selectors$1h.actions),dropdownHeight=toggleEllipsis.querySelector(selectors$1h.content).offsetHeight+actions.offsetHeight*2;ellipsis||this.setDropdownHeight(container,dropdownHeight),toggleEllipsis.style.setProperty("--height",`${dropdownHeight}px`)};onUnload(){this.triggers.forEach(trigger=>{trigger.removeEventListener("click",this.collapsibleToggleEvent),trigger.removeEventListener("keyup",this.collapsibleToggleEvent)}),window.removeEventListener("theme:resize:width",this.onResizeEvent)}}const collapsible={onLoad(){sections$J[this.id]=new Collapsible(this.container)},onUnload(){sections$J[this.id].onUnload()}},selectors$1g={aos:"[data-aos]:not(.aos-animate)",aosAnchor:"[data-aos-anchor]",animatable:"[data-aos], [data-aos-anchor]",watchMutations:'[id^="api-cart-items-"], [data-collection-filters], [data-collection-products], #AjaxinateLoop, [data-tab="resultsProducts"]',textHighlight:"text-highlight",counterUps:"text-count-up",flickitySlider:".flickity-slider",slide:"[data-slide]",carouselMobile:".carousel--mobile"},classes$16={aosAnimate:"aos-animate",isLoading:"is-loading",isSelected:".is-selected"},attributes$U={aos:"data-aos",aosAnchor:"data-aos-anchor",aosIntersection:"data-aos-intersection",aosDebounce:"data-aos-debounce",aosCustomInit:"data-aos-custom-init",aosWatchAnchors:"data-aos-watch-anchors",aosTrigger:"data-aos-trigger",aosCarouselMobile:"data-aos-carousel-mobile",aosCarouselDesktop:"data-aos-carousel-desktop"},settings$a={intersectionRatio:.1,debounceTime:0};let anchorObserversCollection=new Set;function anchorsIntersectionObserver(){const anchors=document.querySelectorAll(selectors$1g.aosAnchor);initAnchorObservers(anchors)}function initAnchorObservers(anchors){anchors.length&&(anchors.forEach(anchor=>{const containerId=anchor.dataset.aosAnchor;let container;containerId!=""&&(container=document.querySelector(containerId)),container&&!anchorObserversCollection.has(anchor)&&anchorObserversCollection.add(container)}),anchorObserversCollection.forEach(container=>{aosAnchorObserver.observe(container)}))}const aosAnchorObserver=new IntersectionObserver((entries,observer)=>{entries.forEach(entry=>{const target=entry.target,intersectionRatio=entry.intersectionRatio,isIntersecting=entry.isIntersecting;let intersectAt=settings$a.intersectionRatio;target.hasAttribute(attributes$U.aosIntersection)&&(intersectAt=Number(target.getAttribute(attributes$U.aosIntersection)));let timeout,debounceTime=settings$a.debounceTime;target.hasAttribute(attributes$U.aosDebounce)&&(debounceTime=Number(target.getAttribute(attributes$U.aosDebounce))),isIntersecting&&intersectionRatio>intersectAt&&(debounceTime!==0?(timeout&&clearTimeout(timeout),timeout=setTimeout(()=>onIntersecting(target),debounceTime)):onIntersecting(target),observer.unobserve(target),anchorObserversCollection.delete(target))})},{root:null,rootMargin:"0px",threshold:[0,.05,.1,.15,.2,.25,.5,.75,1]});function onIntersecting(target){if(!target)return;if(animate(target),target.hasAttribute(attributes$U.aosCarouselDesktop)&&window.theme.isDesktop()&&target.querySelector(selectors$1g.flickitySlider)){const slide=target.querySelectorAll(selectors$1g.slide),activeSlides=[...slide].filter(slide2=>{if(slide2.matches(classes$16.isSelected))return slide2}),inactiveSlides=[...slide].filter(slide2=>{if(!slide2.matches(classes$16.isSelected))return slide2});if(activeSlides.length>0){const triggerId=activeSlides[activeSlides.length-1].id;activeSlides[activeSlides.length-1].setAttribute(attributes$U.aosTrigger,`#${triggerId}
12`),inactiveSlides.forEach(slide2=>{slide2.querySelectorAll(selectors$1g.animatable).forEach(element=>{element.setAttribute(attributes$U.aosAnchor,`#${triggerId}`)})})}}if(target.hasAttribute(attributes$U.aosCarouselMobile)&&window.theme.isMobile()){const slider2=target.querySelector(selectors$1g.carouselMobile);if(slider2){const slides=[...slider2.children],triggerId=slides[0].id;slides.length>1&&(slides[0].setAttribute(attributes$U.aosTrigger,`#${triggerId}`),slides.forEach(slide=>{slide.querySelectorAll(selectors$1g.animatable).forEach(element=>{element.setAttribute(attributes$U.aosAnchor,`#${triggerId}`)})}))}}if(target.hasAttribute(attributes$U.aosTrigger)){const triggerId=target.getAttribute(attributes$U.aosTrigger);document.querySelectorAll(`[${attributes$U.aosAnchor}="${triggerId}"]`).forEach(element=>animate(element))}let elementsToAnimate=target.querySelectorAll(selectors$1g.aos);target.hasAttribute(attributes$U.aosWatchAnchors)&&(elementsToAnimate=[...elementsToAnimate].filter(element=>{const anchor=element.hasAttribute(attributes$U.aosAnchor)?element.getAttribute(attributes$U.aosAnchor):!1;if(anchor&&`#${target.id}`===anchor)return element})),elementsToAnimate.forEach(item=>
12{if(item.hasAttribute(attributes$U.aosCustomInit)){target.dispatchEvent(new CustomEvent("theme:target:animate",{bubbles:!0,detail:item}));return}animate(item)})}function animate(element){requestAnimationFrame(()=>element.classList.add(classes$16.aosAnimate)),animateTextHighlights(element),animateCounterUps(element)}function animateTextHighlights(element){element.querySelectorAll(selectors$1g.textHighlight).forEach(highlight=>highlight.shouldAnimate())}function animateCounterUps(element){element.querySelectorAll(selectors$1g.counterUps).forEach(countUp=>countUp.shouldAnimate())}function bodyMutationObserver(){const isNode=element=>element instanceof HTMLElement;new MutationObserver(mutationList=>{for(const mutation of mutationList){if(!mutation.type==="childList")return;const target=mutation.target,addedNodes=[...mutation.addedNodes],removedNodes=[...mutation.removedNodes],watchMutations=target.matches(selectors$1g.watchMutations)||addedNodes.some(item=>isNode(item)?item.matches(selectors$1g.watchMutations):!1)||removedNodes.some(item=>isNode(item)?item.matches(selectors$1g.watchMutations):!1),isAnimatableElement=target.matches(selectors$1g.animatable)||addedNodes.some(item=>isNode(item)?item.matches(selectors$1g.animatable):!1),hasElementToAnimate=target.querySelector(`[${attributes$U.aosAnchor}="#${target.id}"]`)!==null;if(isAnimatableElement||hasElementToAnimate||watchMutations){const anchors=target.querySelectorAll(selectors$1g.aosAnchor);initAnchorObservers(anchors)}}}).observe(document.body,{attributes:!1,childList:!0,subtree:!0})}function initAnimations(){anchorsIntersectionObserver(),bodyMutationObserver()}function getSearchParams(searchForm,filtersForm,deleteParams=[],type=!1){const searchFormData=new FormData(searchForm),searchFormParams=new URLSearchParams(searchFormData);if(!filtersForm)return searchFormParams.toString();const filtersFormData=new FormData(filtersForm),filtersFormParams=new URLSearchParams(filtersFormData),emptyParams=[];for(const pair of searchFormData.entries())pair[1]===""&&emptyParams.push(pair[0]);for(const pair of filtersFormData.entries())pair[1]===""&&emptyParams.push(pair[0]);for(let index=0;index<emptyParams.length;index++){const param=emptyParams[index];searchFormParams.has(param)&&searchFormParams.delete(param),filtersFormParams.has(param)&&filtersFormParams.delete(param)}for(const key of searchFormParams.keys())filtersFormParams.has(key)&&filtersFormParams.delete(key);if(deleteParams.length>0)for(let index=0;index<deleteParams.length;index++){const param=deleteParams[index];searchFormParams.has(param)&&searchFormParams.delete(param),filtersFormParams.has(param)&&filtersFormParams.delete(param)}return type&&(filtersFormParams.has("type")&&filtersFormParams.delete("type"),searchFormParams.set("type",type)),`${searchFormParams.toString()}&${filtersFormParams.toString()}`}const selectors$1f={scrollbar:"[data-custom-scrollbar]",scrollbarItems:"[data-custom-scrollbar-items]",scrollbarThumb:"[data-custom-scrollbar-thumb]",current:".current"};class CustomScrollbar{constructor(container){this.container=container,this.scrollbarItems=container.querySelector(selectors$1f.scrollbarItems),this.scrollbar=container.querySelector(selectors$1f.scrollbar),this.scrollbarThumb=container.querySelector(selectors$1f.scrollbarThumb),this.trackWidth=0,this.calcScrollbarEvent=()=>this.calculateScrollbar(),this.onScrollbarChangeEvent=e=>this.onScrollbarChange(e),this.scrollbar&&this.scrollbarItems&&(this.events(),this.calculateScrollbar(),this.scrollbarItems.children.length&&this.calculateTrack(this.scrollbarItems.querySelector(selectors$1f.current)))}calculateTrack(element){if(!element){this.scrollbar.style.setProperty("--thumb-scale",0),this.scrollbar.style.setProperty("--thumb-position","0px");return}const thumbScale=element.clientWidth/this.scrollbarThumb.parentElement.clientWidth,thumbPosition=element.offsetLeft/this.scrollbarThumb.parentElement.clientWidth;this.scrollbar.style.setProperty("--thumb-scale",thumbScale),this.scrollbar.style.setProperty("--thumb-position",`${this.trackWidth*thumbPosition}px`)}calculateScrollbar(){if(this.scrollbarItems.children.length){const childrenArr=[...this.scrollbarItems.children];this.trackWidth=0,childrenArr.forEach(element=>{this.trackWidth+=element.getBoundingClientRect().width+parseInt(window.getComputedStyle(element).marginRight)}),this.scrollbar.style.setProperty("--track-width",`${this.trackWidth}px`)}}onScrollbarChange(e){e&&e.detail&&e.detail.element&&this.container.contains(e.detail.element)&&this.calculateTrack(e.detail.element)}events(){document.addEventListener("theme:resize:width",this.calcScrollbarEvent),document.addEventListener("theme:custom-scrollbar:change",this.onScrollbarChangeEvent)}unload(){document.removeEventListener("theme:resize:width",this.calcScrollbarEvent),document.removeEventListener("theme:custom-scrollbar:change",this.onScrollbarChangeEvent)}}const selectors$1e={tooltip:"[data-tooltip]",tooltipContainer:"[data-tooltip-container]",tooltipArrow:"[data-tooltip-arrow]",aos:"[data-aos]"}
12,classes$15={root:"tooltip-default",isAnimating:"is-animating",visible:"is-visible",hiding:"is-hiding"},attributes$T={aos:"data-aos",tooltip:"data-tooltip",tooltipContainer:"data-tooltip-container",tooltipStopMouseEnter:"data-tooltip-stop-mouseenter"},sections$I={};class Tooltip{constructor(el){this.tooltip=el,this.tooltip.hasAttribute(attributes$T.tooltip)&&(this.rootClass=classes$15.root,this.isAnimatingClass=classes$15.isAnimating,this.label=this.tooltip.getAttribute(attributes$T.tooltip),this.transitionSpeed=200,this.hideTransitionTimeout=0,this.animatedContainer=this.tooltip.closest(selectors$1e.aos),this.addPinEvent=()=>this.addPin(),this.addPinMouseEvent=()=>this.addPin(!0),this.removePinEvent=event=>window.theme.throttle(this.removePin(event),50),this.removePinMouseEvent=event=>this.removePin(event,!0,!0),this.init())}init(){if(!document.querySelector(selectors$1e.tooltipContainer)){const tooltipTemplate=`<div class="${this.rootClass}__arrow"></div><div class="${this.rootClass}__inner"><div class="${this.rootClass}__text label-typography"></div></div>`,tooltipElement=document.createElement("div");tooltipElement.className=`${this.rootClass} ${this.isAnimatingClass}`,tooltipElement.setAttribute(attributes$T.tooltipContainer,""),tooltipElement.innerHTML=tooltipTemplate,document.body.appendChild(tooltipElement)}this.tooltip.addEventListener("mouseenter",this.addPinMouseEvent),this.tooltip.addEventListener("mouseleave",this.removePinMouseEvent),this.tooltip.addEventListener("theme:tooltip:init",this.addPinEvent),document.addEventListener("theme:tooltip:close",this.removePinEvent);const tooltipTarget=document.querySelector(selectors$1e.tooltipContainer);theme.settings.animationsEnabled&&this.animatedContainer&&(this.animatedContainer.getAttribute(attributes$T.aos)==="hero"?this.animatedContainer.addEventListener("animationend",()=>{tooltipTarget.classList.remove(classes$15.isAnimating)}):this.animatedContainer.addEventListener("transitionend",event=>{event.propertyName==="transform"&&tooltipTarget.classList.remove(classes$15.isAnimating)}))}addPin(stopMouseEnter=!1){const tooltipTarget=document.querySelector(selectors$1e.tooltipContainer);if(tooltipTarget&&(stopMouseEnter&&!this.tooltip.hasAttribute(attributes$T.tooltipStopMouseEnter)||!stopMouseEnter)){const tooltipTargetArrow=tooltipTarget.querySelector(`.${this.rootClass}__arrow`),tooltipTargetInner=tooltipTarget.querySelector(`.${this.rootClass}__inner`),tooltipTargetText=tooltipTarget.querySelector(`.${this.rootClass}__text`);this.label.includes("\xDF")&&(this.label=this.label.replace(/Ã/g,'<span style="text-transform: lowercase;">\xDF</span>')),tooltipTargetText.innerHTML=this.label;const tooltipTargetWidth=tooltipTargetInner.offsetWidth,tooltipRect=this.tooltip.getBoundingClientRect(),tooltipTop=tooltipRect.top,tooltipWidth=tooltipRect.width,tooltipHeight=tooltipRect.height,tooltipTargetPositionTop=tooltipTop+tooltipHeight+window.scrollY;let tooltipTargetPositionLeft=tooltipRect.left-tooltipTargetWidth/2+tooltipWidth/2;const tooltipTargetWindowDifference=tooltipTargetPositionLeft+tooltipTargetWidth-window.theme.getWindowWidth()+24;tooltipTargetWindowDifference>0&&(tooltipTargetPositionLeft-=tooltipTargetWindowDifference),tooltipTargetPositionLeft<0&&(tooltipTargetPositionLeft=0),tooltipTargetArrow.style.left=`${tooltipRect.left+tooltipWidth/2}px`,tooltipTarget.style.setProperty("--tooltip-top",`${tooltipTargetPositionTop}px`),tooltipTargetInner.style.transform=`translateX(${tooltipTargetPositionLeft}px)`,tooltipTarget.classList.remove(classes$15.hiding);const onTooltipHiding=event=>{event.target===tooltipTargetInner&&((event.propertyName==="transform"||event.propertyName==="opacity")&&requestAnimationFrame(()=>tooltipTarget.style.transform="translate(0, -100%)"),tooltipTarget.removeEventListener("transitionend",onTooltipHiding))};tooltipTarget.addEventListener("transitionend",onTooltipHiding),tooltipTarget.classList.add(classes$15.visible),document.addEventListener("theme:scroll",this.removePinEvent)}}removePin(event,stopMouseEnter=!1,hideTransition=!1){const tooltipTarget=document.querySelector(selectors$1e.tooltipContainer),tooltipVisible=tooltipTarget.classList.contains(classe
12s$15.visible);tooltipTarget&&(stopMouseEnter&&!this.tooltip.hasAttribute(attributes$T.tooltipStopMouseEnter)||!stopMouseEnter)&&(tooltipVisible&&(hideTransition||event.detail.hideTransition)&&(tooltipTarget.classList.add(classes$15.hiding),this.hideTransitionTimeout&&clearTimeout(this.hideTransitionTimeout),this.hideTransitionTimeout=setTimeout(()=>{tooltipTarget.classList.remove(classes$15.hiding)},this.transitionSpeed)),tooltipTarget.classList.remove(classes$15.visible),document.removeEventListener("theme:scroll",this.removePinEvent))}unload(){this.tooltip.removeEventListener("mouseenter",this.addPinMouseEvent),this.tooltip.removeEventListener("mouseleave",this.removePinMouseEvent),this.tooltip.removeEventListener("theme:tooltip:init",this.addPinEvent),document.removeEventListener("theme:tooltip:close",this.removePinEvent),document.removeEventListener("theme:scroll",this.removePinEvent)}}const tooltip={onLoad(){sections$I[this.id]=[],this.container.querySelectorAll(selectors$1e.tooltip).forEach(tooltip2=>{sections$I[this.id].push(new Tooltip(tooltip2))})},onUnload(){sections$I[this.id].forEach(tooltip2=>{typeof tooltip2.unload=="function"&&tooltip2.unload()})}},selectors$1d={rangeSlider:"[data-range-slider]",rangeDotLeft:"[data-range-left]",rangeDotRight:"[data-range-right]",rangeLine:"[data-range-line]",rangeHolder:"[data-range-holder]",dataMin:"data-se-min",dataMax:"data-se-max",dataMinValue:"data-se-min-value",dataMaxValue:"data-se-max-value",dataStep:"data-se-step",dataFilterUpdate:"data-range-filter-update",priceMin:"[data-field-price-min]",priceMax:"[data-field-price-max]"},classes$14={isInitialized:"is-initialized"};class RangeSlider{constructor(container){this.container=container,this.init(),this.initListener=()=>this.init(),document.addEventListener("theme:filters:init",this.initListener)}init(){if(this.slider=this.container.querySelector(selectors$1d.rangeSlider),!this.slider)return;this.resizeFilters=window.theme.debounce(this.reset.bind(this),50),this.onMoveEvent=event=>this.onMove(event),this.onStopEvent=event=>this.onStop(event),this.onStartEvent=event=>this.onStart(event),this.startX=0,this.x=0,this.touchLeft=this.slider.querySelector(selectors$1d.rangeDotLeft),this.touchRight=this.slider.querySelector(selectors$1d.rangeDotRight),this.lineSpan=this.slider.querySelector(selectors$1d.rangeLine),this.min=parseFloat(this.slider.getAttribute(selectors$1d.dataMin)),this.max=parseFloat(this.slider.getAttribute(selectors$1d.dataMax)),this.step=0,this.normalizeFact=20;let defaultMinValue=this.min;this.slider.hasAttribute(selectors$1d.dataMinValue)&&(defaultMinValue=parseFloat(this.slider.getAttribute(selectors$1d.dataMinValue)));let defaultMaxValue=this.max;this.slider.hasAttribute(selectors$1d.dataMaxValue)&&(defaultMaxValue=parseFloat(this.slider.getAttribute(selectors$1d.dataMaxValue))),defaultMinValue<this.min&&(defaultMinValue=this.min),defaultMaxValue>this.max&&(defaultMaxValue=this.max),defaultMinValue>defaultMaxValue&&(defaultMinValue=defaultMaxValue),this.slider.getAttribute(selectors$1d.dataStep)&&(this.step=Math.abs(parseFloat(this.slider.getAttribute(selectors$1d.dataStep)))),this.reset(),window.addEventListener("theme:resize",this.resizeFilters),this.maxX=this.slider.offsetWidth-this.touchRight.offsetWidth,this.selectedTouch=null,this.initialValue=this.lineSpan.offsetWidth-this.normalizeFact,this.setMinValue(defaultMinValue),this.setMaxValue(defaultMaxValue),this.touchLeft.addEventListener("mousedown",this.onStartEvent),this.touchRight.addEventListener("mousedown",this.onStartEvent),this.touchLeft.addEventListener("touchstart",this.onStartEvent,{passive:!0}),this.touchRight.addEventListener("touchstart",this.onStartEvent,{passive:!0}),this.slider.classList.add(classes$14.isInitialized)}reset(){this.touchLeft.style.left="0px",this.touchRight.style.left=this.slider.offsetWidth-this.touchLeft.offsetWidth+"px",this.lineSpan.style.marginLeft="0px",this.lineSpan.style.width=this.slider.offsetWidth-this.touchLeft.offsetWidth+"px",this.startX=0,this.x=0,this.maxX=this.slider.offsetWidth-this.touchRight.offsetWidth,this.initialValue=this.lineSpan.offsetWidth-this.normalizeFact}setMinValue(minValue){const ratio=(minValue-this.min)/(this.max-this.min);this.touchLeft.style.left=Math.ceil(ratio*(this.slider.offsetWidth-(this.touchLeft.offsetWidth+this.normalizeFact)))+"px",this.lineSpan.style.marginLeft=this.touchLeft.offsetLeft+"px",this.lineSpan.style.width=this.touchRight.offsetLeft-this.touchLeft.offsetLeft+"px",this.slider.setAttribute(selectors$1d.dataMinValue,minValue)}setMaxValue(maxValue){const ratio=(maxValue-this.min)/(this.max-this.min);this.touchRight.style.left=Math.ceil(ratio*(this.slider.offsetWidth-(this.touchLeft.offsetWidth+this.normalizeFact))+this.normalizeFact)+"px",this.lineSpan.style.marginLeft=this.touchLeft.offsetLeft+"px",this.lineSpan.style.width=this.touchRight.offsetLeft-this.touchLeft.offsetLeft+"px",this.slider.setAttribute(selectors$1d.dataMaxValue,maxValue)}onStart(event){event.preventDefault();let eventTouch=event;event.touches&&(eventTouch=event.touches[0]),event.currentTarget===this.touchLeft?this.x=this.touchLeft.offsetLeft:event.currentTarget===this.touchRight&&(this.x=this.touchRight.offsetLeft),this.startX=eventTouch.pageX-this.x,this.selectedTouch=event.currentTarget,document.addEventListener("mousemove",this.onMoveEvent),document.addEventListener("mouseup",this.onStopEvent),document.addEventListener("touchmove",this.onMoveEvent,{passive:!0}),document.addEventListener("touchend",this.onStopEvent,{passive:!0})}onMove(event){let eventTouch=event;event.touches&&(eventTouch=event.touches[0]),this.x=eventTouch.pageX-this.startX,this.selectedTouch===this.touchLeft?(this.x>this.touchRight.offsetLeft-this.selectedTouch.offsetWidth+10?this.x=this.touchRight.offsetLeft-this.selectedTouch.offsetWidth+10:this.x<0&&(this.x=0),this.selectedTouch.style.left=this.x+"px"):this.selectedTouch===this.touchRight&&(this.x<this.touchLeft.offsetLeft+this.touchLeft.offsetWidth-10?this.x=this.touchLeft.offsetLeft+this.touchLeft.offsetWidth-10:this.x>this.maxX&&(this.x=this.maxX),this.selectedTouch.style.left=this.x+"px"),this.lineSpan.style.marginLeft=this.touchLeft.offsetLeft+"px",this.lineSpan.style.width=this.touchRight.offsetLeft-this.touchLeft.offsetLeft+"px",this.calculateValue(),this.slider.getAttribute("on-change")&&new Function("min, max",this.slider.getAttribute("on-change"))(this.slider.getAttribute(selectors$1d.dataMinValue),this.slider.getAttribute(selectors$1d.dataMaxValue)),this.onChange(this.slider.getAttribute(selectors$1d.dataMinValue),this.slider.getAttribute(selectors$1d.dataMaxValue))}onStop(event){document.removeEventListener("mousemove",this.onMoveEvent),document.removeEventListener("mouseup",this.onStopEvent),document.removeEventListener("touchmove",this.onMoveEvent,{passive:!0}),document.removeEventListener("touchend",this.onStopEvent,{passive:!0}),this.selectedTouch=null,this.calculateValue(),this.onChanged(this.slider.getAttribute(selectors$1d.dataMinValue),this.slider.getAttribute(selectors$1d.dataMaxValue))}onChange(min,max){const rangeHolder=this.slider.closest(selectors$1d.rangeHolder);if(rangeHolder){const priceMin=rangeHolder.querySelector(selectors$1d.priceMin),priceMax=rangeHolder.querySelector(selectors$1d.priceMax);priceMin&&priceMax&&(priceMin.value=parseInt(min),priceMax.value=parseInt(max))}}onChanged(min,max){this.slider.hasAttribute(selectors$1d.dataFilterUpdate)&&this.slider.dispatchEvent(new CustomEvent("theme:filter:range-update",{bubbles:!0}))}calculateValue(){const newValue=(this.lineSpan.offsetWidth-this.normalizeFact)/this.initialValue;let minValue=this.lineSpan.offsetLeft/this.initialValue,maxValue=minValue+newValue;if(minValue=minValue*(this.max-this.min)+this.min,maxValue=maxValue*(this.max-this.min)+this.min,this.step!==0){let multi=Math.floor(minValue/this.step);minValue=this.step*multi,multi=Math.floor(maxValue/this.step),maxValue=this.step*multi}this.selectedTouch===this.touchLeft&&this.slider.setAttribute(selectors$1d.dataMinValue,minValue),this.selectedTouch===this.touchRight&&this.slider.setAttribute(selectors$1d.dataMaxValue,maxValue)}unload(){document.removeEventListener("theme:filters:init",this.initListener),window.removeEventListener("theme:resize",this.resizeFilters)}}function Listeners(){this.entries=[]}Listeners.prototype.add=function(element,event,fn){this.entries.push({element,event,fn}),element.addEventListener(event,fn)},Listeners.prototype.removeAll=function(){this.entries=this.entries.filter(function(listener){return listener.element.removeEventListener(listener.event,listener.fn),!1})};function getVariantFromSerializedArray(product,collection){_validateProductStructure(product);var optionArray=_createOptionArrayFromOptionCollection(product,collection);return getVariantFromOptionArray(product,optionArray)}function getVariantFromOptionArray(product,options2){_validateProductStructure(product),_val
12idateOptionsArray(options2);var result=product.variants.filter(function(variant){return options2.every(function(option,index){return variant.options[index]===option})});return result[0]||null}function _createOptionArrayFromOptionCollection(product,collection){_validateProductStructure(product),_validateSerializedArray(collection);var optionArray=[];return collection.forEach(function(option){for(var i=0;i<product.options.length;i++){var name=product.options[i].name||product.options[i];if(name.toLowerCase()===option.name.toLowerCase()){optionArray[i]=option.value;break}}}),optionArray}function _validateProductStructure(product){if(typeof product!="object")throw new TypeError(product+" is not an object.");if(Object.keys(product).length===0&&product.constructor===Object)throw new Error(product+" is empty.")}function _validateSerializedArray(collection){if(!Array.isArray(collection))throw new TypeError(collection+" is not an array.");if(collection.length===0)throw new Error(collection+" is empty.");if(collection[0].hasOwnProperty("name")){if(typeof collection[0].name!="string")throw new TypeError("Invalid value type passed for name of option "+collection[0].name+". Value should be string.")}else throw new Error(collection[0]+"does not contain name key.")}function _validateOptionsArray(options2){if(Array.isArray(options2)&&typeof options2[0]=="object")throw new Error(options2+"is not a valid array of options.")}var selectors$1c={idInput:'[name="id"]',planInput:'[name="selling_plan"]',optionInput:'[name^="options"]',quantityInput:'[name="quantity"]',propertyInput:'[name^="properties"]'};function getUrlWithVariant(url,id){return/variant=/.test(url)?url.replace(/(variant=)[^&]+/,"$1"+id):/\?/.test(url)?url.concat("&variant=").concat(id):url.concat("?variant=").concat(id)}class ProductForm{constructor(element,product,options2){this.element=element,this.form=this.element.tagName=="FORM"?this.element:this.element.querySelector("form"),this.product=this._validateProductObject(product),this.variantElement=this.element.querySelector(selectors$1c.idInput),options2=options2||{},this._listeners=new Listeners,this._listeners.add(this.element,"submit",this._onSubmit.bind(this,options2)),this.optionInputs=this._initInputs(selectors$1c.optionInput,options2.onOptionChange),this.planInputs=this._initInputs(selectors$1c.planInput,options2.onPlanChange),this.quantityInputs=this._initInputs(selectors$1c.quantityInput,options2.onQuantityChange),this.propertyInputs=this._initInputs(selectors$1c.propertyInput,options2.onPropertyChange)}destroy(){this._listeners.removeAll()}options(){return this._serializeInputValues(this.optionInputs,function(item){var regex=/(?:^(options\[))(.*?)(?:\])/;return item.name=regex.exec(item.name)[2],item})}variant(){const opts=this.options();return opts.length?getVariantFromSerializedArray(this.product,opts):this.product.variants[0]}plan(variant){let plan={allocation:null,group:null,detail:null};const id=new FormData(this.form).get("selling_plan");return id&&variant&&(plan.allocation=variant.selling_plan_allocations.find(function(item){return item.selling_plan_id.toString()===id.toString()})),plan.allocation&&(plan.group=this.product.selling_plan_groups.find(function(item){return item.id.toString()===plan.allocation.selling_plan_group_id.toString()})),plan.group&&(plan.detail=plan.group.selling_plans.find(function(item){return item.id.toString()===id.toString()})),plan&&plan.allocation&&plan.detail&&plan.allocation?plan:null}properties(){return this._serializeInputValues(this.propertyInputs,function(item){var regex=/(?:^(properties\[))(.*?)(?:\])/;return item.name=regex.exec(item.name)[2],item})}quantity(){return this.quantityInputs[0]?Number.parseInt(this.quantityInputs[0].value,10):1}getFormState(){const variant=this.variant();return{options:this.options(),variant,properties:this.properties(),quantity:this.quantity(),plan:this.plan(variant)}}_setIdInputValue(variant){variant&&variant.id?this.variantElement.value=variant.id.toString():this.variantElement.value="",this.variantElement.dispatchEvent(new Event("change"))}_onSubmit(options2,event){event.dataset=this.getFormState(),options2.onFormSubmit&&options2.onFormSubmit(event)}_onOptionChange(event){this._setIdInputValue(event.dataset.variant)}_onFormEvent(cb){return typeof cb>"u"?Function.prototype.bind():function(event){event.dataset=this.getFormState(),this._setIdInputValue(event.dataset.variant),cb(event)}.bind(this)}_initInputs(selector,cb){var elements=Array.prototype.slice.call(this.element.querySelectorAll(selector));return elements.map(function(element){return this._listeners.add(element,"change",this._onFormEvent(cb)),element}.bind(this))}
12_serializeInputValues(inputs,transform){return inputs.reduce(function(options2,input){return(input.checked||input.type!=="radio"&&input.type!=="checkbox")&&options2.push(transform({name:input.name,value:input.value})),options2},[])}_validateProductObject(product){if(typeof product!="object")throw new TypeError(product+" is not an object.");if(typeof product.variants[0].options>"u")throw new TypeError("Product object is invalid. Make sure you use the product object that is output from {{ product | json }} or from the http://[your-product-url].js route");return product}}function fetchProduct(handle){const requestRoute=`${theme.routes.root}products/${handle}.js`;return window.fetch(requestRoute).then(response=>response.json()).catch(e=>{console.error(e)})}const defaults$1={color:"ash"},selectors$1b={swatch:"[data-swatch]",swatchColor:"[data-swatch-color]",productBlock:"[data-product-block]",productImage:"[data-product-image]",productImageSecondary:"[data-product-image-secondary]",productImageHover:"[data-product-image-hover]",quickView:"[data-button-quick-view]",gridImage:"[data-grid-image]",link:"[data-grid-link]",swatchesMore:"[data-swatches-more]",sectionType:"[data-section-type]",swatchesContainer:"[data-swatches-container]",swatchesLabel:"[data-swatches-label]",swatchesButton:"[data-swatches-button]",selectorWrapper:"[data-option-position]",slider:"[data-slider]",selectorVisible:"selector-wrapper--visible",hiddenLabels:".variant__labels--hide"},classes$13={mediaVisible:"product__media--featured-visible",mediaHoverVisible:"product__media__hover-img--visible",noImage:"swatch__link--no-image",noOutline:"no-outline",isVisible:"is-visible",selectorLarge:"selector-wrapper--large"},attributes$S={swatch:"data-swatch",handle:"data-swatch-handle",label:"data-swatch-label",image:"data-swatch-image",imageId:"data-swatch-image-id",variant:"data-swatch-variant",variantId:"data-variant-id",variantSecondaryId:"data-variant-secondary-id",loaded:"data-loaded",href:"href"};let swatches={};const sections$H={};class ColorMatch{constructor(options2={}){this.settings={...defaults$1,...options2},this.match=this.init()}getColor(){return this.match}init(){return loadScript({json:theme.assets.swatches}).then(colors=>this.matchColors(colors,this.settings.color)).catch(()=>{})}matchColors(colors,name){let bg="#E5E5E5",img=null;const path=theme.assets.base||"/",comparisonName=name.toLowerCase().replace(/\s/g,""),array=colors.colors;if(array){let indexArray=null;if(array.filter((colorObj,index)=>{if(Object.keys(colorObj).toString().toLowerCase().replace(/\s/g,"")===comparisonName)return indexArray=index,colorObj}).length&&indexArray!==null){const value=Object.values(array[indexArray])[0];bg=value,(value.includes(".jpg")||value.includes(".jpeg")||value.includes(".png")||value.includes(".svg"))&&(img=`${path}${value}`,bg="#888888")}}return{color:this.settings.color,path:img,hex:bg}}}class Swatch{constructor(element){this.element=element,this.swatchLink=this.element.nextElementSibling,this.colorString=element.getAttribute(attributes$S.swatch),this.image=this.element.getAttribute(attributes$S.image),this.imageId=this.element.getAttribute(attributes$S.imageId),this.variant=this.element.getAttribute(attributes$S.variant),this.outer=this.element.closest(selectors$1b.productBlock),this.hoverImages=[],new ColorMatch({color:this.colorString}).getColor().then(result=>{this.colorMatch=result,this.init()})}init(){this.setStyles(),this.variant&&this.outer&&this.handleClicks(),!this.image&&this.swatchLink&&this.swatchLink.classList.add(classes$13.noImage)}setStyles(){window.theme.settings.colorSwatchesType!="native"&&(this.colorMatch&&this.colorMatch.hex&&this.element.style.setProperty("--swatch",`${this.colorMatch.hex}`),this.colorMatch&&this.colorMatch.path&&this.element.style.setProperty("background-image",`url(${this.colorMatch.path})`))}handleClicks(){this.swatchLink.addEventListener("click",event=>{const isFocusEnabled=!document.body.classList.contains(classes$13.noOutline),variantId=this.swatchLink.getAttribute(attributes$S.variant);isFocusEnabled||(event.preventDefault(),this.updateImagesAndLinksOnEvent(variantId))}),this.swatchLink.addEventListener("keyup",event=>
12{const isFocusEnabled=!document.body.classList.contains(classes$13.noOutline),variantId=this.swatchLink.getAttribute(attributes$S.variant);event.code!==theme.keyboardKeys.ENTER&&event.code!==theme.keyboardKeys.NUMPADENTER||isFocusEnabled||(event.preventDefault(),this.swatchLink.dispatchEvent(new Event("mouseenter",{bubbles:!0})),this.updateImagesAndLinksOnEvent(variantId))})}updateImagesAndLinksOnEvent(variantId){this.updateLinks(),this.replaceImages(variantId)}updateLinks(){this.linkElements=this.outer.querySelectorAll(selectors$1b.link),this.quickView=this.outer.querySelector(selectors$1b.quickView),this.linkElements.length&&this.linkElements.forEach(element=>{const destination=getUrlWithVariant(element.getAttribute("href"),this.variant);element.setAttribute("href",destination)}),this.quickView&&theme.settings.quickBuy==="quick_buy"&&this.quickView.setAttribute(attributes$S.variantId,this.variant)}replaceImages(id){const imageSecondary=this.outer.querySelector(`[${attributes$S.variantSecondaryId}="${id}"]`),gridImage=this.outer.querySelector(`[${attributes$S.variantId}="${id}"]`),currentGridImage=[...this.outer.querySelectorAll(selectors$1b.gridImage)].find(image=>image.classList.contains(classes$13.mediaVisible));if(gridImage&&this.imageId){if(!imageSecondary||!currentGridImage)return;const onAnimationEnd=()=>{requestAnimationFrame(()=>{currentGridImage.classList.remove(classes$13.mediaVisible),gridImage.classList.add(classes$13.mediaVisible),requestAnimationFrame(()=>{imageSecondary.classList.remove(classes$13.mediaVisible)})}),imageSecondary.removeEventListener("animationend",onAnimationEnd)};requestAnimationFrame(()=>{imageSecondary.classList.add(classes$13.mediaVisible)}),imageSecondary.addEventListener("animationend",onAnimationEnd)}theme.settings.productGridHover==="image"&&(this.hoverImages=this.outer.querySelectorAll(selectors$1b.productImageHover)),this.hoverImages.length>1&&this.hoverImages.forEach(hoverImage=>{hoverImage.classList.remove(classes$13.mediaHoverVisible),hoverImage.getAttribute(attributes$S.variantId)===this.variant?hoverImage.classList.add(classes$13.mediaHoverVisible):this.hoverImages[0].classList.add(classes$13.mediaHoverVisible)})}}class GridSwatch extends HTMLElement{constructor(){super(),this.handle=this.getAttribute(attributes$S.handle),this.label=this.getAttribute(attributes$S.label).trim().toLowerCase(),fetchProduct(this.handle).then(product=>{this.product=product,this.colorOption=product.options.find(element=>element.name.toLowerCase()===this.label||null),this.colorOption&&(this.swatches=this.colorOption.values,this.init())})}init(){this.swatchElements=this.querySelectorAll(selectors$1b.swatch),this.swatchElements.forEach(el=>{new Swatch(el)}),this.handleShowMore()}handleShowMore(){this.initialHeight=this.offsetHeight,this.expandedHeight=this.initialHeight;const section=this.closest(selectors$1b.sectionType),moreLink=this.querySelector(selectors$1b.swatchesMore);moreLink&&(moreLink?.addEventListener("click",()=>{this.classList.add(classes$13.isVisible)}),section?.addEventListener("touchstart",e=>{this.contains(e.target)||(this.classList.remove(classes$13.isVisible),this.dispatchEvent(new Event("mouseleave",{bubbles:!0})))}),this.addEventListener("mouseenter",()=>{const onAnimationStart=event=>{this.expandedHeight=this.offsetHeight;const slider2=event.target.closest(selectors$1b.slider);this.expandedHeight>this.initialHeight&&slider2&&requestAnimationFrame(()=>slider2.dispatchEvent(new CustomEvent("theme:slider:resize",{bubbles:!1}))),this.removeEventListener("animationstart",onAnimationStart)};this.addEventListener("animationstart",onAnimationStart)}),this.addEventListener("mouseleave",()=>{const onAnimationStart=event=>{const slider2=event.target.closest(selectors$1b.slider);this.expandedHeight>this.initialHeight&&slider2&&requestAnimationFrame(()=>slider2.dispatchEvent(new CustomEvent("theme:slider:resize",{bubbles:!1}))),this.removeEventListener("animationstart",onAnimationStart)};this.addEventListener("animationstart",onAnimationStart)}))}}class SwatchesContainer{constructor(container){this.container=container,this.swatchesContainers=this.container.querySelectorAll(selectors$1b.swatchesContainer),this.swatchesContainers.forEac
12h(swatchesContainer2=>{this.checkSwatchesHeightOnResize=()=>this.checkSwatchesHeight(swatchesContainer2),this.checkSwatchesHeight(swatchesContainer2),document.addEventListener("theme:resize:width",this.checkSwatchesHeightOnResize)})}checkSwatchesHeight(swatchesContainer2){const label=swatchesContainer2.querySelector(selectors$1b.swatchesLabel),hiddenLabels=!!label.closest(selectors$1b.hiddenLabels),labelHeight=hiddenLabels?1:label.offsetHeight,swatch=swatchesContainer2.querySelector(selectors$1b.swatchesButton),containerPaddingTop=parseInt(window.getComputedStyle(swatchesContainer2).getPropertyValue("padding-top")),labelMargin=hiddenLabels?0:parseInt(window.getComputedStyle(label).getPropertyValue("margin-bottom")),swatchMargin=parseInt(window.getComputedStyle(swatch).getPropertyValue("margin-bottom")),selectorWrapper=swatchesContainer2.closest(selectors$1b.selectorWrapper);selectorWrapper.classList.remove(classes$13.selectorLarge,classes$13.selectorVisible),swatchesContainer2.style.removeProperty("--swatches-max-height"),requestAnimationFrame(()=>{swatchesContainer2.offsetHeight-containerPaddingTop>labelHeight+labelMargin+swatch.offsetHeight*2+swatchMargin*2&&(swatchesContainer2.style.setProperty("--swatches-max-height",`${swatchesContainer2.offsetHeight}px`),selectorWrapper.classList.add(classes$13.selectorLarge))})}onUnload(){this.swatchesContainers.forEach(swatchesContainer2=>{document.removeEventListener("theme:resize:width",this.checkSwatchesHeightOnResize)})}}const makeSwatches=container=>{swatches=[],container.querySelectorAll(selectors$1b.swatch).forEach(el=>{swatches.push(new Swatch(el))})},swatchSection={onLoad(){makeSwatches(this.container)}},swatchesContainer={onLoad(){sections$H[this.id]=new SwatchesContainer(this.container)},onUnload(){sections$H[this.id].onUnload()}},settings$9={templateIndex:0},selectors$1a={buttonQuickView:"[data-button-quick-view]",quickViewItemsTemplate:"[data-quick-view-items-template]",cartDrawer:"[data-cart-drawer]",shopTheLookQuickViewButton:"[data-shop-the-look-quick-view-button]",shopTheLookThumb:"[data-shop-the-look-thumb]",quickViewItemHolder:"[data-quick-view-item-holder]"},classes$12={loading:"is-loading",isActive:"is-active",quickViewFromCart:"js-quick-view-from-cart",mainClass:"popup-quick-view pswp--not-close-btn",shopTheLookPopupClass:"popup-quick-view popup-quick-view--shop-the-look pswp--not-close-btn"},attributes$R={loaded:"data-loaded",handle:"data-handle",variantId:"data-variant-id",shopTheLookQuickView:"data-shop-the-look-quick-view",hotspot:"data-hotspot",quickButtonInit:"data-initialized"},options$1={history:!1,focus:!1,mainClass:classes$12.mainClass,showHideOpacity:!1,closeOnVerticalDrag:!1,closeOnScroll:!1,modal:!1,escKey:!1};class QuickViewPopup{constructor(container){this.container=container,this.a11y=window.theme.a11y,this.buttonsQuickView=this.container.querySelectorAll(selectors$1a.buttonQuickView),this.buttonsShopTheLookQuickView=this.container.querySelectorAll(selectors$1a.shopTheLookQuickViewButton),this.popupInitCallback=trigger=>this.popupInit(trigger),this.buttonsQuickView?.forEach(button=>{button.hasAttribute(attributes$R.quickButtonInit)||(button.addEventListener("click",event=>this.initPhotoswipe(event)),button.addEventListener("theme:popup:init",()=>{button.classList.remove(classes$12.loading),button.hasAttribute(attributes$R.shopTheLookQuickView)&&this.popupInitCallback(button)}),button.setAttribute(attributes$R.quickButtonInit,""))}),this.buttonsShopTheLookQuickView?.forEach(button=>{button.addEventListener("click",()=>{[...this.buttonsQuickView].find(btn=>btn.hasAttribute(attributes$R.shopTheLookQuickView))?.dispatchEvent(new Event("click"))})})}popupInit(trigger){const holder=this.loadPhotoswipe.pswpElement.querySelector(`[${attributes$R.hotspot}="${trigger.getAttribute(attributes$R.hotspot)}"]`),quickViewItemHolders=this.loadPhotoswipe.pswpElement.querySelectorAll(selectors$1a.quickViewItemHolder);holder.classList.add(classes$12.isActive),quickViewItemHolders.forEach(element=>{element!==holder&&element.classList.remove(classes$12.isActive)}
12),this.toggleQuickViewButtonsLoadingClasses(!0),this.toggleQuickViewThumbsLoadingClasses(!0);const onAnimationInEnd=event=>{event.animationName==="quickViewAnimateInUp"&&requestAnimationFrame(()=>{this.toggleQuickViewThumbsLoadingClasses(!1)}),event.animationName==="quickViewAnimateOutDown"&&this.loadPhotoswipe.pswpElement.removeEventListener("animationend",onAnimationInEnd)};this.loadPhotoswipe.pswpElement.addEventListener("animationend",onAnimationInEnd),this.loadPhotoswipe?.popup?.listen("destroy",()=>{this.toggleQuickViewButtonsLoadingClasses(!1),this.toggleQuickViewThumbsLoadingClasses(!1)})}toggleQuickViewButtonsLoadingClasses(isLoading=!0){if(isLoading){this.buttonsQuickView?.forEach(element=>{element.classList.add(classes$12.loading)});return}this.buttonsQuickView?.forEach(element=>{element.classList.remove(classes$12.loading)})}toggleQuickViewThumbsLoadingClasses(isLoading=!0){if(this.buttonsShopTheLookThumb=this.loadPhotoswipe?.pswpElement.querySelectorAll(selectors$1a.shopTheLookThumb),isLoading){this.buttonsShopTheLookThumb?.forEach(element=>{element.classList.add(classes$12.loading)});return}this.buttonsShopTheLookThumb?.forEach(element=>{element.classList.remove(classes$12.loading)})}initPhotoswipe(event){event.preventDefault();const button=event.target.matches(selectors$1a.buttonQuickView)?event.target:event.target.closest(selectors$1a.buttonQuickView),isMobile=window.innerWidth<theme.sizes.small;let quickViewVariant="",isShopTheLookPopupTrigger=!1;if(button.hasAttribute(attributes$R.shopTheLookQuickView)){if(!isMobile)return;isShopTheLookPopupTrigger=!0}options$1.mainClass=classes$12.mainClass,button.classList.add(classes$12.loading),button.closest(selectors$1a.cartDrawer)&&document.body.classList.add(classes$12.quickViewFromCart),this.a11y.state.trigger=button,this.a11y.state.mainTrigger=this.a11y.state.trigger,button.hasAttribute(attributes$R.variantId)&&(quickViewVariant=`&variant=${button.getAttribute(attributes$R.variantId)}`);const productUrl=`${theme.routes.root}products/${button.getAttribute(attributes$R.handle)}?section_id=api-quickview${quickViewVariant}`;if(isShopTheLookPopupTrigger){options$1.mainClass=classes$12.shopTheLookPopupClass,this.buttonsQuickView.forEach(element=>{element.classList.add(classes$12.loading)});const XMLS=new XMLSerializer,quickViewItemsTemplate=this.container.querySelector(selectors$1a.quickViewItemsTemplate).content.firstElementChild.cloneNode(!0),itemsData=XMLS.serializeToString(quickViewItemsTemplate);this.loadPhotoswipeWithTemplate(itemsData,button)}else this.loadPhotoswipeFromFetch(productUrl,button)}loadPhotoswipeWithTemplate(data,button){const items=[{html:data}];this.loadPhotoswipe=new window.theme.LoadPhotoswipe(items,options$1,settings$9.templateIndex,button)}loadPhotoswipeFromFetch(url,button){fetch(url).then(response=>response.text()).then(data=>{const items=[{html:data}];this.loadPhotoswipe=new window.theme.LoadPhotoswipe(items,options$1,settings$9.templateIndex,button)}).catch(()=>{})}}const selectors$19={popupProduct:"[data-product]",popupClose:"[data-popup-close]"},classes$11={quickViewVisible:"js-quick-view-visible"},sections$G={};class ProductGrid{constructor(container){this.container=container,this.body=document.body,new QuickViewPopup(this.container)}popupClose(){const popupProduct=document.querySelector(selectors$19.popupProduct);popupProduct&&popupProduct.querySelector(selectors$19.popupClose).dispatchEvent(new Event("click"))}onBlockSelect(){this.body.classList.contains(classes$11.quickViewVisible)&&this.popupClose()}onDeselect(){this.body.classList.contains(classes$11.quickViewVisible)&&this.popupClose()}onUnload(){this.body.classList.contains(classes$11.quickViewVisible)&&this.popupClose()}}const productGrid={onLoad(){sections$G[this.id]=new ProductGrid(this.container)},onBlockSelect(){sections$G[this.id].onBlockSelect()},onDeselect(){sections$G[this.id].onDeselect()},onUnload(){sections$G[this.id].onUnload()}},selectors$18={ajaxinateContainer:"#AjaxinateLoop",ajaxinatePagination:"#AjaxinatePagination",productItem:"[data-product-block]",promo:"[data-promo]"},attributes$Q={ajaxinateId:"data-ajaxinate-id",columnsTablet:"data-columns-tablet",columnsMobile:"data-columns-mobile"}
12,classes$10={isLoaded:"is-loaded",loadedItem:"loaded-item",promoFull:"collection-promo--full",promoTwoColumns:"collection-promo--two-columns",promoGridSecond:"collection-promo--grid-second",promoGridThird:"collection-promo--grid-third",promoGridEven:"collection-promo--grid-even",promoOneColumn:"collection-promo--one-column"};let sections$F={};class Ajaxify{constructor(container){this.container=container,this.endlessScroll=[],theme.settings.enableInfinityScroll&&this.init()}init(){this.loadMoreFix(),this.ajaxinateContainer=this.container.querySelectorAll(selectors$18.ajaxinateContainer),this.ajaxinateContainer.forEach(element=>{const ajaxinateContainer=`${selectors$18.ajaxinateContainer}[${attributes$Q.ajaxinateId}="${element.dataset.ajaxinateId}"]`,ajaxinatePagination=`${selectors$18.ajaxinatePagination}[${attributes$Q.ajaxinateId}="${element.dataset.ajaxinateId}"]`;if(element.children.length>0){const endlessScroll=new Ajaxinate({container:ajaxinateContainer,pagination:ajaxinatePagination,method:"scroll"}),promos=element.querySelectorAll(selectors$18.promo),columnsTablet=Number(element.getAttribute(attributes$Q.columnsTablet)),columnsMobile=Number(element.getAttribute(attributes$Q.columnsMobile));if(columnsTablet>=3){let tabletCounter=0;if(promos.forEach(promo=>{promo.classList.contains(classes$10.promoFull)?promo.classList.contains(classes$10.promoGridThird)?tabletCounter+=1:promo.classList.contains(classes$10.promoGridSecond)?tabletCounter+=2:tabletCounter+=3:promo.classList.contains(classes$10.promoTwoColumns)?promo.classList.contains(classes$10.promoGridThird)?tabletCounter+=1:tabletCounter+=2:tabletCounter+=1}),tabletCounter>0){let emptySpacesTablet=columnsTablet-tabletCounter%columnsTablet;emptySpacesTablet===columnsTablet&&(emptySpacesTablet=0),element.classList.add(`grid--empty-items-tablet-${emptySpacesTablet}`)}}if(columnsMobile===2){let mobileCounter=0;if(promos.forEach(promo=>{(promo.classList.contains(classes$10.promoGridEven)||promo.classList.contains(classes$10.promoOneColumn))&&(mobileCounter+=1)}),mobileCounter>0){let emptySpacesMobile=columnsMobile-mobileCounter%columnsMobile;emptySpacesMobile===columnsMobile&&(emptySpacesMobile=0),element.classList.add(`grid--empty-items-mobile-${emptySpacesMobile}`)}}element.classList.add(classes$10.isLoaded),this.endlessScroll.push(endlessScroll)}})}update(id){this.ajaxinateContainer=this.container.querySelectorAll(selectors$18.ajaxinateContainer);const instanceIDMatch=instance=>instance.settings.container===id,elementIDMatch=element2=>`${selectors$18.ajaxinateContainer}[${attributes$Q.ajaxinateId}="${element2.dataset.ajaxinateId}"]`===id,instanceExists=this.endlessScroll.find(instanceIDMatch);if(instanceExists){const index=this.endlessScroll.findIndex(instanceIDMatch);this.endlessScroll.splice(index,1),instanceExists.settings.method="scroll",instanceExists.destroy()}const element=[...this.ajaxinateContainer].find(elementIDMatch);if(!element)return;const ajaxinateContainer=`${selectors$18.ajaxinateContainer}[${attributes$Q.ajaxinateId}="${element.dataset.ajaxinateId}"]`,ajaxinatePagination=`${selectors$18.ajaxinatePagination}[${attributes$Q.ajaxinateId}="${element.dataset.ajaxinateId}"]`;if(!(element.children.length>0))return;const endlessScroll=new Ajaxinate({container:ajaxinateContainer,pagination:ajaxinatePagination,method:"scroll"});element.classList.add(classes$10.isLoaded),this.endlessScroll.push(endlessScroll)}loadMoreFix(){Ajaxinate.prototype.loadMore=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){if(!this.request.responseXML||!this.request.readyState===4||!this.request.status===200)return;const newContainer=this.request.responseXML.querySelector(this.settings.container),newPagination=this.request.responseXML.querySelector(this.settings.pagination);newContainer.querySelectorAll(selectors$18.productItem).forEach(item=>item.classList.add(classes$10.loadedItem)),this.containerElement.insertAdjacentHTML("beforeend",newContainer.innerHTML),typeof newPagination>"u"||newPagination===null?this.removePaginationElement():(this.paginationElement.innerHTML=newPagination.innerHTML,this.settings.callback&&typeof this.settings.callback=="function"&&this.settings.callback(this.request.responseXML),this.initialize())}.bind(this),this.request.open("GET",this.nextPageUrl,!0),this.request.responseType="document",this.request.send()}}unload(){this.endlessScroll.length>0&&(this.endlessScroll.forEach(instance=>{instance.settings.method="scroll",instance.destroy()}),this.ajaxinateContainer.forEach(element=>element.classList.remove(classes$10.isLoaded)))}}const ajaxify={onLoad(){sections$F=new Ajaxify(this.container)},onUnload:function(){typeof sections$F.unload=="function"&§ions$F.unload()}},settings$8={loadingTimeout:300},selectors$17={buttons:"button",toggleFilters:"[data-toggle-filters]",closeFilters:"[data-close-filters]",openFilters:"[data-open-filters]",collectionWrapper:"[data-collection-wrapper]",collapsibleTrigger:"[data-collapsible-trigger]",
12sortToggle:"[data-sort-toggle]",collectionSortOptions:"[data-collection-sort-options]",inputs:"input, select, label, textarea",inputSort:"[data-input-sort]",filters:"[data-collection-filters]",filtersWrapper:"[data-collection-filters-wrapper]",filtersList:"[data-collection-filters-list]",filtersStickyBar:"[data-collection-sticky-bar]",filter:"[data-collection-filter]",filterTag:"[data-collection-filter-tag]",filterTagButton:"[data-collection-filter-tag-button]",filtersForm:"[data-collection-filters-form]",filterResetButton:"[data-filter-reset-button]",filterTagClearButton:"[data-filter-tag-reset-button]",popupsSection:'[data-section-type="popups"]',productGrid:"[data-collection-products]",productsCount:"[data-products-count]",priceMin:"[data-field-price-min]",priceMax:"[data-field-price-max]",rangeMin:"[data-se-min-value]",rangeMax:"[data-se-max-value]",rangeMinValue:"data-se-min-value",rangeMaxValue:"data-se-max-value",rangeMinDefault:"data-se-min",rangeMaxDefault:"data-se-max",tooltip:"[data-tooltip]",tooltipContainer:"[data-tooltip-container]",showMore:"[data-show-more]",showMoreActions:"[data-show-more-actions]",showMoreContainer:"[data-show-more-container]",showMoreTrigger:"[data-show-more-trigger]",searchPerformed:"[data-search-performed]",searchForm:"[data-search-form]",scrollable:"[data-custom-scrollbar]"},classes$$={isActive:"is-active",isExpanded:"is-expanded",isVisible:"is-visible",isLoading:"is-loading",popupVisible:"popup--visible",collectionFiltersVisible:"collection__filters--visible",collectionSortOptionWrapperVisible:"collection__sort__option-wrapper--visible",hidden:"is-hidden"},attributes$P={filterActive:"data-filter-active",preventScrollLock:"data-prevent-scroll-lock",filtersDefaultState:"data-filters-default-state",tabIndex:"tabindex",ariaExpanded:"aria-expanded",currentType:"data-current-type"},sections$E={};class Filters{constructor(container){this.container=container,this.sectionId=container.dataset.sectionId,this.enableFilters=container.dataset.enableFilters==="true",this.enableSorting=container.dataset.enableSorting==="true",this.filterMode=container.dataset.filterMode,this.collectionHandle=this.container.dataset.collection,this.isSearchPage=container.closest(selectors$17.searchPerformed)!=null,this.productGrid=this.container.querySelector(selectors$17.productGrid),this.productsCount=this.container.querySelector(selectors$17.productsCount),this.groupTagFilters=this.container.querySelectorAll(selectors$17.filter),this.filters=this.container.querySelector(selectors$17.filters),this.filterTriggers=this.container.querySelectorAll(selectors$17.collapsibleTrigger),this.filtersStickyBar=this.container.querySelector(selectors$17.filtersStickyBar),this.filtersForm=this.container.querySelector(selectors$17.filtersForm),this.inputSort=this.container.querySelectorAll(selectors$17.inputSort),this.sortToggle=this.container.querySelector(selectors$17.sortToggle),this.collectionSortOptions=this.container.querySelector(selectors$17.collectionSortOptions),this.a11y=window.theme.a11y,this.filterData=[],this.rangeSlider=null,this.sortDropdownEvent=()=>this.sortDropdownToggle(),this.onTabHandlerEvent=event=>this.onTabHandler(event),this.updateCollectionFormSortEvent=event=>this.updateCollectionFormSort(event),this.bodyClickEvent=event=>this.bodyClick(event),this.onFilterResetClick=this.onFilterResetClick.bind(this),this.onFilterTagResetClick=this.onFilterTagResetClick.bind(this),this.onFilterTagClearClick=this.onFilterTagClearClick.bind(this),this.onFilterToggleClick=this.onFilterToggleClick.bind(this),this.onKeyUpHandler=this.onKeyUpHandler.bind(this),this.updateRangeEvent=this.updateRange.bind(this),this.debouncedSubmitEvent=window.theme.debounce(event=>{this.onSubmitHandler(event)},500),this.debouncedSortEvent=window.theme.debounce(event=>{this.onSortChange(event)},500),this.productGridEvents={},this.filters&&(this.hideFiltersDrawer=this.hideFiltersDrawer.bind(this),this.showFiltersDrawer=this.show
12FiltersDrawer.bind(this),this.resizeEvent=window.theme.debounce(()=>{this.filtersResizeEvents()},500),this.filtersResizeEvents(),document.addEventListener("theme:resize:width",this.resizeEvent)),this.initTagFilters(),this.initFacetedFilters(),this.bindToggleButtonsEvents(),this.bindFilterButtonsEvents(),this.initProductGridEvents(theme.settings.enableInfinityScroll),makeSwatches(this.container),this.collapsible=new Collapsible(this.container),window.theme.setVars(),window.addEventListener("popstate",this.onHistoryChange.bind(this)),this.sortToggle?.addEventListener("click",this.sortDropdownEvent),document.addEventListener("click",this.bodyClickEvent),this.filterShowMore()}initFacetedFilters(){this.filterMode=="tag"||this.filterMode=="group"||!this.enableFilters||(this.rangeSlider=new RangeSlider(this.container))}initTooltips(){this.tooltips=this.container.querySelectorAll(selectors$17.tooltip),window.innerWidth<theme.sizes.small&&(this.tooltips=this.productGrid?.querySelectorAll(selectors$17.tooltip)),this.tooltips?.forEach(tooltip2=>{new Tooltip(tooltip2)}),this.handleVisibleTooltips()}handleVisibleTooltips(){if(this.tooltips.length>0){const tooltipTarget=document.querySelector(selectors$17.tooltipContainer);tooltipTarget.classList.contains(classes$$.isVisible)&&tooltipTarget.classList.remove(classes$$.isVisible)}}updateRange(){const rangeMin=this.filtersForm.querySelector(selectors$17.rangeMin),rangeMax=this.filtersForm.querySelector(selectors$17.rangeMax),priceMin=this.filtersForm.querySelector(selectors$17.priceMin),priceMax=this.filtersForm.querySelector(selectors$17.priceMax);if(rangeMin.hasAttribute(selectors$17.rangeMinValue)&&rangeMax.hasAttribute(selectors$17.rangeMaxValue)){const priceMinValue=parseFloat(priceMin.placeholder,10),priceMaxValue=parseFloat(priceMax.placeholder,10),rangeMinValue=parseFloat(rangeMin.getAttribute(selectors$17.rangeMinValue),10),rangeMaxValue=parseFloat(rangeMax.getAttribute(selectors$17.rangeMaxValue),10);(priceMinValue!==rangeMinValue||priceMaxValue!==rangeMaxValue)&&(priceMin.value=parseInt(rangeMinValue),priceMax.value=parseInt(rangeMaxValue),this.filtersForm.dispatchEvent(new Event("input",{bubbles:!0})))}}onSubmitHandler(event){event.preventDefault();const formData=new FormData(this.filtersForm),searchParams=new URLSearchParams(formData),deleteParams=[];let searchParamsString="";this.isSearchPage&&(this.searchForm=this.container.querySelector(selectors$17.searchForm),this.currentType=this.container.getAttribute(attributes$P.currentType));const rangeMin=this.filtersForm.querySelector(selectors$17.rangeMin),rangeMax=this.filtersForm.querySelector(selectors$17.rangeMax),priceMin=this.filtersForm.querySelector(selectors$17.priceMin),priceMax=this.filtersForm.querySelector(selectors$17.priceMax);if(rangeMin&&rangeMax&&priceMin&&priceMax&&rangeMin.hasAttribute(selectors$17.rangeMinDefault)&&rangeMax.hasAttribute(selectors$17.rangeMaxDefault)){const rangeMinDefault=parseFloat(rangeMin.getAttribute(selectors$17.rangeMinDefault),10),rangeMaxDefault=parseFloat(rangeMax.getAttribute(selectors$17.rangeMaxDefault),10),priceMinValue=priceMin.value?parseFloat(priceMin.value,10):rangeMinDefault,priceMaxValue=priceMax.value?parseFloat(priceMax.value,10):rangeMaxDefault;priceMinValue<=rangeMinDefault&&priceMaxValue>=rangeMaxDefault&&(deleteParams.push("filter.v.price.gte"),deleteParams.push("filter.v.price.lte"),searchParams.delete("filter.v.price.gte"),searchParams.delete("filter.v.price.lte"))}if(searchParamsString=searchParams.toString(),this.isSearchPage){searchParamsString=getSearchParams(this.searchForm,this.filtersForm,deleteParams);let typeString="";this.currentType==="all"&&(typeString="&type=product"),searchParamsString.indexOf("&type=product")>-1&&(typeString=""),searchParamsString+=typeString}this.renderSection(searchParamsString,event)}onHistoryChange(event){if(!this.filters)return;let searchParams=event.state?.searchParams||"";this.isSearchPage&&(event.state||(searchParams=window.location.search),!(searchParams.indexOf("type=product")>-1))||this.renderSection(searchParams,null,!1)}renderSection(searchParams,event,updateURLHash=!0){this.startLoading();const url=`${window.location.pathname}?section_id=${this.sectionId}&${searchParams}`,filterDataUrl=element=>element.url===url;
12this.filterData.some(filterDataUrl)?this.renderSectionFromCache(filterDataUrl,event):this.renderSectionFromFetch(url,event),updateURLHash&&this.updateURLHash(searchParams)}renderSectionFromFetch(url){fetch(url).then(response=>response.text()).then(responseText=>{const html=responseText;this.filterData=[...this.filterData,{html,url}],this.inputSort=this.container.querySelectorAll(selectors$17.inputSort),this.renderFilters(html),this.bindFilterButtonsEvents(),this.hideFiltersOnMobile(),this.renderProductGrid(html),this.updateProductsCount(html),this.finishLoading(),this.mobileFiltersScrollLock(),this.handleSearchPageActiveTab()})}renderSectionFromCache(filterDataUrl,event){const html=this.filterData.find(filterDataUrl).html;this.renderFilters(html,event),this.hideFiltersOnMobile(),this.renderProductGrid(html),this.updateProductsCount(html),this.finishLoading(),this.mobileFiltersScrollLock(),this.handleSearchPageActiveTab()}handleSearchPageActiveTab(){this.isSearchPage&&(this.scrollable=this.container.querySelector(selectors$17.scrollable),!(!this.scrollable||this.customScrollbar)&&(this.customScrollbar=new CustomScrollbar(this.container)))}renderProductGrid(html){const newProductGrid=new DOMParser().parseFromString(html,"text/html").querySelector(selectors$17.productGrid);newProductGrid&&(this.productGrid.innerHTML=newProductGrid.innerHTML,this.initProductGridEvents(theme.settings.enableInfinityScroll),this.filterShowMore())}updateProductsCount(html){const newProductsCount=new DOMParser().parseFromString(html,"text/html").querySelector(selectors$17.productsCount);newProductsCount&&(this.productsCount.innerHTML=newProductsCount.innerHTML)}renderFilters(html){const newFilters=new DOMParser().parseFromString(html,"text/html").querySelector(selectors$17.filters);newFilters&&(this.filters.innerHTML=newFilters.innerHTML,this.filtersForm=document.querySelector(selectors$17.filtersForm),this.bindFilterButtonsEvents(),this.bindToggleButtonsEvents(),makeSwatches(this.container),this.collapsible=new Collapsible(this.container),document.dispatchEvent(new CustomEvent("theme:filters:init",{bubbles:!0})))}updateURLHash(searchParams){history.pushState({searchParams},"",`${window.location.pathname}${searchParams&&"?".concat(searchParams)}`)}bindFilterButtonsEvents(){this.inputSort.length>0&&this.inputSort.forEach(input=>{input.addEventListener("change",this.updateCollectionFormSortEvent)}),this.filtersForm&&(this.filtersForm.addEventListener("input",this.debouncedSubmitEvent.bind(this)),this.filtersForm.addEventListener("theme:filter:range-update",this.updateRangeEvent)),this.collectionSortOptions&&this.collectionSortOptions.addEventListener("keyup",this.onTabHandlerEvent),!(this.filterMode=="tag"||this.filterMode=="group"||!this.enableFilters)&&this.container.querySelectorAll(selectors$17.filterResetButton).forEach(button=>{button.addEventListener("click",this.onFilterResetClick,{once:!0})})}onFilterResetClick(event){event.preventDefault(),this.renderSection(new URL(event.currentTarget.href).searchParams.toString())}bindToggleButtonsEvents(){this.container.querySelectorAll(selectors$17.toggleFilters).forEach(button=>{button.addEventListener("click",this.onFilterToggleClick)}),this.container.querySelectorAll(selectors$17.closeFilters).forEach(button=>{button.addEventListener("click",this.hideFiltersDrawer)}),this.container.querySelectorAll(selectors$17.openFilters).forEach(button=>{button.addEventListener("click",this.showFiltersDrawer)}),this.container.querySelector(selectors$17.collectionWrapper)?.addEventListener("keyup",this.onKeyUpHandler)}onTabHandler(event){if(event.code===theme.keyboardKeys.SPACE||event.code===theme.keyboardKeys.ENTER||event.code===theme.keyboardKeys.NUMPADENTER){const newSortValue=event.target.previousElementSibling.value;this.filtersForm.querySelectorAll(selectors$17.inputSort).forEach(input=>{input.checked&&(input.checked=!1),input.value===newSortValue&&(input.checked=!0)}),this.filtersForm.dispatchEvent(new Event("input",{bubbles:!0})),event.target.dispatchEvent(new Event("click",{bubbles:!0}))}}onKeyUpHandler(event){event.code===theme.keyboardKeys.ESCAPE&&this.hideFiltersDrawer()}onFilterToggleClick(event){event.preventDefault(),window.theme.setVars(),this.filters.classList.contains(classe
12s$$.collectionFiltersVisible)?this.hideFiltersDrawer():this.showFiltersDrawer()}sortDropdownToggle(){this.collectionSortOptions&&this.collectionSortOptions.classList.toggle(classes$$.collectionSortOptionWrapperVisible)}bodyClick(event){if(!this.collectionSortOptions)return;const isSortBar=this.sortToggle.contains(event.target);this.collectionSortOptions.classList.contains(classes$$.collectionSortOptionWrapperVisible)&&!isSortBar&&this.sortDropdownToggle()}updateCollectionFormSort(event){const target=event.target,newSortValue=target.value,secondarySortBy=target.closest(selectors$17.collectionSortOptions);this.container.querySelectorAll(selectors$17.inputSort).forEach(input=>{input.value===newSortValue&&(input.checked=!0)}),secondarySortBy!==null&&this.filtersForm.dispatchEvent(new Event("input",{bubbles:!0}))}showFiltersDrawer(){const instance=this;this.a11y.state.trigger=document.querySelector(selectors$17.toggleFilters),this.a11y.trapFocus({container:instance.filters}),this.mobileFiltersScrollLock()}mobileFiltersScrollLock(){if(window.innerWidth<theme.sizes.small){const scrollableElement=document.querySelector(selectors$17.filtersList);this.filters.classList.contains(classes$$.collectionFiltersVisible)||this.filters.classList.add(classes$$.collectionFiltersVisible),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:scrollableElement}))}}hideFiltersOnMobile(){const filterTriggers=this.container.querySelectorAll(`${selectors$17.collapsibleTrigger}:not(${selectors$17.showMoreTrigger})`);window.innerWidth<theme.sizes.small&&requestAnimationFrame(()=>{filterTriggers.forEach(element=>{const isFilterActive=element.getAttribute(attributes$P.filterActive)==="true";element.classList.contains(classes$$.isExpanded)&&!isFilterActive&&element.dispatchEvent(new Event("click"))})})}showFiltersOnDesktop(){const filterTriggers=this.container.querySelectorAll(`${selectors$17.collapsibleTrigger}:not(${selectors$17.showMoreTrigger})`),filtersDefaultState=this.container.getAttribute(attributes$P.filtersDefaultState),openFirstFilterOnly=filtersDefaultState==="first-open",openAllFilters=filtersDefaultState==="open",closeAllFilters=filtersDefaultState==="closed",firstTriggerIndex=this.enableSorting?1:0;filterTriggers.forEach((element,index)=>{const isCurrentFilterExpanded=element.classList.contains(classes$$.isExpanded),isCurrentFilterActive=element.getAttribute(attributes$P.filterActive)==="true",isFirstClosed=!isCurrentFilterExpanded&&index===firstTriggerIndex,allElseExpanded=isCurrentFilterExpanded&&index!==firstTriggerIndex,shouldOpenFirst=openFirstFilterOnly&&isFirstClosed,shouldCloseAllExceptFirst=openFirstFilterOnly&&allElseExpanded,shouldOpenAllClosedOnes=openAllFilters&&!isCurrentFilterExpanded,shouldOpenActiveOnes=isCurrentFilterActive&&!isCurrentFilterExpanded&&openAllFilters,shouldCloseExpandedOnes=closeAllFilters&&isCurrentFilterExpanded;isCurrentFilterActive&&!shouldOpenActiveOnes||(shouldCloseExpandedOnes||shouldOpenFirst||shouldCloseAllExceptFirst||shouldOpenAllClosedOnes||shouldOpenActiveOnes)&&element.dispatchEvent(new Event("click"))})}hideFiltersDrawer(){let filtersVisible=this.filters.classList.contains(classes$$.collectionFiltersVisible),loading=this.container.classList.contains(classes$$.isLoading);filtersVisible&&(this.filters.classList.remove(classes$$.collectionFiltersVisible),this.a11y.removeTrapFocus()),loading||document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0,detail:settings$8.loadingTimeout}))}filtersResizeEvents(){window.innerWidth>
12=theme.sizes.small?(this.showFiltersOnDesktop(),this.hideFiltersDrawer()):this.hideFiltersOnMobile()}filterShowMore(){this.showMore=this.container.querySelectorAll(selectors$17.showMore),this.showMore.length!==0&&this.showMore.forEach(element=>{const filterCollapsibleTrigger=element.querySelector(selectors$17.collapsibleTrigger),showMoreActions=element.querySelector(selectors$17.showMoreActions);if(!showMoreActions)return;const showMoreTrigger=showMoreActions.querySelector(selectors$17.showMoreTrigger),showMoreContainer=showMoreActions.querySelector(selectors$17.showMoreContainer),focusable=showMoreContainer.querySelectorAll(window.theme.focusable);showMoreContainer.getAttribute(attributes$P.ariaExpanded)==="true"||focusable.forEach(item=>{item.setAttribute(attributes$P.tabIndex,"-1")}),showMoreTrigger.addEventListener("keyup",event=>{(event.code===theme.keyboardKeys.SPACE||event.code===theme.keyboardKeys.ENTER||event.code===theme.keyboardKeys.NUMPADENTER)&&this.updateShowMoreFocusableElements(event,focusable)}),showMoreTrigger.addEventListener("click",event=>{this.updateShowMoreFocusableElements(event,focusable)}),filterCollapsibleTrigger.addEventListener("keyup",event=>{(event.code===theme.keyboardKeys.SPACE||event.code===theme.keyboardKeys.ENTER||event.code===theme.keyboardKeys.NUMPADENTER)&&this.updateCollapsedContainerFocusableElements(filterCollapsibleTrigger,showMoreTrigger,focusable)}),filterCollapsibleTrigger.addEventListener("click",()=>{this.updateCollapsedContainerFocusableElements(filterCollapsibleTrigger,showMoreTrigger,focusable)})})}updateCollapsedContainerFocusableElements(filterCollapsibleTrigger,showMoreTrigger,focusable){requestAnimationFrame(()=>{const isFilterExpanded=filterCollapsibleTrigger.getAttribute(attributes$P.ariaExpanded)==="true",isShowMoreExpanded=showMoreTrigger.getAttribute(attributes$P.ariaExpanded)==="true";focusable.forEach(item=>{!isFilterExpanded&&isShowMoreExpanded&&item.setAttribute(attributes$P.tabIndex,"-1"),isFilterExpanded&&isShowMoreExpanded&&item.removeAttribute(attributes$P.tabIndex)})})}updateShowMoreFocusableElements(event,focusable){requestAnimationFrame(()=>{requestAnimationFrame(()=>{const isExpanded=event.target.getAttribute(attributes$P.ariaExpanded)==="true";focusable.forEach((item,index)=>{if(isExpanded){item.removeAttribute(attributes$P.tabIndex),index===0&&item.focus();return}item.setAttribute(attributes$P.tabIndex,"-1")})})})}initTagFilters(){this.filterMode!="tag"&&this.filterMode!="group"||!this.enableFilters||(this.tags=this.container.dataset.tags.split("+").filter(item=>item),this.bindFilterTagButtonsEvents(),this.bindSortChangeEvent())}renderTagFiltersProducts(url){this.startLoading(),typeof this.endlessCollection=="object"&&this.endlessCollection.unload(),fetch(url).then(response=>response.text()).then(responseText=>{const html=responseText,parsedData=new DOMParser().parseFromString(html,"text/html"),productsHTML=parsedData.querySelector(selectors$17.productGrid).innerHTML,filtersHTML=parsedData.querySelector(selectors$17.filters).innerHTML;this.productGrid.innerHTML=productsHTML,this.filters.innerHTML=filtersHTML,this.inputSort=this.container.querySelectorAll(selectors$17.inputSort),this.filtersForm=document.querySelector(selectors$17.filtersForm),this.filterData=[...this.filterData,{html,url}],this.alreadyClicked=!1,this.bindFilterTagButtonsEvents(),this.bindFilterButtonsEvents(),this.bindSortChangeEvent(),this.bindToggleButtonsEvents(),this.initProductGridEvents(theme.settings.enableInfinityScroll),this.updateProductsCount(html),this.mobileFiltersScrollLock(),this.hideFiltersOnMobile(),makeSwatches(this.container),this.collapsible=new Collapsible(this.container),this.filterShowMore(),history.replaceState&&window.history.pushState({path:url},"",url)}).catch(error=>{this.finishLoading()})}bindFilterTagButtonsEvents(){this.container.querySelectorAll(selectors$17.filterTagButton).forEach(button=>{button.addEventListener("click",this.onFilterTagButtonClick.bind(this))}),this.container.querySelectorAll(selectors$17.filterTagClearButton).forEach(button=>{button.addEventListener("click",this.onFilterTagClearClick)}),this.container.querySelectorAll(selectors$17.filterResetButton).forEac
12h(button=>{button.addEventListener("click",this.onFilterTagResetClick)})}bindSortChangeEvent(){this.container.querySelectorAll(selectors$17.inputSort).forEach(input=>{input.addEventListener("input",this.debouncedSortEvent.bind(this))})}onFilterTagButtonClick(event){if(event.preventDefault(),this.alreadyClicked)return;this.alreadyClicked=!0;const button=event.currentTarget,selectedTag=button.dataset.tag;if(button.parentNode.classList.contains(classes$$.isActive)){let tagIndex=this.tags.indexOf(selectedTag);button.parentNode.classList.remove(classes$$.isActive),tagIndex>-1&&this.tags.splice(tagIndex,1)}else button.parentNode.classList.add(classes$$.isActive),this.tags.push(selectedTag);let url=this.collectionHandle+"/"+this.tags.join("+")+"?sort_by="+this.getSortValue();this.container.querySelector(selectors$17.filter).classList.remove(classes$$.isExpanded),this.container.querySelector(selectors$17.filter).setAttribute(attributes$P.ariaExpanded,!1),this.container.setAttribute("data-tags","["+this.tags+"]"),this.renderTagFiltersProducts(url)}onFilterTagClearClick(event){if(event.preventDefault(),this.alreadyClicked)return;this.alreadyClicked=!0;const selectedTag=event.currentTarget.dataset.tag,tagIndex=this.tags.indexOf(selectedTag);tagIndex>-1&&this.tags.splice(tagIndex,1);const url=this.collectionHandle+"/"+this.tags.join("+")+"?sort_by="+this.getSortValue();this.container.setAttribute("data-tags","["+this.tags+"]"),this.renderTagFiltersProducts(url)}onSortChange(){let url=this.collectionHandle+"/"+this.tags.join("+")+"?sort_by="+this.getSortValue();this.renderTagFiltersProducts(url)}getSortValue(){let sortValue="";return this.inputSort.forEach(input=>{input.checked&&(sortValue=input.value)}),sortValue}onFilterTagResetClick(event){if(event?.preventDefault(),this.alreadyClicked)return;this.alreadyClicked=!0,this.container.querySelectorAll(selectors$17.filterTag).forEach(element=>{element.classList.remove(classes$$.isActive)}),this.container.querySelectorAll(selectors$17.filter).forEach(element=>{element.classList.remove(classes$$.isExpanded),element.setAttribute(attributes$P.ariaExpanded,!1)}),this.tags=[],this.container.setAttribute("data-tags","");let url=this.collectionHandle+"/?sort_by="+this.getSortValue();this.renderTagFiltersProducts(url)}getProductsOffsetTop(){return this.productGrid.getBoundingClientRect().top-document.body.getBoundingClientRect().top-this.filtersStickyBar.offsetHeight}getStickyBarOffsetTop(){return this.filtersStickyBar.getBoundingClientRect().top-document.body.getBoundingClientRect().top}initProductGridEvents(infinityScroll){if(infinityScroll){this.initInfinityScroll(),this.initProductGridEvents(!1);return}this.productGridEvents=new ProductGrid(this.container),this.initTooltips(),setTimeout(()=>{this.finishLoading()},settings$8.loadingTimeout*1.5)}initInfinityScroll(){const callback=()=>this.initProductGridEvents(!1);if(this.isSearchPage){if(!this.enableFilters)return;document.dispatchEvent(new CustomEvent("theme:tab:ajaxinate",{bubbles:!0,detail:"product"}));return}typeof this.endlessCollection=="object"&&this.endlessCollection.unload(),this.endlessCollection=new Ajaxify(this.container),this.endlessCollection.endlessScroll.length!==0&&(this.endlessCollection.endlessScroll[0].settings.callback=callback)}startLoading(){this.container.classList.add(classes$$.isLoading),window.innerWidth>=theme.sizes.small&&document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0}));let productsTop=this.getProductsOffsetTop();window.scrollTo({top:productsTop,left:0,behavior:"smooth"})}finishLoading(){const popups2=document.querySelectorAll(`${selectors$17.popupsSection} .${classes$$.popupVisible}`),isPopupActive=popups2.length>0;if(this.container.classList.remove(classes$$.isLoading),isPopupActive){let preventScrollPopupsCount=0;[...popups2].forEach(popup=>{popup.hasAttribute(attributes$P.preventScrollLock)&&(preventScrollPopupsCount+=1)}),preventScrollPopupsCount===popups2.length&&document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0,detail:settings$8.loadingTimeout}))}else window.innerWidth>=theme.sizes.small&&document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0,detail:settings$8.loadingTimeout}))}onDeselect(){this.productGridEvents&&this.productGridEvents.onDeselect()}onUnload(){typeof this.endlessCollection=="object"&&this.endlessCollection.unload(),this.productGridEvents&&this.productGridEvents.onUnload(),this.collapsible&&this.collapsible.onUnload(),this.rangeSlider&&this.rangeSlider.unload(),this.filters&&document.removeEventListener("theme:resize:width",this.resizeEvent),document.removeEventListener("click",this.bodyClickEvent),this.groupTagFilters.length>0&&this.onFilterTagResetClick(),this.finishLoading()}}const filters={onLoad(){sections$E[this.id]=new Filters(this.container)},onDeselect(){sections$E[this.id].onDeselect()},onUnload(){sections$E[this.id].onUnload()}},selectors$16={aosItem:"[data-aos]",aosAnchor:"[data-aos-anchor]",tabsLink:"[data-tabs-link]",tab:"[data-tab]",tabRef:"[data-tab-ref]",scrollable:"[data-custom-scrollbar]",scrollableHolder:"[data-custom-scrollbar-holder]",slider:"[data-sli
12der]",tabsContents:"[data-tabs-contents]",searchForm:"[data-search-form]",allTypesContainer:"[data-all-types-container]",filtersForm:"[data-collection-filters-form]",currentPage:"[data-current-page]",tooltip:"[data-tooltip]",productGrid:"[data-collection-products]",ajaxinateContainer:"#AjaxinateLoop",ajaxinatePagination:"#AjaxinatePagination"},classes$_={current:"current",hide:"hide",alt:"alt",aosAnimate:"aos-animate",isLoaded:"is-loaded"},attributes$O={tabsLink:"data-tabs-link",tab:"data-tab",tabRef:"data-tab-ref",tabStartIndex:"data-start-index",searchPerformed:"data-search-performed",type:"data-type",currentType:"data-current-type",allTypes:"data-all-types",currentPage:"data-current-page",ajaxinateId:"data-ajaxinate-id"},sections$D={};class Tabs{constructor(container){this.container=container,this.tabsContents=container.querySelector(selectors$16.tabsContents),this.animateElementsTimer=null,this.isSearchPage=container.closest(`[${attributes$O.searchPerformed}="true"]`)!=null,this.container&&(this.scrollable=this.container.querySelector(selectors$16.scrollable),this.tabRef=this.container.querySelectorAll(selectors$16.tabRef),this.tabsLink=this.container.querySelectorAll(selectors$16.tabsLink),this.tab=this.container.querySelectorAll(selectors$16.tab),this.assignSearchPageArguments(),this.init(),this.initCustomScrollbar(),this.isSearchPage||this.initTooltips(),this.inactiveTabsAnimationsCallback=window.theme.debounce(()=>this.handleInactiveTabsAnimations(),200),document.addEventListener("theme:scroll",this.inactiveTabsAnimationsCallback),this.container.addEventListener("mouseenter",()=>{this.handleInactiveTabsAnimations()}))}assignSearchPageArguments(){this.isSearchPage&&(this.searchForm=this.container.querySelector(selectors$16.searchForm),this.searchFormData=new FormData(this.searchForm),this.searchTerm=encodeURIComponent(this.searchFormData.get("q")),this.currentType=this.container.getAttribute(attributes$O.currentType),this.sectionId=this.container.dataset.sectionId,this.searchForAllTypes=this.container.getAttribute(attributes$O.allTypes)==="true",this.fetchURL="",this.searchParams="",this.cachedResults={},this.handleTabsHistory(),this.infiniteScrollListener(),this.initInfinityScroll(this.currentType))}init(){const tabsNavList=this.container.querySelectorAll(selectors$16.tabsLink),firstTabsLink=this.container.querySelector(`[${attributes$O.tabsLink}="${this.container.hasAttribute(attributes$O.tabStartIndex)?this.container.getAttribute(attributes$O.tabStartIndex):0}"]`);this.container.querySelector(`[${attributes$O.tab}="${this.container.hasAttribute(attributes$O.tabStartIndex)?this.container.getAttribute(attributes$O.tabStartIndex):0}"]`)?.classList.add(classes$_.current),firstTabsLink?.classList.add(classes$_.current),this.checkVisibleTabsLinks(),tabsNavList.forEach(element=>{this.handleTabsNavListeners(element)})}handleTabsHistory(){window.addEventListener("popstate",this.onHistoryChange.bind(this)),this.openTabFromHistoryEvent=event=>this.openTabFromHistory(event),this.tabsLink.forEach(element=>{element.addEventListener("theme:tab:open-from-history",this.openTabFromHistoryEvent)})}handleTabsNavListeners(element){const tabId=element.getAttribute(attributes$O.tabsLink),tab=this.container.querySelector(`[${attributes$O.tab}="${tabId}"]`);tab&&(element.addEventListener("click",event=>{this.isSearchPage&&this.handleURLSearchParams(event,!0),this.tabChange(element,tab)}),element.addEventListener("keyup",event=>{(event.code===theme.keyboardKeys.SPACE||event.code===theme.keyboardKeys.ENTER||event.code===theme.keyboardKeys.NUMPADENTER)&&(this.isSearchPage&&this.handleURLSearchParams(event,!0),this.tabChange(element,tab))}))}openTabFromHistory(event){const target=event.target,tabId=this.container.querySelector(event.detail.element).getAttribute(attributes$O.tabsLink),tab=this.container.querySelector(`[${attributes$O.tab}="${tabId}"]`);tab&&(this.handleURLSearchParams(event,!1),this.tabChange(target,tab))}handleURLSearchParams(event,updateHistory=!0){const target=event.target.matches(selectors$16.tabsLink)?event.target:event.target.closest(selectors$16.tabsLink),type=target.getAttribute(attributes$O.type),tabId=target.getAttribute(attributes$O.tabsLink),currentPage=this.container.querySelector(`[${attributes$O.tab}="${tabId}"]`).querySelector(selectors$16.currentPage),filtersForm=document.querySelector(selectors$16.filtersForm);let currentPageStr=currentPage?`&page=${currentPage.getAttribute(attributes$O.currentPage)}`:"";if(this.searchParams=getSearchParams(this.searchForm,filtersForm,[],type),type==="product"){const sanitized=this.searchParams.replace("&type=product","");this.searchParams=`${sanitized}&type=product`}else this.searchParams=`q=${this.searchTerm}&type=${type}`;!theme.settings.enableInfinityScroll&¤tPageStr!==""&&(this.searchParams+=currentPageStr),this.fetchURL=`${theme.routes.searchUrl}?${this.searchParams}§ion_id=${this.sectionId}`,updateHistory&&history.pushState({searchParams:this.searchParams},"",`${window.location.pathname}${this.searchParams&&"?".concat(this.searchParams)}`)}tabChangeFetchContent(element,tab){const type=element.getAttribute(attributes$O.type),tabId=element.getAttribute(attributes$O.tabsLink),tabContainer=this.container.querySelector(`[${attributes$O.tab}="${tabId}"]`),typeRendered=this.currentType===type;if(this.cachedResults[tabId]||typeRendered){type==="product"&&!this.searchFilters&&
12(this.searchFilters=new Filters(this.container)),requestAnimationFrame(()=>{this.handleActiveTabClasses(element,tab),this.scrollToCurrentTabLink(element),this.triggerTabAnimations(tab),this.checkVisibleTabsLinks(),this.updateAjaxify(tab,type)});return}fetch(this.fetchURL).then(response=>{if(!response.ok)throw new Error(response.status);return response.text()}).then(text=>{const resultsMarkup=new DOMParser().parseFromString(text,"text/html").querySelector(`[${attributes$O.tab}="${tabId}"]`).innerHTML;this.searchForAllTypes&&this.container.querySelector(selectors$16.allTypesContainer)?.remove(),this.cachedResults[tabId]=resultsMarkup,tabContainer.innerHTML=resultsMarkup,type==="product"&&!this.searchFilters&&(this.searchFilters=new Filters(this.container)),requestAnimationFrame(()=>{this.handleActiveTabClasses(element,tab),this.scrollToCurrentTabLink(element),this.triggerTabAnimations(tab),this.checkVisibleTabsLinks(),this.initInfinityScroll(type)})}).catch(error=>{throw error})}onHistoryChange(event){const searchParams=event.state?.searchParams||window.location.search,productResults=searchParams.indexOf("type=product")>-1,articleResults=searchParams.indexOf("type=article")>-1,pageResults=searchParams.indexOf("type=page")>-1,shouldOpenTab=productResults||articleResults||pageResults,typeProduct=this.container.querySelector(`${selectors$16.tabsLink}[${attributes$O.type}="product"]`),typeArticle=this.container.querySelector(`${selectors$16.tabsLink}[${attributes$O.type}="article"]`),typePage=this.container.querySelector(`${selectors$16.tabsLink}[${attributes$O.type}="page"]`);if(!shouldOpenTab){window.location=searchParams;return}productResults&&typeProduct?.dispatchEvent(new CustomEvent("theme:tab:open-from-history",{bubbles:!0,detail:{element:`[${attributes$O.type}="product"]`}})),articleResults&&typeArticle?.dispatchEvent(new CustomEvent("theme:tab:open-from-history",{bubbles:!0,detail:{element:`[${attributes$O.type}="article"]`}})),pageResults&&typePage?.dispatchEvent(new CustomEvent("theme:tab:open-from-history",{bubbles:!0,detail:{element:`[${attributes$O.type}="page"]`}}))}initCustomScrollbar(){!this.scrollable||this.customScrollbar||(this.customScrollbar=new CustomScrollbar(this.container))}infiniteScrollListener(){theme.settings.enableInfinityScroll&&(this.ajaxifyFromFiltersEvent=event=>this.ajaxifyFromFilters(event),document.addEventListener("theme:tab:ajaxinate",this.ajaxifyFromFiltersEvent))}ajaxifyFromFilters(event){this.initInfinityScroll(event.detail)}initInfinityScroll(type){if(!theme.settings.enableInfinityScroll||this.container.querySelectorAll(selectors$16.ajaxinateContainer).length===0)return;const activeTab=this.container.querySelector(`${selectors$16.tab}.${classes$_.current}`),tabAjaxinateContainer=activeTab?.querySelector(selectors$16.ajaxinateContainer),isLoaded=tabAjaxinateContainer?.classList.contains(classes$_.isLoaded);if(!activeTab){this.initAjaxyfy(type);return}!tabAjaxinateContainer&&this.endlessCollection&&this.updateAjaxinateInstancesSettings(type),!(!tabAjaxinateContainer||isLoaded)&&this.initAjaxyfy(type)}updateAjaxinateInstancesSettings(type){setTimeout(()=>{if(this.endlessCollection.endlessScroll.length===0)return;[...this.endlessCollection.endlessScroll].forEach(instance=>{const containerElement=instance.containerElement,activeTabPresent=[...this.tab].find(tab=>tab.classList.contains(classes$_.current));!(containerElement.closest(`${selectors$16.tab}.${classes$_.current}`)!==null)&&activeTabPresent&&(instance.settings.method="click")});const callback=()=>this.initProductGridEvents();if(type==="product"||type==="all"){const instanceIDCheck=instance=>instance.settings.container.indexOf("resultsProducts")>-1||instance.settings.container.indexOf("allTypes")>-1,productAjaxinateInstance=[...this.endlessCollection.endlessScroll].find(instanceIDCheck);if(!productAjaxinateInstance)return;productAjaxinateInstance.settings.callback=callback}})}initAjaxyfy(type){if(typeof this.endlessCollection!="object"){this.endlessCollection=new Ajaxify(this.container),this.updateAjaxinateInstancesSettings(type);return}this.endlessCollection.endlessScroll.length>0&&(this.endlessCollection.unload(),this.endlessCollection=new Ajaxify(this.container),this.updateAjaxinateInstancesSettings(type))}updateAjaxify(tab,type){if(this.endlessCollection?.endlessScroll.length===0)return;const ajaxinateContainer=tab.querySelector(selectors$16.ajaxinateContainer),id=`${selectors$16.ajaxinateContainer}[${attributes$O.ajaxinateId}="${ajaxinateContainer?.dataset.ajaxinateId}"]`;ajaxinateContainer&&(this.endlessCollection.update(id),this.updateAjaxinateInstancesSettings(type))}initProductGridEvents(){this.productGridEvents=new ProductGrid(this.container),this.initTooltips()}initTooltips(){this.tooltips=this.container.querySelectorAll(selectors$16.tooltip),this.productGrid=this.container.querySelector(selectors$16.productGrid),window.innerWidth<theme.sizes.small&&(this.tooltips=this.productGrid?.querySelectorAll(selectors$16.tooltip)),this.tooltips?.forEach(tooltip2=>{new Tooltip(tooltip2)})}
12tabChange(element,tab){if(!element.classList.contains(classes$_.current)){if(this.isSearchPage){this.tabChangeFetchContent(element,tab);return}this.handleActiveTabClasses(element,tab),this.scrollToCurrentTabLink(element),this.triggerTabAnimations(tab),this.handleTabSliders(tab),this.checkVisibleTabsLinks()}}handleActiveTabClasses(element,tab){const lastActiveTab=this.container.querySelector(`${selectors$16.tab}.${classes$_.current}`),lastActiveTabsLink=this.container.querySelector(`${selectors$16.tabsLink}.${classes$_.current}`);lastActiveTab?.classList.remove(classes$_.current),lastActiveTabsLink?.classList.remove(classes$_.current),element.classList.add(classes$_.current),tab.classList.add(classes$_.current),element.classList.contains(classes$_.hide)&&tab.classList.add(classes$_.hide),this.tabRef?.forEach(refElement=>{const isActive=refElement.classList.contains(classes$_.current),shouldBeActive=refElement.getAttribute(attributes$O.tabRef)===tab.getAttribute(attributes$O.tab);refElement.classList.toggle(classes$_.current,!isActive&&shouldBeActive)})}scrollToCurrentTabLink(element){const parent=element.closest(selectors$16.scrollableHolder)?element.closest(selectors$16.scrollableHolder):element.parentElement,parentPadding=parseInt(window.getComputedStyle(parent).getPropertyValue("padding-left"));parent.scrollTo({top:0,left:element.offsetLeft-parent.offsetWidth/2+element.offsetWidth/2+parentPadding,behavior:"smooth"}),element.dispatchEvent(new CustomEvent("theme:custom-scrollbar:change",{bubbles:!0,detail:{element}}))}triggerTabAnimations(tab){if(theme.settings.animationsEnabled=="false")return;document.dispatchEvent(new CustomEvent("theme:scroll"));const productTab=this.tabsContents.querySelector(`[${attributes$O.tab}="resultsProducts"]`);if(productTab&&productTab.classList.contains(classes$_.current)){const anchors=this.tabsContents.querySelectorAll(selectors$16.aosAnchor);initAnchorObservers(anchors);return}this.tabsContents.querySelectorAll(selectors$16.aosItem).forEach(element=>{element.classList.remove(classes$_.aosAnimate)}),this.animateElementsTimer&&clearTimeout(this.animateElementsTimer),this.animateElementsTimer=setTimeout(()=>{tab.querySelectorAll(selectors$16.aosItem).forEach(element=>{element.classList.add(classes$_.aosAnimate)})},150)}handleInactiveTabsAnimations(){this.tab.forEach(tab=>{tab.classList.contains(classes$_.current)||tab.querySelectorAll(selectors$16.aosItem).forEach(element=>{requestAnimationFrame(()=>element.classList.remove(classes$_.aosAnimate))})})}handleTabSliders(tab){const slider2=tab.querySelector(selectors$16.slider);slider2&&slider2.dispatchEvent(new CustomEvent("theme:tab:change",{bubbles:!1}))}checkVisibleTabsLinks(){const tabsNavList=this.container.querySelectorAll(selectors$16.tabsLink),tabsNavListHidden=this.container.querySelectorAll(`${selectors$16.tabsLink}.${classes$_.hide}`);tabsNavList.length-tabsNavListHidden.length<2?this.container.classList.add(classes$_.alt):this.container.classList.remove(classes$_.alt)}onBlockSelect(event){const element=event.target;element&&(element.dispatchEvent(new Event("click")),element.parentNode.scrollTo({top:0,left:element.offsetLeft-element.clientWidth,behavior:"smooth"}))}onUnload(){this.customScrollbar&&this.customScrollbar.unload(),this.isSearchPage&&theme.settings.enableInfinityScroll&&document.removeEventListener("theme:tab:ajaxinate",this.ajaxifyFromFiltersEvent),document.removeEventListener("theme:scroll",this.inactiveTabsAnimationsCallback)}}const tabs={onLoad(){sections$D[this.id]=new Tabs(this.container)},onBlockSelect(e){sections$D[this.id].onBlockSelect(e)},onUnload(){sections$D[this.id].onUnload()}},selectors$15={drawer:"[data-drawer]",drawerToggle:"[data-drawer-toggle]",scroller:"[data-scroll]",quickviewItem:"[data-quick-view-item]",tabsLink:"[data-tabs-link]",quickViewFocus:"[data-quick-view-focus]",mobileMenu:"[data-mobile-menu]",drawerBlockMenu:"[data-drawer-block-menu]",navCompress:"[data-nav-items-compress]",popdownToggle:"[data-popdown-toggle]",navSearchOpen:"[data-nav-search-open]",navLinkMobile:"[data-nav-link-mobile]",mobileMenuTrigger:"[data-mobile-menu-trigger]",mobileNavDropdownTrigger:"[data-collapsible-trigger]",
12scrollableMenuBlocks:"[data-scrollable-menu-blocks]"},classes$Z={open:"is-open",drawerOpen:"js-drawer-open",drawerOpenInner:"js-drawer-open--inner",drawerOpenInnerQV:"js-drawer-open--inner-qv",contentVisibilityHidden:"cv-h",header:"site-header",productSingle:"product-single",shopifySectionMobileMenu:"shopify-section-mobile-menu",drawerContentScrollHasScroll:"drawer__content-scroll--has-scroll"},attributes$N={drawer:"data-drawer",drawerHeader:"data-drawer-header",drawerSection:"data-drawer-section",quickViewItem:"data-quick-view-item",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaControls:"aria-controls",ariaHidden:"aria-hidden",mobileMenuTrigger:"data-mobile-menu-trigger",drawerBlock:"data-drawer-block"};let sections$C={};class Drawer{constructor(container){this.container=container,this.body=document.body,this.drawers=this.container.querySelectorAll(selectors$15.drawer),this.drawerToggleButtons=this.container.querySelectorAll(selectors$15.drawerToggle),this.a11y=window.theme.a11y,this.container.hasAttribute(attributes$N.drawer)&&(this.drawers=[this.container]),this.drawerToggleEvent=window.theme.throttle(event=>{this.toggle(event)},150),this.drawerOpenEvent=event=>{this.open(event)},this.keyPressCloseEvent=window.theme.throttle(event=>{event.code===theme.keyboardKeys.ESCAPE&&this.close(event)},150),this.drawerCloseEvent=event=>{const activeDrawer=document.querySelector(`${selectors$15.drawer}.${classes$Z.open}`);let isDrawerToggle=!1;if(!activeDrawer)return;event.type==="click"&&(isDrawerToggle=event.target.matches(selectors$15.drawerToggle));const isDrawerChild=activeDrawer?activeDrawer.contains(event.target):!1,quickviewItem=activeDrawer.closest(selectors$15.quickviewItem),isQuickviewChild=quickviewItem?quickviewItem.contains(event.target):!1;!isDrawerToggle&&!isDrawerChild&&!isQuickviewChild&&this.close()},this.drawerMenus=document.querySelectorAll(selectors$15.drawerBlockMenu),this.checkScroll=this.checkScroll.bind(this),this.initListeners(),this.initMutationObserver()}initListeners(){this.drawerToggleButtons.forEach(button=>{button.addEventListener("click",this.drawerToggleEvent)}),this.drawers.forEach(drawer2=>{drawer2.addEventListener("keyup",this.keyPressCloseEvent),this.collapsible=new Collapsible(drawer2),this.tabs=new Tabs(drawer2)}),document.addEventListener("click",this.drawerCloseEvent),document.addEventListener("theme:drawer:closing",this.drawerCloseEvent),document.addEventListener("theme:drawer:opening",this.drawerOpenEvent),window.addEventListener("resize",this.checkScroll),document.addEventListener("theme:drawer:open",this.checkScroll),this.checkScroll()}initMutationObserver(){this.mutationObserver=new MutationObserver(mutations=>{mutations.some(mutation=>mutation.type==="childList"||mutation.type==="attributes"&&(mutation.attributeName==="style"||mutation.attributeName==="class"))&&this.checkScroll()}),this.drawerMenus.forEach(menu=>{this.mutationObserver.observe(menu,{childList:!0,subtree:!0,attributes:!0})})}toggle(e){e.preventDefault();const drawer2=document.querySelector(`#${e.target.getAttribute(attributes$N.ariaControls)}`);if(!drawer2)return;drawer2.classList.contains(classes$Z.open)?this.close():this.open(e)}open(e){let drawerOpenButton=e.detail.element;drawerOpenButton||(drawerOpenButton=e.target);const drawerOpenButtonControls=drawerOpenButton.getAttribute(attributes$N.ariaControls);let drawer2;if(drawerOpenButton.hasAttribute(attributes$N.mobileMenuTrigger)){const headerMobileDrawer=document.querySelector(`mobile-menu[${attributes$N.drawerHeader}]`),sectionMobileDrawer=document.querySelector(`mobile-menu[${attributes$N.drawerSection}]`);drawer2=theme.settings.mobileMenuType==="new"&§ionMobileDrawer||headerMobileDrawer}else drawer2=document.querySelector(`#${drawerOpenButtonControls}`);if(!drawer2)return;const drawerScroller=drawer2.querySelector(selectors$15.scroller)||drawer2;document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:drawerScroller})),document.dispatchEvent(new CustomEvent("theme:drawer:open",{bubbles:!0})),this.body.classList.add(classes$Z.drawerOpen),(drawerOpenButtonControls?.includes("size-chart")||drawerOpenButtonControls?.includes("popup-text"))&&(this.body.classList.add(classes$Z.drawerOpenInner),drawerOpenButtonControls.includes("quickview")&&this.body.classList.add(classes$Z.drawerOpenInnerQV)),drawer2.classList.add(classes$Z.open),drawer2.setAttribute(attributes$N.ariaHidden,!1),drawer2.classList.remove(classes$Z.contentVisibilityHidden),drawerOpenButton.setAttribute(attributes$N.ariaExpanded,!0);const onDrawerTransitionEnd=event=>{const eventProperty=event.propertyName==="transform"||event.propertyName==="top";event.target!==drawer2||!eventProperty||(this.a11y.state.trigger=drawerOpenButton,this.a11y.trapFocus({container:drawer2}),drawer2.removeEventListener("transitionend",onDrawerTransitionEnd))};drawer2.addEventListener("transitionend",onDrawerTransitionEnd)}
12close(event=!1){if(!this.body.classList.contains(classes$Z.drawerOpen))return;const drawer2=document.querySelector(`${selectors$15.drawer}.${classes$Z.open}`);this.drawerToggleButtons.forEach(button=>{button.setAttribute(attributes$N.ariaExpanded,!1)}),this.a11y.removeTrapFocus({container:drawer2}),drawer2?.classList.remove(classes$Z.open);const onDrawerTransitionEnd=event2=>{event2.target===drawer2&&(requestAnimationFrame(()=>{drawer2?.classList.add(classes$Z.contentVisibilityHidden),document.dispatchEvent(new CustomEvent("theme:drawer:close",{bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})),drawer2?.setAttribute(attributes$N.ariaHidden,!0)}),drawer2?.removeEventListener("transitionend",onDrawerTransitionEnd))};if(drawer2?.addEventListener("transitionend",onDrawerTransitionEnd),this.body.classList.remove(classes$Z.drawerOpen),this.body.classList.remove(classes$Z.drawerOpenInner),this.body.classList.contains(classes$Z.drawerOpenInnerQV)){if(this.body.classList.remove(classes$Z.drawerOpenInnerQV),event&&event.code===theme.keyboardKeys.ESCAPE){this.a11y.state.trigger=this.a11y.state.mainTrigger,this.a11y.state.trigger.focus();return}const quickViewFocus=this.a11y.state.trigger.closest(selectors$15.quickViewFocus);this.a11y.trapFocus({container:quickViewFocus,elementToFocus:this.a11y.state.trigger}),this.a11y.state.trigger=this.a11y.state.mainTrigger}}checkScroll(){const scrollElement=document.querySelector(selectors$15.scrollableMenuBlocks);if(!scrollElement)return;const hasScroll=scrollElement.scrollHeight>scrollElement.clientHeight;scrollElement.classList.toggle(classes$Z.drawerContentScrollHasScroll,hasScroll)}onUnload(){this.close(),this.drawerToggleButtons.forEach(button=>{button.removeEventListener("click",this.drawerToggleEvent)}),this.drawers.forEach(drawer2=>{drawer2.removeEventListener("keyup",this.keyPressCloseEvent)}),document.removeEventListener("click",this.drawerCloseEvent),document.removeEventListener("theme:drawer:closing",this.drawerCloseEvent),document.removeEventListener("theme:drawer:opening",this.drawerOpenEvent),window.removeEventListener("resize",this.checkScroll),document.removeEventListener("theme:drawer:open",this.checkScroll),this.mutationObserver&&this.mutationObserver.disconnect(),this.collapsible&&this.collapsible.onUnload(),this.tabs&&this.tabs.onUnload()}}const drawer={onLoad(){sections$C[this.id]=new Drawer(this.container)},onUnload(){sections$C[this.id].onUnload()}};class MobileMenu extends HTMLElement{constructor(){super(),this.container=this,this.drawerInstance=null,this.showDrawerOnSelect=this.showDrawerOnSelect.bind(this),this.hideDrawerOnDeselect=this.hideDrawerOnDeselect.bind(this)}connectedCallback(){this.drawerInstance=new Drawer(this.container),this.initMobileNav(),document.addEventListener("shopify:block:select",this.showDrawerOnSelect),document.addEventListener("shopify:section:load",this.showDrawerOnSelect),document.addEventListener("shopify:section:select",this.showDrawerOnSelect),document.addEventListener("shopify:section:deselect",this.hideDrawerOnDeselect)}initMobileNav(){const drawerToggle=this.container.querySelector(selectors$15.drawerToggle);if(this.container.querySelectorAll(selectors$15.navSearchOpen)?.forEach(element=>{element.addEventListener("click",event=>{event.preventDefault();const mobileMenu=document.querySelector(selectors$15.mobileMenu),navCompress=document.querySelector(selectors$15.navCompress);let isTouch2=matchMedia("(pointer:coarse)").matches;window.innerWidth<theme.sizes.small&&window.Shopify.designMode&&(isTouch2=!0);const popdownToggle=isTouch2?mobileMenu?.querySelector(selectors$15.popdownToggle):navCompress?.querySelector(selectors$15.popdownToggle);drawerToggle.dispatchEvent(new Event("click",{bubbles:!0}));const onDrawerTransitionEnd=e=>{e.target===this.container&&(requestAnimationFrame(()=>popdownToggle?.dispatchEvent(new Event("click",{bubbles:!0}))),this.container.removeEventListener("transitionend",onDrawerTransitionEnd))};this.container.addEventListener("transitionend",onDrawerTransitionEnd)})}),theme.settings.mobileMenuBehaviour==="link")return;const navMobileLinks=this.container.querySelectorAll(selectors$15.navLinkMobile);navMobileLinks.length&&navMobileLinks.forEach(link=>{link.addEventListener("click",e=>{const hasDropdown=link.parentNode.querySelectorAll(selectors$15.mobileNavDropdownTrigger).length,dropdownTrigger=link.nextElementSibling;hasDropdown&&(e.preventDefault(),dropdownTrigger.dispatchEvent(new Event("click"),{bubbles:!0}))})})}
12showDrawerOnSelect(e){if(e.target.classList.contains(classes$Z.shopifySectionMobileMenu)||e.target.hasAttribute(attributes$N.drawerBlock)){if(!(e.target.querySelector("mobile-menu")||e.target.closest("mobile-menu"))||theme.settings.mobileMenuType==="old")return;document.body.classList.contains(classes$Z.drawerOpen)||document.querySelector(selectors$15.mobileMenuTrigger)?.dispatchEvent(new Event("click",{bubbles:!0}))}}hideDrawerOnDeselect(e){if(e.target.classList.contains(classes$Z.shopifySectionMobileMenu)||e.target.hasAttribute(attributes$N.drawerBlock)){if(!(e.target.querySelector("mobile-menu")||e.target.closest("mobile-menu")))return;document.body.classList.contains(classes$Z.drawerOpen)&&document.dispatchEvent(new CustomEvent("theme:drawer:closing",{bubbles:!0}))}}disconnectedCallback(){this.drawerInstance&&(this.drawerInstance.onUnload(),this.drawerInstance=null),document.removeEventListener("shopify:block:select",this.showDrawerOnSelect),document.removeEventListener("shopify:section:load",this.showDrawerOnSelect),document.removeEventListener("shopify:section:select",this.showDrawerOnSelect),document.removeEventListener("shopify:section:deselect",this.hideDrawerOnDeselect)}}customElements.get("mobile-menu")||customElements.define("mobile-menu",MobileMenu);const classes$Y={loading:"is-loading",imgIn:"img-in"},selectors$14={img:"img.is-loading",section:"[data-section-type]"};function loadedImagesEventHook(){document.addEventListener("load",e=>{if(e.target.tagName.toLowerCase()=="img"&&e.target.classList.contains(classes$Y.loading)){e.target.classList.remove(classes$Y.loading),e.target.parentNode.classList.remove(classes$Y.loading);const section=e.target.closest(selectors$14.section);section&§ion.classList.add(classes$Y.imgIn)}},!0)}function removeLoadingClassFromLoadedImages(container){container.querySelectorAll(selectors$14.img).forEach(img=>{if(img.complete){img.classList.remove(classes$Y.loading),img.parentNode.classList.remove(classes$Y.loading);const section=img.closest(selectors$14.section);section&§ion.classList.add(classes$Y.imgIn)}})}const showElement=(elem,removeProp=!1,prop="block")=>{elem&&(removeProp?elem.style.removeProperty("display"):elem.style.display=prop)},hideElement=elem=>{elem&&(elem.style.display="none")},selectors$13={list:"[data-store-availability-list]"},defaults={close:".js-modal-close",open:".js-modal-open-store-availability-modal",openClass:"modal--is-active",openBodyClass:"modal--is-visible",closeModalOnClick:!1,scrollIntoView:!1};class Modals{constructor(id,options2){if(this.modal=document.getElementById(id),!this.modal)return!1;this.nodes={parents:[document.querySelector("html"),document.body]},this.config=Object.assign(defaults,options2),this.modalIsOpen=!1,this.focusOnOpen=this.config.focusOnOpen?document.getElementById(this.config.focusOnOpen):this.modal,this.openElement=document.querySelector(this.config.open),this.a11y=window.theme.a11y,this.init()}init(){this.openElement.addEventListener("click",this.open.bind(this)),this.modal.querySelector(this.config.close).addEventListener("click",this.closeModal.bind(this))}open(evt){let externalCall=!1;if(evt?evt.preventDefault():externalCall=!0,this.modalIsOpen&&!externalCall){this.closeModal();return}this.modal.classList.add(this.config.openClass),this.nodes.parents.forEach(node=>{node.classList.add(this.config.openBodyClass)}),this.modalIsOpen=!0;const scrollableElement=document.querySelector(selectors$13.list);document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:scrollableElement})),this.config.scrollIntoView&&this.scrollIntoView(),this.bindEvents(),this.a11y.trapFocus({container:this.modal})}closeModal(){if(!this.modalIsOpen)return;document.activeElement.blur(),this.modal.classList.remove(this.config.openClass);var self=this;this.nodes.parents.forEach(function(node){node.classList.remove(self.config.openBodyClass)}),this.modalIsOpen=!1,this.openElement.focus(),this.unbindEvents(),this.a11y.removeTrapFocus({container:this.modal});const timeout=400;document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0,detail:timeout}))}bindEvents(){this.keyupHandler=this.keyupHandler.bind(this),this.clickHandler=this.clickHandler.bind(this),document.body.addEventListener("keyup",this.keyupHandler),document.body.addEventListener("click",this.clickHandler)}unbindEvents(){document.body.removeEventListener("keyup",this.keyupHandler),document.body.removeEventListener("click",this.clickHandler)}
12keyupHandler(event){event.code===theme.keyboardKeys.ESCAPE&&this.closeModal()}clickHandler(event){this.config.closeModalOnClick&&!this.modal.contains(event.target)&&!event.target.matches(this.config.open)&&this.closeModal()}scrollIntoView(){this.focusOnOpen.scrollIntoView({behavior:"smooth"})}}const selectors$12={body:"body",storeAvailabilityModal:"[data-store-availability-modal]",storeAvailabilityModalOpen:"[data-store-availability-modal-open]",storeAvailabilityModalClose:"[data-store-availability-modal-close]",storeAvailabilityModalProductTitle:"[data-store-availability-modal-product__title]"},classes$X={openClass:"store-availabilities-modal--active"};class StoreAvailability{constructor(container){this.container=container}updateContent(variantId,productTitle){this._fetchStoreAvailabilities(variantId,productTitle)}clearContent(){this.container.innerHTML=""}_initModal(){return new Modals("StoreAvailabilityModal",{close:selectors$12.storeAvailabilityModalClose,open:selectors$12.storeAvailabilityModalOpen,closeModalOnClick:!0,openClass:classes$X.openClass,scrollIntoView:!1})}_fetchStoreAvailabilities(variantId,productTitle){const variantSectionUrl="/variants/"+variantId+"/?section_id=store-availability";this.clearContent();const self=this;fetch(variantSectionUrl).then(function(response){return response.text()}).then(function(storeAvailabilityHTML){const body=document.querySelector(selectors$12.body);let storeAvailabilityModal=body.querySelector(selectors$12.storeAvailabilityModal);if(storeAvailabilityModal&&storeAvailabilityModal.remove(),self.container.innerHTML=storeAvailabilityHTML,self.container.innerHTML=self.container.firstElementChild.innerHTML,self.container.firstElementChild.innerHTML.trim()===""){self.clearContent();return}self.container.querySelector(selectors$12.storeAvailabilityModalOpen)&&(self.modal=self._initModal(),self._updateProductTitle(productTitle),storeAvailabilityModal=self.container.querySelector(selectors$12.storeAvailabilityModal),storeAvailabilityModal&&body.appendChild(storeAvailabilityModal))})}_updateProductTitle(productTitle){const storeAvailabilityModalProductTitle=this.container.querySelector(selectors$12.storeAvailabilityModalProductTitle);storeAvailabilityModalProductTitle.textContent=productTitle}}const selectors$11={form:"[data-product-form]",optionPosition:"[data-option-position]",optionInput:'[name^="options"], [data-popout-option]'},classes$W={soldOut:"sold-out",unavailable:"unavailable"},attributes$M={optionPosition:"data-option-position",selectOptionValue:"data-value"};class SelloutVariants{constructor(container,productJSON){this.container=container,this.productJSON=productJSON,this.form=this.container.querySelector(selectors$11.form),this.formData=new FormData(this.form),this.optionElements=this.container.querySelectorAll(selectors$11.optionInput),this.productJSON&&this.form&&this.init()}init(){this.update()}update(){this.getCurrentState(),this.optionElements.forEach(el=>{const val=el.value||el.getAttribute(attributes$M.selectOptionValue),optionSelector=el.closest(selectors$11.optionPosition);if(!optionSelector)return;const positionString=optionSelector.getAttribute(attributes$M.optionPosition),position=parseInt(positionString,10)-1;let newVals=[...this.selections];newVals[position]=val;const found=this.productJSON.variants.find(element=>{let perfectMatch=!0;for(let index=0;index<newVals.length;index++)element.options[index]!==newVals[index]&&(perfectMatch=!1);return perfectMatch});el.parentElement.classList.remove(classes$W.soldOut,classes$W.unavailable),typeof found>"u"?el.parentElement.classList.add(classes$W.unavailable):found?.available===!1&&el.parentElement.classList.add(classes$W.soldOut)})}getCurrentState(){this.formData=new FormData(this.form),this.selections=[];for(var value of this.formData.entries())value[0].includes("options[")&&this.selections.push(value[1])}}const settings$7={templateIndex:1},classes$V={popupNotification:"pswp--notification pswp--not-close-btn"},attributes$L={notificationPopup:"data-notification-popup"},options={history:!1,focus:!1,mainClass:classes$V.popupNotification,closeOnVerticalDrag:!1};class NotificationPopup{constructor(button){this.button=button,this.a11y=window.theme.a11y,this.notificationPopupHtml=this.button.getAttribute(attributes$L.notificationPopup),this.notificationPopupHtml.trim()!==""&&this.init()}init(){const items=[{html:this.notificationPopupHtml}];this.a11y.state.trigger=this.button,new window.theme.LoadPhotoswipe(items,options,settings$7.templateIndex)}}const selectors$10={product:"[data-product]",productForm:"[data-product-form]",addToCart:"[data-add-to-cart]",addToCartText:"[data-add-to-cart-text]",buyItNow:"[data-buy-it-now]",comparePrice:"[data-compare-price]",formWrapper:"[data-form-wrapper]",header:"[data-site-header]",itemCountForVariant:"[data-item-count-for-variant]",maxInventory:"[data-max-inventory]",originalSelectorId:"[data-product-select]",preOrderTag:"_preorder",priceWrapper:"[data-price-wrapper]",priceOffWrap:"[data-price-off]",priceOffAmount:"[data-price-off-amount]",productSlide:"[data-product-slide]",productImage:"[data-product-image]",productMediaSlider:"[data-product-single-media-slider]",productJson:"[data-product-json]",productPrice:"[data-product-price]",unitPrice:"[data-product-unit-price]",unitBase:"[data-product-base]",unitWrapper:"[data-product-unit]",subPrices:"[data-subscription-watch-price]",subSelectors:"[data-subscription-selectors]",subsToggle:"[data-toggles-group]",subsChild:"data-group-toggle",subDescription:"[data-plan-description]",remainingCount:"[data-remaining-count]",remainingWrapper:"[data-remaining-wrapper]",remainingJSON:"[data-product-remaining-json]",idInput:'[name="id"]',storeAvailabilityContainer:"[data-store-availability-container]",upsellButton:"[data-upsell-btn]",sectionNode:".shopify-section",quickViewItem:"[data-quick-view-item]",notificationButtonText:"[data-notification-button-text]",productSelectors:".product__selectors",swatchesContainer:"[data-swatches-container]",swatchesMore:"[data-swatches-more]",selectorWrapper:"[data-option-position]",variantButtons:"[data-variant-buttons]",variantOptionImage:"[data-variant-option-image]",disabled:"[disabled]",shopifyPaymentButton:".shopify-payment-button__button--unbranded",variantFinalSaleMeta:"[data-variant-final-sale-metafield]",variantIncomingStockMeta:"[data-variant-incoming-stock-metafield]",standardAppBlock:".product__block.standard__app",finalSaleBadge:"[data-final-sale-badge]"},classes$U={hidden:"hidden",variantSoldOut:"variant--soldout",variantUnavailable:"variant--unavailabe",productPriceSale:"product__price--sale",priceWrapperHidden:"product__price--hidden",remainingLow:"count-is-low",remainingIn:"count-is-in",remainingOut:"count-is-out",remainingUnavailable:"count-is-unavailable",selectorVisible:"selector-wrapper--visible"},attributes$K={productImageId:"data-image-id",tallLayout:"data-tall-layout",dataEnableHistoryState:"data-enable-history-state",notificationPopup:"data-notification-popup",swatchVariant:"data-swatch-variant",addToCartButton:"data-atc-button",disabled:"disabled",maxInventoryReached:"data-max-inventory-reached",errorMessagePosition:"data-error-message-position",variantTitle:"data-variant-title",finalSale:"data-final-sale"};let sections$B={};class ProductAddForm{constructor(container){this.container=container,this.product=this.container.querySelector(selectors$10.product),this.productForm=this.container.querySelector(selectors$10.productForm),this.tallLayout=this.container.getAttribute(attributes$K.tallLayout)==="true",this.addToCartButton=this.container.querySelector(selectors$10.addToCart),this.buyItNow=this.container.querySelector(selectors$10.buyItNow),this.hasPaymentButton=this.buyItNow!==null,this.variantOptionImages=this.container.querySelectorAll(selectors$10.variantOptionImage),this.hasVariantOptionWithImage=this.variantOptionImages.length>0,!(!this.product||!this.productForm)&&(this.storeAvailabilityContainer=this.container.querySelector(selectors$10.storeAvailabilityContainer),this.enableHistoryState=this.container.getAttribute(attributes$K.dataEnableHistoryState)==="true",this.hasUnitPricing=this.container.querySelector(selectors$10.unitWrapper),this.subSelectors=this.container.querySelector(selectors$10.subSelectors),this.subPrices=this.container.querySelector(selectors$10.subPrices),this.priceOffWrap=this.container.querySelector(selectors$10.priceOffWrap),this.priceOffAmount=this.container.querySelector(selectors$10.priceOffAmount),this.planDecription=this.container.querySelector(selectors$10.subDescription),this.swatchesContainer=this.container.querySelector(selectors$10.swatchesContainer),this.latestVariantId="",this.latestVariantName="",this.latestVariantTitle="",this.sellout=null,this.variantIncomingStockMetafields=this.fetchVariantIncomingStockMetafields(),this.sessionStorage=window.sessionStorage,this.remainingWrapper=this.container.querySelector(selectors$10.remainingWrapper),this.remainingWrapper&&(this.remainingMaxInt=parseInt(this.remainingWrapper.dataset.remainingMax,10),this.remainingCount=this.container.querySelector(selectors$10.remainingCount),this.remainingJSONWrapper=this.container.querySelector(selectors$10.remainingJSON),this.remainingJSON=null,this.remainingJSONWrapper&&this.remainingJSONWrapper.innerHTML!==""&&(this.remainingJSON=JSON.parse(this.remainingJSONWrapper.innerHTML))),this.storeAvailabilityContainer&&(this.storeAvailability=new StoreAvailability(this.storeAvailabilityContainer)),this.init(),this.hasVariantOptionWithImage&&(this.onResizeCallback=()=>this.resizeEvents(),window.addEventListener("theme:resize:width",this.onResizeCallback)),this.hasPaymentButton&&(this.mutationObserver=null,this.observeContainer()))}init(){let productJSON=null;const productElemJSON=this.container.querySelector(selectors$10.productJson);productElemJSON&&(productJSON=productElemJSON.innerHTML),productJSON?(this.productJSON=JSON.parse(productJSON),this.linkForm(),this.sellout=new SelloutVariants(this.container,this.productJSON)):console.error("Missing product JSON"),this.hasVariantOptionWithImage&&(this.variantButtonsContainer=this.variantOptionImages[0].closest(selectors$10.variantButtons),this.equalizeImageOptionContainers())}resizeEvents(){this.hasVariantOptionWithImage&&this.equalizeImageOptionContainers()}linkForm(){this.productForm=new ProductForm(this.productForm,this.productJSON,{onOptionChange:this.onOptionChange.bind(this),onPlanChange:this.onPlanChange.bind(this),onQuantityChange:this.onQuantityChange.bind(this)});const formState=this.productForm.getFormState();if(this.pushState(formState,!0),this.subsToggleListeners(),this.swatchesContainer){this.observeSwatch(formState);const selectorWrapper=this.swatchesContainer.closest(selectors$10.selectorWrapper);selectorWrapper.querySelector(selectors$10.swatchesMore)?.addEventListener("click",event=>{event.preventDefault(),selectorWrapper.classList.contains(classe
12s$U.selectorVisible)?selectorWrapper.classList.remove(classes$U.selectorVisible):selectorWrapper.classList.add(classes$U.selectorVisible)})}this.checkLiveCartInfoCallback=()=>this.checkLiveCartInfo(),document.addEventListener("theme:cart:close",this.checkLiveCartInfoCallback)}onOptionChange(evt){this.pushState(evt.dataset),this.updateProductImage(evt)}onPlanChange(evt){this.subPrices&&this.pushState(evt.dataset)}onQuantityChange(evt){this.pushState(evt.dataset)}pushState(formState,init=!1){this.productState=this.setProductState(formState),this.updateAddToCartState(formState),this.updateIncomingStockApp(formState),this.updateProductPrices(formState),this.updateSaleText(formState),this.updateSubscriptionText(formState),this.updateTitleAttr(formState),this.fireHookEvent(formState),this.updateRemaining(formState),this.checkLiveCartInfo(formState),this.sellout?.update(formState),this.enableHistoryState&&!init&&this.updateHistoryState(formState),this.storeAvailability&&(formState.variant?this.storeAvailability.updateContent(formState.variant.id,this.productForm.product.title):this.storeAvailability.clearContent())}updateTitleAttr(formState){const variant=formState.variant;if(!variant)return;let titleText=this.productForm.product.title;variant.public_title&&(titleText+=` - ${variant.title}`),this.productForm.element.setAttribute(attributes$K.variantTitle,titleText)}updateAddToCartState(formState){const variant=formState.variant,priceWrapper=this.container.querySelectorAll(selectors$10.priceWrapper),addToCart=this.container.querySelectorAll(selectors$10.addToCart),addToCartText=this.container.querySelectorAll(selectors$10.addToCartText),formWrapper=this.container.querySelectorAll(selectors$10.formWrapper),buyItNow=this.container.querySelector(selectors$10.buyItNow);let addText=theme.strings.add_to_cart;theme.settings.atcButtonShowPrice&&(addText=`${addText}<span data-product-price class="product__price--regular"></span> <s data-compare-price class="product__price--compare"></s>`),this.productJSON.tags.includes(selectors$10.preOrderTag)&&(addText=theme.strings.preorder),priceWrapper?.forEach(element=>{element.hasAttribute(attributes$K.addToCartButton)||element.classList.toggle(classes$U.priceWrapperHidden,!variant)}),addToCart?.forEach(element=>{if(element.matches(selectors$10.upsellButton)||(element.disabled=!0,buyItNow?.classList.add(classes$U.hidden),!variant)||(element.disabled=!1,variant.available&&buyItNow?.classList.remove(classes$U.hidden),!element.hasAttribute(attributes$K.notificationPopup)))return;
12const notificationFormId=element.id.replace("AddToCart","NotificationForm"),formID=this.sessionStorage.getItem("notification_form_id");let notificationFormSubmitted=!1,variantId=variant.id,variantName=variant.name,variantTitle=variant.title;if(formID){const sessionId=formID.substring(0,formID.lastIndexOf("--")),sessionVariantId=formID.split("--").slice(-1)[0];notificationFormSubmitted=notificationFormId===sessionId,notificationFormSubmitted&&(this.latestVariantId=variantId,this.latestVariantName=variantName,this.latestVariantTitle=variantTitle,variantId=Number(sessionVariantId),this.productJSON.variants.forEach(variant2=>{variant2.id===variantId&&(variantName=variant2.name,variantTitle=variant2.title)}))}let notificationPopupHtml=element.getAttribute(attributes$K.notificationPopup);const notificationButtonText=new DOMParser().parseFromString(notificationPopupHtml,"text/html").querySelector(selectors$10.notificationButtonText)?.innerHTML;if(this.latestVariantId!=""&&this.latestVariantTitle!=""){notificationPopupHtml=notificationPopupHtml.replaceAll(this.latestVariantId,variantId),notificationPopupHtml=notificationPopupHtml.replaceAll(`<p class='product__notification__subtitle'>${this.latestVariantTitle}</p>`,`<p class='product__notification__subtitle'>${variantTitle}</p>`),notificationPopupHtml=notificationPopupHtml.replaceAll(`value='${this.latestVariantName}'>`,`value='${variantName}'>`);const updatedNotificationButtonText=new DOMParser().parseFromString(notificationPopupHtml,"text/html").querySelector(selectors$10.notificationButtonText)?.innerHTML;notificationPopupHtml=notificationPopupHtml.replace(updatedNotificationButtonText,notificationButtonText)}element.setAttribute(attributes$K.notificationPopup,notificationPopupHtml),notificationFormSubmitted&&(this.scrollToForm(this.product.closest(selectors$10.sectionNode)),new NotificationPopup(element)),this.latestVariantId=variantId,this.latestVariantName=variantName,this.latestVariantTitle=variantTitle}),addToCartText?.forEach(element=>{if(!variant){element.innerHTML=theme.strings.unavailable;return}if(!variant.available){if(element.innerHTML=theme.strings.sold_out,element.parentNode.hasAttribute(attributes$K.notificationPopup)){if(element.closest(selectors$10.quickViewItem))return;element.innerHTML=`${theme.strings.sold_out} - ${theme.strings.newsletter_product_availability}`}return}element.innerHTML=addText}),formWrapper?.forEach(element=>{if(!variant){element.classList.add(classes$U.variantUnavailable),element.classList.remove(classes$U.variantSoldOut);return}const formSelect=element.querySelector(selectors$10.originalSelectorId);if(formSelect&&(formSelect.value=variant.id),!variant.available){element.classList.add(classes$U.variantSoldOut),element.classList.remove(classes$U.variantUnavailable);return}element.classList.remove(classes$U.variantSoldOut,classes$U.variantUnavailable)})}fetchVariantIncomingStockMetafields(){const metafieldsData=this.container.querySelector(selectors$10.variantIncomingStockMeta)?.textContent;if(!metafieldsData)return[];try{return JSON.parse(metafieldsData)}catch{return[]}}getIncomingStockMetafield(variant){return variant&&this.variantIncomingStockMetafields.find(item=>Number(item.variant_id)===Number(variant.id))||null}isQuickViewProduct(){return!!(this.container.closest(selectors$10.quickViewItem)||this.container.querySelector(selectors$10.quickViewItem))}getVariantUnavailableMessage(){if(this.isQuickViewProduct())return null;let unavailableMessage=this.container.querySelector("[data-variant-unavailable-message]");const productSelectors=this.container.querySelector(selectors$10.productSelectors);return!unavailableMessage&&productSelectors&&(unavailableMessage=document.createElement("div"),unavailableMessage.className="product__variant-unavailable-message",unavailableMessage.setAttribute("data-variant-unavailable-message",""),unavailableMessage.style.display="none",unavailableMessage.textContent="Denna produkt \xE4r slut i lager.",productSelectors.insertAdjacentElement("afterend",unavailableMessage)),unavailableMessage}updateRestoreEmailButton(showRestoreEmailButton){const toggleRestoreEmailButton=()=>{const element=document.querySelector(".product-restore-email");
12element&&(element.style.display=showRestoreEmailButton?"flex":"none")};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",toggleRestoreEmailButton,{once:!0}):toggleRestoreEmailButton(),requestAnimationFrame(toggleRestoreEmailButton),setTimeout(toggleRestoreEmailButton,500)}updateIncomingStockApp(formState){const variant=formState.variant,appBlock=this.container.querySelector(selectors$10.standardAppBlock),unavailableMessage=this.getVariantUnavailableMessage(),incomingStockMetafield=this.getIncomingStockMetafield(variant),variantInventoryQuantity=Number(incomingStockMetafield?.inventory_quantity||0),variantInventoryIsZero=variantInventoryQuantity<=0,variantInventoryIsGreaterThanZero=variantInventoryQuantity>0,variantHasIncomingStock=(incomingStockMetafield?.incoming_stock||"")!=="",showIncomingStockApp=!!(variant&&variantInventoryIsZero&&variantHasIncomingStock),showRestoreEmailButton=!!(variant&&variantInventoryIsZero&&variantHasIncomingStock),showUnavailableMessage=!!(variant&&variantInventoryIsZero&&!variantHasIncomingStock);appBlock&&(appBlock.style.display=showIncomingStockApp?"block":"none"),unavailableMessage&&(unavailableMessage.style.display=showUnavailableMessage?"block":"none"),this.updateRestoreEmailButton(showRestoreEmailButton&&!variantInventoryIsGreaterThanZero)}updateHistoryState(formState){const variant=formState.variant,plan=formState.plan,location2=window.location.href;if(variant&&location2.includes("/product")){const url=new window.URL(location2),params=url.searchParams;params.set("variant",variant.id),plan&&plan.detail&&plan.detail.id&&this.productState.hasPlan?params.set("selling_plan",plan.detail.id):params.delete("selling_plan"),url.search=params.toString();const urlString=url.toString();window.history.replaceState({path:urlString},"",urlString)}}updateRemaining(formState){const variant=formState.variant;if(variant){const skuElement=document.querySelector(".sku-variant-id");skuElement&&(skuElement.innerText=variant.sku||"");const button=document.querySelector(".product__submit__add.custom_add_class");button&&(variant.available===!1?button.classList.add("hide"):button.classList.remove("hide"))}const remainingClasses=[classes$U.remainingIn,classes$U.remainingOut,classes$U.remainingUnavailable,classes$U.remainingLow],remainingOutText=this.remainingWrapper?.querySelector(".variant__countdown--out");if(remainingOutText&&!remainingOutText.dataset.defaultText&&(remainingOutText.dataset.defaultText=remainingOutText.textContent.trim()),variant&&this.remainingWrapper&&this.remainingJSON){const remaining=this.remainingJSON[variant.id],incomingStockMetafield=this.getIncomingStockMetafield(variant),incomingStockText=incomingStockMetafield?.incoming_stock||"",incomingStockDate=incomingStockMetafield?.incoming_stock_date||"";if(remainingOutText){const defaultRemainingOutText=remainingOutText.dataset.defaultText||remainingOutText.textContent.trim(),soldOutRemainingText=remainingOutText.dataset.soldOutText||defaultRemainingOutText;incomingStockText&&incomingStockDate?remainingOutText.textContent=`${defaultRemainingOutText} ${incomingStockDate}`:incomingStockText?remainingOutText.textContent=defaultRemainingOutText:remainingOutText.textContent=soldOutRemainingText}(remaining==="out"||remaining<1)&&(this.remainingWrapper.classList.remove(...remainingClasses),this.remainingWrapper.classList.add(classes$U.remainingOut)),(remaining==="in"||remaining>=this.remainingMaxInt)&&(this.remainingWrapper.classList.remove(...remainingClasses),this.remainingWrapper.classList.add(classes$U.remainingIn)),(remaining==="low"||remaining>0&&remaining<this.remainingMaxInt)&&(this.remainingWrapper.classList.remove(...remainingClasses),this.remainingWrapper.classList.add(classes$U.remainingLow),this.remainingCount&&(this.remainingCount.innerHTML=remaining))}else!variant&&this.remainingWrapper&&(this.remainingWrapper.classList.remove(...remainingClasses),this.remainingWrapper.classList.add(classes$U.remainingUnavailable))}checkLiveCartInfo(formState){const variant=(formState||this.productForm.getFormState()).variant;if(!variant)return;const productUrl=`${theme.routes.root}products/${this.productJSON.handle}?section_id=api-live-cart-info&variant=${variant.id}`;fetch(productUrl).then(response=>response.text()).then(data=>{const markup=new DOMParser().parseFromString(data,"text/html"),itemCountForVariant=Number(markup.querySelector(selectors$10.itemCountForVariant).innerHTML),maxInventory=markup.querySelector(selectors$10.maxInventory).innerHTML,maxInventoryCount=Number(maxInventory),addingMoreThanAvailable=this.productForm.quantity()+itemCountForVariant>maxInventoryCount,maxInventoryReached=maxInventory!==""?addingMoreThanAvailable:!1,errorMessagePosition=maxInventory!==""&&itemCountForVariant===maxInventoryCount?"form":"cart";this.productForm.element.setAttribute(attributes$K.maxInventoryReached,maxInventoryReached),this.productForm.element.setAttribute(attributes$K.errorMessagePosition,errorMessagePosition)}).catch(()=>{})}equalizeImageOptionContainers(){if(this.variantOptionImages.length<=1)return;const heights=[...this.variantOptionImages].map(item=>Math.floor(item.offsetHeight)),widths=[...this.variantOptionImages].map(item=>Math.floor(item.offsetWidth)),widest=Math.max(...widths),tallest=Math.max(...heights);this.variantButtonsContainer.style.setProperty("--option-image-width",widest+"px"),this.variantButtonsContainer.style.setProperty("--option-image-height",tallest+"px")}getBaseUnit(variant){return variant.unit_price_measurement.reference_value===1?variant.unit_price_measurement.reference_unit:variant.unit_price_measurement.reference_value+variant.unit_price_measurement.reference_unit}subsToggleListeners(){this.container.querySelectorAll(selectors$10.subsToggle).forEach(toggle=>{toggle.addEventListener("change",function(e){const val=e.target.value.toString(),selected=this.container.querySelector(`[${selectors$10.subsChild}="${val}"]`),groups=this.container.querySelectorAll(`[${selectors$10.subsChild}]`);if(selected){selected.classList.remove(classes$U.hidden);const first=selected.querySelector('[name="selling_plan"]');first.checked=!0,first.dispatchEvent(new Event("change"))}groups.forEach(group=>{group!==selected&&(group.classList.add(classes$U.hidden),group.querySelectorAll('[name="selling_plan"]').forEach(plan=>{plan.checked=!1,plan.dispatchEvent(new Event("change"))}))})}.bind(this))})}updateSaleText(formState){this.productState.planSale?this.updateSaleTextSubscription(formState):this.productState.onSale?this.updateSaleTextStandard(formState):this.priceOffWrap&&this.priceOffWrap.classList.add(classes$U.hidden)}isVariantFinalSale(variant){const metafieldsData=document.querySelector(selectors$10.variantFinalSaleMeta)?.textContent;if(!metafieldsData)return;const variantsMetafields=JSON.parse(metafieldsData);let variantIsFinalSale=!1;return variantsMetafields.forEach(variantMetafield=>{Number(variantMetafield.variant_id)===variant.id&&(variantIsFinalSale=variantMetafield.metafield_value==="true")}),variantIsFinalSale}updateSaleTextStandard(formState){if(!this.priceOffWrap)return;const variant=formState.variant,finalSaleBadge=this.priceOffWrap?.querySelector(selectors$10.finalSaleBadge),comparePrice=variant?.compare_at_price,salePrice=variant?.price;if(window.theme.settings.showSavingBadge)if(window.theme.settings.savingBadgeType&&window.theme.settings.savingBadgeType==="percentage"){const discountFloat=(comparePrice-salePrice)/comparePrice,discountInt=Math.floor(discountFloat*100);this.priceOffAmount.innerHTML=`${discountInt}%`}else{const discount=comparePrice-salePrice;this.priceOffAmount.innerHTML=window.theme.formatMoney(discount,theme.moneyFormat)}const isFinalSale=this.priceOffWrap?.hasAttribute(attributes$K.finalSale)||this.isVariantFinalSale(variant);finalSaleBadge&&finalSaleBadge.classList.toggle(classes$U.hidden,!isFinalSale),this.priceOffWrap.classList.remove(classes$U.hidden)}updateSaleTextSubscription(formState){const variant=formState.variant,variantFirstPlan=this.productForm.product.selling_plan_groups.find(plan=>plan.id===variant.selling_plan_allocations[0].selling_plan_group_id),adjustment=formState.plan?formState.plan.detail.price_adjustments[0]:variantFirstPlan.selling_plans[0].price_adjustments[0],discount=adjustment.value||0,saleText=adjustment.value_type==="percentage"?`${discount}%`:window.theme.formatMoney(variant.price-discount,theme.moneyFormat);this.priceOffAmount.innerHTML=saleText,this.priceOffWrap.classList.remove(classes$U.hidden)}updateSubscriptionText(formState){formState.plan&&this.planDecription&&formState.plan.detail.description!==null?(this.planDecription.innerHTML=formState.plan.detail.description,this.planDecription.classList.remove(classes$U.hidden)):this.planDecription&&this.planDecription.classList.add(classes$U.hidden)}updateProductPrices(formState){const variant=formState.variant,plan=formState.plan;this.container.querySelectorAll(selectors$10.priceWrapper).forEach(wrap=>{const comparePriceEl=wrap.querySelector(selectors$10.comparePrice),productPriceEl=wrap.querySelector(selectors$10.productPrice);let comparePrice="",price="";if(this.productState.available&&(comparePrice=variant.compare_at_price,price=variant.price),this.productState.hasPlan&&(price=plan?plan.allocation.price:variant.selling_plan_allocations[0].per_delivery_price),this.productState.planSale){const allocationPrice=plan?plan.allocation.price:variant.selling_plan_allocations[0].per_delivery_price;comparePrice=plan?plan.allocation.compare_at_price:variant.selling_plan_allocations[0].compare_at_price,price=allocationPrice}if(comparePriceEl&&(this.productState.onSale||this.productState.planSale?(comparePriceEl.classList.remove(classes$U.hidden),productPriceEl.classList.add(classes$U.productPriceSale)):(comparePriceEl.classList.add(classes$U.hidden),productPriceEl.classList.remove(classes$U.productPriceSale)),comparePriceEl.innerHTML=theme.settings.currency_code_enable?window.theme.formatMoney(comparePrice,theme.moneyWithCurrencyFormat):window.theme.formatMoney(comparePrice,theme.moneyFormat)),productPriceEl){if(wrap.hasAttribute(attributes$K.addToCartButton)){const multiplier=this.productForm.quantity();price*=multiplier}price===0?productPriceEl.innerHTML=window.theme.strings.free:productPriceEl.innerHTML=theme.settings.currency_code_enable?window.theme.formatMoney(price,theme.moneyWithCurrencyFormat):window.theme.formatMoney(price,theme.moneyFormat)}}),this.hasUnitPricing&&this.updateProductUnits(formState)}updateProductUnits(formState){const variant=formState.variant,plan=formState.plan;let unitPrice=null;if((variant&&variant.unit_price||!plan&&!variant.requires_selling_plan)&&(unitPrice=variant.unit_price),plan&&plan?.allocation&&plan?.allocation.unit_price&&(unitPrice=plan.allocation.unit_price),!plan&&variant.requires_selling_plan&&variant.selling_plan_allocations&&variant.selling_plan_allocations.length>0&&(unitPrice=variant.selling_plan_allocations[0].unit_price),unitPrice){const base=this.getBaseUnit(variant),formattedPrice=unitPrice===0?window.theme.strings.free:window.theme.formatMoney(unitPrice,theme.moneyFormat);this.container.querySelector(selectors$10.unitPrice).innerHTML=formattedPrice,this.container.querySelector(selectors$10.unitBase).innerHTML=base,showElement(this.container.querySelector(selectors$10.unitWrapper))}else hideElement(this.container.querySelector(selectors$10.unitWrapper))}fireHookEvent(formState){const variant=formState.variant;
12this.container.dispatchEvent(new CustomEvent("theme:variant:change",{detail:{variant},bubbles:!0}))}setProductState(dataset){const variant=dataset.variant,plan=dataset.plan,productState={available:!0,soldOut:!1,onSale:!1,showUnitPrice:!1,requiresPlan:!1,hasPlan:!1,planPerDelivery:!1,planSale:!1};if(!variant)productState.available=!1;else{const requiresPlan=variant.requires_selling_plan||!1;variant.available||(productState.soldOut=!0),variant.compare_at_price>variant.price&&(productState.onSale=!0),variant.unit_price&&(productState.showUnitPrice=!0),this.product&&this.product.requires_selling_plan&&(productState.requiresPlan=!0),plan&&this.subPrices&&(productState.hasPlan=!0,plan.allocation.per_delivery_price!==plan.allocation.price&&(productState.planPerDelivery=!0),variant.price>plan.allocation.price&&(productState.planSale=!0)),!plan&&requiresPlan&&(productState.hasPlan=!0,variant.selling_plan_allocations[0].per_delivery_price!==variant.selling_plan_allocations[0].price&&(productState.planPerDelivery=!0),variant.price>variant.selling_plan_allocations[0].price&&(productState.planSale=!0))}return productState}updateProductImage(evt){const variant=evt.dataset.variant;if(!variant||!variant?.featured_media)return;const newImg=this.container.querySelector(`${selectors$10.productImage}[${attributes$K.productImageId}="${variant.featured_media.id}"]`),newImageParent=newImg?.closest(selectors$10.productSlide);if(newImageParent){const newImagePos=parseInt([...newImageParent.parentElement.children].indexOf(newImageParent)),imgSlider=this.container.querySelector(selectors$10.productMediaSlider),flkty=window.theme.Flickity.data(imgSlider);if(flkty&&flkty.isActive){const variantSlide=imgSlider.querySelector(`[data-id="${variant.featured_media.id}"]`);if(variantSlide){const slideIndex=parseInt([...variantSlide.parentNode.children].indexOf(variantSlide));flkty.select(slideIndex)}return}if(this.tallLayout){const newImgTop=newImg.getBoundingClientRect().top;if(newImagePos===0&&newImgTop+window.scrollY>window.pageYOffset)return;document.dispatchEvent(new CustomEvent("theme:tooltip:close",{bubbles:!1,detail:{hideTransition:!1}})),window.theme.scrollTo(newImgTop)}}}observeSwatch(formState){const swatch=this.swatchesContainer.querySelector(`[${attributes$K.swatchVariant}*="${formState.variant.id}"]`);this.swatchesContainer.closest(selectors$10.selectorWrapper).classList.remove(classes$U.selectorVisible),new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{entry.intersectionRatio==0&&this.swatchesContainer.closest(selectors$10.selectorWrapper).classList.add(classes$U.selectorVisible)})},{root:this.container,threshold:[.95,1]}).observe(swatch)}observeContainer(){let button=this.buyItNow.querySelector(selectors$10.shopifyPaymentButton);if(button){button.classList.add(window.theme.settings.buynowButtonColor),button.classList.add(window.theme.settings.buynowButtonStyle),button.classList.add(window.theme.settings.buynowButtonSize),this.insertHoverElement(button);return}this.mutationObserver=new MutationObserver(mutationList=>{for(const mutation of mutationList)if(mutation.type==="childList"){const button2=mutation.target.querySelector(selectors$10.shopifyPaymentButton);button2&&(this.insertHoverElement(button2),this.mutationObserver?.disconnect(),this.mutationObserver=null)}}),this.mutationObserver.observe(this.buyItNow,{childList:!0,subtree:!0})}insertHoverElement(button){const buttonInner=button.innerHTML;button.innerHTML=`<hover-button>${buttonInner}</hover-button>`}scrollToForm(section){const headerHeight=document.querySelector(selectors$10.header)?.dataset.height;visibilityHelper.isElementPartiallyVisible(section)||visibilityHelper.isElementTotallyVisible(section)||setTimeout(()=>{const sectionTop=section.getBoundingClientRect().top-headerHeight;window.scrollTo({top:sectionTop,left:0,behavior:"smooth"})},400)}onUnload(){this.productForm&&this.productForm.destroy(),this.hasVariantOptionWithImage&&window.removeEventListener("theme:resize:width",this.onResizeCallback),document.removeEventListener("theme:cart:close",this.checkLiveCartInfoCallback)}}const productFormSection={onLoad(){sections$B[this.id]=new ProductAddForm(this.container)},onUnload(){sections$B[this.id].onUnload()}},selectors$$={addToCart:"[data-add-to-cart]",deferredMedia:"[data-deferred-media]",deferredMediaButton:"[data-deferred-media-button]",popupClose:"[data-popup-close]",quickViewInner:"[data-quick-view-inner]",quickViewItemHolder:"[data-quick-view-item-holder]",product:"[data-product]",productForm:"[data-product-form]",productMediaSlider:"[data-product-single-media-slider]",productMediaWrapper:"[data-product-single-media-wrapper]",productModel:"[data-model]",productJSON:"[data-product-json]",quickViewFootInner:"[data-quick-view-foot-inner]",shopTheLookThumb:"[data-shop-the-look-thumb]",tooltip:"[data-tooltip]",drawerToggle:"[data-drawer-toggle]",quickViewFocus:"[data-quick-view-focus]"},classes$T={hasMediaActive:"has-media-active",isActive:"is-active",isLoading:"is-loading",mediaHidden:"media--hidden",noOutline:"no-outline",notificationPopupVisible:"notification-popup-visible",popupQuickViewAnimateIn:"popup-quick-view--animate-in",popupQuickViewAnimateOut:"popup-quick-view--animate-out",popupQuickViewAnimated:"popup-quick-view--animated",popupQuickView:"popup-quick-view",jsQuickViewVisible:"js-quick-view-visible",jsQuickViewFromCart:"js-quick-view-from-cart",drawerOpen:"js-drawer-open"},attributes$J={id:"id",mediaId:"data-media-id",sectionId:"data-section-id",handle:"data-handle",loaded:"loaded",quickViewOnboarding:"data-quick-view-onboarding",hotspot:"data-hotspot",hotspotRef:"data-hotspot-ref"},ids={addToCartFormId:"AddToCartForm--",addToCartId:"AddToCart--"};class LoadQuickview{constructor(popup,pswpElement){this.popup=popup,this.pswpElement=pswpElement,this.quickViewFoot=this.pswpElement.querySelector(selectors$$.quickViewFootInner),this.quickViewInner=this.pswpElement.querySelector(selectors$$.quickViewInner),this.product=this.pswpElement.querySelectorAll(selectors$$.product),this.flkty=[],this.videos=[],this.productForms=[],this.deferredMedias=this.pswpElement.querySelectorAll(selectors$$.deferredMedia),this.buttonsShopTheLookThumb=this.pswpElement.querySelectorAll(selectors$$.shopTheLookThumb),this.quickViewItemHolders=this.pswpElement.querySelectorAll(selectors$$.quickViewItemHolder),this.popupCloseButtons=this.quickViewInner.querySelectorAll(selectors$$.popupClose),this.a11y=window.theme.a11y,this.prevent3dModelSubmitEvent=event=>this.prevent3dModelSubmit(event),this.closeOnAnimationEndEvent=event=>this.closeOnAnimationEnd(event),this.closeOnEscapeEvent=event=>this.closeOnEscape(event),this.outerCloseEvent=event=>
12{if(!this.quickViewInner.contains(event.target)){const drawer2=this.quickViewInner.nextElementSibling;if(drawer2&&drawer2.contains(event.target))return;this.closePopup(event)}},this.product.forEach((item,index)=>{item.hasAttribute(attributes$J.quickViewOnboarding)||this.initItems(item,index)}),this.init(),this.initTooltips(),this.swatchesContainer=new SwatchesContainer(this.pswpElement)}initTooltips(){this.tooltips=this.pswpElement.querySelectorAll(selectors$$.tooltip),this.tooltips.forEach(tooltip2=>{new Tooltip(tooltip2)})}handleDraggable(slider2,draggableStatus){slider2&&(slider2.options.draggable=!!draggableStatus,slider2.updateDraggable())}initItems(item,index){this.addFormSuffix(item),this.initProductSlider(item,index),this.initProductVideo(item),this.initProductModel(item),this.initShopifyXrLaunch(item),makeSwatches(item),this.pswpElement.querySelectorAll(selectors$$.drawerToggle).length&&new Drawer(item),window.theme.wrapElements(item);const productForm=new ProductAddForm(item.parentNode);this.productForms.push(productForm),Shopify.PaymentButton&&Shopify.PaymentButton.init(),item.classList.remove(classes$T.isLoading)}init(){document.addEventListener("submit",this.prevent3dModelSubmitEvent),this.popupCloseButtons.forEach(popupClose=>{popupClose.addEventListener("keyup",event=>{(event.code===theme.keyboardKeys.ENTER||event.code===theme.keyboardKeys.NUMPADENTER||event.code===theme.keyboardKeys.SPACE)&&this.closePopup(event)}),popupClose.addEventListener("click",event=>{this.closePopup(event)})}),this.pswpElement.addEventListener("click",this.outerCloseEvent),document.dispatchEvent(new CustomEvent("theme:popup:open",{bubbles:!0})),this.popup.listen("preventDragEvent",(e,isDown,preventObj)=>{preventObj.prevent=!1}),this.pswpElement.addEventListener("mousedown",()=>{this.popup.framework.unbind(window,"pointermove pointerup pointercancel",this.popup)}),this.popup.listen("initialZoomInEnd",()=>{document.body.classList.add(classes$T.jsQuickViewVisible);const multipleItems=this.quickViewItemHolders.length>0,quickViewFocus=this.quickViewInner.querySelector(selectors$$.quickViewFocus),activeItem=this.quickViewInner.querySelector(`${selectors$$.quickViewItemHolder}.${classes$T.isActive}`),quickView=multipleItems?activeItem.querySelector(selectors$$.quickViewFocus):quickViewFocus;this.a11y.trapFocus({container:quickView})}),this.pswpElement.addEventListener("animationend",this.closeOnAnimationEndEvent),this.popup.listen("destroy",()=>{this.flkty.length>0&&requestAnimationFrame(()=>
12{this.flkty.forEach(slider2=>slider2.pausePlayer())}),document.body.classList.remove(classes$T.jsQuickViewVisible),document.removeEventListener("keyup",this.closeOnEscapeEvent),document.addEventListener("keyup",this.closeOnEscapeEvent),this.pswpElement.removeEventListener("click",this.outerCloseEvent),this.pswpElement.removeEventListener("animationend",this.closeOnAnimationEndEvent),document.removeEventListener("submit",this.prevent3dModelSubmitEvent),this.deferredMedias.forEach(deferredMedia=>{deferredMedia.removeAttribute(attributes$J.loaded);const media=deferredMedia.closest(selectors$$.productMediaWrapper);media.dispatchEvent(new CustomEvent("theme:media:hidden"),{bubbles:!0}),media.classList.add(classes$T.mediaHidden)})}),document.addEventListener("keyup",this.closeOnEscapeEvent),document.addEventListener("theme:cart:added",()=>{this.pswpElement.classList.contains(classes$T.popupQuickView)&&this.pswpElement.classList.add(classes$T.popupQuickViewAnimateOut)}),this.animateInQuickview(),this.initShopTheLookListeners()}initShopTheLookListeners(){this.buttonsShopTheLookThumb?.forEach(button=>{button.addEventListener("click",event=>{event.preventDefault();const thumb=event.target.matches(selectors$$.shopTheLookThumb)?event.target:event.target.closest(selectors$$.shopTheLookThumb),holder=this.pswpElement.querySelector(`[${attributes$J.hotspot}="${thumb.getAttribute(attributes$J.hotspotRef)}"]`),quickView=holder.querySelector(selectors$$.quickViewFocus);thumb.classList.contains(classes$T.isActive)||!holder||(this.flkty.length>0&&requestAnimationFrame(()=>
12{this.flkty.forEach(slider2=>{slider2.resize();const allMediaItems=this.quickViewInner.querySelectorAll(selectors$$.productMediaWrapper);allMediaItems.length&&allMediaItems.forEach(media=>{media.dispatchEvent(new CustomEvent("theme:media:hidden"),{bubbles:!0}),media.classList.add(classes$T.mediaHidden)})})}),holder.classList.add(classes$T.isActive),this.quickViewItemHolders.forEach(element=>{element!==holder&&element.classList.remove(classes$T.isActive)}),this.a11y.trapFocus({container:quickView}))})})}prevent3dModelSubmit(event){event.submitter.closest(selectors$$.deferredMedia)&&event.submitter.closest(selectors$$.productForm)&&event.preventDefault()}closeQuickviewOnMobile(){window.innerWidth<window.theme.sizes.large&&document.body.classList.contains(classes$T.jsQuickViewVisible)&&this.popup.close()}animateInQuickview(){this.pswpElement.classList.add(classes$T.popupQuickViewAnimateIn),this.quickViewFoot.addEventListener("animationend",event=>{this.handleAnimatedState(event)}),this.pswpElement.addEventListener("animationend",event=>{this.handleAnimatedState(event,!0)})}handleAnimatedState(event,isMobileAnimation=!1){if(event.animationName=="quickViewAnimateInUp"){if(isMobileAnimation&&window.innerWidth>=window.theme.sizes.small)return;this.pswpElement.classList.add(classes$T.popupQuickViewAnimated),this.pswpElement.classList.remove(classes$T.popupQuickViewAnimateIn),document.body.classList.remove(classes$T.jsQuickViewFromCart),removeLoadingClassFromLoadedImages(this.pswpElement)}}closePopup(event){event?.preventDefault(),document.body.classList.contains(classes$T.drawerOpen)&&document.dispatchEvent(new CustomEvent("theme:drawer:closing",{bubbles:!0})),this.pswpElement.classList.add(classes$T.popupQuickViewAnimateOut),this.swatchesContainer.onUnload()}closeOnAnimationEnd(event){(event.animationName=="quickViewAnimateOutRight"||event.animationName=="quickViewAnimateOutDown")&&(this.popup.template.classList.remove(classes$T.popupQuickViewAnimateOut,classes$T.popupQuickViewAnimated),this.popup.close(),this.productForms.length>0&&this.productForms.forEach(form=>form.onUnload()))}closeOnEscape(event){const isQuickViewVisible=document.body.classList.contains(classes$T.jsQuickViewVisible),isNotificationVisible=document.body.classList.contains(classes$T.notificationPopupVisible);event.code===theme.keyboardKeys.ESCAPE&&isQuickViewVisible&&!isNotificationVisible&&this.closePopup(event)}initProductSlider(item,index){const slider2=item.querySelector(selectors$$.productMediaSlider),mediaItems=item.querySelectorAll(selectors$$.productMediaWrapper);if(mediaItems.length>1){const itemSlider=new window.theme.Flickity(slider2,{wrapAround:!0,cellAlign:"left",pageDots:!1,prevNextButtons:!0,adaptiveHeight:!1,pauseAutoPlayOnHover:!1,selectedAttraction:.2,friction:1,autoPlay:!1,on:{ready:()=>{requestAnimationFrame(()=>{itemSlider.resize()})},settle:()=>{const mediaId=itemSlider.selectedElement.getAttribute(attributes$J.mediaId);this.switchMedia(item,mediaId)}}});this.flkty.push(itemSlider),mediaItems.length&&mediaItems.forEach(element=>{element.addEventListener("theme:media:play",()=>{this.handleDraggable(this.flkty[index],!1),element.closest(selectors$$.productMediaSlider).classList.add(classes$T.hasMediaActive)}),element.addEventListener("theme:media:pause",()=>{this.handleDraggable(this.flkty[index],!0),element.closest(selectors$$.productMediaSlider).classList.remove(classes$T.hasMediaActive)})}),window.theme.flickitySmoothScrolling(slider2)}}switchMedia(item,mediaId){const allMediaItems=this.quickViewInner.querySelectorAll(selectors$$.productMediaWrapper),selectedMedia=item.querySelector(`${selectors$$.productMediaWrapper}[${attributes$J.mediaId}="${mediaId}"]`),isFocusEnabled=!document.body.classList.contains(classes$T.noOutline);allMediaItems.length&&allMediaItems.forEach(media=>{media.dispatchEvent(new CustomEvent("theme:media:hidden"),{bubbles:!0}),media.classList.add(classes$T.mediaHidden)}),isFocusEnabled&&selectedMedia.focus(),selectedMedia.closest(selectors$$.productMediaSlider).classList.remove(classes$T.hasMediaActive),selectedMedia.classList.remove(classes$T.mediaHidden),selectedMedia.dispatchEvent(new CustomEvent("theme:media:visible"),{bubbles:!0});const deferredMedia=selectedMedia.querySelector(selectors$$.deferredMedia);deferredMedia&&deferredMedia.getAttribute(attributes$J.loaded)!=="true"&&selectedMedia.querySelector(selectors$$.deferredMediaButton).dispatchEvent(new Event("click"))}initProductVideo(item){const videos=new ProductVideo(item);this.videos.push(videos)}initProductModel(item){const sectionId=item.getAttribute(attributes$J.sectionId),modelItems=item.querySelectorAll(selectors$$.productModel);
12modelItems.length&&modelItems.forEach(element=>{theme.ProductModel.init(element,sectionId)})}initShopifyXrLaunch(item){document.addEventListener("shopify_xr_launch",()=>{item.querySelector(`${selectors$$.productModel}:not(.${classes$T.mediaHidden})`).dispatchEvent(new CustomEvent("xrLaunch"))})}addFormSuffix(item){const sectionId=item.getAttribute(attributes$J.sectionId),productObject=JSON.parse(item.querySelector(selectors$$.productJSON).innerHTML),formSuffix=`${sectionId}-${productObject.handle}`,productForm=item.querySelector(selectors$$.productForm),addToCart=item.querySelector(selectors$$.addToCart);productForm.setAttribute(attributes$J.id,ids.addToCartFormId+formSuffix),addToCart.setAttribute(attributes$J.id,ids.addToCartId+formSuffix)}}const settings$6={unlockScrollDelay:400},selectors$_={popupContainer:".pswp",popupCloseBtn:".pswp__custom-close",popupIframe:"iframe, video",popupCustomIframe:".pswp__custom-iframe",popupThumbs:".pswp__thumbs",popupButtons:".pswp__button, .pswp__caption-close",product:"[data-product]",productJSON:"[data-product-json]"},classes$S={current:"is-current",customLoader:"pswp--custom-loader",customOpen:"pswp--custom-opening",loader:"pswp__loader",opened:"pswp--open",popupCloseButton:"pswp__button--close",notificationPopup:"pswp--notification",quickviewPopup:"popup-quick-view",isCartDrawerOpen:"js-drawer-open-cart",quickViewAnimateOut:"popup-quick-view--animate-out"},attributes$I={dataOptionClasses:"data-pswp-option-classes",dataVideoType:"data-video-type"},loaderHTML=`<div class="${classes$S.loader}"><div class="loader loader--image"><div class="loader__image"></div></div></div>`;class LoadPhotoswipe{constructor(items,options2="",templateIndex=0,triggerButton=null){this.items=items,this.triggerBtn=triggerButton,this.pswpElements=document.querySelectorAll(selectors$_.popupContainer),this.pswpElement=this.pswpElements[templateIndex],this.popup=null,this.popupThumbs=null,this.popupThumbsContainer=this.pswpElement.querySelector(selectors$_.popupThumbs),this.closeBtn=this.pswpElement.querySelector(selectors$_.popupCloseBtn);const defaultOptions={history:!1,focus:!1,mainClass:""};this.options=options2!==""?options2:defaultOptions,this.onCloseCallback=()=>this.onClose(),this.dispatchPopupInitEventCallback=()=>this.dispatchPopupInitEvent(),this.setCurrentThumbCallback=()=>this.setCurrentThumb(),this.loadingStateCallback=event=>this.loadingState(event),this.a11y=window.theme.a11y,this.init()}init(){document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0})),this.pswpElement.classList.add(classes$S.customOpen),this.initLoader(),loadScript({url:window.theme.assets.photoswipe}).then(()=>this.loadPopup()).catch(e=>console.error(e))}initLoader(){if(this.pswpElement.classList.contains(classes$S.customLoader)&&this.options!==""&&this.options.mainClass){this.pswpElement.setAttribute(attributes$I.dataOptionClasses,this.options.mainClass);let loaderElem=document.createElement("div");loaderElem.innerHTML=loaderHTML,loaderElem=loaderElem.firstChild,this.pswpElement.appendChild(loaderElem)}else this.pswpElement.setAttribute(attributes$I.dataOptionClasses,"")}loadPopup(){const PhotoSwipe=window.themePhotoswipe.PhotoSwipe.default,PhotoSwipeUI=window.themePhotoswipe.PhotoSwipeUI.default;this.pswpElement.classList.remove(classes$S.customOpen),this.popup=new PhotoSwipe(this.pswpElement,PhotoSwipeUI,this.items,this.options),this.popup.listen("afterInit",this.dispatchPopupInitEventCallback),this.popup.listen("imageLoadComplete",this.setCurrentThumbCallback),this.popup.listen("imageLoadComplete",this.loadingStateCallback),this.popup.listen("beforeChange",this.setCurrentThumbCallback),this.popup.listen("close",this.onCloseCallback),this.popup.init(),this.initPopupCallback()}loadingState(event){event===this.options.index&&this.pswpElement.classList.contains(classes$S.customLoader)&&this.pswpElement.classList.remove(classes$S.customLoader)}initPopupCallback(){this.isVideo&&this.hideUnusedButtons(),this.initVideo(),this.thumbsActions(),this.a11y.trapFocus({container:this.pswpElement}
12),this.pswpElement.classList.contains(classes$S.quickviewPopup)&&new LoadQuickview(this.popup,this.pswpElement),this.pswpElement.classList.contains(classes$S.notificationPopup)&&new LoadNotification(this.popup,this.pswpElement),this.closePopup=()=>{this.pswpElement.classList.contains(classes$S.quickviewPopup)?this.pswpElement.classList.add(classes$S.quickViewAnimateOut):this.popup.close()},this.closeBtn&&this.closeBtn.addEventListener("click",this.closePopup),document.addEventListener("theme:cart:added",this.closePopup)}dispatchPopupInitEvent(){this.triggerBtn&&this.triggerBtn.dispatchEvent(new CustomEvent("theme:popup:init",{bubbles:!0}))}initVideo(){const videoContainer=this.pswpElement.querySelector(selectors$_.popupCustomIframe);if(videoContainer){const videoType=videoContainer.getAttribute(attributes$I.dataVideoType);this.isVideo=!0,videoType=="youtube"?new LoadVideoYT(videoContainer.parentElement):videoType=="vimeo"&&new LoadVideoVimeo(videoContainer.parentElement)}}thumbsActions(){this.popupThumbsContainer&&this.popupThumbsContainer.firstChild&&(this.popupThumbsContainer.addEventListener("wheel",e=>this.stopDisabledScroll(e)),this.popupThumbsContainer.addEventListener("mousewheel",e=>this.stopDisabledScroll(e)),this.popupThumbsContainer.addEventListener("DOMMouseScroll",e=>this.stopDisabledScroll(e)),this.popupThumbs=this.pswpElement.querySelectorAll(`${selectors$_.popupThumbs} > *`),this.popupThumbs.forEach((element,i)=>{element.addEventListener("click",e=>{e.preventDefault(),element.parentElement.querySelector(`.${classes$S.current}`).classList.remove(classes$S.current),element.classList.add(classes$S.current),this.popup.goTo(i)})}))}hideUnusedButtons(){this.pswpElement.querySelectorAll(selectors$_.popupButtons).forEach(element=>{element.classList.contains(classes$S.popupCloseButton)||(element.style.display="none")})}stopDisabledScroll(e){e.stopPropagation()}onClose(){const popupIframe=this.pswpElement.querySelector(selectors$_.popupIframe);if(popupIframe&&popupIframe.parentNode.removeChild(popupIframe),this.popupThumbsContainer&&this.popupThumbsContainer.firstChild)for(;this.popupThumbsContainer.firstChild;)this.popupThumbsContainer.removeChild(this.popupThumbsContainer.firstChild);this.pswpElement.setAttribute(attributes$I.dataOptionClasses,"");const loaderElem=this.pswpElement.querySelector(`.${classes$S.loader}`);loaderElem&&this.pswpElement.removeChild(loaderElem),document.body.classList.contains(classes$S.isCartDrawerOpen)||this.a11y.removeTrapFocus(),document.removeEventListener("theme:cart:added",this.closePopup),setTimeout(()=>{const recentlyOpenedPopups=this.recentlyOpenedPopupsCount(),isCartDrawerOpen=document.body.classList.contains(classes$S.isCartDrawerOpen);recentlyOpenedPopups===0&&!isCartDrawerOpen&&document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))},settings$6.unlockScrollDelay)}recentlyOpenedPopupsCount(){let count=0;return this.pswpElements.forEach(popup=>{popup.classList.contains(classes$S.opened)&&(count+=1)}),count}setCurrentThumb(){if(this.popupThumbsContainer&&this.popupThumbsContainer.firstChild)return;const lastCurrentThumb=this.pswpElement.querySelector(`${selectors$_.popupThumbs} > .${classes$S.current}`);if(lastCurrentThumb&&lastCurrentThumb.classList.remove(classes$S.current),!this.popupThumbs)return;const currentThumb=this.popupThumbs[this.popup.getCurrentIndex()];currentThumb.classList.add(classes$S.current),this.scrollThumbs(currentThumb)}scrollThumbs(currentThumb){const thumbsContainerLeft=this.popupThumbsContainer.scrollLeft,thumbsContainerWidth=this.popupThumbsContainer.offsetWidth,thumbsContainerPos=thumbsContainerLeft+thumbsContainerWidth,currentThumbLeft=currentThumb.offsetLeft,currentThumbWidth=currentThumb.offsetWidth,currentThumbPos=currentThumbLeft+currentThumbWidth;if(thumbsContainerPos<=currentThumbPos||thumbsContainerPos>currentThumbLeft){const currentThumbMarginLeft=parseInt(window.getComputedStyle(currentThumb).marginLeft);this.popupThumbsContainer.scrollTo({top:0,left:currentThumbLeft-currentThumbMarginLeft,behavior:"smooth"})}}}window.theme=window.theme||{},window.theme.LoadPhotoswipe=LoadPhotoswipe;
12const selectors$Z={body:"body",main:"[data-main]",header:"[data-site-header]",preventTransparentHeader:"[data-prevent-transparent-header]"},classes$R={supportsTransparentHeader:"supports-transparent-header"},attributes$H={transparent:"data-transparent"},initTransparentHeader=()=>{const body=document.querySelector(selectors$Z.body),header=body.querySelector(selectors$Z.header);if(!header)return;const headerTransparent=header.getAttribute(attributes$H.transparent)==="true",firstSection=body.querySelector(selectors$Z.main).children[0];if(!firstSection)return;const preventTransparentHeader=firstSection.querySelector(`${selectors$Z.preventTransparentHeader}:first-of-type`);window.isHeaderTransparent=headerTransparent&&firstSection.classList.contains(classes$R.supportsTransparentHeader)&&!preventTransparentHeader},selectors$Y={footerParallax:".section-footer--parallax",footerParallaxInner:"[data-section-type]",wave:":scope > [data-wave]",sectionsWavy:".wavy:not(.site-footer)",sectionsShadow:".parallax-shadow:not(.site-footer)"},classes$Q={wavy:"wavy",shadow:"parallax-shadow",rounded:"parallax-rounded-corners",footerParallax:"section-footer--parallax",bodyRoundedCornersLarge:"body--rounded-corners-large"},attributes$G={parallaxWavy:"data-parallax-wavy"},removeFooterWave=section=>{const currentSection=section,wavySections=document.querySelectorAll(selectors$Y.sectionsWavy),shadowSections=document.querySelectorAll(selectors$Y.sectionsShadow);wavySections.forEach(wavySection=>{wavySection.classList.remove(classes$Q.wavy),[...wavySection.querySelectorAll(selectors$Y.wave)].map(wave=>wave.remove())}),shadowSections.forEach(shadowSection=>{shadowSection.classList.remove(classes$Q.shadow),shadowSection.classList.remove(classes$Q.rounded),document.body.classList.remove(classes$Q.bodyRoundedCornersLarge),[...shadowSection.querySelectorAll(selectors$Y.wave)].map(wave=>wave.remove())});const footerParallax=document.querySelectorAll(selectors$Y.footerParallax);if(footerParallax.length>0){const footerParallaxInner=footerParallax[0].querySelector(selectors$Y.footerParallaxInner);footerParallaxInner.hasAttribute(attributes$G.parallaxWavy)&&footerParallaxInner.classList.add(classes$Q.wavy)}currentSection.classList.contains(classes$Q.footerParallax)||document.dispatchEvent(new CustomEvent("theme:footer:unload"))};window.Shopify=window.Shopify||{},window.Shopify.theme=window.Shopify.theme||{},window.Shopify.theme.sections=window.Shopify.theme.sections||{},window.Shopify.theme.sections.registered=window.Shopify.theme.sections.registered||{},window.Shopify.theme.sections.instances=window.Shopify.theme.sections.instances||[];const registered=window.Shopify.theme.sections.registered,instances=window.Shopify.theme.sections.instances,attributes$F={id:"data-section-id",type:"data-section-type"};class Registration{constructor(type=null,components=[]){this.type=type,this.components=validateComponentsArray(components),this.callStack={onLoad:[],onUnload:[],onSelect:[],onDeselect:[],onBlockSelect:[],onBlockDeselect:[],onReorder:[]},components.forEach(comp=>{for(const[key,value]of Object.entries(comp)){const arr=this.callStack[key];Array.isArray(arr)&&typeof value=="function"?arr.push(value):(console.warn(`Unregisted function: '${key}' in component: '${this.type}'`),console.warn(value))}})}getStack(){return this.callStack}}class Section{constructor(container,registration){this.container=validateContainerElement(container),this.id=container.getAttribute(attributes$F.id),this.type=registration.type,this.callStack=registration.getStack();try{this.onLoad()}catch(e){console.warn(`Error in section: ${this.id}`),console.warn(this),console.warn(e)}}callFunctions(key,e=null){this.callStack[key].forEach(func=>
12{const props={id:this.id,type:this.type,container:this.container};e?func.call(props,e):func.call(props)})}onLoad(){this.callFunctions("onLoad")}onUnload(){this.callFunctions("onUnload")}onSelect(e){this.callFunctions("onSelect",e)}onDeselect(e){this.callFunctions("onDeselect",e)}onBlockSelect(e){this.callFunctions("onBlockSelect",e)}onBlockDeselect(e){this.callFunctions("onBlockDeselect",e)}onReorder(e){this.callFunctions("onReorder",e)}}function validateContainerElement(container){if(!(container instanceof Element))throw new TypeError("Theme Sections: Attempted to load section. The section container provided is not a DOM element.");if(container.getAttribute(attributes$F.id)===null)throw new Error("Theme Sections: The section container provided does not have an id assigned to the "+attributes$F.id+" attribute.");return container}function validateComponentsArray(value){if(typeof value<"u"&&typeof value!="object"||value===null)throw new TypeError("Theme Sections: The components object provided is not a valid");return value}function register(type,components){if(typeof type!="string")throw new TypeError("Theme Sections: The first argument for .register must be a string that specifies the type of the section being registered");if(typeof registered[type]<"u")throw new Error('Theme Sections: A section of type "'+type+'" has already been registered. You cannot register the same section type twice');Array.isArray(components)||(components=[components]);const section=new Registration(type,components);return registered[type]=section,registered}function load(types,containers){types=normalizeType(types),typeof containers>"u"&&(containers=document.querySelectorAll("["+attributes$F.type+"]")),containers=normalizeContainers(containers),types.forEach(function(type){const registration=registered[type];typeof registration>"u"||(containers=containers.filter(function(container){return isInstance(container)||container.getAttribute(attributes$F.type)===null?!1:container.getAttribute(attributes$F.type)!==type?!0:(instances.push(new Section(container,registration)),!1)}))})}function reorder(selector){var instancesToReorder=getInstances(selector);instancesToReorder.forEach(function(instance){instance.onReorder()})}function unload(selector){var instancesToUnload=getInstances(selector);instancesToUnload.forEach(function(instance){var index=instances.map(function(e){return e.id}).indexOf(instance.id);instances.splice(index,1),instance.onUnload()})}function getInstances(selector){var filteredInstances=[];if(NodeList.prototype.isPrototypeOf(selector)||Array.isArray(selector))var firstElement=selector[0];if(selector instanceof Element||firstElement instanceof Element){var containers=normalizeContainers(selector);containers.forEach(function(container){filteredInstances=filteredInstances.concat(instances.filter(function(instance){return instance.container===container}))})}else if(typeof selector=="string"||typeof firstElement=="string"){var types=normalizeType(selector);types.forEach(function(type){filteredInstances=filteredInstances.concat(instances.filter(function(instance){return instance.type===type}))})}return filteredInstances}function getInstanceById(id){for(var instance,i=0;i<instances.length;i++)if(instances[i].id===id){instance=instances[i];break}return instance}function isInstance(selector){return getInstances(selector).length>0}function normalizeType(types){return types==="*"?types=Object.keys(registered):typeof types=="string"?types=[types]:types.constructor===Section?types=[types.prototype.type]:Array.isArray(types)&&types[0].constructor===Section&&(types=types.map(function(Section2){return Section2.type})),types=types.map(function(type){return type.toLowerCase()}),types}function normalizeContainers(containers){return NodeList.prototype.isPrototypeOf(containers)&&containers.length>
120?containers=Array.prototype.slice.call(containers):NodeList.prototype.isPrototypeOf(containers)&&containers.length===0?containers=[]:containers===null?containers=[]:!Array.isArray(containers)&&containers instanceof Element&&(containers=[containers]),containers}window.Shopify.designMode&&(document.addEventListener("shopify:section:load",function(event){var id=event.detail.sectionId,container=event.target.querySelector("["+attributes$F.id+'="'+id+'"]');window.Shopify.visualPreviewMode===!0&&container===null&&(container=event.target.querySelector(`[${attributes$F.id}]`)),container!==null&&load(container.getAttribute(attributes$F.type),container)}),document.addEventListener("shopify:section:reorder",function(event){var id=event.detail.sectionId,container=event.target.querySelector("["+attributes$F.id+'="'+id+'"]'),instance=getInstances(container)[0];typeof instance=="object"&&reorder(container)}),document.addEventListener("shopify:section:unload",function(event){var id=event.detail.sectionId,container=event.target.querySelector("["+attributes$F.id+'="'+id+'"]'),instance=getInstances(container)[0];typeof instance=="object"&&unload(container)}),document.addEventListener("shopify:section:select",function(event){var instance=getInstanceById(event.detail.sectionId);typeof instance=="object"&&instance.onSelect(event)}),document.addEventListener("shopify:section:deselect",function(event){var instance=getInstanceById(event.detail.sectionId);typeof instance=="object"&&instance.onDeselect(event)}),document.addEventListener("shopify:block:select",function(event){var instance=getInstanceById(event.detail.sectionId);typeof instance=="object"&&instance.onBlockSelect(event)}),document.addEventListener("shopify:block:deselect",function(event){var instance=getInstanceById(event.detail.sectionId);typeof instance=="object"&&instance.onBlockDeselect(event)}));const selectors$X={cardScrolling:'[data-parallax="card-scrolling"]'},reloadCardScrolling=()=>{setTimeout(()=>{window.Shopify.theme.sections.instances.filter(instance=>
12{const isSliderSection=instance.type==="slider",isBannerImageSection=instance.type==="banner-image",hasCardScrollingEffect=instance.container.matches(selectors$X.cardScrolling);return isSliderSection&&hasCardScrollingEffect||isBannerImageSection&&hasCardScrollingEffect}).forEach(instance=>{unload(instance.id),setTimeout(()=>load(instance.id))})})},selectors$W={overflowBackground:"[data-overflow-background]",overflowFrame:"[data-overflow-frame]",overflowContent:"[data-overflow-content]",overflowContainer:"[data-overflow-container]",overflowWrapper:"[data-overflow-wrapper]"};function singles(frame,wrappers){let tallest=0;wrappers.forEach(wrap=>{tallest=wrap.offsetHeight>tallest?wrap.offsetHeight:tallest});const images=frame.querySelectorAll(selectors$W.overflowBackground);[frame,...images].forEach(el=>{el.style.setProperty("min-height",`calc(${tallest}px + var(--header-height))`)})}function doubles(section){if(window.innerWidth<window.theme.sizes.small){section.querySelectorAll(selectors$W.overflowFrame).forEach(singleframe=>{const wrappers=singleframe.querySelectorAll(selectors$W.overflowContent);singles(singleframe,wrappers)});return}let tallest=0;const frames=section.querySelectorAll(selectors$W.overflowFrame);section.querySelectorAll(selectors$W.overflowContent).forEach(content=>{content.offsetHeight>tallest&&(tallest=content.offsetHeight)});const images=section.querySelectorAll(selectors$W.overflowBackground);[...frames,...images].forEach(el=>{el.style.setProperty("min-height",`${tallest}px`)}),section.style.setProperty("min-height",`${tallest}px`)}function preventOverflow(container){const singleFrames=container.querySelectorAll(selectors$W.overflowContainer);singleFrames&&singleFrames.forEach(frame=>{const wrappers=frame.querySelectorAll(selectors$W.overflowContent);singles(frame,wrappers),document.addEventListener("theme:resize",()=>{singles(frame,wrappers)})});const doubleSections=container.querySelectorAll(selectors$W.overflowWrapper);doubleSections&&doubleSections.forEach(section=>{doubles(section),document.addEventListener("theme:resize",()=>{doubles(section)})})}window.lastWindowWidth=window.innerWidth;function dispatchResizeEvent(){document.dispatchEvent(new CustomEvent("theme:resize",{bubbles:!0})),window.lastWindowWidth!==window.innerWidth&&(document.dispatchEvent(new CustomEvent("theme:resize:width",{bubbles:!0})),window.lastWindowWidth=window.innerWidth)}function resizeListener(){window.addEventListener("resize",window.theme.debounce(dispatchResizeEvent,50))}let prev=window.pageYOffset,up=null,down=null,wasUp=null,wasDown=null,scrollLockTimer$1=0;const classes$P={quickViewVisible:"js-quick-view-visible",cartDrawerOpen:"js-drawer-open-cart"};function dispatchScrollEvent(){const position=window.pageYOffset;position>prev?(down=!0,up=!1):position<prev?(down=!1,up=!0):(up=null,down=null),prev=position,document.dispatchEvent(new CustomEvent("theme:scroll",{detail:{up,down,position},bubbles:!1})),up&&!wasUp&&document.dispatchEvent(new CustomEvent("theme:scroll:up",{detail:{position},bubbles:!1})),down&&!wasDown&&document.dispatchEvent(new CustomEvent("theme:scroll:down",{detail:{position},bubbles:!1})),wasDown=down,wasUp=up}function lock(e){setTimeout(()=>{scrollLockTimer$1&&clearTimeout(scrollLockTimer$1),scrollLock.disablePageScroll(e.detail,{allowTouchMove:el=>el.tagName==="TEXTAREA"}),document.documentElement.setAttribute("data-scroll-locked","")})}function unlock(e){const timeout=e.detail;timeout?scrollLockTimer$1=setTimeout(removeScrollLock,timeout):removeScrollLock()}function removeScrollLock(){document.body.classList.contains(classes$P.quickViewVisible)||document.body.classList.contains(classes$P.cartDrawerOpen)||(scrollLock.clearQueueScrollLocks(),scrollLock.enablePageScroll(),document.documentElement.removeAttribute("data-scroll-locked"))}function scrollListener(){let timeout;window.addEventListener("scroll",function(){timeout&&window.cancelAnimationFrame(timeout),timeout=window.requestAnimationFrame(function(){dispatchScrollEvent()})},{passive:!0}),window.addEventListener("theme:scroll:lock",lock),window.addEventListener("theme:scroll:unlock",unlock)}function isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function isTouch(){isTouchDevice()?(document.documentElement.className=document.documentElement.className.replace("no-touch","supp
12orts-touch"),window.theme.touch=!0):window.theme.touch=!1}const selectors$V={img:"img",template:"template",shopifySection:".shopify-section",deferredContent:"[data-deferred-content]",reloadSrcsetException:"[data-product-image]"},attributes$E={srcset:"srcset",loaded:"data-loaded",deferredContainer:"data-deferred-container"};class DeferredLoading extends HTMLElement{constructor(){super(),this.container=this,this.hasAttribute(attributes$E.deferredContainer)&&(this.container=this.closest(this.getAttribute(attributes$E.deferredContainer))||this.closest(selectors$V.shopifySection)),this.deferredTriggers=this.container.querySelectorAll(this.dataset.deferredTriggers)}connectedCallback(){if(this.deferredTriggers.length==0){this.container.addEventListener("mouseenter",()=>{this.hasAttribute(attributes$E.loaded)||this.loadTemplate()},{once:!0});return}this.deferredTriggers.forEach(trigger=>{trigger.addEventListener("mouseenter",()=>{this.hasAttribute(attributes$E.loaded)||this.loadTemplate()},{once:!0})})}loadTemplate(){const content=document.createElement("div"),template2=this.querySelector(selectors$V.template);if(!template2||!template2?.content?.firstElementChild)return;content.appendChild(template2.content.firstElementChild.cloneNode(!0));const deferredContent=content.querySelector(selectors$V.deferredContent);if(!deferredContent)return;this.append(deferredContent),this.setAttribute(attributes$E.loaded,!0),deferredContent.querySelectorAll(selectors$V.img).length>0&&this.reloadSrcset(this)}reloadSrcset(container){container&&container.querySelectorAll(selectors$V.img).forEach(img=>{if(!img.parentNode.matches(selectors$V.reloadSrcsetException)){const srcset=img.getAttribute(attributes$E.srcset);img.setAttribute(attributes$E.srcset,""),img.setAttribute(attributes$E.srcset,srcset)}})}}function waitForAnimationEnd(element){return new Promise(resolve=>{function onAnimationEnd(event){event.target==element&&(element.removeEventListener("animationend",onAnimationEnd),element.removeEventListener("transitionend",onAnimationEnd),resolve())}element?.addEventListener("animationend",onAnimationEnd),element?.addEventListener("transitionend",onAnimationEnd)})}const selectors$U={aos:"[data-aos]",link:"[data-has-highlight]",highlightHolder:"[data-highlight-holder]",path:"path",sup:"sup",flickityEnabled:".flickity-enabled",activeSlide:"[data-slide].is-selected",stickyTextItem:"[data-sticky-text]",textCountUp:"text-count-up",textRevealCropper:".text-reveal__cropper"},attributes$D={highlightType:"data-highlight-type",isActive:"data-is-active"},classes$O={isActive:"is-active",overflowHidden:"overflow-hidden"},settings$5={"circle-hand-drawn":{keyframes:[{strokeDashoffset:"1",opacity:"0"},{opacity:"1",offset:.01},{strokeDashoffset:"0",opacity:"1"}],timing:{duration:1e3,delay:0,iterations:1,fill:"forwards",easing:"cubic-bezier(0.7, 0, 0.3, 1)"}},circle:{keyframes:[{strokeDashoffset:"506",opacity:"0"},{opacity:"1",offset:.01},{strokeDashoffset:"0",opacity:"1"}],timing:{duration:800,delay:0,iterations:1,fill:"forwards",easing:"cubic-bezier(0.6, 0, 0.4, 1)"}},highlight:{keyframes:[{transform:"scaleX(0)"},{transform:"scaleX(1)"}],timing:{duration:600,delay:200,iterations:1,fill:"forwards",easing:"ease",pseudoElement:"::before"},keyframesHover:[{transform:"scaleY(0.1)"},{transform:"scaleY(1)"}]},"highlight-color":{keyframes:[{backgroundSize:"200% 100%",backgroundPosition:"100% 0"},{backgroundSize:"200% 100%",backgroundPosition:"0 0",offset:.2},{backgroundSize:"1100% 100%",backgroundPosition:"0 0"}],timing:{duration:2e3,delay:200,iterations:1,fill:"forwards",easing:"cubic-bezier(0, 0, 0.9, 0.4)"}},"alternate-font":{keyframes:[{opacity:"0"},{opacity:"1"}],timing:{duration:400,delay:0,iterations:1,fill:"forwards",easing:"ease-out"},keyframesHover:[{opacity:"1"},{opacity:"0.7"}]},squiggle:{keyframes:[{maskPosition:"100% 0"},{maskPosition:"0 0"}],timing:{duration:1200,delay:200,iterations:1,fill:"forwards",easing:"cubic-bezier(0.6, 0, 0.4, 1)"}},stroke:{keyframes:[{backgroundPosition:"100% 0"},{backgroundPosition:"0 0"}],timing:{duration:1200,delay:0,iterations:1,fill:"forwards",easing:"cubic-bezier(0.25, 0.1, 0.9, 0.3)"}},underline:{keyframes:[{transform:"scaleX(0)"},{transform:"scaleX(1)"}],timing:{duration:900,delay:200,iterations:1,fill:"forwards",easing:"ease",pseudoElement:"::before"}},"underline-hand-drawn":{keyframes:[{strokeDashoffset:"1",opacity:"0"},{opacity:"1",offset:.01},{strokeDashoffset:"0",opacity:"1"}],timing:{duration:1e3,delay:0,iterations:1,fill:"forwards",easing:"cubic-bezier(0.7, 0, 0.3, 1)"}}};class TextHighlight extends HTMLElement{static observedAttributes=[attributes$D.isActive];constructor(){super(),this.animation=null,this.bind=null,this.boundAnimation=null,this.link=this.closest(selectors$U.link),this.type=this.getAttribute(attributes$D.highlightType),this.highlightHolder=this.querySelector(selectors$U.highlightHolder),this.textCountUp=this.closest(selectors$U.textCountUp),this.sup=this.querySelector(selectors$U.sup),this.textRevealCropper=this.closest(selectors$U.textRevealCropper),this.target=this.highlightHolder,(this.type==="circle-hand-drawn"||this.type==="circle"||this.type==="underline-hand-drawn")&&(this.target=this.querySelector(selectors$U.path)),(this.t
12ype==="highlight-color"||this.type==="stroke"||this.type==="alternate-font")&&this.sup&&(this.bind=this.sup)}connectedCallback(){this.timeout=null,this.controller=new AbortController,!(!this.type||!this.target)&&(this.animation=this.target.animate(settings$5[this.type].keyframes,settings$5[this.type].timing),this.animation.pause(),this.bindAnimation("init"),this.bindAnimation("pause"),this.modifyDefaults("slider"),this.animation&&(this.link&&this.listen(),theme.settings.animationsEnabled||(this.animation.play(),this.bindAnimation("play"))))}disconnectedCallback(){this.controller.abort()}attributeChangedCallback(name,oldValue,newValue){const isActiveChange=name===attributes$D.isActive,initialActiveSetting=oldValue===null&&isActiveChange,becomesActive=newValue==="true";isActiveChange&&becomesActive&&!(oldValue==="true"&&newValue==="true")&&this.triggerAnimation(),!initialActiveSetting&&!becomesActive&&this.reset()}triggerAnimation(){const parentAnimation=this.closest(selectors$U.aos);parentAnimation?(this.textRevealCropper?.classList.add(classes$O.overflowHidden),this.textCountUp?(clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.textRevealCropper?.classList.remove(classes$O.overflowHidden),this.setAnimationDelay(0),this.animate()},100)):waitForAnimationEnd(parentAnimation).then(()=>{const delayMs=(window.getComputedStyle(parentAnimation).getPropertyValue("animation-delay")||0).replace("s","")*1e3,setDelay=Math.max(delayMs-250,0);this.textRevealCropper?.classList.remove(classes$O.overflowHidden),this.setAnimationDelay(setDelay),this.animate()})):this.animate()}listen(){this.link.addEventListener("mouseenter",event=>this.onMouseenter(event),{signal:this.controller.signal}),this.link.addEventListener("mouseleave",event=>this.onMouseleave(event),{signal:this.controller.signal})}animate(){this.animation&&(this.animation.play(),this.bindAnimation("play"),this.animation.onfinish=()=>this.onFinish())}shouldAnimate(){requestAnimationFrame(()=>{let shouldAnimate=!0;this.closest(selectors$U.flickityEnabled)&&(shouldAnimate=!!this.closest(selectors$U.activeSlide));const stickyTextItem=this.closest(selectors$U.stickyTextItem);stickyTextItem&&(shouldAnimate=!!stickyTextItem.classList.contains(classes$O.isActive)),this.setTriggerAttribute(shouldAnimate)})}setTriggerAttribute(active=!0){this.setAttribute(attributes$D.isActive,active)}reset(){this.animation&&(this.animation.cancel(),this.bindAnimation("cancel"),this.setAnimationDelay(settings$5[this.type].timing.delay))}onMouseenter(event){event.stopImmediatePropagation(),this.setAnimationDelay(0),this.modifyDefaults("mouseenter"),this.type!=="alternate-font"&&this.animation.reverse(),this.bindAnimation("mouseenter")}onMouseleave(event){event.stopImmediatePropagation(),this.modifyDefaults("mouseleave"),this.type!=="alternate-font"&&this.animation.reverse(),this.bindAnimation("mouseleave")}onFinish(){if(this.hasAttribute(attributes$D.isActive)){const delay=this.getAttribute(attributes$D.isActive)==="true"?0:settings$5[this.type].timing.delay;this.setAnimationDelay(delay);return}this.setAnimationDelay(0)}setAnimationDelay(number=0){this.animation.effect.getTiming().delay!==number&&(this.animation.effect.updateTiming({delay:number}),this.bindAnimation("delay"))}modifyDefaults(usage="mouseenter",animation){if(animation||(animation=this.animation),usage==="mouseenter"){settings$5[this.type].keyframesHover&&animation.effect.setKeyframes(settings$5[this.type].keyframesHover),this.type==="highlight"&&animation.effect.updateTiming({duration:350,fill:"both"}),this.type==="highlight-color"&&animation.effect.updateTiming({duration:800}),this.type==="underline"&&animation.effect.updateTiming({duration:400});return}if(usage==="mouseleave"){settings$5[this.type].keyframesHover&&animation.effect.setKeyframes(settings$5[this.type].keyframes),(this.type==="highlight"||this.type==="highlight-color"||this.type==="underline")&&animation.effect.updateTiming({duration:settings$5[this.type].timing.duration});return}if(usage==="slider"&&(theme.settings.animationsEnabled||(settings$5[this.type].timing.delay=300,animation.effect.updateTiming({delay:settings$5[this.type].timing.delay})),this.closest(selectors$U.flickityEnabled))){const slideshowDelay=settings$5[this.type].timing.delay+200;this.type==="highlight"&&animation.effect.updateTiming({delay:slideshowDelay})}}bindAnimation(event=!1){if(!(!this.bind||!event)&&(event==="init"&&(this.boundAnimation=this.bind.animate(sett
12ings$5[this.type].keyframes,settings$5[this.type].timing)),event==="pause"&&this.boundAnimation.pause(),event==="play"&&this.boundAnimation.play(),event==="cancel"&&this.boundAnimation.cancel(),event==="mouseenter"&&(this.modifyDefaults("mouseenter",this.boundAnimation),this.boundAnimation.reverse()),event==="mouseleave"&&(this.modifyDefaults("mouseleave",this.boundAnimation),this.boundAnimation.reverse()),event==="delay")){const delay=this.animation.effect.getTiming().delay;this.boundAnimation.effect.getTiming().delay!==delay&&this.boundAnimation.effect.updateTiming({delay})}}}const selectors$T={shopifySection:".shopify-section",slider:"[data-slider]",holder:"[data-hover-slideshow-holder]",item:"[data-hover-slideshow-item]",progress:"[data-hover-slideshow-progress]",flickityButton:".flickity-button"},classes$N={fill:"fill"};class HoverSlideshow extends HTMLElement{constructor(){super()}get holder(){return this.querySelector(selectors$T.holder)}get items(){return[...this.querySelectorAll(selectors$T.item)]}get progress(){return this.querySelector(selectors$T.progress)}connectedCallback(){theme.settings.productGridHover==="slideshow"&&!window.theme.touch&&this.init()}init(){this.section=this.closest(selectors$T.shopifySection),this.outerSliders=this.section.querySelectorAll(selectors$T.slider),this.autoplaySpeed=2200,this.timer=0,this.flkty=new window.theme.Flickity.data(this.holder),!this.flkty.isActive&&this.items.length>1&&(this.flkty=new window.theme.Flickity(this.holder,{draggable:!this.outerSliders.length,cellSelector:selectors$T.item,contain:!0,wrapAround:!0,imagesLoaded:!0,pageDots:!1,prevNextButtons:!1,adaptiveHeight:!1,pauseAutoPlayOnHover:!1,selectedAttraction:.2,friction:1,on:{ready:()=>{this.section.style.setProperty("--autoplay-speed",`${this.autoplaySpeed}ms`),setTimeout(()=>this.flkty.resize(),1e3)},change:()=>{this.timer&&clearTimeout(this.timer),this.progress.classList.remove(classes$N.fill),this.progress.offsetWidth,requestAnimationFrame(()=>this.progress.classList.add(classes$N.fill)),this.timer=setTimeout(()=>this.progress.classList.remove(classes$N.fill),this.autoplaySpeed)},dragEnd:()=>{this.flkty.playPlayer()}}}),this.addEventListener("mouseenter",()=>{this.progress.classList.add(classes$N.fill),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>this.progress.classList.remove(classes$N.fill),this.autoplaySpeed),this.flkty.options.autoPlay=this.autoplaySpeed,this.flkty.playPlayer()}),this.addEventListener("mouseleave",()=>{this.flkty.stopPlayer(),this.timer&&clearTimeout(this.timer),this.progress.classList.remove(classes$N.fill)})),this.addEventListener("click",event=>{event.target.matches(selectors$T.flickityButton)&&event.preventDefault()})}}const classes$M={top:"btn--top",right:"btn--right",bottom:"btn--bottom",left:"btn--left",text:"btn--text"};class HoverButtons extends HTMLElement{constructor(){super(),this.button=this.parentElement,this.class="",this.detectEntrySide=this.detectEntrySide.bind(this)}connectedCallback(){this.button.classList.contains(classes$M.text)||this.button.addEventListener("mouseenter",this.detectEntrySide)}detectEntrySide(event){const buttonRect=this.button.getBoundingClientRect();this.class&&this.button.classList.remove(this.class);const x=event.clientX,y=event.clientY,left=buttonRect.left,right=buttonRect.right,top=buttonRect.top,bottom=buttonRect.bottom,distanceFromLeft=x-left,distanceFromRight=right-x,distanceFromTop=y-top,distanceFromBottom=bottom-y;distanceFromLeft<distanceFromRight&&distanceFromLeft<distanceFromTop&&distanceFromLeft<distanceFromBottom?this.class=classes$M.left:distanceFromRight<distanceFromLeft&&distanceFromRight<distanceFromTop&&distanceFromRight<distanceFromBottom?this.class=classes$M.right:distanceFromTop<distanceFromLeft&&distanceFromTop<distanceFromRight&&distanceFromTop<distanceFromBottom?this.class=classes$M.top:this.class=classes$M.bottom,this.button.classList.add(this.class)}disconnectedCallback(){this.button.removeEventListener("mouseenter",this.detectEntrySide)}}const selectors$S={inputSearch:'input[type="search"]',inputType:'input[name="type"]',form:"form",allVisibleElements:'[role="option"]',ariaSelected:'[aria-selected="true"]',selectedOption:'[aria-selected="true"] a, button[aria-selected="true"]',popularSearches:"[data-popular-searches]",popdownBody:"[data-popdown-body]",mainInputSearch:"[data-main-input-search]",predictiveSearchResults:"[data-predictive-search-results]",predictiveSearch:"predictive-search",searchForm:"search-form"},classes$L={isSearched:"is-searched",templateSearch:"template-search"};class SearchForm extends HTMLElement{constructor(){super(),this.input=this.querySelector(selectors$S.inputSearch),this.form=this.querySelector(selectors$S.form),this.popdownBody=this.closest(selectors$S.popdownBody),this.popularSearches=this.popdownBody?.querySelector(selectors$S.popularSearches),this.predictiveSearchResults=this.querySelector(selectors$S.predictiveSearchResults),this.predictiveSearch=this.matches(selectors$S.predictiveSearch),this.searchForm=this.matches(selectors$S.searchForm),this.selectedElement=null,this.activeElement=null,this.searchTerm="",this.currentSearchTerm="",this.isSearchPage=document.body.classList.contains(classe
12s$L.templateSearch),this.input.addEventListener("input",window.theme.debounce(event=>{this.onChange(event)},300).bind(this)),this.input.addEventListener("focus",this.onFocus.bind(this)),this.input.form.addEventListener("submit",this.onFormSubmit.bind(this)),this.addEventListener("keyup",this.onKeyup.bind(this)),this.addEventListener("keydown",this.onKeydown.bind(this)),this.isSearchPage&&(this.mainInputType=document.querySelector(`${selectors$S.mainInputSearch} ${selectors$S.inputType}`),this.inputType=this.querySelector(selectors$S.inputType),this.inputType.value=this.mainInputType.value)}getQuery(){return this.input.value.trim()}onFocus(){this.currentSearchTerm=this.getQuery()}onChange(){this.classList.toggle(classes$L.isSearched,!this.isFormCleared()),this.searchTerm=this.getQuery()}isFormCleared(){return this.input.value.length===0}submit(){this.form.submit()}reset(){this.input.val=""}onFormSubmit(event){(!this.getQuery().length||this.querySelector(selectors$S.selectedLink))&&event.preventDefault()}onKeydown(event){(event.code==="ArrowUp"||event.code==="ArrowDown")&&event.preventDefault()}onKeyup(event){switch(!this.getQuery().length&&this.predictiveSearch&&this.close(!0),event.preventDefault(),event.code){case"ArrowUp":this.switchOption("up");break;case"ArrowDown":this.switchOption("down");break;case"Enter":this.selectOption();break}}switchOption(direction){const moveUp=direction==="up",visibleElementsContainer=this.classList.contains(classes$L.isSearched)&&this.predictiveSearchResults?this.predictiveSearchResults:this.popularSearches;if(!visibleElementsContainer)return;this.selectedElement=visibleElementsContainer.querySelector(selectors$S.ariaSelected);const allVisibleElements=Array.from(visibleElementsContainer.querySelectorAll(selectors$S.allVisibleElements)).filter(element=>element.offsetParent!==null);let activeElementIndex=0;if(moveUp&&!this.selectedElement)return;let selectedElementIndex=-1,i=0;for(;selectedElementIndex===-1&&i<=allVisibleElements.length;)allVisibleElements[i]===this.selectedElement&&(selectedElementIndex=i),i++;!moveUp&&this.selectedElement?activeElementIndex=selectedElementIndex===allVisibleElements.length-1?0:selectedElementIndex+1:moveUp&&(activeElementIndex=selectedElementIndex===0?allVisibleElements.length-1:selectedElementIndex-1),activeElementIndex!==selectedElementIndex&&(this.activeElement=allVisibleElements[activeElementIndex],this.handleFocusableDescendants())}selectOption(){const selectedOption=this.querySelector(selectors$S.selectedOption);selectedOption&&selectedOption.click()}handleFocusableDescendants(reset=!1){const selected=this.selectedElement?this.selectedElement:this.querySelector(selectors$S.ariaSelected);if(selected&&selected.setAttribute("aria-selected",!1),!this.activeElement||reset){this.selectedElement=null,this.activeElement?.setAttribute("aria-selected",!1),this.input.setAttribute("aria-expanded",!1),this.input.setAttribute("aria-activedescendant","");return}this.activeElement.setAttribute("aria-selected",!0),this.input.setAttribute("aria-activedescendant",this.activeElement.id)}}customElements.define("search-form",SearchForm);const selectors$R={predictiveSearch:"predictive-search",sectionPredictiveSearch:"#shopify-section-api-predictive-search",predictiveSearchResults:"[data-predictive-search-results]",predictiveSearchStatus:"[data-predictive-search-status]",searchResultsLiveRegion:"[data-predictive-search-live-region-count-value]",searchResultsWrapper:"[data-search-results-wrapper]"},classes$K={reset:"reset"},attributes$C={aosAnchor:"data-aos-anchor",ariaHidden:"aria-hidden",open:"open",loading:"loading",loadingText:"data-loading-text",results:"results"};class PredictiveSearch extends SearchForm{constructor(){super(),this.abortController=new AbortController,this.allPredictiveSearchInstances=document.querySelectorAll(selectors$R.predictiveSearch),this.predictiveSearchResults=this.querySelector(selectors$R.predictiveSearchResults),this.cachedResults={}}connectedCallback(){this.predictiveSearchResults.addEventListener("transitionend",event=>{event.target===this.predictiveSearchResults&&!this.getQuery().length&&(this.classList.remove(classes$K.reset),requestAnimationFrame(()=>this.clearResultsHTML()))})}onChange(){if(super.onChange(),this.classList.remove(classes$K.reset),
12!this.searchTerm.length){this.classList.add(classes$K.reset);return}requestAnimationFrame(()=>this.getSearchResults(this.searchTerm))}onFocus(){super.onFocus(),this.currentSearchTerm.length&&(this.searchTerm!==this.currentSearchTerm?this.onChange():this.getAttribute(attributes$C.results)==="true"?this.open():this.getSearchResults(this.searchTerm))}getSearchResults(searchTerm){const queryKey=searchTerm.replace(" ","-").toLowerCase(),suggestionsResultsLimit=parseInt(window.theme.settings.suggestionsResultsLimit);let resources="query";if(resources+=window.theme.settings.suggestArticles?",article":"",resources+=window.theme.settings.suggestCollections?",collection":"",resources+=window.theme.settings.suggestProducts?",product":"",resources+=window.theme.settings.suggestPages?",page":"",this.setLiveRegionLoadingState(),this.cachedResults[queryKey]){this.renderSearchResults(this.cachedResults[queryKey]);return}fetch(`${theme.routes.predictiveSearchUrl}?q=${encodeURIComponent(searchTerm)}&resources[type]=${resources}&resources[limit]=${suggestionsResultsLimit}§ion_id=api-predictive-search`,{signal:this.abortController.signal}).then(response=>{if(!response.ok){var error=new Error(response.status);throw this.close(),error}return response.text()}).then(text=>{const resultsMarkup=new DOMParser().parseFromString(text,"text/html").querySelector(selectors$R.sectionPredictiveSearch).innerHTML;this.allPredictiveSearchInstances.forEach(predictiveSearchInstance=>{predictiveSearchInstance.cachedResults[queryKey]=resultsMarkup}),this.renderSearchResults(resultsMarkup)}).catch(error=>{if(error?.code!==20)throw this.close(),error})}switchOption(direction){super.switchOption(direction),this.statusElement&&(this.statusElement.textContent="")}setLiveRegionLoadingState(){this.statusElement=this.statusElement||this.querySelector(selectors$R.predictiveSearchStatus),this.loadingText=this.loadingText||this.getAttribute(attributes$C.loadingText),this.setLiveRegionText(this.loadingText),this.setAttribute(attributes$C.loading,!0)}setLiveRegionText(statusText){this.statusElement.setAttribute(attributes$C.ariaHidden,"false"),this.statusElement.textContent=statusText,setTimeout(()=>{this.statusElement.setAttribute(attributes$C.ariaHidden,"true")},1e3)}renderSearchResults(resultsMarkup){this.predictiveSearchResults.innerHTML=resultsMarkup;const parentId=this.predictiveSearchResults.parentElement.id,el=this.predictiveSearchResults.querySelector(selectors$R.searchResultsWrapper),tempId=el.id;el.id=`${tempId}--${parentId}`,el.setAttribute(attributes$C.aosAnchor,`#${el.id}`),this.setAttribute(attributes$C.results,!0),this.setLiveRegionResults(),this.open()}setLiveRegionResults(){this.removeAttribute(attributes$C.loading),this.setLiveRegionText(this.querySelector(selectors$R.searchResultsLiveRegion).textContent)}open(){this.setAttribute(attributes$C.open,!0)}close(clearSearchTerm=!1){this.closeResults(clearSearchTerm)}closeResults(clearSearchTerm=!1){clearSearchTerm&&(this.reset(),this.removeAttribute(attributes$C.results),this.classList.remove(classes$K.reset)),this.removeAttribute(attributes$C.loading),this.removeAttribute(attributes$C.open)}clearResultsHTML(){this.predictiveSearchResults.innerHTML=""}}customElements.define("predictive-search",PredictiveSearch);class LoadingOverlay extends HTMLElement{constructor(){super(),document.addEventListener("DOMContentLoaded",()=>{document.documentElement.classList.remove("page-loading")})}}const counterUp=(el,options2={})=>{const{action="start",duration=1e3,delay=16}=options2;if(action==="stop"){stopCountUp(el);return}if(stopCountUp(el),!/[0-9]/.test(el.innerHTML))return;const nums=divideNumbers(el.innerHTML,{duration:duration||el.getAttribute("data-duration"),delay:delay||el.getAttribute("data-delay")});el._countUpOrigInnerHTML=el.innerHTML,el.innerHTML=nums[0]||" ",el.style.visibility="visible";const output=function(){el.innerHTML=nums.shift()||" ",nums.length?(clearTimeout(el.countUpTimeout),el.countUpTimeout=setTimeout(output,delay)):el._countUpOrigInnerHTML=void 0};el.countUpTimeout=setTimeout(output,delay)},stopCountUp=el=>{clearTimeout(el.countUpTimeout),el._countUpOrigInnerHTML&&(el.innerHTML=el._countUpOrigInnerHTML,el._countUpOrigInnerHTML=void 0),el.style.visibility=""},divideNumbers=(numToDivide,options2={})=>{const{duration=1e3,delay=16}=options2,divisions=duration/delay,splitValues=numToDivide.toString().split(/(<[^>
12]+>|[0-9.][,.0-9]*[0-9]*)/),nums=[];for(let k=0;k<divisions;k++)nums.push("");for(let i=0;i<splitValues.length;i++)if(/([0-9.][,.0-9]*[0-9]*)/.test(splitValues[i])&&!/<[^>]+>/.test(splitValues[i])){let num=splitValues[i];const symbols=[...num.matchAll(/[.,]/g)].map(m=>({char:m[0],i:num.length-m.index-1})).sort((a,b)=>a.i-b.i);num=num.replace(/[.,]/g,"");let k=nums.length-1;for(let val=divisions;val>=1;val--){let newNum=parseInt(num/divisions*val,10);newNum=symbols.reduce((num2,{char,i:i2})=>num2.length<=i2?num2:num2.slice(0,-i2)+char+num2.slice(-i2),newNum.toString()),nums[k--]+=newNum}}else for(let k=0;k<divisions;k++)nums[k]+=splitValues[i];return nums[nums.length]=numToDivide.toString(),nums},attributes$B={countUpDuration:"data-count-up-duration",countUpInit:"data-count-up-init"};class TextCountUp extends HTMLElement{static observedAttributes=[attributes$B.countUpInit];constructor(){super(),this.container=this,this.countUpDuration=this.getAttribute(attributes$B.countUpDuration),this.duration=1e3*(100/parseInt(this.countUpDuration,10))}connectedCallback(){theme.settings.animationsEnabled||this.startCountUp()}attributeChangedCallback(name,oldValue,newValue){const countUpInitChange=name===attributes$B.countUpInit;oldValue===null&&countUpInitChange&&newValue==="true"&&this.startCountUp()}shouldAnimate(){requestAnimationFrame(()=>this.setTriggerAttribute())}setTriggerAttribute(active=!0){this.setAttribute(attributes$B.countUpInit,active)}startCountUp(){counterUp(this,{duration:this.duration,delay:.016*this.duration})}}window.requestIdleCallback=window.requestIdleCallback||function(cb){var start=Date.now();return setTimeout(function(){cb({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-start))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(id){clearTimeout(id)},resizeListener(),scrollListener(),isTouch(),loadedImagesEventHook();const headerFunctions=window.theme.debounce(()=>{initTransparentHeader()},300);window.addEventListener("DOMContentLoaded",()=>{preventOverflow(document),removeLoadingClassFromLoadedImages(document),window.theme.settings.animationsEnabled&&initAnimations()}),document.addEventListener("shopify:section:load",e=>{const container=e.target;window.dispatchEvent(new Event("resize"),{bubbles:!0}),preventOverflow(container),headerFunctions(),removeFooterWave(container),reloadCardScrolling(),window.theme.settings.animationsEnabled&&initAnimations()}),document.addEventListener("shopify:section:reorder",e=>{const container=e.target;headerFunctions(),removeFooterWave(container),reloadCardScrolling(),window.theme.settings.animationsEnabled&&initAnimations()}),document.addEventListener("shopify:section:unload",e=>{const container=e.target;headerFunctions(),removeFooterWave(container),reloadCardScrolling()}),customElements.get("text-highlight")||customElements.define("text-highlight",TextHighlight),customElements.get("deferred-loading")||customElements.define("deferred-loading",DeferredLoading),customElements.get("loading-overlay")||customElements.define("loading-overlay",LoadingOverlay),customElements.get("text-count-up")||customElements.define("text-count-up",TextCountUp),customElements.get("hover-slideshow")||customElements.define("hover-slideshow",HoverSlideshow),customElements.get("hover-button")||customElements.define("hover-button",HoverButtons),(function(){function n(n2){var i2=window.innerWidth||document.documentElement.clientWidth,r2=window.innerHeight||document.documentElement.clientHeight,t2=n2.getBoundingClientRect();return t2.top>=0&&t2.bottom<=r2&&t2.left>=0&&t2.right<=i2}function t(n2){var i2=window.innerWidth||document.documentElement.clientWidth,r2=window.innerHeight||document.documentElement.clientHeight,t2=n2.getBoundingClientRect(),u=t2.left>=0&&t2.left<=i2||t2.right>=0&&t2.right<=i2,f=t2.top>=0&&t2.top<=r2||t2.bottom>=0&&t2.bottom<=r2;return u&&f}function i(n2,i2){function r2(){var r3=t(n2);r3!=u&&(u=r3,typeof i2=="function"&&i2(r3,n2))}var u=t(n2);window.addEventListener("load",r2),window.addEventListener("resize",r2),window.addEventListener("scroll",r2)}function r(t2,i2){function r2(){var r3=n(t2);r3!=u&&(u=r3,typeof i2=="function"&&i2(r3,t2))}var u=n(t2);window.addEventListener("load",r2),window.addEventListener("resize",r2),window.addEventListener("scroll",r2)}window.visibilityHelper={isElementTotallyVisible:n,isElementPartiallyVisible:t,inViewportPartially:i,inViewportTotally:r}})();function FetchError(object){this.status=object.status||null,this.headers=object.headers||null,this.json=object.json||null,this.body=object.body||null}FetchError.prototype=Error.prototype;const settings$4={cartDrawerEnabled:window.theme.settings.cartType==="drawer",timers:{addProductTimeout:1e3},animations:{data:"data-aos",method:"fade-up"}},selectors$Q={outerSection:"[data-section-id]",aos:"[data-aos]",additionalCheckoutButtons:"[data-additional-checkout-button]",apiContent:"[data-api-content]",apiLineItems:"[data-api-line-items]",apiUpsellItems:"[data-api-upsell-items]",apiCartPrice:"[data-api-cart-price]",buttonAddToCart:"[data-add-to-cart]",upsellButtonByHandle:"[data-handle]",cartCloseError:"[data-cart-error-close]",cartDrawer:"[data-cart-drawer]",cartDrawerTemplate:"[data-cart-drawer-template]",cartDrawerToggle:"[data-cart-drawer-toggle]",cartDrawerBody:"[data-cart-drawer-body]",cartErrors:"[data-cart-errors]",cartForm:"[data-cart-form]",cartTermsCheckbox:"[data-cart-acceptance-checkbox]",cartCheckoutButtonWrapper:"[data-cart-checkout-buttons]",cartCheckoutButton:"[data-cart-checkout-button]",cartItemRemove:"[data-item-remove]",cartItemsQty:"[data-cart-items-qty]",cartTotal:"[data-cart-total]",cartTotalPrice:"[data-cart-total-price]",cartMessage:"[data-cart-message]",cartMessageDefault:"[data-message-default]",cartPage:"[data-cart-page]",cartProgress:"[data-cart-message-progress]",emptyMessage:"[data-empty-message]",emptyMessageBottom:"[data-empty-message-bottom]",buttonHolder:"[data-foot-holder]",item:"[data-cart-item]",itemsHolder:"[data-items-holder]",itemsWrapper:"[data-items-wrapper]",formCloseError:"[data-close-error]",formErrorsContainer:"[data-cart-errors-container]",upsellHolder:"[data-upsell-holder]",errorMessage:"[data-error-message]",termsErrorMessage:"[data-terms-error-message]",pairProductsHolder:"[data-pair-products-holder]",cartNoteHolder:"[data-cart-notes-holder]",pairProducts:"[data-pair-products]",priceHolder:"[data-cart-price-holder]",leftToSpend:"[data-left-to-spend]",quickBuyForm:"[data-quickbuy-form]",qtyInput:"[data-quantity-field]",productItem:"[data-product-block]",productMediaContainer:"[data-product-media-container]",formWrapper:"[data-form-wrapper]",productForm:"[data-product-form], [data-product-form-upsell]",popupQuickView:".popup-quick-view",popupClose:"[data-popup-close]",error:"[data-error]",quickViewOnboarding:"[data-quick-view-onboarding]",flickityEnabled:".flickity-enabled",noscript:"noscript",qtySelect:"[data-quantity-select]",links:"a, button"},classes$J={hidden:"hidden",added:"is-added",isHidden:"is-hidden",cartDrawerOpen:"js-drawer-open-cart",open:"is-open",visible:"is-visible",expanded:"is-expanded",loading:"is-loading",disabled:"is-disabled",success:"is-success",error:"has-error",cartItems:"cart__toggle--has-items",variantSoldOut:"variant--soldout",removed:"is-removed",aosAnimate:"aos-animate",updated:"is-updated",noOutline:"no-outline",productGridImageError:"product-grid-item__image--error",contentVisibilityHidden:"cv-h",isSelected:"is-selected"},attributes$A={shippingMessageLimit:"data-limit",cartMessageValue:"data-cart-message",cartTotal:"data-cart-total",ariaExpanded:"aria-expanded",disabled:"disabled",name:"name",value:"value",dataId:"data-id",item:"data-item",itemIndex:"data-item-index",itemTitle:"data-item-title",atcTrigger:"data-atc-trigger",upsellButton:"data-upsell-btn",notificationPopup:"data-notification-popup",sectionId:"data-section-id",recipientError:"data-recipient-errors",maxInventoryReached:"data-max-inventory-reached",errorMessagePosition:"data-error-message-position",variantTitle:"data-variant-title",qtyMax:"data-quantity-max",tabIndex:"tabindex"};let sections$A={};class CartDrawer{constructor(){window.location.pathname!=="/password"&&this.init()}init(){this.cartToggleButtons=document.querySelectorAll(selectors$Q.cartDrawerToggle),this.cartPage=document.querySelector(selectors$Q.cartPage),this.cartDrawer=document.querySelector(selectors$Q.cartDrawer),this.cart=this.cartDrawer||this.cartPage,this.cartCount=this.getCartItemCount(),this.assignArguments(),this.recipientErrors=this.form?.getAttribute(attributes$A.recipientError)==="true",this.flktyUpsell=null,this.form=null,this.variantTitle=null,this.collapsible=null,this.a11y=window.theme.a11y,this.build=this.build.bind(this),this.addToCart=this.addToCart.bind(this),this.updateCart=this.updateCart.bind(this),this.openCartDrawer=this.openCartDrawer.bind(this),this.closeCartDrawer=this.closeCartDrawer.bind(this),this.toggleCartDrawer=this.toggleCartDrawer.bind(this),this.formSubmitHandler=window.theme.throttle(this.formSubmitHandler.bind(this),50),this.closeCartError=()=>{this.cartErrorHolder.classList.remove(classes$J.expanded)},this.cartDrawerCloseEvent=null,this.hasItemsInCart=this.hasItemsInCart.bind(this),this.isCartPage=!!(this.cart&&this.cartDrawer===null),this.toggleClassesOnContainers=this.toggleClassesOnContainers.bind(this),this.totalItems=0,this.isCartDrawerOpen=!1,this.isCartDrawerLoaded=!1,this.cartDiscounts=0,this.cartDrawerEnabled=settings$4.cartDrawerEnabled,this.cartUpdateFailed=!1,this.showCannotAddMoreInCart=!1,this.cartEvents(),this.cartAddEvent(),this.cartDrawerToggleEvents(),this.initCartUpdate(),this.buttonHolder&&(this.collapsible=new Collapsible(this.buttonHolder)),this.isCartPage&&this.renderPairProducts(),document.addEventListener("theme:popup:open",this.closeCartDrawer)}assignArguments(){this.outerSection=this.cart?.closest(selectors$Q.outerSection),this.cartDrawerBody=document.querySelector(selectors$Q.cartDrawerBody),this.emptyMessage=document.querySelector(selectors$Q.emptyMessage),this.emptyMessageBottom=
12document.querySelector(selectors$Q.emptyMessageBottom),this.buttonHolder=document.querySelector(selectors$Q.buttonHolder),this.itemsHolder=document.querySelector(selectors$Q.itemsHolder),this.cartItemsQty=document.querySelector(selectors$Q.cartItemsQty),this.itemsWrapper=document.querySelector(selectors$Q.itemsWrapper),this.items=document.querySelectorAll(selectors$Q.item),this.cartTotal=document.querySelector(selectors$Q.cartTotal),this.cartTotalPrice=document.querySelector(selectors$Q.cartTotalPrice),this.cartMessage=document.querySelectorAll(selectors$Q.cartMessage),this.cartOriginalTotal=document.querySelector(selectors$Q.cartOriginalTotal),this.cartErrorHolder=document.querySelector(selectors$Q.cartErrors),this.cartCloseErrorMessage=document.querySelector(selectors$Q.cartCloseError),this.pairProductsHolder=document.querySelector(selectors$Q.pairProductsHolder),this.cartNoteHolder=document.querySelector(selectors$Q.cartNoteHolder),this.pairProducts=document.querySelector(selectors$Q.pairProducts),this.priceHolder=document.querySelector(selectors$Q.priceHolder),this.upsellHolders=document.querySelectorAll(selectors$Q.upsellHolder),this.cartTermsCheckbox=document.querySelector(selectors$Q.cartTermsCheckbox),this.cartCheckoutButtonWrapper=document.querySelector(selectors$Q.cartCheckoutButtonWrapper),this.cartCheckoutButton=document.querySelector(selectors$Q.cartCheckoutButton),this.cartForm=document.querySelector(selectors$Q.cartForm),this.cartItemCount=0,this.subtotal=window.theme.subtotal,this.button=null;const{headerInitialHeight,announcementBarHeight}=window.theme.readHeights();this.headerInitialHeight=headerInitialHeight,this.announcementBarHeight=announcementBarHeight,this.cartMessage.length>0&&(this.cartFreeLimitShipping=Number(this.cartMessage[0].getAttribute(attributes$A.shippingMessageLimit))*100*window.Shopify.currency.rate),this.updateProgress()}initCartUpdate(){this.items=document.querySelectorAll(selectors$Q.item),this.items?.forEach(item=>{this.cartUpdateEvent(item)})}cartUpdateEvent(item){item.addEventListener("theme:cart:update",event=>{this.updateCart({id:event.detail.id,quantity:event.detail.quantity},item)})}cartEvents(){const cartItemRemove=document.querySelectorAll(selectors$Q.cartItemRemove);this.totalItems=cartItemRemove.length,cartItemRemove?.forEach(button=>{const item=button.closest(selectors$Q.item);button.addEventListener("click",event=>{event.preventDefault(),!button.classList.contains(classes$J.disabled)&&this.updateCart({id:item.getAttribute(attributes$A.dataId),quantity:0},item)})}),this.cartCloseErrorMessage&&(this.cartCloseErrorMessage.removeEventListener("click",this.closeCartError),this.cartCloseErrorMessage.addEventListener("click",this.closeCartError)),this.cartTermsCheckbox&&(this.cartTermsCheckbox.removeEventListener("change",this.formSubmitHandler),this.cartCheckoutButtonWrapper.removeEventListener("click",this.formSubmitHandler),this.cartForm.removeEventListener("submit",this.formSubmitHandler),this.cartTermsCheckbox.addEventListener("change",this.formSubmitHandler),this.cartCheckoutButtonWrapper.addEventListener("click",this.formSubmitHandler),this.cartForm.addEventListener("submit",this.formSubmitHandler))}cartAddEvent(){document.addEventListener("click",event=>{const clickedElement=event.target,isButtonATC=clickedElement?.matches(selectors$Q.buttonAddToCart),getButtonATC=clickedElement?.closest(selectors$Q.buttonAddToCart);
12if(isButtonATC||getButtonATC){event.preventDefault(),this.button=isButtonATC?clickedElement:getButtonATC,this.form=clickedElement.closest("form"),this.recipientErrors=this.form?.getAttribute(attributes$A.recipientError)==="true",this.formWrapper=this.button.closest(selectors$Q.formWrapper);const isVariantSoldOut=this.formWrapper?.classList.contains(classes$J.variantSoldOut),isButtonDisabled=this.button.hasAttribute(attributes$A.disabled),isQuickViewOnboarding=this.button.closest(selectors$Q.quickViewOnboarding),hasDataAtcTrigger=this.button.hasAttribute(attributes$A.atcTrigger),hasNotificationPopup=this.button.hasAttribute(attributes$A.notificationPopup),hasFileInput=this.form?.querySelector('[type="file"]');if(isButtonDisabled||hasFileInput||isQuickViewOnboarding)return;if(isVariantSoldOut&&hasNotificationPopup){new NotificationPopup(this.button);return}hasDataAtcTrigger&&(this.a11y.state.trigger=this.button);let formData=new FormData(this.form);[...this.form.elements].some(el=>el.closest(selectors$Q.noscript))&&(formData=this.handleFormDataDuplicates([...this.form.elements],formData));const maxInventoryReached=this.form.getAttribute(attributes$A.maxInventoryReached),errorMessagePosition=this.form.getAttribute(attributes$A.errorMessagePosition);this.variantTitle=this.form.getAttribute(attributes$A.variantTitle),this.showCannotAddMoreInCart=!1,maxInventoryReached==="true"&&errorMessagePosition==="cart"&&(this.showCannotAddMoreInCart=!0),this.addToCart(formData),document.dispatchEvent(new CustomEvent("theme:cart:add",{bubbles:!0,detail:{selector:clickedElement}}))}})}handleFormDataDuplicates(elements,formData){return!elements.length||typeof formData!="object"||elements.forEach(element=>{if(element.closest(selectors$Q.noscript)){const key=element.getAttribute(attributes$A.name),value=element.value;
12if(key){const values=formData.getAll(key);values.length>1&&values.splice(values.indexOf(value),1),formData.delete(key),formData.set(key,values[0])}}}),formData}getCart(){this.cartDrawer&&!this.isCartDrawerLoaded&&this.renderCartDrawer(!1),fetch(theme.routes.cart_url+"?section_id=api-cart-items").then(this.handleErrors).then(response=>response.text()).then(response=>{const element=document.createElement("div");element.innerHTML=response;const cleanResponse=element.querySelector(selectors$Q.apiContent);this.build(cleanResponse)}).catch(()=>{})}addToCart(data){this.cartDrawerEnabled&&this.button&&(this.button.classList.add(classes$J.loading),this.button.setAttribute(attributes$A.disabled,!0)),fetch(theme.routes.cart_add_url,{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"},body:data}).then(response=>response.json()).then(response=>{this.button.disabled=!0,this.addLoadingClass(),!(response.status&&(this.addToCartError(response),this.removeLoadingClass(),!this.showCannotAddMoreInCart))&&(this.hideAddToCartErrorMessage(),this.cartDrawerEnabled?(this.getCart(),this.showCannotAddMoreInCart&&this.updateErrorText(this.variantTitle),this.scrollToCartTop()):window.location=theme.routes.cart_url)}).catch(()=>{})}updateCart(updateData={},currentItem=null){let updatedQuantity=updateData.quantity;currentItem!==null&&(updatedQuantity?currentItem.classList.add(classes$J.loading):currentItem.classList.add(classes$J.removed)),this.disableCartButtons(),this.addLoadingClass();const newItem=this.cart.querySelector(`[${attributes$A.item}="${updateData.id}"]`)||currentItem,lineIndex=newItem?.hasAttribute(attributes$A.itemIndex)?parseInt(newItem.getAttribute(attributes$A.itemIndex)):0,itemTitle=newItem?.hasAttribute(attributes$A.itemTitle)?newItem.getAttribute(attributes$A.itemTitle):null;if(lineIndex===0)return;const data={line:lineIndex,quantity:updatedQuantity};fetch(theme.routes.cart_change_url,{method:"post",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(data)}).then(response=>{if(response.status===400){const error=new Error(response.status);throw this.cartDrawerEnabled?this.getCart():window.location=theme.routes.cart_url,error}return response.text()}).then(state=>{if(JSON.parse(state).errors){this.cartUpdateFailed=!0,this.updateErrorText(itemTitle),this.toggleErrorMessage(),this.resetLineItem(currentItem),this.enableCartButtons(),this.removeLoadingClass(),this.scrollToCartTop();return}this.getCart()}).catch(error=>{this.enableCartButtons(),this.removeLoadingClass()})}
12resetLineItem(item){const qtyInput=item.querySelector(selectors$Q.qtyInput),qtySelect=item.querySelector(selectors$Q.qtySelect);let qty=qtyInput.getAttribute(attributes$A.value);const qtyMax=qtyInput.getAttribute(attributes$A.qtyMax);qtyInput&&(qtyInput.value>qtyMax&&(qty=qtyMax),qtyInput.value=qty,qtySelect&&(qtySelect.innerText=qty)),item.classList.remove(classes$J.loading)}disableCartButtons(){const inputs=this.cart.querySelectorAll("input"),buttons=this.cart.querySelectorAll(`button, ${selectors$Q.cartItemRemove}`);inputs.length&&inputs.forEach(item=>{item.classList.add(classes$J.disabled),item.blur(),item.disabled=!0}),buttons.length&&buttons.forEach(item=>{item.setAttribute(attributes$A.disabled,!0)})}enableCartButtons(){const inputs=this.cart.querySelectorAll("input"),buttons=this.cart.querySelectorAll(`button, ${selectors$Q.cartItemRemove}`);inputs.length&&inputs.forEach(item=>{item.classList.remove(classes$J.disabled),item.disabled=!1}),buttons.length&&buttons.forEach(item=>{item.removeAttribute(attributes$A.disabled)})}updateErrorText(itemTitle){this.cartErrorHolder.querySelector(selectors$Q.errorMessage).innerText=itemTitle}toggleErrorMessage(){if(this.cartErrorHolder){if(this.cartErrorHolder.classList.toggle(classes$J.expanded,this.cartUpdateFailed||this.showCannotAddMoreInCart),this.cartUpdateFailed){const cartCloseError=this.cartErrorHolder.querySelector(selectors$Q.cartCloseError);this.focusOnErrorMessage(this.cartErrorHolder,cartCloseError)}this.showCannotAddMoreInCart=!1,this.cartUpdateFailed=!1}}handleErrors(response){return response.ok?response:response.json().then(function(json){throw new FetchError({status:response.statusText,headers:response.headers,json})})}addToCartError(data){const buttonQuickBuyForm=this.button.closest(selectors$Q.quickBuyForm),buttonUpsellHolder=this.button.closest(selectors$Q.upsellHolder),isFocusEnabled=!document.body.classList.contains(classes$J.noOutline);let errorContainer=(this.button.closest(selectors$Q.productForm)?this.button.closest(selectors$Q.productForm):this.button.closest(selectors$Q.upsellHolder)).querySelector(selectors$Q.formErrorsContainer);buttonUpsellHolder&&(errorContainer=buttonUpsellHolder.querySelector(selectors$Q.formErrorsContainer)),this.cartDrawerEnabled&&this.button&&this.button.closest(selectors$Q.cartDrawer)!==null&&!this.button.closest(selectors$Q.cartDrawer)&&this.closeCartDrawer(),this.button.classList.remove(classes$J.loading),this.button.removeAttribute(attributes$A.disabled);const closeErrorButton=buttonQuickBuyForm?"":` 13 <button type="button" class="errors__button-close" data-close-error> 14 ${theme.icons.close} 15 </button> 16 `;let errorMessages=`${data.message}: ${data.description}`;if(data.message===data.description&&(errorMessages=data.message),this.recipientErrors&&data.description&&typeof data.description=="object"&&(errorMessages=Object.entries(data.description).map(([key,value])=>`${value}`).join("<br>")),errorContainer.innerHTML=` 17 <div class="errors" data-error autofocus> 18 ${errorMessages} 19 ${closeErrorButton} 20 </div> 21 `,buttonQuickBuyForm){const productItem=errorContainer.closest(selectors$Q.productItem);if(!productItem)return;const productMediaContainer=productItem.querySelector(selectors$Q.productMediaContainer);if(!productMediaContainer)return;productMediaContainer.classList.add(classes$J.productGridImageError),errorContainer.querySelector(selectors$Q.error).addEventListener("animationend",()=>{productMediaContainer.classList.remove(classes$J.productGridImageError),errorContainer.innerHTML="",isFocusEnabled||document.activeElement.blur()})}else errorContainer.classList.add(classes$J.visible),errorContainer.addEventListener("transitionend",()=>{this.resizeSliders(errorContainer),errorContainer.scrollIntoView({behavior:"smooth",block:"end"})}),this.handleCloseErrorMessages(errorContainer)}handleCloseErrorMessages(container){const formErrorClose=container.querySelector(selectors$Q.formCloseError);formErrorClose?.addEventListener("click",event=>{const clickedElement=event.target;(clickedElement.matches(selectors$Q.formCloseError)||clickedElement.closest(selectors$Q.formCloseError))&&(event.preventDefault(),container.classList.remove(classes$J.visible),container.querySelector(selectors$Q.error).addEventListener("transitionend",()=>{container.innerHTML="",this.resizeSliders(clickedElement)}))}),this.focusOnErrorMessage(container,formErrorClose)}focusOnErrorMessage(container,button){document.body.classList.contains(classe
21s$J.noOutline)||container.addEventListener("transitionend",()=>{requestAnimationFrame(()=>button?.focus({focusVisible:!0}))})}hideAddToCartErrorMessage(){(this.button.closest(selectors$Q.upsellHolder)?this.button.closest(selectors$Q.upsellHolder):this.button.closest(selectors$Q.productForm))?.querySelector(selectors$Q.formErrorsContainer)?.classList.remove(classes$J.visible)}resizeSliders(element){const slider2=element.closest(selectors$Q.flickityEnabled);if(!slider2)return;const flkty=window.theme.Flickity.data(slider2);requestAnimationFrame(()=>flkty.resize())}renderCartDrawer(alwaysOpen=!0){const cartDrawerTemplate=document.querySelector(selectors$Q.cartDrawerTemplate);cartDrawerTemplate&&(this.cartDrawer.innerHTML=cartDrawerTemplate.innerHTML,this.assignArguments(),this.initCartUpdate(),this.cartEvents(),this.cartDrawerBody&&(this.collapsible=new Collapsible(this.cartDrawerBody)),this.cartDrawerToggle=this.cartDrawer.querySelector(selectors$Q.cartDrawerToggle),this.cartDrawerToggle.addEventListener("click",this.cartDrawerToggleClickEvent),this.isCartDrawerLoaded=!0,this.renderPairProducts(),document.dispatchEvent(new CustomEvent("theme:cart:loaded",{bubbles:!0})),alwaysOpen&&this.openCartDrawer())}openCartDrawer(){if(!this.isCartDrawerOpen){if(!this.isCartDrawerLoaded){this.renderCartDrawer();return}document.dispatchEvent(new CustomEvent("theme:cart:open",{bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.cartDrawer})),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.cartDrawerBody})),this.scrollToCartTop(),document.body.classList.add(classes$J.cartDrawerOpen),this.cartDrawer.classList.add(classes$J.open),this.cartDrawer.classList.remove(classes$J.contentVisibilityHidden),requestAnimationFrame(()=>this.animateCartItems("in")),this.cartToggleButtons.forEach(button=>{button.setAttribute(attributes$A.ariaExpanded,!0)}),this.a11y.trapFocus({container:this.cartDrawer}),this.observeAdditionalCheckoutButtons(),this.isCartDrawerOpen=!0}}animateCartItems(state="in"){const items=this.cart.querySelectorAll(selectors$Q.aos);state==="in"&&items.forEach(item=>requestAnimationFrame(()=>item.classList.add(classes$J.aosAnimate))),state==="out"&&items.forEach(item=>item.classList.remove(classes$J.aosAnimate))}closeCartDrawer(){if(!this.isCartDrawerOpen)return;document.dispatchEvent(new CustomEvent("theme:cart:close",{bubbles:!0})),this.cartErrorHolder.classList.remove(classes$J.expanded),this.a11y.removeTrapFocus(),this.cartToggleButtons.forEach(button=>{button.setAttribute(attributes$A.ariaExpanded,!1)}),document.body.classList.remove(classes$J.cartDrawerOpen),this.cartDrawer.classList.remove(classes$J.open),this.itemsHolder.classList.remove(classes$J.updated);const onCartDrawerTransitionEnd=event=>{event.target===this.cartDrawer&&(this.animateCartItems("out"),this.cartDrawer.removeEventListener("transitionend",onCartDrawerTransitionEnd))};this.cartDrawer.addEventListener("transitionend",onCartDrawerTransitionEnd),!document.body.classList.contains(classes$J.noOutline)||requestAnimationFrame(()=>{document.activeElement.blur()});const timeout=400;document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0,detail:timeout})),this.isCartDrawerOpen=!1}toggleCartDrawer(){this.isCartDrawerOpen?this.closeCartDrawer():this.openCartDrawer()}cartDrawerToggleEvents(){this.cartDrawer&&(this.cartDrawer.addEventListener("keyup",event=>{event.code===theme.keyboardKeys.ESCAPE&&this.closeCartDrawer()}),this.cartDrawerToggleClickEvent=event=>{event.preventDefault();const button=event.target;button.getAttribute(attributes$A.ariaExpanded)==="false"&&(this.a11y.state.trigger=button),this.toggleCartDrawer()},this.cartDrawerCloseEvent=event=>{const isCartDrawerToggle=event.target.matches(selectors$Q.cartDrawerToggle),isCartDrawerChild=document.querySelector(selectors$Q.cartDrawer).contains(event.target),isPopupQuickView=event.target.closest(selectors$Q.popupQuickView);!isCartDrawerToggle&&!isCartDrawerChild&&!isPopupQuickView&&this.closeCartDrawer()},this.cartToggleButtons.forEach(button=>{button.addEventListener("click",this.cartDrawerToggleClickEvent)}),document.addEventListener("mousedown",this.cartDrawerCloseEvent))}toggleClassesOnContainers(){const that=this;this.isCartPage?this.buttonHolder.classList.toggle(classes$J.hidden,!that.hasItemsInCart()):(this.pairProductsHolder.classList.toggle(classes$J.hidden,!that.hasItemsInCart()),this.cartForm.classList.toggle(classes$J.hidden,!that.hasItemsInCart()),this.emptyMessageBottom.classList.toggle(classes$J.hidden,that.hasItemsInCart()),this.cartNoteHolder.classList.toggle(classes$J.hidden,!that.hasItemsInCart())),this.emptyMessage.classList.toggle(classes$J.hidden,that.hasItemsInCart()),this.itemsHolder.classList.toggle(classes$J.hidden,!that.hasItemsInCart()),this.cartItemsQty.classList.toggle(classes$J.hidden,!that.hasItemsInCart())}build(data){const cartItemsData=data.querySelector(selectors$Q.apiLineItems),upsellItemsData=data.querySelector(selectors$Q.apiUpsellItems),cartEmptyData=cartItemsData===null&&upsellItemsData===null,priceData=data.querySelector(selectors$Q.apiCartPrice),cartTotal=data.querySelector(selectors$Q.cartTotal);if(this.priceHolder&&priceData&&(this.priceHolder.innerHTML=priceData.innerHTML),this.animateCartItems("out"),cartEmptyData?(this.itemsHolder.innerHTML="",this.pairProductsHolder&&(this.pairProductsHolder.innerHTML="")):(this.itemsHolder.innerHTML=cartItemsData.innerHTML,this.pairProductsHolder&&(this.pairProductsHolder.innerHTML=upsellItemsData.innerHTML),this.renderPairProducts()),this.newTotalItems=cartItemsData&&cartItemsData.querySelectorAll(selectors$Q.item).length?cartItemsData.querySelectorAll(selectors$Q.item).length:0,this.subtotal=cartTotal&&cartTotal.hasAttribute(attributes$A.cartTotal)?parseInt(cartTotal.getAttribute(attributes$A.cartTotal)):0,this.cartCount=this.getCartItemCount(),this.cartMessage.length>0&&this.updateProgress(),this.cartToggleButtons.forEach(button=>{button.classList.remove(classes$J.cartItems),this.newTotalItems>0&&button.classList.add(classes$J.cartItems)}),this.toggleErrorMessage(),this.updateItemsQuantity(this.cartCount),this.cartTotalPrice.innerHTML=this.subtotal===0?window.theme.strings.free:window.theme.formatMoney(this.subtotal,theme.moneyWithCurrencyFormat),this.totalItems!==this.newTotalItems&&(this.totalItems=this.newTotalItems,this.toggleClassesOnContainers()),(this.isCartDrawerOpen||this.isCartPage)&&this.itemsHolder.classList.add(classes$J.updated),this.cartEvents(),this.initCartUpdate(),this.enableCartButtons(),this.resetButtonClasse
21s(),this.removeLoadingClass(),document.dispatchEvent(new CustomEvent("theme:cart:added",{bubbles:!0})),this.cartDrawer){this.openCartDrawer();const onCartDrawerTransitionEnd=event=>{event.target===this.cartDrawer&&(this.animateCartItems("in"),this.cartDrawer.removeEventListener("transitionend",onCartDrawerTransitionEnd))};this.cartDrawer.addEventListener("transitionend",onCartDrawerTransitionEnd)}requestAnimationFrame(()=>this.animateCartItems("in"))}getCartItemCount(){return this.cart?Array.from(this.cart.querySelectorAll(selectors$Q.qtyInput)).reduce((total,quantityInput)=>total+parseInt(quantityInput.value),0):0}hasItemsInCart(){return this.totalItems>0}freeShippingMessageHandle(total){this.cartMessage.length>0&&document.querySelectorAll(selectors$Q.cartMessage).forEach(message=>{const hasFreeShipping=message.hasAttribute(attributes$A.cartMessageValue)&&message.getAttribute(attributes$A.cartMessageValue)==="true"&&total!==0,cartMessageDefault=message.querySelector(selectors$Q.cartMessageDefault);message.classList.toggle(classes$J.success,total>=this.cartFreeLimitShipping&&hasFreeShipping),message.classList.toggle(classes$J.isHidden,total===0),cartMessageDefault&&cartMessageDefault.classList.toggle(classes$J.isHidden,total>=this.cartFreeLimitShipping)})}updateProgress(){const newPercentValue=this.subtotal/this.cartFreeLimitShipping*100;let leftToSpend=window.theme.formatMoney(this.cartFreeLimitShipping-this.subtotal,theme.moneyFormat);(leftToSpend.endsWith(".00")||leftToSpend.endsWith(",00"))&&(leftToSpend=leftToSpend.slice(0,-3)),theme.settings.currency_code_enable&&(leftToSpend+=` ${theme.current_iso_code}`),this.cartMessage.length>0&&document.querySelectorAll(selectors$Q.cartMessage).forEach(message=>{const cartMessageProgressItems=message.querySelectorAll(selectors$Q.cartProgress),leftToSpendMessage=message.querySelector(selectors$Q.leftToSpend);leftToSpendMessage&&(leftToSpendMessage.innerHTML=leftToSpend),cartMessageProgressItems.length&&cartMessageProgressItems.forEach((cartMessageProgress,index)=>{cartMessageProgress.classList.toggle(classes$J.isHidden,this.subtotal/this.cartFreeLimitShipping>=1),cartMessageProgress.style.setProperty("--progress-width",`${newPercentValue}%`),index===0&&cartMessageProgress.setAttribute(attributes$A.value,newPercentValue)}),this.freeShippingMessageHandle(this.subtotal)})}renderPairProducts(){if(this.flktyUpsell=null,this.pairProductsHolder=document.querySelector(selectors$Q.pairProductsHolder),this.pairProducts=document.querySelector(selectors$Q.pairProducts),this.upsellHolders=document.querySelectorAll(selectors$Q.upsellHolder),this.pairProductsHolder===null||this.pairProductsHolder===void 0)return;const that=this;if(this.upsellHolders.length>1){const flktyUpsell=new window.theme.Flickity(this.pairProducts,{wrapAround:!0,pageDots:!0,adaptiveHeight:!0,prevNextButtons:!1,on:{ready:function(){new QuickViewPopup(that.cart),this.reloadCells(),requestAnimationFrame(()=>this.resize()),that.upsellHolders.forEach(item=>{if(!item.classList.contains(classes$J.isSelected)){const links=item.querySelectorAll(selectors$Q.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$A.tabIndex,"-1")})}})}}});flktyUpsell.on("change",index=>{flktyUpsell.cells.forEach((slide,i)=>{const links=slide.element.querySelectorAll(selectors$Q.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$A.tabIndex,i===index?"0":"-1")})})});return}new QuickViewPopup(this.cart)}updateItemsQuantity(itemsQty){let oneItemText=theme.strings.cart_items_one,manyItemsText=theme.strings.cart_items_many;oneItemText=oneItemText.split("}}")[1],manyItemsText=manyItemsText.split("}}")[1],this.cartItemsQty&&(this.cartItemsQty.textContent=itemsQty===1?`${itemsQty} ${oneItemText}`:`${itemsQty} ${manyItemsText}`)}observeAdditionalCheckoutButtons(){const additionalCheckoutButtons=this.cart.querySelector(selectors$Q.additionalCheckoutButtons);if(additionalCheckoutButtons){const observer=new MutationObserver(()=>{this.a11y.removeTrapFocus(),this.a11y.trapFocus({container:this.cart}),observer.disconnect()});observer.observe(additionalCheckoutButtons,{subtree:!0,childList:!0})}}formSubmitHandler(){const termsAccepted=document.querySelector(selectors$Q.cartTermsCheckbox).checked,termsError=document.querySelector(selectors$Q.termsErrorMessage);if(termsAccepted)termsError.classList.remove(classes$J.expanded),this.cartCheckoutButton.removeAttribute(attributes$A.disabled);else{if(document.querySelector(selectors$Q.termsErrorMessage).length>0)return;termsError.innerText=theme.strings.cart_acceptance_error,this.cartCheckoutButton.setAttribute(attributes$A.disabled,!0),termsError.classList.add(classes$J.expanded)}}
21resetButtonClasses(){const buttons=document.querySelectorAll(selectors$Q.buttonAddToCart);buttons&&buttons.forEach(button=>{button.classList.contains(classes$J.loading)&&(button.classList.remove(classes$J.loading),button.classList.add(classes$J.success),setTimeout(()=>{button.removeAttribute(attributes$A.disabled),button.classList.remove(classes$J.success)},settings$4.timers.addProductTimeout))})}addLoadingClass(){this.cartDrawer?this.cartDrawer.classList.add(classes$J.loading):this.itemsWrapper&&this.itemsWrapper.classList.add(classes$J.loading)}removeLoadingClass(){this.cartDrawer?this.cartDrawer.classList.remove(classes$J.loading):this.itemsWrapper&&this.itemsWrapper.classList.remove(classes$J.loading)}scrollToCartTop(){if(this.cartDrawer){this.cartDrawerBody.scrollTo({top:0,left:0,behavior:"instant"});return}window.scrollTo({top:this.outerSection?.offsetTop-this.headerInitialHeight-this.announcementBarHeight,left:0,behavior:"smooth"})}unload(){this.cartDrawerToggle&&this.cartDrawerToggle.removeEventListener("click",this.cartDrawerToggleClickEvent),this.cartToggleButtons.forEach(button=>{button.removeEventListener("click",this.cartDrawerToggleClickEvent)}),document.removeEventListener("mousedown",this.cartDrawerCloseEvent),this.collapsible!==null&&this.collapsible.onUnload()}}const cartDrawer={onLoad(){sections$A[this.id]=new CartDrawer},onUnload(){typeof sections$A[this.id].unload=="function"&§ions$A[this.id].unload()}};function getCartDrawerInstance(){try{if(typeof sections$A=="object"&§ions$A)for(const key in sections$A){const inst=sections$A[key];if(inst&&typeof inst.getCart=="function"&&typeof inst.openCartDrawer=="function")return inst}}catch{}return null}const origOnLoad=cartDrawer.onLoad;cartDrawer.onLoad=function(){origOnLoad.call(this);const inst=sections$A[this.id];window.theme.cartDrawer=inst,document.dispatchEvent(new CustomEvent("cartdrawer:ready",{detail:inst}))},window.theme.cart.getInstance=getCartDrawerInstance,window.theme.cart.refresh=function({openDrawer=!0}={}){const inst=getCartDrawerInstance();if(!inst){console.warn("[Cart] CartDrawer instance not ready yet.");return}if(inst.cartDrawer&&!inst.isCartDrawerLoaded&&openDrawer){inst.renderCartDrawer(!0);return}if(inst.getCart(),openDrawer){const ensureOpen=()=>{try{inst.openCartDrawer()}catch{}};document.addEventListener("theme:cart:added",ensureOpen,{once:!0})}},window.theme.cart.open=()=>window.theme.cart.getInstance()?.openCartDrawer(),window.theme.cart.close=()=>window.theme.cart.getInstance()?.closeCartDrawer(),window.theme.cart.getCart=()=>window.theme.cart.getInstance()?.getCart(),register("cart-template",cartDrawer);const selectors$P={scrollToTop:"[data-scroll-top-button]"},classes$I={isVisible:"is-visible"},scrollTopButton=document.querySelector(selectors$P.scrollToTop);scrollTopButton&&(scrollTopButton.addEventListener("click",()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})}),document.addEventListener("scroll",window.theme.throttle(()=>{scrollTopButton.classList.toggle(classes$I.isVisible,window.pageYOffset>window.innerHeight)},150)));const selectors$O={details:"details",popdownBody:"[data-popdown-body]",popdownClose:"[data-popdown-close]",popdownToggle:"[data-popdown-toggle]",searchFormInner:"[data-search-form-inner]",input:'input:not([type="hidden"])',popularSearchesLink:"[data-popular-searches-link]",header:"[data-site-header]",nav:"[data-nav]",navItemsCompress:"[data-nav-items-compress]",navIcons:"[data-nav-icons]",mobileMenu:"[data-mobile-menu]",predictiveSearch:"predictive-search",searchForm:"search-form"},attributes$z={popdownInHeader:"data-popdown-in-header",popdownInPage:"data-popdown-in-page",searchPerformed:"data-search-performed",ariaActivedescendant:"aria-activedescendant",ariaExpanded:"aria-expanded",open:"open",role:"role"},classes$H={searchOpened:"search-opened",headerMenuOpened:"site-header--menu-opened",headerCompress:"site-header--compress",open:"is-open"};class SearchPopdown extends HTMLElement{constructor(){super(),this.isPopdownInHeader=this.hasAttribute(attributes$z.popdownInHeader),this.isPopdownInPage=this.hasAttribute(attributes$z.popdownInPage),this.popdownBody=this.querySelector(selectors$O.popdownBody),this.popdownClose=this.querySelector(selectors$O.popdownClose),this.searchFormInner=this.querySelector(selectors$O.searchFormInner),this.popularSearchesLink=this.querySelectorAll(selectors$O.popularSearchesLink),this.searchFormWrapper=this.querySelector(selectors$O.searchForm)?this.querySelector(selectors$O.searchForm):this.querySelector(selectors$O.predictiveSearch),this.predictiveSearch=this.searchFormWrapper.matches(selectors$O.predictiveSearch),this.header=document.querySelector(selectors$O.header),this.headerSection=this.header?.parentNode,this.nav=this.header?.querySelector(selectors$O.nav),this.mobileMenu=this.headerSection?.querySelector(selectors$O.mobileMenu),this.a11y=window.theme.a11y,this.ensureClosingOnResizeEvent=()=>this.ensureClosingOnResize(),this.popdownTransitionCallbackEvent=event=>this.popdownTransitionCallback(event),this.detailsToggleCallbackEvent=event=>this.detailsToggleCallback(event),this.isPopdownInHeader&&(this.details=this.querySelector(selectors$O.details),this.popdownToggle=this.querySelector(selectors$O.popdownToggle))}connectedCallback(){this.isPopdownInHeader&&(this.searchFormInner.addEventListener("transitionend",this.popdownTransitionCallbackEvent),this.details.addEventListener("keyup",event=>event.code.toUpperCase()==="ESCAPE"&&this.close()),this.details.addEventListener("toggle",this.detailsToggleCallbackEvent),this.popdownClose.addEventListener("click",event=>this.close(event)),this.popdownToggle.addEventListener("click",event=>this.onPopdownToggleClick(event)),this.popdownToggle.setAttribute(attributes$z.role,"button")),this.isPopdownInPage&&(this.popdownClose.addEventListener("click",()=>this.triggerPopdownClose()),this.searchFormWrapper.addEventListener("focusout",()=>this.onFocusOut()),this.searchFormWrapper.input?.addEventListener("click",event=>this.triggerPopdownOpen(event))),this.popularSearchesLink.forEach(element=>{element.addEventListener("click",event=>{event.preventDefault();const popularSearchText=event.target.textContent;this.searchFormWrapper.input.value=popularSearchText,this.searchFormWrapper.submit()})})}onPopdownToggleClick(event){const isChrome=navigator.userAgent.includes("Chrome"),isIOS=/iPhone|iPad|iPod/i.test(navigator.userAgent);isChrome&&!isIOS&&event.target.closest(selectors$O.details).setAttribute(attributes$z.open,""),event.target.closest(selectors$O.details).hasAttribute(attributes$z.open)&&(event.preventDefault(),this.close())}detailsToggleCallback(event){event.target.hasAttribute(attributes$z.open)&&this.open()}popdownTransitionCallback(event){event.target===this.searchFormInner&&(this.details.classList.contains(classe
21s$H.open)?event.propertyName==="transform"&&this.a11y.trapFocus({container:this.searchFormInner}):this.onClose())}onBodyClick(event){const isTargetInPopdown=this.contains(event.target);this.header?.classList.contains(classes$H.headerMenuOpened)||isTargetInPopdown||isTargetInPopdown||this.close()}onFocusOut(){this.predictiveSearch&&requestAnimationFrame(()=>{this.searchFormWrapper.contains(document.activeElement)||this.searchFormWrapper.close()})}triggerPopdownOpen(event){let isTouch2=matchMedia("(pointer:coarse)").matches;const viewportMobile=window.innerWidth<theme.sizes.small,shouldOpenPopdownOnTouchDevice=isTouch2||viewportMobile;if(viewportMobile&&window.Shopify.designMode&&(isTouch2=!0),!(!this.nav||!this.mobileMenu)&&shouldOpenPopdownOnTouchDevice){event.preventDefault();const isHeaderCompressed=this.header.classList.contains(classes$H.headerCompress);let popdownToggle=this.mobileMenu.querySelector(selectors$O.popdownToggle);isTouch2||(popdownToggle=isHeaderCompressed?this.nav.querySelector(`${selectors$O.navItemsCompress} ${selectors$O.popdownToggle}`):this.nav.querySelector(`${selectors$O.navIcons} ${selectors$O.popdownToggle}`)),setTimeout(()=>{popdownToggle?.dispatchEvent(new Event("click",{bubbles:!0}))},300)}}open(){this.onBodyClickEvent=event=>this.onBodyClick(event),this.searchFormWrapper.input.setAttribute(attributes$z.ariaExpanded,!0),document.body.classList.add(classes$H.searchOpened),document.body.addEventListener("click",this.onBodyClickEvent),document.addEventListener("theme:resize",this.ensureClosingOnResizeEvent),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0})),requestAnimationFrame(()=>{this.details.classList.add(classes$H.open)})}close(event){const ariaActivedescendant=this.searchFormWrapper.input.getAttribute(attributes$z.ariaActivedescendant);event&&event.target===this.popdownClose&&ariaActivedescendant&&ariaActivedescendant!==""||(this.a11y.removeTrapFocus(),this.details.classList.remove(classes$H.open),this.predictiveSearch&&this.searchFormWrapper.close(),this.searchFormWrapper.handleFocusableDescendants(!0))}triggerPopdownClose(){this.predictiveSearch&&this.searchFormWrapper.close(),this.searchFormWrapper.popularSearches&&requestAnimationFrame(()=>document.activeElement.blur())}onClose(){this.details.removeAttribute(attributes$z.open),document.dispatchEvent(new CustomEvent("theme:search:close",{bubbles:!0})),document.body.classList.remove(classes$H.searchOpened),document.body.removeEventListener("click",this.onBodyClickEvent),document.removeEventListener("theme:resize",this.ensureClosingOnResizeEvent),document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))}ensureClosingOnResize(){this.offsetParent===null&&this.onClose()}}customElements.define("search-popdown",SearchPopdown),Shopify.Products=(function(){const config={howManyToShow:4,howManyToStoreInMemory:10,wrapperId:"recently-viewed-products",section:null,onComplete:null};let productHandleQueue=[],wrapper=null,howManyToShowItems=null;const today=new Date,expiresDate=new Date;expiresDate.setTime(today.getTime()+36e5*24*90);const cookie={configuration:{expires:expiresDate.toGMTString(),path:"/",domain:window.location.hostname,sameSite:"none",secure:!0},name:"shopify_recently_viewed",write:function(recentlyViewed){const recentlyViewedString=encodeURIComponent(recentlyViewed.join(" "));document.cookie=`${this.name}=${recentlyViewedString}; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=${this.configuration.domain}; sameSite=${this.configuration.sameSite}; secure=${this.configuration.secure}`},read:function(){let recentlyViewed=[],cookieValue=null;return document.cookie.indexOf("; ")!==-1&&document.cookie.split("; ").find(row=>row.startsWith(this.name))&&(cookieValue=document.cookie.split("; ").find(row=>row.startsWith(this.name)).split("=")[1]),cookieValue!==null&&(recentlyViewed=decodeURIComponent(cookieValue).split(" ")),recentlyViewed},destroy:function(){document.cookie=`${this.name}=null; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=${this.configuration.domain}`},remove:function(productHandle){const recentlyViewed=this.read(),position=recentlyViewed.indexOf(productHandle);position!==-1&&(recentlyViewed.splice(position,1),this.write(recentlyViewed))}},finalize=(wrapper2,section)=>{showElement(wrapper2,!0);const cookieItemsLength=cookie.read().length;if(Shopify.recentlyViewed&&howManyToShowItems&&cookieItemsLength&&cookieItemsLength<howManyToShowItems&&wrapper2.children.length){let allClassesArr=[],addClassesArr=[],objCounter=0;for(const property in Shopify.recentlyViewed){objCounter+=1;const objArr=Shopify.recentlyViewed[property].split(" "),propertyIdx=parseInt(property.split("_")[1]);allClassesArr=[...allClassesArr,...objArr],(cookie.read().length===propertyIdx||objCounter===Object.keys(Shopify.recentlyViewed).length&&!addClassesArr.length)&&(addClassesArr=[...addClassesArr,...objArr])}for(let i=0;i<wrapper2.children.length;i++){const element=wrapper2.children[i];allClassesArr.length&&element.classList.remove(...allClassesArr),addClassesArr.length&&element.classList.add(...addClassesArr)}}if(config.onComplete)try{config.onComplete(wrapper2,section)}catch{}},moveAlong=(shown,productHandleQueue2,wrapper2,section)=>{productHandleQueue2.length&&shown<config.howManyToShow?fetch(`${window.theme.routes.root}products/${productHandleQueue2[0]}?section_id=api-product-grid-item`).then(response=>response.text()).then(product=>{const aosDelay=shown*150,aosAnchor=wrapper2.id?`#${wrapper2.id}`:"",fresh=document.createElement("div");let productReplaced=product;if(productReplaced.includes("data-unpublished")){cookie.remove(productHandleQueue2[0]),productHandleQueue2.shift(),moveAlong(shown,productHandleQueue2,wrapper2,section);return}productReplaced=productReplaced.includes("||itemAosDelay||")?productReplaced.replaceAll("||itemAosDelay||",aosDelay):productReplaced,productReplaced=productReplaced.includes("||itemAosAnchor||")?productReplaced.replaceAll("||itemAosAnchor||",aosAnchor):productReplaced,fresh.innerHTML=productReplaced,wrapper2.innerHTML+=fresh.querySelector("[data-api-content]").innerHTML,productHandleQueue2.shift(),shown++,moveAlong(shown,productHandleQueue2,wrapper2,section)}).catch(()=>{cookie.remove(productHandleQueue2[0]),productHandleQueue2.shift(),moveAlong(shown,productHandleQueue2,wrapper2,section)}):finalize(wrapper2,section)};return{showRecentlyViewed:function(params){const paramsNew=params||{},shown=0;Object.assign(config,paramsNew),productHandleQueue=cookie.read(),wrapper=document.querySelector(`#${config.wrapperId}`),howManyToShowItems=config.howManyToShow,config.howManyToShow=Math.min(productHandleQueue.length,config.howManyToShow),config.howManyToShow&&wrapper&&moveAlong(shown,productHandleQueue,wrapper,config.section)},getConfig:function(){return config},clearList:function(){cookie.destroy()},recordRecentlyViewed:function(params){Object.assign(config,params||{});let recentlyViewed=cookie.read();if(window.location.pathname.indexOf("/products/")!==-1){let productHandle=decodeURIComponent(window.location.pathname).match(/\/products\/([a-z0-9\-]|[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|[\u203B]|[\w\u0430-\u044f]|[\u0400-\u04FF]|[\u0900-\u097F]|[\u0590-\u05FF\u200f\u200e]|[\u0621-\u064A\u0660-\u0669 ])+/)[0].split("/products/")[1];config.handle&&(productHandle=config.handle);const position=recentlyViewed.indexOf(productHandle);position===-1?(recentlyViewed.unshift(productHandle),recentlyViewed=recentlyViewed.splice(0,config.howManyToStoreInMemory)):(recentlyViewed.splice(position,1),recentlyViewed.unshift(productHandle)),cookie.write(recentlyViewed)}},hasProducts:cookie.read().length>0}})();const selectors$N={actions:"[data-actions]",button:"[data-button]",content:"[data-content]",collapsibleContainer:"[data-collapsible-container]"},attributes$y={height:"data-height",ariaExpanded:"aria-expanded"},classes$G={open:"is-open",enabled:"is-enabled"};class ToggleEllipsis extends HTMLElement{constructor(){super(),this.initialHeight=this.getAttribute(attributes$y.height),this.content=this.querySelector(selectors$N.content),this.actions=this.querySelector(selectors$N.actions),this.button=this.querySelector(selectors$N.button),this.toggle=this.toggle.bind(this),this.toggleActions=this.toggleActions.bind(this)}connectedCallback(){this.button.addEventListener("click",this.toggle),this.content.offsetHeight<this.initialHeight?this.setHeight(this.content.offsetHeight):this.setHeight(this.initialHeight),this.toggleActions(),document.addEventListener("theme:resize",this.toggleActionsEvent.bind(this))}
21toggle(){const isExpanded=!this.classList.contains(classes$G.open),expandedHeight=this.content.offsetHeight+this.actions.offsetHeight*2;this.setHeight(isExpanded?expandedHeight:this.initialHeight),this.classList.toggle(classes$G.open,isExpanded),this.updateTabIndex(),this.dispatchEvent(new CustomEvent("theme:ellipsis:toggle",{bubbles:!0,detail:{isExpanded,dropdownHeight:expandedHeight}}))}disconnectedCallback(){document.removeEventListener("theme:resize",this.toggleActions)}setHeight(contentHeight){this.style.setProperty("--height",`${contentHeight}px`)}toggleActions(){this.classList.toggle(classes$G.enabled,this.content.offsetHeight+this.actions.offsetHeight>this.initialHeight),this.updateTabIndex()}toggleActionsEvent(){this.closest(selectors$N.collapsibleContainer).getAttribute(attributes$y.ariaExpanded)==="true"&&this.toggleActions()}updateTabIndex(){const links=this.content.querySelectorAll("a"),toggleActionsHeight=this.actions.offsetHeight;this.observer&&this.observer.disconnect(),this.observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting?entry.target.setAttribute("tabindex","0"):entry.target.setAttribute("tabindex","-1")})},{root:this,threshold:1,rootMargin:`0px 0px -${toggleActionsHeight}px 0px`}),links.forEach(link=>{this.observer.observe(link)})}}customElements.get("toggle-ellipsis")||customElements.define("toggle-ellipsis",ToggleEllipsis);const selectors$M={form:"form",selectorWrapper:"[data-selector-wrapper]",popoutList:"[data-popout-list]",popoutToggle:"[data-popout-toggle]",popoutInput:"[data-popout-input]",popoutOptions:"[data-popout-option]",popoutText:"[data-popout-text]",ariaCurrent:"[aria-current]",productGridImage:"[data-product-image]",productGrid:"[data-product-grid-item]",quickViewItem:"[data-quick-view-item]",quickViewFooter:"[data-quick-view-foot]",cartItem:"[data-cart-item]",popoutQuantity:"[data-quantity-field]",cartDrawer:"[data-cart-drawer]",cartDrawerMessage:"[data-cart-message]",cartDrawerErrors:"[data-cart-errors]",cartDrawerBody:"[data-cart-drawer-body]",cartDrawerItems:"[data-items-holder]"},classes$F={selectorOpen:"selector-wrapper--open",popoutListTop:"select-popout__list--top",listVisible:"select-popout__list--visible",active:"is-active",currentSuffix:"--current",visible:"is-visible",cartItemOpen:"cart__item--open"},attributes$x={ariaCurrent:"aria-current",ariaExpanded:"aria-expanded",dataValue:"data-value",popoutPrevent:"data-popout-prevent",popoutQuantity:"data-quantity-field",quickViewInner:"data-quick-view-inner",quickViewFocus:"data-quick-view-focus",popoutInitialized:"data-popout-initialized",quantityHolder:"data-quantity-holder"};customElements.get("popout-select")||customElements.define("popout-select",class extends HTMLElement{constructor(){super()}connectedCallback(){this.popout=this,this.selectorWrapper=this.popout.closest(selectors$M.selectorWrapper),this.popoutList=this.popout.querySelector(selectors$M.popoutList),this.popoutToggle=this.popout.querySelector(selectors$M.popoutToggle),this.popoutText=this.popout.querySelector(selectors$M.popoutText),this.popoutInput=this.popout.querySelector(selectors$M.popoutInput),this.popoutOptions=this.popout.querySelectorAll(selectors$M.popoutOptions),this.popoutPrevent=this.popout.getAttribute(attributes$x.popoutPrevent)==="true",this.cartItem=this.popout
21List.closest(selectors$M.cartItem),this.popupToggleFocusoutEvent=evt=>this.popupToggleFocusout(evt),this.popupListFocusoutEvent=evt=>this.popupListFocusout(evt),this.popupToggleClickEvent=evt=>this.popupToggleClick(evt),this.popoutKeyupEvent=evt=>this.popoutKeyup(evt),this.popupOptionsClickEvent=evt=>this.popupOptionsClick(evt),this._connectOptionsDispatchEvent=evt=>this._connectOptionsDispatch(evt),this.bodyClick=this.bodyClick.bind(this),this.popoutTop=!1,this._connectOptions(),this._connectToggle(),this._onFocusOut(),this.popupListSetDimensions(),this.toggleListPosition()}popupToggleClick(evt){const ariaExpanded=evt.currentTarget.getAttribute(attributes$x.ariaExpanded)==="true";if(this.popoutList.closest(selectors$M.productGrid)){const productGridItemImage=this.popoutList.closest(selectors$M.productGrid).querySelector(selectors$M.productGridImage);productGridItemImage&&productGridItemImage.classList.toggle(classes$F.visible,!ariaExpanded)}this.cartItem&&this.cartItem.classList.toggle(classes$F.cartItemOpen),evt.currentTarget.setAttribute(attributes$x.ariaExpanded,!ariaExpanded),this.popoutList.classList.toggle(classes$F.listVisible),this.toggleListPosition(),this.popupListSetDimensions()}popupToggleFocusout(evt){const ariaExpanded=this.popoutToggle.getAttribute(attributes$x.ariaExpanded)==="true";if(!evt.relatedTarget)return;const popoutLostFocus=this.popout.contains(evt.relatedTarget),popoutFromQuickView=evt.relatedTarget.hasAttribute(attributes$x.quickViewInner)||evt.relatedTarget.hasAttribute(attributes$x.quickViewFocus);!popoutLostFocus&&!popoutFromQuickView&&ariaExpanded&&this._hideList()}popupListFocusout(evt){const childInFocus=evt.currentTarget.contains(evt.relatedTarget);this.popoutList.classList.contains(classes$F.listVisible)&&!childInFocus&&this._hideList()}calc(get="shouldBeOnTop"){const{headerHeight,stickyHeaderHeight,announcementBarHeight}=window.theme.readHeights(),quickViewItem=this.popout.closest(selectors$M.quickViewItem),cartDrawer2=this.popout.closest(selectors$M.cartDrawer);let popoutTop=Math.floor(this.popout.getBoundingClientRect().top),headerH=headerHeight||0,announcementBarH=0;announcementBarHeight!==0&&window.scrollY<announcementBarHeight&&(announcementBarH=announcementBarHeight),window.scrollY>announcementBarH+headerHeight&&(headerH=stickyHeaderHeight);let availableHeight=window.innerHeight,adjustments=headerH+announcementBarH;if(quickViewItem){const quickViewFooterH=quickViewItem.querySelector(selectors$M.quickViewFooter)?.offsetHeight||0,quickViewOffsetTop=Math.floor(quickViewItem.getBoundingClientRect().top);popoutTop-=quickViewOffsetTop,availableHeight-=quickViewFooterH,adjustments=quickViewOffsetTop,window.theme.isMobile()&&(availableHeight=quickViewItem.offsetHeight-quickViewFooterH)}if(cartDrawer2){const cartDrawerMessage=cartDrawer2.querySelector(selectors$M.cartDrawerMessage),cartDrawerErrors=cartDrawer2.querySelector(selectors$M.cartDrawerErrors),cartDrawerBody=cartDrawer2.querySelector(selectors$M.cartDrawerBody),cartDrawerItems=cartDrawer2.querySelector(selectors$M.cartDrawerItems),cartDrawerMessageH=cartDrawerMessage?.offsetHeight||0,cartDrawerErrorsH=cartDrawerErrors?.offsetHeight||0,cartDrawerBodyH=cartDrawerBody?.scrollHeight||0,cartDrawerItemsOffsetTop=Math.floor(cartDrawerItems?.getBoundingClientRect().top);popoutTop-=cartDrawerItemsOffsetTop,availableHeight=cartDrawerBodyH-cartDrawerMessageH-cartDrawerErrorsH,adjustments=0}let availableHeightTotal=availableHeight-adjustments;if(quickViewItem&&window.theme.isMobile()&&(availableHeightTotal=availableHeight),get==="shouldBeOnTop")return availableHeightTotal/2<popoutTop;if(get==="availableHeightAbove"){const buttonOffsetTop=Math.floor(this.popoutToggle.getBoundingClientRect().top-1);return adjustments+=10,`${parseInt(buttonOffsetTop-adjustments)}px`}if(get==="availableHeightBelow"){const listOffsetTop=Math.floor(this.popout
21List.getBoundingClientRect().top-1);return adjustments=10,`${parseInt(availableHeight-listOffsetTop-adjustments)}px`}}toggleListPosition(){const ariaExpanded=this.popoutToggle.getAttribute(attributes$x.ariaExpanded)==="true",shouldBeOnTop=this.calc("shouldBeOnTop");ariaExpanded&&this.selectorWrapper?.classList.add(classes$F.selectorOpen),shouldBeOnTop?(this.popoutList.classList.add(classes$F.popoutListTop),this.popoutTop=!0):(this.popoutList.classList.remove(classes$F.popoutListTop),this.popoutTop=!1)}popupListSetDimensions(){this.popoutList.style.setProperty("--max-height","100vh"),requestAnimationFrame(()=>{this.popoutTop?this.popoutList.style.setProperty("--max-height",this.calc("availableHeightAbove")):this.popoutList.style.setProperty("--max-height",this.calc("availableHeightBelow"))})}popupOptionsClick(evt){if(evt.target.closest(selectors$M.popoutOptions).attributes.href.value==="#"){evt.preventDefault();let attrValue="";if(evt.currentTarget.getAttribute(attributes$x.dataValue)&&(attrValue=evt.currentTarget.getAttribute(attributes$x.dataValue)),!this.popoutInput&&this.popout.nextSibling.hasAttribute(attributes$x.quantityHolder)&&(this.popoutInput=this.popout.nextSibling.querySelector(selectors$M.popoutQuantity)),this.popoutInput.value=attrValue,this.popoutPrevent){this.popoutInput.dispatchEvent(new Event("change")),this.cartItem&&this.popoutInput.dispatchEvent(new Event("input")),this.switchQuantityInputBehavior(evt.detail.preventTrigger);
21const currentElement=this.popoutList.querySelector(`[class*="${classes$F.currentSuffix}"]`);let targetClass=classes$F.currentSuffix;if(currentElement&¤tElement.classList.length){for(const currentElementClass of currentElement.classList)if(currentElementClass.includes(classes$F.currentSuffix)){targetClass=currentElementClass;break}}const listTargetElement=this.popoutList.querySelector(`.${targetClass}`);listTargetElement&&(listTargetElement.classList.remove(`${targetClass}`),evt.currentTarget.parentElement.classList.add(`${targetClass}`));const targetAttribute=this.popoutList.querySelector(selectors$M.ariaCurrent);targetAttribute&&(targetAttribute.removeAttribute(attributes$x.ariaCurrent),evt.currentTarget.setAttribute(attributes$x.ariaCurrent,"true")),attrValue!==""&&(this.popoutText.textContent=attrValue),this.popupToggleFocusout(evt),this.popupListFocusout(evt)}else this._submitForm(attrValue)}}switchQuantityInputBehavior(prevent=!0){if(prevent||!this.popoutInput.hasAttribute(attributes$x.popoutQuantity))return;
21const targetElement=this.popoutList.querySelector(`[${attributes$x.dataValue}="${this.popoutInput.value}"]`);targetElement&&(targetElement.parentElement.nextSibling||(this.popout.classList.add(classes$F.active),this.selectorWrapper?.classList.remove(classes$F.selectorOpen)))}popoutKeyup(event){event.code===theme.keyboardKeys.ESCAPE&&(this._hideList(),this.popoutToggle.focus())}bodyClick(event){const isOption=this.popout.contains(event.target);this.popoutList.classList.contains(classes$F.listVisible)&&!isOption&&this._hideList()}_connectToggle(){this.popout.setAttribute(attributes$x.popoutInitialized,""),this.popoutToggle.addEventListener("click",this.popupToggleClickEvent)}_connectOptions(){this.popoutOptions.length&&this.popoutOptions.forEach(element=>{element.addEventListener("theme:popout:click",this.popupOptionsClickEvent),element.addEventListener("click",this._connectOptionsDispatchEvent)})}_connectOptionsDispatch(evt){const event=new CustomEvent("theme:popout:click",{cancelable:!0,bubbles:!0,detail:{preventTrigger:!1}});evt.target.dispatchEvent(event)||evt.preventDefault()}_onFocusOut(){this.popoutToggle.addEventListener("focusout",this.popupToggleFocusoutEvent),this.popoutList.addEventListener("focusout",this.popupListFocusoutEvent),this.popout.addEventListener("keyup",this.popoutKeyupEvent),document.body.addEventListener("click",this.bodyClick)}_submitForm(){const form=this.popout.closest(selectors$M.form);form&&form.submit()}_hideList(){this.popoutList.classList.remove(classes$F.listVisible),this.popoutToggle.setAttribute(attributes$x.ariaExpanded,!1),this.toggleListPosition(),this.cartItem&&this.cartItem.classList.remove(classes$F.cartItemOpen)}disconnectedCallback(){this.popoutOptions.length&&this.popoutOptions.forEach(element=>{element.removeEventListener("theme:popout:click",this.popupOptionsClickEvent),element.removeEventListener("click",this._connectOptionsDispatchEvent)}),this.popoutToggle.removeEventListener("click",this.popupToggleClickEvent),this.popoutToggle.removeEventListener("focusout",this.popupToggleFocusoutEvent),this.popoutList.removeEventListener("focusout",this.popupListFocusoutEvent),this.popout.removeEventListener("keyup",this.popoutKeyupEvent),document.body.removeEventListener("click",this.bodyClick)}});const selectors$L={quantityHolder:"[data-quantity-holder]",quantityField:"[data-quantity-field]",quantityButton:"[data-quantity-button]",quantityMinusButton:"[data-quantity-minus]",quantityPlusButton:"[data-quantity-plus]",cartItem:"[data-cart-item]"},classes$E={quantityReadOnly:"read-only",isDisabled:"is-disabled"};customElements.get("quantity-counter")||customElements.define("quantity-counter",class extends HTMLElement{constructor(){super()}connectedCallback(){this.quantity=this,this.cartItem=this.quantity.closest(selectors$L.cartItem),this.quantity&&(this.field=this.quantity.querySelector(selectors$L.quantityField),this.buttons=this.quantity.querySelectorAll(selectors$L.quantityButton),this.increaseButton=this.quantity.querySelector(selectors$L.quantityPlusButton),this.quantityValue=Number(this.field.value||0),this.cartItemID=this.field.getAttribute("data-id"),this.maxValue=Number(this.field.getAttribute("max"))>0?Number(this.field.getAttribute("max")):null,this.minValue=Number(this.field.getAttribute("min"))>0?Number(this.field.getAttribute("min")):0,this.disableIncrease=this.disableIncrease.bind(this),this.emptyField=!1,this.updateQuantity=this.updateQuantity.bind(this),this.decrease=this.decrease.bind(this),this.increase=this.increase.bind(this),this.disableIncrease(),this.quantity.classList.contains(classes$E.quantityReadOnly)||(this.changeValueOnClick(),this.changeValueOnInput()))}changeValueOnClick(){this.buttons.forEach(element=>{element.addEventListener("click",event=>{event.preventDefault(),this.quantityValue=Number(this.field.value||0);const clickedElement=event.target,isDescrease=clickedElement.matches(selectors$L.quantityMinusButton)||clickedElement.closest(selectors$L.quantityMinusButton),isIncrease=clickedElement.matches(selectors$L.quantityPlusButton)||clickedElement.closest(selectors$L.quantityPlus
21Button);isDescrease&&this.decrease(),isIncrease&&this.increase(),this.updateQuantity()})})}changeValueOnInput(){this.field.addEventListener("input",()=>{this.quantityValue=this.field.value,this.updateQuantity()})}updateQuantity(){this.maxValue<this.quantityValue&&this.maxValue!==null&&(this.quantityValue=this.maxValue),this.minValue>this.quantityValue&&(this.quantityValue=this.minValue),this.field.value=this.quantityValue,this.disableIncrease(),this.cartItem?(document.dispatchEvent(new CustomEvent("theme:cart:update")),this.updateCart()):this.triggerInputChange()}decrease(){if(this.quantityValue>this.minValue){this.quantityValue--;return}this.quantityValue=0}increase(){this.quantityValue++}disableIncrease(){this.increaseButton.classList.toggle(classes$E.isDisabled,this.quantityValue>=this.maxValue&&this.maxValue!==null)}updateCart(){if(this.quantityValue==="")return;const event=new CustomEvent("theme:cart:update",{bubbles:!0,detail:{id:this.cartItemID,quantity:this.quantityValue}});this.cartItem&&this.cartItem.dispatchEvent(event)}triggerInputChange(){this.field.dispatchEvent(new Event("change"))}}),window.theme.flickitySmoothScrolling=function(slider2){const flkty=window.theme.Flickity.data(slider2);flkty&&(flkty.on("dragStart",(event,pointer)=>{document.ontouchmove=function(e){e.preventDefault()}}),flkty.on("dragEnd",(event,pointer)=>{document.ontouchmove=function(e){return!0}}))},theme.ProductModel=(function(){let modelJsonSections={},models={},xrButtons={};const selectors2={productMediaWrapper:"[data-product-single-media-wrapper]",mediaGroup:"[data-product-single-media-group]",productXr:"[data-shopify-xr]",mediaId:"data-media-id",model3d:"data-shopify-model3d-id",modelViewer:"model-viewer",modelJson:"#ModelJson-",deferredMedia:"[data-deferred-media]",deferredMediaButton:"[data-deferred-media-button]"},classes2={isLoading:"is-loading",mediaHidden:"media--hidden"};function init(mediaContainer,sectionId){modelJsonSections[sectionId]={loaded:!1};const deferredMediaButton=mediaContainer.querySelector(selectors2.deferredMediaButton);deferredMediaButton&&deferredMediaButton.addEventListener("click",loadContent.bind(this,mediaContainer,sectionId))}function loadContent(mediaContainer,sectionId){if(mediaContainer.querySelector(selectors2.deferredMedia).getAttribute("loaded"))return;mediaContainer.classList.add(classes2.isLoading);const content=document.createElement("div");content.appendChild(mediaContainer.querySelector("template").content.firstElementChild.cloneNode(!0));const modelViewerElement=content.querySelector("model-viewer"),deferredMedia=mediaContainer.querySelector(selectors2.deferredMedia);deferredMedia.appendChild(modelViewerElement),deferredMedia.setAttribute("loaded",!0);const mediaId=mediaContainer.dataset.mediaId,modelId=modelViewerElement.dataset.modelId,xrButton=mediaContainer.closest(selectors2.mediaGroup).parentElement.querySelector(selectors2.productXr);xrButtons[sectionId]={element:xrButton,defaultId:modelId},models[mediaId]={modelId,mediaId,sectionId,container:mediaContainer,element:modelViewerElement},window.ShopifyXR?setupModelViewerUi():window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:setupShopifyXr},{name:"model-viewer-ui",version:"1.0",onLoad:setupModelViewerUi}])}function setupShopifyXr(errors){if(errors){console.warn(errors);return}if(!window.ShopifyXR){document.addEventListener("shopify_xr_initialized",function(){setupShopifyXr()});return}for(const sectionId in modelJsonSections)if(modelJsonSections.hasOwnProperty(sectionId)){const modelSection=modelJsonSections[sectionId];if(modelSection.loaded)continue;const modelJson=document.querySelector(`${selectors2.modelJson}${sectionId}`);modelJson&&(window.ShopifyXR.addModels(JSON.parse(modelJson.innerHTML)),modelSection.loaded=!0)}window.ShopifyXR.setupXRElements()}function setupModelViewerUi(errors){if(errors){console.warn(errors);return}for(const key in models)if(models.hasOwnProperty(key)){const model=models[key];model.modelViewerUi||(model.modelViewerUi=new Shopify.ModelViewerUI(model.element),setupModelViewerListeners(model))}}function setupModelViewerListeners(model){const xrButton=xrButtons[model.sectionId];model.container.addEventListener("theme:media:visible",function(){xrButton.element.setAttribute(selectors2.model3d,model.modelId),!window.theme.touch&&(model.modelViewerUi.play(),model.container.dis
21patchEvent(new CustomEvent("theme:media:play"),{bubbles:!0}))}),model.container.addEventListener("theme:media:hidden",function(){model.modelViewerUi.pause()}),model.container.addEventListener("xrLaunch",function(){model.modelViewerUi.pause()}),model.element.addEventListener("load",()=>{xrButton.element.setAttribute(selectors2.model3d,model.modelId),model.container.classList.remove(classes2.isLoading),model.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0})}),model.element.addEventListener("shopify_model_viewer_ui_toggle_play",function(){pauseOtherMedia(model.mediaId),setTimeout(()=>{model.container.dispatchEvent(new CustomEvent("theme:media:play"),{bubbles:!0})},50)}),model.element.addEventListener("shopify_model_viewer_ui_toggle_pause",function(){model.container.dispatchEvent(new CustomEvent("theme:media:pause"),{bubbles:!0})}),pauseOtherMedia(model.mediaId)}function pauseOtherMedia(mediaId){const currentMedia=`[${selectors2.mediaId}="${mediaId}"]`,otherMedia=document.querySelectorAll(`${selectors2.productMediaWrapper}:not(${currentMedia})`);otherMedia.length&&otherMedia.forEach(media=>{media.dispatchEvent(new CustomEvent("theme:media:hidden"),{bubbles:!0}),media.classList.add(classes2.mediaHidden)})}function removeSectionModels(sectionId){for(const key in models)models.hasOwnProperty(key)&&models[key].sectionId===sectionId&&delete models[key];delete modelJsonSections[sectionId],delete theme.mediaInstances[sectionId]}return{init,loadContent,removeSectionModels}})(),register("collection-template",filters);const selectors$K={templateAddresses:".template-customers-addresses",accountForm:"[data-form]",addressNewForm:"[data-form-new]",btnNew:"[data-button-new]",btnEdit:"[data-button-edit]",btnDelete:"[data-button-delete]",btnCancel:"[data-button-cancel]",editAddress:"data-form-edit",addressCountryNew:"AddressCountryNew",addressProvinceNew:"AddressProvinceNew",addressProvinceContainerNew:"AddressProvinceContainerNew",addressCountryOption:"[data-country-option]",addressCountry:"AddressCountry",addressProvince:"AddressProvince",addressProvinceContainer:"AddressProvinceContainer",requiredInputs:'input[type="text"]:not(.optional)'},attributes$w={dataFormId:"data-form-id"},classes$D={hidden:"is-hidden",validation:"validation--showup"};class Addresses{constructor(section){this.section=section,this.addressNewForm=this.section.querySelector(selectors$K.addressNewForm),this.accountForms=this.section.querySelectorAll(selectors$K.accountForm),this.init(),this.validate()}init(){if(this.addressNewForm){const section=this.section,newAddressForm=this.addressNewForm;this.customerAddresses();const newButtons=section.querySelectorAll(selectors$K.btnNew);newButtons.length&&newButtons.forEach(button=>{button.addEventListener("click",function(e){e.preventDefault(),button.classList.add(classes$D.hidden),newAddressForm.classList.remove(classes$D.hidden)})});const editButtons=section.querySelectorAll(selectors$K.btnEdit);editButtons.length&&editButtons.forEach(button=>{button.addEventListener("click",function(e){e.preventDefault();const formId=this.getAttribute(attributes$w.dataFormId);section.querySelector(`[${selectors$K.editAddress}="${formId}"]`).classList.toggle(classes$D.hidden)})});const deleteButtons=section.querySelectorAll(selectors$K.btnDelete);deleteButtons.length&&deleteButtons.forEach(button=>{button.addEventListener("click",function(e){e.preventDefault();const formId=this.getAttribute(attributes$w.dataFormId);confirm(theme.strings.delete_confirm)&&Shopify.postLink("/account/addresses/"+formId,{parameters:{_method:"delete"}})})});const cancelButtons=section.querySelectorAll(selectors$K.btnCancel);cancelButtons.length&&cancelButtons.forEach(button=>{button.addEventListener("click",function(e){e.preventDefault(),this.closest(selectors$K.accountForm).classList.add(classes$D.hidden),document.querySelector(selectors$K.btnNew).classList.remove(classes$D.hidden)})})}}customerAddresses(){Shopify.CountryProvinceSelector&&new Shopify.CountryProvinceSelector(selectors$K.addressCountryNew,selectors$K.addressProvinceNew,{hideElement:selectors$K.addressProvinceContainerNew}),this.section.querySelectorAll(selectors$K.addressCountryOption).forEac
21h(element=>{const formId=element.getAttribute(attributes$w.dataFormId),countrySelector=`${selectors$K.addressCountry}_${formId}`,provinceSelector=`${selectors$K.addressProvince}_${formId}`,containerSelector=`${selectors$K.addressProvinceContainer}_${formId}`;new Shopify.CountryProvinceSelector(countrySelector,provinceSelector,{hideElement:containerSelector})})}validate(){this.accountForms.forEach(accountForm=>{const form=accountForm.querySelector("form"),inputs=form.querySelectorAll(selectors$K.requiredInputs);form.addEventListener("submit",event=>{let isEmpty=!1;inputs.forEach(input=>{input.value?input.nextElementSibling.classList.remove(classes$D.validation):(input.nextElementSibling.classList.add(classes$D.validation),isEmpty=!0)}),isEmpty&&event.preventDefault()})})}}const template=document.querySelector(selectors$K.templateAddresses);template&&new Addresses(template);const selectors$J={form:"[data-account-form]",showReset:"[data-show-reset]",hideReset:"[data-hide-reset]",recover:"[data-recover-password]",login:"[data-login-form]",recoverSuccess:"[data-recover-success]",recoverSuccessText:"[data-recover-success-text]",recoverHash:"#recover"},classes$C={hidden:"is-hidden"};class Login{constructor(form){this.form=form,this.showButton=form.querySelector(selectors$J.showReset),this.hideButton=form.querySelector(selectors$J.hideReset),this.recover=form.querySelector(selectors$J.recover),this.login=form.querySelector(selectors$J.login),this.success=form.querySelector(selectors$J.recoverSuccess),this.successText=form.querySelector(selectors$J.recoverSuccessText),this.init()}init(){window.location.hash==selectors$J.recoverHash?this.showRecoverPasswordForm():this.hideRecoverPasswordForm(),this.success&&this.successText.classList.remove(classes$C.hidden),this.showButton.addEventListener("click",e=>{e.preventDefault(),this.showRecoverPasswordForm()},!1),this.hideButton.addEventListener("click",e=>{e.preventDefault(),this.hideRecoverPasswordForm()},!1)}showRecoverPasswordForm(){return this.recover.classList.remove(classes$C.hidden),this.login.classList.add(classes$C.hidden),window.location.hash=selectors$J.recoverHash,!1}hideRecoverPasswordForm(){return this.login.classList.remove(classes$C.hidden),this.recover.classList.add(classes$C.hidden),window.location.hash="",!1}}const loginForm=document.querySelector(selectors$J.form);loginForm&&new Login(loginForm),register("search-template",[filters,tabs]);const selectors$I={frame:"[data-ticker-frame]",scale:"[data-ticker-scale]",text:"[data-ticker-text]",clone:"data-clone"},attributes$v={speed:"data-marquee-speed"},classes$B={animationClass:"ticker--animated",unloadedClass:"ticker--unloaded",comparitorClass:"ticker__comparitor"},settings$3={moveTime:1.63,space:100};class Ticker{constructor(el,stopClone=!1){this.frame=el,this.stopClone=stopClone,this.scale=this.frame.querySelector(selectors$I.scale),this.text=this.frame.querySelector(selectors$I.text),this.comparitor=this.text.cloneNode(!0),this.comparitor.classList.add(classes$B.comparitorClass),this.frame.appendChild(this.comparitor),this.scale.classList.remove(classes$B.unloadedClass),this.resizeEvent=window.theme.debounce(()=>this.checkWidth(),100),this.listen()}listen(){document.addEventListener("theme:resize:width",this.resizeEvent),this.checkWidth()}checkWidth(){const padding=window.getComputedStyle(this.frame).paddingLeft.replace("px","")*2;if(this.frame.clientWidth-padding<this.comparitor.clientWidth||this.stopClone){if(this.scale.childElementCount===1){if(this.text.classList.add(classes$B.animationClass),this.clone=this.text.cloneNode(!0),this.clone.setAttribute(selectors$I.clone,""),this.scale.appendChild(this.clone),this.stopClone)for(let index=0;index<10;index++){const cloneSecond=this.text.cloneNode(!0);cloneSecond.setAttribute(selectors$I.clone,""),this.scale.appendChild(cloneSecond)}let frameSpeed=this.frame.getAttribute(attributes$v.speed);frameSpeed===null&&(frameSpeed=100);const speed=settings$3.moveTime*(100/parseInt(frameSpeed,10)),animationTimeFrame=this.text.clientWidth/settings$3.space*speed;this.scale.style.setProperty("--animation-time",`${animationTimeFrame}s`)}}else{this.text.classList.add(classes$B.animationClass);let clone=this.scale.querySelector(`[${selectors$I.clone}]`);clone&&this.scale.removeChild(clone),this.text.classList.remove(classes$B.animationClass)}}unload(){document.removeEventListener("theme:resize:width",this.resizeEvent)}}const selectors$H={parallaxElement:"[data-parallax]",shopifySection:".shopify-section",main:"[data-main]"},classes$A={isDisabled:"is-disabled",mainContent:"main-content",shopifySection:"shopify-section",sectionFooterVisible:"section-footer--v
21isible",cardScrollingHidden:"card-scrolling-hidden",stickyTopZero:"sticky-top-zero"},attributes$u={parallaxAnimation:"data-parallax",parallaxIntensity:"data-parallax-intensity",parallaxStatic:"data-parallax-static",singleElement:"data-parallax-single",disableOnMobile:"data-parallax-disable-on-mobile",parallaxRounded:"data-parallax-rounded-corners",parallaxRoundedLarge:"data-parallax-rounded-corners-large"},sections$z={};class ParallaxElement{constructor(el){this.container=el,this.percentage=0,this.percentageFull=0,this.animation=this.container.getAttribute(attributes$u.parallaxAnimation),this.animations=this.animation.split(","),this.disableOnMobile=this.container.hasAttribute(attributes$u.disableOnMobile),this.viewportHeight=Math.max(document.documentElement.clientHeight,window.innerHeight||0),this.containerHeight=this.container.offsetHeight,this.main=document.querySelector(selectors$H.main),this.firstSection=this.main.children[0],this.orientation=window.theme.getScreenOrientation(),this.scrollEvent=()=>this.updateParallax(),this.resizeEvent=()=>this.updateHeight(),this.refreshEvent=()=>this.refresh(),this.assignFooterArguments(),this.assignCardScrollingArguments(),requestAnimationFrame(()=>this.init())}assignFooterArguments(){this.animations.includes("footer")&&(this.shopifySection=this.container.closest(selectors$H.shopifySection),this.footerPrevSectionOffset=0,this.container.hasAttribute(attributes$u.parallaxRounded)&&(this.footerPrevSectionOffset=8,this.container.hasAttribute(attributes$u.parallaxRoundedLarge)&&(this.footerPrevSectionOffset=34)),this.prevSection=this.container.parentNode.previousElementSibling,this.prevSection&&!this.prevSection.classList.contains(classes$A.shopifySection)&&!this.prevSection.classList.contains(classes$A.mainContent)&&(this.prevSection=this.main),requestAnimationFrame(()=>{this.containerHeight=this.container.offsetHeight,this.footerOffset=.15*this.containerHeight,this.cachedPosition=this.footerOffset,this.cachedPercentage=0}))}assignCardScrollingArguments(){if(!this.animations.includes("card-scrolling"))return;let{stickyHeaderHeight}=window.theme.readHeights();if(this.headerHeight=stickyHeaderHeight||0,this.shopifySection=this.container.closest(selectors$H.shopifySection),this.nextSection=this.shopifySection.nextElementSibling,this.cardScrollingStickyTop=this.headerHeight||0,this.cardScrollingMarginTop=this.nextSection?parseInt(window.getComputedStyle(this.nextSection).getPropertyValue("margin-top")):0,this.after=!1,this.prevSection=this.shopifySection.previousElementSibling,this.prevSection){const firstSectionId=this.firstSection.id,matchesFirstSection=this.prevSection.matches(`#${firstSectionId}`),prevSectionHeight=this.prevSection.offsetHeight;this.shopifySection.classList.toggle(classes$A.stickyTopZero,matchesFirstSection&&prevSectionHeight<=this.headerHeight*2)}this.opacityValue=delta=>{if(!delta||delta<=0)return 0;if(delta>0&&delta<=100)return Number(delta/100).toFixed(4);if(delta>100)return 1}}init(){this.updateParallax(),document.addEventListener("theme:scroll",this.scrollEvent),document.addEventListener("theme:resize",this.resizeEvent),document.addEventListener("theme:parallax:refresh",this.refreshEvent)}updateParallax(){this.container.classList.contains(classes$A.isDisabled)||this.disableOnMobile&&window.theme.isMobile()||(this.scrollTop=Math.round(window.scrollY),this.scrollBottom=this.scrollTop+this.viewportHeight,this.elementOffsetTopPoint=Math.round(this.container.getBoundingClientRect().top+this.scrollTop),window.Shopify.designMode&&(this.assignCardScrollingArguments(),this.containerHeight=this.container.offsetHeight),this.elementOffsetBottomPoint=this.elementOffsetTopPoint+this.containerHeight,this.isBottomOfElementPassed=this.elementOffsetBottomPoint<this.scrollTop,this.isTopOfElementReached=this.elementOffsetTopPoint<this.scrollBottom,this.isInView=this.isTopOfElementReached&&!this.isBottomOfElementPassed,this.adjustCalculations(),this.toggleVisibility(),this.isInView&&(this.scrollProgress=this.scrollBottom-this.elementOffsetTopPoint,this.percentage=(this.scrollProgress-this.containerHeight/2)*100/this.viewportHe
21ight,this.percentageFull=Number(this.scrollProgress/this.containerHeight).toFixed(2),this.percentageVisible=Number(this.scrollProgress*100/(this.viewportHeight+this.containerHeight)).toFixed(2),this.animations.includes("circle")&&this.animateCircleText(),(this.animations.includes("horizontal")||this.animations.includes("vertical")||this.animations.includes("diagonal"))&&this.animateOverlappingImages(),(this.animations.includes("offset-ltr")||this.animations.includes("offset-rtl"))&&this.offsetX(),this.animations.includes("card-scrolling")&&this.cardScrollingEffect(),this.animations.includes("zoom-on-scroll")&&this.zoomInOut(),this.animations.includes("footer")&&this.animateFooter()))}adjustCalculations(){this.animations.includes("card-scrolling")&&(this.currentSectionTop=this.shopifySection.getBoundingClientRect().top,this.nextSection?(this.nextSectionTop=this.nextSection.getBoundingClientRect().top,this.offsetTop=this.nextSectionTop-this.containerHeight-this.cardScrollingMarginTop):(this.nextSectionTop=this.currentSectionTop+this.containerHeight,this.offsetTop=this.currentSectionTop),this.distance=Math.floor(this.currentSectionTop-this.headerHeight),this.after=Math.round(this.nextSectionTop-this.headerHeight-this.cardScrollingMarginTop+this.viewportHeight*.1)<0,this.isInView=this.isTopOfElementReached&&!this.after),this.animations.includes("footer")&&(this.elementOffsetTopPoint=Math.round(this.prevSection?.getBoundingClientRect().bottom-this.footerPrevSectionOffset+this.scrollTop),this.elementOffsetBottomPoint=this.elementOffsetTopPoint+this.containerHeight,this.isBottomOfElementPassed=this.elementOffsetBottomPoint<this.scrollTop,this.isTopOfElementReached=this.elementOffsetTopPoint<this.scrollBottom,this.isInView=this.isTopOfElementReached&&!this.isBottomOfElementPassed,this.isApproaching=Math.round(this.elementOffsetTopPoint-this.viewportHeight/2)<this.scrollBottom)}toggleVisibility(){this.animations.includes("card-scrolling")&&this.shopifySection.classList.toggle(classes$A.cardScrollingHidden,this.after),this.animations.includes("footer")&&(this.isApproaching||this.isInView?this.shopifySection.classList.add(classes$A.sectionFooterVisible):this.shopifySection.classList.remove(classes$A.sectionFooterVisible))}cardScrollingEffect(){const delta=this.offsetTop/this.containerHeight*-100;this.container.style.setProperty("--card-scrolling-overlay",this.opacityValue(delta))}zoomInOut(){if(this.animations.includes("card-scrolling")&&this.nextSection){const cumulativeTop=this.nextSectionTop-this.headerHeight-this.cardScrollingMarginTop-this.containerHeight,elementOffsetTopPoint=Math.round(cumulativeTop+this.scrollTop),scrollProgress=this.scrollBottom-elementOffsetTopPoint;this.percentageVisible=Number(scrollProgress*100/(this.viewportHeight+this.containerHeight+this.cardScrollingMarginTop)).toFixed(2)}const delta=.2*this.percentageVisible/100;let scale=Number(1+delta).toFixed(4);scale=scale>1?scale:1,this.container.style.setProperty("--scale",scale)}offsetX(){const isStatic=this.container.hasAttribute(attributes$u.parallaxStatic),intensity=this.container.getAttribute(attributes$u.parallaxIntensity)||100;let adjustment=this.animations.includes("offset-ltr")?intensity:0;isStatic&&(adjustment=intensity/2);const direction=this.animations.includes("offset-ltr")?1:-1,offset=intensity*this.percentageVisible/100-adjustment,offsetX=Number(offset*direction).toFixed(2);this.container.style.setProperty("--offsetX",`${offsetX}%`)}updateHeight(){if(this.animations.includes("card-scrolling")){let{stickyHeaderHeight}=window.theme.readHeights();if(this.headerHeight=stickyHeaderHeight||0,this.cardScrollingStickyTop=this.headerHeight||0,this.cardScrollingMarginTop=this.nextSection?parseInt(window.getComputedStyle(this.nextSection).getPropertyValue("margin-top")):0,this.containerHeight=this.container.offsetHeight,this.prevSection=this.shopifySection.previousElementSibling,this.prevSection){const firstSectionId=this.firstSection.id,matchesFirstSection=this.prevSection.matches(`#${firstSectionId}`),prevSectionHeight=this.prevSection.offsetHeight;this.shopifySection.classList.toggle(classes$A.stickyTopZero,matchesFirstSection&&prevSectionHeight<=this.headerHeight*2)}}const isDesktop=matchMedia("(min-width: 1024px)").matches;(this.orientation!==window.theme.getScreenOrientation()||isDesktop)&&(this.viewportHe
21ight=Math.round(Math.max(document.documentElement.clientHeight,window.innerHeight||0)),this.containerHeight=this.container.offsetHeight,this.orientation=window.theme.getScreenOrientation())}animateCircleText(){const angle=70*this.percentage/100*-1,adjustRotateDegree=70/2;this.percentage>0&&this.container.style.setProperty("--rotate",`${adjustRotateDegree+angle}deg`)}animateOverlappingImages(){const offsetRange=.25*this.container.getAttribute(attributes$u.parallaxIntensity),offsetRangeHalf=offsetRange/2,singleElement=this.container.hasAttribute(attributes$u.singleElement),offset=offsetRange*this.percentage/100;let offsetXPrimary=0,offsetYPrimary=0,offsetXSecondary=0,offsetYSecondary=0;(this.animations.includes("horizontal")||this.animations.includes("diagonal"))&&(offsetXPrimary=-1*offsetRangeHalf+offset,offsetXSecondary=offsetRangeHalf-offset),(this.animations.includes("vertical")||this.animations.includes("diagonal"))&&(offsetYPrimary=offsetRangeHalf-offset,offsetYSecondary=-1*offsetRangeHalf+offset),this.container.style.setProperty("--transformX-primary",`${offsetXPrimary}%`),this.container.style.setProperty("--transformY-primary",`${offsetYPrimary}%`),singleElement||(this.container.style.setProperty("--transformX-secondary",`${offsetXSecondary}%`),this.container.style.setProperty("--transformY-secondary",`${offsetYSecondary}%`))}animateFooter(){const offsetMove=this.footerOffset*this.percentageFull,percentageOfFullOffset=Number(offsetMove/this.footerOffset*100).toFixed(2),currentTransform=new WebKitCSSMatrix(window.getComputedStyle(this.container).transform),currentOffset=Number(currentTransform.m42).toFixed(2);let newOffset=Number(this.footerOffset-offsetMove).toFixed(2);this.percentageFull>=1&&(newOffset=0),currentOffset!==newOffset&&this.cachedPercentage!==percentageOfFullOffset&&(this.container.style.setProperty("--transformY",`${newOffset}`),this.cachedPercentage=percentageOfFullOffset,this.cachedPosition=newOffset)}unload(){document.removeEventListener("theme:scroll",this.scrollEvent),document.removeEventListener("theme:resize",this.resizeEvent),document.removeEventListener("theme:parallax:refresh",this.refreshEvent)}refresh(){this.assignFooterArguments(),this.assignCardScrollingArguments(),this.updateParallax()}}const parallaxSection={onLoad(){sections$z[this.id]=[],this.container.querySelectorAll(selectors$H.parallaxElement).forEach(element=>{sections$z[this.id].push(new ParallaxElement(element))})},onUnload(){sections$z[this.id].forEach(element=>{typeof element.unload=="function"&&element.unload()})}},selectors$G={announcement:"[data-announcement]",announcementSlide:"[data-announcement-slide]",frame:"[data-ticker-frame]",slide:"[data-slide]",slider:"[data-slider]",static:"[data-static]",tickerScale:"[data-ticker-scale]",tickerText:"[data-ticker-text]",parallax:"[data-parallax]",textHighlight:"text-highlight"},attributes$t={slide:"data-slide",speed:"data-slider-speed",arrows:"data-slider-arrows",stop:"data-stop",style:"style",targetReferrer:"data-target-referrer",clipPath:"clip-path"},classes$z={desktop:"desktop",mobile:"mobile",tickerAnimated:"ticker--animated",isDisabled:"is-disabled"},tags={clipPath:"clipPath"},sections$y={};class AnnouncementBar{constructor(container){this.barHolder=container,this.locationPath=location.href,this.slides=this.barHolder.querySelectorAll(selectors$G.slide),this.slider=this.barHolder.querySelector(selectors$G.slider),this.static=this.barHolder.querySelector(selectors$G.static),this.parallax=this.barHolder.querySelector(selectors$G.parallax),this.tickers=[],this.flkty=null,this.init()}init(){this.removeAnnouncement(),this.slider&&(this.initSlider(),document.addEventListener("theme:resize:width",this.initSlider.bind(this))),this.static&&(this.initTickers(),this.tickerAnimationPause()),!this.slider&&!this.static&&(this.initTickers(!0),this.tickerAnimationPause()),this.updateSVGClipPathIDs()}removeAnnouncement(){for(let i=0;i<this.slides.length;i++){const element=this.slides[i];element.hasAttribute(attributes$t.targetReferrer)&&this.locationPath.indexOf(element.getAttribute(attributes$t.targetReferrer))===-1&&!window.Shopify.designMode&&element.parentNode.removeChild(element)}}
21checkSlidesClasses(slides,barHolder){if(slides.length!==0){const slidesMobile=barHolder.querySelectorAll(`${selectors$G.slide}.${classes$z.mobile}`),slidesDesktop=barHolder.querySelectorAll(`${selectors$G.slide}.${classes$z.desktop}`);slides.length===slidesMobile.length?barHolder.parentNode.classList.add(classes$z.mobile):slides.length===slidesDesktop.length&&barHolder.parentNode.classList.add(classes$z.desktop)}}initSlider(){const slides=this.slider.querySelectorAll(selectors$G.slide),sliderArrows=this.slider.hasAttribute(attributes$t.arrows);if(this.checkSlidesClasses(slides,this.barHolder),slides){let slideSelector=`${selectors$G.slide}`;window.innerWidth<theme.sizes.small?slideSelector=`${selectors$G.slide}:not(.${classes$z.desktop})`:slideSelector=`${selectors$G.slide}:not(.${classes$z.mobile})`,this.flkty!=null&&this.flkty.destroy(),this.flkty=new window.theme.Flickity(this.slider,{cellSelector:slideSelector,pageDots:!1,prevNextButtons:sliderArrows,wrapAround:!0,autoPlay:parseInt(this.slider.getAttribute(attributes$t.speed),10),on:{ready:()=>{setTimeout(()=>{this.slider.dispatchEvent(new CustomEvent("slider-is-loaded",{bubbles:!0,detail:{slider:this}}))},10)},change:index=>{this.flkty.cells.forEach((slide,i)=>{slide.element.querySelectorAll(selectors$G.textHighlight).forEach(highlight=>{highlight.setTriggerAttribute(i===index)})})}}}),this.flkty.reposition()}this.slider.addEventListener("slider-is-loaded",()=>{this.initTickers(),this.updateSVGClipPathIDs()})}initTickers(stopClone=!1){this.barHolder.querySelectorAll(selectors$G.frame).forEach(element=>{const ticker=new Ticker(element,stopClone);this.tickers.push(ticker);const slides=element.querySelectorAll(selectors$G.slide);this.checkSlidesClasses(slides,this.barHolder)})}toggleTicker(e,isStopped){const tickerScale=e.target.closest(selectors$G.tickerScale),element=document.querySelector(`[${attributes$t.slide}="${e.detail.blockId}"]`);isStopped&&element&&(tickerScale.setAttribute(attributes$t.stop,""),tickerScale.querySelectorAll(selectors$G.tickerText).forEach(textHolder=>{textHolder.classList.remove(classes$z.tickerAnimated),textHolder.style.transform=`translate3d(${-(element.offsetLeft-parseInt(getComputedStyle(element).marginLeft,10))}px, 0, 0)`})),!isStopped&&element&&(tickerScale.querySelectorAll(selectors$G.tickerText).forEach(textHolder=>{textHolder.classList.add(classes$z.tickerAnimated),textHolder.removeAttribute(attributes$t.style)}),tickerScale.removeAttribute(attributes$t.stop),this.static&&document.dispatchEvent(new CustomEvent("theme:resize:width",{bubbles:!0})))}tickerAnimationPause(){let hoverTimer=0,isHovered=!1;const tickerContainer=this.barHolder.querySelector(selectors$G.announcementSlide);tickerContainer.addEventListener("mouseenter",()=>{isHovered=!0,hoverTimer=setTimeout(()=>{isHovered&&tickerContainer.querySelectorAll(selectors$G.tickerText).forEach(element=>{element.style.animationPlayState="paused"}),clearTimeout(hoverTimer)},500)}),tickerContainer.addEventListener("mouseleave",()=>{isHovered=!1,tickerContainer.querySelectorAll(selectors$G.tickerText).forEach(element=>{element.style.animationPlayState="running"})})}updateSVGClipPathIDs(){this.barHolder.querySelectorAll(selectors$G.slide).forEach((svg,index)=>{const clipPath=svg.querySelector(tags.clipPath);if(clipPath){const newclipPathId=`${clipPath.id}_${index}`;clipPath.id=newclipPathId;const gTag=svg.querySelector(`g[${attributes$t.clipPath}]`);gTag&&gTag.setAttribute(attributes$t.clipPath,`url(#${newclipPathId})`)}})}onBlockSelect(evt){const index=parseInt([...evt.target.parentNode.children].indexOf(evt.target));this.slider&&this.flkty!==null&&(this.flkty.select(index),this.flkty.pausePlayer()),this.slider||this.toggleTicker(evt,!0),this.parallax&&(this.parallax.style.setProperty("--offsetX","0%"),this.parallax.classList.add(classes$z.isDisabled))}onBlockDeselect(evt){this.slider&&this.flkty!==null&&this.flkty.unpausePlayer(),this.slider||this.toggleTicker(evt,!1),this.parallax&&(this.parallax.classList.remove(classes$z.isDisabled),document.dispatchEvent(new CustomEvent("theme:scroll")))}onUnload(){document.removeEventListener("theme:resize:width",this.initSlider.bind(this)),this.tickers.length>
210&&this.tickers.forEach(ticker=>{ticker.unload()})}}const announcement={onLoad(){sections$y[this.id]=[];const element=this.container.querySelector(selectors$G.announcement);element&§ions$y[this.id].push(new AnnouncementBar(element))},onBlockSelect(e){sections$y[this.id].length&§ions$y[this.id].forEach(el=>{typeof el.onBlockSelect=="function"&&el.onBlockSelect(e)})},onBlockDeselect(e){sections$y[this.id].length&§ions$y[this.id].forEach(el=>{typeof el.onBlockSelect=="function"&&el.onBlockDeselect(e)})},onUnload(){sections$y[this.id].forEach(el=>{typeof el.onUnload=="function"&&el.onUnload()})}};register("announcement-bar",announcement),register("marquee",[announcement,parallaxSection]);const selectors$F={disclosureWrappper:"[data-hover-disclosure]",header:"[data-site-header]",link:"[data-top-link]",headerBackground:"[data-header-background]",navItem:"[data-nav-item]"},classes$y={isVisible:"is-visible",grandparent:"grandparent",headerMenuOpened:"site-header--menu-opened",hasScrolled:"has-scrolled",headerHovered:"site-header--hovered",headerCompress:"site-header--compress",searchOpened:"search-opened",megamenuOpened:"megamenu-opened"},attributes$s={disclosureToggle:"data-hover-disclosure-toggle",ariaHasPopup:"aria-haspopup",ariaExpanded:"aria-expanded",ariaControls:"aria-controls"};let sections$x={};class HoverDisclosure{constructor(el){this.disclosure=el,this.body=document.body,this.header=el.closest(selectors$F.header),this.key=this.disclosure.id,this.trigger=document.querySelector(`[${attributes$s.disclosureToggle}='${this.key}']`),this.link=this.trigger.querySelector(selectors$F.link),this.grandparent=this.trigger.classList.contains(classes$y.grandparent),this.background=document.querySelector(selectors$F.headerBackground),this.trigger.setAttribute(attributes$s.ariaHasPopup,!0),this.trigger.setAttribute(attributes$s.ariaExpanded,!1),this.trigger.setAttribute(attributes$s.ariaControls,this.key),this.dropdown=this.trigger.querySelector(selectors$F.disclosureWrappper),this.setBackgroundHeightEvent=()=>this.setBackgroundHeight(),this.connectHoverToggle(),this.handleTablets()}setBackgroundHeight(){this.hasScrolled=this.body.classList.contains(classes$y.hasScrolled),this.headerHeight=this.hasScrolled?window.stickyHeaderHeight:this.header.offsetHeight,this.grandparent?(this.dropdown.style.height="auto",this.dropdownHeight=this.dropdown.offsetHeight+this.headerHeight):this.dropdownHeight=this.headerHeight,this.background.style.setProperty("--header-background-height",`${this.dropdownHeight}px`),window.innerWidth<theme.sizes.small&&this.hideDisclosure()}showDisclosure(){this.setBackgroundHeight(),document.addEventListener("theme:resize",this.setBackgroundHeightEvent),this.trigger.setAttribute(attributes$s.ariaExpanded,!0),this.trigger.classList.add(classes$y.isVisible),this.header.classList.add(classes$y.headerMenuOpened),this.trigger.classList.contains(classes$y.grandparent)&&this.body.classList.add(classes$y.megamenuOpened),this.updateHeaderHover()}hideDisclosure(){this.background.style.removeProperty("--header-background-height"),document.removeEventListener("theme:resize",this.setBackgroundHeightEvent),this.trigger.classList.remove(classes$y.isVisible),this.trigger.setAttribute(attributes$s.ariaExpanded,!1),this.header.classList.remove(classes$y.headerMenuOpened),this.body.classList.remove(classes$y.megamenuOpened)}updateHeaderHover(){requestAnimationFrame(()=>{const isHovered=this.header.matches(":hover"),hasHoveredClass=this.header.classList.contains(classes$y.headerHovered);isHovered&&!hasHoveredClass&&this.header.classList.add(classes$y.headerHovered)})}handleTablets(){this.trigger.addEventListener("touchstart",e=>{if(!this.trigger.classList.contains(classes$y.isVisible)){e.preventDefault();const activeNavItems=this.header.querySelectorAll(`.${classes$y.isVisible}${selectors$F.navItem}`);if(activeNavItems.length>0){activeNavItems.forEach(item=>{if(item!==this.trigger){item.dispatchEvent(new Event("mouseleave",{bubbles:!0}));const onTransitionEnd=()=>{requestAnimationFrame(()=>{this.showDisclosure()}),item.removeEventListener("transitionend",onTransitionEnd)};item.addEventListener("transitionend",onTransitionEnd)}});return}this.showDisclosure()}})}connectHoverToggle(){this.trigger.addEventListener("mouseenter",()=>this.showDisclosure()),this.link.addEventListener("focus",()=>this.showDisclosure()),this.trigger.addEventListener("mouseleave",()=>this.hideDisclosure()),this.trigger.addEventListener("focusout",event=>{this.trigger.contains(event.relatedTarget)||this.hideDisclosure()}),this.disclosure.addEventListener("keyup",event=>{event.code===theme.keyboardKeys.ESCAPE&&this.hideDisclosure()})}onBlockSelect(event){if(this.disclosure.contains(event.target)){const isTouch2=matchMedia("(pointer:coarse)").matches,viewportMobile=window.innerWidth<theme.sizes.small;let mobileNavEnabled=!1;(viewportMobile&&window.Shopify.designMode||this.header.classList.contains(classe
21s$y.headerCompress))&&(mobileNavEnabled=!0),!isTouch2&&!mobileNavEnabled&&this.showDisclosure(event)}}onBlockDeselect(event){this.disclosure.contains(event.target)&&this.hideDisclosure()}}const hoverDisclosure={onLoad(){sections$x[this.id]=[],this.container.querySelectorAll(selectors$F.disclosureWrappper).forEach(el=>{sections$x[this.id].push(new HoverDisclosure(el))})},onBlockSelect(evt){sections$x[this.id].forEach(el=>{typeof el.onBlockSelect=="function"&&el.onBlockSelect(evt)})},onBlockDeselect(evt){sections$x[this.id].forEach(el=>{typeof el.onBlockDeselect=="function"&&el.onBlockDeselect(evt)})}},selectors$E={header:"[data-site-header]",announcementBar:"[data-announcement-wrapper]",collectionFilters:"[data-collection-filters]",logoTextLink:"[data-logo-text-link]",mobileMenuTrigger:"[data-mobile-menu-trigger]",nav:"[data-nav]",navItem:"[data-nav-item]",wrapper:"[data-wrapper]",headerBackground:"[data-header-background]",cartPage:"[data-cart-page]",widthContent:"[data-takes-space]"},classes$x={jsDrawerOpenAll:["js-drawer-open","js-drawer-open-cart","js-quick-view-visible","js-quick-view-from-cart"],headerTransparent:"site-header--transparent",headerHovered:"site-header--hovered",headerMenuOpened:"site-header--menu-opened",hasScrolled:"has-scrolled",hideHeader:"hide-header",headerCompress:"site-header--compress",isVisible:"is-visible",isOpen:"is-open",searchOpened:"search-opened",noOutline:"no-outline",cloneClass:"js__header__clone",drawerOpen:"js-drawer-open"},attributes$r={navAlignment:"data-nav-alignment",headerSticky:"data-header-sticky"},sections$w={};class Header{constructor(container){this.container=container,this.background=document.querySelector(selectors$E.headerBackground),this.header=container,this.headerWrapper=container.querySelector(selectors$E.wrapper),this.logoTextLink=container.querySelector(selectors$E.logoTextLink),this.nav=container.querySelector(selectors$E.nav),this.mobileMenuTrigger=container.querySelector(selectors$E.mobileMenuTrigger),this.headerStateEvent=event=>this.headerState(event),this.handleTouchstartEvent=event=>
21this.handleTouchstart(event),this.updateBackgroundHeightEvent=event=>this.updateBackgroundHeight(event),this.triggerDrawerOpeningEvent=()=>this.triggerDrawerOpening(this.mobileMenuTrigger),initTransparentHeader(),this.minWidth=this.getMinWidth(),this.checkWidthEvent=()=>this.checkWidth(),this.listenWidth(),this.initMobileNavToggle(),this.handleTextLinkLogos(),this.initStickyHeader(),this.handleBackgroundEvents(),document.querySelector(selectors$E.cartPage)||(window.cart=new CartDrawer),document.body.addEventListener("touchstart",this.handleTouchstartEvent,{passive:!0}),this.updateHeaderHover()}updateHeaderHover(){requestAnimationFrame(()=>{const isHovered=this.header.matches(":hover"),hasHoveredClass=this.header.classList.contains(classes$x.headerHovered);isHovered&&!hasHoveredClass&&this.header.classList.add(classes$x.headerHovered)})}handleTouchstart(event){const isInHeader=this.header.contains(event.target),activeNavItem=this.header.querySelector(`.${classes$x.isVisible}${selectors$E.navItem}`);!isInHeader&&activeNavItem&&activeNavItem.dispatchEvent(new Event("mouseleave",{bubbles:!0}))}handleTextLinkLogos(){if(this.logoTextLink===null)return;const headerHeight=this.header.offsetHeight;document.documentElement.style.setProperty("--header-height",`${headerHeight}px`),document.documentElement.style.setProperty("--header-sticky-height",`${headerHeight}px`)}initStickyHeader(){if(this.headerSticky=this.header.hasAttribute(attributes$r.headerSticky),this.hasScrolled=!1,this.hasCollectionFilters=document.querySelector(selectors$E.collectionFilters),this.position=this.header.dataset.position,this.position==="fixed"&&!this.hasCollectionFilters){this.headerState(),document.addEventListener("theme:scroll",this.headerStateEvent);return}document.body.classList.remove(classes$x.hasScrolled),window.isHeaderTransparent&&this.header.classList.add(classes$x.headerTransparent)}headerState(event){const headerHeight=parseInt(this.header.dataset.height||this.header.offsetHeight),announcementBar=document.querySelector(selectors$E.announcementBar),announcementHeight=announcementBar?announcementBar.offsetHeight:0,pageOffset=headerHeight+announcementHeight,currentScrollTop=window.pageYOffset||document.documentElement.scrollTop,scrollUp=event&&event.detail&&event.detail.up;this.hasScrolled=currentScrollTop>pageOffset,document.body.classList.toggle(classes$x.hasScrolled,this.hasScrolled);const hideHeaderThreshold=pageOffset+window.stickyHeaderHeight,shouldHideHeader=currentScrollTop<hideHeaderThreshold&&scrollUp;if(document.body.classList.toggle(classes$x.hideHeader,shouldHideHeader),window.isHeaderTransparent){const shouldShowTransparentHeader=!this.hasScrolled||shouldHideHeader;this.header.classList.toggle(classes$x.headerTransparent,shouldShowTransparentHeader)}if(this.header.classList.contains(classes$x.headerHovered)){const currentHeight=this.hasScrolled?window.stickyHeaderHeight:headerHeight;this.background.style.setProperty("--header-background-height",`${currentHeight}px`);const activeNavItem=this.header.querySelector(`.${classes$x.isVisible}${selectors$E.navItem}`);activeNavItem&&activeNavItem.dispatchEvent(new Event("mouseenter",{bubbles:!0}))}}handleBackgroundEvents(){this.headerWrapper.addEventListener("mouseenter",this.updateBackgroun
21dHeightEvent),this.headerWrapper.addEventListener("mouseleave",this.updateBackgroundHeightEvent),this.header.addEventListener("focusout",this.updateBackgroundHeightEvent),document.addEventListener("theme:cart:close",this.updateBackgroundHeightEvent),document.addEventListener("theme:search:close",this.updateBackgroundHeightEvent)}updateBackgroundHeight(event){const isDesktop=matchMedia("(pointer:fine)").matches,isFocusEnabled=!document.body.classList.contains(classes$x.noOutline),isNotTabbingOnDesktop=isDesktop&&!isFocusEnabled;if(!event)return;let drawersVisible=classes$x.jsDrawerOpenAll.some(popupClass=>document.body.classList.contains(popupClass));(event.type==="mouseenter"||drawersVisible)&&(this.headerHeight=this.hasScrolled?window.stickyHeaderHeight:this.header.offsetHeight,this.header.classList.add(classes$x.headerHovered),this.header.classList.contains(classes$x.headerMenuOpened)||this.background.style.setProperty("--header-background-height",`${this.headerHeight}px`)),event.type!=="mouseenter"&&requestAnimationFrame(()=>{if(drawersVisible=classes$x.jsDrawerOpenAll.some(popupClass=>document.body.classList.contains(popupClass)),drawersVisible||event.type==="focusout"&&!isDesktop||event.type==="theme:search:close"&&!isNotTabbingOnDesktop||this.hasScrolled)return;const focusOutOfHeader=document.activeElement.closest(selectors$E.header)===null,isSearchOpened=document.body.classList.contains(classes$x.searchOpened),headerMenuOpened=this.header.classList.contains(classes$x.headerMenuOpened);isSearchOpened||headerMenuOpened||event.type==="focusout"&&!focusOutOfHeader||(this.header.classList.remove(classes$x.headerHovered),this.background.style.setProperty("--header-background-height","0px"),isFocusEnabled||document.activeElement.blur())})}listenWidth(){document.addEventListener("theme:resize",this.checkWidthEvent),this.checkWidth()}checkWidth(){window.innerWidth<this.minWidth?this.header.classList.add(classes$x.headerCompress):this.header.classList.remove(classes$x.headerCompress)}getMinWidth(){const headerWrapperStyles=this.headerWrapper.currentStyle||window.getComputedStyle(this.headerWrapper),headerPaddings=parseInt(headerWrapperStyles.paddingLeft)*100,comparitor=this.header.cloneNode(!0);comparitor.classList.add(classes$x.cloneClass),document.body.appendChild(comparitor);const wideElements=comparitor.querySelectorAll(selectors$E.widthContent),navAlignment=this.header.getAttribute(attributes$r.navAlignment),minWidth=_sumSplitWidths(wideElements,navAlignment);return document.body.removeChild(comparitor),minWidth+wideElements.length*20+headerPaddings}initMobileNavToggle(){this.mobileMenuTrigger?.addEventListener("click",()=>{if(!document.body.classList.contains(classes$x.drawerOpen)){if(document.body.classList.contains(classes$x.searchOpened)){document.addEventListener("theme:search:close",this.triggerDrawerOpeningEvent);return}this.triggerDrawerOpening(this.mobileMenuTrigger)}})}triggerDrawerOpening(mobileMenuTrigger){document.dispatchEvent(new CustomEvent("theme:drawer:opening",{bubbles:!0,detail:{element:mobileMenuTrigger}})),document.removeEventListener("theme:search:close",this.triggerDrawerOpeningEvent)}onUnload(){document.documentElement.style.removeProperty("--header-height"),document.documentElement.style.removeProperty("--header-sticky-height"),this.initStickyHeader(),document.body.classList.remove(...classes$x.jsDrawerOpenAll),document.removeEventListener("theme:scroll",this.headerStateEvent),document.removeEventListener("theme:resize",this.checkWidthEvent),document.removeEventListener("theme:cart:close",this.updateBackgroun
21dHeightEvent),document.removeEventListener("theme:search:close",this.updateBackgroundHeightEvent),document.body.removeEventListener("touchstart",this.handleTouchstartEvent),document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})),typeof window.cart.unload=="function"&&window.cart.unload()}}function _sumSplitWidths(nodes,alignment){let arr=[];nodes.forEach(el=>{arr.push(el.clientWidth)});let[logoWidth,navWidth,iconsWidth]=arr;if(alignment==="left"){const tempWidth=logoWidth;logoWidth=navWidth,navWidth=tempWidth}return alignment!=="right"&&(logoWidth>iconsWidth?iconsWidth=logoWidth:logoWidth=iconsWidth),logoWidth+navWidth+iconsWidth}register("header",[{onLoad(){sections$w[this.id]=new Header(this.container)},onUnload(){sections$w[this.id].onUnload()}},hoverDisclosure]);const selectors$D={trigger:"[data-collapsible-trigger]"},classes$w={isExpanded:"is-expanded"};register("accordions",[{onBlockSelect(e){const trigger=e.target.querySelector(selectors$D.trigger);requestAnimationFrame(()=>{trigger.classList.contains(classes$w.isExpanded)||trigger.dispatchEvent(new Event("click"))})}},collapsible]);const selectors$C={button:"[data-share-button]",tooltip:"[data-share-button-tooltip]"},classes$v={visible:"is-visible",hiding:"is-hiding"},sections$v={};class ShareButton{constructor(container){this.container=container,this.button=this.container.querySelector(selectors$C.button),this.tooltip=this.container.querySelector(selectors$C.tooltip),this.transitionSpeed=200,this.hideTransitionTimeout=0,this.init()}init(){this.button&&this.button.addEventListener("click",()=>{let targetUrl=window.location.href;this.button.dataset.shareLink&&(targetUrl=this.button.dataset.shareLink),this.tooltip.classList.contains(classes$v.visible)||navigator.clipboard.writeText(targetUrl).then(()=>{this.tooltip.classList.add(classes$v.visible),setTimeout(()=>{this.tooltip.classList.add(classes$v.hiding),this.tooltip.classList.remove(classes$v.visible),this.hideTransitionTimeout&&clearTimeout(this.hideTransitionTimeout),this.hideTransitionTimeout=setTimeout(()=>{this.tooltip.classList.remove(classes$v.hiding)},this.transitionSpeed)},1500)})})}}const shareButton={onLoad(){sections$v[this.id]=new ShareButton(this.container)}};register("article",[shareButton]);const selectors$B={videoPlay:"[data-video-play]"},attributes$q={videoPlayValue:"data-video-play"};class VideoPlay{constructor(container){this.container=container,this.videoPlay=this.container.querySelectorAll(selectors$B.videoPlay),this.a11y=window.theme.a11y,this.init()}init(){this.videoPlay.length&&this.videoPlay.forEach(element=>{element.addEventListener("click",e=>{if(element.hasAttribute(attributes$q.videoPlayValue)&&element.getAttribute(attributes$q.videoPlayValue).trim()!==""){e.preventDefault();const items=[{html:element.getAttribute(attributes$q.videoPlayValue)}],options2={mainClass:"pswp--video"};this.a11y.state.trigger=element,new window.theme.LoadPhotoswipe(items,options2)}})})}}const videoPlay={onLoad(){new VideoPlay(this.container)}},selectors$A={imageWrapper:"[data-banner-image]",titleWrapper:"[data-banner-title]",lazyImage:".lazy-image",parallax:'[data-parallax="zoom-on-scroll"],[data-parallax="card-scrolling"],[data-parallax="zoom-on-scroll,card-scrolling"]',textRevealCropper:".text-reveal__cropper",aos:"[data-aos]"},classes$u={bannerNoCachedImages:"banner--no-cached-images",bannerImgLoaded:"banner--img-loaded",imgIn:"img-in",overflowHidden:"overflow-hidden",textHighlightWrapper:"text-highlight-wrapper"},sections$u={};class BannerImage{constructor(section){this.container=section.container,this.title=this.container.querySelector(selectors$A.titleWrapper),this.parallax=null,this.init()}init(){if(this.handleImageAnimation(!0),this.container.matches(selectors$A.parallax)&&(this.parallax=new ParallaxElement(this.container)),this.title&&!this.title.classList.contains(classes$u.textHighlightWrapper)){const animatedTitle=this.title.querySelector(selectors$A.aos);if(!animatedTitle)return;const textRevealCropper=animatedTitle.closest(selectors$A.textRevealCropper);
21textRevealCropper?.classList.add(classes$u.overflowHidden),waitForAnimationEnd(animatedTitle).then(()=>{textRevealCropper?.classList.remove(classes$u.overflowHidden)})}}handleImageAnimation(onLoad=!1){if(!onLoad){this.container.classList.remove(classes$u.bannerNoCachedImages),this.container.classList.remove(classes$u.bannerImgLoaded);return}const img=this.container.querySelector(selectors$A.imageWrapper).querySelectorAll(selectors$A.lazyImage),imgComplete=this.container.classList.contains(classes$u.imgIn);if(img.length&&!imgComplete){this.container.classList.add(classes$u.bannerNoCachedImages);const onImageTransitionEnd=event=>{requestAnimationFrame(()=>this.container.classList.add(classes$u.bannerImgLoaded)),img[0].removeEventListener("transitionend",onImageTransitionEnd)};img[0].addEventListener("transitionend",onImageTransitionEnd)}}onReorder(){this.handleImageAnimation(!1)}onUnload(){this.handleImageAnimation(!1),this.parallax&&(this.parallax.unload(),this.parallax=null)}}register("banner-image",[{onLoad(){sections$u[this.id]=new BannerImage(this)},onReorder(e){sections$u[this.id].onReorder(e)},onUnload(e){sections$u[this.id].onUnload(e)}},videoPlay]);const selectors$z={scrollSpy:"[data-scroll-spy]"},classes$t={selected:"is-selected",isFullHeight:"is-full-height"},attributes$p={scrollSpy:"data-scroll-spy",scrollSpyPrevent:"data-scroll-spy-prevent",mobile:"data-scroll-spy-mobile",desktop:"data-scroll-spy-desktop"},sections$t={};class ScrollSpy{constructor(section,element){this.container=section,this.element=element,this.element&&(this.anchorSelector=`[${attributes$p.scrollSpy}="#${this.element.id}"]`,this.anchor=this.container.querySelector(this.anchorSelector),this.anchors=this.container.querySelectorAll(`[${attributes$p.scrollSpy}]`),this.anchor&&(this.scrollCallback=()=>this.onScroll(),this.init()))}init(){this.onScroll(),document.addEventListener("theme:scroll",this.scrollCallback),document.addEventListener("theme:resize:width",this.scrollCallback)}isEligible(){return this.container.hasAttribute(attributes$p.scrollSpyPrevent)?!1:window.theme.isMobile()&&this.anchor.hasAttribute(attributes$p.mobile)||window.theme.isDesktop()&&this.anchor.hasAttribute(attributes$p.desktop)||!this.anchor.hasAttribute(attributes$p.desktop)&&!this.anchor.hasAttribute(attributes$p.mobile)}onScroll(){if(!this.isEligible())return;this.top=this.element.getBoundingClientRect().top,this.bottom=this.element.getBoundingClientRect().bottom;const windowHeight=Math.round(window.innerHeight),scrollTop=Math.round(window.scrollY),scrollBottom=scrollTop+windowHeight,elementOffsetTopPoint=Math.round(this.top+scrollTop),elementHeight=this.element.offsetHeight,isBottomOfElementPassed=elementOffsetTopPoint+elementHeight<scrollTop;if(!(elementOffsetTopPoint<scrollBottom&&!isBottomOfElementPassed))return;this.anchor.parentNode.offsetHeight<=elementHeight?this.container.style.setProperty("--sticky-position",`${window.innerHeight/2-elementHeight/2}px`):this.container.classList.add(classes$t.isFullHeight),this.anchorTop=this.anchor.getBoundingClientRect().top,this.anchorBottom=this.anchor.getBoundingClientRect().bottom;const anchorTopPassedElementTop=this.top<this.anchorTop,anchorBottomPassedElementBottom=this.bottom<this.anchorBottom;anchorTopPassedElementTop&&!anchorBottomPassedElementBottom&&(this.anchors.forEach(anchor=>{anchor.matches(this.anchorSelector)||anchor.classList.remove(classes$t.selected)}),this.anchor.classList.add(classes$t.selected))}onUnload(){document.removeEventListener("theme:scroll",this.scrollCallback),document.removeEventListener("theme:resize:width",this.scrollCallback)}}const scrollSpy={onLoad(){sections$t[this.id]=[],this.container.querySelectorAll(selectors$z.scrollSpy).forEach(element=>{const scrollSpy2=this.container.querySelector(element.getAttribute(attributes$p.scrollSpy));sections$t[this.id].push(new ScrollSpy(this.container,scrollSpy2))})},onUnload(){sections$t[this.id].forEach(element=>{typeof element.onUnload=="function"&&element.onUnload()})}},selectors$y={banner:"[data-banner]",sliderContent:"[data-slider-content]",sliderMedia:"[data-sli
21der-media]",links:"a, button"},attributes$o={index:"data-index",tabIndex:"tabindex",singleImage:"data-slider-single-image",scrollSpyPrevent:"data-scroll-spy-prevent"},classes$s={isSelected:"is-selected"},settings$2={row:"row",columns:"columns"};let sections$s={};class BannerWithTextColumns{constructor(section){this.container=section.container,this.sliderContent=this.container.querySelector(selectors$y.sliderContent),this.singleImageEnabled=this.sliderContent?.hasAttribute(attributes$o.singleImage),this.banners=this.container.querySelectorAll(selectors$y.banner),this.links=this.container.querySelectorAll("a"),this.sliderMedia=this.container.querySelector(selectors$y.sliderMedia),this.flktyContent=null,this.flktyMedia=null,this.onResizeCallback=()=>this.handleSlidersOnResize(),this.appearance=this.container.dataset.appearance,this.appearance===settings$2.columns?this.handleColumnsLayout():this.handleRowLayout()}listen(){document.addEventListener("theme:resize:width",this.onResizeCallback),this.links.forEach(link=>{link.addEventListener("focus",()=>{const selectedIndex=Number(link.closest(selectors$y.banner).getAttribute(attributes$o.index));window.innerWidth>=theme.sizes.small&&this.sync(selectedIndex)})}
21),this.banners.forEach(slide=>{slide.addEventListener("mouseenter",()=>{const selectedIndex=Number(slide.getAttribute(attributes$o.index));window.innerWidth>=theme.sizes.small&&!window.theme.touch&&this.sync(selectedIndex)}),slide.addEventListener("pointerup",()=>{const selectedIndex=Number(slide.getAttribute(attributes$o.index));window.innerWidth>=theme.sizes.small&&window.theme.touch&&this.sync(selectedIndex)})})}handleColumnsLayout(){if(this.sliderContent.children.length<=1)return;let isDraggable=window.innerWidth<window.theme.sizes.small;this.sliderMedia.children.length>1&&(this.flktyMedia=new window.theme.Flickity(this.sliderMedia,{draggable:!1,wrapAround:!1,fade:!0,prevNextButtons:!1,adaptiveHeight:!1,pageDots:!1,setGallerySize:!1,on:{change:index=>{this.handleGroupItemsNavigation(index,this.flktyContent)}}}),window.theme.flickitySmoothScrolling(this.sliderMedia)),this.flktyContent=new window.theme.Flickity(this.sliderContent,{draggable:isDraggable,prevNextButtons:!1,pageDots:!0,cellAlign:"left",adaptiveHeight:!1,imagesLoaded:!0,on:{ready:()=>{this.listen(),this.slidesTabIndex()},change:index=>{window.innerWidth<theme.sizes.small&&!this.singleImageEnabled&&this.flktyMedia.select(index),this.slidesTabIndex(),this.handleGroupItemsNavigation(index,this.flktyMedia)}}}),window.theme.flickitySmoothScrolling(this.sliderContent)}handleRowLayout(){if(this.sliderMedia.children.length<=1||window.theme.isMobile()){this.updateState(0),this.listen();return}this.initMediaSlider()}initMediaSlider(){this.flktyMedia=new window.theme.Flickity(this.sliderMedia,{draggable:!0,wrapAround:!1,fade:!0,prevNextButtons:!1,adaptiveHeight:!1,pageDots:!1,setGallerySize:!1,on:{ready:()=>{this.updateState(0),this.listen()},change:index=>{this.updateState(index)}}}),window.theme.flickitySmoothScrolling(this.sliderMedia)}handleGroupItemsNavigation(index,sliderToSync=null){sliderToSync!==null&&requestAnimationFrame(()=>{index!==sliderToSync.selectedIndex&&sliderToSync.select(index)})}slidesTabIndex(){if(!this.sliderContent)return;window.theme.Flickity.data(this.sliderContent).cells.forEach(sli
21de=>{let tabIndex="-1";slide.element.classList.contains(classes$s.isSelected)&&(tabIndex="0"),slide.element.querySelectorAll(selectors$y.links).forEach(link=>{link.setAttribute(attributes$o.tabIndex,tabIndex)})})}sync(index=0){this.appearance===settings$2.columns?this.flktyContent.selectCell(index):this.updateState(index),this.flktyMedia&&this.flktyMedia.selectCell(index)}updateState(index=0){this.banners.forEach(element=>{const elementIndex=Number(element.getAttribute(attributes$o.index));element.classList.toggle(classes$s.isSelected,elementIndex===index)})}handleSlidersOnResize(){if(this.appearance===settings$2.row){if(window.theme.isMobile()&&this.flktyMedia){this.flktyMedia.destroy(),this.flktyMedia=null;return}if(window.theme.isDesktop()&&!this.flktyMedia){this.initMediaSlider();return}}this.flktyContent&&(this.flktyContent.resize(),this.toggleDraggable()),this.flktyMedia&&this.flktyMedia.resize()}toggleDraggable(){this.flktyContent.options.draggable=window.innerWidth<window.theme.sizes.small,this.flktyContent.updateDraggable()}onBlockSelect(event){const selectedIndex=parseInt([...event.target.parentNode.children].indexOf(event.target));if(this.sync(selectedIndex),this.appearance===settings$2.row){const target=this.sliderMedia.children[selectedIndex],targetOffsetTop=Math.round(target.getBoundingClientRect().top);this.container.setAttribute(attributes$o.scrollSpyPrevent,""),setTimeout(()=>window.theme.scrollTo(targetOffsetTop),400),setTimeout(()=>this.container.removeAttribute(attributes$o.scrollSpyPrevent),1e3)}}onUnload(){document.removeEventListener("theme:resize:width",this.onResizeCallback)}}register("banner-with-text-columns",[{onLoad(){sections$s[this.id]=new BannerWithTextColumns(this)},onBlockSelect(event){sections$s[this.id].onBlockSelect(event)}},scrollSpy]),register("blog-posts",ajaxify);const selectors$x={slider:"[data-slider]",sliderItem:"[data-slider-item]",sliderItemImage:"[data-media-container]",links:"a, button",flickityButton:".flickity-button"},classes$r={carouselInactive:"carousel--inactive",carouselResize:"carousel--resize"},attributes$n={tabIndex:"tabindex"},sections$r={};class ColumnsWithImage{constructor(section){this.container=section.container,this.slider=this.container.querySelector(selectors$x.slider),this.flkty=null,this.gutter=0,this.checkSlidesSizeOnResize=()=>this.checkSlidesSize(),this.listen()}initSlider(){this.slider.classList.remove(classes$r.carouselInactive),this.flkty=new window.theme.Flickity(this.slider,{pageDots:!1,cellAlign:"left",groupCells:!0,contain:!0,on:{ready:()=>{this.setSliderArrowsPosition(this.slider),setTimeout(()=>{this.changeTabIndex(),this.flkty.resize()},0)},change:()=>{this.changeTabIndex()}}}),this.createResizeClass()}createResizeClass(){if(typeof window.theme.Flickity.prototype._createResizeClass=="function")return;window.theme.Flickity.prototype._createResizeClass=function(){this.element.classList.add(classes$r.carouselResize)},window.theme.Flickity.createMethods.push("_createResizeClass");const resize=window.theme.Flickity.prototype.resize;window.theme.Flickity.prototype.resize=function(){this.element.classList.remove(classes$r.carouselResize),resize.call(this),this.element.classList.add(classes$r.carouselResize)}}destroySlider(){this.slider.classList.add(classes$r.carouselInactive),this.flkty!==null&&(this.flkty.destroy(),this.flkty=null)}checkSlidesSize(){const sliderItemStyle=this.container.querySelector(selectors$x.sliderItem).currentStyle||window.getComputedStyle(this.container.querySelector(selectors$x.sliderItem));this.gutter=parseInt(sliderItemStyle.marginRight);const containerWidth=this.slider.offsetWidth,itemsWidth=this.getItemsWidth(),itemsOverflowViewport=containerWidth<itemsWidth;window.innerWidth>=theme.sizes.small&&itemsOverflowViewport?this.initSlider():this.destroySlider()}changeTabIndex(){const selectedElementsIndex=this.flkty.selectedIndex;this.flkty.slides.forEach((slide,index)=>{slide.cells.forEach(cell=>
21{cell.element.querySelectorAll(selectors$x.links).forEach(link=>{link.setAttribute(attributes$n.tabIndex,selectedElementsIndex===index?"0":"-1")})})})}getItemsWidth(){let itemsWidth=0;const slides=this.slider.querySelectorAll(selectors$x.sliderItem);return slides.length&&slides.forEach(item=>{itemsWidth+=item.offsetWidth+this.gutter}),itemsWidth}listen(){this.slider&&(this.checkSlidesSize(),document.addEventListener("theme:resize:width",this.checkSlidesSizeOnResize))}setSliderArrowsPosition(slider2){const arrows=slider2.querySelectorAll(selectors$x.flickityButton),images=slider2.querySelectorAll(selectors$x.sliderItemImage);let tallestImageHeight=0;images.forEach(image=>{image.offsetHeight>tallestImageHeight&&(tallestImageHeight=image.offsetHeight)}),arrows.length&&tallestImageHeight>0&&arrows.forEach(arrow=>{arrow.style.top=`${tallestImageHeight/2}px`})}onBlockSelect(evt){if(this.flkty!==null){const index=parseInt([...evt.target.parentNode.children].indexOf(evt.target)),slidesPerPage=parseInt(this.flkty.slides[0].cells.length),groupIndex=Math.floor(index/slidesPerPage),slider2=evt.target.closest(selectors$x.slider);if(!evt.detail.load){this.flkty.select(groupIndex);return}const onTransitionEnd=()=>{requestAnimationFrame(()=>{this.flkty.select(groupIndex),this.setSliderArrowsPosition(slider2)}),this.flkty.element.removeEventListener("transitionend",onTransitionEnd)};this.flkty.element.addEventListener("transitionend",onTransitionEnd)}else{const sliderStyle=this.slider.currentStyle||window.getComputedStyle(this.slider),sliderPadding=parseInt(sliderStyle.paddingLeft),blockPositionLeft=evt.target.offsetLeft-sliderPadding;this.slider.scrollTo({top:0,left:blockPositionLeft,behavior:"smooth"})}}onUnload(){document.removeEventListener("theme:resize:width",this.checkSlidesSizeOnResize)}}register("columns-with-image",[{onLoad(){sections$r[this.id]=new ColumnsWithImage(this)},onUnload(e){sections$r[this.id].onUnload(e)},onBlockSelect(e){sections$r[this.id].onBlockSelect(e)}},videoPlay]);const selectors$w={formMessageClose:"[data-form-message-close]",formMessageWrapper:"[data-form-message]"},classes$q={hideDown:"hide-down",notificationVisible:"notification-visible"};let sections$q={};class ContactForm{constructor(section){this.container=section.container,this.closeButton=this.container.querySelector(selectors$w.formMessageClose),this.messageWrapper=this.container.querySelector(selectors$w.formMessageWrapper),this.messageWrapper&&(this.hidePopups(),this.closeFormMessage(),this.autoHideMessage())}hidePopups(){document.body.classList.add(classes$q.notificationVisible)}showPopups(){document.body.classList.remove(classes$q.notificationVisible)}closeFormMessage(){this.closeButton.addEventListener("click",this.closeMessage.bind(this))}closeMessage(e){e.preventDefault(),this.messageWrapper.classList.add(classes$q.hideDown),this.showPopups()}autoHideMessage(){setTimeout(()=>{this.messageWrapper.classList.add(classes$q.hideDown),this.showPopups()},1e4)}}register("contact-form",{onLoad(){sections$q[this.id]=new ContactForm(this)}});const selectors$v={time:"time",days:"[data-days]",hours:"[data-hours]",minutes:"[data-minutes]",seconds:"[data-seconds]",sectionType:"[data-section-type]",shopifySection:".shopify-section",productTimer:"[data-product-timer]",aosItem:"[data-aos]"},classes$p={countdownTimerShowMessage:"countdown-timer--show-message",aosAnimate:"aos-animate",aosLoading:"aos-loading",countdown:"countdown"},attributes$m={expirationBehavior:"data-expiration-behavior",leadingZero:"data-leading-zero"},settings$1={hide:"hide",showMessage:"show-message"};class CountdownTimer extends HTMLElement{constructor(){super(),this.section=this.closest(selectors$v.sectionType),this.shopifySection=this.closest(selectors$v.shopifySection),this.productTimer=this.closest(selectors$v.productTimer),this.expirationBehavior=this.getAttribute(attributes$m.expirationBehavior),this.leadingZero=this.hasAttribute(attributes$m.leadingZero),this.time=this.querySelector(selectors$v.time),this.endDate=Date.parse(this.time.dateTime),this.days=this.querySelector(selectors$v.days),this.hours=this.querySelector(selectors$v.hours),this.minutes=this.querySelector(selectors$v.minutes),this.seconds=this.querySelector(selectors$v.seconds),this.daysInMs=1e3*60*60*24,this.hoursInMs=this.daysInMs/24,this.minutesInMs=this.hoursInMs/60,this.secondsInMs=this.minutesInMs/60,this.isLoading=!0,this.shouldHideOnComplete=this.expirationBehavior===settings$1.hide,this.shouldShowMessage=this.expirationBehavior===settings$1.showMessage,this.isAnimated=!1,this.update=this.update.bind(this)}connectedCallback(){this.init()}disconnectedCallback(){this.stopTimer()}init(){if(isNaN(this.endDate)){this.onComplete();return}if(this.endDate<=Date.now()){this.onComplete();return}
21this.section.classList.contains(classes$p.countdown)&&this.onLoad(!0),this.interval=setInterval(this.update,1e3)}stopTimer(){clearInterval(this.interval)}convertTime(timeInMs){const days=this.formatDigits(parseInt(timeInMs/this.daysInMs,10));timeInMs-=days*this.daysInMs;const hours=this.formatDigits(parseInt(timeInMs/this.hoursInMs,10));timeInMs-=hours*this.hoursInMs;const minutes=this.formatDigits(parseInt(timeInMs/this.minutesInMs,10));timeInMs-=minutes*this.minutesInMs;const seconds=this.formatDigits(parseInt(timeInMs/this.secondsInMs,10));return{days,hours,minutes,seconds}}formatDigits(number){return number<10&&this.leadingZero&&(number="0"+number),number}render(timer){this.days.textContent=timer.days,this.hours.textContent=timer.hours,this.minutes.textContent=timer.minutes,this.seconds.textContent=timer.seconds}onComplete(){this.render({days:0,hours:0,minutes:0,seconds:0}),this.shouldHideOnComplete&&!window.Shopify.designMode&&(this.productTimer?this.productTimer.remove():this.shopifySection.remove(),document.dispatchEvent(new CustomEvent("theme:parallax:refresh"))),this.shouldShowMessage&&this.classList.add(classes$p.countdownTimerShowMessage)}triggerAnimations(){theme.settings.animations!="false"&&this.section.querySelectorAll(selectors$v.aosItem).forEach(element=>{this.isAnimated&&element.classList.add(classes$p.aosAnimate)})}removeAnimations(){this.section.querySelectorAll(selectors$v.aosItem).forEach(element=>{requestAnimationFrame(()=>{element.classList.contains(classes$p.aosAnimate)&&(element.classList.remove(classes$p.aosAnimate),this.isAnimated=!0)})})}onLoad(init){if(init){this.removeAnimations();return}this.isLoading=!1,this.triggerAnimations()}update(){const currentDate=Date.now(),timeDiff=this.endDate-currentDate;if(timeDiff<=0){this.stopTimer(),this.onComplete();return}const remainingTime=this.convertTime(timeDiff);this.render(remainingTime),this.isLoading&&this.onLoad(!1)}}register("countdown",[videoPlay,parallaxSection]),customElements.get("countdown-timer")||customElements.define("countdown-timer",CountdownTimer);const selectors$u={videoId:"[data-video-id]",videoPlayer:"[data-video-player]",videoTemplate:"[data-video-template]",videoAutoplay:"[data-video-autoplay]",videoWrapper:"[data-video-wrapper]",videoPlayButton:"[data-video-bg-play]"},classes$o={loading:"is-loading",paused:"is-paused"},sections$p={};class VideoBackground{constructor(container){this.container=container,this.videoId=this.container.querySelector(selectors$u.videoId),this.videoPlayer=this.container.querySelector(selectors$u.videoPlayer),this.videoTemplate=this.container.querySelector(selectors$u.videoTemplate),this.videoPlayButton=this.container.querySelector(selectors$u.videoPlayButton),this.init()}init(){if(!this.videoId)return;new IntersectionObserver((entries,observer)=>{entries.forEach(entry=>{if(entry.isIntersecting){const videoMarkup=this.videoTemplate.innerHTML;this.videoPlayer.innerHTML=videoMarkup,this.video=this.container.querySelector(selectors$u.videoAutoplay),this.videoPlayer.classList.remove(classes$o.loading),this.container.classList.add(classes$o.paused),this.listen(),observer.unobserve(entry.target)}})},{root:null,rootMargin:"300px",threshold:[0,.1,.25,.5,.75,1]}).observe(this.videoPlayer),this.videoPlayButton.addEventListener("click",event=>{event.preventDefault(),this.video?.play()})}listen(){this.video.addEventListener("play",()=>{this.container.classList.remove(classes$o.paused)}),this.container.addEventListener("touchstart",()=>{this.video.play()},{passive:!0})}}const videoBackground={onLoad(){sections$p[this.id]=[],this.container.querySelectorAll(selectors$u.videoWrapper).forEach(videoWrapper=>{sections$p[this.id].push(new VideoBackground(videoWrapper))})}};class PopupCookie{constructor(name,value){this.configuration={expires:null,path:"/",domain:window.location.hostname,sameSite:"none",secure:!0},this.name=name,this.value=value}write(){(document.cookie.indexOf("; ")!==-1&&!document.cookie.split("; ").find(row=>row.startsWith(this.name))||document.cookie.indexOf("; ")===-1)&&(document.cookie=`${this.name}=${this.value}; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=${this.configuration.domain}; sameSite=${this.configuration.sameSite}; secure=${this.configuration.secure}`)}read(){return document.cookie.indexOf("; ")!==-1&&document.cookie.split("; ").find(row=>row.startsWith(this.name))?document.cookie.split("; ").find(row=>row.startsWith(this.name)).split("=")[1]:!1}destroy(){document.cookie.split("; ").find(row=>row.startsWith(this.name))&&(document.cookie=`${this.name}=null; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=${this.configuration.domain}; sameSite=${this.configuration.sameSite}; secure=${this.configuration.secure}`)}}const selectors$t={newsletterForm:"[data-newsletter-form]",popup:"[data-popup]",section:"section",footer
21:"footer",shopifySection:".shopify-section",header:"[data-site-header]"},classes$n={success:"has-success",error:"has-error",parallaxFooter:"section-footer--parallax"},attributes$l={storageNewsletterFormId:"newsletter_form_id"},sections$o={};class Newsletter{constructor(newsletter){this.newsletter=newsletter,this.sessionStorage=window.sessionStorage,this.popup=this.newsletter.closest(selectors$t.popup),this.stopSubmit=!0,this.isChallengePage=!1,this.formID=null,this.formIdSuccess=null,this.checkForChallengePage(),this.newsletterSubmit=e=>this.newsletterSubmitEvent(e),this.isChallengePage||this.init()}init(){this.newsletter.addEventListener("submit",this.newsletterSubmit),this.showMessage()}newsletterSubmitEvent(e){this.stopSubmit&&(e.preventDefault(),this.removeStorage(),this.writeStorage(),this.stopSubmit=!1,this.newsletter.submit())}checkForChallengePage(){this.isChallengePage=window.location.pathname===theme.routes.root+"challenge"}writeStorage(){this.sessionStorage!==void 0&&this.sessionStorage.setItem(attributes$l.storageNewsletterFormId,this.newsletter.id)}readStorage(){this.formID=this.sessionStorage.getItem(attributes$l.storageNewsletterFormId)}removeStorage(){this.sessionStorage.removeItem(attributes$l.storageNewsletterFormId)}showMessage(){if(this.readStorage(),this.newsletter.id===this.formID){const newsletter=document.getElementById(this.formID),submissionSuccess=window.location.search.indexOf("?customer_posted=true")!==-1,submissionFailure=window.location.search.indexOf("accepts_marketing")!==-1;submissionSuccess?(newsletter.classList.remove(classes$n.error),newsletter.classList.add(classes$n.success),this.popup&&(this.cookie=new PopupCookie(this.popup.dataset.cookieName,"user_has_closed"),this.cookie.write())):submissionFailure&&(newsletter.classList.remove(classes$n.success),newsletter.classList.add(classes$n.error)),(submissionSuccess||submissionFailure)&&this.scrollToForm(newsletter)}}scrollToForm(newsletter){let{stickyHeaderHeight}=window.theme.readHeights();const headerHeight=stickyHeaderHeight||0,newsletterSection2=newsletter.closest(selectors$t.section),newsletterFooter=newsletter.closest(selectors$t.footer);visibilityHelper.isElementPartiallyVisible(newsletter)||visibilityHelper.isElementTotallyVisible(newsletter)||setTimeout(()=>{let windowScroll=window.scrollY,newsletterTop=newsletter.getBoundingClientRect().top;newsletterSection2?newsletterTop=newsletterSection2.getBoundingClientRect().top:newsletterFooter&&newsletterFooter.closest(selectors$t.shopifySection).classList.contains(classes$n.parallaxFooter)&&(newsletterTop=document.body.scrollHeight,windowScroll=0);const scrollTo=newsletterTop-headerHeight+windowScroll;window.scrollTo({top:scrollTo,left:0,behavior:"smooth"})},400)}onUnload(){this.newsletter.removeEventListener("submit",this.newsletterSubmit)}}const newsletterSection={onLoad(){sections$o[this.id]=[],this.container.querySelectorAll(selectors$t.newsletterForm).forEach(form=>{sections$o[this.id].push(new Newsletter(form))})},onUnload(){sections$o[this.id].forEach(form=>{typeof form.onUnload=="function"&&form.onUnload()})}},selectors$s={product:"[data-product]",productSlider:"[data-slider]",productSlide:"[data-slide]",productGridItemImage:"[data-product-media-container]",flickityButton:".flickity-button",item:"[data-slide]",links:"a, button"},attributes$k={tabIndex:"tabindex"},sections$n={};class CustomContent{constructor(container){this.container=container,this.product=this.container.querySelectorAll(selectors$s.product),this.productSlider=this.container.querySelectorAll(selectors$s.productSlider),this.checkSliderOnResize=()=>this.checkSlider(),this.resizeSliderEvent=event=>this.resizeSlider(event),this.flkty=[],this.videoObj=[],this.quickViewObj=[],this.listen()}checkSlider(){window.innerWidth>=theme.sizes.small?this.productSlider.forEach(slider2=>{this.initProductSlider(slider2)}):this.productSlider.forEach(slider2=>{this.destroyProductSlider(slider2)})}changeTabIndex(slider2){const sliderId=slider2.dataset.slider,selectedElementsIndex=this.flkty[sliderId].selectedIndex;
21this.flkty[sliderId].slides.forEach((slide,index)=>{slide.cells.forEach(cell=>{cell.element.querySelectorAll(selectors$s.links).forEach(link=>{link.setAttribute(attributes$k.tabIndex,selectedElementsIndex===index?"0":"-1")})})})}initProductSlider(slider2){const slidesCount=slider2.querySelectorAll(selectors$s.productSlide).length,sliderId=slider2.dataset.slider;slidesCount>1&&(this.flkty[sliderId]===void 0||!this.flkty[sliderId].isActive?this.flkty[sliderId]=new window.theme.Flickity(slider2,{prevNextButtons:!0,adaptiveHeight:!0,pageDots:!0,wrapAround:!0,on:{ready:()=>{this.setSliderArrowsPosition(slider2),setTimeout(()=>{this.changeTabIndex(slider2)},0)},change:()=>{this.changeTabIndex(slider2)}}}):this.setSliderArrowsPosition(slider2))}destroyProductSlider(slider2){const sliderId=slider2.dataset.slider;typeof this.flkty[sliderId]=="object"&&this.flkty[sliderId].destroy()}setSliderArrowsPosition(slider2){const arrows=slider2.querySelectorAll(selectors$s.flickityButton),image=slider2.querySelector(selectors$s.productGridItemImage);arrows.length&&image&&arrows.forEach(arrow=>{arrow.style.top=`${image.offsetHeight/2}px`})}resizeSlider(event){const slider2=event.target,flkty=window.theme.Flickity.data(slider2)||null;flkty&&flkty.resize()}listen(){this.checkSlider(),document.addEventListener("theme:resize:width",this.checkSliderOnResize),this.productSlider.forEach(slider2=>{slider2.addEventListener("theme:slider:resize",this.resizeSliderEvent)})}onUnload(){if(this.flkty)for(const key in this.flkty)this.flkty.hasOwnProperty(key)&&this.flkty[key].destroy();document.removeEventListener("theme:resize:width",this.checkSliderOnResize),this.productSlider.forEach(slider2=>{slider2.removeEventListener("theme:slider:resize",this.resizeSliderEvent)})}}register("custom-content",[{onLoad(){sections$n[this.id]=new CustomContent(this.container)},onUnload(e){sections$n[this.id].onUnload(e)}},newsletterSection,videoPlay,tooltip,videoBackground,productGrid]);const selectors$r={slider:"[data-slider]",sliderItem:"[data-slide]",productGridItemImage:"[data-product-media-container]",links:"a, button",flickityButton:".flickity-button",promo:"[data-promo]",productGridItems:"[data-product-block]"},classes$m={carousel:"carousel",carouselInactive:"carousel--inactive",isLastSlideVisible:"is-last-slide-visible",featuredCollection:"featured-collection",promoFullWidth:"collection-promo--full",promoTwoItemsWidth:"collection-promo--two-columns"}
21,attributes$j={sliderId:"data-slider-id",showImage:"data-slider-show-image",tabIndex:"tabindex"},sections$m={};class GridSlider{constructor(container){this.container=container,this.columns=parseInt(this.container.dataset.columns),this.sliders=this.container.querySelectorAll(selectors$r.slider),this.checkSlidesSizeOnResize=()=>this.checkSlidesSize(),this.resetSliderEvent=e=>this.resetSlider(e),this.resizeSliderEvent=event=>this.resizeSlider(event),this.flkty=[],this.listen(),this.handleLastSlideOverlayOnMobile()}initSlider(slider2){const sliderId=slider2.getAttribute(attributes$j.sliderId);slider2.classList.remove(classes$m.carouselInactive),this.flkty[sliderId]===void 0||!this.flkty[sliderId].isActive?(this.flkty[sliderId]=new window.theme.Flickity(slider2,{pageDots:!1,cellSelector:selectors$r.sliderItem,cellAlign:"left",groupCells:!0,contain:!0,wrapAround:!1,adaptiveHeight:!1,on:{ready:()=>{this.setSliderArrowsPosition(slider2),setTimeout(()=>{this.changeTabIndex(slider2)},0)},change:()=>{this.changeTabIndex(sli
21der2)}}}),this.handleLastSlideOverlayOnTablet(slider2)):this.setSliderArrowsPosition(slider2)}destroySlider(slider2){const sliderId=slider2.getAttribute(attributes$j.sliderId);slider2.classList.contains(classes$m.carousel)&&slider2.classList.add(classes$m.carouselInactive),typeof this.flkty[sliderId]=="object"&&this.flkty[sliderId].destroy()}resetSlider(e){const slider2=e.target,sliderId=slider2.getAttribute(attributes$j.sliderId);typeof this.flkty[sliderId]=="object"?this.flkty[sliderId].select(0,!1,!0):slider2.scrollTo({left:0,behavior:"instant"})}resizeSlider(event){const slider2=event.target,flkty=window.theme.Flickity.data(slider2)||null;flkty&&flkty.resize()}checkSlidesSize(){this.sliders.length&&this.sliders.forEach(slider2=>{const columns=this.columns,isDesktop=window.innerWidth>=theme.sizes.large,isLaptop=window.innerWidth>=theme.sizes.large&&window.innerWidth<theme.sizes.widescreen,isTablet=window.innerWidth>=theme.sizes.small&&window.innerWidth<theme.sizes.large;let itemsCount=slider2.querySelectorAll(selectors$r.sliderItem).length;const promos=slider2.querySelectorAll(selectors$r.promo);promos.length&&isDesktop&&promos.forEach(promo=>{promo.classList.contains(classes$m.promoFullWidth)?itemsCount+=columns-1:promo.classList.contains(classes$m.promoTwoItemsWidth)&&(itemsCount+=1)}),slider2.hasAttribute(attributes$j.showImage)&&(itemsCount+=1),isDesktop&&itemsCount>columns||isLaptop&&itemsCount>3||isTablet&&itemsCount>2?(this.initSlider(slider2),this.getTallestProductGridItem(slider2)):this.destroySlider(slider2)})}changeTabIndex(slider2){const sliderId=slider2.getAttribute(attributes$j.sliderId),selectedElementsIndex=this.flkty[sliderId].selectedIndex;this.flkty[sliderId].slides.forEach((slide,index)=>{slide.cells.forEach(cell=>
21{cell.element.querySelectorAll(selectors$r.links).forEach(link=>{link.setAttribute(attributes$j.tabIndex,selectedElementsIndex===index?"0":"-1")})})})}setSliderArrowsPosition(slider2){const arrows=slider2.querySelectorAll(selectors$r.flickityButton),image=slider2.querySelector(selectors$r.productGridItemImage);arrows.length&&image&&arrows.forEach(arrow=>{arrow.style.top=`${image.offsetHeight/2}px`})}handleLastSlideOverlayOnTablet(slider2){const sliderId=slider2.getAttribute(attributes$j.sliderId);this.flkty[sliderId].on("select",()=>{if(!(window.innerWidth>=theme.sizes.small&&window.innerWidth<theme.sizes.large))return;const selectedIndex=this.flkty[sliderId].selectedIndex,isLastSliderGroup=this.flkty[sliderId].slides.length-1===selectedIndex;slider2.parentNode.classList.toggle(classes$m.isLastSlideVisible,isLastSliderGroup)})}getTallestProductGridItem(slider2){if(slider2.querySelectorAll(selectors$r.promo).length){const productGridItems=slider2.querySelectorAll(selectors$r.productGridItems),tallestGridItemHeight=Math.max(...Array.from(productGridItems).map(productGridItem=>productGridItem.offsetHeight));slider2.style.setProperty("--carousel-promo-height",`${tallestGridItemHeight}px`)}}
21handleLastSlideOverlayOnMobile(){this.sliders.forEach(slider2=>{slider2.addEventListener("scroll",event=>{if(!(window.innerWidth<theme.sizes.small))return;const offsetWidth=event.target.offsetWidth,isLastSlideVisible=Array.from(slider2.children).pop().getBoundingClientRect().left+80<offsetWidth;slider2.parentNode.classList.toggle(classes$m.isLastSlideVisible,isLastSlideVisible)})})}listen(){this.sliders.length&&(this.checkSlidesSize(),document.addEventListener("theme:resize:width",this.checkSlidesSizeOnResize),this.sliders.forEach(slider2=>{slider2.addEventListener("theme:tab:change",this.resetSliderEvent),slider2.addEventListener("theme:slider:resize",this.resizeSliderEvent)}))}onBlockSelect(evt){const slider2=evt.target.closest(selectors$r.slider),flkty=window.theme.Flickity.data(slider2)||null;if(!slider2)return;let parent=evt.target.parentNode,target=evt.target;if(this.container.classList.contains(classes$m.featuredCollection)&&(parent=parent.parentNode,target=target.parentNode),flkty!==null&&flkty.isActive){const index=parseInt([...parent.children].indexOf(target)),slidesPerPage=parseInt(flkty.slides[0].cells.length),groupIndex=Math.floor(index/slidesPerPage);if(!evt.detail.load){this.flkty.select(groupIndex);return}const onTransitionEnd=()=>{requestAnimationFrame(()=>{flkty.select(groupIndex),this.setSliderArrowsPosition(slider2)}),flkty.element.removeEventListener("transitionend",onTransitionEnd)};flkty.element.addEventListener("transitionend",onTransitionEnd)}else{const sliderStyle=slider2.currentStyle||window.getComputedStyle(slider2),sliderPadding=parseInt(sliderStyle.paddingLeft),blockPositionLeft=target.offsetLeft-sliderPadding;slider2.scrollTo({top:0,left:blockPositionLeft,behavior:"smooth"})}}onUnload(){if(this.flkty)for(const key in this.flkty)this.flkty.hasOwnProperty(key)&&this.flkty[key].destroy();document.removeEventListener("theme:resize:width",this.checkSlidesSizeOnResize),this.sliders.length&&this.sliders.forEach(sli
21der2=>{slider2.removeEventListener("theme:tab:change",this.resetSliderEvent),slider2.removeEventListener("theme:slider:resize",this.resizeSliderEvent)})}}const gridSlider={onLoad(){sections$m[this.id]=[],this.container.querySelectorAll(selectors$r.slider).forEach(el=>{sections$m[this.id].push(new GridSlider(this.container))})},onUnload(){sections$m[this.id].forEach(el=>{typeof el.onUnload=="function"&&el.onUnload()})},onBlockSelect(e){sections$m[this.id].forEach(el=>{typeof el.onBlockSelect=="function"&&el.onBlockSelect(e)})}};register("featured-collection",[productGrid,tooltip,gridSlider]),register("featured-video",[videoPlay,videoBackground]);const selectors$q={shopPayWrapper:"[data-shop-pay-wrapper]",shopLoginButton:"shop-login-button",shopFollowButton:"shop-follow-button",followOnShopButton:"follow-on-shop-button",heartIcon:"heart-icon",shopLogo:"shop-logo"},sections$l={};class ShopPayLink{constructor(container){this.container=container,this.shopPayWrapper=document.querySelector(selectors$q.shopPayWrapper),this.shopLoginButton=document.querySelector(selectors$q.shopLoginButton),this.init()}init(){if(!this.shopLoginButton||!this.shopPayWrapper)return;const bgColor=this.shopPayWrapper.dataset.bg||"transparent",textColor=this.shopPayWrapper.dataset.text||"#fff",hoverColor=this.shopPayWrapper.dataset.hover||"#fff";this.mainButtonStyles=` 22 :host { 23 --bg-color: ${bgColor}; 24 --text-color: ${textColor}; 25 --hover-color: ${hoverColor}; 26 } 27 28 .follow-icon-wrapper:before { 29 background: var(--bg-color); 30 border-color: var(--text-color); 31 transition: border 0.3s ease; 32 } 33 34 .button:not(.button--following):focus-visible .follow-icon-wrapper:before, 35 .button:not(.button--following):hover .follow-icon-wrapper:before { 36 background: var(--bg-color); 37 border-color: var(--hover-color); 38 } 39 40 .button { 41 background: transparent; 42 color: var(--text-color); 43 } 44 45 .following-text { 46 color: var(--text-color); 47 } 48 49 .button--following:focus-visible, 50 .button--following:hover { 51 background: var(--bg-color); 52 } 53 54 .button:not(.button--following):focus-visible .follow-icon-wrapper:before, 55 .button:not(.button--following):hover .follow-icon-wrapper:before { 56 background: var(--bg-color); 57 border-color: var(--hover-color); 58 } 59 `,this.svgIconsStyles=` 60 :host { 61 color: ${textColor}; 62 } 63 `,customElements.whenDefined(selectors$q.shopLoginButton).then(res=>{requestAnimationFrame(()=>{const shadowRoot3=this.shopLoginButton.shadowRoot?.querySelector(selectors$q.shopFollowButton)?.shadowRoot?.querySelector(selectors$q.followOnShopButton)?.shadowRoot;shadowRoot3&&this.overwriteStyles(shadowRoot3.host.shadowRoot,this.mainButtonStyles);const shadowRoot4=shadowRoot3.querySelector(selectors$q.heartIcon)?.shadowRoot,shadowRoot5=shadowRoot3.querySelector(selectors$q.shopLogo)?.shadowRoot;shadowRoot4&&this.overwriteStyles(shadowRoot4.host.shadowRoot,this.svgIconsStyles),shadowRoot5&&this.overwriteStyles(shadowRoot5.host.shadowRoot,this.svgIconsStyles)})})}overwriteStyles(element,styles){let style=document.createElement("style");style.innerHTML=styles,element.appendChild(style)}}const shopPayLink={onLoad(){sections$l[this.id]=new ShopPayLink(this.container)}},selectors$p={wave:":scope > [data-wave]",main:"[data-main]",trigger:"[data-collapsible-trigger-mobile]",footerParallax:'[data-parallax="footer"]'},classes$l={isExpanded:"is-expanded",wavy:"wavy",shadow:"parallax-shadow",rounded:"parallax-rounded-corners",mainParallax:"main-content--parallax",footerParallax:"section-footer--parallax",sectionFooterVisible:"section-footer--visible",mainContent:"main-content",shopifySection:"shopify-section",bodyRoundedCornersLarge:"body--rounded-corners-large"},attributes$i={bg:"--bg",footerBg:"--footer-bg",parallax:"data-parallax",parallaxWavy:"data-parallax-wavy",parallaxRounded:"data-parallax-rounded-corners",parallaxRoundedLarge:"data-parallax-rounded-corners-large",parallaxSafari:"data-parallax-disable-on-safari"},sections$k={};class Footer{constructor(section){this.container=section.container,this.main=document.querySelector(selectors$p.main),this.footerParallax=null,this.wavyEnabled=this.container.hasAttribute(attributes$i.parallaxWavy),this.parentContainer=this.container.parentNode,this.resizeEvent=()=>this.resize(),this.unloadEvent=()=>this.onUnload(),requestIdleCallback(()=>{this.container.hasAttribute(attributes$i.parallax)&&!this.main.classList.contains(classe
63s$l.mainParallax)&&(this.init(),document.addEventListener("theme:resize",this.resizeEvent),document.addEventListener("theme:footer:unload",this.unloadEvent))})}init(){const isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&this.container.hasAttribute(attributes$i.parallaxSafari),stopParallax=this.isViewportSmaller()||window.innerWidth<theme.sizes.small||isSafari,body=document.body;body.classList.remove(classes$l.bodyRoundedCornersLarge);const bgColor=getComputedStyle(this.container).getPropertyValue(attributes$i.bg);this.parentContainer.style.setProperty("--footer-parallax-height","auto");let prevSection=this.parentContainer.previousElementSibling;if(prevSection){if(!prevSection.classList.contains(classes$l.shopifySection)&&!prevSection.classList.contains(classes$l.mainContent)&&(prevSection=this.main),this.wavyEnabled&&!stopParallax){[...prevSection.querySelectorAll(selectors$p.wave)].map(wave2=>wave2.remove());const wave=this.container.querySelector(selectors$p.wave);prevSection.append(wave.cloneNode(!0)),prevSection.classList.add(classes$l.wavy),this.container.classList.remove(classes$l.wavy)}else this.container.hasAttribute(attributes$i.parallaxRounded)&&!this.wavyEnabled?(prevSection.classList.toggle(classes$l.rounded,!stopParallax),prevSection.classList.toggle(classes$l.shadow,!stopParallax),this.container.hasAttribute(attributes$i.parallaxRoundedLarge)&&body.classList.toggle(classes$l.bodyRoundedCornersLarge,!stopParallax)):stopParallax||prevSection.classList.add(classes$l.shadow);prevSection.style.setProperty(attributes$i.footerBg,bgColor)}stopParallax||(this.main.classList.add(classes$l.mainParallax),this.parentContainer.classList.add(classes$l.footerParallax),this.parentContainer.style.setProperty("--footer-parallax-height",`${this.container.clientHeight}px`),this.footerParallax=new ParallaxElement(this.container))}resize(){this.parentContainer.style.setProperty("--footer-parallax-height","auto"),(this.isViewportSmaller()||window.innerWidth<theme.sizes.small||!this.footerParallax)&&this.onUnload(!0),this.parentContainer.style.setProperty("--footer-parallax-height",`${this.container.clientHeight}px`)}isViewportSmaller(){const viewportHeight=Math.round(Math.max(document.documentElement.clientHeight,window.innerHeight||0)),footerHeight=this.container.clientHeight;let waveHeight=0;return this.wavyEnabled&&(waveHeight=50),viewportHeight<footerHeight+waveHeight}onBlockSelect(e){const trigger=e.target.querySelector(selectors$p.trigger);requestAnimationFrame(()=>{trigger&&!trigger.classList.contains(classes$l.isExpanded)&&trigger.dispatchEvent(new Event("click"))})}onBlockDeselect(e){const trigger=e.target.querySelector(selectors$p.trigger);requestAnimationFrame(()=>{trigger&&trigger.classList.contains(classes$l.isExpanded)&&trigger.dispatchEvent(new Event("click"))})}onUnload(reset=!1){document.removeEventListener("theme:resize",this.resizeEvent),document.removeEventListener("theme:footer:unload",this.unloadEvent),this.footerParallax&&(this.footerParallax.unload(),reset&&removeFooterWave(this.parentContainer)),(this.footerParallax||reset)&&setTimeout(()=>{const shopifyInstances=Shopify.theme.sections.instances,parallaxFooters=document.querySelectorAll(selectors$p.footerParallax),footerInstance=shopifyInstances.filter(instance=>instance.container===parallaxFooters[0]);this.main.classList.remove(classes$l.mainParallax),this.parentContainer.classList.remove(classes$l.footerParallax),this.parentContainer.classList.remove(classes$l.sectionFooterVisible),footerInstance[0]&&footerInstance[0].onLoad()})}}register("footer",[newsletterSection,collapsible,{onLoad(){sections$k[this.id]=new Footer(this)},onBlockSelect(e){sections$k[this.id].onBlockSelect(e)},onBlockDeselect(e){sections$k[this.id].onBlockDeselect(e)},onReorder(){sections$k[this.id].onUnload()},onUnload(){sections$k[this.id].onUnload()}},shopPayLink]);const selectors$o={slider:"[data-slider]"};let sections$j={};class IconsRow{constructor(section){this.container=section.container,this.slider=this.container.querySelector(selectors$o.slider)}onBlockSelect(evt){const sliderStyle=this.slider.currentStyle||window.getComputedStyle(this.slider),sliderPadding=parseInt(sliderStyle.paddingLeft),blockPositionLeft=evt.target.offsetLeft-sliderPadding;this.slider.scrollTo({top:0,left:blockPositionLeft,behavior:"smooth"})}}register("icons-row",{onLoad(){sections$j[this.id]=new IconsRow(this)},onBlockSelect(e){sections$j[this.id].onBlockSelect(e)}});const selectors$n={item:"[data-accordion-item]",button:"[data-accordion-button]"},classes$k={isActive:"is-active",toAnimate:"to-animate",isAnimating:"is-animating"},sections$i={};class ImageAccordions{constructor(section){this.container=section.container,this.controller=new AbortController,this.imageAccordionsItems=this.container.querySelectorAll(selectors$n.item),this.buttons=this.container.querySelectorAll(selectors$n.button),this.accordionExpandEvent=item=>this.accordionExpand(item),this.accordionFocusEvent=item=>this.accordionFocus(item),this.init()}init(){this.triggerLoadingAnimation(),this.imageAccordionsItems.forEac
63h(item=>{item.addEventListener("mouseenter",this.accordionExpandEvent.bind(this,item))}),this.buttons.forEach(button=>{button.addEventListener("focusin",this.accordionFocusEvent.bind(this,button))})}triggerLoadingAnimation(){if(theme.settings.animationsEnabled=="false"||window.theme.isMobile())return;const onAnimationEnd=event=>{event.animationName==="expandAccordion"&&(this.accordionExpand(this.imageAccordionsItems[0]),this.container.classList.remove(classes$k.toAnimate),this.container.classList.remove(classes$k.isAnimating),this.container.removeEventListener("animationend",onAnimationEnd))},onTransitionEnd=event=>{requestAnimationFrame(()=>{event.target===this.container&&(this.container.classList.add(classes$k.isAnimating),this.container.removeEventListener("transitionend",onTransitionEnd))})};this.container.addEventListener("transitionend",onTransitionEnd,{signal:this.controller.signal}),this.container.addEventListener("animationend",onAnimationEnd,{signal:this.controller.signal})}accordionExpand(item){item.classList.contains(classes$k.isActive)||(this.imageAccordionsItems.forEach(item2=>{item2.classList.remove(classes$k.isActive)}),item.classList.add(classes$k.isActive))}accordionFocus(button){button.closest(selectors$n.item).dispatchEvent(new Event("mouseenter"))}onBlockSelect(event){const element=event.target;element&&(this.controller.abort(),this.container.classList.remove(classes$k.toAnimate,classes$k.isAnimating),this.accordionExpand(element),window.theme.isMobile()&&element.parentNode.scrollTo({top:0,left:element.offsetLeft,behavior:"smooth"}))}}register("image-accordions",{onLoad(){sections$i[this.id]=new ImageAccordions(this)},onBlockSelect(event){sections$i[this.id].onBlockSelect(event)}});const selectors$m={trigger:"[data-collapsible-trigger]"},classes$j={isExpanded:"is-expanded"},sections$h={};class imageWithText{constructor(section){this.container=section.container}onBlockSelect(e){const trigger=e.target.querySelector(selectors$m.trigger);requestAnimationFrame(()=>{trigger&&!trigger.classList.contains(classes$j.isExpanded)&&trigger.dispatchEvent(new Event("click"))})}}register("image-with-text",[videoPlay,{onLoad(){sections$h[this.id]=new imageWithText(this)},onBlockSelect(e){sections$h[this.id].onBlockSelect(e)}},collapsible]),register("list-collections",gridSlider);const sections$g={},selectors$l={slider:"[data-slider-gallery]",sliderNav:"[data-slider-info]",item:"[data-slide-item]"};class Locations{constructor(section){this.container=section.container,this.slider=this.container.querySelector(selectors$l.slider),this.sliderNav=this.container.querySelector(selectors$l.sliderNav),this.flkty=null,this.flktyNav=null,this.resizeEvent=()=>this.enableAdaptiveHeight(),this.initSlider()}initSlider(){const slidesCount=this.container.querySelectorAll(selectors$l.item).length;this.flkty=window.theme.Flickity.data(this.slider),this.flktyNav=window.theme.Flickity.data(this.sliderNav),!(slidesCount<=1)&&(this.flkty=new window.theme.Flickity(this.slider,{fade:!0,wrapAround:!0,adaptiveHeight:!0,prevNextButtons:!1,pageDots:!1}),window.theme.flickitySmoothScrolling(this.slider),this.flktyNav=new window.theme.Flickity(this.sliderNav,{fade:!0,wrapAround:!0,imagesLoaded:!0,asNavFor:this.slider,prevNextButtons:!0,pageDots:!1}),this.enableAdaptiveHeight(),document.addEventListener("theme:resize",this.resizeEvent),this.flktyNav.on("change",()=>{if(this.flkty.selectCell(this.flktyNav.selectedIndex),window.theme.isMobile()){let{stickyHeaderHeight}=window.theme.readHeights();const headerHeight=stickyHeaderHeight||0,scrollTop=Math.round(window.scrollY),containerOffsetTopPoint=Math.round(this.container.getBoundingClientRect().top+scrollTop-headerHeight);window.scrollTo({top:containerOffsetTopPoint,left:0,behavior:"smooth"})}}),this.flkty.on("change",()=>{this.flktyNav.selectCell(this.flkty.selectedIndex)}))}enableAdaptiveHeight(){this.flktyNav.options.adaptiveHeight=!1,window.theme.isMobile()&&(this.flktyNav.options.adaptiveHeight=!0),this.flktyNav.resize()}onBlockSelect(evt){const index=parseInt([...evt.target.parentNode.children].indexOf(evt.target));this.flkty!==null&&this.flkty.select(index),this.flktyNav!==null&&this.flktyNav.select(index)}onUnload(){document.removeEventListener("theme:resize",this.resizeEvent)}}register("locations",{onLoad(){sections$g[this.id]=new Locations(this)},onBlockSelect(e){sections$g[this.id].onBlockSelect(e)},onUnload(){sections$g[this.id].onUnload()}});const sections$f={}
63,selectors$k={slider:"[data-slider]",sliderItem:"[data-slide-item]",sTLHotspotsItem:"[data-stl-hotspots-item]",pointer:"[data-pointer]",pointerBubble:"[data-pointer-bubble]",productGridItemImage:"[data-product-media-container]",quickViewItemHolder:"[data-quick-view-item-holder]",flickityButton:".flickity-button",links:"a, button",tooltip:"[data-tooltip]"},attributes$h={products:"data-products",pointer:"data-pointer",hotspot:"data-hotspot",tabIndex:"tabindex"},classes$i={productGridItemImageHover:"product-grid-item__image--hovered",isSelected:"is-selected",isActive:"is-active",onHover:"on-hover",popupOpen:"pswp--open"};class Look{constructor(container){this.container=container,this.slider=this.container.querySelector(selectors$k.slider),this.productOnRow=Number(this.slider?.getAttribute(attributes$h.products))||3,this.slides=this.container.querySelectorAll(selectors$k.sliderItem),this.sTLHotspotsItems=this.container.querySelectorAll(selectors$k.sTLHotspotsItem),this.pointers=this.container.querySelectorAll(selectors$k.pointer),this.pointerBubbles=this.container.querySelectorAll(selectors$k.pointerBubble),this.flkty=null,this.observer=null,this.checkSlidesSizeOnResize=()=>this.checkSlidesSize(),this.resizeSliderEvent=event=>this.resizeSlider(event),this.pointersInit=event=>this.dotPointers(event),this.pointersOver=event=>this.dotPointerIn(event),this.pointersOut=event=>this.dotPointerOut(event),this.debouncedBlockSelectCallback=window.theme.debounce(event=>this.debouncedBlockSelect(event),500),this.quickViewPopup=new QuickViewPopup(this.container),this.listen()}listen(){this.slider&&(this.checkSlidesSize(),document.addEventListener("theme:resize:width",this.checkSlidesSizeOnResize),this.slider.addEventListener("theme:slider:resize",this.resizeSliderEvent)),this.pointers.forEach(pointer=>{pointer.addEventListener("click",this.pointersInit),pointer.addEventListener("mouseover",this.pointersOver),pointer.addEventListener("mouseleave",this.pointersOut)}),this.pointerBubbles.forEach((pointerBubble,index)=>{pointerBubble.addEventListener("click",event=>[...this.pointers][index].dispatchEvent(new Event(event.type))),pointerBubble.addEventListener("mouseover",event=>[...this.pointers][index].dispatchEvent(new Event(event.type))),pointerBubble.addEventListener("mouseleave",event=>[...this.pointers][index].dispatchEvent(new Event(event.type)))})}checkSlidesSize(){const isMobile=window.innerWidth<theme.sizes.small,isDesktop=window.innerWidth>=theme.sizes.large,isTablet=window.innerWidth>=theme.sizes.small&&window.innerWidth<theme.sizes.large,shouldInitOnDesktop=!!(isDesktop&&this.slides.length>this.productOnRow),shouldInitOnTablet=!!(isTablet&&this.slides.length>2);if(this.initTooltips(),!isMobile){shouldInitOnDesktop||shouldInitOnTablet?this.initSlider():(this.destroySlider(),this.slidesTabIndex());return}this.destroySlider()}initTooltips(){this.tooltips=this.container.querySelectorAll(selectors$k.tooltip),this.tooltips.forEach(tooltip2=>{new Tooltip(tooltip2)})}initSlider(){if(this.flkty===null){this.flkty=new window.theme.Flickity(this.slider,{prevNextButtons:!0,wrapAround:!0,adaptiveHeight:!1,cellAlign:"left",groupCells:!1,contain:!0,on:{ready:()=>{this.slidesTabIndex(),this.setSliderArrowsPosition(),this.dotPointers()},change:()=>{this.slidesTabIndex(),this.dotPointers()}}});return}this.setSliderArrowsPosition()}setSliderArrowsPosition(){if(!(window.innerWidth>=theme.sizes.small))return;const arrows=this.slider.querySelectorAll(selectors$k.flickityButton),image=this.slider.querySelector(selectors$k.productGridItemImage);arrows.length&&image&&arrows.forEach(arrow=>{arrow.style.top=`${image.offsetHeight/2}px`})}slidesTabIndex(){if(this.slides.length<this.productOnRow+1){this.slider.querySelectorAll(selectors$k.links).forEac
63h(link=>{link.setAttribute(attributes$h.tabIndex,"0")});return}window.theme.Flickity.data(this.slider).cells.forEach(slide=>{let tabIndex="-1";slide.element.classList.contains(classes$i.isSelected)&&(tabIndex="0"),slide.element.querySelectorAll(selectors$k.links).forEach(link=>{link.setAttribute(attributes$h.tabIndex,tabIndex)})})}destroySlider(){typeof this.flkty=="object"&&this.flkty!==null&&(this.flkty.destroy(),this.flkty=null)}resizeSlider(event){const slider2=event.target,flkty=window.theme.Flickity.data(slider2)||null;flkty&&flkty.resize()}dotPointers(event){if(this.pointers.length===0)return;if(this.sTLHotspotsItems.forEach(element=>element.classList.remove(classes$i.onHover)),event){const dotIndex=event.target.getAttribute(attributes$h.pointer);this.flkty?.select(dotIndex);return}const slideIndex=this.flkty==null?0:this.flkty.selectedIndex;slideIndex>=0&&this.sTLHotspotsItems[slideIndex].classList.add(classes$i.onHover)}dotPointerIn(event){const dotIndex=event.target.getAttribute(attributes$h.pointer),image=this.slides[dotIndex].querySelector(selectors$k.productGridItemImage),isTouch2=matchMedia("(pointer:coarse)").matches;!(window.innerWidth<theme.sizes.small)&&!isTouch2&&this.observeImage(image),this.pointers[dotIndex].style.setProperty("--target-animation","none")}dotPointerOut(event){const dotIndex=event.target.getAttribute(attributes$h.pointer),image=this.slides[dotIndex].querySelector(selectors$k.productGridItemImage);image.classList.remove(classes$i.productGridItemImageHover),image.dispatchEvent(new Event("mouseleave")),this.observer&&this.observer.disconnect(),this.pointers.forEach(pointer=>{pointer.style.removeProperty("--target-animation")})}observeImage(image){this.observer=new IntersectionObserver((entries,observer)=>{entries.forEach(entry=>{const target=entry.target;entry.intersectionRatio==0||(target.dispatchEvent(new Event("mouseenter")),target.classList.add(classes$i.productGridItemImageHover))})},{root:this.slider,threshold:[.95,1]}),this.observer.observe(image)}triggerClick(target){requestAnimationFrame(()=>target.dispatchEvent(new Event("click")))}destroyQuickViewPopup(){const pswpElement=this.quickViewPopup?.loadPhotoswipe?.pswpElement;pswpElement&&pswpElement.classList.contains(classes$i.popupOpen)&&this.quickViewPopup.loadPhotoswipe.popup.close()}onBlockSelect(event){this.debouncedBlockSelectCallback(event)}debouncedBlockSelect(event){const pswpElement=this.quickViewPopup?.loadPhotoswipe?.pswpElement;if(!pswpElement){setTimeout(()=>this.triggerClick(event.target),400);return}setTimeout(()=>{if(pswpElement.classList.contains(classes$i.popupOpen)){const holder=this.quickViewPopup.loadPhotoswipe.pswpElement.querySelector(`[${attributes$h.hotspot}="${event.target.getAttribute(attributes$h.hotspot)}"]`),quickViewItemHolders=this.quickViewPopup.loadPhotoswipe.pswpElement.querySelectorAll(selectors$k.quickViewItemHolder);holder.classList.add(classes$i.isActive),quickViewItemHolders.forEach(element=>{element!==holder&&element.classList.remove(classes$i.isActive)})}else this.triggerClick(event.target)})}onUnload(){this.destroyQuickViewPopup(),document.removeEventListener("theme:resize:width",this.checkSlidesSizeOnResize),this.slider&&this.slider.removeEventListener("theme:slider:resize",this.resizeSliderEvent)}onDeselect(){this.destroyQuickViewPopup()}}register("look",[{onLoad(){sections$f[this.id]=new Look(this.container)},onUnload(){sections$f[this.id].onUnload()},onBlockSelect(event){sections$f[this.id].onBlockSelect(event)},onDeselect(){sections$f[this.id].onDeselect()}}]);const selectors$j={grid:"[data-grid]",item:"[data-item]",itemContentInner:"[data-item-content-inner]",carouselMobile:".carousel--mobile",aosTrigger:"data-aos-trigger",animatable:"[data-aos], [data-aos-anchor]"},attributes$g={aosAnchor:"data-aos-anchor",aosTrigger:"data-aos-trigger",sliderMobile:"data-slider-mobile"},classes$h={aosAnimate:"aos-animate"};let sections$e={};class Mosaic{constructor(section){this.container=section.container,this.hasSliderMobile=this.container.hasAttribute(attributes$g.sliderMobile),this.carouselMobile=this.container.querySelector(selectors$j.carouselMobile),this.items=this.container.querySelectorAll(selectors$j.item),this.onResizeCallback=()=>this.onResize(),this.updateAOSAnchors(),document.addEventListener("theme:resize:width",this.onResizeCallback)}onResize(){this.updateAOSAnchors()}updateAOSAnchors(){if(theme.settings.animationsEnabled!="false"&&window.theme.isMobile()&&this.hasSliderMobile&&this.carouselMobile&&this.items.length>1){const firstItem=this.items[0],firstContentInner=firstItem.querySelector(selectors$j.itemContentInner),blockId=firstItem.id,contentInnerId=firstContentInner?firstContentInner.id:blockId;firstItem.setAttribute(attributes$g.aosTrigger,`#${blockId}`),firstContentInner?.setAttribute(attributes$g.aosTrigger,`#${contentInnerId}
63`),this.items.forEach(item=>{const animatable=item.querySelectorAll(selectors$j.animatable),itemContentInner=item.querySelector(selectors$j.itemContentInner);item.setAttribute(attributes$g.aosAnchor,`#${blockId}`),itemContentInner?.setAttribute(attributes$g.aosAnchor,`#${contentInnerId}`),animatable.forEach(element=>element.setAttribute(attributes$g.aosAnchor,`#${contentInnerId}`))})}}triggerAOS(target){theme.settings.animationsEnabled=="false"||!target||[...target.querySelectorAll(selectors$j.animatable)].some(element=>element.classList.contains(classes$h.aosAnimate))||this.items.forEach(item=>{const animatable2=item.querySelectorAll(selectors$j.animatable);item.classList.add(classes$h.aosAnimate),animatable2.forEach(element=>element.classList.add(classes$h.aosAnimate))})}onBlockSelect(e){const target=e.target,grid=target.closest(selectors$j.grid),wrapperStyle=grid.currentStyle||window.getComputedStyle(grid),wrapperPadding=parseInt(wrapperStyle.paddingLeft),blockPositionLeft=target.offsetLeft-wrapperPadding,firstItem=this.items[0];target.matches(`#${firstItem.id}`)||this.triggerAOS(target),setTimeout(()=>{grid.scrollTo({top:0,left:blockPositionLeft,behavior:"smooth"})},500)}onUnload(){document.removeEventListener("theme:resize:width",this.onResizeCallback)}}register("mosaic",{onLoad(){sections$e[this.id]=new Mosaic(this)},onUnload(){sections$e[this.id].onUnload()},onBlockSelect(e){sections$e[this.id].onBlockSelect(e)}});const selectors$i={slider:"[data-slider]",slide:"[data-slide]",links:"a, button"},classes$g={flickityEnabled:"flickity-enabled",carousel:"carousel",carouselResize:"carousel--resize",carouselInactive:"carousel--inactive",isSelected:"is-selected",textCenter:"text-center"},attributes$f={sectionId:"data-section-id",tabIndex:"tabindex",slide:"data-slide"},sections$d={};class SocialGallery{constructor(section){this.container=section.container,this.sectionId=this.container.getAttribute(attributes$f.sectionId),this.slider=this.container.querySelector(selectors$i.slider),this.slider&&(this.slides=this.slider.querySelectorAll(selectors$i.slide),this.flkty=null,this.onResizeCallback=()=>this.onResize(),this.init())}init(){this.handleSliderState(),this.listen()}onResize(){this.handleSliderState(),this.flkty!==null&&(this.flkty.resize(),this.flkty.size.width>=this.flkty.slideableWidth&&this.destroySlider())}handleSliderState(){if(this.slider.classList.contains(classes$g.carouselInactive)&&!window.theme.isMobile()){this.destroySlider();return}if(this.slides.length===1&&window.theme.isMobile()){this.destroySlider();return}this.flkty||this.initSlider(),this.flkty.slideableWidth<this.flkty.size.width&&this.destroySlider()}initSlider(){const hasTextCenter=this.slider.classList.contains(classes$g.textCenter);this.slider.classList.remove(classes$g.carouselInactive),this.flkty=new window.theme.Flickity(this.slider,{cellSelector:selectors$i.slide,prevNextButtons:!0,pageDots:!0,groupCells:!0,cellAlign:hasTextCenter?"center":"left",contain:!0,adaptiveHeight:!1,draggable:!0,on:{ready:()=>{this.slidesTabIndex()},change:()=>{this.slidesTabIndex()}}}),this.createResizeClass()}createResizeClass(){if(typeof window.theme.Flickity.prototype._createResizeClass=="function")return;window.theme.Flickity.prototype._createResizeClass=function(){this.element.classList.add(classes$g.carouselResize)},window.theme.Flickity.createMethods.push("_createResizeClass");const resize=window.theme.Flickity.prototype.resize;window.theme.Flickity.prototype.resize=function(){this.element.classList.remove(classes$g.carouselResize),resize.call(this),this.element.classList.add(classes$g.carouselResize)}}slidesTabIndex(){window.theme.Flickity.data(this.slider).cells.forEach(sli
63de=>{let tabIndex="-1";slide.element.classList.contains(classes$g.isSelected)&&(tabIndex="0"),slide.element.querySelectorAll(selectors$i.links).forEach(link=>{link.setAttribute(attributes$f.tabIndex,tabIndex)})})}destroySlider(){this.slider.classList.contains(classes$g.flickityEnabled)&&(this.slider.classList.contains(classes$g.carousel)&&this.slider.classList.add(classes$g.carouselInactive),this.flkty!==null&&(this.flkty.destroy(),this.flkty=null))}listen(){document.addEventListener("theme:resize:width",this.onResizeCallback)}onBlockSelect(evt){if(this.flkty&&this.flkty.isActive){const index=parseInt([...evt.target.parentNode.children].indexOf(evt.target)),slidesPerPage=parseInt(this.flkty.slides[0].cells.length),groupIndex=Math.floor(index/slidesPerPage);if(!evt.detail.load){this.flkty.select(groupIndex);return}const onTransitionEnd=()=>{requestAnimationFrame(()=>{this.flkty.select(groupIndex)}),this.flkty.element.removeEventListener("transitionend",onTransitionEnd)};this.flkty.element.addEventListener("transitionend",onTransitionEnd)}}onUnload(){document.removeEventListener("theme:resize:width",this.onResizeCallback)}}register("multicolumns",{onLoad(){sections$d[this.id]=new SocialGallery(this)},onUnload(e){sections$d[this.id].onUnload(e)},onBlockSelect(e){sections$d[this.id].onBlockSelect(e)}}),register("newsletter",newsletterSection),register("overlapping-images",[videoPlay,parallaxSection]);const selectors$h={toggleAdmin:"[data-toggle-admin]",toggleNewsletter:"[data-toggle-newsletter]",adminForm:"[data-form-admin]",newsletterForm:"[data-form-newsletter]"};let sections$c={};class Password{constructor(section){this.container=section.container,this.toggleAdmin=this.container.querySelector(selectors$h.toggleAdmin),this.toggleNewsletter=this.container.querySelector(selectors$h.toggleNewsletter),this.adminForm=this.container.querySelector(selectors$h.adminForm),this.newsletterForm=this.container.querySelector(selectors$h.newsletterForm),this.adminErrors=this.adminForm.querySelector(".errors"),this.newsletterErrors=this.newsletterForm.querySelector(".errors"),this.init()}init(){this.toggleAdmin.addEventListener("click",e=>{e.preventDefault(),this.showPasswordForm()}),this.toggleNewsletter.addEventListener("click",e=>{e.preventDefault(),this.hidePasswordForm()}),window.location.hash=="#login"||this.adminErrors?this.showPasswordForm():this.hidePasswordForm()}showPasswordForm(){showElement(this.adminForm),hideElement(this.newsletterForm),window.location.hash="#login"}hidePasswordForm(){showElement(this.newsletterForm),hideElement(this.adminForm),window.location.hash=""}}register("password-template",{onLoad(){sections$c[this.id]=new Password(this)}});const selectors$g={largePromo:"[data-large-promo]",largePromoInner:"[data-large-promo-inner]",tracking:"[data-tracking-consent]",trackingInner:"[data-tracking-consent-inner]",trackingAccept:"[data-confirm-cookies]",popupBar:"[data-popup-bar]",popupBarHolder:"[data-popup-bar-holder]",popupBarToggle:"[data-popup-bar-toggle]",popupBody:"[data-popup-body]",popupClose:"[data-popup-close]",popupUnderlay:"[data-popup-underlay]",newsletterForm:"[data-newsletter-form]"},attributes$e={cookieName:"data-cookie-name",targetReferrer:"data-target-referrer",preventScrollLock:"data-prevent-scroll-lock"},classes$f={success:"has-success",error:"has-error",selected:"selected",hasBlockSelected:"has-block-selected",expanded:"popup--expanded",visible:"popup--visible",mobile:"mobile",desktop:"desktop",popupBar:"popup--bar",barIsVisible:"popup-bar-is-visible"};let sections$b={},scrollLockTimer=0,activePopups=0,popups=[];class DelayShow{constructor(popupContainer,popup){if(this.popupContainer=popupContainer,this.popup=popup,this.popupBody=popup.querySelector(selectors$g.popupBody),this.delay=popupContainer.dataset.popupDelay,this.isSubmitted=window.location.href.indexOf("accepts_marketing")!==-1||window.location.href.indexOf("customer_posted=true")!==-1,this.a11y=window.theme.a11y,this.showPopupOnScrollEvent=()=>this.showPopupOnScroll(),(this.delay==="always"||this.isSubmitted)&&this.always(),this.delay&&this.delay.includes("delayed")&&!this.isSubmitted){const seconds=this.delay.includes("_")?parseInt(this.delay.split("_")[1]):10;this.delayed(seconds)}this.delay==="bottom"&&!this.isSubmitted&&this.bottom(),this.delay==="idle"&&!this.isSubmitted&&this.idle()}always(){this.showPopup()}delayed(seconds=10){setTimeout(()=>{this.showPopup()},seconds*1e3)}bottom(){document.addEventListener("theme:scroll",this.showPopupOnScrollEvent)}idle(){if(!(this.checkPopupTarget()===!0))return;let timer=0,idleTime=6e4;const documentEvents=["mousemove","mousedown","click","touchmove","touchstart","touchend","keydown","keypress"],windowEvents=["load","resize","scroll"],startTimer=()=>{timer=setTimeout(()=>{timer=0,this.showPopup()}
63,idleTime),documentEvents.forEach(eventType=>{document.addEventListener(eventType,resetTimer)}),windowEvents.forEach(eventType=>{window.addEventListener(eventType,resetTimer)})},resetTimer=()=>{timer&&clearTimeout(timer),documentEvents.forEach(eventType=>{document.removeEventListener(eventType,resetTimer)}),windowEvents.forEach(eventType=>{window.removeEventListener(eventType,resetTimer)}),startTimer()};startTimer()}showPopup(){const popupElement={id:this.popup.id,body:this.popupBody};if(popups.push(popupElement),this.checkPopupTarget()===!0){if(activePopups+=1,this.popup.classList.add(classes$f.visible),this.popup.classList.contains(classes$f.popupBar)&&document.body.classList.add(classes$f.barIsVisible),this.a11y.trapFocus({container:this.popupBody}),this.popup.hasAttribute(attributes$e.preventScrollLock))return!1;this.scrollLock()}}checkPopupTarget(){const targetMobile=this.popup.parentNode.classList.contains(classes$f.mobile),targetDesktop=this.popup.parentNode.classList.contains(classes$f.desktop);return!(targetMobile&&window.innerWidth>=theme.sizes.small||targetDesktop&&window.innerWidth<theme.sizes.small)}scrollLock(){document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.popupBody}))}showPopupOnScroll(){window.scrollY+window.innerHeight>=document.body.clientHeight&&(this.showPopup(),document.removeEventListener("theme:scroll",this.showPopupOnScrollEvent))}onUnload(){document.removeEventListener("theme:scroll",this.showPopupOnScrollEvent)}}class TargetReferrer{constructor(el){if(this.popupContainer=el,this.locationPath=location.href,!this.popupContainer.hasAttribute(attributes$e.targetReferrer))return!1;this.locationPath.indexOf(this.popupContainer.getAttribute(attributes$e.targetReferrer))===-1&&!window.Shopify.designMode&&this.popupContainer.parentNode.removeChild(this.popupContainer)}}class LargePopup{constructor(el){this.popupContainer=el,this.popup=this.popupContainer.querySelector(selectors$g.largePromoInner),this.popupBody=this.popup.querySelector(selectors$g.popupBody),this.popupId=this.popup.id,this.close=this.popup.querySelector(selectors$g.popupClose),this.underlay=this.popup.querySelector(selectors$g.popupUnderlay),this.form=this.popup.querySelector(selectors$g.newsletterForm),this.cookie=new PopupCookie(this.popupContainer.dataset.cookieName,"user_has_closed"),this.isTargeted=new TargetReferrer(this.popupContainer),this.a11y=window.theme.a11y,this.init()}init(){(!(this.cookie.read()!==!1)||window.Shopify.designMode)&&(window.Shopify.designMode?this.showPopup():new DelayShow(this.popupContainer,this.popup),this.form&&setTimeout(()=>{this.form.classList.contains(classes$f.success)&&(this.showPopupIfNoCookie(),activePopups-=1)}),this.initClosers())}checkPopupTarget(){const targetMobile=this.popup.parentNode.classList.contains(classes$f.mobile),targetDesktop=this.popup.parentNode.classList.contains(classes$f.desktop);return!(targetMobile&&window.innerWidth>=theme.sizes.small||targetDesktop&&window.innerWidth<theme.sizes.small)}showPopupIfNoCookie(){this.showPopup()}initClosers(){this.close.addEventListener("click",this.closePopup.bind(this)),this.underlay.addEventListener("click",this.closePopup.bind(this)),this.popupContainer.addEventListener("keyup",event=>{event.code===theme.keyboardKeys.ESCAPE&&this.closePopup(event)})}closePopup(event){event.preventDefault(),this.hidePopup(),this.cookie.write()}scrollLock(){this.resetScrollUnlock(),this.a11y.trapFocus({container:this.popupBody}),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.popupBody}))}scrollUnlock(){this.resetScrollUnlock(),scrollLockTimer=setTimeout(()=>{document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))},300)}resetScrollUnlock(){scrollLockTimer&&clearTimeout(scrollLockTimer)}showPopup(){const isTargetValid=this.checkPopupTarget()===!0,popupElement={id:this.popupId,body:this.popup};popups.push(popupElement),isTargetValid&&(activePopups+=1,this.popup.classList.add(classes$f.visible),this.scrollLock())}hidePopup(){this.popup.classList.remove(classes$f.visible);
63const popupIndex=popups.findIndex(x=>x.id===this.popupId);if(activePopups-=1,popups.splice(popupIndex,1),activePopups==1&&document.body.classList.contains(classes$f.barIsVisible))this.scrollUnlock();else if(activePopups<1)this.scrollUnlock(),this.a11y.removeTrapFocus();else if(popups.length>0){const nextPopup=popups[popups.length-1].body;this.a11y.trapFocus({container:nextPopup})}}onBlockSelect(evt){this.popupContainer.contains(evt.target)&&!this.popup.classList.contains(classes$f.visible)&&(this.popup.classList.add(classes$f.selected),this.popupContainer.classList.add(classes$f.hasBlockSelected),this.showPopup())}onBlockDeselect(evt){this.popupContainer.contains(evt.target)&&(this.popup.classList.remove(classes$f.selected),this.popupContainer.classList.remove(classes$f.hasBlockSelected),this.hidePopup())}onUnload(){this.scrollUnlock()}onDeselect(){this.popup.classList.remove(classes$f.selected),this.popupContainer.classList.remove(classes$f.hasBlockSelected),this.hidePopup()}}class Tracking{constructor(el){this.popupContainer=el,this.popup=this.popupContainer.querySelector(selectors$g.trackingInner),this.popupId=this.popup.id,this.close=this.popup.querySelector(selectors$g.popupClose),this.acceptButton=this.popup.querySelector(selectors$g.trackingAccept),this.enable=this.popupContainer.dataset.enable==="true",this.a11y=window.theme.a11y,window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],error=>{if(error)throw error;const userCanBeTracked=window.Shopify.customerPrivacy.userCanBeTracked(),userTrackingConsent=window.Shopify.customerPrivacy.getTrackingConsent();this.enableTracking=!userCanBeTracked&&userTrackingConsent==="no_interaction"&&this.enable,window.Shopify.designMode&&(this.enableTracking=!0),this.init()})}init(){this.enableTracking&&this.showPopup(),this.clickEvents()}clickEvents(){this.close.addEventListener("click",event=>{event.preventDefault(),window.Shopify.customerPrivacy.setTrackingConsent(!1,()=>this.hidePopup())}),this.acceptButton.addEventListener("click",event=>{event.preventDefault(),window.Shopify.customerPrivacy.setTrackingConsent(!0,()=>this.hidePopup())})}showPopup(){const popupElement={id:this.popupId,body:this.popup};popups.push(popupElement),this.popup.classList.add(classes$f.visible),this.a11y.trapFocus({container:this.popup})}hidePopup(){this.popup.classList.remove(classes$f.visible);const popupIndex=popups.findIndex(x=>x.id===this.popupId);if(popups.splice(popupIndex,1),activePopups<1)this.a11y.removeTrapFocus();else if(popups.length>0){const nextPopup=popups[popups.length-1].body;this.a11y.trapFocus({container:nextPopup})}}onBlockSelect(evt){this.popupContainer.contains(evt.target)&&this.enableTracking&&!this.popup.classList.contains(classes$f.visible)&&(this.showPopup(),this.popup.classList.add(classes$f.selected),this.popup.parentNode.classList.add(classes$f.hasBlockSelected))}onBlockDeselect(evt){this.popupContainer.contains(evt.target)&&(this.popup.classList.remove(classes$f.selected),this.popupContainer.classList.remove(classes$f.hasBlockSelected),this.hidePopup())}onDeselect(){this.popup.classList.remove(classes$f.selected),this.popupContainer.classList.remove(classes$f.hasBlockSelected),this.hidePopup()}}class PopupBar{constructor(el){this.popupContainer=el,this.popup=this.popupContainer.querySelector(selectors$g.popupBarHolder),this.popupBody=this.popup.querySelector(selectors$g.popupBody),this.popupId=this.popup.id,this.close=this.popup.querySelector(selectors$g.popupClose),this.underlay=this.popup.querySelector(selectors$g.popupUnderlay),this.toggle=this.popup.querySelector(selectors$g.popupBarToggle),this.cookie=new PopupCookie(this.popupContainer.dataset.cookieName,"user_has_closed"),this.form=this.popup.querySelector(selectors$g.newsletterForm),this.isTargeted=new TargetReferrer(this.popupContainer),this.a11y=window.theme.a11y,this.init()}init(){(!(this.cookie.read()!==!1)||window.Shopify.designMode)&&(window.Shopify.designMode?this.showPopup():new DelayShow(this.popupContainer,this.popup),this.initPopupToggleButton(),this.initClosers(),this.form&&setTimeout(()=>
63{this.form.classList.contains(classes$f.success)&&this.showPopupIfNoCookie(),this.form.classList.contains(classes$f.error)&&this.toggle.dispatchEvent(new Event("click"))}))}checkPopupTarget(){const targetMobile=this.popup.parentNode.classList.contains(classes$f.mobile),targetDesktop=this.popup.parentNode.classList.contains(classes$f.desktop);return!(targetMobile&&window.innerWidth>=theme.sizes.small||targetDesktop&&window.innerWidth<theme.sizes.small)}showPopupIfNoCookie(){this.showPopup(),this.toggle.dispatchEvent(new Event("click"))}initPopupToggleButton(){this.toggle.addEventListener("click",event=>{event.preventDefault(),this.popup.classList.toggle(classes$f.expanded),this.popup.classList.contains(classes$f.expanded)?this.scrollLock():this.scrollUnlock()})}showPopup(){const popupElement={id:this.popupId,body:this.popup};popups.push(popupElement),this.a11y.trapFocus({container:this.popupBody}),this.checkPopupTarget()===!0&&(activePopups+=1,document.body.classList.add(classes$f.barIsVisible),this.popup.classList.add(classes$f.visible))}hidePopup(){this.popup.classList.remove(classes$f.visible),document.body.classList.remove(classes$f.barIsVisible);const popupIndex=popups.findIndex(x=>x.id===this.popupId);if(popups.splice(popupIndex,1),activePopups>=1&&(activePopups-=1),activePopups<1)this.scrollUnlock(),this.a11y.removeTrapFocus();else if(popups.length>0){const nextPopup=popups[popups.length-1].body;this.a11y.trapFocus({container:nextPopup})}}initClosers(){this.close.addEventListener("click",this.closePopup.bind(this)),this.underlay.addEventListener("click",()=>this.toggle.dispatchEvent(new Event("click"))),this.popupContainer.addEventListener("keyup",event=>{event.code===theme.keyboardKeys.ESCAPE&&(this.popup.classList.remove(classes$f.expanded),this.scrollUnlock())})}closePopup(event){event.preventDefault(),this.cookie.write(),this.hidePopup()}scrollLock(){document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.popupBody}))}scrollUnlock(){this.resetScrollUnlock(),scrollLockTimer=setTimeout(()=>{document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))},300)}resetScrollUnlock(){scrollLockTimer&&clearTimeout(scrollLockTimer)}onBlockSelect(evt){this.popupContainer.contains(evt.target)&&!this.popup.classList.contains(classes$f.visible)&&(this.showPopup(),this.popup.classList.add(classes$f.expanded),this.popup.classList.add(classes$f.selected),this.popup.parentNode.classList.add(classes$f.hasBlockSelected),this.resetScrollUnlock(),this.scrollLock())}onBlockDeselect(evt){this.popupContainer.contains(evt.target)&&(this.popup.classList.remove(classes$f.expanded),this.popup.classList.remove(classes$f.selected),this.popup.parentNode.classList.remove(classes$f.hasBlockSelected),this.hidePopup())}onUnload(){this.scrollUnlock()}onDeselect(){this.popup.classList.remove(classes$f.expanded),this.popup.classList.remove(classes$f.selected),this.popup.parentNode.classList.remove(classes$f.hasBlockSelected),this.hidePopup()}}register("popups",[{onLoad(){sections$b[this.id]=[],window.Shopify.designMode&&(activePopups=0);const popupsLarge=this.container.querySelectorAll(selectors$g.largePromo);popupsLarge.length&&popupsLarge.forEach(el=>{sections$b[this.id].push(new LargePopup(el))});const popupBars=this.container.querySelectorAll(selectors$g.popupBar);popupBars.length&&popupBars.forEach(el=>{sections$b[this.id].push(new PopupBar(el))});const cookiesPopups=this.container.querySelectorAll(selectors$g.tracking);cookiesPopups.length&&cookiesPopups.forEach(el=>{sections$b[this.id].push(new Tracking(el))})},onDeselect(){sections$b[this.id].forEach(el=>{typeof el.onDeselect=="function"&&el.onDeselect()})},onBlockSelect(evt){sections$b[this.id].forEach(el=>{typeof el.onBlockSelect=="function"&&el.onBlockSelect(evt)})},onBlockDeselect(evt){sections$b[this.id].forEach(el=>{typeof el.onBlockDeselect=="function"&&el.onBlockDeselect(evt)})},onUnload(evt){sections$b[this.id].forEach(el=>{typeof el.onUnload=="function"&&el.onUnload(evt)})}},newsletterSection]);
63const selectors$f={pressItems:"[data-press-items]",logoSlider:"[data-logo-slider]",logoSlide:"[data-logo-slide]",links:"a, button"},attributes$d={logoSlide:"data-logo-index",tabIndex:"tabindex"};let sections$a={};class Press{constructor(section){this.container=section.container,this.slider=this.container.querySelector(selectors$f.pressItems),this.sliderNav=this.container.querySelector(selectors$f.logoSlider),this.checkSlidesEvent=()=>this.checkSlides(),this.sliderResizeEvent=()=>this.resizeSlider(),this.initSlider(),this.checkSlides(),this.resizeSlider(),document.addEventListener("theme:resize:width",this.checkSlidesEvent),document.addEventListener("theme:resize:width",this.sliderResizeEvent)}checkSlides(){const containerWidth=this.container.offsetWidth,slides=this.container.querySelectorAll(selectors$f.logoSlide),sliderNav=window.theme.Flickity.data(this.sliderNav)||null;sliderNav!==null&&(sliderNav.options.draggable=!1,sliderNav.options.wrapAround=!1,sliderNav.options.contain=!0,this.getSlidesWidth()>containerWidth&&slides.length>2&&(sliderNav.options.draggable=!0,sliderNav.options.wrapAround=!0,sliderNav.options.contain=!1),sliderNav.resize(),sliderNav.updateDraggable())}getSlidesWidth(){const slides=this.container.querySelectorAll(selectors$f.logoSlide);let slidesTotalWidth=0;
63return slides.length&&slides.forEach(slide=>{slidesTotalWidth+=slide.offsetWidth}),slidesTotalWidth}initSlider(){let flkty=window.theme.Flickity.data(this.slider)||null,flktyNav=window.theme.Flickity.data(this.sliderNav)||null;const duration=parseInt(this.container.dataset.duration),autoplay=this.container.dataset.autoplay==="true"?duration:!1;flkty=new window.theme.Flickity(this.slider,{fade:!0,wrapAround:!0,adaptiveHeight:!1,prevNextButtons:!1,pageDots:!1,autoPlay:autoplay,on:{ready:()=>{requestAnimationFrame(()=>{document.dispatchEvent(new CustomEvent("theme:resize:width"))})}}}),flktyNav=new window.theme.Flickity(this.sliderNav,{draggable:!1,wrapAround:!1,contain:!0,imagesLoaded:!0,asNavFor:this.slider,prevNextButtons:!1,adaptiveHeight:!1,pageDots:!1,on:{ready:()=>{const slides=this.container.querySelectorAll(selectors$f.logoSlide);requestAnimationFrame(()=>{document.dispatchEvent(new CustomEvent("theme:resize:width"))}),slides.forEach(slide=>{slide.addEventListener("keyup",event=>{if(event.code===theme.keyboardKeys.ENTER||event.code===theme.keyboardKeys.NUMPADENTER||event.code===theme.keyboardKeys.SPACE){const selectedIndex=Number(slide.getAttribute(attributes$d.logoSlide));flkty.selectCell(selectedIndex)}})})}}}),window.theme.flickitySmoothScrolling(this.slider),window.theme.flickitySmoothScrolling(this.sliderNav),flktyNav.on("change",index=>{flkty.selectCell(index)}),flkty.on("change",index=>{flkty.cells.forEach((slide,i)=>
63{slide.element.querySelectorAll(selectors$f.links).forEach(link=>{link.setAttribute(attributes$d.tabIndex,i===index?"0":"-1")})})})}resizeSlider(){const slider2=window.theme.Flickity.data(this.slider)||null,sliderNav=window.theme.Flickity.data(this.sliderNav)||null;slider2!==null&&(slider2.resize(),sliderNav!==null&&sliderNav.resize())}onBlockSelect(event){const slider2=window.theme.Flickity.data(this.slider)||null,index=parseInt([...event.target.parentNode.children].indexOf(event.target));slider2!==null&&setTimeout(()=>{slider2.select(index),slider2.pausePlayer()})}onBlockDeselect(){const slider2=window.theme.Flickity.data(this.slider)||null;this.container.dataset.autoplay==="true"&&slider2!==null&&slider2.playPlayer()}onUnload(){document.removeEventListener("theme:resize:width",this.checkSlidesEvent),document.removeEventListener("theme:resize:width",this.sliderResizeEvent)}}register("press",{onLoad(){sections$a[this.id]=new Press(this)},onUnload(e){sections$a[this.id].onUnload(e)},onBlockSelect(e){sections$a[this.id].onBlockSelect(e)},onBlockDeselect(){sections$a[this.id].onBlockDeselect()}});const selectors$e={slideshow:"[data-product-single-media-slider]",productInfo:"[data-product-info]",headerSticky:"[data-header-sticky]",headerHeight:"[data-header-height]"},classes$e={sticky:"is-sticky"},attributes$c={stickyEnabled:"data-sticky-enabled"};window.theme.variables={productPageSticky:!1};const sections$9={};class ProductSticky{constructor(section){this.container=section.container,this.stickyEnabled=this.container.getAttribute(attributes$c.stickyEnabled)==="true",this.productInfo=this.container.querySelector(selectors$e.productInfo),this.stickyScrollTop=0,this.scrollLastPosition=0,this.stickyDefaultTop=0,this.currentPoint=0,this.defaultTopBottomSpacings=30,this.scrollTop=window.scrollY,this.scrollDirectionDown=!0,this.requestAnimationSticky=null,this.stickyFormLoad=!0,this.stickyFormLastHeight=null,this.onChangeCounter=0,this.scrollEvent=e=>this.scrollEvents(e),this.resizeEvent=e=>this.resizeEvents(e),this.init()}init(){this.stickyEnabled&&(this.stickyScrollCheck(),document.addEventListener("theme:resize",this.resizeEvent)),this.initSticky()}initSticky(){theme.variables.productPageSticky&&(this.requestAnimationSticky=requestAnimationFrame(()=>this.calculateStickyPosition()),this.productInfo.addEventListener("theme:form:sticky",e=>{this.removeAnimationFrame(),this.requestAnimationSticky=requestAnimationFrame(()=>this.calculateStickyPosition(e))}),document.addEventListener("theme:scroll",this.scrollEvent))}scrollEvents(e){e.detail!==null&&(this.scrollTop=e.detail.position,this.scrollDirectionDown=e.detail.down),this.requestAnimationSticky||(this.requestAnimationSticky=requestAnimationFrame(()=>this.calculateStickyPosition()))}resizeEvents(){this.stickyScrollCheck(),document.removeEventListener("theme:scroll",this.scrollEvent),this.initSticky()}stickyScrollCheck(){const isDesktop=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>=window.theme.sizes.large,targetProductInfo=this.container.querySelector(selectors$e.productInfo);if(targetProductInfo)if(isDesktop){const productInfo=this.container.querySelector(selectors$e.productInfo),slideshow=this.container.querySelector(selectors$e.slideshow);if(!productInfo||!slideshow)return;const productCopyHeight=productInfo.offsetHeight,productImagesHeight=slideshow.offsetHeight;productCopyHeight<productImagesHeight?(theme.variables.productPageSticky=!0,targetProductInfo.classList.add(classes$e.sticky)):(theme.variables.productPageSticky=!1,targetProductInfo.classList.remove(classes$e.sticky))}else theme.variables.productPageSticky=!1,targetProductInfo.classList.remove(classes$e.sticky)}calculateStickyPosition(e=null){const isAccordion=!!(!!(e&&e.detail)&&e.detail.element&&e.detail.element==="accordion"),productInfoHeight=this.productInfo.offsetHeight,heightDifference=window.innerHeight-productInfoHeight-this.defaultTopBottomSpacings,scrollDifference=Math.abs(this.scrollTop-this.scrollLastPosition);this.scrollDirectionDown?this.stickyScrollTop-=scrollDifference:this.stickyScrollTop+=scrollDifference,this.stickyFormLoad&&(document.querySelector(selectors$e.headerSticky)&&document.querySelector(selectors$e.headerHeight)?this.stickyDefaultTop=parseInt(document.querySelector(selectors$e.headerHeight).getBoundingClientRect().height):this.stickyDefaultTop=this.defaultTopBottomSpacings,this.stickyScrollTop=this.stickyDefaultTop),this.stickyScrollTop=Math.min(Math.max(this.stickyScrollTop,heightDifference),this.stickyDefaultTop);const differencePoint=this.stickyScrollTop-this.currentPoint;this.currentPoint=this.stickyFormLoad?this.stickyScrollTop:this.currentPoint+differencePoint*.5,this.productInfo.style.setProperty("--sticky-top",`${this.currentPoint}px`),this.scrollLastPosition=this.scrollTop,this.stickyFormLoad=!1,isAccordion&&this.onChangeCounter<=10||isAccordion&&this.stickyFormLastHeight!==productInfoHeight||this.stickyScrollTop!==this.currentPoint&&this.requestAnimationSticky?(isAccordion&&(this.onChangeCounter+=1),isAccordion&&this.stickyFormLastHeight!==productInfoHeight&&(this.onChangeCounter=11),this.requestAnimationSticky=requestAnimationFrame(()=>this.calculateStickyPosition(e))):this.requestAnimationSticky&&this.removeAnimationFrame(),this.stickyFormLastHeight=productInfoHeight}removeAnimationFrame(){this.requestAnimationSticky&&(cancelAnimationFrame(this.requestAnimationSticky),this.requestAnimationSticky=null,this.onChangeCounter=0)}onUnload(){this.stickyEnabled&&document.removeEventListener("theme:resize",this.resizeEvent),theme.variables.productPageSticky&&document.removeEventListener("theme:scroll",this.scrollEvent)}}const productStickySection={onLoad(){sections$9[this.id]=new ProductSticky(this)},onUnload(){sections$9[this.id].onUnload()}},selectors$d={mediaContainer:"[data-product-single-media-group]",productMediaSlider:"[data-product-single-media-slider]",zoomWrapper:"[data-zoom-wrapper]"},classes$d={popupClass:"pswp-zoom-gallery",popupClassNoThumbs:"pswp-zoom-gallery--single",isMoving:"is-moving"},attributes$b={dataImageWidth:"data-image-width",dataImageHeight:"data-image-height"};class Zoom{constructor(container){this.container=container,this.mediaContainer=this.container.querySelector(selectors$d.mediaContainer),this.slider=this.container.querySelector(selectors$d.productMediaSlider),this.zoomWrappers=this.container.querySelectorAll(selectors$d.zoomWrapper),this.zoomEnable=this.mediaContainer.dataset.gallery==="true",this.a11y=window.theme.a11y,this.zoomEnable&&this.init()}
63init(){this.zoomWrappers.length&&this.zoomWrappers.forEach((element,i)=>{element.addEventListener("click",e=>{e.preventDefault(),this.slider&&this.slider.classList.contains(classes$d.isMoving)||(this.a11y.state.trigger=element,this.createZoom(i))})})}createZoom(indexImage){const instance=this;let items=[],counter=0;this.zoomWrappers.forEach(elementImage=>{const imgSrc=elementImage.getAttribute("href"),imgWidth=parseInt(elementImage.getAttribute(attributes$b.dataImageWidth)),imgHeight=parseInt(elementImage.getAttribute(attributes$b.dataImageHeight));if(items.push({src:imgSrc,w:imgWidth,h:imgHeight,msrc:imgSrc}),counter+=1,instance.zoomWrappers.length===counter){let popupClass=`${classes$d.popupClass}`;counter===1&&(popupClass=`${classes$d.popupClass} ${classes$d.popupClassNoThumbs}`);const options2={barsSize:{top:60,bottom:60},history:!1,focus:!1,index:indexImage,mainClass:popupClass,showHideOpacity:!0,showAnimationDuration:250,hideAnimationDuration:250,closeOnScroll:!1,closeOnVerticalDrag:!1,captionEl:!1,closeEl:!0,closeElClasses:["caption-close"],tapToClose:!1,clickToCloseNonZoomable:!1,maxSpreadZoom:2,loop:!0,spacing:0,allowPanToNext:!0,pinchToClose:!1};new window.theme.LoadPhotoswipe(items,options2)}})}}const selectors$c={complementaryProducts:"[data-complementary-products]",buttonQuickView:"[data-button-quick-view]",complementarySlider:"[data-complementary-slider]",links:"a, button",complementaryItem:".complementary-products__item"},attributes$a={url:"data-url",tabIndex:"tabindex"},classes$c={isSelected:"is-selected"};class ComplementaryProducts extends HTMLElement{constructor(){super()}connectedCallback(){const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),this.hasAttribute(attributes$a.url)&&this.getAttribute(attributes$a.url)!==""&&fetch(this.getAttribute(attributes$a.url)).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector(selectors$c.complementaryProducts);recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),html.querySelector(selectors$c.buttonQuickView)&&new QuickViewPopup(this),this.initComplementarySlider()}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 400px 0px"}).observe(this)}initComplementarySlider(){const slider2=this.querySelector(selectors$c.complementarySlider);if(!slider2)return;const items=this.querySelectorAll(selectors$c.complementaryItem);if(items.length>1){const flktyComplementary=new window.theme.Flickity(slider2,{wrapAround:!0,pageDots:!0,adaptiveHeight:!0,prevNextButtons:!1,on:{ready:()=>{items.forEach(item=>{if(!item.classList.contains(classes$c.isSelected)){const links=item.querySelectorAll(selectors$c.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$a.tabIndex,"-1")})}})}}});flktyComplementary.on("change",index=>{flktyComplementary.cells.forEach((slide,i)=>{const links=slide.element.querySelectorAll(selectors$c.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$a.tabIndex,i===index?"0":"-1")})})})}}}const selectors$b={recipientCheckbox:"[data-recipient-checkbox]",recipientEmail:"[data-recipient-email]",recipientName:"[data-recipient-name]",recipientMessage:"[data-recipient-message]",recipientSendOn:"[data-recipient-send-on]",recipientControl:"[data-recipient-control]",recipientOffset:"[data-recipient-offset]",productForm:"[data-product-form]",cartDrawer:"[data-cart-drawer]"},classes$b={quickViewVisible:"js-quick-view-visible"};class RecipientForm extends HTMLElement{constructor(){super(),this.recipientCheckbox=this.querySelector(selectors$b.recipientCheckbox),this.recipientControl=this.querySelector(selectors$b.recipientControl),this.recipientControl.disabled=!0,this.recipientEmail=this.querySelector(selectors$b.recipientEmail),this.recipientName=this.querySelector(selectors$b.recipientName),this.recipientMessage=this.querySelector(selectors$b.recipientMessage),this.recipientSendOn=this.querySelector(selectors$b.recipientSendOn),this.recipientOff
63set=this.querySelector(selectors$b.recipientOffset),this.recipientOffset&&(this.recipientOffset.value=new Date().getTimezoneOffset()),this.cartDrawer=document.querySelector(selectors$b.cartDrawer),this.onChangeEvent=event=>this.onChange(event),this.onCartAddedEvent=()=>this.onCartAdded()}connectedCallback(){this.recipientCheckbox&&(this.disableInputFields(),this.recipientCheckbox.addEventListener("change",this.onChangeEvent),document.addEventListener("theme:cart:added",this.onCartAddedEvent))}onChange(event){if(!event.target.checked){this.clearInputFields(),this.disableInputFields();return}this.enableInputFields()}onCartAdded(){const scrollToPosition=this.closest(selectors$b.productForm).offsetTop,isQuickBuyForm=document.body.classList.contains(classes$b.quickViewVisible);if(!(this.recipientCheckbox.checked===!0))return;isQuickBuyForm||window.scrollTo({top:scrollToPosition,left:0,behavior:"smooth"});const onCartDrawerTransitionEnd=event=>{event.target===this.cartDrawer&&(requestAnimationFrame(()=>{this.recipientCheckbox.checked=!1,this.recipientCheckbox.dispatchEvent(new Event("change"))}),this.cartDrawer.removeEventListener("transitionend",onCartDrawerTransitionEnd))};this.cartDrawer.addEventListener("transitionend",onCartDrawerTransitionEnd)}inputFields(){return[this.recipientEmail,this.recipientName,this.recipientMessage,this.recipientSendOn]}disableableFields(){return[...this.inputFields(),this.recipientOffset]}clearInputFields(){this.inputFields().forEach(field=>field.value="")}enableInputFields(){this.disableableFields().forEach(field=>field.disabled=!1)}disableInputFields(){this.disableableFields().forEach(field=>field.disabled=!0)}disconnectedCallback(){this.recipientCheckbox.removeEventListener("change",this.onChangeEvent),document.removeEventListener("theme:cart:added",this.onCartAddedEvent)}}const selectors$a={productMediaSlider:"[data-product-single-media-slider]",productMediaThumb:"[data-thumbnail-id]",productMediaThumbs:"[data-product-single-media-thumbs]",productMediaWrapper:"[data-product-single-media-wrapper]",productModel:"[data-model]",productSingleThumbnailLink:".product-single__thumbnail-link",deferredMedia:"[data-deferred-media]",deferredMediaButton:"[data-deferred-media-button]",modalScrollContainer:"[data-tabs-holder]",tooltip:"[data-tooltip]",links:"a, button",upsellProduct:"[data-upsell-holder]",upsellProductSlider:"[data-upsell-slider]",featureSlider:"[data-slider]",productJson:"[data-product-json]"},classes$a={featuredProduct:"featured-product",featuredProductOnboarding:"featured-product--onboarding",hasMediaActive:"has-media-active",isSelected:"is-selected",mediaHidden:"media--hidden",noOutline:"no-outline",hasPopup:"has-popup",isMoving:"is-moving"},attributes$9={mediaId:"data-media-id",sectionId:"data-section-id",thumbId:"data-thumbnail-id",dataTallLayout:"data-tall-layout",loaded:"loaded",tabIndex:"tabindex",ariaHidden:"aria-hidden"},sections$8={};class Product{constructor(section){if(this.container=section.container,this.sectionId=this.container.getAttribute(attributes$9.sectionId),this.tallLayout=this.container.getAttribute(attributes$9.dataTallLayout)==="true",this.featureSliders=this.container.querySelectorAll(selectors$a.featureSlider),this.flkty=null,this.flktyNav=null,this.isFlickityDragging=!1,this.enableHistoryState=!this.container.classList.contains(classes$a.featuredProduct),this.checkSliderOnResize=()=>this.checkSlider(),this.flktyNavOnResize=()=>this.resizeFlickityNav(),this.initUpsellSlider(),this.initFeatureSlider(),new QuickViewPopup(this.container),this.container.classList.contains(classes$a.featuredProductOnboarding))return;const productJson=this.container.querySelector(selectors$a.productJson);if(productJson&&productJson.innerHTML){const productJsonHandle=JSON.parse(productJson.innerHTML).handle;let recentObj={};productJsonHandle&&(recentObj={handle:productJsonHandle}),Shopify.Products.recordRecentlyViewed(recentObj)}else Shopify.Products.recordRecentlyViewed();new Zoom(this.container),this.productSlider(),this.initMediaSwitch(),this.initProductVideo(),this.initProductModel(),this.initShopifyXrLaunch()}productSlider(){this.checkSlider(),document.addEventListener("theme:resize:width",this.checkSliderOnResize)}
63checkSlider(){if(!this.tallLayout||window.innerWidth<theme.sizes.large){this.initProductSlider();return}this.destroyProductSlider()}resizeFlickityNav(){this.flktyNav!==null&&this.flktyNav.resize()}initProductSlider(){const slider2=this.container.querySelector(selectors$a.productMediaSlider),thumbs=this.container.querySelector(selectors$a.productMediaThumbs),media=this.container.querySelectorAll(selectors$a.productMediaWrapper);if(media.length>1&&(this.flkty=new window.theme.Flickity(slider2,{wrapAround:!0,pageDots:!1,adaptiveHeight:!0,on:{ready:()=>{this.slidesAriaHidden(slider2),media.forEach(item=>{if(!item.classList.contains(classes$a.isSelected)){const links=item.querySelectorAll(selectors$a.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$9.tabIndex,"-1")})}})},dragStart:()=>{slider2.classList.add(classes$a.isMoving)},dragMove:()=>{this.isFlickityDragging=!0},staticClick:()=>{this.isFlickityDragging=!1},change:()=>{this.slidesAriaHidden(slider2)},settle:index=>{const mediaId=this.flkty.selectedElement.getAttribute(attributes$9.mediaId);this.flkty.cells.forEach((slide,i)=>{const links=slide.element.querySelectorAll(selectors$a.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$9.tabIndex,i===index?"0":"-1")})}),this.switchMedia(mediaId),slider2.classList.remove(classes$a.isMoving)}}}),media.length&&media.forEach(el=>{el.addEventListener("theme:media:play",()=>{this.flkty.options.draggable=!1,this.flkty.updateDraggable(),el.closest(selectors$a.productMediaSlider).classList.add(classes$a.hasMediaActive)}),el.addEventListener("theme:media:pause",()=>{this.flkty.options.draggable=!0,this.flkty.updateDraggable(),el.closest(selectors$a.productMediaSlider).classList.remove(classes$a.hasMediaActive)})}),window.theme.flickitySmoothScrolling(slider2),thumbs!==null)){this.flktyNav=new window.theme.Flickity(thumbs,{asNavFor:slider2,contain:!0,pageDots:!1,prevNextButtons:!1,resize:!0,on:{ready:()=>{thumbs.setAttribute(attributes$9.tabIndex,"-1"),this.slidesAriaHidden(thumbs),requestAnimationFrame(this.flktyNavOnResize)},change:()=>{this.slidesAriaHidden(thumbs)}}});const onTransitionEnd=()=>{requestAnimationFrame(this.flktyNavOnResize),this.flktyNav.viewport.removeEventListener("transitionend",onTransitionEnd)};this.flktyNav!==null&&(document.addEventListener("theme:resize:width",this.flktyNavOnResize),this.flktyNav.viewport.addEventListener("transitionend",onTransitionEnd)),window.theme.flickitySmoothScrolling(thumbs);const thumbLinks=this.container.querySelectorAll(selectors$a.productSingleThumbnailLink);thumbLinks.length&&thumbLinks.forEach(el=>{el.addEventListener("click",e=>{e.preventDefault()})})}}slidesAriaHidden(slider2){window.theme.Flickity.data(slider2).cells.forEach(sli
63de=>slide.element.setAttribute(attributes$9.ariaHidden,"false"))}destroyProductSlider(){this.flkty!==null&&(this.flkty.destroy(),this.flktyNav.destroy(),this.flkty=null,this.flktyNav=null)}initUpsellSlider(){const slider2=this.container.querySelector(selectors$a.upsellProductSlider),items=this.container.querySelectorAll(selectors$a.upsellProduct);if(items.length>1){const flktyUpsell=new window.theme.Flickity(slider2,{wrapAround:!0,pageDots:!0,adaptiveHeight:!0,prevNextButtons:!1,on:{ready:()=>{items.forEach(item=>{if(!item.classList.contains(classes$a.isSelected)){const links=item.querySelectorAll(selectors$a.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$9.tabIndex,"-1")})}})}}});flktyUpsell.on("change",index=>{flktyUpsell.cells.forEach((slide,i)=>{const links=slide.element.querySelectorAll(selectors$a.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$9.tabIndex,i===index?"0":"-1")})})})}}initFeatureSlider(){this.featureSliders.forEach(featureSliders=>{const featureSlideIndex=Array.from(featureSliders.children);featureSlideIndex.length>1&&new window.theme.Flickity(featureSliders,{wrapAround:!0,pageDots:!0,adaptiveHeight:!0,prevNextButtons:!1,on:{ready:function(){featureSlideIndex.forEach(item=>{if(!item.classList.contains(classes$a.isSelected)){const links=item.querySelectorAll(selectors$a.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$9.tabIndex,"-1")})}})}}}).on("change",index=>{featureSlideIndex.forEach((slide,i)=>{const links=slide.querySelectorAll(selectors$a.links);links.length&&links.forEach(link=>{link.setAttribute(attributes$9.tabIndex,i===index?"0":"-1")})})})})}handleMediaFocus(event){if(event.code!==theme.keyboardKeys.ENTER&&event.code!==theme.keyboardKeys.TAB)return;const mediaId=event.currentTarget.getAttribute(attributes$9.thumbId),activeSlide=this.container.querySelector(`[${attributes$9.mediaId}="${mediaId}"]`),slideIndex=parseInt([...activeSlide.parentNode.children].indexOf(activeSlide)),slider2=this.container.querySelector(selectors$a.productMediaSlider),sliderNav=this.container.querySelector(selectors$a.productMediaThumbs),flkty=window.theme.Flickity.data(slider2)||null,flktyNav=window.theme.Flickity.data(sliderNav)||null;flkty&&flkty.isActive&&slideIndex>-1&&(event.code===theme.keyboardKeys.ENTER||event.code===theme.keyboardKeys.NUMPADENTER)&&flkty.select(slideIndex),flktyNav&&flktyNav.isActive&&slideIndex>-1&&flktyNav.select(slideIndex)}switchMedia(mediaId){const mediaItems=document.querySelectorAll(`${selectors$a.productMediaWrapper}`),selectedMedia=this.container.querySelector(`${selectors$a.productMediaWrapper}[${attributes$9.mediaId}="${mediaId}"]`),isFocusEnabled=!document.body.classList.contains(classes$a.noOutline);mediaItems.length&&mediaItems.forEach(media=>{media.dispatchEvent(new CustomEvent("theme:media:hidden"),{bubbles:!0}),media.classList.add(classes$a.mediaHidden)}),isFocusEnabled&&selectedMedia.focus(),selectedMedia.closest(selectors$a.productMediaSlider).classList.remove(classes$a.hasMediaActive),selectedMedia.classList.remove(classes$a.mediaHidden),selectedMedia.dispatchEvent(new CustomEvent("theme:media:visible"),{bubbles:!0});const deferredMedia=selectedMedia.querySelector(selectors$a.deferredMedia);deferredMedia&&deferredMedia.getAttribute(attributes$9.loaded)!=="true"&&selectedMedia.querySelector(selectors$a.deferredMediaButton).dispatchEvent(new Event("click"))}initMediaSwitch(){const productThumbImages=this.container.querySelectorAll(selectors$a.productMediaThumb);productThumbImages.length&&productThumbImages.forEach(el=>{el.addEventListener("keyup",this.handleMediaFocus.bind(this)),el.addEventListener("click",e=>{e.preventDefault()})})}initProductVideo(){this.videos=new ProductVideo(this.container)}initProductModel(){const modelItems=this.container.querySelectorAll(selectors$a.productModel);modelItems.length&&modelItems.forEach(element=>{theme.ProductModel.init(element,this.sectionId)})}initShopifyXrLaunch(){document.addEventListener("shopify_xr_launch",()=>{this.container.querySelector(`${selectors$a.productModel}:not(.${classes$a.mediaHidden})`).dispatchEvent(new CustomEvent("xrLaunch"))})}onUnload(){this.flktyNav!==null&&document.removeEventListener("theme:resize:width",this.flktyNavOnResize),document.removeEventListener("theme:resize:width",this.checkSliderOnResize)}onBlockSelect(event){const flkty=window.theme.Flickity.data(event.target.closest(selectors$a.featureSlider)),index=
63parseInt([...event.target.parentNode.children].indexOf(event.target));flkty&&flkty.select(index)}}const productSection={onLoad(){sections$8[this.id]=new Product(this)},onUnload:function(){sections$8[this.id].onUnload()},onBlockSelect(event){sections$8[this.id].onBlockSelect(event)}};register("product-template",[productFormSection,productSection,swatchSection,swatchesContainer,shareButton,collapsible,tooltip,drawer,productStickySection]),register("featured-product",[productFormSection,productSection,swatchSection,swatchesContainer,shareButton,collapsible,tooltip,drawer,productStickySection]),customElements.get("complementary-products")||customElements.define("complementary-products",ComplementaryProducts),customElements.get("recipient-form")||customElements.define("recipient-form",RecipientForm);const attributes$8={href:"href",mediaId:"data-media-id",deferredMediaLoaded:"data-deferred-media-loaded"},selectors$9={deferredMedia:"[data-deferred-media]",deferredMediaButton:"[data-deferred-media-button]",productContentWrapper:"[data-product-content-wrapper]",productMediaWrapper:"[data-product-single-media-wrapper]",productModel:"[data-model]",productLink:"[data-product-link]",productSingleMediaImage:"[data-product-single-media-image]",sliderContents:"[data-slider-contents]",sliderImages:"[data-slider-images]",tabButton:"[data-tab-button]",tabItem:"[data-tab-item]",circleText:"[data-circle-text]"},classes$9={aosAnimate:"aos-animate",tabButtonActive:"products-list__nav__button--active",tabItemActive:"products-list__item--active",mediaHidden:"media--hidden",isDisabled:"is-disabled"},sections$7={};class ProductsList{constructor(section){this.container=section.container,this.sectionId=this.container.dataset.sectionId,this.tabButtons=this.container.querySelectorAll(selectors$9.tabButton),this.tabItems=this.container.querySelectorAll(selectors$9.tabItem),this.slidersImages=this.container.querySelectorAll(selectors$9.sliderImages),this.slidersContents=this.container.querySelectorAll(selectors$9.sliderContents),this.videos=[],this.flktyImages=[],this.flktyContent=[],this.sliderResizeEvent=()=>this.resizeSlider(),this.initButtons(),this.initSliders(),this.initProductVideos(),this.initProductModel(),this.initShopifyXrLaunch(),this.listen()}listen(){(this.slidersImages.length>0||this.slidersContents.length>0)&&document.addEventListener("theme:resize",this.sliderResizeEvent)}resizeSlider(){this.flktyImages.length>0&&requestAnimationFrame(()=>{this.flktyImages.forEach(flktyImages=>flktyImages.resize())}),this.flktyContent.length>0&&requestAnimationFrame(()=>{this.flktyContent.forEach(flktyContent=>flktyContent.resize())})}initButtons(){this.tabButtons.length&&this.tabButtons.forEach(tabButton=>{tabButton.addEventListener("click",e=>{if(tabButton.classList.contains(classes$9.tabButtonActive))return;const currentTabAnchor=tabButton.getAttribute(attributes$8.href),currentTab=this.container.querySelector(currentTabAnchor),currentMedia=currentTab.querySelector(selectors$9.productMediaWrapper),mediaId=currentMedia?currentMedia.dataset.mediaId:null,currentCircleText=currentTab.querySelector(selectors$9.circleText);this.tabButtons.forEach(button=>{button.classList.remove(classes$9.tabButtonActive)}),this.tabItems.forEach(item=>{const circleText=item.querySelector(selectors$9.circleText);item.classList.remove(classes$9.tabItemActive),circleText?.classList.add(classes$9.isDisabled),theme.settings.animationsEnabled&&item.querySelectorAll(`.${classes$9.aosAnimate}`).forEach(element=>{element.classList.remove(classes$9.aosAnimate),setTimeout(()=>{element.classList.add(classes$9.aosAnimate)})})}),tabButton.classList.add(classes$9.tabButtonActive),currentTab.classList.add(classes$9.tabItemActive),document.dispatchEvent(new CustomEvent("theme:resize")),currentCircleText&&(currentCircleText.classList.remove(classes$9.isDisabled),document.dispatchEvent(new CustomEvent("theme:scroll"))),this.handleProductVideos(currentTab,mediaId),e.preventDefault()})})}initSliders(){this.slidersImages.forEach((sliderImages,idx)=>{const contentsElement=sliderImages.closest(selectors$9.tabItem).querySelector(selectors$9.sliderContents),flktyImages=new window.theme.Flickity(sliderImages,{fade:!0,pageDots:!1,prevNextButtons:!0,wrapAround:!0,adaptiveHeight:!0,asNavFor:contentsElement,on:{change:index=>{this.flktyContent.length>0&&this.flktyContent[idx].select(index)}}});flktyImages.on("settle",index=>{const elements=sliderImages.querySelectorAll(selectors$9.productMediaWrapper);for(let i=0;i<elements.length;i++)i===index?elements[i].querySelector(selectors$9.productSingleMediaImage).removeAttribute("tabindex"):elements[i].querySelector(selectors$9.productSingleMediaImage).setAttribute("tabindex","-1")}),this.flktyImages.push(flktyImages)}
63),this.slidersContents.forEach(sliderContent=>{const flktyContent=new window.theme.Flickity(sliderContent,{fade:!0,pageDots:!1,prevNextButtons:!1,wrapAround:!0,adaptiveHeight:!0});flktyContent.on("settle",index=>{const elements=sliderContent.querySelectorAll(selectors$9.productContentWrapper);for(let i=0;i<elements.length;i++)i===index?elements[i].querySelectorAll(selectors$9.productLink).forEach(element=>{element.removeAttribute("tabindex")}):elements[i].querySelectorAll(selectors$9.productLink).forEach(element=>{element.setAttribute("tabindex","-1")})}),this.flktyContent.push(flktyContent)})}initProductVideos(){this.tabItems.forEach(item=>{item.classList.contains(classes$9.tabItemActive)&&this.handleProductVideos(item)})}loadVideos(container,mediaId=null){new IntersectionObserver((entries,observer)=>{entries.forEach(entry=>{if(entry.isIntersecting){const productVideo=new ProductVideo(container);this.videos.push(productVideo),container.setAttribute(attributes$8.deferredMediaLoaded,""),this.playToggle(mediaId),observer.unobserve(entry.target)}})},{root:null,rootMargin:"300px",threshold:[0,.1,.25,.5,.75,1]}).observe(container)}handleProductVideos(container,mediaId=null){if(!container.hasAttribute(attributes$8.deferredMediaLoaded)){this.loadVideos(container,mediaId);return}this.playToggle(mediaId)}playToggle(mediaId){this.videos.forEach(element=>{typeof element.pauseContainerMedia=="function"&&mediaId&&(element.pauseContainerMedia(mediaId,this.container),this.switchMedia(mediaId)),!mediaId&&Object.keys(element.players).length===0&&this.pauseContainerMedia(this.container)})}switchMedia(mediaId){const selectedMedia=this.container.querySelector(`${selectors$9.productMediaWrapper}[${attributes$8.mediaId}="${mediaId}"]`);!document.body.classList.contains(classes$9.noOutline)&&selectedMedia.focus(),selectedMedia.classList.remove(classes$9.mediaHidden),selectedMedia.dispatchEvent(new CustomEvent("theme:media:visible"),{bubbles:!0})}pauseContainerMedia(container){const mediaItems=container.querySelectorAll(selectors$9.productMediaWrapper);mediaItems.length!==0&&mediaItems.forEach(media=>{media.dispatchEvent(new CustomEvent("theme:media:hidden"),{bubbles:!0}),media.classList.add(classes$9.mediaHidden)})}initProductModel(){const modelItems=this.container.querySelectorAll(selectors$9.productModel);modelItems.length&&modelItems.forEach(element=>{theme.ProductModel.init(element,this.sectionId)})}initShopifyXrLaunch(){document.addEventListener("shopify_xr_launch",()=>{this.container.querySelector(`${selectors$9.productModel}:not(.${classes$9.mediaHidden})`).dispatchEvent(new CustomEvent("xrLaunch"))})}onBlockSelect(evt){evt.target.dispatchEvent(new Event("click"))}onUnload(){(this.slidersImages.length>0||this.slidersContents.length>0)&&document.removeEventListener("theme:resize",this.sliderResizeEvent)}}register("products-list",[{onLoad(){sections$7[this.id]=new ProductsList(this)},onUnload(){sections$7[this.id].onUnload()},onBlockSelect(e){sections$7[this.id].onBlockSelect(e)}},parallaxSection]);const selectors$8={product:"[data-product-block]",relatedProducts:"[data-related-products]",recentlyViewed:"[data-recent-wrapper]",recentlyViewedWrapper:"[data-recently-viewed-wrapper]",slider:"[data-slider]",slide:"[data-slide]",aos:"[data-aos]",tabsHolder:"[data-tabs-holder]",tabsLink:"[data-tabs-link]",tab:"[data-tab]",tooltip:"[data-tooltip]"},attributes$7={sectionId:"data-section-id",productId:"data-product-id",limit:"data-limit",minimum:"data-minimum",tabsLink:"data-tabs-link",columnsMobile:"data-column-mobile"},classes$8={hidden:"hidden",aosAnimate:"aos-animate",oneWhole:"mobile--one-whole",oneHalf:"mobile--one-half"},sections$6={};class RelatedProducts{constructor(section){this.section=section,this.sectionId=section.id,this.container=section.container,this.related(),this.recent(),this.tabs=new Tabs(this.container)}related(){if(this.relatedProducts=this.container.querySelector(selectors$8.relatedProducts),!this.relatedProducts)return;const sectionId=this.container.getAttribute(attributes$7.sectionId),productId=this.container.getAttribute(attributes$7.productId),limit=this.container.getAttribute(attributes$7.limit),requestUrl=`${theme.routes.product_recommendations_url}?section_id=${sectionId}&limit=${limit}&product_id=${productId}`;fetch(requestUrl).then(response=>{if(!response.ok){const error=new Error(response.status);throw this.hideRelated(),error}return response.text()}).then(data=>{const createdElement=document.createElement("div");createdElement.innerHTML=data;const inner=createdElement.querySelector(selectors$8.relatedProducts);inner&&inner.querySelectorAll(selectors$8.product).length&&(this.relatedProducts.innerHTML=inner.innerHTML,this.relatedProductGrid=new ProductGrid(this.relatedProducts),this.relatedGridSl
63ider=new GridSlider(this.container),this.initTooltips(this.relatedProducts))})}recent(){const recentlyViewed=this.container.querySelector(selectors$8.recentlyViewed),howManyToshow=recentlyViewed?parseInt(recentlyViewed.getAttribute(attributes$7.limit)):4;Shopify.Products.showRecentlyViewed({howManyToShow:howManyToshow,wrapperId:`recently-viewed-products-${this.sectionId}`,section:this.section,onComplete:(wrapper,section)=>{const container=section.container,recentlyViewedHolder=container.querySelector(selectors$8.recentlyViewed),recentlyViewedWrapper=container.querySelector(selectors$8.recentlyViewedWrapper),recentProducts=wrapper.querySelectorAll(selectors$8.product),aosItem=recentlyViewedHolder.querySelectorAll(selectors$8.aos),slider2=recentlyViewedHolder.querySelector(selectors$8.slider),minimumNumberProducts=recentlyViewedHolder.hasAttribute(attributes$7.minimum)?parseInt(recentlyViewedHolder.getAttribute(attributes$7.minimum)):1,checkRecentInRelated=!recentlyViewedWrapper&&recentProducts.length>0,checkRecentOutsideRelated=recentlyViewedWrapper&&recentProducts.length>=minimumNumberProducts,columnsMobile=slider2?.getAttribute(attributes$7.columnsMobile);if(checkRecentInRelated||checkRecentOutsideRelated){this.recentProductGrid=new ProductGrid(recentlyViewedHolder),this.initTooltips(recentlyViewedHolder),checkRecentOutsideRelated&&container.classList.remove(classes$8.hidden),slider2&&(this.recentGridSlider=new GridSlider(container),requestAnimationFrame(()=>
63{this.recentGridSlider.sliders.forEach(slider3=>{slider3.dispatchEvent(new CustomEvent("theme:slider:resize",{bubbles:!0})),this.recentGridSlider.setSliderArrowsPosition(slider3)})}),slider2.querySelectorAll(selectors$8.slide).forEach(slides=>{columnsMobile==2?(slides.classList.add(classes$8.oneHalf),slides.classList.remove(classes$8.oneWhole)):(slides.classList.add(classes$8.oneWhole),slides.classList.remove(classes$8.oneHalf))}));let itemsSet=[];recentlyViewedHolder.addEventListener("theme:target:animate",event=>{itemsSet.push(event.detail),itemsSet.length===aosItem.length&&requestAnimationFrame(()=>aosItem.forEach(item=>item.classList.add(classes$8.aosAnimate)))})}}})}hideRelated(){const tab=this.relatedProducts.closest(selectors$8.tab),tabsHolder=this.relatedProducts.closest(selectors$8.tabsHolder),tabsLink=tabsHolder.querySelector(`[${attributes$7.tabsLink}="${tab.dataset.tab}"]`);tab.remove(),tabsLink&&(tabsLink.remove(),tabsHolder.querySelector(selectors$8.tabsLink).dispatchEvent(new Event("click")),this.tabs.customScrollbar.unload(),requestAnimationFrame(()=>{this.tabs.customScrollbar=new CustomScrollbar(this.tabs.container)}))}initTooltips(container){this.tooltips=container.querySelectorAll(selectors$8.tooltip),this.tooltips.forEach(tooltip2=>{new Tooltip(tooltip2)})}onDeselect(){this.relatedProductGrid&&this.relatedProductGrid.onDeselect(),this.recentProductGrid&&this.recentProductGrid.onDeselect()}onBlockSelect(event){const element=event.target,tab=this.container.querySelectorAll(selectors$8.tab);!element||tab.length<2||(element.dispatchEvent(new Event("click")),element.parentNode.scrollTo({top:0,left:element.offsetLeft-element.clientWidth,behavior:"smooth"}))}onUnload(){this.relatedProductGrid&&this.relatedProductGrid.onUnload(),this.relatedGridSlider&&this.relatedGridSlider.onUnload(),this.recentProductGrid&&this.recentProductGrid.onUnload(),this.recentGridSlider&&this.recentGridSlider.onUnload()}}const relatedProductsSection={onLoad(){sections$6[this.id]=new RelatedProducts(this)},onDeselect(){sections$6[this.id].onDeselect()},onBlockSelect(event){sections$6[this.id].onBlockSelect(event)},onUnload(){sections$6[this.id].onUnload()}};register("related-products",relatedProductsSection),register("recent-products",relatedProductsSection);const selectors$7={sTLHotspotsItem:"[data-stl-hotspots-item]",sTLHotspotsTarget:"[data-stl-hotspots-target]",sTLHotspotsTrigger:"[data-stl-hotspots-trigger]",shopifySection:".shopify-section",quickViewItemHolder:"[data-quick-view-item-holder]",links:"[data-product-block] a, [data-product-block] button"},attributes$6={hotspot:"data-hotspot",initialOpen:"data-stl-initial-open",tabIndex:"tabindex",ariaExpanded:"aria-expanded"},classes$7={aosAnimate:"aos-animate",isActive:"is-active",isLoading:"is-loading",popupOpen:"pswp--open",blockSelected:"block-selected"};class STLHotspots extends HTMLElement{static observedAttributes=["class"];constructor(){super(),this.initialOpen=this.hasAttribute(attributes$6.initialOpen)}get items(){return[...this.querySelectorAll(selectors$7.sTLHotspotsItem)]}get targets(){return[...this.querySelectorAll(selectors$7.sTLHotspotsTarget)]}get triggers(){return[...this.querySelectorAll(selectors$7.sTLHotspotsTrigger)]}attributeChangedCallback(name,oldValue,newValue){const isClassChange=name==="class",inView=newValue.includes(classes$7.aosAnimate);let justIn=!0;oldValue&&oldValue.includes(classes$7.aosAnimate)&&(justIn=!1),isClassChange&&inView&&justIn&&this.animate()}connectedCallback(){this.animationsTimeout=null,this.resetAnimations=!1,this.init(),this.listen()}init(){theme.settings.animationsEnabled||this.animate(),this.initialOpen||this.focusables()}listen(){if(Shopify.designMode){const section=this.closest(selectors$7.shopifySection);section.addEventListener("shopify:section:select",()=>this.restoreAnimations()),section.addEventListener("shopify:section:deselect",event=>this.deselectAll(event)),section.addEventListener("shopify:block:deselect",()=>this.restoreAnimations()),this.addEventListener("shopify:block:select",event=>{this.animationsTimeout&&(clearTimeout(this.animationsTimeout),this.animationsTimeout=null),this.removeAnimations(),this.deselectAll(event),this.select(this.targets.indexOf(event.target))})}
63this.targets.forEach(target=>{target.addEventListener("click",event=>{this.select(this.targets.indexOf(event.target)),this.restoreAnimations()})}),this.triggers.forEach(target=>{target.addEventListener("click",event=>{const selectedIndex=this.triggers.indexOf(event.target);this.select(selectedIndex),this.restoreAnimations(),window.theme.isMobile()&&this.dispatchEvent(new CustomEvent("stl:open-quick-view",{bubbles:!0,detail:{index:selectedIndex}}))})}),this.addEventListener("keyup",event=>this.onKeyup(event))}animate(){if(!this.initialOpen)return;let delay=600;Shopify.designMode&&(delay=300),!this.resetAnimations&&setTimeout(()=>this.select(0),delay)}removeAnimations(){this.items.forEach(item=>{item.style.setProperty("--duration","0s"),item.classList.add(classes$7.blockSelected)}),this.resetAnimations=!0}restoreAnimations(){Shopify.designMode&&(this.items.forEach(item=>item.classList.remove(classes$7.blockSelected)),this.animationsTimeout=setTimeout(()=>{this.items.forEach(item=>{item.style.removeProperty("--duration")}),this.resetAnimations=!1},1e3))}deselectAll(event=!1){this.items.forEach((item,index)=>{item.classList.remove(classes$7.isActive),index===0&&this.initialOpen&&event&&!this.resetAnimations&&item.classList.add(classes$7.isActive)}),setTimeout(()=>this.focusables())}select(selectedIndex){this.items.forEach((item,index)=>{item.setAttribute("aria-current",selectedIndex===index?"true":"false"),item.classList.toggle(classes$7.isActive,selectedIndex===index)}),this.focusables()}focusables(){this.items.forEach((element,index)=>{const isActive=element.classList.contains(classes$7.isActive),tabIndex=isActive?"0":"-1",expanded=!!isActive;
63element.querySelectorAll(selectors$7.links).forEach(link=>link.setAttribute(attributes$6.tabIndex,tabIndex)),this.targets[index].setAttribute(attributes$6.ariaExpanded,expanded)})}onKeyup(event){event.code===theme.keyboardKeys.ESCAPE&&(this.deselectAll(),event.target.closest(selectors$7.sTLHotspotsItem).querySelector(selectors$7.sTLHotspotsTarget).focus())}}customElements.get("stl-hotspots")||customElements.define("stl-hotspots",STLHotspots);class ShopTheLook extends HTMLElement{constructor(){super()}get hotspots(){return this.querySelector("stl-hotspots")}get hotspotsTargets(){return[...this.querySelectorAll(selectors$7.sTLHotspotsTarget)]}get hotspotsTriggers(){return[...this.querySelectorAll(selectors$7.sTLHotspotsTrigger)]}connectedCallback(){this.init(),this.listen()}disconnectedCallback(){}init(){this.quickViewPopup=new QuickViewPopup(this),this.openQuickViewPopupCallback=window.theme.debounce(target=>this.openQuickViewPopup(target),500)}listen(){if(Shopify.designMode){const section=this.closest(selectors$7.shopifySection);section.addEventListener("shopify:section:unload",this.destroyQuickViewPopup.bind(this)),section.addEventListener("shopify:section:deselect",this.destroyQuickViewPopup.bind(this)),this.addEventListener("shopify:block:select",event=>this.openQuickViewPopupCallback(event.target))}this.hotspots&&(this.addEventListener("click",event=>{event.target.closest(selectors$7.sTLHotspotsItem)!==null||(this.hotspots.deselectAll(),this.hotspots.restoreAnimations())}),this.hotspots.addEventListener("stl:open-quick-view",event=>{if(!window.theme.isMobile())return;const target=this.hotspotsTargets[event.detail.index];this.openQuickViewPopup(target);const onPopupInit=()=>{this.hotspotsTriggers.forEach(button=>button.classList.add(classes$7.isLoading)),this.quickViewPopup.loadPhotoswipe?.popup?.listen("destroy",()=>{this.hotspotsTriggers.forEach(button=>button.classList.remove(classes$7.isLoading)),target.removeEventListener("theme:popup:init",onPopupInit)})};target.addEventListener("theme:popup:init",onPopupInit)}))}openQuickViewPopup(target){if(!window.theme.isMobile())return;const pswpElement=this.quickViewPopup?.loadPhotoswipe?.pswpElement;if(!pswpElement){setTimeout(()=>this.triggerClick(target),400);return}setTimeout(()=>{if(pswpElement.classList.contains(classes$7.popupOpen)){const holder=this.quickViewPopup.loadPhotoswipe.pswpElement.querySelector(`[${attributes$6.hotspot}="${target.getAttribute(attributes$6.hotspot)}"]`),quickViewItemHolders=this.quickViewPopup.loadPhotoswipe.pswpElement.querySelectorAll(selectors$7.quickViewItemHolder);holder.classList.add(classes$7.isActive),quickViewItemHolders.forEach(element=>{element!==holder&&element.classList.remove(classes$7.isActive)})}else this.triggerClick(target)})}
63triggerClick(target){requestAnimationFrame(()=>target.dispatchEvent(new Event("click")))}destroyQuickViewPopup(){const pswpElement=this.quickViewPopup?.loadPhotoswipe?.pswpElement;pswpElement&&pswpElement.classList.contains(classes$7.popupOpen)&&this.quickViewPopup.loadPhotoswipe.popup.close()}}customElements.get("shop-the-look")||customElements.define("shop-the-look",ShopTheLook);const sections$5={},selectors$6={slider:"[data-slider]",sliderItem:"[data-item]",buttonProductsShow:"[data-button-show]",buttonProductsHide:"[data-button-hide]",itemProducts:"[data-item-products]",itemProductSlider:"[data-item-products-slider]",itemProduct:"[data-item-product]",links:"a, button"},classes$6={itemActive:"blog-item--active",itemProductsVisible:"blog-item__products--visible",featuredBlogSlider:"shoppable-blog__slider",flickityEnabled:"flickity-enabled",isSelected:"is-selected"},attributes$5={slider:"data-slider",slidePosition:"data-slide-position",sectionId:"data-section-id",tabIndex:"tabindex",ariaHidden:"aria-hidden"};class ShoppableBlog{constructor(section){this.container=section.container,this.flkty=null,this.slider=this.container.querySelector(selectors$6.slider),this.checkSlidesSizeOnResize=()=>this.checkSlidesSize(),this.isFullWidth=this.container.hasAttribute(attributes$5.fullWidth),this.gutter=0,this.a11y=window.theme.a11y,this.clickOutsideItemEvent=e=>{if(!(e.target.matches(selectors$6.sliderItem)||e.target.closest(selectors$6.sliderItem))){const sliderItem=this.container.querySelectorAll(selectors$6.sliderItem);sliderItem.length&&sliderItem.forEach(item=>{const itemProducts=item.querySelector(selectors$6.itemProducts);itemProducts&&(itemProducts.classList.remove(classes$6.itemProductsVisible),this.changeTabIndex(itemProducts),this.changeAriaHidden(itemProducts,!0)),item.classList.remove(classes$6.itemActive)})}},this.bindButtons(),this.listen()}initSlider(){this.flkty=new window.theme.Flickity(this.slider,{prevNextButtons:!0,pageDots:!1,cellAlign:"left",wrapAround:!1,groupCells:!0,contain:!0,on:{ready:()=>{this.handleFocus()}}}),this.flkty.on("change",()=>{const slides=this.container.querySelectorAll(selectors$6.sliderItem);this.handleFocus(),slides.length&&slides.forEach(el=>{const itemProducts=el.querySelector(selectors$6.itemProducts);el.classList.remove(classes$6.itemActive),itemProducts&&el.querySelector(selectors$6.itemProducts).classList.remove(classes$6.itemProductsVisible)}),this.flkty&&!this.flkty.options.draggable&&(this.flkty.options.draggable=!0,this.flkty.updateDraggable())})}destroySlider(){this.flkty!==null&&(this.flkty.destroy(),this.flkty=null)}checkSlidesSize(){const sliderItemStyle=this.container.querySelector(selectors$6.sliderItem).currentStyle||window.getComputedStyle(this.container.querySelector(selectors$6.sliderItem));this.gutter=parseInt(sliderItemStyle.marginRight);const containerWidth=this.slider.offsetWidth+this.gutter,itemsWidth=this.getItemsWidth(),itemsOverflowViewport=containerWidth<itemsWidth;window.innerWidth>=theme.sizes.small&&itemsOverflowViewport?this.initSlider():this.destroySlider()}getItemsWidth(){let itemsWidth=0;const slides=this.slider.querySelectorAll(selectors$6.sliderItem);return slides.length&&slides.forEach(item=>{itemsWidth+=item.offsetWidth+this.gutter}),itemsWidth}bindButtons(){const itemProductSlider=this.container.querySelectorAll(selectors$6.itemProductSlider),buttonProductsShow=this.container.querySelectorAll(selectors$6.buttonProductsShow),buttonProductsHide=this.container.querySelectorAll(selectors$6.buttonProductsHide);buttonProductsShow.length&&buttonProductsShow.forEach(button=>{button.addEventListener("click",e=>{e.preventDefault(),this.container.querySelectorAll(selectors$6.sliderItem).forEach(item2=>{const itemProducts2=item2.querySelector(selectors$6.itemProducts);item2.classList.remove(classes$6.itemActive),itemProducts2&&(itemProducts2.classList.remove(classes$6.itemProductsVisible),this.changeTabIndex(itemProducts2),this.changeAriaHidden(itemProducts2,!0))});const item=button.closest(selectors$6.sliderItem),itemProducts=item.querySelector(selectors$6.itemProducts);if(item.classList.add(classes$6.itemActive),itemProducts){itemProducts.classList.add(classes$6.itemProductsVisible),this.changeTabIndex(itemProducts,"enable"),this.changeAriaHidden(itemProducts,!1);const itemProductsSlider=itemProducts.querySelector(selectors$6.itemProductSlider),allSlides=itemProductsSlider.querySelectorAll(selectors$6.itemProduct);
63itemProductsSlider.classList.contains(classes$6.flickityEnabled)&&allSlides.forEach(slide=>{const isSelected=slide.classList.contains(classes$6.isSelected);slide.setAttribute(attributes$5.tabIndex,isSelected?"0":"-1"),this.changeAriaHidden(slide,!isSelected)})}this.flkty!==null&&(this.flkty.options.draggable=!1,this.flkty.updateDraggable()),this.a11y.state.trigger=button})}),buttonProductsHide.length&&buttonProductsHide.forEach(button=>{button.addEventListener("click",e=>{e.preventDefault();const item=button.closest(selectors$6.sliderItem),itemProducts=item.querySelector(selectors$6.itemProducts);item.classList.remove(classes$6.itemActive),itemProducts&&(itemProducts.classList.remove(classes$6.itemProductsVisible),this.changeTabIndex(itemProducts),this.changeAriaHidden(itemProducts,!0)),this.flkty!==null&&(this.flkty.options.draggable=!0,this.flkty.updateDraggable()),this.a11y.state.trigger.focus()})}),itemProductSlider.length&&itemProductSlider.forEach(slider2=>{slider2.querySelectorAll(selectors$6.itemProduct).length>1&&new window.theme.Flickity(slider2,{prevNextButtons:!0,contain:!0,pageDots:!1,wrapAround:!0,on:{change:index=>{slider2.querySelectorAll(selectors$6.itemProduct).forEach((slide,i)=>{const isSelected=i===index;slide.setAttribute(attributes$5.tabIndex,isSelected?"0":"-1"),this.changeAriaHidden(slide,!isSelected)})}}})}),this.slider.addEventListener("keyup",event=>{if(event.code===theme.keyboardKeys.ESCAPE){const sliderItem=event.target.hasAttribute(attributes$5.slider)?event.target.querySelectorAll(selectors$6.sliderItem):event.target.closest(selectors$6.slider).querySelectorAll(selectors$6.sliderItem);sliderItem.length&&(sliderItem.forEach(item=>{const itemProducts=item.querySelector(selectors$6.itemProducts);item.classList.remove(classes$6.itemActive),itemProducts&&(itemProducts.classList.remove(classes$6.itemProductsVisible),this.changeTabIndex(itemProducts),this.changeAriaHidden(itemProducts,!0))}),this.flkty&&(this.flkty.options.draggable=!0,this.flkty.updateDraggable())),this.a11y.state.trigger.focus()}})}handleFocus(){const sliderItems=this.container.querySelectorAll(selectors$6.sliderItem);sliderItems.length&&sliderItems.forEach(item=>{const selected=item.classList.contains(classes$6.isSelected),itemProducts=item.querySelector(selectors$6.itemProducts);selected?(this.changeTabIndex(item,"enable"),itemProducts&&this.changeTabIndex(itemProducts)):(this.changeTabIndex(item),itemProducts&&itemProducts.classList.remove(classes$6.itemProductsVisible))})}listen(){this.slider&&(this.checkSlidesSize(),document.addEventListener("theme:resize:width",this.checkSlidesSizeOnResize)),document.addEventListener("mousedown",this.clickOutsideItemEvent)}changeAriaHidden(element,isHidden){element.setAttribute(attributes$5.ariaHidden,!!isHidden
63)}changeTabIndex(items,state=""){const tabIndex=state==="enable"?"0":"-1";items.querySelectorAll(selectors$6.links).forEach(link=>{link.setAttribute(attributes$5.tabIndex,tabIndex)});const itemProductSliders=items.querySelectorAll(selectors$6.itemProductSlider),itemProducts=items.querySelector(selectors$6.itemProducts),isVisible=items.classList.contains(classes$6.itemProductsVisible);itemProductSliders.forEach(itemProductSlider=>{itemProductSlider.setAttribute(attributes$5.tabIndex,isVisible?"0":"-1"),itemProductSlider.querySelectorAll(selectors$6.itemProduct).forEach(itemProduct=>{this.changeAriaHidden(itemProduct,!isVisible)})}),itemProducts&&this.changeAriaHidden(itemProducts,!isVisible)}onBlockSelect(evt){if(this.flkty!==null){const index=parseInt([...evt.target.parentNode.children].indexOf(evt.target)),slidesPerPage=parseInt(this.flkty.slides[0].cells.length),groupIndex=Math.floor(index/slidesPerPage);if(!evt.detail.load){this.flkty.select(groupIndex);return}const onTransitionEnd=()=>{requestAnimationFrame(()=>{this.flkty.select(groupIndex)}),this.flkty.element.removeEventListener("transitionend",onTransitionEnd)};this.flkty.element.addEventListener("transitionend",onTransitionEnd)}else{const sliderStyle=this.slider.currentStyle||window.getComputedStyle(this.slider),sliderPadding=parseInt(sliderStyle.paddingLeft),blockPositionLeft=evt.target.offsetLeft-sliderPadding;this.slider.scrollTo({top:0,left:blockPositionLeft,behavior:"smooth"})}}onUnload(){document.removeEventListener("theme:resize:width",this.checkSlidesSizeOnResize),document.removeEventListener("mousedown",this.clickOutsideItemEvent)}}register("shoppable-blog",{onLoad(){sections$5[this.id]=new ShoppableBlog(this)},onUnload(e){sections$5[this.id].onUnload(e)},onBlockSelect(e){sections$5[this.id].onBlockSelect(e)}});const selectors$5={arrowScrollDown:"[data-scroll-down]",header:"[data-site-header]",item:"[data-slide]",links:"a, button",slider:"[data-slider]",lazyImage:".lazy-image",textHighlight:"text-highlight",parallax:'[data-parallax="zoom-on-scroll"],[data-parallax="card-scrolling"],[data-parallax="zoom-on-scroll,card-scrolling"]'},attributes$4={style:"data-style",currentStyle:"data-current-style",tabIndex:"tabindex"},classes$5={headerFixed:"site-header--fixed",sliderNoCachedImages:"slider--no-cached-images",sliderImgLoaded:"slider--img-loaded",imgIn:"img-in",originalHeight:"original-height",originalHeightMobile:"original-height-mobile",hasMobileHeight:"has-mobile-height"},sections$4={};class Slider{constructor(section){this.container=section.container,this.header=document.querySelector(selectors$5.header),this.items=this.container.querySelectorAll(selectors$5.item),this.flkty=null,this.parallax=null,this.resizeEvent=()=>{this.flkty.resize()},this.getTallestSlideItem(),this.initSlider(),this.bindScrollButton(),this.getTallestSlideItemOnResize=()=>this.getTallestSlideItem(),document.addEventListener("theme:resize:width",this.getTallestSlideItemOnResize),this.container.matches(selectors$5.parallax)&&(this.parallax=new ParallaxElement(this.container))}initSlider(){const slidesCount=this.items.length,duration=parseInt(this.container.dataset.duration),pageDots=this.container.dataset.pageDots==="true"&&slidesCount>1,prevNextButtons=this.container.dataset.navArrows==="true"&&slidesCount>1;let autoplay=this.container.dataset.autoplay==="true";if(autoplay&&(autoplay=duration),slidesCount>1)this.flkty=new window.theme.Flickity(this.container,{fade:!0,cellSelector:selectors$5.item,autoPlay:autoplay,wrapAround:!0,adaptiveHeight:!0,setGallerySize:!0,imagesLoaded:!0,pageDots,prevNextButtons,dragThreshold:25,on:{ready:()=>{const currentStyle=this.items[0].getAttribute(attributes$4.style);this.container.setAttribute(attributes$4.currentStyle,currentStyle),requestAnimationFrame(this.resizeEvent),document.addEventListener("theme:vars",this.resizeEvent),this.handleFirstSlideAnimation(!0)},change:index=>{const currentStyle=this.flkty.selectedElement.getAttribute(attributes$4.style);this.container.setAttribute(attributes$4.currentStyle,currentStyle),this.handleFirstSlideAnimation(!1),this.flkty.cells.forEac
63h((slide,i)=>{slide.element.querySelectorAll(selectors$5.links).forEach(link=>{link.setAttribute(attributes$4.tabIndex,i===index?"0":"-1")}),slide.element.querySelectorAll(selectors$5.textHighlight).forEach(highlight=>{highlight.setTriggerAttribute(i===index)})})}}}),window.theme.flickitySmoothScrolling(this.container);else if(slidesCount===1){const currentStyle=this.items[0].getAttribute(attributes$4.style);this.container.setAttribute(attributes$4.currentStyle,currentStyle)}}getTallestSlideItem(){if(this.items.length<=1)return;this.container.style.removeProperty("--item-min-h");const heights=[...this.items].map(item=>Math.floor(item.offsetHeight)),tallestSlideItemHeight=Math.max(...heights),isOriginalHeight=[...this.items].some(item=>item.classList.contains(classes$5.originalHeight)),isOriginalHeightMobile=[...this.items].some(item=>item.classList.contains(classes$5.originalHeightMobile)),hasMobileHeight=this.container.classList.contains(classes$5.hasMobileHeight);(window.theme.isDesktop()&&!isOriginalHeight||window.theme.isMobile()&&!isOriginalHeightMobile&&hasMobileHeight||window.theme.isMobile()&&!isOriginalHeight&&!hasMobileHeight)&&[...this.items].some(item=>Math.floor(item.offsetHeight)!==tallestSlideItemHeight)&&this.container.style.setProperty("--item-min-h",`${tallestSlideItemHeight}px`)}handleFirstSlideAnimation(onLoad=!1){if(!onLoad){this.container.classList.remove(classes$5.sliderNoCachedImages),this.container.classList.remove(classes$5.sliderImgLoaded);return}const slideImage=this.items[0].querySelectorAll(selectors$5.lazyImage),slideImgComplete=this.container.classList.contains(classes$5.imgIn);if(slideImage.length&&!slideImgComplete){this.container.classList.add(classes$5.sliderNoCachedImages);const onImageTransitionEnd=event=>{requestAnimationFrame(()=>this.container.classList.add(classes$5.sliderImgLoaded)),slideImage[0].removeEventListener("transitionend",onImageTransitionEnd)};slideImage[0].addEventListener("transitionend",onImageTransitionEnd)}}bindScrollButton(){const arrowDown=this.container.querySelector(selectors$5.arrowScrollDown);arrowDown&&arrowDown.addEventListener("click",e=>{e.preventDefault();const headerHeight=this.header.classList.contains(classes$5.headerFixed)?60:0,scrollToPosition=parseInt(Math.ceil(this.container.offsetTop+this.container.offsetHeight-headerHeight));window.scrollTo({top:scrollToPosition,left:0,behavior:"smooth"})})}onBlockSelect(evt){const index=parseInt([...evt.target.parentNode.children].indexOf(evt.target));this.flkty!==null&&(this.flkty.select(index),this.flkty.pausePlayer())}onBlockDeselect(evt){evt.target.closest(selectors$5.slider).dataset.autoplay==="true"&&this.flkty!==null&&this.flkty.playPlayer()}onReorder(){this.handleFirstSlideAnimation(!1),this.flkty!==null&&this.flkty.resize()}onUnload(){document.removeEventListener("theme:resize:width",this.getTallestSlideItemOnResize),this.handleFirstSlideAnimation(!1),this.flkty!==null&&(document.removeEventListener("theme:vars",this.resizeEvent),this.flkty.destroy(),this.flkty=null),this.parallax&&(this.parallax.unload(),this.parallax=null)}}register("slider",[{onLoad(){sections$4[this.id]=new Slider(this)},onReorder(e){sections$4[this.id].onReorder(e)},onUnload(e){sections$4[this.id].onUnload(e)},onBlockSelect(e){sections$4[this.id].onBlockSelect(e)},onBlockDeselect(e){sections$4[this.id].onBlockDeselect(e)}},videoPlay]);const selectors$4={body:"[data-sticky-card-body]",wrapper:"[data-sticky-card-wrapper]",content:"[data-sticky-card-content]",aside:"[data-sticky-card-aside]",text:"[data-sticky-card-text]",media:"[data-sticky-card-media]",vh:"[data-sticky-vh]"},classes$4={isStuckUp:"is-stuck-up",hasPassedSticky:"has-passed-sticky",spillover:"spillover"},attributes$3={layoutMobile:"data-sticky-card-layout-mobile"},sections$3={};class StickyImageCards{constructor(section){this.container=section.container,this.body=this.container.querySelector(selectors$4.body),this.wrapper=this.container.querySelectorAll(selectors$4.wrapper),this.content=this.container.querySelector(selectors$4.content),this.aside=this.container.querySelector(selectors$4.aside),this.text=this.container.querySelectorAll(selectors$4.text),this.media=this.container.querySelectorAll(selectors$4.media),this.textInContent=this.content?.querySelectorAll(selectors$4.text),this.vh=this.container.querySelector(selectors$4.vh),this.layoutMobile=this.container.getAttribute(attributes$3.layoutMobile),this.isDesktop=window.theme.getWindowWidth()>=window.theme.sizes.large,this.isMobile=window.theme.isMobile(),this.orientation=window.theme.getScreenOrientation(),this.media.length!==0&&(this.onScrollCallback=()=>this.onScroll(),this.onResizeCallback=()=>this.onResize(),this.init())}init(){requestAnimationFrame(()=>{this.calculateHeights(),this.onScroll()}),document.addEventListener("theme:scroll",this.onScrollCallback),document.addEventListener("theme:resize",this.onResizeCallback)}onScroll(){this.isEligible()&&this.detectStickyPositions()}isEligible(){const elementOffsetTopPoint=Math.round(this.container.getBoundingClientRect().top+window.scrollY),isBottomOf
63ElementPassed=elementOffsetTopPoint+this.container.offsetHeight<Math.round(window.scrollY);return elementOffsetTopPoint<Math.round(window.scrollY+window.innerHeight)&&!isBottomOfElementPassed}detectStickyPositions(){const parentOffset=Math.round(this.body.getBoundingClientRect().top-this.headerHeight-this.wrapperTop);[...this.wrapper].forEach((item,i)=>{const distance=Math.floor(item.getBoundingClientRect().top-this.headerHeight);if(this.isMobile){if(i!==this.lastIndex){const nextOneDistance=Math.floor(this.wrapper[i+1].getBoundingClientRect().top-this.headerHeight);item.classList.toggle(classes$4.hasPassedSticky,nextOneDistance<=this.stickyTop)}this.container.classList.toggle(`checkpoint-${i+1}`,parentOffset<=this.cumulativeHeights[i]*-1)}item.classList.toggle(classes$4.isStuckUp,distance<=this.stickyTop)})}calculateHeights(){let{stickyHeaderHeight}=window.theme.readHeights();this.headerHeight=stickyHeaderHeight||0,this.spacingTop=parseInt(window.getComputedStyle(this.container).getPropertyValue("--padding"))||20,this.wrapperTop=parseInt(window.getComputedStyle(this.wrapper[0]).getPropertyValue("top"))||0,this.stickyTop=Math.floor(this.wrapperTop-this.headerHeight),this.gap=parseInt(window.getComputedStyle(this.aside).getPropertyValue("gap"))||0,this.viewportHeight=this.vh.offsetHeight,this.lastIndex=[...this.wrapper].length-1,this.cumulativeHeights=[],this.isMobile&&(this.wrapperTop=this.spacingTop,this.stickyTop=this.spacingTop),this.textInContent&&(this.isDesktop&&this.textInContent.length>0&&this.textInContent.forEach((element,i)=>{element.style.setProperty("--row-height","auto"),this.wrapper[i].style.setProperty("--row-height","auto");const elementHeight=element.offsetHeight,mediaHeight=this.media[i].offsetHeight,maxHeight=Math.max(elementHeight,mediaHeight);element.style.setProperty("--row-height",`${maxHeight}px`),this.wrapper[i].style.setProperty("--row-height",`${maxHeight}px`)}),[...this.wrapper].forEach((item,i)=>{item.style.setProperty("--item-height","auto"),item.style.setProperty("--item-double-height","auto"),requestAnimationFrame(()=>{const itemHeight=item.offsetHeight,isExceeding=itemHeight+this.wrapperTop+this.headerHeight>this.viewportHeight,heights=[...this.wrapper].map(element=>Number(element.dataset.index)>=i?0:element.offsetHeight);this.cumulativeHeights.push(heights.reduce((a,b)=>a+b,0)),item.classList.toggle(classes$4.spillover,isExceeding),isExceeding&&this.isMobile&&(item.style.setProperty("--item-height",`${itemHeight}px`),item.style.setProperty("--item-double-height",`${itemHeight*2}px`))})}))}onResize(){requestAnimationFrame(()=>{this.isDesktop=window.theme.getWindowWidth()>=window.theme.sizes.large,this.isMobile=window.theme.isMobile();const isIOS=/iPhone|iPad|iPod/i.test(navigator.userAgent);let isEligible=this.isDesktop||!isIOS&&this.isMobile;this.orientation!==window.theme.getScreenOrientation()&&isIOS&&(isEligible=!0,this.orientation=window.theme.getScreenOrientation()),isEligible&&this.calculateHeights()})}onUnload(){document.removeEventListener("theme:scroll",this.onScrollCallback),document.removeEventListener("theme:resize",this.onResizeCallback)}onBlockSelect(event){requestAnimationFrame(()=>{const index=Number(event.target.dataset.index),parentOffset=Math.round(this.body.getBoundingClientRect().top+window.scrollY),cumulativeHeight=[...this.wrapper].map(element=>Number(element.dataset.index)>=index?0:element.offsetHeight).reduce((a,b)=>a+b,0),adjustTop=()=>{if(this.isMobile&&this.layoutMobile==="stacked"){const gapAdjustment=this.gap*index*-1,breathingSpace=this.gap/2;return gapAdjustment+breathingSpace}return this.stickyTop},distance=parentOffset+cumulativeHeight-adjustTop()-this.headerHeight;setTimeout(()=>{window.scrollTo({top:distance,left:0,behavior:"smooth"})},400)})}}register("sticky-image-cards",{onLoad(){sections$3[this.id]=new StickyImageCards(this)},onUnload(){sections$3[this.id].onUnload()},onBlockSelect(event){sections$3[this.id].onBlockSelect(event)}});const selectors$3={wrapper:"[data-sticky-wrapper]",aside:"[data-sticky-aside]",inner:"[data-sticky-inner]",content:"[data-sticky-content]",text:".js-only [data-sticky-text]",textInner:".js-only [data-sticky-text-inner]",image:".js-only [data-sticky-image]",images:"[data-sticky-images]",imageWrapper:".image-wrapper",videoWrapper:".sticky-images-and-text__video-wrapper",dot:"[data-sticky-dot]",textHighlight:"text-highlight"},attributes$2={withGaps:"data-sticky-with-gaps",singleText:"data-sticky-single-text",index:"data-index"},settings={intersectionRatio:.5,scrollDirection:{horizontal:"horizontal",horizontalReversed:"horizontal-reversed",vertical:"vertical",verticalReversed:"vertical-reversed"},typeOfIntersecting:{maxVisibility:"maximum-visibility-of-each-image-in-viewport",middleOfViewport:"image-in-the-middle-of-viewport"}}
63,classes$3={isActive:"is-active"},sections$2={};class StickyImagesAndText{constructor(section){this.container=section.container,this.scrollDirection=this.container.dataset.scrollDirection,this.horizontalScroll=this.scrollDirection===settings.scrollDirection.horizontal||this.scrollDirection===settings.scrollDirection.horizontalReversed,this.verticalScroll=this.scrollDirection===settings.scrollDirection.vertical||this.scrollDirection===settings.scrollDirection.verticalReversed,this.reverseDirection=this.scrollDirection===settings.scrollDirection.horizontalReversed||this.scrollDirection===settings.scrollDirection.verticalReversed,this.direction=this.reverseDirection?1:-1,this.withGaps=this.container.hasAttribute(attributes$2.withGaps),this.singleText=this.container.hasAttribute(attributes$2.singleText),this.image=this.container.querySelectorAll(selectors$3.image),this.text=this.container.querySelectorAll(selectors$3.text),this.textInner=this.container.querySelectorAll(selectors$3.textInner),this.images=this.container.querySelector(selectors$3.images),this.dot=this.container.querySelectorAll(selectors$3.dot),this.aside=this.container.querySelector(selectors$3.aside),this.inner=this.container.querySelector(selectors$3.inner),this.content=this.container.querySelector(selectors$3.content),this.wrapper=this.container.querySelector(selectors$3.wrapper),this.textHighlight=this.container.querySelectorAll(selectors$3.textHighlight),this.performAnimation=null,this.lastOffset=0,this.activeIndex=0,this.lastActiveIndex=this.activeIndex,this.wrapper&&(this.onScrollCallback=()=>this.onScroll(),this.onResizeCallback=()=>this.onResize(),this.calculateImagesOffsetCallback=()=>this.calculateImagesOffset(),this.init())}init(){this.getTypeOfIntersecting(),this.observeImagesIntersecting(),this.calculateHeights(),this.performAnimation=requestAnimationFrame(this.calculateImagesOffsetCallback),requestAnimationFrame(()=>{requestAnimationFrame(()=>this.calculateHeights())}),document.addEventListener("theme:scroll",this.onScrollCallback),document.addEventListener("theme:resize:width",this.onResizeCallback),this.syncDots()}getTypeOfIntersecting(){this.typeOfIntersecting=settings.typeOfIntersecting.maxVisibility,this.fractionOfViewport=this.image[0].offsetHeight/window.innerHeight,!(!this.verticalScroll||window.theme.isMobile())&&this.fractionOfViewport<.6&&(this.typeOfIntersecting=settings.typeOfIntersecting.middleOfViewport)}observeImagesIntersecting(){this.observersCollection=new Set,this.compareIntersectionRatio=[],this.maxVisibility=0,this.observer=new IntersectionObserver((entries,observer)=>{entries.forEach(entry=>{const targetHeight=entry.target.offsetHeight,intersectionRatio=entry.intersectionRatio,isIntersecting=entry.isIntersecting,currentStats={target:entry.target,intersectionRatio:entry.intersectionRatio},checkMaxVisibility=this.typeOfIntersecting===settings.typeOfIntersecting.maxVisibility;let intersectAt=settings.intersectionRatio;this.windowHeight<=targetHeight&&(intersectAt=0),checkMaxVisibility&&isIntersecting&&(this.observersCollection.forEach(item=>{item.target===entry.target&&this.observersCollection.delete(item)}),this.observersCollection.add(currentStats),this.compareIntersectionRatio=[...this.observersCollection].map(item=>item.intersectionRatio),this.maxVisibility=Math.max(...this.compareIntersectionRatio)),isIntersecting&&intersectionRatio>intersectAt&&checkMaxVisibility&&this.maxVisibility===intersectionRatio&&(this.maxVisibilityItem=[...this.observersCollection].find(item=>item.intersectionRatio===this.maxVisibility),this.activeIndex=Number(this.maxVisibilityItem.target.dataset.index),this.lastActiveIndex!==this.activeIndex&&(this.sync(),this.lastActiveIndex=this.activeIndex))})},{root:null,rootMargin:"0px",threshold:[0,.15,.3,.35,.4,.45,.5,.55,.6,.65,.7,.85,1]}),this.image.forEach(image=>this.observer.observe(image))}onScroll(){this.performAnimation||(this.performAnimation=requestAnimationFrame(this.calculateImagesOffsetCallback)),this.typeOfIntersecting===settings.typeOfIntersecting.middleOfViewport&&this.image.forEach(image=>this.checkImagePositionInViewport(image))}removeAnimationFrame(){this.performAnimation&&(cancelAnimationFrame(this.performAnimation),this.performAnimation=null)}checkImagePositionInViewport(element){if(!element)return;const windowHeight=window.innerHeight,scrollTop=window.scrollY,scrollMiddle=scrollTop+windowHeight/2,scrollBottom=scrollTop+windowHeight,elementOffsetTopPoint=Math.round(element.getBoundingClientRect().top+scrollTop),elementHeight=element.offsetHeight,elementOffsetBottomPoint=elementOffsetTopPoint+elementHeight,isBottomOf
63ElementPassed=elementOffsetBottomPoint<scrollTop;elementOffsetTopPoint<scrollBottom&&!isBottomOfElementPassed&&scrollMiddle>elementOffsetTopPoint&&elementOffsetBottomPoint>scrollMiddle&&(this.activeIndex=Number(element.dataset.index),this.lastActiveIndex!==this.activeIndex&&(this.sync(),this.lastActiveIndex=this.activeIndex))}calculateImagesOffset(){const asideTop=this.aside.getBoundingClientRect().top-this.headerHeight,stickyStartingPoint=asideTop-this.innerStickyTop;let percent=0,offset=0;const triggerPoint=this.hasShortImages?stickyStartingPoint:asideTop;triggerPoint<0?percent=triggerPoint/this.bottomEndingPoint*-1*100:triggerPoint>=0?percent=0:percent=100,offset=percent>100?100:percent,offset*=this.image.length-1,(window.theme.isMobile()||this.horizontalScroll)&&this.aside.style.setProperty("--translateX",`${Number(offset*this.direction).toFixed(2)}%`),this.lastOffset!==offset?this.performAnimation=requestAnimationFrame(this.calculateImagesOffsetCallback):this.performAnimation&&this.removeAnimationFrame(),this.lastOffset=offset}calculateHeights(){let{stickyHeaderHeight,windowHeight}=window.theme.readHeights();if(this.headerHeight=stickyHeaderHeight||0,this.windowHeight=windowHeight||window.innerHeight,this.text.length>0){const contentPaddingTop=this.content?parseInt(window.getComputedStyle(this.content).getPropertyValue("padding-top")):0,contentPaddingBottom=this.content?parseInt(window.getComputedStyle(this.content).getPropertyValue("padding-bottom")):0,textElementsHeights=[...this.text].map(element=>element.offsetHeight+contentPaddingTop+contentPaddingBottom),textInnerElementsHeights=[...this.textInner].map(element=>element.offsetHeight),maxTextHeight=Math.max(...textElementsHeights),maxTextInnerHeight=Math.max(...textInnerElementsHeights),highestText=window.theme.isMobile()?maxTextInnerHeight:maxTextHeight,textElementsHeightsSum=textElementsHeights.reduce((a,b)=>a+b,0),averageTextHeight=Math.floor(textElementsHeightsSum/textElementsHeights.length)||this.text[0].offsetHeight;this.container.style.removeProperty("--average-text-height"),this.container.style.setProperty("--average-text-height",`${averageTextHeight}px`),this.container.style.removeProperty("--highest-text"),this.container.style.setProperty("--highest-text",`${highestText}px`)}if(this.imagesHeight=this.images.offsetHeight,this.hasShortImages=!1,this.image.length>0){const imageWrapperElement=this.image[0].querySelector(selectors$3.imageWrapper),videoWrapperElement=this.image[0].querySelector(selectors$3.videoWrapper),wrapperElement=imageWrapperElement||videoWrapperElement;this.imgHeight=wrapperElement?wrapperElement.offsetHeight:0,this.imgPadding=parseInt(window.getComputedStyle(this.image[0]).getPropertyValue("padding-top")),this.container.style.removeProperty("--images-height"),this.container.style.setProperty("--images-height",`${this.imagesHeight}px`),this.container.style.removeProperty("--img-height"),this.container.style.setProperty("--img-height",`${this.imgHeight+2*this.imgPadding}px`)}this.asideHeight=this.aside.offsetHeight,this.asidePadding=parseInt(window.getComputedStyle(this.aside).getPropertyValue("padding-top")),this.breathingSpace=(this.windowHeight-this.imagesHeight)/2/2,this.innerStickyTop=parseInt(window.getComputedStyle(this.inner).getPropertyValue("top"))-this.headerHeight-this.breathingSpace,this.gutters=this.withGaps?2*this.asidePadding:0,this.additionalSpace=window.theme.isMobile()?this.withGaps?this.asidePadding+10:10:this.gutters,this.minHeightForEndingPoing=this.imagesHeight+this.additionalSpace,!window.theme.isMobile()&&this.horizontalScroll&&(this.minHeightForEndingPoing=this.windowHeight-this.headerHeight,this.hasShortImages=this.fractionOfViewport<=.6,this.hasShortImages&&(this.minHeightForEndingPoing=this.imagesHeight-this.innerStickyTop+this.breathingSpace*3)),this.bottomEndingPoint=this.asideHeight-this.minHeightForEndingPoing}refreshImagesOffsetValues(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.dispatchEvent(new CustomEvent("theme:scroll"))})})}onResize(){this.calculateHeights(),requestAnimationFrame(()=>this.calculateHeights()),this.getTypeOfIntersecting(),this.refreshImagesOffsetValues()}sync(){const textsToSync=this.singleText?[]:this.text;[...this.image,...textsToSync,...this.dot].forEach(element=>{const elementIndex=Number(element.getAttribute(attributes$2.index));element.classList.toggle(classes$3.isActive,elementIndex===Number(this.activeIndex))}),this.textHighlight.forEach(highlight=>highlight.shouldAnimate())}syncDots(){this.dot.forEach(element=>{element.addEventListener("click",event=>{event.preventDefault(),this.scrollTo(this.image[Number(event.target.dataset.index)])})})}scrollTo(target,timeout=0){if(!target)return;const activeIndex=Number(target.dataset.index),targetOffsetTop=Math.round(target.getBoundingClientRect().top+window.scrollY),targetHeight=target.offsetHeight,containerTop=Math.round(this.wrapper.getBoundingClientRect().top+window.scrollY),asideTop=this.aside.getBoundingClientRect().top-this.headerHeight,imagesHeight=this.images.offsetHeight,scrollOffset=containerTop+imagesHeight*activeIndex,imageFitsInVh=(this.image[0].offsetHeight+this.gutters)/(window.innerHeight-this.headerHeight)>=1;let distance=scrollOffset-this.headerHeight;if(window.theme.isMobile()&&(distance=asideTop+window.scrollY+this.bottomEndingPoint/(this.image.length-1)*activeIndex),this.horizontalScroll&&window.theme.isDesktop()&&!imageFitsInVh){const stickyStartingPoint=asideTop-this.innerStickyTop;distance=(this.hasShortImages?stickyStartingPoint+window.scrollY:asideTop+window.scrollY)+this.bottomEndingPoint/(this.image.length-1)*activeIndex}this.verticalScroll&&window.theme.isDesktop()&&(distance=targetOffsetTop-this.headerHeight,this.typeOfIntersecting===settings.typeOfIntersecting.middleOfViewport&&(distance=targetOffsetTop-window.innerHeight/2+targetHeight/2-this.headerHeight));const scrollOptions={top:distance,left:0,behavior:"smooth"};timeout>0?setTimeout(()=>window.scrollTo(scrollOptions),timeout):window.scrollTo(scrollOptions)}onUnload(){this.image.forEach(image=>this.observer.unobserve(image)),document.removeEventListener("theme:scroll",this.onScrollCallback),document.removeEventListener("theme:resize:width",this.onResizeCallback)}onBlockSelect(event){this.scrollTo(event.target,500)}}register("sticky-images-and-text",[{onLoad(){sections$2[this.id]=new StickyImagesAndText(this)},onUnload(){sections$2[this.id].onUnload()},onBlockSelect(event){sections$2[this.id].onBlockSelect(event)}},videoPlay]),register("subcollections",gridSlider),register("tab-collections",[productGrid,gridSlider,tabs]);const sections$1={}
63,selectors$2={slider:"[data-slider]",item:"[data-item]",links:"a, button",button:".flickity-button"},classes$2={flickityEnabled:"flickity-enabled",hasArrows:"has-arrows",carouselResize:"carousel--resize",buttonHolder:"flickity-button-holder",isSelected:"is-selected"},attributes$1={sectionId:"data-section-id",tabIndex:"tabindex"};class Testimonials{constructor(section){this.container=section.container,this.sectionId=this.container.getAttribute(attributes$1.sectionId),this.slider=this.container.querySelector(selectors$2.slider),this.alignment=this.slider.dataset.sliderAlignment,this.slider&&(this.slides=this.slider.querySelectorAll(selectors$2.item),this.flkty=null,this.onResizeCallback=()=>this.onResize(),this.init())}init(){this.checkSlideCount(),this.listen()}onResize(){this.checkSlideCount(),this.flkty!==null&&(this.flkty.resize(),this.flkty.size.width>=this.flkty.slideableWidth&&this.destroySlider())}checkSlideCount(){const slidesCount=this.slides.length,twoSlidesOnTablet=slidesCount==2&&window.innerWidth>=theme.sizes.small,singleSlide=slidesCount==1;if(twoSlidesOnTablet||singleSlide){this.destroySlider();return}if(!this.flkty){this.initSlider(),this.onResize();return}this.flkty&&(this.flkty.isActive||this.initSlider(),this.flkty.slideableWidth>this.flkty.size.width?this.initSlider():this.destroySlider())}initSlider(){this.flkty=new window.theme.Flickity(this.slider,{cellSelector:selectors$2.item,prevNextButtons:!0,pageDots:!0,groupCells:!0,cellAlign:this.alignment,contain:!0,adaptiveHeight:!1,on:{ready:()=>{this.slidesTabIndex(),requestAnimationFrame(()=>{this.slider.querySelectorAll(selectors$2.button).forEach(button=>{window.theme.wrap(button,classes$2.buttonHolder)})})},change:()=>{this.slidesTabIndex()}}}),window.theme.isMobile()?this.container.classList.remove(classes$2.hasArrows):this.container.classList.add(classes$2.hasArrows),this.createResizeClass()}createResizeClass(){if(typeof window.theme.Flickity.prototype._createResizeClass=="function")return;window.theme.Flickity.prototype._createResizeClass=function(){this.element.classList.add(classes$2.carouselResize)},window.theme.Flickity.createMethods.push("_createResizeClass");const resize=window.theme.Flickity.prototype.resize;window.theme.Flickity.prototype.resize=function(){this.element.classList.remove(classes$2.carouselResize),resize.call(this),this.element.classList.add(classes$2.carouselResize)}}slidesTabIndex(){window.theme.Flickity.data(this.slider).cells.forEach(sli
63de=>{let tabIndex="-1";slide.element.classList.contains(classes$2.isSelected)&&(tabIndex="0"),slide.element.querySelectorAll(selectors$2.links).forEach(link=>{link.setAttribute(attributes$1.tabIndex,tabIndex)})})}destroySlider(){this.slider.classList.contains(classes$2.flickityEnabled)&&(this.flkty!==null&&(this.slider.querySelectorAll(selectors$2.button)?.forEach(button=>{const parent=button.parentNode;parent&&parent.classList.contains(classes$2.buttonHolder)&&(parent.parentNode.insertBefore(button,parent),parent.parentNode.removeChild(parent))}),this.flkty.destroy()),this.container.classList.remove(classes$2.hasArrows))}listen(){document.addEventListener("theme:resize:width",this.onResizeCallback)}onBlockSelect(evt){if(this.flkty!==null&&this.flkty.isActive){const index=parseInt([...evt.target.parentNode.children].indexOf(evt.target)),slidesPerPage=parseInt(this.flkty.slides[0].cells.length),groupIndex=Math.floor(index/slidesPerPage);if(!evt.detail.load){this.flkty.select(groupIndex);return}const onTransitionEnd=()=>{requestAnimationFrame(()=>{this.flkty.select(groupIndex)}),this.flkty.element.removeEventListener("transitionend",onTransitionEnd)};this.flkty.element.addEventListener("transitionend",onTransitionEnd)}}onUnload(){document.removeEventListener("theme:resize:width",this.onResizeCallback)}}register("testimonials",{onLoad(){sections$1[this.id]=new Testimonials(this)},onUnload(e){sections$1[this.id].onUnload(e)},onBlockSelect(e){sections$1[this.id].onBlockSelect(e)}});const selectors$1={imageWrapper:"[data-hero-scrolling]",titleWrapper:"[data-banner-title]",lazyImage:".lazy-image",parallax:'[data-parallax="zoom-on-scroll"],[data-parallax="card-scrolling"],[data-parallax="zoom-on-scroll,card-scrolling"]',textRevealCropper:".text-reveal__cropper",aos:"[data-aos]",frame:"[data-ticker-frame]",slide:"[data-slide]",tickerScale:"[data-ticker-scale]",tickerText:"[data-ticker-text]",shopifyEditorBlock:"data-shopify-editor-block"},classes$1={bannerNoCachedImages:"banner--no-cached-images",bannerImgLoaded:"banner--img-loaded",imgIn:"img-in",overflowHidden:"overflow-hidden",textHighlightWrapper:"text-highlight-wrapper",tickerAnimated:"ticker--animated"},attributes={stop:"data-stop",style:"style"},sections={};class HeroScrolling{constructor(section){this.container=section.container,this.title=this.container.querySelector(selectors$1.titleWrapper),this.parallax=null,this.tickers=[],this.init()}init(){if(this.handleImageAnimation(!0),this.initTickers(!0),this.tickerAnimationPause(),this.container.matches(selectors$1.parallax)&&(this.parallax=new ParallaxElement(this.container)),this.title&&!this.title.classList.contains(classes$1.textHighlightWrapper)){const animatedTitle=this.title.querySelector(selectors$1.aos);if(!animatedTitle)return;const textRevealCropper=animatedTitle.closest(selectors$1.textRevealCropper);textRevealCropper?.classList.add(classes$1.overflowHidden),waitForAnimationEnd(animatedTitle).then(()=>{textRevealCropper?.classList.remove(classes$1.overflowHidden)})}}initTickers(stopClone=!1){this.container.querySelectorAll(selectors$1.frame).forEach(element=>{const ticker=new Ticker(element,stopClone);this.tickers.push(ticker)})}toggleTicker(e,isStopped){if(e.target.blockData.type!=="scrolling_text")return;const tickerScale=e.target.closest(selectors$1.tickerScale),element=tickerScale.querySelector(`[${selectors$1.shopifyEditorBlock}*="${e.target.blockData.id}"]`);isStopped&&element&&(tickerScale.setAttribute(attributes.stop,""),tickerScale.querySelectorAll(selectors$1.tickerText).forEach(textHolder=>{textHolder.classList.remove(classes$1.tickerAnimated),textHolder.style.transform=`translate3d(${-element.offsetLeft}px, 0, 0)`})),!isStopped&&element&&(tickerScale.querySelectorAll(selectors$1.tickerText).forEach(textHolder=>{textHolder.classList.add(classes$1.tickerAnimated),textHolder.removeAttribute(attributes.style)}),tickerScale.removeAttribute(attributes.stop),this.static&&document.dispatchEvent(new CustomEvent("theme:resize:width",{bubbles:!0})))}onBlockSelect(evt){this.toggleTicker(evt,!0)}onBlockDeselect(evt){this.toggleTicker(evt,!1)}handleImageAnimation(onLoad=!1){if(!onLoad){this.container.classList.remove(classes$1.bannerNoCachedImages),this.container.classList.remove(classes$1.bannerImgLoaded);return}const img=this.container.querySelector(selectors$1.imageWrapper).querySelectorAll(selectors$1.lazyImage),imgComplete=this.container.classList.contains(classe
63s$1.imgIn);if(img.length&&!imgComplete){this.container.classList.add(classes$1.bannerNoCachedImages);const onImageTransitionEnd=event=>{requestAnimationFrame(()=>this.container.classList.add(classes$1.bannerImgLoaded)),img[0].removeEventListener("transitionend",onImageTransitionEnd)};img[0].addEventListener("transitionend",onImageTransitionEnd)}}onReorder(){this.handleImageAnimation(!1)}onUnload(){this.handleImageAnimation(!1),this.parallax&&(this.parallax.unload(),this.parallax=null),this.tickers.length>0&&this.tickers.forEach(ticker=>{ticker.unload()})}tickerAnimationPause(){let hoverTimer=0,isHovered=!1;const tickerContainer=this.container.querySelector(selectors$1.frame);tickerContainer&&(tickerContainer.addEventListener("mouseenter",()=>{isHovered=!0,hoverTimer=setTimeout(()=>{isHovered&&tickerContainer.querySelectorAll(selectors$1.tickerText).forEach(element=>{element.style.animationPlayState="paused"}),clearTimeout(hoverTimer)},500)}),tickerContainer.addEventListener("mouseleave",()=>{isHovered=!1,tickerContainer.querySelectorAll(selectors$1.tickerText).forEach(element=>{element.style.animationPlayState="running"})}))}}register("hero-scrolling",[{onLoad(){sections[this.id]=new HeroScrolling(this)},onBlockSelect(e){sections[this.id].onBlockSelect(e)},onBlockDeselect(e){sections[this.id].onBlockDeselect(e)},onReorder(e){sections[this.id].onReorder(e)},onUnload(e){sections[this.id].onUnload(e)}},videoPlay]);const classes={noOutline:"no-outline"},selectors={inPageLink:"[data-skip-content]",linkesWithOnlyHash:'a[href="#"]'};class Accessibility{constructor(){this.init()}init(){this.body=document.body,this.inPageLink=document.querySelector(selectors.inPageLink),this.linkesWithOnlyHash=document.querySelectorAll(selectors.linkesWithOnlyHash),this.isFocused=!1,this.focusHash(),this.bindInPageLinks(),this.clickEvents(),this.focusEvents(),this.focusEventsOff()}clickEvents(){this.inPageLink&&this.inPageLink.addEventListener("click",event=>{event.preventDefault()}),this.linkesWithOnlyHash&&this.linkesWithOnlyHash.forEach(item=>{item.addEventListener("click",event=>{event.preventDefault()})})}focusEvents(){document.addEventListener("keyup",event=>{event.code===theme.keyboardKeys.TAB&&(this.body.classList.remove(classes.noOutline),this.isFocused=!0)})}focusEventsOff(){document.addEventListener("mousedown",()=>{this.body.classList.add(classes.noOutline),this.isFocused=!1})}forceFocus(element,options2){options2=options2||{};var savedTabIndex=element.tabIndex;element.tabIndex=-1,element.dataset.tabIndex=savedTabIndex,element.focus(),typeof options2.className<"u"&&element.classList.add(options2.className),element.addEventListener("blur",callback);function callback(event){event.target.removeEventListener(event.type,callback),element.tabIndex=savedTabIndex,delete element.dataset.tabIndex,typeof options2.className<"u"&&element.classList.remove(options2.className)}}focusHash(options2){options2=options2||{};let hash=window.location.hash;typeof theme.settings.newHash<"u"&&(hash=theme.settings.newHash,window.location.hash=`#${hash}`);const element=document.getElementById(hash.slice(1));if(element&&options2.ignore&&element.matches(options2.ignore))return!1;hash&&element&&this.forceFocus(element,options2)}bindInPageLinks(options2){options2=options2||{};const links=Array.prototype.slice.call(document.querySelectorAll('a[href^="#"]'));function queryCheck(selector){return document.getElementById(selector)!==null}return links.filter(link=>{if(link.hash==="#"||link.hash===""||options2.ignore&&link.matches(options2.ignore)||!queryCheck(link.hash.substr(1)))return!1;var element=document.querySelector(link.hash);return element?(link.addEventListener("click",()=>{this.forceFocus(element,options2)}),!0):!1})}}const getScrollbarWidth=()=>{const outer=document.createElement("div");outer.style.visibility="hidden",outer.style.overflow="scroll",outer.style.msOverflowStyle="scrollbar",document.body.appendChild(outer);const inner=document.createElement("div");outer.appendChild(inner);const scrollbarWidth=outer.offsetWidth-inner.offsetWidth;return outer.parentNode.removeChild(outer),scrollbarWidth};document.documentElement.style.setProperty("--scrollbar-width",`${getScrollbarWidth()}px`),document.addEventListener("DOMContentLoaded",function(){load("*"),new Accessibility,!customElements.get("product-grid-item-swatch")&&window.theme.settings.colorSwatchesType!="disabled"&&customElements.define("product-grid-item-swatch",GridSwatch),"scrollBehavior"in document.documentElement.style||loadScript({url:theme.assets.smoothscroll})})})(themeVendor.ajaxinate,themeVendor.ScrollLock);var wishlistHeader=(function(){return{init:function(){this.handleCount()},handleCount:function(){const wishlist=document.querySelectorAll(".wishlist-count"),items=JSON.parse(localStorage.getItem("glozin__wishlist-items"));wishlist.forEach(item=>{item.innerText=items!==null&&items.length!=0?items.length:0})}}})();wishlistHeader.init();class ButtonWishlist extends HTMLElement{constructor(){super(),this.productId=this.dataset.productId,this.action=this.dataset.action||"remove",this.addTooltip=this.dataset.tooltipAdd||"Add to wishlist",this.removeTooltip=this.dataset.tooltipRemove||"Remove from wishlist",this.redirectTooltip=this.dataset.tooltipRedirect||"Browse wishlist",this.tooltipDiv=this.querySelector(".tooltip-content"),this.init()}init(){this.initializeWishlistStatus(),this.addEventListener("click",this.onThisClick.bind(this))}initializeWishlistStatus(){const localListProductIds=localStorage.getItem("glozin__wishlist-items");if(!localListProductIds)return;JSON.parse(localListProductIds).includes(this.productId)&&(this.classList.add("active"),this.tooltipDiv&&(this.action==="remove"?this.tooltipDiv.textContent=this.removeTooltip:this.tooltipDiv.textContent=this.redirectTooltip))}actionWhenClicked(allThisProductIds,isAdd){allThisProductIds.forEach(_this=>{if(isAdd===!0){_this.classList.add("active");const tooltipDiv=_this.querySelector(".tooltip-content");tooltipDiv&&(this.action==="remove"?tooltipDiv.textContent=this.removeTooltip:tooltipDiv.textContent=this.redirectTooltip)}else{const tooltipDiv=_this.querySelector(".tooltip-content");tooltipDiv&&(tooltipDiv.textContent=this.addTooltip),_this.classList.remove("active")}})}onThisClick(){const localListProductIds=localStorage.getItem("glozin__wishlist-items"),allThisProductIds=document.querySelectorAll(`button-wishlist[data-product-id="${this.productId}"]`);let listProductIds=[];if(!this.productId)return;if(localListProductIds&&allThisProductIds.length>0){const parseLocalListProductIds=JSON.parse(localListProductIds);if(!parseLocalListProductIds.includes(this.productId))listProductIds.push(...parseLocalListProductIds,this.productId),this.actionWhenClicked(allThisProductIds,!0);else if(this.action)if(this.action==="remove"){const indexOfProductId=parseLocalListProductIds.indexOf(this.productId);parseLocalListProductIds.splice(indexOfProductId,1),listProductIds.push(...parseLocalListProductIds),this.closest(".wishlist-page-main")?(this.closest(".wishlist-list").remove(),document.querySelectorAll(".wishlist-page-section .product-item__action button-wishlist").length<1&&document.querySelector(".wishlist-no-product-js").classList.remove("hidden")):this.actionWhenClicked(allThisProductIds,!1)}else listProductIds.push(...parseLocalListProductIds),window.location.href=`${window.shopUrl}${window.Shopify.routes.root}pages/wishlist`;else listProductIds.push(...parseLocalListProductIds)}else listProductIds.push(this.productId),this.actionWhenClicked(allThisProductIds,!0);const stringifyListProductIds=JSON.stringify(listProductIds);localStorage.setItem("glozin__wishlist-items",stringifyListProductIds),wishlistHeader.init()}}customElements.define("button-wishlist",ButtonWishlist); 64//# sourceMappingURL=/cdn/shop/t/19/assets/theme.dev.js.map?v=14
640965523699664584811780928299
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.