1(function(){var GATE_SELECTOR="[data-pdp-size-gate]",PRISTINE_CLASS="pdp-size-pristine",ERROR_CLASS="pdp-size-error-shown",ADD_SELECTOR='.pdp_main_product__add, button[name="add"]';function isPristine(gate){return gate.classList.contains(PRISTINE_CLASS)}function errorFor(gate){var scope=gate.closest(".size-option")||gate.parentElement;return scope?scope.querySelector("[data-pdp-size-error]"):null}function setError(gate,on){var error=errorFor(gate);if(error){if(!on){error.textContent="";return}var message=error.getAttribute("data-pdp-size-error-text")||"";if(error.textContent!==message){error.textContent=message;return}error.textContent="";var restore=function(){error.textContent=message};typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(restore):window.setTimeout(restore,16)}}function clearGate(gate){isPristine(gate)&&(gate.classList.remove(PRISTINE_CLASS),gate.classList.remove(ERROR_CLASS),gate.removeAttribute("aria-invalid"),setError(gate,!1))}function showError(gate){gate.classList.add(ERROR_CLASS),gate.setAttribute("aria-invalid","true"),setError(gate,!0)}function blockingGate(form){var gate=form?form.querySelector(GATE_SELECTOR):document.querySelector(GATE_SELECTOR);return!gate||!isPristine(gate)?null:gate.querySelectorAll('input[type="radio"]').length>1?gate:null}function reopenGate(gate){gate.classList.add(PRISTINE_CLASS),gate.classList.remove(ERROR_CLASS),gate.removeAttribute("aria-invalid"),setError(gate,!1)}var WAS_CHECKED_ATTR="data-pdp-was-checked";function onGestureStart(event){var target=event.target;if(!(!target||!target.closest)){var gate=target.closest(GATE_SELECTOR);if(gate){gate.pdpClickHandled=!1;for(var radios=gate.querySelectorAll('input[type="radio"]'),i=0;i<radios.length;i++)radios[i].setAttribute(WAS_CHECKED_ATTR,radios[i].checked?"true":"false")}}}function onSelection(event){var target=event.target;if(!(!target||!target.closest)){var label=target.closest(GATE_SELECTOR+" label");if(!(label&&label.classList.contains("pdp-size-unavailable"))){var radio=target.closest(GATE_SELECTOR+' input[type="radio"]');if(!(radio&&radio.disabled)){var gate=target.closest(GATE_SELECTOR);if(gate){if(event.type==="click"){if(gate.pdpClickHandled)return;if(gate.pdpClickHandled=!0,!isPristine(gate)){var control=radio||(label?label.control||label.querySelector('input[type="radio"]'):null),wasChecked=radio?radio.getAttribute(WAS_CHECKED_ATTR)==="true":!!(control&&control.checked);if(control&&!control.disabled&&wasChecked){event.preventDefault(),reopenGate(gate);return}}}clearGate(gate)}}}}}function dispatch(node,name){var event;try{event=new CustomEvent(name,{bubbles:!0})}catch(error){event=document.createEvent("CustomEvent"),event.initCustomEvent(name,!0,!1,null)}node.dispatchEvent(event)}function block(event,gate){event.preventDefault(),event.stopPropagation(),showError(gate),dispatch(gate,"pdp:add-blocked");var firstOption=gate.querySelector('input[type="radio"]:not([disabled])');firstOption&&firstOption.focus()}function guardAddClick(event){var target=event.target;if(!(!target||!target.closest)){var add=target.closest(ADD_SELECTOR);if(!(!add||add.disabled)){var gate=blockingGate(add.closest("form"));gate&&block(event,gate)}}}function guardSubmit(event){var form=event.target;if(!(!form||!form.matches||!form.matches("form.product__form"))){var gate=blockingGate(form);gate&&block(event,gate)}}function initReviewsJump(){var trigger=document.querySelector("[data-pdp-reviews-jump]");if(!trigger)return;function findReviewsSection(){var byId=document.querySelector('.shopify-section[id$="__reviews"]');if(byId)return byId;var shell=document.querySelector(".pdp-reviews-shell");return shell?shell.closest(".shopify-section"):null}if(!findReviewsSection()){trigger.style.display="none";return}trigger.addEventListener("click",function(){var section=findReviewsSection();if(section){var heading=section.querySelector(".pdp-accordion-heading");heading&&heading.getAttribute("aria-expanded")==="false"&&heading.click();var header=document.querySelector(".site-header-section"),offset=header?Math.round(header.getBoundingClientRect().height):0,top=section.getBoundingClientRect().top+window.pageYOffset-offset-12;window.scrollTo({top:top,behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})}})}var ATB_SELECTOR=".pdp_main_product__add",ATB_PRESSED_MS=180,ATB_LOADING_MIN_MS=400,ATB_ADDED_MS=2e3,ATB_FAILSAFE_MS=5e3;function launchAtbDot(button){if(!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)){for(var bag=null,candidates=document.querySelectorAll(".bag-icon, .shd__bag, .shm__bag"),c=0;c<candidates.length;c++){var rect=candidates[c].getBoundingClientRect();if(rect.width>0&&rect.height>0){bag=candidates[c];break}}if(bag){var dot=document.createElement("span");if(dot.className="pdp-atb-dot",typeof dot.animate=="function"){var from=button.getBoundingClientRect(),to=bag.getBoundingClientRect(),x0=from.left+from.width/2-5,y0=from.top+from.height/2-5,x1=to.left+to.width/2-5,y1=to.top+to.height/2-5;document.body.appendChild(dot);for(var dx=x1-x0,dy=y1-y0,distance=Math.sqrt(dx*dx+dy*dy),lift=Math.min(48,distance*.12),cx=(x0+x1)/2,cy=(y0+y1)/2-lift,STEPS=25,frames=[],s=0;s<=STEPS;s++){var t=s/STEPS,inverse=1-t,px=inverse*inverse*x0+2*inverse*t*cx+t*t*x1,py=inverse*inverse*y0+2*inverse*t*cy+t*t*y1;frames.push({transform:"translate3d("+px.toFixed(1)+"px,"+py.toFixed(1)+"px,0) scale("+(1-.6*t).toFixed(3)+")",opacity:t<.75?1:Math.max(0,1-(t-.75)/.25)})}var animation=dot.animate(frames,{duration:1150,easing:"cubic-bezier(0.35, 0.1, 0.25, 1)"}),cleanup=function(){dot.parentNode&&dot.parentNode.removeChild(dot)};animation.onfinish=cleanup,animation.oncancel=cleanup,setTimeout(cleanup,1800)}}}}function initAtbFeedback(){var active=null;function start(button){var entry={timers:[],done:!1,startedAt:Date.now()};active=entry;var countObserver=null;function finish(){if(!entry.done){entry.done=!0;for(var i=0;i<entry.timers.length;i++)clearTimeout(entry.timers[i]);document.removeEventListener("cart:rendered",onSuccessSignal),countObserver&&countObserver.disconnect(),button.classList.remove("pdp-atb--pressed","pdp-atb--loading","pdp-atb--added"),active=null}}function showAdded(){entry.done||(button.classList.remove("pdp-atb--pressed","pdp-atb--loading"),button.classList.add("pdp-atb--added"),entry.timers.push(setTimeout(finish,ATB_ADDED_MS)))}var signalled=!1;function onSuccessSignal(){if(!(signalled||entry.done)){signalled=!0,document.removeEventListener("cart:rendered",onSuccessSignal),countObserver&&countObserver.disconnect();var elapsed=Date.now()-entry.startedAt,wait=Math.max(0,ATB_PRESSED_MS+ATB_LOADING_MIN_MS-elapsed);entry.timers.push(setTimeout(showAdded,wait))}}if(document.addEventListener("cart:rendered",onSuccessSignal),typeof window.MutationObserver=="function"){var counts=document.querySelectorAll(".shm__bag-count");if(counts.length){for(var baseline=[],n=0;n<counts.length;n++)baseline.push(counts[n].textContent);countObserver=new MutationObserver(function(){for(var m=0;m<counts.length;m++)if(counts[m].textContent!==baseline[m]){onSuccessSignal();return}});for(var o=0;o<counts.length;o++)countObserver.observe(counts[o],{childList:!0,characterData:!0,subtree:!0})}}button.classList.add("pdp-atb--pressed"),entry.timers.push(setTimeout(function(){entry.done||button.classList.contains("pdp-atb--added")||(button.classList.remove("pdp-atb--pressed"),button.classList.add("pdp-atb--loading"))},ATB_PRESSED_MS)),entry.timers.push(setTimeout(finish,ATB_FAILSAFE_MS))}document.addEventListener("click",function(event){var target=event.target;if(!(!target||!target.closest)){var button=target.closest(ATB_SELECTOR);!button||button.disabled||active||(launchAtbDot(button),button.querySelector(".pdp-atb__spinner")&&start(button))}})}var CHROME_SELECTOR=".site-header-section, #shopify-section-header, [data-shm-chrome]",chromeBottom=0,chromeListeners=[];function measureChromeBottom(){for(var chrome=document.querySelectorAll(CHROME_SELECTOR),bottom=0,i=0;i<chrome.length;i++){var rect=chrome[i].getBoundingClientRect();rect.height>0&&rect.top<=1&&rect.bottom>bottom&&(bottom=rect.bottom)}return Math.round(bottom)}function initStickyOffset(){if(!document.querySelector(".pdp-layout"))return;var GAP=16,last=null,queued=!1;function measure(){queued=!1;var bottom=measureChromeBottom(),top=bottom+GAP;if(top!==last){last=top,document.documentElement.style.setProperty("--pdp-sticky-top",top+"px"),chromeBottom=bottom;for(var i=0;i<chromeListeners.length;i++)chromeListeners[i](bottom)}}function queue(){queued||(queued=!0,window.requestAnimationFrame(measure))}measure(),window.addEventListener("scroll",queue,{passive:!0}),window.addEventListener("resize",queue),window.addEventListener("load",queue),document.addEventListener("header:metrics-updated",queue)}
1function initStickyBuyBar(){var row=document.querySelector(".pdp-layout-v2 .pdp-product-form-add-to-cart-section");if(!row||!row.parentNode||!("IntersectionObserver"in window))return;var FLOAT_CLASS="pdp-atb-sticky--floating",BODY_CLASS="pdp-atb-sticky-active",mobile=window.matchMedia("(max-width: 767px)"),placeholder=null,sentinel=document.createElement("div");sentinel.className="pdp-atb-sticky__sentinel",sentinel.setAttribute("aria-hidden","true"),row.parentNode.insertBefore(sentinel,row.nextSibling);function publishHeight(){document.documentElement.style.setProperty("--pdp-atb-sticky-height",Math.round(row.getBoundingClientRect().height)+"px")}var HIDDEN_CLASS="pdp-atb-sticky--hidden",rowGone=!1,footerVisible=!1;function floatRow(){if(!placeholder){var height=row.getBoundingClientRect().height;placeholder=document.createElement("div"),placeholder.className="pdp-atb-sticky__placeholder",placeholder.setAttribute("aria-hidden","true"),placeholder.style.height=height+"px",row.parentNode.insertBefore(placeholder,row),row.classList.add(FLOAT_CLASS),publishHeight()}}function unfloatRow(){placeholder&&(row.classList.remove(FLOAT_CLASS),row.classList.remove(HIDDEN_CLASS),document.body.classList.remove(BODY_CLASS),placeholder.parentNode.removeChild(placeholder),placeholder=null)}function setHidden(hidden){row.classList.toggle(HIDDEN_CLASS,hidden),document.body.classList.toggle(BODY_CLASS,!hidden)}function apply(){if(!mobile.matches||!rowGone){unfloatRow();return}floatRow(),setHidden(footerVisible)}function evaluate(entry){var edge=entry.rootBounds?entry.rootBounds.top:0;rowGone=!entry.isIntersecting&&entry.boundingClientRect.top<edge,apply()}var observer=null;function buildObserver(){observer&&observer.disconnect(),observer=new IntersectionObserver(function(entries){evaluate(entries[entries.length-1])},{threshold:0,rootMargin:"-"+chromeBottom+"px 0px 0px 0px"}),observer.observe(sentinel)}buildObserver(),chromeListeners.push(function(){buildObserver()});var footer=document.getElementById("shopify-section-footer")||document.querySelector("footer");footer&&new IntersectionObserver(function(entries){footerVisible=entries[entries.length-1].isIntersecting,apply()},{threshold:0}).observe(footer),mobile.addEventListener("change",function(){apply(),buildObserver()}),window.addEventListener("resize",function(){placeholder&&publishHeight()})}function init(){initStickyOffset(),initReviewsJump(),initAtbFeedback(),initStickyBuyBar(),document.querySelector(GATE_SELECTOR)&&(document.addEventListener("click",guardAddClick,!0),document.addEventListener("submit",guardSubmit,!0),document.addEventListener("pointerdown",onGestureStart,!0),document.addEventListener("keydown",onGestureStart,!0),document.addEventListener("change",onSelection),document.addEventListener("click",onSelection))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})(); 2//# sourceMappingURL=/cdn/shop/t/811/assets/pdp.js.map?v=28158254292812625711789977862
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.