PageSourceSearch

https://bondisands.co.uk/cdn/shop/t/217/assets/layouts.theme.js?v=162394640207814105361789690493

js bondisands.co.uk collected 2026-09-26 13:42:24 UTC 76,358 bytes, 1 lines download raw bytes

1!function(){var t,e={9890(){function t(t){t.paused?t.play().catch(()=>{}):t.pause()}function e(e){e.addEventListener("click",i=>{e.controls||(i.preventDefault(),t(e))}),e.addEventListener("keydown",i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),t(e))})}function i(){document.querySelectorAll("video[data-video][data-video-pointer-toggle]").forEach(e)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i):i()},433(t,e,i){"use strict";var n=i(4313);i(576);const s="heading";function r(t){const e=t.popper;if(!e)return;const i=e.querySelector(".tippy-box"),n=e.querySelector(".tippy-content");i&&(i.setAttribute("data-state","visible"),i.style.opacity="1",i.style.visibility="visible"),n&&(n.setAttribute("data-state","visible"),n.style.opacity="1",n.style.visibility="visible")}function o(){document.querySelectorAll("[data-tooltip]").forEach(t=>{if(t._tippy)return;t.classList.contains("is-initialised")&&t.classList.remove("is-initialised");const e=`\n      ${t.dataset[s]?`\n        <h5 class="o-tooltip__heading o-type--2">\n          ${t.dataset[s]}\n        </h5>\n      `:""}\n      <p class="o-tooltip__content o-type--3">\n        ${t.dataset.tooltip}\n      </p>\n    `;(0,n.Ay)(t,{content:e,allowHTML:!0,theme:"a-tooltip",arrow:!0,placement:"top",animation:!1,duration:[0,0],zIndex:1e5,appendTo:t=>t.closest("dialog")||document.body,popperOptions:{strategy:"fixed"},onMount(t){r(t)},onAfterUpdate(t){t.state.isVisible&&r(t)}}),t.addEventListener("pointerdown",t=>{t.stopPropagation()}),t.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation()}),t.classList.add("is-initialised")})}function a(){o()}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a(),document.addEventListener("shopify:section:load",o);i(9890);var l={short:".4s",med:".6s",slow:"1s",timeDefault:".4s",easeIn:"cubic-bezier(.7,0,.84,0)",easeOut:"cubic-bezier(.16,1,.3,1)",easeInOut:"cubic-bezier(.87,0,.13,1)"};const c=t=>t.endsWith("ms")?parseFloat(t):t.endsWith("s")?1e3*parseFloat(t):200,d={...l,durationDefault:c(l.timeDefault),durationMedium:c(l.med),durationShort:c(l.short),durationSlow:c(l.slow)},h=(t,e)=>{if(!t.target||!(t.target instanceof HTMLElement||t.target instanceof SVGElement)||void 0===t.target.matches)return;return t.target.matches(e)?t.target:t.target.closest(e)},u="is-light-box-open",p=document.createElement("template");p.innerHTML=`\n  <style>\n    * { box-sizing: border-box; }\n\n    .container {\n      display: none;\n      justify-content: stretch;\n      align-items: stretch;\n    }\n\n    .close-icon {\n      cursor: pointer;\n      position: absolute;\n      width: 1.25rem;\n      top: 1.25rem;\n      right: 1.25rem;\n    }\n\n    .background {\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      opacity: 0;\n      transition: all ${d.timeDefault} ${d.easeOut};\n    }\n\n    .wrapper {\n      position: fixed;\n      left: 0;\n      top: 0;\n      width: 100%;\n      height: 100%;\n      z-index: 1;\n      overflow-y: auto;\n    }\n\n    .inner {\n      padding: 1rem;\n      width: 100%;\n      min-height: 100%;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n\n    .popup {\n      box-sizing: border-box;\n      position: relative;\n      width: 100%;\n      max-width: 87.5rem;\n      padding: 2rem 1rem;\n\n      opacity: 0;\n      transform: translateY(-2rem);\n      transition: all ${d.timeDefault} ${d.easeOut};\n    }\n\n    .popup.small { max-width: 30rem; }\n    .popup.large { max-width: 80rem; }\n    .container.is-visible { display: block; }\n\n    .is-closing .popup { transform: translateY(2rem); }\n    .is-open .background { opacity: 1; }\n    .is-open .popup {\n      opacity: 1;\n      transform: translateY(0);\n    }\n  </style>\n\n  <div part="root" class="container">\n    <div part="background" class="background"></div>\n    <div part="wrapper" class="wrapper">\n      <div part="inner" class="inner">\n        <div part="popup" class="popup">\n        <svg class="close-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="#0078b8" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m15.625 4.375-11.25 11.25M15.625 15.625 4.375 4.375"/></svg>\n          <slot></slot>\n        </div>\n      </div>\n    </div>\n  </div>\n`;class m extends HTMLElement{static get observedAttributes(){return["visible","closable","size"]}confirm=t=>{const e=new m;document.body.appendChild(e),e.classList.add("o-light-box__confirm"),e.size="small";const i=document.createElement("div");i.classList.add("o-light-box__buttons");const n=document.createElement("button");n.type="button",n.classList.add("o-btn"),n.textContent=t.yes;const s=document.createElement("button");s.type="button",s.classList.add("o-btn"),s.textContent=t.no;const r=document.createElement("h2");r.classList.add("o-heading--3","o-light-box__confirm-title"),r.textContent=t.title,e.appendChild(r),e.a
1ppendChild(i),i.appendChild(n),i.appendChild(s),e.visible=!0;const o=()=>{n.disabled=!0,n.classList.add("is-disabled"),s.disabled=!0,s.classList.add("is-disabled"),e.visible=!1,setTimeout(()=>e.remove(),d.durationDefault)};return new Promise((t,e)=>{n.addEventListener("click",()=>{t(!0),o()}),s.addEventListener("click",()=>{t(!1),o()})})};get visible(){return"true"==this.getAttribute("visible")}set visible(t){this.setAttribute("visible",t+""),this.updateVisible()}get closable(){return!this.hasAttribute("closable")||"true"==this.getAttribute("closable")}set closable(t){this.setAttribute("closable",t+"")}get size(){return this.getAttribute("size")||"medium"}set size(t){this.setAttribute("size",t),this.updateSize()}get padded(){return!this.hasAttribute("padded")||"true"==this.getAttribute("padded")}set padded(t){this.setAttribute("padded",t+""),this.updatePadded()}constructor(){super(),this.timeout=null;const t=this.attachShadow({mode:"open"});t.appendChild(p.content.cloneNode(!0)),this.root=t.querySelector(".container"),this.inner=t.querySelector(".inner"),this.popup=t.querySelector(".popup"),this.parent=this.parentElement||null,this.close=t.querySelector(".close-icon"),this.close.addEventListener("click",()=>{this.visible=!1}),document.addEventListener("keydown",this.onKeyPress),(t=>{const{element:e,selector:i,event:n,callback:s,events:r}=t,o=t=>{let e=h(t,i);e&&s(t,e)};let a="string"==typeof e?document.querySelector(e):e.documentElement?e.documentElement:e;if(!a)return null;const l=[];n&&l.push(n),r&&l.push(...r),l.map(t=>a.addEventListener(t,o))})({callback:this.onDocumentClick,selector:"[data-light-box-trigger]",element:document,event:"click"}),this.inner.addEventListener("click",this.onBackgroundClick),this.updateVisible()}updateVisible(){this.timeout&&clearTimeout(this.timeout),this.visible?(document.body.classList.add(u),this.root.classList.add("is-visible"),this.root.classList.remove("is-closing"),document.body.appendChild(this),this.timeout=setTimeout(()=>this.root.classList.add("is-open"),16),this.root.part.add("visible")):(document.body.classList.remove(u),(this.parent||document.body).appendChild(this),setTimeout(()=>{this.root.classList.remove("is-open"),this.root.classList.add("is-closing")},16),this.timeout=setTimeout(()=>{this.root.classList.remove("is-visible"),this.root.classList.remove("is-closing")},d.durationDefault),this.root.part.remove("visible"))}updateSize(){switch(this.popup.classList.remove("small"),this.popup.classList.remove("large"),this.size){case"small":this.popup.classList.add("small");break;case"large":this.popup.classList.add("large")}}updatePadded(){this.padded?this.popup.part.remove("unpadded"):this.popup.part.add("unpadded")}onKeyPress=t=>{this.closable&&"Escape"==t.key&&(this.visible=!1)};onBackgroundClick=t=>{t.target===this.inner&&this.closable&&(this.visible=!1)};onDocumentClick=(t,e)=>{const i=e.getAttribute("data-light-box-trigger");i&&this.matches(i)&&(t.preventDefault(),this.visible=!this.closable||!this.visible)};attributeChangedCallback(t,e,i){switch(t){case"visible":this.updateVisible();break;case"size":this.updateSize();break;case"padded":this.updatePadded()}}}customElements.get("light-box")||customElements.define("light-box",m);i(1964);var g=i(7367);const v="share-title",f="share-url",b="share-content";class y extends HTMLElement{get title(){return this.getAttribute(v)||"Share"}set title(t){t&&this.setAttribute(v,t)}get firstAnchorEl(){return this.children[0]||null}get text(){let t=this.getAttribute(b);return!t&&this.firstAnchorEl&&(t=this.firstAnchorEl.innerText),t||document.title}set text(t){t&&this.setAttribute(b,t)}get url(){const t=this.getAttribute(f);if(t)return t;const e=document.querySelector("link[rel=canonical]")?.href;return e||window.location.href}set url(t){t&&this.setAttribute(f,t)}webShareEnabled=!1;button=null;constructor(){super(),this.webShareEnabled="share"in navigator,this.initShareElements()}initShareElements(){this.webShareEnabled&&this.firstAnchorEl?(this.button=document.createElement("button"),this.button.innerHTML=this.firstAnchorEl?.innerHTML,this.firstAnchorEl.classList?.forEach(t=>{this.button?.classList.add(t)}),this.removeChildren(),this.appendChild(this.button)):this.firstAnchorEl&&(this.firstAnchorEl.title=(0,g.t)("general.controls.copy_to_clipboard"))}share=t=>{t.preventDefault();
1const e={title:this.title,text:this.text,url:this.url};navigator.share(e).then(()=>this.successfulShare(e)).catch(t=>this.abortedShare(t,e))};shareFallback=t=>{t.preventDefault(),navigator.clipboard.writeText(this.url),this.onFallbackCopy()};onFallbackCopy(){if(!this.firstAnchorEl)return;const t=this.firstAnchorEl.innerHTML;this.firstAnchorEl.innerHTML=(0,g.t)("general.controls.copy_to_clipboard_success"),setTimeout(()=>{this.firstAnchorEl&&(this.firstAnchorEl.innerHTML=t)},3e3)}connectedCallback(){this.webShareEnabled?this.addEventListener("click",this.share):this.addEventListener("click",this.shareFallback)}disconnectedCallback(){this.webShareEnabled?this.removeEventListener("click",this.share):this.removeEventListener("click",this.shareFallback)}successfulShare(t){const e=new CustomEvent("onShareSuccess",{detail:t});this.dispatchEvent(e)}abortedShare(t,e){const i=new CustomEvent("onShareError",{detail:{...e,...t}});this.dispatchEvent(i)}removeChildren(){for(;this.firstChild;)this.removeChild(this.firstChild)}}"customElements"in window&&!customElements.get("web-share-wrapper")&&customElements.define("web-share-wrapper",y);i(2159),i(6386),i(4423);const S="[data-custom-redirection-modal]",w="[data-custom-redirection-modal-close]",L="[data-custom-redirection-modal-text-one]",E="[data-custom-redirection-modal-text-two]",C="[data-custom-redirection-modal-redirection-url]",A="[data-store-country]";class x extends HTMLElement{countries=[];connectedCallback(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>this.init()):this.init()}init(){"true"!==sessionStorage.getItem("redirection_status")&&(this.getAllCountries(),this.checkUserCountry().then(t=>{const e=this.querySelector(A)?.innerHTML.trim(),i=t.detected_values.country.handle.trim();this.countries.forEach(t=>{t.countries_list.includes(i)&&t.current_country!==e&&this.renderPopup(t)})}).catch(t=>{console.error(t)}),this.popupModalToggle())}async checkUserCountry(){const t=window.Shopify.routes.root,e=await fetch(`${t}browsing_context_suggestions.json`);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return e.json()}getInnerHTML(t){return this.querySelector(t)?.innerHTML.trim()??""}getAllCountries(){this.countries=[{current_country:"AU",text_one:this.getInnerHTML("[data-au-text-one]"),text_two:this.getInnerHTML("[data-au-text-two]"),store_url:this.getInnerHTML("[data-au-store-url]"),countries_list:this.getInnerHTML("[data-au-redirect-countries]").split(",").map(t=>t.trim()).filter(Boolean)},{current_country:"US",text_one:this.getInnerHTML("[data-us-text-one]"),text_two:this.getInnerHTML("[data-us-text-two]"),store_url:this.getInnerHTML("[data-us-store-url]"),countries_list:this.getInnerHTML("[data-us-redirect-countries]").split(",").map(t=>t.trim()).filter(Boolean)},{current_country:"UK",text_one:this.getInnerHTML("[data-uk-text-one]"),text_two:this.getInnerHTML("[data-uk-text-two]"),store_url:this.getInnerHTML("[data-uk-store-url]"),countries_list:this.getInnerHTML("[data-uk-redirect-countries]").split(",").map(t=>t.trim()).filter(Boolean)},{current_country:"EU",text_one:this.getInnerHTML("[data-eu-text-one]"),text_two:this.getInnerHTML("[data-eu-text-two]"),store_url:this.getInnerHTML("[data-eu-store-url]"),countries_list:this.getInnerHTML("[data-eu-redirect-countries]").split(",").map(t=>t.trim()).filter(Boolean)}]}renderPopup(t){const e=document.querySelector(S);if(!e)return;const i=e.querySelector(L),n=e.querySelector(E),s=e.querySelector(C),r=t.store_url+window.location.pathname+window.location.search;t.text_one&&i&&(i.textContent=t.text_one),t.text_two&&n&&(n.textContent=t.text_two),t.store_url&&s&&s.setAttribute("href",r),"complete"===document.readyState?e.classList.remove("hidden"):window.addEventListener("load",()=>{e.classList.remove("hidden")}),s?.addEventListener("click",()=>{sessionStorage.setItem("redirection_status","true")})}popupModalToggle(){const t=document.querySelector(S);if(!t)return;const e=t.querySelector(w);e?.addEventListener("click",()=>{t.classList.add("hidden"),sessionStorage.setItem("redirection_status","true")})}}window.customElements.get("custom-redirection")||customElements.define("custom-redirection",x);var k=i(9588),P=i(535);function I(){document.querySelectorAll("[data-product-quick-add]").forEach(t=>{const e=function(t){const e=parseInt(t.getAttribute("data-variant-id")||"0",10),i="false"!==t.getAttribute("data-variant-available"),n=t.getAttribute("data-inventory-management");return{id:e,available:i,inventory_management:n&&n.length>0?n:null,inventory_policy:t.getAttribute("data-inventory-policy")||"deny",inventory_quantity:parseInt(t.getAttribute("data-inventory-quantity")||"0",10)||0}}(t);if(!e.id)return;const i=!e.available||(0,P.hg)(e);t.classList.toggle(k.MJ,i),t.setAttribute("aria-disabled",i?"true":"false"),t instanceof HTMLButtonElement&&(t.disabled=i)})}const q="[data-weather-callout-trigger]",T="[data-weather-callout-popover]",_="[data-weather-callout-panel]",M="[data-weather-callout-location-name]",D="[data-weather-callout-usp-track]",B="[data-weather-callout-product-track]",O="is-open",N="is-active",H="is-sliding-out",z="is-sliding-in-start",R="bs_weather_callout_geo_uv_v1",F="bs_weather_callout_geo_permission_v1",V=18e5,U="data-categories-ready";class W{activeIndex=0;resizeTimeout=null;onCategoryChange=null;isPointerDown=!1;didDrag=!1;suppressNextClick=!1;startX=0;startScrollLeft=0;activePointerId=null;dragStarted=!1;onScroll=null;onResize=null;onPointerDown=null;onPointerMove=null;onPointerUp=null;onPointerCancel=null;constructor(t,e){this.container=t,this.categoryButtons=t.querySelectorAll("[data-category-id]"),this.categoriesScroll=t.querySelector("[data-categories-scroll]"),this.progress=t.querySelector("[data-progress]"),this.progressBar=t.querySelector("[data-progress-bar]"),this.pill=t.querySelector("[data-pill]"),this.onCategoryChange=e||null,this.categoryButtons.forEach((t,e)=>{t.classList.contains(k.II)&&(this.activeIndex=e)}),this.updateProgressBar(),this.updatePillPosition(),this.updateOverflowClass(),this.attachEvents(),this.container.removeAttribute(U),requestAnimationFrame(()=>{this.container.setAttribute(U,"")})}attachEvents(){this.categoryButtons&&(this.categoryButtons.forEach((t,e)=>{t.addEventListener("click",i=>{if(this.suppressNextClick)return i.preventDefault(),i.stopPropagation(),void(this.suppressNextClick=!1);this.switchCategory(e,t)})}),this.categoriesScroll&&(this.onScroll=()=>{this.updateProgressBar(),this.updatePillPosition()},this.categoriesScroll.addEventListener("scroll",this.onScroll),this.setupDragToScroll()),this.onResize=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.updateProgressBar(),this.updatePillPosition(),this.updateOverflowClass()},150)},window.addEventListener("resize",this.onResize),window.Weglot?.on("languageChanged",this.onResize))}updateOverflowClass(){if(!this.categoriesScroll)return;const t=this.categoriesScroll.scrollWidth>this.categoriesScroll.clientWidth+1;this.categoriesScroll.toggleAttribute("data-overflowing",t)}setupDragToScroll(){this.categoriesScroll&&(this.onPointerDown=t=>{this.categoriesScroll&&("mouse"===t.pointerType&&0!==t.button||this.categoriesScroll.scrollWidth<=this.categoriesScroll.clientWidth||(this.isPointerDown=!0,this.didDrag=!1,this.dragStarted=!1,this.startX=t.clientX,this.startScrollLeft=this.categoriesScroll.scrollLeft,this.activePointerId=t.pointerId))},this.onPointerMove=t=>{if(!this.categoriesScroll)return;if(!this.isPointerDown)return;if(null!==this.activePointerId&&t.pointerId!==this.activePointerId)return;const e=t.clientX-this.startX,i="mouse"===t.pointerType?8:12;if(!this.dragStarted&&Math.abs(e)>=i){this.dragStarted=!0,this.didDrag=!0,this.categoriesScroll.setAttribute("data-dragging","");try{this.categoriesScroll.setPointerCapture(t.pointerId)}catch{}}this.dragStarted&&(this.categoriesScroll.scrollLeft=this.startScrollLeft-e,t.preventDefault())},this.onPointerUp=t=>{if(this.categoriesScroll&&this.isPointerDown&&(null===this.activePointerId||t.pointerId===this.activePointerId)){this.isPointerDown=!1,this.categoriesScroll.removeAttribute("data-dragging"),this.updateOverflowClass(),this.didDrag&&(this.suppressNextClick=!0,window.setTimeout(()=>{this.suppressNextClick=!1},0));try{null!==this.activePointerId&&this.categoriesScroll.releasePointerCapture(this.activePointerId)}catch{}this.activePointerId=null,this.dragStarted=!1}},this.onPointerCancel=t=>{this.onPointerUp&&this.onPointerUp(t)},this.categoriesScroll.addEventListener("pointerdown",this.onPointerDown,{passive:!1}),this.categoriesScroll.addEventListener("pointermove",this.onPointerMove,{passive:!1}),this.categoriesScroll.addEventListener("pointerup",this.onPointerUp),this.categoriesScroll.addEventListener("pointercancel",this.onPointerCancel))}switchCategory(t,e){if(t===this.activeIndex)return;const i=e||Array.from(this.categoryButtons)[t];if(!i)return;this.categoryButtons.forEach(t=>{t.classList.remove(k.II),i.setAttribute("aria-selected","false")}),i.classList.add(k.II),i.setAttribute("aria-selected","true"),this.activeIndex=t,this.updatePillPosition();const n=i.getAttribute("data-category-id");n&&this.onCategoryChange&&this.onCategoryChange(n,t)}getActiveCategoryId(){const t=Array.from(this.categoryButtons).find(t=>t.classList.contains(k.II));return t?t.getAttribute("data-category-id"):null}getActiveIndex(){return this.activeIndex}refreshPillPosition(){this.updatePillPosition()}updatePillPosition(){if(!this.pill||!this.categoryButtons||!this.categoriesScroll)return;const t=Array.from(this.categoryButtons).find(t=>t.classList.contains(k.II));if(!t)return;const e=window.getComputedStyle(this.categoriesScroll),i=Number.parseFloat(e.paddingLeft||"0")||0,n=t.offsetLeft-i,s=t.offsetWidth;this.pill.style.width=`${s}px`,this.pill.style.transform=`translate3d(${n}px, 0, 0)`}updateProgressBar(){if(!this.categoriesScroll||!this.progressBar||!this.progress)return;const t=this.categoriesScroll,e=t.scrollWidth,i=t.clientWidth,n=t.scrollLeft,s=e-i;if(s<=0)this.progress.classList.add(k.Si),this.progressBar.style.width="0%";else{this.progress.classList.remove(k.Si);const t=8+n/s*92;this.progressBar.style.width=`${Math.min(100,Math.max(8,t))}%`}}dispose(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.onResize&&(window.removeEventListener("resize",this.onResize),this.onResize=null),this.categoriesScroll&&this.onScroll&&(this.categoriesScroll.removeEventListener("scroll",this.onScroll),this.onScroll=null),this.categoriesScroll&&this.onPointerDown&&this.onPointerMove&&this.onPointerUp&&this.onPointerCancel&&(this.categoriesScroll.removeEventListener("pointerdown",this.onPointerDown),this.categoriesScroll.removeEventListener("pointermove",this.onPointerMove),this.categoriesScroll.removeEventListener("pointerup",this.onPointerUp),this.categoriesScroll.removeEventListener("pointercancel",this.onPointerCancel))}}
1const $={xxsmall:"375px",xsmall:"480px",small:"750px",medium:"1100px",large:"1350px",xlarge:"1750px",xxlarge:"2000px"},j=Object.entries($).reduce((t,e)=>{const[i,n]=e;return t[i]=parseInt(n),t},{}),X=t=>window.innerWidth>=j[t]||0,J={scrollContainer:"[data-carousel-scroll]",progressContainer:"[data-carousel-progress]",progressBar:"[data-carousel-progress-bar]",prevButton:"[data-carousel-prev]",nextButton:"[data-carousel-next]",categoriesContainer:"[data-categories]",enableProgress:!0,enableNavigation:!1,enableCategories:!1,enablePointerDrag:!1,desktopProgress:!1,scrollStep:300};class Y{scrollContainer=null;progressContainer=null;progressBar=null;prevButton=null;nextButton=null;categoriesComponent=null;resizeTimeout=null;lastScrollable=null;scrollTimeout=null;pointerDragStartX=0;pointerDragScrollLeft=0;isPointerDragging=!1;hasDragged=!1;boundPointerDown=t=>this.onPointerDown(t);boundPointerMove=t=>this.onPointerMove(t);boundPointerUp=t=>this.onPointerUp(t);boundPointerCancel=t=>this.onPointerUp(t);boundDragStart=t=>t.preventDefault();constructor(t,e={}){this.container=t,this.options={...J,...e},this.initialize()}initialize(){if(this.scrollContainer=this.container.querySelector(this.options.scrollContainer),this.scrollContainer){if(this.options.enableProgress&&(this.progressContainer=this.container.querySelector(this.options.progressContainer),this.progressBar=this.container.querySelector(this.options.progressBar)),this.options.enableNavigation&&(this.prevButton=this.container.querySelector(this.options.prevButton),this.nextButton=this.container.querySelector(this.options.nextButton)),this.options.enableCategories){const t=this.container.querySelector(this.options.categoriesContainer);t&&(this.categoriesComponent=new W(t,(t,e)=>{this.options.onCategoryChange&&this.options.onCategoryChange(t,e)}))}this.attachEvents(),this.options.enableProgress&&this.updateProgress(),(this.options.enableNavigation||this.options.enablePointerDrag)&&this.scheduleScrollabilityChecks()}else console.warn("ScrollableCarousel: Scroll container not found",this.options.scrollContainer)}scheduleScrollabilityChecks(){const t=()=>this.updateScrollabilityUi();requestAnimationFrame(t),setTimeout(t,100),setTimeout(t,300),setTimeout(t,500),"complete"===document.readyState?setTimeout(t,100):window.addEventListener("load",()=>setTimeout(t,100),{once:!0})}isScrollable(){if(!this.scrollContainer)return!1;const{scrollWidth:t,clientWidth:e}=this.scrollContainer;return 0!==e&&t-e>1}updatePointerDragCursor(){this.scrollContainer&&this.options.enablePointerDrag&&(this.scrollContainer.classList.contains("is-pointer-dragging")||(this.scrollContainer.style.cursor=this.isScrollable()?"grab":"",this.scrollContainer.classList.toggle("is-scrollable",this.isScrollable())))}updateScrollabilityUi(){this.options.enableNavigation?this.updateNavigationVisibility():this.updatePointerDragCursor();const t=this.isScrollable();this.options.onScrollabilityChange&&t!==this.lastScrollable&&(this.lastScrollable=t,this.options.onScrollabilityChange(t))}attachEvents(){this.scrollContainer&&(this.scrollContainer.addEventListener("scroll",()=>{this.handleScroll()}),this.prevButton&&this.prevButton.addEventListener("click",()=>{this.scrollPrev()}),this.nextButton&&this.nextButton.addEventListener("click",()=>{this.scrollNext()}),this.options.enablePointerDrag&&(this.scrollContainer.addEventListener("pointerdown",this.boundPointerDown),this.scrollContainer.addEventListener("dragstart",this.boundDragStart),this.scrollContainer.addEventListener("click",t=>{this.hasDragged&&(t.preventDefault(),t.stopPropagation())},!0)),window.addEventListener("resize",()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.options.enableProgress&&this.updateProgress(),this.updateScrollabilityUi()},150)}))}onPointerDown(t){this.scrollContainer&&0===t.button&&this.isScrollable()&&(this.hasDragged=!1,this.isPointerDragging=!0,this.pointerDragStartX=t.clientX,this.pointerDragScrollLeft=this.scrollContainer.scrollLeft,document.addEventListener("pointermove",this.boundPointerMove),document.addEventListener("pointerup",this.boundPointerUp),document.addEventListener("pointercancel",this.boundPointerCancel))}onPointerMove(t){if(!this.isPointerDragging||!this.scrollContainer)return;const e=this.pointerDragStartX-t.clientX;Math.abs(e)>50&&(this.hasDragged||(this.scrollContainer.setPointerCapture(t.pointerId),this.scrollContainer.classList.add("is-pointer-dragging"),this.scrollContainer.style.cursor="grabbing",this.scrollContainer.style.userSelect="none",this.hasDragged=!0),t.preventDefault(),this.scrollContainer.scrollLeft=this.pointerDragScrollLeft+e)}onPointerUp(t){this.scrollContainer&&(this.scrollContainer.hasPointerCapture(t.pointerId)&&this.scrollContainer.releasePointerCapture(t.pointerId),this.scrollContainer.classList.remove("is-pointer-dragging"),this.updatePointerDragCursor(
1),this.scrollContainer.style.userSelect="",document.removeEventListener("pointermove",this.boundPointerMove),document.removeEventListener("pointerup",this.boundPointerUp),document.removeEventListener("pointercancel",this.boundPointerCancel),this.isPointerDragging=!1)}handleScroll(){this.scrollContainer&&(this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{if(this.options.enableProgress&&this.updateProgress(),(this.options.enableNavigation||this.options.enablePointerDrag)&&this.updateScrollabilityUi(),this.options.onScroll){const t=this.scrollContainer.scrollLeft,e=this.scrollContainer.scrollWidth,i=this.scrollContainer.clientWidth;this.options.onScroll(t,e,i)}},10))}updateProgress(){if(!this.scrollContainer||!this.progressContainer||!this.progressBar)return;if(X("medium")&&!this.options.desktopProgress)return this.progressContainer.classList.add(k.Si),void(this.progressBar.style.width="0%");const t=this.scrollContainer.scrollWidth,e=this.scrollContainer.clientWidth,i=this.scrollContainer.scrollLeft,n=t-e;if(n<=0)this.progressContainer.classList.add(k.Si),this.progressBar.style.width="0%";else{this.progressContainer.classList.remove(k.Si);const t=8+i/n*92;this.progressBar.style.width=`${Math.min(100,Math.max(8,t))}%`}}scrollPrev(){if(!this.scrollContainer)return;const t=this.options.scrollStep;this.scrollContainer.scrollBy({left:-t,behavior:"smooth"})}scrollNext(){if(!this.scrollContainer)return;const t=this.options.scrollStep;this.scrollContainer.scrollBy({left:t,behavior:"smooth"})}scrollTo(t){this.scrollContainer&&this.scrollContainer.scrollTo({left:t,behavior:"smooth"})}scrollToStart(){this.scrollTo(0)}scrollToEnd(){this.scrollContainer&&this.scrollTo(this.scrollContainer.scrollWidth)}getScrollPosition(){return this.scrollContainer?.scrollLeft||0}getScrollWidth(){return this.scrollContainer?.scrollWidth||0}getClientWidth(){return this.scrollContainer?.clientWidth||0}updateNavigationVisibility(){if(!this.scrollContainer)return;if(!(this.prevButton&&this.nextButton||(this.options.enableNavigation&&(this.prevButton=this.container.querySelector(this.options.prevButton),this.nextButton=this.container.querySelector(this.options.nextButton)),this.prevButton&&this.nextButton)))return void this.updatePointerDragCursor();const t=this.scrollContainer.scrollWidth,e=this.scrollContainer.clientWidth,i=this.scrollContainer.scrollLeft,n=t-e;n<=1?(this.scrollContainer.classList.add("is-all-visible"),this.prevButton.classList.add(k.Si),this.nextButton.classList.add(k.Si),this.prevButton.disabled=!0,this.nextButton.disabled=!0):(this.scrollContainer.classList.remove("is-all-visible"),this.prevButton.classList.remove(k.Si),this.nextButton.classList.remove(k.Si),i<=1?(this.prevButton.disabled=!0,this.prevButton.classList.add(k.MJ)):(this.prevButton.disabled=!1,this.prevButton.classList.remove(k.MJ)),i>=n-1?(this.nextButton.disabled=!0,this.nextButton.classList.add(k.MJ)):(this.nextButton.disabled=!1,this.nextButton.classList.remove(k.MJ))),this.updatePointerDragCursor()}getCategoriesComponent(){return this.categoriesComponent}dispose(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.options.enablePointerDrag&&this.scrollContainer&&(this.scrollContainer.removeEventListener("pointerdown",this.boundPointerDown),this.scrollContainer.removeEventListener("dragstart",this.boundDragStart)),this.categoriesComponent&&(this.categoriesComponent.dispose(),this.categoriesComponent=null)}}i(1517),i(3777),i(4190),i(2359),i(6097),i(7273),i(7415),i(9929),i(7583),i(5122),i(230),i(7268),i(9733);let Q=null;async function G(t,e,i){if(!i.trim())return null;try{await function(t){return window.google?.maps?.Geocoder?Promise.resolve():Q||(Q=new Promise((e,i)=>{const n=`__wcMaps_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,11)}`,s=window;s[n]=()=>{delete s[n],e()};const r=document.createElement("script");r.async=!0,r.defer=!0,r.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(t)}&callback=${n}`,r.onerror=()=>{Q=null,delete s[n],i(new Error("Google Maps JavaScript API failed to load"))},document.head.appendChild(r)}),Q)}(i)}catch{return null}const n=window.google?.maps;if(!n?.Geocoder)return null;const s=new n.Geocoder;return new Promise(i=>{s.geocode({location:{lat:t,lng:e}},(t,e)=>{if("OK"!==e||!t?.[0])return"ZERO_RESULTS"!==e&&console.warn("Weather callout geocode:",e),void i(null);const n=t[0],s=function(t){if(!Array.isArray(t))return null;const e=["sublocality_level_1","sublocality","neighborhood","locality","administrative_area_level_3"];for(const i of e){const e=t.find(t=>t.types?.includes(i));if(e?.long_name)return e.long_name}return null}(n.address_components)||n.formatted_address||null;i(s?.trim()?s.trim():null)})})}function K(){return{location_fallback:(0,g.t)("general.weather_callout.location_fallback"),uv_label:(0,g.t)("general.weather_callout.uv_label")}}function Z(t,e){return t.getAttribute("data-weather-fallback-label")?.trim()||e.location_fallback}function tt(t,e={}){const i=!1!==e.animated;t.classList.toggle("is-trigger-reveal-animated",i),t.classList.remove("is-pending-weather-trigger"),t.querySelector(q)?.removeAttribute("hidden")}function et(t){return Math.round(1e4*t)/1e4}function it(t,e){return{latR:et(t),lngR:et(e)}}function nt(t,e,i){const{latR:n,lngR:s}=it(t,e);return Math.abs(n-i.latR)<1e-9&&Math.abs(s-i.lngR)<1e-9}function st(){try{const t=sessionStorage.getItem(R);if(!t?.trim())return null;const e=JSON.parse(t);if(!e||"number"!=typeof e.fetchedAt||"number"!=typeof e.latR||"number"!=typeof e.lngR)return null;if(null!==e.uvIndex&&void 0!==e.uvIndex&&"number"!=typeof e.uvIndex)return null;
1const i=function(t){const e=t.geocodeLabel;if("string"==typeof e&&e.trim())return e.trim();if(null===e||""===e)return null;const i=t.locality;return"string"==typeof i&&i.trim()?i.trim():null}(e);return{latR:e.latR,lngR:e.lngR,fetchedAt:e.fetchedAt,geocodeLabel:i,uvIndex:"number"==typeof e.uvIndex&&Number.isFinite(e.uvIndex)?e.uvIndex:null}}catch{return null}}function rt(t,e,i){const{latR:n,lngR:s}=it(t,e),r=st(),o=r&&nt(t,e,r),a={latR:n,lngR:s,fetchedAt:Date.now(),geocodeLabel:void 0!==i.geocodeLabel?i.geocodeLabel??null:o?r.geocodeLabel:null,uvIndex:void 0!==i.uvIndex?null!==i.uvIndex&&Number.isFinite(i.uvIndex)?i.uvIndex:null:o?r.uvIndex:null};try{sessionStorage.setItem(R,JSON.stringify(a))}catch{}}function ot(t){const e=t.states[t.restStateIndex];return e.showBar?{showBar:!0,gradient:e.gradient,colour:e.colour}:void 0}function at(t,e,i,n){const s=t.querySelector(M),r=t.querySelector("[data-weather-callout-bar]");if(!s)return;i&&s.textContent===e.text&&(i=!1);const o=n??e,a=r?.hidden??!0;function l(){r&&(r.hidden=!o.showBar,r.classList.toggle("has-gradient",!0===o.gradient),r.style.setProperty("--trigger-bar-colour",o.colour||""))}const c="--bar-scale";function d(t){if(!r||r.hidden)return;const e=r.parentElement;e&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{const i=e.offsetWidth;if(i<=0)return void r.style.setProperty(c,"1");const n=Math.min(t/i,1);r.style.setProperty(c,String(n)),requestAnimationFrame(()=>{requestAnimationFrame(()=>{r.style.setProperty(c,"1")})})})})}if(!i){const t=r&&!a?r.offsetWidth:0;return s.classList.remove(H,z),s.textContent=e.text,l(),void(a&&o.showBar&&r?(r.style.setProperty(c,"0"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{r.style.setProperty(c,"1")})})):t>0?d(t):r&&r.style.setProperty(c,"1"))}const h=r&&!r.hidden?r.offsetWidth:0,u=s.parentElement,p=u?u.offsetWidth:0;u&&(u.style.width=`${p}px`),s.classList.remove(z),s.classList.add(H);const m=()=>{if(s.removeEventListener("transitionend",m),s.textContent=e.text,l(),u){u.style.width="auto";const t=u.offsetWidth;u.style.width=`${p}px`,u.offsetHeight,u.style.width=`${t}px`;const e=t=>{t.target===u&&(u.style.width="",u.removeEventListener("transitionend",e))};u.addEventListener("transitionend",e)}s.classList.remove(H),s.classList.add(z),s.offsetHeight,requestAnimationFrame(()=>{s.classList.remove(z),h>0?d(h):r&&r.style.setProperty(c,"1")})};s.addEventListener("transitionend",m)}const lt=new Map,ct=new Map;function dt(t,e,i){!function(t){const e=lt.get(t);e&&(clearTimeout(e),lt.delete(t))}(t);const n=function(t,e){const i=[];return i.push({type:"location",text:t.name||e.location_fallback,showBar:!1}),t.uv?.index_level&&i.push({type:"uv",text:`${e.uv_label}: ${t.uv.index_level.toUpperCase()}`,showBar:!0,gradient:!0,colour:t.uv.colour_tone||void 0}),i.length>1?i:[i[0]]}(e,i);if(0===n.length)return;const s=n.length>1?1:0,r=ot({states:n,restStateIndex:s,currentIndex:0});if(ct.set(t,{states:n,restStateIndex:s,currentIndex:0}),at(t,n[0],!1,r),1===n.length)return;const o=setTimeout(()=>{lt.delete(t);const e=ct.get(t);e&&(e.currentIndex=s,at(t,n[s],function(t){return"none"!==getComputedStyle(t).display}(t)))},3e3);lt.set(t,o)}function ht(t){const e=ct.get(t);if(!e||0===e.states.length)return;const i=0!==e.currentIndex;at(t,e.states[0],i,ot(e))}function ut(t){const e=ct.get(t);if(!e)return;const i=e.currentIndex,n=0!==i;at(t,e.states[i],n,function(t,e){if(0===e&&t.restStateIndex>0)return ot(t)}(e,i))}function pt(t,e,i){const n=!1!==i?.includeUv;return{index:t.index,name:e,uv:n?t.uv??{index_level:"",colour_tone:""}:void 0,title:t.title,description:t.description,usps:t.usps,categories:t.categories}}function mt(t){const e=t.querySelector("script[data-weather-uv-bands]"),i=e?e.textContent:t.getAttribute("data-weather-uv-bands");if(!i||!i.trim())return[];try{const t=JSON.parse(i);return Array.isArray(t)?t:[]}catch{return[]}}function gt(t,e,i,n){t.querySelectorAll(_).forEach(t=>{const i=Number(t.getAttribute("data-weather-callout-band-index"))===e;t.classList.toggle(N,i),t.hidden=!i,t.setAttribute("aria-hidden",String(!i))});const s=t.querySelector(M);s&&(s.textContent=i||n.location_fallback)}async function vt(t,e,i,n,s,r,o,a={}){const l=mt(t);if(0===l.length)return;const c=function(t,e){const i=st();return i&&nt(t,e,i)?Date.now()-i.fetchedAt>V?null:i:null}(n,s);let d;
1c?d=c.uvIndex:(d=await async function(t,e,i){if(!i.trim())return null;try{const n=new URL("https://weather.googleapis.com/v1/forecast/hours:lookup");n.searchParams.set("location.latitude",String(t)),n.searchParams.set("location.longitude",String(e)),n.searchParams.set("pageSize","1"),n.searchParams.set("unitsSystem","METRIC"),n.searchParams.set("key",i);const s=await fetch(n.toString(),{mode:"cors",credentials:"omit"});if(!s.ok)return null;const r=await s.json(),o=r.forecastHours?.[0]?.uvIndex;return"number"==typeof o&&Number.isFinite(o)?o:null}catch{return null}}(n,s,o),rt(n,s,{uvIndex:d}));const h=function(t,e){if(!t.length)return 0;if(null==e||!Number.isFinite(e))return 0;const i=t.map((t,e)=>({originalIndex:e,min:null==t.index_min?NaN:Number(t.index_min),max:null==t.index_max?NaN:Number(t.index_max)}));i.sort((t,e)=>{const i=Number.isFinite(t.min),n=Number.isFinite(e.min);return i&&n?t.min-e.min:i?-1:n?1:0});for(const t of i)if(Number.isFinite(t.min)&&Number.isFinite(t.max)&&e>=t.min&&e<=t.max)return t.originalIndex;return 0}(l,d),u=l[h];if(!u)return;const p=null!=d&&Number.isFinite(d),m=pt(u,r,{includeUv:p});gt(e,h,r,i),tt(e,{animated:a.animated}),dt(e,m,i),p&&e.querySelectorAll(".o-weather-callout__uv").forEach(t=>t.removeAttribute("hidden"))}const ft={enableHighAccuracy:!1,timeout:1e4,maximumAge:0},bt={enableHighAccuracy:!1,maximumAge:0};let yt=null;function St(t){return t.getAttribute("data-weather-maps-api-key")?.trim()??""}function wt(t){try{sessionStorage.setItem(F,t)}catch{}}const Lt=new Map;function Et(t,e,i={}){const n=mt(t);if(0===n.length)return;const s=K(),r=Z(t,s),o=function(t,e){const i=t.getAttribute("data-weather-callout-fallback-index");if(null==i||""===String(i).trim())return 0;const n=parseInt(String(i).trim(),10);return!Number.isFinite(n)||e<=0?0:Math.min(Math.max(0,n),e-1)}(t,n.length),a=n[o]??n[0];if(!a)return;gt(e,o,r,s),tt(e,{animated:i.animated});dt(e,pt(a,r,{includeUv:!1}),s)}async function Ct(t,e,i={}){const{latitude:n,longitude:s}=e.coords;if(0===mt(t).length)return;const r=t.parentElement;if(!r)return;const o=K(),a=Z(t,o),l=St(t),c=await function(t,e,i){const n=function(t,e){return`${t.toFixed(6)},${e.toFixed(6)}`}(t,e);let s=Lt.get(n);return s||(s=G(t,e,i).finally(()=>{Lt.delete(n)}),Lt.set(n,s)),s}(n,s,l),d=c?.trim()?c.trim():a;await vt(t,r,o,n,s,d,l,i),c?.trim()?rt(n,s,{geocodeLabel:c.trim()}):rt(n,s,{})}async function At(t,e={}){const i=function(){const t=st();return t?Date.now()-t.fetchedAt>V?null:t:null}();if(!i)return!1;if(0===mt(t).length)return!1;const n=t.parentElement;if(!n)return!1;const s=K(),r=Z(t,s),o=i.geocodeLabel?.trim(),a=o||r,l=St(t);return await vt(t,n,s,i.latR,i.lngR,a,l,e),!0}function xt(t){const e=t.parentElement;if(!e)return;const i={animated:!1},n={animated:!0},s=(i=n)=>{Et(t,e,i)};(async()=>{if(!navigator.geolocation||!("getCurrentPosition"in navigator.geolocation))return wt("denied"),void s(n);const e=function(){try{const t=sessionStorage.getItem(F);return"granted"===t||"denied"===t?t:null}catch{return null}}();if("denied"===e)return void s(i);if("granted"===e){if(await At(t,i))return}const r=await async function(){if(!navigator.permissions?.query)return null;try{const t=await navigator.permissions.query({name:"geolocation"});return"granted"===t.state||"denied"===t.state||"prompt"===t.state?t.state:null}catch{return null}}();if("denied"===r)return wt("denied"),void s(n);const o="prompt"===r||null==r?bt:ft,a="granted"===e?i:n;try{const e=await function(t){if(!yt){const e=new Promise((e,i)=>{navigator.geolocation&&"getCurrentPosition"in navigator.geolocation?navigator.geolocation.getCurrentPosition(e,i,t):i(new Error("Geolocation unavailable"))});yt=e,e.finally(()=>{yt===e&&(yt=null)})}return yt}(o);wt("granted"),await Ct(t,e,a)}catch(t){const e=function(t){if(!t||"object"!=typeof t)return!1;const e=t;return"number"==typeof e.code&&("number"==typeof e.PERMISSION_DENIED?e.code===e.PERMISSION_DENIED:1===e.code)}(t);e&&wt("denied"),s(e?i:n)}})()}function kt(t){const e=t.parentElement;if(!e)return;const i=e.querySelector(q),n=e.querySelector(T),s=e.querySelector("[data-weather-callout-overlay]");function r(){t.classList.remove(O),i?.classList.remove(O),e?.classList.remove(O),n?.setAttribute("aria-hidden","true"),i?.setAttribute("aria-expanded","fal
1se"),s?.setAttribute("aria-hidden","true"),e&&ut(e)}i&&n&&(xt(t),i.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation(),t.classList.contains(O)?r():(t.classList.add(O),i?.classList.add(O),e?.classList.add(O),n?.setAttribute("aria-hidden","false"),i?.setAttribute("aria-expanded","true"),s?.setAttribute("aria-hidden","false"),e&&ht(e))}),s?.addEventListener("click",function(){t.classList.contains(O)&&r()}),document.addEventListener("click",function(e){if(!t.classList.contains(O))return;const i=e.target;i.closest(T)||i.closest(q)||r()}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.classList.contains(O)&&r()}),i.addEventListener("mouseenter",()=>{e&&!e.classList.contains(O)&&ht(e)}),i.addEventListener("mouseleave",()=>{e&&!e.classList.contains(O)&&ut(e)}),function(t){t.addEventListener("click",async t=>{const e=t.target.closest("[data-product-quick-add]");if(!e||e.disabled)return;t.preventDefault();const i=e.getAttribute("data-variant-id");if(!i)return;const n=parseInt(i,10);if(Number.isFinite(n)){e.disabled=!0;try{await(0,g.cartAdd)({items:[{id:n,quantity:1}]});const t=document.querySelector("[data-cart-drawer-toggle]");t&&t.click()}catch(t){console.error("Weather callout: add to cart failed",t)}finally{e.disabled=!1}}})}(t),function(t){t.querySelectorAll(_).forEach(t=>{const e=Array.from(t.querySelectorAll("[data-weather-callout-category-tab]")),i=Array.from(t.querySelectorAll("[data-weather-callout-category-panel]"));0!==e.length&&0!==i.length&&e.forEach(t=>{t.addEventListener("click",n=>{n.preventDefault();const s=t.getAttribute("data-category-index"),r=null!==s?parseInt(s,10):0;!Number.isFinite(r)||r<0||r>=e.length||(e.forEach(t=>t.classList.remove(N)),t.classList.add(N),e.forEach((t,e)=>{t.setAttribute("aria-selected",e===r?"true":"false")}),i.forEach((t,e)=>{const i=e===r;t.classList.toggle(N,i),t.hidden=!i,t.setAttribute("aria-hidden",String(!i))}))})})})}(t))}function Pt(){document.querySelectorAll("[data-weather-callout-popover-wrap]").forEach(t=>kt(t)),document.querySelectorAll("[data-weather-callout-usp-wrap]").forEach(t=>{const e=t.querySelector(D),i=Array.from(t.querySelectorAll("[data-weather-callout-usp-slide]")),n=Array.from(t.querySelectorAll("[data-weather-callout-usp-dot]"));if(!e||0===i.length)return;const s=()=>{const t=e.scrollWidth-e.clientWidth>1;e.classList.toggle("is-scrollable",t),e.classList.toggle("is-all-visible",!t)};if(s(),0===n.length)return;const r=e.clientWidth,o=new Y(t,{scrollContainer:D,enableProgress:!1,enableNavigation:!1,enablePointerDrag:i.length>1,scrollStep:r,onScroll:(t,e,r)=>{s();const o=t+r/2;let a=i.findIndex(t=>t.offsetLeft+t.offsetWidth>o);-1===a&&(a=i.length-1),n.forEach((t,e)=>{const i=e===a;t.classList.toggle(N,i),t.setAttribute("aria-selected",String(i))})}});n.forEach(t=>{t.addEventListener("click",()=>{const e=Number(t.getAttribute("data-slide-index")||"0"),n=i[e];n&&o.scrollTo(n.offsetLeft)})})}),document.querySelectorAll("[data-weather-callout-product-wrap]").forEach(t=>{const e=t.querySelector(B),i=Array.from(t.querySelectorAll("[data-weather-callout-product-slide]")),n=Array.from(t.querySelectorAll("[data-weather-callout-product-dot]"));if(!e||0===i.length||0===n.length)return;const s=e.clientWidth,r=new Y(t,{scrollContainer:B,enableProgress:!1,enableNavigation:!1,enablePointerDrag:!0,scrollStep:s,onScroll:(t,e,s)=>{const r=t+s/2;let o=i.findIndex(t=>t.offsetLeft+t.offsetWidth>r);-1===o&&(o=i.length-1),n.forEach((t,e)=>{const i=e===o;t.classList.toggle(N,i),t.setAttribute("aria-selected",String(i))})}});n.forEach(t=>{t.addEventListener("click",()=>{const e=Number(t.getAttribute("data-slide-index")??"0"),n=i[e];n&&r.scrollTo(n.offsetLeft)})})})}const It="data-section-initialized";class qt{static registrations={};static register(t,e){const i=[];return document.querySelectorAll(t).forEach(n=>{if(qt.isRegistered(n))return;const s=new e(n,t);i.push(s),s.queryChildren(n),s.init(),s.attachEvents(n)}),this.registrations[t]=e,i}static recheck(t){const e=this.registrations[t];return e?qt.register(t,e):[]}static isRegistered(t){return t.hasAttribute(It)}constructor(t,e){if(this.container=t,this.selector=e,this.container.setAttribute(It,"true"),this.shopifyContainer=this.container.parentElement,this.shopifyContainer&&this.shopifyContainer.id)try{this.id=this.shopifyContainer.id.replace(/shopify-section-/,"")}catch(t){console.warn(t)}this.innerHtmlObserver=null}replaceContainer(t){this.container.removeAttribute(It),this.detatchEvents(this.container),this.container.innerHTML=t.innerHTML,this.container.setAttribute(It,"true"),this.queryChildren(this.container),this.init(),this.attachEvents(this.container)}init(){}onInnerHtmlMutationObserved=(t,e)=>{if(!t.length)return;if(!this.shopifyContainer)return;const[i]=t,n=[];
1i.removedNodes.forEach(t=>n.push(t));-1!==n.findIndex(t=>t===this.shopifyContainer)&&(console.log("Section",this.id,"reloaded."),this.dispose(),qt.recheck(this.selector))};dispose(){this.container.removeAttribute(It),this.detatchEvents(this.container),this.innerHtmlObserver&&this.innerHtmlObserver.disconnect()}}const Tt="[data-accordion-title]";class _t{animationSpeed=400;constructor(t,e={}){this.el=t,this.summary=t.querySelector(Tt),this.content=t.querySelector("[data-accordion-body]"),this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.callbacks=e}onClick(t){t&&t.preventDefault(),this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.open():(this.isExpanding||this.el.open)&&this.shrink()}shrink(){if(!this.summary)return;this.isClosing=!0;const t=`${this.el.offsetHeight}px`;this.callbacks.onStartClosing&&this.callbacks.onStartClosing(this),this.el.offsetHeight;const e=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,e]},{duration:this.animationSpeed,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.el.style.height=`${this.el.offsetHeight}px`,this.el.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){if(!this.summary||!this.content)return;this.isExpanding=!0,this.callbacks.onStartOpening&&this.callbacks.onStartOpening(this),this.el.classList.add(k.YX);const t=`${this.el.offsetHeight}px`,e=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,e]},{duration:this.animationSpeed,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(t){this.el.open=t,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow="",this.el.classList.toggle(k.YX,t),t&&this.callbacks.onOpened&&this.callbacks.onOpened(this),!t&&this.callbacks.onClosed&&this.callbacks.onClosed(this)}}class Mt{accordionSlideElements=null;accordionSlides=[];disableSize=null;callbacks={};constructor(t,e){this.container=t,this.accordionSlideElements=Array.from(t.querySelectorAll("[data-accordion-slide]")),"string"==typeof e?(this.disableSize=e,this.allowMultipleOpen=!1):e?(this.disableSize=e.disableSize||null,this.allowMultipleOpen=e.allowMultipleOpen??!1,this.callbacks={onSlideStartOpening:e.onSlideStartOpening,onSlideStartClosing:e.onSlideStartClosing,onSlideOpened:e.onSlideOpened,onSlideClosed:e.onSlideClosed}):this.allowMultipleOpen=!1,this.attachEvents()}openAccordion(){this.accordionSlideElements&&(this.container.classList.contains(k.YX)||(this.container.classList.add(k.YX),this.accordionSlideElements.forEach(t=>t.setAttribute("open","open"))))}closeAccordion(){this.accordionSlideElements&&this.container.classList.contains(k.YX)&&(this.container.classList.remove(k.YX),this.accordionSlideElements.forEach(t=>t.removeAttribute("open")))}closeActiveSlides(t,e){this.accordionSlides&&0!=this.accordionSlides.length&&this.accordionSlides.forEach(i=>{i.el!=e&&i.el.open&&i.onClick(t)})}onCLick(t,e){if(!this.accordionSlides||0==this.accordionSlides.length)return;if(this.disableSize&&X(this.disableSize))return t.preventDefault(),void t.stopPropagation();const i=this.accordionSlides[e];i&&(this.allowMultipleOpen||this.closeActiveSlides(t,i.el),i.onClick(t))}attachEvents(){this.accordionSlideElements&&this.accordionSlideElements.length>0&&this.accordionSlideElements.forEach((t,e)=>{const i=new _t(t,{onStartOpening:t=>{this.callbacks.onSlideStartOpening&&this.callbacks.onSlideStartOpening(t)},onStartClosing:t=>{this.callbacks.onSlideStartClosing&&this.callbacks.onSlideStartClosing(t)},onOpened:t=>{this.callbacks.onSlideOpened&&this.callbacks.onSlideOpened(t)},onClosed:t=>{this.callbacks.onSlideClosed&&this.callbacks.onSlideClosed(t)}});this.accordionSlides.push(i);const n=t.querySelector(Tt);n&&n.addEventListener("click",t=>this.onCLick(t,e))})}detachEvents(){this.accordionSlideElements&&this.accordionSlideElements.length>
10&&this.accordionSlideElements.forEach((t,e)=>{const i=t.querySelector(Tt);i&&i.removeEventListener("click",t=>this.onCLick(t,e))})}}const Dt=()=>{document.documentElement.classList.add(k.AQ)},Bt=()=>{document.documentElement.classList.remove(k.AQ)},Ot="[data-menu-submenu]",Nt="data-menu-submenu",Ht="is-menu-open",zt="is-submenu-open",Rt="is-menu-level-";class Ft{submenus=null;menuLevel=1;currentMenu=null;constructor(t,e){this.container=t,this.header=e,this.queryChildren(t),this.attachEvents()}queryChildren(t){this.submenus=t.querySelectorAll(Ot)}attachEvents(){document.querySelectorAll("[data-menu-toggle]").forEach(t=>{t.addEventListener("click",this.onMenuToggle)}),document.querySelectorAll("[data-menu-close]").forEach(t=>{t.addEventListener("click",this.closeMenu)}),this.container.querySelectorAll("[data-submenu-toggle]").forEach(t=>{t.addEventListener("click",this.onSubmenuOpen)}),this.container.querySelectorAll("[data-submenu-back]").forEach(t=>{t.addEventListener("click",this.onSubmenuBack)})}onMenuToggle=t=>{if(t.preventDefault(),X("medium"))this.container.classList.remove(Ht),this.header.classList.remove(k.cI,k.fV);else{if(this.container.classList.contains(Ht))return this.closeMenu();this.openMenu()}};onSubmenuOpen=t=>{t.preventDefault();const e=t.currentTarget,i=e?.parentElement?.querySelector(Ot);if(!i||!i.getAttribute(Nt))return console.warn("Error: Menu structure has changed.");this.updateSubmenuClasses(null,i),X("medium")||Dt()};onSubmenuBack=t=>{t.preventDefault();const e=this.currentMenu?.closest("li"),i=e?.closest(Ot);if(!i)return console.warn("Error: Menu structure has changed.");this.updateSubmenuClasses(this.currentMenu,i)};closeMenu=()=>{this.container.classList.remove(Ht),this.header.classList.remove(Ht,k.cI),this.container.querySelector(Ot)?.classList.add(zt),this.resetSubmenuClasses(),this.updateMenuStateClasses(1),Bt()};openMenu=()=>{const t=this.header.getBoundingClientRect();this.container.style.setProperty("--menu-top-offset",t.top+"px"),this.container.classList.add(Ht),this.header.classList.add(Ht),this.updateMenuStateClasses(1),Dt()};resetSubmenuClasses=()=>{this.container.querySelectorAll(Ot).forEach(t=>{t.classList.remove(zt)})};updateSubmenuClasses=(t,e)=>{const i=parseInt(e.getAttribute(Nt)||"");i&&this.submenus&&(t?.classList.remove(zt),Array.from(this.submenus).forEach(t=>{const n=parseInt(t.getAttribute(Nt)||"");t.isEqualNode(e)?t.classList.toggle(zt):n===i&&t.classList.remove(zt)}),this.currentMenu=e,this.updateMenuStateClasses(i))};updateMenuStateClasses=t=>{this.container.classList.remove(`${Rt}${this.menuLevel}`),this.container.classList.add(`${Rt}${t}`),this.menuLevel=t,X("medium")&&this.header&&(!this.header.classList.contains(Ht)&&t>1?this.header.classList.add(Ht):1==t&&this.header.classList.remove(Ht))}}qt.register("[data-header]",class extends qt{cartCountElement=null;menuElement=null;menu=null;accordionElements=null;accordions=[];resizeTimer=null;slides=null;predictiveSearchDrawer=null;searchToggle=null;searchClose=null;searchInput=null;queryChildren(t){this.cartCountElement=t.querySelector("[data-cart-counter]"),this.menuElement=t.querySelector("[data-main-menu]"),this.accordionElements=t.querySelectorAll("[data-accordion]"),this.slides=this.container.querySelectorAll("[data-accordion-slide]"),this.predictiveSearchDrawer=document.querySelector("[data-search-drawer]"),this.searchToggle=t.querySelectorAll("[data-search-toggle]"),this.searchClose=document.querySelectorAll("[data-search-close]"),this.searchInput=document.querySelector("[data-search-input]")}attachEvents(){window.addEventListener(g.ON_CART_FINISHED,this.onCartUpdate),this.menuElement&&(this.menu=new Ft(this.menuElement,this.container)),sessionStorage.getItem("hasScrolled")||window.addEventListener("scroll",this.onFirstScroll,{passive:!0}),this.accordionElements?.forEach(t=>{this.accordions.push(new Mt(t))}),this.setSlidesOpen(),window.addEventListener("resize",this.onResize),this.predictiveSearchDrawer&&this.searchToggle&&(this.searchToggle.forEach(t=>{t.addEventListener("click",this.handleSearchToggle)}),this.searchClose&&this.searchClose.forEach(t=>{t.addEventListener("click",this.handleSearchClose)}))}detatchEvents(){window.removeEventListener(g.ON_CART_FINISHED,this.onCartUpdate),this.accordions.forEach(t=>{t.detachEvents()}),window.removeEventListener("resize",this.onResize)}onCartUpdate=()=>{if(!this.cartCountElement)return;const t=(0,g.cartGetCurrent)().item_count||0;this.cartCountElement.innerText=t.toString(),t>0&&!this.cartCountElement.classList.contains(k.uZ)?this.cartCountElement.classList.add(k.uZ):0===t&&this.cartCountElement.classList.contains(k.uZ)&&this.cartCountElement.classList.remove(k.uZ)};onFirstScroll=()=>{window.scrollY>20&&(document.documentElement.classList.add("is-header-initialised"),sessionStorage.setItem("hasScrolled","true"),document.dispatchEvent(new CustomEvent("header:initialised")),window.removeEventListener("scroll",this.onFirstScroll))};
1setSlidesOpen(){if(!this.slides)return;const t=!!X("medium");this.slides.forEach(e=>e.open=t)}handleSearchToggle=t=>{t.preventDefault();const e=this.container.classList.contains(k.fV),i=this.container.getBoundingClientRect();if(this.predictiveSearchDrawer?.style.setProperty("--menu-top-offset",i.top+"px"),e)this.container.classList.remove(k.fV),this.predictiveSearchDrawer?.classList.remove("is-drawer-open"),Bt();else if(this.container.classList.add(k.fV),this.predictiveSearchDrawer?.classList.add("is-drawer-open"),this.searchInput?.focus(),X("medium")||Dt(),this.menuElement?.classList.contains(k.KS)&&this.predictiveSearchDrawer){const t=()=>{this.predictiveSearchDrawer?.removeEventListener("transitionend",t),this.menu?.closeMenu(),this.container.classList.contains(k.fV)&&!X("medium")&&Dt()};this.predictiveSearchDrawer.addEventListener("transitionend",t)}};handleSearchClose=t=>{t.preventDefault(),this.predictiveSearchDrawer?.classList.remove("is-drawer-open"),this.container.classList.remove(k.fV),Bt()};onResize=()=>{window.addEventListener("resize",()=>{this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=window.setTimeout(()=>this.setSlidesOpen(),100)})}});i(4477);document.documentElement.classList.remove("js-unavailable"),document.documentElement.classList.add("js-available"),window.addEventListener("pageshow",t=>{t.persisted&&(yt=null)}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Pt):Pt(),I(),window.addEventListener(g.ON_CART_FINISHED,I)},2159(t,e,i){"use strict";var n=i(7689),s=i(9136);const r="data-product-thumbnail-initialized";class o{forms=null;addButtons=null;rating=null;ratingUrl=null;ratingObserver=null;constructor(t){this.container=t,this.queryChildren(),this.attachEvents()}queryChildren(){this.forms=this.container.querySelectorAll("[data-product-form]"),this.addButtons=this.container.querySelectorAll("[data-product-form-add]"),this.rating=this.container.querySelector("[data-product-thumbnail-rating]"),this.ratingUrl=this.rating?.dataset.productUrl?.trim()??null}attachEvents(){this.setupBvRatingPdpNavigation(),this.container.addEventListener("click",t=>{t.target.closest("[data-swatch-object]")&&(t.preventDefault(),t.stopPropagation())});const t=t=>{if(!this.addButtons||0===this.addButtons.length)return;const e="clientX"in t?t.clientX:0,i="clientY"in t?t.clientY:0;Array.from(this.addButtons).some(t=>{if(!t.disabled)return!1;const n=t.getBoundingClientRect();return e>=n.left&&e<=n.right&&i>=n.top&&i<=n.bottom})&&(t.preventDefault(),t.stopPropagation())};this.container.addEventListener("pointerdown",t,!0),this.container.addEventListener("click",t,!0),this.forms&&this.forms.forEach(t=>{t.addEventListener("click",t=>{t.stopPropagation()})})}setupBvRatingPdpNavigation(){if(!this.rating||!this.ratingUrl)return;let t;try{t=new URL(this.ratingUrl,window.location.origin).pathname}catch{return}const e=()=>{this.rating.querySelectorAll("a[href]").forEach(e=>{const i=e.getAttribute("href");if(i&&!i.startsWith("#"))try{new URL(i,window.location.origin).pathname===t&&e.removeAttribute("href")}catch{}})};e(),this.ratingObserver=new MutationObserver(()=>e()),this.ratingObserver.observe(this.rating,{childList:!0,subtree:!0});const i=(t,e)=>{const i=t.target;i&&this.rating.contains(i)&&(t.preventDefault(),t.stopPropagation(),e?window.open(this.ratingUrl,"_blank","noopener,noreferrer"):window.location.assign(this.ratingUrl))};this.rating.addEventListener("click",t=>{0===t.button&&i(t,!1)},!0),this.rating.addEventListener("auxclick",t=>{1===t.button&&i(t,!0)},!0)}}const a=()=>{document.querySelectorAll("[data-product-thumbnail]").forEach(t=>{if(t.hasAttribute(r))return;t.setAttribute(r,""),new o(t);const e=t.querySelector("[data-thumbnail-combined-shades]");e&&(new n.lo(e,!1),e.addEventListener(s.nU,()=>{const i=e.querySelector('input[name="id"]');if(!i)return;const n=i.value;t.querySelectorAll("form[data-product-form]").forEach(t=>{const e=t.querySelector('input[name="id"]');e&&(e.value=n)})}))})};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a(),i.d(e,["P",0,a])},7689(t,e,i){"use strict";i.d(e,{lo:function(){return d}});var n=i(9136);const s="[data-swatch]",r="[data-swatch-object]",o="[data-swatch-dropdown]",a="data-swatch-position",l="data-value",c="is-selected";class d extends n.ln{infoWraps=null;swatchObjects=null;constructor(t,e){super(t,e),this.swatches=Array.from(t.querySelectorAll(s).values()),this.infoWraps=this.container.querySelectorAll("[data-swatch-shade-info]"),this.swatchObjects=this.container.querySelectorAll(r),this.swatchObjects.forEac
1h(t=>{t.addEventListener("click",this.onSwatchClick)}),this.container.querySelectorAll(o).forEach(t=>{t.addEventListener("change",this.onDropdownChange)}),this.onVariantSelected(),this.infoWraps&&this.swatchObjects&&this.swatchObjects.forEach(t=>{t.addEventListener("mouseenter",this.onSwatchEnter),t.addEventListener("focusin",this.onSwatchEnter),t.addEventListener("mouseleave",this.onSwatchLeave),t.addEventListener("focusout",this.onSwatchLeave)})}onSwatchClick=t=>{const e=t.currentTarget,i=e.closest(s);if(!i)return;const n=parseInt(i.getAttribute(a)||""),r=e.getAttribute(l);!isNaN(n)&&r&&this.setVariantOption(n-1,r)};onSwatchEnter=t=>{const e=t.currentTarget.getAttribute(l);this.infoWraps?.forEach(t=>{const i=t.getAttribute(l);t.classList.toggle(c,i===e)})};onSwatchLeave=t=>{this.swatchObjects?.forEach(t=>{t.classList.contains("is-current-page")&&t.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!1}))})};onDropdownChange=t=>{const e=t.currentTarget,i=e.closest(s);if(!i)return;const n=parseInt(i.getAttribute(a)||"");isNaN(n)||this.setVariantOption(n-1,e.value)};onVariantSelected(){const t=this.getVariant();this.swatches.forEach(e=>{const i=parseInt(e.getAttribute(a)||"");if(isNaN(i))return;const n=t.options[i-1];e.querySelectorAll(r).forEach(t=>{if(t.getAttribute(l)===n){t.classList.add(c);let e=t.parentElement;e&&e.classList.add(c)}else{t.classList.remove(c);let e=t.parentElement;e&&e.classList.remove(c)}});e.querySelectorAll(o).forEach(t=>t.value=n),e.querySelectorAll("[data-swatch-value]").forEach(t=>{t.textContent=n})})}dispose(){super.dispose(),this.container.querySelectorAll(r).forEach(t=>{t.removeEventListener("click",this.onSwatchClick)}),this.container.querySelectorAll(o).forEach(t=>{t.removeEventListener("change",this.onDropdownChange)})}}i.d(e,["IT",0,"[data-swatches]"])},9136(t,e,i){"use strict";i.d(e,{ln:function(){return o}});var n=i(7367);const s="onVariantChange";class r extends CustomEvent{}class o{constructor(t,e=!0){this.container=t,this.updateHistory=e,this.variantSelector=t.querySelector('[name="id"]'),this.elementData=t.querySelector("[data-variant-selector-data]"),this.data=JSON.parse(this.elementData.innerHTML),this.variantSelector.addEventListener("change",this.onInputChanged)}getVariantId(){return parseInt(this.variantSelector.value)}getVariant(){const t=this.getVariantId();return this.data.variants.find(e=>e.id===t)}setVariantId(t){if(isNaN(t)||!isFinite(t))return;if(t.toString()==this.variantSelector.value)return;if(!this.data.variants.some(e=>e.id===t))return;const e=this.getVariant();this.variantSelector.value=t.toString(),this.updateHistory&&(t===(0,n.variantFirstAvailableOrDefault)({variants:this.data.variants}).id?(0,n.queryReplaceParam)("variant",null):(0,n.queryReplaceParam)("variant",t.toString())),this.onVariantSelected();const i=this.getVariant(),o=new r(s,{bubbles:!0,cancelable:!1,detail:{oldVariant:e,newVariant:i,variantSelector:this}});this.variantSelector.dispatchEvent(o)}getOptionValues(){const t={};return this.data.options.forEach(e=>
1t[e]=[]),this.data.variants.forEach(e=>{e.options.forEach((e,i)=>{const n=this.data.options[i];t[n]&&-1===t[n].indexOf(e)&&t[n].push(e)})}),t}setVariantOption(t,e){this.getOptionValues();const i=this.getVariant(),n=[];for(let s=0;s<this.data.options.length;s++){let r;r=s===t?e:i.options[s],n.push(r)}const s=this.data.variants.find(t=>t.options.every((t,e)=>e>=this.data.options.length||n[e]===t));if(!s){const i=this.data.options[t],s=this.data.options_with_values?.find(t=>t.name===i);if(!s)return null;const r=s.values.find(t=>t.name===e);if(!r||!r.product_url)return null;const o=new URL(r.product_url,window.location.origin);return this.data.options.forEach((e,i)=>{i!==t&&o.searchParams.set(`option${i+1}`,n[i])}),window.location.href=o.toString(),null}return this.setVariantId(s.id),s}onInputChanged=t=>{this.setVariantId(parseInt(this.variantSelector.value))};onVariantSelected(){}dispose(){this.variantSelector.removeEventListener("change",this.onInputChanged)}}i.d(e,["nU",0,s])},1964(t,e,i){"use strict";var n=i(7367);const s=document.createElement("template");
1s.innerHTML="\n  <slot></slot>\n";class r extends CustomEvent{}class o extends HTMLElement{get value(){return this.input?this.input.valueAsNumber:this.fallbackValue}set value(t){null!==this.max&&(t=Math.min(this.max,t)),null!==this.min&&(t=Math.max(this.min,t)),this.input&&(this.input.valueAsNumber=t),this.fallbackValue=t}get min(){const t=this.input?this.input.min:this.fallbackMin;if(null===t)return null;if("string"==typeof t){const e=parseInt(t);if(!t.replace(/\s/g,"").length)return null;if(isNaN(e))return null}return t}set min(t){null===t?(this.input&&(this.input.min=""),this.fallbackMin=null):(this.input&&(this.input.min=t.toString()),this.fallbackMin=this.fallbackMin)}get max(){const t=this.input?this.input.max:this.fallbackMax;if(null===t)return null;if("string"==typeof t){const e=parseInt(t);if(!t.replace(/\s/g,"").length)return null;if(isNaN(e))return null}return t}set max(t){null===t?(this.input&&(this.input.max=""),this.fallbackMax=null):(this.input&&(this.input.max=t.toString()),this.fallbackMax=this.fallbackMin)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){t?this.setAttribute("disabled","disabled"):this.removeAttribute("disabled"),this.updateDisabled()}input=null;btnMinus=null;btnPlus=null;line=null;fallbackValue=0;fallbackMin=null;fallbackMax=null;constructor(){super();this.attachShadow({mode:"open"}).appendChild(s.content.cloneNode(!0)),this.btnMinus=this.querySelector(".is-minus"),this.btnPlus=this.querySelector(".is-plus"),this.input=this.querySelector('input[type="number"]'),this.classList.add("o-quantity-selector"),this.line=this.getAttribute("line"),this.btnMinus?.addEventListener("click",this.onMinusClick),this.btnPlus?.addEventListener("click",this.onPlusClick),this.input?.addEventListener("change",this.onInputChanged),this.updateDisabled()}onPlusClick=t=>{t.preventDefault(),this.value+=1,this.onQuantityChanged()};onMinusClick=t=>{t.preventDefault(),this.value-=1,this.onQuantityChanged()};onInputChanged=t=>{this.value=this.input?.valueAsNumber||this.value,this.onQuantityChanged()};onQuantityChanged(){if(this.line)try{(0,n.cartChange)({quantity:this.value,id:this.line})}catch(t){console.warn(t)}const t=new r("onQtyChange",{bubbles:!0,cancelable:!1,detail:{qtySelector:this,newValue:this.value}});this.dispatchEvent(t)}updateDisabled(){[this.btnMinus,this.btnPlus,this.input].forEach(t=>{var e;this.disabled?(e=t)&&(e.disabled=!0,e.classList.add("is-disabled")):(t=>{t&&(t.disabled=!1,t.classList.remove("is-disabled"))})(t)}),this.disabled?this.classList.add("is-disabled"):this.classList.remove("is-disabled")}}customElements.get("quantity-selector")||customElements.define("quantity-selector",o)},6386(){class t extends HTMLElement{constructor(){super(),this.paragraphs=this.querySelectorAll("p"),this.throttledScroll=this.throttle(this.handleScroll.bind(this),200)}connectedCallback(){window.addEventListener("scroll",this.throttledScroll),this.handleScroll()}isInViewport(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}animateWords(){this.paragraphs.forEach(t=>{const e=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null),i=[];let n;for(;n=e.nextNode();)n.textContent?.trim()&&i.push(n);i.forEach(t=>{const e=t.textContent.split(" "),i=document.createDocumentFragment();e.forEach((t,n)=>{if(""===t)return;const s=document.createElement("write-in-word");Array.from(t).forEach(t=>{const e=document.createElement("write-in-char");e.classList.add("o-write-in__char"),e.textContent=t,s.appendChild(e)}),i.appendChild(s),n<e.length-1&&i.appendChild(document.createTextNode(" "))}),t.parentNode.replaceChild(i,t)});t.querySelectorAll("write-in-char").forEach((t,e)=>{setTimeout(()=>{t.classList.add("is-highlighted")},50*e)})})}handleScroll=()=>{this.isInViewport(this)&&(this.animateWords(),window.removeEventListener("scroll",this.throttledScroll))};throttle(t,e){let i=0;return function(...n){const s=(new Date).getTime();s-i>=e&&(t.apply(this,n),i=s)}}}customElements.get("write-in-highlighter")||customElements.define("write-in-highlighter",t)},4477(t,e,i){"use strict";var n=i(9588),s=i(7367),r=i(535),o=i(7689);const a="is-disabled";var l=i(9136);i(1964);class c{btnAdd=null;qtySelector=null;form=null;swatches=null;variantSelector=null;money=null;compare=null;pricing=null;klaviyoBis=null;adding=!1;onKlaviyoBisClick=t=>{t.target.closest("[data-klaviyo-bis-open]")&&(t.preventDefault(),function(){const t=window.ThemeSettings?.klaviyoBisFormId,e="string"==typeof t?t.trim():"";if(!e)return;const i=window.klaviyo;i&&"function"==typeof i.push&&i.push(["openForm",e])}())};constructor(t){this.container=t,this.queryChildren(t),this.attachEvents()}queryChildren(t){this.btnAdd=t.querySelector("[data-product-form-add]"),this.qtySelector=t.querySelector("[data-product-form-qty]"),this.money=t.querySelectorAll("[data-product-money]"),this.compare=t.querySelectorAll("[data-product-compare-money]"),this.pricing=t.querySelectorAll("[data-product-pricing]"),this.klaviyoBis=t.querySelector("[data-klaviyo-bis-wrap]")}onFormSubmit=async t=>{t.preventDefault(),t.stopPropagation(),this.adding=!0,this.btnPending();try{const t=this.container.querySelector('input[name="id"], select[name="id"]'),e=t?parseInt(t.value,10):NaN;if(!Number.isFinite(e))throw new Error("Product form is missing a variant id");const i={id:e,quantity:this.qtySelector?this.qtySelector.value:1};await(0,s.cartAdd)({items:[i]}),this.btnAdded(),document.dispatchEvent(new CustomEvent("onAddCartFinished",{detail:{variant:this.variantSelector.getVariant()},bubbles:!0}))}catch(t){console.error(t),alert(t)}this.onVariantChange(),this.qtySelector&&(this.qtySelector.disabled=!1),this.adding=!1};onVariantChange(){if(!this.variantSelector)return;const t=this.variantSelector.getVariant(),{inventory_management:e,inventory_policy:i,inventory_quantity:n,price:o,compare_at_price:a}=t,l=(0,s.cartGetQuantityOfVariant)(t.id);if(this.qtySelector){if("shopify"===e&&"deny"===i){const t=n??0,e=t-l,i=(0,r.bq)();this.qtySelector.max=i>0&&t<=i?0:i>0?Math.max(0,e-i):e}else this.qtySelector.max=null;this.qtySelector.disabled=(0,r.hg)(t)}this.updatePriceElements(o,a),this.updateAddToCart(t)}updatePriceElements(t,e){const i=!!e&&e>t;this.pricing&&this.pricing.forEach(t=>t.classList.toggle("has-compare",i)),this.money&&this.money.forEac
1h(e=>e.innerText=(0,s.printMoney)(t)),this.compare&&this.compare.forEach(t=>t.innerText=i?(0,s.printMoney)(e):"")}updateAddToCart(t){if(!this.btnAdd)return;const e=(0,s.cartGetQuantityOfVariant)(t.id),{available:i,inventory_policy:n,inventory_management:o,inventory_quantity:a}=t;if(this.setNotifyCtaVisible((0,r.fI)(t)),!i)return void this.btnSoldOut();"continue"!==n&&null!=o&&(a||0)-e<=0?this.btnAllInCart():(0,r.hg)(t)?this.btnSoldOut():this.btnAvailable()}setNotifyCtaVisible(t){this.klaviyoBis&&(this.klaviyoBis.hidden=!t)}btnAvailable(){this.btnAdd&&(this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,s.t)("products.product.add_to_cart")):this.btnAdd.classList.contains("is-bundle-add")?this.btnAdd.innerHTML=(0,s.t)("products.product.bundle_add_to_cart"):this.btnAdd.innerHTML=(0,s.t)("products.product.add_to_cart"),this.btnAdd.classList.remove(n.MJ),this.btnAdd.disabled=!1)}btnAllInCart(){this.btnAdd&&(this.btnAdd.classList.add(n.MJ),this.btnAdd.setAttribute(a,a),this.btnAdd.disabled=!0,this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,s.t)("products.product.all_in_cart")):this.btnAdd.innerHTML=(0,s.t)("products.product.all_in_cart"))}btnSoldOut(){this.btnAdd&&(this.btnAdd.classList.add(n.MJ),this.btnAdd.setAttribute(a,a),this.btnAdd.disabled=!0,this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,s.t)("products.product.sold_out")):this.btnAdd.innerHTML=(0,s.t)("products.product.sold_out"))}btnAdded(){this.btnAdd&&(this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,s.t)("products.product.added_to_cart")):this.btnAdd.innerHTML=(0,s.t)("products.product.added_to_cart"),this.btnAdd.classList.remove(n.MJ),this.btnAdd.disabled=!1)}btnPending(){this.btnAdd&&(this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,s.t)("products.product.cart_pending")):this.btnAdd.innerText=(0,s.t)("products.product.cart_pending"),this.btnAdd.disabled=!0)}isIconButton(){return!!this.btnAdd&&null!==this.btnAdd.querySelector("svg")}attachEvents(){this.container.querySelector(o.IT)?(this.swatches=new o.lo(this.container,!0),this.variantSelector=this.swatches):this.variantSelector=new l.ln(this.container,!0),this.container.addEventListener(l.nU,()=>this.onVariantChange()),this.container.addEventListener("click",this.onKlaviyoBisClick),this.container.addEventListener("submit",this.onFormSubmit),this.variantSelector&&this.updateAddToCart(this.variantSelector.getVariant())}detatchEvents(){this.swatches?.dispose(),this.variantSelector&&!this.swatches&&this.variantSelector.dispose(),this.container.removeEventListener("click",this.onKlaviyoBisClick),this.container.removeEventListener("submit",this.onFormSubmit),this.container.removeEventListener(l.nU,()=>this.onVariantChange())}}var d=i(2159);class h extends HTMLElement{input=null;clearButton=null;resultsContainer=null;debounceTimer=null;initialized=!1;constructor(){super()}connectedCallback(){this.initialized||(this.input=this.querySelector("[data-search-input]"),this.clearButton=this.querySelector("[data-search-clear]"),this.resultsContainer=this.querySelector("[data-search-results-container]"),this.input&&(this.initialized=!0,this.input.addEventListener("input",()=>{this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.onChange(),300)}),this.clearButton?.addEventListener("click",()=>{this.input&&(this.input.value="",this.clearButton?.classList.remove(n.II),this.input.focus(),this.close())})))}onChange(){const t=this.input?.value.trim()||"";this.input?.value?this.clearButton?.classList.add(n.II):this.clearButton?.classList.remove(n.II),t.length?this.getSearchResults(t):this.close()}getSearchResults(t){let e="product";if(this.resultsContainer){const t=this.resultsContainer.querySelectorAll("[data-tab-heading]"),i=Array.from(t).find(t=>t.classList.contains(n.II));"articles"===i?.dataset.tabHeading&&(e="article")}fetch(`/search/suggest?q=${encodeURIComponent(t)}&section_id=predictive-search&resources[type]=query,${e}`).then(t=>{if(!t.ok)throw this.close(),new Error(`${t.status}`);return t.text()}).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html")?.querySelector("#shopify-section-predictive-search")?.innerHTML;e&&this.resultsContainer&&(this.resultsContainer.innerHTML=e,this.open(),this.attachResultsEvents(),(0,d.P)(),this.resultsContainer.querySelectorAll("[data-product-form]").forEach(t=>{new c(t)}))}).catch(t=>{throw this.close(),t})}open(){this.resultsContainer&&0!==this.resultsContainer.children.length&&(this.resultsContainer.classList.add(n.II),this.calculateResultsListHeight())}calculateResultsListHeight(){const t=this.resultsContainer?.querySelector("[data-results-groups-wrapper]");if(!t)return;const e=["[data-header]","[data-promo-banner]","[data-search-input-wrapper]"].reduce((t,e)=>{const i=document.querySelector(e);return t+(i?.offsetHeight??0)},0);t.style.setProperty("--results-groups-height",`calc(100dvh - ${e}px)`)}close(){this.resultsContainer&&(this.resultsContainer.classList.remove(n.II),this.resultsContainer.innerHTML="")}attachResultsEvents(){if(!this.resultsContainer)return;const t=this.resultsContainer.querySelectorAll("[data-tab-heading]"),e=this.resultsContainer.querySelectorAll("[data-tab]");t.forEach(i=>
1{i.addEventListener("click",s=>{s.preventDefault(),t.forEach(t=>t.classList.remove(n.II)),i.classList.add(n.II);const r=i.dataset.tabHeading;r&&(e.forEach(t=>{t.classList.toggle(n.II,t.dataset.tab===r)}),this.onChange())})})}}customElements.define("predictive-search",h)},9588(t,e,i){"use strict";i.d(e,["AQ",0,"is-scroll-disabled","II",0,"is-active","KS",0,"is-menu-open","MJ",0,"is-disabled","Si",0,"is-hidden","YX",0,"is-open","cI",0,"is-menu-hover","fV",0,"is-search-open","uZ",0,"is-visible"])},535(t,e,i){"use strict";function n(){const t=window.ThemeSettings?.globalLowStockThreshold;return"number"==typeof t&&t>=0?Math.floor(t):0}function s(t){const e=n();return!(e<=0)&&(!!t.available&&(!!t.inventory_management&&(t.inventory_quantity??0)<=e))}function r(t){return!t.available}i.d(e,{bq:function(){return n},fI:function(){return r},hg:function(){return s}})},3147(){"use strict"}},i={};function n(t){var s=i[t];if(void 0!==s)return s.exports;var r=i[t]={exports:{}};return e[t].call(r.exports,r,r.exports,n),r.exports}n.m=e,t=[],n.O=function(e,i,s){if(!i){for(var r=0;r<t.length;r++){i=t[r][0],s=t[r][1];for(var o=!0,a=0;a<i.length;a++)n.O.j(i[a])?i.splice(a--,1):o=!1;if(o){t.splice(r--,1);var l=s();void 0!==l&&(e=l)}}return e}t.push([i,s])},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){if(Array.isArray(e))for(var i=0;i<e.length;){var s=e[i++],r=e[i++],o=0===r?{enumerable:!0,value:e[i++]}:{enumerable:!0,get:r};n.o(t,s)||Object.defineProperty(t,s,o)}else for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.j=805,function(){var t={805:0,1049:0};n.O.j=function(e){return 0===t[e]};var e=function(e,i){var s,r,o=i[0],a=i[1],l=i[2],c=0;if(o.some(function(e){return 0!==t[e]})){for(s in a)n.o(a,s)&&(n.m[s]=a[s]);if(l)var d=l(n)}for(e&&e(i);c<o.length;c++)r=o[c],n.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return n.O(d)},i=self.webpackChunkreflect_boilerplate=self.webpackChunkreflect_boilerplate||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))}(),n.O(void 0,[4121],function(){return n(433)});var s=n.O(void 0,[4121],function(){return n(3147)});s=n.O(s)}();

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.