idmission-web-sdk 2.1.99 → 2.1.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk2.cjs.development.js +13 -9
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +13 -9
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +13 -9
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.1.
|
|
237
|
+
var webSdkVersion = '2.1.100';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -6553,15 +6553,19 @@ var _reducer = function reducer(state, action) {
|
|
|
6553
6553
|
}
|
|
6554
6554
|
}
|
|
6555
6555
|
}
|
|
6556
|
-
var idCardDetectedButNotAllowed =
|
|
6557
|
-
var
|
|
6558
|
-
var
|
|
6559
|
-
var
|
|
6556
|
+
var idCardDetectedButNotAllowed = detectedDocumentType.includes('idCard') && !state.captureRequirement.includes('idCard');
|
|
6557
|
+
var passportNotAllowed = !state.captureRequirement.toLowerCase().includes('passport');
|
|
6558
|
+
var idCardFrontWasCaptured = 'idCardFront' in state.capturedDocuments;
|
|
6559
|
+
var idCardBackWasCaptured = 'idCardBack' in state.capturedDocuments;
|
|
6560
|
+
var idCardBeingCaptured = idCardFrontWasCaptured && !idCardBackWasCaptured || !idCardFrontWasCaptured && idCardBackWasCaptured;
|
|
6561
|
+
var passportDetectedButNotAllowed = detectedDocumentType === 'passport' && (passportNotAllowed || idCardBeingCaptured);
|
|
6562
|
+
var flipRequired = !state.overrideWrongDocumentTypeGuidance && (state.allowIdCardBackToFrontCapture ? idCardFrontWasCaptured && detectedDocumentType === 'idCardFront' : state.requestedDocumentType === 'idCardBack' && detectedDocumentType === 'idCardFront');
|
|
6563
|
+
var backDetectedFirst = !state.overrideWrongDocumentTypeGuidance && (state.allowIdCardBackToFrontCapture ? idCardBackWasCaptured && detectedDocumentType === 'idCardBack' : state.requestedDocumentType === 'idCardFront' && detectedDocumentType === 'idCardBack');
|
|
6560
6564
|
var wrongDocumentTypePredictions = state.wrongDocumentTypePredictions;
|
|
6561
6565
|
if (state.captureState === 'capturing' && (flipRequired || backDetectedFirst)) {
|
|
6562
6566
|
wrongDocumentTypePredictions += 1;
|
|
6563
6567
|
}
|
|
6564
|
-
var isGoodFrame = detectionThresholdMet && documentInBounds && !documentTooClose && !flipRequired && !backDetectedFirst && focusThresholdMet && documentIsStable;
|
|
6568
|
+
var isGoodFrame = detectionThresholdMet && documentInBounds && !documentTooClose && !flipRequired && !backDetectedFirst && focusThresholdMet && !idCardDetectedButNotAllowed && !passportDetectedButNotAllowed && documentIsStable;
|
|
6565
6569
|
var goodFramesCount = state.goodFramesCount;
|
|
6566
6570
|
if (isGoodFrame) {
|
|
6567
6571
|
goodFramesCount += 1;
|
|
@@ -6569,9 +6573,9 @@ var _reducer = function reducer(state, action) {
|
|
|
6569
6573
|
var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
|
|
6570
6574
|
var requestedDocumentType = state.requestedDocumentType;
|
|
6571
6575
|
if (state.captureRequirement.includes('idCard') && state.allowIdCardBackToFrontCapture) {
|
|
6572
|
-
if (detectedDocumentType === 'idCardFront' && state.requestedDocumentType !== 'idCardFront' && !
|
|
6576
|
+
if (detectedDocumentType === 'idCardFront' && state.requestedDocumentType !== 'idCardFront' && !idCardFrontWasCaptured) {
|
|
6573
6577
|
requestedDocumentType = 'idCardFront';
|
|
6574
|
-
} else if (detectedDocumentType === 'idCardBack' && state.requestedDocumentType !== 'idCardBack' && !
|
|
6578
|
+
} else if (detectedDocumentType === 'idCardBack' && state.requestedDocumentType !== 'idCardBack' && !idCardBackWasCaptured) {
|
|
6575
6579
|
requestedDocumentType = 'idCardBack';
|
|
6576
6580
|
}
|
|
6577
6581
|
}
|
|
@@ -6580,7 +6584,7 @@ var _reducer = function reducer(state, action) {
|
|
|
6580
6584
|
requestedDocumentType = 'passport';
|
|
6581
6585
|
}
|
|
6582
6586
|
if (requestedDocumentType === 'passport' && passportDetectionScore < 0.3) {
|
|
6583
|
-
requestedDocumentType =
|
|
6587
|
+
requestedDocumentType = idCardFrontWasCaptured ? 'idCardBack' : 'idCardFront';
|
|
6584
6588
|
}
|
|
6585
6589
|
}
|
|
6586
6590
|
var hasBeenRunningForLongEnough = !!state.captureStartedAt && new Date().getTime() - state.captureStartedAt.getTime() > 1000;
|