1import{H as c}from"./build.theme.CRghtP-P.js";import{m as u}from"./build.alpinejs.yp8h0A-E.js";import"./build.apollo.B6EQ_Inx.js";import"./build.react.C-3mtOoK.js";import"./build.embla-carousel.DbqMuwPS.js";const r="size",h=".review-link",m="reviews-section",p=90,S=145,f=10,d=100;u.data("pdp",()=>({cleanupFns:[],timeoutIds:[],init(){this.bindVariantEvents(),this.bindReviewLinks(),this.applySizeFromQuery()},destroy(){this.cleanupFns.forEach(e=>e()),this.cleanupFns=[],this.timeoutIds.forEach(e=>window.clearTimeout(e)),this.timeoutIds=[]},bindVariantEvents(){const e=n=>{const s=n.detail;if(!s){this.updateSizeParam(null);return}const a=this.escapeForSelector(String(s));if(!a){this.updateSizeParam(null);return}const o=`input[name="variantId"][value="${a}"]`,i=document.querySelector(o),l=(i==null?void 0:i.dataset.size)??null;if(i!=null&&i.disabled){this.updateSizeParam(null);return}this.updateSizeParam(l??null)};document.addEventListener(c.SELECT_VARIANT,e),this.cleanupFns.push(()=>document.removeEventListener(c.SELECT_VARIANT,e));const t=document.querySelector('input[name="variantId"]:checked');t&&this.updateSizeParam(t.dataset.size??null)},bindReviewLinks(){const e=Array.from(document.querySelectorAll(h));if(!e.length)return;const t=n=>{n.preventDefault(),this.scrollToReviews()};e.forEach(n=>n.addEventListener("click",t)),this.cleanupFns.push(()=>e.forEach(n=>n.removeEventListener("click",t)))},scrollToReviews(){const e=document.getElementById(m);if(!e)return;const{top:t}=e.getBoundingClientRect(),n=t+window.pageYOffset,s=window.innerWidth>=768?p:S;window.scrollTo({top:n-s,behavior:"smooth"})},applySizeFromQuery(){const t=new URLSearchParams(window.location.search).get(r);if(!t)return;const n=this.escapeForSelector(t);if(!n)return;let s=0;const a=()=>{const o=`input[name="variantId"][data-size="${n}"]`,i=document.querySelector(o);if(i){if(i.disabled){this.updateSizeParam(null);return}i.checked||i.click(),this.updateSizeParam(i.dataset.size??null);return}s+=1,s<f?this.schedule(a,d):this.updateSizeParam(null)};this.schedule(a,d)},updateSizeParam(e){if(typeof window>"u")return;const t=new URL(window.location.href),n=t.searchParams.get(r);if(e&&e.length>0){n!==e&&(t.searchParams.set(r,e),window.history.replaceState({},"",`${t.pathname}${t.search}${t.hash}`));return}n&&(t.searchParams.delete(r),window.history.replaceState({},"",`${t.pathname}${t.search}${t.hash}`))},escapeForSelector(e){return e?window.CSS&&typeof window.CSS.escape=="function"?window.CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,"\\$&"):null},schedule(e,t){const n=window.setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(s=>s!==n),e()},t);this.timeoutIds.push(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.