1import{r as f,D as p,u as D,E as k,$ as g,n as h,h as d,w as r,V as C,o as a,a as t,b as U,s as V,c as w,q as i,L as u,j as l,aK as R}from"./index-4ZVuW2C5.js";import{D as x,_ as I}from"./DiscordLoginButton-JnauDrVk.js";const y={key:0},T={__name:"DiscordLogin",setup(B){const m=f(null),s=new URLSearchParams(window.location.search),_=h(),c=p(),n=D();return k(()=>{const o=s.get("code");o&&!m.value&&g.post("/discord/link-account",{code:o,redirectUri:x}).then(e=>{n.member.discordUserId=e.data.discordUserId,n.member.discordUsername=e.data.discordUsername,c.success("Discord account linked successfully!"),_.push({name:"profile"})}).catch(e=>{console.error("Failed to link Discord account:",e),c.error("Failed to link Discord account.")})}),(o,e)=>(a(),d(C,null,{default:r(()=>[t(U,null,{default:r(()=>[t(V,{align:"center"},{default:r(()=>[u(s).get("code")?i("",!0):(a(),w("div",y,[e[0]||(e[0]=l("h1",null,"Discord Login",-1)),e[1]||(e[1]=l("p",null,"Please log in with your Discord account to continue.",-1)),t(I)])),u(s).get("code")?(a(),d(R,{key:1,size:70,width:7,color:"purple",indeterminate:""})):i("",!0)]),_:1})]),_:1})]),_:1}))}};export{T 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.