{"version":3,"file":"Go_Back.DyaVRITU.mjs","names":["__legacyOverrideHOC_DataObserverContext"],"sources":["https:/framerusercontent.com/modules/vmv4wERHuhGLJMIJZeOj/ewFoUkV4L9hp6M5X80pT/Go_Back.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";const isOwnWebsite=url=>{const currentDomain=window.location.hostname;try{const previousDomain=new URL(url).hostname;return currentDomain===previousDomain;}catch(e){return false;}};const canGoBack=()=>{return window.history.length>1;};export const GoBack=()=>{return{onTap(){const fallbackUrl=`${window.location.origin}/uikit`;if(canGoBack()){// Creating a custom back navigation to avoid YouTube conflicts\nconst currentLocation=window.location.href;// Save current scroll position\nconst scrollPos={x:window.scrollX,y:window.scrollY};// Use the History API directly with state\nwindow.history.back();// Check if navigation happened\nsetTimeout(()=>{if(window.location.href===currentLocation){// If we're still on the same page, try the fallback URL\nwindow.location.href=fallbackUrl;}},200);}else{window.location.href=fallbackUrl;}}};};export const GoBackRemix=()=>{return{onTap(){const fallbackUrl=`${window.location.origin}/remix`;if(canGoBack()){const currentLocation=window.location.href;// Save current scroll position\nconst scrollPos={x:window.scrollX,y:window.scrollY};// Use the History API directly with state\nwindow.history.back();// Check if navigation happened\nsetTimeout(()=>{if(window.location.href===currentLocation){// If we're still on the same page, try the fallback URL\nwindow.location.href=fallbackUrl;}},200);}else{window.location.href=fallbackUrl;}}};};export const GoBackLearn=()=>{return{onTap(){const fallbackUrl=`${window.location.origin}/learn`;if(canGoBack()){const currentLocation=window.location.href;// Save current scroll position\nconst scrollPos={x:window.scrollX,y:window.scrollY};// Use the History API directly with state\nwindow.history.back();// Check if navigation happened\nsetTimeout(()=>{if(window.location.href===currentLocation){// If we're still on the same page, try the fallback URL\nwindow.location.href=fallbackUrl;}},200);}else{window.location.href=fallbackUrl;}}};};import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withGoBack(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...GoBack(props)});};}withGoBack.displayName=\"GoBack\";export function withGoBackRemix(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...GoBackRemix(props)});};}withGoBackRemix.displayName=\"GoBackRemix\";export function withGoBackLearn(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...GoBackLearn(props)});};}withGoBackLearn.displayName=\"GoBackLearn\";\nexport const __FramerMetadata__ = {\"exports\":{\"GoBackLearn\":{\"type\":\"override\",\"name\":\"GoBackLearn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"GoBackRemix\":{\"type\":\"override\",\"name\":\"GoBackRemix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGoBackRemix\":{\"type\":\"reactHoc\",\"name\":\"withGoBackRemix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGoBackLearn\":{\"type\":\"reactHoc\",\"name\":\"withGoBackLearn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGoBack\":{\"type\":\"reactHoc\",\"name\":\"withGoBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"GoBack\":{\"type\":\"override\",\"name\":\"GoBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Go_Back.map"],"mappings":"yRAayO,SAAgB,EAAW,EAAE,CAAC,MAAO,CAAA,IAAQ,EAA+BA,EAAwC,CAAQ,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAO,EAAM,AAAC,EAAC,CAAI,CAAgC,SAAgB,EAAgB,EAAE,CAAC,MAAO,CAAA,IAAQ,EAA+BA,EAAwC,CAAQ,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAY,EAAM,AAAC,EAAC,CAAI,CAA0C,SAAgB,EAAgB,EAAE,CAAC,MAAO,CAAA,IAAQ,EAA+BA,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