PageSourceSearch

https://www.atomic.com/cdn/shop/t/38/assets/market-mismatch.js?v=20238295602518693801789485367

js atomic.com collected 2026-09-24 19:01:56 UTC 3,491 bytes, 2 lines download raw bytes

1(()=>{const DISMISS_KEY="marketMismatchDismissed",REDIRECT_KEY="marketAutoRedirected",COUNTRY_TOKEN="__country__";if(window.Shopify&&window.Shopify.designMode)return;const init=()=>{const drawer=document.getElementById("MarketMismatchDrawer"),ctx=window.marketContext;if(!(!drawer||!ctx||!ctx.current)){try{if(sessionStorage.getItem(DISMISS_KEY)==="1")return}catch{}detectCountry().then(detected=>{if(!detected||detected===ctx.current)return;const suggestion=ctx.resolve(detected);if(!suggestion||(suggestion.name=countryName(detected),ctx.isHome&&!suggestion.international&&!hasRedirected()&&(markRedirected(),ctx.applySuggestion(suggestion))))return;renderBody(drawer,suggestion);const switchBtn=drawer.querySelector("[data-mismatch-switch]");switchBtn&&switchBtn.addEventListener("click",e=>{e.preventDefault(),dismiss(),ctx.applySuggestion(suggestion)}),drawer.querySelectorAll("[data-mismatch-stay]").forEach(el=>{el.addEventListener("click",dismiss)});const chooseBtn=drawer.querySelector("[data-mismatch-choose]");chooseBtn&&chooseBtn.addEventListener("click",()=>{dismiss(),setTimeout(openCountrySelector,350)}),drawer.open()})}},detectCountry=async()=>{const geo=window.marketGeo;if(!geo)return null;if(geo.cached)return geo.cached;if(!geo.promise)return null;try{return await geo.promise}catch{return null}},bodyTemplates=new WeakMap,withCountry=(template,name)=>template.split(COUNTRY_TOKEN).join(name),renderBody=(drawer,suggestion)=>{const title=drawer.querySelector("[data-mismatch-title]");title&&(title.textContent=withCountry(drawer.dataset.title||"",suggestion.name));const body=drawer.querySelector(".market-mismatch__text");body&&(bodyTemplates.has(body)||bodyTemplates.set(body,body.textContent),body.textContent=withCountry(bodyTemplates.get(body),suggestion.name));const label=drawer.querySelector("[data-mismatch-country]");label&&(label.textContent=suggestion.international&&drawer.dataset.internationalLabel||suggestion.name);const flagImg=drawer.querySelector("[data-mismatch-flag]"),globe=drawer.querySelector("[data-mismatch-globe]");suggestion.international||!suggestion.flag?(flagImg&&(flagImg.hidden=!0),globe&&(globe.hidden=!1)):(globe&&(globe.hidden=!0),flagImg&&(flagImg.src=suggestion.flag,flagImg.alt="",flagImg.hidden=!1))},countryName=iso=>{if(typeof Intl>"u"||typeof Intl.DisplayNames!="function"||!iso||iso.length!==2)return iso;const locale=document.documentElement.lang||"en";try{return new Intl.DisplayNames([locale,"en"],{type:"region"}).of(iso)||iso}catch{try{return new Intl.DisplayNames(["en"],{type:"region"}).of(iso)||iso}catch{return iso}}},openCountrySelector=()=>{const globe=document.querySelector(".header__icon--globe.header-localization__toggle");if(globe&&globe.offsetParent!==null){globe.click();return}const nav=document.querySelector("nav-drawer");if(!nav||typeof nav.open!="function")return;nav.open(document.querySelector(".header__burger")),nav.navigateTo("localization");const search=nav.querySelector('.nav-drawer__panel--localization input[type="search"]');search&&setTimeout(()=>search.focus(),400)},dismiss=()=>{try{sessionStorage.setItem(DISMISS_KEY,"1")}catch{}},hasRedirected=()=>{try{return sessionStorage.getItem(REDIRECT_KEY)==="1"}catch{return!1}},markRedirected=()=>{try{sessionStorage.setItem(REDIRECT_KEY,"1")}catch{}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})();
2//# sourceMappingURL=/cdn/shop/t/38/assets/market-mismatch.js.map?v=20238295602518693801789485367

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.