{"version":3,"file":"TrackingRedirect.h1XundVO.mjs","names":["useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/zmZfUJzTYCnH7njn5Pat/jeNYyoQ1SRwcn1bR0gEm/TrackingRedirect.js"],"sourcesContent":["// User request: Create a small Framer code component named TrackingRedirect for an intermediate tracking redirect page that redirects to Stripe after a configurable delay, with SSR/static guards, canvas-safe behavior, and property controls for destinationUrl, delayMs, and label.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TrackingRedirect(props){const{destinationUrl=\"https://buy.stripe.com/9B614m1vd0zg2dwgkg2wU0F\",delayMs=250,label=\"Redirecting to checkout…\",style}=props;const redirectToDestination=useCallback(()=>{if(typeof window===\"undefined\")return;try{if(window.top&&window.top.location){window.top.location.replace(destinationUrl);return;}}catch(error){// Accessing or navigating window.top can throw in cross-origin frames.\n}try{window.location.replace(destinationUrl);}catch(error){// No further fallback available.\n}},[destinationUrl]);useEffect(()=>{if(typeof window===\"undefined\")return;if(!destinationUrl)return;void delayMs;redirectToDestination();},[delayMs,destinationUrl,redirectToDestination]);const containerStyle=useMemo(()=>({position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",padding:16,boxSizing:\"border-box\",...style}),[style]);return /*#__PURE__*/_jsx(\"main\",{style:containerStyle,\"aria-live\":\"polite\",children:/*#__PURE__*/_jsx(\"span\",{style:{width:\"max-content\",maxWidth:\"100%\"},children:label})});}addPropertyControls(TrackingRedirect,{destinationUrl:{type:ControlType.String,title:\"Destination\",defaultValue:\"https://buy.stripe.com/9B614m1vd0zg2dwgkg2wU0F\",placeholder:\"https://example.com\"},delayMs:{type:ControlType.Number,title:\"Delay\",defaultValue:250,min:0,max:5e3,step:50,unit:\"ms\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Redirecting to checkout…\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TrackingRedirect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TrackingRedirect.map"],"mappings":"kMAIG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,iBAAe,iDAAiD,UAAQ,IAAI,QAAM,2BAA2B,SAAO,EAAY,EAAsBA,MAAgB,CAAI,GAAO,IAAS,OAAmB,IAAG,CAAC,GAAG,EAAO,KAAK,EAAO,IAAI,SAAS,CAAC,EAAO,IAAI,SAAS,QAAQ,CAAc,EAAE,MAAO,CAAC,MAAa,CAC/W,CAAC,GAAG,CAAC,EAAO,SAAS,QAAQ,CAAc,CAAE,MAAa,CAC1D,CADA,CACC,EAAE,CAAC,CAAc,CAAC,EAA8X,OAA5X,MAAc,CAAW,IAAS,QAAuB,GAAmC,EAAsB,CAAE,EAAE,CAAC,EAAQ,EAAe,CAAqB,CAAC,EAA4O,EAAK,OAAO,CAAC,MAAlOC,OAAa,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,UAAU,SAAS,QAAQ,GAAG,UAAU,aAAa,GAAG,CAAK,GAAG,CAAC,CAAK,CAAuD,EAAE,YAAY,SAAS,SAAsB,EAAK,OAAO,CAAC,MAAM,CAAC,MAAM,cAAc,SAAS,MAAM,EAAE,SAAS,CAAK,CAAC,CAAC,CAAC,CAAE,qBALphB,IAAiD,IAAoD,EAKgb,EAAoB,EAAiB,CAAC,eAAe,CAAC,KAAK,EAAY,OAAO,MAAM,cAAc,aAAa,iDAAiD,YAAY,qBAAqB,EAAE,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,IAAI,IAAI,EAAE,IAAI,IAAI,KAAK,GAAG,KAAK,IAAI,EAAE,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,0BAA0B,CAAC,CAAC"}