{"version":3,"file":"UserAgent.DPks2OXR.mjs","names":["React.useRef"],"sources":["https:/framerusercontent.com/modules/FqIeiDaGXFftmybstLNa/0N3mQdf2idVlVar379sM/UserAgent.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";// ---------- Safe Platform Detection ----------\nfunction getPlatform(){if(typeof window===\"undefined\"||typeof navigator===\"undefined\"){return{os:\"unknown\",device:\"unknown\"};}const ua=navigator.userAgent||navigator.vendor||window.opera;// --- Detect OS ---\nlet os=\"unknown\";if(/windows phone/i.test(ua)||/win/i.test(ua)){os=\"windows\";}else if(/android/i.test(ua)){os=\"android\";}else if(/iPad|iPhone|iPod/.test(ua)&&!window.MSStream){os=\"ios\";}else if(/Mac/i.test(ua)){os=\"mac\";}// --- Detect Device Type ---\nconst width=window.innerWidth;let device=\"desktop\";if(/Mobile|iPhone|Android/.test(ua)){device=\"mobile\";}else if(/iPad|Tablet/.test(ua)||width>=600&&width<=1024){device=\"tablet\";}return{os,device};}// ---------- Conditional Wrapper ----------\nfunction showIfPlatform(target,shouldMatch){return function(Component){return props=>{const ref=React.useRef(null);React.useEffect(()=>{const el=ref.current;if(!el)return;const{os,device}=getPlatform();const matches=os===target||device===target;const shouldShow=matches===shouldMatch;if(!shouldShow){el.style.display=\"none\";}},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});};};}// ---------- Show Wrappers ----------\nexport function ShowIfMac(Component){return showIfPlatform(\"mac\",true)(Component);}export function ShowIfWindows(Component){return showIfPlatform(\"windows\",true)(Component);}export function ShowIfAndroid(Component){return showIfPlatform(\"android\",true)(Component);}export function ShowIfIOS(Component){return showIfPlatform(\"ios\",true)(Component);}export function ShowIfDesktop(Component){return showIfPlatform(\"desktop\",true)(Component);}export function ShowIfTablet(Component){return showIfPlatform(\"tablet\",true)(Component);}export function ShowIfMobile(Component){return showIfPlatform(\"mobile\",true)(Component);}// ---------- Hide Wrappers ----------\nexport function HideIfMac(Component){return showIfPlatform(\"mac\",false)(Component);}export function HideIfWindows(Component){return showIfPlatform(\"windows\",false)(Component);}export function HideIfAndroid(Component){return showIfPlatform(\"android\",false)(Component);}export function HideIfIOS(Component){return showIfPlatform(\"ios\",false)(Component);}export function HideIfDesktop(Component){return showIfPlatform(\"desktop\",false)(Component);}export function HideIfTablet(Component){return showIfPlatform(\"tablet\",false)(Component);}export function HideIfMobile(Component){return showIfPlatform(\"mobile\",false)(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"ShowIfTablet\":{\"type\":\"reactHoc\",\"name\":\"ShowIfTablet\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideIfIOS\":{\"type\":\"reactHoc\",\"name\":\"HideIfIOS\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideIfWindows\":{\"type\":\"reactHoc\",\"name\":\"HideIfWindows\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfWindows\":{\"type\":\"reactHoc\",\"name\":\"ShowIfWindows\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfDesktop\":{\"type\":\"reactHoc\",\"name\":\"ShowIfDesktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfIOS\":{\"type\":\"reactHoc\",\"name\":\"ShowIfIOS\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfMobile\":{\"type\":\"reactHoc\",\"name\":\"ShowIfMobile\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideIfMac\":{\"type\":\"reactHoc\",\"name\":\"HideIfMac\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideIfMobile\":{\"type\":\"reactHoc\",\"name\":\"HideIfMobile\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideIfAndroid\":{\"type\":\"reactHoc\",\"name\":\"HideIfAndroid\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideIfTablet\":{\"type\":\"reactHoc\",\"name\":\"HideIfTablet\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideIfDesktop\":{\"type\":\"reactHoc\",\"name\":\"HideIfDesktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfMac\":{\"type\":\"reactHoc\",\"name\":\"ShowIfMac\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfAndroid\":{\"type\":\"reactHoc\",\"name\":\"ShowIfAndroid\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UserAgent.map"],"mappings":"8IACA,SAAS,GAAa,CAAC,GAAU,IAAS,QAAoB,IAAY,OAAa,MAAM,CAAC,GAAG,UAAU,OAAO,UAAU,CAAE,IAAM,EAAG,EAAU,WAAW,EAAU,QAAQ,EAAO,MACjL,EAAG,UAAa,iBAAiB,KAAK,EAAG,EAAE,OAAO,KAAK,EAAG,CAAE,EAAG,UAAmB,WAAW,KAAK,EAAG,CAAE,EAAG,UAAmB,mBAAmB,KAAK,EAAG,EAAE,CAAC,EAAO,SAAU,EAAG,MAAe,OAAO,KAAK,EAAG,GAAE,EAAG,OACtN,IAAM,EAAM,EAAO,WAAe,EAAO,UAA0I,MAA7H,wBAAwB,KAAK,EAAG,CAAE,EAAO,UAAkB,cAAc,KAAK,EAAG,EAAE,GAAO,KAAK,GAAO,QAAM,EAAO,UAAgB,CAAC,KAAG,SAAO,CACpM,SAAS,EAAe,EAAO,EAAY,CAAC,OAAO,SAAS,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAa,KAAK,CAAyN,OAAxN,MAAoB,CAAC,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,EAAG,OAAO,GAAK,CAAC,KAAG,UAAQ,GAAa,EAAe,IAAK,GAAQ,IAAS,KAAkC,IAA4B,EAAG,MAAM,QAAQ,SAAU,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,CAAC,GACjY,SAAgB,EAAU,EAAU,CAAC,OAAO,EAAe,MAAM,GAAK,CAAC,EAAU,CAAE,SAAg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