1import{h as a,a3 as f,at as y,G as P}from"./BdEtjDPP.js";import{r as $}from"./BIaCPJ4S.js";function C(){const{SecureOFetch:p}=a(),_=$({tab:0}),h=e=>{var o,i,u;let n=(o=e.product_ids)==null?void 0:o.join(","),r=[];(i=e.collection_ids)==null||i.forEach(s=>{r.push(`${s}_${e.records}`)}),r=r.join(",");let t=[];return(u=e.category_ids)==null||u.forEach(s=>{t.push(`${s}_${e.records}`)}),{key:`product-listing-${r}_${t}_${n}`,_collection_ids:r,_category_ids:t,_product_ids:n}};return{state:_,fetchProductSection:async e=>{const{key:n}=h(e);return await f(n,()=>{const{_collection_ids:t,_category_ids:c,_product_ids:o}=h(e);return p("/Section/GetProductSectionItems",{params:{CollectionIDs:t||"0",CategoryIDs:c||"0",ProductIDs:o||"0"},method:"GET"})},{transform(t){var u,s,g;let c=(u=t==null?void 0:t.data)==null?void 0:u.collections,o=(s=t==null?void 0:t.data)==null?void 0:s.categories,i=(g=t==null?void 0:t.data)==null?void 0:g.products;return e.group&&e.group>0&&(c&&c.length&&(c=c.map(d=>{let l=y(d.products,e.group);return{...d,products:l}})),o&&o.length&&(o=o.map(d=>{let l=y(d.products,e.group);return{...d,products:l}}))),{collections:c,categories:o,products:i}},watch:[e],server:!0,dedupe:"defer"})},fetRelatedProducts:e=>f(`related-products-${e}`,()=>p("/Product/GetRelatedProducts",{params:{ProductID:e},method:"GET"}),{getCachedData:P,server:!1,lazy:!0,dedupe:"cancel"}),changeTab:e=>{_.tab=e}}}export{C as u};
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.