{"version":3,"file":"static/chunks/6261-a77567ffc7325b87.js","mappings":"AAEA","sources":["webpack://_N_E/./node_modules/@ant-design/icons-svg/es/asn/CalendarOutlined.js","webpack://_N_E/./node_modules/@ant-design/icons/es/icons/CalendarOutlined.js","webpack://_N_E/./node_modules/@ant-design/icons-svg/es/asn/UserOutlined.js","webpack://_N_E/./node_modules/@ant-design/icons/es/icons/UserOutlined.js","webpack://_N_E/./src/api/member.ts","webpack://_N_E/./src/components/Member/MemberPageHeader.tsx","webpack://_N_E/./src/components/Member/MemberPageLayout.tsx","webpack://_N_E/./src/lib/apiService/index.ts","webpack://_N_E/./src/modules/accounts/commands/loginPhoneCommand.ts","webpack://_N_E/./src/modules/accounts/commands/sendCertifySmsCommand.ts","webpack://_N_E/./src/modules/accounts/commands/compareCertifyCodeCommand.ts","webpack://_N_E/./src/modules/accounts/commands/changePasswordCommand.ts","webpack://_N_E/./src/modules/accounts/commands/resetPasswordCommand.ts","webpack://_N_E/./src/modules/accounts/signIn/viewModels/ChangePasswordFormViewModel.tsx","webpack://_N_E/./src/modules/accounts/signIn/views/ChangePasswordFormView.tsx","webpack://_N_E/./src/modules/accounts/signIn/components/UserTypeForm.tsx","webpack://_N_E/./src/modules/accounts/signUp/components/PhoneSignUpForm.tsx","webpack://_N_E/./src/api/decryptNice.ts","webpack://_N_E/./src/api/checkEmail.ts","webpack://_N_E/./src/api/signUpPhone.ts","webpack://_N_E/./src/pages/member/signup/form.tsx","webpack://_N_E/"],"sourcesContent":["// This icon file is generated automatically.\nvar CalendarOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z\" } }] }, \"name\": \"calendar\", \"theme\": \"outlined\" };\nexport default CalendarOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport CalendarOutlinedSvg from \"@ant-design/icons-svg/es/asn/CalendarOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar CalendarOutlined = function CalendarOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: CalendarOutlinedSvg\n }));\n};\nCalendarOutlined.displayName = 'CalendarOutlined';\nexport default /*#__PURE__*/React.forwardRef(CalendarOutlined);","// This icon file is generated automatically.\nvar UserOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z\" } }] }, \"name\": \"user\", \"theme\": \"outlined\" };\nexport default UserOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport UserOutlinedSvg from \"@ant-design/icons-svg/es/asn/UserOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar UserOutlined = function UserOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: UserOutlinedSvg\n }));\n};\nUserOutlined.displayName = 'UserOutlined';\nexport default /*#__PURE__*/React.forwardRef(UserOutlined);","import { otherApiClient } from \".\";\nexport const getSignUpBenefit = async ()=>{\n const { data } = await otherApiClient.market.get(\"/signUp/guest\");\n return data;\n};\nexport const getMemberSignUpCheck = async (params)=>{\n const { data } = await otherApiClient.market.get(\"/signUp/lookUp\", {\n params\n });\n return data;\n};\nexport const getSchools = async (params)=>{\n const { data } = await otherApiClient.market(\"/signup/schools\", {\n params\n });\n return data;\n};\nexport const getSignUpCompleted = async ()=>{\n const { data } = await otherApiClient.market(\"/signup/completed\");\n return data;\n};\n","import { _ as _tagged_template_literal } from \"@swc/helpers/_/_tagged_template_literal\";\nfunction _templateObject() {\n const data = _tagged_template_literal([\n \"\\n all: unset;\\n position: absolute;\\n top: 18px;\\n right: 20px;\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport { styled } from \"@mui/material\";\nimport Link from \"next/link\";\nimport { mixpanelEvent } from \"@/lib/mixpanels/mixpanel\";\nimport { useRouter } from \"next/router\";\nimport Icon from \"../icon/Icon\";\nimport { ArrowLeft, Close, Sizes, SolvookLogo_s } from \"../icon/IconList\";\nconst MemberPageHeaderContainer = styled(\"header\")((param)=>{\n let { theme } = param;\n return {\n width: \"100%\",\n display: \"flex\",\n backgroundColor: \"transparent\",\n position: \"relative\",\n \"&.logo\": {\n padding: \"20px 0\",\n alignItems: \"center\",\n justifyContent: \"center\",\n a: {\n display: \"flex\"\n }\n },\n \"&.title\": {\n borderBottom: \"1px solid \".concat(theme.palette.grey[50]),\n padding: \"16px 20px\",\n height: \"56px\",\n boxSizing: \"border-box\",\n alignItems: \"flex-start\",\n \".backButton\": {\n all: \"unset\",\n cursor: \"pointer\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"12px\"\n },\n p: {\n color: theme.palette.text.primary,\n ...theme.typography.subtitle1\n },\n i: {\n display: \"inline\"\n }\n }\n };\n});\nconst CloseButtonContainer = styled(\"button\")(_templateObject());\nexport const MemberPageHeader = (param)=>{\n let { children , showLogo , showBackButton , backButtonLink , pageTitle , onClickBackButton , onClickCloseButton , showCloseButton } = param;\n const router = useRouter();\n const onClick = ()=>{\n if (showBackButton) {\n if (backButtonLink) {\n router.push(backButtonLink);\n return;\n }\n if (onClickBackButton) {\n onClickBackButton();\n return;\n }\n router.back();\n }\n };\n if (showLogo) return /*#__PURE__*/ _jsxs(MemberPageHeaderContainer, {\n className: \"logo\",\n children: [\n showLogo && /*#__PURE__*/ _jsx(Link, {\n href: \"/\",\n onClick: ()=>{\n mixpanelEvent(\"Logo Clicked\");\n },\n children: /*#__PURE__*/ _jsx(Icon, {\n icon: SolvookLogo_s\n })\n }),\n children\n ]\n });\n return /*#__PURE__*/ _jsxs(MemberPageHeaderContainer, {\n className: \"title\",\n children: [\n (pageTitle || showBackButton) && /*#__PURE__*/ _jsxs(\"button\", {\n className: \"backButton\",\n onClick: onClick,\n children: [\n showBackButton && /*#__PURE__*/ _jsx(Icon, {\n icon: ArrowLeft,\n size: Sizes.xmedium\n }),\n /*#__PURE__*/ _jsx(\"p\", {\n children: pageTitle\n })\n ]\n }),\n showCloseButton && /*#__PURE__*/ _jsx(CloseButtonContainer, {\n className: \"closeButton\",\n onClick: onClickCloseButton,\n children: /*#__PURE__*/ _jsx(Icon, {\n icon: Close,\n size: Sizes.xmedium\n })\n }),\n children\n ]\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { styled } from \"@mui/material\";\nimport { observer } from \"mobx-react-lite\";\nimport React from \"react\";\nconst MemberPageLayoutContainer = styled(\"main\")((param)=>{\n let { theme } = param;\n return {\n width: \"100%\",\n height: \"100%\",\n minHeight: \"100svh\",\n overflow: \"auto\",\n backgroundColor: theme.palette.grey[0],\n [theme.breakpoints.down(\"lg\")]: {\n backgroundColor: theme.palette.blackAndWhite.white\n }\n };\n});\nexport const MemberPageLayout = observer((param)=>{\n let { children } = param;\n return /*#__PURE__*/ _jsx(MemberPageLayoutContainer, {\n children: children\n });\n});\n","export * from \"./ICommand\";\nexport * from \"./RestfulApiService\";\nexport const isAxiosError = (error)=>!!error.isAxiosError;\n","import { api } from \"../../../api\";\n/**\n * 휴대폰번호로 로그인\n * @param dto LoginUserWithPhoneDTO\n * @returns Promise\n */ export class LoginPhoneCommand {\n execute(dto) {\n const url = \"/sessions/phone\";\n return api(url, {\n method: \"POST\",\n data: dto\n }).then((res)=>res.data);\n }\n constructor(apiService){\n this.apiService = apiService;\n }\n}\n","import { api } from \"../../../api\";\n/**\n * 비밀번호 변경을 위한 휴대폰 인증번호 발송\n * @param dto SendCertifySmsRequestDTO\n * @returns Promise\n */ export class SendCertifySmsCommand {\n execute(dto) {\n const url = \"/accounts/send-certify-sms\";\n return api(url, {\n method: \"POST\",\n data: dto\n }).then((res)=>res.data);\n }\n constructor(apiService){\n this.apiService = apiService;\n }\n}\n","/**\n * 발송된 인증번호와 입력된 인증번호 확인\n * @param certifyCode CompareCertifyCodeQueryDTO\n * @returns Promise\n */ export class CompareCertifyCodeCommand {\n execute(param) {\n let { phone , certify_code } = param;\n const url = \"/accounts/compare-certify-code\";\n const params = new URLSearchParams();\n params.set(\"phone\", phone.toString());\n params.set(\"certify_code\", certify_code.toString());\n return this.apiService.fetch(url, {\n method: \"GET\",\n params\n }).then((res)=>res.data);\n }\n constructor(apiService){\n this.apiService = apiService;\n }\n}\n","/**\n * 비밀번호 변경\n * @param query ChangePasswordQueryDTO\n * @param dto ChangePasswordRequestDTO\n * @returns Promise\n */ export class ChangePasswordCommand {\n execute(query, dto) {\n const url = \"/users/\".concat(query.id, \"/password\");\n return this.apiService.fetch(url, {\n data: dto,\n method: \"put\"\n }).then((res)=>res.data);\n }\n constructor(apiService){\n this.apiService = apiService;\n }\n}\n","export class ResetPasswordCommand {\n execute(dto) {\n const url = \"/accounts/reset-password\";\n return this.apiService.fetch(url, {\n data: dto,\n method: \"put\"\n }).then((res)=>res.data);\n }\n constructor(apiService){\n this.apiService = apiService;\n }\n}\n","import { useLocalObservable } from \"mobx-react-lite\";\nimport { useMemo } from \"react\";\nimport { SendCertifySmsCommand } from \"../../commands/sendCertifySmsCommand\";\nimport { CompareCertifyCodeCommand } from \"../../commands/compareCertifyCodeCommand\";\nimport { ChangePasswordCommand } from \"../../commands/changePasswordCommand\";\nimport { Modal } from \"antd\";\nimport { LOGIN_EXIST_KAKAO, LOGIN_WITH_PHONE_PAGE } from \"@/settings/constant\";\nimport { ResetPasswordCommand } from \"../../commands/resetPasswordCommand\";\nexport const ChangePasswordFormViewModel = (param)=>{\n let { router , apiService , authStore } = param;\n const store = useLocalObservable(()=>({}));\n const sendCertifySmsCommand = useMemo(()=>new SendCertifySmsCommand(apiService), [\n apiService\n ]);\n const compareCertifyCodeCommand = useMemo(()=>new CompareCertifyCodeCommand(apiService), [\n apiService\n ]);\n const changePasswordCommand = useMemo(()=>new ChangePasswordCommand(apiService), [\n apiService\n ]);\n const resetPasswordCommand = useMemo(()=>new ResetPasswordCommand(apiService), [\n apiService\n ]);\n const status = useLocalObservable(()=>{\n var _authStore_user;\n return {\n errors: [],\n initialized: false,\n loading: false,\n passwordError: [\n false,\n false,\n false\n ],\n passwordValidation: true,\n timer: null,\n requestId: 1,\n initialStatus: {\n apiErrors: {}\n },\n initialValues: {\n phone: authStore.isLoggedIn ? (_authStore_user = authStore.user) === null || _authStore_user === void 0 ? void 0 : _authStore_user.phoneNumber : \"\",\n certification_code: \"\",\n password: \"\",\n password_confirmation: \"\"\n },\n sendCertificationCode: false,\n certified: false,\n remainingTime: 300000,\n isPaused: false\n };\n });\n const actions = useLocalObservable(()=>({\n async onSendCertificationCode (value) {\n try {\n const response = await sendCertifySmsCommand.execute({\n phone: value\n });\n ;\n if (response.success) {\n const startTimer = function() {\n status.isPaused = false;\n status.timer = setInterval(function() {\n status.remainingTime -= 1000;\n if (status.remainingTime <= 0) {\n clearInterval(status.timer);\n }\n }, 1000);\n };\n const stopTimer = function() {\n clearInterval(status.timer);\n status.remainingTime = 300000;\n status.isPaused = true;\n };\n if (!status.timer) {\n startTimer();\n } else {\n stopTimer();\n startTimer();\n }\n status.sendCertificationCode = true;\n } else {\n Modal.error({\n title: \"인증번호 발송 실패\",\n content: \"다시 한 번 시도해주세요.\"\n });\n }\n } catch (error) {\n ;\n if (error.response.data.message === \"카카오 계정으로 가입한 회원은 비밀번호 변경을 진행할 수 없습니다.\") {\n router.push(LOGIN_EXIST_KAKAO);\n } else {\n Modal.error({\n title: \"인증번호 발송 실패\",\n content: \"다시 한 번 시도해주세요.\"\n });\n }\n }\n },\n onCountTimer () {\n const timer = setInterval(()=>{\n status.remainingTime -= 1000;\n if (status.remainingTime <= 0) {\n clearInterval(timer);\n }\n }, 1000);\n },\n onResetTimer () {\n status.remainingTime = 300000;\n },\n async onCheckCertificationCode (phone, certify_code) {\n try {\n const response = await compareCertifyCodeCommand.execute({\n phone,\n certify_code\n });\n ;\n if (response.success) {\n status.certified = true;\n status.remainingTime = 0;\n return;\n }\n // console.log(status.certified)\n } catch (error) {\n ;\n // 모달이 아니라 Input 밑에 에러 메세지 띄우기\n }\n },\n passwordValidator (value) {\n const regSpace = /\\s/g;\n if (!value.match(/(\\w)\\1\\1/) && !value.match(/([~!@#$%^&*()_+=])\\1\\1/)) {\n status.passwordError[0] = true;\n } else status.passwordError[0] = false;\n ;\n if (value.match(/^(?!([a-zA-Z]+|[0-9]+|[~!@#$%^&*()_+=]+)$)[a-zA-Z\\d~!@#$%^&*()_+=]/) && !regSpace.test(value)) {\n status.passwordError[1] = true;\n } else status.passwordError[1] = false;\n if (value.length >= 10) {\n status.passwordError[2] = true;\n } else status.passwordError[2] = false;\n status.passwordValidation = status.passwordError.filter((status)=>status === false).length !== 0;\n },\n async onSubmit (values, formikActions) {\n formikActions.setSubmitting(true);\n try {\n const response = await resetPasswordCommand.execute({\n phone: values.phone,\n password: values.password,\n password_confirm: values.password_confirmation\n });\n ;\n if (response.success) {\n Modal.success({\n title: \"비밀번호 변경 성공\"\n });\n formikActions.resetForm();\n router.push(LOGIN_WITH_PHONE_PAGE);\n } else {\n ;\n Modal.error({\n title: \"\",\n content: \"오류가 발생한 것 같습니다. 새로고침 후 다시 시도해주세요.\"\n });\n }\n } catch (error) {\n ;\n Modal.error({\n title: \"\",\n content: \"오류가 발생한 것 같습니다. 새로고침 후 다시 시도해주세요.\"\n });\n } finally{\n formikActions.setSubmitting(false);\n }\n },\n dispose () {}\n }));\n return {\n status,\n actions\n };\n};\n","import { _ as _tagged_template_literal } from \"@swc/helpers/_/_tagged_template_literal\";\nfunction _templateObject() {\n const data = _tagged_template_literal([\n \"\\n padding: 40px;\\n box-sizing: border-box;\\n border: 1px solid \",\n \";\\n box-shadow: 0 7.1px 70.7px rgba(0, 0, 0, 0.1);\\n width: 100%;\\n\\n @media (max-width: 1200px) {\\n }\\n @media (max-width: 768px) {\\n padding: 40px 16px;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject1() {\n const data = _tagged_template_literal([\n \"\\n margin-bottom: 20px;\\n font-size: 24px;\\n font-weight: bold;\\n\"\n ]);\n _templateObject1 = function() {\n return data;\n };\n return data;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useViewModel } from \"@/lib/viewModels\";\nimport { ChangePasswordFormViewModel } from \"../viewModels/ChangePasswordFormViewModel\";\nimport styled from \"styled-components\";\nimport { observer } from \"mobx-react-lite\";\nimport { ChangePasswordForm } from \"../components/ChangePasswordForm\";\nimport { themeGet } from \"@styled-system/theme-get\";\nimport { useRouter } from \"next/router\";\nimport { useApiService } from \"@/lib/apiService\";\nimport { useAuthStore } from \"@/lib/auth/AuthStore\";\nexport const SignCommonFormViewWrapper = styled.div.withConfig({\n componentId: \"sc-a80f9fbd-0\"\n})(_templateObject(), themeGet(\"border.0\"));\nexport const SignCommonTitle = styled.h2.withConfig({\n componentId: \"sc-a80f9fbd-1\"\n})(_templateObject1());\nexport const ChangePasswordFormView = observer((props)=>{\n const router = useRouter();\n const apiService = useApiService();\n const authStore = useAuthStore();\n const { status , actions } = useViewModel({\n router,\n apiService,\n authStore\n }, ChangePasswordFormViewModel);\n return /*#__PURE__*/ _jsxs(SignCommonFormViewWrapper, {\n children: [\n /*#__PURE__*/ _jsx(SignCommonTitle, {\n children: \"비밀번호 변경\"\n }),\n /*#__PURE__*/ _jsx(ChangePasswordForm, {\n name: \"ChangePasswordForm\",\n initialStatus: status.initialStatus,\n initialValues: status.initialValues,\n sendCertificationCode: status.sendCertificationCode,\n certified: status.certified,\n onSubmit: actions.onSubmit,\n onSendCertificationCode: actions.onSendCertificationCode,\n onCheckCertificationCode: actions.onCheckCertificationCode,\n onCountTimer: actions.onCountTimer,\n onResetTimer: actions.onResetTimer,\n remainingTime: status.remainingTime,\n passwordValidator: actions.passwordValidator,\n passwordErrorStatus: status.passwordError,\n passwordValidation: status.passwordValidation\n })\n ]\n });\n});\n","import { _ as _tagged_template_literal } from \"@swc/helpers/_/_tagged_template_literal\";\nfunction _templateObject() {\n const data = _tagged_template_literal([\n \"\\n text-align: center;\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject1() {\n const data = _tagged_template_literal([\n \"\\n .ant-form-item {\\n margin-bottom: 50px;\\n\\n .ant-col {\\n min-height: 0;\\n padding: 0;\\n }\\n label {\\n display: none;\\n }\\n }\\n\\n .ant-select {\\n display: block;\\n max-width: 260px;\\n margin: 0 auto;\\n\\n .ant-select-selector {\\n text-align: left;\\n padding-left: 26px;\\n background: url('/static/assets/ico-user.svg') no-repeat 8px 50%;\\n background-size: 12px;\\n\\n .ant-select-selection-placeholder {\\n color: \",\n \";\\n }\\n }\\n\\n .ant-select-arrow {\\n .anticon {\\n width: 12px;\\n height: 12px;\\n font-size: 0;\\n background: url('/static/assets/icon_down.svg') no-repeat 50% 50%;\\n background-size: 12px;\\n }\\n }\\n }\\n\"\n ]);\n _templateObject1 = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject2() {\n const data = _tagged_template_literal([\n \"\\n pointer-events: none;\\n background: rgba(27, 27, 41, 0.3) !important;\\n\\n &:hover {\\n background: rgba(0, 47, 168, 0.9) !important;\\n }\\n \"\n ]);\n _templateObject2 = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject3() {\n const data = _tagged_template_literal([\n \"\\n background: #002fa8 !important;\\n \"\n ]);\n _templateObject3 = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject4() {\n const data = _tagged_template_literal([\n \"\\n display: block;\\n width: 100%;\\n height: 48px;\\n padding: 0;\\n border-radius: 2px;\\n \",\n \";\\n &,\\n &:disabled {\\n background-color: #002fa8;\\n }\\n\\n &:not(:disabled):hover {\\n background-color: #113ac3;\\n }\\n\\n span {\\n display: block;\\n height: 100%;\\n font-size: 16px;\\n font-weight: bold;\\n color: #fff;\\n line-height: 46px;\\n }\\n\"\n ]);\n _templateObject4 = function() {\n return data;\n };\n return data;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport styled, { css } from \"styled-components\";\nimport { getError } from \"@/components/Formik\";\nimport { Formik } from \"formik\";\nimport React from \"react\";\nimport * as Yup from \"yup\";\nimport { Form, FormItem, SubmitButton } from \"formik-antd\";\nimport { Select } from \"antd\";\nimport { themeGet } from \"@styled-system/theme-get\";\nexport const UserTypeFormSchema = Yup.object().shape({\n user_type: Yup.string().required(\"타입을 선택해주세요.\")\n});\nconst UserTypeFormWrapper = styled.div.withConfig({\n componentId: \"sc-8a400f98-0\"\n})(_templateObject());\nexport const userTypeOptions = [\n {\n value: \"1\",\n label: \"선생님\"\n },\n {\n value: \"2\",\n label: \"학원\"\n },\n {\n value: \"3\",\n label: \"교육기업\"\n },\n {\n value: \"4\",\n label: \"학생\"\n }\n];\nexport const UserTypeForm = (param)=>{\n let { onSubmit , forwardRef , initialStatus , initialValues } = param;\n return /*#__PURE__*/ _jsx(UserTypeFormWrapper, {\n children: /*#__PURE__*/ _jsx(Formik, {\n innerRef: (instance)=>{\n if (forwardRef) {\n forwardRef.current = instance;\n }\n },\n validationSchema: UserTypeFormSchema,\n onSubmit: onSubmit,\n initialValues: initialValues,\n initialStatus: initialStatus,\n children: (param)=>{\n let { handleChange , handleBlur , touched , errors , isValid , handleSubmit , setValues , values , isSubmitting , status } = param;\n var _values_user_type;\n const userTypeError = getError(\"user_type\", {\n touched,\n errors,\n status\n });\n return /*#__PURE__*/ _jsxs(StyledForm, {\n layout: \"vertical\",\n children: [\n /*#__PURE__*/ _jsx(FormItem, {\n name: \"user_type\",\n label: \"회원 구분\",\n children: /*#__PURE__*/ _jsx(Select, {\n onChange: handleChange(\"user_type\"),\n autoFocus: false,\n placeholder: \"회원 구분을 선택하세요.\",\n onBlur: handleBlur(\"user_type\"),\n value: (_values_user_type = values.user_type) === null || _values_user_type === void 0 ? void 0 : _values_user_type.toString(),\n options: userTypeOptions\n })\n }),\n /*#__PURE__*/ _jsx(StyledSubmitButton, {\n onSubmit: handleSubmit,\n loading: isSubmitting,\n disabled: !values.user_type,\n children: \"확인\"\n })\n ]\n });\n }\n })\n });\n};\nconst StyledForm = styled(Form).withConfig({\n componentId: \"sc-8a400f98-1\"\n})(_templateObject1(), themeGet(\"color.0\", \"#1B1B29\"));\nconst StyledSubmitButton = styled(SubmitButton).withConfig({\n componentId: \"sc-8a400f98-2\"\n})(_templateObject4(), (props)=>props.disabled ? css(_templateObject2()) : css(_templateObject3()));\n","import { _ as _tagged_template_literal } from \"@swc/helpers/_/_tagged_template_literal\";\nfunction _templateObject() {\n const data = _tagged_template_literal([\n \"\\n * {\\n color: #27ae60 !important;\\n }\\n\\n color: #27ae60 !important;\\n \"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject1() {\n const data = _tagged_template_literal([\n \"\\n \",\n \"\\n svg {\\n margin-right: 8px;\\n }\\n\"\n ]);\n _templateObject1 = function() {\n return data;\n };\n return data;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Formik } from \"formik\";\nimport React, { useState } from \"react\";\nimport * as Yup from \"yup\";\nimport { FormItem, Input } from \"formik-antd\";\nimport { CalendarOutlined, CheckOutlined, UserOutlined } from \"@ant-design/icons\";\nimport PhoneIcon from \"@/static/assets/ico-phone.svg\";\nimport Link from \"next/link\";\nimport { CustomSubmitBtn, SignCommonFormWrapper, SignCommonStyledForm } from \"@/modules/accounts/signIn/components/ChangePasswordForm\";\nimport { Checkbox, Col, Select } from \"antd\";\nimport styled, { css } from \"styled-components\";\nimport { userTypeOptions } from \"@/modules/accounts/signIn/components/UserTypeForm\";\nimport { suffix } from \"@/components/Suffix\";\nimport { PRIVACY_PAGE, TERMS_OF_USE_PAGE } from \"@/settings/constant\";\nexport let useTypeSelect = process.env.NEXT_PUBLIC_FEATURES_2023_03_USER_TYPE === \"true\";\nconst PassWordErrormessage = styled.span.withConfig({\n componentId: \"sc-4c888354-0\"\n})(_templateObject1(), (param)=>{\n let { passed } = param;\n return passed && css(_templateObject());\n});\nexport var TermsType;\n(function(TermsType) {\n TermsType[\"USAGE\"] = \"usage\";\n TermsType[\"PRIVACY\"] = \"privacy\";\n TermsType[\"MARKETING\"] = \"marketing\";\n TermsType[\"EVENT\"] = \"event\";\n})(TermsType || (TermsType = {}));\nexport const PhoneSignUpForm = (param)=>{\n let { name , onSubmit , initialStatus , initialValues , responsePhone , responseName , responseBirth , checkedValue , setCheckedValue , forwardRef } = param;\n const PhoneSignUpFormSchema = useTypeSelect ? Yup.object().shape({\n password: Yup.string().min(10, \"\").required(\"\"),\n passwordConfirm: Yup.string().required(\"\").oneOf([\n Yup.ref(\"password\"),\n null\n ], \"\"),\n user_type: Yup.string().required(\"타입을 선택해주세요.\"),\n email: Yup.string().email(\"이메일 형식이 올바르지 않습니다.\").required(\"\")\n }) : Yup.object().shape({\n password: Yup.string().min(10, \"\").required(\"\"),\n passwordConfirm: Yup.string().required(\"\").oneOf([\n Yup.ref(\"password\"),\n null\n ], \"\"),\n email: Yup.string().email(\"이메일 형식이 올바르지 않습니다.\").required(\"\")\n });\n const onChangeAllTerms = (e)=>{\n setCheckedValue({\n [\"usage\"]: e.target.checked,\n [\"privacy\"]: e.target.checked,\n [\"marketing\"]: e.target.checked,\n [\"event\"]: e.target.checked\n });\n setAllChecked(e.target.checked);\n };\n const [allChecked, setAllChecked] = useState(false);\n const onChangeTerms = (e)=>{\n const isEventChecked = e.target.value === \"event\" && e.target.checked === true;\n const isMarketingUnchecked = e.target.value === \"marketing\" && e.target.checked === false;\n if (allChecked) setAllChecked(false);\n if (isEventChecked || isMarketingUnchecked) {\n setCheckedValue({\n ...checkedValue,\n [\"marketing\"]: e.target.checked,\n [\"event\"]: e.target.checked\n });\n return;\n }\n setCheckedValue({\n ...checkedValue,\n [e.target.value]: e.target.checked\n });\n };\n const validationLength = (value)=>{\n return value.length >= 10;\n };\n const validationSpecial = (value)=>{\n return value.match(/^(?!([a-zA-Z]+|[0-9]+|[~!@#$%^&*()_+=]+)$)[a-zA-Z\\d~!@#$%^&*()_+=]/) && !/\\s/g.test(value);\n };\n const validationContinuous = (value)=>{\n return value.length > 0 && !value.match(/(\\w)\\1\\1/) && !value.match(/([~!@#$%^&*()_+=])\\1\\1/);\n };\n return /*#__PURE__*/ _jsx(SignCommonFormWrapper, {\n children: /*#__PURE__*/ _jsx(Formik, {\n innerRef: (instance)=>{\n if (forwardRef) {\n forwardRef.current = instance;\n }\n },\n validationSchema: PhoneSignUpFormSchema,\n onSubmit: onSubmit,\n initialValues: initialValues,\n validateOnMount: false,\n validateOnBlur: false,\n initialStatus: initialStatus,\n children: (param)=>{\n let { handleChange , handleBlur , touched , errors , isValid , handleSubmit , setValues , values , isSubmitting , status } = param;\n var _values_user_type;\n const emailError = touched.email && errors.email;\n return /*#__PURE__*/ _jsxs(SignCommonStyledForm, {\n layout: \"vertical\",\n children: [\n useTypeSelect && /*#__PURE__*/ _jsx(Col, {\n className: \"form-full-col\",\n children: /*#__PURE__*/ _jsx(FormItem, {\n name: \"user_type\",\n label: \"회원 구분\",\n children: /*#__PURE__*/ _jsx(Select, {\n onChange: handleChange(\"user_type\"),\n autoFocus: false,\n placeholder: \"회원 구분을 선택하세요.\",\n onBlur: handleBlur(\"user_type\"),\n value: (_values_user_type = values.user_type) === null || _values_user_type === void 0 ? void 0 : _values_user_type.toString(),\n options: userTypeOptions\n })\n })\n }),\n /*#__PURE__*/ _jsx(Col, {\n className: \"form-full-col\",\n children: /*#__PURE__*/ _jsx(FormItem, {\n name: \"phone\",\n children: /*#__PURE__*/ _jsx(Input, {\n name: \"phone\",\n disabled: true,\n value: responsePhone,\n prefix: /*#__PURE__*/ _jsx(PhoneIcon, {}),\n suffix: suffix\n })\n })\n }),\n /*#__PURE__*/ _jsx(Col, {\n className: \"form-full-col\",\n children: /*#__PURE__*/ _jsx(FormItem, {\n name: \"name\",\n children: /*#__PURE__*/ _jsx(Input, {\n name: \"name\",\n disabled: true,\n value: responseName,\n prefix: /*#__PURE__*/ _jsx(UserOutlined, {}),\n suffix: suffix\n })\n })\n }),\n /*#__PURE__*/ _jsx(Col, {\n className: \"form-full-col\",\n children: /*#__PURE__*/ _jsx(FormItem, {\n name: \"birth\",\n children: /*#__PURE__*/ _jsx(Input, {\n name: \"birth\",\n disabled: true,\n value: responseBirth,\n prefix: /*#__PURE__*/ _jsx(CalendarOutlined, {}),\n suffix: suffix\n })\n })\n }),\n /*#__PURE__*/ _jsx(Col, {\n className: \"form-full-col first\",\n children: /*#__PURE__*/ _jsxs(FormItem, {\n name: \"email\",\n children: [\n /*#__PURE__*/ _jsx(Input, {\n allowClear: true,\n name: \"email\",\n onBlur: handleBlur(\"email\"),\n onChange: (e)=>{},\n placeholder: \"이메일을 입력해주세요\",\n suffix: suffix\n }),\n emailError && /*#__PURE__*/ _jsx(\"span\", {\n className: \"ant-form-item-explain\",\n children: \"이메일이 올바르지 않습니다.\"\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Col, {\n className: \"form-full-col first\",\n children: /*#__PURE__*/ _jsxs(FormItem, {\n name: \"password\",\n children: [\n /*#__PURE__*/ _jsx(Input.Password, {\n allowClear: true,\n name: \"password\",\n onChange: (e)=>{\n const value = e.target.value;\n // passwordValidator(value)\n },\n placeholder: \"비밀번호를 입력해주세요.\",\n suffix: suffix\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"sign-common-desc\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsxs(PassWordErrormessage, {\n passed: validationSpecial(values.password),\n children: [\n /*#__PURE__*/ _jsx(CheckOutlined, {}),\n \"영문/숫자/특수문자(공백제외)만 허용하며, 2개 이상 조합\"\n ]\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsxs(PassWordErrormessage, {\n passed: validationContinuous(values.password),\n children: [\n /*#__PURE__*/ _jsx(CheckOutlined, {}),\n \"동일한 문자(영문/숫자/특수문자) 3개 이상 연속 사용 불가\"\n ]\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsxs(PassWordErrormessage, {\n passed: validationLength(values.password),\n children: [\n /*#__PURE__*/ _jsx(CheckOutlined, {}),\n \"10자 이상 입력\"\n ]\n })\n })\n ]\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Col, {\n className: \"form-full-col\",\n children: /*#__PURE__*/ _jsxs(FormItem, {\n name: \"passwordConfirm\",\n children: [\n /*#__PURE__*/ _jsx(Input.Password, {\n allowClear: true,\n name: \"passwordConfirm\",\n onChange: handleChange,\n placeholder: \"비밀번호를 확인해주세요.\",\n suffix: suffix\n }),\n values.password !== values.passwordConfirm && values.passwordConfirm !== \"\" && /*#__PURE__*/ _jsx(\"span\", {\n className: \"ant-form-item-explain\",\n children: \"비밀번호가 일치하지 않습니다.\"\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"policy_agreement\",\n children: [\n /*#__PURE__*/ _jsx(Checkbox, {\n className: \"agree-all\",\n checked: allChecked,\n onChange: onChangeAllTerms,\n children: \"전체 동의\"\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"agree-list\",\n children: [\n /*#__PURE__*/ _jsxs(Checkbox, {\n onChange: onChangeTerms,\n value: \"usage\",\n checked: checkedValue[\"usage\"],\n children: [\n /*#__PURE__*/ _jsx(\"p\", {\n children: \"쏠북 이용약관 동의 (필수)\"\n }),\n /*#__PURE__*/ _jsx(Link, {\n href: TERMS_OF_USE_PAGE,\n target: \"_blank\",\n children: \"자세히보기\"\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(Checkbox, {\n onChange: onChangeTerms,\n value: \"privacy\",\n checked: checkedValue[\"privacy\"],\n children: [\n /*#__PURE__*/ _jsx(\"p\", {\n children: \"개인정보 수집 및 이용 동의 (필수)\"\n }),\n /*#__PURE__*/ _jsx(Link, {\n href: PRIVACY_PAGE,\n target: \"_blank\",\n children: \"자세히보기\"\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(Checkbox, {\n onChange: onChangeTerms,\n value: \"marketing\",\n checked: checkedValue[\"marketing\"],\n children: [\n /*#__PURE__*/ _jsx(\"p\", {\n children: \"마케팅 목적의 개인정보 수집 및 이용 동의 (선택)\"\n }),\n /*#__PURE__*/ _jsx(Link, {\n href: PRIVACY_PAGE,\n target: \"_blank\",\n children: \"자세히보기\"\n })\n ]\n }),\n /*#__PURE__*/ _jsx(Checkbox, {\n onChange: onChangeTerms,\n value: \"event\",\n checked: checkedValue[\"event\"],\n children: /*#__PURE__*/ _jsx(\"p\", {\n children: \"이메일 및 SMS 등 수신 (선택)\"\n })\n })\n ]\n })\n ]\n }),\n useTypeSelect && /*#__PURE__*/ _jsx(CustomSubmitBtn, {\n disabled: values.password !== values.passwordConfirm || values.password === \"\" || values.passwordConfirm === \"\" || values.user_type === \"\",\n onSubmit: handleSubmit,\n loading: isSubmitting,\n block: true,\n children: \"동의하고 회원가입\"\n }),\n !useTypeSelect && /*#__PURE__*/ _jsx(CustomSubmitBtn, {\n disabled: // 비밀번호와 비밀번호 확인 값이 일치하지 않거나 비어 있으면 버튼 비활성화\n values.password !== values.passwordConfirm || values.password === \"\" || values.passwordConfirm === \"\" || // 이메일이 비어 있으면 버튼 비활성화\n values.email === \"\" || // 이용약관과 개인정보 수집 및 이용 동의 체크가 되지 않으면 버튼 비활성화\n !checkedValue[\"usage\"] || !checkedValue[\"privacy\"] || // 비밀번호 조건을 만족하지 않으면 버튼 비활성화\n !validationLength(values.password) || !validationSpecial(values.password) || !validationContinuous(values.password),\n onSubmit: handleSubmit,\n loading: isSubmitting,\n block: true,\n children: \"회원가입\"\n })\n ]\n });\n }\n })\n });\n};\n","import { api } from \".\";\nexport const niceDecrypt = async (param)=>{\n let { tokenVersionId , encData } = param;\n const { data } = await api.post(\"/nice/decrypt\", {\n tokenVersionId,\n encData\n });\n return data;\n};\n","import { api } from \".\";\nimport { toQueryString } from \"../utils/misc\";\nexport const checkEmail = async (param)=>{\n let { email } = param;\n const { data } = await api.get(\"/users/check-email/\".concat(toQueryString({\n email\n })));\n return data;\n};\n","import { api } from \".\";\nexport const signUpPhone = async (param)=>{\n let { phone , name , birth , password , password_confirm , email , options , referral } = param;\n const { data } = await api.post(\"/accounts/signup/phone\", {\n phone,\n name,\n birth,\n password,\n password_confirm,\n email,\n options,\n referral\n });\n return data;\n};\n","import { _ as _tagged_template_literal } from \"@swc/helpers/_/_tagged_template_literal\";\nfunction _templateObject() {\n const data = _tagged_template_literal([\n \"\\n display: flex;\\n justify-content: center;\\n flex-direction: column;\\n\\n align-items: center;\\n /* padding: 40px 0 112px; */\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject1() {\n const data = _tagged_template_literal([\n \"\\n padding: 40px;\\n box-sizing: border-box;\\n border: 1px solid \",\n \";\\n box-shadow: 0 7.1px 70.7px rgba(0, 0, 0, 0.1);\\n width: 560px;\\n background-color: \",\n \";\\n\\n margin: 40px 0;\\n @media (max-width: 1200px) {\\n margin: 32px 0;\\n }\\n @media (max-width: 768px) {\\n max-width: calc(100% - 32px);\\n padding: 40px 16px;\\n }\\n\"\n ]);\n _templateObject1 = function() {\n return data;\n };\n return data;\n}\nfunction _templateObject2() {\n const data = _tagged_template_literal([\n \"\\n display: flex;\\n justify-content: right;\\n margin-top: 28px;\\n\"\n ]);\n _templateObject2 = function() {\n return data;\n };\n return data;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useAuthStore } from \"@/lib/auth/AuthStore\";\nimport { SignCommonTitle } from \"@/modules/accounts/signIn/views/ChangePasswordFormView\";\nimport { PhoneSignUpForm, TermsType } from \"@/modules/accounts/signUp/components/PhoneSignUpForm\";\nimport { themeGet } from \"@styled-system/theme-get\";\nimport { useMutation, useQuery } from \"@tanstack/react-query\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { niceDecrypt } from \"../../../api/decryptNice\";\nimport { MemberPageHeader } from \"@/components/Member/MemberPageHeader\";\nimport { MemberPageLayout } from \"@/components/Member/MemberPageLayout\";\nimport useRedirect, { REDIRECT_QUERY } from \"@/hooks/useRedirect\";\nimport apiService from \"@/lib/apiService/apiService\";\nimport { gaSignupCompleted } from \"@/lib/ga4\";\nimport { loginCompleted, mixpanelEvent, signupCompleted } from \"@/lib/mixpanels/mixpanel\";\nimport useWindowDimensions from \"@/lib/web-ui/useWindowDimensions\";\nimport { LoginPhoneCommand } from \"@/modules/accounts/commands/loginPhoneCommand\";\nimport { LOGIN_PAGE, REGISTRATION_PAGE, SIGNUP_AFTER_USER_PROFILE } from \"@/settings/constant\";\nimport { Button, ConfirmDialog } from \"@bookips/solvook-ui-library\";\nimport { Modal } from \"antd\";\nimport { getMemberSignUpCheck } from \"src/api/member\";\nimport LoginDialog from \"src/store/loginDialog\";\nimport { checkEmail } from \"../../../api/checkEmail\";\nimport { getMe } from \"../../../api/getMe\";\nimport { signUpPhone } from \"../../../api/signUpPhone\";\nimport { useSavedUserSourceStore } from \"../../../store/main\";\nconst CheckSignUpChannelType = {\n kakao: \"카카오\",\n phone: \"휴대폰 번호\",\n whale: \"웨일\"\n};\nconst SignUpFormPage = (props)=>{\n const { isTablet } = useWindowDimensions();\n const router = useRouter();\n const currentPath = router.pathname;\n const authStore = useAuthStore();\n const { redirectAgain , redirectToLogin } = useRedirect();\n const isBrowser = \"object\" !== \"undefined\";\n const [reqKey, setReqKey] = useState(null);\n const initialStatus = {\n apiErrors: {}\n };\n const [initialValues, setInitialValues] = useState({\n birth: \"\",\n name: \"\",\n password: \"\",\n passwordConfirm: \"\",\n email: \"\",\n phone: \"\"\n });\n const [checkedValue, setCheckedValue] = useState({\n [TermsType.USAGE]: false,\n [TermsType.PRIVACY]: false,\n [TermsType.MARKETING]: false,\n [TermsType.EVENT]: false\n });\n const signUpPhoneMutation = useMutation(signUpPhone);\n const niceDecryptMutation = useMutation(niceDecrypt);\n const getMeMutation = useMutation(getMe);\n const checkEmailMutation = useMutation(checkEmail);\n // const signInPhoneMutation = useMutation(signInPhone)\n const signInPhone = async (param)=>{\n let { phone , password } = param;\n const loginWithPhoneCommand = new LoginPhoneCommand(apiService);\n return await loginWithPhoneCommand.execute({\n phone,\n password\n });\n };\n const signInPhoneMutation = useMutation(signInPhone);\n const isReferral = router.query.uid && router.query.campaign_id;\n const { updateUserMeta } = useSavedUserSourceStore((param)=>{\n let { updateUserMeta } = param;\n return {\n updateUserMeta\n };\n });\n const { isOpenSignUpDialog , openSignUpDialogContents , setState } = LoginDialog((state)=>({\n isOpenSignUpDialog: state.isOpenSignUpDialog,\n openSignUpDialogContents: state.openSignUpDialogContents,\n setState: state.setState\n })) //회원가입, 로그인시 다이얼로그 store\n ;\n const { data: responseCheckSignUp , error } = useQuery([\n \"checkSignUp\",\n reqKey\n ], ()=>getMemberSignUpCheck({\n reqKey: reqKey\n }), {\n staleTime: Infinity,\n enabled: !!reqKey\n });\n const onSubmit = async (values, formikActions)=>{\n formikActions.setSubmitting(true);\n //이메일 중복확인\n const existEmail = await checkEmailMutation.mutateAsync({\n email: values.email\n });\n if (existEmail.exist) {\n Modal.error({\n title: \"이메일 중복\",\n content: \"이미 가입된 이메일입니다.\"\n });\n formikActions.setErrors({\n email: \"이미 가입된 이메일입니다.\"\n });\n return;\n }\n await signUpPhoneMutation.mutateAsync({\n phone: initialValues.phone,\n name: initialValues.name,\n birth: initialValues.birth.substring(0, 4),\n email: values.email,\n password: values.password,\n password_confirm: values.passwordConfirm,\n options: checkedValue,\n ...isReferral ? {\n referral: {\n uid: router.query.uid,\n campaignId: router.query.campaign_id\n }\n } : {}\n }, {\n onError: (error)=>{\n const status = error.response.status;\n const errorMessages = error.response.data.message;\n ;\n setState(\"isOpenSignUpDialog\", true);\n setState(\"openSignUpDialogContents\", {\n title: \"다시 시도해주세요!\",\n content: \"가입에 실패했습니다. 새로고침 해주세요.\",\n severity: \"caution\",\n btnLabel: \"확인\",\n onOk: ()=>{\n setState(\"isOpenSignUpDialog\", false);\n }\n });\n }\n });\n await signInWithPhone(initialValues.phone, values.password);\n formikActions.resetForm();\n };\n const signInWithPhone = async (phone, password)=>{\n const signInRes = await signInPhoneMutation.mutateAsync({\n phone,\n password\n });\n await getMeMutation.mutateAsync(signInRes.access_token, {\n onSuccess: async (response)=>{\n var _response_user, _response_user1;\n authStore.updateUser(response.user);\n updateUserMeta({\n mainSubject: (_response_user = response.user) === null || _response_user === void 0 ? void 0 : _response_user.mainSubject,\n job: (_response_user1 = response.user) === null || _response_user1 === void 0 ? void 0 : _response_user1.job\n });\n // 회원가입을 완료 하였을 때, 바로 프로필 설정으로 넘어가는것이 자연스럽다고 판단되어, 중간에 다이얼로그를 띄우지 않고 바로 넘어가도록 수정하였습니다. 24.07.25\n // setState('isOpenSignUpDialog', true)\n // setState('openSignUpDialogContents', {\n // \ttitle: '가입 성공!',\n // \tcontent: '회원가입이 완료되었습니다.',\n // \tseverity: 'success',\n // })\n signupCompleted({\n user_id: authStore.user.id.toString(),\n $registration_date: new Date().toISOString(),\n \"Registration Method\": \"phone\",\n \"Login Method\": \"phone\",\n $name: authStore.user.displayName,\n $email: authStore.user.email,\n \"Phone Number\": authStore.user.phoneNumber\n });\n gaSignupCompleted({\n user_id: authStore.user.id.toString(),\n registration_date: new Date().toISOString(),\n type: \"phone\",\n name: authStore.user.displayName\n });\n loginCompleted({\n user_id: authStore.user.id.toString(),\n $registration_date: new Date().toISOString(),\n \"Registration Method\": \"phone\",\n \"Login Method\": \"phone\",\n $name: authStore.user.displayName,\n $email: authStore.user.email,\n \"Phone Number\": authStore.user.phoneNumber\n });\n router.push({\n pathname: SIGNUP_AFTER_USER_PROFILE,\n query: {\n [REDIRECT_QUERY]: router.query[\"redirect_path\"]\n }\n });\n }\n });\n };\n useEffect(()=>{\n if (!router.query.enc_data) return;\n const tokenVersionId = JSON.stringify(router.query.token_version_id).replaceAll(/\"/g, \"\");\n const encData = JSON.stringify(router.query.enc_data).replaceAll(\" \", \"+\").replaceAll(/\"/g, \"\");\n niceDecryptMutation.mutate({\n tokenVersionId,\n encData\n }, {\n onSuccess: (response)=>{\n if (response) {\n setInitialValues({\n ...initialValues,\n phone: response.phone,\n name: response.name,\n birth: response.birth\n });\n }\n }\n });\n }, [\n router.query\n ]);\n useEffect(()=>{\n if (!responseCheckSignUp) return;\n if (responseCheckSignUp.channel) {\n setState(\"isOpenSignUpDialog\", true);\n setState(\"openSignUpDialogContents\", {\n title: CheckSignUpChannelType[responseCheckSignUp.channel] + \"로 이미 가입했어요.\",\n content: \"로그인 페이지에서 '\".concat(CheckSignUpChannelType[responseCheckSignUp.channel], \"로 로그인' 버튼을 클릭해주세요.\"),\n btnLabel: \"로그인하러 가기\",\n onOk: ()=>{\n // mx-9 로그인하러 가기 버튼 클릭시\n mixpanelEvent(\"Popup Button Clicked\", {\n \"Popup Type\": \"Already Signed In\",\n \"Popup Title\": \"\".concat(CheckSignUpChannelType[responseCheckSignUp.channel], \"로 이미 가입했어요\"),\n \"Button Name\": \"로그인하러 가기\"\n });\n router.push({\n pathname: LOGIN_PAGE,\n query: router.query[\"redirect_path\"] && {\n [REDIRECT_QUERY]: router.query[\"redirect_path\"]\n }\n });\n }\n });\n }\n return ()=>{\n localStorage.removeItem(\"reqKey\");\n };\n }, [\n responseCheckSignUp,\n router\n ]);\n useEffect(()=>{\n if (isBrowser) {\n setReqKey(localStorage.getItem(\"reqKey\") || null);\n }\n }, [\n isBrowser\n ]);\n useEffect(()=>{\n if (error) {\n ;\n // 400 reqKey가 없을 때,\n // 401 reqKey가 유효하지 않을때\n setState(\"isOpenSignUpDialog\", true);\n setState(\"openSignUpDialogContents\", {\n title: \"다시 시도해주세요.\",\n content: \"문제가 지속되면 고객센터로 문의해주세요.\",\n btnLabel: \"확인\",\n onOk: ()=>{\n setState(\"isOpenSignUpDialog\", false);\n }\n });\n }\n }, [\n error\n ]);\n useEffect(()=>{\n // 휴대번 번호로 가입을 시도하다가 이탈하고, 다시 이 페이지에 왔을 경우, 정확한 인증을 위해 회원가입 페이지로 이동합니다.\n if (!isBrowser) return;\n // reqKey의 경우, 처음 init 시점의 값이 null이기 때문에, localStorage의 값으로 페이지 이탈을 확인하였습니다.\n if (!localStorage.getItem(\"reqKey\") && router.pathname.includes(\"form\")) {\n setState(\"isOpenSignUpDialog\", true);\n setState(\"openSignUpDialogContents\", {\n title: \"잘못된 접근이에요.\",\n content: \"다시 시도해주세요.\",\n btnLabel: \"확인\",\n onOk: ()=>{\n redirectAgain(\"\".concat(REGISTRATION_PAGE));\n setState(\"isOpenSignUpDialog\", false);\n }\n });\n }\n }, [\n isBrowser,\n router.pathname\n ]);\n return /*#__PURE__*/ _jsxs(SignUpFormPageWrapper, {\n children: [\n isTablet ? /*#__PURE__*/ _jsx(MemberPageHeader, {\n pageTitle: \"휴대폰 번호로 가입하기\",\n showBackButton: true\n }) : /*#__PURE__*/ _jsx(MemberPageHeader, {\n showLogo: true\n }),\n /*#__PURE__*/ _jsxs(SignCommonFormViewWrapper, {\n children: [\n /*#__PURE__*/ _jsx(SignCommonTitle, {\n children: \"휴대폰 번호로 가입하기\"\n }),\n /*#__PURE__*/ _jsx(PhoneSignUpForm, {\n name: \"SignUpFormNew\",\n responseName: initialValues.name,\n responsePhone: initialValues.phone,\n responseBirth: initialValues.birth,\n initialStatus: initialStatus,\n initialValues: initialValues,\n checkedValue: checkedValue,\n setCheckedValue: setCheckedValue,\n onSubmit: onSubmit\n })\n ]\n }),\n /*#__PURE__*/ _jsx(ConfirmDialog, {\n open: isOpenSignUpDialog,\n severity: openSignUpDialogContents.severity || \"caution\",\n onClose: ()=>{},\n title: openSignUpDialogContents.title,\n content: openSignUpDialogContents.content,\n footer: openSignUpDialogContents.btnLabel && /*#__PURE__*/ _jsx(FooterButtonBox, {\n children: /*#__PURE__*/ _jsx(Button, {\n variant: \"solid\",\n label: openSignUpDialogContents.btnLabel,\n onClick: ()=>{\n openSignUpDialogContents.onOk();\n setState(\"isOpenSignUpDialog\", false);\n }\n })\n })\n })\n ]\n });\n};\nSignUpFormPage.getLayout = (page)=>{\n return /*#__PURE__*/ _jsx(MemberPageLayout, {\n children: page\n });\n};\nexport default SignUpFormPage;\nconst SignUpFormPageWrapper = styled.div.withConfig({\n componentId: \"sc-538535df-0\"\n})(_templateObject());\nexport const SignCommonFormViewWrapper = styled.div.withConfig({\n componentId: \"sc-538535df-1\"\n})(_templateObject1(), themeGet(\"border.0\"), themeGet(\"background.0\"));\nexport const FooterButtonBox = styled.div.withConfig({\n componentId: \"sc-538535df-2\"\n})(_templateObject2());\n"],"names":[],"sourceRoot":""}