PageSourceSearch

https://credito365.co/frontend-assets/64.4ae188af894094efaf53.js

js credito365.co collected 2026-10-01 23:50:53 UTC 7,293 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[64],{62064:function(e,r,t){t.r(r);var n=t(11504),o=t(44680),i=t(83600),c=t(62980),a=t(19422),s=t(35724),u=t(2520),l=t(13608);function f(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}const p="Unico Liveness",d=4e3;r.default=e=>{let{btnText:r,typeFile:t,setCameraAccessErrorNotification:b,goForwards:y,setUploadError:m,stepType:v=s.MN.REGISTRATION,handleSkipStep:g,hideSkip:E,onRequireCamera:w,gtmEventName:h,onVerifyIdentityClick:O}=e;const C=(0,o.w1)((e=>e.user.userInfo?.["service_setting.liveness_fake_mode"])),{completeAttempt:k,declineAttempt:j,reportWidgetFailure:N,refreshUserInfo:D}=(0,u.C)({logContext:p,typeFile:t,goForwards:y,gtmEventName:h,setUploadError:m,setCameraAccessErrorNotification:b,onRequireCamera:w}),[A,I]=(0,n.useState)(!1),P=(0,n.useRef)(null),S=(0,n.useRef)(0),R=(0,n.useRef)(!1),T=(0,n.useRef)(0),U=(0,n.useRef)(!1),F=(0,n.useRef)(!1),_=(0,n.useCallback)((()=>{U.current&&(U.current=!1,i.yZ.close())}),[]),L=(0,n.useCallback)(((e,r)=>{c.oR(e,r).catch((t=>{c.uE(p,"Failed to record the abort",{processId:e,reason:r,error:String(t)})}))}),[]),V=(0,n.useCallback)((()=>{P.current&&(clearTimeout(P.current),P.current=null)}),[]);(0,n.useEffect)((()=>()=>{R.current=!0,V(),_()}),[V,_]);const q=(0,n.useCallback)((e=>{R.current||(R.current=!0,V(),_(),I(!1),D(),e())}),[V,_,D]),B=(0,n.useCallback)((async e=>{if(R.current)return;let r;V();try{r=await c.Sq(e),T.current=0}catch(r){T.current+=1;const t=T.current>=3;if(R.current)return;return!t&&Date.now()<S.current?(c.uE(p,"Result poll failed, retrying",{processId:e,error:String(r),attempt:T.current}),void(P.current=setTimeout((()=>B(e)),d))):void q((()=>{L(e,s.cH.ABANDONED),j("getResult request failed",{processId:e,error:String(r)})}))}if(R.current)return;if(!r.body?.process?.finished)return Date.now()>=S.current?void q((()=>{L(e,s.cH.ABANDONED),N("unico_journey_timeout",`process ${e} never finished`),m(!0)})):void(P.current=setTimeout((()=>B(e)),d));const t=v===s.MN.VERIFICATION?r.body?.liveness?.verification?.[s.oT.selfieUnico]:r.body?.liveness?.registration?.[s.oT.selfieUnico];q((()=>{t?.file_id&&t?.is_pass?Promise.resolve(k()).catch((r=>{j("Completing the attempt failed",{processId:e,error:String(r)})})):j("Verification failed",{processId:e,result:r.body?.process?.result,livenessRow:t,stepType:v})}))}),[v,q,V,L,k,j,N,m]),M=(0,n.useCallback)((e=>{T.current=0,S.current=Date.now()+9e5,P.current=setTimeout((()=>B(e)),d)}),[B]);return n.createElement("div",null,n.createElement(a.q,{label:r,onClick:async()=>{if(!A){O?.(),I(!0),R.current=!1,F.current=!1;try{const e=await c.Wm(),{processId:r,token:t,environment:n}=e.body||{};if(!r)throw new Error("process response is incomplete");if(!Boolean(C)||"off"===C){if(!t)throw new Error("process response carries no journey token");await i.yZ.init(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?f(Object(t),!0).forEach((function(r){var n,o,i,c;n=e,o=r,i=t[r],(o="symbol"==typeof(c=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o))?c:String(c))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({type:"IFRAME",token:t},n?{env:n}:{})),U.current=!0,i.yZ.open({transactionId:r,token:t,onFinish:()=>{F.current=!0,B(r)},onWidgetVisibilityChange:e=>{!1===e&&U.current&&!F.current&&!R.current&&q((()=>L(r,s.cH.CANCELLED)))}})}M(r)}catch(e){I(!1),c.uE(p,"Failed to open the journey",{error:String(e)}),N("unico_open_failed",String(e)),m(!0)}}},loading:A}),!E&&n.createElement(l.c,{onClick:g}))}},2520:function(e,r,t){t.d(r,{C:function(){return p}});var n=t(11504),o=t(44680),i=t(62980),c=t(44840),a=t(5336),s=t(50904),u=t(62428);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};
1r%2?l(Object(t),!0).forEach((function(r){var n,o,i,c;n=e,o=r,i=t[r],(o="symbol"==typeof(c=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o))?c:String(c))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const p=e=>{let{logContext:r,typeFile:t,goForwards:l,gtmEventName:p,setUploadError:d,setCameraAccessErrorNotification:b,onRequireCamera:y}=e;const m=(0,o.w1)((e=>e.user.userInfo.id)),v=(0,o.w1)(a.Cw).get().verificationPhoto,g=(0,n.useCallback)((e=>t=>{i.uE(r,e,{error:String(t)})}),[r]),E=(0,n.useCallback)((()=>i.Yr().then((e=>c.Y9(f({},e.body)))).catch(g("userInfo refetch failed"))),[g]),w=(0,n.useCallback)(((e,r)=>i.M$(e,r).then(E).catch(g("widget failure report failed"))),[E,g]),h=(0,n.useCallback)((async()=>{const e=await i.Gg();c.IV({documents:f({},e.body)}),p&&(0,s.wH)({event:p,uid:m}),l()}),[p,l,m]),O=(0,n.useCallback)(((e,n)=>{i.uE(r,e,n),c.Eh({[t]:{status:!1,error:v.error.declined}}),d(!0)}),[r,t,v,d]),C=(0,n.useCallback)((()=>{b?b(!0):y?.()}),[b,y]),k=(0,n.useCallback)((async()=>await(0,u.Uf)()===u.ey.GRANTED||(y?y():b?.(!0),!1)),[y,b]);return{locale:v,userId:m,claimCamera:k,completeAttempt:h,declineAttempt:O,reportCameraTrouble:C,reportWidgetFailure:w,refreshUserInfo:E}}},13608:function(e,r,t){var n=t(11504),o=t(44680),i=t(5336);r.c=e=>{let{onClick:r,disabled:t,type:c="button",className:a=""}=e;const s=(0,o.w1)(i.Cw).get("verificationPhoto");return n.createElement("div",{className:"skip-button"},n.createElement("button",{className:`skip-button__item ${a}`,disabled:t,type:c,onClick:r},s.skipStep))}},62428:function(e,r,t){t.d(r,{Uf:function(){return c},ey:function(){return n},o1:function(){return i},wo:function(){return o}});const n={GRANTED:"granted",DENIED:"denied",UNAVAILABLE:"unavailable"},o=["NotAllowedError","SecurityError","PermissionDeniedError"],i=[...o,"NotFoundError","NotReadableError","AbortError","OverconstrainedError"],c=async()=>{if(!navigator?.mediaDevices?.getUserMedia)return n.UNAVAILABLE;const e=await(navigator.permissions?.query({name:"camera"}).catch((()=>null)));if(e?.state===n.DENIED)return n.DENIED;let r=null;try{return r=await navigator.mediaDevices.getUserMedia({video:!0}),n.GRANTED}catch(e){return o.includes(e?.name)?n.DENIED:n.UNAVAILABLE}finally{r?.getTracks().forEach((e=>e.stop()))}}}}]);

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.