1import{G as r}from"./GalleryView.D6FoS5H2.chunk.min.js";import{P as c}from"./Paginate.7BU9iJlD.chunk.min.js";import{P as n}from"./ProductTile.Bb0v617e.chunk.min.js";import{b as s}from"./Factory.DtF0z2Mo.chunk.min.js";import{b as l}from"./analytics.BRpKoWry.chunk.min.js";import{S as a}from"./SearchSection.2kjOG0_v.chunk.min.js";import{S as d}from"./ShopBySlider.B5DHwGiz.chunk.min.js";import{W as p}from"./WishlistModal.C1sOVNQu.chunk.min.js";import"./focus-trap.esm.DB7ZyUfP.chunk.min.js";import"./vue.esm.CU4NPk8R.chunk.min.js";import"./preload-helper.C1FmrZbK.chunk.min.js";import"./customElements.CVxHRH-p.chunk.min.js";import"./LanguageBadge.CFHlhb1i.chunk.min.js";import"./ProductForm.CZzjLIHM.chunk.min.js";import"./GiftCardModal.Dgfm5KZb.chunk.min.js";import"./handleFocus.DpBiQh6s.chunk.min.js";import"./index.browser.esm.C0udjIMG.chunk.min.js";import"./cartStore.UjSR_pbU.chunk.min.js";import"./ShopifyApi.CAemAGdE.chunk.min.js";import"./breakpoints.B4Zc9sYF.chunk.min.js";import"./debounce.B2rXDlNW.chunk.min.js";import"./WishlistButton.CatNYPgT.chunk.min.js";import"./Repository.C9Ww5KhN.chunk.min.js";import"./animationObserver.BmJzsoRD.chunk.min.js";import"./buildFilterQuery.BHu55EaZ.chunk.min.js";import"./SearchForm.JyY5W3Z6.chunk.min.js";import"./index.Cs9MTHPS.chunk.min.js";import"./index.BH8shDJx.chunk.min.js";import"./Factory.tC86j6Io.chunk.min.js";const h={components:{ProductTile:n,Paginate:c},props:{collectionHandle:String,limit:Number},data(){return{collection:s.create({handle:this.collectionHandle}),isLoading:!1,page:1,products:[],isIntersecting:!1,productListingObserver:null}},watch:{page(){this.load()},isProductListingInView(){this.isProductListingInView&&(l.trackEvent("view_item_list",{title:this.collection.title,handle:this.collection.handle,products:this.products.splice(0,this.limit)}),this.productListingObserver.unobserve(this.$refs.productListing))}},methods:{async load(){this.isLoading=!0;try{const t=await s.load(this.collection,{handle:this.collectionHandle,limit:this.limit,page:this.page});this.collection.products_count=t.products_count,this.collection.title=t.title,t.products.forEach(e=>{e.selected_variant=e.selected_or_first_available_variant}),this.products.splice((this.page-1)*this.limit,this.limit,...t.products)}catch(t){window.console.warn(t)}this.isLoading=!1,this.$nextTick(()=>this.productListingObserverForAnalytics())},productListingObserverForAnalytics(){this.productListingObserver=new IntersectionObserver(t=>{t.forEach(e=>{this.isIntersecting=e.isIntersecting})},{threshold:.5}),this.productListingObserver.observe(this.$refs.productListing)}},computed:{isProductListingInView(){return this.isIntersecting&&this.products.length>0}},mounted(){const t={rootMargin:"0px",threshold:.5},e=new IntersectionObserver(i=>{i.forEach(o=>{o.isIntersecting&&(this.load(),e.unobserve(o.target))})},t);e.observe(document.getElementById(this.collectionHandle))}},{routes:{collectionsUrl:m}}=window.theme,j={name:"collection-page",components:{ProductListingShopAll:h,WishlistModal:p,ShopBySlider:d,GalleryView:r,SearchSection:a},data(){return{wishlistActiveModal:!1,selectedCollection:""}},mounted(){this.getPreSelectedCategory()},methods:{toggleWishlistModal(){const t=new CustomEvent("openWishlistModal");document.dispatchEvent(t)},selectCollection(t){this.selectedCollection=t},setUrlParams(t){setTimeout(()=>{t!==""?(window.history.replaceState({},"",`?category=${t}`),this.getPreSelectedCategory()):window.history.replaceState({},"",`${m}`)},100)},getPreSelectedCategory(){const t=window.location.href.split("?")[1],e=new URLSearchParams(t);if(e.has("category")){const i=e.get("category");setTimeout(()=>{this.selectedCollection=this.$refs[i].getAttribute("data-collection")},50)}}}};export{j 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.