@idscan/idvc2 2.4.17 → 2.5.1

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 (201) hide show
  1. package/README.md +16 -1
  2. package/dist/css/idvc.css +1 -1
  3. package/dist/idvc.js +1684 -2
  4. package/dist/index.html +3 -4
  5. package/dist/js/defaultConfig.ts +0 -8
  6. package/dist/js/environment/langs.js +1 -1
  7. package/dist/js/environment/networkNames.json +5 -16
  8. package/dist/js/environment/stepsDescription.ts +2 -23
  9. package/dist/networks/156-9239-chunk.js +1 -0
  10. package/dist/networks/190-77ed-chunk.js +1 -0
  11. package/dist/networks/77-9e2f-chunk.js +1 -0
  12. package/dist/networks/Face-e375-chunk.js +1 -0
  13. package/dist/networks/MRZ-d498-chunk.js +1 -0
  14. package/dist/networks/PDF-78d2-chunk.js +1 -0
  15. package/dist/networks/ZXing-5410-chunk.js +1 -0
  16. package/dist/networks/angle03032023.onnx +0 -0
  17. package/dist/networks/classLocal03032023.onnx +0 -0
  18. package/dist/networks/faceDetection03032023.onnx +0 -0
  19. package/dist/networks/faceLandmark03032023.onnx +0 -0
  20. package/dist/networks/mrz03032023.onnx +0 -0
  21. package/dist/networks/ort-wasm-simd-threaded.wasm +0 -0
  22. package/dist/networks/ort-wasm-simd.wasm +0 -0
  23. package/dist/networks/ort-wasm-threaded.wasm +0 -0
  24. package/dist/networks/ort-wasm.wasm +0 -0
  25. package/package.json +24 -47
  26. package/dist/idvc.js.LICENSE.txt +0 -219
  27. package/dist/js/geometry.d.ts +0 -8
  28. package/dist/js/image.d.ts +0 -5
  29. package/dist/js/index.d.ts +0 -9
  30. package/dist/js/loop.d.ts +0 -21
  31. package/dist/js/mrz.d.ts +0 -105
  32. package/dist/networks/130-3968-chunk.js +0 -1
  33. package/dist/networks/215-cb9e-chunk.js +0 -1
  34. package/dist/networks/400-3816-chunk.js +0 -1
  35. package/dist/networks/716-d3a2-chunk.js +0 -1
  36. package/dist/networks/Face-4ffb-chunk.js +0 -1
  37. package/dist/networks/MRZ-d77b-chunk.js +0 -1
  38. package/dist/networks/PDF-89f3-chunk.js +0 -1
  39. package/dist/networks/ZXing-e76f-chunk.js +0 -1
  40. package/dist/networks/angles20210831.bin +0 -0
  41. package/dist/networks/angles20210831.json +0 -1
  42. package/dist/networks/asyncLoader-4593-chunk.js +0 -1
  43. package/dist/networks/cdnLoader-bdbc-chunk.js +0 -1
  44. package/dist/networks/classLocal20220112.bin +0 -0
  45. package/dist/networks/classLocal20220112.json +0 -1
  46. package/dist/networks/detectormodel20220817.bin +0 -0
  47. package/dist/networks/detectormodel20220817.json +0 -1
  48. package/dist/networks/facemesh20210831.bin +0 -0
  49. package/dist/networks/facemesh20210831.json +0 -1
  50. package/dist/networks/landmarkmodel20220817.bin +0 -0
  51. package/dist/networks/landmarkmodel20220817.json +0 -1
  52. package/dist/networks/mrz20220531.bin +0 -0
  53. package/dist/networks/mrz20220531.json +0 -1953
  54. package/dist/types/assets/images/barcode.d.ts +0 -2
  55. package/dist/types/assets/images/face.d.ts +0 -2
  56. package/dist/types/assets/images/front.d.ts +0 -2
  57. package/dist/types/assets/images/mrz.d.ts +0 -2
  58. package/dist/types/assets/images/pdf.d.ts +0 -2
  59. package/dist/types/bl.d.ts +0 -15
  60. package/dist/types/constatnts/camera.d.ts +0 -7
  61. package/dist/types/constatnts/imageProcessing.d.ts +0 -3
  62. package/dist/types/context.d.ts +0 -119
  63. package/dist/types/controllers/LoggerController.d.ts +0 -13
  64. package/dist/types/controllers/ModuleController.d.ts +0 -57
  65. package/dist/types/core/LicenseVerificationWasmCore.d.ts +0 -2
  66. package/dist/types/core/Logger.d.ts +0 -10
  67. package/dist/types/core/blurCore.d.ts +0 -2
  68. package/dist/types/core/libheif2.d.ts +0 -2
  69. package/dist/types/core/libmrzdecode.d.ts +0 -2
  70. package/dist/types/core/libpdf417.d.ts +0 -2
  71. package/dist/types/core/wasmpico.d.ts +0 -2
  72. package/dist/types/core/zxing_reader.d.ts +0 -2
  73. package/dist/types/custom_tfjs/custom_ops_for_converter.d.ts +0 -28
  74. package/dist/types/custom_tfjs/custom_tfjs.d.ts +0 -3
  75. package/dist/types/custom_tfjs/custom_tfjs_core.d.ts +0 -1
  76. package/dist/types/defaultConfig.d.ts +0 -56
  77. package/dist/types/environment/designations.d.ts +0 -5
  78. package/dist/types/environment/documentTypes.d.ts +0 -26
  79. package/dist/types/environment/langs.d.ts +0 -88
  80. package/dist/types/environment/loopResult.d.ts +0 -8
  81. package/dist/types/environment/realFaceModes.d.ts +0 -22
  82. package/dist/types/environment/stepsDescription.d.ts +0 -71
  83. package/dist/types/environment/triangulation.d.ts +0 -18
  84. package/dist/types/helpers/canvas.d.ts +0 -22
  85. package/dist/types/helpers/color.d.ts +0 -8
  86. package/dist/types/helpers/dataManipulation.d.ts +0 -27
  87. package/dist/types/helpers/detectLanguage.d.ts +0 -3
  88. package/dist/types/helpers/eventListeners.d.ts +0 -14
  89. package/dist/types/helpers/geometry.d.ts +0 -27
  90. package/dist/types/helpers/html.d.ts +0 -26
  91. package/dist/types/helpers/image.d.ts +0 -32
  92. package/dist/types/helpers/imageprocessing.d.ts +0 -11
  93. package/dist/types/helpers/licenceKeyError.d.ts +0 -6
  94. package/dist/types/helpers/logger.d.ts +0 -8
  95. package/dist/types/helpers/manualUpload.d.ts +0 -7
  96. package/dist/types/helpers/math.d.ts +0 -37
  97. package/dist/types/helpers/mobileChecker.d.ts +0 -15
  98. package/dist/types/helpers/numbers.d.ts +0 -2
  99. package/dist/types/helpers/step-background.d.ts +0 -2
  100. package/dist/types/helpers/strings.d.ts +0 -9
  101. package/dist/types/helpers/time.d.ts +0 -11
  102. package/dist/types/helpers/ts/common.d.ts +0 -3
  103. package/dist/types/helpers/updateSelecetTypes.d.ts +0 -2
  104. package/dist/types/helpers/validators.d.ts +0 -44
  105. package/dist/types/helpers/windowTensorFlow.d.ts +0 -7
  106. package/dist/types/idvc.d.ts +0 -19
  107. package/dist/types/initialize.d.ts +0 -11
  108. package/dist/types/loader/asyncLoader.d.ts +0 -2
  109. package/dist/types/loader/cdn/cdnFace.d.ts +0 -2
  110. package/dist/types/loader/cdn/cdnMRZ.d.ts +0 -4
  111. package/dist/types/loader/cdn/cdnPDF.d.ts +0 -4
  112. package/dist/types/loader/cdnLoader.d.ts +0 -2
  113. package/dist/types/loader/loadTf.d.ts +0 -2
  114. package/dist/types/loader/loaderFace.d.ts +0 -2
  115. package/dist/types/loader/loaderMRZ.d.ts +0 -4
  116. package/dist/types/loader/loaderMeshFace.d.ts +0 -3
  117. package/dist/types/loader/loaderPDF.d.ts +0 -3
  118. package/dist/types/loader/loaderSelect.d.ts +0 -2
  119. package/dist/types/loader/loaderUploadMode.d.ts +0 -1
  120. package/dist/types/loader/loaderZXing.d.ts +0 -2
  121. package/dist/types/loader/meshfaceConfig.d.ts +0 -3
  122. package/dist/types/loader/syncLoader.d.ts +0 -63
  123. package/dist/types/loop.d.ts +0 -13
  124. package/dist/types/loopControl.d.ts +0 -10
  125. package/dist/types/modules/BarcodeModule.d.ts +0 -28
  126. package/dist/types/modules/Config.d.ts +0 -131
  127. package/dist/types/modules/Face.d.ts +0 -61
  128. package/dist/types/modules/FrontProcessing.d.ts +0 -7
  129. package/dist/types/modules/MeshFace.d.ts +0 -52
  130. package/dist/types/modules/MetaData.d.ts +0 -10
  131. package/dist/types/modules/MrzModule.d.ts +0 -114
  132. package/dist/types/modules/PdfModule.d.ts +0 -79
  133. package/dist/types/modules/SimpleFace.d.ts +0 -18
  134. package/dist/types/modules/Step.d.ts +0 -65
  135. package/dist/types/modules/blur.d.ts +0 -4
  136. package/dist/types/modules/browwserCompatibilities.d.ts +0 -6
  137. package/dist/types/modules/camera.d.ts +0 -14
  138. package/dist/types/modules/cameraManager.d.ts +0 -9
  139. package/dist/types/modules/fileType.d.ts +0 -1
  140. package/dist/types/modules/frameQuality.d.ts +0 -10
  141. package/dist/types/modules/heic.d.ts +0 -11
  142. package/dist/types/modules/image.d.ts +0 -13
  143. package/dist/types/modules/initErrorHandler.d.ts +0 -10
  144. package/dist/types/modules/licenseKeyChecker.d.ts +0 -1
  145. package/dist/types/modules/manualUpload.d.ts +0 -7
  146. package/dist/types/modules/manualUploadProcessing.d.ts +0 -30
  147. package/dist/types/modules/mediaDevices.d.ts +0 -2
  148. package/dist/types/modules/moduleInitializer.d.ts +0 -8
  149. package/dist/types/modules/step-functions/face.d.ts +0 -2
  150. package/dist/types/modules/step-result-processing/barcode.d.ts +0 -2
  151. package/dist/types/modules/step-result-processing/common.d.ts +0 -1
  152. package/dist/types/modules/step-result-processing/mrz.d.ts +0 -2
  153. package/dist/types/modules/step-result-processing/pdf.d.ts +0 -2
  154. package/dist/types/modules/step-result-processing/simpleFace.d.ts +0 -2
  155. package/dist/types/modules/step-result-processing/volumeFace.d.ts +0 -3
  156. package/dist/types/modules/stepFunctions.d.ts +0 -5
  157. package/dist/types/modules/stepResultProcessing.d.ts +0 -9
  158. package/dist/types/modules/ui/Flashlight.d.ts +0 -17
  159. package/dist/types/modules/ui/MaskCapture.d.ts +0 -52
  160. package/dist/types/modules/ui/MessageBox.d.ts +0 -19
  161. package/dist/types/modules/ui/Modal.d.ts +0 -20
  162. package/dist/types/modules/ui/SelectDocumentType.d.ts +0 -45
  163. package/dist/types/modules/ui/forceCaptruringBtn.d.ts +0 -12
  164. package/dist/types/modules/ui/hints.d.ts +0 -17
  165. package/dist/types/modules/ui/limitations.d.ts +0 -2
  166. package/dist/types/modules/ui/manualSwitchBtn.d.ts +0 -30
  167. package/dist/types/modules/ui/spinner.d.ts +0 -13
  168. package/dist/types/modules/ui/swiper.d.ts +0 -3
  169. package/dist/types/modules/uploader.d.ts +0 -59
  170. package/dist/types/modules/validation/ValidateBool.d.ts +0 -5
  171. package/dist/types/modules/validation/ValidateDocumentTypes.d.ts +0 -20
  172. package/dist/types/modules/validation/ValidateElement.d.ts +0 -5
  173. package/dist/types/modules/validation/ValidateFunction.d.ts +0 -5
  174. package/dist/types/modules/validation/ValidateNumber.d.ts +0 -5
  175. package/dist/types/modules/validation/ValidateString.d.ts +0 -5
  176. package/dist/types/modules/validation/ValidateStringInArray.d.ts +0 -12
  177. package/dist/types/modules/validation/showValidationError.d.ts +0 -2
  178. package/dist/types/modules/validation/validatorFactory.d.ts +0 -10
  179. package/dist/types/modules/validator.d.ts +0 -10
  180. package/dist/types/neural models/07072019/exits.d.ts +0 -2
  181. package/dist/types/neural models/08072019/exits.d.ts +0 -2
  182. package/dist/types/neural models/09072019/exits.d.ts +0 -2
  183. package/dist/types/neural models/10072019/exits.d.ts +0 -2
  184. package/dist/types/neural models/10072019/labels.d.ts +0 -541
  185. package/dist/types/neural models/angles/exits.d.ts +0 -2
  186. package/dist/types/neural models/classLocal/exits.d.ts +0 -2
  187. package/dist/types/neural models/classLocalModel.d.ts +0 -9
  188. package/dist/types/neural models/keras/exits.d.ts +0 -2
  189. package/dist/types/neural models/model.d.ts +0 -18
  190. package/dist/types/neural models/mrz/exits.d.ts +0 -2
  191. package/dist/types/neural models/mrzModel.d.ts +0 -10
  192. package/dist/types/neural models/neuralModel.d.ts +0 -20
  193. package/dist/types/neural models/stick/exits.d.ts +0 -2
  194. package/dist/types/stepProcessing.d.ts +0 -27
  195. package/dist/types/types/enums/realFace.d.ts +0 -5
  196. package/dist/types/types/modules/camera.enum.d.ts +0 -18
  197. package/dist/types/ui.d.ts +0 -117
  198. package/dist/types/util.d.ts +0 -34
  199. package/dist/types/workers/blurWorker.d.ts +0 -1
  200. package/dist/types/workers/bubbleWorker.d.ts +0 -1
  201. package/dist/types/workers/loadNetworksWorker.d.ts +0 -0
@@ -1,28 +0,0 @@
1
- export declare class BarcodeModule {
2
- private module;
3
- private isAllocate;
4
- private buffer;
5
- private readonly res;
6
- private stringLib;
7
- constructor(core: any);
8
- init(stringLib: any): void;
9
- allocate(buffer: any): void;
10
- free(): void;
11
- result(status?: boolean, image?: any, touch?: boolean, text?: string): {
12
- status: boolean;
13
- image: any;
14
- touch: boolean;
15
- text: string;
16
- cancel: boolean;
17
- type: string;
18
- };
19
- process(data: any, origData: any): {
20
- status: boolean;
21
- image: any;
22
- touch: boolean;
23
- text: string;
24
- cancel: boolean;
25
- type: string;
26
- };
27
- }
28
- export default BarcodeModule;
@@ -1,131 +0,0 @@
1
- import { IStepConfig, ValidationFn } from '../defaultConfig';
2
- import { RealFaceMode } from '../environment/realFaceModes';
3
- import { SupportedLanguage } from '../environment/langs';
4
- import { StepType } from '../environment/stepsDescription';
5
- import { DocumentTypeName } from '../environment/documentTypes';
6
- import { IDocumentTypeConfig } from './validator';
7
- import { IStepCallback } from './Step';
8
- import { IDataForSubmit } from '../util';
9
- /**
10
- * @param {string} el,
11
- * @param {string} licenseKey,
12
- * @param {RealFaceMode} realFaceMode,
13
- * @param {IDocumentTypeConfig | null} documentTypes,
14
- * @param {boolean} autoContinue?,
15
- * @param {number} resizeUploadedImage?,
16
- * @param {boolean} fixFrontOrientAfterUpload?,
17
- * @param {boolean} useCDN?,
18
- * @param {string} networkUrl?,
19
- */
20
- export interface IConfig {
21
- /** this is the id of the html tag on the page where the web library will be displayed. Default: videoCapturingEl */
22
- el: string;
23
- /** license key for the web library provided for you by Idscan.net */
24
- licenseKey: string;
25
- /**
26
- * an option that enables advanced image capturing with volumetric face detection. Available values: 'auto','all', 'none'
27
- * - Auto - enable "realFaceMode" only for iPhone
28
- * - All - enable "realFaceMode" for all devices
29
- * - None - disable this option
30
- */
31
- realFaceMode: RealFaceMode;
32
- /**
33
- * the array contains an object per document type that is configured. Each object has the document type listed in the type field and then in its steps array you can configure what steps you want the user to complete and what capture modes you will allow (i.e. uploader and/or video)
34
- *
35
- * Available Document Types
36
- *
37
- * - ID (1) – USA driver license and USA ID (non-driver license), Canadian driver licenses
38
- * - Passport (2) – with 2 lines MRZ
39
- * - PassportCard (3) – with 3 lines MRZ (most European IDs, USA passports/cards)
40
- * - GreenCard (6) – USA Permanent Resident Cards (only MRZ)
41
- * - InternationalId (7) – Internationally approved U.S. IDs with 3 lines MRZ
42
- * - VIN (8) – Vehicle Identification Numbers
43
- * - Barcode (9) – 1-D and 2-D barcodes
44
- *
45
- * Available Step Types
46
- *
47
- * - front – capturing the front side of a document
48
- * - mrz – detection and capturing of the MRZ of a document
49
- * - pdf – detection and capturing of pdf417 of a document
50
- * - face – detection and capturing of the end user's face using the front camera
51
- * - barcode – detection and capturing of 1 dimensional (barcodes) or 2 dimensional (qr codes)
52
- * - photo – capturing of a vehicle identification number
53
- *
54
- * Available Capture Mode
55
- *
56
- * - uploader - uploading an image from the file system
57
- * - video - capturing an image using the auto capture feature
58
- */
59
- documentTypes: IDocumentTypeConfig | null;
60
- /** the setting that enables the automatic transition from one step to the next step. Default */
61
- autoContinue?: boolean;
62
- /** sets the maximum size in pixels (of the largest of the height or width) for a manually uploaded picture */
63
- resizeUploadedImage?: number;
64
- /** this setting will change the orientation of a front step's image if it is not horizontal when it is uploaded */
65
- fixFrontOrientAfterUpload?: boolean;
66
- /** set to true if you prefer to load neural networks from a content delivery network instead of from your web server */
67
- useCDN?: boolean;
68
- /** */
69
- networkUrl?: string;
70
- /** the web library supports two languages, english and spanish. English uses en and Spanish uses es */
71
- language?: SupportedLanguage;
72
- /**
73
- * Path to the folder with chunks. Specify the path on the server if you need to remove the folder to another location.
74
- */
75
- chunkPublicPath?: string;
76
- /**
77
- * switches on/off the button to show guide lines
78
- */
79
- isShowGuidelinesButton?: boolean;
80
- /**
81
- * if only one document type is configured in the documentTypes array AND this setting is set to false the document type dialog will not be displayed to the end user
82
- */
83
- isShowDocumentTypeSelect?: boolean;
84
- /**
85
- * option to show the button 'submit' after capturing all the images. If the button is turned off, an event will automatically fire that triggers the submit event handler
86
- */
87
- showSubmitBtn?: boolean;
88
- /**
89
- * This option switches on/off the HEIC image processing (HEIC is Apple’s proprietary version of the Image File format). It’s possible to upload an image of this type only using a Mac/MacBook
90
- */
91
- useHeic?: boolean;
92
- /** callback-function which will be called after guidelines button. */
93
- clickGuidlines?: () => void;
94
- /** function which will be called after each step completes */
95
- onChange?: (data: IStepCallback) => void;
96
- /**
97
- * function which will be called after the retake button is clicked
98
- * @param data - Step object of current step
99
- */
100
- onRetakeHook?: (data: IStepCallback) => void;
101
- /** the function that will be called on the component mounted. */
102
- onMounted?: () => void;
103
- /**
104
- * function which will be called after reset all the steps button is clicked
105
- * @param data - Step objects of current pipeline
106
- */
107
- onReset?: (data: IDataForSubmit) => void;
108
- /** function which will be called in case the camera is not available */
109
- onCameraError?: (data: Error) => void;
110
- /** function which will be called after clicking the submit button */
111
- submit?: (data: IDataForSubmit) => void;
112
- }
113
- declare class Config implements IConfig {
114
- el: string;
115
- commonStepTypes: Set<StepType>;
116
- types: DocumentTypeName[];
117
- steps: IStepConfig[];
118
- documentTypes: IDocumentTypeConfig | null;
119
- licenseKey: string;
120
- autoContinue: boolean;
121
- resizeUploadedImage: number;
122
- fixFrontOrientAfterUpload: boolean;
123
- useCDN: boolean;
124
- networkUrl: string;
125
- realFaceMode: "auto" | "none" | "all";
126
- language: any;
127
- constructor(configObject: IConfig);
128
- getFunction(validationFn: ValidationFn): false | import("./validation/ValidateElement").default | import("./validation/ValidateBool").default | import("./validation/ValidateStringInArray").default | import("./validation/ValidateDocumentTypes").default | import("./validation/ValidateFunction").default | import("./validation/ValidateNumber").default | import("./validation/ValidateString").default;
129
- validate(configObject: IConfig): void;
130
- }
131
- export default Config;
@@ -1,61 +0,0 @@
1
- import { Geometry } from '../helpers/geometry';
2
- import { Color } from '../helpers/color';
3
- declare class Face {
4
- module: any;
5
- protected isAllocate: boolean;
6
- private n;
7
- protected w: number;
8
- protected h: number;
9
- prcsq: number | null;
10
- rcsq: Float32Array | null;
11
- maxndetections: number;
12
- ppixels: number | null;
13
- faceSuccessCount: number;
14
- faceFailCount: number;
15
- private memory;
16
- pixels: Uint8Array;
17
- res: {
18
- cancel: boolean;
19
- image: null;
20
- touch: boolean;
21
- type: string;
22
- status: boolean;
23
- };
24
- private color;
25
- protected geometry: Geometry | null;
26
- protected edgesColor: string;
27
- constructor(core: any);
28
- init(geometry: Geometry, color: Color): void;
29
- initMemory(): void;
30
- updateMemory(dets: number[][]): any[];
31
- allocate(w: number, h: number): void;
32
- findFace(data: number[]): {
33
- tresh: number;
34
- face: {
35
- x: number;
36
- y: number;
37
- radius: number;
38
- };
39
- thresh?: undefined;
40
- } | {
41
- thresh: number;
42
- face: {
43
- x: number;
44
- y: number;
45
- radius: number;
46
- };
47
- tresh?: undefined;
48
- };
49
- setColorFromAngle(angle: number): void;
50
- result(status?: boolean, image?: any, touch?: boolean): {
51
- status: boolean;
52
- image: any;
53
- faceSuccessCount: number;
54
- faceFailCount: number;
55
- touch: boolean;
56
- cancel: boolean;
57
- type: string;
58
- };
59
- processFace(): void;
60
- }
61
- export default Face;
@@ -1,7 +0,0 @@
1
- export declare const clearQueue: () => void;
2
- export declare const fillingQueue: (smallImage?: ImageData, isUpload?: boolean) => {
3
- status: "PENDING" | "FULFILLED";
4
- promise: Promise<boolean>;
5
- };
6
- export declare const getBestFrame: () => ImageData;
7
- export declare const dropPromise: () => void;
@@ -1,52 +0,0 @@
1
- import { Keypoint } from '@tensorflow-models/face-landmarks-detection';
2
- import { RealFaceTurnSide } from '../types/enums/realFace';
3
- import { RealFaceResultObject } from '../types/modules/realFace';
4
- import { Geometry, Point } from '../helpers/geometry';
5
- export declare class MeshedFace {
6
- private realFace;
7
- private moveToCenter;
8
- private noFace;
9
- private perimeter;
10
- private distance;
11
- private baseSizes;
12
- private lowFacePerimeterPercent;
13
- private readonly lowFacePerimeterPercentDefault;
14
- private correctDirection;
15
- private direction;
16
- private turnDistances;
17
- private prediction;
18
- private faceFailCount;
19
- private faceSuccessCount;
20
- private readonly res;
21
- private geometry;
22
- private keypoints;
23
- constructor();
24
- init(geometry: Geometry): void;
25
- result(status?: boolean, image?: any, touch?: boolean): RealFaceResultObject;
26
- noPredictions(): void;
27
- processFace(startProcessFaceTime: any, origData: any, predictions: any, size: any): RealFaceResultObject;
28
- dropSuccess(): void;
29
- getDirection(): RealFaceTurnSide;
30
- setDirection(value: any): void;
31
- getMf(center: any): number[];
32
- processBadPerimeter(perimeter: any): void;
33
- main(perimeter: any, mf: any): void;
34
- processRealFace(): void;
35
- calculateFace(): {
36
- perimeter: number;
37
- mf: number[];
38
- };
39
- processPrediction(): void;
40
- processDistance(): void;
41
- transformPoint(keypoint: Keypoint): Point;
42
- createKeyPoints(): void;
43
- /**
44
- * calculates head turn in degrees
45
- * @param {number} firstDistance
46
- * @param {number} secondDistance
47
- * @returns {number}
48
- */
49
- calculateTurn(firstDistance: any, secondDistance: any): number;
50
- calculateDistance(): void;
51
- }
52
- export default MeshedFace;
@@ -1,10 +0,0 @@
1
- export default class MetaData {
2
- constructor(version?: string);
3
- userAgent: string;
4
- capturedMethod: string;
5
- logs: {};
6
- version: string;
7
- captureMethod(steps: any): void;
8
- getMetaData(steps: any): {};
9
- prepareMetaDataForSubmit(steps: any): string;
10
- }
@@ -1,114 +0,0 @@
1
- import { Tensor } from '@tensorflow/tfjs-core';
2
- import { IMrzCoords } from '../loop';
3
- import { IMRZLocation } from './manualUploadProcessing';
4
- import { StepFunctionResult } from '../types/loop';
5
- type MRZCore = any;
6
- interface ILicenceError {
7
- errorType: string;
8
- error: boolean;
9
- errorVal: string;
10
- }
11
- interface IMrzPredict {
12
- confidence: number;
13
- value: string;
14
- }
15
- interface IMrzTFModel {
16
- normalize: (input: any, batchSize: any) => Tensor;
17
- predictFromImageSync: (img: HTMLCanvasElement, countOfExits: number, channels: number, batchSize: number) => IMrzPredict[];
18
- }
19
- interface IDecodedField {
20
- name: string;
21
- value: string;
22
- status: 'valid' | 'invalidCS';
23
- }
24
- interface IMrzScanRes {
25
- status: {
26
- value: number;
27
- };
28
- fields: IDecodedField[];
29
- count: number;
30
- location: IMRZLocation;
31
- errorStatus?: string;
32
- }
33
- interface IMrzStepResult extends StepFunctionResult {
34
- coords?: IMrzCoords;
35
- needToCut?: boolean;
36
- results?: {
37
- mrzText: string;
38
- };
39
- }
40
- interface IDetectRes {
41
- status: boolean;
42
- results?: {
43
- mrzText: string;
44
- } | null;
45
- locations?: IMRZLocation;
46
- error?: ILicenceError;
47
- }
48
- interface ICheckResult extends IDetectRes {
49
- mrzData: null;
50
- }
51
- export declare class MrzModule {
52
- readonly module: MRZCore;
53
- readonly model: IMrzTFModel;
54
- batchCanvas: HTMLCanvasElement;
55
- _errorId: number;
56
- w: number;
57
- h: number;
58
- successCount: number;
59
- symbolsConf: number;
60
- SAMPLE_SIZE: number;
61
- MAX_SIZE: number;
62
- isAllocate: boolean;
63
- src: number;
64
- out: number;
65
- decoder: any;
66
- constructor(module: MRZCore, model: IMrzTFModel);
67
- set errorId(id: number);
68
- get errorId(): number;
69
- get errorVal(): any;
70
- /**
71
- * returns error Object
72
- * @return {ILicenceError}
73
- */
74
- licenseError(): ILicenceError;
75
- create(key: any): any;
76
- getName(name: any, value: any): string;
77
- allocate(): void;
78
- free(): void;
79
- /**
80
- *
81
- * @param {ImageData} data
82
- * @return {{count: number, location: {}, fields: *[], status: {}}|boolean}
83
- */
84
- scan(data: ImageData): IMrzScanRes | false;
85
- decodeResult(decodeResult: any): any[];
86
- yComparator(point1: any, point2: any): any[];
87
- prepareMRZlocation(locations: any): IMRZLocation;
88
- writeResults(mrzResults: IMrzScanRes): {
89
- mrzText: string;
90
- };
91
- processMRZ(data: any): IMrzStepResult | {
92
- error: ILicenceError;
93
- coords?: IMrzCoords;
94
- needToCut?: boolean;
95
- results?: {
96
- mrzText: string;
97
- };
98
- type: import("../environment/stepsDescription").StepType | "VolumeFace";
99
- cancel: boolean;
100
- image: ImageData;
101
- touch: boolean;
102
- status: boolean;
103
- };
104
- estimateResults(data: any): number;
105
- checkMrz(data: any): ICheckResult;
106
- getSymbolsConf(): number;
107
- /**
108
- * detects MRZ on ImageData
109
- * @param {ImageData} imageData
110
- * @return {Promise<>}
111
- */
112
- detectMrz(imageData: ImageData): Promise<IDetectRes>;
113
- }
114
- export default MrzModule;
@@ -1,79 +0,0 @@
1
- import { ISize } from '../helpers/image';
2
- interface Coord {
3
- x: number;
4
- y: number;
5
- }
6
- export declare class PdfModule {
7
- module: any;
8
- reader: any;
9
- handle: any;
10
- bw: number;
11
- bh: number;
12
- src: any;
13
- out: any;
14
- isAllocate: boolean;
15
- successCount: number;
16
- _errorId: number;
17
- edgMem: any;
18
- src2: any;
19
- outLen: any;
20
- locations: any;
21
- pdfCount: number;
22
- geometry: {
23
- angleBetweenTwoVectors: any;
24
- };
25
- minPDFframes: number;
26
- cropSizes: ISize;
27
- canvasSizes: ISize;
28
- constructor(core: any, processor: any);
29
- /**
30
- *
31
- * @param geometry
32
- * @param {number} minPDFframes - c.config.minPDFframes
33
- * @param {{width: number, height: number}} cropSize - c.config.cropSize
34
- * @param {{width: number, height: number}} canvasSizes - ui.borderCanvas
35
- */
36
- init(geometry: any, minPDFframes: any, cropSize: any, canvasSizes: any): void;
37
- set errorId(id: number);
38
- get errorId(): number;
39
- get errorVal(): any;
40
- /**
41
- * returns error Object
42
- * @return {{errorType: string, error: boolean, errorVal: string}}
43
- */
44
- licenseError(): {
45
- error: boolean;
46
- errorType: string;
47
- errorVal: any;
48
- };
49
- getLocations(): void;
50
- setResizedData(data: any): void;
51
- initReader(key: any): void;
52
- destroyReader(): void;
53
- setPdfData(data: any): void;
54
- readPdf(): any;
55
- releasePdf(): void;
56
- create(): void;
57
- free(): void;
58
- setSizes(bw: any, bh: any): void;
59
- getSizes(): {
60
- bw: number;
61
- bh: number;
62
- };
63
- allocate(): void;
64
- readPDF(data: any): any;
65
- drawCords(locations: Record<string, number>): Coord[];
66
- proccessPDF(data: any): {
67
- status: boolean;
68
- predict: boolean;
69
- touch: boolean;
70
- image: any;
71
- type: string;
72
- error: any;
73
- coords: any[];
74
- trackString: string;
75
- pdfSuccessCount: number;
76
- pdfCount: number;
77
- };
78
- }
79
- export default PdfModule;
@@ -1,18 +0,0 @@
1
- import Face from './Face';
2
- export declare class SimpleFace extends Face {
3
- private faceMax;
4
- constructor(core: any);
5
- initPico(data: ImageData): Promise<void>;
6
- rgbaToGrayScale(rgba: any, width: any, height: any): Uint8Array;
7
- detect(faceData: ImageData): {
8
- status: boolean;
9
- image: any;
10
- faceSuccessCount: number;
11
- faceFailCount: number;
12
- touch: boolean;
13
- cancel: boolean;
14
- type: string;
15
- };
16
- dropResults(): void;
17
- }
18
- export default SimpleFace;
@@ -1,65 +0,0 @@
1
- import { Base64Image } from '../helpers/image';
2
- import { StepType } from '../environment/stepsDescription';
3
- import { IStepMode } from '../defaultConfig';
4
- export interface IStepConfigMode {
5
- name: 'mode';
6
- value: IStepMode;
7
- }
8
- export type StepConfig = IStepConfigMode;
9
- export type StepConfigNames = StepConfig['name'];
10
- export type StepConfigValues = StepConfig['value'];
11
- export interface IStepObj {
12
- name: string;
13
- type: StepType;
14
- camera: VideoFacingModeEnum;
15
- img: Base64Image | null;
16
- err?: string | null;
17
- text?: string;
18
- time?: number;
19
- configs?: StepConfig[];
20
- }
21
- export interface IStepCallback {
22
- /** base64 encoded step image */
23
- img: Base64Image | null;
24
- /** step type */
25
- type: StepType;
26
- /** is it autocaptured from camera */
27
- isAuto?: boolean;
28
- /** image source */
29
- source?: 'video' | 'file' | '';
30
- /** step index */
31
- index?: number;
32
- /** trackstring from mrz or pdf */
33
- trackString?: string;
34
- /** mrz recognized text */
35
- mrzText?: string;
36
- /** cropped base64 encoded mrz image */
37
- mrzImg?: Base64Image | null;
38
- /** recognized text */
39
- text?: string;
40
- }
41
- export default class Step implements IStepCallback, IStepObj {
42
- blob?: Blob | null;
43
- errorCode: string | null | undefined;
44
- mrzText?: string;
45
- mrzImg?: Base64Image | null;
46
- trackString?: string;
47
- err?: string | null;
48
- text?: string;
49
- isAuto?: boolean;
50
- source?: 'video' | 'file';
51
- configs: StepConfig[];
52
- name: string;
53
- type: StepType;
54
- camera: VideoFacingModeEnum;
55
- time: number;
56
- img: Base64Image | null;
57
- constructor(nameOrObj: string | IStepObj, type?: StepType, camera?: VideoFacingModeEnum, time?: number, img?: Base64Image | null);
58
- setConfig(configName: StepConfigNames, configValue: StepConfigValues): void;
59
- hasConfig(configName: StepConfigNames): StepConfig | undefined;
60
- getConfig(configName: StepConfigNames): StepConfigValues | null;
61
- get isShowManualSwitchButton(): boolean;
62
- get capturingMode(): IStepMode;
63
- prepareStepForCallback(index: number): IStepCallback;
64
- static createStep(stepObj: IStepObj): Step;
65
- }
@@ -1,4 +0,0 @@
1
- declare const _default: (core: any) => {
2
- analyze: (iData: ImageData) => any;
3
- };
4
- export default _default;
@@ -1,6 +0,0 @@
1
- export declare const browserCompatibilities: {
2
- wasmSupport: boolean;
3
- mediaSupport: boolean;
4
- secureConnection: boolean;
5
- };
6
- export declare const detectBrowserCompatibilities: () => void;
@@ -1,14 +0,0 @@
1
- import { ISize } from '../helpers/image';
2
- export declare const stopTrack: () => void;
3
- export declare const cameraErrorHandling: (err: Error) => Promise<never>;
4
- declare const _default: {
5
- initUploader: () => Promise<void>;
6
- stopTrack: () => void;
7
- init: () => Promise<void>;
8
- start: (mode: VideoFacingModeEnum) => Promise<void>;
9
- setCapture: (val: boolean) => void;
10
- checkFlashAvailable: (mode?: VideoFacingModeEnum) => void;
11
- getResolution: (mode: VideoFacingModeEnum) => Promise<ISize>;
12
- dropResolutions: () => void;
13
- };
14
- export default _default;
@@ -1,9 +0,0 @@
1
- import { CameraObjects, StartCamera } from '../types/modules/camera';
2
- import { CameraError } from './initErrorHandler';
3
- /**
4
- * all available cameras
5
- */
6
- export declare const cameraObjects: CameraObjects;
7
- export declare const stopTrack: (mediaStream: MediaStream) => void;
8
- export declare const fillVideoDevices: () => Promise<CameraError | CameraObjects>;
9
- export declare const startCamera: StartCamera;
@@ -1 +0,0 @@
1
- export function fromBlob(blob: any): Promise<any>;
@@ -1,10 +0,0 @@
1
- /**
2
- * detect frame quality based on comparing pixels intesivity.
3
- */
4
- interface IData {
5
- data: Uint8ClampedArray;
6
- width: number;
7
- height: number;
8
- }
9
- export declare const getFrameQuality: ({ data, width, height }: IData) => number;
10
- export {};
@@ -1,11 +0,0 @@
1
- export declare class HeicModule {
2
- private core;
3
- constructor(core?: any);
4
- processSingleImage(image: any): Promise<unknown>;
5
- private heifDecode;
6
- convert(e: any): Promise<{
7
- imageDataArr: any[];
8
- error: string;
9
- }>;
10
- }
11
- export default HeicModule;
@@ -1,13 +0,0 @@
1
- import { BrowserInfo } from 'detect-browser';
2
- export type Angle = 0 | 90 | 180 | 270;
3
- export declare function dataURItoBlob(dataURL: string): Blob;
4
- export declare const rotateImageByAngle: (src: string, angle: Angle) => Promise<unknown>;
5
- export declare const rotateImageByExif: (src: string, browser: BrowserInfo) => Promise<string>;
6
- /**
7
- *
8
- * @param src - string
9
- * @param maxSize - integer
10
- * @param browser - object
11
- * @returns {Promise<DataURL>}
12
- */
13
- export declare const resizeImage: (src: string, maxSize: number | 'none', browser: BrowserInfo) => Promise<string>;
@@ -1,10 +0,0 @@
1
- import { CameraNotSupportedReason } from '../types/modules/camera.enum';
2
- /**
3
- * The error object thrown when VideoRecognizer fails to open the camera feed.
4
- */
5
- export declare class CameraError extends Error {
6
- /** The reason why opening the camera failed. */
7
- readonly reason: CameraNotSupportedReason;
8
- constructor(reason: CameraNotSupportedReason, ...params: any[]);
9
- }
10
- export declare const CameraErrorHandler: (error: CameraError) => void;
@@ -1 +0,0 @@
1
- export declare const checkCommonKey: (key: string) => Promise<void>;
@@ -1,7 +0,0 @@
1
- import { Base64Image } from '../helpers/image';
2
- interface Base64Object {
3
- data: ImageData | Base64Image | null;
4
- err: boolean;
5
- }
6
- declare const dropFile: (base64Obj: Base64Object) => Promise<void>;
7
- export default dropFile;