import{a as Ie,t as Ae,x as be}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-EL2AX23U.js";import{a as x}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-722DUSLT.js";import{a as b}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-7MZ5ZFIB.js";import{d as g}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-SFLZO754.js";function Te(e){if(!e){let t=`flattenConnection(): needs a 'connection' to flatten, but received '${e??""}' instead.`;return console.error(t+" Returning an empty array"),[]}return"nodes"in e?e.nodes:"edges"in e&&Array.isArray(e.edges)?e.edges.map(t=>{if(!t?.node)throw new Error("flattenConnection(): Connection edges must contain nodes");return t.node}):[]}var ht=g(x(),1),F=g(b(),1);var _e="2024-04";var ft={storeDomain:"test",storefrontToken:"abc123",storefrontApiVersion:_e,countryIsoCode:"US",languageIsoCode:"EN",getStorefrontApiUrl(){return""},getPublicTokenHeaders(){return{}},getShopifyDomain(){return""}},mt=(0,F.createContext)(ft);function Ee(){let e=(0,F.useContext)(mt);if(!e)throw new Error("'useShop()' must be a descendent of ");return e}var T="_shopify_y",_="_shopify_s";var gt=new Set(["domain","path","max-age","expires","samesite","secure","httponly"]);function ue(e){let t={},n,r,a=0,o=e.split(/;\s*/g),i,s;for(;a=0&&(r+="; Max-Age="+(n.maxage|0)),n.domain&&(r+="; Domain="+n.domain),n.path&&(r+="; Path="+n.path),n.samesite&&(r+="; SameSite="+n.samesite),(n.secure||n.samesite==="None")&&(r+="; Secure"),n.httponly&&(r+="; HttpOnly"),r}var ke="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function L(){let e="";try{let t=window.crypto,n=new Uint16Array(31);t.getRandomValues(n);let r=0;e=ke.replace(/[x]/g,a=>{let o=n[r]%16,i=a==="x"?o:o&3|8;return r++,i.toString(16)}).toUpperCase()}catch{e=ke.replace(/[x]/g,n=>{let r=Math.random()*16|0;return(n==="x"?r:r&3|8).toString(16)}).toUpperCase()}return`${yt()}-${e}`}function yt(){let e=0,t=0;e=new Date().getTime()>>>0;try{t=performance.now()>>>0}catch{t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}function H(e){let t=ue(e);return{[T]:t[T]||"",[_]:t[_]||""}}var E={PAGE_VIEW:"PAGE_VIEW",ADD_TO_CART:"ADD_TO_CART",PAGE_VIEW_2:"PAGE_VIEW_2",COLLECTION_VIEW:"COLLECTION_VIEW",PRODUCT_VIEW:"PRODUCT_VIEW",SEARCH_VIEW:"SEARCH_VIEW"},O={article:"article",blog:"blog",captcha:"captcha",cart:"cart",collection:"collection",customersAccount:"customers/account",customersActivateAccount:"customers/activate_account",customersAddresses:"customers/addresses",customersLogin:"customers/login",customersOrder:"customers/order",customersRegister:"customers/register",customersResetPassword:"customers/reset_password",giftCard:"gift_card",home:"index",listCollections:"list-collections",forbidden:"403",notFound:"404",page:"page",password:"password",product:"product",policy:"policy",search:"search"},X={hydrogen:"hydrogen",headless:"headless"},de={hydrogen:"6167201",headless:"12875497473"};function S(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}function C(e){let t={id:"",resource:null,resourceId:null,search:"",searchParams:new URLSearchParams,hash:""};if(typeof e!="string")return t;try{let{search:n,searchParams:r,pathname:a,hash:o}=new URL(e),i=a.split("/"),s=i[i.length-1],u=i[i.length-2];return!s||!u?t:{id:`${s}${n}${o}`||"",resource:u??null,resourceId:s||null,search:n,searchParams:r,hash:o}}catch{return t}}function w(e,t){return typeof e!="object"?{}:(Object.entries(e).forEach(([n,r])=>{r&&(t[n]=r)}),t)}function Pe(e){return typeof document>"u"?(console.error(`${e} should only be used within the useEffect callback or event handlers`),!0):!1}var vt="trekkie_storefront_page_view/1.4",wt="myshopify.dev";function pe(e){let t=e,{id:n,resource:r}=C(t.resourceId),a=r?r.toLowerCase():void 0;return[S(vt,w({pageType:t.pageType,customerId:parseInt(C(t.customerId).id||"0"),resourceType:a,resourceId:parseInt(n)},St(t)))]}function St(e){return{appClientId:e.shopifySalesChannel?de[e.shopifySalesChannel]:de.headless,isMerchantRequest:Ct(e.url),hydrogenSubchannelId:e.storefrontId||"0",isPersistentCookie:e.hasUserConsent,uniqToken:e.uniqueToken,visitToken:e.visitToken,microSessionId:L(),microSessionCount:1,url:e.url,path:e.path,search:e.search,referrer:e.referrer,title:e.title,shopId:parseInt(C(e.shopId).id),currency:e.currency,contentLanguage:e.acceptedLanguage||"en"}}function Ct(e){if(typeof e!="string")return!1;let t=new URL(e).hostname;return t.indexOf(wt)!==-1||t==="localhost"}var k="custom_storefront_customer_tracking/1.0",xe="page_rendered",Re="collection_page_rendered",$e="product_page_rendered",It="product_added_to_cart",Ue="search_submitted";function G(e){return{canonical_url:e.canonicalUrl||e.url,customer_id:parseInt(C(e.customerId).id||"0")}}function Le(e){let t=e,n=G(t),r=t.pageType,a=[];switch(a.push(S(k,w({event_name:xe,...n},P(t)))),r){case O.collection:a.push(S(k,w({event_name:Re,...n,collection_name:t.collectionHandle},P(t))));break;case O.product:a.push(S(k,w({event_name:$e,...n,products:he(t.products),total_value:t.totalValue},P(t))));break;case O.search:a.push(S(k,w({event_name:Ue,...n,search_string:t.searchString},P(t))));break}return a}function De(e){let t=e,n=G(t);return[S(k,w({event_name:xe,...n},P(t)))]}function Oe(e){let t=e,n=G(t);return[S(k,w({event_name:Re,...n,collection_name:t.collectionHandle},P(t)))]}function qe(e){let t=e,n=G(t);return[S(k,w({event_name:$e,...n,products:he(t.products),total_value:t.totalValue},P(t)))]}function Ne(e){let t=e,n=G(t);return[S(k,w({event_name:Ue,...n,search_string:t.searchString},P(t)))]}function Me(e){let t=e,n=C(t.cartId),r=n?.id?`${n.id}`:null;return[S(k,w({event_name:It,customerId:t.customerId,cart_token:r,total_value:t.totalValue,products:he(t.products),customer_id:parseInt(C(t.customerId).id||"0")},P(t)))]}function P(e){return{source:e.shopifySalesChannel||X.headless,hydrogenSubchannelId:e.storefrontId||"0",is_persistent_cookie:e.hasUserConsent,ccpa_enforced:!1,gdpr_enforced:!1,unique_token:e.uniqueToken,event_time:Date.now(),event_id:L(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt(C(e.shopId).id),currency:e.currency}}function he(e){return e?e.map(t=>{let n=w({variant_gid:t.variantGid,category:t.category,sku:t.sku,product_id:parseInt(C(t.productGid).id),variant_id:parseInt(C(t.variantGid).id)},{product_gid:t.productGid,name:t.name,variant:t.variantName||"",brand:t.brand,price:parseFloat(t.price),quantity:Number(t.quantity||0)});return JSON.stringify(n)}):[]}function je(e,t){let{eventName:n,payload:r}=e;if(!r.hasUserConsent)return Promise.resolve();let a=[],o=r;return n===E.PAGE_VIEW?a=a.concat(pe(o),Le(o)):n===E.ADD_TO_CART?a=a.concat(Me(r)):n===E.PAGE_VIEW_2?a=a.concat(pe(o),De(o)):n===E.COLLECTION_VIEW?a=a.concat(Oe(o)):n===E.PRODUCT_VIEW?a=a.concat(qe(o)):n===E.SEARCH_VIEW&&(a=a.concat(Ne(o))),a.length?At(a,t):Promise.resolve()}var Ve="sendShopifyAnalytics request is unsuccessful";function At(e,t){let n={events:e,metadata:{event_sent_at_ms:Date.now()}};try{return fetch(t?`https://${t}/.well-known/shopify/monorail/unstable/produce_batch`:"https://monorail-edge.shopifysvc.com/unstable/produce_batch",{method:"post",headers:{"content-type":"text/plain"},body:JSON.stringify(n)}).then(r=>{if(!r.ok)throw new Error("Response failed");return r.text()}).then(r=>{r&&JSON.parse(r).result.forEach(o=>{o.status!==200&&console.error(Ve,` `,o.message)})}).catch(r=>{console.error(Ve,r)})}catch{return Promise.resolve()}}function Fe(){if(Pe("getClientBrowserParameters"))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};let[e,t]=_t(),n=H(document.cookie);return{uniqueToken:n[T],visitToken:n[_],url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}function bt(){try{let e=performance?.getEntriesByType&&performance?.getEntriesByType("navigation");if(e&&e[0]){let t=window.performance.getEntriesByType("navigation")[0].type;return t&&t.toString()}}catch{}}function Tt(){var e,t;try{if(PerformanceNavigation&&((e=performance?.navigation)==null?void 0:e.type)!==null&&((t=performance?.navigation)==null?void 0:t.type)!==void 0){let n=performance.navigation.type;switch(n){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${n}`}}}catch{}}function _t(){try{let e="PerformanceNavigationTiming",t=bt();return t||(t=Tt(),e="performance.navigation"),t?[t,e]:["unknown","unknown"]}catch{}return["error","error"]}var W=g(x(),1);var B=g(b(),1);function fe(e){let{countryIsoCode:t,languageIsoCode:n}=Ee(),r=n.includes("_")?n.replace("_","-"):`${n}-${t}`;if(!r)throw new Error("useMoney(): Unable to get 'locale' from 'useShop()', which means that 'locale' was not passed to ''. 'locale' is required for 'useMoney()' to work");let a=parseFloat(e.amount),o=(0,B.useMemo)(()=>({style:"currency",currency:e.currencyCode}),[e.currencyCode]),i=q(r,o),s=q(r,{...o,currencyDisplay:"name"}),u=q(r,{...o,currencyDisplay:"narrowSymbol"}),l=q(r,{...o,minimumFractionDigits:0,maximumFractionDigits:0}),c=q(r),d=q(r,{minimumFractionDigits:0,maximumFractionDigits:0}),h=p=>p.type==="currency",m=(0,B.useMemo)(()=>({original:()=>e,currencyCode:()=>e.currencyCode,localizedString:()=>i().format(a),parts:()=>i().formatToParts(a),withoutTrailingZeros:()=>a%1===0?l().format(a):i().format(a),withoutTrailingZerosAndCurrency:()=>a%1===0?d().format(a):c().format(a),currencyName:()=>{var p;return((p=s().formatToParts(a).find(h))==null?void 0:p.value)??e.currencyCode},currencySymbol:()=>{var p;return((p=i().formatToParts(a).find(h))==null?void 0:p.value)??e.currencyCode},currencyNarrowSymbol:()=>{var p;return((p=u().formatToParts(a).find(h))==null?void 0:p.value)??""},amount:()=>i().formatToParts(a).filter(p=>["decimal","fraction","group","integer","literal"].includes(p.type)).map(p=>p.value).join("")}),[e,a,s,i,u,c,l,d]);return(0,B.useMemo)(()=>new Proxy(m,{get:(p,v)=>{var I;return(I=Reflect.get(p,v))==null?void 0:I.call(null)}}),[m])}function q(e,t){return(0,B.useMemo)(()=>{let n;return()=>n??(n=new Intl.NumberFormat(e,t))},[e,t])}function He({data:e,as:t,withoutCurrency:n,withoutTrailingZeros:r,measurement:a,measurementSeparator:o="/",...i}){if(!Et(e))throw new Error(" needs a valid 'data' prop that has 'amount' and 'currencyCode'");let s=fe(e),u=t??"div",l=s.localizedString;return(n||r)&&(n&&!r?l=s.amount:!n&&r?l=s.withoutTrailingZeros:l=s.withoutTrailingZerosAndCurrency),(0,W.jsxs)(u,{...i,children:[l,a&&a.referenceUnit&&(0,W.jsxs)(W.Fragment,{children:[o,a.referenceUnit]})]})}function Et(e){return typeof e.amount=="string"&&!!e.amount&&typeof e.currencyCode=="string"&&!!e.currencyCode}var Ge=g(x(),1),Be=g(b(),1),ee=(0,Be.forwardRef)((e,t)=>{let{data:n,options:r,id:a=n.id,frameBorder:o="0",allow:i="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:s=!0,loading:u="lazy",...l}=e;if(!n.embedUrl)throw new Error(" requires the 'embedUrl' property");let c=n.embedUrl;if(r){let d=new URL(n.embedUrl);for(let[h,m]of Object.entries(r))typeof m>"u"||d.searchParams.set(h,m.toString());c=d.toString()}return(0,Ge.jsx)("iframe",{...l,id:a??n.embedUrl,title:n.alt??n.id??"external video",frameBorder:o,allow:i,allowFullScreen:s,src:c,loading:u,ref:t})});var Y=g(x(),1),A=g(b(),1);var te=A.forwardRef(({alt:e,aspectRatio:t,crop:n="center",data:r,decoding:a="async",height:o="auto",loader:i=N,loading:s="lazy",sizes:u,src:l,srcSetOptions:c={intervals:15,startingWidth:200,incrementSize:200,placeholderWidth:100},width:d="100%",...h},m)=>{let p=A.useMemo(()=>{let se=r?.width&&r?.height?r?.width:void 0,j=r?.width&&r?.height?r?.height:void 0;return{width:se,height:j,unitsMatch:Boolean(We(se,j))}},[r]),v=A.useMemo(()=>{let j=J((d||"100%").toString()),st=`${j.number}${j.unit}`,Ce=o==null,ce=Ce?null:J(o.toString()),ct=ce?`${ce.number}${ce.unit}`:"",ut=Ce?"auto":ct,lt=l||r?.url,dt=r?.altText&&!e?r?.altText:e||"",pt=t||(p.unitsMatch?[K(p.width),K(p.height)].join("/"):void 0);return{width:st,height:ut,src:lt,alt:dt,aspectRatio:pt}},[d,o,l,r,e,t,p,h?.key]),{intervals:I,startingWidth:z,incrementSize:Z,placeholderWidth:it}=c,Se=A.useMemo(()=>xt(d,I,z,Z),[d,I,z,Z]);return Ye(v.width)?(0,Y.jsx)(kt,{aspectRatio:t,crop:n,decoding:a,height:o,imageWidths:Se,loader:i,loading:s,normalizedProps:v,passthroughProps:h,ref:m,width:d}):(0,Y.jsx)(Pt,{aspectRatio:t,crop:n,decoding:a,imageWidths:Se,loader:i,loading:s,normalizedProps:v,passthroughProps:h,placeholderWidth:it,ref:m,sizes:u})}),kt=A.forwardRef(({aspectRatio:e,crop:t,decoding:n,height:r,imageWidths:a,loader:o=N,loading:i,normalizedProps:s,passthroughProps:u,width:l},c)=>{let d=A.useMemo(()=>{let h=K(l),m=K(r),p=e||(We(s.width,s.height)?[h,m].join("/"):s.aspectRatio?s.aspectRatio:void 0),v=a===void 0?void 0:Ke(a,p,t),I=m||(p&&h?h*(me(p)??1):void 0),z=Je(s.src,v,o),Z=o({src:s.src,width:h,height:I,crop:s.height==="auto"?void 0:t});return{width:h,aspectRatio:p,height:I,srcSet:z,src:Z}},[e,t,r,a,o,s,l]);return(0,Y.jsx)("img",{ref:c,alt:s.alt,decoding:n,height:d.height,loading:i,src:d.src,srcSet:d.srcSet,width:d.width,style:{aspectRatio:d.aspectRatio,...u.style},...u})}),Pt=A.forwardRef(({crop:e,decoding:t,imageWidths:n,loader:r=N,loading:a,normalizedProps:o,passthroughProps:i,placeholderWidth:s,sizes:u},l)=>{let c=A.useMemo(()=>{let d=n===void 0?void 0:Ke(n,o.aspectRatio,e),h=o.aspectRatio&&s?s*(me(o.aspectRatio)??1):void 0,m=Je(o.src,d,r),p=r({src:o.src,width:s,height:h,crop:e});return{placeholderHeight:h,srcSet:m,src:p}},[e,n,r,o,s]);return(0,Y.jsx)("img",{ref:l,alt:o.alt,decoding:t,height:c.placeholderHeight,loading:a,sizes:u,src:c.src,srcSet:c.srcSet,width:s,...i,style:{width:o.width,aspectRatio:o.aspectRatio,...i.style}})});function N({src:e,width:t,height:n,crop:r}){if(!e)return"";let a=new URL(e);return t&&a.searchParams.append("width",Math.round(t).toString()),n&&a.searchParams.append("height",Math.round(n).toString()),r&&a.searchParams.append("crop",r),a.href}function We(e="100%",t="auto"){return J(e.toString()).unit===J(t.toString()).unit}function J(e){let t=e.replace(/[0-9.]/g,""),n=parseFloat(e.replace(t,""));return{unit:t===""?n===void 0?"auto":"px":t,number:n}}function K(e){if(e===void 0)return;let{unit:t,number:n}=J(e.toString());switch(t){case"em":return n*16;case"rem":return n*16;case"px":return n;case"":return n;default:return}}function Ye(e){return typeof e=="number"||typeof e=="string"&&/\d(px|em|rem)$/.test(e)}function Je(e,t,n=N){return e?t?.length===0||!t?e:t.map((r,a)=>`${n({src:e,width:r.width,height:r.height,crop:r.crop})} ${t.length===3?`${a+1}x`:`${r.width??0}w`}`).join(", "):""}function xt(e="100%",t,n,r){let a=Array.from({length:t},(i,s)=>s*r+n),o=Array.from({length:3},(i,s)=>(s+1)*(K(e)??0));return Ye(e)?o:a}function me(e){if(!e)return;let[t,n]=e.split("/");return 1/(Number(t)/Number(n))}function Ke(e,t,n="center"){return e?e.map(a=>({width:a,height:t?a*(me(t)??1):void 0,crop:n})):void 0}var re=g(b(),1),Qe={};function Rt(e,t){let n=Qe[e];if(n)return n;let r=new Promise((a,o)=>{let i=document.createElement("script");t?.module?i.type="module":i.type="text/javascript",i.src=e,i.onload=()=>{a(!0)},i.onerror=()=>{o(!1)},t?.in==="head"?document.head.appendChild(i):document.body.appendChild(i);let s=t?.attributes;s&&Object.keys(s).forEach(u=>{i.setAttribute(u,s[u])})});return Qe[e]=r,r}function ne(e,t){let[n,r]=(0,re.useState)("loading");return(0,re.useEffect)(()=>{Rt(e,t).then(()=>r("done")).catch(()=>r("error"))},[e]),n}var Q=g(x(),1);var ze=g(x(),1),ae=g(b(),1);var ge=(0,ae.forwardRef)((e,t)=>{var n;let{data:r,previewImageOptions:a,id:o=r.id,playsInline:i=!0,controls:s=!0,sourceProps:u={},...l}=e,c=N({src:((n=r.previewImage)==null?void 0:n.url)??"",...a});if(!r.sources)throw new Error("