@microblink/blinkid-in-browser-sdk
Advanced tools
Comparing version 6.11.2 to 6.12.0
{ | ||
"name": "@microblink/blinkid-in-browser-sdk", | ||
"version": "6.11.2", | ||
"version": "6.12.0", | ||
"description": "A simple ID scanning library for WebAssembly-enabled browsers.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/BlinkID/blinkid-in-browser", |
@@ -207,2 +207,3 @@ /** | ||
readonly mbWasmModule: WasmModuleProxy; | ||
readonly mbWasmWorker: Worker; | ||
delete: () => void; | ||
@@ -209,0 +210,0 @@ getProductIntegrationInfo: () => Promise<ProductIntegrationInfo>; |
@@ -36,3 +36,3 @@ /** | ||
readonly mbWasmModule: WasmModuleWorkerProxy; | ||
private readonly mbWasmWorker; | ||
readonly mbWasmWorker: Worker; | ||
private eventHandlers; | ||
@@ -39,0 +39,0 @@ private metadataCallbacks; |
@@ -32,2 +32,7 @@ /** | ||
skipUnsupportedBack: boolean; | ||
/** | ||
* Scan only the data page ( page containing MRZ ) of the passport. | ||
* If set to `false`, it will be required to scan the second page of certain passports. | ||
*/ | ||
scanPassportDataPageOnly: boolean; | ||
} | ||
@@ -34,0 +39,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as a}from"./p-4d18f253.js";export{s as setNonce}from"./p-4d18f253.js";(()=>{const a=import.meta.url,o={};return""!==a&&(o.resourcesUrl=new URL(".",a).href),e(o)})().then((e=>a([["p-7dffd99d",[[1,"mb-tooltip",{show:[4],message:[1],arrowPosition:[1,"arrow-position"],showWarningIcon:[4,"show-warning-icon"],showInfoIcon:[4,"show-info-icon"],textAlign:[1,"text-align"],containerWidth:[1,"container-width"]}]]],["p-8833d997",[[1,"blinkid-in-browser",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1,"wasm-type"],blinkIdVariant:[1,"blink-id-variant"],rawRecognizers:[1,"recognizers"],recognizers:[16],recognizerOptions:[16],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],enableDrag:[4,"enable-drag"],hideFeedback:[4,"hide-feedback"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],rawTranslations:[1,"translations"],translations:[16],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],cameraId:[1,"camera-id"],allowHelpScreensFab:[4,"allow-help-screens-fab"],allowHelpScreensOnboarding:[4,"allow-help-screens-onboarding"],allowHelpScreensOnboardingPerpetuity:[4,"allow-help-screens-onboarding-perpetuity"],helpScreensTooltipPauseTimeout:[2,"help-screens-tooltip-pause-timeout"],pingProxyUrl:[1,"ping-proxy-url"],setUiState:[64],startCameraScan:[64],startImageScan:[64],startMultiSideImageScan:[64],setUiMessage:[64],getProductIntegrationInfo:[64]}],[1,"mb-component",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1025,"wasm-type"],blinkIdVariant:[1,"blink-id-variant"],recognizers:[1040],recognizerOptions:[1040],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],includeSuccessFrame:[4,"include-success-frame"],enableDrag:[4,"enable-drag"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],rtl:[4],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],showScanningLine:[4,"show-scanning-line"],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconDragAndDropGalleryDefault:[1,"icon-drag-and-drop-gallery-default"],iconDragAndDropWarningDefault:[1,"icon-drag-and-drop-warning-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],sdkService:[16],translationService:[16],cameraId:[1,"camera-id"],allowHelpScreens:[4,"allow-help-screens"],allowHelpScreensFab:[4,"allow-help-screens-fab"],allowHelpScreensOnboarding:[4,"allow-help-screens-onboarding"],allowHelpScreensOnboardingPerpetuity:[4,"allow-help-screens-onboarding-perpetuity"],helpScreensTooltipPauseTimeout:[2,"help-screens-tooltip-pause-timeout"],pingProxyUrl:[1,"ping-proxy-url"],galleryExperienceModalErrorWindowVisible:[32],clearIsCameraActive:[32],apiProcessStatusVisible:[32],apiProcessStatusState:[32],startCameraScan:[64],startImageScan:[64],startMultiSideImageScan:[64],setUiState:[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{visible:[4],paragraphClassName:[32],paragraphValue:[32],show:[64]}],[1,"mb-camera-experience",{type:[1],cameraExperienceStateDurations:[16],showOverlay:[4,"show-overlay"],translationService:[16],apiState:[1,"api-state"],cameraFlipped:[1028,"camera-flipped"],showScanningLine:[4,"show-scanning-line"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],clearIsCameraActive:[4,"clear-is-camera-active"],allowHelpScreens:[4,"allow-help-screens"],allowHelpScreensFab:[4,"allow-help-screens-fab"],allowHelpScreensOnboarding:[4,"allow-help-screens-onboarding"],allowHelpScreensOnboardingPerpetuity:[4,"allow-help-screens-onboarding-perpetuity"],helpScreensTooltipPauseTimeout:[2,"help-screens-tooltip-pause-timeout"],cameraCursorBarcodeClassName:[32],cameraCursorIdentityCardClassName:[32],scanningLineBarcodeClassName:[32],cameraMessageIdentityCardContent:[32],cameraMessageIdentityCardClassName:[32],setActiveCamera:[64],populateCameraDevices:[64],setCameraFlipState:[64],initializeHelpScreens:[64],openHelpScreensOnboarding:[64],terminateHelpScreens:[64],setState:[64],resetState:[64]}],[1,"mb-api-process-status",{visible:[4],state:[1],translationService:[16]}],[1,"mb-button",{clickHandler:[16],disabled:[4],visible:[4],selected:[4],imageSrcDefault:[1,"image-src-default"],imageSrcActive:[1,"image-src-active"],imageAlt:[1,"image-alt"],label:[1],buttonTitle:[1,"button-title"]}],[1,"mb-completed",{icon:[1]}],[1,"mb-image-box",{boxTitle:[1,"box-title"],anchorText:[1,"anchor-text"],clear:[64]}],[1,"mb-screen",{visible:[4]}],[1,"mb-spinner",{icon:[1],size:[1]}],[1,"mb-help",{allow:[4],allowFab:[4,"allow-fab"],allowOnboarding:[4,"allow-onboarding"],allowOnboardingPerpetuity:[4,"allow-onboarding-perpetuity"],tooltipPauseTimeout:[2,"tooltip-pause-timeout"],translationService:[16],isInitialized:[32],isTooltipShownHover:[32],isTooltipShownTimer:[32],isModalShown:[32],activeStepIndex:[32],initialize:[64],openOnboarding:[64],openHelpScreens:[64],close:[64],terminate:[64]}],[1,"mb-camera-toolbar",{showClose:[4,"show-close"],clearIsCameraActive:[4,"clear-is-camera-active"],enableCameraFlip:[4,"enable-camera-flip"],cameraFlipped:[4,"camera-flipped"],showCloseButton:[32],isDesktop:[32],setActiveCamera:[64],populateCameraDevices:[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-button-classic",{inverted:[4],quit:[4],disabled:[4],preventDefault:[4,"prevent-default"],clickHandler:[16]}],[1,"mb-camera-selection",{clearIsCameraActive:[4,"clear-is-camera-active"],activeCamera:[32],cameraList:[32],isListVisible:[32],setActiveCamera:[64],populateCameraDevices:[64]}],[1,"mb-overlay",{fullscreen:[4],visible:[4]}],[1,"mb-progress-tracker",{size:[2],current:[2]}],[1,"mb-tooltip-advanced",{show:[4],message:[1],arrowPosition:[1,"arrow-position"],textAlign:[1,"text-align"]}],[1,"mb-modal",{visible:[4],elevated:[4],centered:[4],modalTitle:[1,"modal-title"],content:[1],contentCentered:[4,"content-centered"],showBackButton:[4,"show-back-button"],hideFooter:[4,"hide-footer"],hideCloseButton:[4,"hide-close-button"]}]]]],e))); | ||
import{p as e,b as a}from"./p-4d18f253.js";export{s as setNonce}from"./p-4d18f253.js";(()=>{const a=import.meta.url,o={};return""!==a&&(o.resourcesUrl=new URL(".",a).href),e(o)})().then((e=>a([["p-7dffd99d",[[1,"mb-tooltip",{show:[4],message:[1],arrowPosition:[1,"arrow-position"],showWarningIcon:[4,"show-warning-icon"],showInfoIcon:[4,"show-info-icon"],textAlign:[1,"text-align"],containerWidth:[1,"container-width"]}]]],["p-9b28beea",[[1,"blinkid-in-browser",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1,"wasm-type"],blinkIdVariant:[1,"blink-id-variant"],rawRecognizers:[1,"recognizers"],recognizers:[16],recognizerOptions:[16],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],enableDrag:[4,"enable-drag"],hideFeedback:[4,"hide-feedback"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],rawTranslations:[1,"translations"],translations:[16],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],cameraId:[1,"camera-id"],allowHelpScreensFab:[4,"allow-help-screens-fab"],allowHelpScreensOnboarding:[4,"allow-help-screens-onboarding"],allowHelpScreensOnboardingPerpetuity:[4,"allow-help-screens-onboarding-perpetuity"],helpScreensTooltipPauseTimeout:[2,"help-screens-tooltip-pause-timeout"],pingProxyUrl:[1,"ping-proxy-url"],setUiState:[64],startCameraScan:[64],startImageScan:[64],startMultiSideImageScan:[64],setUiMessage:[64],getProductIntegrationInfo:[64]}],[1,"mb-component",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1025,"wasm-type"],blinkIdVariant:[1,"blink-id-variant"],recognizers:[1040],recognizerOptions:[1040],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],includeSuccessFrame:[4,"include-success-frame"],enableDrag:[4,"enable-drag"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],rtl:[4],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],showScanningLine:[4,"show-scanning-line"],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconDragAndDropGalleryDefault:[1,"icon-drag-and-drop-gallery-default"],iconDragAndDropWarningDefault:[1,"icon-drag-and-drop-warning-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],sdkService:[16],translationService:[16],cameraId:[1,"camera-id"],allowHelpScreens:[4,"allow-help-screens"],allowHelpScreensFab:[4,"allow-help-screens-fab"],allowHelpScreensOnboarding:[4,"allow-help-screens-onboarding"],allowHelpScreensOnboardingPerpetuity:[4,"allow-help-screens-onboarding-perpetuity"],helpScreensTooltipPauseTimeout:[2,"help-screens-tooltip-pause-timeout"],pingProxyUrl:[1,"ping-proxy-url"],galleryExperienceModalErrorWindowVisible:[32],clearIsCameraActive:[32],apiProcessStatusVisible:[32],apiProcessStatusState:[32],startCameraScan:[64],startImageScan:[64],startMultiSideImageScan:[64],setUiState:[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{visible:[4],paragraphClassName:[32],paragraphValue:[32],show:[64]}],[1,"mb-camera-experience",{type:[1],cameraExperienceStateDurations:[16],showOverlay:[4,"show-overlay"],translationService:[16],apiState:[1,"api-state"],cameraFlipped:[1028,"camera-flipped"],showScanningLine:[4,"show-scanning-line"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],clearIsCameraActive:[4,"clear-is-camera-active"],allowHelpScreens:[4,"allow-help-screens"],allowHelpScreensFab:[4,"allow-help-screens-fab"],allowHelpScreensOnboarding:[4,"allow-help-screens-onboarding"],allowHelpScreensOnboardingPerpetuity:[4,"allow-help-screens-onboarding-perpetuity"],helpScreensTooltipPauseTimeout:[2,"help-screens-tooltip-pause-timeout"],cameraCursorBarcodeClassName:[32],cameraCursorIdentityCardClassName:[32],scanningLineBarcodeClassName:[32],cameraMessageIdentityCardContent:[32],cameraMessageIdentityCardClassName:[32],setActiveCamera:[64],populateCameraDevices:[64],setCameraFlipState:[64],initializeHelpScreens:[64],openHelpScreensOnboarding:[64],terminateHelpScreens:[64],setState:[64],resetState:[64]}],[1,"mb-api-process-status",{visible:[4],state:[1],translationService:[16]}],[1,"mb-button",{clickHandler:[16],disabled:[4],visible:[4],selected:[4],imageSrcDefault:[1,"image-src-default"],imageSrcActive:[1,"image-src-active"],imageAlt:[1,"image-alt"],label:[1],buttonTitle:[1,"button-title"]}],[1,"mb-completed",{icon:[1]}],[1,"mb-image-box",{boxTitle:[1,"box-title"],anchorText:[1,"anchor-text"],clear:[64]}],[1,"mb-screen",{visible:[4]}],[1,"mb-spinner",{icon:[1],size:[1]}],[1,"mb-help",{allow:[4],allowFab:[4,"allow-fab"],allowOnboarding:[4,"allow-onboarding"],allowOnboardingPerpetuity:[4,"allow-onboarding-perpetuity"],tooltipPauseTimeout:[2,"tooltip-pause-timeout"],translationService:[16],isInitialized:[32],isTooltipShownHover:[32],isTooltipShownTimer:[32],isModalShown:[32],activeStepIndex:[32],initialize:[64],openOnboarding:[64],openHelpScreens:[64],close:[64],terminate:[64]}],[1,"mb-camera-toolbar",{showClose:[4,"show-close"],clearIsCameraActive:[4,"clear-is-camera-active"],enableCameraFlip:[4,"enable-camera-flip"],cameraFlipped:[4,"camera-flipped"],showCloseButton:[32],isDesktop:[32],setActiveCamera:[64],populateCameraDevices:[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-button-classic",{inverted:[4],quit:[4],disabled:[4],preventDefault:[4,"prevent-default"],clickHandler:[16]}],[1,"mb-camera-selection",{clearIsCameraActive:[4,"clear-is-camera-active"],activeCamera:[32],cameraList:[32],isListVisible:[32],setActiveCamera:[64],populateCameraDevices:[64]}],[1,"mb-overlay",{fullscreen:[4],visible:[4]}],[1,"mb-progress-tracker",{size:[2],current:[2]}],[1,"mb-tooltip-advanced",{show:[4],message:[1],arrowPosition:[1,"arrow-position"],textAlign:[1,"text-align"]}],[1,"mb-modal",{visible:[4],elevated:[4],centered:[4],modalTitle:[1,"modal-title"],content:[1],contentCentered:[4,"content-centered"],showBackButton:[4,"show-back-button"],hideFooter:[4,"hide-footer"],hideCloseButton:[4,"hide-close-button"]}]]]],e))); |
@@ -8,2 +8,3 @@ /** | ||
import * as Utils from "./mb-camera-experience.utils"; | ||
import { globalState } from "../../../utils/state-lifter"; | ||
export class MbCameraExperience { | ||
@@ -211,2 +212,6 @@ constructor() { | ||
case CameraExperienceState.Default: | ||
// Do not take this into consideration if passport is detected | ||
if (globalState.isPassport) { | ||
break; | ||
} | ||
if (type === CameraExperience.Barcode && | ||
@@ -237,2 +242,38 @@ this.showCameraFeedbackBarcodeMessage) { | ||
} | ||
case CameraExperienceState.MovePassportUp: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-top-page")); | ||
} | ||
case CameraExperienceState.MovePassportRight: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-right-page")); | ||
} | ||
case CameraExperienceState.MovePassportDown: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-bottom-page")); | ||
} | ||
case CameraExperienceState.MovePassportLeft: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-left-page")); | ||
} | ||
case CameraExperienceState.ScanPassportUp: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-scan-top-page")); | ||
} | ||
case CameraExperienceState.ScanPassportDown: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-scan-bottom-page")); | ||
} | ||
case CameraExperienceState.ScanPassportRight: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-scan-right-page")); | ||
} | ||
case CameraExperienceState.ScanPassportLeft: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-scan-left-page")); | ||
} | ||
case CameraExperienceState.MovePassportUpError: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-top-page")); | ||
} | ||
case CameraExperienceState.MovePassportDownError: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-bottom-page")); | ||
} | ||
case CameraExperienceState.MovePassportRightError: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-right-page")); | ||
} | ||
case CameraExperienceState.MovePassportLeftError: { | ||
return getStateMessageAsHTML(this.translationService.i("camera-feedback-move-left-page")); | ||
} | ||
case CameraExperienceState.FacePhotoCovered: { | ||
@@ -293,3 +334,3 @@ return getStateMessageAsHTML(this.translationService.i("camera-feedback-face-photo-covered")); | ||
"original": "CameraExperience", | ||
"resolved": "CameraExperience.Barcode | CameraExperience.CardMultiSide | CameraExperience.CardSingleSide | CameraExperience.PaymentCard", | ||
"resolved": "CameraExperience.Barcode | CameraExperience.CardMultiSide | CameraExperience.CardSingleSide | CameraExperience.Passport | CameraExperience.PaymentCard", | ||
"references": { | ||
@@ -296,0 +337,0 @@ "CameraExperience": { |
@@ -46,2 +46,7 @@ /** | ||
case CameraExperienceState.WrongSide: | ||
// and for passport page errors | ||
case CameraExperienceState.MovePassportDownError: | ||
case CameraExperienceState.MovePassportUpError: | ||
case CameraExperienceState.MovePassportLeftError: | ||
case CameraExperienceState.MovePassportRightError: | ||
stateClass = "is-error-move-closer"; | ||
@@ -48,0 +53,0 @@ break; |
@@ -89,2 +89,15 @@ /** | ||
RecognitionStatus["GlareDetected"] = "GlareDetected"; | ||
// Passport states | ||
RecognitionStatus["MovePassportLeft"] = "MovePassportLeft"; | ||
RecognitionStatus["MovePassportRight"] = "MovePassportRight"; | ||
RecognitionStatus["MovePassportUp"] = "MovePassportUp"; | ||
RecognitionStatus["MovePassportDown"] = "MovePassportDown"; | ||
RecognitionStatus["MovePassportDownError"] = "MovePassportDownError"; | ||
RecognitionStatus["MovePassportUpError"] = "MovePassportUpError"; | ||
RecognitionStatus["MovePassportRightError"] = "MovePassportRightError"; | ||
RecognitionStatus["MovePassportLeftError"] = "MovePassportLeftError"; | ||
RecognitionStatus["ScanPassportLeft"] = "ScanPassportLeft"; | ||
RecognitionStatus["ScanPassportRight"] = "ScanPassportRight"; | ||
RecognitionStatus["ScanPassportUp"] = "ScanPassportUp"; | ||
RecognitionStatus["ScanPassportDown"] = "ScanPassportDown"; | ||
// Errors | ||
@@ -109,2 +122,3 @@ RecognitionStatus["UnknownError"] = "UnknownError"; | ||
CameraExperience["PaymentCard"] = "PAYMENT_CARD"; | ||
CameraExperience["Passport"] = "PASSPORT"; | ||
})(CameraExperience || (CameraExperience = {})); | ||
@@ -127,2 +141,15 @@ export var CameraExperienceState; | ||
CameraExperienceState["FacePhotoCovered"] = "FacePhotoCovered"; | ||
// passport states | ||
CameraExperienceState["MovePassportLeft"] = "MovePassportLeft"; | ||
CameraExperienceState["MovePassportRight"] = "MovePassportRight"; | ||
CameraExperienceState["MovePassportUp"] = "MovePassportUp"; | ||
CameraExperienceState["MovePassportDown"] = "MovePassportDown"; | ||
CameraExperienceState["ScanPassportLeft"] = "ScanPassportLeft"; | ||
CameraExperienceState["ScanPassportRight"] = "ScanPassportRight"; | ||
CameraExperienceState["ScanPassportUp"] = "ScanPassportUp"; | ||
CameraExperienceState["ScanPassportDown"] = "ScanPassportDown"; | ||
CameraExperienceState["MovePassportDownError"] = "MovePassportDownError"; | ||
CameraExperienceState["MovePassportUpError"] = "MovePassportUpError"; | ||
CameraExperienceState["MovePassportRightError"] = "MovePassportRightError"; | ||
CameraExperienceState["MovePassportLeftError"] = "MovePassportLeftError"; | ||
})(CameraExperienceState || (CameraExperienceState = {})); | ||
@@ -133,3 +160,3 @@ export const CameraExperienceStateDuration = new Map([ | ||
[CameraExperienceState.Default, 500], | ||
[CameraExperienceState.Done, 300], | ||
[CameraExperienceState.Done, 1000], | ||
[CameraExperienceState.DoneAll, 400], | ||
@@ -143,2 +170,14 @@ [CameraExperienceState.Flip, 3500], | ||
[CameraExperienceState.FacePhotoCovered, 2500], | ||
[CameraExperienceState.MovePassportLeft, 2500], | ||
[CameraExperienceState.MovePassportRight, 2500], | ||
[CameraExperienceState.MovePassportUp, 2500], | ||
[CameraExperienceState.MovePassportDown, 2500], | ||
[CameraExperienceState.ScanPassportLeft, 1500], | ||
[CameraExperienceState.ScanPassportRight, 1500], | ||
[CameraExperienceState.ScanPassportUp, 1500], | ||
[CameraExperienceState.ScanPassportDown, 1500], | ||
[CameraExperienceState.MovePassportDownError, 2500], | ||
[CameraExperienceState.MovePassportUpError, 2500], | ||
[CameraExperienceState.MovePassportRightError, 2500], | ||
[CameraExperienceState.MovePassportLeftError, 2500], | ||
]); | ||
@@ -145,0 +184,0 @@ /** |
@@ -7,2 +7,3 @@ /** | ||
import * as ErrorTypes from "./error-structures"; | ||
import { globalState } from "./state-lifter"; | ||
/** | ||
@@ -15,12 +16,35 @@ * Get the additional processing information from the BlinkIdResult. | ||
const isMultiside = "scanningFirstSideDone" in result; | ||
const additionalProcessingInfo = (() => { | ||
if (isMultiside) { | ||
return !result.scanningFirstSideDone | ||
? result.frontAdditionalProcessingInfo | ||
: result.backAdditionalProcessingInfo; | ||
} | ||
const isOnFirstSide = isMultiside && !result.scanningFirstSideDone; | ||
const isFrontSuccessFrame = result.processingStatus === BlinkIDSDK.ProcessingStatus.AwaitingOtherSide; | ||
if (!isMultiside) { | ||
return result.additionalProcessingInfo; | ||
})(); | ||
return additionalProcessingInfo; | ||
} | ||
if (!isOnFirstSide) { | ||
return result.frontAdditionalProcessingInfo; | ||
} | ||
// `scanningFirstSideDone` is true, but we are still technically on the first side | ||
if (isFrontSuccessFrame) { | ||
return result.frontAdditionalProcessingInfo; | ||
} | ||
return result.backAdditionalProcessingInfo; | ||
} | ||
export function getImageAnalyisResult(result) { | ||
const isMultiside = "scanningFirstSideDone" in result; | ||
const isOnFirstSide = isMultiside && !result.scanningFirstSideDone; | ||
const isFrontSuccessFrame = result.processingStatus === BlinkIDSDK.ProcessingStatus.AwaitingOtherSide; | ||
if (!isMultiside) { | ||
return result.imageAnalysisResult; | ||
} | ||
if (!isOnFirstSide || isFrontSuccessFrame) { | ||
return result.frontImageAnalysisResult; | ||
} | ||
// `scanningFirstSideDone` is true, but we are still technically on the first side | ||
if (isFrontSuccessFrame) { | ||
return result.frontImageAnalysisResult; | ||
} | ||
return result.backImageAnalysisResult; | ||
} | ||
export const isFirstSideDone = (result) => { | ||
return "scanningFirstSideDone" in result && result.scanningFirstSideDone; | ||
}; | ||
export async function getCameraDevices() { | ||
@@ -41,2 +65,4 @@ const devices = await BlinkIDSDK.getCameraDevices(); | ||
this.showOverlay = false; | ||
this.lastKnownCardRotation = BlinkIDSDK.CardRotation.None; | ||
this.lastDetectionStatus = BlinkIDSDK.DetectionStatus.Failed; | ||
this.eventEmitter$ = document.createElement("a"); | ||
@@ -129,3 +155,3 @@ } | ||
const recognizers = await this.createRecognizers(configuration.recognizers, configuration.recognizerOptions, eventCallback); | ||
const recognizerRunner = await this.createRecognizerRunner(recognizers, eventCallback); | ||
const recognizerRunner = await this.createRecognizerRunner(recognizers); | ||
if (configuration.pingProxyUrl) { | ||
@@ -142,26 +168,99 @@ await recognizerRunner.setPingProxyUrl(configuration.pingProxyUrl); | ||
const recognizerSettings = await activeRecognizer.currentSettings(); | ||
// add callbacks for blur, glare and processing statuses | ||
this.videoRecognizer.setOnFrameProcessed(async (result) => { | ||
// We do per-frame operations here | ||
this.videoRecognizer.setOnFrameProcessed((result) => { | ||
window.setTimeout(() => { | ||
// detection status callback is triggered before the video frame callback | ||
// reset it after each frame is done processing | ||
this.lastDetectionStatus = BlinkIDSDK.DetectionStatus.Failed; | ||
}, 0); | ||
const isMultiside = "scanningFirstSideDone" in result; | ||
const isFrontSuccessFrame = result.processingStatus === | ||
BlinkIDSDK.ProcessingStatus.AwaitingOtherSide; | ||
//We start scanning the second side only after not the success frame | ||
const isOnSecondSide = isMultiside && result.scanningFirstSideDone && !isFrontSuccessFrame; | ||
const additionalProcessingInfo = getAdditionalProcessingInfo(result); | ||
if (additionalProcessingInfo.imageExtractionFailures.includes(BlinkIDSDK.ImageExtractionType.Face)) { | ||
eventCallback({ | ||
status: RecognitionStatus.FacePhotoCovered, | ||
}); | ||
return; | ||
const imageAnalysisResult = getImageAnalyisResult(result); | ||
const isPassport = result.classInfo.documentType === BlinkIDSDK.DocumentType.PASSPORT; | ||
// horrible hack to get the passport status to the global state | ||
globalState.isPassport = isPassport; | ||
const notDetected = this.lastDetectionStatus === BlinkIDSDK.DetectionStatus.Failed; | ||
if (imageAnalysisResult.cardRotation) { | ||
// save last known rotation in case we lose the document | ||
this.lastKnownCardRotation = imageAnalysisResult.cardRotation; | ||
} | ||
if (result.processingStatus === | ||
BlinkIDSDK.ProcessingStatus.ScanningWrongSide) { | ||
eventCallback({ | ||
status: RecognitionStatus.WrongSide, | ||
}); | ||
// framing | ||
switch (this.lastDetectionStatus) { | ||
case BlinkIDSDK.DetectionStatus.CameraTooFar: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusCameraTooHigh, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.FallbackSuccess: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusFallbackSuccess, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.DocumentPartiallyVisible: | ||
eventCallback({ status: RecognitionStatus.DetectionStatusPartial }); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.CameraAngleTooSteep: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusCameraAtAngle, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.CameraTooClose: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusCameraTooNear, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.DocumentTooCloseToCameraEdge: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusDocumentTooCloseToEdge, | ||
}); | ||
break; | ||
} | ||
const imageAnalysisResult = (() => { | ||
if (isMultiside) { | ||
return !result.scanningFirstSideDone | ||
? result.frontImageAnalysisResult | ||
: result.backImageAnalysisResult; | ||
// handle no detection | ||
if (notDetected) { | ||
if (!isPassport) { | ||
eventCallback({ | ||
// this status doesn't seem to do anything | ||
// the logic is probably handled as a "default" state somewhere else | ||
status: RecognitionStatus.DetectionStatusFail, | ||
}); | ||
} | ||
return result.imageAnalysisResult; | ||
})(); | ||
else { | ||
// Get the user to scan the passport | ||
// again, refer to the page relative to the last one scanned | ||
if (isOnSecondSide) { | ||
switch (this.lastKnownCardRotation) { | ||
case BlinkIDSDK.CardRotation.None: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportUpError, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.Clockwise90: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportRightError, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.CounterClockwise90: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportLeftError, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.UpsideDown: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportDownError, | ||
}); | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
return; | ||
} | ||
// handle glare | ||
if (imageAnalysisResult.glareDetected && | ||
@@ -172,3 +271,5 @@ recognizerSettings.enableGlareFilter) { | ||
}); | ||
return; | ||
} | ||
// handle blur | ||
if (imageAnalysisResult.blurDetected && | ||
@@ -179,4 +280,91 @@ recognizerSettings.enableBlurFilter) { | ||
}); | ||
return; | ||
} | ||
// handle face occlusion | ||
if (additionalProcessingInfo.imageExtractionFailures.includes(BlinkIDSDK.ImageExtractionType.Face)) { | ||
eventCallback({ | ||
status: RecognitionStatus.FacePhotoCovered, | ||
}); | ||
return; | ||
} | ||
// first side done - show flip/move. This status triggers only once | ||
if (isFrontSuccessFrame) { | ||
if (!isPassport) { | ||
eventCallback({ status: RecognitionStatus.OnFirstSideResult }); | ||
} | ||
else { | ||
// Passport only branch | ||
switch (this.lastKnownCardRotation) { | ||
case BlinkIDSDK.CardRotation.None: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportUp, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.Clockwise90: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportRight, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.CounterClockwise90: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportLeft, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.UpsideDown: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportDown, | ||
}); | ||
break; | ||
} | ||
} | ||
} | ||
return; | ||
} | ||
// scanning wrong side | ||
if (result.processingStatus === | ||
BlinkIDSDK.ProcessingStatus.ScanningWrongSide) { | ||
if (isPassport) { | ||
// Passport only branch | ||
switch (this.lastKnownCardRotation) { | ||
case BlinkIDSDK.CardRotation.None: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportUpError, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.Clockwise90: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportRightError, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.CounterClockwise90: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportLeftError, | ||
}); | ||
break; | ||
} | ||
case BlinkIDSDK.CardRotation.UpsideDown: { | ||
eventCallback({ | ||
status: RecognitionStatus.MovePassportDownError, | ||
}); | ||
break; | ||
} | ||
} | ||
} | ||
else { | ||
// some other document, maybe unclassified? | ||
eventCallback({ | ||
status: RecognitionStatus.WrongSide, | ||
}); | ||
} | ||
return; | ||
} | ||
// fallback - success? | ||
eventCallback({ status: RecognitionStatus.DetectionStatusSuccess }); | ||
}); | ||
////////////////////////////////////////////////// | ||
// Start recognition | ||
@@ -290,3 +478,3 @@ await this.videoRecognizer | ||
const recognizers = await this.createRecognizers(configuration.recognizers, configuration.recognizerOptions, eventCallback); | ||
const recognizerRunner = await this.createRecognizerRunner(recognizers, eventCallback); | ||
const recognizerRunner = await this.createRecognizerRunner(recognizers); | ||
if (configuration.pingProxyUrl) { | ||
@@ -397,3 +585,3 @@ await recognizerRunner.setPingProxyUrl(configuration.pingProxyUrl); | ||
const recognizers = await this.createRecognizers(configuration.recognizers, configuration.recognizerOptions, eventCallback); | ||
const recognizerRunner = await this.createRecognizerRunner(recognizers, eventCallback); | ||
const recognizerRunner = await this.createRecognizerRunner(recognizers); | ||
if (configuration.pingProxyUrl) { | ||
@@ -562,3 +750,2 @@ await recognizerRunner.setPingProxyUrl(configuration.pingProxyUrl); | ||
eventCallback({ status: RecognitionStatus.BarcodeScanningStarted }); | ||
console.log("Barcode scanning started"); | ||
}; | ||
@@ -582,55 +769,8 @@ settings.classifierCallback = (supported) => { | ||
} | ||
async createRecognizerRunner(recognizers, eventCallback) { | ||
async createRecognizerRunner(recognizers) { | ||
const metadataCallbacks = { | ||
onDetectionFailed: () => eventCallback({ status: RecognitionStatus.DetectionFailed }), | ||
onQuadDetection: (quad) => { | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusChange, | ||
data: quad, | ||
}); | ||
const detectionStatus = quad.detectionStatus; | ||
switch (detectionStatus) { | ||
case BlinkIDSDK.DetectionStatus.Failed: | ||
eventCallback({ status: RecognitionStatus.DetectionStatusSuccess }); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.Success: | ||
eventCallback({ status: RecognitionStatus.DetectionStatusSuccess }); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.CameraTooFar: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusCameraTooHigh, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.FallbackSuccess: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusFallbackSuccess, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.DocumentPartiallyVisible: | ||
eventCallback({ status: RecognitionStatus.DetectionStatusPartial }); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.CameraAngleTooSteep: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusCameraAtAngle, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.CameraTooClose: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusCameraTooNear, | ||
}); | ||
break; | ||
case BlinkIDSDK.DetectionStatus.DocumentTooCloseToCameraEdge: | ||
eventCallback({ | ||
status: RecognitionStatus.DetectionStatusDocumentTooCloseToEdge, | ||
}); | ||
break; | ||
default: | ||
// Send nothing | ||
} | ||
this.lastDetectionStatus = quad.detectionStatus; | ||
}, | ||
}; | ||
const blinkIdMultiSide = recognizers.find((el) => el.recognizer.recognizerName === "BlinkIdMultiSideRecognizer"); | ||
if (blinkIdMultiSide) { | ||
metadataCallbacks.onFirstSideResult = () => eventCallback({ status: RecognitionStatus.OnFirstSideResult }); | ||
} | ||
const recognizerRunner = await BlinkIDSDK.createRecognizerRunner(this.sdk, recognizers.map((el) => el.recognizer), false, metadataCallbacks); | ||
@@ -637,0 +777,0 @@ return recognizerRunner; |
@@ -44,2 +44,11 @@ /** | ||
"camera-feedback-barcode": ["Scan the barcode"], | ||
// passport | ||
"camera-feedback-move-top-page": "Move to the top page", | ||
"camera-feedback-move-bottom-page": "Move to the bottom page", | ||
"camera-feedback-move-left-page": "Move to the left page", | ||
"camera-feedback-move-right-page": "Move to the right page", | ||
"camera-feedback-scan-top-page": "Scan the top page", | ||
"camera-feedback-scan-bottom-page": "Scan the bottom page", | ||
"camera-feedback-scan-left-page": "Scan the left page", | ||
"camera-feedback-scan-right-page": "Scan the right page", | ||
"drop-info": "Drop image here", | ||
@@ -77,7 +86,8 @@ "drop-error": "Whoops, we don't support that image format. Please upload a JPEG or PNG file.", | ||
i(key) { | ||
if (this.translations[key]) { | ||
if (Array.isArray(this.translations[key])) { | ||
return JSON.parse(JSON.stringify(this.translations[key])); | ||
const translation = this.translations[key]; | ||
if (translation) { | ||
if (Array.isArray(translation)) { | ||
return JSON.parse(JSON.stringify(translation)); | ||
} | ||
return this.translations[key]; | ||
return translation; | ||
} | ||
@@ -84,0 +94,0 @@ } |
@@ -12,2 +12,3 @@ /** | ||
private overlays; | ||
private gracePeriodEntered; | ||
private cameraExperience; | ||
@@ -14,0 +15,0 @@ private dragAndDropZone; |
@@ -162,2 +162,14 @@ /** | ||
GlareDetected = "GlareDetected", | ||
MovePassportLeft = "MovePassportLeft", | ||
MovePassportRight = "MovePassportRight", | ||
MovePassportUp = "MovePassportUp", | ||
MovePassportDown = "MovePassportDown", | ||
MovePassportDownError = "MovePassportDownError", | ||
MovePassportUpError = "MovePassportUpError", | ||
MovePassportRightError = "MovePassportRightError", | ||
MovePassportLeftError = "MovePassportLeftError", | ||
ScanPassportLeft = "ScanPassportLeft", | ||
ScanPassportRight = "ScanPassportRight", | ||
ScanPassportUp = "ScanPassportUp", | ||
ScanPassportDown = "ScanPassportDown", | ||
UnknownError = "UnknownError", | ||
@@ -187,3 +199,4 @@ BarcodeScanningStarted = "BarcodeScanningStarted", | ||
CardSingleSide = "CARD_SINGLE_SIDE", | ||
PaymentCard = "PAYMENT_CARD" | ||
PaymentCard = "PAYMENT_CARD", | ||
Passport = "PASSPORT" | ||
} | ||
@@ -204,3 +217,15 @@ export declare enum CameraExperienceState { | ||
GlareDetected = "GlareDetected", | ||
FacePhotoCovered = "FacePhotoCovered" | ||
FacePhotoCovered = "FacePhotoCovered", | ||
MovePassportLeft = "MovePassportLeft", | ||
MovePassportRight = "MovePassportRight", | ||
MovePassportUp = "MovePassportUp", | ||
MovePassportDown = "MovePassportDown", | ||
ScanPassportLeft = "ScanPassportLeft", | ||
ScanPassportRight = "ScanPassportRight", | ||
ScanPassportUp = "ScanPassportUp", | ||
ScanPassportDown = "ScanPassportDown", | ||
MovePassportDownError = "MovePassportDownError", | ||
MovePassportUpError = "MovePassportUpError", | ||
MovePassportRightError = "MovePassportRightError", | ||
MovePassportLeftError = "MovePassportLeftError" | ||
} | ||
@@ -207,0 +232,0 @@ export type CameraExperienceStateKey = keyof typeof CameraExperienceState; |
@@ -16,2 +16,4 @@ /** | ||
export declare function getAdditionalProcessingInfo(result: BlinkIDSDK.BlinkIDResult): import("../../../types/Recognizers/BlinkID/Generic/AdditionalProcessingInfo").AdditionalProcessingInfo; | ||
export declare function getImageAnalyisResult(result: BlinkIDSDK.BlinkIDResult): BlinkIDSDK.ImageAnalysisResult; | ||
export declare const isFirstSideDone: (result: BlinkIDSDK.BlinkIDResult) => boolean; | ||
export declare function getCameraDevices(): Promise<Array<CameraEntry>>; | ||
@@ -25,2 +27,4 @@ export declare class SdkService { | ||
showOverlay: boolean; | ||
private lastKnownCardRotation; | ||
private lastDetectionStatus; | ||
constructor(); | ||
@@ -27,0 +31,0 @@ delete(): void; |
@@ -5,13 +5,77 @@ /** | ||
export declare const defaultTranslations: { | ||
[key: string]: string | Array<string>; | ||
readonly "help-button-lobby-tooltip": "Need help?"; | ||
readonly "help-button-back": "Back"; | ||
readonly "help-button-next": "Next"; | ||
readonly "help-button-done": "Done"; | ||
readonly "help-button-start-scanning": "Start Scanning"; | ||
readonly "help-doc-valid-title": "Keep all the details visible"; | ||
readonly "help-doc-valid-description": "Make sure you keep the document well lit. All document fields should be visible on the camera screen."; | ||
readonly "help-doc-invalid-invisible-fields-title": "Keep all the details visible"; | ||
readonly "help-doc-invalid-invisible-fields-description": "Make sure you aren't covering parts of the document with a finger, including the bottom lines. Also, watch out for hologram reflections that go over the document fields."; | ||
readonly "help-doc-invalid-harsh-light-title": "Watch out for harsh light"; | ||
readonly "help-doc-invalid-harsh-light-description": "Avoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can't read data on the document, it won't be visible to the camera either."; | ||
readonly "help-doc-invalid-to-much-motion-title": "Keep still while scanning"; | ||
readonly "help-doc-invalid-to-much-motion-description": "Try to keep the phone and document still while scanning. Moving either can blur the image and make data on the document unreadable."; | ||
readonly "action-alt-camera": "Device camera"; | ||
readonly "action-alt-gallery": "From gallery"; | ||
readonly "action-message": "Scan or choose from gallery"; | ||
readonly "action-message-camera": "Device camera"; | ||
readonly "action-message-camera-disabled": "Camera disabled"; | ||
readonly "action-message-camera-not-allowed": "Camera not allowed"; | ||
readonly "action-message-camera-in-use": "Camera in use"; | ||
readonly "action-message-image": "From gallery"; | ||
readonly "action-message-image-not-supported": "Not supported"; | ||
readonly "camera-disabled": "Camera disabled"; | ||
readonly "camera-not-allowed": "Cannot access camera."; | ||
readonly "camera-in-use": "Camera is already used by another application."; | ||
readonly "camera-generic-error": "Cannot access camera."; | ||
readonly "camera-feedback-scan-front": readonly ["Scan the front side", "of a document"]; | ||
readonly "camera-feedback-scan-back": readonly ["Scan the back side", "of a document"]; | ||
readonly "camera-feedback-flip": "Flip to the back side"; | ||
readonly "camera-feedback-barcode-message": "Scan the barcode"; | ||
readonly "camera-feedback-move-farther": "Move farther"; | ||
readonly "camera-feedback-move-closer": "Move closer"; | ||
readonly "camera-feedback-adjust-angle": "Adjust the angle"; | ||
readonly "camera-feedback-blur": "Keep still"; | ||
readonly "camera-feedback-glare": "Tilt or move document to remove reflections"; | ||
readonly "camera-feedback-wrong-side": "Flip the document"; | ||
readonly "camera-feedback-face-photo-covered": "Keep face photo fully visible"; | ||
readonly "camera-feedback-barcode": readonly ["Scan the barcode"]; | ||
readonly "camera-feedback-move-top-page": "Move to the top page"; | ||
readonly "camera-feedback-move-bottom-page": "Move to the bottom page"; | ||
readonly "camera-feedback-move-left-page": "Move to the left page"; | ||
readonly "camera-feedback-move-right-page": "Move to the right page"; | ||
readonly "camera-feedback-scan-top-page": "Scan the top page"; | ||
readonly "camera-feedback-scan-bottom-page": "Scan the bottom page"; | ||
readonly "camera-feedback-scan-left-page": "Scan the left page"; | ||
readonly "camera-feedback-scan-right-page": "Scan the right page"; | ||
readonly "drop-info": "Drop image here"; | ||
readonly "drop-error": "Whoops, we don't support that image format. Please upload a JPEG or PNG file."; | ||
readonly "initialization-error": "Failed to load component. Try using another device or update your browser."; | ||
readonly "process-image-box-first": "Front side image"; | ||
readonly "process-image-box-second": "Back side image"; | ||
readonly "process-image-box-add": "Add image"; | ||
readonly "process-image-upload-cta": "Upload"; | ||
readonly "process-image-message": "Just a moment."; | ||
readonly "process-image-message-inline": "Processing"; | ||
readonly "process-image-message-inline-done": "Processing done"; | ||
readonly "process-api-message": "Just a moment"; | ||
readonly "process-api-retry": "Retry"; | ||
readonly "feedback-scan-unsuccessful-title": "Scan unsuccessful"; | ||
readonly "feedback-scan-unsuccessful": "We weren't able to recognize your document. Please try again."; | ||
readonly "feedback-error-generic": "Whoops, that didn't work. Please give it another go."; | ||
readonly "check-internet-connection": "Check internet connection."; | ||
readonly "network-error": "Network error."; | ||
readonly "scanning-not-available": "Scanning not available."; | ||
readonly "modal-window-close": "Close"; | ||
}; | ||
export type Translations = typeof defaultTranslations; | ||
export type TranslationKey = keyof Translations; | ||
export type TranslationValue = string | string[]; | ||
export type GenericTranslations = Record<TranslationKey, TranslationValue>; | ||
export declare class TranslationService { | ||
translations: { | ||
[key: string]: string | Array<string>; | ||
}; | ||
constructor(alternativeTranslations?: { | ||
[key: string]: string | Array<string>; | ||
}); | ||
i(key: string): string | Array<string>; | ||
translations: GenericTranslations; | ||
constructor(alternativeTranslations?: Partial<GenericTranslations>); | ||
i(key: TranslationKey): TranslationValue; | ||
private isExpectedValue; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 6 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
201
60734
71079580
47