@transfergratis/react-native-sdk 0.1.3 → 0.1.5

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.
Files changed (308) hide show
  1. package/android/.idea/caches/deviceStreaming.xml +860 -0
  2. package/android/build/.transforms/{7ec900c0f64f5f1a7c88998dd44001b8 → 01c28d00c798aa4846f16ce72123ebf9}/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -0
  4. package/android/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
  5. package/android/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
  6. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  7. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
  8. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  9. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +51 -48
  10. package/android/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-transfergratis-react-native-sdk.jar +0 -0
  11. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -0
  12. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  13. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  14. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  15. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  16. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  17. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  18. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  19. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  20. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  21. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  22. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  23. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  24. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  25. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  26. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  27. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  28. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  29. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  30. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  31. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  32. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  33. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
  34. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  51. package/android/build/outputs/aar/transfergratis-react-native-sdk-debug.aar +0 -0
  52. package/android/build/outputs/logs/manifest-merger-debug-report.txt +27 -23
  53. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule.class +0 -0
  54. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkView.class +0 -0
  55. package/android/build.gradle +1 -5
  56. package/android/src/main/AndroidManifest.xml +1 -0
  57. package/build/api/axios.d.ts +30 -0
  58. package/build/api/axios.d.ts.map +1 -0
  59. package/build/api/axios.js +92 -0
  60. package/build/api/axios.js.map +1 -0
  61. package/build/components/EnhancedCameraView.d.ts +1 -41
  62. package/build/components/EnhancedCameraView.d.ts.map +1 -1
  63. package/build/components/EnhancedCameraView.js +76 -35
  64. package/build/components/EnhancedCameraView.js.map +1 -1
  65. package/build/components/EnhancedCameraView.web.d.ts +1 -41
  66. package/build/components/EnhancedCameraView.web.d.ts.map +1 -1
  67. package/build/components/EnhancedCameraView.web.js +28 -4
  68. package/build/components/EnhancedCameraView.web.js.map +1 -1
  69. package/build/components/KYCElements/CountrySelectionTemplate.d.ts +2 -2
  70. package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -1
  71. package/build/components/KYCElements/CountrySelectionTemplate.js +71 -114
  72. package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -1
  73. package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -1
  74. package/build/components/KYCElements/FileUploadTemplate.js +7 -3
  75. package/build/components/KYCElements/FileUploadTemplate.js.map +1 -1
  76. package/build/components/KYCElements/IDCardCapture.d.ts +7 -2
  77. package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
  78. package/build/components/KYCElements/IDCardCapture.js +253 -104
  79. package/build/components/KYCElements/IDCardCapture.js.map +1 -1
  80. package/build/components/KYCElements/InitializationStep.d.ts +5 -0
  81. package/build/components/KYCElements/InitializationStep.d.ts.map +1 -0
  82. package/build/components/KYCElements/InitializationStep.js +41 -0
  83. package/build/components/KYCElements/InitializationStep.js.map +1 -0
  84. package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -1
  85. package/build/components/KYCElements/LocationCaptureTemplate.js +15 -13
  86. package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -1
  87. package/build/components/KYCElements/OrientationVideoCapture.d.ts +2 -2
  88. package/build/components/KYCElements/OrientationVideoCapture.d.ts.map +1 -1
  89. package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -1
  90. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts +2 -2
  91. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts.map +1 -1
  92. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -1
  93. package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts +2 -2
  94. package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts.map +1 -1
  95. package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -1
  96. package/build/components/KYCElements/ReviewSubmitTemplate.d.ts +12 -0
  97. package/build/components/KYCElements/ReviewSubmitTemplate.d.ts.map +1 -0
  98. package/build/components/KYCElements/ReviewSubmitTemplate.js +171 -0
  99. package/build/components/KYCElements/ReviewSubmitTemplate.js.map +1 -0
  100. package/build/components/KYCElements/SelfieCaptureTemplate.d.ts +6 -2
  101. package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
  102. package/build/components/KYCElements/SelfieCaptureTemplate.js +105 -35
  103. package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
  104. package/build/components/KYCElements/VerificationProgressTemplate.d.ts +12 -0
  105. package/build/components/KYCElements/VerificationProgressTemplate.d.ts.map +1 -0
  106. package/build/components/KYCElements/VerificationProgressTemplate.js +93 -0
  107. package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -0
  108. package/build/components/OverLay/IdCard.d.ts +1 -1
  109. package/build/components/OverLay/IdCard.d.ts.map +1 -1
  110. package/build/components/OverLay/IdCard.js +10 -6
  111. package/build/components/OverLay/IdCard.js.map +1 -1
  112. package/build/components/OverLay/SelfieOverlay.d.ts +1 -1
  113. package/build/components/OverLay/SelfieOverlay.d.ts.map +1 -1
  114. package/build/components/OverLay/SelfieOverlay.js +5 -4
  115. package/build/components/OverLay/SelfieOverlay.js.map +1 -1
  116. package/build/components/OverLay/type.d.ts +71 -1
  117. package/build/components/OverLay/type.d.ts.map +1 -1
  118. package/build/components/OverLay/type.js.map +1 -1
  119. package/build/components/TemplateKYCExample.d.ts.map +1 -1
  120. package/build/components/TemplateKYCExample.js +72 -197
  121. package/build/components/TemplateKYCExample.js.map +1 -1
  122. package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
  123. package/build/components/TemplateKYCFlowRefactored.js +63 -39
  124. package/build/components/TemplateKYCFlowRefactored.js.map +1 -1
  125. package/build/components/VisionCameraView.js +1 -1
  126. package/build/components/VisionCameraView.js.map +1 -1
  127. package/build/components/example/OrientationVideoExample.d.ts.map +1 -1
  128. package/build/components/example/OrientationVideoExample.js +1 -5
  129. package/build/components/example/OrientationVideoExample.js.map +1 -1
  130. package/build/components/ui/Button.js +1 -1
  131. package/build/components/ui/Button.js.map +1 -1
  132. package/build/config/countriesData.d.ts +3 -0
  133. package/build/config/countriesData.d.ts.map +1 -0
  134. package/build/config/countriesData.js +79 -0
  135. package/build/config/countriesData.js.map +1 -0
  136. package/build/config/region_mapping.d.ts +3 -0
  137. package/build/config/region_mapping.d.ts.map +1 -0
  138. package/build/config/region_mapping.js +687 -0
  139. package/build/config/region_mapping.js.map +1 -0
  140. package/build/hooks/useI18n.d.ts +11 -0
  141. package/build/hooks/useI18n.d.ts.map +1 -0
  142. package/build/hooks/useI18n.js +37 -0
  143. package/build/hooks/useI18n.js.map +1 -0
  144. package/build/hooks/useOrientationVideo.d.ts +1 -2
  145. package/build/hooks/useOrientationVideo.d.ts.map +1 -1
  146. package/build/hooks/useOrientationVideo.js +2 -1
  147. package/build/hooks/useOrientationVideo.js.map +1 -1
  148. package/build/hooks/useRealtimeVerifier.d.ts +28 -0
  149. package/build/hooks/useRealtimeVerifier.d.ts.map +1 -0
  150. package/build/hooks/useRealtimeVerifier.js +91 -0
  151. package/build/hooks/useRealtimeVerifier.js.map +1 -0
  152. package/build/hooks/useTemplateKYCFlow.d.ts +1 -0
  153. package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
  154. package/build/hooks/useTemplateKYCFlow.js +337 -38
  155. package/build/hooks/useTemplateKYCFlow.js.map +1 -1
  156. package/build/i18n/en/index.d.ts +168 -0
  157. package/build/i18n/en/index.d.ts.map +1 -0
  158. package/build/i18n/en/index.js +195 -0
  159. package/build/i18n/en/index.js.map +1 -0
  160. package/build/i18n/fr/index.d.ts +168 -0
  161. package/build/i18n/fr/index.d.ts.map +1 -0
  162. package/build/i18n/fr/index.js +194 -0
  163. package/build/i18n/fr/index.js.map +1 -0
  164. package/build/i18n/index.d.ts +10 -0
  165. package/build/i18n/index.d.ts.map +1 -0
  166. package/build/i18n/index.js +56 -0
  167. package/build/i18n/index.js.map +1 -0
  168. package/build/i18n/types.d.ts +153 -0
  169. package/build/i18n/types.d.ts.map +1 -0
  170. package/build/i18n/types.js +3 -0
  171. package/build/i18n/types.js.map +1 -0
  172. package/build/i18n/usage-example.d.ts +4 -0
  173. package/build/i18n/usage-example.d.ts.map +1 -0
  174. package/build/i18n/usage-example.js +189 -0
  175. package/build/i18n/usage-example.js.map +1 -0
  176. package/build/modules/api/CardAuthentification.d.ts +22 -0
  177. package/build/modules/api/CardAuthentification.d.ts.map +1 -0
  178. package/build/modules/api/CardAuthentification.js +107 -0
  179. package/build/modules/api/CardAuthentification.js.map +1 -0
  180. package/build/modules/api/KYCService.d.ts +57 -1
  181. package/build/modules/api/KYCService.d.ts.map +1 -1
  182. package/build/modules/api/KYCService.js +348 -27
  183. package/build/modules/api/KYCService.js.map +1 -1
  184. package/build/modules/api/SelfieVerification.d.ts +3 -0
  185. package/build/modules/api/SelfieVerification.d.ts.map +1 -0
  186. package/build/modules/api/SelfieVerification.js +9 -0
  187. package/build/modules/api/SelfieVerification.js.map +1 -0
  188. package/build/modules/api/backendApi.d.ts +2 -0
  189. package/build/modules/api/backendApi.d.ts.map +1 -0
  190. package/build/modules/api/backendApi.js +6 -0
  191. package/build/modules/api/backendApi.js.map +1 -0
  192. package/build/modules/api/types.d.ts +20 -0
  193. package/build/modules/api/types.d.ts.map +1 -0
  194. package/build/modules/api/types.js +2 -0
  195. package/build/modules/api/types.js.map +1 -0
  196. package/build/modules/camera/VisionCameraModule.d.ts +1 -1
  197. package/build/modules/camera/VisionCameraModule.d.ts.map +1 -1
  198. package/build/modules/camera/VisionCameraModule.js +8 -2
  199. package/build/modules/camera/VisionCameraModule.js.map +1 -1
  200. package/build/types/KYC.types.d.ts +59 -7
  201. package/build/types/KYC.types.d.ts.map +1 -1
  202. package/build/types/KYC.types.js +9 -1
  203. package/build/types/KYC.types.js.map +1 -1
  204. package/build/utils/cropByObb.d.ts +11 -0
  205. package/build/utils/cropByObb.d.ts.map +1 -0
  206. package/build/utils/cropByObb.js +78 -0
  207. package/build/utils/cropByObb.js.map +1 -0
  208. package/build/utils/get-document-type-info.d.ts +13 -0
  209. package/build/utils/get-document-type-info.d.ts.map +1 -0
  210. package/build/utils/get-document-type-info.js +59 -0
  211. package/build/utils/get-document-type-info.js.map +1 -0
  212. package/build/utils/pathToBase64.d.ts +3 -0
  213. package/build/utils/pathToBase64.d.ts.map +1 -0
  214. package/build/utils/pathToBase64.js +47 -0
  215. package/build/utils/pathToBase64.js.map +1 -0
  216. package/build/utils/remove-duplicate.d.ts +2 -0
  217. package/build/utils/remove-duplicate.d.ts.map +1 -0
  218. package/build/utils/remove-duplicate.js +4 -0
  219. package/build/utils/remove-duplicate.js.map +1 -0
  220. package/package.json +3 -1
  221. package/src/api/axios.ts +144 -0
  222. package/src/components/EnhancedCameraView.tsx +96 -78
  223. package/src/components/EnhancedCameraView.web.tsx +41 -40
  224. package/src/components/KYCElements/CountrySelectionTemplate.tsx +104 -136
  225. package/src/components/KYCElements/FileUploadTemplate.tsx +14 -8
  226. package/src/components/KYCElements/IDCardCapture.tsx +311 -115
  227. package/src/components/KYCElements/InitializationStep.tsx +53 -0
  228. package/src/components/KYCElements/LocationCaptureTemplate.tsx +17 -15
  229. package/src/components/KYCElements/OrientationVideoCapture.tsx +2 -2
  230. package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +2 -2
  231. package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +2 -2
  232. package/src/components/KYCElements/ReviewSubmitTemplate.tsx +201 -0
  233. package/src/components/KYCElements/SelfieCaptureTemplate.tsx +140 -53
  234. package/src/components/KYCElements/VerificationProgressTemplate.tsx +123 -0
  235. package/src/components/OverLay/IdCard.tsx +17 -9
  236. package/src/components/OverLay/SelfieOverlay.tsx +6 -5
  237. package/src/components/OverLay/type.ts +64 -2
  238. package/src/components/TemplateKYCExample.tsx +76 -197
  239. package/src/components/TemplateKYCFlowRefactored.tsx +74 -46
  240. package/src/components/VisionCameraView.tsx +1 -1
  241. package/src/components/example/OrientationVideoExample.tsx +3 -7
  242. package/src/components/ui/Button.tsx +1 -1
  243. package/src/config/countriesData.ts +84 -0
  244. package/src/config/region_mapping.ts +688 -0
  245. package/src/hooks/useI18n.ts +53 -0
  246. package/src/hooks/useOrientationVideo.ts +2 -2
  247. package/src/hooks/useRealtimeVerifier.ts +128 -0
  248. package/src/hooks/useTemplateKYCFlow.tsx +375 -53
  249. package/src/i18n/README.md +288 -0
  250. package/src/i18n/en/index.ts +206 -0
  251. package/src/i18n/fr/index.ts +205 -0
  252. package/src/i18n/index.ts +65 -0
  253. package/src/i18n/types.ts +172 -0
  254. package/src/i18n/usage-example.tsx +202 -0
  255. package/src/modules/api/CardAuthentification.ts +114 -0
  256. package/src/modules/api/KYCService.ts +403 -30
  257. package/src/modules/api/SelfieVerification.ts +11 -0
  258. package/src/modules/api/backendApi.ts +8 -0
  259. package/src/modules/api/types.ts +24 -0
  260. package/src/modules/camera/VisionCameraModule.ts +16 -7
  261. package/src/types/KYC.types.ts +83 -14
  262. package/src/utils/cropByObb.ts +99 -0
  263. package/src/utils/get-document-type-info.ts +62 -0
  264. package/src/utils/pathToBase64.ts +47 -0
  265. package/src/utils/remove-duplicate.ts +3 -0
  266. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/results.bin +0 -1
  267. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/BuildConfig.dex +0 -0
  268. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.dex +0 -0
  269. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.dex +0 -0
  270. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.dex +0 -0
  271. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.dex +0 -0
  272. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.dex +0 -0
  273. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.dex +0 -0
  274. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.dex +0 -0
  275. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.dex +0 -0
  276. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.dex +0 -0
  277. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.dex +0 -0
  278. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.dex +0 -0
  279. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.dex +0 -0
  280. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.dex +0 -0
  281. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.dex +0 -0
  282. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.dex +0 -0
  283. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule.dex +0 -0
  284. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkView.dex +0 -0
  285. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  286. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/BuildConfig.class +0 -0
  287. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
  288. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
  289. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
  290. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
  291. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
  292. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
  293. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
  294. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
  295. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
  296. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
  297. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
  298. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
  299. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  300. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
  301. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
  302. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule.class +0 -0
  303. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkView.class +0 -0
  304. package/android/build/tmp/kotlin-classes/debug/META-INF/transfergratis-sdk_debug.kotlin_module +0 -0
  305. package/src/types/nativewind.d.ts +0 -2
  306. /package/android/build/.transforms/{7ec900c0f64f5f1a7c88998dd44001b8 → 01c28d00c798aa4846f16ce72123ebf9}/results.bin +0 -0
  307. /package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/{transfergratis-sdk_debug.kotlin_module → transfergratis-react-native-sdk_debug.kotlin_module} +0 -0
  308. /package/android/build/{intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/transfergratis-sdk_debug.kotlin_module → tmp/kotlin-classes/debug/META-INF/transfergratis-react-native-sdk_debug.kotlin_module} +0 -0
@@ -0,0 +1,5 @@
1
+ import { SessionState } from "../../types/KYC.types";
2
+ export declare const InitializationStep: ({ session }: {
3
+ session: SessionState;
4
+ }) => import("react").JSX.Element;
5
+ //# sourceMappingURL=InitializationStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitializationStep.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/InitializationStep.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAKpD,eAAO,MAAM,kBAAkB,GAAI,aAAa;IAAE,OAAO,EAAE,YAAY,CAAA;CAAE,gCA0BxE,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { ActivityIndicator, Button, StyleSheet, Text, View } from "react-native";
2
+ import { useEffect } from "react";
3
+ import { useTemplateKYCFlowContext } from "../../hooks/useTemplateKYCFlow";
4
+ import { useI18n } from "../../hooks/useI18n";
5
+ export const InitializationStep = ({ session }) => {
6
+ const { t } = useI18n();
7
+ const { initializeSession } = useTemplateKYCFlowContext();
8
+ useEffect(() => {
9
+ initializeSession();
10
+ }, []);
11
+ if (session.error) {
12
+ return (<View style={styles.container}>
13
+ <Text style={styles.errorText}>{t('errors.serverError')}</Text>
14
+ <Button title={t('common.retry')} onPress={initializeSession}/>
15
+ </View>);
16
+ }
17
+ return (<View style={styles.container}>
18
+ <Text style={styles.initializingText}>{t('common.loading')}</Text>
19
+ {session.isProcessing && (<ActivityIndicator size="large" color="#0000ff"/>)}
20
+ </View>);
21
+ };
22
+ const styles = StyleSheet.create({
23
+ container: {
24
+ flex: 1,
25
+ justifyContent: 'center',
26
+ alignItems: 'center',
27
+ },
28
+ errorText: {
29
+ color: '#dc2626',
30
+ fontSize: 16,
31
+ textAlign: 'center',
32
+ margin: 20,
33
+ },
34
+ initializingText: {
35
+ color: '#0000ff',
36
+ fontSize: 16,
37
+ textAlign: 'center',
38
+ margin: 20,
39
+ },
40
+ });
41
+ //# sourceMappingURL=InitializationStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitializationStep.js","sourceRoot":"","sources":["../../../src/components/KYCElements/InitializationStep.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEhF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAE,OAAO,EAA6B,EAAE,EAAE;IACzE,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,MAAM,EAAE,iBAAiB,EAAE,GAAG,yBAAyB,EAAE,CAAA;IACzD,SAAS,CAAC,GAAG,EAAE;QACX,iBAAiB,EAAE,CAAA;IACvB,CAAC,EAAE,EAAE,CAAC,CAAA;IAIN,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CACH,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC1B;gBAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,CAC9D;gBAAA,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,EACjE;YAAA,EAAE,IAAI,CAAC,CACV,CAAA;IACL,CAAC;IAED,OAAO,CACH,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC1B;YAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,EAAE,IAAI,CACjE;YAAA,CAAC,OAAO,CAAC,YAAY,IAAI,CACrB,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAG,CACrD,CACL;QAAA,EAAE,IAAI,CAAC,CACV,CAAA;AACL,CAAC,CAAA;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC7B,SAAS,EAAE;QACP,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACvB;IACD,SAAS,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,EAAE;KACb;IACD,gBAAgB,EAAE;QACd,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,EAAE;KACb;CACJ,CAAC,CAAA","sourcesContent":["import { ActivityIndicator, Button, StyleSheet, Text, View } from \"react-native\"\nimport { SessionState } from \"../../types/KYC.types\"\nimport { useEffect } from \"react\"\nimport { useTemplateKYCFlowContext } from \"../../hooks/useTemplateKYCFlow\"\nimport { useI18n } from \"../../hooks/useI18n\"\n\nexport const InitializationStep = ({ session }: { session: SessionState }) => {\n const { t } = useI18n();\n const { initializeSession } = useTemplateKYCFlowContext()\n useEffect(() => {\n initializeSession()\n }, [])\n\n\n\n if (session.error) {\n return (\n <View style={styles.container}>\n <Text style={styles.errorText}>{t('errors.serverError')}</Text>\n <Button title={t('common.retry')} onPress={initializeSession} />\n </View>\n )\n }\n\n return (\n <View style={styles.container}>\n <Text style={styles.initializingText}>{t('common.loading')}</Text>\n {session.isProcessing && (\n <ActivityIndicator size=\"large\" color=\"#0000ff\" />\n )}\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n errorText: {\n color: '#dc2626',\n fontSize: 16,\n textAlign: 'center',\n margin: 20,\n },\n initializingText: {\n color: '#0000ff',\n fontSize: 16,\n textAlign: 'center',\n margin: 20,\n },\n})"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LocationCaptureTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/LocationCaptureTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAkB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1E,UAAU,4BAA4B;IACpC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,aAAa,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAyJ1E,CAAC"}
1
+ {"version":3,"file":"LocationCaptureTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/LocationCaptureTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAkB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAQ1E,UAAU,4BAA4B;IACpC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,aAAa,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CA0J1E,CAAC"}
@@ -5,7 +5,9 @@ import GpsIcon from '../Svgs/GpsIcon';
5
5
  import { Button } from '../ui/Button';
6
6
  import * as Location from 'expo-location';
7
7
  import { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';
8
+ import { useI18n } from '../../hooks/useI18n';
8
9
  export const LocationCaptureTemplate = ({ component, value, onValueChange, error, language = 'en', }) => {
10
+ const { t } = useI18n();
9
11
  const [isRequesting, setIsRequesting] = useState(false);
10
12
  const [currentLocation, setCurrentLocation] = useState(value || null);
11
13
  const { actions } = useTemplateKYCFlowContext();
@@ -25,14 +27,14 @@ export const LocationCaptureTemplate = ({ component, value, onValueChange, error
25
27
  setIsRequesting(true);
26
28
  const hasLocationPermission = await requestLocationPermission();
27
29
  if (!hasLocationPermission) {
28
- Alert.alert('Permission refusée', 'La permission de localisation est nécessaire pour continuer.');
30
+ Alert.alert(t('kyc.locationCapture.permissionDeniedTitle'), t('kyc.locationCapture.permissionDeniedMessage'));
29
31
  setIsRequesting(false);
30
32
  return;
31
33
  }
32
34
  // Vérifier si la localisation est activée
33
35
  const isLocationEnabled = await Location.hasServicesEnabledAsync();
34
36
  if (!isLocationEnabled) {
35
- Alert.alert('Localisation désactivée', 'Veuillez activer la localisation sur votre appareil pour continuer.');
37
+ Alert.alert(t('kyc.locationCapture.locationDisabledTitle'), t('kyc.locationCapture.locationDisabledMessage'));
36
38
  setIsRequesting(false);
37
39
  return;
38
40
  }
@@ -53,7 +55,7 @@ export const LocationCaptureTemplate = ({ component, value, onValueChange, error
53
55
  }
54
56
  catch (error) {
55
57
  console.error('Erreur lors de la récupération de la localisation:', error);
56
- Alert.alert('Erreur', 'Impossible de récupérer votre localisation. Veuillez réessayer.');
58
+ Alert.alert(t('kyc.locationCapture.errorTitle'), t('kyc.locationCapture.errorMessage'));
57
59
  }
58
60
  finally {
59
61
  setIsRequesting(false);
@@ -85,33 +87,33 @@ export const LocationCaptureTemplate = ({ component, value, onValueChange, error
85
87
  </View>
86
88
  </View>
87
89
  <View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center', marginTop: 36 }}>
88
- <Text style={{ fontSize: 24, fontWeight: 'bold', color: '#333', marginBottom: 8 }}>Secure Your Verification</Text>
90
+ <Text style={{ fontSize: 24, fontWeight: 'bold', color: '#333', marginBottom: 8 }}>{t('kyc.locationCapture.title')}</Text>
89
91
  <Text style={{ fontSize: 16, color: '#666', textAlign: 'center', marginBottom: 24, lineHeight: 22 }}>
90
- Allow location access to help us protect your account and prevent fraudulent activity during verification.
92
+ {t('kyc.locationCapture.description')}
91
93
  </Text>
92
94
  </View>
93
95
  <View style={{ flexDirection: 'column', marginTop: 36, backgroundColor: "#F9FAFB", padding: 12, borderRadius: 12, width: '100%', }}>
94
96
  <Text style={{ fontSize: 16, color: 'black', fontWeight: 'bold', textAlign: 'left', lineHeight: 22 }}>
95
- {`How this helps:`}
97
+ {t('kyc.locationCapture.howThisHelps')}
96
98
  </Text>
97
99
  <Text style={{ fontSize: 16, color: '#666', textAlign: 'left', lineHeight: 22 }}>
98
- {`• Verifies your device location matches your identity\n• Detects and prevents unauthorized access\n• Ensures compliance with security regulations`}
100
+ {t('kyc.locationCapture.howThisHelpsList')}
99
101
  </Text>
100
102
  </View>
101
103
 
102
104
  {currentLocation ? (<View style={styles.locationInfo}>
103
- <Text style={styles.locationTitle}>Localisation obtenue</Text>
105
+ <Text style={styles.locationTitle}>{t('kyc.locationCapture.obtained')}</Text>
104
106
  <Text style={styles.locationDetails}>
105
- Latitude: {currentLocation.latitude.toFixed(6)}
107
+ {t('kyc.locationCapture.latitudeLabel')}: {currentLocation.latitude.toFixed(6)}
106
108
  </Text>
107
109
  <Text style={styles.locationDetails}>
108
- Longitude: {currentLocation.longitude.toFixed(6)}
110
+ {t('kyc.locationCapture.longitudeLabel')}: {currentLocation.longitude.toFixed(6)}
109
111
  </Text>
110
112
  <Text style={styles.locationDetails}>
111
- Précision: {currentLocation.accuracy.toFixed(1)}m
113
+ {t('kyc.locationCapture.accuracyLabel')}: {currentLocation.accuracy.toFixed(1)}m
112
114
  </Text>
113
- <Button title="Réinitialiser" fullWidth onPress={resetLocation} style={{ paddingVertical: 20, marginTop: 24, backgroundColor: '#6B7280' }}/>
114
- </View>) : (<Button title={isRequesting ? "Récupération..." : "Enable Location Access"} fullWidth onPress={getCurrentLocation} disabled={isRequesting} style={{ paddingVertical: 20, marginTop: 36 }}/>)}
115
+ <Button title={t('kyc.locationCapture.resetButton')} fullWidth onPress={resetLocation} style={{ paddingVertical: 20, marginTop: 24, backgroundColor: '#6B7280' }}/>
116
+ </View>) : (<Button title={isRequesting ? t('kyc.locationCapture.fetching') : t('kyc.locationCapture.enableButton')} fullWidth onPress={getCurrentLocation} disabled={isRequesting} style={{ paddingVertical: 20, marginTop: 36 }}/>)}
115
117
 
116
118
  <View style={{
117
119
  height: 12,
@@ -1 +1 @@
1
- {"version":3,"file":"LocationCaptureTemplate.js","sourceRoot":"","sources":["../../../src/components/KYCElements/LocationCaptureTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAU3E,MAAM,CAAC,MAAM,uBAAuB,GAA2C,CAAC,EAC9E,SAAS,EACT,KAAK,EACL,aAAa,EACb,KAAK,EACL,QAAQ,GAAG,IAAI,GAChB,EAAE,EAAE;IACH,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAmE,KAAK,IAAI,IAAI,CAAC,CAAC;IACxI,MAAM,EAAE,OAAO,EAAE,GAAG,yBAAyB,EAAE,CAAC;IAChD,MAAM,MAAM,GAAG,SAAS,CAAC,MAAwB,CAAC;IAElD,MAAM,yBAAyB,GAAG,KAAK,IAAsB,EAAE;QAC7D,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,iCAAiC,EAAE,CAAC;YACtE,OAAO,MAAM,KAAK,SAAS,CAAC;QAC9B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC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d;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,CAAC;KAChB;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,EAAE;KACf;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { View, Text, StyleSheet, Alert } from 'react-native';\nimport { LocationConfig, TemplateComponent } from '../../types/KYC.types';\nimport ShieldIcon from '../Svgs/Schield';\nimport GpsIcon from '../Svgs/GpsIcon';\nimport { Button } from '../ui/Button';\nimport * as Location from 'expo-location';\nimport { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';\n\ninterface LocationCaptureTemplateProps {\n component: TemplateComponent;\n value?: { latitude: number; longitude: number; accuracy: number } | null;\n onValueChange: (value: { latitude: number; longitude: number; accuracy: number } | null) => void;\n error?: string;\n language?: string;\n}\n\nexport const LocationCaptureTemplate: React.FC<LocationCaptureTemplateProps> = ({\n component,\n value,\n onValueChange,\n error,\n language = 'en',\n}) => {\n const [isRequesting, setIsRequesting] = useState(false);\n const [currentLocation, setCurrentLocation] = useState<{ latitude: number; longitude: number; accuracy: number } | null>(value || null);\n const { actions } = useTemplateKYCFlowContext();\n const config = component.config as LocationConfig;\n\n const requestLocationPermission = async (): Promise<boolean> => {\n try {\n const { status } = await Location.requestForegroundPermissionsAsync();\n return status === 'granted';\n } catch (err) {\n console.warn('Erreur lors de la demande de permission:', err);\n return false;\n }\n };\n\n const getCurrentLocation = async () => {\n try {\n setIsRequesting(true);\n\n const hasLocationPermission = await requestLocationPermission();\n if (!hasLocationPermission) {\n Alert.alert(\n 'Permission refusée',\n 'La permission de localisation est nécessaire pour continuer.'\n );\n setIsRequesting(false);\n return;\n }\n\n // Vérifier si la localisation est activée\n const isLocationEnabled = await Location.hasServicesEnabledAsync();\n if (!isLocationEnabled) {\n Alert.alert(\n 'Localisation désactivée',\n 'Veuillez activer la localisation sur votre appareil pour continuer.'\n );\n setIsRequesting(false);\n return;\n }\n\n // Récupérer la localisation actuelle\n const location = await Location.getCurrentPositionAsync({\n accuracy: config.accuracy === 'high' ? Location.Accuracy.High : Location.Accuracy.Balanced,\n timeInterval: 5000,\n distanceInterval: 10,\n });\n\n const locationData = {\n latitude: location.coords.latitude,\n longitude: location.coords.longitude,\n accuracy: location.coords.accuracy || 50,\n };\n\n // Mettre à jour l'état local et passer la valeur au parent\n setCurrentLocation(locationData);\n onValueChange(locationData);\n\n } catch (error) {\n console.error('Erreur lors de la récupération de la localisation:', error);\n Alert.alert('Erreur', 'Impossible de récupérer votre localisation. Veuillez réessayer.');\n } finally {\n setIsRequesting(false);\n }\n };\n\n const resetLocation = () => {\n setCurrentLocation(null);\n onValueChange(null);\n };\n\n // Passer automatiquement à l'étape suivante quand la localisation est obtenue\n useEffect(() => {\n if (currentLocation && !isRequesting) {\n // Délai court pour permettre à l'utilisateur de voir la localisation obtenue\n const timer = setTimeout(() => {\n actions.nextComponent();\n }, 1500);\n\n return () => clearTimeout(timer);\n }\n return undefined;\n }, [currentLocation, isRequesting, actions]);\n\n\n\n return (\n <View style={styles.container}>\n <View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>\n <View style={{ position: 'relative', width: 70, }}>\n <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 60, height: 60, backgroundColor: '#2DBE60', borderRadius: 100 }}>\n <ShieldIcon />\n </View>\n <View style={{ position: 'absolute', top: \"60%\", right: 0, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 40, height: 40, backgroundColor: 'white', borderRadius: 100, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.15, shadowRadius: 1.84, elevation: 5 }}>\n <GpsIcon />\n </View>\n </View>\n <View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center', marginTop: 36 }}>\n <Text style={{ fontSize: 24, fontWeight: 'bold', color: '#333', marginBottom: 8 }}>Secure Your Verification</Text>\n <Text style={{ fontSize: 16, color: '#666', textAlign: 'center', marginBottom: 24, lineHeight: 22 }}>\n Allow location access to help us protect your account and prevent fraudulent activity during verification.\n </Text>\n </View>\n <View style={{ flexDirection: 'column', marginTop: 36, backgroundColor: \"#F9FAFB\", padding: 12, borderRadius: 12, width: '100%', }}>\n <Text style={{ fontSize: 16, color: 'black', fontWeight: 'bold', textAlign: 'left', lineHeight: 22 }}>\n {`How this helps:`}\n </Text>\n <Text style={{ fontSize: 16, color: '#666', textAlign: 'left', lineHeight: 22 }}>\n {`• Verifies your device location matches your identity\\n• Detects and prevents unauthorized access\\n• Ensures compliance with security regulations`}\n </Text>\n </View>\n\n {currentLocation ? (\n <View style={styles.locationInfo}>\n <Text style={styles.locationTitle}>Localisation obtenue</Text>\n <Text style={styles.locationDetails}>\n Latitude: {currentLocation.latitude.toFixed(6)}\n </Text>\n <Text style={styles.locationDetails}>\n Longitude: {currentLocation.longitude.toFixed(6)}\n </Text>\n <Text style={styles.locationDetails}>\n Précision: {currentLocation.accuracy.toFixed(1)}m\n </Text>\n <Button\n title=\"Réinitialiser\"\n fullWidth\n onPress={resetLocation}\n style={{ paddingVertical: 20, marginTop: 24, backgroundColor: '#6B7280' }}\n />\n </View>\n ) : (\n <Button\n title={isRequesting ? \"Récupération...\" : \"Enable Location Access\"}\n fullWidth\n onPress={getCurrentLocation}\n disabled={isRequesting}\n style={{ paddingVertical: 20, marginTop: 36 }}\n />\n )}\n\n <View style={{\n height: 12,\n }} />\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 16,\n backgroundColor: 'white',\n marginHorizontal: 12,\n marginTop: 12,\n borderRadius: 12,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.15,\n maxWidth: 760,\n },\n locationInfo: {\n alignItems: 'center',\n width: '100%',\n marginTop: 24,\n },\n locationTitle: {\n fontSize: 20,\n fontWeight: '600',\n color: '#2DBD60',\n marginBottom: 16,\n },\n locationDetails: {\n fontSize: 14,\n color: '#666',\n marginBottom: 4,\n fontFamily: 'monospace',\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 8,\n textAlign: 'center',\n },\n description: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n marginBottom: 24,\n lineHeight: 22,\n },\n locationContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 24,\n },\n iconContainer: {\n marginBottom: 24,\n },\n locationIcon: {\n fontSize: 80,\n },\n locationRequest: {\n alignItems: 'center',\n width: '100%',\n },\n locationRequestText: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n marginBottom: 24,\n },\n locationButton: {\n paddingHorizontal: 32,\n paddingVertical: 16,\n borderRadius: 8,\n minWidth: 200,\n alignItems: 'center',\n },\n locationButtonDisabled: {\n opacity: 0.6,\n },\n locationButtonText: {\n color: 'white',\n fontWeight: '600',\n fontSize: 16,\n },\n buttonContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n alignItems: 'center',\n marginTop: 24,\n width: '100%',\n },\n primaryButton: {\n paddingHorizontal: 32,\n paddingVertical: 16,\n borderRadius: 8,\n minWidth: 120,\n alignItems: 'center',\n },\n primaryButtonText: {\n color: 'white',\n fontWeight: '600',\n fontSize: 16,\n },\n secondaryButton: {\n backgroundColor: '#e5e5e5',\n paddingHorizontal: 32,\n paddingVertical: 16,\n borderRadius: 8,\n minWidth: 120,\n alignItems: 'center',\n },\n secondaryButtonText: {\n color: '#333',\n fontWeight: '600',\n fontSize: 16,\n },\n requiredContainer: {\n backgroundColor: '#fff3cd',\n padding: 16,\n borderRadius: 8,\n marginTop: 16,\n },\n requiredText: {\n fontSize: 16,\n fontWeight: '600',\n color: '#856404',\n marginBottom: 8,\n },\n requiredSubtext: {\n fontSize: 14,\n color: '#856404',\n lineHeight: 20,\n },\n accuracyContainer: {\n backgroundColor: '#f0f9f0',\n padding: 16,\n borderRadius: 8,\n marginTop: 16,\n },\n accuracyTitle: {\n fontSize: 16,\n fontWeight: '600',\n color: '#2DBD60',\n marginBottom: 8,\n },\n accuracyText: {\n fontSize: 14,\n color: '#666',\n lineHeight: 20,\n },\n errorText: {\n color: '#dc2626',\n fontSize: 14,\n marginTop: 8,\n textAlign: 'center',\n },\n}); "]}
1
+ {"version":3,"file":"LocationCaptureTemplate.js","sourceRoot":"","sources":["../../../src/components/KYCElements/LocationCaptureTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAU9C,MAAM,CAAC,MAAM,uBAAuB,GAA2C,CAAC,EAC9E,SAAS,EACT,KAAK,EACL,aAAa,EACb,KAAK,EACL,QAAQ,GAAG,IAAI,GAChB,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAmE,KAAK,IAAI,IAAI,CAA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,EAAE,OAAO;QACd,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,EAAE;KACb;IACD,eAAe,EAAE;QACf,eAAe,EAAE,SAAS;QAC1B,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,CAAC;QACf,QAAQ,EAAE,GAAG;QACb,UAAU,EAAE,QAAQ;KACrB;IACD,mBAAmB,EAAE;QACnB,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,EAAE;KACb;IACD,iBAAiB,EAAE;QACjB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,EAAE;KACd;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,CAAC;KAChB;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,EAAE;KACf;IACD,iBAAiB,EAAE;QACjB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,EAAE;KACd;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,CAAC;KAChB;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,EAAE;KACf;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { View, Text, StyleSheet, Alert } from 'react-native';\nimport { LocationConfig, TemplateComponent } from '../../types/KYC.types';\nimport ShieldIcon from '../Svgs/Schield';\nimport GpsIcon from '../Svgs/GpsIcon';\nimport { Button } from '../ui/Button';\nimport * as Location from 'expo-location';\nimport { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';\nimport { useI18n } from '../../hooks/useI18n';\n\ninterface LocationCaptureTemplateProps {\n component: TemplateComponent;\n value?: { latitude: number; longitude: number; accuracy: number } | null;\n onValueChange: (value: { latitude: number; longitude: number; accuracy: number } | null) => void;\n error?: string;\n language?: string;\n}\n\nexport const LocationCaptureTemplate: React.FC<LocationCaptureTemplateProps> = ({\n component,\n value,\n onValueChange,\n error,\n language = 'en',\n}) => {\n const { t } = useI18n();\n const [isRequesting, setIsRequesting] = useState(false);\n const [currentLocation, setCurrentLocation] = useState<{ latitude: number; longitude: number; accuracy: number } | null>(value || null);\n const { actions } = useTemplateKYCFlowContext();\n const config = component.config as LocationConfig;\n\n const requestLocationPermission = async (): Promise<boolean> => {\n try {\n const { status } = await Location.requestForegroundPermissionsAsync();\n return status === 'granted';\n } catch (err) {\n console.warn('Erreur lors de la demande de permission:', err);\n return false;\n }\n };\n\n const getCurrentLocation = async () => {\n try {\n setIsRequesting(true);\n\n const hasLocationPermission = await requestLocationPermission();\n if (!hasLocationPermission) {\n Alert.alert(\n t('kyc.locationCapture.permissionDeniedTitle'),\n t('kyc.locationCapture.permissionDeniedMessage')\n );\n setIsRequesting(false);\n return;\n }\n\n // Vérifier si la localisation est activée\n const isLocationEnabled = await Location.hasServicesEnabledAsync();\n if (!isLocationEnabled) {\n Alert.alert(\n t('kyc.locationCapture.locationDisabledTitle'),\n t('kyc.locationCapture.locationDisabledMessage')\n );\n setIsRequesting(false);\n return;\n }\n\n // Récupérer la localisation actuelle\n const location = await Location.getCurrentPositionAsync({\n accuracy: config.accuracy === 'high' ? Location.Accuracy.High : Location.Accuracy.Balanced,\n timeInterval: 5000,\n distanceInterval: 10,\n });\n\n const locationData = {\n latitude: location.coords.latitude,\n longitude: location.coords.longitude,\n accuracy: location.coords.accuracy || 50,\n };\n\n // Mettre à jour l'état local et passer la valeur au parent\n setCurrentLocation(locationData);\n onValueChange(locationData);\n\n } catch (error) {\n console.error('Erreur lors de la récupération de la localisation:', error);\n Alert.alert(t('kyc.locationCapture.errorTitle'), t('kyc.locationCapture.errorMessage'));\n } finally {\n setIsRequesting(false);\n }\n };\n\n const resetLocation = () => {\n setCurrentLocation(null);\n onValueChange(null);\n };\n\n // Passer automatiquement à l'étape suivante quand la localisation est obtenue\n useEffect(() => {\n if (currentLocation && !isRequesting) {\n // Délai court pour permettre à l'utilisateur de voir la localisation obtenue\n const timer = setTimeout(() => {\n actions.nextComponent();\n }, 1500);\n\n return () => clearTimeout(timer);\n }\n return undefined;\n }, [currentLocation, isRequesting, actions]);\n\n\n\n return (\n <View style={styles.container}>\n <View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>\n <View style={{ position: 'relative', width: 70, }}>\n <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 60, height: 60, backgroundColor: '#2DBE60', borderRadius: 100 }}>\n <ShieldIcon />\n </View>\n <View style={{ position: 'absolute', top: \"60%\", right: 0, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 40, height: 40, backgroundColor: 'white', borderRadius: 100, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.15, shadowRadius: 1.84, elevation: 5 }}>\n <GpsIcon />\n </View>\n </View>\n <View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center', marginTop: 36 }}>\n <Text style={{ fontSize: 24, fontWeight: 'bold', color: '#333', marginBottom: 8 }}>{t('kyc.locationCapture.title')}</Text>\n <Text style={{ fontSize: 16, color: '#666', textAlign: 'center', marginBottom: 24, lineHeight: 22 }}>\n {t('kyc.locationCapture.description')}\n </Text>\n </View>\n <View style={{ flexDirection: 'column', marginTop: 36, backgroundColor: \"#F9FAFB\", padding: 12, borderRadius: 12, width: '100%', }}>\n <Text style={{ fontSize: 16, color: 'black', fontWeight: 'bold', textAlign: 'left', lineHeight: 22 }}>\n {t('kyc.locationCapture.howThisHelps')}\n </Text>\n <Text style={{ fontSize: 16, color: '#666', textAlign: 'left', lineHeight: 22 }}>\n {t('kyc.locationCapture.howThisHelpsList')}\n </Text>\n </View>\n\n {currentLocation ? (\n <View style={styles.locationInfo}>\n <Text style={styles.locationTitle}>{t('kyc.locationCapture.obtained')}</Text>\n <Text style={styles.locationDetails}>\n {t('kyc.locationCapture.latitudeLabel')}: {currentLocation.latitude.toFixed(6)}\n </Text>\n <Text style={styles.locationDetails}>\n {t('kyc.locationCapture.longitudeLabel')}: {currentLocation.longitude.toFixed(6)}\n </Text>\n <Text style={styles.locationDetails}>\n {t('kyc.locationCapture.accuracyLabel')}: {currentLocation.accuracy.toFixed(1)}m\n </Text>\n <Button\n title={t('kyc.locationCapture.resetButton')}\n fullWidth\n onPress={resetLocation}\n style={{ paddingVertical: 20, marginTop: 24, backgroundColor: '#6B7280' }}\n />\n </View>\n ) : (\n <Button\n title={isRequesting ? t('kyc.locationCapture.fetching') : t('kyc.locationCapture.enableButton')}\n fullWidth\n onPress={getCurrentLocation}\n disabled={isRequesting}\n style={{ paddingVertical: 20, marginTop: 36 }}\n />\n )}\n\n <View style={{\n height: 12,\n }} />\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 16,\n backgroundColor: 'white',\n marginHorizontal: 12,\n marginTop: 12,\n borderRadius: 12,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.15,\n maxWidth: 760,\n },\n locationInfo: {\n alignItems: 'center',\n width: '100%',\n marginTop: 24,\n },\n locationTitle: {\n fontSize: 20,\n fontWeight: '600',\n color: '#2DBD60',\n marginBottom: 16,\n },\n locationDetails: {\n fontSize: 14,\n color: '#666',\n marginBottom: 4,\n fontFamily: 'monospace',\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 8,\n textAlign: 'center',\n },\n description: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n marginBottom: 24,\n lineHeight: 22,\n },\n locationContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 24,\n },\n iconContainer: {\n marginBottom: 24,\n },\n locationIcon: {\n fontSize: 80,\n },\n locationRequest: {\n alignItems: 'center',\n width: '100%',\n },\n locationRequestText: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n marginBottom: 24,\n },\n locationButton: {\n paddingHorizontal: 32,\n paddingVertical: 16,\n borderRadius: 8,\n minWidth: 200,\n alignItems: 'center',\n },\n locationButtonDisabled: {\n opacity: 0.6,\n },\n locationButtonText: {\n color: 'white',\n fontWeight: '600',\n fontSize: 16,\n },\n buttonContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n alignItems: 'center',\n marginTop: 24,\n width: '100%',\n },\n primaryButton: {\n paddingHorizontal: 32,\n paddingVertical: 16,\n borderRadius: 8,\n minWidth: 120,\n alignItems: 'center',\n },\n primaryButtonText: {\n color: 'white',\n fontWeight: '600',\n fontSize: 16,\n },\n secondaryButton: {\n backgroundColor: '#e5e5e5',\n paddingHorizontal: 32,\n paddingVertical: 16,\n borderRadius: 8,\n minWidth: 120,\n alignItems: 'center',\n },\n secondaryButtonText: {\n color: '#333',\n fontWeight: '600',\n fontSize: 16,\n },\n requiredContainer: {\n backgroundColor: '#fff3cd',\n padding: 16,\n borderRadius: 8,\n marginTop: 16,\n },\n requiredText: {\n fontSize: 16,\n fontWeight: '600',\n color: '#856404',\n marginBottom: 8,\n },\n requiredSubtext: {\n fontSize: 14,\n color: '#856404',\n lineHeight: 20,\n },\n accuracyContainer: {\n backgroundColor: '#f0f9f0',\n padding: 16,\n borderRadius: 8,\n marginTop: 16,\n },\n accuracyTitle: {\n fontSize: 16,\n fontWeight: '600',\n color: '#2DBD60',\n marginBottom: 8,\n },\n accuracyText: {\n fontSize: 14,\n color: '#666',\n lineHeight: 20,\n },\n errorText: {\n color: '#dc2626',\n fontSize: 14,\n marginTop: 8,\n textAlign: 'center',\n },\n}); "]}
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { OrientationVideoConfig } from '../../types/KYC.types';
3
- import KYCService from '../../modules/api/KYCService';
3
+ import kycService from '../../modules/api/KYCService';
4
4
  interface OrientationVideoCaptureProps {
5
5
  config?: Partial<OrientationVideoConfig>;
6
6
  onComplete: (result: any) => void;
7
7
  onError: (error: string) => void;
8
- kycService: KYCService;
8
+ kycService: typeof kycService;
9
9
  }
10
10
  export declare const OrientationVideoCapture: React.FC<OrientationVideoCaptureProps>;
11
11
  export default OrientationVideoCapture;
@@ -1 +1 @@
1
- {"version":3,"file":"OrientationVideoCapture.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/OrientationVideoCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAY3D,OAAO,EAAE,sBAAsB,EAAyB,MAAM,uBAAuB,CAAC;AACtF,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAItD,UAAU,4BAA4B;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;CACxB;AAiBD,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAoZ1E,CAAC;AA0MF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"OrientationVideoCapture.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/OrientationVideoCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAY3D,OAAO,EAAE,sBAAsB,EAAyB,MAAM,uBAAuB,CAAC;AACtF,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAItD,UAAU,4BAA4B;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,OAAO,UAAU,CAAC;CAC/B;AAiBD,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAoZ1E,CAAC;AA0MF,eAAe,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OrientationVideoCapture.js","sourceRoot":"","sources":["../../../src/components/KYCElements/OrientationVideoCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,iBAAiB,EACjB,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,kBAAkB,MAAM,yCAAyC,CAAC;AACzE,OAAO,cAAc,MAAM,wBAAwB,CAAC;AASpD,MAAM,aAAa,GAA2B;IAC5C,QAAQ,EAAE,EAAE,EAAE,aAAa;IAC3B,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;IACzC,YAAY,EAAE;QACZ,MAAM,EAAE,mCAAmC;QAC3C,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,6BAA6B;KACrC;IACD,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,GAAG;IACZ,WAA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AAU;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC","sourcesContent":["import React, { useState, useRef, useEffect } from 'react';\nimport {\n View,\n Text,\n StyleSheet,\n TouchableOpacity,\n Alert,\n ActivityIndicator,\n Animated,\n} from 'react-native';\nimport Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';\nimport { Camera, useCameraDevice } from 'react-native-vision-camera';\nimport { OrientationVideoConfig, OrientationVideoState } from '../../types/KYC.types';\nimport KYCService from '../../modules/api/KYCService';\nimport VisionCameraModule from '../../modules/camera/VisionCameraModule';\nimport SideSelfieIcon from '../Svgs/sideSelfieIcon';\n\ninterface OrientationVideoCaptureProps {\n config?: Partial<OrientationVideoConfig>;\n onComplete: (result: any) => void;\n onError: (error: string) => void;\n kycService: KYCService;\n}\n\nconst defaultConfig: OrientationVideoConfig = {\n duration: 10, // 10 seconds\n orientations: ['center', 'left', 'right'],\n instructions: {\n center: 'Look straight ahead at the camera',\n left: 'Turn your head to the left',\n right: 'Turn your head to the right',\n },\n showPreview: true,\n allowRetake: true,\n maxRetakes: 3,\n quality: 0.8,\n aspectRatio: 16 / 9,\n};\n\nexport const OrientationVideoCapture: React.FC<OrientationVideoCaptureProps> = ({\n config = {},\n onComplete,\n onError,\n kycService,\n}) => {\n const finalConfig = { ...defaultConfig, ...config };\n \n const [state, setState] = useState<OrientationVideoState>({\n isRecording: false,\n currentOrientation: null,\n recordedVideo: null,\n processingResult: null,\n isProcessing: false,\n error: null,\n retakeCount: 0,\n });\n\n const [hasPermission, setHasPermission] = useState<boolean | null>(null);\n const cameraRef = useRef<Camera>(null);\n const recordingTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const instructionAnimation = useRef(new Animated.Value(0)).current;\n\n const device = useCameraDevice('front');\n\n useEffect(() => {\n requestCameraPermission();\n startInstructionAnimation();\n }, []);\n\n useEffect(() => {\n return () => {\n if (recordingTimeoutRef.current) {\n clearTimeout(recordingTimeoutRef.current);\n }\n };\n }, []);\n\n const requestCameraPermission = async () => {\n try {\n const hasAllPermissions = await VisionCameraModule.hasAllPermissions();\n if (!hasAllPermissions) {\n const granted = await VisionCameraModule.requestAllPermissions();\n if (!granted) {\n onError('Camera permissions not granted');\n return;\n }\n }\n setHasPermission(true);\n } catch (error) {\n console.error('Error requesting permissions:', error);\n onError('Failed to request camera permissions');\n }\n };\n\n const startInstructionAnimation = () => {\n Animated.loop(\n Animated.sequence([\n Animated.timing(instructionAnimation, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: false,\n }),\n Animated.timing(instructionAnimation, {\n toValue: 0.8,\n duration: 1000,\n useNativeDriver: false,\n }),\n ])\n ).start();\n };\n\n const startRecording = async () => {\n if (!cameraRef.current || state.isRecording) return;\n\n try {\n setState(prev => ({ ...prev, isRecording: true, error: null }));\n \n await cameraRef.current.startRecording({\n onRecordingFinished: (video) => {\n setState(prev => ({ \n ...prev, \n isRecording: false, \n recordedVideo: video.path \n }));\n // Process the video immediately\n processVideo(video.path);\n },\n onRecordingError: (error) => {\n console.error('Recording error:', error);\n setState(prev => ({ \n ...prev, \n isRecording: false, \n error: 'Failed to record video' \n }));\n onError('Failed to record video');\n },\n });\n\n // Set timeout to stop recording after duration\n recordingTimeoutRef.current = setTimeout(() => {\n if (cameraRef.current && state.isRecording) {\n cameraRef.current.stopRecording();\n }\n }, finalConfig.duration * 1000);\n\n } catch (error) {\n console.error('Error starting recording:', error);\n setState(prev => ({ \n ...prev, \n isRecording: false, \n error: 'Failed to start recording' \n }));\n onError('Failed to start recording');\n }\n };\n\n const stopRecording = async () => {\n if (!cameraRef.current || !state.isRecording) return;\n\n try {\n if (recordingTimeoutRef.current) {\n clearTimeout(recordingTimeoutRef.current);\n recordingTimeoutRef.current = null;\n }\n await cameraRef.current.stopRecording();\n } catch (error) {\n console.error('Error stopping recording:', error);\n }\n };\n\n const processVideo = async (videoUri: string) => {\n if (state.isProcessing) return;\n\n setState(prev => ({ ...prev, isProcessing: true, error: null }));\n\n try {\n const result = await kycService.processOrientationVideo(videoUri);\n \n if (result.success && result.data) {\n setState(prev => ({ \n ...prev, \n processingResult: result.data || null,\n isProcessing: false \n }));\n onComplete(result.data);\n } else {\n setState(prev => ({ \n ...prev, \n isProcessing: false,\n error: result.message || 'Processing failed' \n }));\n onError(result.message || 'Processing failed');\n }\n } catch (error) {\n console.error('Error processing video:', error);\n setState(prev => ({ \n ...prev, \n isProcessing: false,\n error: 'Failed to process video' \n }));\n onError('Failed to process video');\n }\n };\n\n const retake = () => {\n if (state.retakeCount >= finalConfig.maxRetakes) {\n Alert.alert('Max Retakes Reached', 'You have reached the maximum number of retakes.');\n return;\n }\n\n setState(prev => ({ \n ...prev, \n recordedVideo: null,\n processingResult: null,\n error: null,\n retakeCount: prev.retakeCount + 1 \n }));\n };\n\n const reset = () => {\n setState({\n isRecording: false,\n currentOrientation: null,\n recordedVideo: null,\n processingResult: null,\n isProcessing: false,\n error: null,\n retakeCount: 0,\n });\n };\n\n const renderInstructions = () => {\n if (!state.currentOrientation) return null;\n\n const instruction = finalConfig.instructions[state.currentOrientation];\n \n return (\n <Animated.View \n style={[\n styles.instructionContainer,\n { opacity: instructionAnimation }\n ]}\n >\n <Text style={styles.instructionText}>{instruction}</Text>\n </Animated.View>\n );\n };\n\n const renderProcessingResult = () => {\n if (!state.processingResult) return null;\n\n const { center, left, right } = state.processingResult;\n const allCaptured = center.captured && left.captured && right.captured;\n\n return (\n <View style={styles.resultContainer}>\n <Text style={styles.resultTitle}>\n {allCaptured ? '✅ All orientations captured!' : '⚠️ Some orientations missing'}\n </Text>\n \n <View style={styles.orientationResults}>\n <View style={styles.orientationResult}>\n <Text style={styles.orientationLabel}>Center</Text>\n <Text style={[styles.orientationStatus, center.captured && styles.captured]}>\n {center.captured ? '✅' : '❌'}\n </Text>\n {center.captured && (\n <Text style={styles.frameInfo}>Frame: {center.frame}</Text>\n )}\n </View>\n \n <View style={styles.orientationResult}>\n <Text style={styles.orientationLabel}>Left</Text>\n <Text style={[styles.orientationStatus, left.captured && styles.captured]}>\n {left.captured ? '✅' : '❌'}\n </Text>\n {left.captured && (\n <Text style={styles.frameInfo}>Frame: {left.frame}</Text>\n )}\n </View>\n \n <View style={styles.orientationResult}>\n <Text style={styles.orientationLabel}>Right</Text>\n <Text style={[styles.orientationStatus, right.captured && styles.captured]}>\n {right.captured ? '✅' : '❌'}\n </Text>\n {right.captured && (\n <Text style={styles.frameInfo}>Frame: {right.frame}</Text>\n )}\n </View>\n </View>\n </View>\n );\n };\n\n if (hasPermission === null) {\n return (\n <View style={styles.container}>\n <ActivityIndicator size=\"large\" color=\"#007AFF\" />\n <Text style={styles.loadingText}>Requesting camera permission...</Text>\n </View>\n );\n }\n\n if (hasPermission === false) {\n return (\n <View style={styles.container}>\n <Text style={styles.errorText}>No access to camera</Text>\n <TouchableOpacity style={styles.button} onPress={requestCameraPermission}>\n <Text style={styles.buttonText}>Grant Permission</Text>\n </TouchableOpacity>\n </View>\n );\n }\n\n if (state.recordedVideo && finalConfig.showPreview) {\n return (\n <View style={styles.container}>\n <View style={styles.videoPreview}>\n <Text style={styles.previewText}>Video recorded successfully</Text>\n <Text style={styles.previewSubtext}>Path: {state.recordedVideo}</Text>\n </View>\n \n {state.isProcessing && (\n <View style={styles.processingOverlay}>\n <ActivityIndicator size=\"large\" color=\"#007AFF\" />\n <Text style={styles.processingText}>Processing video...</Text>\n </View>\n )}\n \n {renderProcessingResult()}\n \n <View style={styles.buttonContainer}>\n {finalConfig.allowRetake && state.retakeCount < finalConfig.maxRetakes && (\n <TouchableOpacity style={styles.retakeButton} onPress={retake}>\n <Text style={styles.retakeButtonText}>\n Retake ({finalConfig.maxRetakes - state.retakeCount} left)\n </Text>\n </TouchableOpacity>\n )}\n \n <TouchableOpacity style={styles.resetButton} onPress={reset}>\n <Text style={styles.resetButtonText}>Start Over</Text>\n </TouchableOpacity>\n </View>\n </View>\n );\n }\n\n if (!device) {\n return (\n <View style={styles.container}>\n <Text style={styles.errorText}>Camera device not available</Text>\n </View>\n );\n }\n\n return (\n <View style={styles.container}>\n <Camera\n ref={cameraRef}\n style={styles.camera}\n device={device}\n isActive={true}\n video={true}\n audio={true}\n >\n <View style={styles.overlay}>\n {renderInstructions()}\n \n {/* SideSelfieIcon overlay with mask */}\n <View style={styles.iconOverlay}>\n <Svg\n height=\"100%\"\n width=\"100%\"\n style={StyleSheet.absoluteFill}\n >\n <Defs>\n <Mask id=\"faceMask\">\n {/* Fond blanc - zone visible (extérieur) */}\n <Rect\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n fill=\"white\"\n />\n {/* Zone noire - zone masquée (forme du visage dans le bbox) */}\n <Path\n d=\"M35.4198 48.9242C38.2153 41.9014 42.5851 35.6693 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z\"\n fill=\"black\"\n transform=\"translate(195, 240) scale(0.8) translate(-120, -142.5)\"\n />\n </Mask>\n </Defs>\n\n {/* Overlay semi-transparent avec masque */}\n <Rect\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n fill=\"rgba(0, 0, 0, 0.5)\"\n mask=\"url(#faceMask)\"\n />\n </Svg>\n \n {/* SideSelfieIcon positioned in the bbox */}\n <View style={[styles.iconContainer, {\n left: 20,\n top: 140,\n width: 350,\n height: 200,\n }]}>\n <SideSelfieIcon />\n </View>\n </View>\n \n {state.error && (\n <View style={styles.errorContainer}>\n <Text style={styles.errorText}>{state.error}</Text>\n </View>\n )}\n \n <View style={styles.controlsContainer}>\n {state.isRecording ? (\n <TouchableOpacity style={styles.stopButton} onPress={stopRecording}>\n <Text style={styles.stopButtonText}>Stop Recording</Text>\n </TouchableOpacity>\n ) : (\n <TouchableOpacity \n style={styles.recordButton} \n onPress={startRecording}\n disabled={state.isProcessing}\n >\n <Text style={styles.recordButtonText}>Start Recording</Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n </Camera>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#000',\n },\n camera: {\n flex: 1,\n },\n overlay: {\n flex: 1,\n backgroundColor: 'rgba(0, 0, 0, 0.2)',\n justifyContent: 'space-between',\n padding: 20,\n },\n instructionContainer: {\n backgroundColor: 'rgba(0, 0, 0, 0.7)',\n padding: 15,\n borderRadius: 10,\n marginTop: 50,\n alignSelf: 'center',\n },\n instructionText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n controlsContainer: {\n alignItems: 'center',\n marginBottom: 50,\n },\n recordButton: {\n backgroundColor: '#FF3B30',\n paddingHorizontal: 30,\n paddingVertical: 15,\n borderRadius: 25,\n minWidth: 150,\n alignItems: 'center',\n },\n recordButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n stopButton: {\n backgroundColor: '#007AFF',\n paddingHorizontal: 30,\n paddingVertical: 15,\n borderRadius: 25,\n minWidth: 150,\n alignItems: 'center',\n },\n stopButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n videoPreview: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: '#f0f0f0',\n },\n previewText: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 10,\n },\n previewSubtext: {\n fontSize: 14,\n color: '#666',\n textAlign: 'center',\n paddingHorizontal: 20,\n },\n processingOverlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.7)',\n justifyContent: 'center',\n alignItems: 'center',\n },\n processingText: {\n color: '#fff',\n fontSize: 16,\n marginTop: 10,\n },\n resultContainer: {\n backgroundColor: 'rgba(255, 255, 255, 0.9)',\n padding: 20,\n borderRadius: 10,\n margin: 20,\n },\n resultTitle: {\n fontSize: 18,\n fontWeight: 'bold',\n textAlign: 'center',\n marginBottom: 15,\n },\n orientationResults: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n },\n orientationResult: {\n alignItems: 'center',\n },\n orientationLabel: {\n fontSize: 14,\n fontWeight: '600',\n marginBottom: 5,\n },\n orientationStatus: {\n fontSize: 20,\n marginBottom: 5,\n },\n captured: {\n color: '#34C759',\n },\n frameInfo: {\n fontSize: 12,\n color: '#666',\n },\n buttonContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n padding: 20,\n },\n retakeButton: {\n backgroundColor: '#FF9500',\n paddingHorizontal: 20,\n paddingVertical: 10,\n borderRadius: 20,\n },\n retakeButtonText: {\n color: '#fff',\n fontSize: 16,\n fontWeight: '600',\n },\n resetButton: {\n backgroundColor: '#007AFF',\n paddingHorizontal: 20,\n paddingVertical: 10,\n borderRadius: 20,\n },\n resetButtonText: {\n color: '#fff',\n fontSize: 16,\n fontWeight: '600',\n },\n errorContainer: {\n backgroundColor: 'rgba(255, 59, 48, 0.8)',\n padding: 15,\n borderRadius: 10,\n margin: 20,\n },\n errorText: {\n color: '#fff',\n fontSize: 16,\n textAlign: 'center',\n },\n loadingText: {\n color: '#fff',\n fontSize: 16,\n textAlign: 'center',\n marginTop: 10,\n },\n button: {\n backgroundColor: '#007AFF',\n paddingHorizontal: 30,\n paddingVertical: 15,\n borderRadius: 25,\n marginTop: 20,\n alignSelf: 'center',\n },\n buttonText: {\n color: '#fff',\n fontSize: 16,\n fontWeight: 'bold',\n },\n iconOverlay: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: [{ translateX: -120 }, { translateY: -142.5 }], // Half of width and height\n opacity: 1,\n zIndex: 10,\n backgroundColor: 'rgba(0, 0, 0, 0.1)',\n borderRadius: 10,\n padding: 10,\n },\n iconContainer: {\n position: 'absolute',\n justifyContent: 'center',\n alignItems: 'center',\n },\n});\n\nexport default OrientationVideoCapture; "]}
1
+ {"version":3,"file":"OrientationVideoCapture.js","sourceRoot":"","sources":["../../../src/components/KYCElements/OrientationVideoCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,iBAAiB,EACjB,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,kBAAkB,MAAM,yCAAyC,CAAC;AACzE,OAAO,cAAc,MAAM,wBAAwB,CAAC;AASpD,MAAM,aAAa,GAA2B;IAC5C,QAAQ,EAAE,EAAE,EAAE,aAAa;IAC3B,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;IACzC,YAAY,EAAE;QACZ,MAAM,EAAE,mCAAmC;QAC3C,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,6BAA6B;KACrC;IACD,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,EAAE,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAA2C,CAAC,EAC9E,MAAM,GAAG,EAAE,EACX,UAAU,EACV,OAAO,EACP,UAAU,GACX,EAAE,EAAE;IACH,MAAM,WAAW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D,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,cAAc,EAAE;QACd,eAAe,EAAE,wBAAwB;QACzC,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,EAAE;QAChB,MAAM,EAAE,EAAE;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,EAAE;KACd;IACD,MAAM,EAAE;QACN,eAAe,EAAE,SAAS;QAC1B,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,EAAE;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,UAAU,EAAE;QACV,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,2BAA2B;QACtF,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,EAAE;QACV,eAAe,EAAE,oBAAoB;QACrC,YAAY,EAAE,EAAE;QAChB,OAAO,EAAE,EAAE;KACZ;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,UAAU;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC","sourcesContent":["import React, { useState, useRef, useEffect } from 'react';\nimport {\n View,\n Text,\n StyleSheet,\n TouchableOpacity,\n Alert,\n ActivityIndicator,\n Animated,\n} from 'react-native';\nimport Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';\nimport { Camera, useCameraDevice } from 'react-native-vision-camera';\nimport { OrientationVideoConfig, OrientationVideoState } from '../../types/KYC.types';\nimport kycService from '../../modules/api/KYCService';\nimport VisionCameraModule from '../../modules/camera/VisionCameraModule';\nimport SideSelfieIcon from '../Svgs/sideSelfieIcon';\n\ninterface OrientationVideoCaptureProps {\n config?: Partial<OrientationVideoConfig>;\n onComplete: (result: any) => void;\n onError: (error: string) => void;\n kycService: typeof kycService;\n}\n\nconst defaultConfig: OrientationVideoConfig = {\n duration: 10, // 10 seconds\n orientations: ['center', 'left', 'right'],\n instructions: {\n center: 'Look straight ahead at the camera',\n left: 'Turn your head to the left',\n right: 'Turn your head to the right',\n },\n showPreview: true,\n allowRetake: true,\n maxRetakes: 3,\n quality: 0.8,\n aspectRatio: 16 / 9,\n};\n\nexport const OrientationVideoCapture: React.FC<OrientationVideoCaptureProps> = ({\n config = {},\n onComplete,\n onError,\n kycService,\n}) => {\n const finalConfig = { ...defaultConfig, ...config };\n \n const [state, setState] = useState<OrientationVideoState>({\n isRecording: false,\n currentOrientation: null,\n recordedVideo: null,\n processingResult: null,\n isProcessing: false,\n error: null,\n retakeCount: 0,\n });\n\n const [hasPermission, setHasPermission] = useState<boolean | null>(null);\n const cameraRef = useRef<Camera>(null);\n const recordingTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const instructionAnimation = useRef(new Animated.Value(0)).current;\n\n const device = useCameraDevice('front');\n\n useEffect(() => {\n requestCameraPermission();\n startInstructionAnimation();\n }, []);\n\n useEffect(() => {\n return () => {\n if (recordingTimeoutRef.current) {\n clearTimeout(recordingTimeoutRef.current);\n }\n };\n }, []);\n\n const requestCameraPermission = async () => {\n try {\n const hasAllPermissions = await VisionCameraModule.hasAllPermissions();\n if (!hasAllPermissions) {\n const granted = await VisionCameraModule.requestAllPermissions();\n if (!granted) {\n onError('Camera permissions not granted');\n return;\n }\n }\n setHasPermission(true);\n } catch (error) {\n console.error('Error requesting permissions:', error);\n onError('Failed to request camera permissions');\n }\n };\n\n const startInstructionAnimation = () => {\n Animated.loop(\n Animated.sequence([\n Animated.timing(instructionAnimation, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: false,\n }),\n Animated.timing(instructionAnimation, {\n toValue: 0.8,\n duration: 1000,\n useNativeDriver: false,\n }),\n ])\n ).start();\n };\n\n const startRecording = async () => {\n if (!cameraRef.current || state.isRecording) return;\n\n try {\n setState(prev => ({ ...prev, isRecording: true, error: null }));\n \n await cameraRef.current.startRecording({\n onRecordingFinished: (video) => {\n setState(prev => ({ \n ...prev, \n isRecording: false, \n recordedVideo: video.path \n }));\n // Process the video immediately\n processVideo(video.path);\n },\n onRecordingError: (error) => {\n console.error('Recording error:', error);\n setState(prev => ({ \n ...prev, \n isRecording: false, \n error: 'Failed to record video' \n }));\n onError('Failed to record video');\n },\n });\n\n // Set timeout to stop recording after duration\n recordingTimeoutRef.current = setTimeout(() => {\n if (cameraRef.current && state.isRecording) {\n cameraRef.current.stopRecording();\n }\n }, finalConfig.duration * 1000);\n\n } catch (error) {\n console.error('Error starting recording:', error);\n setState(prev => ({ \n ...prev, \n isRecording: false, \n error: 'Failed to start recording' \n }));\n onError('Failed to start recording');\n }\n };\n\n const stopRecording = async () => {\n if (!cameraRef.current || !state.isRecording) return;\n\n try {\n if (recordingTimeoutRef.current) {\n clearTimeout(recordingTimeoutRef.current);\n recordingTimeoutRef.current = null;\n }\n await cameraRef.current.stopRecording();\n } catch (error) {\n console.error('Error stopping recording:', error);\n }\n };\n\n const processVideo = async (videoUri: string) => {\n if (state.isProcessing) return;\n\n setState(prev => ({ ...prev, isProcessing: true, error: null }));\n\n try {\n const result = await kycService.processOrientationVideo(videoUri);\n \n if (result.success && result.data) {\n setState(prev => ({ \n ...prev, \n processingResult: result.data || null,\n isProcessing: false \n }));\n onComplete(result.data);\n } else {\n setState(prev => ({ \n ...prev, \n isProcessing: false,\n error: result.message || 'Processing failed' \n }));\n onError(result.message || 'Processing failed');\n }\n } catch (error) {\n console.error('Error processing video:', error);\n setState(prev => ({ \n ...prev, \n isProcessing: false,\n error: 'Failed to process video' \n }));\n onError('Failed to process video');\n }\n };\n\n const retake = () => {\n if (state.retakeCount >= finalConfig.maxRetakes) {\n Alert.alert('Max Retakes Reached', 'You have reached the maximum number of retakes.');\n return;\n }\n\n setState(prev => ({ \n ...prev, \n recordedVideo: null,\n processingResult: null,\n error: null,\n retakeCount: prev.retakeCount + 1 \n }));\n };\n\n const reset = () => {\n setState({\n isRecording: false,\n currentOrientation: null,\n recordedVideo: null,\n processingResult: null,\n isProcessing: false,\n error: null,\n retakeCount: 0,\n });\n };\n\n const renderInstructions = () => {\n if (!state.currentOrientation) return null;\n\n const instruction = finalConfig.instructions[state.currentOrientation];\n \n return (\n <Animated.View \n style={[\n styles.instructionContainer,\n { opacity: instructionAnimation }\n ]}\n >\n <Text style={styles.instructionText}>{instruction}</Text>\n </Animated.View>\n );\n };\n\n const renderProcessingResult = () => {\n if (!state.processingResult) return null;\n\n const { center, left, right } = state.processingResult;\n const allCaptured = center.captured && left.captured && right.captured;\n\n return (\n <View style={styles.resultContainer}>\n <Text style={styles.resultTitle}>\n {allCaptured ? '✅ All orientations captured!' : '⚠️ Some orientations missing'}\n </Text>\n \n <View style={styles.orientationResults}>\n <View style={styles.orientationResult}>\n <Text style={styles.orientationLabel}>Center</Text>\n <Text style={[styles.orientationStatus, center.captured && styles.captured]}>\n {center.captured ? '✅' : '❌'}\n </Text>\n {center.captured && (\n <Text style={styles.frameInfo}>Frame: {center.frame}</Text>\n )}\n </View>\n \n <View style={styles.orientationResult}>\n <Text style={styles.orientationLabel}>Left</Text>\n <Text style={[styles.orientationStatus, left.captured && styles.captured]}>\n {left.captured ? '✅' : '❌'}\n </Text>\n {left.captured && (\n <Text style={styles.frameInfo}>Frame: {left.frame}</Text>\n )}\n </View>\n \n <View style={styles.orientationResult}>\n <Text style={styles.orientationLabel}>Right</Text>\n <Text style={[styles.orientationStatus, right.captured && styles.captured]}>\n {right.captured ? '✅' : '❌'}\n </Text>\n {right.captured && (\n <Text style={styles.frameInfo}>Frame: {right.frame}</Text>\n )}\n </View>\n </View>\n </View>\n );\n };\n\n if (hasPermission === null) {\n return (\n <View style={styles.container}>\n <ActivityIndicator size=\"large\" color=\"#007AFF\" />\n <Text style={styles.loadingText}>Requesting camera permission...</Text>\n </View>\n );\n }\n\n if (hasPermission === false) {\n return (\n <View style={styles.container}>\n <Text style={styles.errorText}>No access to camera</Text>\n <TouchableOpacity style={styles.button} onPress={requestCameraPermission}>\n <Text style={styles.buttonText}>Grant Permission</Text>\n </TouchableOpacity>\n </View>\n );\n }\n\n if (state.recordedVideo && finalConfig.showPreview) {\n return (\n <View style={styles.container}>\n <View style={styles.videoPreview}>\n <Text style={styles.previewText}>Video recorded successfully</Text>\n <Text style={styles.previewSubtext}>Path: {state.recordedVideo}</Text>\n </View>\n \n {state.isProcessing && (\n <View style={styles.processingOverlay}>\n <ActivityIndicator size=\"large\" color=\"#007AFF\" />\n <Text style={styles.processingText}>Processing video...</Text>\n </View>\n )}\n \n {renderProcessingResult()}\n \n <View style={styles.buttonContainer}>\n {finalConfig.allowRetake && state.retakeCount < finalConfig.maxRetakes && (\n <TouchableOpacity style={styles.retakeButton} onPress={retake}>\n <Text style={styles.retakeButtonText}>\n Retake ({finalConfig.maxRetakes - state.retakeCount} left)\n </Text>\n </TouchableOpacity>\n )}\n \n <TouchableOpacity style={styles.resetButton} onPress={reset}>\n <Text style={styles.resetButtonText}>Start Over</Text>\n </TouchableOpacity>\n </View>\n </View>\n );\n }\n\n if (!device) {\n return (\n <View style={styles.container}>\n <Text style={styles.errorText}>Camera device not available</Text>\n </View>\n );\n }\n\n return (\n <View style={styles.container}>\n <Camera\n ref={cameraRef}\n style={styles.camera}\n device={device}\n isActive={true}\n video={true}\n audio={true}\n >\n <View style={styles.overlay}>\n {renderInstructions()}\n \n {/* SideSelfieIcon overlay with mask */}\n <View style={styles.iconOverlay}>\n <Svg\n height=\"100%\"\n width=\"100%\"\n style={StyleSheet.absoluteFill}\n >\n <Defs>\n <Mask id=\"faceMask\">\n {/* Fond blanc - zone visible (extérieur) */}\n <Rect\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n fill=\"white\"\n />\n {/* Zone noire - zone masquée (forme du visage dans le bbox) */}\n <Path\n d=\"M35.4198 48.9242C38.2153 41.9014 42.5851 35.6693 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z\"\n fill=\"black\"\n transform=\"translate(195, 240) scale(0.8) translate(-120, -142.5)\"\n />\n </Mask>\n </Defs>\n\n {/* Overlay semi-transparent avec masque */}\n <Rect\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n fill=\"rgba(0, 0, 0, 0.5)\"\n mask=\"url(#faceMask)\"\n />\n </Svg>\n \n {/* SideSelfieIcon positioned in the bbox */}\n <View style={[styles.iconContainer, {\n left: 20,\n top: 140,\n width: 350,\n height: 200,\n }]}>\n <SideSelfieIcon />\n </View>\n </View>\n \n {state.error && (\n <View style={styles.errorContainer}>\n <Text style={styles.errorText}>{state.error}</Text>\n </View>\n )}\n \n <View style={styles.controlsContainer}>\n {state.isRecording ? (\n <TouchableOpacity style={styles.stopButton} onPress={stopRecording}>\n <Text style={styles.stopButtonText}>Stop Recording</Text>\n </TouchableOpacity>\n ) : (\n <TouchableOpacity \n style={styles.recordButton} \n onPress={startRecording}\n disabled={state.isProcessing}\n >\n <Text style={styles.recordButtonText}>Start Recording</Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n </Camera>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#000',\n },\n camera: {\n flex: 1,\n },\n overlay: {\n flex: 1,\n backgroundColor: 'rgba(0, 0, 0, 0.2)',\n justifyContent: 'space-between',\n padding: 20,\n },\n instructionContainer: {\n backgroundColor: 'rgba(0, 0, 0, 0.7)',\n padding: 15,\n borderRadius: 10,\n marginTop: 50,\n alignSelf: 'center',\n },\n instructionText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n controlsContainer: {\n alignItems: 'center',\n marginBottom: 50,\n },\n recordButton: {\n backgroundColor: '#FF3B30',\n paddingHorizontal: 30,\n paddingVertical: 15,\n borderRadius: 25,\n minWidth: 150,\n alignItems: 'center',\n },\n recordButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n stopButton: {\n backgroundColor: '#007AFF',\n paddingHorizontal: 30,\n paddingVertical: 15,\n borderRadius: 25,\n minWidth: 150,\n alignItems: 'center',\n },\n stopButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n videoPreview: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: '#f0f0f0',\n },\n previewText: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 10,\n },\n previewSubtext: {\n fontSize: 14,\n color: '#666',\n textAlign: 'center',\n paddingHorizontal: 20,\n },\n processingOverlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.7)',\n justifyContent: 'center',\n alignItems: 'center',\n },\n processingText: {\n color: '#fff',\n fontSize: 16,\n marginTop: 10,\n },\n resultContainer: {\n backgroundColor: 'rgba(255, 255, 255, 0.9)',\n padding: 20,\n borderRadius: 10,\n margin: 20,\n },\n resultTitle: {\n fontSize: 18,\n fontWeight: 'bold',\n textAlign: 'center',\n marginBottom: 15,\n },\n orientationResults: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n },\n orientationResult: {\n alignItems: 'center',\n },\n orientationLabel: {\n fontSize: 14,\n fontWeight: '600',\n marginBottom: 5,\n },\n orientationStatus: {\n fontSize: 20,\n marginBottom: 5,\n },\n captured: {\n color: '#34C759',\n },\n frameInfo: {\n fontSize: 12,\n color: '#666',\n },\n buttonContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n padding: 20,\n },\n retakeButton: {\n backgroundColor: '#FF9500',\n paddingHorizontal: 20,\n paddingVertical: 10,\n borderRadius: 20,\n },\n retakeButtonText: {\n color: '#fff',\n fontSize: 16,\n fontWeight: '600',\n },\n resetButton: {\n backgroundColor: '#007AFF',\n paddingHorizontal: 20,\n paddingVertical: 10,\n borderRadius: 20,\n },\n resetButtonText: {\n color: '#fff',\n fontSize: 16,\n fontWeight: '600',\n },\n errorContainer: {\n backgroundColor: 'rgba(255, 59, 48, 0.8)',\n padding: 15,\n borderRadius: 10,\n margin: 20,\n },\n errorText: {\n color: '#fff',\n fontSize: 16,\n textAlign: 'center',\n },\n loadingText: {\n color: '#fff',\n fontSize: 16,\n textAlign: 'center',\n marginTop: 10,\n },\n button: {\n backgroundColor: '#007AFF',\n paddingHorizontal: 30,\n paddingVertical: 15,\n borderRadius: 25,\n marginTop: 20,\n alignSelf: 'center',\n },\n buttonText: {\n color: '#fff',\n fontSize: 16,\n fontWeight: 'bold',\n },\n iconOverlay: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: [{ translateX: -120 }, { translateY: -142.5 }], // Half of width and height\n opacity: 1,\n zIndex: 10,\n backgroundColor: 'rgba(0, 0, 0, 0.1)',\n borderRadius: 10,\n padding: 10,\n },\n iconContainer: {\n position: 'absolute',\n justifyContent: 'center',\n alignItems: 'center',\n },\n});\n\nexport default OrientationVideoCapture; "]}
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { OrientationVideoConfig } from '../../types/KYC.types';
3
- import KYCService from '../../modules/api/KYCService';
3
+ import kycService from '../../modules/api/KYCService';
4
4
  interface OrientationVideoCaptureEnhancedProps {
5
5
  config?: Partial<OrientationVideoConfig>;
6
6
  onComplete: (result: any) => void;
7
7
  onError: (error: string) => void;
8
- kycService: KYCService;
8
+ kycService: typeof kycService;
9
9
  }
10
10
  export declare const OrientationVideoCaptureEnhanced: React.FC<OrientationVideoCaptureEnhancedProps>;
11
11
  export default OrientationVideoCaptureEnhanced;
@@ -1 +1 @@
1
- {"version":3,"file":"OrientationVideoCaptureEnhanced.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAa3D,OAAO,EAAE,sBAAsB,EAAyB,MAAM,uBAAuB,CAAC;AACtF,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAItD,UAAU,oCAAoC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;CACxB;AAiBD,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC,oCAAoC,CAqY1F,CAAC;AAuLF,eAAe,+BAA+B,CAAC"}
1
+ {"version":3,"file":"OrientationVideoCaptureEnhanced.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAa3D,OAAO,EAAE,sBAAsB,EAAyB,MAAM,uBAAuB,CAAC;AACtF,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAItD,UAAU,oCAAoC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,OAAO,UAAU,CAAC;CAC/B;AAiBD,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC,oCAAoC,CAqY1F,CAAC;AAuLF,eAAe,+BAA+B,CAAC"}