PageSourceSearch

https://highwizard.netlify.app/_nuxt/hir7YJk9.js

js highwizard.netlify.app collected 2026-10-03 10:52:45 UTC 6,395 bytes, 62 lines download raw bytes

1import{H,T as A,M as q}from"./DkEhcZiB.js";import{_ as L}from"./D3S1n6T8.js";import{r as u,o as z,a as n,e as v,w as x,f as t,F as w,b as k,t as m,z as E,A as M,d as j,x as N,g as s,j as D,y as F}from"./BX97eYXR.js";import{a as B}from"./Cm0UX6qg.js";import"./8817wFzl.js";const I={key:0,class:"container min-h-screen mx-auto"},R={class:"gap-10 md:flex 2xl:my-12"},U={class:"md:w-3/4"},$={class:"md:w-1/3 px-4 md:sticky md:h-[300px] md:top-[50px]"},G={class:"uppercase"},K=["innerHTML"],O={class:"flex flex-wrap gap-2 mb-6"},Q=["onClick"],W={class:"w-full px-6 py-1 text-center border rounded-full md:w-64"},X=["disabled"],J={key:1,disabled:"",class:"block w-full px-6 py-1 mt-4 text-white bg-gray-300 border rounded-full md:inline md:w-64"},Y={key:1,class:"flex items-center justify-center min-h-screen bg-white"},Z={class:"w-full max-w-md px-4"},ee=t("div",{class:"text-center mb-8"},[t("h1",{class:"text-2xl font-bold uppercase mb-4"},"Access Required"),t("p",{class:"text-gray-600"},"Enter the password to view this product")],-1),te={class:"space-y-4"},ae={key:0,class:"text-red-500 text-center text-sm"},re={key:2,class:"flex items-center justify-center min-h-screen"},oe=t("div",{class:"text-center"},[t("p",null,"Loading")],-1),ne=[oe],se={key:3,class:"flex items-center justify-center min-h-screen"},le=t("p",null,"Loading",-1),de=[le],ve={__name:"g4g4ab",setup(ie){const a=u(null),y=u(!1),h=u(!1),f=u(""),_=u(!1);function C(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)}const d=u(null);async function S(){var e,o;try{const l="high-wizard-authorized-reader-sign";y.value=!0;const p=await B.post("https://highwizardry.myshopify.com/api/2023-04/graphql",{query:`
2          query GetProductByHandle($productHandle: String!) {
3            product(handle: $productHandle) {
4              availableForSale
5              compareAtPriceRange {
6                maxVariantPrice {
7                  amount
8                  currencyCode
9                }
10                minVariantPrice {
11                  amount
12                  currencyCode
13                }
14              }
15              variants(first: 5){
16                edges {
17                  node {
18                    id
19                    title
20                    quantityAvailable
21                  }
22                }
23              }
24              description
25              descriptionHtml
26              handle
27              id
28              images(first: 20) {
29                edges {
30                  cursor
31                  node {
32                    altText
33                    height
34                    id
35                    url
36                    width
37                  }
38                }
39              }
40              onlineStoreUrl
41              options(first: 5) {
42                id
43                name
44                values
45              }
46              priceRange {
47                minVariantPrice {
48                  amount
49                  currencyCode
50                }
51                maxVariantPrice {
52                  amount
53                  currencyCode
54                }
55              }
56              productType
57              tags
58              title
59              vendor
60            }
61          }
62        `,variables:{productHandle:l}},{headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":"acb69c731fd1191b8208f2b8df4e9384"}});if(p.data.errors)throw new Error(`GraphQL error: ${p.data.errors.map(c=>c.message).join(", ")}`);const i=(o=(e=p.data)==null?void 0:e.data)==null?void 0:o.product;if(i&&i.variants.edges.length>0){const c=i.variants.edges.find(r=>r.node.quantityAvailable);c&&(d.value=c.node.id)}a.value=i}catch(l){console.error("Error fetching product:",l.message)}finally{y.value=!1}}function V(e){d.value=e}function P(){if(!d.value){console.error("No variant selected!");return}const e=a.value.variants.edges.find(l=>l.node.id===d.value);if(!e){console.error("Selected variant not found!");return}const o=N();o.addToCart(a.value,e.node),o.openCartDrawer()}function g(e){if(!e||!a.value)return!1;const o=a.value.variants.edges.find(l=>l.node.id===e);return o&&o.node.quantityAvailable>=1}function b(){f.value.toLowerCase()==="g4g4ab".toLowerCase()?(h.value=!0,_.value=!1,localStorage.setItem("high-energy-authenticated","true")):(_.value=!0,f.value="")}function T(e){e.key==="Enter"&&b()}return z(()=>{const e=localStorage.getItem("high-energy-authenticated")==="true";h.value=e,S()}),(e,o)=>{const l=A,p=q,i=H,c=L;return a.value&&h.value?(s(),n("div",I,[v(i,null,{default:x(()=>[v(l,null,{default:x(()=>
62[D(" High Wizardry! | "+m(a.value.title),1)]),_:1}),v(p,{name:"description",content:a.value.description},null,8,["content"])]),_:1}),t("div",R,[t("div",U,[(s(!0),n(w,null,k(a.value.images.edges,r=>(s(),n("div",{key:r,class:"mb-4"},[v(c,{src:r.node.url,alt:r.node.altText,quality:"80",width:"860",height:"1161",placeholder:""},null,8,["src","alt"])]))),128))]),t("div",$,[t("h1",G,m(a.value.title),1),t("div",{class:"my-10 leading-tight uppercase",innerHTML:a.value.descriptionHtml},null,8,K),t("div",O,[(s(!0),n(w,null,k(a.value.variants.edges,r=>(s(),n("button",{key:r.node.id,class:F(r.node.id===d.value?"bg-gray-100 border-gray-100 border px-6 uppercase rounded-full":"px-6 border uppercase rounded-full"),onClick:ce=>V(r.node.id)},m(r.node.title),11,Q))),128))]),t("div",W,m(C(a.value.priceRange.minVariantPrice.amount)),1),a.value.availableForSale&&g(d.value)?(s(),n("button",{key:0,disabled:!d.value,class:"block w-full px-6 py-1 mt-4 uppercase transition ease-in-out delay-200 border rounded-full disabled:bg-zinc-100 disabled:hover:none hover:border hover:border-gray-200 hover:bg-gray-200 md:inline md:w-64",onClick:P},m(g(d.value)?"Add to Cart":"Sold Out"),9,X)):(s(),n("button",J," Sold Out "))])])])):!h.value&&a.value?(s(),n("div",Y,[t("div",Z,[ee,t("div",te,[E(t("input",{"onUpdate:modelValue":o[0]||(o[0]=r=>f.value=r),type:"password",placeholder:"Enter password",class:"w-full px-4 py-2 border border-gray-300 rounded-full focus:outline-none focus:border-gray-500",onKeydown:T},null,544),[[M,f.value]]),t("button",{onClick:b,class:"w-full px-6 py-2 border border-gray-300 rounded-full uppercase hover:bg-gray-100 transition"}," Submit "),_.value?(s(),n("div",ae," Incorrect password. Please try again. ")):j("",!0)])])])):y.value?(s(),n("div",re,ne)):(s(),n("div",se,de))}}};export{ve 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.