PageSourceSearch

https://savemart.com/build/_shared/chunk-4V5XVBRQ.js

js savemart.com collected 2026-09-24 20:02:12 UTC 2,853 bytes, 1 lines download raw bytes

1var i=e=>{var n;let o=((n=e==null?void 0:e.message)==null?void 0:n.toLowerCase())||"";return o.includes("failed to fetch dynamically imported module")||o.includes("failed to resolve module specifier")||o.includes("importing a module script failed")||o.includes("error loading dynamically imported module")||o.includes("loading chunk")||o.includes("loading css chunk")||(e==null?void 0:e.name)==="ChunkLoadError"||(e==null?void 0:e.code)==="MODULE_NOT_FOUND"&&o.includes("chunk")},c=async()=>{if("caches"in window)try{let e=await caches.keys();await Promise.all(e.map(o=>caches.delete(o))),console.log("Cleared browser caches:",e)}catch(e){console.error("Error clearing caches",e)}},u=async()=>{if(typeof navigator=="undefined"||!("serviceWorker"in navigator))return{foundServiceWorkers:!1,shouldRedirect:!1};try{let e=await navigator.serviceWorker.getRegistrations();if(e.length===0)return console.log("[SW Cleanup] No service workers found"),{foundServiceWorkers:!1,shouldRedirect:!1};console.log("[SW Cleanup] Found",e.length,"service worker(s) to unregister");for(let o of e)try{await o.unregister(),console.log("[SW Cleanup] Unregistered service worker:",o.scope)}catch(n){console.error("[SW Cleanup] Failed to unregister service worker:",o.scope,n)}if(await c(),console.log("[SW Cleanup] Cleanup completed successfully"),typeof window!="undefined"){let o=new URL(window.location.href);return{foundServiceWorkers:!0,shouldRedirect:o.pathname==="/"||o.pathname===""}}return{foundServiceWorkers:!0,shouldRedirect:!1}}catch(e){console.error("[SW Cleanup] Error during cleanup:",e)}return{foundServiceWorkers:!1,shouldRedirect:!1}},a=()=>{setTimeout(()=>{f()},200)},s="chunk-reload-once";var f=async()=>{if(typeof window!="undefined"){if(document.visibilityState==="hidden"){console.warn("Page is hidden (navigating away); skipping chunk reload.");return}try{let e=Number(sessionStorage.getItem(s))||0;if(Date.now()-e<6e5){console.warn("Chunk reload already attempted recently; skipping.");return}sessionStorage.setItem(s,Date.now().toString())}catch{}await c(),await u();try{let e=new URL(window.location.href);e.searchParams.set("nocache",Date.now().toString()),window.location.href=e.toString()}catch(e){console.error("Error navigating to current url with query param to force fresh page:",e),window.location.reload()}}},w=()=>{if(typeof window=="undefined")return;let e=window.onerror;window.onerror=(n,r,l,d,t)=>t&&i(t)?(console.warn("Chunk load error detected (window.onerror). Reloading page..."),a(),!0):e&&typeof e=="function"?e(n,r,l,d,t):!1;let o=window.onunhandledrejection;window.addEventListener("unhandledrejection",n=>{let r=n.reason;if(i(r)){console.warn("Chunk load error detected (unhandledrejection). Reloading page..."),a(),n.preventDefault();return}o&&typeof o=="function"&&o.call(window,n)})};export{i as a,u as b,a as c,w as d};

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.