1import{_ as b}from"./DtitkG8T.js";import{_ as k}from"./Bxu3WA_L.js";import{r as u,u as P,c as S,o as z,a as t,F as g,b as f,d as y,e as h,f as c,g as o,w as I,n as T,_ as q}from"./BX97eYXR.js";import{a as B}from"./Cm0UX6qg.js";import"./BScTbiXz.js";import"./8817wFzl.js";const N={class:"container px-4 my-10 md:mx-auto"},A={key:0,class:"grid grid-cols-1 gap-6 md:grid-cols-3"},C=c("div",{class:"h-[350px] md:h-[526px] bg-gray-200 rounded-md"},null,-1),L=[C],E={key:1},F={key:2},V={class:"grid grid-cols-1 gap-6 md:grid-cols-3"},j={key:0,class:"absolute inset-0 z-0 flex items-center justify-center transition-opacity duration-300 bg-white bg-opacity-50 opacity-0 hover:opacity-100"},H=c("span",{class:"px-4 py-2 text-black rounded bg-lime-400"},"Sold Out",-1),O=[H],Q={__name:"behold",setup(D){const m=u([]),l=u(!1),a=u(!1),v=["high wizard pure energy hat","vision quest","mokared hidden red portal","stone wizard colorway","silent sorcerer t-shirt","nuclear family 2.0 t-shirt","fantasy lifting t-shirt","evolution","higher education t-shirt","psy ops t-shirt","high wizard mailer #4 chromirium variant (holographic hidden cover)"];P({title:S(()=>"Behold")});async function x(){var s,r,i;try{l.value=!0;const d=((i=(r=(s=(await B.post("https://highwizardry.myshopify.com/api/2023-04/graphql",{query:` 2 query GetAllProducts { 3 products(first: 80, reverse: true) { 4 edges { 5 node { 6 id 7 title 8 handle 9 availableForSale 10 totalInventory 11 images(first: 2) { 12 edges { 13 node { 14 altText 15 url 16 width 17 height 18 } 19 } 20 } 21 } 22 } 23 } 24 } 25 `},{headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":"acb69c731fd1191b8208f2b8df4e9384"}})).data)==null?void 0:s.data)==null?void 0:r.products)==null?void 0:i.edges.map(e=>e.node))||[];m.value=d.filter(e=>!v.includes(e.title.toLowerCase()))}catch(n){console.error("Error fetching products:",n)}finally{l.value=!1}}
25function w(s){if(["BEHOLD"].includes(s))a.value=!0,localStorage.setItem("authenticated",!0);else return alert("Incorrect password"),T("/")}return z(()=>{const s=localStorage.getItem("authenticated");a.value=s==="true",a.value&&x()}),(s,r)=>{const i=b,n=k,d=q;return o(),t("div",N,[l.value?(o(),t("div",A,[(o(),t(g,null,f(9,e=>c("div",{key:e,class:"animate-pulse"},L)),64))])):y("",!0),a.value?(o(),t("div",F,[c("ul",V,[(o(!0),t(g,null,f(m.value,e=>(o(),t("li",{key:e.id,class:"relative transition-transform duration-300 ease-in-out transform hover:scale-105"},[h(d,{to:`/products/${e.handle}`,class:"z-40 block"},{default:I(()=>{var p,_;return[h(n,{src:(p=e.images.edges[0])==null?void 0:p.node.url,alt:((_=e.images.edges[0])==null?void 0:_.node.altText)||"Product image",quality:"80",width:"403",height:"526",placeholder:""},null,8,["src","alt"]),e.totalInventory<=0?(o(),t("div",j,O)):y("",!0)]}),_:2},1032,["to"])]))),128))])])):(o(),t("div",E,[h(i,{onSubmit:w})]))])}}};export{Q 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.