{"version":3,"file":"CountriesExcept.BPy84Zuc.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/G19XXr8WyxzTHt0Zh8qj/GOhDqeVCN1WVQBdIdUrx/CountriesExcept.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";/* -------------------------------------------\n   Single fetch for country, cached per page\n-------------------------------------------- */let cachedCountry=null;let pending=null;async function getCountry(){if(cachedCountry)return cachedCountry;if(pending)return pending;pending=fetch(\"https://api.country.is\").then(r=>r.json()).then(data=>{cachedCountry=data.country||\"\";return cachedCountry;}).catch(()=>{cachedCountry=\"\";return cachedCountry;}).finally(()=>{pending=null;});return pending;}/* -------------------------------------------\n   HOC Factory: Completely unmounts the component\n-------------------------------------------- */function createExcludeCountryOverride(countryCode){return function withExcludeCountry(Component){return function LocationOverride(props){// Start true so it doesn't break layout/SEO for everyone else\nconst[shouldShow,setShouldShow]=useState(true);useEffect(()=>{let mounted=true;getCountry().then(country=>{if(!mounted)return;// Hide ONLY if they are in the excluded country\nif(country===countryCode){setShouldShow(false);}});return()=>{mounted=false;};},[countryCode]);// If false, completely remove from DOM to prevent empty gaps\nif(!shouldShow)return null;return /*#__PURE__*/_jsx(Component,{...props});};};}/* -------------------------------------------\n   Exports\n-------------------------------------------- */export function argentina(Component){return createExcludeCountryOverride(\"AR\")(Component);}export function portugal(Component){return createExcludeCountryOverride(\"PT\")(Component);}export function usa(Component){return createExcludeCountryOverride(\"US\")(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"usa\":{\"type\":\"reactHoc\",\"name\":\"usa\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"portugal\":{\"type\":\"reactHoc\",\"name\":\"portugal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"argentina\":{\"type\":\"reactHoc\",\"name\":\"argentina\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CountriesExcept.map"],"mappings":"yHAEuF,eAAe,GAAY,CAA+Q,OAA3Q,GAAsC,IAAuB,EAAQ,MAAM,wBAAwB,CAAC,CAAC,KAAK,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,IAAO,EAAc,EAAK,SAAS,GAAU,EAAe,CAAC,CAAC,WAAW,EAAc,GAAU,EAAe,CAAC,CAAC,YAAY,CAAC,EAAQ,IAAK,CAAC,EAAS,EAAQ,CAEjW,SAAS,EAA6B,EAAY,CAAC,OAAO,SAA4B,EAAU,CAAC,OAAO,SAA0B,EAAM,CACvL,GAAK,CAAC,EAAW,GAAeA,EAAS,EAAI,EAElB,OAFoB,MAAc,CAAC,IAAI,EAAQ,GACvB,OAD4B,EAAW,CAAC,CAAC,KAAK,GAAS,CAAK,GAC5G,IAAU,GAAa,EAAc,EAAK,CAAG,CAAC,MAAY,CAAC,EAAQ,EAAM,CAAE,EAAE,CAAC,CAAW,CAAC,EACzF,EAA2C,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,EAAlD,IAAoD,CAAE,CAAE,CAE/B,SAAgB,EAAU,EAAU,CAAC,OAAO,EAA6B,IAAI,CAAC,CAAC,CAAS,CAAE,CAAC,SAAgB,EAAS,EAAU,CAAC,OAAO,EAA6B,IAAI,CAAC,CAAC,CAAS,CAAE,qBATzL,IAAsC,EAE7B,EAAc,KAAS,EAAQ"}