@shopify/hydrogen 2026.1.1 → 2026.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- 'use strict';var react=require('react'),reactRouter=require('react-router'),jsxRuntime=require('react/jsx-runtime'),hydrogenReact=require('@shopify/hydrogen-react'),loadScript=require('@shopify/hydrogen-react/load-script'),graphqlClient=require('@shopify/graphql-client'),cookie=require('worktop/cookie'),cs=require('content-security-policy-builder');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var cs__default=/*#__PURE__*/_interopDefault(cs);var an=Object.defineProperty;var Pr=(e,t)=>()=>(e&&(t=e(e=0)),t);var vr=(e,t)=>{for(var r in t)an(e,r,{get:t[r],enumerable:true});};var Mo={};vr(Mo,{VIRTUAL_ROUTES_DIR:()=>$e,VIRTUAL_ROUTES_DIR_PARTS:()=>No,VIRTUAL_ROUTES_ROUTES_DIR_PARTS:()=>Fe,createVirtualRoutesPath:()=>Vo,getVirtualRoutesV3:()=>gs});function Vo(e,t,r){let o=new URL("../",e),n=t.reduce((s,c)=>new URL(`${c}/`,s),o),a=new URL(r,n).pathname.replace(/^\/[a-zA-Z]:\//,"/");return decodeURIComponent(a)}function Me(e,t){return Vo((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)),e,t)}async function gs(){return {routes:[{id:`${$e}/graphiql`,path:"graphiql",file:Me(Fe,"graphiql.jsx"),index:false},{id:`${$e}/subrequest-profiler`,path:"subrequest-profiler",file:Me(Fe,"subrequest-profiler.jsx"),index:false},{id:`${$e}/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json`,path:".well-known/appspecific/com.chrome.devtools.json",file:Me(Fe,"[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx"),index:false},{id:`${$e}/index`,path:"",file:Me(Fe,"index.jsx"),index:true}],layout:{file:Me(No,"layout.jsx")}}}var $e,Fe,No;var Zo={};vr(Zo,{default:()=>Jo,logSeoTags:()=>Xo});function Jo({headTags:e}){return Xo(e),null}function Xo(e){console.log(" "),console.log("%cSEO Meta Tags",`${zs}`),console.log(" "),e.forEach(t=>{if(t.tag==="script"){if(console.log("%c\u2022 JSON LD ",Sr),t.children)try{console.table(JSON.parse(t.children),["name","content"]);}catch{console.log(t.children);}}else {if(console.log(`%c\u2022 ${t.tag} `,Sr),t.children)if(typeof t.children=="string")console.log(`\u21B3 ${t.children}`);else try{Object.entries(JSON.parse(t.children)).map(([r,o])=>console.log(`\u21B3 ${o}`));}catch{console.log(t.children);}if(t.props.property==="og:image:url"){let r=t.props.content;Js(r).then(o=>{let n=`font-size: 400px; padding: 10px; background: white url(${o}) no-repeat center; background-size: contain;`;console.log("%c\u2022 Share image preview",Sr),console.log("%c ",n),console.log(`\u21B3 ${r}`);}).catch(o=>{console.error(o);});}Object.entries(t.props).map(([r,o])=>{console.log(`\u21B3 ${r} \u2192 ${o}`);});}console.log(" ");});}async function Js(e){let o=await(await(await fetch(e)).blob()).arrayBuffer();return `data:image/png;base64,${Xs(o)}`}function Xs(e){let t="",r=new Uint8Array(e),o=r.byteLength;for(let n=0;n<o;n++)t+=String.fromCharCode(r[n]);return btoa(t)}var Sr,zs,en=Pr(()=>{Sr="text-transform: uppercase;",zs="text-transform: uppercase; font-weight: bold; text-transform: uppercase;font-weight: bold";});function le(e){let{type:t,data:r={},customData:o}=e,n=reactRouter.useLocation(),{publish:a,cart:s,prevCart:c,shop:i,customData:u}=Y(),d=n.pathname+n.search,y={...r,customData:{...u,...o},cart:s,prevCart:c,shop:i};return react.useEffect(()=>{i?.shopId&&(y={...y,url:window.location.href},a(t,y));},[a,d,i?.shopId]),null}function Rr(e){return jsxRuntime.jsx(le,{...e,type:"page_viewed"})}function Ir(e){return jsxRuntime.jsx(le,{...e,type:"product_viewed"})}function Tr(e){return jsxRuntime.jsx(le,{...e,type:"collection_viewed"})}function Er(e){return jsxRuntime.jsx(le,{...e,type:"cart_viewed"})}function br(e){return jsxRuntime.jsx(le,{...e,type:"search_viewed"})}function wr(e){return jsxRuntime.jsx(le,{...e})}var F={PAGE_VIEWED:"page_viewed",PRODUCT_VIEWED:"product_viewed",COLLECTION_VIEWED:"collection_viewed",CART_VIEWED:"cart_viewed",SEARCH_VIEWED:"search_viewed",CART_UPDATED:"cart_updated",PRODUCT_ADD_TO_CART:"product_added_to_cart",PRODUCT_REMOVED_FROM_CART:"product_removed_from_cart",CUSTOM_EVENT:"custom_"};var Qe="Custom-Storefront-Request-Group-ID",We="X-Shopify-Storefront-Access-Token",Ct="X-SDK-Variant",ht="X-SDK-Variant-Source",At="X-SDK-Version",St="X-Shopify-Client-IP",Re="X-Shopify-Client-IP-Sig",je="_sfapi_proxy",Ke="_server_tracking";function un(e){return Object.entries(e).map(([t,r])=>r?`${t};desc=${r}`:void 0).filter(Boolean).join(", ")}function Ie(e,t){let r=typeof t=="string"?t:un(t);r&&e.headers.append("Server-Timing",r);}var dn=["_y","_s","_cmp"];function Dr(e){let t={};if(!e)return t;let r=new RegExp(`\\b(${dn.join("|")});desc="?([^",]+)"?`,"g"),o;for(;(o=r.exec(e))!==null;)t[o[1]]=o[2];return t}function xr(e){if(typeof window>"u")return false;try{return !!window.performance.getEntriesByType("navigation")[0]?.serverTiming?.some(r=>r.name===e)}catch{return false}}function Or(){return xr(je)}function _r(){return xr(Ke)}var gn="https://cdn.shopify.com/shopifycloud/consent-tracking-api/v0.2/consent-tracking-api.js",Cn="https://cdn.shopify.com/shopifycloud/privacy-banner/storefront-banner.js";function vt(e){console.error(`[h2:error:useCustomerPrivacy] Unable to setup Customer Privacy API: Missing consent.${e} configuration.`);}function Rt(e){let{withPrivacyBanner:t=false,onVisitorConsentCollected:r,onReady:o,checkoutDomain:n,storefrontAccessToken:a,country:s,locale:c,sameDomainForStorefrontApi:i}=e,u=react.useMemo(()=>i??Or(),[i]),d=react.useMemo(()=>u&&!_r(),[u]),y=hydrogenReact.useShopifyCookies({fetchTrackingValues:d,storefrontAccessToken:a,ignoreDeprecatedCookies:true}),g=react.useMemo(hydrogenReact.getTrackingValues,[y]),{revalidate:m}=reactRouter.useRevalidator();loadScript.useLoadScript(t?Cn:gn,{attributes:{id:"customer-privacy-api"}});let{observing:p,setLoaded:l,apisLoaded:P}=An({withPrivacyBanner:t}),f=react.useMemo(()=>{n||vt("checkoutDomain"),a||vt("storefrontAccessToken"),(a.startsWith("shpat_")||a.length!==32)&&console.error("[h2:error:useCustomerPrivacy] It looks like you passed a private access token, make sure to use the public token");let h=Sn(n);return {checkoutRootDomain:u&&typeof window<"u"?window.location.host:n,storefrontRootDomain:h?"."+h:void 0,storefrontAccessToken:a,country:s,locale:c}},[vt,n,a,s,c]);react.useEffect(()=>{let h=A=>{let C=hydrogenReact.getTrackingValues();if((g.visitToken!==C.visitToken||g.uniqueToken!==C.uniqueToken)&&m().catch(()=>{console.warn("[h2:warn:useCustomerPrivacy] Revalidation failed after consent change.");}),r){let R=re();if(R?.shouldShowBanner()){let I=R.currentVisitorConsent();if(I&&I.marketing===""&&I.analytics===""&&I.preferences==="")return}r(A.detail);}};return document.addEventListener("visitorConsentCollected",h),()=>{document.removeEventListener("visitorConsentCollected",h);}},[r]),react.useEffect(()=>{if(!t||p.current.privacyBanner)return;p.current.privacyBanner=true;let h=window.privacyBanner||void 0;Object.defineProperty(window,"privacyBanner",{configurable:true,get(){return h},set(C){typeof C=="object"&&C!==null&&"showPreferences"in C&&"loadBanner"in C&&(h=kr({privacyBanner:C,config:f}),l.privacyBanner());}});},[t,f,kr,l.privacyBanner]),react.useEffect(()=>{if(p.current.customerPrivacy)return;p.current.customerPrivacy=true;let h=null,A=window.Shopify||void 0;Object.defineProperty(window,"Shopify",{configurable:true,get(){return A},set(C){typeof C=="object"&&C!==null&&Object.keys(C).length===0&&(A=C,Object.defineProperty(window.Shopify,"customerPrivacy",{configurable:true,get(){return h},set(R){if(typeof R=="object"&&R!==null&&"setTrackingConsent"in R){let I=R;h={...I,setTrackingConsent:Ur({customerPrivacy:I,config:f})},A={...A,customerPrivacy:h},l.customerPrivacy();}}}));}});},[f,Ur,l.customerPrivacy]),react.useEffect(()=>{if(!P||!y)return;let h=re();if(h&&!h.cachedConsent){let A=hydrogenReact.getTrackingValues();A.consent&&(h.cachedConsent=A.consent);}if(t){let A=Te();A&&A.loadBanner(f);}hn(),o?.();},[P,y]);let v={customerPrivacy:re()};return t&&(v.privacyBanner=Te()),v}var Lr=false;function hn(){if(Lr)return;Lr=true;let e=new CustomEvent("shopifyCustomerPrivacyApiLoaded");document.dispatchEvent(e);}function An({withPrivacyBanner:e}){let t=react.useRef({customerPrivacy:false,privacyBanner:false}),[r,o]=react.useState(e?[false,false]:[false]),n=r.every(Boolean);return {observing:t,setLoaded:{customerPrivacy:()=>{o(e?s=>[true,s[1]]:()=>[true]);},privacyBanner:()=>{e&&o(s=>[s[0],true]);}},apisLoaded:n}}function Sn(e){if(typeof window>"u")return;let t=window.location.host,r=e.split(".").reverse(),o=t.split(".").reverse(),n=[];return r.forEach((a,s)=>{a===o[s]&&n.push(a);}),n.reverse().join(".")||void 0}function Ur({customerPrivacy:e,config:t}){let r=e.setTrackingConsent,{locale:o,country:n,...a}=t;function s(c,i){r({...a,headlessStorefront:true,...c},i);}return s}function kr({privacyBanner:e,config:t}){let r=e.loadBanner,o=e.showPreferences;function n(s){if(typeof s=="object"){r({...t,...s});return}r(t);}function a(s){if(typeof s=="object"){o({...t,...s});return}o(t);}return {loadBanner:n,showPreferences:a}}function re(){try{return window.Shopify&&window.Shopify.customerPrivacy?window.Shopify?.customerPrivacy:null}catch{return null}}function Te(){try{return window&&window?.privacyBanner?window.privacyBanner:null}catch{return null}}var Nr="2026.1.1";function En(){let e=re();if(!e)throw new Error("Shopify Customer Privacy API not available. Must be used within a useEffect. Make sure to load the Shopify Customer Privacy API with useCustomerPrivacy() or <AnalyticsProvider>.");return e}function Mr({consent:e,onReady:t,domain:r}){let{subscribe:o,register:n,canTrack:a}=Y(),[s,c]=react.useState(false),[i,u]=react.useState(false),[d,y]=react.useState(""),g=react.useRef(false),{checkoutDomain:m,storefrontAccessToken:p,language:l}=e,{ready:P}=n("Internal_Shopify_Analytics");Rt({...e,locale:l,checkoutDomain:m||"mock.shop",storefrontAccessToken:p||"abcdefghijklmnopqrstuvwxyz123456",onReady:()=>!e.withPrivacyBanner&&u(true),onVisitorConsentCollected:v=>{try{y(JSON.stringify(v));}catch{}u(true);}});let f=react.useMemo(()=>i?a():true,[i,a,d]);return hydrogenReact.useShopifyCookies({hasUserConsent:f,domain:r,checkoutDomain:m,fetchTrackingValues:false,ignoreDeprecatedCookies:!i}),react.useEffect(()=>{g.current||(g.current=true,o(F.PAGE_VIEWED,wn),o(F.PRODUCT_VIEWED,Dn),o(F.COLLECTION_VIEWED,xn),o(F.SEARCH_VIEWED,On),o(F.PRODUCT_ADD_TO_CART,_n),c(true));},[o]),react.useEffect(()=>{s&&i&&(P(),t());},[s,i,t]),null}function Je(e){console.error(`[h2:error:ShopifyAnalytics] Unable to send Shopify analytics: Missing shop.${e} configuration.`);}function we(e){let t=En(),r=t.analyticsProcessingAllowed();if(!e?.shop?.shopId){Je("shopId");return}if(!e?.shop?.acceptedLanguage){Je("acceptedLanguage");return}if(!e?.shop?.currency){Je("currency");return}if(!e?.shop?.hydrogenSubchannelId){Je("hydrogenSubchannelId");return}return {shopifySalesChannel:"hydrogen",assetVersionId:Nr,...e.shop,hasUserConsent:r,...hydrogenReact.getClientBrowserParameters(),analyticsAllowed:t.analyticsProcessingAllowed(),marketingAllowed:t.marketingAllowed(),saleOfDataAllowed:t.saleOfDataAllowed(),ccpaEnforced:!t.saleOfDataAllowed(),gdprEnforced:!(t.marketingAllowed()&&t.analyticsProcessingAllowed())}}function bn(e,t){if(t===null)return;let r=we(e);return r?{...r,cartId:t.id}:void 0}var oe={};function wn(e){let t=we(e);t&&(hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PAGE_VIEW_2,payload:{...t,...oe}}),oe={});}function Dn(e){let t=we(e);if(t&&$r({type:"product",products:e.products})){let r=Tt(e.products);oe={pageType:hydrogenReact.AnalyticsPageType.product,resourceId:r[0].productGid},t={...t,...oe,products:Tt(e.products)},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PRODUCT_VIEW,payload:t});}}function xn(e){let t=we(e);t&&(oe={pageType:hydrogenReact.AnalyticsPageType.collection,resourceId:e.collection.id},t={...t,...oe,collectionHandle:e.collection.handle,collectionId:e.collection.id},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.COLLECTION_VIEW,payload:t}));}function On(e){let t=we(e);t&&(oe={pageType:hydrogenReact.AnalyticsPageType.search},t={...t,...oe,searchString:e.searchTerm},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.SEARCH_VIEW,payload:t}));}function _n(e){let{cart:t,currentLine:r}=e,o=bn(e,t);!o||!r?.id||Ln({matchedLine:r,eventPayload:o});}function Ln({matchedLine:e,eventPayload:t}){let r={id:e.merchandise.product.id,variantId:e.merchandise.id,title:e.merchandise.product.title,variantTitle:e.merchandise.title,vendor:e.merchandise.product.vendor,price:e.merchandise.price.amount,quantity:e.quantity,productType:e.merchandise.product.productType,sku:e.merchandise.sku};$r({type:"cart",products:[r]})&&hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.ADD_TO_CART,payload:{...t,products:Tt([r])}});}function ce(e,t,r,o){if(e==="cart"){let n=`${r?"merchandise":"merchandise.product"}.${t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up cart analytics events because the \`cart.lines[].${n}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartLine on CartLine\` is defined and make sure \`${n}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L25-L56.`);}else {let n=`${o||t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up product view analytics events because the \`${n}\` is missing from your \`<Analytics.ProductView>\`. Make sure \`${n}\` is part of your products data prop. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/routes/products.%24handle.tsx#L159-L165.`);}}function $r({type:e,products:t}){return !t||t.length===0?(ce(e,"",false,"data.products"),false):(t.forEach(r=>{if(!r.id)return ce(e,"id",false),false;if(!r.title)return ce(e,"title",false),false;if(!r.price)return ce(e,"price.amount",true,"price"),false;if(!r.vendor)return ce(e,"vendor",false),false;if(!r.variantId)return ce(e,"id",true,"variantId"),false;if(!r.variantTitle)return ce(e,"title",true,"variantTitle"),false}),true)}function Tt(e){return e.map(t=>{let r={productGid:t.id,variantGid:t.variantId,name:t.title,variantName:t.variantTitle,brand:t.vendor,price:t.price,quantity:t.quantity||1,category:t.productType};return t.sku&&(r.sku=t.sku),t.productType&&(r.category=t.productType),r})}function qr(e){console.error(`[h2:error:CartAnalytics] Can't set up cart analytics events because the \`cart.${e}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartApiQuery on Cart\` is defined and make sure \`${e}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L59.`);}function Gr({cart:e,setCarts:t}){let{publish:r,shop:o,customData:n,canTrack:a,cart:s,prevCart:c}=Y(),i=react.useRef(null);return react.useEffect(()=>{if(e)return Promise.resolve(e).then(u=>{if(u&&u.lines){if(!u.id){qr("id");return}if(!u.updatedAt){qr("updatedAt");return}}t(({cart:d,prevCart:y})=>u?.updatedAt!==d?.updatedAt?{cart:u,prevCart:d}:{cart:d,prevCart:y});}),()=>{}},[t,e]),react.useEffect(()=>{if(!s||!s?.updatedAt||s?.updatedAt===c?.updatedAt)return;let u;try{u=JSON.parse(localStorage.getItem("cartLastUpdatedAt")||"");}catch{u=null;}if(s.id===u?.id&&s.updatedAt===u?.updatedAt)return;let d={eventTimestamp:Date.now(),cart:s,prevCart:c,shop:o,customData:n};if(s.updatedAt===i.current)return;i.current=s.updatedAt,r("cart_updated",d),localStorage.setItem("cartLastUpdatedAt",JSON.stringify({id:s.id,updatedAt:s.updatedAt}));let y=c?.lines?hydrogenReact.flattenConnection(c?.lines):[],g=s.lines?hydrogenReact.flattenConnection(s.lines):[];y?.forEach(m=>{let p=g.filter(l=>m.id===l.id);if(p?.length===1){let l=p[0];m.quantity<l.quantity?r("product_added_to_cart",{...d,prevLine:m,currentLine:l}):m.quantity>l.quantity&&r("product_removed_from_cart",{...d,prevLine:m,currentLine:l});}else r("product_removed_from_cart",{...d,prevLine:m});}),g?.forEach(m=>{let p=y.filter(l=>m.id===l.id);(!p||p.length===0)&&r("product_added_to_cart",{...d,currentLine:m});});},[s,c,r,o,n,a]),null}var $n="https://cdn.shopify.com/shopifycloud/perf-kit/shopify-perf-kit-spa.min.js";function Br({shop:e}){let t=react.useRef(false),{subscribe:r,register:o}=Y(),{ready:n}=o("Internal_Shopify_Perf_Kit"),a=hydrogenReact.useLoadScript($n,{attributes:{id:"perfkit","data-application":"hydrogen","data-shop-id":hydrogenReact.parseGid(e.shopId).id.toString(),"data-storefront-id":e.hydrogenSubchannelId,"data-monorail-region":"global","data-spa-mode":"true","data-resource-timing-sampling-rate":"100"}});return react.useEffect(()=>{a!=="done"||t.current||(t.current=true,r(F.PAGE_VIEWED,()=>{window.PerfKit?.navigate();}),r(F.PRODUCT_VIEWED,()=>{window.PerfKit?.setPageType("product");}),r(F.COLLECTION_VIEWED,()=>{window.PerfKit?.setPageType("collection");}),r(F.SEARCH_VIEWED,()=>{window.PerfKit?.setPageType("search");}),r(F.CART_VIEWED,()=>{window.PerfKit?.setPageType("cart");}),n());},[r,n,a]),null}var Qr=new Set,B=e=>{Qr.has(e)||(console.warn(e),Qr.add(e));},Wr=new Set,bt=e=>{Wr.has(e)||(console.error(new Error(e)),Wr.add(e));};var Bn={canTrack:()=>false,cart:null,customData:{},prevCart:null,publish:()=>{},shop:null,subscribe:()=>{},register:()=>({ready:()=>{}}),customerPrivacy:null,privacyBanner:null},Xr=react.createContext(Bn),Ze=new Map,xe={};function Zr(){return Object.values(xe).every(Boolean)}function jr(e,t){Ze.has(e)||Ze.set(e,new Map),Ze.get(e)?.set(t.toString(),t);}var et=new Map;function Kr(e,t){if(!Zr()){et.set(e,t);return}eo(e,t);}function eo(e,t){(Ze.get(e)??new Map).forEach((r,o)=>{try{r(t);}catch(n){typeof n=="object"&&n instanceof Error?console.error("Analytics publish error",n.message,o,n.stack):console.error("Analytics publish error",n,o);}});}function Yr(e){return xe.hasOwnProperty(e)||(xe[e]=false),{ready:()=>{xe[e]=true,Zr()&&et.size>0&&(et.forEach((t,r)=>{eo(r,t);}),et.clear());}}}function zr(){try{return window.Shopify.customerPrivacy.analyticsProcessingAllowed()}catch{}return false}function Jr(e,t){return `[h2:error:Analytics.Provider] - ${e} is required. Make sure ${t} is defined in your environment variables. See https://h2o.fyi/analytics/consent to learn how to setup environment variables in the Shopify admin.`}function Qn({canTrack:e,cart:t,children:r,consent:o,customData:n={},shop:a=null,cookieDomain:s}){let{shop:c}=Wn(a),[i,u]=react.useState(!!e),[d,y]=react.useState(false),[g,m]=react.useState({cart:null,prevCart:null}),[p,l]=react.useState(e?()=>e:()=>zr);if(c)if(/\/68817551382$/.test(c.shopId))B("[h2:error:Analytics.Provider] - Mock shop is used. Analytics will not work properly.");else {if(!o.checkoutDomain){let f=Jr("consent.checkoutDomain","PUBLIC_CHECKOUT_DOMAIN");bt(f);}if(!o.storefrontAccessToken){let f=Jr("consent.storefrontAccessToken","PUBLIC_STOREFRONT_API_TOKEN");bt(f);}o?.country||(o.country="US"),o?.language||(o.language="EN"),o.withPrivacyBanner===void 0&&(o.withPrivacyBanner=false);}let P=react.useMemo(()=>({canTrack:p,...g,customData:n,publish:p()?Kr:()=>{},shop:c,subscribe:jr,register:Yr,customerPrivacy:re(),privacyBanner:Te()}),[i,p,g,g.cart?.updatedAt,g.prevCart,Kr,jr,n,c,Yr,JSON.stringify(xe),re,Te]);return jsxRuntime.jsxs(Xr.Provider,{value:P,children:[r,!!c&&jsxRuntime.jsx(Rr,{}),!!c&&!!t&&jsxRuntime.jsx(Gr,{cart:t,setCarts:m}),!!c&&jsxRuntime.jsx(Mr,{consent:o,onReady:()=>{u(true),l(e?()=>e:()=>zr),y(true);},domain:s}),!!c&&d&&jsxRuntime.jsx(Br,{shop:c})]})}function Y(){let e=react.useContext(Xr);if(!e)throw new Error("[h2:error:useAnalytics] 'useAnalytics()' must be a descendent of <AnalyticsProvider/>");return e}function Wn(e){let[t,r]=react.useState(null);return react.useEffect(()=>(Promise.resolve(e).then(r),()=>{}),[r,e]),{shop:t}}async function jn({storefront:e,publicStorefrontId:t="0"}){return e.query(Kn,{cache:e.CacheLong()}).then(({shop:r,localization:o})=>({shopId:r.id,acceptedLanguage:o.language.isoCode,currency:o.country.currency.isoCode,hydrogenSubchannelId:t}))}var Kn=`#graphql
1
+ 'use strict';var react=require('react'),reactRouter=require('react-router'),jsxRuntime=require('react/jsx-runtime'),hydrogenReact=require('@shopify/hydrogen-react'),loadScript=require('@shopify/hydrogen-react/load-script'),graphqlClient=require('@shopify/graphql-client'),cookie=require('worktop/cookie'),cs=require('content-security-policy-builder');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var cs__default=/*#__PURE__*/_interopDefault(cs);var an=Object.defineProperty;var Pr=(e,t)=>()=>(e&&(t=e(e=0)),t);var vr=(e,t)=>{for(var r in t)an(e,r,{get:t[r],enumerable:true});};var Vo={};vr(Vo,{VIRTUAL_ROUTES_DIR:()=>$e,VIRTUAL_ROUTES_DIR_PARTS:()=>No,VIRTUAL_ROUTES_ROUTES_DIR_PARTS:()=>Fe,createVirtualRoutesPath:()=>Mo,getVirtualRoutesV3:()=>gs});function Mo(e,t,r){let o=new URL("../",e),n=t.reduce((s,c)=>new URL(`${c}/`,s),o),a=new URL(r,n).pathname.replace(/^\/[a-zA-Z]:\//,"/");return decodeURIComponent(a)}function Ve(e,t){return Mo((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)),e,t)}async function gs(){return {routes:[{id:`${$e}/graphiql`,path:"graphiql",file:Ve(Fe,"graphiql.jsx"),index:false},{id:`${$e}/subrequest-profiler`,path:"subrequest-profiler",file:Ve(Fe,"subrequest-profiler.jsx"),index:false},{id:`${$e}/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json`,path:".well-known/appspecific/com.chrome.devtools.json",file:Ve(Fe,"[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx"),index:false},{id:`${$e}/index`,path:"",file:Ve(Fe,"index.jsx"),index:true}],layout:{file:Ve(No,"layout.jsx")}}}var $e,Fe,No;var Zo={};vr(Zo,{default:()=>Jo,logSeoTags:()=>Xo});function Jo({headTags:e}){return Xo(e),null}function Xo(e){console.log(" "),console.log("%cSEO Meta Tags",`${zs}`),console.log(" "),e.forEach(t=>{if(t.tag==="script"){if(console.log("%c\u2022 JSON LD ",Sr),t.children)try{console.table(JSON.parse(t.children),["name","content"]);}catch{console.log(t.children);}}else {if(console.log(`%c\u2022 ${t.tag} `,Sr),t.children)if(typeof t.children=="string")console.log(`\u21B3 ${t.children}`);else try{Object.entries(JSON.parse(t.children)).map(([r,o])=>console.log(`\u21B3 ${o}`));}catch{console.log(t.children);}if(t.props.property==="og:image:url"){let r=t.props.content;Js(r).then(o=>{let n=`font-size: 400px; padding: 10px; background: white url(${o}) no-repeat center; background-size: contain;`;console.log("%c\u2022 Share image preview",Sr),console.log("%c ",n),console.log(`\u21B3 ${r}`);}).catch(o=>{console.error(o);});}Object.entries(t.props).map(([r,o])=>{console.log(`\u21B3 ${r} \u2192 ${o}`);});}console.log(" ");});}async function Js(e){let o=await(await(await fetch(e)).blob()).arrayBuffer();return `data:image/png;base64,${Xs(o)}`}function Xs(e){let t="",r=new Uint8Array(e),o=r.byteLength;for(let n=0;n<o;n++)t+=String.fromCharCode(r[n]);return btoa(t)}var Sr,zs,en=Pr(()=>{Sr="text-transform: uppercase;",zs="text-transform: uppercase; font-weight: bold; text-transform: uppercase;font-weight: bold";});function le(e){let{type:t,data:r={},customData:o}=e,n=reactRouter.useLocation(),{publish:a,cart:s,prevCart:c,shop:i,customData:u}=Y(),p=n.pathname+n.search,y={...r,customData:{...u,...o},cart:s,prevCart:c,shop:i};return react.useEffect(()=>{i?.shopId&&(y={...y,url:window.location.href},a(t,y));},[a,p,i?.shopId]),null}function Rr(e){return jsxRuntime.jsx(le,{...e,type:"page_viewed"})}function Ir(e){return jsxRuntime.jsx(le,{...e,type:"product_viewed"})}function Tr(e){return jsxRuntime.jsx(le,{...e,type:"collection_viewed"})}function Er(e){return jsxRuntime.jsx(le,{...e,type:"cart_viewed"})}function br(e){return jsxRuntime.jsx(le,{...e,type:"search_viewed"})}function wr(e){return jsxRuntime.jsx(le,{...e})}var F={PAGE_VIEWED:"page_viewed",PRODUCT_VIEWED:"product_viewed",COLLECTION_VIEWED:"collection_viewed",CART_VIEWED:"cart_viewed",SEARCH_VIEWED:"search_viewed",CART_UPDATED:"cart_updated",PRODUCT_ADD_TO_CART:"product_added_to_cart",PRODUCT_REMOVED_FROM_CART:"product_removed_from_cart",CUSTOM_EVENT:"custom_"};var Qe="Custom-Storefront-Request-Group-ID",We="X-Shopify-Storefront-Access-Token",Ct="X-SDK-Variant",ht="X-SDK-Variant-Source",At="X-SDK-Version",St="X-Shopify-Client-IP",Re="X-Shopify-Client-IP-Sig",je="_sfapi_proxy",Ke="_server_tracking";function un(e){return Object.entries(e).map(([t,r])=>r?`${t};desc=${r}`:void 0).filter(Boolean).join(", ")}function Ie(e,t){let r=typeof t=="string"?t:un(t);r&&e.headers.append("Server-Timing",r);}var dn=["_y","_s","_cmp"];function Dr(e){let t={};if(!e)return t;let r=new RegExp(`\\b(${dn.join("|")});desc="?([^",]+)"?`,"g"),o;for(;(o=r.exec(e))!==null;)t[o[1]]=o[2];return t}function xr(e){if(typeof window>"u")return false;try{return !!window.performance.getEntriesByType("navigation")[0]?.serverTiming?.some(r=>r.name===e)}catch{return false}}function Or(){return xr(je)}function _r(){return xr(Ke)}var gn="https://cdn.shopify.com/shopifycloud/consent-tracking-api/v0.2/consent-tracking-api.js",Cn="https://cdn.shopify.com/shopifycloud/privacy-banner/storefront-banner.js";function vt(e){console.error(`[h2:error:useCustomerPrivacy] Unable to setup Customer Privacy API: Missing consent.${e} configuration.`);}function Rt(e){let{withPrivacyBanner:t=false,onVisitorConsentCollected:r,onReady:o,checkoutDomain:n,storefrontAccessToken:a,country:s,locale:c,sameDomainForStorefrontApi:i}=e,u=react.useMemo(()=>i??Or(),[i]),p=react.useMemo(()=>u&&!_r(),[u]),y=hydrogenReact.useShopifyCookies({fetchTrackingValues:p,storefrontAccessToken:a,ignoreDeprecatedCookies:true}),g=react.useMemo(hydrogenReact.getTrackingValues,[y]),{revalidate:m}=reactRouter.useRevalidator();loadScript.useLoadScript(t?Cn:gn,{attributes:{id:"customer-privacy-api"}});let{observing:d,setLoaded:l,apisLoaded:P}=An({withPrivacyBanner:t}),f=react.useMemo(()=>{n||vt("checkoutDomain"),a||vt("storefrontAccessToken"),(a.startsWith("shpat_")||a.length!==32)&&console.error("[h2:error:useCustomerPrivacy] It looks like you passed a private access token, make sure to use the public token");let h=Sn(n);return {checkoutRootDomain:u&&typeof window<"u"?window.location.host:n,storefrontRootDomain:h?"."+h:void 0,storefrontAccessToken:a,country:s,locale:c}},[vt,n,a,s,c]);react.useEffect(()=>{let h=A=>{let C=hydrogenReact.getTrackingValues();if((g.visitToken!==C.visitToken||g.uniqueToken!==C.uniqueToken)&&m().catch(()=>{console.warn("[h2:warn:useCustomerPrivacy] Revalidation failed after consent change.");}),r){let R=re();if(R?.shouldShowBanner()){let I=R.currentVisitorConsent();if(I&&I.marketing===""&&I.analytics===""&&I.preferences==="")return}r(A.detail);}};return document.addEventListener("visitorConsentCollected",h),()=>{document.removeEventListener("visitorConsentCollected",h);}},[r]),react.useEffect(()=>{if(!t||d.current.privacyBanner)return;d.current.privacyBanner=true;let h=window.privacyBanner||void 0;Object.defineProperty(window,"privacyBanner",{configurable:true,get(){return h},set(C){typeof C=="object"&&C!==null&&"showPreferences"in C&&"loadBanner"in C&&(h=kr({privacyBanner:C,config:f}),l.privacyBanner());}});},[t,f,kr,l.privacyBanner]),react.useEffect(()=>{if(d.current.customerPrivacy)return;d.current.customerPrivacy=true;let h=null,A=window.Shopify||void 0;Object.defineProperty(window,"Shopify",{configurable:true,get(){return A},set(C){typeof C=="object"&&C!==null&&Object.keys(C).length===0&&(A=C,Object.defineProperty(window.Shopify,"customerPrivacy",{configurable:true,get(){return h},set(R){if(typeof R=="object"&&R!==null&&"setTrackingConsent"in R){let I=R;h={...I,setTrackingConsent:Lr({customerPrivacy:I,config:f})},A={...A,customerPrivacy:h},l.customerPrivacy();}}}));}});},[f,Lr,l.customerPrivacy]),react.useEffect(()=>{if(!P||!y)return;let h=re();if(h&&!h.cachedConsent){let A=hydrogenReact.getTrackingValues();A.consent&&(h.cachedConsent=A.consent);}if(t){let A=Te();A&&A.loadBanner(f);}hn(),o?.();},[P,y]);let v={customerPrivacy:re()};return t&&(v.privacyBanner=Te()),v}var Ur=false;function hn(){if(Ur)return;Ur=true;let e=new CustomEvent("shopifyCustomerPrivacyApiLoaded");document.dispatchEvent(e);}function An({withPrivacyBanner:e}){let t=react.useRef({customerPrivacy:false,privacyBanner:false}),[r,o]=react.useState(e?[false,false]:[false]),n=r.every(Boolean);return {observing:t,setLoaded:{customerPrivacy:()=>{o(e?s=>[true,s[1]]:()=>[true]);},privacyBanner:()=>{e&&o(s=>[s[0],true]);}},apisLoaded:n}}function Sn(e){if(typeof window>"u")return;let t=window.location.host,r=e.split(".").reverse(),o=t.split(".").reverse(),n=[];return r.forEach((a,s)=>{a===o[s]&&n.push(a);}),n.reverse().join(".")||void 0}function Lr({customerPrivacy:e,config:t}){let r=e.setTrackingConsent,{locale:o,country:n,...a}=t;function s(c,i){r({...a,headlessStorefront:true,...c},i);}return s}function kr({privacyBanner:e,config:t}){let r=e.loadBanner,o=e.showPreferences;function n(s){if(typeof s=="object"){r({...t,...s});return}r(t);}function a(s){if(typeof s=="object"){o({...t,...s});return}o(t);}return {loadBanner:n,showPreferences:a}}function re(){try{return window.Shopify&&window.Shopify.customerPrivacy?window.Shopify?.customerPrivacy:null}catch{return null}}function Te(){try{return window&&window?.privacyBanner?window.privacyBanner:null}catch{return null}}var Nr="2026.1.3";function En(){let e=re();if(!e)throw new Error("Shopify Customer Privacy API not available. Must be used within a useEffect. Make sure to load the Shopify Customer Privacy API with useCustomerPrivacy() or <AnalyticsProvider>.");return e}function Vr({consent:e,onReady:t,domain:r}){let{subscribe:o,register:n,canTrack:a}=Y(),[s,c]=react.useState(false),[i,u]=react.useState(false),[p,y]=react.useState(""),g=react.useRef(false),{checkoutDomain:m,storefrontAccessToken:d,language:l}=e,{ready:P}=n("Internal_Shopify_Analytics");Rt({...e,locale:l,checkoutDomain:m||"mock.shop",storefrontAccessToken:d||"abcdefghijklmnopqrstuvwxyz123456",onReady:()=>!e.withPrivacyBanner&&u(true),onVisitorConsentCollected:v=>{try{y(JSON.stringify(v));}catch{}u(true);}});let f=react.useMemo(()=>i?a():true,[i,a,p]);return hydrogenReact.useShopifyCookies({hasUserConsent:f,domain:r,checkoutDomain:m,fetchTrackingValues:false,ignoreDeprecatedCookies:!i}),react.useEffect(()=>{g.current||(g.current=true,o(F.PAGE_VIEWED,wn),o(F.PRODUCT_VIEWED,Dn),o(F.COLLECTION_VIEWED,xn),o(F.SEARCH_VIEWED,On),o(F.PRODUCT_ADD_TO_CART,_n),c(true));},[o]),react.useEffect(()=>{s&&i&&(P(),t());},[s,i,t]),null}function Je(e){console.error(`[h2:error:ShopifyAnalytics] Unable to send Shopify analytics: Missing shop.${e} configuration.`);}function we(e){let t=En(),r=t.analyticsProcessingAllowed();if(!e?.shop?.shopId){Je("shopId");return}if(!e?.shop?.acceptedLanguage){Je("acceptedLanguage");return}if(!e?.shop?.currency){Je("currency");return}if(!e?.shop?.hydrogenSubchannelId){Je("hydrogenSubchannelId");return}return {shopifySalesChannel:"hydrogen",assetVersionId:Nr,...e.shop,hasUserConsent:r,...hydrogenReact.getClientBrowserParameters(),analyticsAllowed:t.analyticsProcessingAllowed(),marketingAllowed:t.marketingAllowed(),saleOfDataAllowed:t.saleOfDataAllowed(),ccpaEnforced:!t.saleOfDataAllowed(),gdprEnforced:!(t.marketingAllowed()&&t.analyticsProcessingAllowed())}}function bn(e,t){if(t===null)return;let r=we(e);return r?{...r,cartId:t.id}:void 0}var oe={};function wn(e){let t=we(e);t&&(hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PAGE_VIEW_2,payload:{...t,...oe}}),oe={});}function Dn(e){let t=we(e);if(t&&$r({type:"product",products:e.products})){let r=Tt(e.products);oe={pageType:hydrogenReact.AnalyticsPageType.product,resourceId:r[0].productGid},t={...t,...oe,products:Tt(e.products)},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PRODUCT_VIEW,payload:t});}}function xn(e){let t=we(e);t&&(oe={pageType:hydrogenReact.AnalyticsPageType.collection,resourceId:e.collection.id},t={...t,...oe,collectionHandle:e.collection.handle,collectionId:e.collection.id},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.COLLECTION_VIEW,payload:t}));}function On(e){let t=we(e);t&&(oe={pageType:hydrogenReact.AnalyticsPageType.search},t={...t,...oe,searchString:e.searchTerm},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.SEARCH_VIEW,payload:t}));}function _n(e){let{cart:t,currentLine:r}=e,o=bn(e,t);!o||!r?.id||Un({matchedLine:r,eventPayload:o});}function Un({matchedLine:e,eventPayload:t}){let r={id:e.merchandise.product.id,variantId:e.merchandise.id,title:e.merchandise.product.title,variantTitle:e.merchandise.title,vendor:e.merchandise.product.vendor,price:e.merchandise.price.amount,quantity:e.quantity,productType:e.merchandise.product.productType,sku:e.merchandise.sku};$r({type:"cart",products:[r]})&&hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.ADD_TO_CART,payload:{...t,products:Tt([r])}});}function ce(e,t,r,o){if(e==="cart"){let n=`${r?"merchandise":"merchandise.product"}.${t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up cart analytics events because the \`cart.lines[].${n}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartLine on CartLine\` is defined and make sure \`${n}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L25-L56.`);}else {let n=`${o||t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up product view analytics events because the \`${n}\` is missing from your \`<Analytics.ProductView>\`. Make sure \`${n}\` is part of your products data prop. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/routes/products.%24handle.tsx#L159-L165.`);}}function $r({type:e,products:t}){return !t||t.length===0?(ce(e,"",false,"data.products"),false):(t.forEach(r=>{if(!r.id)return ce(e,"id",false),false;if(!r.title)return ce(e,"title",false),false;if(!r.price)return ce(e,"price.amount",true,"price"),false;if(!r.vendor)return ce(e,"vendor",false),false;if(!r.variantId)return ce(e,"id",true,"variantId"),false;if(!r.variantTitle)return ce(e,"title",true,"variantTitle"),false}),true)}function Tt(e){return e.map(t=>{let r={productGid:t.id,variantGid:t.variantId,name:t.title,variantName:t.variantTitle,brand:t.vendor,price:t.price,quantity:t.quantity||1,category:t.productType};return t.sku&&(r.sku=t.sku),t.productType&&(r.category=t.productType),r})}function qr(e){console.error(`[h2:error:CartAnalytics] Can't set up cart analytics events because the \`cart.${e}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartApiQuery on Cart\` is defined and make sure \`${e}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L59.`);}function Gr({cart:e,setCarts:t}){let{publish:r,shop:o,customData:n,canTrack:a,cart:s,prevCart:c}=Y(),i=react.useRef(null);return react.useEffect(()=>{if(e)return Promise.resolve(e).then(u=>{if(u&&u.lines){if(!u.id){qr("id");return}if(!u.updatedAt){qr("updatedAt");return}}t(({cart:p,prevCart:y})=>u?.updatedAt!==p?.updatedAt?{cart:u,prevCart:p}:{cart:p,prevCart:y});}),()=>{}},[t,e]),react.useEffect(()=>{if(!s||!s?.updatedAt||s?.updatedAt===c?.updatedAt)return;let u;try{u=JSON.parse(localStorage.getItem("cartLastUpdatedAt")||"");}catch{u=null;}if(s.id===u?.id&&s.updatedAt===u?.updatedAt)return;let p={eventTimestamp:Date.now(),cart:s,prevCart:c,shop:o,customData:n};if(s.updatedAt===i.current)return;i.current=s.updatedAt,r("cart_updated",p),localStorage.setItem("cartLastUpdatedAt",JSON.stringify({id:s.id,updatedAt:s.updatedAt}));let y=c?.lines?hydrogenReact.flattenConnection(c?.lines):[],g=s.lines?hydrogenReact.flattenConnection(s.lines):[];y?.forEach(m=>{let d=g.filter(l=>m.id===l.id);if(d?.length===1){let l=d[0];m.quantity<l.quantity?r("product_added_to_cart",{...p,prevLine:m,currentLine:l}):m.quantity>l.quantity&&r("product_removed_from_cart",{...p,prevLine:m,currentLine:l});}else r("product_removed_from_cart",{...p,prevLine:m});}),g?.forEach(m=>{let d=y.filter(l=>m.id===l.id);(!d||d.length===0)&&r("product_added_to_cart",{...p,currentLine:m});});},[s,c,r,o,n,a]),null}var $n="https://cdn.shopify.com/shopifycloud/perf-kit/shopify-perf-kit-spa.min.js";function Br({shop:e}){let t=react.useRef(false),{subscribe:r,register:o}=Y(),{ready:n}=o("Internal_Shopify_Perf_Kit"),a=hydrogenReact.useLoadScript($n,{attributes:{id:"perfkit","data-application":"hydrogen","data-shop-id":hydrogenReact.parseGid(e.shopId).id.toString(),"data-storefront-id":e.hydrogenSubchannelId,"data-monorail-region":"global","data-spa-mode":"true","data-resource-timing-sampling-rate":"100"}});return react.useEffect(()=>{a!=="done"||t.current||(t.current=true,r(F.PAGE_VIEWED,()=>{window.PerfKit?.navigate();}),r(F.PRODUCT_VIEWED,()=>{window.PerfKit?.setPageType("product");}),r(F.COLLECTION_VIEWED,()=>{window.PerfKit?.setPageType("collection");}),r(F.SEARCH_VIEWED,()=>{window.PerfKit?.setPageType("search");}),r(F.CART_VIEWED,()=>{window.PerfKit?.setPageType("cart");}),n());},[r,n,a]),null}var Qr=new Set,B=e=>{Qr.has(e)||(console.warn(e),Qr.add(e));},Wr=new Set,bt=e=>{Wr.has(e)||(console.error(new Error(e)),Wr.add(e));};var Bn={canTrack:()=>false,cart:null,customData:{},prevCart:null,publish:()=>{},shop:null,subscribe:()=>{},register:()=>({ready:()=>{}}),customerPrivacy:null,privacyBanner:null},Xr=react.createContext(Bn),Ze=new Map,xe={};function Zr(){return Object.values(xe).every(Boolean)}function jr(e,t){Ze.has(e)||Ze.set(e,new Map),Ze.get(e)?.set(t.toString(),t);}var et=new Map;function Kr(e,t){if(!Zr()){et.set(e,t);return}eo(e,t);}function eo(e,t){(Ze.get(e)??new Map).forEach((r,o)=>{try{r(t);}catch(n){typeof n=="object"&&n instanceof Error?console.error("Analytics publish error",n.message,o,n.stack):console.error("Analytics publish error",n,o);}});}function Yr(e){return xe.hasOwnProperty(e)||(xe[e]=false),{ready:()=>{xe[e]=true,Zr()&&et.size>0&&(et.forEach((t,r)=>{eo(r,t);}),et.clear());}}}function zr(){try{return window.Shopify.customerPrivacy.analyticsProcessingAllowed()}catch{}return false}function Jr(e,t){return `[h2:error:Analytics.Provider] - ${e} is required. Make sure ${t} is defined in your environment variables. See https://h2o.fyi/analytics/consent to learn how to setup environment variables in the Shopify admin.`}function Qn({canTrack:e,cart:t,children:r,consent:o,customData:n={},shop:a=null,cookieDomain:s}){let{shop:c}=Wn(a),[i,u]=react.useState(!!e),[p,y]=react.useState(false),[g,m]=react.useState({cart:null,prevCart:null}),[d,l]=react.useState(e?()=>e:()=>zr);if(c)if(/\/68817551382$/.test(c.shopId))B("[h2:error:Analytics.Provider] - Mock shop is used. Analytics will not work properly.");else {if(!o.checkoutDomain){let f=Jr("consent.checkoutDomain","PUBLIC_CHECKOUT_DOMAIN");bt(f);}if(!o.storefrontAccessToken){let f=Jr("consent.storefrontAccessToken","PUBLIC_STOREFRONT_API_TOKEN");bt(f);}o?.country||(o.country="US"),o?.language||(o.language="EN"),o.withPrivacyBanner===void 0&&(o.withPrivacyBanner=false);}let P=react.useMemo(()=>({canTrack:d,...g,customData:n,publish:d()?Kr:()=>{},shop:c,subscribe:jr,register:Yr,customerPrivacy:re(),privacyBanner:Te()}),[i,d,g,g.cart?.updatedAt,g.prevCart,Kr,jr,n,c,Yr,JSON.stringify(xe),re,Te]);return jsxRuntime.jsxs(Xr.Provider,{value:P,children:[r,!!c&&jsxRuntime.jsx(Rr,{}),!!c&&!!t&&jsxRuntime.jsx(Gr,{cart:t,setCarts:m}),!!c&&jsxRuntime.jsx(Vr,{consent:o,onReady:()=>{u(true),l(e?()=>e:()=>zr),y(true);},domain:s}),!!c&&p&&jsxRuntime.jsx(Br,{shop:c})]})}function Y(){let e=react.useContext(Xr);if(!e)throw new Error("[h2:error:useAnalytics] 'useAnalytics()' must be a descendent of <AnalyticsProvider/>");return e}function Wn(e){let[t,r]=react.useState(null);return react.useEffect(()=>(Promise.resolve(e).then(r),()=>{}),[r,e]),{shop:t}}async function jn({storefront:e,publicStorefrontId:t="0"}){return e.query(Kn,{cache:e.CacheLong()}).then(({shop:r,localization:o})=>({shopId:r.id,acceptedLanguage:o.language.isoCode,currency:o.country.currency.isoCode,hydrogenSubchannelId:t}))}var Kn=`#graphql
2
2
  query ShopData(
3
3
  $country: CountryCode
4
4
  $language: LanguageCode
@@ -20,12 +20,12 @@
20
20
  `,Yn={CartView:Er,CollectionView:Tr,CustomView:wr,ProductView:Ir,Provider:Qn,SearchView:br};function W(e,t){return wt(e.headers,t)}function wt(e,t){let r=e?.get?.(t)??e?.[t];return typeof r=="string"?r:null}function ne(e){return {requestId:e?W(e,"request-id"):void 0,purpose:e?W(e,"purpose"):void 0}}function to(e){return {requestGroupId:W(e,"request-id"),buyerIp:W(e,"oxygen-buyer-ip"),buyerIpSig:W(e,Re),cookie:W(e,"cookie"),purpose:W(e,"sec-purpose")||W(e,"purpose")}}var Dt=/^\/api\/(unstable|2\d{3}-\d{2})\/graphql\.json$/,xt=e=>{try{return new URL(e,"http://e.c").pathname}catch{return "/"}};function Ot(e,t){return t.reduce((r,o)=>{let n=e(o);return n&&r.push([o,n]),r},[])}function fe(e,t={}){let r=new Error,o=(n,a="Error")=>{let s=(r.stack??"").split(`
21
21
  `).slice(3+(t.stackOffset??0)).join(`
22
22
  `).replace(/ at loader(\d+) \(/,(c,i)=>c.replace(i,""));return `${a}: ${n}
23
- `+s};return e.then(n=>{if(n?.errors&&Array.isArray(n.errors)){let a=typeof t.logErrors=="function"?t.logErrors:()=>t.logErrors??false;n.errors.forEach(s=>{s&&(s.stack=o(s.message,s.name),a(s)&&console.error(s));});}return n}).catch(n=>{throw n&&(n.stack=o(n.message,n.name)),n})}var j=void 0;var tt="public",Jn="private",_t="no-store",ro={maxAge:"max-age",staleWhileRevalidate:"stale-while-revalidate",sMaxAge:"s-maxage",staleIfError:"stale-if-error"};function Oe(e){let t=[];return Object.keys(e).forEach(r=>{r==="mode"?t.push(e[r]):ro[r]&&t.push(`${ro[r]}=${e[r]}`);}),t.join(", ")}function Lt(){return {mode:_t}}function Ut(e){if(e?.mode&&e?.mode!==tt&&e?.mode!==Jn)throw Error("'mode' must be either 'public' or 'private'")}function ue(e){return Ut(e),{mode:tt,maxAge:1,staleWhileRevalidate:9,...e}}function kt(e){return Ut(e),{mode:tt,maxAge:3600,staleWhileRevalidate:82800,...e}}function me(e){return Ut(e),{mode:tt,maxAge:1,staleWhileRevalidate:86399,...e}}function Nt(e){return e}function z(e){return String(e).includes("__proto__")?JSON.parse(e,Xn):JSON.parse(e)}function Xn(e,t){if(e!=="__proto__")return t}function rt(e,t){return e&&t?{...e,...t}:e||me()}function Vt(e){return Oe(rt(e))}async function Zn(e,t){if(!e)return;let r=await e.match(t);if(!r){return}return r}async function ea(e,t,r,o){if(!e)return;let n=rt(o),a=Vt(rt(n,{maxAge:(n.maxAge||0)+(n.staleWhileRevalidate||0)})),s=Vt(rt(n));r.headers.set("cache-control",a),r.headers.set("real-cache-control",s),r.headers.set("cache-put-date",String(Date.now())),await e.put(t,r);}async function ta(e,t){e&&await e.delete(t);}function ra(e,t){let r=e.headers.get("real-cache-control"),o=0;if(r){let a=r.match(/max-age=(\d*)/);a&&a.length>1&&(o=parseFloat(a[1]));}return [(Date.now()-Number(t))/1e3,o]}function oa(e,t){let r=t.headers.get("cache-put-date");if(!r)return false;let[o,n]=ra(t,r),a=o>n;return a}var ot={get:Zn,set:ea,delete:ta,generateDefaultCacheControlHeader:Vt,isStale:oa};function _e(e){return `https://shopify.dev/?${e}`}function na(e){return e||me()}async function oo(e,t){if(!e)return;let r=_e(t),o=new Request(r),n=await ot.get(e,o);if(!n)return;let a=await n.text();try{return [z(a),n]}catch{return [a,n]}}async function no(e,t,r,o){if(!e)return;let n=_e(t),a=new Request(n),s=new Response(JSON.stringify(r));await ot.set(e,a,s,na(o));}function ao(e,t){return ot.isStale(new Request(_e(e)),t)}function so(e){let t=Array.isArray(e)?e:[e],r="";for(let o of t)o!=null&&(typeof o=="object"?r+=JSON.stringify(o):r+=o.toString());return encodeURIComponent(r)}var Mt=new Set;async function nt(e,t,{strategy:r=ue(),cacheInstance:o,shouldCacheResult:n=()=>true,waitUntil:a,debugInfo:s}){let i=so([...typeof e=="string"?[e]:e]),y=f=>{({displayName:f.displayName,url:f.response?.url,responseInit:{status:f.response?.status||0,statusText:f.response?.statusText||"",headers:Array.from(f.response?.headers.entries()||[])}});},m=void 0;if(!o||!r||r.mode===_t){let f=await t({addDebugData:y});return f}let p=f=>no(o,i,{value:f,debugInfo:void 0},r),l=await oo(o,i);if(l&&typeof l[0]!="string"){let[{value:f,debugInfo:v},h]=l;let A=ao(i,h)?"STALE":"HIT";if(!Mt.has(i)&&A==="STALE"){Mt.add(i);let C=Promise.resolve().then(async()=>{let R=Date.now();try{let I=await t({addDebugData:y});n(I)&&(await p(I),m?.({result:I,cacheStatus:"PUT",overrideStartTime:R}));}catch(I){I.message&&(I.message="SWR in sub-request failed: "+I.message),console.error(I);}finally{Mt.delete(i);}});a?.(C);}return f}let P=await t({addDebugData:y});if(n(P)){let f=Promise.resolve().then(async()=>{await p(P);});a?.(f);}return P}var sa=["set-cookie","server-timing"];function io(e,t){return [e,{status:t.status,statusText:t.statusText,headers:[...t.headers].filter(([r])=>!sa.includes(r.toLowerCase()))}]}function co([e,t]){return [e,new Response(e,t)]}async function at(e,t,{cacheInstance:r,cache:o,cacheKey:n=[e,t],shouldCacheResponse:a,waitUntil:s,debugInfo:c,streamConfig:i,onRawHeaders:u}){return !o&&(!t.method||t.method==="GET")&&(o=ue()),nt(n,async()=>{if(i){let g=null,p=await graphqlClient.createGraphQLClient({url:e,customFetchApi:async(f,v)=>(g=await fetch(f,v),u?.(g.headers),g),headers:t.headers}).requestStream(i.query,{variables:i.variables}),l,P;for await(let f of p){let{data:v,errors:h}=f;l=v,P=h?.graphQLErrors??h;}return g?.ok?io({data:l,errors:P},g):g}let d=await fetch(e,t);if(u?.(d.headers),!d.ok)return d;let y=await d.text().catch(()=>"");try{y&&(y=z(y));}catch{}return io(y,d)},{cacheInstance:r,waitUntil:s,strategy:o??null,debugInfo:c,shouldCacheResult:d=>"ok"in d?!1:a(...co(d))}).then(d=>"ok"in d?[null,d]:co(d))}function ia(e){let{cache:t,waitUntil:r,request:o}=e;return {run:({cacheKey:n,cacheStrategy:a,shouldCacheResult:s},c)=>nt(n,c,{shouldCacheResult:s,strategy:a,cacheInstance:t,waitUntil:r,debugInfo:{...ne(o),stackInfo:j?.()}}),fetch:(n,a,s)=>at(n,a??{},{waitUntil:r,cacheKey:[n,a],cacheInstance:t,debugInfo:{url:n,...ne(o),stackInfo:j?.(),displayName:s?.displayName},cache:s.cacheStrategy,...s}).then(([c,i])=>({data:c,response:i}))}}var $t=class{#e;constructor(){this.#e=new Map;}add(t){throw new Error("Method not implemented. Use `put` instead.")}addAll(t){throw new Error("Method not implemented. Use `put` instead.")}matchAll(t,r){throw new Error("Method not implemented. Use `match` instead.")}async put(t,r){if(t.method!=="GET")throw new TypeError("Cannot cache response to non-GET request.");if(r.status===206)throw new TypeError("Cannot cache response to a range request (206 Partial Content).");if(r.headers.get("vary")?.includes("*"))throw new TypeError("Cannot cache response with 'Vary: *' header.");this.#e.set(t.url,{body:new Uint8Array(await r.arrayBuffer()),status:r.status,headers:[...r.headers],timestamp:Date.now()});}async match(t){if(t.method!=="GET")return;let r=this.#e.get(t.url);if(!r)return;let{body:o,timestamp:n,...a}=r,s=new Headers(a.headers),c=s.get("cache-control")||s.get("real-cache-control")||"",i=parseInt(c.match(/max-age=(\d+)/)?.[1]||"0",10),u=parseInt(c.match(/stale-while-revalidate=(\d+)/)?.[1]||"0",10),d=(Date.now()-n)/1e3;if(d>i+u){this.#e.delete(t.url);return}let g=d>i;return s.set("cache",g?"STALE":"HIT"),s.set("date",new Date(n).toUTCString()),new Response(o,{status:a.status??200,headers:s})}async delete(t){return this.#e.has(t.url)?(this.#e.delete(t.url),true):false}keys(t){let r=[];for(let o of this.#e.keys())(!t||t.url===o)&&r.push(new Request(o));return Promise.resolve(r)}};var uo="cartFormInput";function J({children:e,action:t,inputs:r,route:o,fetcherKey:n}){let a=reactRouter.useFetcher({key:n});return jsxRuntime.jsxs(a.Form,{action:o||"",method:"post",children:[(t||r)&&jsxRuntime.jsx("input",{type:"hidden",name:uo,value:JSON.stringify({action:t,inputs:r})}),typeof e=="function"?e(a):e]})}J.INPUT_NAME=uo;J.ACTIONS={AttributesUpdateInput:"AttributesUpdateInput",BuyerIdentityUpdate:"BuyerIdentityUpdate",Create:"Create",DiscountCodesUpdate:"DiscountCodesUpdate",GiftCardCodesUpdate:"GiftCardCodesUpdate",GiftCardCodesAdd:"GiftCardCodesAdd",GiftCardCodesRemove:"GiftCardCodesRemove",LinesAdd:"LinesAdd",LinesRemove:"LinesRemove",LinesUpdate:"LinesUpdate",NoteUpdate:"NoteUpdate",SelectedDeliveryOptionsUpdate:"SelectedDeliveryOptionsUpdate",MetafieldsSet:"MetafieldsSet",MetafieldDelete:"MetafieldDelete",DeliveryAddressesAdd:"DeliveryAddressesAdd",DeliveryAddressesUpdate:"DeliveryAddressesUpdate",DeliveryAddressesRemove:"DeliveryAddressesRemove",DeliveryAddressesReplace:"DeliveryAddressesReplace"};function ua(e){let t={};for(let s of e.entries()){let c=s[0],i=e.getAll(c);t[c]=i.length>1?i:s[1],t[c]==="on"?t[c]=true:t[c]==="off"&&(t[c]=false);}let{cartFormInput:r,...o}=t,{action:n,inputs:a}=r?JSON.parse(String(r)):{};return {action:n,inputs:{...a,...o}}}J.getFormInput=ua;var Ft=e=>{let t=cookie.parse(wt(e,"Cookie")||"");return ()=>t.cart?`gid://shopify/Cart/${t.cart}`:void 0};var Ht=e=>t=>{let r=new Headers;return r.append("Set-Cookie",cookie.stringify("cart",t.split("/").pop()||"",{path:"/",...e})),r};function st(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`weak-${Math.random().toString(16).substring(2)}`}var Le="2026.1.1";function ge(e){return e.replace(/\s*#.*$/gm,"").replace(/\s+/gm," ").trim()}var fa=/(^|}\s)query[\s({]/im,ma=/(^|}\s)mutation[\s({]/im;function it(e,t){if(!fa.test(e))throw new Error(`[h2:error:${t}] Can only execute queries`)}function ct(e,t){if(!ma.test(e))throw new Error(`[h2:error:${t}] Can only execute mutations`)}var de=class extends Error{locations;path;extensions;constructor(t,r={}){let n=(r.clientOperation?`[h2:error:${r.clientOperation}] `:"")+t+(r.requestId?` - Request ID: ${r.requestId}`:"");super(n),this.name="GraphQLError",this.extensions=r.extensions,this.locations=r.locations,this.path=r.path,this.stack=r.stack||void 0;try{this.cause=JSON.stringify({...typeof r.cause=="object"?r.cause:{},requestId:r.requestId});}catch{r.cause&&(this.cause=r.cause);}}get[Symbol.toStringTag](){return this.name}toString(){let t=`${this.name}: ${this.message}`;if(this.path)try{t+=` | path: ${JSON.stringify(this.path)}`;}catch{}if(this.extensions)try{t+=` | extensions: ${JSON.stringify(this.extensions)}`;}catch{}return t+=`
23
+ `+s};return e.then(n=>{if(n?.errors&&Array.isArray(n.errors)){let a=typeof t.logErrors=="function"?t.logErrors:()=>t.logErrors??false;n.errors.forEach(s=>{s&&(s.stack=o(s.message,s.name),a(s)&&console.error(s));});}return n}).catch(n=>{throw n&&(n.stack=o(n.message,n.name)),n})}var j=void 0;var tt="public",Jn="private",_t="no-store",ro={maxAge:"max-age",staleWhileRevalidate:"stale-while-revalidate",sMaxAge:"s-maxage",staleIfError:"stale-if-error"};function Oe(e){let t=[];return Object.keys(e).forEach(r=>{r==="mode"?t.push(e[r]):ro[r]&&t.push(`${ro[r]}=${e[r]}`);}),t.join(", ")}function Ut(){return {mode:_t}}function Lt(e){if(e?.mode&&e?.mode!==tt&&e?.mode!==Jn)throw Error("'mode' must be either 'public' or 'private'")}function ue(e){return Lt(e),{mode:tt,maxAge:1,staleWhileRevalidate:9,...e}}function kt(e){return Lt(e),{mode:tt,maxAge:3600,staleWhileRevalidate:82800,...e}}function me(e){return Lt(e),{mode:tt,maxAge:1,staleWhileRevalidate:86399,...e}}function Nt(e){return e}function z(e){return String(e).includes("__proto__")?JSON.parse(e,Xn):JSON.parse(e)}function Xn(e,t){if(e!=="__proto__")return t}function rt(e,t){return e&&t?{...e,...t}:e||me()}function Mt(e){return Oe(rt(e))}async function Zn(e,t){if(!e)return;let r=await e.match(t);if(!r){return}return r}async function ea(e,t,r,o){if(!e)return;let n=rt(o),a=Mt(rt(n,{maxAge:(n.maxAge||0)+(n.staleWhileRevalidate||0)})),s=Mt(rt(n));r.headers.set("cache-control",a),r.headers.set("real-cache-control",s),r.headers.set("cache-put-date",String(Date.now())),await e.put(t,r);}async function ta(e,t){e&&await e.delete(t);}function ra(e,t){let r=e.headers.get("real-cache-control"),o=0;if(r){let a=r.match(/max-age=(\d*)/);a&&a.length>1&&(o=parseFloat(a[1]));}return [(Date.now()-Number(t))/1e3,o]}function oa(e,t){let r=t.headers.get("cache-put-date");if(!r)return false;let[o,n]=ra(t,r),a=o>n;return a}var ot={get:Zn,set:ea,delete:ta,generateDefaultCacheControlHeader:Mt,isStale:oa};function _e(e){return `https://shopify.dev/?${e}`}function na(e){return e||me()}async function oo(e,t){if(!e)return;let r=_e(t),o=new Request(r),n=await ot.get(e,o);if(!n)return;let a=await n.text();try{return [z(a),n]}catch{return [a,n]}}async function no(e,t,r,o){if(!e)return;let n=_e(t),a=new Request(n),s=new Response(JSON.stringify(r));await ot.set(e,a,s,na(o));}function ao(e,t){return ot.isStale(new Request(_e(e)),t)}function so(e){let t=Array.isArray(e)?e:[e],r="";for(let o of t)o!=null&&(typeof o=="object"?r+=JSON.stringify(o):r+=o.toString());return encodeURIComponent(r)}var Vt=new Set;async function nt(e,t,{strategy:r=ue(),cacheInstance:o,shouldCacheResult:n=()=>true,waitUntil:a,debugInfo:s}){let i=so([...typeof e=="string"?[e]:e]),y=f=>{({displayName:f.displayName,url:f.response?.url,responseInit:{status:f.response?.status||0,statusText:f.response?.statusText||"",headers:Array.from(f.response?.headers.entries()||[])}});},m=void 0;if(!o||!r||r.mode===_t){let f=await t({addDebugData:y});return f}let d=f=>no(o,i,{value:f,debugInfo:void 0},r),l=await oo(o,i);if(l&&typeof l[0]!="string"){let[{value:f,debugInfo:v},h]=l;let A=ao(i,h)?"STALE":"HIT";if(!Vt.has(i)&&A==="STALE"){Vt.add(i);let C=Promise.resolve().then(async()=>{let R=Date.now();try{let I=await t({addDebugData:y});n(I)&&(await d(I),m?.({result:I,cacheStatus:"PUT",overrideStartTime:R}));}catch(I){I.message&&(I.message="SWR in sub-request failed: "+I.message),console.error(I);}finally{Vt.delete(i);}});a?.(C);}return f}let P=await t({addDebugData:y});if(n(P)){let f=Promise.resolve().then(async()=>{await d(P);});a?.(f);}return P}var sa=["set-cookie","server-timing"];function io(e,t){return [e,{status:t.status,statusText:t.statusText,headers:[...t.headers].filter(([r])=>!sa.includes(r.toLowerCase()))}]}function co([e,t]){return [e,new Response(e,t)]}async function at(e,t,{cacheInstance:r,cache:o,cacheKey:n=[e,t],shouldCacheResponse:a,waitUntil:s,debugInfo:c,streamConfig:i,onRawHeaders:u}){return !o&&(!t.method||t.method==="GET")&&(o=ue()),nt(n,async()=>{if(i){let g=null,d=await graphqlClient.createGraphQLClient({url:e,customFetchApi:async(f,v)=>(g=await fetch(f,v),u?.(g.headers),g),headers:t.headers}).requestStream(i.query,{variables:i.variables}),l,P;for await(let f of d){let{data:v,errors:h}=f;l=v,P=h?.graphQLErrors??h;}return g?.ok?io({data:l,errors:P},g):g}let p=await fetch(e,t);if(u?.(p.headers),!p.ok)return p;let y=await p.text().catch(()=>"");try{y&&(y=z(y));}catch{}return io(y,p)},{cacheInstance:r,waitUntil:s,strategy:o??null,debugInfo:c,shouldCacheResult:p=>"ok"in p?!1:a(...co(p))}).then(p=>"ok"in p?[null,p]:co(p))}function ia(e){let{cache:t,waitUntil:r,request:o}=e;return {run:({cacheKey:n,cacheStrategy:a,shouldCacheResult:s},c)=>nt(n,c,{shouldCacheResult:s,strategy:a,cacheInstance:t,waitUntil:r,debugInfo:{...ne(o),stackInfo:j?.()}}),fetch:(n,a,s)=>at(n,a??{},{waitUntil:r,cacheKey:[n,a],cacheInstance:t,debugInfo:{url:n,...ne(o),stackInfo:j?.(),displayName:s?.displayName},cache:s.cacheStrategy,...s}).then(([c,i])=>({data:c,response:i}))}}var $t=class{#e;constructor(){this.#e=new Map;}add(t){throw new Error("Method not implemented. Use `put` instead.")}addAll(t){throw new Error("Method not implemented. Use `put` instead.")}matchAll(t,r){throw new Error("Method not implemented. Use `match` instead.")}async put(t,r){if(t.method!=="GET")throw new TypeError("Cannot cache response to non-GET request.");if(r.status===206)throw new TypeError("Cannot cache response to a range request (206 Partial Content).");if(r.headers.get("vary")?.includes("*"))throw new TypeError("Cannot cache response with 'Vary: *' header.");this.#e.set(t.url,{body:new Uint8Array(await r.arrayBuffer()),status:r.status,headers:[...r.headers],timestamp:Date.now()});}async match(t){if(t.method!=="GET")return;let r=this.#e.get(t.url);if(!r)return;let{body:o,timestamp:n,...a}=r,s=new Headers(a.headers),c=s.get("cache-control")||s.get("real-cache-control")||"",i=parseInt(c.match(/max-age=(\d+)/)?.[1]||"0",10),u=parseInt(c.match(/stale-while-revalidate=(\d+)/)?.[1]||"0",10),p=(Date.now()-n)/1e3;if(p>i+u){this.#e.delete(t.url);return}let g=p>i;return s.set("cache",g?"STALE":"HIT"),s.set("date",new Date(n).toUTCString()),new Response(o,{status:a.status??200,headers:s})}async delete(t){return this.#e.has(t.url)?(this.#e.delete(t.url),true):false}keys(t){let r=[];for(let o of this.#e.keys())(!t||t.url===o)&&r.push(new Request(o));return Promise.resolve(r)}};var uo="cartFormInput";function J({children:e,action:t,inputs:r,route:o,fetcherKey:n}){let a=reactRouter.useFetcher({key:n});return jsxRuntime.jsxs(a.Form,{action:o||"",method:"post",children:[(t||r)&&jsxRuntime.jsx("input",{type:"hidden",name:uo,value:JSON.stringify({action:t,inputs:r})}),typeof e=="function"?e(a):e]})}J.INPUT_NAME=uo;J.ACTIONS={AttributesUpdateInput:"AttributesUpdateInput",BuyerIdentityUpdate:"BuyerIdentityUpdate",Create:"Create",DiscountCodesUpdate:"DiscountCodesUpdate",GiftCardCodesUpdate:"GiftCardCodesUpdate",GiftCardCodesAdd:"GiftCardCodesAdd",GiftCardCodesRemove:"GiftCardCodesRemove",LinesAdd:"LinesAdd",LinesRemove:"LinesRemove",LinesUpdate:"LinesUpdate",NoteUpdate:"NoteUpdate",SelectedDeliveryOptionsUpdate:"SelectedDeliveryOptionsUpdate",MetafieldsSet:"MetafieldsSet",MetafieldDelete:"MetafieldDelete",DeliveryAddressesAdd:"DeliveryAddressesAdd",DeliveryAddressesUpdate:"DeliveryAddressesUpdate",DeliveryAddressesRemove:"DeliveryAddressesRemove",DeliveryAddressesReplace:"DeliveryAddressesReplace"};function ua(e){let t={};for(let s of e.entries()){let c=s[0],i=e.getAll(c);t[c]=i.length>1?i:s[1],t[c]==="on"?t[c]=true:t[c]==="off"&&(t[c]=false);}let{cartFormInput:r,...o}=t,{action:n,inputs:a}=r?JSON.parse(String(r)):{};return {action:n,inputs:{...a,...o}}}J.getFormInput=ua;var Ft=e=>{let t=cookie.parse(wt(e,"Cookie")||"");return ()=>t.cart?`gid://shopify/Cart/${t.cart}`:void 0};var Ht=e=>t=>{let r=new Headers;return r.append("Set-Cookie",cookie.stringify("cart",t.split("/").pop()||"",{path:"/",...e})),r};function st(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`weak-${Math.random().toString(16).substring(2)}`}var Ue="2026.1.3";function ge(e){return e.replace(/\s*#.*$/gm,"").replace(/\s+/gm," ").trim()}var fa=/(^|}\s)query[\s({]/im,ma=/(^|}\s)mutation[\s({]/im;function it(e,t){if(!fa.test(e))throw new Error(`[h2:error:${t}] Can only execute queries`)}function ct(e,t){if(!ma.test(e))throw new Error(`[h2:error:${t}] Can only execute mutations`)}var de=class extends Error{locations;path;extensions;constructor(t,r={}){let n=(r.clientOperation?`[h2:error:${r.clientOperation}] `:"")+t+(r.requestId?` - Request ID: ${r.requestId}`:"");super(n),this.name="GraphQLError",this.extensions=r.extensions,this.locations=r.locations,this.path=r.path,this.stack=r.stack||void 0;try{this.cause=JSON.stringify({...typeof r.cause=="object"?r.cause:{},requestId:r.requestId});}catch{r.cause&&(this.cause=r.cause);}}get[Symbol.toStringTag](){return this.name}toString(){let t=`${this.name}: ${this.message}`;if(this.path)try{t+=` | path: ${JSON.stringify(this.path)}`;}catch{}if(this.extensions)try{t+=` | extensions: ${JSON.stringify(this.extensions)}`;}catch{}return t+=`
24
24
  `,this.stack&&(t+=`${this.stack.slice(this.stack.indexOf(`
25
25
  `)+1)}
26
- `),t}toJSON(){return {name:"Error",message:""}}};function Ue({url:e,response:t,errors:r,type:o,query:n,queryVariables:a,ErrorConstructor:s=Error,client:c="storefront"}){let i=(typeof r=="string"?r:r?.map?.(d=>d.message).join(`
26
+ `),t}toJSON(){return {name:"Error",message:""}}};function Le({url:e,response:t,errors:r,type:o,query:n,queryVariables:a,ErrorConstructor:s=Error,client:c="storefront"}){let i=(typeof r=="string"?r:r?.map?.(p=>p.message).join(`
27
27
  `))||`URL: ${e}
28
- API response error: ${t.status}`,u=new de(i,{query:n,queryVariables:a,cause:{errors:r},clientOperation:`${c}.${o}`,requestId:t.headers.get("x-request-id")});throw new s(u.message,{cause:u.cause})}var Aa={language:"EN",country:"US"};function mo(e){let {storefrontHeaders:t,cache:r,waitUntil:o,i18n:n,storefrontId:a,logErrors:s=true,...c}=e,{getPublicTokenHeaders:u,getPrivateTokenHeaders:d,getStorefrontApiUrl:y,getShopifyDomain:g}=hydrogenReact.createStorefrontClient(c),p=(c.privateStorefrontToken?d:u)({contentType:"json",buyerIp:t?.buyerIp||""});t?.buyerIp&&(p[St]=t.buyerIp),t?.buyerIpSig&&(p[Re]=t.buyerIpSig),p[Qe]=t?.requestGroupId||st(),a&&(p[hydrogenReact.SHOPIFY_STOREFRONT_ID_HEADER]=a),(p["user-agent"]=`Hydrogen ${Le}`);let l=t?.cookie??"";l&&(p.cookie=l);let P,f;if(!/\b_shopify_(analytics|marketing)=/.test(l)){let C=l.match(/\b_shopify_y=([^;]+)/)?.[1],R=l.match(/\b_shopify_s=([^;]+)/)?.[1];C&&(p[hydrogenReact.SHOPIFY_STOREFRONT_Y_HEADER]=C),R&&(p[hydrogenReact.SHOPIFY_STOREFRONT_S_HEADER]=R),P=C??st(),f=R??st(),p[hydrogenReact.SHOPIFY_UNIQUE_TOKEN_HEADER]=P,p[hydrogenReact.SHOPIFY_VISIT_TOKEN_HEADER]=f;}let v,h=JSON.stringify({"content-type":p["content-type"],"user-agent":p["user-agent"],[Ct]:p[Ct],[ht]:p[ht],[At]:p[At],[We]:p[We]});async function A({query:C,mutation:R,variables:I,cache:N,headers:k=[],storefrontApiVersion:ie,displayName:Ge,stackInfo:Be}){let S=k instanceof Headers?Object.fromEntries(k.entries()):Array.isArray(k)?Object.fromEntries(k):k,E=C??R,x={...I};n&&(!I?.country&&/\$country/.test(E)&&(x.country=n.country),!I?.language&&/\$language/.test(E)&&(x.language=n.language));let O=y({storefrontApiVersion:ie}),V=JSON.stringify({query:E,variables:x}),q={method:"POST",headers:{...p,...S},body:V},M=[O,q.method,h,q.body],ee=E.includes("@defer")?{query:E,variables:x}:void 0,[K,_]=await at(O,q,{cacheInstance:R?void 0:r,cache:N||me(),cacheKey:M,waitUntil:o,shouldCacheResponse:$=>!$?.errors,debugInfo:{requestId:q.headers[Qe],displayName:Ge,url:O,stackInfo:Be,graphql:V,purpose:t?.purpose},streamConfig:ee,onRawHeaders:$=>{v??={setCookie:$.getSetCookie(),serverTiming:$.get("server-timing")??""};}}),Q={url:O,response:_,type:R?"mutation":"query",query:E,queryVariables:x,errors:void 0};if(!_.ok){let $,te=K;try{te??=await _.text(),$=z(te);}catch{$=[{message:te??"Could not parse Storefront API response"}];}Ue({...Q,errors:$});}let{data:Pe,errors:G}=K;G=G?Array.isArray(G)?G:[G]:void 0;let ve=G?.map(({message:$,...te})=>new de($,{...te,clientOperation:`storefront.${Q.type}`,requestId:_.headers.get("x-request-id"),queryVariables:x,query:E}));return T(Pe,ve)}return {storefront:{query(C,R){C=ge(C),it(C,"storefront.query");let I=fo?.(C);return fe(A({...R,query:C,stackInfo:j?.(I)}),{stackOffset:I,logErrors:s})},mutate(C,R){C=ge(C),ct(C,"storefront.mutate");let I=fo?.(C);return fe(A({...R,mutation:C,stackInfo:j?.(I)}),{stackOffset:I,logErrors:s})},cache:r,CacheNone:Lt,CacheLong:kt,CacheShort:ue,CacheCustom:Nt,generateCacheControlHeader:Oe,getPublicTokenHeaders:u,getPrivateTokenHeaders:d,getHeaders:()=>({...p}),getShopifyDomain:g,getApiUrl:y,i18n:n??Aa,isStorefrontApiUrl(C){return Dt.test(xt(C.url??""))},async forward(C,R){let I=new Headers([...Ot(ie=>C.headers.get(ie),["accept","accept-encoding","accept-language","access-control-request-headers","access-control-request-method","content-type","content-length","cookie","origin","referer","user-agent",We,hydrogenReact.SHOPIFY_UNIQUE_TOKEN_HEADER,hydrogenReact.SHOPIFY_VISIT_TOKEN_HEADER]),...Ot(ie=>p[ie],[St,Re,hydrogenReact.SHOPIFY_STOREFRONT_ID_HEADER,Qe])]);t?.buyerIp&&I.set("x-forwarded-for",t.buyerIp);let N=R?.storefrontApiVersion??xt(C.url).match(Dt)?.[1],k=await fetch(y({storefrontApiVersion:N}),{method:C.method,body:C.body,headers:I});return new Response(k.body,k)},setCollectedSubrequestHeaders:C=>{if(v)for(let k of v.setCookie)C.headers.append("Set-Cookie",k);let R=Dr(v?.serverTiming),I=C.headers.get("content-type")?.startsWith("text/html");Ie(C,{...I?{_y:P,_s:f}:void 0,...R}),I&&v&&v.setCookie.length>1&&R?._y&&R?._s&&R?._cmp&&Ie(C,{[Ke]:"1"});}}}}var fo=void 0;function T(e,t){return {...e,...t&&{errors:t}}}function qt({storefront:e,customerAccount:t,getCartId:r,cartFragment:o}){return async n=>{let a=r();if(!a)return null;let[s,{cart:c,errors:i}]=await Promise.all([t?t.isLoggedIn():false,e.query(Sa(o),{variables:{cartId:a,...n},cache:e.CacheNone()})]);if(s&&c?.checkoutUrl){let u=new URL(c.checkoutUrl);u.searchParams.set("logged_in","true"),c.checkoutUrl=u.toString();}return c||i?T(c,i):null}}var Sa=(e=Pa)=>`#graphql
28
+ API response error: ${t.status}`,u=new de(i,{query:n,queryVariables:a,cause:{errors:r},clientOperation:`${c}.${o}`,requestId:t.headers.get("x-request-id")});throw new s(u.message,{cause:u.cause})}var Aa={language:"EN",country:"US"};function mo(e){let {storefrontHeaders:t,cache:r,waitUntil:o,i18n:n,storefrontId:a,logErrors:s=true,...c}=e,{getPublicTokenHeaders:u,getPrivateTokenHeaders:p,getStorefrontApiUrl:y,getShopifyDomain:g}=hydrogenReact.createStorefrontClient(c),d=(c.privateStorefrontToken?p:u)({contentType:"json",buyerIp:t?.buyerIp||""});t?.buyerIp&&(d[St]=t.buyerIp),t?.buyerIpSig&&(d[Re]=t.buyerIpSig),d[Qe]=t?.requestGroupId||st(),a&&(d[hydrogenReact.SHOPIFY_STOREFRONT_ID_HEADER]=a),(d["user-agent"]=`Hydrogen ${Ue}`);let l=t?.cookie??"";l&&(d.cookie=l);let P,f;if(!/\b_shopify_(analytics|marketing)=/.test(l)){let C=l.match(/\b_shopify_y=([^;]+)/)?.[1],R=l.match(/\b_shopify_s=([^;]+)/)?.[1];C&&(d[hydrogenReact.SHOPIFY_STOREFRONT_Y_HEADER]=C),R&&(d[hydrogenReact.SHOPIFY_STOREFRONT_S_HEADER]=R),P=C??st(),f=R??st(),d[hydrogenReact.SHOPIFY_UNIQUE_TOKEN_HEADER]=P,d[hydrogenReact.SHOPIFY_VISIT_TOKEN_HEADER]=f;}let v,h=JSON.stringify({"content-type":d["content-type"],"user-agent":d["user-agent"],[Ct]:d[Ct],[ht]:d[ht],[At]:d[At],[We]:d[We]});async function A({query:C,mutation:R,variables:I,cache:N,headers:k=[],storefrontApiVersion:ie,displayName:Ge,stackInfo:Be}){let S=k instanceof Headers?Object.fromEntries(k.entries()):Array.isArray(k)?Object.fromEntries(k):k,E=C??R,x={...I};n&&(!I?.country&&/\$country/.test(E)&&(x.country=n.country),!I?.language&&/\$language/.test(E)&&(x.language=n.language));let O=y({storefrontApiVersion:ie}),M=JSON.stringify({query:E,variables:x}),q={method:"POST",headers:{...d,...S},body:M},V=[O,q.method,h,q.body],ee=E.includes("@defer")?{query:E,variables:x}:void 0,[K,_]=await at(O,q,{cacheInstance:R?void 0:r,cache:N||me(),cacheKey:V,waitUntil:o,shouldCacheResponse:$=>!$?.errors,debugInfo:{requestId:q.headers[Qe],displayName:Ge,url:O,stackInfo:Be,graphql:M,purpose:t?.purpose},streamConfig:ee,onRawHeaders:$=>{v??={setCookie:$.getSetCookie(),serverTiming:$.get("server-timing")??""};}}),Q={url:O,response:_,type:R?"mutation":"query",query:E,queryVariables:x,errors:void 0};if(!_.ok){let $,te=K;try{te??=await _.text(),$=z(te);}catch{$=[{message:te??"Could not parse Storefront API response"}];}Le({...Q,errors:$});}let{data:Pe,errors:G}=K;G=G?Array.isArray(G)?G:[G]:void 0;let ve=G?.map(({message:$,...te})=>new de($,{...te,clientOperation:`storefront.${Q.type}`,requestId:_.headers.get("x-request-id"),queryVariables:x,query:E}));return T(Pe,ve)}return {storefront:{query(C,R){C=ge(C),it(C,"storefront.query");let I=fo?.(C);return fe(A({...R,query:C,stackInfo:j?.(I)}),{stackOffset:I,logErrors:s})},mutate(C,R){C=ge(C),ct(C,"storefront.mutate");let I=fo?.(C);return fe(A({...R,mutation:C,stackInfo:j?.(I)}),{stackOffset:I,logErrors:s})},cache:r,CacheNone:Ut,CacheLong:kt,CacheShort:ue,CacheCustom:Nt,generateCacheControlHeader:Oe,getPublicTokenHeaders:u,getPrivateTokenHeaders:p,getHeaders:()=>({...d}),getShopifyDomain:g,getApiUrl:y,i18n:n??Aa,isStorefrontApiUrl(C){return Dt.test(xt(C.url??""))},async forward(C,R){let I=new Headers([...Ot(ie=>C.headers.get(ie),["accept","accept-encoding","accept-language","access-control-request-headers","access-control-request-method","content-type","content-length","cookie","origin","referer","user-agent",We,hydrogenReact.SHOPIFY_UNIQUE_TOKEN_HEADER,hydrogenReact.SHOPIFY_VISIT_TOKEN_HEADER]),...Ot(ie=>d[ie],[St,Re,hydrogenReact.SHOPIFY_STOREFRONT_ID_HEADER,Qe])]);t?.buyerIp&&I.set("x-forwarded-for",t.buyerIp);let N=R?.storefrontApiVersion??xt(C.url).match(Dt)?.[1],k=await fetch(y({storefrontApiVersion:N}),{method:C.method,body:C.body,headers:I});return new Response(k.body,k)},setCollectedSubrequestHeaders:C=>{if(v)for(let k of v.setCookie)C.headers.append("Set-Cookie",k);let R=Dr(v?.serverTiming),I=C.headers.get("content-type")?.startsWith("text/html");Ie(C,{...I?{_y:P,_s:f}:void 0,...R}),I&&v&&v.setCookie.length>1&&R?._y&&R?._s&&R?._cmp&&Ie(C,{[Ke]:"1"});}}}}var fo=void 0;function T(e,t){return {...e,...t&&{errors:t}}}function qt({storefront:e,customerAccount:t,getCartId:r,cartFragment:o}){return async n=>{let a=r();if(!a)return null;let[s,{cart:c,errors:i}]=await Promise.all([t?t.isLoggedIn():false,e.query(Sa(o),{variables:{cartId:a,...n},cache:e.CacheNone()})]);if(s&&c?.checkoutUrl){let u=new URL(c.checkoutUrl);u.searchParams.set("logged_in","true"),c.checkoutUrl=u.toString();}return c||i?T(c,i):null}}var Sa=(e=Pa)=>`#graphql
29
29
  query CartQuery(
30
30
  $cartId: ID!
31
31
  $numCartLines: Int = 100
@@ -412,7 +412,7 @@ API response error: ${t.status}`,u=new de(i,{query:n,queryVariables:a,cause:{err
412
412
  }
413
413
  }
414
414
  }
415
- `;function er(e){return async(t,r)=>{let{cartGiftCardCodesUpdate:o,errors:n}=await e.storefront.mutate(La(e.cartFragment),{variables:{cartId:e.getCartId(),giftCardCodes:t,...r}});return T(o,n)}}var La=(e=w)=>`#graphql
415
+ `;function er(e){return async(t,r)=>{let{cartGiftCardCodesUpdate:o,errors:n}=await e.storefront.mutate(Ua(e.cartFragment),{variables:{cartId:e.getCartId(),giftCardCodes:t,...r}});return T(o,n)}}var Ua=(e=w)=>`#graphql
416
416
  mutation cartGiftCardCodesUpdate(
417
417
  $cartId: ID!
418
418
  $giftCardCodes: [String!]!
@@ -435,7 +435,7 @@ API response error: ${t.status}`,u=new de(i,{query:n,queryVariables:a,cause:{err
435
435
  ${e}
436
436
  ${b}
437
437
  ${D}
438
- `;function tr(e){return async(t,r)=>{let{cartGiftCardCodesAdd:o,errors:n}=await e.storefront.mutate(Ua(e.cartFragment),{variables:{cartId:e.getCartId(),giftCardCodes:t,...r}});return T(o,n)}}var Ua=(e=w)=>`#graphql
438
+ `;function tr(e){return async(t,r)=>{let{cartGiftCardCodesAdd:o,errors:n}=await e.storefront.mutate(La(e.cartFragment),{variables:{cartId:e.getCartId(),giftCardCodes:t,...r}});return T(o,n)}}var La=(e=w)=>`#graphql
439
439
  mutation cartGiftCardCodesAdd(
440
440
  $cartId: ID!
441
441
  $giftCardCodes: [String!]!
@@ -503,7 +503,7 @@ API response error: ${t.status}`,u=new de(i,{query:n,queryVariables:a,cause:{err
503
503
  ${e}
504
504
  ${b}
505
505
  ${D}
506
- `;function Ao(e){return async(t,r)=>{let{cartDeliveryAddressesRemove:o,errors:n}=await e.storefront.mutate(Va(e.cartFragment),{variables:{cartId:e.getCartId(),addressIds:t,...r}});return T(o,n)}}var Va=(e=w)=>`#graphql
506
+ `;function Ao(e){return async(t,r)=>{let{cartDeliveryAddressesRemove:o,errors:n}=await e.storefront.mutate(Ma(e.cartFragment),{variables:{cartId:e.getCartId(),addressIds:t,...r}});return T(o,n)}}var Ma=(e=w)=>`#graphql
507
507
  mutation cartDeliveryAddressesRemove(
508
508
  $cartId: ID!
509
509
  $addressIds: [ID!]!,
@@ -526,7 +526,7 @@ API response error: ${t.status}`,u=new de(i,{query:n,queryVariables:a,cause:{err
526
526
  ${e}
527
527
  ${b}
528
528
  ${D}
529
- `;function So(e){return async(t,r)=>{let{cartDeliveryAddressesUpdate:o,errors:n}=await e.storefront.mutate(Ma(e.cartFragment),{variables:{cartId:e.getCartId(),addresses:t,...r}});return T(o,n)}}var Ma=(e=w)=>`#graphql
529
+ `;function So(e){return async(t,r)=>{let{cartDeliveryAddressesUpdate:o,errors:n}=await e.storefront.mutate(Va(e.cartFragment),{variables:{cartId:e.getCartId(),addresses:t,...r}});return T(o,n)}}var Va=(e=w)=>`#graphql
530
530
  mutation cartDeliveryAddressesUpdate(
531
531
  $cartId: ID!
532
532
  $addresses: [CartSelectableAddressUpdateInput!]!,
@@ -571,7 +571,7 @@ API response error: ${t.status}`,u=new de(i,{query:n,queryVariables:a,cause:{err
571
571
  ${e}
572
572
  ${b}
573
573
  ${D}
574
- `;function or(e){let{getCartId:t,setCartId:r,storefront:o,customerAccount:n,cartQueryFragment:a,cartMutateFragment:s,buyerIdentity:c}=e,i=t(),u=()=>i||t(),d={storefront:o,getCartId:u,cartFragment:s,customerAccount:n},y=Gt(d),g=async function(...p){p[0].buyerIdentity={...c,...p[0].buyerIdentity};let l=await y(...p);return i=l?.cart?.id,l},m={get:qt({storefront:o,customerAccount:n,getCartId:u,cartFragment:a}),getCartId:u,setCartId:r,create:g,addLines:async(p,l)=>{let P=p.map(f=>({attributes:f.attributes,quantity:f.quantity,merchandiseId:f.merchandiseId,sellingPlanId:f.sellingPlanId,parent:f.parent}));return i||l?.cartId?await Bt(d)(P,l):await g({lines:P,buyerIdentity:c},l)},updateLines:Qt(d),removeLines:Wt(d),updateDiscountCodes:async(p,l)=>i||l?.cartId?await jt(d)(p,l):await g({discountCodes:p},l),updateGiftCardCodes:async(p,l)=>i||l?.cartId?await er(d)(p,l):await g({giftCardCodes:p},l),addGiftCardCodes:tr(d),removeGiftCardCodes:rr(d),updateBuyerIdentity:async(p,l)=>i||l?.cartId?await Kt(d)(p,l):await g({buyerIdentity:p},l),updateNote:async(p,l)=>i||l?.cartId?await Yt(d)(p,l):await g({note:p},l),updateSelectedDeliveryOption:zt(d),updateAttributes:async(p,l)=>i||l?.cartId?await Jt(d)(p,l):await g({attributes:p},l),setMetafields:async(p,l)=>i||l?.cartId?await Xt(d)(p,l):await g({metafields:p},l),deleteMetafield:Zt(d),addDeliveryAddresses:ho(d),removeDeliveryAddresses:Ao(d),updateDeliveryAddresses:So(d),replaceDeliveryAddresses:Po(d)};return "customMethods"in e?{...m,...e.customMethods??{}}:m}function Ha(e){let t=reactRouter.useFetchers();if(!t||!t.length)return e;let r=e?.lines?structuredClone(e):{lines:{nodes:[]}},o=r.lines.nodes,n=false;for(let{formData:a}of t){if(!a)continue;let s=J.getFormInput(a);if(s.action===J.ACTIONS.LinesAdd)for(let c of s.inputs.lines){if(!c.selectedVariant){console.error("[h2:error:useOptimisticCart] No selected variant was passed in the cart action. Make sure to pass the selected variant if you want to use an optimistic cart");continue}let i=o.find(u=>u.merchandise.id===c.selectedVariant?.id);n=true,i?(i.quantity=(i.quantity||1)+(c.quantity||1),i.isOptimistic=true):o.unshift({id:Co(c.selectedVariant.id),merchandise:c.selectedVariant,isOptimistic:true,quantity:c.quantity||1});}else if(s.action===J.ACTIONS.LinesRemove)for(let c of s.inputs.lineIds){let i=o.findIndex(u=>u.id===c);if(i!==-1){if(ut(o[i].id)){console.error("[h2:error:useOptimisticCart] Tried to remove an optimistic line that has not been added to the cart yet");continue}o.splice(i,1),n=true;}else console.warn(`[h2:warn:useOptimisticCart] Tried to remove line '${c}' but it doesn't exist in the cart`);}else if(s.action===J.ACTIONS.LinesUpdate)for(let c of s.inputs.lines){let i=o.findIndex(u=>c.id===u.id);if(i>-1){if(ut(o[i].id)){console.error("[h2:error:useOptimisticCart] Tried to update an optimistic line that has not been added to the cart yet");continue}o[i].quantity=c.quantity,o[i].quantity===0&&o.splice(i,1),n=true;}else console.warn(`[h2:warn:useOptimisticCart] Tried to update line '${c.id}' but it doesn't exist in the cart`);}}return n&&(r.isOptimistic=n),r.totalQuantity=o.reduce((a,s)=>a+s.quantity,0),r}var qa="https://raw.githubusercontent.com/Shopify/hydrogen/main/docs/changelog.json";async function Ga({request:e,changelogUrl:t}){new URL(e.url).searchParams;return fetch(t||qa)}var ke=reactRouter.createContext(),nr=reactRouter.createContext(),ar=reactRouter.createContext(),sr=reactRouter.createContext(),ir=reactRouter.createContext(),cr=reactRouter.createContext(),Ba={storefront:ke,cart:nr,customerAccount:ar,env:sr,session:ir,waitUntil:cr};var pt="2026-01",he=`Shopify Hydrogen ${Le}`,vo="30243aa5-17c1-465a-8493-944bcc4e88aa",L="customerAccount",Ae="buyer";var H=class extends Response{constructor(t,r,o){super(`Bad request: ${t}`,{status:400,headers:o});}};function Ve(e,t={}){let r=t.headers?new Headers(t.headers):new Headers({});return r.set("location",e),new Response(null,{status:t.status||302,headers:r})}async function Qa({session:e,customerAccountId:t,customerAccountTokenExchangeUrl:r,httpsOrigin:o,debugInfo:n}){let a=new URLSearchParams,s=e.get(L),c=s?.refreshToken,i=s?.idToken;if(!c)throw new H("Unauthorized","No refreshToken found in the session. Make sure your session is configured correctly and passed to `createCustomerAccountClient`.");a.append("grant_type","refresh_token"),a.append("refresh_token",c),a.append("client_id",t);let u={"content-type":"application/x-www-form-urlencoded","User-Agent":he,Origin:o};new Date().getTime();let y=r,g=await fetch(y,{method:"POST",headers:u,body:a});if(!g.ok){let P=await g.text();throw new Response(P,{status:g.status,headers:{"Content-Type":"text/html; charset=utf-8"}})}let{access_token:m,expires_in:p,refresh_token:l}=await g.json();if(!m||m.length===0)throw new H("Unauthorized","Invalid access token received.");e.set(L,{accessToken:m,expiresAt:new Date(new Date().getTime()+(p-120)*1e3).getTime()+"",refreshToken:l,idToken:i});}function Se(e){e.unset(L),e.unset(Ae);}async function Ro({locks:e,expiresAt:t,session:r,customerAccountId:o,customerAccountTokenExchangeUrl:n,httpsOrigin:a,debugInfo:s}){if(parseInt(t,10)-1e3<new Date().getTime())try{e.refresh||(e.refresh=Qa({session:r,customerAccountId:o,customerAccountTokenExchangeUrl:n,httpsOrigin:a,debugInfo:s})),await e.refresh,delete e.refresh;}catch(c){throw Se(r),c&&c.status!==401?c:new H("Unauthorized","Login before querying the Customer Account API.")}}function Io(){let e=Wa();return Eo(e)}async function To(e){let t=await crypto.subtle.digest({name:"SHA-256"},new TextEncoder().encode(e)),r=ja(t);return Eo(r)}function Wa(){let e=new Uint8Array(32);return crypto.getRandomValues(e),String.fromCharCode.apply(null,Array.from(e))}function Eo(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ja(e){let t=new Uint8Array(e),r=Array.from(t);return String.fromCharCode(...r)}function bo(){let e=Date.now().toString(),t=Math.random().toString(36).substring(2);return e+t}async function wo(e,t,r,o,n){let a=t;if(!e)throw new H("Unauthorized","oAuth access token was not provided during token exchange.");let s=new URLSearchParams;s.append("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),s.append("client_id",a),s.append("audience",vo),s.append("subject_token",e),s.append("subject_token_type","urn:ietf:params:oauth:token-type:access_token"),s.append("scopes","https://api.customers.com/auth/customer.graphql");let c={"content-type":"application/x-www-form-urlencoded","User-Agent":he,Origin:o};new Date().getTime();let u=r,d=await fetch(u,{method:"POST",headers:c,body:s});let y=await d.json();if(y.error)throw new H(y.error_description);return y.access_token}function Do(e){return Ka(e).payload.nonce}function Ka(e){let[t,r,o]=e.split("."),n=JSON.parse(atob(t)),a=JSON.parse(atob(r));return {header:n,payload:a,signature:o}}function lt(){return za(Ya())}function Ya(){try{return crypto.getRandomValues(new Uint8Array(16))}catch{return new Uint8Array(16).map(()=>Math.random()*255|0)}}function za(e){return Array.from(e,function(t){return ("0"+(t&255).toString(16)).slice(-2)}).join("")}function yt(e){if(!e)return;let{pathname:t,search:r}=new URL(e),o=t+r,n=new URLSearchParams(r),a=n.get("return_to")||n.get("redirect");if(a){if(Oo(e,a))return a;console.warn(`Cross-domain redirects are not supported. Tried to redirect from ${o} to ${a}`);}}function Oo(e,t){try{return new URL(e).origin===new URL(t,e).origin}catch{return false}}function ur({requestUrl:e,defaultUrl:t,redirectUrl:r}){let o=e,n=xo(e,t),a=r?xo(e,r):n;return Oo(e,a.toString())?a.toString():(console.warn(`Cross-domain redirects are not supported. Tried to redirect from ${o} to ${a}. Default url ${n} is used instead.`),n.toString())}function xo(e,t){return Ja(t)?new URL(t):new URL(t,new URL(e).origin)}function Ja(e){try{return new URL(e),!0}catch{return false}}function _o(e,t){let r=`https://shopify.com/${t}`,o=`https://shopify.com/authentication/${t}`;return function(a){switch(a){case "CA_BASE_URL":return r;case "CA_BASE_AUTH_URL":return o;case "GRAPHQL":return `${r}/account/customer/api/${e}/graphql`;case "AUTH":return `${o}/oauth/authorize`;case "LOGIN_SCOPE":return t?"openid email customer-account-api:full":"openid email https://api.customers.com/auth/customer.graphql";case "TOKEN_EXCHANGE":return `${o}/oauth/token`;case "LOGOUT":return `${o}/logout`}}}function Xa(e,t){if(!e.url)return t;let{pathname:r}=new URL(e.url),o=r.replace(/\.data$/,"").replace(/\/_root$/,"/").replace(/(.+)\/$/,"$1"),n=t+`?${new URLSearchParams({return_to:o}).toString()}`;return Ve(n)}function pr({session:e,customerAccountId:t,shopId:r,customerApiVersion:o=pt,request:n,waitUntil:a,authUrl:s,customAuthStatusHandler:c,logErrors:i=true,loginPath:u="/account/login",authorizePath:d="/account/authorize",defaultRedirectPath:y="/account",language:g}){if(o!==pt&&console.warn(`[h2:warn:createCustomerAccountClient] You are using Customer Account API version ${o} when this version of Hydrogen was built for ${pt}.`),e||console.warn("[h2:warn:createCustomerAccountClient] session is required to use Customer Account API. Ensure the session object passed in exist."),!n?.url)throw new Error("[h2:error:createCustomerAccountClient] The request object does not contain a URL.");let m=c||(()=>Xa(n,u)),p=new URL(n.url),l=p.protocol==="http:"?p.origin.replace("http","https"):p.origin,P=ur({requestUrl:l,defaultUrl:d,redirectUrl:s}),f=_o(o,r),v=Za(f,t),h=f("GRAPHQL"),A={};async function C({query:S,type:E,variables:x={}}){let O=await N();if(!O)throw m();new Date().getTime();let M=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":he,Origin:l,Authorization:O},body:JSON.stringify({query:S,variables:x})});let ee=await M.text(),K={url:h,response:M,type:E,query:S,queryVariables:x,errors:void 0,client:"customer"};if(!M.ok){if(M.status===401)throw Se(e),m();let _;try{_=z(ee);}catch{_=[{message:ee}];}Ue({...K,errors:_});}try{let _=z(ee),{errors:Q}=_,Pe=Q?.map(({message:G,...ve})=>new de(G,{...ve,clientOperation:`customerAccount.${K.type}`,requestId:M.headers.get("x-request-id"),queryVariables:x,query:S}));return {..._,...Q&&{errors:Pe}}}catch{Ue({...K,errors:[{message:ee}]});}}async function R(){if(!r)return false;let S=e.get(L),E=S?.accessToken,x=S?.expiresAt;if(!E||!x)return false;let O=j?.();try{await Ro({locks:A,expiresAt:x,session:e,customerAccountId:t,customerAccountTokenExchangeUrl:f("TOKEN_EXCHANGE"),httpsOrigin:l,debugInfo:{waitUntil:a,stackInfo:O,...ne(n)}});}catch{return false}return true}async function I(){if(!await R())throw m()}async function N(){if(await R())return e.get(L)?.accessToken}async function k(S,E){return v(),S=ge(S),ct(S,"customer.mutate"),fe(C({query:S,type:"mutation",...E}),{logErrors:i})}async function ie(S,E){return v(),S=ge(S),it(S,"customer.query"),fe(C({query:S,type:"query",...E}),{logErrors:i})}function Ge(S){e.set(Ae,{...e.get(Ae),...S});}async function Be(){let S=await N();if(S)return {...e.get(Ae),customerAccessToken:S}}return {i18n:{language:g??"EN"},login:async S=>{v();let E=new URL(f("AUTH")),x=bo(),O=lt();E.searchParams.set("client_id",t),E.searchParams.set("scope","openid email"),E.searchParams.append("response_type","code"),E.searchParams.append("redirect_uri",P),E.searchParams.set("scope",f("LOGIN_SCOPE")),E.searchParams.append("state",x),E.searchParams.append("nonce",O);let V=es({contextLanguage:g??null,localeOverride:S?.locale??null,uiLocalesOverride:S?.uiLocales??null});V!=null&&E.searchParams.append("locale",V),S?.countryCode&&E.searchParams.append("region_country",S.countryCode),S?.acrValues&&E.searchParams.append("acr_values",S.acrValues),S?.loginHint&&(E.searchParams.append("login_hint",S.loginHint),S?.loginHintMode&&E.searchParams.append("login_hint_mode",S.loginHintMode));let q=Io(),M=await To(q);return e.set(L,{...e.get(L),codeVerifier:q,state:x,nonce:O,redirectPath:yt(n.url)||W(n,"Referer")||y}),E.searchParams.append("code_challenge",M),E.searchParams.append("code_challenge_method","S256"),Ve(E.toString())},logout:async S=>{v();let E=e.get(L)?.idToken,x=ur({requestUrl:l,defaultUrl:l,redirectUrl:S?.postLogoutRedirectUri}),O=E?new URL(`${f("LOGOUT")}?${new URLSearchParams([["id_token_hint",E],["post_logout_redirect_uri",x]]).toString()}`).toString():x;Se(e);let V=S?.headers instanceof Headers?S?.headers:new Headers(S?.headers);return S?.keepSession||(e.destroy?V.set("Set-Cookie",await e.destroy()):console.warn("[h2:warn:customerAccount] session.destroy is not available on your session implementation. All session data might not be cleared on logout."),e.isPending=false),Ve(O,{headers:V})},isLoggedIn:R,handleAuthStatus:I,getAccessToken:N,getApiUrl:()=>h,mutate:k,query:ie,authorize:async()=>{v();let S=p.searchParams.get("code"),E=p.searchParams.get("state");if(!S||!E)throw Se(e),new H("Unauthorized","No code or state parameter found in the redirect URL.");if(e.get(L)?.state!==E)throw Se(e),new H("Unauthorized","The session state does not match the state parameter. Make sure that the session is configured correctly and passed to `createCustomerAccountClient`.");let x=t,O=new URLSearchParams;O.append("grant_type","authorization_code"),O.append("client_id",x),O.append("redirect_uri",P),O.append("code",S);let V=e.get(L)?.codeVerifier;if(!V)throw new H("Unauthorized","No code verifier found in the session. Make sure that the session is configured correctly and passed to `createCustomerAccountClient`.");O.append("code_verifier",V);let q={"content-type":"application/x-www-form-urlencoded","User-Agent":he,Origin:l};new Date().getTime();let K=f("TOKEN_EXCHANGE"),_=await fetch(K,{method:"POST",headers:q,body:O});if(!_.ok)throw new Response(await _.text(),{status:_.status,headers:{"Content-Type":"text/html; charset=utf-8"}});let{access_token:Q,expires_in:Pe,id_token:G,refresh_token:ve}=await _.json(),$=e.get(L)?.nonce,te=await Do(G);if($!==te)throw new H("Unauthorized",`Returned nonce does not match: ${$} !== ${te}`);let gt=Q;r||(gt=await wo(Q,t,f("TOKEN_EXCHANGE"),l,{...ne(n)}));let nn=e.get(L)?.redirectPath;return e.set(L,{accessToken:gt,expiresAt:new Date(new Date().getTime()+(Pe-120)*1e3).getTime()+"",refreshToken:ve,idToken:G}),Ve(nn||y)},setBuyer:Ge,getBuyer:Be,UNSTABLE_setBuyer:S=>{B("[h2:warn:customerAccount] `customerAccount.UNSTABLE_setBuyer` is deprecated. Please use `customerAccount.setBuyer`."),Ge(S);},UNSTABLE_getBuyer:()=>(B("[h2:warn:customerAccount] `customerAccount.UNSTABLE_getBuyer` is deprecated. Please use `customerAccount.getBuyer`."),Be())}}function Za(e,t){return function(){try{if(!t)throw Error();new URL(e("CA_BASE_URL")),new URL(e("CA_BASE_AUTH_URL"));}catch{console.error(new Error("[h2:error:customerAccount] You do not have the valid credential to use Customer Account API.\nRun `h2 env pull` to link your store credentials."));let o="Internal Server Error";throw new Response(o,{status:500})}}}function es(e){return e.localeOverride!=null?dr(e.localeOverride):e.uiLocalesOverride!=null?dr(e.uiLocalesOverride):e.contextLanguage!=null?dr(e.contextLanguage):null}function dr(e){let r=e.toLowerCase().replaceAll("_","-").split("-"),o=r[0],n=r[1];return n?`${o}-${n.toUpperCase()}`:o}function rs(e,t){let{env:r,request:o,cache:n,waitUntil:a,i18n:s,session:c,logErrors:i,storefront:u={},customerAccount:d,cart:y={},buyerIdentity:g}=e;c||console.warn("[h2:warn:createHydrogenContext] A session object is required to create hydrogen context."),d?.unstableB2b&&B("[h2:warn:createHydrogenContext] `customerAccount.unstableB2b` is now stable. Please remove the `unstableB2b` option.");let{storefront:m}=mo({cache:n,waitUntil:a,i18n:s,logErrors:i,storefrontHeaders:u.headers||to(o),storefrontApiVersion:u.apiVersion,storefrontId:r.PUBLIC_STOREFRONT_ID,storeDomain:r.PUBLIC_STORE_DOMAIN,privateStorefrontToken:r.PRIVATE_STOREFRONT_API_TOKEN,publicStorefrontToken:r.PUBLIC_STOREFRONT_API_TOKEN}),p=pr({session:c,request:o,waitUntil:a,logErrors:i,customerApiVersion:d?.apiVersion,authUrl:d?.authUrl,customAuthStatusHandler:d?.customAuthStatusHandler,language:s?.language,customerAccountId:r.PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID,shopId:r.SHOP_ID}),l=or({getCartId:y.getId||Ft(o.headers),setCartId:y.setId||Ht(),cartQueryFragment:y.queryFragment,cartMutateFragment:y.mutateFragment,customMethods:y.customMethods,buyerIdentity:g,storefront:m,customerAccount:p}),P=new reactRouter.RouterContextProvider;P.set(ke,m),P.set(nr,l),P.set(ar,p),P.set(sr,r),P.set(ir,c),a&&P.set(cr,a);let f={storefront:m,cart:l,customerAccount:p,env:r,session:c,waitUntil:a,...t||{}};return new Proxy(P,{get(h,A,C){if(A in h){let R=h[A];return typeof R=="function"?R.bind(h):R}return A in f?f[A]:Reflect.get(h,A,C)},has(h,A){return A in h||A in f},ownKeys(h){return [...Reflect.ownKeys(h),...Object.keys(f)]},getOwnPropertyDescriptor(h,A){if(A in h)return Reflect.getOwnPropertyDescriptor(h,A);if(A in f)return {enumerable:true,configurable:true,writable:false,value:f[A]}}})}function ns({build:e,mode:t,poweredByHeader:r=true,getLoadContext:o,collectTrackingInformation:n=true,proxyStandardRoutes:a=true}){let s=reactRouter.createRequestHandler(e,t),c=r?i=>i.headers.append("powered-by","Shopify, Hydrogen"):void 0;return async i=>{let u=i.method;if((u==="GET"||u==="HEAD")&&i.body)return new Response(`${u} requests cannot have a body`,{status:400});let d=new URL(i.url);if(d.pathname.includes("//"))return new Response(null,{status:301,headers:{location:d.pathname.replace(/\/+/g,"/")}});let y=await o?.(i),g=y?.storefront||y?.get?.(ke);if(a&&(g||B("[h2:createRequestHandler] Storefront instance is required to proxy standard routes."),g?.isStorefrontApiUrl(i))){let p=await g.forward(i);return c?.(p),p}let m=await s(i,y);if(g&&a){n&&g.setCollectedSubrequestHeaders(m);let p=i.headers.get("sec-fetch-dest");(p&&p==="document"||i.headers.get("accept")?.includes("text/html"))&&Ie(m,{[je]:"1"});}return c?.(m),m}}var Lo=react.createContext(void 0),Uo=Lo.Provider,lr=()=>react.useContext(Lo);function us(e){let t=lt(),r=ds(t,e);return {nonce:t,header:r,NonceProvider:({children:n})=>react.createElement(Uo,{value:t},n)}}function ds(e,t){let{shop:r,...o}=t??{},n=`'nonce-${e}'`,a=["'self'","'unsafe-inline'","https://cdn.shopify.com"],s=["'self'","https://cdn.shopify.com/","https://monorail-edge.shopifysvc.com"];r&&r.checkoutDomain&&s.push(`https://${r.checkoutDomain}`),r&&r.storeDomain&&s.push(`https://${r.storeDomain}`);let i={baseUri:["'self'"],defaultSrc:["'self'",n,"https://cdn.shopify.com","https://shopify.com"],frameAncestors:["'none'"],styleSrc:a,connectSrc:s},u=Object.assign({},i,o);for(let d in i){let y=o[d];d&&y&&(u[d]=ps(y,i[d]));}return u.scriptSrc instanceof Array?u.scriptSrc=[...u.scriptSrc.filter(d=>!d.startsWith("'nonce")),n]:u.defaultSrc instanceof Array&&(u.defaultSrc=[...u.defaultSrc.filter(d=>!d.startsWith("'nonce")),n]),cs__default.default({directives:u})}function ps(e,t){let r=typeof t=="string"?[t]:t,o=Array.isArray(e)?e:[String(e)];return Array.isArray(r)?r.every(a=>a==="'none'")?o:[...o,...r]:r}var fs=react.forwardRef((e,t)=>{let{waitForHydration:r,src:o,...n}=e,a=lr();return r?jsxRuntime.jsx(ms,{src:o,options:n}):jsxRuntime.jsx("script",{suppressHydrationWarning:true,...n,src:o,nonce:a,ref:t})});function ms({src:e,options:t}){if(!e)throw new Error("`waitForHydration` with the Script component requires a `src` prop");return hydrogenReact.useLoadScript(e,{attributes:t}),null}async function Cs(e){return e;}function As(e){let t=reactRouter.useFetchers(),r={};for(let{formData:o}of t)if(o?.get("optimistic-identifier")===e)try{if(o.has("optimistic-data")){let n=JSON.parse(String(o.get("optimistic-data")));Object.assign(r,n);}}catch{}return r}function Ss({id:e,data:t}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:"optimistic-identifier",value:e}),jsxRuntime.jsx("input",{type:"hidden",name:"optimistic-data",value:JSON.stringify(t)})]})}function Ts({connection:e,children:t=()=>(console.warn("<Pagination> requires children to work properly"),null),namespace:r=""}){let [o,n]=react.useState(false),a=reactRouter.useNavigation(),s=reactRouter.useLocation();reactRouter.useNavigate();react.useEffect(()=>{a.state==="idle"&&n(false);},[a.state]);let{endCursor:i,hasNextPage:u,hasPreviousPage:d,nextPageUrl:y,nodes:g,previousPageUrl:m,startCursor:p}=Es(e,r),l=react.useMemo(()=>({...s.state,pagination:{...s.state?.pagination||{},[r]:{pageInfo:{endCursor:i,hasPreviousPage:d,hasNextPage:u,startCursor:p},nodes:g}}}),[i,u,d,p,g,r,s.state]),P=react.useMemo(()=>react.forwardRef(function(h,A){return u?react.createElement(reactRouter.Link,{preventScrollReset:true,...h,to:y,state:l,replace:true,ref:A,onClick:()=>n(true)}):null}),[u,y,l]),f=react.useMemo(()=>react.forwardRef(function(h,A){return d?react.createElement(reactRouter.Link,{preventScrollReset:true,...h,to:m,state:l,replace:true,ref:A,onClick:()=>n(true)}):null}),[d,m,l]);return t({state:l,hasNextPage:u,hasPreviousPage:d,isLoading:o,nextPageUrl:y,nodes:g,previousPageUrl:m,NextLink:P,PreviousLink:f})}function ft(e,t){let r=new URLSearchParams(e);return Object.keys(t?.pagination||{}).forEach(n=>{let a=n===""?"":`${n}_`,s=`${a}cursor`,c=`${a}direction`;r.delete(s),r.delete(c);}),r.toString()}function He(e){throw new Error(`The Pagination component requires ${"`"+e+"`"} to be a part of your query. See the guide on how to setup your query to include ${"`"+e+"`"}: https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#setup-the-paginated-query`)}function Es(e,t=""){e.pageInfo||He("pageInfo"),typeof e.pageInfo.startCursor>"u"&&He("pageInfo.startCursor"),typeof e.pageInfo.endCursor>"u"&&He("pageInfo.endCursor"),typeof e.pageInfo.hasNextPage>"u"&&He("pageInfo.hasNextPage"),typeof e.pageInfo.hasPreviousPage>"u"&&He("pageInfo.hasPreviousPage");let r=reactRouter.useNavigation(),o=reactRouter.useNavigate(),{state:n,search:a,pathname:s}=reactRouter.useLocation(),c=t?`${t}_cursor`:"cursor",i=t?`${t}_direction`:"direction",y=new URLSearchParams(a).get(i)==="previous",g=react.useMemo(()=>!globalThis?.window?.__hydrogenHydrated||!n?.pagination?.[t]?.nodes?hydrogenReact.flattenConnection(e):y?[...hydrogenReact.flattenConnection(e),...n.pagination[t].nodes||[]]:[...n.pagination[t].nodes||[],...hydrogenReact.flattenConnection(e)],[n,e,t]),m=react.useMemo(()=>{let f=globalThis?.window?.__hydrogenHydrated,v=n?.pagination?.[t]?.pageInfo,h=!f||v?.startCursor===void 0?e.pageInfo.startCursor:v.startCursor,A=!f||v?.endCursor===void 0?e.pageInfo.endCursor:v.endCursor,C=!f||v?.hasPreviousPage===void 0?e.pageInfo.hasPreviousPage:v.hasPreviousPage,R=!f||v?.hasNextPage===void 0?e.pageInfo.hasNextPage:v.hasNextPage;return n?.pagination?.[t]?.nodes&&(y?(h=e.pageInfo.startCursor,C=e.pageInfo.hasPreviousPage):(A=e.pageInfo.endCursor,R=e.pageInfo.hasNextPage)),{startCursor:h,endCursor:A,hasPreviousPage:C,hasNextPage:R}},[y,n,t,e.pageInfo.hasNextPage,e.pageInfo.hasPreviousPage,e.pageInfo.startCursor,e.pageInfo.endCursor]),p=react.useRef({params:ft(a,n),pathname:s});react.useEffect(()=>{window.__hydrogenHydrated=true;},[]),react.useEffect(()=>{let f=ft(a,n),v=p.current.params;(s!==p.current.pathname||f!==v)&&!(r.state==="idle"&&!r.location)&&(p.current={pathname:s,params:ft(a,n)},o(`${s}?${ft(a,n)}`,{replace:true,preventScrollReset:true,state:{nodes:void 0,pageInfo:void 0}}));},[s,a,n]);let l=react.useMemo(()=>{let f=new URLSearchParams(a);return f.set(i,"previous"),m.startCursor&&f.set(c,m.startCursor),`?${f.toString()}`},[a,m.startCursor]),P=react.useMemo(()=>{let f=new URLSearchParams(a);return f.set(i,"next"),m.endCursor&&f.set(c,m.endCursor),`?${f.toString()}`},[a,m.endCursor]);return {...m,previousPageUrl:l,nextPageUrl:P,nodes:g}}function bs(e,t={pageBy:20}){if(typeof e?.url>"u")throw new Error("getPaginationVariables must be called with the Request object passed to your loader function");let{pageBy:r,namespace:o=""}=t,n=new URLSearchParams(new URL(e.url).search),a=o?`${o}_cursor`:"cursor",s=o?`${o}_direction`:"direction",c=n.get(a)??void 0;return (n.get(s)==="previous"?"previous":"next")==="previous"?{last:r,startCursor:c??null}:{first:r,endCursor:c??null}}function Os(e,t){let r=reactRouter.useNavigation(),[o,n]=react.useState([]);if(react.useEffect(()=>{Promise.resolve(t).then(a=>{a&&n(a instanceof Array?a:a.product?.variants?.nodes||[]);}).catch(a=>{reportError(new Error("[h2:error:useOptimisticVariant] An error occurred while resolving the variants for the optimistic product hook.",{cause:a}));});},[JSON.stringify(t)]),r.state==="loading"){let a=new URLSearchParams(r.location.search),s=false,c=o.find(i=>i.selectedOptions?i.selectedOptions.every(u=>a.get(u.name)===u.value):(s||(s=true,reportError(new Error("[h2:error:useOptimisticVariant] The optimistic product hook requires your product query to include variants with the selectedOptions field."))),false));if(c)return {...c,isOptimistic:true}}return e}function Vs({handle:e,options:t=[],variants:r=[],productPath:o="products",waitForNavigation:n=false,selectedVariant:a,children:s}){let c=t;c[0]?.values&&(B("[h2:warn:VariantSelector] product.options.values is deprecated. Use product.options.optionValues instead."),c[0]&&!c[0].optionValues&&(c=t.map(p=>({...p,optionValues:p.values?.map(l=>({name:l}))||[]}))));let i=r instanceof Array?r:hydrogenReact.flattenConnection(r),{searchParams:u,path:d,alreadyOnProductPage:y}=$s(e,o,n),g=c.filter(p=>p?.optionValues?.length===1),m=a?a?.selectedOptions?.reduce((p,l)=>(p[l.name]=l.value,p),{}):{};return react.createElement(react.Fragment,null,...react.useMemo(()=>c.map(p=>{let l,P=[];for(let f of p.optionValues){let v=new URLSearchParams(y?u:void 0);v.set(p.name,f.name),g.forEach(I=>{I.optionValues[0].name&&v.set(I.name,I.optionValues[0].name);});let h=i.find(I=>I?.selectedOptions?.every(N=>(v.get(N?.name)||m?.[N?.name])===N?.value)),A=u.get(p.name);!A&&a&&(A=m?.[p.name]||null);let C=A?A===f.name:false;C&&(l=f.name);let R="?"+v.toString();P.push({value:f.name,optionValue:f,isAvailable:h?h.availableForSale:true,to:d+R,search:R,isActive:C,variant:h});}return s({option:{name:p.name,value:l,values:P}})}),[c,i,s]))}var Ms=e=>{if(typeof e?.url>"u")throw new TypeError(`Expected a Request instance, got ${typeof e}`);let t=new URL(e.url).searchParams,r=[];return t.forEach((o,n)=>{r.push({name:n,value:o});}),r};function $s(e,t,r){let{pathname:o,search:n}=reactRouter.useLocation(),a=reactRouter.useNavigation();return react.useMemo(()=>{let s=/(\/[a-zA-Z]{2}-[a-zA-Z]{2}\/)/g.exec(o),c=s&&s.length>0;t=t.startsWith("/")?t.substring(1):t;let i=c?`${s[0]}${t}/${e}`:`/${t}/${e}`;return {searchParams:new URLSearchParams(r||a.state!=="loading"?n:a.location.search),alreadyOnProductPage:i===o,path:i}},[o,n,r,e,t,a])}function Fs(){return {name:"hydrogen-2025.7.0",reactRouterConfig:()=>({appDirectory:"app",buildDirectory:"dist",ssr:true,future:{v8_middleware:true,v8_splitRouteModules:true,v8_viteEnvironmentApi:false,unstable_optimizeDeps:true,unstable_subResourceIntegrity:false}}),reactRouterConfigResolved:({reactRouterConfig:e})=>{if(e.basename&&e.basename!=="/")throw new Error(`[Hydrogen Preset] basename is not supported in Hydrogen 2025.7.0.
574
+ `;function or(e){let{getCartId:t,setCartId:r,storefront:o,customerAccount:n,cartQueryFragment:a,cartMutateFragment:s,buyerIdentity:c}=e,i=t(),u=()=>i||t(),p={storefront:o,getCartId:u,cartFragment:s,customerAccount:n},y=Gt(p),g=async function(...d){d[0].buyerIdentity={...c,...d[0].buyerIdentity};let l=await y(...d);return i=l?.cart?.id,l},m={get:qt({storefront:o,customerAccount:n,getCartId:u,cartFragment:a}),getCartId:u,setCartId:r,create:g,addLines:async(d,l)=>{let P=d.map(f=>({attributes:f.attributes,quantity:f.quantity,merchandiseId:f.merchandiseId,sellingPlanId:f.sellingPlanId,parent:f.parent}));return i||l?.cartId?await Bt(p)(P,l):await g({lines:P,buyerIdentity:c},l)},updateLines:Qt(p),removeLines:Wt(p),updateDiscountCodes:async(d,l)=>i||l?.cartId?await jt(p)(d,l):await g({discountCodes:d},l),updateGiftCardCodes:async(d,l)=>i||l?.cartId?await er(p)(d,l):await g({giftCardCodes:d},l),addGiftCardCodes:tr(p),removeGiftCardCodes:rr(p),updateBuyerIdentity:async(d,l)=>i||l?.cartId?await Kt(p)(d,l):await g({buyerIdentity:d},l),updateNote:async(d,l)=>i||l?.cartId?await Yt(p)(d,l):await g({note:d},l),updateSelectedDeliveryOption:zt(p),updateAttributes:async(d,l)=>i||l?.cartId?await Jt(p)(d,l):await g({attributes:d},l),setMetafields:async(d,l)=>i||l?.cartId?await Xt(p)(d,l):await g({metafields:d},l),deleteMetafield:Zt(p),addDeliveryAddresses:ho(p),removeDeliveryAddresses:Ao(p),updateDeliveryAddresses:So(p),replaceDeliveryAddresses:Po(p)};return "customMethods"in e?{...m,...e.customMethods??{}}:m}function Ha(e){let t=reactRouter.useFetchers();if(!t||!t.length)return e;let r=e?.lines?structuredClone(e):{lines:{nodes:[]}},o=r.lines.nodes,n=false;for(let{formData:a}of t){if(!a)continue;let s=J.getFormInput(a);if(s.action===J.ACTIONS.LinesAdd)for(let c of s.inputs.lines){if(!c.selectedVariant){console.error("[h2:error:useOptimisticCart] No selected variant was passed in the cart action. Make sure to pass the selected variant if you want to use an optimistic cart");continue}let i=o.find(u=>u.merchandise.id===c.selectedVariant?.id);n=true,i?(i.quantity=(i.quantity||1)+(c.quantity||1),i.isOptimistic=true):o.unshift({id:Co(c.selectedVariant.id),merchandise:c.selectedVariant,isOptimistic:true,quantity:c.quantity||1});}else if(s.action===J.ACTIONS.LinesRemove)for(let c of s.inputs.lineIds){let i=o.findIndex(u=>u.id===c);if(i!==-1){if(ut(o[i].id)){console.error("[h2:error:useOptimisticCart] Tried to remove an optimistic line that has not been added to the cart yet");continue}o.splice(i,1),n=true;}else console.warn(`[h2:warn:useOptimisticCart] Tried to remove line '${c}' but it doesn't exist in the cart`);}else if(s.action===J.ACTIONS.LinesUpdate)for(let c of s.inputs.lines){let i=o.findIndex(u=>c.id===u.id);if(i>-1){if(ut(o[i].id)){console.error("[h2:error:useOptimisticCart] Tried to update an optimistic line that has not been added to the cart yet");continue}o[i].quantity=c.quantity,o[i].quantity===0&&o.splice(i,1),n=true;}else console.warn(`[h2:warn:useOptimisticCart] Tried to update line '${c.id}' but it doesn't exist in the cart`);}}return n&&(r.isOptimistic=n),r.totalQuantity=o.reduce((a,s)=>a+s.quantity,0),r}var qa="https://raw.githubusercontent.com/Shopify/hydrogen/main/docs/changelog.json";async function Ga({request:e,changelogUrl:t}){new URL(e.url).searchParams;return fetch(t||qa)}var ke=reactRouter.createContext(),nr=reactRouter.createContext(),ar=reactRouter.createContext(),sr=reactRouter.createContext(),ir=reactRouter.createContext(),cr=reactRouter.createContext(),Ba={storefront:ke,cart:nr,customerAccount:ar,env:sr,session:ir,waitUntil:cr};var pt="2026-01",he=`Shopify Hydrogen ${Ue}`,vo="30243aa5-17c1-465a-8493-944bcc4e88aa",U="customerAccount",Ae="buyer";var H=class extends Response{constructor(t,r,o){super(`Bad request: ${t}`,{status:400,headers:o});}};function Me(e,t={}){let r=t.headers?new Headers(t.headers):new Headers({});return r.set("location",e),new Response(null,{status:t.status||302,headers:r})}async function Qa({session:e,customerAccountId:t,customerAccountTokenExchangeUrl:r,httpsOrigin:o,debugInfo:n}){let a=new URLSearchParams,s=e.get(U),c=s?.refreshToken,i=s?.idToken;if(!c)throw new H("Unauthorized","No refreshToken found in the session. Make sure your session is configured correctly and passed to `createCustomerAccountClient`.");a.append("grant_type","refresh_token"),a.append("refresh_token",c),a.append("client_id",t);let u={"content-type":"application/x-www-form-urlencoded","User-Agent":he,Origin:o};new Date().getTime();let y=r,g=await fetch(y,{method:"POST",headers:u,body:a});if(!g.ok){let P=await g.text();throw new Response(P,{status:g.status,headers:{"Content-Type":"text/html; charset=utf-8"}})}let{access_token:m,expires_in:d,refresh_token:l}=await g.json();if(!m||m.length===0)throw new H("Unauthorized","Invalid access token received.");e.set(U,{accessToken:m,expiresAt:new Date(new Date().getTime()+(d-120)*1e3).getTime()+"",refreshToken:l,idToken:i});}function Se(e){e.unset(U),e.unset(Ae);}async function Ro({locks:e,expiresAt:t,session:r,customerAccountId:o,customerAccountTokenExchangeUrl:n,httpsOrigin:a,debugInfo:s}){if(parseInt(t,10)-1e3<new Date().getTime())try{e.refresh||(e.refresh=Qa({session:r,customerAccountId:o,customerAccountTokenExchangeUrl:n,httpsOrigin:a,debugInfo:s})),await e.refresh,delete e.refresh;}catch(c){throw Se(r),c&&c.status!==401?c:new H("Unauthorized","Login before querying the Customer Account API.")}}function Io(){let e=Wa();return Eo(e)}async function To(e){let t=await crypto.subtle.digest({name:"SHA-256"},new TextEncoder().encode(e)),r=ja(t);return Eo(r)}function Wa(){let e=new Uint8Array(32);return crypto.getRandomValues(e),String.fromCharCode.apply(null,Array.from(e))}function Eo(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ja(e){let t=new Uint8Array(e),r=Array.from(t);return String.fromCharCode(...r)}function bo(){let e=Date.now().toString(),t=Math.random().toString(36).substring(2);return e+t}async function wo(e,t,r,o,n){let a=t;if(!e)throw new H("Unauthorized","oAuth access token was not provided during token exchange.");let s=new URLSearchParams;s.append("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),s.append("client_id",a),s.append("audience",vo),s.append("subject_token",e),s.append("subject_token_type","urn:ietf:params:oauth:token-type:access_token"),s.append("scopes","https://api.customers.com/auth/customer.graphql");let c={"content-type":"application/x-www-form-urlencoded","User-Agent":he,Origin:o};new Date().getTime();let u=r,p=await fetch(u,{method:"POST",headers:c,body:s});let y=await p.json();if(y.error)throw new H(y.error_description);return y.access_token}function Do(e){return Ka(e).payload.nonce}function Ka(e){let[t,r,o]=e.split("."),n=JSON.parse(atob(t)),a=JSON.parse(atob(r));return {header:n,payload:a,signature:o}}function lt(){return za(Ya())}function Ya(){try{return crypto.getRandomValues(new Uint8Array(16))}catch{return new Uint8Array(16).map(()=>Math.random()*255|0)}}function za(e){return Array.from(e,function(t){return ("0"+(t&255).toString(16)).slice(-2)}).join("")}function yt(e){if(!e)return;let{pathname:t,search:r}=new URL(e),o=t+r,n=new URLSearchParams(r),a=n.get("return_to")||n.get("redirect");if(a){if(Oo(e,a))return a;console.warn(`Cross-domain redirects are not supported. Tried to redirect from ${o} to ${a}`);}}function Oo(e,t){try{return new URL(e).origin===new URL(t,e).origin}catch{return false}}function ur({requestUrl:e,defaultUrl:t,redirectUrl:r}){let o=e,n=xo(e,t),a=r?xo(e,r):n;return Oo(e,a.toString())?a.toString():(console.warn(`Cross-domain redirects are not supported. Tried to redirect from ${o} to ${a}. Default url ${n} is used instead.`),n.toString())}function xo(e,t){return Ja(t)?new URL(t):new URL(t,new URL(e).origin)}function Ja(e){try{return new URL(e),!0}catch{return false}}function _o(e,t){let r=`https://shopify.com/${t}`,o=`https://shopify.com/authentication/${t}`;return function(a){switch(a){case "CA_BASE_URL":return r;case "CA_BASE_AUTH_URL":return o;case "GRAPHQL":return `${r}/account/customer/api/${e}/graphql`;case "AUTH":return `${o}/oauth/authorize`;case "LOGIN_SCOPE":return t?"openid email customer-account-api:full":"openid email https://api.customers.com/auth/customer.graphql";case "TOKEN_EXCHANGE":return `${o}/oauth/token`;case "LOGOUT":return `${o}/logout`}}}function Xa(e,t){if(!e.url)return t;let{hostname:r,pathname:o}=new URL(e.url);let n=o.replace(/\.data$/,"").replace(/\/_root$/,"/").replace(/(.+)\/$/,"$1"),a=t+`?${new URLSearchParams({return_to:n}).toString()}`;return Me(a)}function pr({session:e,customerAccountId:t,shopId:r,customerApiVersion:o=pt,request:n,waitUntil:a,authUrl:s,customAuthStatusHandler:c,logErrors:i=true,loginPath:u="/account/login",authorizePath:p="/account/authorize",defaultRedirectPath:y="/account",language:g}){if(o!==pt&&console.warn(`[h2:warn:createCustomerAccountClient] You are using Customer Account API version ${o} when this version of Hydrogen was built for ${pt}.`),e||console.warn("[h2:warn:createCustomerAccountClient] session is required to use Customer Account API. Ensure the session object passed in exist."),!n?.url)throw new Error("[h2:error:createCustomerAccountClient] The request object does not contain a URL.");let m=c||(()=>Xa(n,u)),d=new URL(n.url),l=d.protocol==="http:"?d.origin.replace("http","https"):d.origin,P=ur({requestUrl:l,defaultUrl:p,redirectUrl:s}),f=_o(o,r),v=Za(f,t),h=f("GRAPHQL"),A={};async function C({query:S,type:E,variables:x={}}){let O=await N();if(!O)throw m();new Date().getTime();let V=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":he,Origin:l,Authorization:O},body:JSON.stringify({query:S,variables:x})});let ee=await V.text(),K={url:h,response:V,type:E,query:S,queryVariables:x,errors:void 0,client:"customer"};if(!V.ok){if(V.status===401)throw Se(e),m();let _;try{_=z(ee);}catch{_=[{message:ee}];}Le({...K,errors:_});}try{let _=z(ee),{errors:Q}=_,Pe=Q?.map(({message:G,...ve})=>new de(G,{...ve,clientOperation:`customerAccount.${K.type}`,requestId:V.headers.get("x-request-id"),queryVariables:x,query:S}));return {..._,...Q&&{errors:Pe}}}catch{Le({...K,errors:[{message:ee}]});}}async function R(){if(!r)return false;let S=e.get(U),E=S?.accessToken,x=S?.expiresAt;if(!E||!x)return false;let O=j?.();try{await Ro({locks:A,expiresAt:x,session:e,customerAccountId:t,customerAccountTokenExchangeUrl:f("TOKEN_EXCHANGE"),httpsOrigin:l,debugInfo:{waitUntil:a,stackInfo:O,...ne(n)}});}catch{return false}return true}async function I(){if(!await R())throw m()}async function N(){if(await R())return e.get(U)?.accessToken}async function k(S,E){return d.hostname,v(),S=ge(S),ct(S,"customer.mutate"),fe(C({query:S,type:"mutation",...E}),{logErrors:i})}async function ie(S,E){return d.hostname,v(),S=ge(S),it(S,"customer.query"),fe(C({query:S,type:"query",...E}),{logErrors:i})}function Ge(S){e.set(Ae,{...e.get(Ae),...S});}async function Be(){let S=await N();if(S)return {...e.get(Ae),customerAccessToken:S}}return {i18n:{language:g??"EN"},login:async S=>{d.hostname,v();let E=new URL(f("AUTH")),x=bo(),O=lt();E.searchParams.set("client_id",t),E.searchParams.set("scope","openid email"),E.searchParams.append("response_type","code"),E.searchParams.append("redirect_uri",P),E.searchParams.set("scope",f("LOGIN_SCOPE")),E.searchParams.append("state",x),E.searchParams.append("nonce",O);let M=es({contextLanguage:g??null,localeOverride:S?.locale??null,uiLocalesOverride:S?.uiLocales??null});M!=null&&E.searchParams.append("locale",M),S?.countryCode&&E.searchParams.append("region_country",S.countryCode),S?.acrValues&&E.searchParams.append("acr_values",S.acrValues),S?.loginHint&&(E.searchParams.append("login_hint",S.loginHint),S?.loginHintMode&&E.searchParams.append("login_hint_mode",S.loginHintMode));let q=Io(),V=await To(q);return e.set(U,{...e.get(U),codeVerifier:q,state:x,nonce:O,redirectPath:yt(n.url)||W(n,"Referer")||y}),E.searchParams.append("code_challenge",V),E.searchParams.append("code_challenge_method","S256"),Me(E.toString())},logout:async S=>{d.hostname,v();let E=e.get(U)?.idToken,x=ur({requestUrl:l,defaultUrl:l,redirectUrl:S?.postLogoutRedirectUri}),O=E?new URL(`${f("LOGOUT")}?${new URLSearchParams([["id_token_hint",E],["post_logout_redirect_uri",x]]).toString()}`).toString():x;Se(e);let M=S?.headers instanceof Headers?S?.headers:new Headers(S?.headers);return S?.keepSession||(e.destroy?M.set("Set-Cookie",await e.destroy()):console.warn("[h2:warn:customerAccount] session.destroy is not available on your session implementation. All session data might not be cleared on logout."),e.isPending=false),Me(O,{headers:M})},isLoggedIn:R,handleAuthStatus:I,getAccessToken:N,getApiUrl:()=>h,mutate:k,query:ie,authorize:async()=>{d.hostname,v();let S=d.searchParams.get("code"),E=d.searchParams.get("state");if(!S||!E)throw Se(e),new H("Unauthorized","No code or state parameter found in the redirect URL.");if(e.get(U)?.state!==E)throw Se(e),new H("Unauthorized","The session state does not match the state parameter. Make sure that the session is configured correctly and passed to `createCustomerAccountClient`.");let x=t,O=new URLSearchParams;O.append("grant_type","authorization_code"),O.append("client_id",x),O.append("redirect_uri",P),O.append("code",S);let M=e.get(U)?.codeVerifier;if(!M)throw new H("Unauthorized","No code verifier found in the session. Make sure that the session is configured correctly and passed to `createCustomerAccountClient`.");O.append("code_verifier",M);let q={"content-type":"application/x-www-form-urlencoded","User-Agent":he,Origin:l};new Date().getTime();let K=f("TOKEN_EXCHANGE"),_=await fetch(K,{method:"POST",headers:q,body:O});if(!_.ok)throw new Response(await _.text(),{status:_.status,headers:{"Content-Type":"text/html; charset=utf-8"}});let{access_token:Q,expires_in:Pe,id_token:G,refresh_token:ve}=await _.json(),$=e.get(U)?.nonce,te=await Do(G);if($!==te)throw new H("Unauthorized",`Returned nonce does not match: ${$} !== ${te}`);let gt=Q;r||(gt=await wo(Q,t,f("TOKEN_EXCHANGE"),l,{...ne(n)}));let nn=e.get(U)?.redirectPath;return e.set(U,{accessToken:gt,expiresAt:new Date(new Date().getTime()+(Pe-120)*1e3).getTime()+"",refreshToken:ve,idToken:G}),Me(nn||y)},setBuyer:Ge,getBuyer:Be,UNSTABLE_setBuyer:S=>{B("[h2:warn:customerAccount] `customerAccount.UNSTABLE_setBuyer` is deprecated. Please use `customerAccount.setBuyer`."),Ge(S);},UNSTABLE_getBuyer:()=>(B("[h2:warn:customerAccount] `customerAccount.UNSTABLE_getBuyer` is deprecated. Please use `customerAccount.getBuyer`."),Be())}}function Za(e,t){return function(){try{if(!t)throw Error();new URL(e("CA_BASE_URL")),new URL(e("CA_BASE_AUTH_URL"));}catch{console.error(new Error("[h2:error:customerAccount] You do not have the valid credential to use Customer Account API.\nRun `h2 env pull` to link your store credentials."));let o="Internal Server Error";throw new Response(o,{status:500})}}}function es(e){return e.localeOverride!=null?dr(e.localeOverride):e.uiLocalesOverride!=null?dr(e.uiLocalesOverride):e.contextLanguage!=null?dr(e.contextLanguage):null}function dr(e){let r=e.toLowerCase().replaceAll("_","-").split("-"),o=r[0],n=r[1];return n?`${o}-${n.toUpperCase()}`:o}function rs(e,t){let{env:r,request:o,cache:n,waitUntil:a,i18n:s,session:c,logErrors:i,storefront:u={},customerAccount:p,cart:y={},buyerIdentity:g}=e;c||console.warn("[h2:warn:createHydrogenContext] A session object is required to create hydrogen context."),p?.unstableB2b&&B("[h2:warn:createHydrogenContext] `customerAccount.unstableB2b` is now stable. Please remove the `unstableB2b` option.");let{storefront:m}=mo({cache:n,waitUntil:a,i18n:s,logErrors:i,storefrontHeaders:u.headers||to(o),storefrontApiVersion:u.apiVersion,storefrontId:r.PUBLIC_STOREFRONT_ID,storeDomain:r.PUBLIC_STORE_DOMAIN,privateStorefrontToken:r.PRIVATE_STOREFRONT_API_TOKEN,publicStorefrontToken:r.PUBLIC_STOREFRONT_API_TOKEN}),d=pr({session:c,request:o,waitUntil:a,logErrors:i,customerApiVersion:p?.apiVersion,authUrl:p?.authUrl,customAuthStatusHandler:p?.customAuthStatusHandler,language:s?.language,customerAccountId:r.PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID,shopId:r.SHOP_ID}),l=or({getCartId:y.getId||Ft(o.headers),setCartId:y.setId||Ht(),cartQueryFragment:y.queryFragment,cartMutateFragment:y.mutateFragment,customMethods:y.customMethods,buyerIdentity:g,storefront:m,customerAccount:d}),P=new reactRouter.RouterContextProvider;P.set(ke,m),P.set(nr,l),P.set(ar,d),P.set(sr,r),P.set(ir,c),a&&P.set(cr,a);let f={storefront:m,cart:l,customerAccount:d,env:r,session:c,waitUntil:a,...t||{}};return new Proxy(P,{get(h,A,C){if(A in h){let R=h[A];return typeof R=="function"?R.bind(h):R}return A in f?f[A]:Reflect.get(h,A,C)},has(h,A){return A in h||A in f},ownKeys(h){return [...Reflect.ownKeys(h),...Object.keys(f)]},getOwnPropertyDescriptor(h,A){if(A in h)return Reflect.getOwnPropertyDescriptor(h,A);if(A in f)return {enumerable:true,configurable:true,writable:false,value:f[A]}}})}function ns({build:e,mode:t,poweredByHeader:r=true,getLoadContext:o,collectTrackingInformation:n=true,proxyStandardRoutes:a=true}){let s=reactRouter.createRequestHandler(e,t),c=r?i=>i.headers.append("powered-by","Shopify, Hydrogen"):void 0;return async i=>{let u=i.method;if((u==="GET"||u==="HEAD")&&i.body)return new Response(`${u} requests cannot have a body`,{status:400});let p=new URL(i.url);if(p.pathname.includes("//"))return new Response(null,{status:301,headers:{location:p.pathname.replace(/\/+/g,"/")}});let y=await o?.(i),g=y?.storefront||y?.get?.(ke);if(a&&(g||B("[h2:createRequestHandler] Storefront instance is required to proxy standard routes."),g?.isStorefrontApiUrl(i))){let d=await g.forward(i);return c?.(d),d}let m=await s(i,y);if(g&&a){n&&g.setCollectedSubrequestHeaders(m);let d=i.headers.get("sec-fetch-dest");(d&&d==="document"||i.headers.get("accept")?.includes("text/html"))&&Ie(m,{[je]:"1"});}return c?.(m),m}}var Uo=react.createContext(void 0),Lo=Uo.Provider,lr=()=>react.useContext(Uo);function us(e){let t=lt(),r=ds(t,e);return {nonce:t,header:r,NonceProvider:({children:n})=>react.createElement(Lo,{value:t},n)}}function ds(e,t){let{shop:r,...o}=t??{},n=`'nonce-${e}'`,a=["'self'","'unsafe-inline'","https://cdn.shopify.com"],s=["'self'","https://cdn.shopify.com/","https://monorail-edge.shopifysvc.com"];r&&r.checkoutDomain&&s.push(`https://${r.checkoutDomain}`),r&&r.storeDomain&&s.push(`https://${r.storeDomain}`);let i={baseUri:["'self'"],defaultSrc:["'self'",n,"https://cdn.shopify.com","https://shopify.com"],frameAncestors:["'none'"],styleSrc:a,connectSrc:s},u=Object.assign({},i,o);for(let p in i){let y=o[p];p&&y&&(u[p]=ps(y,i[p]));}return u.scriptSrc instanceof Array?u.scriptSrc=[...u.scriptSrc.filter(p=>!p.startsWith("'nonce")),n]:u.defaultSrc instanceof Array&&(u.defaultSrc=[...u.defaultSrc.filter(p=>!p.startsWith("'nonce")),n]),cs__default.default({directives:u})}function ps(e,t){let r=typeof t=="string"?[t]:t,o=Array.isArray(e)?e:[String(e)];return Array.isArray(r)?r.every(a=>a==="'none'")?o:[...o,...r]:r}var fs=react.forwardRef((e,t)=>{let{waitForHydration:r,src:o,...n}=e,a=lr();return r?jsxRuntime.jsx(ms,{src:o,options:n}):jsxRuntime.jsx("script",{suppressHydrationWarning:true,...n,src:o,nonce:a,ref:t})});function ms({src:e,options:t}){if(!e)throw new Error("`waitForHydration` with the Script component requires a `src` prop");return hydrogenReact.useLoadScript(e,{attributes:t}),null}async function Cs(e){return e;}function As(e){let t=reactRouter.useFetchers(),r={};for(let{formData:o}of t)if(o?.get("optimistic-identifier")===e)try{if(o.has("optimistic-data")){let n=JSON.parse(String(o.get("optimistic-data")));Object.assign(r,n);}}catch{}return r}function Ss({id:e,data:t}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:"optimistic-identifier",value:e}),jsxRuntime.jsx("input",{type:"hidden",name:"optimistic-data",value:JSON.stringify(t)})]})}function Ts({connection:e,children:t=()=>(console.warn("<Pagination> requires children to work properly"),null),namespace:r=""}){let [o,n]=react.useState(false),a=reactRouter.useNavigation(),s=reactRouter.useLocation();reactRouter.useNavigate();react.useEffect(()=>{a.state==="idle"&&n(false);},[a.state]);let{endCursor:i,hasNextPage:u,hasPreviousPage:p,nextPageUrl:y,nodes:g,previousPageUrl:m,startCursor:d}=Es(e,r),l=react.useMemo(()=>({...s.state,pagination:{...s.state?.pagination||{},[r]:{pageInfo:{endCursor:i,hasPreviousPage:p,hasNextPage:u,startCursor:d},nodes:g}}}),[i,u,p,d,g,r,s.state]),P=react.useMemo(()=>react.forwardRef(function(h,A){return u?react.createElement(reactRouter.Link,{preventScrollReset:true,...h,to:y,state:l,replace:true,ref:A,onClick:()=>n(true)}):null}),[u,y,l]),f=react.useMemo(()=>react.forwardRef(function(h,A){return p?react.createElement(reactRouter.Link,{preventScrollReset:true,...h,to:m,state:l,replace:true,ref:A,onClick:()=>n(true)}):null}),[p,m,l]);return t({state:l,hasNextPage:u,hasPreviousPage:p,isLoading:o,nextPageUrl:y,nodes:g,previousPageUrl:m,NextLink:P,PreviousLink:f})}function ft(e,t){let r=new URLSearchParams(e);return Object.keys(t?.pagination||{}).forEach(n=>{let a=n===""?"":`${n}_`,s=`${a}cursor`,c=`${a}direction`;r.delete(s),r.delete(c);}),r.toString()}function He(e){throw new Error(`The Pagination component requires ${"`"+e+"`"} to be a part of your query. See the guide on how to setup your query to include ${"`"+e+"`"}: https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#setup-the-paginated-query`)}function Es(e,t=""){e.pageInfo||He("pageInfo"),typeof e.pageInfo.startCursor>"u"&&He("pageInfo.startCursor"),typeof e.pageInfo.endCursor>"u"&&He("pageInfo.endCursor"),typeof e.pageInfo.hasNextPage>"u"&&He("pageInfo.hasNextPage"),typeof e.pageInfo.hasPreviousPage>"u"&&He("pageInfo.hasPreviousPage");let r=reactRouter.useNavigation(),o=reactRouter.useNavigate(),{state:n,search:a,pathname:s}=reactRouter.useLocation(),c=t?`${t}_cursor`:"cursor",i=t?`${t}_direction`:"direction",y=new URLSearchParams(a).get(i)==="previous",g=react.useMemo(()=>!globalThis?.window?.__hydrogenHydrated||!n?.pagination?.[t]?.nodes?hydrogenReact.flattenConnection(e):y?[...hydrogenReact.flattenConnection(e),...n.pagination[t].nodes||[]]:[...n.pagination[t].nodes||[],...hydrogenReact.flattenConnection(e)],[n,e,t]),m=react.useMemo(()=>{let f=globalThis?.window?.__hydrogenHydrated,v=n?.pagination?.[t]?.pageInfo,h=!f||v?.startCursor===void 0?e.pageInfo.startCursor:v.startCursor,A=!f||v?.endCursor===void 0?e.pageInfo.endCursor:v.endCursor,C=!f||v?.hasPreviousPage===void 0?e.pageInfo.hasPreviousPage:v.hasPreviousPage,R=!f||v?.hasNextPage===void 0?e.pageInfo.hasNextPage:v.hasNextPage;return n?.pagination?.[t]?.nodes&&(y?(h=e.pageInfo.startCursor,C=e.pageInfo.hasPreviousPage):(A=e.pageInfo.endCursor,R=e.pageInfo.hasNextPage)),{startCursor:h,endCursor:A,hasPreviousPage:C,hasNextPage:R}},[y,n,t,e.pageInfo.hasNextPage,e.pageInfo.hasPreviousPage,e.pageInfo.startCursor,e.pageInfo.endCursor]),d=react.useRef({params:ft(a,n),pathname:s});react.useEffect(()=>{window.__hydrogenHydrated=true;},[]),react.useEffect(()=>{let f=ft(a,n),v=d.current.params;(s!==d.current.pathname||f!==v)&&!(r.state==="idle"&&!r.location)&&(d.current={pathname:s,params:ft(a,n)},o(`${s}?${ft(a,n)}`,{replace:true,preventScrollReset:true,state:{nodes:void 0,pageInfo:void 0}}));},[s,a,n]);let l=react.useMemo(()=>{let f=new URLSearchParams(a);return f.set(i,"previous"),m.startCursor&&f.set(c,m.startCursor),`?${f.toString()}`},[a,m.startCursor]),P=react.useMemo(()=>{let f=new URLSearchParams(a);return f.set(i,"next"),m.endCursor&&f.set(c,m.endCursor),`?${f.toString()}`},[a,m.endCursor]);return {...m,previousPageUrl:l,nextPageUrl:P,nodes:g}}function bs(e,t={pageBy:20}){if(typeof e?.url>"u")throw new Error("getPaginationVariables must be called with the Request object passed to your loader function");let{pageBy:r,namespace:o=""}=t,n=new URLSearchParams(new URL(e.url).search),a=o?`${o}_cursor`:"cursor",s=o?`${o}_direction`:"direction",c=n.get(a)??void 0;return (n.get(s)==="previous"?"previous":"next")==="previous"?{last:r,startCursor:c??null}:{first:r,endCursor:c??null}}function Os(e,t){let r=reactRouter.useNavigation(),[o,n]=react.useState([]);if(react.useEffect(()=>{Promise.resolve(t).then(a=>{a&&n(a instanceof Array?a:a.product?.variants?.nodes||[]);}).catch(a=>{reportError(new Error("[h2:error:useOptimisticVariant] An error occurred while resolving the variants for the optimistic product hook.",{cause:a}));});},[JSON.stringify(t)]),r.state==="loading"){let a=new URLSearchParams(r.location.search),s=false,c=o.find(i=>i.selectedOptions?i.selectedOptions.every(u=>a.get(u.name)===u.value):(s||(s=true,reportError(new Error("[h2:error:useOptimisticVariant] The optimistic product hook requires your product query to include variants with the selectedOptions field."))),false));if(c)return {...c,isOptimistic:true}}return e}function Ms({handle:e,options:t=[],variants:r=[],productPath:o="products",waitForNavigation:n=false,selectedVariant:a,children:s}){let c=t;c[0]?.values&&(B("[h2:warn:VariantSelector] product.options.values is deprecated. Use product.options.optionValues instead."),c[0]&&!c[0].optionValues&&(c=t.map(d=>({...d,optionValues:d.values?.map(l=>({name:l}))||[]}))));let i=r instanceof Array?r:hydrogenReact.flattenConnection(r),{searchParams:u,path:p,alreadyOnProductPage:y}=$s(e,o,n),g=c.filter(d=>d?.optionValues?.length===1),m=a?a?.selectedOptions?.reduce((d,l)=>(d[l.name]=l.value,d),{}):{};return react.createElement(react.Fragment,null,...react.useMemo(()=>c.map(d=>{let l,P=[];for(let f of d.optionValues){let v=new URLSearchParams(y?u:void 0);v.set(d.name,f.name),g.forEach(I=>{I.optionValues[0].name&&v.set(I.name,I.optionValues[0].name);});let h=i.find(I=>I?.selectedOptions?.every(N=>(v.get(N?.name)||m?.[N?.name])===N?.value)),A=u.get(d.name);!A&&a&&(A=m?.[d.name]||null);let C=A?A===f.name:false;C&&(l=f.name);let R="?"+v.toString();P.push({value:f.name,optionValue:f,isAvailable:h?h.availableForSale:true,to:p+R,search:R,isActive:C,variant:h});}return s({option:{name:d.name,value:l,values:P}})}),[c,i,s]))}var Vs=e=>{if(typeof e?.url>"u")throw new TypeError(`Expected a Request instance, got ${typeof e}`);let t=new URL(e.url).searchParams,r=[];return t.forEach((o,n)=>{r.push({name:n,value:o});}),r};function $s(e,t,r){let{pathname:o,search:n}=reactRouter.useLocation(),a=reactRouter.useNavigation();return react.useMemo(()=>{let s=/(\/[a-zA-Z]{2}-[a-zA-Z]{2}\/)/g.exec(o),c=s&&s.length>0;t=t.startsWith("/")?t.substring(1):t;let i=c?`${s[0]}${t}/${e}`:`/${t}/${e}`;return {searchParams:new URLSearchParams(r||a.state!=="loading"?n:a.location.search),alreadyOnProductPage:i===o,path:i}},[o,n,r,e,t,a])}function Fs(){return {name:"hydrogen-2025.7.0",reactRouterConfig:()=>({appDirectory:"app",buildDirectory:"dist",ssr:true,future:{v8_middleware:true,v8_splitRouteModules:true,v8_viteEnvironmentApi:false,unstable_optimizeDeps:true,unstable_subResourceIntegrity:false}}),reactRouterConfigResolved:({reactRouterConfig:e})=>{if(e.basename&&e.basename!=="/")throw new Error(`[Hydrogen Preset] basename is not supported in Hydrogen 2025.7.0.
575
575
  Reason: Requires major CLI infrastructure modernization.
576
576
  Workaround: Use reverse proxy or CDN path rewriting for subdirectory hosting.`);if(e.prerender)throw new Error(`[Hydrogen Preset] prerender is not supported in Hydrogen 2025.7.0.
577
577
  Reason: React Router plugin incompatibility with Hydrogen CLI build pipeline.
@@ -581,7 +581,7 @@ Alternative: Route-level code splitting via v8_splitRouteModules is enabled.`);i
581
581
  Reason: Hydrogen CLI bypasses React Router buildEnd hook execution.
582
582
  Workaround: Use external build scripts or package.json post-build hooks.`);if(e.future?.unstable_subResourceIntegrity===true)throw new Error(`[Hydrogen Preset] unstable_subResourceIntegrity cannot be enabled.
583
583
  Reason: Conflicts with Hydrogen CSP nonce-based authentication.
584
- Impact: Would break Content Security Policy and cause script execution failures.`)}}}var Gs=function(e){return jsxRuntime.jsx(hydrogenReact.RichText,{...e,components:{link:({node:t})=>jsxRuntime.jsx(reactRouter.Link,{to:t.url,title:t.title,target:t.target,prefetch:"intent",children:t.children}),...e.components}})};var Bs=async function({request:t,context:r}){let o=r.storefront,n=r.customerAccount,a=new URL(t.url);if(!o)throw new Error("GraphiQL: Hydrogen's storefront client must be injected in the loader context.");let s={};if(o){let u="X-Shopify-Storefront-Access-Token";s.storefront={name:"Storefront API",authHeader:u,accessToken:o.getPublicTokenHeaders()[u],apiUrl:o.getApiUrl(),icon:"SF"};}if(n){let u=await(await fetch(a.origin+"/graphiql/customer-account.schema.json")).json(),d=await n.getAccessToken();u&&(s["customer-account"]={name:"Customer Account API",value:u,authHeader:"Authorization",accessToken:d,apiUrl:n.getApiUrl(),icon:"CA"});}let c="https://avatars.githubusercontent.com/u/12972006?s=48&v=4",i=String.raw;return new Response(i`
584
+ Impact: Would break Content Security Policy and cause script execution failures.`)}}}var Gs=function(e){return jsxRuntime.jsx(hydrogenReact.RichText,{...e,components:{link:({node:t})=>jsxRuntime.jsx(reactRouter.Link,{to:t.url,title:t.title,target:t.target,prefetch:"intent",children:t.children}),...e.components}})};var Bs=async function({request:t,context:r}){let o=r.storefront,n=r.customerAccount,a=new URL(t.url);if(!o)throw new Error("GraphiQL: Hydrogen's storefront client must be injected in the loader context.");let s={};if(o){let u="X-Shopify-Storefront-Access-Token";s.storefront={name:"Storefront API",authHeader:u,accessToken:o.getPublicTokenHeaders()[u],apiUrl:o.getApiUrl(),icon:"SF"};}if(n){let u=await(await fetch(a.origin+"/graphiql/customer-account.schema.json")).json(),p=await n.getAccessToken();u&&(s["customer-account"]={name:"Customer Account API",value:u,authHeader:"Authorization",accessToken:p,apiUrl:n.getApiUrl(),icon:"CA"});}let c="https://avatars.githubusercontent.com/u/12972006?s=48&v=4",i=String.raw;return new Response(i`
585
585
  <!DOCTYPE html>
586
586
  <html lang="en">
587
587
  <head>
@@ -900,7 +900,7 @@ Impact: Would break Content Security Policy and cause script execution failures.
900
900
  </div>
901
901
  </body>
902
902
  </html>
903
- `,{status:200,headers:{"content-type":"text/html"}})};async function Qs(e){let{storefront:t,request:r,noAdminRedirect:o,matchQueryParams:n,response:a=new Response("Not Found",{status:404})}=e,s=new URL(r.url),{pathname:c,searchParams:i}=s,u=i.has("_data");i.delete("redirect"),i.delete("return_to"),i.delete("_data");let d=(n?s.toString().replace(s.origin,""):c).toLowerCase();if(s.pathname==="/admin"&&!o)return gr(`${t.getShopifyDomain()}/admin`,u,i,n);try{let{urlRedirects:y}=await t.query(Ws,{variables:{query:"path:"+d.replace(/\/+$/,"")}}),g=y?.edges?.[0]?.node?.target;if(g)return gr(g,u,i,n);let m=yt(r.url);if(m)return gr(m,u,i,n)}catch(y){console.error(`Failed to fetch redirects from Storefront API for route ${d}`,y);}return a}var mr="https://example.com";function gr(e,t,r,o){let n=new URL(e,mr);if(!o)for(let[a,s]of r)n.searchParams.append(a,s);return t?new Response(null,{status:200,headers:{"X-Remix-Redirect":n.toString().replace(mr,""),"X-Remix-Status":"301"}}):new Response(null,{status:301,headers:{location:n.toString().replace(mr,"")}})}var Ws=`#graphql
903
+ `,{status:200,headers:{"content-type":"text/html"}})};async function Qs(e){let{storefront:t,request:r,noAdminRedirect:o,matchQueryParams:n,response:a=new Response("Not Found",{status:404})}=e,s=new URL(r.url),{pathname:c,searchParams:i}=s,u=i.has("_data");i.delete("redirect"),i.delete("return_to"),i.delete("_data");let p=(n?s.toString().replace(s.origin,""):c).toLowerCase();if(s.pathname==="/admin"&&!o)return gr(`${t.getShopifyDomain()}/admin`,u,i,n);try{let{urlRedirects:y}=await t.query(Ws,{variables:{query:"path:"+p.replace(/\/+$/,"")}}),g=y?.edges?.[0]?.node?.target;if(g)return gr(g,u,i,n);let m=yt(r.url);if(m)return gr(m,u,i,n)}catch(y){console.error(`Failed to fetch redirects from Storefront API for route ${p}`,y);}return a}var mr="https://example.com";function gr(e,t,r,o){let n=new URL(e,mr);if(!o)for(let[a,s]of r)n.searchParams.append(a,s);return t?new Response(null,{status:200,headers:{"X-Remix-Redirect":n.toString().replace(mr,""),"X-Remix-Status":"301"}}):new Response(null,{status:301,headers:{location:n.toString().replace(mr,"")}})}var Ws=`#graphql
904
904
  query redirects($query: String) {
905
905
  urlRedirects(first: 1, query: $query) {
906
906
  edges {
@@ -910,13 +910,13 @@ Impact: Would break Content Security Policy and cause script execution failures.
910
910
  }
911
911
  }
912
912
  }
913
- `;var js={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ks=/[&><\u2028\u2029]/g;function Yo(e){return e.replace(Ks,t=>js[t])}var ae="Error in SEO input: ",X={title:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`title` should be a string"));if(typeof e=="string"&&e.length>70)throw new Error(ae.concat("`title` should not be longer than 70 characters"));return e}},description:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`description` should be a string"));if(typeof e=="string"&&e.length>155)throw new Error(ae.concat("`description` should not be longer than 160 characters"));return e}},url:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`url` should be a string"));if(typeof e=="string"&&!e.startsWith("http"))throw new Error(ae.concat("`url` should be a valid URL"));return e}},handle:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`handle` should be a string"));if(typeof e=="string"&&!e.startsWith("@"))throw new Error(ae.concat("`handle` should start with `@`"));return e}}};function zo(e){let t=[];for(let r of Object.keys(e))switch(r){case "title":{let o=Z(X.title,e.title),n=hr(e?.titleTemplate,o);if(!n)break;t.push(U("title",{title:n}),U("meta",{property:"og:title",content:n}),U("meta",{name:"twitter:title",content:n}));break}case "description":{let o=Z(X.description,e.description);if(!o)break;t.push(U("meta",{name:"description",content:o}),U("meta",{property:"og:description",content:o}),U("meta",{name:"twitter:description",content:o}));break}case "url":{let o=Z(X.url,e.url);if(!o)break;let a=o.split("?")[0].replace(/\/$/,"");t.push(U("link",{rel:"canonical",href:a}),U("meta",{property:"og:url",content:a}));break}case "handle":{let o=Z(X.handle,e.handle);if(!o)break;t.push(U("meta",{name:"twitter:site",content:o}),U("meta",{name:"twitter:creator",content:o}));break}case "media":{let o,n=se(e.media);for(let a of n)if(typeof a=="string"&&t.push(U("meta",{name:"og:image",content:a})),a&&typeof a=="object"){let s=a.type||"image",c=a?{url:a?.url,secure_url:a?.url,type:Ar(a.url),width:a?.width,height:a?.height,alt:a?.altText}:{};for(let i of Object.keys(c))c[i]&&(o=c[i],t.push(U("meta",{property:`og:${s}:${i}`,content:o},c.url)));}break}case "jsonLd":{let o=se(e.jsonLd),n=0;for(let a of o){if(typeof a!="object")continue;let s=U("script",{type:"application/ld+json",children:JSON.stringify(a,(c,i)=>typeof i=="string"?Yo(i):i)},`json-ld-${a?.["@type"]||a?.name||n++}`);t.push(s);}break}case "alternates":{let o=se(e.alternates);for(let n of o){if(!n)continue;let{language:a,url:s,default:c}=n,i=a?`${a}${c?"-default":""}`:void 0;t.push(U("link",{rel:"alternate",hrefLang:i,href:s}));}break}case "robots":{if(!e.robots)break;let{maxImagePreview:o,maxSnippet:n,maxVideoPreview:a,noArchive:s,noFollow:c,noImageIndex:i,noIndex:u,noSnippet:d,noTranslate:y,unavailableAfter:g}=e.robots,m=[s&&"noarchive",i&&"noimageindex",d&&"nosnippet",y&&"notranslate",o&&`max-image-preview:${o}`,n&&`max-snippet:${n}`,a&&`max-video-preview:${a}`,g&&`unavailable_after:${g}`],p=(u?"noindex":"index")+","+(c?"nofollow":"follow");for(let l of m)l&&(p+=`,${l}`);t.push(U("meta",{name:"robots",content:p}));break}}return t.flat().sort((r,o)=>r.key.localeCompare(o.key))}function U(e,t,r){let o={tag:e,props:{},key:""};return e==="title"?(o.children=t.title,o.key=Cr(o),o):e==="script"?(o.children=typeof t.children=="string"?t.children:"",o.key=Cr(o,r),delete t.children,o.props=t,o):(o.props=t,Object.keys(o.props).forEach(n=>!o.props[n]&&delete o.props[n]),o.key=Cr(o,r),o)}function Cr(e,t){let{tag:r,props:o}=e;if(r==="title")return "0-title";if(r==="meta"){let n=o.content===t&&typeof o.property=="string"&&!o.property.endsWith("secure_url")&&"0";return [r,...[t,n],o.property||o.name].filter(s=>s).join("-")}return r==="link"?[r,o.rel,o.hrefLang||o.media].filter(a=>a).join("-").replace(/\s+/g,"-"):r==="script"?`${r}-${t}`:`${r}-${o.type}`}function hr(e,t){if(t)return e?typeof e=="function"?e(t):e.replace("%s",t??""):t}function Ar(e){switch(e&&e.split(".").pop()){case "svg":return "image/svg+xml";case "png":return "image/png";case "gif":return "image/gif";case "swf":return "application/x-shockwave-flash";case "mp3":return "audio/mpeg";default:return "image/jpeg"}}function se(e){return Array.isArray(e)?e:[e]}function Z(e,t){try{return e.validate(t)}catch(r){return console.warn(r.message),t}}function Ys(...e){let t=[],r=e.reduce((o,n)=>{if(!n)return o;Object.keys(n).forEach(s=>!n[s]&&delete n[s]);let{jsonLd:a}=n;return a?o?.jsonLd?{...o,...n,jsonLd:se(o.jsonLd).concat(a)}:{...o,...n,jsonLd:[a]}:{...o,...n}},{})||{};for(let o of Object.keys(r))switch(o){case "title":{let n=Z(X.title,r.title),a=hr(r?.titleTemplate,n);if(!a)break;t.push({title:a},{property:"og:title",content:a},{property:"twitter:title",content:a});break}case "description":{let n=Z(X.description,r.description);if(!n)break;t.push({name:"description",content:n},{property:"og:description",content:n},{property:"twitter:description",content:n});break}case "url":{let n=Z(X.url,r.url);if(!n)break;let s=n.split("?")[0].replace(/\/$/,"");t.push({tagName:"link",rel:"canonical",href:s},{property:"og:url",content:s});break}case "handle":{let n=Z(X.handle,r.handle);if(!n)break;t.push({property:"twitter:site",content:n},{property:"twitter:creator",content:n});break}case "media":{let n,a=se(r.media);for(let s of a)if(typeof s=="string"&&t.push({property:"og:image",content:s}),s&&typeof s=="object"){let c=s.type||"image",i=s?{url:s?.url,secure_url:s?.url,type:Ar(s.url),width:s?.width,height:s?.height,alt:s?.altText}:{};for(let u of Object.keys(i))i[u]&&(n=i[u],t.push({property:`og:${c}:${u}`,content:n}));}break}case "jsonLd":{let n=se(r.jsonLd);for(let s of n)typeof s!="object"||Object.keys(s).length===0||t.push({"script:ld+json":s});break}case "alternates":{let n=se(r.alternates);for(let a of n){if(!a)continue;let{language:s,url:c,default:i}=a,u=s?`${s}${i?"-default":""}`:void 0;t.push({tagName:"link",rel:"alternate",hrefLang:u,href:c});}break}case "robots":{if(!r.robots)break;let{maxImagePreview:n,maxSnippet:a,maxVideoPreview:s,noArchive:c,noFollow:i,noImageIndex:u,noIndex:d,noSnippet:y,noTranslate:g,unavailableAfter:m}=r.robots,p=[c&&"noarchive",u&&"noimageindex",y&&"nosnippet",g&&"notranslate",n&&`max-image-preview:${n}`,a&&`max-snippet:${a}`,s&&`max-video-preview:${s}`,m&&`unavailable_after:${m}`],l=(d?"noindex":"index")+","+(i?"nofollow":"follow");for(let P of p)P&&(l+=`,${P}`);t.push({name:"robots",content:l});break}}return t}var ni=react.lazy(()=>Promise.resolve().then(()=>(en(),Zo)));function ai({debug:e}){let t=reactRouter.useMatches(),r=reactRouter.useLocation();console.warn("[h2:warn:Seo] The `<Seo/>` component is deprecated. Use `getSeoMeta` instead.\nSee: https://shopify.dev/docs/api/hydrogen/utilities/getseometa");let o=react.useMemo(()=>t.flatMap(s=>{let{handle:c,...i}=s,u={...i,...r},d=c?.seo,y=i?.data?.seo;return !d&&!y?[]:d?mt(d,u):[y]}).reduce((s,c)=>{Object.keys(c).forEach(u=>!c[u]&&delete c[u]);let{jsonLd:i}=c;return i?s?.jsonLd?Array.isArray(i)?{...s,...c,jsonLd:[...s.jsonLd,...i]}:{...s,...c,jsonLd:[...s.jsonLd,i]}:{...s,...c,jsonLd:[i]}:{...s,...c}},{}),[t,r]),{html:n,loggerMarkup:a}=react.useMemo(()=>{let s=zo(o),c=s.map(u=>u.tag==="script"?react.createElement(u.tag,{...u.props,key:u.key,dangerouslySetInnerHTML:{__html:u.children}}):react.createElement(u.tag,{...u.props,key:u.key},u.children)),i=react.createElement(react.Suspense,{fallback:null},react.createElement(ni,{headTags:s}));return {html:c,loggerMarkup:i}},[o]);return react.createElement(react.Fragment,null,n,e&&a)}function mt(e,...t){if(e instanceof Function)return mt(e(...t),...t);let r={};return Array.isArray(e)?(r=e.reduce((o,n)=>[...o,mt(n)],[]),r):e instanceof Object?(Object.entries(e).forEach(([n,a])=>{r[n]=mt(a,...t);}),r):e}function ii(e){return jsxRuntime.jsx(hydrogenReact.ShopPayButton,{channel:"hydrogen",...e})}var ui=`<?xml version="1.0" encoding="UTF-8"?>
913
+ `;var js={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ks=/[&><\u2028\u2029]/g;function Yo(e){return e.replace(Ks,t=>js[t])}var ae="Error in SEO input: ",X={title:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`title` should be a string"));if(typeof e=="string"&&e.length>70)throw new Error(ae.concat("`title` should not be longer than 70 characters"));return e}},description:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`description` should be a string"));if(typeof e=="string"&&e.length>155)throw new Error(ae.concat("`description` should not be longer than 160 characters"));return e}},url:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`url` should be a string"));if(typeof e=="string"&&!e.startsWith("http"))throw new Error(ae.concat("`url` should be a valid URL"));return e}},handle:{validate:e=>{if(typeof e!="string")throw new Error(ae.concat("`handle` should be a string"));if(typeof e=="string"&&!e.startsWith("@"))throw new Error(ae.concat("`handle` should start with `@`"));return e}}};function zo(e){let t=[];for(let r of Object.keys(e))switch(r){case "title":{let o=Z(X.title,e.title),n=hr(e?.titleTemplate,o);if(!n)break;t.push(L("title",{title:n}),L("meta",{property:"og:title",content:n}),L("meta",{name:"twitter:title",content:n}));break}case "description":{let o=Z(X.description,e.description);if(!o)break;t.push(L("meta",{name:"description",content:o}),L("meta",{property:"og:description",content:o}),L("meta",{name:"twitter:description",content:o}));break}case "url":{let o=Z(X.url,e.url);if(!o)break;let a=o.split("?")[0].replace(/\/$/,"");t.push(L("link",{rel:"canonical",href:a}),L("meta",{property:"og:url",content:a}));break}case "handle":{let o=Z(X.handle,e.handle);if(!o)break;t.push(L("meta",{name:"twitter:site",content:o}),L("meta",{name:"twitter:creator",content:o}));break}case "media":{let o,n=se(e.media);for(let a of n)if(typeof a=="string"&&t.push(L("meta",{name:"og:image",content:a})),a&&typeof a=="object"){let s=a.type||"image",c=a?{url:a?.url,secure_url:a?.url,type:Ar(a.url),width:a?.width,height:a?.height,alt:a?.altText}:{};for(let i of Object.keys(c))c[i]&&(o=c[i],t.push(L("meta",{property:`og:${s}:${i}`,content:o},c.url)));}break}case "jsonLd":{let o=se(e.jsonLd),n=0;for(let a of o){if(typeof a!="object")continue;let s=L("script",{type:"application/ld+json",children:JSON.stringify(a,(c,i)=>typeof i=="string"?Yo(i):i)},`json-ld-${a?.["@type"]||a?.name||n++}`);t.push(s);}break}case "alternates":{let o=se(e.alternates);for(let n of o){if(!n)continue;let{language:a,url:s,default:c}=n,i=a?`${a}${c?"-default":""}`:void 0;t.push(L("link",{rel:"alternate",hrefLang:i,href:s}));}break}case "robots":{if(!e.robots)break;let{maxImagePreview:o,maxSnippet:n,maxVideoPreview:a,noArchive:s,noFollow:c,noImageIndex:i,noIndex:u,noSnippet:p,noTranslate:y,unavailableAfter:g}=e.robots,m=[s&&"noarchive",i&&"noimageindex",p&&"nosnippet",y&&"notranslate",o&&`max-image-preview:${o}`,n&&`max-snippet:${n}`,a&&`max-video-preview:${a}`,g&&`unavailable_after:${g}`],d=(u?"noindex":"index")+","+(c?"nofollow":"follow");for(let l of m)l&&(d+=`,${l}`);t.push(L("meta",{name:"robots",content:d}));break}}return t.flat().sort((r,o)=>r.key.localeCompare(o.key))}function L(e,t,r){let o={tag:e,props:{},key:""};return e==="title"?(o.children=t.title,o.key=Cr(o),o):e==="script"?(o.children=typeof t.children=="string"?t.children:"",o.key=Cr(o,r),delete t.children,o.props=t,o):(o.props=t,Object.keys(o.props).forEach(n=>!o.props[n]&&delete o.props[n]),o.key=Cr(o,r),o)}function Cr(e,t){let{tag:r,props:o}=e;if(r==="title")return "0-title";if(r==="meta"){let n=o.content===t&&typeof o.property=="string"&&!o.property.endsWith("secure_url")&&"0";return [r,...[t,n],o.property||o.name].filter(s=>s).join("-")}return r==="link"?[r,o.rel,o.hrefLang||o.media].filter(a=>a).join("-").replace(/\s+/g,"-"):r==="script"?`${r}-${t}`:`${r}-${o.type}`}function hr(e,t){if(t)return e?typeof e=="function"?e(t):e.replace("%s",t??""):t}function Ar(e){switch(e&&e.split(".").pop()){case "svg":return "image/svg+xml";case "png":return "image/png";case "gif":return "image/gif";case "swf":return "application/x-shockwave-flash";case "mp3":return "audio/mpeg";default:return "image/jpeg"}}function se(e){return Array.isArray(e)?e:[e]}function Z(e,t){try{return e.validate(t)}catch(r){return console.warn(r.message),t}}function Ys(...e){let t=[],r=e.reduce((o,n)=>{if(!n)return o;Object.keys(n).forEach(s=>!n[s]&&delete n[s]);let{jsonLd:a}=n;return a?o?.jsonLd?{...o,...n,jsonLd:se(o.jsonLd).concat(a)}:{...o,...n,jsonLd:[a]}:{...o,...n}},{})||{};for(let o of Object.keys(r))switch(o){case "title":{let n=Z(X.title,r.title),a=hr(r?.titleTemplate,n);if(!a)break;t.push({title:a},{property:"og:title",content:a},{property:"twitter:title",content:a});break}case "description":{let n=Z(X.description,r.description);if(!n)break;t.push({name:"description",content:n},{property:"og:description",content:n},{property:"twitter:description",content:n});break}case "url":{let n=Z(X.url,r.url);if(!n)break;let s=n.split("?")[0].replace(/\/$/,"");t.push({tagName:"link",rel:"canonical",href:s},{property:"og:url",content:s});break}case "handle":{let n=Z(X.handle,r.handle);if(!n)break;t.push({property:"twitter:site",content:n},{property:"twitter:creator",content:n});break}case "media":{let n,a=se(r.media);for(let s of a)if(typeof s=="string"&&t.push({property:"og:image",content:s}),s&&typeof s=="object"){let c=s.type||"image",i=s?{url:s?.url,secure_url:s?.url,type:Ar(s.url),width:s?.width,height:s?.height,alt:s?.altText}:{};for(let u of Object.keys(i))i[u]&&(n=i[u],t.push({property:`og:${c}:${u}`,content:n}));}break}case "jsonLd":{let n=se(r.jsonLd);for(let s of n)typeof s!="object"||Object.keys(s).length===0||t.push({"script:ld+json":s});break}case "alternates":{let n=se(r.alternates);for(let a of n){if(!a)continue;let{language:s,url:c,default:i}=a,u=s?`${s}${i?"-default":""}`:void 0;t.push({tagName:"link",rel:"alternate",hrefLang:u,href:c});}break}case "robots":{if(!r.robots)break;let{maxImagePreview:n,maxSnippet:a,maxVideoPreview:s,noArchive:c,noFollow:i,noImageIndex:u,noIndex:p,noSnippet:y,noTranslate:g,unavailableAfter:m}=r.robots,d=[c&&"noarchive",u&&"noimageindex",y&&"nosnippet",g&&"notranslate",n&&`max-image-preview:${n}`,a&&`max-snippet:${a}`,s&&`max-video-preview:${s}`,m&&`unavailable_after:${m}`],l=(p?"noindex":"index")+","+(i?"nofollow":"follow");for(let P of d)P&&(l+=`,${P}`);t.push({name:"robots",content:l});break}}return t}var ni=react.lazy(()=>Promise.resolve().then(()=>(en(),Zo)));function ai({debug:e}){let t=reactRouter.useMatches(),r=reactRouter.useLocation();console.warn("[h2:warn:Seo] The `<Seo/>` component is deprecated. Use `getSeoMeta` instead.\nSee: https://shopify.dev/docs/api/hydrogen/utilities/getseometa");let o=react.useMemo(()=>t.flatMap(s=>{let{handle:c,...i}=s,u={...i,...r},p=c?.seo,y=i?.data?.seo;return !p&&!y?[]:p?mt(p,u):[y]}).reduce((s,c)=>{Object.keys(c).forEach(u=>!c[u]&&delete c[u]);let{jsonLd:i}=c;return i?s?.jsonLd?Array.isArray(i)?{...s,...c,jsonLd:[...s.jsonLd,...i]}:{...s,...c,jsonLd:[...s.jsonLd,i]}:{...s,...c,jsonLd:[i]}:{...s,...c}},{}),[t,r]),{html:n,loggerMarkup:a}=react.useMemo(()=>{let s=zo(o),c=s.map(u=>u.tag==="script"?react.createElement(u.tag,{...u.props,key:u.key,dangerouslySetInnerHTML:{__html:u.children}}):react.createElement(u.tag,{...u.props,key:u.key},u.children)),i=react.createElement(react.Suspense,{fallback:null},react.createElement(ni,{headTags:s}));return {html:c,loggerMarkup:i}},[o]);return react.createElement(react.Fragment,null,n,e&&a)}function mt(e,...t){if(e instanceof Function)return mt(e(...t),...t);let r={};return Array.isArray(e)?(r=e.reduce((o,n)=>[...o,mt(n)],[]),r):e instanceof Object?(Object.entries(e).forEach(([n,a])=>{r[n]=mt(a,...t);}),r):e}function ii(e){return jsxRuntime.jsx(hydrogenReact.ShopPayButton,{channel:"hydrogen",...e})}var ui=`<?xml version="1.0" encoding="UTF-8"?>
914
914
  <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
915
915
  `,di=`
916
916
  </sitemapindex>`,rn=`<?xml version="1.0" encoding="UTF-8"?>
917
917
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">`,on="</urlset>";async function pi(e){let{storefront:t,request:r,types:o=["products","pages","collections","metaObjects","articles","blogs"],customChildSitemaps:n=[]}=e;if(!r||!r.url)throw new Error("A request object is required to generate a sitemap index");if(!t||!t.query)throw new Error("A storefront client is required to generate a sitemap index");let a=await t.query(vi);if(!a)throw console.warn("[h2:sitemap:warning] Sitemap index is available in API version 2024-10 and later"),new Response("Sitemap index not found.",{status:404});let s=new URL(r.url).origin,c=ui+o.map(i=>{if(!a[i])throw new Error(`[h2:sitemap:error] No data found for type ${i}. Check types passed to \`getSitemapIndex\``);return yi(i,a[i].pagesCount.count,s)}).join(`
918
918
  `)+n.map(i=>" <sitemap><loc>"+(s+(i.startsWith("/")?i:"/"+i))+"</loc></sitemap>").join(`
919
- `)+di;return new Response(c,{headers:{"Content-Type":"application/xml","Cache-Control":`max-age=${3600*24}`}})}async function li(e){let{storefront:t,request:r,params:o,getLink:n,locales:a=[],getChangeFreq:s,noItemsFallback:c="/"}=e;if(!o)throw new Error("[h2:sitemap:error] Remix params object is required to generate a sitemap");if(!r||!r.url)throw new Error("A request object is required to generate a sitemap");if(!t||!t.query)throw new Error("A storefront client is required to generate a index");if(!n)throw new Error("A `getLink` function to generate each resource is required to build a sitemap");if(!o.type||!o.page)throw new Response("No data found",{status:404});let i=o.type,u=Ri[i];if(!u)throw new Response("Not found",{status:404});let d=await t.query(u,{variables:{page:parseInt(o.page,10)}});if(!d)throw console.warn("[h2:sitemap:warning] Sitemap is available in API version 2024-10 and later"),new Response("Sitemap not found.",{status:404});let y=new URL(r.url).origin,g="";return d?.sitemap?.resources?.items?.length?g=rn+d.sitemap.resources.items.map(m=>fi({getChangeFreq:s,url:n({type:m.type??i,baseUrl:y,handle:m.handle}),type:i,getLink:n,updatedAt:m.updatedAt,handle:m.handle,metaobjectType:m.type,locales:a,baseUrl:y})).join(`
919
+ `)+di;return new Response(c,{headers:{"Content-Type":"application/xml","Cache-Control":`max-age=${3600*24}`}})}async function li(e){let{storefront:t,request:r,params:o,getLink:n,locales:a=[],getChangeFreq:s,noItemsFallback:c="/"}=e;if(!o)throw new Error("[h2:sitemap:error] Remix params object is required to generate a sitemap");if(!r||!r.url)throw new Error("A request object is required to generate a sitemap");if(!t||!t.query)throw new Error("A storefront client is required to generate a index");if(!n)throw new Error("A `getLink` function to generate each resource is required to build a sitemap");if(!o.type||!o.page)throw new Response("No data found",{status:404});let i=o.type,u=Ri[i];if(!u)throw new Response("Not found",{status:404});let p=await t.query(u,{variables:{page:parseInt(o.page,10)}});if(!p)throw console.warn("[h2:sitemap:warning] Sitemap is available in API version 2024-10 and later"),new Response("Sitemap not found.",{status:404});let y=new URL(r.url).origin,g="";return p?.sitemap?.resources?.items?.length?g=rn+p.sitemap.resources.items.map(m=>fi({getChangeFreq:s,url:n({type:m.type??i,baseUrl:y,handle:m.handle}),type:i,getLink:n,updatedAt:m.updatedAt,handle:m.handle,metaobjectType:m.type,locales:a,baseUrl:y})).join(`
920
920
  `)+on:g=rn+`
921
921
  <url><loc>${y+c}</loc></url>
922
922
  `+on,new Response(g,{headers:{"Content-Type":"application/xml","Cache-Control":`max-age=${3600*24}`}})}function yi(e,t,r){let o="";for(let n=1;n<=t;n++)o+=` <sitemap><loc>${r}/sitemap/${e}/${n}.xml</loc></sitemap>
@@ -1047,5 +1047,5 @@ query SitemapIndex {
1047
1047
  //! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartDeliveryAddressesRemove
1048
1048
  //! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartDeliveryAddressesUpdate
1049
1049
  //! @see: https://shopify.dev/docs/api/storefront/2026-01/mutations/cartDeliveryAddressesReplace
1050
- Object.defineProperty(exports,"AnalyticsEventName",{enumerable:true,get:function(){return hydrogenReact.AnalyticsEventName}});Object.defineProperty(exports,"AnalyticsPageType",{enumerable:true,get:function(){return hydrogenReact.AnalyticsPageType}});Object.defineProperty(exports,"ExternalVideo",{enumerable:true,get:function(){return hydrogenReact.ExternalVideo}});Object.defineProperty(exports,"IMAGE_FRAGMENT",{enumerable:true,get:function(){return hydrogenReact.IMAGE_FRAGMENT}});Object.defineProperty(exports,"Image",{enumerable:true,get:function(){return hydrogenReact.Image}});Object.defineProperty(exports,"MediaFile",{enumerable:true,get:function(){return hydrogenReact.MediaFile}});Object.defineProperty(exports,"ModelViewer",{enumerable:true,get:function(){return hydrogenReact.ModelViewer}});Object.defineProperty(exports,"Money",{enumerable:true,get:function(){return hydrogenReact.Money}});Object.defineProperty(exports,"ShopifySalesChannel",{enumerable:true,get:function(){return hydrogenReact.ShopifySalesChannel}});Object.defineProperty(exports,"Video",{enumerable:true,get:function(){return hydrogenReact.Video}});Object.defineProperty(exports,"customerAccountApiCustomScalars",{enumerable:true,get:function(){return hydrogenReact.customerAccountApiCustomScalars}});Object.defineProperty(exports,"decodeEncodedVariant",{enumerable:true,get:function(){return hydrogenReact.decodeEncodedVariant}});Object.defineProperty(exports,"flattenConnection",{enumerable:true,get:function(){return hydrogenReact.flattenConnection}});Object.defineProperty(exports,"getAdjacentAndFirstAvailableVariants",{enumerable:true,get:function(){return hydrogenReact.getAdjacentAndFirstAvailableVariants}});Object.defineProperty(exports,"getClientBrowserParameters",{enumerable:true,get:function(){return hydrogenReact.getClientBrowserParameters}});Object.defineProperty(exports,"getProductOptions",{enumerable:true,get:function(){return hydrogenReact.getProductOptions}});Object.defineProperty(exports,"getShopifyCookies",{enumerable:true,get:function(){return hydrogenReact.getShopifyCookies}});Object.defineProperty(exports,"getTrackingValues",{enumerable:true,get:function(){return hydrogenReact.getTrackingValues}});Object.defineProperty(exports,"isOptionValueCombinationInEncodedVariant",{enumerable:true,get:function(){return hydrogenReact.isOptionValueCombinationInEncodedVariant}});Object.defineProperty(exports,"mapSelectedProductOptionToObject",{enumerable:true,get:function(){return hydrogenReact.mapSelectedProductOptionToObject}});Object.defineProperty(exports,"parseGid",{enumerable:true,get:function(){return hydrogenReact.parseGid}});Object.defineProperty(exports,"parseMetafield",{enumerable:true,get:function(){return hydrogenReact.parseMetafield}});Object.defineProperty(exports,"sendShopifyAnalytics",{enumerable:true,get:function(){return hydrogenReact.sendShopifyAnalytics}});Object.defineProperty(exports,"storefrontApiCustomScalars",{enumerable:true,get:function(){return hydrogenReact.storefrontApiCustomScalars}});Object.defineProperty(exports,"useLoadScript",{enumerable:true,get:function(){return hydrogenReact.useLoadScript}});Object.defineProperty(exports,"useMoney",{enumerable:true,get:function(){return hydrogenReact.useMoney}});Object.defineProperty(exports,"useSelectedOptionInUrlParam",{enumerable:true,get:function(){return hydrogenReact.useSelectedOptionInUrlParam}});Object.defineProperty(exports,"useShopifyCookies",{enumerable:true,get:function(){return hydrogenReact.useShopifyCookies}});exports.Analytics=Yn;exports.AnalyticsEvent=F;exports.CacheCustom=Nt;exports.CacheLong=kt;exports.CacheNone=Lt;exports.CacheShort=ue;exports.CartForm=J;exports.InMemoryCache=$t;exports.NonceProvider=Uo;exports.OptimisticInput=Ss;exports.Pagination=Ts;exports.RichText=Gs;exports.Script=fs;exports.Seo=ai;exports.ShopPayButton=ii;exports.VariantSelector=Vs;exports.cartAttributesUpdateDefault=Jt;exports.cartBuyerIdentityUpdateDefault=Kt;exports.cartCreateDefault=Gt;exports.cartDiscountCodesUpdateDefault=jt;exports.cartGetDefault=qt;exports.cartGetIdDefault=Ft;exports.cartGiftCardCodesAddDefault=tr;exports.cartGiftCardCodesRemoveDefault=rr;exports.cartGiftCardCodesUpdateDefault=er;exports.cartLinesAddDefault=Bt;exports.cartLinesRemoveDefault=Wt;exports.cartLinesUpdateDefault=Qt;exports.cartMetafieldDeleteDefault=Zt;exports.cartMetafieldsSetDefault=Xt;exports.cartNoteUpdateDefault=Yt;exports.cartSelectedDeliveryOptionsUpdateDefault=zt;exports.cartSetIdDefault=Ht;exports.changelogHandler=Ga;exports.createCartHandler=or;exports.createContentSecurityPolicy=us;exports.createCustomerAccountClient=pr;exports.createHydrogenContext=rs;exports.createRequestHandler=ns;exports.createStorefrontClient=mo;exports.createWithCache=ia;exports.formatAPIResult=T;exports.generateCacheControlHeader=Oe;exports.getPaginationVariables=bs;exports.getSelectedProductOptions=Ms;exports.getSeoMeta=Ys;exports.getShopAnalytics=jn;exports.getSitemap=li;exports.getSitemapIndex=pi;exports.graphiqlLoader=Bs;exports.hydrogenContext=Ba;exports.hydrogenPreset=Fs;exports.hydrogenRoutes=Cs;exports.storefrontRedirect=Qs;exports.useAnalytics=Y;exports.useCustomerPrivacy=Rt;exports.useNonce=lr;exports.useOptimisticCart=Ha;exports.useOptimisticData=As;exports.useOptimisticVariant=Os;//# sourceMappingURL=index.cjs.map
1050
+ Object.defineProperty(exports,"AnalyticsEventName",{enumerable:true,get:function(){return hydrogenReact.AnalyticsEventName}});Object.defineProperty(exports,"AnalyticsPageType",{enumerable:true,get:function(){return hydrogenReact.AnalyticsPageType}});Object.defineProperty(exports,"ExternalVideo",{enumerable:true,get:function(){return hydrogenReact.ExternalVideo}});Object.defineProperty(exports,"IMAGE_FRAGMENT",{enumerable:true,get:function(){return hydrogenReact.IMAGE_FRAGMENT}});Object.defineProperty(exports,"Image",{enumerable:true,get:function(){return hydrogenReact.Image}});Object.defineProperty(exports,"MediaFile",{enumerable:true,get:function(){return hydrogenReact.MediaFile}});Object.defineProperty(exports,"ModelViewer",{enumerable:true,get:function(){return hydrogenReact.ModelViewer}});Object.defineProperty(exports,"Money",{enumerable:true,get:function(){return hydrogenReact.Money}});Object.defineProperty(exports,"ShopifySalesChannel",{enumerable:true,get:function(){return hydrogenReact.ShopifySalesChannel}});Object.defineProperty(exports,"Video",{enumerable:true,get:function(){return hydrogenReact.Video}});Object.defineProperty(exports,"customerAccountApiCustomScalars",{enumerable:true,get:function(){return hydrogenReact.customerAccountApiCustomScalars}});Object.defineProperty(exports,"decodeEncodedVariant",{enumerable:true,get:function(){return hydrogenReact.decodeEncodedVariant}});Object.defineProperty(exports,"flattenConnection",{enumerable:true,get:function(){return hydrogenReact.flattenConnection}});Object.defineProperty(exports,"getAdjacentAndFirstAvailableVariants",{enumerable:true,get:function(){return hydrogenReact.getAdjacentAndFirstAvailableVariants}});Object.defineProperty(exports,"getClientBrowserParameters",{enumerable:true,get:function(){return hydrogenReact.getClientBrowserParameters}});Object.defineProperty(exports,"getProductOptions",{enumerable:true,get:function(){return hydrogenReact.getProductOptions}});Object.defineProperty(exports,"getShopifyCookies",{enumerable:true,get:function(){return hydrogenReact.getShopifyCookies}});Object.defineProperty(exports,"getTrackingValues",{enumerable:true,get:function(){return hydrogenReact.getTrackingValues}});Object.defineProperty(exports,"isOptionValueCombinationInEncodedVariant",{enumerable:true,get:function(){return hydrogenReact.isOptionValueCombinationInEncodedVariant}});Object.defineProperty(exports,"mapSelectedProductOptionToObject",{enumerable:true,get:function(){return hydrogenReact.mapSelectedProductOptionToObject}});Object.defineProperty(exports,"parseGid",{enumerable:true,get:function(){return hydrogenReact.parseGid}});Object.defineProperty(exports,"parseMetafield",{enumerable:true,get:function(){return hydrogenReact.parseMetafield}});Object.defineProperty(exports,"sendShopifyAnalytics",{enumerable:true,get:function(){return hydrogenReact.sendShopifyAnalytics}});Object.defineProperty(exports,"storefrontApiCustomScalars",{enumerable:true,get:function(){return hydrogenReact.storefrontApiCustomScalars}});Object.defineProperty(exports,"useLoadScript",{enumerable:true,get:function(){return hydrogenReact.useLoadScript}});Object.defineProperty(exports,"useMoney",{enumerable:true,get:function(){return hydrogenReact.useMoney}});Object.defineProperty(exports,"useSelectedOptionInUrlParam",{enumerable:true,get:function(){return hydrogenReact.useSelectedOptionInUrlParam}});Object.defineProperty(exports,"useShopifyCookies",{enumerable:true,get:function(){return hydrogenReact.useShopifyCookies}});exports.Analytics=Yn;exports.AnalyticsEvent=F;exports.CacheCustom=Nt;exports.CacheLong=kt;exports.CacheNone=Ut;exports.CacheShort=ue;exports.CartForm=J;exports.InMemoryCache=$t;exports.NonceProvider=Lo;exports.OptimisticInput=Ss;exports.Pagination=Ts;exports.RichText=Gs;exports.Script=fs;exports.Seo=ai;exports.ShopPayButton=ii;exports.VariantSelector=Ms;exports.cartAttributesUpdateDefault=Jt;exports.cartBuyerIdentityUpdateDefault=Kt;exports.cartCreateDefault=Gt;exports.cartDiscountCodesUpdateDefault=jt;exports.cartGetDefault=qt;exports.cartGetIdDefault=Ft;exports.cartGiftCardCodesAddDefault=tr;exports.cartGiftCardCodesRemoveDefault=rr;exports.cartGiftCardCodesUpdateDefault=er;exports.cartLinesAddDefault=Bt;exports.cartLinesRemoveDefault=Wt;exports.cartLinesUpdateDefault=Qt;exports.cartMetafieldDeleteDefault=Zt;exports.cartMetafieldsSetDefault=Xt;exports.cartNoteUpdateDefault=Yt;exports.cartSelectedDeliveryOptionsUpdateDefault=zt;exports.cartSetIdDefault=Ht;exports.changelogHandler=Ga;exports.createCartHandler=or;exports.createContentSecurityPolicy=us;exports.createCustomerAccountClient=pr;exports.createHydrogenContext=rs;exports.createRequestHandler=ns;exports.createStorefrontClient=mo;exports.createWithCache=ia;exports.formatAPIResult=T;exports.generateCacheControlHeader=Oe;exports.getPaginationVariables=bs;exports.getSelectedProductOptions=Vs;exports.getSeoMeta=Ys;exports.getShopAnalytics=jn;exports.getSitemap=li;exports.getSitemapIndex=pi;exports.graphiqlLoader=Bs;exports.hydrogenContext=Ba;exports.hydrogenPreset=Fs;exports.hydrogenRoutes=Cs;exports.storefrontRedirect=Qs;exports.useAnalytics=Y;exports.useCustomerPrivacy=Rt;exports.useNonce=lr;exports.useOptimisticCart=Ha;exports.useOptimisticData=As;exports.useOptimisticVariant=Os;//# sourceMappingURL=index.cjs.map
1051
1051
  //# sourceMappingURL=index.cjs.map