1import{c as s,j as o,r as c}from"./vendor-react-CtiMv8uc.js";import{P as d}from"./algolia-hit-compartment-count-ByRno836.js";import{m,C as f}from"./collection-native-legacy-DHOQvuyw.js";import p from"./CollectionGrid-CIsNv8R9.js";import{C as x}from"./CollectionPagination-BU6T_hv2.js";import{C}from"./CollectionPageContext-CSg-W6A9.js";import"./collection-constants-C-LGf-K9.js";import"./calculations-DNqe_r-a.js";import"./product-card-images-oIoAxZry.js";import"./product-featured-image-CNaxHFYe.js";function j({bootstrap:e,productImageMap:t,variant:r}){const[i,n]=c.useState(!1);c.useLayoutEffect(()=>{const l=m(e);l&&(n(!0),window.location.replace(l))},[e]);const a=c.useMemo(()=>({bootstrap:e,productImageMap:t,variant:r??"master"}),[e,t,r]);return i?null:o.jsx(C.Provider,{value:a,children:o.jsxs(d,{value:t,children:[o.jsx(f,{}),o.jsx(p,{}),o.jsx(x,{})]})})}function O(e){let t=null;return{init(){if(t)return;let r=null;const i=e.querySelector("script[data-collection-state]");if(i)try{r=JSON.parse(i.textContent)}catch(u){console.error("[CollectionMain] Invalid data-collection-state JSON",u)}if(!r){console.error("[CollectionMain] Missing data-collection-state"),t=s(e),t.render(o.jsx("p",{children:"Collection data failed to load."}));return}let n={};const a=e.querySelector("script[data-product-images]");if(a)try{n=JSON.parse(a.textContent)}catch{}const l=e.dataset.variant??"master";t=s(e),t.render(o.jsx(j,{bootstrap:r,productImageMap:n,variant:l}))},destroy(){t==null||t.unmount(),t=null}}}export{O as default};
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.