PageSourceSearch

https://www.jajakjajak.com/_nuxt/IvfcvJM1.js

js jajakjajak.com collected 2026-10-02 00:51:17 UTC 8,818 bytes, 1 lines download raw bytes

1import{_ as ne}from"./Behv8Sv3.js";import{_ as le,a as ce}from"./C6soNp8K.js";import{s as de,e as H,f as ue,u as fe,g as me,h as pe,y as w,ag as ge,a2 as n,o as g,q as x,w as i,b as o,a as r,H as xe,k as s,d,Z as U,m as b,v as R,ak as $,af as G,ad as N,ah as ye}from"./-NDg4Rtd.js";import{useCodeClient as ve}from"./B3F-T2kh.js";import{_ as P}from"./Cwaq7gw9.js";import{_ as O}from"./Cq4USeKV.js";import{a as W,_ as A}from"./CxeRMroI.js";import{_ as B}from"./BOVenzBs.js";import{u as he,I as _e,c as we,a as be}from"./xzgk0IwF.js";import{u as ke}from"./CA_-29_u.js";import{u as Ce}from"./C70T1_GW.js";import{u as Ie}from"./g5xYEe5H.js";import{u as Ve}from"./BdKP01MN.js";import{l as Ee}from"./BYYDQqW8.js";import{I as Le}from"./D-Y62QNm.js";import{I as Se}from"./CqBmtvXS.js";import{E as Te}from"./C48-WdiT.js";import{E as Ue}from"./Cdg15EGF.js";import{u as Re}from"./Drl8A98r.js";import"./C99w-fsZ.js";import"./TQUXwNWF.js";import"./ZUBvN_r8.js";import"./BpwUK2X-.js";import"./DJmpmUdj.js";const $e=de("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Ge={class:"relative"},Ne=["aria-label"],Pe={class:"flex items-center justify-center gap-2 my-2"},Oe={class:"h-3"},We={class:"relative my-6"},Ae={class:"flex flex-col md:flex-row gap-2"},Be={class:"text-sm text-text-secondary text-center mt-6"},He={class:"text-center mt-4 pt-4 border-t border-border"},De=H({__name:"LoginPage",setup(D){const u=ue(),k=fe(),C=ye(),a=me(),_=Ve(),{fetchUser:I}=pe(),{recordInsightClick:q}=he(),{logIn:z,logInData:y,logInError:M,logInIsLoading:v,logInStatus:F}=ke(),{socialLogin:V,socialLoginData:E,socialLoginError:j,socialLoginStatus:X}=Ce(),{openWhaleLoginPopup:Z,getWhaleRedirectUri:J}=Ie(),l=R(!1),h=R(!1),L=t=>{const e=a.accessToken;if(k.query.redirect===_e){const m=t===$.TEACHER&&e?we(e,C.public.insightUrl):be(C.public.insightUrl);q("BANNER",!0),window.location.assign(m);return}u.push(t===$.TEACHER?"/teacher/home":"/student/home")},K=async t=>{if(!t.code){n.error("구글 인증 코드를 받지 못했습니다.");return}l.value=!0,await V({authorizationCode:t.code,redirectUri:"postmessage",providerType:G.GOOGLE})},Q=t=>{t.error!=="access_denied"&&n.error("구글 로그인 중 오류가 발생했습니다."),l.value=!1},{isReady:S,login:Y}=ve({onSuccess:K,onError:Q,scope:"openid email profile",ux_mode:"popup"}),f=N({account:"",password:""}),c=N({account:null,password:null}),T=t=>{c[t]=null},ee=()=>{c.account=null,c.password=null;const t=Ee.safeParse(f);if(!t.success){const e=t.error.flatten().fieldErrors;return c.account=e.account?.[0]??null,c.password=e.password?.[0]??null,!1}return!0},se=async()=>{ee()&&await z({account:f.account.trim(),password:f.password})},te=()=>{S.value&&!l.value&&Y()},oe=async()=>{if(!l.value)try{l.value=!0;const t=await Z();await V({authorizationCode:t,redirectUri:J(),providerType:G.WHALE})}catch(t){const e=t;e.message!=="POPUP_CLOSED"&&n.error(e.message||"웨일 로그인 중 오류가 발생했습니다."),l.value=!1}},ae=async()=>{const t=E.value;if(t)if(t.type==="EXIST"){if(t.accessToken&&t.refreshToken){a.setTokens(t.accessToken,t.refreshToken),a.setVerificationStatus(t.niceVerified,t.emailVerified);const e=await I();if(e?.guardian&&a.markEmailVerified(),!a.niceVerified){n.info("본인인증이 필요합니다."),u.push({path:"/verify/nice",query:a.emailVerified?void 0:{redirect:"/verify/email"}});return}if(!a.emailVerified){n.info("이메일 인증이 필요합니다."),u.push("/verify/email");return}n.success("로그인에 성공했습니다."),L(e?.classify)}}else _.reset(),t.oauthId&&_.setSocialInfo(t.oauthId,t.provider,t.email??void 0),t.classify&&_.setClassify(t.classify),n.info("회원가입을 진행해 주세요."),u.push("/sign-up")};return w(F,async t=>{if(t==="success"&&y.value){a.setTokens(y.value.accessToken,y.value.refreshToken),a.setVerificationStatus(y.value.niceVerified,y.value.emailVerified);const e=await I();if(e?.createdBy===ge.GROUP&&(a.markNiceVerified(),a.markEmailVerified()),e?.guardian&&a.markEmailVerified(),!a.niceVerified){n.info("본인인증이 필요합니다."),u.push({path:"/verify/nice",query:a.emailVerified?void 0:{redirect:"/verify/email"}});return}if(!a.emailVerified){n.info("이메일 인증이 필요합니다."),u.push("/verify/email");return}n.success("로그인에 성공했습니다."),L(e?.classify)}}),w(M,t=>{t&&n.error(t.errorMessage||"로그인에 실패했습니다.")}),w(X,async t=>{t==="success"&&E.value?await ae():t==="error"&&n.error(j.value?.errorMessage||"소셜 로그인에 실패했습니다."),l.value=!1}),(t,e)=>{const m=ne,re=ce,ie=le;return g(),x(ie,{class:"w-full max-w-130"},{default:i(()=>[o(re,null,{default:i(()=>[e[16]||(e[16]=r("div",{class:"text-xl font-semibold text-center mb-2"},"로그인",-1)),e[17]||(e[17]=r("p",{class:"text-sm text-text-secondary text-center mb-6"}," 자작자작에 오신 것을 환영합니다 ",-1)),r("form",{class:"flex flex-col gap-4",onSubmit:xe(se,["prevent"])},[o(s(W),null,{default:i(()=>[o(s(A),null,{default:i(()=>[...e[5]||(e[5]=[d("아이디",-1)])]),_:1}),o(s(P),{modelValue:s(f).account,"onUpdate:modelValue":e[0]||(e[0]=p=>s(f).account=p),class:"text-sm",disabled:s(v)||s(l),placeholder:"아이디를 입력해 주세요.","aria-invalid":!!s(c).account,onInput:e[1]||(e[1]=p=>T("account"))},null,8,["modelValue","disabled","aria-invalid"]),s(c).account?(g(),x(s(B),{key:0,errors:[s(c).account]},null,8,["errors"])):U("",!0)]),_:1}),o(s(W),null,{default:i(()=>[o(s(A),null,{default:i(()=>[...e[6]||(e[6]=[d("비밀번호",-1)])]),_:1}),r("div",Ge,[o(s(P),{modelValue:s(f).password,"onUpdate:modelValue":e[2]||(e[2]=p=>s(f).password=p),class:"text-sm pr-10",type:s(h)?"text":"password",disabled:s(v)||s(l),placeholder:"비밀번호를 입력해 주세요.","aria-invalid":!!s(c).password,onInput:e[3]||(e[3]=p=>T("password"))},null,8,["modelValue","type","disabled","aria-invalid"]),r("button",{type:"button",class:"absolute right-3 top-1/2 -translate-y-1/2 text-text-secondary hover:text-foreground transition-colors","aria-label":s(h)?"비밀번호 숨기기":"비밀번호 보기",tabindex:"-1",onClick:e[4]||(e[4]=p=>h.value=!s(h))},[s(h)?(g(),x(s(Te),{key:0,class:"w-4 h-4"})):(g(),x(s(Ue),{key:1,class:"w-4 h-4"}))],8,Ne)]),s(c).password?(g(),x(s(B),{key:0,errors:[s(c).password]},null,8,["errors"])):U("",!0)]),_:1}),r("div",Pe,[o(m,{to:"/find-account",class:"text-xs text-text-secondary hover:text-primary transition-colors"},{default:i(()=>[...e[7]||(e[7]=[d(" 아이디 찾기 ",-1)])]),_:1}),r("div",Oe,[o(s(O),{orientation:"vertical",class:""})]),o(m,{to:"/find-password",class:"text-xs text-text-secondary hover:text-primary transition-colors"},{default:i(()=>[...e[8]||(e[8]=[d(" 비밀번호 찾기 ",-1)])]),_:1})]),o(s(b),{type:"submit","is-loading":s(v)},{default:i(()=>[...e[9]||(e[9]=[d(" 로그인 ",-1)])]),_:1},8,["is-loading"])],32),r("div",We,[o(s(O)),e[10]||(e[10]=r("span",{class:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-card px-3 text-xs text-text-secondary"}," 또는 ",-1))]),r("div",Ae,[o(s(b),{disabled:!s(S)||s(l)||s(v),variant:"outline",class:"flex-1 h-12 mobile:h-14",onClick:te},{default:i(()=>[o(s(Le),{class:"w-5 h-5 mobile:w-6 mobile:h-6 mr-2"}),e[11]||(e[11]=r("span",{class:"text-xs mobile:text-sm font-medium"},"구글로 시작하기",-1))]),_:1},8,["disabled"]),o(s(b),{disabled:s(l)||s(v),variant:"outline",class:"flex-1 h-12 mobile:h-14",onClick:oe},{default:i(()=>[o(s(Se),{class:"w-5 h-5 mobile:w-6 mobile:h-6 mr-2"}),e[12]||(e[12]=r("span",{class:"text-xs mobile:text-sm font-medium"},"웨일로 시작하기",-1))]),_:1},8,["disabled"])]),r("p",Be,[e[14]||(e[14]=d(" 아직 계정이 없으신가요? ",-1)),o(m,{to:"/sign-up",class:"font-semibold text-primary hover:underline"},{default:i(()=>
1[...e[13]||(e[13]=[d(" 회원가입 ",-1)])]),_:1})]),r("div",He,[o(m,{to:"/login/guardian-assist",class:"inline-flex items-center gap-1.5 text-sm text-text-secondary hover:text-primary transition-colors"},{default:i(()=>[o(s($e),{class:"w-4 h-4"}),e[15]||(e[15]=d(" 보호자 대리 로그인 ",-1))]),_:1})])]),_:1})]),_:1})}}}),ms=H({__name:"index",setup(D){return Re({title:"로그인 - 자작자작",meta:[{name:"description",content:"자작자작에 로그인하여 글쓰기 활동을 시작하세요. 소셜 로그인도 지원합니다."},{name:"keywords",content:"자작자작, 로그인, 글쓰기 플랫폼"},{property:"og:title",content:"로그인 - 자작자작"},{property:"og:description",content:"자작자작에 로그인하여 글쓰기 활동을 시작하세요. 소셜 로그인도 지원합니다."}]}),(u,k)=>(g(),x(De))}});export{ms 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.