idmission-web-sdk 2.2.164 → 2.2.166

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 (42) hide show
  1. package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +1 -0
  2. package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
  3. package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
  4. package/dist/components/id_capture/IdCaptureLoadingOverlayLegacy.d.ts.map +1 -1
  5. package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +1 -0
  6. package/dist/components/id_capture/IdCaptureModelsProvider.d.ts.map +1 -1
  7. package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +1 -0
  8. package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts.map +1 -1
  9. package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
  10. package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayLegacy.d.ts.map +1 -1
  11. package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +1 -0
  12. package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts.map +1 -1
  13. package/dist/contexts/AuthStateContext.d.ts.map +1 -1
  14. package/dist/lib/locales/de.d.ts +3 -1
  15. package/dist/lib/locales/de.d.ts.map +1 -1
  16. package/dist/lib/locales/es.d.ts +1 -1
  17. package/dist/lib/locales/fr.d.ts +3 -1
  18. package/dist/lib/locales/fr.d.ts.map +1 -1
  19. package/dist/lib/locales/index.d.ts +21 -7
  20. package/dist/lib/locales/index.d.ts.map +1 -1
  21. package/dist/lib/locales/it.d.ts +3 -1
  22. package/dist/lib/locales/it.d.ts.map +1 -1
  23. package/dist/lib/locales/ja.d.ts +3 -1
  24. package/dist/lib/locales/ja.d.ts.map +1 -1
  25. package/dist/lib/locales/pt.d.ts +3 -1
  26. package/dist/lib/locales/pt.d.ts.map +1 -1
  27. package/dist/lib/locales/ru.d.ts +2 -0
  28. package/dist/lib/locales/ru.d.ts.map +1 -1
  29. package/dist/lib/locales/zh.d.ts +3 -1
  30. package/dist/lib/locales/zh.d.ts.map +1 -1
  31. package/dist/sdk2.cjs.development.js +379 -285
  32. package/dist/sdk2.cjs.development.js.map +1 -1
  33. package/dist/sdk2.cjs.production.js +1 -1
  34. package/dist/sdk2.cjs.production.js.map +1 -1
  35. package/dist/sdk2.esm.js +379 -286
  36. package/dist/sdk2.esm.js.map +1 -1
  37. package/dist/sdk2.umd.development.js +397 -290
  38. package/dist/sdk2.umd.development.js.map +1 -1
  39. package/dist/sdk2.umd.production.js +1 -1
  40. package/dist/sdk2.umd.production.js.map +1 -1
  41. package/dist/version.d.ts +1 -1
  42. package/package.json +2 -1
package/dist/sdk2.esm.js CHANGED
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { forwardRef, useState, useEffect, useRef, useContext, createContext, useReducer, useCallback, useMemo, useLayoutEffect } from 'react';
3
3
  import * as ReactDOM from 'react-dom/client';
4
4
  import platform from 'platform';
5
- import styled, { keyframes, useTheme, ThemeProvider as ThemeProvider$1 } from 'styled-components';
5
+ import styled, { useTheme, keyframes, ThemeProvider as ThemeProvider$1 } from 'styled-components';
6
6
  import { useTranslation, initReactI18next } from 'react-i18next';
7
7
  import { Upload } from 'tus-js-client';
8
8
  import SparkMD5 from 'spark-md5';
@@ -14,6 +14,7 @@ import { useDebouncedCallback, useThrottledCallback } from 'use-debounce';
14
14
  import { devtools } from 'zustand/middleware';
15
15
  import { useShallow } from 'zustand/react/shallow';
16
16
  import { createPortal } from 'react-dom';
17
+ import cn from 'clsx';
17
18
  import SignatureCanvas from 'react-signature-canvas';
18
19
 
19
20
  /******************************************************************************
@@ -203,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
203
204
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
204
205
  };
205
206
 
206
- var webSdkVersion = '2.2.164';
207
+ var webSdkVersion = '2.2.166';
207
208
 
208
209
  function getPlatform() {
209
210
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -740,38 +741,60 @@ var SessionValidationErrorOverlay = function SessionValidationErrorOverlay(_a) {
740
741
  }, retryText)))));
741
742
  };
742
743
 
743
- var wavesAnimation = keyframes(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"], ["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"])));
744
- var progressBarAnimation = keyframes(templateObject_2$B || (templateObject_2$B = __makeTemplateObject(["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"], ["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"])));
745
- var dualRingSpinnerAnimation = keyframes(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
746
- var progressBorderAnimation = keyframes(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["\n to {\n stroke-dashoffset: 0;\n }\n"], ["\n to {\n stroke-dashoffset: 0;\n }\n"])));
747
- var templateObject_1$K, templateObject_2$B, templateObject_3$r, templateObject_4$l;
748
-
749
- var Spinner = styled.div(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: ", " 1.2s linear infinite;\n box-sizing: content-box;\n }\n"], ["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: ", " 1.2s linear infinite;\n box-sizing: content-box;\n }\n"])), function (_a) {
750
- var $size = _a.$size;
751
- return $size !== null && $size !== void 0 ? $size : 80;
752
- }, function (_a) {
753
- var $size = _a.$size;
754
- return $size !== null && $size !== void 0 ? $size : 80;
755
- }, function (_a) {
756
- var $size = _a.$size;
757
- return ($size !== null && $size !== void 0 ? $size : 80) - 16;
758
- }, function (_a) {
759
- var $size = _a.$size;
760
- return ($size !== null && $size !== void 0 ? $size : 80) - 16;
761
- }, function (_a) {
762
- var $thickness = _a.$thickness;
763
- return $thickness !== null && $thickness !== void 0 ? $thickness : 6;
764
- }, function (_a) {
765
- var $color = _a.$color;
766
- return $color !== null && $color !== void 0 ? $color : '#888';
767
- }, function (_a) {
768
- var $color = _a.$color;
769
- return $color !== null && $color !== void 0 ? $color : '#888';
770
- }, function (_a) {
771
- var $color = _a.$color;
772
- return $color !== null && $color !== void 0 ? $color : '#888';
773
- }, dualRingSpinnerAnimation);
774
- var templateObject_1$J;
744
+ var LogLevel;
745
+ (function (LogLevel) {
746
+ LogLevel[LogLevel["Off"] = 0] = "Off";
747
+ LogLevel[LogLevel["Error"] = 1] = "Error";
748
+ LogLevel[LogLevel["Warn"] = 2] = "Warn";
749
+ LogLevel[LogLevel["Info"] = 3] = "Info";
750
+ LogLevel[LogLevel["Debug"] = 4] = "Debug";
751
+ })(LogLevel || (LogLevel = {}));
752
+ var logLevel = LogLevel.Warn;
753
+ function useLogLevel(newLogLevel) {
754
+ useEffect(function () {
755
+ var oldLogLevel = logLevel;
756
+ if (newLogLevel === oldLogLevel) return;
757
+ logLevel = newLogLevel;
758
+ return function () {
759
+ logLevel = oldLogLevel;
760
+ };
761
+ }, [newLogLevel]);
762
+ }
763
+ function useDebugLogging(enabled) {
764
+ useLogLevel(enabled ? LogLevel.Debug : logLevel);
765
+ }
766
+ function debug() {
767
+ var parts = [];
768
+ for (var _i = 0; _i < arguments.length; _i++) {
769
+ parts[_i] = arguments[_i];
770
+ }
771
+ if (logLevel < LogLevel.Debug) return;
772
+ console.debug.apply(console, parts); // eslint-disable-line no-console
773
+ }
774
+ function log() {
775
+ var parts = [];
776
+ for (var _i = 0; _i < arguments.length; _i++) {
777
+ parts[_i] = arguments[_i];
778
+ }
779
+ if (logLevel < LogLevel.Info) return;
780
+ console.log.apply(console, parts); // eslint-disable-line no-console
781
+ }
782
+ function warn() {
783
+ var parts = [];
784
+ for (var _i = 0; _i < arguments.length; _i++) {
785
+ parts[_i] = arguments[_i];
786
+ }
787
+ if (logLevel < LogLevel.Warn) return;
788
+ console.warn.apply(console, parts); // eslint-disable-line no-console
789
+ }
790
+ function error() {
791
+ var parts = [];
792
+ for (var _i = 0; _i < arguments.length; _i++) {
793
+ parts[_i] = arguments[_i];
794
+ }
795
+ if (logLevel < LogLevel.Error) return;
796
+ console.error.apply(console, parts); // eslint-disable-line no-console
797
+ }
775
798
 
776
799
  var defaultAuthUrl = 'https://portal-api.idmission.com';
777
800
  var allowedAuthUrls = ['https://portal-api.idmission.com', 'https://portal-api-uat.idmission.com', 'https://portal-api-demo.idmission.com', 'https://portal-api-dev.idmission.com', 'http://localhost:10000'];
@@ -810,8 +833,95 @@ var reducer$4 = function reducer(state, action) {
810
833
  return state;
811
834
  }
812
835
  };
836
+ function makeValidateSessionRequest(authUrl_1, sessionId_1) {
837
+ return __awaiter(this, arguments, void 0, function (authUrl, sessionId, retryCount) {
838
+ var maxRetries, baseDelay, response, delay_1, error_1, delay_2;
839
+ if (retryCount === void 0) {
840
+ retryCount = 0;
841
+ }
842
+ return __generator(this, function (_a) {
843
+ switch (_a.label) {
844
+ case 0:
845
+ maxRetries = 10;
846
+ baseDelay = 1000 // 1 second
847
+ ;
848
+ _a.label = 1;
849
+ case 1:
850
+ _a.trys.push([1, 4,, 6]);
851
+ return [4 /*yield*/, fetch("".concat(authUrl, "/portal.sessions.v1.SessionsService/ValidateSession"), {
852
+ method: 'POST',
853
+ headers: {
854
+ 'Content-Type': 'application/json'
855
+ },
856
+ body: JSON.stringify({
857
+ id: sessionId
858
+ })
859
+ })
860
+ // If the request was successful or we've hit max retries, return the response
861
+ ];
862
+ case 2:
863
+ response = _a.sent();
864
+ // If the request was successful or we've hit max retries, return the response
865
+ if (response.ok || retryCount >= maxRetries) {
866
+ return [2 /*return*/, response];
867
+ }
868
+ delay_1 = baseDelay * Math.pow(2, retryCount) // Exponential backoff
869
+ ;
870
+ return [4 /*yield*/, new Promise(function (resolve) {
871
+ return setTimeout(resolve, delay_1);
872
+ })];
873
+ case 3:
874
+ _a.sent();
875
+ return [2 /*return*/, makeValidateSessionRequest(authUrl, sessionId, retryCount + 1)];
876
+ case 4:
877
+ error_1 = _a.sent();
878
+ // If we've hit max retries, throw the error
879
+ if (retryCount >= maxRetries) {
880
+ throw error_1;
881
+ }
882
+ delay_2 = baseDelay * Math.pow(2, retryCount);
883
+ return [4 /*yield*/, new Promise(function (resolve) {
884
+ return setTimeout(resolve, delay_2);
885
+ })];
886
+ case 5:
887
+ _a.sent();
888
+ return [2 /*return*/, makeValidateSessionRequest(authUrl, sessionId, retryCount + 1)];
889
+ case 6:
890
+ return [2 /*return*/];
891
+ }
892
+ });
893
+ });
894
+ }
895
+ function validateSession(authUrl, sessionId) {
896
+ return __awaiter(this, void 0, void 0, function () {
897
+ var resp, respText, message, valid, respJson;
898
+ return __generator(this, function (_a) {
899
+ switch (_a.label) {
900
+ case 0:
901
+ return [4 /*yield*/, makeValidateSessionRequest(authUrl, sessionId)];
902
+ case 1:
903
+ resp = _a.sent();
904
+ return [4 /*yield*/, resp.text()];
905
+ case 2:
906
+ respText = _a.sent();
907
+ message = respText;
908
+ valid = false;
909
+ try {
910
+ respJson = JSON.parse(respText);
911
+ message = respJson.message;
912
+ valid = respJson.valid;
913
+ } catch (e) {
914
+ warn('Failed to parse session validation response', e);
915
+ }
916
+ if (!resp.ok) {
917
+ throw new SessionValidationFailedError(new Error(message), authUrl);
918
+ }
919
+ return [2 /*return*/, valid];
920
+ }
921
+ });
922
+ });
923
+ }
813
924
  function useAuthReducer(authUrl, sessionId) {
814
- var _this = this;
815
925
  if (authUrl === void 0) {
816
926
  authUrl = defaultAuthUrl;
817
927
  }
@@ -857,51 +967,17 @@ function useAuthReducer(authUrl, sessionId) {
857
967
  type: 'setCheckState',
858
968
  payload: 'RUNNING'
859
969
  });
860
- (function () {
861
- return __awaiter(_this, void 0, void 0, function () {
862
- var resp, _a, valid, message, e_1;
863
- return __generator(this, function (_b) {
864
- switch (_b.label) {
865
- case 0:
866
- _b.trys.push([0, 3,, 4]);
867
- return [4 /*yield*/, fetch("".concat(authUrl, "/portal.sessions.v1.SessionsService/ValidateSession"), {
868
- method: 'POST',
869
- headers: {
870
- 'Content-Type': 'application/json'
871
- },
872
- body: JSON.stringify({
873
- id: resolvedSessionId
874
- })
875
- })];
876
- case 1:
877
- resp = _b.sent();
878
- return [4 /*yield*/, resp.json()];
879
- case 2:
880
- _a = _b.sent(), valid = _a.valid, message = _a.message;
881
- if (!resp.ok) {
882
- dispatch({
883
- type: 'setError',
884
- payload: new SessionValidationFailedError(new Error(message), authUrl)
885
- });
886
- }
887
- dispatch({
888
- type: 'setCheckState',
889
- payload: valid ? 'PASSED' : 'FAILED'
890
- });
891
- return [3 /*break*/, 4];
892
- case 3:
893
- e_1 = _b.sent();
894
- dispatch({
895
- type: 'setError',
896
- payload: new SessionValidationFailedError(e_1, authUrl)
897
- });
898
- return [3 /*break*/, 4];
899
- case 4:
900
- return [2 /*return*/];
901
- }
902
- });
970
+ validateSession(authUrl, resolvedSessionId).then(function (valid) {
971
+ dispatch({
972
+ type: 'setCheckState',
973
+ payload: valid ? 'PASSED' : 'FAILED'
974
+ });
975
+ })["catch"](function (e) {
976
+ dispatch({
977
+ type: 'setError',
978
+ payload: new SessionValidationFailedError(e, authUrl)
903
979
  });
904
- })();
980
+ });
905
981
  }
906
982
  }, [authUrl, sessionCheckState, resolvedSessionId, sessionId]);
907
983
  return [state, dispatch];
@@ -942,9 +1018,6 @@ function AuthProvider(_a) {
942
1018
  }
943
1019
  });
944
1020
  }
945
- if (state.sessionCheckState === 'READY' || state.sessionCheckState === 'RUNNING') return /*#__PURE__*/React__default.createElement(PageContainer, {
946
- className: "flex"
947
- }, /*#__PURE__*/React__default.createElement(Spinner, null));
948
1021
  return /*#__PURE__*/React__default.createElement(AuthStateContext.Provider, {
949
1022
  value: state
950
1023
  }, /*#__PURE__*/React__default.createElement(AuthDispatchContext.Provider, {
@@ -952,61 +1025,6 @@ function AuthProvider(_a) {
952
1025
  }, children));
953
1026
  }
954
1027
 
955
- var LogLevel;
956
- (function (LogLevel) {
957
- LogLevel[LogLevel["Off"] = 0] = "Off";
958
- LogLevel[LogLevel["Error"] = 1] = "Error";
959
- LogLevel[LogLevel["Warn"] = 2] = "Warn";
960
- LogLevel[LogLevel["Info"] = 3] = "Info";
961
- LogLevel[LogLevel["Debug"] = 4] = "Debug";
962
- })(LogLevel || (LogLevel = {}));
963
- var logLevel = LogLevel.Warn;
964
- function useLogLevel(newLogLevel) {
965
- useEffect(function () {
966
- var oldLogLevel = logLevel;
967
- if (newLogLevel === oldLogLevel) return;
968
- logLevel = newLogLevel;
969
- return function () {
970
- logLevel = oldLogLevel;
971
- };
972
- }, [newLogLevel]);
973
- }
974
- function useDebugLogging(enabled) {
975
- useLogLevel(enabled ? LogLevel.Debug : logLevel);
976
- }
977
- function debug() {
978
- var parts = [];
979
- for (var _i = 0; _i < arguments.length; _i++) {
980
- parts[_i] = arguments[_i];
981
- }
982
- if (logLevel < LogLevel.Debug) return;
983
- console.debug.apply(console, parts); // eslint-disable-line no-console
984
- }
985
- function log() {
986
- var parts = [];
987
- for (var _i = 0; _i < arguments.length; _i++) {
988
- parts[_i] = arguments[_i];
989
- }
990
- if (logLevel < LogLevel.Info) return;
991
- console.log.apply(console, parts); // eslint-disable-line no-console
992
- }
993
- function warn() {
994
- var parts = [];
995
- for (var _i = 0; _i < arguments.length; _i++) {
996
- parts[_i] = arguments[_i];
997
- }
998
- if (logLevel < LogLevel.Warn) return;
999
- console.warn.apply(console, parts); // eslint-disable-line no-console
1000
- }
1001
- function error() {
1002
- var parts = [];
1003
- for (var _i = 0; _i < arguments.length; _i++) {
1004
- parts[_i] = arguments[_i];
1005
- }
1006
- if (logLevel < LogLevel.Error) return;
1007
- console.error.apply(console, parts); // eslint-disable-line no-console
1008
- }
1009
-
1010
1028
  var defaultSubmissionUrl = 'https://portal-api.idmission.com/swagger';
1011
1029
  function setDefaultSubmissionUrl(url) {
1012
1030
  defaultSubmissionUrl = url;
@@ -2061,7 +2079,7 @@ function getFrameDimensions(frame) {
2061
2079
  return [frameWidth, frameHeight];
2062
2080
  }
2063
2081
 
2064
- var InvisibleCanvas = styled.canvas(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
2082
+ var InvisibleCanvas = styled.canvas(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
2065
2083
  function drawToCanvas(canvas, frame, width, height) {
2066
2084
  if (!canvas) return;
2067
2085
  var ctx = canvas.getContext('2d');
@@ -2081,7 +2099,7 @@ function clearCanvas(canvas) {
2081
2099
  var _a;
2082
2100
  (_a = canvas === null || canvas === void 0 ? void 0 : canvas.getContext('2d')) === null || _a === void 0 ? void 0 : _a.clearRect(0, 0, canvas === null || canvas === void 0 ? void 0 : canvas.width, canvas === null || canvas === void 0 ? void 0 : canvas.height);
2083
2101
  }
2084
- var templateObject_1$I;
2102
+ var templateObject_1$K;
2085
2103
 
2086
2104
  function cropToShoulders(rawCanvas, cropCanvas, resizeCanvas, frame, face, quality, maxHeight) {
2087
2105
  if (quality === void 0) {
@@ -3533,7 +3551,7 @@ var es = {
3533
3551
  'Document is not centered': 'Documento no centrado',
3534
3552
  'Document too close please back up': 'Documento muy cerca, favor de alejarse',
3535
3553
  'Please hold your ID document steady': 'Por favor, hay que mantener firme su identificación',
3536
- 'Document out of focus try improving the lighting': 'Documento no enfocado, hay que tratar de mejorar la iluminación',
3554
+ 'Document out of focus - try improving the lighting': 'Documento no enfocado, hay que tratar de mejorar la iluminación',
3537
3555
  'ID card front detected - please flip your ID card': 'Frente de la ID detectado, por favor hay que voltearla',
3538
3556
  'ID card back detected - please flip your ID card': 'Reverso de la ID detectado, por favor hay que voltearla',
3539
3557
  'ID card detected please scan a passport instead': 'Se ha detectado una credencial, por favor hay que escanear un pasaporte',
@@ -3660,7 +3678,7 @@ var de = {
3660
3678
  'Document is not centered': 'Dokument ist nicht zentriert',
3661
3679
  'Document too close please back up': 'Dokument ist zu nah, bitte Abstand vergrößern',
3662
3680
  'Please hold your ID document steady': 'Ihr Ausweisdokument ruhig halten',
3663
- 'Document out of focus try improving the lighting': 'Dokument unscharf versuchen Sie, die Beleuchtung zu verbessern',
3681
+ 'Document out of focus - try improving the lighting': 'Dokument unscharf - versuchen Sie, die Beleuchtung zu verbessern',
3664
3682
  'ID card front detected - please flip your ID card': 'Vorderseite des Ausweises erkannt - bitte Ihren Ausweis umdrehen',
3665
3683
  'ID card back detected - please flip your ID card': 'Rückseite des Ausweises erkannt - bitte Ihren Ausweis umdrehen',
3666
3684
  'ID card detected please scan a passport instead': 'Ausweis erkannt, bitte stattdessen einen Pass scannen',
@@ -3743,7 +3761,7 @@ var de = {
3743
3761
  'Camera ready': 'Kamera bereit',
3744
3762
  'Loading guided capture experience...': 'Geführte Erfassung wird geladen...',
3745
3763
  'Guided capture experience ready': 'Geführte Erfassung bereit',
3746
- "Let's Go!": 'Los gehts!',
3764
+ "Let's Go!": "Los geht's!",
3747
3765
  'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': 'Wir haben Probleme, die richtige Seite Ihres Ausweises zu erkennen. Möchten Sie dennoch mit der Erfassung fortfahren?',
3748
3766
  OK: 'OK',
3749
3767
  'Capture with Camera': 'Mit der Kamera aufnehmen',
@@ -3755,7 +3773,9 @@ var de = {
3755
3773
  'Upload ID Front': 'Vorderseite der ID hochladen',
3756
3774
  'Upload ID Back': 'Rückseite der ID hochladen',
3757
3775
  Cancel: 'Abbrechen',
3758
- 'Upload the back of the ID if it is not included in the front image.': 'Laden Sie die Rückseite des Ausweises hoch, wenn diese nicht im Bild der Vorderseite enthalten ist.\r\n'
3776
+ 'Upload the back of the ID if it is not included in the front image.': 'Laden Sie die Rückseite des Ausweises hoch, wenn diese nicht im Bild der Vorderseite enthalten ist.',
3777
+ 'Camera tampering detected': 'Kamera manipuliert',
3778
+ "We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": 'Leider scheint die Kamera manipuliert zu werden. Bitte prüfen Sie Ihr Gerät und laden Sie die Seite neu.'
3759
3779
  };
3760
3780
 
3761
3781
  var fr = {
@@ -3785,7 +3805,7 @@ var fr = {
3785
3805
  'Document is not centered': "Le document n'est pas centré",
3786
3806
  'Document too close please back up': 'Document trop proche, veuillez sauvegarder',
3787
3807
  'Please hold your ID document steady': "Veuillez maintenir fermement votre pièce d'identité",
3788
- 'Document out of focus try improving the lighting': 'Document flou essayez daméliorer l’éclairage',
3808
+ 'Document out of focus - try improving the lighting': "Document flou - essayez d'améliorer l'éclairage",
3789
3809
  'ID card front detected - please flip your ID card': "Recto de la carte d'identité détecté - veuillez retourner votre carte d'identité",
3790
3810
  'ID card back detected - please flip your ID card': "Verso de la carte d'identité détectée - veuillez retourner votre carte d'identité",
3791
3811
  'ID card detected please scan a passport instead': "Carte d'identité détectée, veuillez scanner plutôt un passeport",
@@ -3800,7 +3820,7 @@ var fr = {
3800
3820
  'ID card front captured.': "Recto de la carte d'identité capturé.",
3801
3821
  'ID card back captured.': "Verso de la carte d'identité capturé.",
3802
3822
  'ID Capture Successful': "Capture d'identité réussie",
3803
- 'Verify the entire ID was captured clearly with no glare.': "Vérifiez que l'intégralité de la pièce didentité a été capturée clairement, sans reflet.",
3823
+ 'Verify the entire ID was captured clearly with no glare.': "Vérifiez que l'intégralité de la pièce d'identité a été capturée clairement, sans reflet.",
3804
3824
  Submit: 'Soumettre',
3805
3825
  'Submitting...': 'Soumission en cours...',
3806
3826
  'Use your device camera to capture your face': 'Utilisez la caméra de votre appareil pour capturer votre visage',
@@ -3844,20 +3864,20 @@ var fr = {
3844
3864
  'Display the back of your ID card...': "Affichez le verso de votre carte d'identité...",
3845
3865
  'Display the ID page of your passport...': "Montrez la page d'identité de votre passeport...",
3846
3866
  'Please move your face to the center...': 'Veuillez déplacer votre visage vers le centre...',
3847
- 'Searching for ID card...': "Recherche dune carte d'identité...",
3867
+ 'Searching for ID card...': "Recherche d'une carte d'identité...",
3848
3868
  'Please read the following text aloud': 'Veuillez lire le texte suivant à voix haute',
3849
- 'Video ID has been successfully captured!': 'L’ID vidéo a été capturé avec succès!',
3850
- 'ID Front Image': 'Image recto de la pièce didentité',
3851
- 'ID Back Image': 'Image verso de la pièce didentité',
3869
+ 'Video ID has been successfully captured!': "L'ID vidéo a été capturé avec succès!",
3870
+ 'ID Front Image': "Image recto de la pièce d'identité",
3871
+ 'ID Back Image': "Image verso de la pièce d'identité",
3852
3872
  "We're having some trouble.": 'Nous rencontrons quelques problèmes.',
3853
3873
  'On-device capture guidance failed please capture a selfie manually.': "Le guidage de capture sur l'appareil a échoué, veuillez capturer un selfie manuellement.",
3854
3874
  'Verifying...': 'Vérification en cours...',
3855
3875
  'Please capture the front of your ID card.': "Veuillez capturer le recto de votre carte d'identité.",
3856
3876
  'Please capture the back of your ID card.': "Veuillez capturer le verso de votre carte d'identité.",
3857
- 'Please capture the front of your ID card, or the ID page of your passport.': 'Veuillez capturer le recto de votre carte didentité ou la page didentité de votre passeport.',
3858
- 'Please capture the back of your ID card, or click Done if submitting a passport.': 'Veuillez capturer le verso de votre carte didentité ou cliquer sur Terminé si vous soumettez un passeport.',
3877
+ 'Please capture the front of your ID card, or the ID page of your passport.': "Veuillez capturer le recto de votre carte d'identité ou la page d'identité de votre passeport.",
3878
+ 'Please capture the back of your ID card, or click Done if submitting a passport.': "Veuillez capturer le verso de votre carte d'identité ou cliquer sur Terminé si vous soumettez un passeport.",
3859
3879
  'Please capture the ID page of your passport.': "Veuillez capturer la page d'identité de votre passeport.",
3860
- 'On-device capture guidance failed please capture a photo of your ID card manually.': "Le guidage de capture sur l'appareil a échoué, veuillez capturer une photo de votre pièce didentité manuellement.",
3880
+ 'On-device capture guidance failed please capture a photo of your ID card manually.': "Le guidage de capture sur l'appareil a échoué, veuillez capturer une photo de votre pièce d'identité manuellement.",
3861
3881
  'On-device capture guidance failed please capture a photo of your passport manually.': "Le guidage de capture sur l'appareil a échoué, veuillez capturer une photo de votre passeport manuellement.",
3862
3882
  'On-device capture guidance failed please capture photos of your ID card and passport manually.': "Le guidage de capture sur l'appareil a échoué, veuillez capturer manuellement des photos de votre carte d'identité et de votre passeport.",
3863
3883
  'On-device capture guidance failed please capture photos of your ID card or passport manually.': "Le guidage de capture sur l'appareil a échoué, veuillez capturer manuellement des photos de votre carte d'identité ou de votre passeport.",
@@ -3880,7 +3900,9 @@ var fr = {
3880
3900
  'Upload ID Front': "Télécharger le recto de la pièce d'identité",
3881
3901
  'Upload ID Back': "Télécharger le verso de la pièce d'identité",
3882
3902
  Cancel: 'Annuler',
3883
- 'Upload the back of the ID if it is not included in the front image.': "Téléchargez le verso de la pièce d'identité si ce n'est pas inclus dans l'image du recto."
3903
+ 'Upload the back of the ID if it is not included in the front image.': "Téléchargez le verso de la pièce d'identité si ce n'est pas inclus dans l'image du recto.",
3904
+ 'Camera tampering detected': 'Manipulation de la caméra détectée',
3905
+ "We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": 'Nous sommes désolés, mais il semble que la caméra soit manipulée. Veuillez vérifier votre appareil et réessayer en rechargeant la page.'
3884
3906
  };
3885
3907
 
3886
3908
  var it = {
@@ -3903,27 +3925,27 @@ var it = {
3903
3925
  'Scan the front of ID': 'Scansiona il fronte del documento',
3904
3926
  'Scan the back of ID': 'Scansiona il retro del documento',
3905
3927
  'Scan the ID page of passport': 'Scansione la pagina identificativa del passaporto',
3906
- 'ID Card Front': 'Fronte documento didentità',
3907
- 'ID Card Back': 'Retro documento didentità',
3928
+ 'ID Card Front': "Fronte documento d'identità",
3929
+ 'ID Card Back': "Retro documento d'identità",
3908
3930
  Passport: 'Passaporto',
3909
3931
  'Document not detected': 'Documento non rilevato',
3910
3932
  'Document is not centered': 'Documento non centrato',
3911
3933
  'Document too close please back up': 'Documento troppo vicino, allontanarlo',
3912
- 'Please hold your ID document steady': 'Tenere il documento didentità fermo',
3913
- 'Document out of focus try improving the lighting': 'Documento fuori fuoco - provare a migliorare lilluminazione',
3914
- 'ID card front detected - please flip your ID card': 'Fronte del documento didentità rilevato - Girare il documento didentità',
3915
- 'ID card back detected - please flip your ID card': 'Retro del documento didentità rilevato - Girare il documento didentità',
3916
- 'ID card detected please scan a passport instead': 'Documento didentità rilevato, scansionare un passaporto al suo posto',
3917
- 'Passport detected please scan an ID card instead': 'Passaporto rilevato, scansionare una documento didentità al suo posto',
3934
+ 'Please hold your ID document steady': "Tenere il documento d'identità fermo",
3935
+ 'Document out of focus - try improving the lighting': "Documento fuori fuoco - provare a migliorare l'illuminazione",
3936
+ 'ID card front detected - please flip your ID card': "Fronte del documento d'identità rilevato - Girare il documento d'identità",
3937
+ 'ID card back detected - please flip your ID card': "Retro del documento d'identità rilevato - Girare il documento d'identità",
3938
+ 'ID card detected please scan a passport instead': "Documento d'identità rilevato, scansionare un passaporto al suo posto",
3939
+ 'Passport detected please scan an ID card instead': "Passaporto rilevato, scansionare una documento d'identità al suo posto",
3918
3940
  'Document detected, hold still...': 'Documento rilevato, tenere fermo...',
3919
- 'ID card front detected, hold still...': 'Fronte documento didentità rilevato, tenere fermo...',
3920
- 'ID card back detected, hold still...': 'Retro documento didentità rilevato, tenere fermo...',
3941
+ 'ID card front detected, hold still...': "Fronte documento d'identità rilevato, tenere fermo...",
3942
+ 'ID card back detected, hold still...': "Retro documento d'identità rilevato, tenere fermo...",
3921
3943
  'Passport detected, hold still...': 'Passaporto rilevato, tenere fermo...',
3922
3944
  'Capturing...': 'Acquisizione...',
3923
3945
  'Capture failed!': 'Acquisizione non riuscita!',
3924
- 'Please flip your ID card...': 'Capovolgere il documento didentità',
3925
- 'ID card front captured.': 'Fronte documento didentità acquisito.',
3926
- 'ID card back captured.': 'Retro documento didentità acquisito.',
3946
+ 'Please flip your ID card...': "Capovolgere il documento d'identità",
3947
+ 'ID card front captured.': "Fronte documento d'identità acquisito.",
3948
+ 'ID card back captured.': "Retro documento d'identità acquisito.",
3927
3949
  'ID Capture Successful': 'Acquisizione documento riuscita',
3928
3950
  'Verify the entire ID was captured clearly with no glare.': 'Verificare che tutto il documento sia acquisito chiaramente e senza riflessi.',
3929
3951
  Submit: 'Invia',
@@ -3965,29 +3987,29 @@ var it = {
3965
3987
  'Uploading...': 'Caricamento...',
3966
3988
  'Upload succeeded!': 'Caricamento riuscito!',
3967
3989
  'Performing facial recognition, please hold still...': 'Riconoscimento volto in corso, tenere fermo...',
3968
- 'Display the front of your ID card...': 'Mostrare il fronte del documento didentità...',
3969
- 'Display the back of your ID card...': 'Mostrare il retro della documento didentità...',
3990
+ 'Display the front of your ID card...': "Mostrare il fronte del documento d'identità...",
3991
+ 'Display the back of your ID card...': "Mostrare il retro della documento d'identità...",
3970
3992
  'Display the ID page of your passport...': 'Mostrare la pagina identificativa del passaporto...',
3971
3993
  'Please move your face to the center...': 'Spostare il volto al centro...',
3972
- 'Searching for ID card...': 'Ricerca documento didentità in corso...',
3994
+ 'Searching for ID card...': "Ricerca documento d'identità in corso...",
3973
3995
  'Please read the following text aloud': 'Leggere il testo seguente a voce alta',
3974
- 'Video ID has been successfully captured!': 'L’ID video è stato acquisito correttamente!',
3975
- 'ID Front Image': 'Immagine fronte documento didentità',
3976
- 'ID Back Image': 'Immagine retro documento didentità',
3996
+ 'Video ID has been successfully captured!': "L'ID video è stato acquisito correttamente!",
3997
+ 'ID Front Image': "Immagine fronte documento d'identità",
3998
+ 'ID Back Image': "Immagine retro documento d'identità",
3977
3999
  "We're having some trouble.": 'Si è verificato un problema.',
3978
4000
  'On-device capture guidance failed please capture a selfie manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Scattare un selfie manualmente.",
3979
4001
  'Verifying...': 'Verifica...',
3980
- 'Please capture the front of your ID card.': 'Acquisire il fronte del documento didentità.',
3981
- 'Please capture the back of your ID card.': 'Acquisire il retro del documento didentità.',
3982
- 'Please capture the front of your ID card, or the ID page of your passport.': 'Acquisire il fronte del documento didentità o la pagina identificativa del passaporto.',
3983
- 'Please capture the back of your ID card, or click Done if submitting a passport.': 'Acquisire il retro del documento didentità o fare clic su Fatto se si invia un passaporto.',
4002
+ 'Please capture the front of your ID card.': "Acquisire il fronte del documento d'identità.",
4003
+ 'Please capture the back of your ID card.': "Acquisire il retro del documento d'identità.",
4004
+ 'Please capture the front of your ID card, or the ID page of your passport.': "Acquisire il fronte del documento d'identità o la pagina identificativa del passaporto.",
4005
+ 'Please capture the back of your ID card, or click Done if submitting a passport.': "Acquisire il retro del documento d'identità o fare clic su Fatto se si invia un passaporto.",
3984
4006
  'Please capture the ID page of your passport.': 'Acquisire la pagina identificativa del passaporto.',
3985
- 'On-device capture guidance failed please capture a photo of your ID card manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Acquisire una foto del documento didentità manualmente.",
4007
+ 'On-device capture guidance failed please capture a photo of your ID card manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Acquisire una foto del documento d'identità manualmente.",
3986
4008
  'On-device capture guidance failed please capture a photo of your passport manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Acquisire una foto del passaporto manualmente.",
3987
- 'On-device capture guidance failed please capture photos of your ID card and passport manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Acquisire delle foto del documento didentità e del passaporto manualmente.",
3988
- 'On-device capture guidance failed please capture photos of your ID card or passport manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Acquisire delle foto del documento didentità o del passaporto manualmente.",
4009
+ 'On-device capture guidance failed please capture photos of your ID card and passport manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Acquisire delle foto del documento d'identità e del passaporto manualmente.",
4010
+ 'On-device capture guidance failed please capture photos of your ID card or passport manually.': "La guida all'acquisizione sul dispositivo non è riuscita. Acquisire delle foto del documento d'identità o del passaporto manualmente.",
3989
4011
  'Capture ID page of passport': 'Acquisisci pagina identificativa del passaporto',
3990
- 'Capture back of ID card': 'Acquisisci retro del documento didentità',
4012
+ 'Capture back of ID card': "Acquisisci retro del documento d'identità",
3991
4013
  'Downloading...': 'Download in corso...',
3992
4014
  'Accessing camera...': 'Accesso alla fotocamera...',
3993
4015
  'Camera ready': 'Fotocamera pronta',
@@ -4005,7 +4027,9 @@ var it = {
4005
4027
  'Upload ID Front': "Carica il fronte dell'ID",
4006
4028
  'Upload ID Back': "Carica il retro dell'ID",
4007
4029
  Cancel: 'Annulla',
4008
- 'Upload the back of the ID if it is not included in the front image.': "Carica il retro dell'ID se non è incluso nell'immagine del fronte.\r\n"
4030
+ 'Upload the back of the ID if it is not included in the front image.': "Carica il retro dell'ID se non è incluso nell'immagine del fronte.",
4031
+ 'Camera tampering detected': 'Manipolazione della fotocamera rilevata',
4032
+ "We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": 'Siamo spiacenti, ma sembra che la fotocamera stia venendo manipolata. Controlla il tuo dispositivo e riprova ricaricando la pagina.'
4009
4033
  };
4010
4034
 
4011
4035
  var ja = {
@@ -4035,7 +4059,7 @@ var ja = {
4035
4059
  'Document is not centered': 'ドキュメントが中央に合っていません',
4036
4060
  'Document too close please back up': 'ドキュメントが近すぎます。遠ざけてください',
4037
4061
  'Please hold your ID document steady': '身分証が動かないように押さえてください',
4038
- 'Document out of focus try improving the lighting': 'ドキュメントの焦点がぼやけています。照明を調節してください',
4062
+ 'Document out of focus - try improving the lighting': 'ドキュメントの焦点がぼやけています。照明を調節してください',
4039
4063
  'ID card front detected - please flip your ID card': '身分証の正面が検出されました。身分証を裏返してください',
4040
4064
  'ID card back detected - please flip your ID card': '身分証の背面が検出されました。身分証を裏返してください',
4041
4065
  'ID card detected please scan a passport instead': '身分証が検出されました。パスポートをスキャンしてください',
@@ -4130,7 +4154,9 @@ var ja = {
4130
4154
  'Upload ID Front': '身分証明書の表面をアップロード',
4131
4155
  'Upload ID Back': '身分証明書の裏面をアップロード',
4132
4156
  Cancel: 'キャンセル',
4133
- 'Upload the back of the ID if it is not included in the front image.': '表面画像に裏面が含まれていない場合は、裏面をアップロードしてください。'
4157
+ 'Upload the back of the ID if it is not included in the front image.': '表面画像に裏面が含まれていない場合は、裏面をアップロードしてください。',
4158
+ 'Camera tampering detected': 'カメラの操作が検出されました',
4159
+ "We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": 'カメラの操作が検出されました。デバイスを確認し、ページを再読み込みしてください。'
4134
4160
  };
4135
4161
 
4136
4162
  var pt = {
@@ -4160,7 +4186,7 @@ var pt = {
4160
4186
  'Document is not centered': 'Documento não está centralizado',
4161
4187
  'Document too close please back up': 'Documento muito próximo, recue',
4162
4188
  'Please hold your ID document steady': 'Segure seu documento de identificação com firmeza',
4163
- 'Document out of focus try improving the lighting': 'Documento fora de foco - tente melhorar a iluminação',
4189
+ 'Document out of focus - try improving the lighting': 'Documento fora de foco - tente melhorar a iluminação',
4164
4190
  'ID card front detected - please flip your ID card': 'Detectada a frente da carteira de identidade - vire a carteira de identidade',
4165
4191
  'ID card back detected - please flip your ID card': 'Detectado o verso da carteira de identidade - vire a carteira de identidade',
4166
4192
  'ID card detected please scan a passport instead': 'Detectada a carteira de identidade - escaneie um passaporte em seu lugar',
@@ -4255,7 +4281,9 @@ var pt = {
4255
4281
  'Upload ID Front': 'Carregar frente do ID',
4256
4282
  'Upload ID Back': 'Carregar verso do ID',
4257
4283
  Cancel: 'Cancelar',
4258
- 'Upload the back of the ID if it is not included in the front image.': 'Carregue o verso do ID se não estiver incluído na imagem da frente.'
4284
+ 'Upload the back of the ID if it is not included in the front image.': 'Carregue o verso do ID se não estiver incluído na imagem da frente.',
4285
+ 'Camera tampering detected': 'Manipulação da câmera detectada',
4286
+ "We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": 'Lamentamos, mas parece que a câmera está sendo manipulada. Verifique seu dispositivo e tente novamente recarregando a página.'
4259
4287
  };
4260
4288
 
4261
4289
  var ru = {
@@ -4380,7 +4408,9 @@ var ru = {
4380
4408
  'Upload ID Front': 'Загрузить переднюю сторону удостоверения личности',
4381
4409
  'Upload ID Back': 'Загрузить заднюю сторону удостоверения личности',
4382
4410
  Cancel: 'Отменить',
4383
- 'Upload the back of the ID if it is not included in the front image.': 'Загрузите заднюю сторону удостоверения, если она не включена в изображение передней стороны.\r\n'
4411
+ 'Upload the back of the ID if it is not included in the front image.': 'Загрузите заднюю сторону удостоверения, если она не включена в изображение передней стороны.',
4412
+ 'Camera tampering detected': 'Обнаружена манипуляция с камерой',
4413
+ "We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": 'К сожалению, кажется, что камера подвергается манипуляциям. Пожалуйста, проверьте свое устройство и попробуйте снова, перезагрузив страницу.'
4384
4414
  };
4385
4415
 
4386
4416
  var zh = {
@@ -4410,7 +4440,7 @@ var zh = {
4410
4440
  'Document is not centered': '文件未置中',
4411
4441
  'Document too close please back up': '文件太近,請後退',
4412
4442
  'Please hold your ID document steady': '請拿穩證件',
4413
- 'Document out of focus try improving the lighting': '文件失焦 請嘗試改善燈光',
4443
+ 'Document out of focus - try improving the lighting': '文件失焦 - 請嘗試改善燈光',
4414
4444
  'ID card front detected - please flip your ID card': '偵測到證件正面 - 請將證件翻面',
4415
4445
  'ID card back detected - please flip your ID card': '偵測到證件背面 - 請將證件翻面',
4416
4446
  'ID card detected please scan a passport instead': '偵測到證件,請掃描護照',
@@ -4471,7 +4501,7 @@ var zh = {
4471
4501
  'Please move your face to the center...': '請將臉部移至中心...',
4472
4502
  'Searching for ID card...': '正在搜尋證件...',
4473
4503
  'Please read the following text aloud': '請大聲讀出以下文字',
4474
- 'Video ID has been successfully captured!': '已成功拍攝影片 ID',
4504
+ 'Video ID has been successfully captured!': '已成功拍攝影片 ID!',
4475
4505
  'ID Front Image': '證件正面影像',
4476
4506
  'ID Back Image': '證件背面影像',
4477
4507
  "We're having some trouble.": '發生一些問題。',
@@ -4505,7 +4535,9 @@ var zh = {
4505
4535
  'Upload ID Front': '上传身份证正面',
4506
4536
  'Upload ID Back': '上传身份证背面',
4507
4537
  Cancel: '取消',
4508
- 'Upload the back of the ID if it is not included in the front image.': '如果正面照片没有包含身份证背面,请上传背面照片。'
4538
+ 'Upload the back of the ID if it is not included in the front image.': '如果正面照片没有包含身份证背面,请上传背面照片。',
4539
+ 'Camera tampering detected': '檢測到相機被篡改',
4540
+ "We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": '很抱歉,看起來相機被篡改了。請檢查您的設備並重新載入頁面。'
4509
4541
  };
4510
4542
 
4511
4543
  var resources = {
@@ -5026,14 +5058,14 @@ function CameraTamperSeal(_a) {
5026
5058
  className: classNames.message
5027
5059
  }, messageText)));
5028
5060
  }
5029
- var StyledOverlayInner$4 = styled(OverlayInner$2)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
5030
- var StyledOverlayHeading = styled.h3(templateObject_2$A || (templateObject_2$A = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
5061
+ var StyledOverlayInner$4 = styled(OverlayInner$2)(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
5062
+ var StyledOverlayHeading = styled.h3(templateObject_2$B || (templateObject_2$B = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
5031
5063
  function useCameraStore(selector) {
5032
5064
  var store = useContext(CameraStoreContext);
5033
5065
  if (!store) throw new Error('useCameraStore cannot be used without Provider');
5034
5066
  return useStore(store, selector);
5035
5067
  }
5036
- var templateObject_1$H, templateObject_2$A;
5068
+ var templateObject_1$J, templateObject_2$B;
5037
5069
 
5038
5070
  var DocumentDetectionModelContext = /*#__PURE__*/createContext({
5039
5071
  startDocumentDetection: function startDocumentDetection() {
@@ -5532,6 +5564,13 @@ function IdCaptureModelsProvider(_a) {
5532
5564
  props = __rest(_a, ["children"]);
5533
5565
  return /*#__PURE__*/React__default.createElement(DocumentDetectionModelProvider, _assign({}, props), /*#__PURE__*/React__default.createElement(FocusModelProvider, _assign({}, props), /*#__PURE__*/React__default.createElement(IdCaptureModelsProviderInner, _assign({}, props), children)));
5534
5566
  }
5567
+ function useIdCaptureModelsContext() {
5568
+ var context = useContext(IdCaptureModelsContext);
5569
+ if (!context) {
5570
+ throw new Error('useIdCaptureModelsContext must be used within an IdCaptureModelsProvider');
5571
+ }
5572
+ return context;
5573
+ }
5535
5574
 
5536
5575
  var CapturedDocumentTypeValues = ['idCardFront', 'idCardBack', 'passport', 'singlePage', 'selfie'];
5537
5576
 
@@ -5991,12 +6030,12 @@ function DebugStatsPane(_a) {
5991
6030
  if (!portalLocation) return element;
5992
6031
  return /*#__PURE__*/createPortal(element, portalLocation);
5993
6032
  }
5994
- var DebugStatsPaneDiv = styled.span(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n"], ["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n"])));
5995
- var ObjectDetectionDebugOverlayDiv = styled.div(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
6033
+ var DebugStatsPaneDiv = styled.span(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n"], ["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n"])));
6034
+ var ObjectDetectionDebugOverlayDiv = styled.div(templateObject_2$A || (templateObject_2$A = __makeTemplateObject(["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
5996
6035
  var $flipX = _a.$flipX;
5997
6036
  return $flipX ? 'transform: scaleX(-1);' : '';
5998
6037
  });
5999
- var ObjectDetectionDebugBox = styled.div(templateObject_3$q || (templateObject_3$q = __makeTemplateObject(["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"], ["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
6038
+ var ObjectDetectionDebugBox = styled.div(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"], ["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
6000
6039
  var $color = _a.$color;
6001
6040
  return $color !== null && $color !== void 0 ? $color : 'green';
6002
6041
  }, function (_a) {
@@ -6006,7 +6045,7 @@ var ObjectDetectionDebugBox = styled.div(templateObject_3$q || (templateObject_3
6006
6045
  var $flipX = _a.$flipX;
6007
6046
  return $flipX ? 'transform: scaleX(-1);' : '';
6008
6047
  });
6009
- var FaceDetectionKeypointMarker = styled.div(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n position: absolute;\n width: 4px;\n height: 4px;\n border: 2px solid ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n width: 4px;\n height: 4px;\n border: 2px solid ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
6048
+ var FaceDetectionKeypointMarker = styled.div(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["\n position: absolute;\n width: 4px;\n height: 4px;\n border: 2px solid ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n width: 4px;\n height: 4px;\n border: 2px solid ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
6010
6049
  var $color = _a.$color;
6011
6050
  return $color !== null && $color !== void 0 ? $color : 'red';
6012
6051
  }, function (_a) {
@@ -6197,9 +6236,9 @@ function SelfieCaptureFaceKeypoint(_a) {
6197
6236
  }
6198
6237
  });
6199
6238
  }
6200
- var templateObject_1$G, templateObject_2$z, templateObject_3$q, templateObject_4$k;
6239
+ var templateObject_1$I, templateObject_2$A, templateObject_3$r, templateObject_4$l;
6201
6240
 
6202
- var GuidanceMessageContainerDiv = styled.div(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
6241
+ var GuidanceMessageContainerDiv = styled.div(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
6203
6242
  var $top = _a.$top;
6204
6243
  return $top !== null && $top !== void 0 ? $top : '10vh';
6205
6244
  }, function (_a) {
@@ -6212,14 +6251,14 @@ var GuidanceMessageContainer = function GuidanceMessageContainer(props) {
6212
6251
  if (!portalLocation) return element;
6213
6252
  return /*#__PURE__*/createPortal(element, portalLocation);
6214
6253
  };
6215
- var GuidanceMessage = styled.div(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n z-index: 10001;\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n z-index: 10001;\n"])), function (props) {
6254
+ var GuidanceMessage = styled.div(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n z-index: 10001;\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n z-index: 10001;\n"])), function (props) {
6216
6255
  var _a, _b, _c, _d, _e, _f;
6217
6256
  return (_f = (_a = props.$background) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.backgroundColor) !== null && _f !== void 0 ? _f : '#ccc';
6218
6257
  }, function (props) {
6219
6258
  var _a, _b, _c, _d, _e, _f;
6220
6259
  return (_f = (_a = props.$textColor) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.textColor) !== null && _f !== void 0 ? _f : 'black';
6221
6260
  });
6222
- var templateObject_1$F, templateObject_2$y;
6261
+ var templateObject_1$H, templateObject_2$z;
6223
6262
 
6224
6263
  function OverrideWrongDocumentTypeGuidanceDialog(_a) {
6225
6264
  var _b = _a.classNames,
@@ -6252,18 +6291,18 @@ function OverrideWrongDocumentTypeGuidanceDialog(_a) {
6252
6291
  }
6253
6292
  }, verbiage.buttonText))));
6254
6293
  }
6255
- var Container$2 = styled.div(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n position: fixed;\n left: 0;\n bottom: 0;\n width: 100dvw;\n background: ", ";\n color: ", ";\n display: flex;\n z-index: 100001;\n"], ["\n position: fixed;\n left: 0;\n bottom: 0;\n width: 100dvw;\n background: ", ";\n color: ", ";\n display: flex;\n z-index: 100001;\n"])), function (props) {
6294
+ var Container$2 = styled.div(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["\n position: fixed;\n left: 0;\n bottom: 0;\n width: 100dvw;\n background: ", ";\n color: ", ";\n display: flex;\n z-index: 100001;\n"], ["\n position: fixed;\n left: 0;\n bottom: 0;\n width: 100dvw;\n background: ", ";\n color: ", ";\n display: flex;\n z-index: 100001;\n"])), function (props) {
6256
6295
  var _a, _b, _c;
6257
6296
  return (_c = (_b = (_a = props.theme.idCapture) === null || _a === void 0 ? void 0 : _a.overrideWrongDocumentTypeGuidance) === null || _b === void 0 ? void 0 : _b.backgroundColor) !== null && _c !== void 0 ? _c : '#eed202';
6258
6297
  }, function (props) {
6259
6298
  var _a, _b, _c;
6260
6299
  return (_c = (_b = (_a = props.theme.idCapture) === null || _a === void 0 ? void 0 : _a.overrideWrongDocumentTypeGuidance) === null || _b === void 0 ? void 0 : _b.textColor) !== null && _c !== void 0 ? _c : 'black';
6261
6300
  });
6262
- var InnerContainer = styled.div(templateObject_2$x || (templateObject_2$x = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"])));
6263
- var Message = styled.span(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n display: block;\n margin: auto 12px auto 0;\n"], ["\n display: block;\n margin: auto 12px auto 0;\n"])));
6264
- var ButtonContainer = styled.div(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n display: flex;\n margin-left: auto;\n"], ["\n display: flex;\n margin-left: auto;\n"])));
6301
+ var InnerContainer = styled.div(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"])));
6302
+ var Message = styled.span(templateObject_3$q || (templateObject_3$q = __makeTemplateObject(["\n display: block;\n margin: auto 12px auto 0;\n"], ["\n display: block;\n margin: auto 12px auto 0;\n"])));
6303
+ var ButtonContainer = styled.div(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n display: flex;\n margin-left: auto;\n"], ["\n display: flex;\n margin-left: auto;\n"])));
6265
6304
  var Button$1 = styled(LoaderButton)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n white-space: nowrap;\n margin: auto;\n"], ["\n white-space: nowrap;\n margin: auto;\n"])));
6266
- var templateObject_1$E, templateObject_2$x, templateObject_3$p, templateObject_4$j, templateObject_5$c;
6305
+ var templateObject_1$G, templateObject_2$y, templateObject_3$q, templateObject_4$k, templateObject_5$c;
6267
6306
 
6268
6307
  // This is a simplified version of https://github.com/ZeeCoder/use-resize-observer.
6269
6308
  // We have removed all options and made it compliant with React Compiler/React 19.
@@ -6585,13 +6624,13 @@ var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
6585
6624
  finished: true
6586
6625
  }, verbiage.retryBtnText)));
6587
6626
  };
6588
- var StyledOverlayInner$3 = styled(OverlayInner$2)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n max-width: 500px;\n height: auto;\n margin: auto;\n"], ["\n max-width: 500px;\n height: auto;\n margin: auto;\n"])));
6589
- var StyledOverlayImageContainer$3 = styled(OverlayImageContainer)(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n flex-grow: 0;\n"], ["\n flex-grow: 0;\n"])));
6590
- var Description$4 = styled.p(templateObject_3$o || (templateObject_3$o = __makeTemplateObject(["\n line-height: 1.5;\n margin-bottom: 50px;\n"], ["\n line-height: 1.5;\n margin-bottom: 50px;\n"])));
6591
- var RetryButton$1 = styled(LoaderButton)(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["\n width: 200px;\n margin: 0 auto;\n"], ["\n width: 200px;\n margin: 0 auto;\n"])));
6592
- var templateObject_1$D, templateObject_2$w, templateObject_3$o, templateObject_4$i;
6627
+ var StyledOverlayInner$3 = styled(OverlayInner$2)(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n max-width: 500px;\n height: auto;\n margin: auto;\n"], ["\n max-width: 500px;\n height: auto;\n margin: auto;\n"])));
6628
+ var StyledOverlayImageContainer$3 = styled(OverlayImageContainer)(templateObject_2$x || (templateObject_2$x = __makeTemplateObject(["\n flex-grow: 0;\n"], ["\n flex-grow: 0;\n"])));
6629
+ var Description$4 = styled.p(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n line-height: 1.5;\n margin-bottom: 50px;\n"], ["\n line-height: 1.5;\n margin-bottom: 50px;\n"])));
6630
+ var RetryButton$1 = styled(LoaderButton)(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n width: 200px;\n margin: 0 auto;\n"], ["\n width: 200px;\n margin: 0 auto;\n"])));
6631
+ var templateObject_1$F, templateObject_2$x, templateObject_3$p, templateObject_4$j;
6593
6632
 
6594
- var ExitCaptureStyledButton = styled.button(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"], ["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"])));
6633
+ var ExitCaptureStyledButton = styled.button(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"], ["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"])));
6595
6634
  var ExitCaptureButton = function ExitCaptureButton(_a) {
6596
6635
  var onClick = _a.onClick,
6597
6636
  className = _a.className;
@@ -6635,10 +6674,10 @@ var ExitCaptureButton = function ExitCaptureButton(_a) {
6635
6674
  y2: "19.75"
6636
6675
  }))));
6637
6676
  };
6638
- var templateObject_1$C;
6677
+ var templateObject_1$E;
6639
6678
 
6640
- var ButtonsRow = styled.div(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n"], ["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n"])));
6641
- var templateObject_1$B;
6679
+ var ButtonsRow = styled.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n"], ["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n"])));
6680
+ var templateObject_1$D;
6642
6681
 
6643
6682
  function IdCaptureLoadingGraphic(props) {
6644
6683
  var isMobile = window.innerHeight > window.innerWidth;
@@ -7119,21 +7158,21 @@ function IdCaptureLoadingGraphicMobile(_a) {
7119
7158
  fill: "white"
7120
7159
  }))));
7121
7160
  }
7122
- var LoadingGraphicWrapper = styled.div(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n display: flex;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n width: 100%;\n height: 100%;\n"])));
7123
- var LoadingGraphicSvg = styled.svg(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n"], ["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n"])), function (props) {
7161
+ var LoadingGraphicWrapper = styled.div(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n display: flex;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n width: 100%;\n height: 100%;\n"])));
7162
+ var LoadingGraphicSvg = styled.svg(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n"], ["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n"])), function (props) {
7124
7163
  return props.$frame > 1 ? 1 : props.$frame === 1 ? 1.25 : 0.75;
7125
7164
  }, function (props) {
7126
7165
  return props.$frame >= 5 ? 10 : 0;
7127
7166
  }, function (props) {
7128
7167
  return props.$borderColor;
7129
7168
  });
7130
- var LoadingGraphicCardGroup = styled.g(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
7169
+ var LoadingGraphicCardGroup = styled.g(templateObject_3$o || (templateObject_3$o = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
7131
7170
  return props.$offScreen ? '-500px' : '0';
7132
7171
  });
7133
- var LoadingGraphicPhoneGroup = styled.g(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
7172
+ var LoadingGraphicPhoneGroup = styled.g(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
7134
7173
  return props.$offScreen ? '40px' : '0';
7135
7174
  });
7136
- var templateObject_1$A, templateObject_2$v, templateObject_3$n, templateObject_4$h;
7175
+ var templateObject_1$C, templateObject_2$w, templateObject_3$o, templateObject_4$i;
7137
7176
 
7138
7177
  function LoadingListItemIndicator(_a) {
7139
7178
  var _b = _a.state,
@@ -7184,34 +7223,42 @@ function LoadingListItemIndicator(_a) {
7184
7223
  }))))));
7185
7224
  }
7186
7225
 
7226
+ var wavesAnimation = keyframes(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"], ["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"])));
7227
+ var progressBarAnimation = keyframes(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"], ["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"])));
7228
+ var dualRingSpinnerAnimation = keyframes(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
7229
+ var progressBorderAnimation = keyframes(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\n to {\n stroke-dashoffset: 0;\n }\n"], ["\n to {\n stroke-dashoffset: 0;\n }\n"])));
7230
+ var templateObject_1$B, templateObject_2$v, templateObject_3$n, templateObject_4$h;
7231
+
7187
7232
  var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
7188
7233
  var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a) {
7189
- var _b, _c, _d, _e, _f, _g;
7234
+ var _b, _c, _d, _e;
7190
7235
  var onDismissed = _a.onDismissed,
7191
7236
  onUserCancel = _a.onUserCancel,
7192
7237
  instructions = _a.instructions,
7193
- _h = _a.rotateImage,
7194
- rotateImage = _h === void 0 ? false : _h,
7195
- _j = _a.assets,
7196
- assets = _j === void 0 ? {} : _j,
7197
- _k = _a.classNames,
7198
- classNames = _k === void 0 ? {} : _k,
7199
- _l = _a.colors,
7200
- colors = _l === void 0 ? {} : _l,
7201
- _m = _a.verbiage,
7202
- rawVerbiage = _m === void 0 ? {} : _m,
7238
+ _f = _a.rotateImage,
7239
+ rotateImage = _f === void 0 ? false : _f,
7240
+ _g = _a.assets,
7241
+ assets = _g === void 0 ? {} : _g,
7242
+ _h = _a.classNames,
7243
+ classNames = _h === void 0 ? {} : _h,
7244
+ _j = _a.colors,
7245
+ colors = _j === void 0 ? {} : _j,
7246
+ _k = _a.verbiage,
7247
+ rawVerbiage = _k === void 0 ? {} : _k,
7203
7248
  customOverlayContent = _a.customOverlayContent;
7204
- var _o = useContext(IdCaptureModelsContext),
7205
- modelsReady = _o.ready,
7206
- modelDownloadProgress = _o.modelDownloadProgress;
7207
- var _p = useCameraStore(),
7208
- cameraReady = _p.cameraReady,
7209
- cameraAccessDenied = _p.cameraAccessDenied,
7210
- iphoneContinuityCameraAvailable = _p.iphoneContinuityCameraAvailable,
7211
- setIphoneContinuityCameraAllowed = _p.setIphoneContinuityCameraAllowed;
7212
- var _q = useState(false),
7213
- dismissed = _q[0],
7214
- setDismissed = _q[1];
7249
+ var sessionCheckState = useAuthContext()[0].sessionCheckState;
7250
+ var sessionReady = sessionCheckState === 'PASSED';
7251
+ var _l = useIdCaptureModelsContext(),
7252
+ modelsReady = _l.ready,
7253
+ modelDownloadProgress = _l.modelDownloadProgress;
7254
+ var _m = useCameraStore(),
7255
+ cameraReady = _m.cameraReady,
7256
+ cameraAccessDenied = _m.cameraAccessDenied,
7257
+ iphoneContinuityCameraAvailable = _m.iphoneContinuityCameraAvailable,
7258
+ setIphoneContinuityCameraAllowed = _m.setIphoneContinuityCameraAllowed;
7259
+ var _o = useState(false),
7260
+ dismissed = _o[0],
7261
+ setDismissed = _o[1];
7215
7262
  assets.instructionImageUrl || (assets.instructionImageUrl = legacyInstructionImageUrl$1);
7216
7263
  var verbiage = useTranslations(rawVerbiage, {
7217
7264
  headingText: 'Use your device camera to capture your ID',
@@ -7221,19 +7268,21 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
7221
7268
  modelsReadyText: 'Guided capture experience ready',
7222
7269
  cameraInitializingText: 'Camera initializing...',
7223
7270
  cameraInitializedText: 'Camera ready',
7224
- continueText: "Let's Go!"
7271
+ continueText: "Let's Go!",
7272
+ sessionCheckingText: 'Checking session...'
7225
7273
  });
7274
+ var ready = sessionReady && modelsReady && cameraReady;
7226
7275
  useEffect(function () {
7227
- if (modelsReady && cameraReady) return function () {
7276
+ if (ready) return function () {
7228
7277
  return null;
7229
7278
  };
7230
7279
  var t = setTimeout(function () {
7231
- setDismissed(false);
7280
+ return setDismissed(false);
7232
7281
  }, 500);
7233
7282
  return function () {
7234
- clearTimeout(t);
7283
+ return clearTimeout(t);
7235
7284
  };
7236
- }, [cameraReady, modelsReady]);
7285
+ }, [ready]);
7237
7286
  var imageRef = useRef(null);
7238
7287
  if (dismissed) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
7239
7288
  if (cameraAccessDenied) {
@@ -7306,18 +7355,18 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
7306
7355
  }, /*#__PURE__*/React__default.createElement(LoadingList$1, {
7307
7356
  className: classNames.loadingList
7308
7357
  }, /*#__PURE__*/React__default.createElement(LoadingListItem$1, {
7309
- className: "".concat((_f = classNames.loadingListItem) !== null && _f !== void 0 ? _f : '', " ").concat(cameraReady ? 'done' : 'running')
7358
+ className: cn(classNames.loadingListItem, cameraReady ? 'done' : 'running')
7310
7359
  }, /*#__PURE__*/React__default.createElement(LoadingListItemIndicator, {
7311
7360
  className: classNames.loadingListItemIndicator,
7312
7361
  state: cameraReady ? 'done' : 'running'
7313
7362
  }), cameraReady ? verbiage.cameraInitializedText : verbiage.cameraInitializingText), /*#__PURE__*/React__default.createElement(LoadingListItem$1, {
7314
- className: "".concat((_g = classNames.loadingListItem) !== null && _g !== void 0 ? _g : '', " ").concat(modelsReady ? 'done' : 'running')
7363
+ className: cn(classNames.loadingListItem, sessionReady && modelsReady ? 'done' : 'running')
7315
7364
  }, /*#__PURE__*/React__default.createElement(LoadingListItemIndicator, {
7316
7365
  className: classNames.loadingListItemIndicator,
7317
- state: modelsReady ? 'done' : 'running'
7318
- }), modelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer$1, {
7366
+ state: sessionReady && modelsReady ? 'done' : 'running'
7367
+ }), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer$1, {
7319
7368
  className: classNames.continueBtnContainer
7320
- }, modelsReady && cameraReady && ( /*#__PURE__*/React__default.createElement(ContinueButton$1, {
7369
+ }, ready && ( /*#__PURE__*/React__default.createElement(ContinueButton$1, {
7321
7370
  autoFocus: true,
7322
7371
  finished: true,
7323
7372
  className: classNames.continueBtn,
@@ -7329,7 +7378,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
7329
7378
  }
7330
7379
  }, verbiage.continueText))))));
7331
7380
  };
7332
- var OverlayInner$1 = styled.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"], ["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"])), function (props) {
7381
+ var OverlayInner$1 = styled.div(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"], ["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"])), function (props) {
7333
7382
  var _a, _b, _c, _d;
7334
7383
  return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.backgroundColor) !== null && _d !== void 0 ? _d : '#ecedf3';
7335
7384
  }, function (props) {
@@ -7384,9 +7433,9 @@ var ContinueButton$1 = styled(LoaderButton)(templateObject_18 || (templateObject
7384
7433
  var _a, _b, _c, _d, _e, _f;
7385
7434
  return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnBorder) ? "border: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.continueBtnBorder, ";") : '';
7386
7435
  });
7387
- var templateObject_1$z, templateObject_2$u, templateObject_3$m, templateObject_4$g, templateObject_5$b, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15$1, templateObject_16, templateObject_17, templateObject_18;
7436
+ var templateObject_1$A, templateObject_2$u, templateObject_3$m, templateObject_4$g, templateObject_5$b, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15$1, templateObject_16, templateObject_17, templateObject_18;
7388
7437
 
7389
- var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
7438
+ var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
7390
7439
  var ContinuityCameraCheckbox = styled.input(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
7391
7440
  var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
7392
7441
  var _b, _c, _d, _e;
@@ -7403,7 +7452,9 @@ var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
7403
7452
  colors = _j === void 0 ? {} : _j,
7404
7453
  _k = _a.verbiage,
7405
7454
  rawVerbiage = _k === void 0 ? {} : _k;
7406
- var _l = useContext(IdCaptureModelsContext),
7455
+ var sessionCheckState = useAuthContext()[0].sessionCheckState;
7456
+ var sessionReady = sessionCheckState === 'PASSED';
7457
+ var _l = useIdCaptureModelsContext(),
7407
7458
  modelsReady = _l.ready,
7408
7459
  modelDownloadProgress = _l.modelDownloadProgress;
7409
7460
  var _m = useCameraStore(useShallow(function (state) {
@@ -7430,17 +7481,18 @@ var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
7430
7481
  cameraInitializingText: 'Camera initializing...',
7431
7482
  continueText: 'Continue'
7432
7483
  });
7484
+ var ready = sessionReady && modelsReady && cameraReady;
7433
7485
  useEffect(function () {
7434
- if (modelsReady && cameraReady) return function () {
7486
+ if (ready) return function () {
7435
7487
  return null;
7436
7488
  };
7437
7489
  var t = setTimeout(function () {
7438
- setDismissed(false);
7490
+ return setDismissed(false);
7439
7491
  }, 500);
7440
7492
  return function () {
7441
- clearTimeout(t);
7493
+ return clearTimeout(t);
7442
7494
  };
7443
- }, [cameraReady, modelsReady]);
7495
+ }, [ready]);
7444
7496
  var imageRef = useRef(null);
7445
7497
  if (dismissed) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
7446
7498
  if (cameraAccessDenied) {
@@ -7496,16 +7548,16 @@ var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
7496
7548
  }, verbiage.useContinuityCameraText)))), /*#__PURE__*/React__default.createElement(LoaderButton, {
7497
7549
  className: classNames.continueBtn,
7498
7550
  variant: "positive",
7499
- disabled: !cameraReady || !modelsReady,
7500
- finished: modelsReady && cameraReady,
7551
+ disabled: !ready,
7552
+ finished: ready,
7501
7553
  colors: colors.continueBtn,
7502
7554
  onClick: function onClick() {
7503
7555
  setDismissed(true);
7504
7556
  onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
7505
7557
  }
7506
- }, cameraReady && modelsReady ? verbiage.continueText : modelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)"))));
7558
+ }, ready ? verbiage.continueText : modelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)"))));
7507
7559
  };
7508
- var templateObject_1$y, templateObject_2$t;
7560
+ var templateObject_1$z, templateObject_2$t;
7509
7561
 
7510
7562
  var components$1 = {
7511
7563
  "default": IdCaptureLoadingOverlayDefault,
@@ -7563,9 +7615,9 @@ var CapturedDocumentImg = function CapturedDocumentImg(_a) {
7563
7615
  });
7564
7616
  };
7565
7617
 
7566
- var Card = styled.div(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100dvw - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"], ["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100dvw - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"])));
7618
+ var Card = styled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100dvw - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"], ["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100dvw - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"])));
7567
7619
  var FlexCard = styled(Card)(templateObject_2$s || (templateObject_2$s = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
7568
- var templateObject_1$x, templateObject_2$s;
7620
+ var templateObject_1$y, templateObject_2$s;
7569
7621
 
7570
7622
  var IdCaptureSuccess = function IdCaptureSuccess(_a) {
7571
7623
  var capturedDocuments = _a.capturedDocuments,
@@ -7624,13 +7676,13 @@ var IdCaptureSuccess = function IdCaptureSuccess(_a) {
7624
7676
  finished: true
7625
7677
  }, verbiage.retryText)))));
7626
7678
  };
7627
- var Heading$a = styled.h1(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"], ["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"])));
7679
+ var Heading$a = styled.h1(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"], ["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"])));
7628
7680
  var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"], ["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"])));
7629
7681
  var ImageRow = styled(OverlayImageRow)(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n max-width: 100%;\n flex-direction: column;\n display: grid;\n grid-gap: 12px;\n"], ["\n max-width: 100%;\n flex-direction: column;\n display: grid;\n grid-gap: 12px;\n"])));
7630
7682
  var ImageCol$1 = styled.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n width: 100%;\n max-height: none !important;\n"], ["\n width: 100%;\n max-height: none !important;\n"])));
7631
7683
  var StyledImage = styled(CapturedDocumentImg)(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
7632
7684
  var DebugPre = styled.pre(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n text-align: left;\n max-width: min(450px, 100dvw - 100px);\n overflow-x: auto;\n"], ["\n text-align: left;\n max-width: min(450px, 100dvw - 100px);\n overflow-x: auto;\n"])));
7633
- var templateObject_1$w, templateObject_2$r, templateObject_3$l, templateObject_4$f, templateObject_5$a, templateObject_6$8;
7685
+ var templateObject_1$x, templateObject_2$r, templateObject_3$l, templateObject_4$f, templateObject_5$a, templateObject_6$8;
7634
7686
 
7635
7687
  function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
7636
7688
  var _this = this;
@@ -7682,7 +7734,7 @@ function resetCanvasDimensions(canvas) {
7682
7734
  canvas.style.height = '0';
7683
7735
  }
7684
7736
 
7685
- var IdCardGuideImageContainer = styled(IdCardBorder)(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n"])), function (props) {
7737
+ var IdCardGuideImageContainer = styled(IdCardBorder)(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n"])), function (props) {
7686
7738
  return props.$isVisible ? '' : 'opacity: 0;';
7687
7739
  });
7688
7740
  var IdCardGuideImage = styled.img(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n transform-style: preserve-3d;\n ", "\n ", "\n"], ["\n transform-style: preserve-3d;\n ", "\n ", "\n"])), function (props) {
@@ -7838,7 +7890,7 @@ var IdCardBorderRect = styled.rect(templateObject_5$9 || (templateObject_5$9 = _
7838
7890
  var _a;
7839
7891
  return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
7840
7892
  });
7841
- var templateObject_1$v, templateObject_2$q, templateObject_3$k, templateObject_4$e, templateObject_5$9;
7893
+ var templateObject_1$w, templateObject_2$q, templateObject_3$k, templateObject_4$e, templateObject_5$9;
7842
7894
 
7843
7895
  var defaultIdCaptureGuideImages = {
7844
7896
  portrait: {
@@ -8014,12 +8066,12 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
8014
8066
  style: imageStyle
8015
8067
  })));
8016
8068
  };
8017
- var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n width: 100%;\n max-height: 100%;\n"], ["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n width: 100%;\n max-height: 100%;\n"])), function (props) {
8069
+ var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n width: 100%;\n max-height: 100%;\n"], ["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n width: 100%;\n max-height: 100%;\n"])), function (props) {
8018
8070
  return props.$transitionTime;
8019
8071
  }, function (props) {
8020
8072
  return props.$transforms;
8021
8073
  });
8022
- var templateObject_1$u;
8074
+ var templateObject_1$v;
8023
8075
 
8024
8076
  var GuideOrientationContext = /*#__PURE__*/createContext({
8025
8077
  orientation: 'landscape',
@@ -8306,7 +8358,7 @@ var regionClsx = function regionClsx(classNames, which) {
8306
8358
  return v;
8307
8359
  }).join(' ');
8308
8360
  };
8309
- var StyledPageContainer = styled(PageContainerDiv)(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n z-index: 1000;\n overflow-y: hidden;\n"], ["\n z-index: 1000;\n overflow-y: hidden;\n"])));
8361
+ var StyledPageContainer = styled(PageContainerDiv)(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n z-index: 1000;\n overflow-y: hidden;\n"], ["\n z-index: 1000;\n overflow-y: hidden;\n"])));
8310
8362
  var GuidesContainer = styled.div(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n display: flex;\n flex-flow: column nowrap;\n width: 100dvw;\n height: 100dvh;\n"], ["\n display: flex;\n flex-flow: column nowrap;\n width: 100dvw;\n height: 100dvh;\n"])));
8311
8363
  var GuideCenterRow = styled.div(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"], ["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"])));
8312
8364
  var GuideRegion = styled.div(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"])), function (props) {
@@ -8334,7 +8386,7 @@ var GuideCenterBorder = styled.div(templateObject_7$5 || (templateObject_7$5 = _
8334
8386
  });
8335
8387
  var GuideText = styled.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
8336
8388
  var GuideCenterInner = styled.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n"], ["\n position: relative;\n margin: auto;\n"])));
8337
- var templateObject_1$t, templateObject_2$p, templateObject_3$j, templateObject_4$d, templateObject_5$8, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$2;
8389
+ var templateObject_1$u, templateObject_2$p, templateObject_3$j, templateObject_4$d, templateObject_5$8, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$2;
8338
8390
 
8339
8391
  var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
8340
8392
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
@@ -8475,11 +8527,11 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
8475
8527
  progress: progress
8476
8528
  }));
8477
8529
  };
8478
- var CanvasWrapper$1 = styled.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"])), function (props) {
8530
+ var CanvasWrapper$1 = styled.div(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"])), function (props) {
8479
8531
  return props.$maskColor;
8480
8532
  });
8481
8533
  var Canvas$1 = styled.canvas(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
8482
- var templateObject_1$s, templateObject_2$o;
8534
+ var templateObject_1$t, templateObject_2$o;
8483
8535
 
8484
8536
  function IdCaptureGuides(_a) {
8485
8537
  var _b = _a.guideType,
@@ -8535,6 +8587,33 @@ function IdCaptureGuides(_a) {
8535
8587
  })));
8536
8588
  }
8537
8589
 
8590
+ var Spinner = styled.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: ", " 1.2s linear infinite;\n box-sizing: content-box;\n }\n"], ["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: ", " 1.2s linear infinite;\n box-sizing: content-box;\n }\n"])), function (_a) {
8591
+ var $size = _a.$size;
8592
+ return $size !== null && $size !== void 0 ? $size : 80;
8593
+ }, function (_a) {
8594
+ var $size = _a.$size;
8595
+ return $size !== null && $size !== void 0 ? $size : 80;
8596
+ }, function (_a) {
8597
+ var $size = _a.$size;
8598
+ return ($size !== null && $size !== void 0 ? $size : 80) - 16;
8599
+ }, function (_a) {
8600
+ var $size = _a.$size;
8601
+ return ($size !== null && $size !== void 0 ? $size : 80) - 16;
8602
+ }, function (_a) {
8603
+ var $thickness = _a.$thickness;
8604
+ return $thickness !== null && $thickness !== void 0 ? $thickness : 6;
8605
+ }, function (_a) {
8606
+ var $color = _a.$color;
8607
+ return $color !== null && $color !== void 0 ? $color : '#888';
8608
+ }, function (_a) {
8609
+ var $color = _a.$color;
8610
+ return $color !== null && $color !== void 0 ? $color : '#888';
8611
+ }, function (_a) {
8612
+ var $color = _a.$color;
8613
+ return $color !== null && $color !== void 0 ? $color : '#888';
8614
+ }, dualRingSpinnerAnimation);
8615
+ var templateObject_1$s;
8616
+
8538
8617
  var IdCaptureImagePreview = function IdCaptureImagePreview(_a) {
8539
8618
  var _b = _a.classNames,
8540
8619
  classNames = _b === void 0 ? {} : _b,
@@ -11206,6 +11285,13 @@ function SelfieGuidanceModelsProvider(_a) {
11206
11285
  ref: canvasRef
11207
11286
  }), children);
11208
11287
  }
11288
+ function useSelfieGuidanceModelsContext() {
11289
+ var context = React.useContext(SelfieGuidanceModelsContext);
11290
+ if (!context) {
11291
+ throw new Error('useSelfieGuidanceModelsContext must be used within a SelfieGuidanceModelsProvider');
11292
+ }
11293
+ return context;
11294
+ }
11209
11295
 
11210
11296
  var useTimeout = function useTimeout(durationMs, onTimeout, timeoutAverted, shouldWaitLonger, shouldStart) {
11211
11297
  if (shouldStart === void 0) {
@@ -12081,6 +12167,8 @@ var SelfieCaptureLoadingOverlayLegacy = function SelfieCaptureLoadingOverlayLega
12081
12167
  colors = _e === void 0 ? {} : _e,
12082
12168
  _f = _a.verbiage,
12083
12169
  rawVerbiage = _f === void 0 ? {} : _f;
12170
+ var sessionCheckState = useAuthContext()[0].sessionCheckState;
12171
+ var sessionReady = sessionCheckState === 'PASSED';
12084
12172
  var _g = useCameraStore(useShallow(function (state) {
12085
12173
  return {
12086
12174
  cameraReady: state.cameraReady,
@@ -12091,7 +12179,7 @@ var SelfieCaptureLoadingOverlayLegacy = function SelfieCaptureLoadingOverlayLega
12091
12179
  cameraReady = _g.cameraReady,
12092
12180
  cameraAccessDenied = _g.cameraAccessDenied,
12093
12181
  microphoneAccessDenied = _g.microphoneAccessDenied;
12094
- var _h = useContext(SelfieGuidanceModelsContext),
12182
+ var _h = useSelfieGuidanceModelsContext(),
12095
12183
  modelsReady = _h.ready,
12096
12184
  modelDownloadProgress = _h.modelDownloadProgress;
12097
12185
  var idCaptureModelsContext = useContext(IdCaptureModelsContext);
@@ -12126,6 +12214,7 @@ var SelfieCaptureLoadingOverlayLegacy = function SelfieCaptureLoadingOverlayLega
12126
12214
  });
12127
12215
  }
12128
12216
  var allModelsReady = modelsReady && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
12217
+ var ready = sessionReady && allModelsReady && cameraReady;
12129
12218
  return /*#__PURE__*/React__default.createElement(OverlayContainer, {
12130
12219
  className: classNames.container
12131
12220
  }, /*#__PURE__*/React__default.createElement(OverlayInner$2, {
@@ -12145,15 +12234,15 @@ var SelfieCaptureLoadingOverlayLegacy = function SelfieCaptureLoadingOverlayLega
12145
12234
  className: classNames.buttonsRow
12146
12235
  }, /*#__PURE__*/React__default.createElement(LoaderButton, {
12147
12236
  variant: "positive",
12148
- disabled: !cameraReady || !allModelsReady,
12149
- finished: cameraReady && allModelsReady,
12237
+ disabled: !ready,
12238
+ finished: ready,
12150
12239
  className: classNames.continueBtn,
12151
12240
  colors: colors.continueBtn,
12152
12241
  onClick: function onClick() {
12153
12242
  setDismissed(true);
12154
12243
  onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
12155
12244
  }
12156
- }, cameraReady && allModelsReady ? verbiage.continueText : allModelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? "".concat(verbiage.modelsWarmingUpText) : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))));
12245
+ }, ready ? verbiage.continueText : allModelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? "".concat(verbiage.modelsWarmingUpText) : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))));
12157
12246
  };
12158
12247
  var StyledGuidanceMessage$1 = styled(GuidanceMessage)(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n padding: 12px 24px;\n font-weight: normal;\n line-height: 1.5;\n margin-bottom: -30px;\n"], ["\n padding: 12px 24px;\n font-weight: normal;\n line-height: 1.5;\n margin-bottom: -30px;\n"])));
12159
12248
  var StyledButtonsRow$6 = styled(ButtonsRow)(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n flex-direction: column;\n padding-top: 25px;\n"], ["\n flex-direction: column;\n padding-top: 25px;\n"])));
@@ -12181,6 +12270,8 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
12181
12270
  colors = _e === void 0 ? {} : _e,
12182
12271
  _f = _a.verbiage,
12183
12272
  rawVerbiage = _f === void 0 ? {} : _f;
12273
+ var sessionCheckState = useAuthContext()[0].sessionCheckState;
12274
+ var sessionReady = sessionCheckState === 'PASSED';
12184
12275
  var _g = useCameraStore(useShallow(function (state) {
12185
12276
  return {
12186
12277
  cameraReady: state.cameraReady,
@@ -12191,7 +12282,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
12191
12282
  cameraReady = _g.cameraReady,
12192
12283
  cameraAccessDenied = _g.cameraAccessDenied,
12193
12284
  microphoneAccessDenied = _g.microphoneAccessDenied;
12194
- var _h = useContext(SelfieGuidanceModelsContext),
12285
+ var _h = useSelfieGuidanceModelsContext(),
12195
12286
  modelsReady = _h.ready,
12196
12287
  modelDownloadProgress = _h.modelDownloadProgress;
12197
12288
  var idCaptureModelsContext = useContext(IdCaptureModelsContext);
@@ -12204,7 +12295,8 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
12204
12295
  cameraInitializedText: 'Camera ready',
12205
12296
  downloadingText: 'Downloading...',
12206
12297
  modelsWarmingUpText: 'Loading guided capture experience...',
12207
- modelsReadyText: 'Guided capture experience ready'
12298
+ modelsReadyText: 'Guided capture experience ready',
12299
+ sessionCheckingText: 'Checking session...'
12208
12300
  });
12209
12301
  var _j = useState(0),
12210
12302
  headingTextIndex = _j[0],
@@ -12238,6 +12330,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
12238
12330
  });
12239
12331
  }
12240
12332
  var allModelsReady = modelsReady && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
12333
+ var ready = sessionReady && allModelsReady && cameraReady;
12241
12334
  return /*#__PURE__*/React__default.createElement(OverlayContainer, {
12242
12335
  className: classNames.container
12243
12336
  }, /*#__PURE__*/React__default.createElement(OverlayInner, {
@@ -12273,18 +12366,18 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
12273
12366
  }, /*#__PURE__*/React__default.createElement(LoadingList, {
12274
12367
  className: classNames.loadingList
12275
12368
  }, /*#__PURE__*/React__default.createElement(LoadingListItem, {
12276
- className: "".concat(classNames.loadingListItem, " ").concat(cameraReady ? 'done' : 'running')
12369
+ className: cn(classNames.loadingListItem, cameraReady ? 'done' : 'running')
12277
12370
  }, /*#__PURE__*/React__default.createElement(LoadingListItemIndicator, {
12278
12371
  className: classNames.loadingListItemIndicator,
12279
12372
  state: cameraReady ? 'done' : 'running'
12280
12373
  }), cameraReady ? verbiage.cameraInitializedText : verbiage.cameraInitializingText), /*#__PURE__*/React__default.createElement(LoadingListItem, {
12281
- className: "".concat(classNames.loadingListItem, " ").concat(allModelsReady ? 'done' : 'running')
12374
+ className: cn(classNames.loadingListItem, sessionReady && allModelsReady ? 'done' : 'running')
12282
12375
  }, /*#__PURE__*/React__default.createElement(LoadingListItemIndicator, {
12283
12376
  className: classNames.loadingListItemIndicator,
12284
- state: allModelsReady ? 'done' : 'running'
12285
- }), allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer, {
12377
+ state: sessionReady && allModelsReady ? 'done' : 'running'
12378
+ }), !sessionReady ? verbiage.sessionCheckingText : !allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer, {
12286
12379
  className: classNames.continueBtnContainer
12287
- }, allModelsReady && cameraReady && ( /*#__PURE__*/React__default.createElement(ContinueButton, {
12380
+ }, ready && ( /*#__PURE__*/React__default.createElement(ContinueButton, {
12288
12381
  autoFocus: true,
12289
12382
  finished: true,
12290
12383
  className: classNames.continueBtn,