PageSourceSearch

https://bondisands.co.uk/cdn/shop/t/217/assets/sections.product-carousel.js?v=104168477964765694011789690536

js bondisands.co.uk collected 2026-09-26 13:42:15 UTC 37,003 bytes, 1 lines download raw bytes

1!function(){"use strict";var t,e={7759(t,e,i){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);var s=i(4313);i(576);const n="heading";function r(t){const e=t.popper;if(!e)return;const i=e.querySelector(".tippy-box"),s=e.querySelector(".tippy-content");i&&(i.setAttribute("data-state","visible"),i.style.opacity="1",i.style.visibility="visible"),s&&(s.setAttribute("data-state","visible"),s.style.opacity="1",s.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[n]?`\n        <h5 class="o-tooltip__heading o-type--2">\n          ${t.dataset[n]}\n        </h5>\n      `:""}\n      <p class="o-tooltip__content o-type--3">\n        ${t.dataset.tooltip}\n      </p>\n    `;(0,s.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);const l="data-section-initialized";class c{static registrations={};static register(t,e){const i=[];return document.querySelectorAll(t).forEach(s=>{if(c.isRegistered(s))return;const n=new e(s,t);i.push(n),n.queryChildren(s),n.init(),n.attachEvents(s)}),this.registrations[t]=e,i}static recheck(t){const e=this.registrations[t];return e?c.register(t,e):[]}static isRegistered(t){return t.hasAttribute(l)}constructor(t,e){if(this.container=t,this.selector=e,this.container.setAttribute(l,"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(l),this.detatchEvents(this.container),this.container.innerHTML=t.innerHTML,this.container.setAttribute(l,"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,s=[];i.removedNodes.forEach(t=>s.push(t));-1!==s.findIndex(t=>t===this.shopifyContainer)&&(console.log("Section",this.id,"reloaded."),this.dispose(),c.recheck(this.selector))};dispose(){this.container.removeAttribute(l),this.detatchEvents(this.container),this.innerHtmlObserver&&this.innerHtmlObserver.disconnect()}}const h="is-active",d="is-hidden",u="is-disabled",p="data-categories-ready";class g{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(h)&&(this.activeIndex=e)}),this.updateProgressBar(),this.updatePillPosition(),this.updateOverflowClass(),this.attachEvents(),this.container.removeAttribute(p),requestAnimationFrame(()=>{this.container.setAttribute(p,"")})}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(h),i.setAttribute("aria-selected","false")}),i.classList.add(h),i.setAttribute("aria-selected","true"),this.activeIndex=t,this.updatePillPosition();const s=i.getAttribute("data-category-id");s&&this.onCategoryChange&&this.onCategoryChange(s,t)}getActiveCategoryId(){const t=Array.from(this.categoryButtons).find(t=>t.classList.contains(h));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(h));if(!t)return;const e=window.getComputedStyle(this.categoriesScroll),i=Number.parseFloat(e.paddingLeft||"0")||0,s=t.offsetLeft-i,n=t.offsetWidth;this.pill.style.width=`${n}px`,this.pill.style.transform=`translate3d(${s}px, 0, 0)`}updateProgressBar(){if(!this.categoriesScroll||!this.progressBar||!this.progress)return;const t=this.categoriesScroll,e=t.scrollWidth,i=t.clientWidth,s=t.scrollLeft,n=e-i;if(n<=0)this.progress.classList.add(d),this.progressBar.style.width="0%";else{this.progress.classList.remove(d);const t=8+s/n*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 v={xxsmall:"375px",xsmall:"480px",small:"750px",medium:"1100px",large:"1350px",xlarge:"1750px",xxlarge:"2000px"},b=Object.entries(v).reduce((t,e)=>{const[i,s]=e;return t[i]=parseInt(s),t},{}),m={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 f{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={...m,...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 g(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(t="medium",window.innerWidth>=b[t]&&!this.options.desktopProgress)return this.progressContainer.classList.add(d),void(this.progressBar.style.width="0%");var t;const e=this.scrollContainer.scrollWidth,i=this.scrollContainer.clientWidth,s=this.scrollContainer.scrollLeft,n=e-i;if(n<=0)this.progressContainer.classList.add(d),this.progressBar.style.width="0%";else{this.progressContainer.classList.remove(d);const t=8+s/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,s=t-e;s<=1?(this.scrollContainer.classList.add("is-all-visible"),this.prevButton.classList.add(d),this.nextButton.classList.add(d),this.prevButton.disabled=!0,this.nextButton.disabled=!0):(this.scrollContainer.classList.remove("is-all-visible"),this.prevButton.classList.remove(d),this.nextButton.classList.remove(d),i<=1?(this.prevButton.disabled=!0,this.prevButton.classList.add(u)):(this.prevButton.disabled=!1,this.prevButton.classList.remove(u)),i>=s-1?(this.nextButton.disabled=!0,this.nextButton.classList.add(u)):(this.nextButton.disabled=!1,this.nextButton.classList.remove(u))),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)}}var y=i(7367);function S(){const t=window.ThemeSettings?.globalLowStockThreshold;return"number"==typeof t&&t>=0?Math.floor(t):0}function C(t){const e=S();return!(e<=0)&&(!!t.available&&(!!t.inventory_management&&(t.inventory_quantity??0)<=e))}const w="onVariantChange";class L extends CustomEvent{}class A{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,y.variantFirstAvailableOrDefault)({variants:this.data.variants}).id?(0,y.queryReplaceParam)("variant",null):(0,y.queryReplaceParam)("variant",t.toString())),this.onVariantSelected();const i=this.getVariant(),s=new L(w,{bubbles:!0,cancelable:!1,detail:{oldVariant:e,newVariant:i,variantSelector:this}});this.variantSelector.dispatchEvent(s)}getOptionValues(){const t={};
1return this.data.options.forEach(e=>t[e]=[]),this.data.variants.forEach(e=>{e.options.forEach((e,i)=>{const s=this.data.options[i];t[s]&&-1===t[s].indexOf(e)&&t[s].push(e)})}),t}setVariantOption(t,e){this.getOptionValues();const i=this.getVariant(),s=[];for(let n=0;n<this.data.options.length;n++){let r;r=n===t?e:i.options[n],s.push(r)}const n=this.data.variants.find(t=>t.options.every((t,e)=>e>=this.data.options.length||s[e]===t));if(!n){const i=this.data.options[t],n=this.data.options_with_values?.find(t=>t.name===i);if(!n)return null;const r=n.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}`,s[i])}),window.location.href=o.toString(),null}return this.setVariantId(n.id),n}onInputChanged=t=>{this.setVariantId(parseInt(this.variantSelector.value))};onVariantSelected(){}dispose(){this.variantSelector.removeEventListener("change",this.onInputChanged)}}const P="[data-swatch]",E="[data-swatch-object]",q="[data-swatch-dropdown]",x="data-swatch-position",B="data-value",T="is-selected";class D extends A{infoWraps=null;swatchObjects=null;constructor(t,e){super(t,e),this.swatches=Array.from(t.querySelectorAll(P).values()),this.infoWraps=this.container.querySelectorAll("[data-swatch-shade-info]"),this.swatchObjects=this.container.querySelectorAll(E),this.swatchObjects.forEach(t=>{t.addEventListener("click",this.onSwatchClick)}),this.container.querySelectorAll(q).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(P);if(!i)return;const s=parseInt(i.getAttribute(x)||""),n=e.getAttribute(B);!isNaN(s)&&n&&this.setVariantOption(s-1,n)};onSwatchEnter=t=>{const e=t.currentTarget.getAttribute(B);this.infoWraps?.forEach(t=>{const i=t.getAttribute(B);t.classList.toggle(T,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(P);if(!i)return;const s=parseInt(i.getAttribute(x)||"");isNaN(s)||this.setVariantOption(s-1,e.value)};onVariantSelected(){const t=this.getVariant();this.swatches.forEach(e=>{const i=parseInt(e.getAttribute(x)||"");if(isNaN(i))return;const s=t.options[i-1];e.querySelectorAll(E).forEach(t=>{if(t.getAttribute(B)===s){t.classList.add(T);let e=t.parentElement;e&&e.classList.add(T)}else{t.classList.remove(T);let e=t.parentElement;e&&e.classList.remove(T)}});e.querySelectorAll(q).forEach(t=>t.value=s),e.querySelectorAll("[data-swatch-value]").forEach(t=>{t.textContent=s})})}dispose(){super.dispose(),this.container.querySelectorAll(E).forEach(t=>{t.removeEventListener("click",this.onSwatchClick)}),this.container.querySelectorAll(q).forEach(t=>{t.removeEventListener("change",this.onDropdownChange)})}}const k="is-disabled",I=document.createElement("template");
1I.innerHTML="\n  <slot></slot>\n";class M 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(I.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,y.cartChange)({quantity:this.value,id:this.line})}catch(t){console.warn(t)}const t=new M("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);class N{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,y.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:s,price:n,compare_at_price:r}=t,o=(0,y.cartGetQuantityOfVariant)(t.id);if(this.qtySelector){if("shopify"===e&&"deny"===i){const t=s??0,e=t-o,i=S();this.qtySelector.max=i>0&&t<=i?0:i>0?Math.max(0,e-i):e}else this.qtySelector.max=null;this.qtySelector.disabled=C(t)}this.updatePriceElements(n,r),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,y.printMoney)(t)),this.compare&&this.compare.forEach(t=>t.innerText=i?(0,y.printMoney)(e):"")}updateAddToCart(t){if(!this.btnAdd)return;const e=(0,y.cartGetQuantityOfVariant)(t.id),{available:i,inventory_policy:s,inventory_management:n,inventory_quantity:r}=t;if(this.setNotifyCtaVisible(function(t){return!t.available}(t)),!i)return void this.btnSoldOut();"continue"!==s&&null!=n&&(r||0)-e<=0?this.btnAllInCart():C(t)?this.btnSoldOut():this.btnAvailable()}setNotifyCtaVisible(t){this.klaviyoBis&&(this.klaviyoBis.hidden=!t)}btnAvailable(){this.btnAdd&&(this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,y.t)("products.product.add_to_cart")):this.btnAdd.classList.contains("is-bundle-add")?this.btnAdd.innerHTML=(0,y.t)("products.product.bundle_add_to_cart"):this.btnAdd.innerHTML=(0,y.t)("products.product.add_to_cart"),this.btnAdd.classList.remove(u),this.btnAdd.disabled=!1)}btnAllInCart(){this.btnAdd&&(this.btnAdd.classList.add(u),this.btnAdd.setAttribute(k,k),this.btnAdd.disabled=!0,this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,y.t)("products.product.all_in_cart")):this.btnAdd.innerHTML=(0,y.t)("products.product.all_in_cart"))}btnSoldOut(){this.btnAdd&&(this.btnAdd.classList.add(u),this.btnAdd.setAttribute(k,k),this.btnAdd.disabled=!0,this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,y.t)("products.product.sold_out")):this.btnAdd.innerHTML=(0,y.t)("products.product.sold_out"))}btnAdded(){this.btnAdd&&(this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,y.t)("products.product.added_to_cart")):this.btnAdd.innerHTML=(0,y.t)("products.product.added_to_cart"),this.btnAdd.classList.remove(u),this.btnAdd.disabled=!1)}btnPending(){this.btnAdd&&(this.isIconButton()?this.btnAdd.setAttribute("aria-label",(0,y.t)("products.product.cart_pending")):this.btnAdd.innerText=(0,y.t)("products.product.cart_pending"),this.btnAdd.disabled=!0)}isIconButton(){return!!this.btnAdd&&null!==this.btnAdd.querySelector("svg")}attachEvents(){this.container.querySelector("[data-swatches]")?(this.swatches=new D(this.container,!0),this.variantSelector=this.swatches):this.variantSelector=new A(this.container,!0),this.container.addEventListener(w,()=>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(w,()=>this.onVariantChange())}}const _="data-product-thumbnail-initialized";class V{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 s=t.getBoundingClientRect();return e>=s.left&&e<=s.right&&i>=s.top&&i<=s.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=()=>
1{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 z=()=>{document.querySelectorAll("[data-product-thumbnail]").forEach(t=>{if(t.hasAttribute(_))return;t.setAttribute(_,""),new V(t);const e=t.querySelector("[data-thumbnail-combined-shades]");e&&(new D(e,!1),e.addEventListener(w,()=>{const i=e.querySelector('input[name="id"]');if(!i)return;const s=i.value;t.querySelectorAll("form[data-product-form]").forEach(t=>{const e=t.querySelector('input[name="id"]');e&&(e.value=s)})}))})};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",z):z();const U="data-transition-in",W="data-transition-out",F="data-fade-in",H="data-fade-out",R="data-measuring",j="data-transitioning",X="--carousel-wrapper-height";c.register("[data-product-carousel]",class extends c{categories=null;categoriesComponent=null;carouselInstances=new Map;productForms=[];fadeTimeout=null;productsWrapper=null;queryChildren(t){this.productsWrapper=t.querySelector("[data-carousel-panels-wrapper]"),this.categories=t.querySelectorAll("[data-product-carousel-category][data-category-id]");const e=t.querySelector("[data-categories]");e&&(this.categoriesComponent=new g(e,(t,e)=>{this.switchCategory(t)})),this.initializeCarousels(t),this.initializeProductForms(t),z()}attachEvents(t){}initializeCarousels(t){t.querySelectorAll("[data-carousel-container]").forEach(t=>{const e=t.closest("[data-product-carousel-category]");if(!e)return;const i=e.getAttribute("data-category-id");if(!i)return;const s=new f(t,{enableProgress:!0,enableNavigation:!0,enableCategories:!1,scrollStep:300,enablePointerDrag:!0});this.carouselInstances.set(i,s)})}switchCategory(t){if(!this.categories)return;const e=Array.from(this.categories).find(e=>e.getAttribute("data-category-id")===t);if(e){const i=Array.from(this.categories).find(t=>t.classList.contains(h))||null;if(i===e)return;this.fadeTimeout&&(window.clearTimeout(this.fadeTimeout),this.fadeTimeout=null);const s="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(this.categories.forEach(t=>{t!==i&&t!==e&&(t.classList.remove(h),this.resetCategoryState(t))}),s||!i)this.categories.forEach(t=>{t.classList.toggle(h,t===e),this.resetCategoryState(t)}),requestAnimationFrame(()=>this.syncCategoryCarouselUiState(e));else{const t=this.productsWrapper,s=t?t.offsetHeight:0;e.classList.add(h),e.setAttribute(R,"");const n=e.offsetHeight;e.removeAttribute(R),i.setAttribute(W,""),e.setAttribute(U,""),e.removeAttribute(F),i.removeAttribute(H),this.syncCategoryCarouselUiState(e),t&&s>0&&(t.setAttribute(j,""),t.style.setProperty(X,`${s}px`)),e.getBoundingClientRect(),requestAnimationFrame(()=>{t&&n>0&&t.style.setProperty(X,`${n}px`),i.setAttribute(H,""),e.setAttribute(F,"")}),this.fadeTimeout=window.setTimeout(()=>{i.classList.remove(h),this.resetCategoryState(i),this.resetCategoryState(e),t&&(t.removeAttribute(j),t.style.removeProperty(X))},300)}this.carouselInstances.get(t)&&setTimeout(()=>{const t=e.querySelector("[data-carousel-scroll]");t&&t.dispatchEvent(new Event("scroll"))},50)}else console.warn("ProductCarousel: Category not found",t,"Available categories:",Array.from(this.categories).map(t=>t.getAttribute("data-category-id")))}syncCategoryCarouselUiState(t){const e=t.querySelector("[data-carousel-scroll]"),i=t.querySelector("[data-carousel-prev]"),s=t.querySelector("[data-carousel-next]");if(!e||!i||!s)return;const n=e.scrollWidth,r=e.clientWidth,o=e.scrollLeft,a=n-r;if(0!==r){if(a<=1)return e.classList.add("is-all-visible"),i.classList.add(d),s.classList.add(d),i.disabled=!0,s.disabled=!0,i.classList.add(u),void s.classList.add(u);e.classList.remove("is-all-visible"),i.classList.remove(d),s.classList.remove(d),o<=1?(i.disabled=!0,i.classList.add(u)):(i.disabled=!1,i.classList.remove(u)),o>=a-1?(s.disabled=!0,s.classList.add(u)):(s.disabled=!1,s.classList.remove(u))}else requestAnimationFrame(()=>this.syncCategoryCarouselUiState(t))}resetCategoryState(t){t.removeAttribute(U),t.removeAttribute(W),t.removeAttribute(F),t.removeAttribute(H),t.removeAttribute(R)}initializeProductForms(t){t.querySelectorAll("[data-product-form]").forEach(t=>{const e=new N(t);this.productForms.push(e)})}detatchEvents(){this.fadeTimeout&&(window.clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.carouselInstances.forEac
1h(t=>{t.dispose()}),this.carouselInstances.clear(),this.productForms.forEach(t=>{t.detatchEvents()}),this.productForms=[],this.categoriesComponent&&(this.categoriesComponent.dispose(),this.categoriesComponent=null)}})},19(){}},i={};function s(t){var n=i[t];if(void 0!==n)return n.exports;var r=i[t]={exports:{}};return e[t].call(r.exports,r,r.exports,s),r.exports}s.m=e,t=[],s.O=function(e,i,n){if(!i){for(var r=0;r<t.length;r++){i=t[r][0],n=t[r][1];for(var o=!0,a=0;a<i.length;a++)s.O.j(i[a])?i.splice(a--,1):o=!1;if(o){t.splice(r--,1);var l=n();void 0!==l&&(e=l)}}return e}t.push([i,n])},s.d=function(t,e){for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.j=5903,function(){var t={5903:0};s.O.j=function(e){return 0===t[e]};var e=function(e,i){var n,r,o=i[0],a=i[1],l=i[2],c=0;if(o.some(function(e){return 0!==t[e]})){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);if(l)var h=l(s)}for(e&&e(i);c<o.length;c++)r=o[c],s.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return s.O(h)},i=self.webpackChunkreflect_boilerplate=self.webpackChunkreflect_boilerplate||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))}(),s.O(void 0,[4121],function(){return s(7759)});var n=s.O(void 0,[4121],function(){return s(19)});n=s.O(n)}();

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.