react-native-timacare 3.1.28-production → 3.1.30-production
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/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +3 -3
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +47 -17
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +47 -17
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +1 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +2 -2
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +47 -19
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +1 -1
- package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/screens/toan-trinh-so/LoanInterestRate.tsx +3 -3
- package/src/screens/toan-trinh-so/OCR.tsx +47 -17
- package/src/screens/toan-trinh-so/RegisterCamera.tsx +47 -17
- package/src/screens/toan-trinh-so/ReviewInformation.tsx +1 -0
- package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +2 -2
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +47 -19
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=LoanInterestRate;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _CommonStyles=require("../CommonStyles");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _utils=require("../../utils");var _svgs=require("../../assets/svgs");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/LoanInterestRate.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function LoanInterestRate(props){var _props$route,_props$route$params,_data$listPaymentSche,_this=this;var loan=props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:_props$route$params.loan;var navigation=(0,_native.useNavigation)();var _React$useState=_react.default.useState(false),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),isLoading=_React$useState2[0],setIsLoading=_React$useState2[1];var _React$useState3=_react.default.useState(null),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),data=_React$useState4[0],setData=_React$useState4[1];var getData=function _callee(){var response,_response$data,_response$data$meta,_response$data2,_response$data3,_response$data3$meta;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:setIsLoading(true);_context.prev=1;_context.next=4;return _regenerator.default.awrap(_api.Api.getInstance().getPaymentPlan(loan==null?void 0:loan.id));case 4:response=_context.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setData((_response$data2=response.data)==null?void 0:_response$data2.data);}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.message)||'Có lỗi xảy ra, vui lòng thử lại sau');}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra, vui lòng thử lại sau');}_context.next=14;break;case 9:_context.prev=9;_context.t0=_context["catch"](1);console.error('Error fetching data:',_context.t0);setIsLoading(false);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra, vui lòng thử lại sau');case 14:case"end":return _context.stop();}},null,null,[[1,9]],Promise);};(0,_react.useEffect)(function(){getData();},[]);var acceptLoan=function _callee2(){var response,_response$data4,_response$data4$meta,_response$data5,_response$data5$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:setIsLoading(true);_context2.prev=1;_context2.next=4;return _regenerator.default.awrap(_api.Api.getInstance().changePipeline({LoanBriefId:loan==null?void 0:loan.id,TypeId:1}));case 4:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data4=response.data)==null?void 0:(_response$data4$meta=_response$data4.meta)==null?void 0:_response$data4$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.LivenessV2,{loan:loan});}else{_reactNative.Alert.alert('Thông báo',(_response$data5=response.data)==null?void 0:(_response$data5$meta=_response$data5.meta)==null?void 0:_response$data5$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=12;break;case 9:_context2.prev=9;_context2.t0=_context2["catch"](1);setIsLoading(false);case 12:case"end":return _context2.stop();}},null,null,[[1,9]],Promise);};return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"Vay nhanh 24/7",__self:this,__source:{fileName:_jsxFileName,lineNumber:76,columnNumber:7}}),_react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:77,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:$h,__self:this,__source:{fileName:_jsxFileName,lineNumber:78,columnNumber:9}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:79,columnNumber:9}},_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:80,columnNumber:11}},"B\u1EA3ng bi\u1EC3u l\xE3i ph\xED \u0111\u01A1n vay"),_react.default.createElement(_reactNative.ScrollView,{__self:this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{borderWidth:1,borderColor:'#FF8E4F',borderRadius:8,paddingHorizontal:16,paddingVertical:12,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:92,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:99,columnNumber:17}},"M\xE3 H\u0110 gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:17}},"HD-",data==null?void 0:data.loanBriefId)),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:117,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:135,columnNumber:17}},"S\u1ED1 ti\u1EC1n vay (1)+(2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoney)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:153,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:17}},"S\u1ED1 ti\u1EC1n gi\u1EA3i ng\xE2n (1)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:170,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalLoanAmount)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:4},__self:this,__source:{fileName:_jsxFileName,lineNumber:179,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:187,columnNumber:17}},"S\u1ED1 ti\u1EC1n b\u1EA3o hi\u1EC3m (2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:196,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoneyInsurance)," \u0111")),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:205,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:216,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:223,columnNumber:17}},"Th\u1EDDi h\u1EA1n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:231,columnNumber:17}},data==null?void 0:data.loanTime," th\xE1ng")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:241,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:249,columnNumber:17}},"Ng\xE0y d\u1EF1 ki\u1EBFn gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:257,columnNumber:17}},(0,_utils.formatDDMMYYY)(data==null?void 0:data.expectedDisbursementDate)))),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF3E9',marginTop:16,flexDirection:'row',paddingHorizontal:16,paddingVertical:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:268,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:277,columnNumber:15}},"Ng\xE0y thanh to\xE1n"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:287,columnNumber:15}},"G\u1ED1c tr\u1EA3 k\u1EF3"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:297,columnNumber:15}},"T\u1ED5ng l\xE3i ph\xED"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:307,columnNumber:15}},"T\u1ED5ng tr\u1EA3 k\u1EF3")),data==null?void 0:(_data$listPaymentSche=data.listPaymentSchedule)==null?void 0:_data$listPaymentSche.map(function(item,index){return _react.default.createElement(_reactNative.View,{key:index,style:{flexDirection:'row',paddingHorizontal:16,paddingVertical:16,borderBottomWidth:1,borderBottomColor:'#F0F0F0'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:319,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:329,columnNumber:17}},item==null?void 0:item.payDate),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:339,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.moneyOriginal)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:349,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalInterest)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'rgba(239, 89, 46, 1)',width:'25%',textAlign:'center',fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:359,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalMoneyNeedPayment)," \u0111"));}),_react.default.createElement(_MText.MText,{style:$des,__self:this,__source:{fileName:_jsxFileName,lineNumber:373,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#E40010'},__self:this,__source:{fileName:_jsxFileName,lineNumber:374,columnNumber:15}},"*")," \u0110\xE2y l\xE0 l\xE3i su\u1EA5t \xE1p d\u1EE5ng cho kh\xE1ch h\xE0ng c\xF3 \u0111i\u1EC3m t\xEDn d\u1EE5ng t\u1ED1t. L\xE3i su\u1EA5t th\u1EF1c t\u1EBF s\u1EBD hi\u1EC3n th\u1ECB sau khi ho\xE0n thi\u1EC7n vay"),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF8F2',borderRadius:8,paddingHorizontal:12,paddingVertical:8,marginHorizontal:16,marginTop:16,marginBottom:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:378,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:389,columnNumber:15}},_react.default.createElement(_svgs.IconNotify,{__self:this,__source:{fileName:_jsxFileName,lineNumber:396,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:397,columnNumber:17}},"B\u01B0\u1EDBc cu\u1ED1i c\xF9ng r\u1ED3i!!!")),_react.default.createElement(_MText.MText,{style:{color:'#828282',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:406,columnNumber:15}},"Vui l\xF2ng eKYC - ho\xE0n thi\u1EC7n x\xE1c th\u1EF1c khu\xF4n m\u1EB7t v\xE0 k\xFD h\u1EE3p \u0111\u1ED3ng \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"))),(loan==null?void 0:loan.step)>=7?_react.default.createElement(_react.default.Fragment,null):_react.default.createElement(_MButton.default,{onPress:function onPress(){acceptLoan();},style:{marginVertical:24,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:420,columnNumber:13}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:429,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:441,columnNumber:17}},"\u0110i t\u1EDBi eKYC"))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:454,columnNumber:7}}));}var $des={fontSize:10,color:'#828282',paddingHorizontal:16,fontStyle:'italic',marginTop:16};var $title={fontSize:16,fontWeight:'bold',color:'#333333',textAlign:'center',paddingVertical:16};var $h={backgroundColor:'#EF592E',position:'absolute',height:30,width:'100%'};var $bg={borderTopLeftRadius:30,borderTopRightRadius:30,backgroundColor:'white',flex:1};
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=LoanInterestRate;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _CommonStyles=require("../CommonStyles");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _utils=require("../../utils");var _svgs=require("../../assets/svgs");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/LoanInterestRate.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function LoanInterestRate(props){var _props$route,_props$route$params,_data$listPaymentSche,_this=this;var loan=props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:_props$route$params.loan;var navigation=(0,_native.useNavigation)();var _React$useState=_react.default.useState(false),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),isLoading=_React$useState2[0],setIsLoading=_React$useState2[1];var _React$useState3=_react.default.useState(null),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),data=_React$useState4[0],setData=_React$useState4[1];var getData=function _callee(){var response,_response$data,_response$data$meta,_response$data2,_response$data3,_response$data3$meta;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:setIsLoading(true);_context.prev=1;_context.next=4;return _regenerator.default.awrap(_api.Api.getInstance().getPaymentPlan(loan==null?void 0:loan.id));case 4:response=_context.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setData((_response$data2=response.data)==null?void 0:_response$data2.data);}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.message)||'Có lỗi xảy ra, vui lòng thử lại sau');}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra, vui lòng thử lại sau');}_context.next=14;break;case 9:_context.prev=9;_context.t0=_context["catch"](1);console.error('Error fetching data:',_context.t0);setIsLoading(false);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra, vui lòng thử lại sau');case 14:case"end":return _context.stop();}},null,null,[[1,9]],Promise);};(0,_react.useEffect)(function(){getData();},[]);var acceptLoan=function _callee2(){var response,_response$data4,_response$data4$meta,_response$data5,_response$data5$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:setIsLoading(true);_context2.prev=1;_context2.next=4;return _regenerator.default.awrap(_api.Api.getInstance().changePipeline({LoanBriefId:loan==null?void 0:loan.id,TypeId:1}));case 4:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data4=response.data)==null?void 0:(_response$data4$meta=_response$data4.meta)==null?void 0:_response$data4$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.LivenessV2,{loan:loan});}else{_reactNative.Alert.alert('Thông báo',(_response$data5=response.data)==null?void 0:(_response$data5$meta=_response$data5.meta)==null?void 0:_response$data5$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=12;break;case 9:_context2.prev=9;_context2.t0=_context2["catch"](1);setIsLoading(false);case 12:case"end":return _context2.stop();}},null,null,[[1,9]],Promise);};return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"Vay nhanh 24/7",__self:this,__source:{fileName:_jsxFileName,lineNumber:76,columnNumber:7}}),_react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:77,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:$h,__self:this,__source:{fileName:_jsxFileName,lineNumber:78,columnNumber:9}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:79,columnNumber:9}},_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:80,columnNumber:11}},"B\u1EA3ng bi\u1EC3u l\xE3i ph\xED \u0111\u01A1n vay"),_react.default.createElement(_reactNative.ScrollView,{__self:this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{borderWidth:1,borderColor:'#FF8E4F',borderRadius:8,paddingHorizontal:16,paddingVertical:12,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:92,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:99,columnNumber:17}},"M\xE3 H\u0110 gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:17}},"HD-",data==null?void 0:data.loanBriefId)),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:117,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:135,columnNumber:17}},"S\u1ED1 ti\u1EC1n vay (1)+(2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoney)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:153,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:17}},"S\u1ED1 ti\u1EC1n gi\u1EA3i ng\xE2n (1)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:170,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalLoanAmount)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:4},__self:this,__source:{fileName:_jsxFileName,lineNumber:179,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:187,columnNumber:17}},"S\u1ED1 ti\u1EC1n b\u1EA3o hi\u1EC3m (2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:196,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoneyInsurance)," \u0111")),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:205,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:216,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:223,columnNumber:17}},"Th\u1EDDi h\u1EA1n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:231,columnNumber:17}},data==null?void 0:data.loanTime," th\xE1ng")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:241,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:249,columnNumber:17}},"Ng\xE0y d\u1EF1 ki\u1EBFn gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:257,columnNumber:17}},(0,_utils.formatDDMMYYY)(data==null?void 0:data.expectedDisbursementDate)))),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF3E9',marginTop:16,flexDirection:'row',paddingHorizontal:16,paddingVertical:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:268,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:277,columnNumber:15}},"Ng\xE0y thanh to\xE1n"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:287,columnNumber:15}},"G\u1ED1c tr\u1EA3 k\u1EF3"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:297,columnNumber:15}},"T\u1ED5ng l\xE3i ph\xED"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:307,columnNumber:15}},"T\u1ED5ng tr\u1EA3 k\u1EF3")),data==null?void 0:(_data$listPaymentSche=data.listPaymentSchedule)==null?void 0:_data$listPaymentSche.map(function(item,index){return _react.default.createElement(_reactNative.View,{key:index,style:{flexDirection:'row',paddingHorizontal:16,paddingVertical:16,borderBottomWidth:1,borderBottomColor:'#F0F0F0'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:319,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:329,columnNumber:17}},item==null?void 0:item.payDate),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:339,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.moneyOriginal)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:349,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalInterest)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'rgba(239, 89, 46, 1)',width:'25%',textAlign:'center',fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:359,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalMoneyNeedPayment)," \u0111"));}),_react.default.createElement(_MText.MText,{style:$des,__self:this,__source:{fileName:_jsxFileName,lineNumber:373,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#E40010'},__self:this,__source:{fileName:_jsxFileName,lineNumber:374,columnNumber:15}},"*")," \u0110\xE2y l\xE0 l\xE3i su\u1EA5t \xE1p d\u1EE5ng cho kh\xE1ch h\xE0ng c\xF3 \u0111i\u1EC3m t\xEDn d\u1EE5ng t\u1ED1t. L\xE3i su\u1EA5t th\u1EF1c t\u1EBF s\u1EBD hi\u1EC3n th\u1ECB sau khi ho\xE0n thi\u1EC7n vay"),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF8F2',borderRadius:8,paddingHorizontal:12,paddingVertical:8,marginHorizontal:16,marginTop:16,marginBottom:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:378,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:389,columnNumber:15}},_react.default.createElement(_svgs.IconNotify,{__self:this,__source:{fileName:_jsxFileName,lineNumber:396,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:397,columnNumber:17}},"B\u01B0\u1EDBc cu\u1ED1i c\xF9ng r\u1ED3i!!!")),_react.default.createElement(_MText.MText,{style:{color:'#828282',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:406,columnNumber:15}},"Vui l\xF2ng eKYC - ho\xE0n thi\u1EC7n x\xE1c th\u1EF1c khu\xF4n m\u1EB7t v\xE0 k\xFD h\u1EE3p \u0111\u1ED3ng \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"))),(loan==null?void 0:loan.step)===6?_react.default.createElement(_MButton.default,{onPress:function onPress(){acceptLoan();},style:{marginVertical:24,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:418,columnNumber:13}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:427,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:439,columnNumber:17}},"\u0110i t\u1EDBi eKYC"))):_react.default.createElement(_react.default.Fragment,null))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:454,columnNumber:7}}));}var $des={fontSize:10,color:'#828282',paddingHorizontal:16,fontStyle:'italic',marginTop:16};var $title={fontSize:16,fontWeight:'bold',color:'#333333',textAlign:'center',paddingVertical:16};var $h={backgroundColor:'#EF592E',position:'absolute',height:30,width:'100%'};var $bg={borderTopLeftRadius:30,borderTopRightRadius:30,backgroundColor:'white',flex:1};
|
|
2
2
|
//# sourceMappingURL=LoanInterestRate.js.map
|
|
@@ -414,9 +414,7 @@ export default function LoanInterestRate(props) {
|
|
|
414
414
|
</MText>
|
|
415
415
|
</View>
|
|
416
416
|
</ScrollView>
|
|
417
|
-
{loan?.step
|
|
418
|
-
<></>
|
|
419
|
-
) : (
|
|
417
|
+
{loan?.step === 6 ? (
|
|
420
418
|
<MButton
|
|
421
419
|
onPress={() => {
|
|
422
420
|
acceptLoan();
|
|
@@ -448,6 +446,8 @@ export default function LoanInterestRate(props) {
|
|
|
448
446
|
</MText>
|
|
449
447
|
</LinearGradient>
|
|
450
448
|
</MButton>
|
|
449
|
+
) : (
|
|
450
|
+
<></>
|
|
451
451
|
)}
|
|
452
452
|
</View>
|
|
453
453
|
</View>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_CommonStyles","_MHeader","_interopRequireDefault","_MText","_native","_utils","_svgs","_MButton","_reactNativeLinearGradient","_navigation","_api","_Loading","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","LoanInterestRate","props","_props$route","_props$route$params","_data$listPaymentSche","_this","loan","route","params","navigation","useNavigation","_React$useState","React","useState","_React$useState2","_slicedToArray2","isLoading","setIsLoading","_React$useState3","_React$useState4","data","setData","getData","_callee","response","_response$data","_response$data$meta","_response$data2","_response$data3","_response$data3$meta","_regenerator","async","_callee$","_context","prev","next","awrap","Api","getInstance","getPaymentPlan","id","sent","kind","meta","errorCode","Alert","alert","message","t0","console","error","stop","Promise","useEffect","acceptLoan","_callee2","_response$data4","_response$data4$meta","_response$data5","_response$data5$meta","_callee2$","_context2","changePipeline","LoanBriefId","TypeId","push","ScreenNames","LivenessV2","errorMessage","createElement","View","style","commonStyles","fill","__self","__source","fileName","lineNumber","columnNumber","title","$h","$bg","MText","$title","ScrollView","borderWidth","borderColor","borderRadius","paddingHorizontal","paddingVertical","marginHorizontal","flexDirection","justifyContent","alignItems","fontSize","color","fontWeight","loanBriefId","ellipsizeMode","numberOfLines","flex","textAlign","formatMoney","totalMoney","marginTop","marginLeft","totalLoanAmount","totalMoneyInsurance","loanTime","formatDDMMYYY","expectedDisbursementDate","backgroundColor","width","listPaymentSchedule","map","item","index","key","borderBottomWidth","borderBottomColor","payDate","moneyOriginal","totalInterest","totalMoneyNeedPayment","$des","marginBottom","gap","IconNotify","step","Fragment","onPress","marginVertical","start","x","y","end","height","colors","fontStyle","position","borderTopLeftRadius","borderTopRightRadius"],"sourceRoot":"../../../../src","sources":["screens/toan-trinh-so/LoanInterestRate.tsx"],"mappings":"wVACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,aAAA,CAAAF,OAAA,oBACA,IAAAG,QAAA,CAAAC,sBAAA,CAAAJ,OAAA,8BACA,IAAAK,MAAA,CAAAL,OAAA,2BACA,IAAAM,OAAA,CAAAN,OAAA,6BACA,IAAAO,MAAA,CAAAP,OAAA,gBACA,IAAAQ,KAAA,CAAAR,OAAA,sBACA,IAAAS,QAAA,CAAAL,sBAAA,CAAAJ,OAAA,8BACA,IAAAU,0BAAA,CAAAN,sBAAA,CAAAJ,OAAA,kCACA,IAAAW,WAAA,CAAAX,OAAA,qBACA,IAAAY,IAAA,CAAAZ,OAAA,uBACA,IAAAa,QAAA,CAAAT,sBAAA,CAAAJ,OAAA,8BAA+C,IAAAc,YAAA,uGAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAjB,wBAAAiB,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,MAAAQ,CAAA,EAAAC,SAAA,OAAAC,CAA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eAAe,CAAE,SAAS,CAC1B4B,QAAQ,CAAE,UAAU,CACpBH,MAAM,CAAE,EAAE,CACVxB,KAAK,CAAE,MACT,CAAC,CAED,GAAM,CAAA/B,GAAc,CAAG,CACrB2D,mBAAmB,CAAE,EAAE,CACvBC,oBAAoB,CAAE,EAAE,CACxB9B,eAAe,CAAE,OAAO,CACxBX,IAAI,CAAE,CACR,CAAC"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_CommonStyles","_MHeader","_interopRequireDefault","_MText","_native","_utils","_svgs","_MButton","_reactNativeLinearGradient","_navigation","_api","_Loading","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","LoanInterestRate","props","_props$route","_props$route$params","_data$listPaymentSche","_this","loan","route","params","navigation","useNavigation","_React$useState","React","useState","_React$useState2","_slicedToArray2","isLoading","setIsLoading","_React$useState3","_React$useState4","data","setData","getData","_callee","response","_response$data","_response$data$meta","_response$data2","_response$data3","_response$data3$meta","_regenerator","async","_callee$","_context","prev","next","awrap","Api","getInstance","getPaymentPlan","id","sent","kind","meta","errorCode","Alert","alert","message","t0","console","error","stop","Promise","useEffect","acceptLoan","_callee2","_response$data4","_response$data4$meta","_response$data5","_response$data5$meta","_callee2$","_context2","changePipeline","LoanBriefId","TypeId","push","ScreenNames","LivenessV2","errorMessage","createElement","View","style","commonStyles","fill","__self","__source","fileName","lineNumber","columnNumber","title","$h","$bg","MText","$title","ScrollView","borderWidth","borderColor","borderRadius","paddingHorizontal","paddingVertical","marginHorizontal","flexDirection","justifyContent","alignItems","fontSize","color","fontWeight","loanBriefId","ellipsizeMode","numberOfLines","flex","textAlign","formatMoney","totalMoney","marginTop","marginLeft","totalLoanAmount","totalMoneyInsurance","loanTime","formatDDMMYYY","expectedDisbursementDate","backgroundColor","width","listPaymentSchedule","map","item","index","key","borderBottomWidth","borderBottomColor","payDate","moneyOriginal","totalInterest","totalMoneyNeedPayment","$des","marginBottom","gap","IconNotify","step","onPress","marginVertical","start","x","y","end","height","colors","Fragment","fontStyle","position","borderTopLeftRadius","borderTopRightRadius"],"sourceRoot":"../../../../src","sources":["screens/toan-trinh-so/LoanInterestRate.tsx"],"mappings":"wVACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,aAAA,CAAAF,OAAA,oBACA,IAAAG,QAAA,CAAAC,sBAAA,CAAAJ,OAAA,8BACA,IAAAK,MAAA,CAAAL,OAAA,2BACA,IAAAM,OAAA,CAAAN,OAAA,6BACA,IAAAO,MAAA,CAAAP,OAAA,gBACA,IAAAQ,KAAA,CAAAR,OAAA,sBACA,IAAAS,QAAA,CAAAL,sBAAA,CAAAJ,OAAA,8BACA,IAAAU,0BAAA,CAAAN,sBAAA,CAAAJ,OAAA,kCACA,IAAAW,WAAA,CAAAX,OAAA,qBACA,IAAAY,IAAA,CAAAZ,OAAA,uBACA,IAAAa,QAAA,CAAAT,sBAAA,CAAAJ,OAAA,8BAA+C,IAAAc,YAAA,uGAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAjB,wBAAAiB,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,MAAAQ,CAAA,EAAAC,SAAA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AG,CACpB+B,eAAe,CAAE,SAAS,CAC1B4B,QAAQ,CAAE,UAAU,CACpBJ,MAAM,CAAE,EAAE,CACVvB,KAAK,CAAE,MACT,CAAC,CAED,GAAM,CAAA/B,GAAc,CAAG,CACrB2D,mBAAmB,CAAE,EAAE,CACvBC,oBAAoB,CAAE,EAAE,CACxB9B,eAAe,CAAE,OAAO,CACxBX,IAAI,CAAE,CACR,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.OCR=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _MText=require("../../components/MText");var _storage=require("../../utils/storage");var _reactNativePermissions=require("react-native-permissions");var _reactNativeCamera=require("react-native-camera");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _icons=require("../../assets/icons");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _CommonStyles=require("../CommonStyles");var _native=require("@react-navigation/native");var _textRecognition=_interopRequireDefault(require("@react-native-ml-kit/text-recognition"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _svgs=require("../../assets/svgs");var _reactNativeImageCropPicker=_interopRequireDefault(require("react-native-image-crop-picker"));var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/OCR.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var NFCReader=_reactNative.NativeModules.NFCReader;var OCR=exports.OCR=(0,_mobxReactLite.observer)(function OCR(props){var _props$route17,_props$route17$params,_this=this;var isFocused=(0,_native.useIsFocused)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var navigation=(0,_native.useNavigation)();var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),showModal=_useState4[0],setShowModal=_useState4[1];var _useState5=(0,_react.useState)('passport'),_useState6=(0,_slicedToArray2.default)(_useState5,2),type=_useState6[0],setType=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),taking=_useState8[0],setTaking=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=(0,_slicedToArray2.default)(_useState9,2),passPermission=_useState10[0],setPassPermission=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=(0,_slicedToArray2.default)(_useState11,2),shouldRenderCamera=_useState12[0],setShouldRenderCamera=_useState12[1];var myCamera=(0,_react.useRef)(null);var requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(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(Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_reactNative.Alert.alert('Thông báo','Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(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(Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);var loadIntro=function _callee(){var intro;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return _regenerator.default.awrap((0,_storage.load)(_storage.OCR_V1));case 2:intro=_context.sent;if(!intro){setShowModal(true);}case 4:case"end":return _context.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){requestPermissions();loadIntro();},[]);(0,_react.useEffect)(function(){var unsubscribe=navigation.addListener('blur',function(){var _myCamera$current;(_myCamera$current=myCamera.current)==null?void 0:_myCamera$current.pausePreview();});return unsubscribe;},[navigation]);var saveDataNfc=function _callee2(body){var _props$route,_props$route$params,_props$route$params$l,response,_response$data,_response$data$meta,_response$data2,_response$data2$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return _regenerator.default.awrap(_api.Api.getInstance().saveNfcInfo((0,_extends2.default)({},body,{loanBriefId:props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:(_props$route$params$l=_props$route$params.loan)==null?void 0:_props$route$params$l.id})));case 3:response=_context2.sent;if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setTimeout(function(){var _props$route2,_props$route2$params;navigation.push(_navigation.ScreenNames.TTSSelfie,{loan:props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.loan});},500);}else{_reactNative.Alert.alert('Thông báo',response==null?void 0:(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=10;break;case 7:_context2.prev=7;_context2.t0=_context2["catch"](0);console.log(_context2.t0);case 10:case"end":return _context2.stop();}},null,null,[[0,7]],Promise);};var convertToDate=function convertToDate(input,end){var yearPrefix=input.substring(0,2);var year=end?'20'+yearPrefix:parseInt(yearPrefix)>20?'19'+yearPrefix:'20'+yearPrefix;var month=input.substring(2,4);var day=input.substring(4,6);return year+'-'+month+'-'+day;};var extractMRZInfo=function extractMRZInfo(text){var documentNumber='';var birthDate='';var expirationDate='';var regex1=/VNM(\d{9})/;var match1=text.match(regex1);if(match1){documentNumber=match1[1];}console.log('documentNumber',documentNumber);var regex=/(\d{6}).[MF](\d{6})/;var match=text.replace(/ /g,'').match(regex);if(match){console.log({documentNumber:documentNumber,birthDate:match[1],expirationDate:match[2]});birthDate=match[1],expirationDate=match[2];}else{return null;}if(documentNumber&&birthDate&&expirationDate){try{NFCReader.readNFCCard(documentNumber,convertToDate(birthDate,false),convertToDate(expirationDate,true),function(error,response){try{var convertData=JSON.parse(response);saveDataNfc(convertData);}catch(e){console.log(e);}});}catch(e){console.log(e);}}};var handleTextRecognition=function _callee3(imagePath){var result;return _regenerator.default.async(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _regenerator.default.awrap(_textRecognition.default.recognize(imagePath));case 3:result=_context3.sent;extractMRZInfo(result.text);_context3.next=10;break;case 7:_context3.prev=7;_context3.t0=_context3["catch"](0);console.log(_context3.t0);case 10:case"end":return _context3.stop();}},null,null,[[0,7]],Promise);};var scanNfc=function _callee4(){var options,data;return _regenerator.default.async(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!myCamera.current){_context4.next=7;break;}options={quality:0.8,base64:true};_context4.next=4;return _regenerator.default.awrap(myCamera.current.takePictureAsync(options));case 4:data=_context4.sent;_context4.next=7;return _regenerator.default.awrap(handleTextRecognition(data.uri));case 7:case"end":return _context4.stop();}},null,null,null,Promise);};var takePhoto=function _callee5(){var _props$route3,_props$route3$params,_props$route4,_props$route4$params,_props$route6,_props$route6$params,_props$route7,_props$route7$params;var options,data,_props$route5,_props$route5$params,_props$route8,_props$route8$params,_props$route9,_props$route9$params;return _regenerator.default.async(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:setTaking(true);options={base64:true,pauseAfterCapture:true,fixOrientation:false,forceUpOrientation:false,orientation:_reactNativeCamera.RNCamera.Constants.Orientation.portrait,quality:0.8,pictureSize:'1280x720'};_context5.next=4;return _regenerator.default.awrap(myCamera.current.takePictureAsync(options));case 4:data=_context5.sent;setTaking(false);if(props!=null&&(_props$route3=props.route)!=null&&(_props$route3$params=_props$route3.params)!=null&&_props$route3$params.front&&!((_props$route4=props.route)!=null&&(_props$route4$params=_props$route4.params)!=null&&_props$route4$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:data==null?void 0:data.uri,loan:props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:_props$route5$params.loan});}else if(!(props!=null&&(_props$route6=props.route)!=null&&(_props$route6$params=_props$route6.params)!=null&&_props$route6$params.front)&&!((_props$route7=props.route)!=null&&(_props$route7$params=_props$route7.params)!=null&&_props$route7$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:data==null?void 0:data.uri,loan:props==null?void 0:(_props$route8=props.route)==null?void 0:(_props$route8$params=_props$route8.params)==null?void 0:_props$route8$params.loan});}else{navigation.goBack();(_props$route9=props.route)==null?void 0:(_props$route9$params=_props$route9.params)==null?void 0:_props$route9$params.callback(data==null?void 0:data.uri);}case 7:case"end":return _context5.stop();}},null,null,null,Promise);};var pickImageFromGallery=function _callee6(){var granted;return _regenerator.default.async(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:if(!(Platform.OS==='android')){_context6.next=7;break;}_context6.next=3;return _regenerator.default.awrap(_reactNative.PermissionsAndroid.request(_reactNative.PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES||_reactNative.PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE,{title:'Permission to access photos',message:'App needs access to your photos to pick images.',buttonNeutral:'Ask Me Later',buttonNegative:'Cancel',buttonPositive:'OK'}));case 3:granted=_context6.sent;if(!(granted!==_reactNative.PermissionsAndroid.RESULTS.GRANTED)){_context6.next=7;break;}console.log('Permission denied');return _context6.abrupt("return");case 7:_reactNativeImageCropPicker.default.openPicker({}).then(function(image){var _props$route10,_props$route10$params,_props$route11,_props$route11$params,_props$route13,_props$route13$params,_props$route14,_props$route14$params;if(props!=null&&(_props$route10=props.route)!=null&&(_props$route10$params=_props$route10.params)!=null&&_props$route10$params.front&&!((_props$route11=props.route)!=null&&(_props$route11$params=_props$route11.params)!=null&&_props$route11$params.callback)){var _props$route12,_props$route12$params;navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route12=props.route)==null?void 0:(_props$route12$params=_props$route12.params)==null?void 0:_props$route12$params.loan});}else if(!(props!=null&&(_props$route13=props.route)!=null&&(_props$route13$params=_props$route13.params)!=null&&_props$route13$params.front)&&!((_props$route14=props.route)!=null&&(_props$route14$params=_props$route14.params)!=null&&_props$route14$params.callback)){var _props$route15,_props$route15$params;navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route15=props.route)==null?void 0:(_props$route15$params=_props$route15.params)==null?void 0:_props$route15$params.loan});}else{var _props$route16,_props$route16$params;navigation.goBack();(_props$route16=props.route)==null?void 0:(_props$route16$params=_props$route16.params)==null?void 0:_props$route16$params.callback(Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path));}});case 8:case"end":return _context6.stop();}},null,null,null,Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:367,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:{alignItems:'center',position:'absolute',top:_reactNativeDeviceInfo.default.hasNotch()?70:24,left:0,right:0,zIndex:100},__self:this,__source:{fileName:_jsxFileName,lineNumber:371,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:10,top:4,width:24,height:24,alignItems:'center',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:381,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:395,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',padding:2,borderRadius:4,alignItems:'center',backgroundColor:'transparent'},__self:this,__source:{fileName:_jsxFileName,lineNumber:397,columnNumber:9}},_react.default.createElement(_reactNative.TouchableOpacity,{style:{},onPress:function onPress(){setType('passport');},__self:this,__source:{fileName:_jsxFileName,lineNumber:406,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:type==='passport'?['#FF8E4F','#EF592E']:['black','black'],style:{height:28,paddingHorizontal:8,borderRadius:4,width:100,flexDirection:'row',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:412,columnNumber:13}},_react.default.createElement(_icons.Cam2Svg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:427,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12,fontWeight:'bold',marginLeft:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:428,columnNumber:15}},"Ch\u1EE5p 2 m\u1EB7t"))),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'white',width:1,borderRadius:10,height:20,marginHorizontal:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:440,columnNumber:11}}),_react.default.createElement(_reactNative.TouchableOpacity,{style:{},onPress:function onPress(){setType('nfc');},__self:this,__source:{fileName:_jsxFileName,lineNumber:449,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:type==='nfc'?['#FF8E4F','#EF592E']:['black','black'],style:{height:28,paddingHorizontal:8,borderRadius:4,width:100,flexDirection:'row',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:455,columnNumber:13}},_react.default.createElement(_icons.ChipSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:468,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12,fontWeight:'bold',marginLeft:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:469,columnNumber:15}},"NFC")))),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,textAlign:'center',padding:16,marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:482,columnNumber:9}},type==='passport'&&props!=null&&(_props$route17=props.route)!=null&&(_props$route17$params=_props$route17.params)!=null&&_props$route17$params.front?'Chụp CMND/ CCCD mặt trước':type==='passport'?'Chụp CMND/ CCCD mặt sau':'Dùng camera để quét chuỗi ký tự mặt sau thẻ CCCD gắn chíp ở phía dưới')),passPermission&&type==='passport'&&shouldRenderCamera?_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.justifyCenter,{position:'absolute',width:_reactNative.Dimensions.get('window').width,height:_reactNative.Dimensions.get('window').height}],__self:this,__source:{fileName:_jsxFileName,lineNumber:500,columnNumber:9}},_react.default.createElement(_reactNativeCamera.RNCamera,{ref:myCamera,defaultVideoQuality:_reactNativeCamera.RNCamera.Constants.VideoQuality['720p'],style:{width:_reactNative.Dimensions.get('window').width,height:260,overflow:'hidden'},maxZoom:1,__self:this,__source:{fileName:_jsxFileName,lineNumber:512,columnNumber:11}},function(_ref){var camera=_ref.camera,status=_ref.status,recordAudioPermissionStatus=_ref.recordAudioPermissionStatus;if(status!=='READY')return _react.default.createElement(_reactNative.ActivityIndicator,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:523,columnNumber:46}});}),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){pickImageFromGallery();},style:{flexDirection:'row',alignItems:'center',gap:8,marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:526,columnNumber:11}},_react.default.createElement(_svgs.IconUpload,{__self:this,__source:{fileName:_jsxFileName,lineNumber:537,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:538,columnNumber:13}},"T\u1EA3i \u1EA3nh t\u1EEB th\u01B0 vi\u1EC7n")),_react.default.createElement(_reactNative.View,{style:styles.buttonContainer,__self:this,__source:{fileName:_jsxFileName,lineNumber:548,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:549,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},__self:this,__source:{fileName:_jsxFileName,lineNumber:560,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:565,columnNumber:15}})))):passPermission&&type==='nfc'&&shouldRenderCamera?_react.default.createElement(_react.default.Fragment,null,_react.default.createElement(_reactNativeCamera.RNCamera,{ref:myCamera,style:styles.camera,type:_reactNativeCamera.RNCamera.Constants.Type.back,captureAudio:false,__self:this,__source:{fileName:_jsxFileName,lineNumber:571,columnNumber:11}}),_react.default.createElement(_reactNative.View,{style:styles.overlay,__self:this,__source:{fileName:_jsxFileName,lineNumber:577,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:styles.overlayTop,__self:this,__source:{fileName:_jsxFileName,lineNumber:578,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:styles.overlayCenter,__self:this,__source:{fileName:_jsxFileName,lineNumber:579,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:styles.overlayLeft,__self:this,__source:{fileName:_jsxFileName,lineNumber:580,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRect,__self:this,__source:{fileName:_jsxFileName,lineNumber:581,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRight,__self:this,__source:{fileName:_jsxFileName,lineNumber:582,columnNumber:15}})),_react.default.createElement(_reactNative.View,{style:styles.overlayBottom,__self:this,__source:{fileName:_jsxFileName,lineNumber:584,columnNumber:13}})),_react.default.createElement(_reactNative.View,{style:styles.buttonContainer,__self:this,__source:{fileName:_jsxFileName,lineNumber:586,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:587,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t chu\u1ED7i k\xED t\u1EF1 n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){scanNfc();},__self:this,__source:{fileName:_jsxFileName,lineNumber:598,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:603,columnNumber:15}})))):_react.default.createElement(_react.default.Fragment,null),_react.default.createElement(_reactNativeModal.default,{isVisible:showModal,style:$modal,backdropTransitionInTiming:0,nimationOutTiming:200,animationInTiming:200,animationIn:'slideInUp',animationOut:'fadeOutDown',useNativeDriverForBackdrop:true,useNativeDriver:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:611,columnNumber:7}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF8E4F','#EF592E'],style:$container,__self:this,__source:{fileName:_jsxFileName,lineNumber:622,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:$paddingV,__self:this,__source:{fileName:_jsxFileName,lineNumber:623,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setShowModal(false);setTimeout(function(){navigation.goBack();},100);},style:{width:24,height:24,position:'absolute',left:16,top:24,alignItems:'center',zIndex:10000},__self:this,__source:{fileName:_jsxFileName,lineNumber:624,columnNumber:13}},_react.default.createElement(_icons.CloseIcon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:641,columnNumber:15}})),_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:643,columnNumber:13}},"NH\u1EACN DI\u1EC6N GI\u1EA4Y T\u1EDC T\xD9Y TH\xC2N"),_react.default.createElement(_MText.MText,{style:$description,__self:this,__source:{fileName:_jsxFileName,lineNumber:644,columnNumber:13}},"Ch\u1EE5p \u1EA3nh 2 m\u1EB7t ho\u1EB7c NFC CCCD/ CMND"),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/vehicleStep.png'),style:$step,__self:this,__source:{fileName:_jsxFileName,lineNumber:648,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:653,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'column',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:654,columnNumber:15}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011946.png'),style:{width:'60%',height:70,resizeMode:'contain',marginVertical:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:660,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:670,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:671,columnNumber:17}},"C\xE1ch 1: NFC (\xC1p d\u1EE5ng cho CCCD g\u1EAFn chip)"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:674,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:675,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:676,columnNumber:19}},"\u0110\u1EB7t ph\u1EA7n chip \u0111\u1ED3ng g\u1EA7n l\u1EA1i v\u1EDBi ph\u1EA7n ph\xEDa tr\xEAn c\u1EE7a",'\n',"m\u1EB7t l\u01B0ng \u0111i\u1EC7n tho\u1EA1i")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:681,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:682,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:683,columnNumber:19}},"Gi\u1EEF nguy\xEAn cho \u0111\u1EBFn khi \u0111\u1ECDc xong th\xF4ng tin th\u1EBB")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011953.png'),style:{width:'100%',height:70,resizeMode:'contain',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:687,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:697,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:698,columnNumber:17}},"C\xE1ch 2: Ch\u1EE5p 2 m\u1EB7t"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:701,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:702,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:703,columnNumber:19}},"N\xEAn \u0111\u1EB7t CCCD/ CMND l\xEAn m\u1EB7t ph\u1EB3ng \u0111\u1EC3 ch\u1EE5p")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:707,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:708,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:709,columnNumber:19}},"\u0110\u1EB7t CCCD/ CMND n\u1EB1m g\u1ECDn trong khung h\xECnh (Kh\xF4ng ",'\n'," qu\xE1 nh\u1ECF hay qu\xE1 to l\xE0m m\u1EA5t chi ti\u1EBFt)")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:714,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:715,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:716,columnNumber:19}},"Ch\u1ECDn n\u01A1i \xE1nh s\xE1ng t\u1ED1t, tr\xE1nh l\xF3a/ ch\xF3i h\xECnh ch\u1EE5p")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011947.png'),style:{width:'100%',height:80,resizeMode:'contain',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:720,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',margin:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:731,columnNumber:15}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setType('passport');setShowModal(false);(0,_storage.save)(_storage.OCR_V1,true);},style:{flex:1,borderWidth:1,borderColor:'#EF592E',height:40,alignItems:'center',justifyContent:'center',borderRadius:40,marginRight:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:738,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:755,columnNumber:19}},"Ch\u1EE5p 2 m\u1EB7t")),_react.default.createElement(_MButton.default,{style:{flex:1},onPress:function onPress(){setType('nfc');setShowModal(false);(0,_storage.save)(_storage.OCR_V1,true);},__self:this,__source:{fileName:_jsxFileName,lineNumber:764,columnNumber:17}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:774,columnNumber:19}},_react.default.createElement(_MText.MText,{style:{fontSize:16,color:'white'},__self:this,__source:{fileName:_jsxFileName,lineNumber:786,columnNumber:21}},"NFC")))))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:802,columnNumber:7}}));});var $row={flexDirection:'row',alignItems:'center',marginTop:5};var $txt={fontSize:12,marginLeft:5};var $bg={backgroundColor:'white',borderTopRightRadius:26,borderTopLeftRadius:26};var $step={height:40,width:'100%',resizeMode:'contain',marginTop:10,marginBottom:10};var $paddingV={paddingTop:16};var $title={fontSize:16,color:'white',fontWeight:'bold',textAlign:'center'};var $title2={fontSize:16,color:'#333333',fontWeight:'bold',textAlign:'center'};var $description={fontSize:12,color:'white',textAlign:'center'};var $flex={flex:1};var $modal={justifyContent:'flex-end',margin:0};var $container={borderTopRightRadius:26,borderTopLeftRadius:26};var styles=_reactNative.StyleSheet.create({container:{flex:1},camera:{flex:1},buttonContainer:{flex:0,flexDirection:'column',justifyContent:'center',alignItems:'center',position:'absolute',bottom:40,left:0,right:0,zIndex:1000},captureButton:{width:56,height:56,borderRadius:35,backgroundColor:'white',justifyContent:'center',alignItems:'center'},innerCaptureButton:{width:60,height:60,borderRadius:30,backgroundColor:'red'},overlay:{position:'absolute',top:0,left:0,right:0,bottom:0,justifyContent:'center',alignItems:'center'},overlayTop:{flex:1,backgroundColor:'black',width:'100%'},overlayCenter:{flexDirection:'row'},overlayLeft:{flex:1,backgroundColor:'black'},overlayRect:{width:'90%',height:100,borderColor:'white',borderWidth:2,justifyContent:'center',alignItems:'center'},instructionText:{color:'white',textAlign:'center',paddingHorizontal:10,fontSize:14,position:'absolute',top:-50},overlayRight:{flex:1,backgroundColor:'black'},overlayBottom:{flex:1,backgroundColor:'black',width:'100%'},mrzContainer:{padding:10},mrzText:{fontSize:16}});
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.OCR=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _MText=require("../../components/MText");var _storage=require("../../utils/storage");var _reactNativePermissions=require("react-native-permissions");var _reactNativeCamera=require("react-native-camera");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _icons=require("../../assets/icons");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _CommonStyles=require("../CommonStyles");var _native=require("@react-navigation/native");var _textRecognition=_interopRequireDefault(require("@react-native-ml-kit/text-recognition"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _svgs=require("../../assets/svgs");var _reactNativeImageCropPicker=_interopRequireDefault(require("react-native-image-crop-picker"));var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/OCR.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var NFCReader=_reactNative.NativeModules.NFCReader;var OCR=exports.OCR=(0,_mobxReactLite.observer)(function OCR(props){var _props$route17,_props$route17$params,_this=this;var isFocused=(0,_native.useIsFocused)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var navigation=(0,_native.useNavigation)();var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),showModal=_useState4[0],setShowModal=_useState4[1];var _useState5=(0,_react.useState)('passport'),_useState6=(0,_slicedToArray2.default)(_useState5,2),type=_useState6[0],setType=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),taking=_useState8[0],setTaking=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=(0,_slicedToArray2.default)(_useState9,2),passPermission=_useState10[0],setPassPermission=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=(0,_slicedToArray2.default)(_useState11,2),shouldRenderCamera=_useState12[0],setShouldRenderCamera=_useState12[1];var myCamera=(0,_react.useRef)(null);var requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(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(Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_reactNative.Alert.alert('Thông báo','Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(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(Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);var loadIntro=function _callee(){var intro;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return _regenerator.default.awrap((0,_storage.load)(_storage.OCR_V1));case 2:intro=_context.sent;if(!intro){setShowModal(true);}case 4:case"end":return _context.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){requestPermissions();loadIntro();},[]);(0,_react.useEffect)(function(){var unsubscribe=navigation.addListener('blur',function(){var _myCamera$current;(_myCamera$current=myCamera.current)==null?void 0:_myCamera$current.pausePreview();});return unsubscribe;},[navigation]);var saveDataNfc=function _callee2(body){var _props$route,_props$route$params,_props$route$params$l,response,_response$data,_response$data$meta,_response$data2,_response$data2$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return _regenerator.default.awrap(_api.Api.getInstance().saveNfcInfo((0,_extends2.default)({},body,{loanBriefId:props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:(_props$route$params$l=_props$route$params.loan)==null?void 0:_props$route$params$l.id})));case 3:response=_context2.sent;if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setTimeout(function(){var _props$route2,_props$route2$params;navigation.push(_navigation.ScreenNames.TTSSelfie,{loan:props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.loan});},500);}else{_reactNative.Alert.alert('Thông báo',response==null?void 0:(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=10;break;case 7:_context2.prev=7;_context2.t0=_context2["catch"](0);console.log(_context2.t0);case 10:case"end":return _context2.stop();}},null,null,[[0,7]],Promise);};var convertToDate=function convertToDate(input,end){var yearPrefix=input.substring(0,2);var year=end?'20'+yearPrefix:parseInt(yearPrefix)>20?'19'+yearPrefix:'20'+yearPrefix;var month=input.substring(2,4);var day=input.substring(4,6);return year+'-'+month+'-'+day;};var extractMRZInfo=function extractMRZInfo(text){var documentNumber='';var birthDate='';var expirationDate='';var regex1=/VNM(\d{9})/;var match1=text.match(regex1);if(match1){documentNumber=match1[1];}console.log('documentNumber',documentNumber);var regex=/(\d{6}).[MF](\d{6})/;var match=text.replace(/ /g,'').match(regex);if(match){console.log({documentNumber:documentNumber,birthDate:match[1],expirationDate:match[2]});birthDate=match[1],expirationDate=match[2];}else{return null;}if(documentNumber&&birthDate&&expirationDate){try{NFCReader.readNFCCard(documentNumber,convertToDate(birthDate,false),convertToDate(expirationDate,true),function(error,response){try{var convertData=JSON.parse(response);saveDataNfc(convertData);}catch(e){console.log(e);}});}catch(e){console.log(e);}}};var handleTextRecognition=function _callee3(imagePath){var result;return _regenerator.default.async(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _regenerator.default.awrap(_textRecognition.default.recognize(imagePath));case 3:result=_context3.sent;extractMRZInfo(result.text);_context3.next=10;break;case 7:_context3.prev=7;_context3.t0=_context3["catch"](0);console.log(_context3.t0);case 10:case"end":return _context3.stop();}},null,null,[[0,7]],Promise);};var scanNfc=function _callee4(){var options,data;return _regenerator.default.async(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!myCamera.current){_context4.next=7;break;}options={quality:0.8,base64:true};_context4.next=4;return _regenerator.default.awrap(myCamera.current.takePictureAsync(options));case 4:data=_context4.sent;_context4.next=7;return _regenerator.default.awrap(handleTextRecognition(data.uri));case 7:case"end":return _context4.stop();}},null,null,null,Promise);};var takePhoto=function _callee5(){var _props$route3,_props$route3$params,_props$route4,_props$route4$params,_props$route6,_props$route6$params,_props$route7,_props$route7$params;var options,data,_props$route5,_props$route5$params,_props$route8,_props$route8$params,_props$route9,_props$route9$params;return _regenerator.default.async(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:setTaking(true);options={base64:true,pauseAfterCapture:true,fixOrientation:false,forceUpOrientation:false,orientation:_reactNativeCamera.RNCamera.Constants.Orientation.portrait,quality:0.8,pictureSize:'1280x720'};_context5.next=4;return _regenerator.default.awrap(myCamera.current.takePictureAsync(options));case 4:data=_context5.sent;setTaking(false);if(props!=null&&(_props$route3=props.route)!=null&&(_props$route3$params=_props$route3.params)!=null&&_props$route3$params.front&&!((_props$route4=props.route)!=null&&(_props$route4$params=_props$route4.params)!=null&&_props$route4$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:data==null?void 0:data.uri,loan:props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:_props$route5$params.loan});}else if(!(props!=null&&(_props$route6=props.route)!=null&&(_props$route6$params=_props$route6.params)!=null&&_props$route6$params.front)&&!((_props$route7=props.route)!=null&&(_props$route7$params=_props$route7.params)!=null&&_props$route7$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:data==null?void 0:data.uri,loan:props==null?void 0:(_props$route8=props.route)==null?void 0:(_props$route8$params=_props$route8.params)==null?void 0:_props$route8$params.loan});}else{navigation.goBack();(_props$route9=props.route)==null?void 0:(_props$route9$params=_props$route9.params)==null?void 0:_props$route9$params.callback(data==null?void 0:data.uri);}case 7:case"end":return _context5.stop();}},null,null,null,Promise);};var hasAndroidPermission=function _callee6(){var getCheckPermissionPromise,hasPermission,getRequestPermissionPromise;return _regenerator.default.async(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:getCheckPermissionPromise=function getCheckPermissionPromise(){if(Number(Platform.Version)>=33){return Promise.all([_reactNative.PermissionsAndroid.check(_reactNative.PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES),_reactNative.PermissionsAndroid.check(_reactNative.PermissionsAndroid.PERMISSIONS.READ_MEDIA_VIDEO)]).then(function(_ref){var _ref2=(0,_slicedToArray2.default)(_ref,2),hasReadMediaImagesPermission=_ref2[0],hasReadMediaVideoPermission=_ref2[1];return hasReadMediaImagesPermission&&hasReadMediaVideoPermission;});}else{return _reactNative.PermissionsAndroid.check(_reactNative.PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE);}};_context6.next=3;return _regenerator.default.awrap(getCheckPermissionPromise());case 3:hasPermission=_context6.sent;if(!hasPermission){_context6.next=6;break;}return _context6.abrupt("return",true);case 6:getRequestPermissionPromise=function getRequestPermissionPromise(){if(Number(Platform.Version)>=33){return _reactNative.PermissionsAndroid.requestMultiple([_reactNative.PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES,_reactNative.PermissionsAndroid.PERMISSIONS.READ_MEDIA_VIDEO]).then(function(statuses){return statuses[_reactNative.PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES]===_reactNative.PermissionsAndroid.RESULTS.GRANTED&&statuses[_reactNative.PermissionsAndroid.PERMISSIONS.READ_MEDIA_VIDEO]===_reactNative.PermissionsAndroid.RESULTS.GRANTED;});}else{return _reactNative.PermissionsAndroid.request(_reactNative.PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE).then(function(status){return status===_reactNative.PermissionsAndroid.RESULTS.GRANTED;});}};_context6.next=9;return _regenerator.default.awrap(getRequestPermissionPromise());case 9:return _context6.abrupt("return",_context6.sent);case 10:case"end":return _context6.stop();}},null,null,null,Promise);};var pickImageFromGallery=function _callee7(){return _regenerator.default.async(function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return _regenerator.default.awrap(hasAndroidPermission());case 2:_reactNativeImageCropPicker.default.openPicker({}).then(function(image){var _props$route10,_props$route10$params,_props$route11,_props$route11$params,_props$route13,_props$route13$params,_props$route14,_props$route14$params;if(props!=null&&(_props$route10=props.route)!=null&&(_props$route10$params=_props$route10.params)!=null&&_props$route10$params.front&&!((_props$route11=props.route)!=null&&(_props$route11$params=_props$route11.params)!=null&&_props$route11$params.callback)){var _props$route12,_props$route12$params;navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route12=props.route)==null?void 0:(_props$route12$params=_props$route12.params)==null?void 0:_props$route12$params.loan});}else if(!(props!=null&&(_props$route13=props.route)!=null&&(_props$route13$params=_props$route13.params)!=null&&_props$route13$params.front)&&!((_props$route14=props.route)!=null&&(_props$route14$params=_props$route14.params)!=null&&_props$route14$params.callback)){var _props$route15,_props$route15$params;navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route15=props.route)==null?void 0:(_props$route15$params=_props$route15.params)==null?void 0:_props$route15$params.loan});}else{var _props$route16,_props$route16$params;navigation.goBack();(_props$route16=props.route)==null?void 0:(_props$route16$params=_props$route16.params)==null?void 0:_props$route16$params.callback(Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path));}});case 3:case"end":return _context7.stop();}},null,null,null,Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:397,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:{alignItems:'center',position:'absolute',top:_reactNativeDeviceInfo.default.hasNotch()?70:24,left:0,right:0,zIndex:100},__self:this,__source:{fileName:_jsxFileName,lineNumber:401,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:10,top:4,width:24,height:24,alignItems:'center',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:411,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:425,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',padding:2,borderRadius:4,alignItems:'center',backgroundColor:'transparent'},__self:this,__source:{fileName:_jsxFileName,lineNumber:427,columnNumber:9}},_react.default.createElement(_reactNative.TouchableOpacity,{style:{},onPress:function onPress(){setType('passport');},__self:this,__source:{fileName:_jsxFileName,lineNumber:436,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:type==='passport'?['#FF8E4F','#EF592E']:['black','black'],style:{height:28,paddingHorizontal:8,borderRadius:4,width:100,flexDirection:'row',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:442,columnNumber:13}},_react.default.createElement(_icons.Cam2Svg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:457,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12,fontWeight:'bold',marginLeft:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:458,columnNumber:15}},"Ch\u1EE5p 2 m\u1EB7t"))),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'white',width:1,borderRadius:10,height:20,marginHorizontal:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:470,columnNumber:11}}),_react.default.createElement(_reactNative.TouchableOpacity,{style:{},onPress:function onPress(){setType('nfc');},__self:this,__source:{fileName:_jsxFileName,lineNumber:479,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:type==='nfc'?['#FF8E4F','#EF592E']:['black','black'],style:{height:28,paddingHorizontal:8,borderRadius:4,width:100,flexDirection:'row',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:485,columnNumber:13}},_react.default.createElement(_icons.ChipSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:498,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12,fontWeight:'bold',marginLeft:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:499,columnNumber:15}},"NFC")))),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,textAlign:'center',padding:16,marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:512,columnNumber:9}},type==='passport'&&props!=null&&(_props$route17=props.route)!=null&&(_props$route17$params=_props$route17.params)!=null&&_props$route17$params.front?'Chụp CMND/ CCCD mặt trước':type==='passport'?'Chụp CMND/ CCCD mặt sau':'Dùng camera để quét chuỗi ký tự mặt sau thẻ CCCD gắn chíp ở phía dưới')),passPermission&&type==='passport'&&shouldRenderCamera?_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.justifyCenter,{position:'absolute',width:_reactNative.Dimensions.get('window').width,height:_reactNative.Dimensions.get('window').height}],__self:this,__source:{fileName:_jsxFileName,lineNumber:530,columnNumber:9}},_react.default.createElement(_reactNativeCamera.RNCamera,{ref:myCamera,defaultVideoQuality:_reactNativeCamera.RNCamera.Constants.VideoQuality['720p'],style:{width:_reactNative.Dimensions.get('window').width,height:260,overflow:'hidden'},maxZoom:1,__self:this,__source:{fileName:_jsxFileName,lineNumber:542,columnNumber:11}},function(_ref3){var camera=_ref3.camera,status=_ref3.status,recordAudioPermissionStatus=_ref3.recordAudioPermissionStatus;if(status!=='READY')return _react.default.createElement(_reactNative.ActivityIndicator,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:553,columnNumber:46}});}),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){pickImageFromGallery();},style:{flexDirection:'row',alignItems:'center',gap:8,marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:556,columnNumber:11}},_react.default.createElement(_svgs.IconUpload,{__self:this,__source:{fileName:_jsxFileName,lineNumber:567,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:568,columnNumber:13}},"T\u1EA3i \u1EA3nh t\u1EEB th\u01B0 vi\u1EC7n")),_react.default.createElement(_reactNative.View,{style:styles.buttonContainer,__self:this,__source:{fileName:_jsxFileName,lineNumber:578,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:579,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},__self:this,__source:{fileName:_jsxFileName,lineNumber:590,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:595,columnNumber:15}})))):passPermission&&type==='nfc'&&shouldRenderCamera?_react.default.createElement(_react.default.Fragment,null,_react.default.createElement(_reactNativeCamera.RNCamera,{ref:myCamera,style:styles.camera,type:_reactNativeCamera.RNCamera.Constants.Type.back,captureAudio:false,__self:this,__source:{fileName:_jsxFileName,lineNumber:601,columnNumber:11}}),_react.default.createElement(_reactNative.View,{style:styles.overlay,__self:this,__source:{fileName:_jsxFileName,lineNumber:607,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:styles.overlayTop,__self:this,__source:{fileName:_jsxFileName,lineNumber:608,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:styles.overlayCenter,__self:this,__source:{fileName:_jsxFileName,lineNumber:609,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:styles.overlayLeft,__self:this,__source:{fileName:_jsxFileName,lineNumber:610,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRect,__self:this,__source:{fileName:_jsxFileName,lineNumber:611,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRight,__self:this,__source:{fileName:_jsxFileName,lineNumber:612,columnNumber:15}})),_react.default.createElement(_reactNative.View,{style:styles.overlayBottom,__self:this,__source:{fileName:_jsxFileName,lineNumber:614,columnNumber:13}})),_react.default.createElement(_reactNative.View,{style:styles.buttonContainer,__self:this,__source:{fileName:_jsxFileName,lineNumber:616,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:617,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t chu\u1ED7i k\xED t\u1EF1 n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){scanNfc();},__self:this,__source:{fileName:_jsxFileName,lineNumber:628,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:633,columnNumber:15}})))):_react.default.createElement(_react.default.Fragment,null),_react.default.createElement(_reactNativeModal.default,{isVisible:showModal,style:$modal,backdropTransitionInTiming:0,nimationOutTiming:200,animationInTiming:200,animationIn:'slideInUp',animationOut:'fadeOutDown',useNativeDriverForBackdrop:true,useNativeDriver:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:641,columnNumber:7}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF8E4F','#EF592E'],style:$container,__self:this,__source:{fileName:_jsxFileName,lineNumber:652,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:$paddingV,__self:this,__source:{fileName:_jsxFileName,lineNumber:653,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setShowModal(false);setTimeout(function(){navigation.goBack();},100);},style:{width:24,height:24,position:'absolute',left:16,top:24,alignItems:'center',zIndex:10000},__self:this,__source:{fileName:_jsxFileName,lineNumber:654,columnNumber:13}},_react.default.createElement(_icons.CloseIcon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:671,columnNumber:15}})),_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:673,columnNumber:13}},"NH\u1EACN DI\u1EC6N GI\u1EA4Y T\u1EDC T\xD9Y TH\xC2N"),_react.default.createElement(_MText.MText,{style:$description,__self:this,__source:{fileName:_jsxFileName,lineNumber:674,columnNumber:13}},"Ch\u1EE5p \u1EA3nh 2 m\u1EB7t ho\u1EB7c NFC CCCD/ CMND"),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/vehicleStep.png'),style:$step,__self:this,__source:{fileName:_jsxFileName,lineNumber:678,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:683,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'column',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:684,columnNumber:15}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011946.png'),style:{width:'60%',height:70,resizeMode:'contain',marginVertical:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:690,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:700,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:701,columnNumber:17}},"C\xE1ch 1: NFC (\xC1p d\u1EE5ng cho CCCD g\u1EAFn chip)"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:704,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:705,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:706,columnNumber:19}},"\u0110\u1EB7t ph\u1EA7n chip \u0111\u1ED3ng g\u1EA7n l\u1EA1i v\u1EDBi ph\u1EA7n ph\xEDa tr\xEAn c\u1EE7a",'\n',"m\u1EB7t l\u01B0ng \u0111i\u1EC7n tho\u1EA1i")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:711,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:712,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:713,columnNumber:19}},"Gi\u1EEF nguy\xEAn cho \u0111\u1EBFn khi \u0111\u1ECDc xong th\xF4ng tin th\u1EBB")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011953.png'),style:{width:'100%',height:70,resizeMode:'contain',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:717,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:727,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:728,columnNumber:17}},"C\xE1ch 2: Ch\u1EE5p 2 m\u1EB7t"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:731,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:732,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:733,columnNumber:19}},"N\xEAn \u0111\u1EB7t CCCD/ CMND l\xEAn m\u1EB7t ph\u1EB3ng \u0111\u1EC3 ch\u1EE5p")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:737,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:738,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:739,columnNumber:19}},"\u0110\u1EB7t CCCD/ CMND n\u1EB1m g\u1ECDn trong khung h\xECnh (Kh\xF4ng ",'\n'," qu\xE1 nh\u1ECF hay qu\xE1 to l\xE0m m\u1EA5t chi ti\u1EBFt)")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:744,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:745,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:746,columnNumber:19}},"Ch\u1ECDn n\u01A1i \xE1nh s\xE1ng t\u1ED1t, tr\xE1nh l\xF3a/ ch\xF3i h\xECnh ch\u1EE5p")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011947.png'),style:{width:'100%',height:80,resizeMode:'contain',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:750,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',margin:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:761,columnNumber:15}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setType('passport');setShowModal(false);(0,_storage.save)(_storage.OCR_V1,true);},style:{flex:1,borderWidth:1,borderColor:'#EF592E',height:40,alignItems:'center',justifyContent:'center',borderRadius:40,marginRight:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:768,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:785,columnNumber:19}},"Ch\u1EE5p 2 m\u1EB7t")),_react.default.createElement(_MButton.default,{style:{flex:1},onPress:function onPress(){setType('nfc');setShowModal(false);(0,_storage.save)(_storage.OCR_V1,true);},__self:this,__source:{fileName:_jsxFileName,lineNumber:794,columnNumber:17}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:804,columnNumber:19}},_react.default.createElement(_MText.MText,{style:{fontSize:16,color:'white'},__self:this,__source:{fileName:_jsxFileName,lineNumber:816,columnNumber:21}},"NFC")))))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:832,columnNumber:7}}));});var $row={flexDirection:'row',alignItems:'center',marginTop:5};var $txt={fontSize:12,marginLeft:5};var $bg={backgroundColor:'white',borderTopRightRadius:26,borderTopLeftRadius:26};var $step={height:40,width:'100%',resizeMode:'contain',marginTop:10,marginBottom:10};var $paddingV={paddingTop:16};var $title={fontSize:16,color:'white',fontWeight:'bold',textAlign:'center'};var $title2={fontSize:16,color:'#333333',fontWeight:'bold',textAlign:'center'};var $description={fontSize:12,color:'white',textAlign:'center'};var $flex={flex:1};var $modal={justifyContent:'flex-end',margin:0};var $container={borderTopRightRadius:26,borderTopLeftRadius:26};var styles=_reactNative.StyleSheet.create({container:{flex:1},camera:{flex:1},buttonContainer:{flex:0,flexDirection:'column',justifyContent:'center',alignItems:'center',position:'absolute',bottom:40,left:0,right:0,zIndex:1000},captureButton:{width:56,height:56,borderRadius:35,backgroundColor:'white',justifyContent:'center',alignItems:'center'},innerCaptureButton:{width:60,height:60,borderRadius:30,backgroundColor:'red'},overlay:{position:'absolute',top:0,left:0,right:0,bottom:0,justifyContent:'center',alignItems:'center'},overlayTop:{flex:1,backgroundColor:'black',width:'100%'},overlayCenter:{flexDirection:'row'},overlayLeft:{flex:1,backgroundColor:'black'},overlayRect:{width:'90%',height:100,borderColor:'white',borderWidth:2,justifyContent:'center',alignItems:'center'},instructionText:{color:'white',textAlign:'center',paddingHorizontal:10,fontSize:14,position:'absolute',top:-50},overlayRight:{flex:1,backgroundColor:'black'},overlayBottom:{flex:1,backgroundColor:'black',width:'100%'},mrzContainer:{padding:10},mrzText:{fontSize:16}});
|
|
2
2
|
//# sourceMappingURL=OCR.js.map
|
|
@@ -319,25 +319,55 @@ export const OCR = observer(function OCR(props: any) {
|
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
321
|
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
PermissionsAndroid.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
322
|
+
const hasAndroidPermission = async () => {
|
|
323
|
+
const getCheckPermissionPromise = () => {
|
|
324
|
+
if (Number(Platform.Version) >= 33) {
|
|
325
|
+
return Promise.all([
|
|
326
|
+
PermissionsAndroid.check(
|
|
327
|
+
PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES
|
|
328
|
+
),
|
|
329
|
+
PermissionsAndroid.check(
|
|
330
|
+
PermissionsAndroid.PERMISSIONS.READ_MEDIA_VIDEO
|
|
331
|
+
),
|
|
332
|
+
]).then(
|
|
333
|
+
([hasReadMediaImagesPermission, hasReadMediaVideoPermission]) =>
|
|
334
|
+
hasReadMediaImagesPermission && hasReadMediaVideoPermission
|
|
335
|
+
);
|
|
336
|
+
} else {
|
|
337
|
+
return PermissionsAndroid.check(
|
|
338
|
+
PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE
|
|
339
|
+
);
|
|
339
340
|
}
|
|
341
|
+
};
|
|
342
|
+
const hasPermission = await getCheckPermissionPromise();
|
|
343
|
+
if (hasPermission) {
|
|
344
|
+
return true;
|
|
340
345
|
}
|
|
346
|
+
|
|
347
|
+
const getRequestPermissionPromise = () => {
|
|
348
|
+
if (Number(Platform.Version) >= 33) {
|
|
349
|
+
return PermissionsAndroid.requestMultiple([
|
|
350
|
+
PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES,
|
|
351
|
+
PermissionsAndroid.PERMISSIONS.READ_MEDIA_VIDEO,
|
|
352
|
+
]).then(
|
|
353
|
+
(statuses) =>
|
|
354
|
+
statuses[PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES] ===
|
|
355
|
+
PermissionsAndroid.RESULTS.GRANTED &&
|
|
356
|
+
statuses[PermissionsAndroid.PERMISSIONS.READ_MEDIA_VIDEO] ===
|
|
357
|
+
PermissionsAndroid.RESULTS.GRANTED
|
|
358
|
+
);
|
|
359
|
+
} else {
|
|
360
|
+
return PermissionsAndroid.request(
|
|
361
|
+
PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE
|
|
362
|
+
).then((status) => status === PermissionsAndroid.RESULTS.GRANTED);
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
return await getRequestPermissionPromise();
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
const pickImageFromGallery = async () => {
|
|
370
|
+
await hasAndroidPermission();
|
|
341
371
|
ImagePicker.openPicker({}).then((image) => {
|
|
342
372
|
if (props?.route?.params?.front && !props.route?.params?.callback) {
|
|
343
373
|
navigation.push(ScreenNames.TTSNationalIDFront, {
|