1import{_ as q}from"./_plugin-vue_export-helper.c27b6911.js";import{a as F,q as k,x as Q,y as $,O as V,u as x,z as B,B as G,R as K,U as z}from"./swiper-vue.1b2a8b42.js";import{f as P}from"./entry.7d939621.js";import{u as U,a as _}from"./axios.93df6217.js";const J=t=>(K("data-v-ddfb645b"),t=t(),z(),t),M=["textContent"],W=J(()=>$("div",{class:"icon"},null,-1)),X={__name:"Accordion",props:{title:String,preExpanded:{type:Boolean,default:()=>!1}},setup(t){const{title:o,preExpanded:e}=t,r=F(!1);return e&&(r.value=!0),(i,d)=>(k(),Q("div",{class:B(["accordion border-b border-solid border-black",x(r)&&"is-expanded"])},[$("button",{onClick:d[0]||(d[0]=g=>r.value=!x(r)),class:"flex w-full items-center justify-between text-body-large py-4"},[$("span",{class:"text-left mb-0",textContent:V(t.title)},null,8,M),W]),$("div",{class:B(["opacity-0 text-body-small",x(r)?"h-auto opacity-100 py-4":"h-0"])},[$("div",{class:B(x(r)?"block":"hidden")},[G(i.$slots,"default",{},void 0,!0)],2)],2)],2))}},ht=q(X,[["__scopeId","data-v-ddfb645b"]]);var Y=typeof P=="object"&&P&&P.Object===Object&&P,Z=Y,tt=Z,et=typeof self=="object"&&self&&self.Object===Object&&self,ot=tt||et||Function("return this")(),rt=ot,nt=rt,ct=nt.Symbol,I=ct,w=I;w&&w.toStringTag;var N=I;N&&N.toStringTag;var D=I,O=D?D.prototype:void 0;O&&O.toString;const st=t=>`query { 2 collections(first:${t}) { 3 pageInfo { 4 hasNextPage 5 }, 6 edges { 7 cursor 8 node { 9 id, 10 handle, 11 title, 12 image { 13 originalSrc 14 }, 15 description 16 } 17 } 18 } 19} 20`,T=(t,o)=>` 21 cursor, 22 node { 23 id, 24 availableForSale, 25 title, 26 productType, 27 tags, 28 handle, 29 compareAtPriceRange { 30 maxVariantPrice { 31 amount 32 } 33 }, 34 options { 35 name, 36 values 37 }, 38 images(first: ${t}) { 39 edges { 40 node { 41 altText, 42 id, 43 src, 44 width, 45 height 46 } 47 } 48 }, 49 variants(first: ${o}) { 50 edges { 51 node { 52 id, 53 availableForSale, 54 price { 55 amount, 56 currencyCode 57 }, 58 compareAtPrice { 59 amount, 60 currencyCode 61 }, 62 title, 63 } 64 } 65 }, 66 vendor 67 } 68`,E=t=>{switch(t){case"PRICE_ASC":return"PRICE";case"PRICE_DESC":return"PRICE, reverse: true";case"DATE_ASC":return"CREATED, reverse: true";case"DATE_DESC":return"CREATED";case"ALPHA_ASC":return"TITLE";case"ALPHA_ASC":return"TITLE, reverse: true";default:return"PRICE"}},A=t=>{let o=[];for(let e of t)e.type==="productType"&&o.push(`{ productType: "${e.value}" }`),e.type==="productVendor"&&o.push(`{ productVendor: "${e.value}" }`),e.type==="productVariant"&&o.push(`{ variantOption: { name: "${e.optionName}", value: "${e.value}" } }`),e.type==="tag"&&o.push(`{ tag: "${e.value}" }`);return console.log(o),o},R=(t,o,e,r,i)=>` 69 id, 70 title, 71 handle, 72 description, 73 descriptionHtml, 74 image { 75 altText, 76 originalSrc 77 }, 78 products(first: ${t} ${r?", sortKey: "+E(r):""} ${i?", filters: ["+A(i)+"]":""}) { 79 pageInfo { 80 startCursor, 81 endCursor, 82 hasNextPage, 83 hasPreviousPage 84 }, 85 edges { 86 ${T(o,e)} 87 } 88 } 89`,lt=(t,o,e,r,i,d,g)=>`query @inContext(country: ${g}){ 90 collectionByHandle(handle: "${t}") { 91 ${R(o,e,r,i,d)} 92 } 93} 94`,at=(t,o,e,r,i,d,g,C)=>`query @inContext(country: ${C}) { 95 collectionByHandle(handle: "${t}") { 96 products(first: ${o}, after: "${i}", ${d?", sortKey: "+E(d):""} ${g?", filters: ["+A(g)+"]":""}) { 97 edges { 98 ${T(e,r)} 99 } 100 } 101 } 102 } 103`,dt=(t,o,e,r,i,d,g)=>`query @inContext(country: ${g}) { 104 collection(id: "${t}") { 105 ${R(o,e,r,i,d)} 106 } 107} 108`,it=(t,o,e,r,i,d,g,C)=>`query @inContext(country: ${C}) { 109 collection(id: "${t}") { 110 products(first: ${o}, after: "${i}", ${d?", sortKey: "+E(d):""} ${g?", filters: ["+A(g)+"]":""}) { 111 edges { 112 ${T(e,r)} 113 } 114 } 115 } 116 } 117`,vt=()=>{const{url:t,headers:o,getOptions:e,formatProduct:r,currencyPreferences:i}=U(),d=y=>{const{id:n,title:c,handle:s,image:a,description:l,descriptionHtml:u}=y;return{id:n,title:c,handle:s,image:a?{src:a.originalSrc,...a}:null,description:l,descriptionHtml:u||null}},g=async(y=20)=>{try{let n=[];const c=(await _.post(t,st(y),o)).data,s=c.data.collections.edges,l=c.data.collections.edges[c.data.collections.edges.length-1].cursor;for(let u of s)n.push(d(u.node));return n}catch(n){return console.log(n),[]}},C=async(y,n,c=null)=>{let s=[],a;try{const{collection:l,products:u,cursor:m}=await H(y,c);return u.length&&(s=u.filter(p=>p.handle!==n)),{title:l.title,products:s,cursor:m}}catch(l){return console.log(l),{products:s,error:l,cursor:a}}},j=async(y,n,c,s=null)=>{let a=[];try{const l=await S(y,c,s);return l.products.length&&(a=l.products.filter(u=>u.handle!==n)),{products:a,cursor:l.cursor}}catch(l){return{products:a,cursor:null,error:l}}},H=async(y,n=null)=>{try{const{productsToLoad:c,images:s,variants:a,sortBy:l,filterBy:u}=e(n);console.log(u);const m=(await _.post(t,lt(y,c,s,a,l,u,i.value.country),o)).data;console.log(m);const p=m.data.collectionByHandle,f=p.products.edges,h=d(p),v=[];let b=null;if(f.length){b=f[f.length-1].cursor;for(let L of f)v.push(r(L.node))}return{collection:h,products:v,cursor:b}}catch(c){return console.log(c),[]}},S=async(y,n,c=null)=>{try{const{productsToLoad:s,images:a,variants:l,sortBy:u,filterBy:m}
117=e(c),f=(await _.post(t,at(y,s,a,l,n,u,m,i.value.country),o)).data.data.collectionByHandle.products.edges,h=[];if(f.length){n=f[f.length-1].cursor;for(let v of f)h.push(r(v.node))}return{products:h,cursor:n}}catch(s){console.log(s)}};return{getCollectionByHandle:H,getCollections:g,getCollectionByHandleNextPage:S,getCollectionById:async(y,n=null)=>{try{const{productsToLoad:c,images:s,variants:a,sortBy:l}=e(n),m=(await _.post(t,dt(handle,c,s,a,l),o)).data.data.collectionByHandle,p=m.products.edges,f=d(m),h=[];let v=null;if(p.length){v=p[p.length-1].cursor;for(let b of p)h.push(r(b.node))}return{collection:f,products:h,cursor:v}}catch(c){return console.log(c),[]}},getCollectionByIdNextPage:async(y,n,c=null)=>{try{const{productsToLoad:s,images:a,variants:l,sortBy:u}=e(c),m=(await _.post(t,it(handle,s,a,l,n),o)).data;console.log(m);const p=m.data.collectionByHandle.products.edges,f=[];if(p.length){n=p[p.length-1].cursor;for(let h of p)f.push(r(h.node))}return{products:f,cursor:n}}catch(s){console.log(s)}},getOtherProductsInCollection:C,getCollectionByHandleNextPage:S,getOtherProductsInCollectionNextPage:j}};export{ht as _,vt 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.