@regulaforensics/document-reader 7.1.301-rc

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 (435) hide show
  1. package/README.md +17 -0
  2. package/RNDocumentReader.podspec +21 -0
  3. package/android/CVDDocumentReader.kt +74 -0
  4. package/android/build.gradle +36 -0
  5. package/android/cordova.gradle +12 -0
  6. package/android/src/main/java/com/regula/plugin/documentreader/BluetoothUtil.kt +160 -0
  7. package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +834 -0
  8. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +1795 -0
  9. package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +579 -0
  10. package/android/src/main/java/com/regula/plugin/documentreader/RNDocumentReaderModule.kt +100 -0
  11. package/android/src/main/java/com/regula/plugin/documentreader/Utils.kt +181 -0
  12. package/examples/capacitor/README.md +22 -0
  13. package/examples/capacitor/android/app/build.gradle +50 -0
  14. package/examples/capacitor/android/app/capacitor.build.gradle +22 -0
  15. package/examples/capacitor/android/app/proguard-rules.pro +21 -0
  16. package/examples/capacitor/android/app/src/main/AndroidManifest.xml +27 -0
  17. package/examples/capacitor/android/app/src/main/assets/Regula/.gitkeep +0 -0
  18. package/examples/capacitor/android/app/src/main/java/com/regula/example/dr/capacitor/MainActivity.java +5 -0
  19. package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher.png +0 -0
  20. package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_foreground.png +0 -0
  21. package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_round.png +0 -0
  22. package/examples/capacitor/android/app/src/main/res/drawable/launcher.xml +4 -0
  23. package/examples/capacitor/android/app/src/main/res/drawable/launcher_round.xml +4 -0
  24. package/examples/capacitor/android/app/src/main/res/drawable/splash.png +0 -0
  25. package/examples/capacitor/android/app/src/main/res/layout/activity_main.xml +12 -0
  26. package/examples/capacitor/android/app/src/main/res/values/styles.xml +22 -0
  27. package/examples/capacitor/android/build.gradle +30 -0
  28. package/examples/capacitor/android/capacitor.settings.gradle +15 -0
  29. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  30. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  31. package/examples/capacitor/android/gradle.properties +22 -0
  32. package/examples/capacitor/android/gradlew +252 -0
  33. package/examples/capacitor/android/gradlew.bat +94 -0
  34. package/examples/capacitor/android/settings.gradle +5 -0
  35. package/examples/capacitor/android/variables.gradle +16 -0
  36. package/examples/capacitor/index.html +5 -0
  37. package/examples/capacitor/index.tsx +39 -0
  38. package/examples/capacitor/ionic.config.json +7 -0
  39. package/examples/capacitor/ios/App/App/App.entitlements +10 -0
  40. package/examples/capacitor/ios/App/App/AppDelegate.swift +49 -0
  41. package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
  42. package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
  43. package/examples/capacitor/ios/App/App/Assets.xcassets/Contents.json +6 -0
  44. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
  45. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
  46. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
  47. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
  48. package/examples/capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
  49. package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +19 -0
  50. package/examples/capacitor/ios/App/App/Info.plist +67 -0
  51. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +414 -0
  52. package/examples/capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  53. package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
  54. package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  55. package/examples/capacitor/ios/App/Podfile +26 -0
  56. package/examples/capacitor/ios/App/Podfile.lock +56 -0
  57. package/examples/capacitor/package-lock.json +3411 -0
  58. package/examples/capacitor/package.json +27 -0
  59. package/examples/capacitor/public/assets/.gitkeep +0 -0
  60. package/examples/capacitor/public/images/document.png +0 -0
  61. package/examples/capacitor/public/images/portrait.png +0 -0
  62. package/examples/capacitor/scripts/android.sh +9 -0
  63. package/examples/capacitor/scripts/ios.sh +8 -0
  64. package/examples/capacitor/scripts/setup.sh +12 -0
  65. package/examples/capacitor/src/extra/bt_device.tsx +33 -0
  66. package/examples/capacitor/src/extra/custom_rfid.tsx +61 -0
  67. package/examples/capacitor/src/main.css +148 -0
  68. package/examples/capacitor/src/main.html +38 -0
  69. package/examples/capacitor/src/main.tsx +172 -0
  70. package/examples/capacitor/tsconfig.json +5 -0
  71. package/examples/capacitor/vite.config.ts +17 -0
  72. package/examples/ionic/README.md +22 -0
  73. package/examples/ionic/angular.json +39 -0
  74. package/examples/ionic/assets/.gitkeep +0 -0
  75. package/examples/ionic/config.xml +61 -0
  76. package/examples/ionic/images/document.png +0 -0
  77. package/examples/ionic/images/icon.png +0 -0
  78. package/examples/ionic/images/portrait.png +0 -0
  79. package/examples/ionic/index.html +19 -0
  80. package/examples/ionic/index.tsx +54 -0
  81. package/examples/ionic/ionic.config.json +7 -0
  82. package/examples/ionic/package-lock.json +14349 -0
  83. package/examples/ionic/package.json +44 -0
  84. package/examples/ionic/scripts/android.sh +8 -0
  85. package/examples/ionic/scripts/ios.sh +8 -0
  86. package/examples/ionic/scripts/setup.sh +8 -0
  87. package/examples/ionic/src/extra/bt_device.tsx +33 -0
  88. package/examples/ionic/src/extra/custom_rfid.tsx +61 -0
  89. package/examples/ionic/src/main.css +148 -0
  90. package/examples/ionic/src/main.html +38 -0
  91. package/examples/ionic/src/main.tsx +172 -0
  92. package/examples/ionic/tsconfig.json +14 -0
  93. package/examples/react_native/README.md +22 -0
  94. package/examples/react_native/app.config.ts +49 -0
  95. package/examples/react_native/assets/.gitkeep +0 -0
  96. package/examples/react_native/images/document.png +0 -0
  97. package/examples/react_native/images/icon.png +0 -0
  98. package/examples/react_native/images/portrait.png +0 -0
  99. package/examples/react_native/index.html +11 -0
  100. package/examples/react_native/index.tsx +81 -0
  101. package/examples/react_native/metro.config.js +7 -0
  102. package/examples/react_native/package-lock.json +8612 -0
  103. package/examples/react_native/package.json +27 -0
  104. package/examples/react_native/scripts/android.sh +13 -0
  105. package/examples/react_native/scripts/ios.sh +12 -0
  106. package/examples/react_native/scripts/setup.sh +8 -0
  107. package/examples/react_native/src/extra/bt_device.tsx +33 -0
  108. package/examples/react_native/src/extra/custom_rfid.tsx +61 -0
  109. package/examples/react_native/src/main.css +148 -0
  110. package/examples/react_native/src/main.html +38 -0
  111. package/examples/react_native/src/main.tsx +172 -0
  112. package/ios/CVDDocumentReader.h +7 -0
  113. package/ios/CVDDocumentReader.m +39 -0
  114. package/ios/RGLWConfig.h +42 -0
  115. package/ios/RGLWConfig.m +1404 -0
  116. package/ios/RGLWJSONConstructor.h +185 -0
  117. package/ios/RGLWJSONConstructor.m +2379 -0
  118. package/ios/RGLWMain.h +36 -0
  119. package/ios/RGLWMain.m +620 -0
  120. package/ios/RNDocumentReader.h +8 -0
  121. package/ios/RNDocumentReader.m +49 -0
  122. package/package.json +36 -0
  123. package/plugin.xml +50 -0
  124. package/test/json.tsx +868 -0
  125. package/test/package-lock.json +584 -0
  126. package/test/package.json +9 -0
  127. package/test/test.tsx +93 -0
  128. package/test/utils.tsx +38 -0
  129. package/www/capacitor/config/InitConfig.js +52 -0
  130. package/www/capacitor/config/OnlineProcessingConfig.js +52 -0
  131. package/www/capacitor/config/RFIDConfig.js +31 -0
  132. package/www/capacitor/config/RecognizeConfig.js +126 -0
  133. package/www/capacitor/config/ScannerConfig.js +48 -0
  134. package/www/capacitor/index.js +502 -0
  135. package/www/capacitor/info/DocReaderException.js +64 -0
  136. package/www/capacitor/info/DocReaderScenario.js +89 -0
  137. package/www/capacitor/info/DocReaderVersion.js +32 -0
  138. package/www/capacitor/info/DocumentsDatabase.js +39 -0
  139. package/www/capacitor/info/License.js +30 -0
  140. package/www/capacitor/info/PrepareProgress.js +31 -0
  141. package/www/capacitor/info/RFIDException.js +26 -0
  142. package/www/capacitor/internal/bridge.js +98 -0
  143. package/www/capacitor/internal/cordova.js +17 -0
  144. package/www/capacitor/params/Functionality.js +355 -0
  145. package/www/capacitor/params/customization/Customization.js +633 -0
  146. package/www/capacitor/params/customization/CustomizationColors.js +87 -0
  147. package/www/capacitor/params/customization/CustomizationFonts.js +48 -0
  148. package/www/capacitor/params/customization/CustomizationImages.js +31 -0
  149. package/www/capacitor/params/customization/Font.js +36 -0
  150. package/www/capacitor/params/process_params/AuthenticityParams.js +150 -0
  151. package/www/capacitor/params/process_params/BackendProcessingConfig.js +34 -0
  152. package/www/capacitor/params/process_params/FaceApiParams.js +51 -0
  153. package/www/capacitor/params/process_params/FaceApiSearchParams.js +29 -0
  154. package/www/capacitor/params/process_params/GlaresCheckParams.js +25 -0
  155. package/www/capacitor/params/process_params/ImageQA.js +113 -0
  156. package/www/capacitor/params/process_params/LivenessParams.js +79 -0
  157. package/www/capacitor/params/process_params/ProcessParams.js +665 -0
  158. package/www/capacitor/params/process_params/RFIDParams.js +21 -0
  159. package/www/capacitor/params/rfid_scenario/DTCDataGroup.js +63 -0
  160. package/www/capacitor/params/rfid_scenario/EDLDataGroups.js +135 -0
  161. package/www/capacitor/params/rfid_scenario/EIDDataGroups.js +191 -0
  162. package/www/capacitor/params/rfid_scenario/EPassportDataGroups.js +151 -0
  163. package/www/capacitor/params/rfid_scenario/RFIDScenario.js +560 -0
  164. package/www/capacitor/results/DocumentType.js +302 -0
  165. package/www/capacitor/results/Position.js +88 -0
  166. package/www/capacitor/results/Results.js +343 -0
  167. package/www/capacitor/results/TransactionInfo.js +24 -0
  168. package/www/capacitor/results/authenticity/Authenticity.js +23 -0
  169. package/www/capacitor/results/authenticity/AuthenticityCheck.js +43 -0
  170. package/www/capacitor/results/authenticity/AuthenticityElement.js +37 -0
  171. package/www/capacitor/results/authenticity/AuthenticityResult.js +33 -0
  172. package/www/capacitor/results/authenticity/CheckDiagnose.js +125 -0
  173. package/www/capacitor/results/authenticity/SecurityFeatureType.js +59 -0
  174. package/www/capacitor/results/barcode/BarcodeField.js +34 -0
  175. package/www/capacitor/results/barcode/BarcodeResult.js +30 -0
  176. package/www/capacitor/results/barcode/BarcodeStatus.js +33 -0
  177. package/www/capacitor/results/barcode/BarcodeType.js +21 -0
  178. package/www/capacitor/results/barcode/PDF417Info.js +24 -0
  179. package/www/capacitor/results/image_quality/ImageQuality.js +40 -0
  180. package/www/capacitor/results/image_quality/ImageQualityCheckType.js +19 -0
  181. package/www/capacitor/results/image_quality/ImageQualityGroup.js +39 -0
  182. package/www/capacitor/results/rfid/AccessControlProcedureType.js +30 -0
  183. package/www/capacitor/results/rfid/Application.js +59 -0
  184. package/www/capacitor/results/rfid/Attribute.js +23 -0
  185. package/www/capacitor/results/rfid/Authority.js +36 -0
  186. package/www/capacitor/results/rfid/CardProperties.js +57 -0
  187. package/www/capacitor/results/rfid/CertificateChain.js +69 -0
  188. package/www/capacitor/results/rfid/CertificateData.js +21 -0
  189. package/www/capacitor/results/rfid/DataField.js +23 -0
  190. package/www/capacitor/results/rfid/Extension.js +21 -0
  191. package/www/capacitor/results/rfid/File.js +56 -0
  192. package/www/capacitor/results/rfid/FileData.js +27 -0
  193. package/www/capacitor/results/rfid/RFIDAccessControlProcedureType.js +10 -0
  194. package/www/capacitor/results/rfid/RFIDCertificateType.js +13 -0
  195. package/www/capacitor/results/rfid/RFIDDataFileType.js +98 -0
  196. package/www/capacitor/results/rfid/RFIDSessionData.js +92 -0
  197. package/www/capacitor/results/rfid/RFIDValidity.js +23 -0
  198. package/www/capacitor/results/rfid/RFIDValue.js +30 -0
  199. package/www/capacitor/results/rfid/SecurityObject.js +41 -0
  200. package/www/capacitor/results/rfid/SecurityObjectCertificates.js +20 -0
  201. package/www/capacitor/results/rfid/SignerInfo.js +74 -0
  202. package/www/capacitor/results/status/CheckResult.js +5 -0
  203. package/www/capacitor/results/status/OpticalStatus.js +44 -0
  204. package/www/capacitor/results/status/RFIDStatus.js +38 -0
  205. package/www/capacitor/results/status/ResultsStatus.js +40 -0
  206. package/www/capacitor/results/visible_digital_seals/BytesData.js +27 -0
  207. package/www/capacitor/results/visible_digital_seals/LDSParsingErrorCodes.js +134 -0
  208. package/www/capacitor/results/visible_digital_seals/LDSParsingNotificationCodes.js +232 -0
  209. package/www/capacitor/results/visible_digital_seals/VDSNCData.js +54 -0
  210. package/www/capacitor/results/visual_results/Comparison.js +27 -0
  211. package/www/capacitor/results/visual_results/FieldType.js +660 -0
  212. package/www/capacitor/results/visual_results/GraphicField.js +47 -0
  213. package/www/capacitor/results/visual_results/GraphicFieldType.js +25 -0
  214. package/www/capacitor/results/visual_results/GraphicResult.js +28 -0
  215. package/www/capacitor/results/visual_results/LCID.js +174 -0
  216. package/www/capacitor/results/visual_results/Lights.js +11 -0
  217. package/www/capacitor/results/visual_results/RFIDOrigin.js +27 -0
  218. package/www/capacitor/results/visual_results/Rect.js +27 -0
  219. package/www/capacitor/results/visual_results/Symbol.js +26 -0
  220. package/www/capacitor/results/visual_results/TextField.js +85 -0
  221. package/www/capacitor/results/visual_results/TextResult.js +52 -0
  222. package/www/capacitor/results/visual_results/TextSource.js +27 -0
  223. package/www/capacitor/results/visual_results/Validity.js +24 -0
  224. package/www/capacitor/results/visual_results/Value.js +52 -0
  225. package/www/capacitor/rfid/PAAttribute.js +24 -0
  226. package/www/capacitor/rfid/PAResourcesIssuer.js +35 -0
  227. package/www/capacitor/rfid/PKDCertificate.js +62 -0
  228. package/www/capacitor/rfid/RFIDErrorCodes.js +123 -0
  229. package/www/capacitor/rfid/RFIDNotification.js +68 -0
  230. package/www/capacitor/rfid/TAChallenge.js +33 -0
  231. package/www/capacitor/rfid/TccParams.js +34 -0
  232. package/www/cordova.js +11029 -0
  233. package/www/react-native/config/InitConfig.js +52 -0
  234. package/www/react-native/config/OnlineProcessingConfig.js +52 -0
  235. package/www/react-native/config/RFIDConfig.js +31 -0
  236. package/www/react-native/config/RecognizeConfig.js +126 -0
  237. package/www/react-native/config/ScannerConfig.js +48 -0
  238. package/www/react-native/index.js +502 -0
  239. package/www/react-native/info/DocReaderException.js +64 -0
  240. package/www/react-native/info/DocReaderScenario.js +89 -0
  241. package/www/react-native/info/DocReaderVersion.js +32 -0
  242. package/www/react-native/info/DocumentsDatabase.js +39 -0
  243. package/www/react-native/info/License.js +30 -0
  244. package/www/react-native/info/PrepareProgress.js +31 -0
  245. package/www/react-native/info/RFIDException.js +26 -0
  246. package/www/react-native/internal/bridge.js +98 -0
  247. package/www/react-native/params/Functionality.js +355 -0
  248. package/www/react-native/params/customization/Customization.js +633 -0
  249. package/www/react-native/params/customization/CustomizationColors.js +87 -0
  250. package/www/react-native/params/customization/CustomizationFonts.js +48 -0
  251. package/www/react-native/params/customization/CustomizationImages.js +31 -0
  252. package/www/react-native/params/customization/Font.js +36 -0
  253. package/www/react-native/params/process_params/AuthenticityParams.js +150 -0
  254. package/www/react-native/params/process_params/BackendProcessingConfig.js +34 -0
  255. package/www/react-native/params/process_params/FaceApiParams.js +51 -0
  256. package/www/react-native/params/process_params/FaceApiSearchParams.js +29 -0
  257. package/www/react-native/params/process_params/GlaresCheckParams.js +25 -0
  258. package/www/react-native/params/process_params/ImageQA.js +113 -0
  259. package/www/react-native/params/process_params/LivenessParams.js +79 -0
  260. package/www/react-native/params/process_params/ProcessParams.js +665 -0
  261. package/www/react-native/params/process_params/RFIDParams.js +21 -0
  262. package/www/react-native/params/rfid_scenario/DTCDataGroup.js +63 -0
  263. package/www/react-native/params/rfid_scenario/EDLDataGroups.js +135 -0
  264. package/www/react-native/params/rfid_scenario/EIDDataGroups.js +191 -0
  265. package/www/react-native/params/rfid_scenario/EPassportDataGroups.js +151 -0
  266. package/www/react-native/params/rfid_scenario/RFIDScenario.js +560 -0
  267. package/www/react-native/results/DocumentType.js +302 -0
  268. package/www/react-native/results/Position.js +88 -0
  269. package/www/react-native/results/Results.js +343 -0
  270. package/www/react-native/results/TransactionInfo.js +24 -0
  271. package/www/react-native/results/authenticity/Authenticity.js +23 -0
  272. package/www/react-native/results/authenticity/AuthenticityCheck.js +43 -0
  273. package/www/react-native/results/authenticity/AuthenticityElement.js +37 -0
  274. package/www/react-native/results/authenticity/AuthenticityResult.js +33 -0
  275. package/www/react-native/results/authenticity/CheckDiagnose.js +125 -0
  276. package/www/react-native/results/authenticity/SecurityFeatureType.js +59 -0
  277. package/www/react-native/results/barcode/BarcodeField.js +34 -0
  278. package/www/react-native/results/barcode/BarcodeResult.js +30 -0
  279. package/www/react-native/results/barcode/BarcodeStatus.js +33 -0
  280. package/www/react-native/results/barcode/BarcodeType.js +21 -0
  281. package/www/react-native/results/barcode/PDF417Info.js +24 -0
  282. package/www/react-native/results/image_quality/ImageQuality.js +40 -0
  283. package/www/react-native/results/image_quality/ImageQualityCheckType.js +19 -0
  284. package/www/react-native/results/image_quality/ImageQualityGroup.js +39 -0
  285. package/www/react-native/results/rfid/AccessControlProcedureType.js +30 -0
  286. package/www/react-native/results/rfid/Application.js +59 -0
  287. package/www/react-native/results/rfid/Attribute.js +23 -0
  288. package/www/react-native/results/rfid/Authority.js +36 -0
  289. package/www/react-native/results/rfid/CardProperties.js +57 -0
  290. package/www/react-native/results/rfid/CertificateChain.js +69 -0
  291. package/www/react-native/results/rfid/CertificateData.js +21 -0
  292. package/www/react-native/results/rfid/DataField.js +23 -0
  293. package/www/react-native/results/rfid/Extension.js +21 -0
  294. package/www/react-native/results/rfid/File.js +56 -0
  295. package/www/react-native/results/rfid/FileData.js +27 -0
  296. package/www/react-native/results/rfid/RFIDAccessControlProcedureType.js +10 -0
  297. package/www/react-native/results/rfid/RFIDCertificateType.js +13 -0
  298. package/www/react-native/results/rfid/RFIDDataFileType.js +98 -0
  299. package/www/react-native/results/rfid/RFIDSessionData.js +92 -0
  300. package/www/react-native/results/rfid/RFIDValidity.js +23 -0
  301. package/www/react-native/results/rfid/RFIDValue.js +30 -0
  302. package/www/react-native/results/rfid/SecurityObject.js +41 -0
  303. package/www/react-native/results/rfid/SecurityObjectCertificates.js +20 -0
  304. package/www/react-native/results/rfid/SignerInfo.js +74 -0
  305. package/www/react-native/results/status/CheckResult.js +5 -0
  306. package/www/react-native/results/status/OpticalStatus.js +44 -0
  307. package/www/react-native/results/status/RFIDStatus.js +38 -0
  308. package/www/react-native/results/status/ResultsStatus.js +40 -0
  309. package/www/react-native/results/visible_digital_seals/BytesData.js +27 -0
  310. package/www/react-native/results/visible_digital_seals/LDSParsingErrorCodes.js +134 -0
  311. package/www/react-native/results/visible_digital_seals/LDSParsingNotificationCodes.js +232 -0
  312. package/www/react-native/results/visible_digital_seals/VDSNCData.js +54 -0
  313. package/www/react-native/results/visual_results/Comparison.js +27 -0
  314. package/www/react-native/results/visual_results/FieldType.js +660 -0
  315. package/www/react-native/results/visual_results/GraphicField.js +47 -0
  316. package/www/react-native/results/visual_results/GraphicFieldType.js +25 -0
  317. package/www/react-native/results/visual_results/GraphicResult.js +28 -0
  318. package/www/react-native/results/visual_results/LCID.js +174 -0
  319. package/www/react-native/results/visual_results/Lights.js +11 -0
  320. package/www/react-native/results/visual_results/RFIDOrigin.js +27 -0
  321. package/www/react-native/results/visual_results/Rect.js +27 -0
  322. package/www/react-native/results/visual_results/Symbol.js +26 -0
  323. package/www/react-native/results/visual_results/TextField.js +85 -0
  324. package/www/react-native/results/visual_results/TextResult.js +52 -0
  325. package/www/react-native/results/visual_results/TextSource.js +27 -0
  326. package/www/react-native/results/visual_results/Validity.js +24 -0
  327. package/www/react-native/results/visual_results/Value.js +52 -0
  328. package/www/react-native/rfid/PAAttribute.js +24 -0
  329. package/www/react-native/rfid/PAResourcesIssuer.js +35 -0
  330. package/www/react-native/rfid/PKDCertificate.js +62 -0
  331. package/www/react-native/rfid/RFIDErrorCodes.js +123 -0
  332. package/www/react-native/rfid/RFIDNotification.js +68 -0
  333. package/www/react-native/rfid/TAChallenge.js +33 -0
  334. package/www/react-native/rfid/TccParams.js +34 -0
  335. package/www/types/config/InitConfig.d.ts +63 -0
  336. package/www/types/config/OnlineProcessingConfig.d.ts +22 -0
  337. package/www/types/config/RFIDConfig.d.ts +131 -0
  338. package/www/types/config/RecognizeConfig.d.ts +119 -0
  339. package/www/types/config/ScannerConfig.d.ts +54 -0
  340. package/www/types/index.d.ts +427 -0
  341. package/www/types/info/DocReaderException.d.ts +79 -0
  342. package/www/types/info/DocReaderScenario.d.ts +90 -0
  343. package/www/types/info/DocReaderVersion.d.ts +28 -0
  344. package/www/types/info/DocumentsDatabase.d.ts +42 -0
  345. package/www/types/info/License.d.ts +23 -0
  346. package/www/types/info/PrepareProgress.d.ts +15 -0
  347. package/www/types/info/RFIDException.d.ts +8 -0
  348. package/www/types/params/Functionality.d.ts +320 -0
  349. package/www/types/params/customization/Customization.d.ts +563 -0
  350. package/www/types/params/customization/CustomizationColors.d.ts +16 -0
  351. package/www/types/params/customization/CustomizationFonts.d.ts +13 -0
  352. package/www/types/params/customization/CustomizationImages.d.ts +12 -0
  353. package/www/types/params/customization/Font.d.ts +36 -0
  354. package/www/types/params/process_params/AuthenticityParams.d.ts +30 -0
  355. package/www/types/params/process_params/BackendProcessingConfig.d.ts +25 -0
  356. package/www/types/params/process_params/FaceApiParams.d.ts +68 -0
  357. package/www/types/params/process_params/FaceApiSearchParams.d.ts +35 -0
  358. package/www/types/params/process_params/GlaresCheckParams.d.ts +26 -0
  359. package/www/types/params/process_params/ImageQA.d.ts +79 -0
  360. package/www/types/params/process_params/LivenessParams.d.ts +20 -0
  361. package/www/types/params/process_params/ProcessParams.d.ts +473 -0
  362. package/www/types/params/process_params/RFIDParams.d.ts +19 -0
  363. package/www/types/params/rfid_scenario/DTCDataGroup.d.ts +13 -0
  364. package/www/types/params/rfid_scenario/EDLDataGroups.d.ts +22 -0
  365. package/www/types/params/rfid_scenario/EIDDataGroups.d.ts +29 -0
  366. package/www/types/params/rfid_scenario/EPassportDataGroups.d.ts +24 -0
  367. package/www/types/params/rfid_scenario/RFIDScenario.d.ts +167 -0
  368. package/www/types/results/DocumentType.d.ts +525 -0
  369. package/www/types/results/Position.d.ts +50 -0
  370. package/www/types/results/Results.d.ts +283 -0
  371. package/www/types/results/TransactionInfo.d.ts +9 -0
  372. package/www/types/results/authenticity/Authenticity.d.ts +67 -0
  373. package/www/types/results/authenticity/AuthenticityCheck.d.ts +23 -0
  374. package/www/types/results/authenticity/AuthenticityElement.d.ts +26 -0
  375. package/www/types/results/authenticity/AuthenticityResult.d.ts +16 -0
  376. package/www/types/results/authenticity/CheckDiagnose.d.ts +231 -0
  377. package/www/types/results/authenticity/SecurityFeatureType.d.ts +100 -0
  378. package/www/types/results/barcode/BarcodeField.d.ts +37 -0
  379. package/www/types/results/barcode/BarcodeResult.d.ts +14 -0
  380. package/www/types/results/barcode/BarcodeStatus.d.ts +66 -0
  381. package/www/types/results/barcode/BarcodeType.d.ts +45 -0
  382. package/www/types/results/barcode/PDF417Info.d.ts +15 -0
  383. package/www/types/results/image_quality/ImageQuality.d.ts +18 -0
  384. package/www/types/results/image_quality/ImageQualityCheckType.d.ts +30 -0
  385. package/www/types/results/image_quality/ImageQualityGroup.d.ts +17 -0
  386. package/www/types/results/rfid/AccessControlProcedureType.d.ts +21 -0
  387. package/www/types/results/rfid/Application.d.ts +44 -0
  388. package/www/types/results/rfid/Attribute.d.ts +9 -0
  389. package/www/types/results/rfid/Authority.d.ts +11 -0
  390. package/www/types/results/rfid/CardProperties.d.ts +48 -0
  391. package/www/types/results/rfid/CertificateChain.d.ts +28 -0
  392. package/www/types/results/rfid/CertificateData.d.ts +7 -0
  393. package/www/types/results/rfid/DataField.d.ts +9 -0
  394. package/www/types/results/rfid/Extension.d.ts +7 -0
  395. package/www/types/results/rfid/File.d.ts +22 -0
  396. package/www/types/results/rfid/FileData.d.ts +9 -0
  397. package/www/types/results/rfid/RFIDAccessControlProcedureType.d.ts +18 -0
  398. package/www/types/results/rfid/RFIDCertificateType.d.ts +13 -0
  399. package/www/types/results/rfid/RFIDDataFileType.d.ts +101 -0
  400. package/www/types/results/rfid/RFIDSessionData.d.ts +48 -0
  401. package/www/types/results/rfid/RFIDValidity.d.ts +9 -0
  402. package/www/types/results/rfid/RFIDValue.d.ts +10 -0
  403. package/www/types/results/rfid/SecurityObject.d.ts +28 -0
  404. package/www/types/results/rfid/SecurityObjectCertificates.d.ts +8 -0
  405. package/www/types/results/rfid/SignerInfo.d.ts +41 -0
  406. package/www/types/results/status/CheckResult.d.ts +8 -0
  407. package/www/types/results/status/OpticalStatus.d.ts +29 -0
  408. package/www/types/results/status/RFIDStatus.d.ts +22 -0
  409. package/www/types/results/status/ResultsStatus.d.ts +24 -0
  410. package/www/types/results/visible_digital_seals/BytesData.d.ts +9 -0
  411. package/www/types/results/visible_digital_seals/LDSParsingErrorCodes.d.ts +132 -0
  412. package/www/types/results/visible_digital_seals/LDSParsingNotificationCodes.d.ts +230 -0
  413. package/www/types/results/visible_digital_seals/VDSNCData.d.ts +35 -0
  414. package/www/types/results/visual_results/Comparison.d.ts +15 -0
  415. package/www/types/results/visual_results/FieldType.d.ts +1314 -0
  416. package/www/types/results/visual_results/GraphicField.d.ts +29 -0
  417. package/www/types/results/visual_results/GraphicFieldType.d.ts +52 -0
  418. package/www/types/results/visual_results/GraphicResult.d.ts +10 -0
  419. package/www/types/results/visual_results/LCID.d.ts +173 -0
  420. package/www/types/results/visual_results/Lights.d.ts +23 -0
  421. package/www/types/results/visual_results/RFIDOrigin.d.ts +10 -0
  422. package/www/types/results/visual_results/Rect.d.ts +9 -0
  423. package/www/types/results/visual_results/Symbol.d.ts +14 -0
  424. package/www/types/results/visual_results/TextField.d.ts +40 -0
  425. package/www/types/results/visual_results/TextResult.d.ts +23 -0
  426. package/www/types/results/visual_results/TextSource.d.ts +15 -0
  427. package/www/types/results/visual_results/Validity.d.ts +13 -0
  428. package/www/types/results/visual_results/Value.d.ts +27 -0
  429. package/www/types/rfid/PAAttribute.d.ts +4 -0
  430. package/www/types/rfid/PAResourcesIssuer.d.ts +7 -0
  431. package/www/types/rfid/PKDCertificate.d.ts +34 -0
  432. package/www/types/rfid/RFIDErrorCodes.d.ts +121 -0
  433. package/www/types/rfid/RFIDNotification.d.ts +153 -0
  434. package/www/types/rfid/TAChallenge.d.ts +7 -0
  435. package/www/types/rfid/TccParams.d.ts +25 -0
@@ -0,0 +1,1404 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import "RGLWConfig.h"
3
+
4
+ @implementation RGLWConfig
5
+
6
+ +(void)setFunctionality:(NSDictionary*)options :(RGLFunctionality*)functionality {
7
+ // Boolean
8
+ if([options valueForKey:@"showTorchButton"] != nil)
9
+ functionality.showTorchButton = [[options valueForKey:@"showTorchButton"] boolValue];
10
+ if([options valueForKey:@"showCloseButton"] != nil)
11
+ functionality.showCloseButton = [[options valueForKey:@"showCloseButton"] boolValue];
12
+ if([options valueForKey:@"videoCaptureMotionControl"] != nil)
13
+ functionality.videoCaptureMotionControl = [[options valueForKey:@"videoCaptureMotionControl"] boolValue];
14
+ if([options valueForKey:@"showCaptureButton"] != nil)
15
+ functionality.showCaptureButton = [[options valueForKey:@"showCaptureButton"] boolValue];
16
+ if([options valueForKey:@"showChangeFrameButton"] != nil)
17
+ functionality.showChangeFrameButton = [[options valueForKey:@"showChangeFrameButton"] boolValue];
18
+ if([options valueForKey:@"showSkipNextPageButton"] != nil)
19
+ functionality.showSkipNextPageButton = [[options valueForKey:@"showSkipNextPageButton"] boolValue];
20
+ if([options valueForKey:@"useAuthenticator"] != nil)
21
+ functionality.useAuthenticator = [[options valueForKey:@"useAuthenticator"] boolValue];
22
+ if([options valueForKey:@"skipFocusingFrames"] != nil)
23
+ functionality.skipFocusingFrames = [[options valueForKey:@"skipFocusingFrames"] boolValue];
24
+ if([options valueForKey:@"showCameraSwitchButton"] != nil)
25
+ functionality.showCameraSwitchButton = [[options valueForKey:@"showCameraSwitchButton"] boolValue];
26
+ if([options valueForKey:@"displayMetadata"] != nil)
27
+ functionality.showMetadataInfo = [[options valueForKey:@"displayMetadata"] boolValue];
28
+ if([options valueForKey:@"isZoomEnabled"] != nil)
29
+ functionality.isZoomEnabled = [[options valueForKey:@"isZoomEnabled"] boolValue];
30
+ if([options valueForKey:@"recordScanningProcess"] != nil)
31
+ functionality.recordScanningProcess = [[options valueForKey:@"recordScanningProcess"] boolValue];
32
+ if([options valueForKey:@"manualMultipageMode"] != nil)
33
+ functionality.manualMultipageMode = [[options valueForKey:@"manualMultipageMode"] boolValue];
34
+ if([options valueForKey:@"singleResult"] != nil)
35
+ functionality.singleResult = [[options valueForKey:@"singleResult"] boolValue];
36
+ if(options[@"torchTurnedOn"]) functionality.torchTurnedOn = [options[@"torchTurnedOn"] boolValue];
37
+
38
+ // Int
39
+ if([options valueForKey:@"showCaptureButtonDelayFromDetect"] != nil)
40
+ functionality.showCaptureButtonDelayFromDetect = [[options valueForKey:@"showCaptureButtonDelayFromDetect"] doubleValue];
41
+ if([options valueForKey:@"showCaptureButtonDelayFromStart"] != nil)
42
+ functionality.showCaptureButtonDelayFromStart = [[options valueForKey:@"showCaptureButtonDelayFromStart"] doubleValue];
43
+ if([options valueForKey:@"forcePagesCount"] != nil)
44
+ functionality.forcePagesCount = [options valueForKey:@"forcePagesCount"];
45
+ if([options valueForKey:@"orientation"] != nil)
46
+ functionality.orientation = [self interfaceOrientationMaskWithNumber:[options valueForKey:@"orientation"]];
47
+ if([options valueForKey:@"captureMode"] != nil)
48
+ functionality.captureMode = [[options valueForKey:@"captureMode"] integerValue];
49
+ if(options[@"cameraPositionIOS"])
50
+ functionality.cameraPosition = [options[@"cameraPositionIOS"] integerValue];
51
+
52
+ // String
53
+ if([options valueForKey:@"cameraFrame"] != nil)
54
+ functionality.cameraFrame = [self docReaderFrameWithString:[options valueForKey:@"cameraFrame"]];
55
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
56
+ if([options valueForKey:@"btDeviceName"] != nil)
57
+ functionality.btDeviceName = [options valueForKey:@"btDeviceName"];
58
+ #pragma clang diagnostic pop
59
+
60
+ // Float
61
+ if([options valueForKey:@"zoomFactor"] != nil)
62
+ functionality.zoomFactor = [[options valueForKey:@"zoomFactor"] floatValue];
63
+
64
+ // Custom
65
+ // in android - cameraSize
66
+ if([options valueForKey:@"videoSessionPreset"] != nil)
67
+ functionality.videoSessionPreset = [self captureSessionPresetWithNumber:[options valueForKey:@"videoSessionPreset"]];
68
+ if([options valueForKey:@"videoOutputSettings"] != nil)
69
+ functionality.videoOutputSettings = [options valueForKey:@"videoOutputSettings"];
70
+ }
71
+
72
+ +(NSDictionary*)getFunctionality:(RGLFunctionality*)functionality {
73
+ NSMutableDictionary *result = [NSMutableDictionary new];
74
+
75
+ // Boolean
76
+ result[@"showTorchButton"] = [NSNumber numberWithBool:functionality.showTorchButton];
77
+ result[@"showCloseButton"] = [NSNumber numberWithBool:functionality.showCloseButton];
78
+ result[@"videoCaptureMotionControl"] = [NSNumber numberWithBool:functionality.videoCaptureMotionControl];
79
+ result[@"showCaptureButton"] = [NSNumber numberWithBool:functionality.showCaptureButton];
80
+ result[@"showChangeFrameButton"] = [NSNumber numberWithBool:functionality.showChangeFrameButton];
81
+ result[@"showSkipNextPageButton"] = [NSNumber numberWithBool:functionality.showSkipNextPageButton];
82
+ result[@"useAuthenticator"] = [NSNumber numberWithBool:functionality.isUseAuthenticator];
83
+ result[@"skipFocusingFrames"] = [NSNumber numberWithBool:functionality.skipFocusingFrames];
84
+ result[@"showCameraSwitchButton"] = [NSNumber numberWithBool:functionality.showCameraSwitchButton];
85
+ result[@"displayMetadata"] = [NSNumber numberWithBool:functionality.showMetadataInfo];
86
+ result[@"isZoomEnabled"] = [NSNumber numberWithBool:functionality.isZoomEnabled];
87
+ result[@"recordScanningProcess"] = [NSNumber numberWithBool:functionality.recordScanningProcess];
88
+ result[@"manualMultipageMode"] = [NSNumber numberWithBool:functionality.manualMultipageMode];
89
+ result[@"singleResult"] = [NSNumber numberWithBool:functionality.singleResult];
90
+ result[@"torchTurnedOn"] = @(functionality.torchTurnedOn);
91
+
92
+ // Int
93
+ result[@"showCaptureButtonDelayFromDetect"] = [NSNumber numberWithDouble:functionality.showCaptureButtonDelayFromDetect];
94
+ result[@"showCaptureButtonDelayFromStart"] = [NSNumber numberWithDouble:functionality.showCaptureButtonDelayFromStart];
95
+ result[@"forcePagesCount"] = functionality.forcePagesCount;
96
+ result[@"orientation"] = [self generateInterfaceOrientationMask:functionality.orientation];
97
+ result[@"captureMode"] = [NSNumber numberWithInteger:functionality.captureMode];
98
+ result[@"cameraPositionIOS"] = @(functionality.cameraPosition);
99
+
100
+ // String
101
+ result[@"cameraFrame"] = [self generateDocReaderFrame:functionality.cameraFrame];
102
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
103
+ result[@"btDeviceName"] = functionality.btDeviceName;
104
+ #pragma clang diagnostic pop
105
+
106
+ // Float
107
+ result[@"zoomFactor"] = [NSNumber numberWithFloat:functionality.zoomFactor];
108
+
109
+ // Custom
110
+ // in android - cameraSize
111
+ result[@"videoSessionPreset"] = [self generateCaptureSessionPreset:functionality.videoSessionPreset];
112
+ result[@"videoOutputSettings"] = functionality.videoOutputSettings;
113
+
114
+ return result;
115
+ }
116
+
117
+ +(void)setProcessParams:(NSDictionary*)options :(RGLProcessParams*)processParams {
118
+
119
+ // Boolean
120
+ if([options valueForKey:@"multipageProcessing"] != nil)
121
+ processParams.multipageProcessing = [options valueForKey:@"multipageProcessing"];
122
+ if([options valueForKey:@"logs"] != nil)
123
+ processParams.logs = [options valueForKey:@"logs"];
124
+ if([options valueForKey:@"debugSaveImages"] != nil)
125
+ processParams.debugSaveImages = [options valueForKey:@"debugSaveImages"];
126
+ if([options valueForKey:@"debugSaveLogs"] != nil)
127
+ processParams.debugSaveLogs = [options valueForKey:@"debugSaveLogs"];
128
+ if([options valueForKey:@"returnUncroppedImage"] != nil)
129
+ processParams.returnUncroppedImage = [options valueForKey:@"returnUncroppedImage"];
130
+ if([options valueForKey:@"debugSaveCroppedImages"] != nil)
131
+ processParams.debugSaveCroppedImages = [options valueForKey:@"debugSaveCroppedImages"];
132
+ if([options valueForKey:@"disableFocusingCheck"] != nil)
133
+ processParams.disableFocusingCheck = [options valueForKey:@"disableFocusingCheck"];
134
+ if([options valueForKey:@"debugSaveRFIDSession"] != nil)
135
+ processParams.debugSaveRFIDSession = [options valueForKey:@"debugSaveRFIDSession"];
136
+ if([options valueForKey:@"doublePageSpread"] != nil)
137
+ processParams.doublePageSpread = [options valueForKey:@"doublePageSpread"];
138
+ if([options valueForKey:@"manualCrop"] != nil)
139
+ processParams.manualCrop = [options valueForKey:@"manualCrop"];
140
+ if([options valueForKey:@"integralImage"] != nil)
141
+ processParams.integralImage = [options valueForKey:@"integralImage"];
142
+ if([options valueForKey:@"returnCroppedBarcode"] != nil)
143
+ processParams.returnCroppedBarcode = [options valueForKey:@"returnCroppedBarcode"];
144
+ if([options valueForKey:@"checkRequiredTextFields"] != nil)
145
+ processParams.checkRequiredTextFields = [options valueForKey:@"checkRequiredTextFields"];
146
+ if([options valueForKey:@"depersonalizeLog"] != nil)
147
+ processParams.depersonalizeLog = [options valueForKey:@"depersonalizeLog"];
148
+ if([options valueForKey:@"generateDoublePageSpreadImage"] != nil)
149
+ processParams.generateDoublePageSpreadImage = [options valueForKey:@"generateDoublePageSpreadImage"];
150
+ if([options valueForKey:@"alreadyCropped"] != nil)
151
+ processParams.alreadyCropped = [options valueForKey:@"alreadyCropped"];
152
+ if([options valueForKey:@"matchTextFieldMask"] != nil)
153
+ processParams.matchTextFieldMask = [options valueForKey:@"matchTextFieldMask"];
154
+ if([options valueForKey:@"updateOCRValidityByGlare"] != nil)
155
+ processParams.updateOCRValidityByGlare = [options valueForKey:@"updateOCRValidityByGlare"];
156
+ if([options valueForKey:@"noGraphics"] != nil)
157
+ processParams.noGraphics = [options valueForKey:@"noGraphics"];
158
+ if([options valueForKey:@"multiDocOnImage"] != nil)
159
+ processParams.multiDocOnImage = [options valueForKey:@"multiDocOnImage"];
160
+ if([options valueForKey:@"forceReadMrzBeforeLocate"] != nil)
161
+ processParams.forceReadMrzBeforeLocate = [options valueForKey:@"forceReadMrzBeforeLocate"];
162
+ if([options valueForKey:@"parseBarcodes"] != nil)
163
+ processParams.parseBarcodes = [options valueForKey:@"parseBarcodes"];
164
+ if([options valueForKey:@"shouldReturnPackageForReprocess"] != nil)
165
+ processParams.shouldReturnPackageForReprocess = [options valueForKey:@"shouldReturnPackageForReprocess"];
166
+ if([options valueForKey:@"disablePerforationOCR"] != nil)
167
+ processParams.disablePerforationOCR = [options valueForKey:@"disablePerforationOCR"];
168
+ if([options valueForKey:@"respectImageQuality"] != nil)
169
+ processParams.respectImageQuality = [options valueForKey:@"respectImageQuality"];
170
+ if (options[@"strictImageQuality"]) processParams.strictImageQuality = options[@"strictImageQuality"];
171
+ if([options valueForKey:@"splitNames"] != nil)
172
+ processParams.splitNames = [options valueForKey:@"splitNames"];
173
+ if([options valueForKey:@"doDetectCan"] != nil)
174
+ processParams.doDetectCan = [options valueForKey:@"doDetectCan"];
175
+ if([options valueForKey:@"useFaceApi"] != nil)
176
+ processParams.useFaceApi = [options valueForKey:@"useFaceApi"];
177
+ if([options valueForKey:@"useAuthenticityCheck"] != nil)
178
+ processParams.useAuthenticityCheck = [options valueForKey:@"useAuthenticityCheck"];
179
+ if([options valueForKey:@"checkHologram"] != nil)
180
+ processParams.checkHologram = [options valueForKey:@"checkHologram"];
181
+ if (options[@"generateNumericCodes"]) processParams.generateNumericCodes = options[@"generateNumericCodes"];
182
+ if (options[@"strictBarcodeDigitalSignatureCheck"]) processParams.strictBarcodeDigitalSignatureCheck = options[@"strictBarcodeDigitalSignatureCheck"];
183
+ if (options[@"selectLongestNames"]) processParams.selectLongestNames = options[@"selectLongestNames"];
184
+ if (options[@"generateDTCVC"]) processParams.generateDTCVC = options[@"generateDTCVC"];
185
+ if (options[@"strictDLCategoryExpiry"]) processParams.strictDLCategoryExpiry = options[@"strictDLCategoryExpiry"];
186
+ if (options[@"generateAlpha2Codes"]) processParams.generateAlpha2Codes = options[@"generateAlpha2Codes"];
187
+ if (options[@"disableAuthResolutionFilter"]) processParams.disableAuthResolutionFilter = options[@"disableAuthResolutionFilter"];
188
+ if (options[@"strictSecurityChecks"]) processParams.strictSecurityChecks = options[@"strictSecurityChecks"];
189
+
190
+ // Int
191
+ if([options valueForKey:@"measureSystem"] != nil)
192
+ processParams.measureSystem = [[options valueForKey:@"measureSystem"] integerValue];
193
+ if([options valueForKey:@"barcodeParserType"] != nil)
194
+ processParams.barcodeParserType = [options valueForKey:@"barcodeParserType"];
195
+ if([options valueForKey:@"perspectiveAngle"] != nil)
196
+ processParams.perspectiveAngle = [options valueForKey:@"perspectiveAngle"];
197
+ if([options valueForKey:@"minDPI"] != nil)
198
+ processParams.minDPI = [options valueForKey:@"minDPI"];
199
+ if([options valueForKey:@"imageDpiOutMax"] != nil)
200
+ processParams.imageDpiOutMax = [options valueForKey:@"imageDpiOutMax"];
201
+ if([options valueForKey:@"forceDocID"] != nil)
202
+ processParams.forceDocID = [options valueForKey:@"forceDocID"];
203
+ if([options valueForKey:@"forceDocFormat"] != nil)
204
+ processParams.forceDocFormat = [options valueForKey:@"forceDocFormat"];
205
+ if([options valueForKey:@"shiftExpiryDate"] != nil)
206
+ processParams.shiftExpiryDate = [options valueForKey:@"shiftExpiryDate"];
207
+ if([options valueForKey:@"minimalHolderAge"] != nil)
208
+ processParams.minimalHolderAge = [options valueForKey:@"minimalHolderAge"];
209
+ if([options valueForKey:@"imageOutputMaxHeight"] != nil)
210
+ processParams.imageOutputMaxHeight = [options valueForKey:@"imageOutputMaxHeight"];
211
+ if([options valueForKey:@"imageOutputMaxWidth"] != nil)
212
+ processParams.imageOutputMaxWidth = [options valueForKey:@"imageOutputMaxWidth"];
213
+ if([options valueForKey:@"processAuth"] != nil)
214
+ processParams.processAuth = [options valueForKey:@"processAuth"];
215
+ if([options valueForKey:@"convertCase"] != nil)
216
+ processParams.convertCase = [self textProcessingWithNumber:[options valueForKey:@"convertCase"]];
217
+ if(options[@"logLevel"]) processParams.logLevel = options[@"logLevel"];
218
+ if(options[@"mrzDetectMode"]) processParams.mrzDetectMode = options[@"mrzDetectMode"];
219
+ if(options[@"pdfPagesLimit"]) processParams.pdfPagesLimit = options[@"pdfPagesLimit"];
220
+
221
+ // String
222
+ if([options valueForKey:@"dateFormat"] != nil)
223
+ processParams.dateFormat = [options valueForKey:@"dateFormat"];
224
+ if([options valueForKey:@"scenario"] != nil)
225
+ processParams.scenario = [options valueForKey:@"scenario"];
226
+ if([options valueForKey:@"captureButtonScenario"] != nil)
227
+ processParams.captureButtonScenario = [options valueForKey:@"captureButtonScenario"];
228
+
229
+ // Double
230
+ if([options valueForKey:@"timeout"] != nil)
231
+ processParams.timeout = [options valueForKey:@"timeout"];
232
+ if([options valueForKey:@"timeoutFromFirstDetect"] != nil)
233
+ processParams.timeoutFromFirstDetect = [options valueForKey:@"timeoutFromFirstDetect"];
234
+ if([options valueForKey:@"timeoutFromFirstDocType"] != nil)
235
+ processParams.timeoutFromFirstDocType = [options valueForKey:@"timeoutFromFirstDocType"];
236
+ if([options valueForKey:@"documentAreaMin"] != nil)
237
+ processParams.documentAreaMin = [options valueForKey:@"documentAreaMin"];
238
+ if([options valueForKey:@"timeoutLiveness"] != nil)
239
+ processParams.timeoutLiveness = [options valueForKey:@"timeoutLiveness"];
240
+
241
+ // JSONArray
242
+ if([options valueForKey:@"documentIDList"] != nil)
243
+ processParams.documentIDList = [options valueForKey:@"documentIDList"];
244
+ if([options valueForKey:@"fieldTypesFilter"] != nil)
245
+ processParams.fieldTypesFilter = [options valueForKey:@"fieldTypesFilter"];
246
+ if([options valueForKey:@"barcodeTypes"] != nil)
247
+ processParams.barcodeTypes = [options valueForKey:@"barcodeTypes"];
248
+ if([options valueForKey:@"resultTypeOutput"] != nil)
249
+ processParams.resultTypeOutput = [options valueForKey:@"resultTypeOutput"];
250
+ if([options valueForKey:@"mrzFormatsFilter"] != nil)
251
+ processParams.mrzFormatsFilter = [options valueForKey:@"mrzFormatsFilter"];
252
+ if([options valueForKey:@"documentGroupFilter"] != nil)
253
+ processParams.documentGroupFilter = [options mutableArrayValueForKey:@"documentGroupFilter"];
254
+ if([options valueForKey:@"lcidIgnoreFilter"] != nil)
255
+ processParams.lcidIgnoreFilter = [options mutableArrayValueForKey:@"lcidIgnoreFilter"];
256
+ if([options valueForKey:@"lcidFilter"] != nil)
257
+ processParams.lcidFilter = [options mutableArrayValueForKey:@"lcidFilter"];
258
+
259
+ // JSONObject
260
+ if([options valueForKey:@"imageQA"] != nil)
261
+ [self setImageQA:processParams.imageQA input:[options valueForKey:@"imageQA"]];
262
+ if([options valueForKey:@"rfidParams"] != nil)
263
+ processParams.rfidParams = [RGLWJSONConstructor rfidParamsFromJson:[options valueForKey:@"rfidParams"]];
264
+ if([options valueForKey:@"faceApiParams"] != nil)
265
+ processParams.faceApiParams = [RGLWJSONConstructor faceAPIParamsFromJson:[options valueForKey:@"faceApiParams"]];
266
+ if([options valueForKey:@"backendProcessingConfig"] != nil)
267
+ processParams.backendProcessingConfig = [RGLWJSONConstructor backendProcessingConfigFromJson:[options valueForKey:@"backendProcessingConfig"]];
268
+ if([options valueForKey:@"authenticityParams"] != nil) {
269
+ if(processParams.authenticityParams == nil) processParams.authenticityParams = [RGLAuthenticityParams defaultParams];
270
+ [self setAuthenticityParams:processParams.authenticityParams input:[options valueForKey:@"authenticityParams"]];
271
+ }
272
+
273
+ // Custom
274
+ if([options valueForKey:@"customParams"] != nil)
275
+ processParams.customParams = [options valueForKey:@"customParams"];
276
+ }
277
+
278
+ +(NSDictionary*)getProcessParams:(RGLProcessParams*)processParams {
279
+ NSMutableDictionary *result = [NSMutableDictionary new];
280
+
281
+ // Boolean
282
+ result[@"multipageProcessing"] = processParams.multipageProcessing;
283
+ result[@"logs"] = processParams.logs;
284
+ result[@"debugSaveImages"] = processParams.debugSaveImages;
285
+ result[@"debugSaveLogs"] = processParams.debugSaveLogs;
286
+ result[@"returnUncroppedImage"] = processParams.returnUncroppedImage;
287
+ result[@"debugSaveCroppedImages"] = processParams.debugSaveCroppedImages;
288
+ result[@"disableFocusingCheck"] = processParams.disableFocusingCheck;
289
+ result[@"debugSaveRFIDSession"] = processParams.debugSaveRFIDSession;
290
+ result[@"doublePageSpread"] = processParams.doublePageSpread;
291
+ result[@"manualCrop"] = processParams.manualCrop;
292
+ result[@"integralImage"] = processParams.integralImage;
293
+ result[@"returnCroppedBarcode"] = processParams.returnCroppedBarcode;
294
+ result[@"checkRequiredTextFields"] = processParams.checkRequiredTextFields;
295
+ result[@"depersonalizeLog"] = processParams.depersonalizeLog;
296
+ result[@"generateDoublePageSpreadImage"] = processParams.generateDoublePageSpreadImage;
297
+ result[@"alreadyCropped"] = processParams.alreadyCropped;
298
+ result[@"matchTextFieldMask"] = processParams.matchTextFieldMask;
299
+ result[@"updateOCRValidityByGlare"] = processParams.updateOCRValidityByGlare;
300
+ result[@"noGraphics"] = processParams.noGraphics;
301
+ result[@"multiDocOnImage"] = processParams.multiDocOnImage;
302
+ result[@"forceReadMrzBeforeLocate"] = processParams.forceReadMrzBeforeLocate;
303
+ result[@"parseBarcodes"] = processParams.parseBarcodes;
304
+ result[@"shouldReturnPackageForReprocess"] = processParams.shouldReturnPackageForReprocess;
305
+ result[@"disablePerforationOCR"] = processParams.disablePerforationOCR;
306
+ result[@"respectImageQuality"] = processParams.respectImageQuality;
307
+ result[@"strictImageQuality"] = processParams.strictImageQuality;
308
+ result[@"splitNames"] = processParams.splitNames;
309
+ result[@"doDetectCan"] = processParams.doDetectCan;
310
+ result[@"useFaceApi"] = processParams.useFaceApi;
311
+ result[@"useAuthenticityCheck"] = processParams.useAuthenticityCheck;
312
+ result[@"checkHologram"] = processParams.checkHologram;
313
+ result[@"generateNumericCodes"] = processParams.generateNumericCodes;
314
+ result[@"strictBarcodeDigitalSignatureCheck"] = processParams.strictBarcodeDigitalSignatureCheck;
315
+ result[@"selectLongestNames"] = processParams.selectLongestNames;
316
+ result[@"generateDTCVC"] = processParams.generateDTCVC;
317
+ result[@"strictDLCategoryExpiry"] = processParams.strictDLCategoryExpiry;
318
+ result[@"generateAlpha2Codes"] = processParams.generateAlpha2Codes;
319
+ result[@"disableAuthResolutionFilter"] = processParams.disableAuthResolutionFilter;
320
+ result[@"strictSecurityChecks"] = processParams.strictSecurityChecks;
321
+
322
+ // Int
323
+ result[@"measureSystem"] = [NSNumber numberWithInteger:processParams.measureSystem];
324
+ result[@"barcodeParserType"] = processParams.barcodeParserType;
325
+ result[@"perspectiveAngle"] = processParams.perspectiveAngle;
326
+ result[@"minDPI"] = processParams.minDPI;
327
+ result[@"imageDpiOutMax"] = processParams.imageDpiOutMax;
328
+ result[@"forceDocID"] = processParams.forceDocID;
329
+ result[@"forceDocFormat"] = processParams.forceDocFormat;
330
+ result[@"shiftExpiryDate"] = processParams.shiftExpiryDate;
331
+ result[@"minimalHolderAge"] = processParams.minimalHolderAge;
332
+ result[@"imageOutputMaxHeight"] = processParams.imageOutputMaxHeight;
333
+ result[@"imageOutputMaxWidth"] = processParams.imageOutputMaxWidth;
334
+ result[@"processAuth"] = processParams.processAuth;
335
+ result[@"convertCase"] = [self generateWithTextProcessing:processParams.convertCase];
336
+ result[@"logLevel"] = processParams.logLevel;
337
+ result[@"mrzDetectMode"] = processParams.mrzDetectMode;
338
+ result[@"pdfPagesLimit"] = processParams.pdfPagesLimit;
339
+
340
+ // String
341
+ result[@"dateFormat"] = processParams.dateFormat;
342
+ result[@"scenario"] = processParams.scenario;
343
+ result[@"captureButtonScenario"] = processParams.captureButtonScenario;
344
+
345
+ // Double
346
+ result[@"timeout"] = processParams.timeout;
347
+ result[@"timeoutFromFirstDetect"] = processParams.timeoutFromFirstDetect;
348
+ result[@"timeoutFromFirstDocType"] = processParams.timeoutFromFirstDocType;
349
+ result[@"documentAreaMin"] = processParams.documentAreaMin;
350
+ result[@"timeoutLiveness"] = processParams.timeoutLiveness;
351
+
352
+ // JSONArray
353
+ result[@"documentIDList"] = processParams.documentIDList;
354
+ result[@"barcodeTypes"] = processParams.barcodeTypes;
355
+ result[@"fieldTypesFilter"] = processParams.fieldTypesFilter;
356
+ result[@"documentGroupFilter"] = processParams.documentGroupFilter;
357
+ result[@"lcidIgnoreFilter"] = processParams.lcidIgnoreFilter;
358
+ result[@"lcidFilter"] = processParams.lcidFilter;
359
+ result[@"mrzFormatsFilter"] = processParams.mrzFormatsFilter;
360
+ result[@"resultTypeOutput"] = processParams.resultTypeOutput;
361
+
362
+ // JSONObject
363
+ result[@"imageQA"] = [self getImageQA:processParams.imageQA];
364
+ result[@"rfidParams"] = [RGLWJSONConstructor generateRFIDParams:processParams.rfidParams];
365
+ result[@"faceApiParams"] = [RGLWJSONConstructor generateFaceAPIParams:processParams.faceApiParams];
366
+ result[@"backendProcessingConfig"] = [RGLWJSONConstructor generateBackendProcessingConfig:processParams.backendProcessingConfig];
367
+ result[@"authenticityParams"] = [self getAuthenticityParams:processParams.authenticityParams];
368
+
369
+ // Custom
370
+ result[@"customParams"] = processParams.customParams;
371
+
372
+ return result;
373
+ }
374
+
375
+ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization {
376
+ // Boolean
377
+ if([options valueForKey:@"showStatusMessages"] != nil)
378
+ customization.showStatusMessages = [[options valueForKey:@"showStatusMessages"] boolValue];
379
+ if([options valueForKey:@"showResultStatusMessages"] != nil)
380
+ customization.showResultStatusMessages = [[options valueForKey:@"showResultStatusMessages"] boolValue];
381
+ if([options valueForKey:@"showHelpAnimation"] != nil)
382
+ customization.showHelpAnimation = [[options valueForKey:@"showHelpAnimation"] boolValue];
383
+ if([options valueForKey:@"showNextPageAnimation"] != nil)
384
+ customization.showNextPageAnimation = [[options valueForKey:@"showNextPageAnimation"] boolValue];
385
+ if([options valueForKey:@"showBackgroundMask"] != nil)
386
+ customization.showBackgroundMask = [[options valueForKey:@"showBackgroundMask"] boolValue];
387
+
388
+ // Int
389
+ if([options valueForKey:@"cameraFrameBorderWidth"] != nil)
390
+ customization.cameraFrameBorderWidth = [[options valueForKey:@"cameraFrameBorderWidth"] floatValue];
391
+ if([options valueForKey:@"cameraFrameLineLength"] != nil)
392
+ customization.cameraFrameLineLength = [[options valueForKey:@"cameraFrameLineLength"] floatValue];
393
+ if([options valueForKey:@"cameraFrameShapeType"] != nil)
394
+ customization.cameraFrameShapeType = [[options valueForKey:@"cameraFrameShapeType"] integerValue];
395
+ if([options valueForKey:@"cameraFrameOffsetWidth"] != nil)
396
+ customization.cameraFrameOffsetWidth = [[options valueForKey:@"cameraFrameOffsetWidth"] floatValue];
397
+ if(options[@"nextPageAnimationStartDelay"]) customization.nextPageAnimationStartDelay = [options[@"nextPageAnimationStartDelay"] floatValue];
398
+ if(options[@"nextPageAnimationEndDelay"]) customization.nextPageAnimationEndDelay = [options[@"nextPageAnimationEndDelay"] floatValue];
399
+
400
+ // String
401
+ if([options valueForKey:@"status"] != nil)
402
+ customization.status = [options valueForKey:@"status"];
403
+ if([options valueForKey:@"resultStatus"] != nil)
404
+ customization.resultStatus = [options valueForKey:@"resultStatus"];
405
+ if(options[@"multipageButtonText"]) customization.multipageButtonText = options[@"multipageButtonText"];
406
+
407
+ // Color
408
+ if([options valueForKey:@"cameraFrameDefaultColor"] != nil)
409
+ customization.cameraFrameDefaultColor = [self colorWithInt:[options valueForKey:@"cameraFrameDefaultColor"]];
410
+ if([options valueForKey:@"cameraFrameActiveColor"] != nil)
411
+ customization.cameraFrameActiveColor = [self colorWithInt:[options valueForKey:@"cameraFrameActiveColor"]];
412
+ if([options valueForKey:@"statusTextColor"] != nil)
413
+ customization.statusTextColor = [self colorWithInt:[options valueForKey:@"statusTextColor"]];
414
+ if([options valueForKey:@"resultStatusTextColor"] != nil)
415
+ customization.resultStatusTextColor = [self colorWithInt:[options valueForKey:@"resultStatusTextColor"]];
416
+ if([options valueForKey:@"resultStatusBackgroundColor"] != nil)
417
+ customization.resultStatusBackgroundColor = [self colorWithInt:[options valueForKey:@"resultStatusBackgroundColor"]];
418
+ if([options valueForKey:@"multipageButtonBackgroundColor"] != nil)
419
+ customization.multipageButtonBackgroundColor = [self colorWithInt:[options valueForKey:@"multipageButtonBackgroundColor"]];
420
+ if([options valueForKey:@"tintColor"] != nil)
421
+ customization.tintColor = [self colorWithInt:[options valueForKey:@"tintColor"]];
422
+ if([options valueForKey:@"activityIndicatorColor"] != nil)
423
+ customization.activityIndicatorColor = [self colorWithInt:[options valueForKey:@"activityIndicatorColor"]];
424
+ if([options valueForKey:@"statusBackgroundColor"] != nil)
425
+ customization.statusBackgroundColor = [self colorWithInt:[options valueForKey:@"statusBackgroundColor"]];
426
+ if([options valueForKey:@"cameraPreviewBackgroundColor"] != nil)
427
+ customization.cameraPreviewBackgroundColor = [self colorWithInt:[options valueForKey:@"cameraPreviewBackgroundColor"]];
428
+ if([options valueForKey:@"backgroundMaskColor"] != nil)
429
+ customization.backgroundMaskColor = [self colorWithInt:[options valueForKey:@"backgroundMaskColor"]];
430
+ if(options[@"multipageButtonTextColor"]) customization.multipageButtonTextColor = [self colorWithInt:options[@"multipageButtonTextColor"]];
431
+
432
+ // Float
433
+ if([options valueForKey:@"statusPositionMultiplier"] != nil)
434
+ customization.statusPositionMultiplier = [[options valueForKey:@"statusPositionMultiplier"] floatValue];
435
+ if([options valueForKey:@"resultStatusPositionMultiplier"] != nil)
436
+ customization.resultStatusPositionMultiplier = [[options valueForKey:@"resultStatusPositionMultiplier"] floatValue];
437
+ if([options valueForKey:@"toolbarSize"] != nil)
438
+ customization.toolbarSize = [[options valueForKey:@"toolbarSize"] floatValue];
439
+ if([options valueForKey:@"backgroundMaskAlpha"] != nil)
440
+ customization.backgroundMaskAlpha = [[options valueForKey:@"backgroundMaskAlpha"] floatValue];
441
+ if([options valueForKey:@"customStatusPositionMultiplier"] != nil)
442
+ customization.customStatusPositionMultiplier = [[options valueForKey:@"customStatusPositionMultiplier"] floatValue];
443
+ if([options valueForKey:@"cameraFrameVerticalPositionMultiplier"] != nil)
444
+ customization.cameraFrameVerticalPositionMultiplier = [[options valueForKey:@"cameraFrameVerticalPositionMultiplier"] floatValue];
445
+ if([options valueForKey:@"cameraFrameLandscapeAspectRatio"] != nil)
446
+ customization.cameraFrameLandscapeAspectRatio = [[options valueForKey:@"cameraFrameLandscapeAspectRatio"] floatValue];
447
+ if([options valueForKey:@"cameraFramePortraitAspectRatio"] != nil)
448
+ customization.cameraFramePortraitAspectRatio = [[options valueForKey:@"cameraFramePortraitAspectRatio"] floatValue];
449
+ if([options valueForKey:@"cameraFrameCornerRadius"] != nil)
450
+ customization.cameraFrameCornerRadius = [[options valueForKey:@"cameraFrameCornerRadius"] floatValue];
451
+ if([options valueForKey:@"livenessAnimationPositionMultiplier"] != nil)
452
+ customization.livenessAnimationPositionMultiplier = [[options valueForKey:@"livenessAnimationPositionMultiplier"] floatValue];
453
+ if(options[@"activityIndicatorPortraitPositionMultiplier"]) customization.activityIndicatorPortraitPositionMultiplier = [options[@"activityIndicatorPortraitPositionMultiplier"] floatValue];
454
+ if(options[@"activityIndicatorLandscapePositionMultiplier"]) customization.activityIndicatorLandscapePositionMultiplier = [options[@"activityIndicatorLandscapePositionMultiplier"] floatValue];
455
+ if(options[@"cameraPreviewVerticalPositionMultiplier"]) customization.previewLayerPositionMultiplier = [options[@"cameraPreviewVerticalPositionMultiplier"] floatValue];
456
+
457
+ // Drawable
458
+ if([options valueForKey:@"multipageAnimationFrontImage"] != nil)
459
+ customization.multipageAnimationFrontImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"multipageAnimationFrontImage"]];
460
+ if([options valueForKey:@"multipageAnimationBackImage"] != nil)
461
+ customization.multipageAnimationBackImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"multipageAnimationBackImage"]];
462
+ if([options valueForKey:@"borderBackgroundImage"] != nil)
463
+ customization.borderBackgroundImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"borderBackgroundImage"]];
464
+ if([options valueForKey:@"helpAnimationImage"] != nil)
465
+ customization.helpAnimationImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"helpAnimationImage"]];
466
+ if([options valueForKey:@"closeButtonImage"] != nil)
467
+ customization.closeButtonImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"closeButtonImage"]];
468
+ if([options valueForKey:@"captureButtonImage"] != nil)
469
+ customization.captureButtonImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"captureButtonImage"]];
470
+ if([options valueForKey:@"changeFrameButtonCollapseImage"] != nil)
471
+ customization.changeFrameButtonCollapseImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"changeFrameButtonCollapseImage"]];
472
+ if([options valueForKey:@"changeFrameButtonExpandImage"] != nil)
473
+ customization.changeFrameButtonExpandImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"changeFrameButtonExpandImage"]];
474
+ if([options valueForKey:@"cameraSwitchButtonImage"] != nil)
475
+ customization.cameraSwitchButtonImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"cameraSwitchButtonImage"]];
476
+ if([options valueForKey:@"torchButtonOnImage"] != nil)
477
+ customization.torchButtonOnImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"torchButtonOnImage"]];
478
+ if([options valueForKey:@"torchButtonOffImage"] != nil)
479
+ customization.torchButtonOffImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"torchButtonOffImage"]];
480
+ if([options valueForKey:@"livenessAnimationImage"] != nil)
481
+ customization.livenessAnimationImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"livenessAnimationImage"]];
482
+ if(options[@"multipageButtonImage"]) customization.multipageButtonImage = [RGLWJSONConstructor imageWithBase64:options[@"multipageButtonImage"]];
483
+
484
+ // Font
485
+ if([options valueForKey:@"statusTextFont"] != nil)
486
+ customization.statusTextFont = [self UIFontFromJSON:[options valueForKey:@"statusTextFont"]];
487
+ if([options valueForKey:@"resultStatusTextFont"] != nil)
488
+ customization.resultStatusTextFont = [self UIFontFromJSON:[options valueForKey:@"resultStatusTextFont"]];
489
+ if(options[@"multipageButtonTextFont"]) customization.multipageButtonTextFont = [self UIFontFromJSON:options[@"multipageButtonTextFont"]];
490
+
491
+ // Custom
492
+ if([options valueForKey:@"customLabelStatus"] != nil)
493
+ customization.customLabelStatus = [[NSAttributedString alloc]initWithString:[options valueForKey:@"customLabelStatus"]];
494
+ if([options valueForKey:@"cameraFrameLineCap"] != nil)
495
+ customization.cameraFrameLineCap = [self lineCapWithNumber:[options valueForKey:@"cameraFrameLineCap"]];
496
+ if([options valueForKey:@"uiCustomizationLayer"] != nil)
497
+ customization.customUILayerJSON = [options valueForKey:@"uiCustomizationLayer"];
498
+
499
+ // ContentMode
500
+ if([options valueForKey:@"helpAnimationImageContentMode"] != nil)
501
+ customization.helpAnimationImageContentMode = [self viewContentModeWithNumber:[options valueForKey:@"helpAnimationImageContentMode"]];
502
+ if([options valueForKey:@"multipageAnimationFrontImageContentMode"] != nil)
503
+ customization.multipageAnimationFrontImageContentMode = [self viewContentModeWithNumber:[options valueForKey:@"multipageAnimationFrontImageContentMode"]];
504
+ if([options valueForKey:@"multipageAnimationBackImageContentMode"] != nil)
505
+ customization.multipageAnimationBackImageContentMode = [self viewContentModeWithNumber:[options valueForKey:@"multipageAnimationBackImageContentMode"]];
506
+ if([options valueForKey:@"livenessAnimationImageContentMode"] != nil)
507
+ customization.livenessAnimationImageContentMode = [self viewContentModeWithNumber:[options valueForKey:@"livenessAnimationImageContentMode"]];
508
+ if([options valueForKey:@"borderBackgroundImageContentMode"] != nil)
509
+ customization.borderBackgroundImageContentMode = [self viewContentModeWithNumber:[options valueForKey:@"borderBackgroundImageContentMode"]];
510
+
511
+ if([options valueForKey:@"colors"] != nil)
512
+ [self setColors:[customization.uiConfiguration valueForKey:@"colors"] input:[options valueForKey:@"colors"]];
513
+ if([options valueForKey:@"fonts"] != nil)
514
+ [self setFonts:[customization.uiConfiguration valueForKey:@"fonts"] input:[options valueForKey:@"fonts"]];
515
+ if([options valueForKey:@"images"] != nil)
516
+ [self setImages:[customization.uiConfiguration valueForKey:@"images"] input:[options valueForKey:@"images"]];
517
+ }
518
+
519
+ +(NSDictionary*)getCustomization:(RGLCustomization*)customization {
520
+ NSMutableDictionary *result = [NSMutableDictionary new];
521
+
522
+ // Boolean
523
+ result[@"showStatusMessages"] = [NSNumber numberWithBool:customization.showStatusMessages];
524
+ result[@"showResultStatusMessages"] = [NSNumber numberWithBool:customization.showResultStatusMessages];
525
+ result[@"showHelpAnimation"] = [NSNumber numberWithBool:customization.showHelpAnimation];
526
+ result[@"showNextPageAnimation"] = [NSNumber numberWithBool:customization.showNextPageAnimation];
527
+ result[@"showBackgroundMask"] = [NSNumber numberWithBool:customization.showBackgroundMask];
528
+
529
+ // Int
530
+ result[@"cameraFrameBorderWidth"] = [NSNumber numberWithFloat:customization.cameraFrameBorderWidth];
531
+ result[@"cameraFrameLineLength"] = [NSNumber numberWithFloat:customization.cameraFrameLineLength];
532
+ result[@"cameraFrameShapeType"] = [NSNumber numberWithFloat:customization.cameraFrameShapeType];
533
+ result[@"cameraFrameOffsetWidth"] = [NSNumber numberWithFloat:customization.cameraFrameOffsetWidth];
534
+ result[@"nextPageAnimationStartDelay"] = [NSNumber numberWithFloat:customization.nextPageAnimationStartDelay];
535
+ result[@"nextPageAnimationEndDelay"] = [NSNumber numberWithFloat:customization.nextPageAnimationEndDelay];
536
+
537
+ // String
538
+ result[@"status"] = customization.status;
539
+ result[@"resultStatus"] = customization.resultStatus;
540
+ result[@"multipageButtonText"] = customization.multipageButtonText;
541
+
542
+ // Color
543
+ result[@"cameraFrameDefaultColor"] = [self intWithColor:customization.cameraFrameDefaultColor];
544
+ result[@"cameraFrameActiveColor"] = [self intWithColor:customization.cameraFrameActiveColor];
545
+ result[@"statusTextColor"] = [self intWithColor:customization.statusTextColor];
546
+ result[@"resultStatusTextColor"] = [self intWithColor:customization.resultStatusTextColor];
547
+ result[@"resultStatusBackgroundColor"] = [self intWithColor:customization.resultStatusBackgroundColor];
548
+ result[@"multipageButtonBackgroundColor"] = [self intWithColor:customization.multipageButtonBackgroundColor];
549
+ result[@"tintColor"] = [self intWithColor:customization.tintColor];
550
+ result[@"activityIndicatorColor"] = [self intWithColor:customization.activityIndicatorColor];
551
+ result[@"statusBackgroundColor"] = [self intWithColor:customization.statusBackgroundColor];
552
+ result[@"cameraPreviewBackgroundColor"] = [self intWithColor:customization.cameraPreviewBackgroundColor];
553
+ result[@"backgroundMaskColor"] = [self intWithColor:customization.backgroundMaskColor];
554
+ result[@"multipageButtonTextColor"] = [self intWithColor:customization.multipageButtonTextColor];
555
+
556
+ // Float
557
+ result[@"statusPositionMultiplier"] = [NSNumber numberWithFloat:customization.statusPositionMultiplier];
558
+ result[@"resultStatusPositionMultiplier"] = [NSNumber numberWithFloat:customization.resultStatusPositionMultiplier];
559
+ result[@"backgroundMaskAlpha"] = [NSNumber numberWithFloat:customization.backgroundMaskAlpha];
560
+ result[@"toolbarSize"] = [NSNumber numberWithFloat:customization.toolbarSize];
561
+ result[@"customStatusPositionMultiplier"] = [NSNumber numberWithFloat:customization.customStatusPositionMultiplier];
562
+ result[@"cameraFrameVerticalPositionMultiplier"] = [NSNumber numberWithFloat:customization.cameraFrameVerticalPositionMultiplier];
563
+ result[@"cameraFrameLandscapeAspectRatio"] = [NSNumber numberWithFloat:customization.cameraFrameLandscapeAspectRatio];
564
+ result[@"cameraFramePortraitAspectRatio"] = [NSNumber numberWithFloat:customization.cameraFramePortraitAspectRatio];
565
+ result[@"cameraFrameCornerRadius"] = [NSNumber numberWithFloat:customization.cameraFrameCornerRadius];
566
+ result[@"livenessAnimationPositionMultiplier"] = [NSNumber numberWithFloat:customization.livenessAnimationPositionMultiplier];
567
+ result[@"activityIndicatorPortraitPositionMultiplier"] = [NSNumber numberWithFloat:customization.activityIndicatorPortraitPositionMultiplier];
568
+ result[@"activityIndicatorLandscapePositionMultiplier"] = [NSNumber numberWithFloat:customization.activityIndicatorLandscapePositionMultiplier];
569
+ result[@"cameraPreviewVerticalPositionMultiplier"] = [NSNumber numberWithFloat:customization.previewLayerPositionMultiplier];
570
+
571
+ // Drawable
572
+ result[@"multipageAnimationFrontImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageAnimationFrontImage];
573
+ result[@"multipageAnimationBackImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageAnimationBackImage];
574
+ result[@"borderBackgroundImage"] = [RGLWJSONConstructor base64WithImage:customization.borderBackgroundImage];
575
+ result[@"helpAnimationImage"] = [RGLWJSONConstructor base64WithImage:customization.helpAnimationImage];
576
+ result[@"closeButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.closeButtonImage];
577
+ result[@"captureButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.captureButtonImage];
578
+ result[@"changeFrameButtonCollapseImage"] = [RGLWJSONConstructor base64WithImage:customization.changeFrameButtonCollapseImage];
579
+ result[@"changeFrameButtonExpandImage"] = [RGLWJSONConstructor base64WithImage:customization.changeFrameButtonExpandImage];
580
+ result[@"cameraSwitchButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.cameraSwitchButtonImage];
581
+ result[@"torchButtonOnImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOnImage];
582
+ result[@"torchButtonOffImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOffImage];
583
+ result[@"livenessAnimationImage"] = [RGLWJSONConstructor base64WithImage:customization.livenessAnimationImage];
584
+ result[@"multipageButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageButtonImage];
585
+
586
+ // Font
587
+ result[@"statusTextFont"] = [self generateUIFont:customization.statusTextFont];
588
+ result[@"resultStatusTextFont"] = [self generateUIFont:customization.resultStatusTextFont];
589
+ result[@"multipageButtonTextFont"] = [self generateUIFont:customization.multipageButtonTextFont];
590
+
591
+ // Custom
592
+ if(customization.customLabelStatus != nil) result[@"customLabelStatus"] = customization.customLabelStatus.string;
593
+ result[@"cameraFrameLineCap"] = [self generateLineCap:customization.cameraFrameLineCap];
594
+ result[@"uiCustomizationLayer"] = customization.customUILayerJSON;
595
+
596
+ // ContentMode
597
+ result[@"helpAnimationImageContentMode"] = [self generateViewContentMode:customization.helpAnimationImageContentMode];
598
+ result[@"multipageAnimationFrontImageContentMode"] = [self generateViewContentMode:customization.multipageAnimationFrontImageContentMode];
599
+ result[@"multipageAnimationBackImageContentMode"] = [self generateViewContentMode:customization.multipageAnimationBackImageContentMode];
600
+ result[@"livenessAnimationImageContentMode"] = [self generateViewContentMode:customization.livenessAnimationImageContentMode];
601
+ result[@"borderBackgroundImageContentMode"] = [self generateViewContentMode:customization.borderBackgroundImageContentMode];
602
+
603
+ result[@"colors"] = [self getColors: [customization.uiConfiguration valueForKey:@"colors"]];
604
+ result[@"fonts"] = [self getFonts: [customization.uiConfiguration valueForKey:@"fonts"]];
605
+ result[@"images"] = [self getImages: [customization.uiConfiguration valueForKey:@"images"]];
606
+
607
+ return result;
608
+ }
609
+
610
+ +(void)setRfidScenario:(NSDictionary*)options :(RGLRFIDScenario*)rfidScenario {
611
+ // Boolean
612
+ if([options valueForKey:@"paceStaticBinding"] != nil)
613
+ rfidScenario.paceStaticBinding = [[options valueForKey:@"paceStaticBinding"] boolValue];
614
+ if([options valueForKey:@"onlineTA"] != nil)
615
+ rfidScenario.onlineTA = [[options valueForKey:@"onlineTA"] boolValue];
616
+ if([options valueForKey:@"writeEid"] != nil)
617
+ rfidScenario.writeEid = [[options valueForKey:@"writeEid"] boolValue];
618
+ if([options valueForKey:@"universalAccessRights"] != nil)
619
+ rfidScenario.universalAccessRights = [[options valueForKey:@"universalAccessRights"] boolValue];
620
+ if([options valueForKey:@"authorizedRestrictedIdentification"] != nil)
621
+ rfidScenario.authorizedRestrictedIdentification = [[options valueForKey:@"authorizedRestrictedIdentification"] boolValue];
622
+ if([options valueForKey:@"auxVerificationCommunityID"] != nil)
623
+ rfidScenario.auxVerificationCommunityID = [[options valueForKey:@"auxVerificationCommunityID"] boolValue];
624
+ if([options valueForKey:@"auxVerificationDateOfBirth"] != nil)
625
+ rfidScenario.auxVerificationDateOfBirth = [[options valueForKey:@"auxVerificationDateOfBirth"] boolValue];
626
+ if([options valueForKey:@"skipAA"] != nil)
627
+ rfidScenario.skipAA = [[options valueForKey:@"skipAA"] boolValue];
628
+ if([options valueForKey:@"strictProcessing"] != nil)
629
+ rfidScenario.strictProcessing = [[options valueForKey:@"strictProcessing"] boolValue];
630
+ if([options valueForKey:@"pkdDSCertPriority"] != nil)
631
+ rfidScenario.pkdDSCertPriority = [[options valueForKey:@"pkdDSCertPriority"] boolValue];
632
+ if([options valueForKey:@"pkdUseExternalCSCA"] != nil)
633
+ rfidScenario.pkdUseExternalCSCA = [[options valueForKey:@"pkdUseExternalCSCA"] boolValue];
634
+ if([options valueForKey:@"trustedPKD"] != nil)
635
+ rfidScenario.trustedPKD = [[options valueForKey:@"trustedPKD"] boolValue];
636
+ if([options valueForKey:@"passiveAuth"] != nil)
637
+ rfidScenario.passiveAuth = [[options valueForKey:@"passiveAuth"] boolValue];
638
+ if([options valueForKey:@"useSFI"] != nil)
639
+ rfidScenario.useSFI = [[options valueForKey:@"useSFI"] boolValue];
640
+ if([options valueForKey:@"readEPassport"] != nil)
641
+ rfidScenario.readEPassport = [[options valueForKey:@"readEPassport"] boolValue];
642
+ if([options valueForKey:@"readEID"] != nil)
643
+ rfidScenario.readEID = [[options valueForKey:@"readEID"] boolValue];
644
+ if([options valueForKey:@"readEDL"] != nil)
645
+ rfidScenario.readEDL = [[options valueForKey:@"readEDL"] boolValue];
646
+ if([options valueForKey:@"authorizedSTSignature"] != nil)
647
+ rfidScenario.authorizedSTSignature = [[options valueForKey:@"authorizedSTSignature"] boolValue];
648
+ if([options valueForKey:@"authorizedSTQSignature"] != nil)
649
+ rfidScenario.authorizedSTQSignature = [[options valueForKey:@"authorizedSTQSignature"] boolValue];
650
+ if([options valueForKey:@"authorizedWriteDG17"] != nil)
651
+ rfidScenario.authorizedWriteDG17 = [[options valueForKey:@"authorizedWriteDG17"] boolValue];
652
+ if([options valueForKey:@"authorizedWriteDG18"] != nil)
653
+ rfidScenario.authorizedWriteDG18 = [[options valueForKey:@"authorizedWriteDG18"] boolValue];
654
+ if([options valueForKey:@"authorizedWriteDG19"] != nil)
655
+ rfidScenario.authorizedWriteDG19 = [[options valueForKey:@"authorizedWriteDG19"] boolValue];
656
+ if([options valueForKey:@"authorizedWriteDG20"] != nil)
657
+ rfidScenario.authorizedWriteDG20 = [[options valueForKey:@"authorizedWriteDG20"] boolValue];
658
+ if([options valueForKey:@"authorizedWriteDG21"] != nil)
659
+ rfidScenario.authorizedWriteDG21 = [[options valueForKey:@"authorizedWriteDG21"] boolValue];
660
+ if([options valueForKey:@"authorizedVerifyAge"] != nil)
661
+ rfidScenario.authorizedVerifyAge = [[options valueForKey:@"authorizedVerifyAge"] boolValue];
662
+ if([options valueForKey:@"authorizedVerifyCommunityID"] != nil)
663
+ rfidScenario.authorizedVerifyCommunityID = [[options valueForKey:@"authorizedVerifyCommunityID"] boolValue];
664
+ if([options valueForKey:@"authorizedPrivilegedTerminal"] != nil)
665
+ rfidScenario.authorizedPrivilegedTerminal = [[options valueForKey:@"authorizedPrivilegedTerminal"] boolValue];
666
+ if([options valueForKey:@"authorizedCANAllowed"] != nil)
667
+ rfidScenario.authorizedCANAllowed = [[options valueForKey:@"authorizedCANAllowed"] boolValue];
668
+ if([options valueForKey:@"authorizedPINManagement"] != nil)
669
+ rfidScenario.authorizedPINManagment = [[options valueForKey:@"authorizedPINManagement"] boolValue];
670
+ if([options valueForKey:@"authorizedInstallCert"] != nil)
671
+ rfidScenario.authorizedInstallCert = [[options valueForKey:@"authorizedInstallCert"] boolValue];
672
+ if([options valueForKey:@"authorizedInstallQCert"] != nil)
673
+ rfidScenario.authorizedInstallQCert = [[options valueForKey:@"authorizedInstallQCert"] boolValue];
674
+ if([options valueForKey:@"applyAmendments"] != nil)
675
+ rfidScenario.applyAmendments = [[options valueForKey:@"applyAmendments"] boolValue];
676
+ if([options valueForKey:@"autoSettings"] != nil)
677
+ rfidScenario.autoSettings = [[options valueForKey:@"autoSettings"] boolValue];
678
+ if([options valueForKey:@"proceedReadingAlways"] != nil)
679
+ rfidScenario.proceedReadingAlways = [[options valueForKey:@"proceedReadingAlways"] boolValue];
680
+ if(options[@"readDTC"]) rfidScenario.readDTC = [options[@"readDTC"] boolValue];
681
+ if(options[@"mrzStrictCheck"]) rfidScenario.mrzStrictCheck = options[@"mrzStrictCheck"];
682
+ if(options[@"loadCRLFromRemote"]) rfidScenario.loadCRLFromRemote = [options[@"loadCRLFromRemote"] boolValue];
683
+ if(options[@"independentSODStatus"]) rfidScenario.independentSODStatus = options[@"independentSODStatus"];
684
+
685
+ // Int
686
+ if([options valueForKey:@"signManagementAction"] != nil)
687
+ rfidScenario.signManagementAction = [[options valueForKey:@"signManagementAction"] integerValue];
688
+ if([options valueForKey:@"readingBuffer"] != nil)
689
+ rfidScenario.readingBuffer = [[options valueForKey:@"readingBuffer"] integerValue];
690
+ if([options valueForKey:@"onlineTAToSignDataType"] != nil)
691
+ rfidScenario.onlineTAToSignDataType = [[options valueForKey:@"onlineTAToSignDataType"] intValue];
692
+ if([options valueForKey:@"profilerType"] != nil)
693
+ rfidScenario.profilerType = [[options valueForKey:@"profilerType"] intValue];
694
+ if([options valueForKey:@"authProcType"] != nil)
695
+ rfidScenario.authProcType = [[options valueForKey:@"authProcType"] integerValue];
696
+ if([options valueForKey:@"baseSMProcedure"] != nil)
697
+ rfidScenario.baseSMProcedure = [[options valueForKey:@"baseSMProcedure"] integerValue];
698
+ if([options valueForKey:@"pacePasswordType"] != nil)
699
+ rfidScenario.pacePasswordType = [[options valueForKey:@"pacePasswordType"] integerValue];
700
+ if([options valueForKey:@"terminalType"] != nil)
701
+ rfidScenario.terminalType = [[options valueForKey:@"terminalType"] integerValue];
702
+ if([options valueForKey:@"defaultReadingBufferSize"] != nil)
703
+ rfidScenario.defaultReadingBufferSize = [[options valueForKey:@"defaultReadingBufferSize"] intValue];
704
+
705
+ // String
706
+ if([options valueForKey:@"password"] != nil)
707
+ rfidScenario.password = [options valueForKey:@"password"];
708
+ if([options valueForKey:@"pkdPA"] != nil)
709
+ rfidScenario.pkdPA = [options valueForKey:@"pkdPA"];
710
+ if([options valueForKey:@"pkdEAC"] != nil)
711
+ rfidScenario.pkdEAC = [options valueForKey:@"pkdEAC"];
712
+ if([options valueForKey:@"mrz"] != nil)
713
+ rfidScenario.mrz = [options valueForKey:@"mrz"];
714
+ if([options valueForKey:@"eSignPINDefault"] != nil)
715
+ rfidScenario.eSignPINDefault = [options valueForKey:@"eSignPINDefault"];
716
+ if([options valueForKey:@"eSignPINNewValue"] != nil)
717
+ rfidScenario.eSignPINNewValue = [options valueForKey:@"eSignPINNewValue"];
718
+ if(options[@"cardAccess"]) rfidScenario.cardAccess = options[@"cardAccess"];
719
+ if(options[@"mrzHash"]) rfidScenario.mrzHash = options[@"mrzHash"];
720
+ if(options[@"documentNumber"]) rfidScenario.documentNumber = options[@"documentNumber"];
721
+ if(options[@"dateOfBirth"]) rfidScenario.dateOfBirth = options[@"dateOfBirth"];
722
+ if(options[@"dateOfExpiry"]) rfidScenario.dateOfExpiry = options[@"dateOfExpiry"];
723
+
724
+ // DataGroup
725
+ if([options valueForKey:@"ePassportDataGroups"] != nil)
726
+ [self setDataGroups :rfidScenario.ePassportDataGroups dict:[options valueForKey:@"ePassportDataGroups"]];
727
+ if([options valueForKey:@"eIDDataGroups"] != nil)
728
+ [self setDataGroups :rfidScenario.eIDDataGroups dict:[options valueForKey:@"eIDDataGroups"]];
729
+ if([options valueForKey:@"eDLDataGroups"] != nil)
730
+ [self setDataGroups :rfidScenario.eDLDataGroups dict:[options valueForKey:@"eDLDataGroups"]];
731
+ if(options[@"dtcDataGroups"]) [self setDTCDataGroup :rfidScenario.DTCDataGroups dict:options[@"dtcDataGroups"]];
732
+ }
733
+
734
+ +(NSDictionary*)getRfidScenario:(RGLRFIDScenario*)rfidScenario {
735
+ NSMutableDictionary *result = [NSMutableDictionary new];
736
+
737
+ // Boolean
738
+ result[@"paceStaticBinding"] = [NSNumber numberWithBool:rfidScenario.paceStaticBinding];
739
+ result[@"onlineTA"] = [NSNumber numberWithBool:rfidScenario.onlineTA];
740
+ result[@"writeEid"] = [NSNumber numberWithBool:rfidScenario.writeEid];
741
+ result[@"universalAccessRights"] = [NSNumber numberWithBool:rfidScenario.universalAccessRights];
742
+ result[@"authorizedRestrictedIdentification"] = [NSNumber numberWithBool:rfidScenario.authorizedRestrictedIdentification];
743
+ result[@"auxVerificationCommunityID"] = [NSNumber numberWithBool:rfidScenario.auxVerificationCommunityID];
744
+ result[@"auxVerificationDateOfBirth"] = [NSNumber numberWithBool:rfidScenario.auxVerificationDateOfBirth];
745
+ result[@"skipAA"] = [NSNumber numberWithBool:rfidScenario.skipAA];
746
+ result[@"strictProcessing"] = [NSNumber numberWithBool:rfidScenario.strictProcessing];
747
+ result[@"pkdDSCertPriority"] = [NSNumber numberWithBool:rfidScenario.pkdDSCertPriority];
748
+ result[@"pkdUseExternalCSCA"] = [NSNumber numberWithBool:rfidScenario.pkdUseExternalCSCA];
749
+ result[@"trustedPKD"] = [NSNumber numberWithBool:rfidScenario.trustedPKD];
750
+ result[@"passiveAuth"] = [NSNumber numberWithBool:rfidScenario.passiveAuth];
751
+ result[@"useSFI"] = [NSNumber numberWithBool:rfidScenario.useSFI];
752
+ result[@"readEPassport"] = [NSNumber numberWithBool:rfidScenario.readEPassport];
753
+ result[@"readEID"] = [NSNumber numberWithBool:rfidScenario.readEID];
754
+ result[@"readEDL"] = [NSNumber numberWithBool:rfidScenario.readEDL];
755
+ result[@"authorizedSTSignature"] = [NSNumber numberWithBool:rfidScenario.authorizedSTSignature];
756
+ result[@"authorizedSTQSignature"] = [NSNumber numberWithBool:rfidScenario.authorizedSTQSignature];
757
+ result[@"authorizedWriteDG17"] = [NSNumber numberWithBool:rfidScenario.authorizedWriteDG17];
758
+ result[@"authorizedWriteDG18"] = [NSNumber numberWithBool:rfidScenario.authorizedWriteDG18];
759
+ result[@"authorizedWriteDG19"] = [NSNumber numberWithBool:rfidScenario.authorizedWriteDG19];
760
+ result[@"authorizedWriteDG20"] = [NSNumber numberWithBool:rfidScenario.authorizedWriteDG20];
761
+ result[@"authorizedWriteDG21"] = [NSNumber numberWithBool:rfidScenario.authorizedWriteDG21];
762
+ result[@"authorizedVerifyAge"] = [NSNumber numberWithBool:rfidScenario.authorizedVerifyAge];
763
+ result[@"authorizedVerifyCommunityID"] = [NSNumber numberWithBool:rfidScenario.authorizedVerifyCommunityID];
764
+ result[@"authorizedPrivilegedTerminal"] = [NSNumber numberWithBool:rfidScenario.authorizedPrivilegedTerminal];
765
+ result[@"authorizedCANAllowed"] = [NSNumber numberWithBool:rfidScenario.authorizedCANAllowed];
766
+ result[@"authorizedPINManagement"] = [NSNumber numberWithBool:rfidScenario.authorizedPINManagment];
767
+ result[@"authorizedInstallCert"] = [NSNumber numberWithBool:rfidScenario.authorizedInstallCert];
768
+ result[@"authorizedInstallQCert"] = [NSNumber numberWithBool:rfidScenario.authorizedInstallQCert];
769
+ result[@"applyAmendments"] = [NSNumber numberWithBool:rfidScenario.applyAmendments];
770
+ result[@"autoSettings"] = [NSNumber numberWithBool:rfidScenario.autoSettings];
771
+ result[@"proceedReadingAlways"] = [NSNumber numberWithBool:rfidScenario.proceedReadingAlways];
772
+ result[@"readDTC"] = [NSNumber numberWithBool:rfidScenario.readDTC];
773
+ result[@"mrzStrictCheck"] = rfidScenario.mrzStrictCheck;
774
+ result[@"loadCRLFromRemote"] = @(rfidScenario.loadCRLFromRemote);
775
+ result[@"independentSODStatus"] = rfidScenario.independentSODStatus;
776
+
777
+ // Int
778
+ result[@"signManagementAction"] = [NSNumber numberWithInteger:rfidScenario.signManagementAction];
779
+ result[@"readingBuffer"] = [NSNumber numberWithInteger:rfidScenario.readingBuffer];
780
+ result[@"onlineTAToSignDataType"] = [NSNumber numberWithInteger:rfidScenario.onlineTAToSignDataType];
781
+ result[@"profilerType"] = [NSNumber numberWithInteger:rfidScenario.profilerType];
782
+ result[@"authProcType"] = [NSNumber numberWithInteger:rfidScenario.authProcType];
783
+ result[@"baseSMProcedure"] = [NSNumber numberWithInteger:rfidScenario.baseSMProcedure];
784
+ result[@"pacePasswordType"] = [NSNumber numberWithInteger:rfidScenario.pacePasswordType];
785
+ result[@"terminalType"] = [NSNumber numberWithInteger:rfidScenario.terminalType];
786
+ result[@"defaultReadingBufferSize"] = [NSNumber numberWithInteger:rfidScenario.defaultReadingBufferSize];
787
+
788
+ // String
789
+ result[@"password"] = rfidScenario.password;
790
+ result[@"pkdPA"] = rfidScenario.pkdPA;
791
+ result[@"pkdEAC"] = rfidScenario.pkdEAC;
792
+ result[@"mrz"] = rfidScenario.mrz;
793
+ result[@"eSignPINDefault"] = rfidScenario.eSignPINDefault;
794
+ result[@"eSignPINNewValue"] = rfidScenario.eSignPINNewValue;
795
+ result[@"cardAccess"] = rfidScenario.cardAccess;
796
+ result[@"mrzHash"] = rfidScenario.mrzHash;
797
+ result[@"documentNumber"] = rfidScenario.documentNumber;
798
+ result[@"dateOfBirth"] = rfidScenario.dateOfBirth;
799
+ result[@"dateOfExpiry"] = rfidScenario.dateOfExpiry;
800
+
801
+ // DataGroup
802
+ result[@"eDLDataGroups"] = [self getDataGroups:rfidScenario.eDLDataGroups];
803
+ result[@"ePassportDataGroups"] = [self getDataGroups:rfidScenario.ePassportDataGroups];
804
+ result[@"eIDDataGroups"] = [self getDataGroups:rfidScenario.eIDDataGroups];
805
+ result[@"dtcDataGroups"] = [self getDTCDataGroup:rfidScenario.DTCDataGroups];
806
+
807
+ return result;
808
+ }
809
+
810
+ +(void)setDataGroups:(RGLDataGroup*)dataGroup dict:(NSDictionary*)dict {
811
+
812
+ // EDLDataGroups/Common: 1-14
813
+ if([dict valueForKey:@"DG1"] != nil)
814
+ dataGroup.dG1 = [[dict valueForKey:@"DG1"] boolValue];
815
+ if([dict valueForKey:@"DG2"] != nil)
816
+ dataGroup.dG2 = [[dict valueForKey:@"DG2"] boolValue];
817
+ if([dict valueForKey:@"DG3"] != nil)
818
+ dataGroup.dG3 = [[dict valueForKey:@"DG3"] boolValue];
819
+ if([dict valueForKey:@"DG4"] != nil)
820
+ dataGroup.dG4 = [[dict valueForKey:@"DG4"] boolValue];
821
+ if([dict valueForKey:@"DG5"] != nil)
822
+ dataGroup.dG5 = [[dict valueForKey:@"DG5"] boolValue];
823
+ if([dict valueForKey:@"DG6"] != nil)
824
+ dataGroup.dG6 = [[dict valueForKey:@"DG6"] boolValue];
825
+ if([dict valueForKey:@"DG7"] != nil)
826
+ dataGroup.dG7 = [[dict valueForKey:@"DG7"] boolValue];
827
+ if([dict valueForKey:@"DG8"] != nil)
828
+ dataGroup.dG8 = [[dict valueForKey:@"DG8"] boolValue];
829
+ if([dict valueForKey:@"DG9"] != nil)
830
+ dataGroup.dG9 = [[dict valueForKey:@"DG9"] boolValue];
831
+ if([dict valueForKey:@"DG10"] != nil)
832
+ dataGroup.dG10 = [[dict valueForKey:@"DG10"] boolValue];
833
+ if([dict valueForKey:@"DG11"] != nil)
834
+ dataGroup.dG11 = [[dict valueForKey:@"DG11"] boolValue];
835
+ if([dict valueForKey:@"DG12"] != nil)
836
+ dataGroup.dG12 = [[dict valueForKey:@"DG12"] boolValue];
837
+ if([dict valueForKey:@"DG13"] != nil)
838
+ dataGroup.dG13 = [[dict valueForKey:@"DG13"] boolValue];
839
+ if([dict valueForKey:@"DG14"] != nil)
840
+ dataGroup.dG14 = [[dict valueForKey:@"DG14"] boolValue];
841
+
842
+ // EPassportDataGroups: 1-16
843
+ if ([dataGroup class] == [RGLePassportDataGroup class]) {
844
+ if([dict valueForKey:@"DG15"] != nil)
845
+ ((RGLePassportDataGroup*)dataGroup).dG15 = [[dict valueForKey:@"DG15"] boolValue];
846
+ if([dict valueForKey:@"DG16"] != nil)
847
+ ((RGLePassportDataGroup*)dataGroup).dG16 = [[dict valueForKey:@"DG16"] boolValue];
848
+ }
849
+
850
+ // EIDDataGroups: 1-21
851
+ if ([dataGroup class] == [RGLeIDDataGroup class]) {
852
+ if([dict valueForKey:@"DG15"] != nil)
853
+ ((RGLeIDDataGroup*)dataGroup).dG15 = [[dict valueForKey:@"DG15"] boolValue];
854
+ if([dict valueForKey:@"DG16"] != nil)
855
+ ((RGLeIDDataGroup*)dataGroup).dG16 = [[dict valueForKey:@"DG16"] boolValue];
856
+ if([dict valueForKey:@"DG17"] != nil)
857
+ ((RGLeIDDataGroup*)dataGroup).dG17 = [[dict valueForKey:@"DG17"] boolValue];
858
+ if([dict valueForKey:@"DG18"] != nil)
859
+ ((RGLeIDDataGroup*)dataGroup).dG18 = [[dict valueForKey:@"DG18"] boolValue];
860
+ if([dict valueForKey:@"DG19"] != nil)
861
+ ((RGLeIDDataGroup*)dataGroup).dG19 = [[dict valueForKey:@"DG19"] boolValue];
862
+ if([dict valueForKey:@"DG20"] != nil)
863
+ ((RGLeIDDataGroup*)dataGroup).dG20 = [[dict valueForKey:@"DG20"] boolValue];
864
+ if([dict valueForKey:@"DG21"] != nil)
865
+ ((RGLeIDDataGroup*)dataGroup).dG21 = [[dict valueForKey:@"DG21"] boolValue];
866
+ }
867
+ }
868
+
869
+ +(NSDictionary *)getDataGroups:(RGLDataGroup*)dataGroup {
870
+ NSMutableDictionary *result = [NSMutableDictionary new];
871
+
872
+ // EDLDataGroups/Common: 1-14
873
+ result[@"DG1"] = [NSNumber numberWithBool:dataGroup.dG1];
874
+ result[@"DG2"] = [NSNumber numberWithBool:dataGroup.dG2];
875
+ result[@"DG3"] = [NSNumber numberWithBool:dataGroup.dG3];
876
+ result[@"DG4"] = [NSNumber numberWithBool:dataGroup.dG4];
877
+ result[@"DG5"] = [NSNumber numberWithBool:dataGroup.dG5];
878
+ result[@"DG6"] = [NSNumber numberWithBool:dataGroup.dG6];
879
+ result[@"DG7"] = [NSNumber numberWithBool:dataGroup.dG7];
880
+ result[@"DG8"] = [NSNumber numberWithBool:dataGroup.dG8];
881
+ result[@"DG9"] = [NSNumber numberWithBool:dataGroup.dG9];
882
+ result[@"DG10"] = [NSNumber numberWithBool:dataGroup.dG10];
883
+ result[@"DG11"] = [NSNumber numberWithBool:dataGroup.dG11];
884
+ result[@"DG12"] = [NSNumber numberWithBool:dataGroup.dG12];
885
+ result[@"DG13"] = [NSNumber numberWithBool:dataGroup.dG13];
886
+ result[@"DG14"] = [NSNumber numberWithBool:dataGroup.dG14];
887
+
888
+ // EPassportDataGroups: 1-16
889
+ if ([dataGroup class] == [RGLePassportDataGroup class]) {
890
+ result[@"DG15"] = [NSNumber numberWithBool:((RGLePassportDataGroup*)dataGroup).dG15];
891
+ result[@"DG16"] = [NSNumber numberWithBool:((RGLePassportDataGroup*)dataGroup).dG16];
892
+ }
893
+
894
+ // EIDDataGroups: 1-21
895
+ if ([dataGroup class] == [RGLeIDDataGroup class]) {
896
+ result[@"DG15"] = [NSNumber numberWithBool:((RGLeIDDataGroup*)dataGroup).dG15];
897
+ result[@"DG16"] = [NSNumber numberWithBool:((RGLeIDDataGroup*)dataGroup).dG16];
898
+ result[@"DG17"] = [NSNumber numberWithBool:((RGLeIDDataGroup*)dataGroup).dG17];
899
+ result[@"DG18"] = [NSNumber numberWithBool:((RGLeIDDataGroup*)dataGroup).dG18];
900
+ result[@"DG19"] = [NSNumber numberWithBool:((RGLeIDDataGroup*)dataGroup).dG19];
901
+ result[@"DG20"] = [NSNumber numberWithBool:((RGLeIDDataGroup*)dataGroup).dG20];
902
+ result[@"DG21"] = [NSNumber numberWithBool:((RGLeIDDataGroup*)dataGroup).dG21];
903
+ }
904
+
905
+ return result;
906
+ }
907
+
908
+ +(void)setDTCDataGroup:(RGLDTCDataGroup*)dataGroup dict:(NSDictionary*)dict {
909
+ if(dict[@"DG17"]) dataGroup.dG17 = [dict[@"DG17"] boolValue];
910
+ if(dict[@"DG18"]) dataGroup.dG18 = [dict[@"DG18"] boolValue];
911
+ if(dict[@"DG22"]) dataGroup.dG22 = [dict[@"DG22"] boolValue];
912
+ if(dict[@"DG23"]) dataGroup.dG23 = [dict[@"DG23"] boolValue];
913
+ if(dict[@"DG24"]) dataGroup.dG24 = [dict[@"DG24"] boolValue];
914
+ }
915
+
916
+ +(NSDictionary *)getDTCDataGroup:(RGLDTCDataGroup*)dataGroup {
917
+ NSMutableDictionary *result = [NSMutableDictionary new];
918
+
919
+ result[@"DG17"] = @(dataGroup.dG17);
920
+ result[@"DG18"] = @(dataGroup.dG18);
921
+ result[@"DG22"] = @(dataGroup.dG22);
922
+ result[@"DG23"] = @(dataGroup.dG23);
923
+ result[@"DG24"] = @(dataGroup.dG24);
924
+
925
+ return result;
926
+ }
927
+
928
+ +(void)setImageQA:(RGLImageQA*)result input:(NSDictionary*)input {
929
+ if([input valueForKey:@"dpiThreshold"] != nil)
930
+ result.dpiThreshold = [input valueForKey:@"dpiThreshold"];
931
+ if([input valueForKey:@"angleThreshold"] != nil)
932
+ result.angleThreshold = [input valueForKey:@"angleThreshold"];
933
+ if([input valueForKey:@"focusCheck"] != nil)
934
+ result.focusCheck = [input valueForKey:@"focusCheck"];
935
+ if([input valueForKey:@"glaresCheck"] != nil)
936
+ result.glaresCheck = [input valueForKey:@"glaresCheck"];
937
+ if([input valueForKey:@"colornessCheck"] != nil)
938
+ result.colornessCheck = [input valueForKey:@"colornessCheck"];
939
+ if([input valueForKey:@"screenCapture"] != nil)
940
+ result.screenCapture = [input valueForKey:@"screenCapture"];
941
+ if (input[@"expectedPass"]) {
942
+ NSMutableArray<RGLImageQualityCheckType>* expectedPass = @[].mutableCopy;
943
+ for(NSNumber* item in input[@"expectedPass"]) [expectedPass addObject:[self imageQualityCheckTypeWithNumber:item]];
944
+ result.expectedPass = expectedPass;
945
+ }
946
+ if([input valueForKey:@"documentPositionIndent"] != nil)
947
+ result.documentPositionIndent = [input valueForKey:@"documentPositionIndent"];
948
+ if([input valueForKey:@"glaresCheckParams"] != nil)
949
+ result.glaresCheckParams = [RGLWJSONConstructor glaresCheckParamsFromJson:[input valueForKey:@"glaresCheckParams"]];
950
+ if([input valueForKey:@"brightnessThreshold"] != nil)
951
+ result.brightnessThreshold = [input valueForKey:@"brightnessThreshold"];
952
+ if(input[@"occlusionCheck"]) result.occlusionCheck = input[@"occlusionCheck"];
953
+ }
954
+
955
+ +(NSDictionary*)getImageQA:(RGLImageQA*)input {
956
+ NSMutableDictionary *result = [NSMutableDictionary new];
957
+
958
+ result[@"dpiThreshold"] = input.dpiThreshold;
959
+ result[@"angleThreshold"] = input.angleThreshold;
960
+ result[@"focusCheck"] = input.focusCheck;
961
+ result[@"glaresCheck"] = input.glaresCheck;
962
+ result[@"colornessCheck"] = input.colornessCheck;
963
+ result[@"screenCapture"] = input.screenCapture;
964
+ if (input.expectedPass) {
965
+ NSMutableArray<NSNumber*>* expectedPass = @[].mutableCopy;
966
+ for(RGLImageQualityCheckType item in input.expectedPass) [expectedPass addObject:[self generateImageQualityCheckType:item]];
967
+ result[@"expectedPass"] = expectedPass;
968
+ }
969
+ result[@"documentPositionIndent"] = input.documentPositionIndent;
970
+ result[@"glaresCheckParams"] = [RGLWJSONConstructor generateGlaresCheckParams:input.glaresCheckParams];
971
+ result[@"brightnessThreshold"] = input.brightnessThreshold;
972
+ result[@"occlusionCheck"] = input.occlusionCheck;
973
+
974
+ return result;
975
+ }
976
+
977
+ +(void)setAuthenticityParams:(RGLAuthenticityParams*)result input:(NSDictionary*)input {
978
+ if([input valueForKey:@"useLivenessCheck"] != nil)
979
+ result.useLivenessCheck = [input valueForKey:@"useLivenessCheck"];
980
+ if([input valueForKey:@"livenessParams"] != nil) {
981
+ if(result.livenessParams == nil) result.livenessParams = [RGLLivenessParams defaultParams];
982
+ [self setLivenessParams:result.livenessParams input:[input valueForKey:@"livenessParams"]];
983
+ }
984
+ if([input valueForKey:@"checkUVLuminiscence"] != nil)
985
+ result.checkUVLuminiscence = [input valueForKey:@"checkUVLuminiscence"];
986
+ if([input valueForKey:@"checkIRB900"] != nil)
987
+ result.checkIRB900 = [input valueForKey:@"checkIRB900"];
988
+ if([input valueForKey:@"checkImagePatterns"] != nil)
989
+ result.checkImagePatterns = [input valueForKey:@"checkImagePatterns"];
990
+ if([input valueForKey:@"checkFibers"] != nil)
991
+ result.checkFibers = [input valueForKey:@"checkFibers"];
992
+ if([input valueForKey:@"checkExtMRZ"] != nil)
993
+ result.checkExtMRZ = [input valueForKey:@"checkExtMRZ"];
994
+ if([input valueForKey:@"checkExtOCR"] != nil)
995
+ result.checkExtOCR = [input valueForKey:@"checkExtOCR"];
996
+ if([input valueForKey:@"checkAxial"] != nil)
997
+ result.checkAxial = [input valueForKey:@"checkAxial"];
998
+ if([input valueForKey:@"checkBarcodeFormat"] != nil)
999
+ result.checkBarcodeFormat = [input valueForKey:@"checkBarcodeFormat"];
1000
+ if([input valueForKey:@"checkIRVisibility"] != nil)
1001
+ result.checkIRVisibility = [input valueForKey:@"checkIRVisibility"];
1002
+ if([input valueForKey:@"checkIPI"] != nil)
1003
+ result.checkIPI = [input valueForKey:@"checkIPI"];
1004
+ if([input valueForKey:@"checkPhotoEmbedding"] != nil)
1005
+ result.checkPhotoEmbedding = [input valueForKey:@"checkPhotoEmbedding"];
1006
+ if([input valueForKey:@"checkPhotoComparison"] != nil)
1007
+ result.checkPhotoComparison = [input valueForKey:@"checkPhotoComparison"];
1008
+ if([input valueForKey:@"checkLetterScreen"] != nil)
1009
+ result.checkLetterScreen = [input valueForKey:@"checkLetterScreen"];
1010
+ if(input[@"checkSecurityText"]) result.checkSecurityText = input[@"checkSecurityText"];
1011
+ }
1012
+
1013
+ +(NSDictionary*)getAuthenticityParams:(RGLAuthenticityParams*)input {
1014
+ if(input == nil) return nil;
1015
+ NSMutableDictionary *result = [NSMutableDictionary new];
1016
+
1017
+ result[@"useLivenessCheck"] = input.useLivenessCheck;
1018
+ result[@"livenessParams"] = [self getLivenessParams:input.livenessParams];
1019
+ result[@"checkUVLuminiscence"] = input.checkUVLuminiscence;
1020
+ result[@"checkIRB900"] = input.checkIRB900;
1021
+ result[@"checkImagePatterns"] = input.checkImagePatterns;
1022
+ result[@"checkFibers"] = input.checkFibers;
1023
+ result[@"checkExtMRZ"] = input.checkExtMRZ;
1024
+ result[@"checkExtOCR"] = input.checkExtOCR;
1025
+ result[@"checkAxial"] = input.checkAxial;
1026
+ result[@"checkBarcodeFormat"] = input.checkBarcodeFormat;
1027
+ result[@"checkIRVisibility"] = input.checkIRVisibility;
1028
+ result[@"checkIPI"] = input.checkIPI;
1029
+ result[@"checkPhotoEmbedding"] = input.checkPhotoEmbedding;
1030
+ result[@"checkPhotoComparison"] = input.checkPhotoComparison;
1031
+ result[@"checkLetterScreen"] = input.checkLetterScreen;
1032
+ result[@"checkSecurityText"] = input.checkSecurityText;
1033
+
1034
+ return result;
1035
+ }
1036
+
1037
+ +(void)setLivenessParams:(RGLLivenessParams*)result input:(NSDictionary*)input {
1038
+ if([input valueForKey:@"checkOVI"] != nil)
1039
+ result.checkOVI = [input valueForKey:@"checkOVI"];
1040
+ if([input valueForKey:@"checkMLI"] != nil)
1041
+ result.checkMLI = [input valueForKey:@"checkMLI"];
1042
+ if([input valueForKey:@"checkHolo"] != nil)
1043
+ result.checkHolo = [input valueForKey:@"checkHolo"];
1044
+ if([input valueForKey:@"checkED"] != nil)
1045
+ result.checkED = [input valueForKey:@"checkED"];
1046
+ if(input[@"checkBlackAndWhiteCopy"]) result.checkBlackAndWhiteCopy = input[@"checkBlackAndWhiteCopy"];
1047
+ if(input[@"checkDynaprint"]) result.checkDynaprint = input[@"checkDynaprint"];
1048
+ if(input[@"checkGeometry"]) result.checkGeometry = input[@"checkGeometry"];
1049
+ }
1050
+
1051
+ +(NSDictionary*)getLivenessParams:(RGLLivenessParams*)input {
1052
+ if(input == nil) return nil;
1053
+ NSMutableDictionary *result = [NSMutableDictionary new];
1054
+
1055
+ result[@"checkOVI"] = input.checkOVI;
1056
+ result[@"checkMLI"] = input.checkMLI;
1057
+ result[@"checkHolo"] = input.checkHolo;
1058
+ result[@"checkED"] = input.checkED;
1059
+ result[@"checkBlackAndWhiteCopy"] = input.checkBlackAndWhiteCopy;
1060
+ result[@"checkDynaprint"] = input.checkDynaprint;
1061
+ result[@"checkGeometry"] = input.checkGeometry;
1062
+
1063
+ return result;
1064
+ }
1065
+
1066
+ +(void)setColors:(NSMutableDictionary*)result input:(NSDictionary*)input {
1067
+ if([input valueForKey:@"rfidProcessingScreenBackground"] != nil)
1068
+ result[@(RFIDProcessingScreenBackground)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenBackground"]];
1069
+ if([input valueForKey:@"rfidProcessingScreenHintLabelText"] != nil)
1070
+ result[@(RFIDProcessingScreenHintLabelText)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenHintLabelText"]];
1071
+ if([input valueForKey:@"rfidProcessingScreenHintLabelBackground"] != nil)
1072
+ result[@(RFIDProcessingScreenHintLabelBackground)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenHintLabelBackground"]];
1073
+ if([input valueForKey:@"rfidProcessingScreenProgressLabelText"] != nil)
1074
+ result[@(RFIDProcessingScreenProgressLabelText)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenProgressLabelText"]];
1075
+ if([input valueForKey:@"rfidProcessingScreenProgressBar"] != nil)
1076
+ result[@(RFIDProcessingScreenProgressBar)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenProgressBar"]];
1077
+ if([input valueForKey:@"rfidProcessingScreenProgressBarBackground"] != nil)
1078
+ result[@(RFIDProcessingScreenProgressBarBackground)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenProgressBarBackground"]];
1079
+ if([input valueForKey:@"rfidProcessingScreenResultLabelText"] != nil)
1080
+ result[@(RFIDProcessingScreenResultLabelText)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenResultLabelText"]];
1081
+ if([input valueForKey:@"rfidProcessingScreenLoadingBar"] != nil)
1082
+ result[@(RFIDProcessingScreenLoadingBar)] = [self colorWithInt:[input valueForKey:@"rfidProcessingScreenLoadingBar"]];
1083
+ }
1084
+
1085
+ +(NSDictionary*)getColors:(NSDictionary*)input {
1086
+ return @{
1087
+ @"rfidProcessingScreenBackground": [self intWithColor:input[@(RFIDProcessingScreenBackground)]],
1088
+ @"rfidProcessingScreenHintLabelText": [self intWithColor:input[@(RFIDProcessingScreenHintLabelText)]],
1089
+ @"rfidProcessingScreenHintLabelBackground": [self intWithColor:input[@(RFIDProcessingScreenHintLabelBackground)]],
1090
+ @"rfidProcessingScreenProgressLabelText": [self intWithColor:input[@(RFIDProcessingScreenProgressLabelText)]],
1091
+ @"rfidProcessingScreenProgressBar": [self intWithColor:input[@(RFIDProcessingScreenProgressBar)]],
1092
+ @"rfidProcessingScreenProgressBarBackground": [self intWithColor:input[@(RFIDProcessingScreenProgressBarBackground)]],
1093
+ @"rfidProcessingScreenResultLabelText": [self intWithColor:input[@(RFIDProcessingScreenResultLabelText)]],
1094
+ @"rfidProcessingScreenLoadingBar": [self intWithColor:input[@(RFIDProcessingScreenLoadingBar)]],
1095
+ };
1096
+ }
1097
+
1098
+ +(void)setFonts:(NSMutableDictionary*)result input:(NSDictionary*)input {
1099
+ if([input valueForKey:@"rfidProcessingScreenHintLabel"] != nil)
1100
+ result[@(RFIDProcessingScreenHintLabel)] = [self UIFontFromJSON:[input valueForKey:@"rfidProcessingScreenHintLabel"]];
1101
+ if([input valueForKey:@"rfidProcessingScreenProgressLabel"] != nil)
1102
+ result[@(RFIDProcessingScreenProgressLabel)] = [self UIFontFromJSON:[input valueForKey:@"rfidProcessingScreenProgressLabel"]];
1103
+ if([input valueForKey:@"rfidProcessingScreenResultLabel"] != nil)
1104
+ result[@(RFIDProcessingScreenResultLabel)] = [self UIFontFromJSON:[input valueForKey:@"rfidProcessingScreenResultLabel"]];
1105
+ }
1106
+
1107
+ +(NSDictionary*)getFonts:(NSDictionary*)input {
1108
+ return @{
1109
+ @"rfidProcessingScreenHintLabel": [self generateUIFont:input[@(RFIDProcessingScreenHintLabel)]],
1110
+ @"rfidProcessingScreenProgressLabel": [self generateUIFont:input[@(RFIDProcessingScreenProgressLabel)]],
1111
+ @"rfidProcessingScreenResultLabel": [self generateUIFont:input[@(RFIDProcessingScreenResultLabel)]],
1112
+ };
1113
+ }
1114
+
1115
+ +(void)setImages:(NSMutableDictionary*)result input:(NSDictionary*)input {
1116
+ if([input valueForKey:@"rfidProcessingScreenFailureImage"] != nil)
1117
+ result[@(RFIDProcessingScreenFailureImage)] = [RGLWJSONConstructor imageWithBase64:[input valueForKey:@"rfidProcessingScreenFailureImage"]];
1118
+ }
1119
+
1120
+ +(NSDictionary*)getImages:(NSDictionary*)input {
1121
+ return @{
1122
+ @"rfidProcessingScreenFailureImage": [RGLWJSONConstructor base64WithImage:input[@(RFIDProcessingScreenFailureImage)]],
1123
+ };
1124
+ }
1125
+
1126
+ +(UIColor*)colorWithInt:(NSNumber*)input {
1127
+ // Convert hex int to hex string
1128
+ NSInteger hexInt = [input integerValue];
1129
+ NSString* numbers = @"0123456789ABCDEF";
1130
+ NSString* hexString = @"";
1131
+ while(hexInt>0){
1132
+ int digit = hexInt % 16;
1133
+ hexString = [NSString stringWithFormat:@"%@%@", [numbers substringWithRange:NSMakeRange(digit, 1)], hexString];
1134
+ hexInt = hexInt/16;
1135
+ }
1136
+ // If we use int, then all the starting zeros are lost: 0x0F123456 == 0xF123456
1137
+ if(hexString.length == 5 || hexString.length == 7)
1138
+ hexString = [NSString stringWithFormat:@"0%@", hexString];
1139
+ hexString = [NSString stringWithFormat:@"#%@", hexString];
1140
+
1141
+ // Convert hex string to UIColor
1142
+ NSString *colorString = [[hexString stringByReplacingOccurrencesOfString: @"#" withString: @""] uppercaseString];
1143
+ CGFloat alpha, red, blue, green;
1144
+ switch ([colorString length]) {
1145
+ case 3: // #RGB
1146
+ alpha = 1.0f;
1147
+ red = [self colorComponentFrom: colorString start: 0 length: 1];
1148
+ green = [self colorComponentFrom: colorString start: 1 length: 1];
1149
+ blue = [self colorComponentFrom: colorString start: 2 length: 1];
1150
+ break;
1151
+ case 4: // #ARGB
1152
+ alpha = [self colorComponentFrom: colorString start: 0 length: 1];
1153
+ red = [self colorComponentFrom: colorString start: 1 length: 1];
1154
+ green = [self colorComponentFrom: colorString start: 2 length: 1];
1155
+ blue = [self colorComponentFrom: colorString start: 3 length: 1];
1156
+ break;
1157
+ case 6: // #RRGGBB
1158
+ alpha = 1.0f;
1159
+ red = [self colorComponentFrom: colorString start: 0 length: 2];
1160
+ green = [self colorComponentFrom: colorString start: 2 length: 2];
1161
+ blue = [self colorComponentFrom: colorString start: 4 length: 2];
1162
+ break;
1163
+ case 8: // #AARRGGBB
1164
+ alpha = [self colorComponentFrom: colorString start: 0 length: 2];
1165
+ red = [self colorComponentFrom: colorString start: 2 length: 2];
1166
+ green = [self colorComponentFrom: colorString start: 4 length: 2];
1167
+ blue = [self colorComponentFrom: colorString start: 6 length: 2];
1168
+ break;
1169
+ default:
1170
+ [NSException raise:@"Invalid color value" format: @"Color value %@ is invalid. It should be a hex value of the form #RBG, #ARGB, #RRGGBB, or #AARRGGBB", hexString];
1171
+ break;
1172
+ }
1173
+ return [UIColor colorWithRed: red green: green blue: blue alpha: alpha];
1174
+ }
1175
+
1176
+ +(CGFloat)colorComponentFrom:(NSString*)string start:(NSUInteger)start length:(NSUInteger)length {
1177
+ NSString *substring = [string substringWithRange: NSMakeRange(start, length)];
1178
+ NSString *fullHex = length == 2 ? substring : [NSString stringWithFormat: @"%@%@", substring, substring];
1179
+ unsigned hexComponent;
1180
+ [[NSScanner scannerWithString: fullHex] scanHexInt: &hexComponent];
1181
+ return hexComponent / 255.0;
1182
+ }
1183
+
1184
+ +(NSNumber*)intWithColor:(UIColor*)color {
1185
+ if(color == nil) return nil;
1186
+
1187
+ const CGFloat *components = CGColorGetComponents(color.CGColor);
1188
+ CGFloat r = components[0];
1189
+ CGFloat g = components[1];
1190
+ CGFloat b = components[2];
1191
+ CGFloat a = components[3];
1192
+
1193
+ NSString* hexString = [NSString stringWithFormat:@"#%02lX%02lX%02lX%02lX",
1194
+ lroundf(a * 255),
1195
+ lroundf(r * 255),
1196
+ lroundf(g * 255),
1197
+ lroundf(b * 255)];
1198
+
1199
+ unsigned int hexInt = 0;
1200
+ NSScanner *scanner = [NSScanner scannerWithString:hexString];
1201
+ [scanner setCharactersToBeSkipped:[NSCharacterSet characterSetWithCharactersInString:@"#"]];
1202
+ [scanner scanHexInt:&hexInt];
1203
+
1204
+ return [NSNumber numberWithInteger:hexInt];
1205
+ }
1206
+
1207
+ +(UIFont*)UIFontFromJSON:(NSDictionary*)input {
1208
+ UIFont* result = [UIFont fontWithName:[input valueForKey:@"name"] size:[[input valueForKey:@"size"] integerValue]];
1209
+ if (!result || !result.fontName) return nil;
1210
+ return result;
1211
+ }
1212
+
1213
+ +(NSDictionary*)generateUIFont:(UIFont*)input {
1214
+ if (!input || !input.fontName) return nil;
1215
+ return @{
1216
+ @"name": input.fontName,
1217
+ @"size": @(input.pointSize)
1218
+ };
1219
+ }
1220
+
1221
+ +(AVCaptureSessionPreset)captureSessionPresetWithNumber:(NSNumber*)value {
1222
+ int input = [value intValue];
1223
+ if(input == 0) return AVCaptureSessionPresetLow;
1224
+ if(input == 1) return AVCaptureSessionPresetMedium;
1225
+ if(input == 2) return AVCaptureSessionPresetHigh;
1226
+ if(input == 3) return AVCaptureSessionPresetPhoto;
1227
+ if(input == 4) return AVCaptureSessionPresetInputPriority;
1228
+ if(input == 6) return AVCaptureSessionPreset1280x720;
1229
+ if(input == 7) return AVCaptureSessionPreset1920x1080;
1230
+ if(input == 8) return AVCaptureSessionPreset3840x2160;
1231
+ if(input == 9) return AVCaptureSessionPresetiFrame960x540;
1232
+ if(input == 10) return AVCaptureSessionPresetiFrame1280x720;
1233
+ if(input == 12) return AVCaptureSessionPreset640x480;
1234
+ if(input == 13) return AVCaptureSessionPreset352x288;
1235
+ return AVCaptureSessionPreset1920x1080;
1236
+ }
1237
+
1238
+ +(NSNumber*)generateCaptureSessionPreset:(AVCaptureSessionPreset)value {
1239
+ if(value == AVCaptureSessionPresetLow) return @0;
1240
+ if(value == AVCaptureSessionPresetMedium) return @1;
1241
+ if(value == AVCaptureSessionPresetHigh) return @2;
1242
+ if(value == AVCaptureSessionPresetPhoto) return @3;
1243
+ if(value == AVCaptureSessionPresetInputPriority) return @4;
1244
+ if(value == AVCaptureSessionPreset1280x720) return @6;
1245
+ if(value == AVCaptureSessionPreset1920x1080) return @7;
1246
+ if(value == AVCaptureSessionPreset3840x2160) return @8;
1247
+ if(value == AVCaptureSessionPresetiFrame960x540) return @9;
1248
+ if(value == AVCaptureSessionPresetiFrame1280x720) return @10;
1249
+ if(value == AVCaptureSessionPreset640x480) return @12;
1250
+ if(value == AVCaptureSessionPreset352x288) return @13;
1251
+ return @0;
1252
+ }
1253
+
1254
+ +(CGLineCap)lineCapWithNumber:(NSNumber*)value {
1255
+ int input = [value intValue];
1256
+ if(input == 0) return kCGLineCapButt;
1257
+ if(input == 1) return kCGLineCapRound;
1258
+ if(input == 2) return kCGLineCapSquare;
1259
+ return kCGLineCapButt;
1260
+ }
1261
+
1262
+ +(NSNumber*)generateLineCap:(CGLineCap)value {
1263
+ if(value == kCGLineCapButt) return @0;
1264
+ if(value == kCGLineCapRound) return @1;
1265
+ if(value == kCGLineCapSquare) return @2;
1266
+ return @0;;
1267
+ }
1268
+
1269
+ +(UIInterfaceOrientationMask)interfaceOrientationMaskWithNumber:(NSNumber*)value {
1270
+ int input = [value intValue];
1271
+ if(input == 0) return UIInterfaceOrientationMaskAll;
1272
+ if(input == 1) return UIInterfaceOrientationMaskPortrait;
1273
+ if(input == 2) return UIInterfaceOrientationMaskLandscape;
1274
+ if(input == 3) return UIInterfaceOrientationMaskLandscapeLeft;
1275
+ if(input == 4) return UIInterfaceOrientationMaskLandscapeRight;
1276
+ return UIInterfaceOrientationMaskPortrait;
1277
+ }
1278
+
1279
+ +(NSNumber*)generateInterfaceOrientationMask:(UIInterfaceOrientationMask)value {
1280
+ if(value == UIInterfaceOrientationMaskAll) return @0;
1281
+ if(value == UIInterfaceOrientationMaskPortrait) return @1;
1282
+ if(value == UIInterfaceOrientationMaskLandscape) return @2;
1283
+ if(value == UIInterfaceOrientationMaskLandscapeLeft) return @3;
1284
+ if(value == UIInterfaceOrientationMaskLandscapeRight) return @4;
1285
+ return @0;
1286
+ }
1287
+
1288
+ +(UIViewContentMode)viewContentModeWithNumber:(NSNumber*)value {
1289
+ int input = [value intValue];
1290
+ if(input == 0) return UIViewContentModeScaleToFill;
1291
+ if(input == 1) return UIViewContentModeScaleAspectFit;
1292
+ if(input == 2) return UIViewContentModeScaleAspectFill;
1293
+ if(input == 3) return UIViewContentModeRedraw;
1294
+ if(input == 4) return UIViewContentModeCenter;
1295
+ if(input == 5) return UIViewContentModeTop;
1296
+ if(input == 6) return UIViewContentModeBottom;
1297
+ if(input == 7) return UIViewContentModeLeft;
1298
+ if(input == 8) return UIViewContentModeRight;
1299
+ if(input == 9) return UIViewContentModeTopLeft;
1300
+ if(input == 10) return UIViewContentModeTopRight;
1301
+ if(input == 11) return UIViewContentModeBottomLeft;
1302
+ if(input == 12) return UIViewContentModeBottomRight;
1303
+ return UIViewContentModeCenter;
1304
+ }
1305
+
1306
+ +(NSNumber*)generateViewContentMode:(UIViewContentMode)value {
1307
+ if(value == UIViewContentModeScaleToFill) return @0;
1308
+ if(value == UIViewContentModeScaleAspectFit) return @1;
1309
+ if(value == UIViewContentModeScaleAspectFill) return @2;
1310
+ if(value == UIViewContentModeRedraw) return @3;
1311
+ if(value == UIViewContentModeCenter) return @4;
1312
+ if(value == UIViewContentModeTop) return @5;
1313
+ if(value == UIViewContentModeBottom) return @6;
1314
+ if(value == UIViewContentModeLeft) return @7;
1315
+ if(value == UIViewContentModeRight) return @8;
1316
+ if(value == UIViewContentModeTopLeft) return @9;
1317
+ if(value == UIViewContentModeTopRight) return @10;
1318
+ if(value == UIViewContentModeBottomLeft) return @11;
1319
+ if(value == UIViewContentModeBottomRight) return @12;
1320
+ return @4;
1321
+ }
1322
+
1323
+ +(RGLDocReaderFrame)docReaderFrameWithString:(NSString*)value {
1324
+ if([value isEqual: @"id1"]) return RGLDocReaderFrameScenarioDefault;
1325
+ if([value isEqual: @"max"]) return RGLDocReaderFrameMax;
1326
+ if([value isEqual: @"none"]) return RGLDocReaderFrameNone;
1327
+ if([value isEqual: @"document"]) return RGLDocReaderFrameDocument;
1328
+ return RGLDocReaderFrameNone;
1329
+ }
1330
+
1331
+ +(NSString*)generateDocReaderFrame:(RGLDocReaderFrame)value {
1332
+ if(value == RGLDocReaderFrameScenarioDefault) return @"id1";
1333
+ if(value == RGLDocReaderFrameMax) return @"max";
1334
+ if(value == RGLDocReaderFrameNone) return @"none";
1335
+ if(value == RGLDocReaderFrameDocument) return @"document";
1336
+ return @"none";
1337
+ }
1338
+
1339
+ +(RGLTextProcessing*)textProcessingWithNumber:(NSNumber*)value {
1340
+ int input = [value intValue];
1341
+ if(input == 0) return RGLTextProcessing.noChange;
1342
+ if(input == 1) return RGLTextProcessing.uppercase;
1343
+ if(input == 2) return RGLTextProcessing.lowercase;
1344
+ if(input == 3) return RGLTextProcessing.capital;
1345
+ return RGLTextProcessing.noChange;
1346
+ }
1347
+
1348
+ +(NSNumber*)generateWithTextProcessing:(RGLTextProcessing*)value {
1349
+ return [value valueForKey:@"rawValue"];
1350
+ }
1351
+
1352
+ +(NSNumber*)generateDocReaderAction:(RGLDocReaderAction)value {
1353
+ if(value == RGLDocReaderActionComplete) return @0;
1354
+ if(value == RGLDocReaderActionProcess) return @1;
1355
+ if(value == RGLDocReaderActionMorePagesAvailable) return @2;
1356
+ if(value == RGLDocReaderActionCancel) return @3;
1357
+ if(value == RGLDocReaderActionError) return @4;
1358
+ if(value == RGLDocReaderActionProcessWhiteFlashLight) return @5;
1359
+ if(value == RGLDocReaderActionProcessTimeout) return @6;
1360
+ if(value == RGLDocReaderActionProcessOnServer) return @7;
1361
+ return @4;
1362
+ }
1363
+
1364
+ +(NSNumber*)generateRFIDCompleteAction:(RGLRFIDCompleteAction)value {
1365
+ if(value == RGLRFIDCompleteActionComplete) return @0;
1366
+ if(value == RGLRFIDCompleteActionError) return @4;
1367
+ if(value == RGLRFIDCompleteActionCancel) return @3;
1368
+ if(value == RGLRFIDCompleteActionSessionRestarted) return @0;
1369
+ return @0;
1370
+ }
1371
+
1372
+ +(NSNumber*)generateImageQualityCheckType:(RGLImageQualityCheckType)value {
1373
+ if(value == RGLImageQualityCheckTypeImageGlares) return @0;
1374
+ if(value == RGLImageQualityCheckTypeImageFocus) return @1;
1375
+ if(value == RGLImageQualityCheckTypeImageResolution) return @2;
1376
+ if(value == RGLImageQualityCheckTypeImageColorness) return @3;
1377
+ if(value == RGLImageQualityCheckTypeImagePerspective) return @4;
1378
+ if(value == RGLImageQualityCheckTypeImageBounds) return @5;
1379
+ if(value == RGLImageQualityCheckTypeScreenCapture) return @6;
1380
+ if(value == RGLImageQualityCheckTypePortrait) return @7;
1381
+ if(value == RGLImageQualityCheckTypeHandwritten) return @8;
1382
+ if(value == RGLImageQualityCheckTypeBrightness) return @9;
1383
+ if(value == RGLImageQualityCheckTypeOcclusion) return @10;
1384
+ return 0;
1385
+ }
1386
+
1387
+ +(RGLImageQualityCheckType)imageQualityCheckTypeWithNumber:(NSNumber*)input {
1388
+ if(input == nil) return nil;
1389
+ int value = [input intValue];
1390
+ if(value == 0) return RGLImageQualityCheckTypeImageGlares;
1391
+ if(value == 1) return RGLImageQualityCheckTypeImageFocus;
1392
+ if(value == 2) return RGLImageQualityCheckTypeImageResolution;
1393
+ if(value == 3) return RGLImageQualityCheckTypeImageColorness;
1394
+ if(value == 4) return RGLImageQualityCheckTypeImagePerspective;
1395
+ if(value == 5) return RGLImageQualityCheckTypeImageBounds;
1396
+ if(value == 6) return RGLImageQualityCheckTypeScreenCapture;
1397
+ if(value == 7) return RGLImageQualityCheckTypePortrait;
1398
+ if(value == 8) return RGLImageQualityCheckTypeHandwritten;
1399
+ if(value == 9) return RGLImageQualityCheckTypeBrightness;
1400
+ if(value == 10) return RGLImageQualityCheckTypeOcclusion;
1401
+ return RGLImageQualityCheckTypeImageGlares;
1402
+ }
1403
+
1404
+ @end