1import{j as r,q as b,_ as I,s as k}from"./index-B3LkCOOS.js";const T=[{icon:r.jsx(b,{size:16,strokeWidth:1.75}),title:"AI Builds With You",desc:"Create your community, courses, coaching, content, and Apps."},{icon:r.jsx(I,{size:16,strokeWidth:1.75}),title:"Run Everything In One Place",desc:"Members, payments, events, content, and coaching together."},{icon:r.jsx(b,{size:16,strokeWidth:1.75}),title:"AIVA Works Behind The Scenes",desc:"Find opportunities, create content, and automate the busywork."}];function z(){return r.jsx("div",{className:"lt-auth-right",children:r.jsxs("div",{className:"lt-auth-brand",children:[r.jsx("h2",{children:"Built For Creators Who Want More Than Followers."}),r.jsx("p",{className:"lt-auth-brand-sub",children:"Everything you need to run a paid club, in one place."}),r.jsx("div",{className:"lt-props",children:T.map(e=>r.jsxs("div",{className:"lt-prop",children:[r.jsx("div",{className:"lt-prop-i",children:e.icon}),r.jsxs("div",{children:[r.jsx("div",{className:"lt-prop-t",children:e.title}),r.jsx("div",{className:"lt-prop-d",children:e.desc})]})]},e.title))}),r.jsxs("p",{className:"lt-quote",children:["âMy Club runs on autopilot now.â ",r.jsx("strong",{children:"Jamie L., Real Estate Coach"})]})]})})}function Y(){return r.jsx("p",{className:"lt-mobile-note",children:"community, courses, coaching, and apps, built with AI, in one place."})}const x="authorization_response",O="/~oauth/initiate",L=["https://oauth.lovable.app","https://lovable.dev"],R="lovable://oauth-callback",j="http://127.0.0.1/iframe-oauth/callback",U=500,M=12e4,N=/LovableAppScheme\/([a-z0-9.+-]+)/i;function D(e){const t=N.exec(e)?.[1];return t?`${t}://oauth-callback`:R}function C(e){let t;const n=new Promise(a=>{t=a}),o=a=>{if(!e.some(u=>a.origin===u))return;const i=a.data;!i||typeof i!="object"||i.type===x&&t(i.response)},w=()=>{window.removeEventListener("message",o)};return window.addEventListener("message",o),{cleanup:w,messagePromise:n}}function W(e){const t=window.screenX!==0||window.screenY!==0||!e,n=t?window.outerWidth*.5:window.screen.width*.5,o=t?window.outerHeight*.5:window.screen.height*.5;return{width:n,height:o,left:t?window.screenX+(window.outerWidth-n)/2:(window.screen.width-n)/2,top:t?window.screenY+(window.outerHeight-o)/2:(window.screen.height-o)/2}}function S(e,t){return e.state!==t?{error:new Error("State is invalid")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function B(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function F(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function $(e={}){const t=e.oauthBrokerUrl??O,n=e.supportedOAuthOrigins??L;async function o(w,a={}){let i=!1;try{i=window.self!==window.top}catch{i=!0}const u=navigator.userAgent,h=/LovableApp\//.test(u),p=!h&&/lovable/i.test(u),m=F();let f=a.redirect_uri??window.location.origin;h&&i?f=D(u):p&&i&&(f=j);const g=new URLSearchParams({...a.extraParams,provider:w,redirect_uri:f,state:m});if(!i)return window.location.href=`${t}?${g.toString()}`,{error:null,redirected:!0};!h&&!p&&g.set("response_mode","web_message");const P=`${t}?${g.toString()}`,{messagePromise:v,cleanup:E}=C(p?[...n,window.location.origin]:n);let c;if(B())c=window.open(P,"_blank");else{const{width:s,height:d,left:l,top:A}=W(i);c=window.open(P,"oauth",`width=${s},height=${d},left=${l},top=${A}`)}if(!c&&(h||p)){let s;const d=new Promise((l,A)=>{s=setTimeout(()=>{A(new Error("OAuth timed out waiting for response"))},M)});try{return S(await Promise.race([v,d]),m)}catch(l){return{error:l instanceof Error?l:new Error(String(l))}}finally{s&&clearTimeout(s),E()}}if(!c)return E(),{error:new Error("Popup was blocked")};let _;const y=new Promise((s,d)=>{_=setInterval(()=>{c.closed&&(clearInterval(_),d(new Error("Sign in was cancelled")))},U)});try{return S(await Promise.race([v,y]),m)}
1catch(s){return{error:s instanceof Error?s:new Error(String(s))}}finally{clearInterval(_),E(),c?.close()}}return{signInWithOAuth:o}}function H(e={}){return $(e)}const K=H(),G={auth:{signInWithOAuth:async(e,t)=>{const n=await K.signInWithOAuth(e,{redirect_uri:t?.redirect_uri,extraParams:{...t?.extraParams}});if(n.redirected||n.error)return n;try{await k.auth.setSession(n.tokens)}catch(o){return{error:o instanceof Error?o:new Error(String(o))}}return n}}};export{Y as A,z as a,G as l};
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.