@tsocial/tvweb-sdk.platform 5.38.0 → 5.38.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/{chunk-ea3e887a.js → chunk-0319b1ae.js} +1 -1
- package/build/esm/{chunk-9dc0cea1.js → chunk-036bae4b.js} +1 -1
- package/build/esm/{chunk-5bf40c32.js → chunk-2118775a.js} +1 -1
- package/build/esm/{chunk-e3a6d0e1.js → chunk-2b4d00a3.js} +1 -1
- package/build/esm/{chunk-a29458dd.js → chunk-30dc9915.js} +1 -1
- package/build/esm/{chunk-cd682b2a.js → chunk-3aa490f8.js} +31 -12
- package/build/esm/{chunk-6403a363.js → chunk-3b109c2f.js} +1 -1
- package/build/esm/{chunk-3651423b.js → chunk-409b3310.js} +1 -1
- package/build/esm/{chunk-c2460656.js → chunk-48199d95.js} +1 -1
- package/build/esm/chunk-51b3fd2d.js +1 -0
- package/build/esm/{chunk-f8c82e58.js → chunk-6e5358d6.js} +1 -1
- package/build/esm/{chunk-d7eaf08c.js → chunk-71508ce2.js} +1 -1
- package/build/esm/chunk-71ff4107.js +1 -0
- package/build/esm/{chunk-1112d165.js → chunk-7618f5a4.js} +1 -1
- package/build/esm/{chunk-5c8a597a.js → chunk-7fa83a52.js} +1 -1
- package/build/esm/{chunk-3bcee399.js → chunk-88ec0901.js} +1 -1
- package/build/esm/{chunk-37ce53f0.js → chunk-91b54c2c.js} +1 -1
- package/build/esm/{chunk-ea24344b.js → chunk-c747321c.js} +29 -10
- package/build/esm/{chunk-6a1588d6.js → chunk-d7bc8179.js} +1 -1
- package/build/esm/{chunk-a0e4f0a1.js → chunk-da8ef78b.js} +1 -1
- package/build/esm/{chunk-ace19f26.js → chunk-ddb14dfb.js} +1 -1
- package/build/esm/{chunk-56594045.js → chunk-e5a92416.js} +1 -1
- package/build/esm/tvweb-sdk.platform.esm.min.js +1 -1
- package/build/tvweb-sdk.platform.cjs.min.js +92 -54
- package/build/tvweb-sdk.platform.standalone.js +235 -182
- package/build/tvweb-sdk.platform.standalone.min.js +89 -51
- package/package.json +5 -5
- package/build/esm/chunk-ba374b19.js +0 -1
- package/build/esm/chunk-f5771baf.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as r,U as s,r as a,m as n,c as t,s as o,j as i,a4 as c,az as l,b as u,P as p,k as m}from"./chunk-
|
|
1
|
+
import{A as e,C as r,U as s,r as a,m as n,c as t,s as o,j as i,a4 as c,az as l,b as u,P as p,k as m}from"./chunk-c747321c.js";import{p as d,g as f,S as h,a as g,O as C,C as j,E as y,b as D,B as F,c as x,L as S}from"./chunk-88ec0901.js";import{u as b,C as k}from"./chunk-409b3310.js";import{M as I,O as T,W as E,C as R}from"./chunk-da8ef78b.js";import{D as L}from"./chunk-2b4d00a3.js";import{u as v}from"./chunk-51b3fd2d.js";import"./chunk-036bae4b.js";import"./chunk-ddb14dfb.js";import"./chunk-6e5358d6.js";let P=m.isMobile?{width:{ideal:640}}:null;function A(p){let{apiCheck:m,onLivenessDetectionDone:L,captureFrameSettings:A,onFramesCaptured:M,frontCamera:H,flipVideoHorizontal:O,customDirectionIcon:U,customStepTimeConstraints:w,onProcessing:V,customErrors:$,apiCredentials:_,outputEncryptionSettings:B,cameraScale:K,defaultCameraId:N,passiveModeAuto:z,offsetFaceY:G,styledComponent:Y,serviceSettings:W,onReset:q,isLoading:J}=p,Q=e(),{onErrorCallback:X,onCloseCallback:Z}=v(),ee=r.useAsset("bg_camera_mask.png"),er=r.useAsset("bg_camera_mask_red.png"),es=s("IDCapturing.loadingIcon.src","ic_loading.gif"),[ea,en]=a.useState({}),{yFaceDetectionError:et,yFaceVerificationStepsWrapper:eo}=ea,[ei,ec]=a.useState(""),[el,eu]=a.useState(),ep=a.useMemo(()=>({backgroundColor:n("Selfie.backgroundColor")({theme:Q})}),[Q]),em=a.useCallback(({lostY:e,height:r,clientHeight:s})=>{let a=e+25,n=a+30;en({yFaceDetectionError:a,yFaceVerificationStepsWrapper:n+r+20});let t=Math.floor(e),o=Math.floor(s-e),i=Math.floor(n);return 0!==G&&(i+G<t||i+G+r>o)?X({code:`offsetFaceY must be in [-${i-t}, ${o-r-i}]`}):i+=G,{y:i}},[G,X]),{shouldResetFlowOnOrientationChange:ed,countdownToTakePicture:ef,cropArea:eh,curStepIndex:eg,faceDetectionError:eC,resetFlow:ej,handleTriggerPassiveMode:ey,handleVideoPlayed:eD,refVideo:eF,showCountdown:ex,steps:eS,refIsReseting:eb,videoPlayed:ek,warmupDone:eI,showCaptureButton:eT,shouldShowCountdown:eE,showLoading:eR}=b({currentOrientation:el,apiCheck:m,bgCameraMask:ee,bgCameraMaskRed:er,surroundStyle:ep,onLivenessDetectionDone:L,onError:X,cropAreaDimension:em,customDirectionIcon:U,captureFrameSettings:A,onFramesCaptured:M,setRemainingTime:ec,customStepTimeConstraints:w,onProcessing:V,customErrors:$,apiCredentials:_,outputEncryptionSettings:B,cameraScale:K,passiveModeAuto:z,serviceSettings:W,onReset:q});a.useEffect(()=>{"string"==typeof eS[0]?.directionIcon&&Promise.all(eS.map(e=>d(e.directionIcon)))},[eS]);let{CloseCameraButton:eL}=Y,ev=f(p,Q),eP=eb.current?0:eg/eS.length*100,{lang:eA}=t.useSDKSettings(),eM=a.useRef(0),eH=a.useRef({}),eO=a.useRef(o.ErrorDuration.SHORT),eU=a.useMemo(()=>{let{msg:e,duration:r=o.ErrorDuration.SHORT}=eC||{},s=e?.[eA];return Date.now()-eM.current>=eO.current&&(eM.current=Date.now(),eO.current=r,eH.current=s),eH.current},[eC,eg]),ew=a.useCallback(e=>{eu(e),ed?ej():e===I.LANDSCAPE?eF.current?.pause():eF.current?.play()},[eF,ej,ed]);return i.jsx(T,{onOrientationChange:ew,children:i.jsxs(c,{frontCamera:H,onVideoPlayed:eD,onClose:Z,flipHorizontal:O??H,ref:eF,videoSettings:P,onError:X,scale:K,defaultCameraId:N,closeButton:eL||i.jsx(l,{}),children:[!eI&&i.jsx(E,{}),ek?i.jsxs(i.Fragment,{children:["string"==typeof eU?i.jsx(h,{top:et-15,className:"face-detection-error",children:eU}):null,eh.current?i.jsxs(R,{x:`${eh.current.x}px`,y:`${eh.current.y}px`,width:`${eh.current.width}px`,height:`${eh.current.height}px`,surroundStyle:eh.current.surroundStyle,children:[i.jsx(g,{}),i.jsx(C,{...ev,progress:eP,showErrorRing:!!eC&&n("Selfie.progressCircle.showErrorRing")({theme:Q})}),eE?i.jsx(j,{children:ef}):null,eC&&i.jsx(y,{})]}):null,ei&&i.jsx(D,{top:eo-30,children:ei}),eT?i.jsx(F,{children:i.jsx(x,{onClick:ey,disabled:ex,children:u(Q,"Selfie.captureIcon.src")?i.jsx("img",{src:u(Q,"Selfie.captureIcon.src"),alt:""}):i.jsx(k,{fillColor:"rgba(193, 197, 204, 1)"})})}):null]}):null,(eR||J)&&i.jsx(S,{children:i.jsx("img",{src:es,alt:""})})]})})}A.propTypes={apiCheck:p.bool,mode:p.string,onLivenessDetectionDone:p.func,onClose:p.func,onError:p.func,onReset:p.func,captureFrameSettings:p.shape({}),onFramesCaptured:p.func,frontCamera:p.bool,isLoading:p.bool,flipVideoHorizontal:p.bool,customDirectionIcon:p.shape({}),customStepTimeConstraints:p.shape({}),onProcessing:p.func,customErrors:p.shape({}),apiCredentials:p.shape({accessKey:p.string,secretKey:p.string,apiUrl:p.string}),outputEncryptionSettings:p.shape({}),cameraScale:p.number,defaultCameraId:p.string,passiveModeAuto:p.bool,offsetFaceY:p.number,styledComponent:p.shape({CloseCameraButton:p.node}),serviceSettings:p.shape({})},A.defaultProps={apiCheck:!1,mode:null,onLivenessDetectionDone:null,onClose:null,onError:()=>{},onReset:()=>{},captureFrameSettings:{enable:!1,framesIntervalTime:180,framesBatchLength:0},onFramesCaptured:()=>{},frontCamera:!0,isLoading:!1,flipVideoHorizontal:null,customDirectionIcon:{[o.FaceDirection.LEFT]:i.jsx(L,{type:o.FaceDirection.LEFT}),[o.FaceDirection.RIGHT]:i.jsx(L,{type:o.FaceDirection.RIGHT}),[o.FaceDirection.UP]:i.jsx(L,{type:o.FaceDirection.UP}),[o.FaceDirection.FRONTAL]:i.jsx(L,{type:o.FaceDirection.FRONTAL})},customStepTimeConstraints:{[o.FaceDirection.UP]:{delayTime:0},[o.FaceDirection.LEFT]:{delayTime:0},[o.FaceDirection.RIGHT]:{delayTime:0},[o.FaceDirection.FRONTAL]:{delayTime:2e3}},onProcessing:()=>{},customErrors:null,apiCredentials:{accessKey:"",secretKey:"",apiUrl:""},outputEncryptionSettings:null,cameraScale:1,defaultCameraId:void 0,passiveModeAuto:!1,offsetFaceY:0,styledComponent:{CloseCameraButton:null},serviceSettings:{enableUploadFrames:!0,enableUploadImages:!0,enableVerifySanityPortrait:!0,enableVerifySanityIDCard:!0,enableVerifyFaceLiveness:!0,enableDetectIDCardTampering:!0,enableReadIDCardInfo:!0}};export{A as default};
|