idmission-web-sdk 2.5.64 → 2.5.65
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/index.d.ts +1 -1
- package/dist/props.json +1 -1
- package/dist/sdk2.cjs.development.js +86 -34
- 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 +86 -34
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +86 -34
- 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/package.json +1 -1
|
@@ -27159,6 +27159,19 @@
|
|
|
27159
27159
|
error: null
|
|
27160
27160
|
});
|
|
27161
27161
|
}
|
|
27162
|
+
// The exit button: abandon the attempt and put the instructions back up.
|
|
27163
|
+
// 'captureStarted' accepts 'loading', so the overlay's continue starts a
|
|
27164
|
+
// fresh attempt from here.
|
|
27165
|
+
case 'exitRequested':
|
|
27166
|
+
{
|
|
27167
|
+
if (state.phase === 'initializing' || state.phase === 'loading') return state;
|
|
27168
|
+
return _extends({}, state, {
|
|
27169
|
+
phase: 'loading'
|
|
27170
|
+
}, clearedSelfieVerdict(), {
|
|
27171
|
+
capturedSelfie: null,
|
|
27172
|
+
error: null
|
|
27173
|
+
});
|
|
27174
|
+
}
|
|
27162
27175
|
}
|
|
27163
27176
|
}
|
|
27164
27177
|
// The ladder's code, except that HOLD_STILL reads HAND_OVER_FACE while the
|
|
@@ -29468,6 +29481,37 @@
|
|
|
29468
29481
|
return _doAttach.apply(this, arguments);
|
|
29469
29482
|
}
|
|
29470
29483
|
var cameraReacquisition = null;
|
|
29484
|
+
// sdk2's retry and exit both remount FaceLivenessCapture with a new `key`
|
|
29485
|
+
// (FaceLivenessWizard.tsx:394-409), which throws away that component's
|
|
29486
|
+
// whole reducer -- INCLUDING timesLivenessCheckFailed -- so the user gets a
|
|
29487
|
+
// fresh set of liveness attempts. Rebuilding the machine here is that
|
|
29488
|
+
// remount's equivalent; without it a retry from the lockout screen
|
|
29489
|
+
// re-entered capture with the failure budget still spent, and the next
|
|
29490
|
+
// failed check re-locked immediately.
|
|
29491
|
+
function resetLivenessAttempt() {
|
|
29492
|
+
clearTimer('liveness:reset');
|
|
29493
|
+
clearTimer('liveness:kickout');
|
|
29494
|
+
clearTimer('liveness:kickoutGrace');
|
|
29495
|
+
// The challenge runner and its tick are NOT reducer state, so the
|
|
29496
|
+
// setState below cannot reach them -- runLivenessEffects runs only from
|
|
29497
|
+
// dispatchLiveness. Leaving CHALLENGE otherwise left the discarded runner
|
|
29498
|
+
// ticking, still able to fire onChallengeComplete for an attempt the user
|
|
29499
|
+
// had abandoned.
|
|
29500
|
+
clearTimer('challenge:tick');
|
|
29501
|
+
challengeRunner = null;
|
|
29502
|
+
challengeResultConsumed = false;
|
|
29503
|
+
// Orphan any check still in flight: its verdict would otherwise land in
|
|
29504
|
+
// the machine built below (the reducer's livenessChecked case is
|
|
29505
|
+
// unguarded), and its single-flight latch would block the fresh attempt
|
|
29506
|
+
// from checking at all until it settled.
|
|
29507
|
+
livenessGeneration += 1;
|
|
29508
|
+
livenessCheckInFlight = false;
|
|
29509
|
+
internal.setState({
|
|
29510
|
+
liveness: createInitialLivenessMachineState(),
|
|
29511
|
+
challenge: null,
|
|
29512
|
+
livenessTimedOut: false
|
|
29513
|
+
});
|
|
29514
|
+
}
|
|
29471
29515
|
// retry()'s capture re-entry, run straight away or once a released camera
|
|
29472
29516
|
// is back.
|
|
29473
29517
|
function resumeCapture() {
|
|
@@ -29801,37 +29845,7 @@
|
|
|
29801
29845
|
},
|
|
29802
29846
|
retry: function retry() {
|
|
29803
29847
|
if (!active) return;
|
|
29804
|
-
|
|
29805
|
-
// (FaceLivenessWizard.tsx:402-409), which throws away that
|
|
29806
|
-
// component's whole reducer -- INCLUDING timesLivenessCheckFailed --
|
|
29807
|
-
// so the user gets a fresh set of liveness attempts. Rebuilding the
|
|
29808
|
-
// machine here is that remount's equivalent; without it a retry from
|
|
29809
|
-
// the lockout screen re-entered capture with the failure budget still
|
|
29810
|
-
// spent, and the next failed check re-locked immediately.
|
|
29811
|
-
if (config.liveness) {
|
|
29812
|
-
clearTimer('liveness:reset');
|
|
29813
|
-
clearTimer('liveness:kickout');
|
|
29814
|
-
clearTimer('liveness:kickoutGrace');
|
|
29815
|
-
// The challenge runner and its tick are NOT reducer state, so the
|
|
29816
|
-
// setState below cannot reach them -- runLivenessEffects runs only
|
|
29817
|
-
// from dispatchLiveness. Retrying out of CHALLENGE otherwise left
|
|
29818
|
-
// the discarded runner ticking, still able to fire
|
|
29819
|
-
// onChallengeComplete for an attempt the user had abandoned.
|
|
29820
|
-
clearTimer('challenge:tick');
|
|
29821
|
-
challengeRunner = null;
|
|
29822
|
-
challengeResultConsumed = false;
|
|
29823
|
-
// Orphan any check still in flight: its verdict would otherwise land
|
|
29824
|
-
// in the machine built below (the reducer's livenessChecked case is
|
|
29825
|
-
// unguarded), and its single-flight latch would block the fresh
|
|
29826
|
-
// attempt from checking at all until it settled.
|
|
29827
|
-
livenessGeneration += 1;
|
|
29828
|
-
livenessCheckInFlight = false;
|
|
29829
|
-
internal.setState({
|
|
29830
|
-
liveness: createInitialLivenessMachineState(),
|
|
29831
|
-
challenge: null,
|
|
29832
|
-
livenessTimedOut: false
|
|
29833
|
-
});
|
|
29834
|
-
}
|
|
29848
|
+
if (config.liveness) resetLivenessAttempt();
|
|
29835
29849
|
progress.retry('capture-error');
|
|
29836
29850
|
dispatch({
|
|
29837
29851
|
type: 'retryRequested'
|
|
@@ -29848,12 +29862,43 @@
|
|
|
29848
29862
|
if (cameraReacquisition) return;
|
|
29849
29863
|
var generation = attachGeneration;
|
|
29850
29864
|
var reacquisition = requestCamera().then(function () {
|
|
29851
|
-
|
|
29865
|
+
// exitCapture() may have sent the user back to the instructions
|
|
29866
|
+
// while the camera was coming back.
|
|
29867
|
+
if (active && generation === attachGeneration && internal.getState().phase === 'capturing') resumeCapture();
|
|
29852
29868
|
})["catch"](function () {})["finally"](function () {
|
|
29853
29869
|
// detach() may have dropped this one and a newer one started.
|
|
29854
29870
|
if (cameraReacquisition === reacquisition) cameraReacquisition = null;
|
|
29855
29871
|
});
|
|
29856
29872
|
cameraReacquisition = reacquisition;
|
|
29873
|
+
},
|
|
29874
|
+
exitCapture: function exitCapture() {
|
|
29875
|
+
var _frameLoop9;
|
|
29876
|
+
if (!active) return;
|
|
29877
|
+
var _internal$getState = internal.getState(),
|
|
29878
|
+
phase = _internal$getState.phase;
|
|
29879
|
+
if (phase === 'initializing' || phase === 'loading') return;
|
|
29880
|
+
// Every armed timer belongs to the abandoned attempt.
|
|
29881
|
+
clearAllTimers();
|
|
29882
|
+
(_frameLoop9 = frameLoop) == null || _frameLoop9.stop();
|
|
29883
|
+
frameLoop = null;
|
|
29884
|
+
trackingOnly = false;
|
|
29885
|
+
initialDelayOver = false;
|
|
29886
|
+
busy = false;
|
|
29887
|
+
pendingFire = null;
|
|
29888
|
+
if (config.liveness) resetLivenessAttempt();
|
|
29889
|
+
progress.retry('user-requested');
|
|
29890
|
+
internal.setState({
|
|
29891
|
+
capturedAttempt: null,
|
|
29892
|
+
capturedImageUrl: null,
|
|
29893
|
+
captureRecovery: null
|
|
29894
|
+
});
|
|
29895
|
+
dispatch({
|
|
29896
|
+
type: 'exitRequested'
|
|
29897
|
+
});
|
|
29898
|
+
// The overlay waits on `camera.ready`, so a camera handed back by a
|
|
29899
|
+
// terminal screen has to come back for its continue to enable. A
|
|
29900
|
+
// failure lands in `error` (requestCamera's own write).
|
|
29901
|
+
if (cameraReleased && !cameraReacquisition) void requestCamera()["catch"](function () {});
|
|
29857
29902
|
}
|
|
29858
29903
|
}
|
|
29859
29904
|
}, progressBinding);
|
|
@@ -31600,6 +31645,13 @@
|
|
|
31600
31645
|
void controller.actions.start();
|
|
31601
31646
|
onLoadingOverlayDismissed == null || onLoadingOverlayDismissed();
|
|
31602
31647
|
}, [controller, onLoadingOverlayDismissed]);
|
|
31648
|
+
// Back to the instructions BEFORE telling the host, as sdk2 did
|
|
31649
|
+
// (FaceLivenessWizard.tsx:394): handing `onExit` to the button raw left the
|
|
31650
|
+
// capture running behind a host that expected the loading screen.
|
|
31651
|
+
var handleExit = React.useCallback(function () {
|
|
31652
|
+
controller.actions.exitCapture();
|
|
31653
|
+
onExit == null || onExit();
|
|
31654
|
+
}, [controller, onExit]);
|
|
31603
31655
|
// plan-3 ruling: camera-acquisition errors recover via requestCamera()
|
|
31604
31656
|
// (retry() explicitly excludes them, controller.ts), everything else via
|
|
31605
31657
|
// retry(). Applies unconditionally across every loadingOverlayMode.
|
|
@@ -31698,7 +31750,7 @@
|
|
|
31698
31750
|
children: [jsx("br", {}), state.handOverFace.lastCheck ? state.handOverFace.lastCheck.handOverFace ? '❌' : '✅' : '➖', ' ', "Hand Off Face (", state.handOverFace.status, state.handOverFace.lastCheck && ", last check " + state.handOverFace.lastCheck.coverage.toFixed(2) + " covered in " + Math.round(state.handOverFace.lastCheck.inferenceMs) + " ms", ")"]
|
|
31699
31751
|
})]
|
|
31700
31752
|
}), onExit != null && jsx(ExitCaptureButton, {
|
|
31701
|
-
onClick:
|
|
31753
|
+
onClick: handleExit,
|
|
31702
31754
|
className: classNames.exitBtn
|
|
31703
31755
|
}), showLoadingOverlay && jsx(SelfieCaptureLoadingOverlay, {
|
|
31704
31756
|
state: loadingOverlayState,
|
|
@@ -53701,7 +53753,7 @@
|
|
|
53701
53753
|
});
|
|
53702
53754
|
}
|
|
53703
53755
|
|
|
53704
|
-
var webSdkVersion = '2.5.
|
|
53756
|
+
var webSdkVersion = '2.5.65';
|
|
53705
53757
|
|
|
53706
53758
|
var MAPPED = 'mapped';
|
|
53707
53759
|
var NOOP = 'dropped-noop';
|