1import{w as N,r as a,x as d,j as t,B as g,E as k,R}from"./index-P0N1Je5T.js";import{G as x}from"./globe-Dl8HrUsL.js";import{C as F}from"./circle-alert-CrhXFnHf.js";const s="https://happier-stick-113640.framer.app",o=3,f=2,P=()=>{const r=N(),[b,v]=a.useState(f),[n,w]=a.useState(0),i=(()=>{const e=window.location.hostname;return e.includes("lovable.app")||e.includes("lovable.dev")||e.includes("pages.dev")||e.includes("localhost")||e.includes("127.0.0.1")||e.includes("webcontainer")})(),[y,_]=a.useState(i),u=a.useRef(!1),m=a.useCallback(()=>{const e=r.pathname;return e==="/en"||e==="/"?s:e.startsWith("/en/")?`${s}${e.slice(3)}`:e==="/partners"?`${s}/partners`:e==="/pt"?`${s}/pt`:e==="/es"?`${s}/es`:e==="/fr"?`${s}/fr`:s},[r.pathname]);a.useCallback(()=>`https://drophighlight.com${r.pathname}`,[r.pathname]);const c=a.useCallback(()=>{const e=window.location.hostname;return e.includes("lovable.app")||e.includes("lovable.dev")||e.includes("pages.dev")||e.includes("localhost")||e.includes("127.0.0.1")||e.includes("webcontainer")},[]),l=a.useCallback(e=>{d.logError({error_type:`framer_fallback_${e}_redirect`,error_message:`Redirecting to Framer: ${e}`,component_name:"FramerFallbackPage",user_action:e==="manual"?"manual_redirect":"auto_redirect",severity:e==="max_retries"?"error":"info",context_data:{path:r.pathname,reason:e,retryCountAtRedirect:n,framerUrl:m(),environment:c()?"preview":"production"}}),_(!0),window.location.href=m()},[m,r.pathname,n,c]);if(a.useEffect(()=>{if(u.current)return;u.current=!0;const e=c();d.logError({error_type:"framer_fallback_displayed",error_message:"FramerFallbackPage displayed - Framer proxy may have failed",component_name:"FramerFallbackPage",user_action:"page_view",severity:"warn",context_data:{path:r.pathname,environment:e?"preview":"production",userAgent:navigator.userAgent,referrer:document.referrer,timestamp:new Date().toISOString()}})},[r.pathname,c]),a.useEffect(()=>{if(i){l("preview");return}const e=setInterval(()=>{v(h=>h<=1?n>=o-1?(l("max_retries"),0):(d.logError({error_type:"framer_fallback_retry",error_message:`Retry attempt ${n+2} of ${o}`,component_name:"FramerFallbackPage",user_action:"auto_retry",severity:"info",context_data:{path:r.pathname,retryAttempt:n+2,maxRetries:o,environment:"production"}}),w(j=>j+1),window.location.reload(),f):h-1)},1e3);return()=>clearInterval(e)},[n,i,l,r.pathname]),y)return t.jsx("div",{className:"min-h-screen bg-gradient-to-b from-gray-900 to-black flex items-center justify-center p-6",children:t.jsxs("div",{className:"text-center text-white",children:[t.jsx(x,{className:"mx-auto h-16 w-16 text-blue-400 mb-6 animate-spin"}),t.jsx("p",{className:"text-lg",children:"Redirecting to landing page..."})]})});const p=o-n;return t.jsx("div",{className:"min-h-screen bg-gradient-to-b from-gray-900 to-black flex items-center justify-center p-6",children:t.jsxs("div",{className:"max-w-md text-center text-white",children:[t.jsx(x,{className:"mx-auto h-16 w-16 text-blue-400 mb-6 animate-pulse"}),t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Loading Landing Page..."}),i?t.jsx("p",{className:"text-gray-400 mb-6",children:"Redirecting to Framer in 1 second..."}):t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"text-gray-400 mb-4",children:"Connecting to our landing page. This should only take a moment."}),n>0&&t.jsxs("div",{className:"flex items-center justify-center gap-2 text-yellow-400 text-sm mb-4",children:[t.jsx(F,{className:"h-4 w-4"}),t.jsxs("span",{children:["Attempt ",n+1," of ",o]})]}),t.jsx("div",{className:"text-sm text-gray-500 mb-6",children:p>0?`Retrying in ${b}s... (${p} attempts left)`:"Redirecting to backup..."})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs(g,{onClick:()=>l("manual"),className:"w-full bg-blue-600 hover:bg-blue-700",children:[t.jsx(k,{className:"mr-2 h-4 w-4"}),"Go to Landing Page Now"]}),!i&&t.jsxs(g,{variant:"outline",onClick:()=>window.location.reload(),className:"w-full border-gray-600 text-gray-300 hover:bg-gray-800",children:[t.jsx(R,{className:"mr-2 h-4 w-4"}),"Retry Proxy"]})]}),t.jsx("p",{className:"text-xs text-gray-600 mt-8",children:i?"Preview environment detected":r.pathname})]})})};export{P as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.