{"version":3,"file":"AddTracking.CMPdIA9v.mjs","names":[],"sources":["https:/framerusercontent.com/modules/noB34BW0yWxfG3nmicED/bt1zot1sL13VRvR65XCZ/AddTracking.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});// Get UUID from localStorage only (no generation)\nfunction getUUID(){try{// Only retrieve from localStorage, don't generate if not found\nreturn localStorage.getItem(\"gb_uuid\")||\"\";}catch(e){// Return empty string if localStorage isn't available\nreturn\"\";}}// Get the UUID once when this code runs\nconst uuid=getUUID();export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}export function withTrackedLink(Component){return props=>{const handleClick=()=>{// Get the current href from props\nlet url=props.href||props.url||\"\";if(url&&uuid){// Add UUID to the URL for tracked variants\nconst separator=url.includes(\"?\")?\"&\":\"?\";const trackedUrl=`${url}${separator}uuid=${encodeURIComponent(uuid)}`;// Open URL in a new tab\nwindow.open(trackedUrl,\"_blank\");}else if(url){// For non-tracked variants, just open the original URL\nwindow.location.href=url;}};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTrackedLink\":{\"type\":\"reactHoc\",\"name\":\"withTrackedLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AddTracking.map"],"mappings":"gVAEA,SAAS,GAAS,CAAC,GAAG,CACtB,MAAO,cAAa,QAAQ,UAAU,EAAE,EAAI,MAAQ,CACpD,MAAM,EAAI,CAAC,CACunB,SAAgB,EAAgB,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,IAAM,EAAY,IAAI,CACltB,IAAI,EAAI,EAAM,MAAM,EAAM,KAAK,GAAG,GAAG,GAAK,EAAK,CAC/C,IAAM,EAAU,EAAI,SAAS,IAAI,CAAC,IAAI,IAAU,KAAc,IAAM,EAAU,OAAO,mBAAmB,EAAK,GAC7G,EAAO,KAAK,EAAW,SAAS,AAAE,MAAA,AAAQ,IAC1C,EAAO,SAAS,KAAK,EAAM,EAAC,MAAoB,GAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,CAAY,EAAC,AAAE,CAAE,kBAJ5F,IALN,GAA2C,IAA8B,IAAqE,IAAqE,CAC7M,EAAS,EAAY,CAAC,WAAW,SAAU,EAAC,CAI5C,EAAK,GAAS"}