react-native-timacare 3.3.37 → 3.3.39

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.
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LivenessV2=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _reactNativeCircularProgressIndicator=_interopRequireDefault(require("react-native-circular-progress-indicator"));var _reactNativeFs=_interopRequireDefault(require("react-native-fs"));var _reactNativePermissions=require("react-native-permissions");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _reactNativeVisionCamera=require("react-native-vision-camera");var _LivenessStore=_interopRequireDefault(require("../liveness/LivenessStore"));var _CommonStyles=require("../CommonStyles");var _navigation=require("../../navigation");var _theme=require("../../theme");var _reactNativeCreateThumbnail=require("react-native-create-thumbnail");var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/liveness-v2/index.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}var _Dimensions$get=_reactNative.Dimensions.get('window'),windowWidth=_Dimensions$get.width;var PREVIEW_SIZE=320;var PREVIEW_RECT={minX:(windowWidth-PREVIEW_SIZE)/2,minY:240,width:PREVIEW_SIZE,height:PREVIEW_SIZE};var LivenessV2=exports.LivenessV2=(0,_mobxReactLite.observer)(function LivenessV2(props){var _props$route$params,_this=this;var loan=(_props$route$params=props.route.params)==null?void 0:_props$route$params.loan;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var cameraRef=(0,_react.useRef)(null);var interval=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var device=(0,_reactNativeVisionCamera.useCameraDevice)('front');var renderHint=function renderHint(key){switch(key){case'blink':return'Nhắm mắt trong 3 giây';case'right':return'Quay sang phải 3 giây';case'left':return'Quay sang trái 3 giây';case'up':return'Nhìn lên trên 3 giây';case'down':return'Nhìn xuống dưới 3 giây';case'mouth':return'Há miệng trong 3 giây';default:return'';}};var renderImg=function renderImg(key){switch(key){case'blink':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/blink.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:80,columnNumber:11}});case'right':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/right.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:92,columnNumber:11}});case'left':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/left.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:104,columnNumber:11}});case'up':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/up.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:116,columnNumber:11}});case'down':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/down.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:11}});case'mouth':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/mouth.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:140,columnNumber:11}});default:return _react.default.createElement(_react.default.Fragment,null);}};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};var second=3;var start=function start(){_requestPermissions();_LivenessStore.default.getListAction(function(){if(passPermission){interval.current=setInterval(function(){second--;if(second===0){clearInterval(interval.current);startLiveness();}},1000);}});};var extractFramesFromVideo=function _callee(videoPath){var thumbnails,numFrames,i,time,result,base64,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;thumbnails=[];numFrames=3;i=0;case 1:if(!(i<numFrames)){_context.next=5;break;}time=i*300;_context.next=2;return _regenerator.default.awrap((0,_reactNativeCreateThumbnail.createThumbnail)({url:videoPath,timeStamp:time}));case 2:result=_context.sent;console.log("Thumbnail at "+time+"ms: ",result.path);_context.next=3;return _regenerator.default.awrap(_reactNativeFs.default.readFile(result.path,'base64'));case 3:base64=_context.sent;thumbnails.push(base64);case 4:i++;_context.next=1;break;case 5:return _context.abrupt("return",thumbnails);case 6:_context.prev=6;_t=_context["catch"](0);setIsLoading(false);console.log(_t,'LỖI');_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 7:case"end":return _context.stop();}},null,null,[[0,6]],Promise);};(0,_react.useEffect)(function(){start();},[passPermission]);var uploadLiveness=function _callee2(template){var _t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:setIsLoading(true);_context2.prev=1;if(!((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6||(loan==null?void 0:loan.typeLoan)===4)){_context2.next=3;break;}_context2.next=2;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness2(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 2:_context2.next=4;break;case 3:_context2.next=4;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 4:_context2.next=6;break;case 5:_context2.prev=5;_t2=_context2["catch"](1);setIsLoading(false);console.log(_t2);case 6:case"end":return _context2.stop();}},null,null,[[1,5]],Promise);};var startLiveness=function _callee3(){var data,thump;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_LivenessStore.default.ekycSuccess=false;if(!(_LivenessStore.default.listAction.length===0)){_context3.next=1;break;}_LivenessStore.default.ekycSuccess=true;_LivenessStore.default.saveLiveness(loan.id);return _context3.abrupt("return");case 1:if(!cameraRef.current){_context3.next=5;break;}_context3.next=2;return _regenerator.default.awrap(new Promise(function(resolve,reject){var stopped=false;var timeout=setTimeout(function(){if(!stopped){var _cameraRef$current;stopped=true;(_cameraRef$current=cameraRef.current)==null?void 0:_cameraRef$current.stopRecording();}},3500);cameraRef.current.startRecording({fileType:'mp4',videoCodec:_reactNative.Platform.OS==='ios'?'h264':undefined,onRecordingFinished:function onRecordingFinished(video){clearTimeout(timeout);resolve(video);},onRecordingError:function onRecordingError(error){clearTimeout(timeout);reject(error);}});}));case 2:data=_context3.sent;if(!data.path){_context3.next=4;break;}setIsLoading(true);_context3.next=3;return _regenerator.default.awrap(extractFramesFromVideo(_reactNative.Platform.OS==='ios'?data.path:'file://'+data.path));case 3:thump=_context3.sent;if(thump.length>0){uploadLiveness(thump);}_context3.next=5;break;case 4:_reactNative.Alert.alert('Thông báo','Quá trình xác thực thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 5:case"end":return _context3.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){var trackingEvent=function _callee4(){return _regenerator.default.async(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_started',{event:'ekyc_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_started');case 2:case"end":return _context4.stop();}},null,null,null,Promise);};trackingEvent();},[]);return _react.default.createElement(_reactNative.View,{style:styles.container,__self:this,__source:{fileName:_jsxFileName,lineNumber:384,columnNumber:5}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:16,top:insets.top+16,width:40,height:40,zIndex:1000},__self:this,__source:{fileName:_jsxFileName,lineNumber:385,columnNumber:7}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:398,columnNumber:9}})),_react.default.createElement(_reactNative.View,{style:[{top:insets.top+16},styles.topOverlay],__self:this,__source:{fileName:_jsxFileName,lineNumber:400,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'white',fontWeight:'600',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:401,columnNumber:9}},"X\xE1c th\u1EF1c khu\xF4n m\u1EB7t"),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:410,columnNumber:9}},function(){return _react.default.createElement(_react.default.Fragment,null,isLoading?_react.default.createElement(_reactNative.View,{style:{marginTop:24},__self:_this,__source:{fileName:_jsxFileName,lineNumber:414,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,color:'white'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:415,columnNumber:19}},"\u0110ang x\xE1c th\u1EF1c"),_react.default.createElement(_reactNative.ActivityIndicator,{size:'large',color:'white',style:{marginTop:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:424,columnNumber:19}})):_react.default.createElement(_react.default.Fragment,null));})),_react.default.createElement(_reactNative.View,{style:styles.preview,__self:this,__source:{fileName:_jsxFileName,lineNumber:438,columnNumber:7}},passPermission&&device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:cameraRef,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:true,video:true,audio:false,__self:this,__source:{fileName:_jsxFileName,lineNumber:440,columnNumber:11}}):null,_react.default.createElement(_reactNative.View,{style:{height:'100%',width:'100%',justifyContent:'center',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:449,columnNumber:9}},renderImg(_LivenessStore.default.hintAction),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,marginTop:8,fontWeight:'400'},__self:this,__source:{fileName:_jsxFileName,lineNumber:458,columnNumber:11}},renderHint(_LivenessStore.default.hintAction)))),_react.default.createElement(_reactNative.View,{style:styles.circularProgress,__self:this,__source:{fileName:_jsxFileName,lineNumber:471,columnNumber:7}},_react.default.createElement(_reactNativeCircularProgressIndicator.default,{value:_LivenessStore.default.listAction.length===3?0:_LivenessStore.default.listAction.length===2?100/3:_LivenessStore.default.listAction.length===1?2/3*100:100,radius:PREVIEW_SIZE/2,inActiveStrokeOpacity:0.5,activeStrokeWidth:13,inActiveStrokeWidth:13,showProgressValue:false,activeStrokeColor:"#F05123",inActiveStrokeColor:"#F05123",duration:800,__self:this,__source:{fileName:_jsxFileName,lineNumber:472,columnNumber:9}})),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:492,columnNumber:7}},function(){return _react.default.createElement(_reactNative.View,{style:styles.bottomOverlay,__self:_this,__source:{fileName:_jsxFileName,lineNumber:494,columnNumber:11}},_react.default.createElement(_MText.MText,{style:styles.instructionText,__self:_this,__source:{fileName:_jsxFileName,lineNumber:495,columnNumber:13}},"Vui l\xF2ng \u0111i\u1EC1u ch\u1EC9nh khu\xF4n m\u1EB7t n\u1EB1m g\u1ECDn trong v\xF2ng tr\xF2n \u1EDF tr\xEAn"));}),_react.default.createElement(_reactNative.Modal,{visible:_LivenessStore.default.ekycSuccess,animationType:'fade',transparent:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:502,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'transparent',height:'100%'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:507,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'white',borderRadius:8,padding:16,marginHorizontal:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:514,columnNumber:11}},_react.default.createElement(_icons.IconEkyc,{__self:this,__source:{fileName:_jsxFileName,lineNumber:526,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{marginTop:16,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:527,columnNumber:13}},"Ch\xFAc m\u1EEBng b\u1EA1n \u0111\xE3 th\u1EF1c hi\u1EC7n x\xE1c th\u1EF1c kh\xE1ch h\xE0ng",'\n',"th\xE0nh c\xF4ng."),_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginTop:16,backgroundColor:_theme.color.primary,height:40,alignItems:'center',borderRadius:30,width:150,justifyContent:'center'},onPress:function _callee5(){return _regenerator.default.async(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_completed',{event:'ekyc_completed',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_completed');_LivenessStore.default.ekycSuccess=false;if((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.TTSSignLoan,params:{loan:loan}}]}));}else{navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}case 2:case"end":return _context5.stop();}},null,null,null,Promise);},__self:this,__source:{fileName:_jsxFileName,lineNumber:535,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:574,columnNumber:15}},"\u0110\u1ED3ng \xFD"))))));});var styles=_reactNative.StyleSheet.create({instructionText:{color:'white',fontSize:12,textAlign:'center',paddingHorizontal:50,marginTop:16},bottomOverlay:{marginTop:24},maskedView:{flex:1,flexDirection:'row',height:'100%'},maskWrapper:{backgroundColor:'transparent',flex:1,justifyContent:'center',alignItems:'center'},mask:{borderRadius:PREVIEW_SIZE/2,height:PREVIEW_SIZE-10,width:PREVIEW_SIZE-10,marginTop:PREVIEW_RECT.minY,alignSelf:'center'},container:{flex:1,flexDirection:'column',backgroundColor:'#333333'},topOverlay:{position:'absolute',right:0,left:0,justifyContent:'center',alignItems:'center'},captureFrame:{height:_reactNative.Dimensions.get('window').width-50,marginHorizontal:16,marginTop:'50%',borderRadius:50},preview:{width:PREVIEW_SIZE-29,height:PREVIEW_SIZE-28,marginTop:PREVIEW_RECT.minY+14,marginLeft:PREVIEW_RECT.minX+14,borderRadius:PREVIEW_SIZE/2,overflow:'hidden'},circularProgress:{width:PREVIEW_SIZE,height:PREVIEW_SIZE,marginTop:PREVIEW_RECT.minY,marginLeft:PREVIEW_RECT.minX,zIndex:100,position:'absolute',top:0,left:0,right:0}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LivenessV2=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _reactNativeCircularProgressIndicator=_interopRequireDefault(require("react-native-circular-progress-indicator"));var _reactNativeFs=_interopRequireDefault(require("react-native-fs"));var _reactNativePermissions=require("react-native-permissions");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _reactNativeVisionCamera=require("react-native-vision-camera");var _LivenessStore=_interopRequireDefault(require("../liveness/LivenessStore"));var _CommonStyles=require("../CommonStyles");var _navigation=require("../../navigation");var _theme=require("../../theme");var _reactNativeCreateThumbnail=require("react-native-create-thumbnail");var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/liveness-v2/index.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}var _Dimensions$get=_reactNative.Dimensions.get('window'),windowWidth=_Dimensions$get.width;var PREVIEW_SIZE=320;var PREVIEW_RECT={minX:(windowWidth-PREVIEW_SIZE)/2,minY:240,width:PREVIEW_SIZE,height:PREVIEW_SIZE};var LivenessV2=exports.LivenessV2=(0,_mobxReactLite.observer)(function LivenessV2(props){var _props$route$params,_this=this;var loan=(_props$route$params=props.route.params)==null?void 0:_props$route$params.loan;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var cameraRef=(0,_react.useRef)(null);var interval=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var device=(0,_reactNativeVisionCamera.useCameraDevice)('front');var renderHint=function renderHint(key){switch(key){case'blink':return'Nhắm mắt trong 3 giây';case'right':return'Quay sang trái 3 giây';case'left':return'Quay sang phải 3 giây';case'up':return'Nhìn lên trên 3 giây';case'down':return'Nhìn xuống dưới 3 giây';case'mouth':return'Há miệng trong 3 giây';default:return'';}};var renderImg=function renderImg(key){switch(key){case'blink':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/blink.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:80,columnNumber:11}});case'right':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/right.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:92,columnNumber:11}});case'left':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/left.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:104,columnNumber:11}});case'up':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/up.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:116,columnNumber:11}});case'down':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/down.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:11}});case'mouth':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/mouth.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:140,columnNumber:11}});default:return _react.default.createElement(_react.default.Fragment,null);}};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};var second=3;var start=function start(){_requestPermissions();_LivenessStore.default.getListAction(function(){if(passPermission){interval.current=setInterval(function(){second--;if(second===0){clearInterval(interval.current);startLiveness();}},1000);}});};var extractFramesFromVideo=function _callee(videoPath){var thumbnails,numFrames,i,time,result,base64,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;thumbnails=[];numFrames=3;i=0;case 1:if(!(i<numFrames)){_context.next=5;break;}time=i*300;_context.next=2;return _regenerator.default.awrap((0,_reactNativeCreateThumbnail.createThumbnail)({url:videoPath,timeStamp:time}));case 2:result=_context.sent;console.log("Thumbnail at "+time+"ms: ",result.path);_context.next=3;return _regenerator.default.awrap(_reactNativeFs.default.readFile(result.path,'base64'));case 3:base64=_context.sent;thumbnails.push(base64);case 4:i++;_context.next=1;break;case 5:return _context.abrupt("return",thumbnails);case 6:_context.prev=6;_t=_context["catch"](0);setIsLoading(false);console.log(_t,'LỖI');_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 7:case"end":return _context.stop();}},null,null,[[0,6]],Promise);};(0,_react.useEffect)(function(){start();},[passPermission]);var uploadLiveness=function _callee2(template){var _t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:setIsLoading(true);_context2.prev=1;if(!((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6||(loan==null?void 0:loan.typeLoan)===4)){_context2.next=3;break;}_context2.next=2;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness2(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 2:_context2.next=4;break;case 3:_context2.next=4;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 4:_context2.next=6;break;case 5:_context2.prev=5;_t2=_context2["catch"](1);setIsLoading(false);console.log(_t2);case 6:case"end":return _context2.stop();}},null,null,[[1,5]],Promise);};var startLiveness=function _callee3(){var data,thump;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_LivenessStore.default.ekycSuccess=false;if(!(_LivenessStore.default.listAction.length===0)){_context3.next=1;break;}_LivenessStore.default.ekycSuccess=true;_LivenessStore.default.saveLiveness(loan.id);return _context3.abrupt("return");case 1:if(!cameraRef.current){_context3.next=5;break;}_context3.next=2;return _regenerator.default.awrap(new Promise(function(resolve,reject){var stopped=false;var timeout=setTimeout(function(){if(!stopped){var _cameraRef$current;stopped=true;(_cameraRef$current=cameraRef.current)==null?void 0:_cameraRef$current.stopRecording();}},3500);cameraRef.current.startRecording({fileType:'mp4',videoCodec:_reactNative.Platform.OS==='ios'?'h264':undefined,onRecordingFinished:function onRecordingFinished(video){clearTimeout(timeout);resolve(video);},onRecordingError:function onRecordingError(error){clearTimeout(timeout);reject(error);}});}));case 2:data=_context3.sent;if(!data.path){_context3.next=4;break;}setIsLoading(true);_context3.next=3;return _regenerator.default.awrap(extractFramesFromVideo(_reactNative.Platform.OS==='ios'?data.path:'file://'+data.path));case 3:thump=_context3.sent;if(thump.length>0){uploadLiveness(thump);}_context3.next=5;break;case 4:_reactNative.Alert.alert('Thông báo','Quá trình xác thực thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 5:case"end":return _context3.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){var trackingEvent=function _callee4(){return _regenerator.default.async(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_started',{event:'ekyc_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_started');case 2:case"end":return _context4.stop();}},null,null,null,Promise);};trackingEvent();},[]);return _react.default.createElement(_reactNative.View,{style:styles.container,__self:this,__source:{fileName:_jsxFileName,lineNumber:384,columnNumber:5}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:16,top:insets.top+16,width:40,height:40,zIndex:1000},__self:this,__source:{fileName:_jsxFileName,lineNumber:385,columnNumber:7}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:398,columnNumber:9}})),_react.default.createElement(_reactNative.View,{style:[{top:insets.top+16},styles.topOverlay],__self:this,__source:{fileName:_jsxFileName,lineNumber:400,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'white',fontWeight:'600',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:401,columnNumber:9}},"X\xE1c th\u1EF1c khu\xF4n m\u1EB7t"),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:410,columnNumber:9}},function(){return _react.default.createElement(_react.default.Fragment,null,isLoading?_react.default.createElement(_reactNative.View,{style:{marginTop:24},__self:_this,__source:{fileName:_jsxFileName,lineNumber:414,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,color:'white'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:415,columnNumber:19}},"\u0110ang x\xE1c th\u1EF1c"),_react.default.createElement(_reactNative.ActivityIndicator,{size:'large',color:'white',style:{marginTop:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:424,columnNumber:19}})):_react.default.createElement(_react.default.Fragment,null));})),_react.default.createElement(_reactNative.View,{style:styles.preview,__self:this,__source:{fileName:_jsxFileName,lineNumber:438,columnNumber:7}},passPermission&&device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:cameraRef,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:true,video:true,audio:false,__self:this,__source:{fileName:_jsxFileName,lineNumber:440,columnNumber:11}}):null,_react.default.createElement(_reactNative.View,{style:{height:'100%',width:'100%',justifyContent:'center',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:449,columnNumber:9}},renderImg(_LivenessStore.default.hintAction),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,marginTop:8,fontWeight:'400'},__self:this,__source:{fileName:_jsxFileName,lineNumber:458,columnNumber:11}},renderHint(_LivenessStore.default.hintAction)))),_react.default.createElement(_reactNative.View,{style:styles.circularProgress,__self:this,__source:{fileName:_jsxFileName,lineNumber:471,columnNumber:7}},_react.default.createElement(_reactNativeCircularProgressIndicator.default,{value:_LivenessStore.default.listAction.length===3?0:_LivenessStore.default.listAction.length===2?100/3:_LivenessStore.default.listAction.length===1?2/3*100:100,radius:PREVIEW_SIZE/2,inActiveStrokeOpacity:0.5,activeStrokeWidth:13,inActiveStrokeWidth:13,showProgressValue:false,activeStrokeColor:"#F05123",inActiveStrokeColor:"#F05123",duration:800,__self:this,__source:{fileName:_jsxFileName,lineNumber:472,columnNumber:9}})),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:492,columnNumber:7}},function(){return _react.default.createElement(_reactNative.View,{style:styles.bottomOverlay,__self:_this,__source:{fileName:_jsxFileName,lineNumber:494,columnNumber:11}},_react.default.createElement(_MText.MText,{style:styles.instructionText,__self:_this,__source:{fileName:_jsxFileName,lineNumber:495,columnNumber:13}},"Vui l\xF2ng \u0111i\u1EC1u ch\u1EC9nh khu\xF4n m\u1EB7t n\u1EB1m g\u1ECDn trong v\xF2ng tr\xF2n \u1EDF tr\xEAn"));}),_react.default.createElement(_reactNative.Modal,{visible:_LivenessStore.default.ekycSuccess,animationType:'fade',transparent:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:502,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'transparent',height:'100%'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:507,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'white',borderRadius:8,padding:16,marginHorizontal:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:514,columnNumber:11}},_react.default.createElement(_icons.IconEkyc,{__self:this,__source:{fileName:_jsxFileName,lineNumber:526,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{marginTop:16,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:527,columnNumber:13}},"Ch\xFAc m\u1EEBng b\u1EA1n \u0111\xE3 th\u1EF1c hi\u1EC7n x\xE1c th\u1EF1c kh\xE1ch h\xE0ng",'\n',"th\xE0nh c\xF4ng."),_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginTop:16,backgroundColor:_theme.color.primary,height:40,alignItems:'center',borderRadius:30,width:150,justifyContent:'center'},onPress:function _callee5(){return _regenerator.default.async(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_completed',{event:'ekyc_completed',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_completed');_LivenessStore.default.ekycSuccess=false;if((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.TTSSignLoan,params:{loan:loan}}]}));}else{navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}case 2:case"end":return _context5.stop();}},null,null,null,Promise);},__self:this,__source:{fileName:_jsxFileName,lineNumber:535,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:574,columnNumber:15}},"\u0110\u1ED3ng \xFD"))))));});var styles=_reactNative.StyleSheet.create({instructionText:{color:'white',fontSize:12,textAlign:'center',paddingHorizontal:50,marginTop:16},bottomOverlay:{marginTop:24},maskedView:{flex:1,flexDirection:'row',height:'100%'},maskWrapper:{backgroundColor:'transparent',flex:1,justifyContent:'center',alignItems:'center'},mask:{borderRadius:PREVIEW_SIZE/2,height:PREVIEW_SIZE-10,width:PREVIEW_SIZE-10,marginTop:PREVIEW_RECT.minY,alignSelf:'center'},container:{flex:1,flexDirection:'column',backgroundColor:'#333333'},topOverlay:{position:'absolute',right:0,left:0,justifyContent:'center',alignItems:'center'},captureFrame:{height:_reactNative.Dimensions.get('window').width-50,marginHorizontal:16,marginTop:'50%',borderRadius:50},preview:{width:PREVIEW_SIZE-29,height:PREVIEW_SIZE-28,marginTop:PREVIEW_RECT.minY+14,marginLeft:PREVIEW_RECT.minX+14,borderRadius:PREVIEW_SIZE/2,overflow:'hidden'},circularProgress:{width:PREVIEW_SIZE,height:PREVIEW_SIZE,marginTop:PREVIEW_RECT.minY,marginLeft:PREVIEW_RECT.minX,zIndex:100,position:'absolute',top:0,left:0,right:0}});
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ViewContract=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _reactNativePdf=_interopRequireDefault(require("react-native-pdf"));var _icons=require("../../assets/icons");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MText=require("../../components/MText");var _navigation=require("../../navigation");var _CommonStyles=require("../CommonStyles");var _store=_interopRequireDefault(require("./store"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _api=require("../../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/sign-tima/ViewContract.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var ViewContract=exports.ViewContract=(0,_mobxReactLite.observer)(function ViewContract(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)({}),_useState2=(0,_slicedToArray2.default)(_useState,2),source=_useState2[0],setSource=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),check=_useState4[0],setCheck=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2.default)(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];(0,_react.useEffect)(function(){_store.default.getContract(props.route.params.loan.id,function(data){setSource({uri:'data:application/pdf;base64,'+data});});},[]);var sign=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data3,_response$data3$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;setIsLoading(true);_context.next=1;return _regenerator.default.awrap(_api.Api.getInstance().sign_viettel_for_borrower_cimb({loanBriefId:props.route.params.loan.id,isTermesEtConditions:true}));case 1:response=_context.sent;if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.MySignViettel,{url:response==null?void 0:(_response$data2=response.data)==null?void 0:_response$data2.data,id:props.route.params.loan.id});}else{_reactNative.Alert.alert('Thông báo',((_response$data3=response.data)==null?void 0:(_response$data3$meta=_response$data3.meta)==null?void 0:_response$data3$meta.errorMessage)||'Có lỗi xảy ra, vui lòng thử lại sau',[{text:'OK',onPress:function onPress(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}}]);}_context.next=3;break;case 2:_context.prev=2;_t=_context["catch"](0);console.log(_t);setIsLoading(false);case 3:_context.prev=3;setIsLoading(false);return _context.finish(3);case 4:case"end":return _context.stop();}},null,null,[[0,2,3,4]],Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'#FFFFFF'},__self:this,__source:{fileName:_jsxFileName,lineNumber:74,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"H\u1EE3p \u0111\u1ED3ng d\u1ECBch v\u1EE5",onBack:function onBack(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));},__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:86,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:87,columnNumber:9}},_react.default.createElement(_reactNativePdf.default,{source:source,onLoadComplete:function onLoadComplete(numberOfPages,filePath){console.log("Number of pages: "+numberOfPages);},onPageChanged:function onPageChanged(page,numberOfPages){console.log("Current page: "+page);},onError:function onError(error){console.log(error);},onPressLink:function onPressLink(uri){console.log("Link pressed: "+uri);},style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:88,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'white',marginVertical:16,paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row'},__self:this,__source:{fileName:_jsxFileName,lineNumber:114,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginLeft:8},onPress:function onPress(){return setCheck(!check);},__self:this,__source:{fileName:_jsxFileName,lineNumber:115,columnNumber:13}},check?_react.default.createElement(_icons.CheckBoxActive,{__self:this,__source:{fileName:_jsxFileName,lineNumber:119,columnNumber:24}}):_react.default.createElement(_icons.CheckBox,{__self:this,__source:{fileName:_jsxFileName,lineNumber:119,columnNumber:45}})),_react.default.createElement(_MText.MText,{style:{color:'#333333',paddingLeft:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:13}},"T\xF4i \u0111\u1ED3ng \xFD v\u1EDBi t\u1EA5t c\u1EA3 nh\u1EEFng \u0111i\u1EC1u ki\u1EC7n trong",'\n'," h\u1EE3p \u0111\u1ED3ng.")),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){sign();},disabled:!check||isLoading,style:{marginTop:32,marginBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:check?['#FF7A00','#EF4123']:['#BDBDBD','#BDBDBD'],style:{alignItems:'center',borderRadius:30,height:40,justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:136,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:check?'white':'#333333'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:145,columnNumber:15}},"K\xFD h\u1EE3p \u0111\u1ED3ng"))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:157,columnNumber:7}}));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ViewContract=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _reactNativePdf=_interopRequireDefault(require("react-native-pdf"));var _icons=require("../../assets/icons");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MText=require("../../components/MText");var _navigation=require("../../navigation");var _CommonStyles=require("../CommonStyles");var _store=_interopRequireDefault(require("./store"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _api=require("../../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/sign-tima/ViewContract.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var ViewContract=exports.ViewContract=(0,_mobxReactLite.observer)(function ViewContract(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)({}),_useState2=(0,_slicedToArray2.default)(_useState,2),source=_useState2[0],setSource=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),check=_useState4[0],setCheck=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2.default)(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];(0,_react.useEffect)(function(){_store.default.getContract(props.route.params.loan.id,function(data){setSource({uri:'data:application/pdf;base64,'+data});});},[]);var sign=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data3,_response$data3$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;setIsLoading(true);_context.next=1;return _regenerator.default.awrap(_api.Api.getInstance().sign_viettel_for_borrower_cimb({loanBriefId:props.route.params.loan.id,isTermesEtConditions:true}));case 1:response=_context.sent;if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.MySignViettel,{url:response==null?void 0:(_response$data2=response.data)==null?void 0:_response$data2.data,id:props.route.params.loan.id});}else{_reactNative.Alert.alert('Thông báo',((_response$data3=response.data)==null?void 0:(_response$data3$meta=_response$data3.meta)==null?void 0:_response$data3$meta.errorMessage)||'Có lỗi xảy ra, vui lòng thử lại sau',[{text:'OK',onPress:function onPress(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}}]);}_context.next=3;break;case 2:_context.prev=2;_t=_context["catch"](0);console.log(_t);setIsLoading(false);case 3:_context.prev=3;setIsLoading(false);return _context.finish(3);case 4:case"end":return _context.stop();}},null,null,[[0,2,3,4]],Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'#FFFFFF'},__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"H\u1EE3p \u0111\u1ED3ng d\u1ECBch v\u1EE5",onBack:function onBack(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));},__self:this,__source:{fileName:_jsxFileName,lineNumber:76,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:87,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:88,columnNumber:9}},_react.default.createElement(_reactNativePdf.default,{source:source,onLoadComplete:function onLoadComplete(numberOfPages,filePath){console.log("Number of pages: "+numberOfPages);},onPageChanged:function onPageChanged(page,numberOfPages){console.log("Current page: "+page);},onError:function onError(error){console.log(error);},onPressLink:function onPressLink(uri){console.log("Link pressed: "+uri);},style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:89,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'white',marginVertical:16,paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:108,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row'},__self:this,__source:{fileName:_jsxFileName,lineNumber:115,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginLeft:8},onPress:function onPress(){return setCheck(!check);},__self:this,__source:{fileName:_jsxFileName,lineNumber:116,columnNumber:13}},check?_react.default.createElement(_icons.CheckBoxActive,{__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:24}}):_react.default.createElement(_icons.CheckBox,{__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:45}})),_react.default.createElement(_MText.MText,{style:{color:'#333333',paddingLeft:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:122,columnNumber:13}},"T\xF4i \u0111\u1ED3ng \xFD v\u1EDBi t\u1EA5t c\u1EA3 nh\u1EEFng \u0111i\u1EC1u ki\u1EC7n trong",'\n'," h\u1EE3p \u0111\u1ED3ng.")),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){sign();},disabled:!check||isLoading,style:{marginTop:32,marginBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:127,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:check?['#FF7A00','#EF4123']:['#BDBDBD','#BDBDBD'],style:{alignItems:'center',borderRadius:30,height:40,justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:137,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:check?'white':'#333333'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:146,columnNumber:15}},"K\xFD h\u1EE3p \u0111\u1ED3ng"))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:158,columnNumber:7}}));});
2
2
  //# sourceMappingURL=ViewContract.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_native","require","_mobxReactLite","_react","_interopRequireWildcard","_reactNative","_reactNativeLinearGradient","_interopRequireDefault","_reactNativePdf","_icons","_Loading","_MText","_navigation","_CommonStyles","_store","_MHeader","_api","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ViewContract","exports","observer","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","source","setSource","_useState3","_useState4","check","setCheck","_useState5","_useState6","isLoading","setIsLoading","useEffect","SignTimaStore","getContract","route","params","loan","id","data","uri","sign","_callee","_response$data","_response$data$meta","response","_response$data2","_response$data3","_response$data3$meta","_t","_regenerator","async","_context","prev","next","awrap","Api","getInstance","sign_viettel_for_borrower_cimb","loanBriefId","isTermesEtConditions","sent","kind","meta","errorCode","push","ScreenNames","MySignViettel","url","Alert","alert","errorMessage","text","onPress","dispatch","CommonActions","reset","index","routes","name","Main","console","log","finish","stop","Promise","createElement","View","style","flex","backgroundColor","__self","__source","fileName","lineNumber","columnNumber","title","onBack","SafeAreaView","onLoadComplete","numberOfPages","filePath","onPageChanged","page","onError","error","onPressLink","marginVertical","paddingHorizontal","flexDirection","TouchableOpacity","marginLeft","CheckBoxActive","CheckBox","MText","color","paddingLeft","disabled","marginTop","marginBottom","colors","alignItems","borderRadius","height","justifyContent","commonStyles","textNormalBold"],"sourceRoot":"../../../../src","sources":["screens/sign-tima/ViewContract.tsx"],"mappings":"mVACA,IAAAA,OAAA,CAAAC,OAAA,6BAKA,IAAAC,cAAA,CAAAD,OAAA,oBACA,IAAAE,MAAA,CAAAC,uBAAA,CAAAH,OAAA,WACA,IAAAI,YAAA,CAAAJ,OAAA,iBACA,IAAAK,0BAAA,CAAAC,sBAAA,CAAAN,OAAA,kCACA,IAAAO,eAAA,CAAAD,sBAAA,CAAAN,OAAA,sBACA,IAAAQ,MAAA,CAAAR,OAAA,uBACA,IAAAS,QAAA,CAAAH,sBAAA,CAAAN,OAAA,8BACA,IAAAU,MAAA,CAAAV,OAAA,2BACA,IAAAW,WAAA,CAAAX,OAAA,qBAEA,IAAAY,aAAA,CAAAZ,OAAA,oBACA,IAAAa,MAAA,CAAAP,sBAAA,CAAAN,OAAA,aACA,IAAAc,QAAA,CAAAR,sBAAA,CAAAN,OAAA,8BACA,IAAAe,IAAA,CAAAf,OAAA,uBAAyC,IAAAgB,YAAA,0FAAAb,wBAAAc,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAhB,uBAAA,UAAAA,wBAAAc,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA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KAAAC,YAAA,MAEFtH,MAAA,CAAAyB,OAAA,CAAAoF,aAAA,CAACrG,MAAA,CAAAiI,KAAK,EACJ1B,KAAK,CAAE,CACLqC,0BAAY,CAACC,cAAc,CAC3B,CAAEX,KAAK,CAAEzF,KAAK,CAAG,OAAO,CAAG,SAAU,CAAC,CACtC,CAAAiE,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,MACH,+BAEM,CACO,CACA,CACd,CACM,CAAC,CACftH,MAAA,CAAAyB,OAAA,CAAAoF,aAAA,CAACtG,QAAA,CAAAkB,OAAO,EAAC4B,SAAS,CAAEA,SAAU,CAAA6D,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,IAAE,CAC5B,CAAC,CAEX,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_native","require","_mobxReactLite","_react","_interopRequireWildcard","_reactNative","_reactNativeLinearGradient","_interopRequireDefault","_reactNativePdf","_icons","_Loading","_MText","_navigation","_CommonStyles","_store","_MHeader","_api","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ViewContract","exports","observer","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","source","setSource","_useState3","_useState4","check","setCheck","_useState5","_useState6","isLoading","setIsLoading","useEffect","SignTimaStore","getContract","route","params","loan","id","data","uri","sign","_callee","_response$data","_response$data$meta","response","_response$data2","_response$data3","_response$data3$meta","_t","_regenerator","async","_context","prev","next","awrap","Api","getInstance","sign_viettel_for_borrower_cimb","loanBriefId","isTermesEtConditions","sent","kind","meta","errorCode","push","ScreenNames","MySignViettel","url","Alert","alert","errorMessage","text","onPress","dispatch","CommonActions","reset","index","routes","name","Main","console","log","finish","stop","Promise","createElement","View","style","flex","backgroundColor","__self","__source","fileName","lineNumber","columnNumber","title","onBack","SafeAreaView","onLoadComplete","numberOfPages","filePath","onPageChanged","page","onError","error","onPressLink","marginVertical","paddingHorizontal","flexDirection","TouchableOpacity","marginLeft","CheckBoxActive","CheckBox","MText","color","paddingLeft","disabled","marginTop","marginBottom","colors","alignItems","borderRadius","height","justifyContent","commonStyles","textNormalBold"],"sourceRoot":"../../../../src","sources":["screens/sign-tima/ViewContract.tsx"],"mappings":"mVACA,IAAAA,OAAA,CAAAC,OAAA,6BAKA,IAAAC,cAAA,CAAAD,OAAA,oBACA,IAAAE,MAAA,CAAAC,uBAAA,CAAAH,OAAA,WACA,IAAAI,YAAA,CAAAJ,OAAA,iBACA,IAAAK,0BAAA,CAAAC,sBAAA,CAAAN,OAAA,kCACA,IAAAO,eAAA,CAAAD,sBAAA,CAAAN,OAAA,sBACA,IAAAQ,MAAA,CAAAR,OAAA,uBACA,IAAAS,QAAA,CAAAH,sBAAA,CAAAN,OAAA,8BACA,IAAAU,MAAA,CAAAV,OAAA,2BACA,IAAAW,WAAA,CAAAX,OAAA,qBAEA,IAAAY,aAAA,CAAAZ,OAAA,oBACA,IAAAa,MAAA,CAAAP,sBAAA,CAAAN,OAAA,aACA,IAAAc,QAAA,CAAAR,sBAAA,CAAAN,OAAA,8BACA,IAAAe,IAAA,CAAAf,OAAA,uBAAyC,IAAAgB,YAAA,0FAAAb,wBAAAc,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAhB,uBAAA,UAAAA,wBAAAc,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG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E,CACLqC,0BAAY,CAACC,cAAc,CAC3B,CAAEX,KAAK,CAAEzF,KAAK,CAAG,OAAO,CAAG,SAAU,CAAC,CACtC,CAAAiE,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,MACH,+BAEM,CACO,CACA,CACd,CACM,CAAC,CACftH,MAAA,CAAAyB,OAAA,CAAAoF,aAAA,CAACtG,QAAA,CAAAkB,OAAO,EAAC4B,SAAS,CAAEA,SAAU,CAAA6D,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,IAAE,CAC5B,CAAC,CAEX,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_AppStore","_interopRequireDefault","require","config","initSDK","exports","options","appStore","getDeviceId","getPublicIp","getAppId","getDevicePayload","getSDKConfig","Error"],"sourceRoot":"../../src","sources":["sdkConfig.ts"],"mappings":"wLAAA,IAAAA,SAAA,CAAAC,sBAAA,CAAAC,OAAA,gBAQA,GAAI,CAAAC,MAAwB,CAAG,IAAI,CAE5B,GAAM,CAAAC,OAAO,CAAAC,OAAA,CAAAD,OAAA,CAAG,QAAV,CAAAA,OAAOA,CAAIE,OAAkB,CAAK,CAC7CH,MAAM,CAAGG,OAAO,CAChBC,iBAAQ,CAACC,WAAW,CAAC,CAAC,CACtBD,iBAAQ,CAACE,WAAW,CAAC,CAAC,CACtBF,iBAAQ,CAACG,QAAQ,CAAC,CAAC,CACnBH,iBAAQ,CAACI,gBAAgB,CAAC,CAAC,CAC7B,CAAC,CAEM,GAAM,CAAAC,YAAY,CAAAP,OAAA,CAAAO,YAAA,CAAG,QAAf,CAAAA,YAAYA,CAAA,CAAoB,CAC3C,GAAI,CAACT,MAAM,CAAE,CACX,KAAM,IAAI,CAAAU,KAAK,CAAC,4CAA4C,CAAC,CAC/D,CACA,MAAO,CAAAV,MAAM,CACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_AppStore","_interopRequireDefault","require","config","initSDK","exports","options","appStore","getDeviceId","getPublicIp","getAppId","getDevicePayload","getSDKConfig","Error"],"sourceRoot":"../../src","sources":["sdkConfig.ts"],"mappings":"wLAAA,IAAAA,SAAA,CAAAC,sBAAA,CAAAC,OAAA,gBA6BA,GAAI,CAAAC,MAAwB,CAAG,IAAI,CAE5B,GAAM,CAAAC,OAAO,CAAAC,OAAA,CAAAD,OAAA,CAAG,QAAV,CAAAA,OAAOA,CAAIE,OAAkB,CAAK,CAC7CH,MAAM,CAAGG,OAAO,CAChBC,iBAAQ,CAACC,WAAW,CAAC,CAAC,CACtBD,iBAAQ,CAACE,WAAW,CAAC,CAAC,CACtBF,iBAAQ,CAACG,QAAQ,CAAC,CAAC,CACnBH,iBAAQ,CAACI,gBAAgB,CAAC,CAAC,CAC7B,CAAC,CAEM,GAAM,CAAAC,YAAY,CAAAP,OAAA,CAAAO,YAAA,CAAG,QAAf,CAAAA,YAAYA,CAAA,CAAoB,CAC3C,GAAI,CAACT,MAAM,CAAE,CACX,KAAM,IAAI,CAAAU,KAAK,CAAC,4CAA4C,CAAC,CAC/D,CACA,MAAO,CAAAV,MAAM,CACf,CAAC","ignoreList":[]}