1"use strict";(self.webpackChunkshop_react_web=self.webpackChunkshop_react_web||[]).push([[8005],{80468:(e,o,n)=>{n.d(o,{A:()=>d});n(65043);var s=n(39263),a=n(97605),t=n(399),r=n(59116),c=n(92633),i=n(35509),l=n(70579);const d=e=>{const{modal:o,setModal:n,description:d,caption:p,onSubmit:u,isNestedModal:m,btnText:h}=e;(0,c.A)(o,m);const g=()=>{n(!1)};return(0,l.jsx)(l.Fragment,{children:o?(0,l.jsx)(s.hE,{onClick:g,children:(0,l.jsxs)(s.lT,{padding:"32px 16px 16px",onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)(a.pT,{direction:"column",gap:"8px",padding:p?"0 16px 24px":"0 0 24px",children:[(0,l.jsx)(t.V9,{fontSize:r.$N.size18,fontWeight:r.sO.semiBold,align:"center",style:{whiteSpace:"pre-wrap"},children:d}),p&&(0,l.jsx)(t.x5,{color:"var(--color-gray-400)",fontWeight:r.sO.medium,align:"center",style:{whiteSpace:"pre-wrap"},children:p})]}),(0,l.jsx)(i.oT,{onClick:()=>u?u():g(),children:null!==h&&void 0!==h?h:"\ud655\uc778"})]})}):""})}},18005:(e,o,n)=>{n.r(o),n.d(o,{default:()=>g});var s=n(86213),a=n(65043),t=n(73216),r=n(35475),c=n(60349),i=n(7685),l=n(52126),d=n(7829),p=n(9970),u=n(80468),m=n(33196),h=n(70579);const g=()=>{const e=(0,t.Zp)(),[o]=(0,r.ok)(),n=o.get("code"),g=window.location.origin+"/kakao/redirect",k=(0,l.A)((e=>e.login)),{postSignupSns:T}=(0,d.A)(),{loginSuccess:A}=(0,m.y)(),{mutate:f}=(0,c.T)(),[v,w]=(0,a.useState)(!1),[E,S]=(0,a.useState)(""),x=(o,n,a)=>{s.A.get("https://kapi.kakao.com/v1/user/service/terms",{headers:{Authorization:"Bearer ".concat(a),"Content-type":"application/x-www-form-urlencoded;charset=utf-8"}}).then((s=>{const a=s.data.allowed_service_terms;((o,n,s)=>{const a=s.some((e=>"service_240524"===e.tag)),t=s.some((e=>"ads_240524"===e.tag));if(!n.phone_number)return e("/signupsns",{state:{id_token:o,snsType:"KAKAO"},replace:!0});const r={email:n.email,phone:(0,i.hN)(n.phone_number),name:n.profile.nickname,useAndPrivacyTerms:a,adMessageTerms:t};T(r,o,"KAKAO")})(o,n,a)})).catch((e=>{console.log("E01 ",e),S("E01 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. \ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc138\uc694."),w(!0)}))},y=e=>{s.A.get("https://kapi.kakao.com/v2/user/me",{headers:{Authorization:"Bearer ".concat(e),"Content-type":"application/x-www-form-urlencoded;charset=utf-8"}}).then((o=>{(async(e,o,n)=>{f({snsKey:e},{onSuccess:e=>{k(e.accessToken,e.refreshToken,"local"),A()},onError:s=>{console.log("E02 ",s),"0021"===(null===s||void 0===s?void 0:s.code)?x(e,o,n):(S("E02 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. \ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc138\uc694."),w(!0))}})})(o.data.id.toString(),o.data.kakao_account,e)})).catch((e=>{console.log("E03 ",e),S("E03 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. \ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc138\uc694."),w(!0)}))};return(0,a.useEffect)((()=>{n&&s.A.post("https://kauth.kakao.com/oauth/token?grant_type=".concat("authorization_code","&client_id=").concat("2784bb9d03648dee88d77351eebe4b2b","&redirect_uri=").concat(g,"&code=").concat(n),{},{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((e=>{y(e.data.access_token)})).catch((e=>{console.log("E04 ",e),S("E04 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. \ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc138\uc694."),w(!0)}))}),[n]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(p.A,{}),(0,h.jsx)(u.A,{modal:v,setModal:w,description:E,onSubmit:()=>e(-1)})]})}},5353:(e,o,n)=>{n.d(o,{A:()=>t});var s=n(60349),a=n(52126);const t=()=>{const{mutate:e}=(0,s.T)(),o=(0,a.A)((e=>e.login));return{postLogin:(n,s,a)=>{const t={loginId:n.email,password:n.password};e(t,{onSuccess:e=>{n.autoLogin?o(e.accessToken,e.refreshToken,"local"):o(e.accessToken,e.refreshToken,"session"),s()},onError:e=>{a(e)}})}}}},7829:(e,o,n)=>{n.d(o,{A:()=>m});var s=n(73216),a=n(46655),t=n(47097),r=n(13241);var c=n(23178),i=n(5353),l=n(60349),d=n(63109),p=n(34020),u=n(52126);const m=()=>{const e=(0,s.Zp)(),o=(0,p.A)((e=>e.setInvitationInfo)),n=(0,u.A)((e=>e.login)),{setDefaultErrorToast:m}=(0,c.W)((0,a.k)((e=>({setDefaultErrorToast:e.setDefaultErrorToast})))),{postLogin:h}=(0,i.A)(),{mutate:g,isError:k}=(0,t.n)({mutationFn:e=>(0,r.Rl)(e)}),{mutate:T}=(0,t.n)({mutationFn:e=>(0,r.Bu)(e)}),{mutate:A}=(0,l.T)(),{mutate:f}=(0,t.n)({mutationFn:e=>(0,r.Xf)(e)}),{mutate:v}=(0,l.$)(),w=()=>{(0,d.IJ)().then((n=>{const s=n.length>0,a=n.find((e=>e.isInvited));s&&!!a?(o(a),e("/staff/invitation",{replace:!0})):e("/makeshop",{replace:!0})})).catch((()=>{e("/makeshop",{replace:!0})}))};return{postSignup:e=>{const o={loginId:e.email,password:e.password,tel:e.phone,email:e.email,useAndPrivacyTerms:e.useAndPrivacyTerms,adMessageTerms:e.adMessageTerms,name:e.name};g(o,{onSuccess:()=>{h({email:o.email,password:o.password,autoLogin:!0},(()=>w()),(()=>m()))}})},isSignupError:k,idDuplicateCheck:(e,o,n)=>{T(e,{onSuccess:()=>{o()},onError:()=>{n()}})},postSignupSns:(o,s,a)=>{const t={email:(null===o||void 0===o?void 0:o.email)||"",snsLoginId:s,snsType:a,tel:o.phone,useAndPrivacyTerms:o.useAndPrivacyTerms,adMessageTerms:o.adMessageTerms,name:o.name};"APPLE"===a?f({useAndPrivacyTerms:o.useAndPrivacyTerms,adMessageTerms:o.adMessageTerms,tel:o.phone,appleAuthorizationValue:s,name:o.name},{onSuccess:()=>{v({appleAuthorizationValue:s},{onSuccess:e=>{n(e.accessToken,e.refreshToken,"local"),w()},onError:()=>{e(-1)}})},onError:()=>{e(-1)}}):g(t,{onSuccess:()=>{A({snsKey:s},{onSuccess:e=>{n(e.accessToken,e.refreshToken,"local"),w()},onError:()=>{e(-1)}})},onError:()=>{e(-1)}})}}}},60349:(e,o,n)=>{n.d(o,{$:()=>r,T:()=>t});var s=n(47097),a=n(13241);const t=()=>(0,s.n)({mutationFn:e=>(0,a.U5)(e)}),r=()=>(0,s.n)({mutationFn:e=>(0,a.Ik)(e)})}}]); 2//# sourceMappingURL=8005.7bbf20de.chunk.js.map
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.