PageSourceSearch

https://newneek.co/_next/static/chunks/pages/sign-up-1ccce9a51ee63c36.js

js newneek.co collected 2026-09-24 10:14:18 UTC 16,727 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5801],{32277:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-up",function(){return r(42033)}])},42033:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return O},default:function(){return F}});var t=r(85893),a=r(56312),l=r(14757),i=r(41664),n=r.n(i),c=r(11163),o=r(67294),d=r(87536),m=r(1604),x=r(80113),u=r(81303),p=r(44529),f=r(44790),h=r(2737),g=r(64698),v=r(13851),y=r(59350),j=r(71623),w=r(36996),Z=r(91471),b=r(47630),N=r(34773),S=r(5487);let k=m.z.object({email:f.if.email,password:f.if.password,confirmPassword:f.if.password,phoneNum:f.if.phoneNum,term14years:m.z.boolean(),termsOfService:m.z.boolean(),privacyPolicy:m.z.boolean(),marketingAgree:m.z.boolean()});function P(e){let{verify:s}=e,r=(0,c.useRouter)(),{signup:i,signin:m}=(0,h.Z)(),{showSnackbar:f}=(0,g.Z)(),[P,_]=(0,o.useState)(!1),V="string"==typeof r.query.rd_url?r.query.rd_url:"",C=(0,N.Z)(e=>e.verification),{isVerified:I,isLoading:O,verifyResult:F,openVerificationPopup:A}=(0,v.Z)({initialResult:null!=C?C:void 0,onDuplicate:e=>{N.Z.getState().setDuplicate(e),r.push("/find-account/exists")}});(0,o.useEffect)(()=>{N.Z.getState().verification&&N.Z.getState().clear()},[]);let z=(0,d.cI)({resolver:(0,a.F)(k),defaultValues:{email:"",password:"",confirmPassword:"",phoneNum:"",term14years:!1,termsOfService:!1,privacyPolicy:!1,marketingAgree:!1}}),U=z.watch("email"),L=z.watch("phoneNum"),E=z.watch("password"),M=z.watch("confirmPassword"),R=z.watch("term14years"),D=z.watch("termsOfService"),q=z.watch("privacyPolicy");async function Q(e){_(!0);let{email:s,password:r,confirmPassword:t,marketingAgree:a,phoneNum:n}=e;if(r!==t){z.setError("confirmPassword",{message:"같은 비밀번호를 입력해 주세요"}),_(!1);return}try{await i(s,r,a,n,null==F?void 0:F.di,null==F?void 0:F.gender,null==F?void 0:F.carrier,null==F?void 0:F.birthYear),await m(s,r);let e=sessionStorage.getItem("referralCode");e&&(await (0,S.Qj)(e),sessionStorage.removeItem("referralCode"));let t=new URLSearchParams(location.search).get("rd_url"),c=sessionStorage.getItem("from"),o=(0,p.y)(c);if("purchase_start"===c&&t){l.Z.events.send("airbridge.user.signup",{action:sessionStorage.getItem("latest-click-signin-type")||""}),x.Z.track(u.U.signUpSuccess,{email:s,marketingAgree:a,rdUrl:t||void 0,...o}),_(!1),window.location.href="".concat("https://newneek.co","/").concat(t);return}t?window.location.href="/sign-up/complete?rd_url=".concat(t):window.location.href="/sign-up/complete",_(!1)}catch(e){f({type:"warn",message:e.response.data.alert}),_(!1)}}return(0,o.useEffect)(()=>{I&&F&&z.setValue("phoneNum",F.phone)},[I,F,z]),(0,o.useEffect)(()=>{x.Z.track(u.U.viewStartSignup,{platform:"web",verification_type:"phone"})},[]),(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[335px] py-10 md:py-16",children:[(0,t.jsx)(b.Z,{...z,children:(0,t.jsxs)("form",{className:"flex flex-col gap-10",onSubmit:z.handleSubmit(Q),children:[(0,t.jsxs)("div",{className:"space-y-3 text-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"회원가입"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["매일 새로운 소식과 함께,",(0,t.jsx)("br",{}),"뉴니커의 지식과 경험이 담긴 아티클을 만나보세요."]})]}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)(b.Z.Field,{control:z.control,name:"email",render:e=>{let{field:s}=e;return(0,t.jsxs)(b.Z.Item,{children:[(0,t.jsx)(b.Z.Label,{children:"이메일"}),(0,t.jsx)(b.Z.Control,{children:(0,t.jsx)(y.Z,{...s,type:"text",autoCapitalize:"none",placeholder:"이메일을 입력해 주세요",suffixIcon:s.value&&(0,t.jsx)(Z.Z,{className:"cursor-pointer",role:"button",onClick:()=>z.setValue("email","")})})}),(0,t.jsx)(b.Z.Message,{})]})}}),(0,t.jsx)(b.Z.Field,{control:z.control,name:"password",render:e=>{let{field:s}=e;return(0,t.jsxs)(b.Z.Item,{children:[(0,t.jsx)(b.Z.Label,{children:"비밀번호 (8자 이상)"}),(0,t.jsx)(b.Z.Control,{children:(0,t.jsx)(y.Z,{...s,type:"password",placeholder:"비밀번호를 입력해 주세요",suffixIcon:s.value&&(0,t.jsx)(Z.Z,{className:"cursor-pointer",role:"button",onClick:()=>z.setValue("password","")})})}),(0,t.jsx)(b.Z.Message,{})]})}}),(0,t.jsx)(b.Z.Field,{control:z.control,name:"confirmPassword",render:e=>{let{field:s}=e;return(0,t.jsxs)(b.Z.Item,{children:[(0,t.jsx)(b.Z.Label,{children:"비밀번호 확인"}),(0,t.jsx)(b.Z.Control,{children:(0,t.jsx)(y.Z,{...s,type:"password",placeholder:"비밀번호를 한 번 더 입력해 주세요",suffixIcon:s.value&&(0,t.jsx)(Z.Z,{className:"cursor-pointer",role:"button",onClick:()=>z.setValue("confirmPassword","")})})}),(0,t.jsx)(b.Z.Message,{})]})}}),(0,t.jsx)(b.Z.Field,{control:z.control,name:"phoneNum",render:e=>{let{field:s}=e;return(0,t.jsxs)(b.Z.Item,{className:"flex-1",children:[(0,t.jsx)(b.Z.Label,{children:"휴대폰 번호"}),(0,t.jsxs)(b.Z.Control,{className:"flex flex-row gap-2",children:[(0,t.jsx)(y.Z,{...s,type:"text",readOnly:!0,disabled:!0,placeholder:"인증하기 버튼을 눌러주세요"}),(0,t.jsx)(j.Z,{variant:I?"secondary":"primary",size:"lg",onClick:()=>{x.Z.track(u.U.clickVerifyStart,{path:window.location.pathname}),A()},className:"self-end",disabled:I||O,children:I?"인증완료":O?"인증중...":"인증하기"})]}),(0,t.jsx)(b.Z.Message,{})]})}})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"termAll",onCh
1ange:function(e){e.target.checked?(z.setValue("term14years",!0),z.setValue("termsOfService",!0),z.setValue("privacyPolicy",!0),z.setValue("marketingAgree",!0)):(z.setValue("term14years",!1),z.setValue("termsOfService",!1),z.setValue("privacyPolicy",!1),z.setValue("marketingAgree",!1))}}),(0,t.jsx)("label",{htmlFor:"termAll",className:"text-sm font-bold text-gray-700",children:"모두 동의"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"term14years",...z.register("term14years")}),(0,t.jsx)("label",{htmlFor:"term14years",className:"text-sm text-gray-700",children:"만 14세 이상 가입 동의 (필수)"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"termsOfService",...z.register("termsOfService")}),(0,t.jsx)("label",{htmlFor:"termsOfService",className:"text-sm text-gray-700",children:"서비스 이용약관 동의 (필수)"}),(0,t.jsx)("a",{className:"ml-auto text-xs text-gray-500 underline",href:"/terms-of-service",target:"_blank",rel:"noopener",children:"약관보기"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"privacyPolicy",...z.register("privacyPolicy")}),(0,t.jsx)("label",{htmlFor:"privacyPolicy",className:"text-sm text-gray-700",children:"개인정보처리방침 동의 (필수)"}),(0,t.jsx)("a",{className:"ml-auto text-xs text-gray-500 underline",href:"/privacy-policy",target:"_blank",rel:"noopener",children:"약관보기"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"marketingAgree",...z.register("marketingAgree")}),(0,t.jsx)("label",{htmlFor:"marketingAgree",className:"text-sm text-gray-700",children:"마케팅 정보 수신 동의 (선택)"}),(0,t.jsx)("a",{className:"ml-auto text-xs text-gray-500 underline",href:"https://newneek.notion.site/97c0f3756cc54e3f9b201f8c3abd0dba?pvs=4",target:"_blank",rel:"noopener",children:"약관보기"})]})]}),(0,t.jsx)(j.Z,{type:"submit",size:"lg",disabled:!U||!E||!M||!L||!I||!R||!D||!q||P,children:P?"로딩중..":"회원가입"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-center",children:(0,t.jsx)(n(),{className:"font-regular mt-6 text-center text-sm text-gray-500 underline",href:"/sign-up?verify=email".concat(V?"&rd_url=".concat(V):""),children:"휴대폰 본인인증을 할 수 없나요?"})})]})}var _=r(77421),V=r(13923);let C=m.z.object({email:f.if.email,password:f.if.password,confirmPassword:f.if.password,term14years:m.z.boolean(),termsOfService:m.z.boolean(),privacyPolicy:m.z.boolean(),marketingAgree:m.z.boolean()});function I(){let{signup:e,signin:s}=(0,h.Z)(),{showSnackbar:r}=(0,g.Z)(),[i,n]=(0,o.useState)(!1),[c,m]=(0,o.useState)(!1),[f,v]=(0,o.useState)(!1),[N,k]=(0,o.useState)(""),[P,_]=(0,o.useState)(!1),[I,O]=(0,o.useState)(!1),F=(0,d.cI)({resolver:(0,a.F)(C),defaultValues:{email:"",password:"",confirmPassword:"",term14years:!1,termsOfService:!1,privacyPolicy:!1,marketingAgree:!1}}),A=F.watch("email"),z=F.watch("password"),U=F.watch("confirmPassword"),L=F.watch("term14years"),E=F.watch("termsOfService"),M=F.watch("privacyPolicy");async function R(t){n(!0);let{email:a,password:i,confirmPassword:c,marketingAgree:o}=t;if(i!==c){F.setError("confirmPassword",{message:"같은 비밀번호를 입력해 주세요"}),n(!1);return}try{await e(a,i,o),await s(a,i);let r=sessionStorage.getItem("referralCode");r&&(await (0,S.Qj)(r),sessionStorage.removeItem("referralCode"));let t=new URLSearchParams(location.search).get("rd_url"),c=sessionStorage.getItem("from"),d=(0,p.y)(c);if("purchase_start"===c&&t){l.Z.events.send("airbridge.user.signup",{action:sessionStorage.getItem("latest-click-signin-type")||""}),x.Z.track(u.U.signUpSuccess,{email:a,marketingAgree:o,rdUrl:t||void 0,...d}),n(!1),window.location.href="".concat("https://newneek.co","/").concat(t);return}t?window.location.href="/sign-up/complete?rd_url=".concat(t):window.location.href="/sign-up/complete",n(!1)}catch(e){var d,m;console.log("error",e),r({type:"error",message:(null===(m=e.response)||void 0===m?void 0:null===(d=m.data)||void 0===d?void 0:d.alert)||"회원가입에 실패했어요"}),n(!1)}}async function D(){if(A){_(!0),x.Z.track(u.U.clickVerifyStart,{path:window.location.pathname});try{await V.h.post("/users/v2/send-verification-code/",{email:A}),v(!0),m(!1),k(""),r({type:"warn",message:"이메일로 인증번호를 발송했어요"})}catch(t){var e,s;r({type:"error",message:(null==t?void 0:null===(s=t.response)||void 0===s?void 0:null===(e=s.data)||void 0===e?void 0:e.alert)||"인증번호 발송에 실패했어요"})}finally{_(!1)}}}async function q(){if(A&&6===N.length){O(!0);try{await V.h.post("/users/v2/verify-code/",{email:A,code:N}),m(!0),r({type:"success",message:"이메일 인증을 완료했어요"})}catch(u){var e,s,t,a,l,i,n,c,o,d;let m=null==u?void 0:null===(e=u.response)||void 0===e?void 0:e.status,x=String((null==u?void 0:null===(t=u.response)||void 0===t?void 0:null===(s=t.data)||void 0===s?void 0:s.code)||(null==u?void 0:null===(i=u.response)||void 0===i?void 0:null===(l=i.data)||void 0===l?void 0:null===(a=l.error)||void 0===a?void 0:a.code)||(null==u?void 0:null===(c=u.response)||void 0===c?void 0:null===(n=c.data)||void 0===n?void 0:n.detail)||(null==u?void 0:null===(d=u.response)||void 0===d?void 0:null===(o=d.data)||void 0===o?void 0:o.message)||"");r({type:"error",message:410===m||/expired|만료/i.test(x)?"만료된 인증번호예요":"인증번호가 일치하지 않아요"})}finally{O(!1)}}}return(0,o.useEffect)(()=>{x.Z.track(u.U.viewStartSignup,{platform:"web",verification_type:"email"})},[]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-[335px] py-10 md:py-16",children:(0,t.jsx)(b.Z,{...F,children:(0,t.jsxs)("form",{className:"flex flex-col gap-10",onSubmit:F.handleSubmit(R),children:[(0,t.jsxs)("div",{className:"space-y-3 text-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"회원가입"}),(0,t.jsxs)("p",{className:"text-sm/[1.5] text-gray-500",children:["반가워요, 뉴니커!",(0,t.jsx)("br",{}),"외국인이거나 외국에 거주 중인 뉴니커는",(0,t.jsx)("br",{}),"이메일 인증을 통해 가입할 수 있어요."]})]}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)(b.Z.Field,{control:F.control,name:"email",render:e=>{let{field:s}=e;return(0,t.jsxs)(b.Z.Item,{children:[(0,t.jsx)(b.Z.Label,{children:"이메일"}),(0,t.jsxs)(b.Z.Control,{className:"flex flex-row gap-2",children:[(0,t.jsx)(y.Z,{...s,type:"text",autoCapitalize:"none",readOnly:c,className:c?"bg-gray-50":"",placeholder:"이메일을 입력해 주세요",suffixIcon:s.value&&!c&&(0,t.jsx)(Z.Z,{className:"cursor-pointer",role:"button",onClick:()=>F.setValue("email","")})}),(0,t.jsx)(j.Z,{variant:c?"secondary":"primary",size:"lg",onClick:D,className:"self-end",disabled:c||P||!A,children:c?"인증완료":f?"재전송":"인증하기"})]}),(0,t.jsx)(b.Z.Message,{})]})}}),f&&!c&&(0,t.jsxs)(b.Z.Item,{children:[(0,t.jsx)(b.Z.Label,{children:"인증번호"}),(0,t.jsxs)(b.Z.Control,{className:"flex flex-row gap-2",children:[(0,t.jsx)(y.Z,{value:N,onChange:function(e){k(e.target.value.replace(/[^0-9]/g,"").slice(0,6))},inputMode:"numeric",placeholder:"인증번호 6자리를 입력해 주세요"}),(0,t.jsx)(j.Z,{variant:"secondary",size:"lg",onClick:q,className:"self-end",disabled:I||6!==N.length,children:"인증하기"})]}),(0,t.jsx)(b.Z.Message,{})]}),(0,t.jsx)(b.Z.Field,{control:F.control,name:"password",render:e=>{let{field:s}=e;return(0,t.jsxs)(b.Z.Item,{children:[(0,t.jsx)(b.Z.Label,{children:"비밀번호 (8자 이상)"}),(0,t.jsx)(b.Z.Control,{children:(0,t.jsx)(y.Z,{...s,type:"password",placeholder:"비밀번호를 입력해 주세요",suffixIcon:s.value&&(0,t.jsx)(Z.Z,{className:"cursor-pointer",role:"button",onClick:()=>F.setValue("password","")})})}),(0,t.jsx)(b.Z.Message,{})]})}}),(0,t.jsx)(b.Z.Field,{control:F.control,name:"confirmPassword",render:e=>{let{field:s}=e;return(0,t.jsxs)(b.Z.Item,{children:[(0,t.jsx)(b.Z.Label,{children:"비밀번호 확인"}),(0,t.jsx)(b.Z.Control,{children:(0,t.jsx)(y.Z,{...s,type:"password",placeholder:"비밀번호를 한 번 더 입력해 주세요",suffixIcon:s.value&&(0,t.jsx)(Z.Z,{className:"cursor-pointer",role:"button",onClick:()=>F.setValue("confirmPassword","")})})}),(0,t.jsx)(b.Z.Message,{})]})}})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"termAll",onCh
1ange:function(e){e.target.checked?(F.setValue("term14years",!0),F.setValue("termsOfService",!0),F.setValue("privacyPolicy",!0),F.setValue("marketingAgree",!0)):(F.setValue("term14years",!1),F.setValue("termsOfService",!1),F.setValue("privacyPolicy",!1),F.setValue("marketingAgree",!1))}}),(0,t.jsx)("label",{htmlFor:"termAll",className:"text-sm font-bold text-gray-700",children:"모두 동의"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"term14years",...F.register("term14years")}),(0,t.jsx)("label",{htmlFor:"term14years",className:"text-sm text-gray-700",children:"만 14세 이상 가입 동의 (필수)"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"termsOfService",...F.register("termsOfService")}),(0,t.jsx)("label",{htmlFor:"termsOfService",className:"text-sm text-gray-700",children:"서비스 이용약관 동의 (필수)"}),(0,t.jsx)("a",{className:"ml-auto text-xs text-gray-500 underline",href:"/terms-of-service",target:"_blank",rel:"noopener",children:"약관보기"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"privacyPolicy",...F.register("privacyPolicy")}),(0,t.jsx)("label",{htmlFor:"privacyPolicy",className:"text-sm text-gray-700",children:"개인정보처리방침 동의 (필수)"}),(0,t.jsx)("a",{className:"ml-auto text-xs text-gray-500 underline",href:"/privacy-policy",target:"_blank",rel:"noopener",children:"약관보기"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Z,{id:"marketingAgree",...F.register("marketingAgree")}),(0,t.jsx)("label",{htmlFor:"marketingAgree",className:"text-sm text-gray-700",children:"마케팅 정보 수신 동의 (선택)"}),(0,t.jsx)("a",{className:"ml-auto text-xs text-gray-500 underline",href:"https://newneek.notion.site/97c0f3756cc54e3f9b201f8c3abd0dba?pvs=4",target:"_blank",rel:"noopener",children:"약관보기"})]})]}),(0,t.jsx)(j.Z,{type:"submit",size:"lg",disabled:!A||!z||!U||!L||!E||!M||!c||i,children:i?"로딩중..":"회원가입"})]})})})}var O=!0;function F(e){let{verify:s}=e;return"email"===s?(0,t.jsx)(I,{}):(0,t.jsx)(P,{})}F.getLayout=e=>(0,t.jsx)(_.Z,{children:e})},34773:function(e,s,r){"use strict";var t=r(64529),a=r(782);let l=(0,t.Ue)()((0,a.tJ)(e=>({verification:null,duplicate:null,setVerification:s=>e({verification:s}),setDuplicate:s=>e({duplicate:s}),clear:()=>e({verification:null,duplicate:null})}),{name:"find-account-store",getStorage:()=>sessionStorage}));s.Z=l}},function(e){e.O(0,[6911,1509,6492,9433,1206,3726,7320,2868,103,3002,1404,4989,4301,3760,1796,8766,7308,7091,9753,2888,9774,179],function(){return e(e.s=32277)}),_N_E=e.O()}]);

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.