1import{c as u}from"/build/_shared/chunk-4V5XVBRQ.js";import{p as h}from"/build/_shared/chunk-XC7SPKRF.js";import{a as b}from"/build/_shared/chunk-G3QUQOKW.js";import{a as y}from"/build/_shared/chunk-F3RAJA4O.js";import{e as p}from"/build/_shared/chunk-O3BUCIVF.js";var S=async(o,r,t)=>{if(!(t&&t.current))try{await o();let a=!0;r&&(a=await r()!==!1),t&&a&&(t.current=!0)}catch(a){console.error("Error preloading component (stale chunks). Attempting reload after delay.",a),u()}},g=async(o,r)=>{if(typeof document=="undefined")return!0;try{let t=await r(),a=t.links||t.default;return a&&a().forEach((n,c)=>{let s=`link[rel="${CSS.escape(n.rel)}"][href="${CSS.escape(n.href)}"]`;if(document.querySelector(s))return;let i=document.createElement("link");i.rel=n.rel,i.href=n.href,i.setAttribute("data-testid",`${o}-${c}`),document.head.appendChild(i)}),!0}catch(t){return console.error(`Error preloading modal styles for ${o}`,t),u(),!1}};var m={current:!1};var e=p(y());var l=p(y());var f=async o=>{m.current||(await S(()=>import("/build/_shared/SwiftlyMapSideOverlayV2-3QF3OTVZ.js"),async()=>await g("store-drawer-styles",()=>import("/build/_shared/links-EDY2DY4L.js")),m),o==null||o(!0))},Q=()=>{let[o,r]=(0,l.useState)(!1);return{preload:(0,l.useCallback)(async t=>{await f(a=>r(a))},[]),isStoreLocatorModalLoaded:o}};var A=o=>({setShowStoreDrawer:async r=>{r&&await f(),o(t=>({...t,showSelectStoreDrawer:r}))},setLoginRedirect:r=>o(t=>({...t,loginRedirect:r})),dismissBanner:r=>o(t=>{var d;let a=(d=t.dismissedBanners)!=null?d:[];return a.includes(r)?t:{...t,dismissedBanners:[r,...a]}})});var C={showSelectStoreDrawer:!1,showLoginModal:!1,showWaitModal:!1,showCashBackModal:!1,showStoreModal:!1,dismissedBanners:[],noAdsLoaded:!1};var w=p(b()),x=(0,e.createContext)(void 0),re=({children:o,initialAssets:r,initialPublicEnvs:t,initialRootPageData:a})=>{let[d,n]=h({key:"app-data",defaultValue:C,getInitialValueInEffect:!1}),[c,s]=(0,e.useState)([]),[i,v]=(0,e.useState)(!1),[P,B]=(0,e.useState)(void 0),[L,D]=(0,e.useState)(null),[E,R]=(0,e.useState)(!1),[M]=(0,e.useState)(a),[k]=(0,e.useState)(t),[H]=(0,e.useState)(r),[N,T]=(0,e.useState)([]),[V,W]=(0,e.useState)({}),[$,U]=(0,e.useState)(!1),q=(0,e.useCallback)(()=>{s([])},[s]),F=(0,e.useCallback)(()=>{s([{path:"/",name:"Home"}])},[s]),I=(0,e.useMemo)(()=>A(n),[n]);return(0,e.useEffect)(()=>{let O=requestAnimationFrame(()=>{(0,e.startTransition)(()=>{R(!0)})});return()=>cancelAnimationFrame(O)},[]),(0,w.jsx)(x.Provider,{value:{app:d,...I,assets:H,breadcrumb:c,clientNotificationLayoutUnlocked:E,clippedCoupons:V,layoutHeaderHeightPx:L,loadedAds:N,noAdsLoaded:$,publicEnvs:k,rootPageData:M,setBaseBreadcrumb:F,setBreadcrumb:s,setClippedCoupons:W,setLayoutHeaderHeightPx:D,setLoadedAds:T,setNoAdsLoaded:U,setNoBreadcrumb:q,setSmartBanner:B,setShowPageWideLoader:v,showPageWideLoader:i,smartBanner:P},children:o})},ae=()=>{let o=(0,e.useContext)(x);if(!o)throw new Error("AppContext must have a provider. Please add AppContextProvider higher in the tree.");return o};export{S as a,g as b,m as c,Q as d,re as e,ae as f};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.