1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[854],{50138:function(e,t,i){"use strict";i.d(t,{TM:function(){return l.TM},vN:function(){return l.vN},xS:function(){return s}});var n=i(2265),a=i(22252);let r=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{type:e,props:t,layerZIndex:i.layerZIndex}};var l=i(14708);let c=e=>{let{uid:t}=e,[i,a]=(0,n.useState)(null);return{modalQueueConfig:i,getConfig:async e=>{let{eventName:i,game_id:n,uid:r}=e;try{if(!(null!=r?r:t)||!i)return null;let e=await (0,l.Al)({eventName:i,game_id:n});if(0===e.errCode){let t=e.data;return a(t),t}return null}catch(e){throw e}}}},s=e=>{let{uid:t,autoStart:i=!1,onSuccess:l}=e,{addModal:s,clearQueue:o}=(0,a.useModalQueue)(),[u,d]=(0,n.useState)(t),p=(0,n.useRef)(t),{modalQueueConfig:f,getConfig:v}=c({uid:p.current}),[m,h]=(0,n.useState)(!1),[_,g]=(0,n.useState)(null),[y,I]=(0,n.useState)(null),[w,x]=(0,n.useState)("vertical");(0,n.useEffect)(()=>{void 0!==t&&(p.current=t,d(t))},[t]);let S=(0,n.useCallback)(e=>{let t=null!=e?e:p.current;return void 0!==t&&t!==p.current&&(p.current=t,d(t)),t},[]),N=(0,n.useCallback)((e,t)=>{let i=null!=t?t:p.current;if(!i)return 0;let n=window.localStorage.getItem("".concat("modalQueue_lastTriggered_".concat(i,"_")).concat(e));if(!n)return 0;let a=Number(n);return Number.isFinite(a)?a:0},[]),b=(0,n.useCallback)((e,t,i)=>{let n=null!=i?i:p.current;n&&window.localStorage.setItem("".concat("modalQueue_lastTriggered_".concat(n,"_")).concat(e),String(t))},[]),j=(0,n.useCallback)(async e=>{let{eventName:t,direction:i,modalPropsMap:n,game_id:a="",uid:r}=e,l=S(r);if(!l)return;let c=await v({eventName:t,game_id:a,uid:l});return g(n||null),h(!1),I(t),x(i),c&&c[0]||null},[v,S]),A=(0,n.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(),S(i.uid)&&s(r(e,{onSuccess:l,direction:w,visible:!0,...t},i))},[S,s,l,o,w]),{tasks:C,minInterval:P}=(0,n.useMemo)(()=>{let e=[],t=0;return u&&f&&f.forEach(i=>{var n,a;let r=null!==(n=i.limit)&&void 0!==n?n:0;(null!==(a=i.gift_items)&&void 0!==a?a:[]).forEach((t,i)=>{r>0&&i>=r||e.push({type:t.key})}),t=Math.max(t,i.interval||0)}),{tasks:e,minInterval:t}},[f,u]),B=(0,n.useCallback)(e=>{let t=S(e);if(!t||!C.length||!y)return;let i=Date.now(),n=N(y,t),a=1e3*P;n&&i-n<a||(C.forEach(e=>{let t=(null==_?void 0:_[e.type])||{};s({type:e.type,props:{onSuccess:l,direction:w,...t}})}),h(!0),b(y,i,t))},[S,C,s,_,y,N,b,P,l,w]);return(0,n.useEffect)(()=>{u&&i&&C.length&&(m||B())},[u,B,i,m,C]),{setupModalQueue:j,trigger:B,triggerManualModal:A}}},40854:function(e,t,i){"use strict";var n=i(57437),a=i(2265),r=i(7633),l=i(68178),c=i.n(l),s=i(24705),o=i(19123),u=i(52509),d=i(75790),p=i(61580),f=i(18628),v=i(55810),m=i(7194),h=i(50138),_=i(90961);t.Z=e=>{let{mode:t="proactive",forceBasic:i=!1,onSuccess:l}=e,{showTip:g,closeModal:y,openModal:I}=(0,d.useModal)(),{refreshUser:w,user:x}=(0,f.useAuth)(),S=(0,r.T)("identity"),N=(0,r.T)("common"),{triggerManualModal:b}=(0,h.xS)({uid:null==x?void 0:x.gid}),[j,A]=(0,a.useState)(0),[C,P]=(0,a.useState)("nin"),[B,R]=(0,a.useState)(""),[D,V]=(0,a.useState)(""),[E,k]=(0,a.useState)(""),[H,T]=(0,a.useState)({}),[L,M]=(0,a.useState)(!1),[U,W]=(0,a.useState)(!1),[q,O]=(0,a.useState)(!1),[F,z]=(0,a.useState)(""),[Z,Q]=(0,a.useState)(!1),[G,J]=(0,a.useState)(!1),[K,X]=(0,a.useState)(0),Y=(0,a.useRef)(null),[$,ee]=(0,a.useState)(!1);(0,a.useEffect)(()=>(p.U.Instance.WebDotData.getReqData("PV",3,"cb7mdh5g2j","cb7mdh5g2j_pv"),()=>{p.U.Instance.WebDotData.getReqData("PD",3,"cb7mdh5g2j","cb7mdh5g2j_pd")}),[]);let et=(0,a.useMemo)(()=>p.U.Instance.getAuthDataApiAccessor().getLoginData(),[]),ei=(null==et?void 0:et.flag)||0,en=i&&!U,ea=!en&&(8&ei)==8,er=U||!i&&(ea||"risk"===t),el=en||!ea&&"proactive"===t&&"bvn"===C,ec=(0,a.useMemo)(()=>(null==et?void 0:et.gid)?"".concat(C,"_limit_expire_").concat(et.gid):null,[et,C]),es=(0,a.useMemo)(()=>(null==et?void 0:et.gid)?"kyc_verify_retry_".concat(C,"_").concat(et.gid):null,[et,C]);(0,a.useEffect)(()=>{(async()=>{if(null==et?void 0:et.gid)try{let e=await (0,v._4)(et.gid,"realtime");if(0===e.errCode)try{let t=JSON.parse(e.data.val);(null==t?void 0:t.bvn_verification_interval)&&Number.isInteger(t.bvn_verification_interval)&&A(t.bvn_verification_interval)}catch(e){}}catch(e){}})()},[et]),(0,a.useEffect)(()=>
1{if(!ec||!el)return;let e=localStorage.getItem(ec);e&&Date.now()<parseInt(e)?J(!0):J(!1)},[ec,el]),(0,a.useEffect)(()=>{if(!es||j<=0)return;let e=localStorage.getItem(es);if(e){let t=j-Math.floor((Date.now()-parseInt(e))/1e3);t>0?X(t):localStorage.removeItem(es)}},[es,j]),(0,a.useEffect)(()=>{if(!(K<=0))return Y.current=setInterval(()=>{X(e=>e<=1?(clearInterval(Y.current),es&&localStorage.removeItem(es),0):e-1)},1e3),()=>{Y.current&&clearInterval(Y.current)}},[K,es]);let eo=()=>{R(""),V(""),k(""),T({}),M(!1),O(!1),z(""),Q(!1),X(0)},eu=e=>{e!==C&&(P(e),eo(),J(!1))},ed=()=>{eo(),es&&localStorage.removeItem(es)},ep=()=>{let e={};return el&&(B.trim()||(e.firstName=S("firstNameRequired")),D.trim()||(e.lastName=S("lastNameRequired"))),E.length<11&&(e.idNumber="bvn"===C?S("correctBvn"):S("correctNin")),T(e),0===Object.keys(e).length},ef=async()=>{if(ep()){if(G&&el){g({message:S("dailyBvnLimit")});return}if(K>0){g({message:S("verifyingTryLater")});return}M(!0);try{if(el?await (0,u.ls)({bvn:E,firstName:B,lastName:D}):"bvn"===C?await (0,u.A9)(E):await (0,u.p0)(E),g({message:S("verificationSuccessful")}),await w(),l)setTimeout(()=>l(),0);else if("proactive"===t){var e;let t=new URLSearchParams(window.location.search),i=null===(e=t.get("redirect"))||void 0===e?void 0:e.trim();if(i){y(),window.location.assign(i);return}y()}}catch(i){if((null==i?void 0:i.errCode)===3006){ee(!0);return}j>0&&(X(j),es&&localStorage.setItem(es,Date.now().toString()));let e=(null==i?void 0:i.errDesc)||(null==i?void 0:i.message)||S("verificationFailed");if(el&&(null==i?void 0:i.errCode)===1001&&e.includes("Daily BVN limit exceeded")&&(J(!0),ec)){let e=Date.now()+864e5;localStorage.setItem(ec,e.toString())}let t="bvn"===C?"nin":"bvn";b("confirm",{title:N("tips"),message:e,cancelButtonText:S("tryAgain"),confirmButtonText:"nin"===t?S("tryNin"):S("tryBvn"),onClose:ed,onSuccess:()=>{W(!0),eu(t)}},{layerZIndex:_.yl})}finally{M(!1)}}},ev=async()=>{Q(!0);try{let e=await (0,o.W)(),t=(el?e.BVN:e.IDV)||S("noTooltip");z(t)}catch(e){z(S("tooltipFailed"))}finally{Q(!1),O(!0)}},em="bvn"===C?S("dailyBvnLimit"):S("dailyNinLimit"),eh=async()=>{window.location.href=await (0,m.CJ)()},e_=(0,n.jsxs)("div",{className:c().tooltipWrapper,children:[(0,n.jsx)("button",{className:c().tooltipButton,onClick:()=>{q?O(!1):F?O(!0):ev()},children:"?"}),q&&(0,n.jsxs)("div",{className:c().tooltipBox,children:[(0,n.jsx)("div",{className:c().tooltipArrowOuter,children:(0,n.jsx)("div",{className:c().tooltipArrowInner})}),Z?(0,n.jsx)("p",{children:N("loading")}):F.split("\n").map((e,t)=>(0,n.jsx)("p",{children:e.trim()},t))]})]});return(0,n.jsxs)("div",{className:c().container,children:[(0,n.jsx)(s.default,{title:S("title"),leftButtonType:"back",onLeftClick:()=>y()}),(0,n.jsxs)("div",{className:c().formWrapper,children:[!el&&(0,n.jsx)("p",{className:c().topDesc,children:S("riskSecurityDesc")}),(!el||U)&&(0,n.jsxs)("div",{className:c().switchRow,children:[er&&(0,n.jsx)("button",{className:"".concat(c().switchBtn," ").concat("nin"===C?c().switchActive:c().switchInactive),onClick:()=>eu("nin"),children:"NIN"}),(0,n.jsx)("button",{className:"".concat(c().switchBtn," ").concat("bvn"===C?c().switchActive:c().switchInactive),onClick:()=>eu("bvn"),children:"BVN"})]}),el&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("label",{className:c().label,children:N("firstName")}),(0,n.jsx)("input",{type:"text",value:B,onChange:e=>R(e.target.value.replace(/[^A-Za-z]/g,"").slice(0,40)),placeholder:S("enterFirstName"),maxLength:40,inputMode:"text",autoCapitalize:"words",className:c().input}),H.firstName&&(0,n.jsx)("p",{className:c().errorText,children:H.firstName}),(0,n.jsx)("label",{className:c().label,children:N("lastName")}),(0,n.jsx)("input",{type:"text",value:D,onChange:e=>V(e.target.value.replace(/[^A-Za-z]/g,"").slice(0,40)),placeholder:S("enterLastName"),maxLength:40,inputMode:"text",autoCapitalize:"words",className:c().input}),H.lastName&&(0,n.jsx)("p",{className:c().errorText,children:H.lastName})]}),el&&(0,n.jsx)("label",{className:c().label,children:"BVN"}),(0,n.jsx)("input",{type:"tel",value:E,onChange:e=>k(e.target.value.replace(/\D/g,"").slice(0,11)),placeholder:"bvn"===C?S("enterBvnPlaceholder"):S("enterNinPlaceholder"),className:"".concat(c().input," ").concat(el?"":c().inputSmallPlaceholder)}),H.idNumber&&(0,n.jsx)("p",{className:c().errorText,children:H.idNumber}),el?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:c().descRow,children:[(0,n.jsx)("p",{className:c().desc,children:S("nameOnlyDesc")}),e_]}),er&&(0,n.jsxs)("p",{className:c().desc,children:[S("validIdDescPrefix"),(0,n.jsxs)("span",{className:c().descHighlight,children:[" ",
1S("validIdDescHighlight")]}),", ",S("validIdDescSuffix")]})]}):(0,n.jsxs)("div",{className:c().descRow,children:[(0,n.jsxs)("p",{className:c().desc,children:[S("validIdDescPrefix"),(0,n.jsxs)("span",{className:c().descHighlight,children:[" ",S("validIdDescHighlight")]}),", ",S("validIdDescSuffix")]}),e_]}),G&&el?(0,n.jsx)("p",{className:c().limitText,children:em}):(0,n.jsx)("button",{className:c().verifyButton,onClick:ef,disabled:L||K>0,children:L?N("loading"):K>0?"".concat(N("next"),"ï¼").concat(K,"sï¼"):N("next")}),(0,n.jsx)("span",{className:c().customerServiceLink,onClick:eh,children:N("customerService")})]}),$&&(0,n.jsx)("div",{className:c().dialogOverlay,children:(0,n.jsxs)("div",{className:c().dialogBox,children:[(0,n.jsx)("h3",{className:c().dialogTitle,children:N("tips")}),(0,n.jsx)("span",{className:c().dialogMessage,children:S("underageMessage")}),(0,n.jsx)("button",{className:c().dialogButton,onClick:()=>{ee(!1),y()},children:N("confirm")})]})})]})}},52509:function(e,t,i){"use strict";i.d(t,{A9:function(){return c},Gy:function(){return u},a9:function(){return o},ls:function(){return l},p0:function(){return s}});var n=i(13730),a=i(89917),r=i(45227);async function l(e){let t="".concat(n.l.API_BASE_URL,"/uc/v1/kyc/nin"),i=a.v.Instance.Http.generateAuthHeaders({method:"post",url:t,appSecret:n.l.APPSECRET,appId:n.l.APPID}),r=await a.v.Instance.Http.HttpReq("post",t,e,i);if(0!==r.errCode)throw r;return r.data}async function c(e){let t="".concat(n.l.API_BASE_URL,"/uc/v2/kyc/enhanced/bvn"),i=a.v.Instance.Http.generateAuthHeaders({method:"post",url:t,appSecret:n.l.APPSECRET,appId:n.l.APPID}),r=await a.v.Instance.Http.HttpReq("post",t,{bvn:e},i);if(0!==r.errCode)throw r;return r.data}async function s(e){let t="".concat(n.l.API_BASE_URL,"/uc/v2/kyc/enhanced/nin"),i=a.v.Instance.Http.generateAuthHeaders({method:"post",url:t,appSecret:n.l.APPSECRET,appId:n.l.APPID}),r=await a.v.Instance.Http.HttpReq("post",t,{nin:e},i);if(0!==r.errCode)throw r;return r.data}async function o(e){let t="".concat(n.l.API_BASE_URL,"/finance/easeid/face/verify"),i=(0,r.RH)(window.location.origin,e),l=a.v.Instance.Http.generateAuthHeaders({method:"post",url:t,appSecret:n.l.APPSECRET,appId:n.l.APPID}),c=await a.v.Instance.Http.HttpReq("post",t,{redirectUrl:i},l);if(0!==c.errCode)throw c;return c.data}async function u(e,t){let i=new URLSearchParams({transactionId:e,result:t}).toString(),r="".concat(n.l.API_BASE_URL,"/finance/easeid/face/verify/notify?").concat(i),l=a.v.Instance.Http.generateAuthHeaders({method:"get",url:r,appSecret:n.l.APPSECRET,appId:n.l.APPID}),c=await a.v.Instance.Http.HttpReq("get",r,void 0,l);if(0!==c.errCode)throw c;return c}},45227:function(e,t,i){"use strict";i.d(t,{Nj:function(){return p},RH:function(){return s},_T:function(){return u},j2:function(){return n},wy:function(){return o},xU:function(){return d},zd:function(){return c}});let n="waje:liveness:start",a=e=>e&&"object"==typeof e&&!Array.isArray(e)?e:null,r=(e,t)=>e.origin===t.expectedOrigin&&e.source===t.expectedSource,l=e=>{try{let t=new URL(e);return"https:"===t.protocol&&("easeid.ai"===t.hostname||t.hostname.endsWith(".easeid.ai"))}catch(e){return!1}},c=e=>l(e)?"camera ".concat(new URL(e).origin):"camera 'none'",s=(e,t)=>{let i=new URL("/liveness",e);return i.searchParams.set("attemptId",t),i.toString()},o=(e,t)=>{if(!r(e,t))return!1;let i=a(e.data);return(null==i?void 0:i.type)==="waje:liveness:ready"&&i.attemptId===t.expectedAttemptId},u=(e,t)=>{if(!r(e,t))return null;let i=a(e.data),n=null==i?void 0:i.result;return(null==i?void 0:i.type)==="waje:liveness:result"&&i.attemptId===t.expectedAttemptId&&"string"==typeof i.transactionId&&i.transactionId.trim()&&("success"===n||"cancel"===n)?{attemptId:i.attemptId,transactionId:i.transactionId,result:n}:null},d=(e,t)=>e.handledAttemptId!==t&&(e.handledAttemptId=t,!0),p=async(e,t)=>{try{let i=await t.notify(e.transactionId,e.result);if("success"===e.result){await t.onSuccess(i);return}await t.onCancel()}catch(e){if(!t.onError)throw e;await t.onError(e)}finally{var i;await (null===(i=t.onSettled)||void 0===i?void 0:i.call(t))}}},68178:function(e){e.exports={container:"IdentityVerification_container__Hf4CZ",formWrapper:"IdentityVerification_formWrapper__THYbH",topDesc:"IdentityVerification_topDesc__p7u58",switchRow:"IdentityVerification_switchRow__WNl3S",switchBtn:"IdentityVerification_switchBtn__597Ky",switchActive:"IdentityVerification_switchActive__LPsM8",switchInactive:"IdentityVerification_switchInactive__23XFu",label:"IdentityVerification_label__f2Lbu",input:"IdentityVerification_input__N_57S",inputSmallPlaceholder:"IdentityVerification_inputSmallPlaceholder__Direv",desc:"IdentityVerification_desc__GcyTp",descRow:"IdentityVerification_descRow__y_Czh",de
1scHighlight:"IdentityVerification_descHighlight__L_FI0",tooltipWrapper:"IdentityVerification_tooltipWrapper__gdFEt",tooltipButton:"IdentityVerification_tooltipButton__4vkL6",tooltipBox:"IdentityVerification_tooltipBox__KaORR",tooltipArrowOuter:"IdentityVerification_tooltipArrowOuter__MW_rx",tooltipArrowInner:"IdentityVerification_tooltipArrowInner__Dzoj4",verifyButton:"IdentityVerification_verifyButton__ts0eo",errorText:"IdentityVerification_errorText__o70W_",limitText:"IdentityVerification_limitText__BFSqs",customerServiceLink:"IdentityVerification_customerServiceLink__o7iwE",dialogOverlay:"IdentityVerification_dialogOverlay__rGsPl",dialogBox:"IdentityVerification_dialogBox__JShSE",dialogTitle:"IdentityVerification_dialogTitle__u1v_Q",dialogMessage:"IdentityVerification_dialogMessage__z9qQo",dialogButton:"IdentityVerification_dialogButton__2bC9L"}}}]);
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.