1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4053],{1507:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/phone-verification",function(){return n(72353)}])},72353:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return y}});var r=n(52322),s=n(55351),i=n(94866),u=n(98788),o=n(42838),c=n(22970),a=n(5632),l=n(2784),h=n(62350),d=n(56960),f="\n mutation GetNiceS2sAuthUrl($returnUrl: String!, $closeUrl: String!) {\n getNiceS2sAuthUrl(returnUrl: $returnUrl, closeUrl: $closeUrl) {\n authUrl\n }\n}\n ",p=function(t){return(0,h.D)(["GetNiceS2sAuthUrl"],(function(t){return(0,d.l3)(f,"GetNiceS2sAuthUrl",t)()}),t)};p.fetcher=function(t,e){return(0,d.l3)(f,"GetNiceS2sAuthUrl",t,e)};var b="\n mutation HandleNiceS2sResult($webTransactionId: String!) {\n handleNiceS2sResult(webTransactionId: $webTransactionId)\n}\n ",v=function(t){return(0,h.D)(["HandleNiceS2sResult"],(function(t){return(0,d.l3)(b,"HandleNiceS2sResult",t)()}),t)};v.fetcher=function(t,e){return(0,d.l3)(b,"HandleNiceS2sResult",t,e)};var w=n(64040),m=function(){var t=(0,a.useRouter)(),e=(0,i.pm)().toast,n=t.query,r=n.result,s=n.redirectUrl,h=n.web_transaction_id,d=(0,l.useState)(!0),f=d[0],b=d[1],m=(0,l.useState)(!1),R=m[0],g=m[1],S=(0,l.useRef)(!1),y=(0,l.useRef)(!1),C=function(){var t=p().mutateAsync,e=v().mutateAsync,n=function(){var e=(0,u.Z)((function(e){var n;return(0,c.__generator)(this,(function(r){switch(r.label){case 0:return[4,t({returnUrl:e.returnUrl,closeUrl:e.closeUrl})];case 1:if(!(n=r.sent().getNiceS2sAuthUrl).authUrl)throw new Error("\ubcf8\uc778\uc778\uc99d URL\uc744 \ubc1c\uae09\ubc1b\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc2dc \uc2dc\ub3c4\ud574\uc8fc\uc138\uc694.");return[2,n.authUrl]}}))}));return function(t){return e.apply(this,arguments)}}(),r=function(){var t=(0,u.Z)((function(t){return(0,c.__generator)(this,(function(n){switch(n.label){case 0:return[4,e({webTransactionId:t})];case 1:return[2,n.sent().handleNiceS2sResult]}}))}));return function(e){return t.apply(this,arguments)}}();return{requestNiceS2sAuthUrl:n,applyNiceS2sResult:r}}(),U=C.requestNiceS2sAuthUrl,N=C.applyNiceS2sResult,x=(0,l.useCallback)((function(t){var e={type:t,timestamp:Date.now()};if(window.opener&&!window.opener.closed)try{window.opener.postMessage(e,window.location.origin)}catch(r){console.error("window.opener.postMessage failed:",r)}if("BroadcastChannel"in window)try{var n=new BroadcastChannel(w.B);n.postMessage(e),n.close()}catch(s){console.error("BroadcastChannel failed:",s)}}),[]),_=(0,l.useCallback)((function(){g(!1),s&&"string"===typeof s?t.replace(s):window.close()}),[t,s]),E=(0,l.useCallback)((function(t){var e="".concat("https://doctornow.co.kr","/phone-verification?result=").concat(t);return s&&"string"===typeof s?"".concat(e,"&redirectUrl=").concat(encodeURIComponent(s)):e}),[s]),O=(0,l.useCallback)((0,u.Z)((function(){var t;return(0,c.__generator)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,U({returnUrl:E("success"),closeUrl:E("fail")})];case 1:return t=e.sent(),window.location.replace(t),[3,3];case 2:return e.sent(),b(!1),g(!0),[3,3];case 3:return[2]}}
1))})),[E,U]),M=(0,l.useCallback)(function(){var n=(0,u.Z)((function(n){var r;return(0,c.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,N(n)];case 1:if(!i.sent())throw new Error("\ubcf8\uc778\uc778\uc99d\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc2dc \uc2dc\ub3c4\ud574\uc8fc\uc138\uc694.");return x(w.i.SUCCESS),s&&"string"===typeof s?t.replace(s):window.close(),[3,3];case 2:return r=i.sent(),x(w.i.FAIL),e({text:(0,o.Z)(r,Error)?r.message:"\ubcf8\uc778\uc778\uc99d\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc2dc \uc2dc\ub3c4\ud574\uc8fc\uc138\uc694.",direction:"bottom"}),b(!1),g(!0),[3,3];case 3:return[2]}}))}));return function(t){return n.apply(this,arguments)}}(),[N,s,t,x,e]);return(0,l.useEffect)((function(){if(t.isReady){if(!("string"===typeof h&&h.length>0))return"success"===r||"fail"===r?(b(!1),void g(!0)):void(y.current||(y.current=!0,O()));S.current||(S.current=!0,M(h))}}),[t.isReady,h,r,M,O]),{isLoading:f,certificationAlertOpen:R,onCloseCertificationPopup:_}},R=function(){var t=m(),e=t.isLoading,n=t.certificationAlertOpen,s=t.onCloseCertificationPopup;return e?(0,r.jsx)("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"mx-auto mb-[16px] h-[32px] w-[32px] animate-spin rounded-full border-blue-600 border-b-2"}),(0,r.jsx)("p",{className:"text-gray-600",children:"\ubcf8\uc778\uc778\uc99d\uc744 \uc900\ube44\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4..."})]})}):(0,r.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,r.jsx)(i.bZ,{type:"single",title:"\ubcf8\uc778\uc778\uc99d \uc2e4\ud328",description:"\ubcf8\uc778\uc778\uc99d\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc2dc \uc2dc\ub3c4\ud574\uc8fc\uc138\uc694.",open:n,onOpenChange:s,buttons:[{label:"\ud655\uc778",onClick:s}]})})},g=n(25763),S=function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.PB,{noindex:!0,nofollow:!0}),(0,r.jsx)(R,{})]})},y=S;S.Layout=g.Z},64040:function(t,e,n){"use strict";n.d(e,{B:function(){return r},i:function(){return s}});var r="doctornow-certification",s={SUCCESS:"CERTIFICATION_SUCCESS",FAIL:"CERTIFICATION_FAIL"}},25763:function(t,e,n){"use strict";var r=n(52322);n(2784);e.Z=function(t){var e=t.children;return(0,r.jsx)(r.Fragment,{children:e})}},62350:function(t,e,n){"use strict";n.d(e,{D:function(){return d}});var r=n(2784),s=n(29930),i=n(36370),u=n(96278),o=n(3709),c=n(22436);class a extends c.l{constructor(t,e){super(),this.client=t,this.setOptions(e),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.client.defaultMutationOptions(t),(0,i.VS)(e,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this})}onUnsubscribe(){var t;this.listeners.length||(null==(t=this.currentMutation)||t.removeObserver(this))}onMutationUpdate(t){this.updateResult();const e={listeners:!0};"success"===t.type?e.onSuccess=!0:"error"===t.type&&(e.onError=!0),this.notify(e)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,e){return this.mutateOptions=e,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:"undefined"!==typeof t?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:(0,u.R)(),e={...t,isLoading:"loading"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset};this.currentResult=e}notify(t){o.V.batch((()=>{var e,n,r,s;if(this.mutateOptions)if(t.onSuccess)null==(e=(n=this.mutateOptions).onSuccess)||e.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(s=this.mutateOptions).onSettled)||r.call(s,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(t.onError){var i,u,o,c;null==(i=(u=this.mutateOptions).onError)||i.call(u,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(o=(c=this.mutateOptions).onSettled)||o.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}
1t.listeners&&this.listeners.forEach((t=>{t(this.currentResult)}))}))}}var l=n(55830),h=n(99189);function d(t,e,n){const u=(0,i.lV)(t,e,n),c=(0,l.NL)({context:u.context}),[d]=r.useState((()=>new a(c,u)));r.useEffect((()=>{d.setOptions(u)}),[d,u]);const p=(0,s.$)(r.useCallback((t=>d.subscribe(o.V.batchCalls(t))),[d]),(()=>d.getCurrentResult()),(()=>d.getCurrentResult())),b=r.useCallback(((t,e)=>{d.mutate(t,e).catch(f)}),[d]);if(p.error&&(0,h.L)(d.options.useErrorBoundary,[p.error]))throw p.error;return{...p,mutate:b,mutateAsync:p.mutate}}function f(){}}},function(t){t.O(0,[9774,2888,179],(function(){return e=1507,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
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.