@sekyro/web 0.1.0-rc.11 → 0.1.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{capture-session-doc-DMQ7T3HC.js → capture-session-doc-7LQAOCHJ.js} +1 -1
- package/dist/{capture-session-v3-DYrhYJoM.d.ts → capture-session-v3-C5DRPBhM.d.ts} +1 -1
- package/dist/{capture-session-v3-CCHws1mz.d.cts → capture-session-v3-Db4n6d-k.d.cts} +1 -1
- package/dist/chunk-57VOMVKM.js +1 -0
- package/dist/{chunk-LUKTHL6K.js → chunk-5OIC5TZS.js} +1 -1
- package/dist/{chunk-JDGEZ542.js → chunk-H6H2RT6M.js} +1 -1
- package/dist/{chunk-HHCGQSD4.js → chunk-IBA5CPDV.js} +1 -1
- package/dist/{chunk-IJLHPX35.js → chunk-JRSIMNB5.js} +1 -1
- package/dist/chunk-UBDG5IAP.js +1 -0
- package/dist/{chunk-OWU22VXP.js → chunk-VJM76LUI.js} +1 -1
- package/dist/chunk-WTQE6IGL.js +1 -0
- package/dist/chunk-XBVSYVKA.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +5 -5
- package/dist/client/index.d.ts +5 -5
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +1 -1
- package/dist/{create-document-capture-FV4XGUKQ.js → create-document-capture-RTFDQSBC.js} +1 -1
- package/dist/{create-verification-CzLrQjeM.d.cts → create-verification-BV_T0-CR.d.cts} +39 -13
- package/dist/{create-verification-CmJzn7sq.d.ts → create-verification-P6i3tyce.d.ts} +39 -13
- package/dist/{icao-gate-BeznQECA.d.cts → icao-gate-B0GDH_JS.d.cts} +13 -5
- package/dist/{icao-gate-Bw5sQVlt.d.ts → icao-gate-BP11XO-h.d.ts} +13 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +36 -10
- package/dist/index.d.ts +36 -10
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +7 -6
- package/dist/internal/index.d.ts +7 -6
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-RVVF5DJV.js +1 -0
- package/dist/{types-BWyAHKt_.d.cts → types-DPWT_KMn.d.cts} +57 -14
- package/dist/{types-BWyAHKt_.d.ts → types-DPWT_KMn.d.ts} +57 -14
- package/package.json +1 -1
- package/sbom.cdx.json +7 -7
- package/dist/chunk-AHD4DA2V.js +0 -1
- package/dist/chunk-MXNZMTC2.js +0 -1
- package/dist/chunk-URUKV6NC.js +0 -1
- package/dist/chunk-V5K2JLC7.js +0 -1
- package/dist/plan-runner-ZVAY4FSB.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a_ as DocCatalogEntry, a$ as LiveMrzTuning, b0 as TextLockTuning, b1 as OcrEngineClient, b2 as DocAssistReport, b3 as ReadyInfo, b4 as LoadFailure, b5 as OcrEngineOptions, b6 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b7 as HostedClientLike } from '../create-verification-
|
|
2
|
-
export { b8 as ANALYSIS_LONG_EDGE, b9 as ASPECT_BANDS, ba as AttestationError, bb as BLUR_REFUSE_SHARPNESS_MAX, bc as BlurStatus, bd as CAPTURE_CANDIDATE_SPACING_MS, be as CAPTURE_EXTRA_CANDIDATES, bf as CLIP_MIME_ALLOWLIST, bg as CaptureEngine, bh as CaptureSessionDoc, bi as CaptureSessionDocEvents, bj as CaptureSessionDocOptions, bk as DOC_ANALYSIS_DEFAULTS, bl as DOC_CADENCE_HZ, bm as DOC_CAMERA_TUNING_DEFAULTS, bn as DOC_CATALOG, bo as DOC_DETECT_WIDTH, bp as DOC_FEEDBACK_STATES, bq as DOC_GATE_V1_DEFAULTS, br as DOC_SHUTTER_DEFAULTS, bs as DeviceReadHint, bt as DocArtifacts, bu as DocAssist, bv as DocAssistEngine, bw as DocAssistTick, bx as DocCameraTuning, by as DocCaptureReport, bz as DocCaptureVia, bA as DocChecksPayload, bB as DocEngineLike, bC as DocFeedbackAggregator, bD as DocFeedbackKey, bE as DocFeedbackState, bF as DocFormat, bG as DocFrameAnalysis, bH as DocFrameMeasures, bI as DocGateQuality, bJ as DocGateThresholds, bK as DocGateTick, bL as DocGateTickInput, bM as DocGateV1, bN as DocQuad, bO as DocQuadPoint, bP as DocShutterReason, bQ as DocShutterTuning, bR as DocSide, bS as DocumentCaptureController, bT as DocumentCaptureInternals, bU as EMPTY_GUIDE_METRICS, bV as EncodedDocument, bW as FLIP_FILL_MIN, bX as FLIP_GAP_MS, bY as FLIP_TIMEOUT_MS, bZ as FocusCaps, b_ as FramingStatus, b$ as GUIDE_LOCK_DEFAULTS, c0 as GlareStatus, c1 as GrabbedFrame, c2 as GuideBlocker, c3 as GuideLock, c4 as GuideLockTick, c5 as GuideLockTuning, c6 as GuideMetrics, c7 as GuideRect, c8 as INFERENCE_RETRY_ATTEMPTS, c9 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, ca as LANDMARKER_MODEL, cb as LENS_STORAGE_KEY, cc as LENS_TRY_MAX, cd as LIVE_MRZ_DEFAULTS, ce as LIVE_PHOTO_IDLE_MS, cf as LIVE_PHOTO_MAX_HZ, cg as LandmarkedFace, ch as LandmarkerLike, ci as LensKind, cj as LensSource, ck as LightingStatus, cl as LiveMrzCapture, cm as LiveMrzState, cn as LivePhotoGate, co as LivePhotoKit, cp as LivePhotoKitInternals, cq as LivePhotoKitOptions, cr as LivePhotoStill, cs as LivenessCaptureInternalHandle, ct as LivenessCaptureInternals, cu as LivenessFlowDeps, cv as LivenessFlowOutcome, cw as MANUAL_SHUTTER_MS, cx as MR_DOC_CATALOG, cy as NO_REPORT_MS, cz as OpenDocCameraDeps, cA as PORTRAIT_JPEG_QUALITY, cB as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cC as PRELOAD_BUDGET_MS, cD as PROCESSING_POLL_DELAY_MS, cE as PROCESSING_POLL_MAX, cF as PortraitCaptureController, cG as PortraitCaptureInternals, cH as REGISTRY_RETRY_DELAY_MS, cI as ReticleType, cJ as SAME_FACE_MAX_DROPS, cK as ScanEvent, cL as ScanLayout, cM as ScanNotice, cN as ScanPhase, cO as ScanReport, cP as ScanSide, cQ as ScanState, cR as SubmitExecutor, cS as TEXT_LOCK_DEFAULTS, cT as TRANSPORT_REPLAY_ATTEMPTS, cU as TRANSPORT_REPLAY_DELAY_MS, cV as VerificationInternals, cW as analyzeDocFrame, cX as analyzeGuide, cY as aspectBand, cZ as aspectFits, c_ as buildDeviceReadHint, c$ as coverPointToVideo, d0 as createDocumentCaptureInternal, d1 as createFaceLandmarker, d2 as createLivePhotoKit, d3 as createLivenessCaptureInternal, d4 as createPortraitCaptureInternal, d5 as createVerificationInternal, d6 as docZoomFor, d7 as encodeDocumentImage, d8 as facesOf, d9 as feedbackVoteOf, da as focusOk, db as guideQuad, dc as guideRegionInFrame, dd as initialScanState, de as lensKindOf, df as mapEngineState, dg as mapErrorKind, dh as mapGuidanceHint, di as nextScanState, dj as observePortraitFrame, dk as openDocCamera, dl as passportBandOf, dm as portraitMatchStep, dn as preloadedDetectorFactory, dp as quadAreaFrac, dq as quadBounds, dr as quadIou, ds as quadTiltRatio, dt as randomUuid, du as rankBackCameras, dv as readStoredLens, dw as resetLivenessAssetsForTests, dx as resolveDocCameraTuning, dy as resolveDocShutterTuning, dz as resolveGuideLockTuning, dA as runLivenessFlow, dB as runSubmission, dC as scannerFormatFor, dD as setPreloadLoaderForTests, dE as settledHint, dF as singleShotFocusAt, dG as specularFraction, dH as supportsFocusMode, dI as warmDocDetector, dJ as writeStoredLens } from '../create-verification-
|
|
1
|
+
import { a_ as DocCatalogEntry, a$ as LiveMrzTuning, b0 as TextLockTuning, b1 as OcrEngineClient, b2 as DocAssistReport, b3 as ReadyInfo, b4 as LoadFailure, b5 as OcrEngineOptions, b6 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b7 as HostedClientLike } from '../create-verification-BV_T0-CR.cjs';
|
|
2
|
+
export { b8 as ANALYSIS_LONG_EDGE, b9 as ASPECT_BANDS, ba as AttestationError, bb as BLUR_REFUSE_SHARPNESS_MAX, bc as BlurStatus, bd as CAPTURE_CANDIDATE_SPACING_MS, be as CAPTURE_EXTRA_CANDIDATES, bf as CLIP_MIME_ALLOWLIST, bg as CaptureEngine, bh as CaptureSessionDoc, bi as CaptureSessionDocEvents, bj as CaptureSessionDocOptions, bk as DOC_ANALYSIS_DEFAULTS, bl as DOC_CADENCE_HZ, bm as DOC_CAMERA_TUNING_DEFAULTS, bn as DOC_CATALOG, bo as DOC_DETECT_WIDTH, bp as DOC_FEEDBACK_STATES, bq as DOC_GATE_V1_DEFAULTS, br as DOC_SHUTTER_DEFAULTS, bs as DeviceReadHint, bt as DocArtifacts, bu as DocAssist, bv as DocAssistEngine, bw as DocAssistTick, bx as DocCameraTuning, by as DocCaptureReport, bz as DocCaptureVia, bA as DocChecksPayload, bB as DocEngineLike, bC as DocFeedbackAggregator, bD as DocFeedbackKey, bE as DocFeedbackState, bF as DocFormat, bG as DocFrameAnalysis, bH as DocFrameMeasures, bI as DocGateQuality, bJ as DocGateThresholds, bK as DocGateTick, bL as DocGateTickInput, bM as DocGateV1, bN as DocQuad, bO as DocQuadPoint, bP as DocShutterReason, bQ as DocShutterTuning, bR as DocSide, bS as DocumentCaptureController, bT as DocumentCaptureInternals, bU as EMPTY_GUIDE_METRICS, bV as EncodedDocument, bW as FLIP_FILL_MIN, bX as FLIP_GAP_MS, bY as FLIP_TIMEOUT_MS, bZ as FocusCaps, b_ as FramingStatus, b$ as GUIDE_LOCK_DEFAULTS, c0 as GlareStatus, c1 as GrabbedFrame, c2 as GuideBlocker, c3 as GuideLock, c4 as GuideLockTick, c5 as GuideLockTuning, c6 as GuideMetrics, c7 as GuideRect, c8 as INFERENCE_RETRY_ATTEMPTS, c9 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, ca as LANDMARKER_MODEL, cb as LENS_STORAGE_KEY, cc as LENS_TRY_MAX, cd as LIVE_MRZ_DEFAULTS, ce as LIVE_PHOTO_IDLE_MS, cf as LIVE_PHOTO_MAX_HZ, cg as LandmarkedFace, ch as LandmarkerLike, ci as LensKind, cj as LensSource, ck as LightingStatus, cl as LiveMrzCapture, cm as LiveMrzState, cn as LivePhotoGate, co as LivePhotoKit, cp as LivePhotoKitInternals, cq as LivePhotoKitOptions, cr as LivePhotoStill, cs as LivenessCaptureInternalHandle, ct as LivenessCaptureInternals, cu as LivenessFlowDeps, cv as LivenessFlowOutcome, cw as MANUAL_SHUTTER_MS, cx as MR_DOC_CATALOG, cy as NO_REPORT_MS, cz as OpenDocCameraDeps, cA as PORTRAIT_JPEG_QUALITY, cB as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cC as PRELOAD_BUDGET_MS, cD as PROCESSING_POLL_DELAY_MS, cE as PROCESSING_POLL_MAX, cF as PortraitCaptureController, cG as PortraitCaptureInternals, cH as REGISTRY_RETRY_DELAY_MS, cI as ReticleType, cJ as SAME_FACE_MAX_DROPS, cK as ScanEvent, cL as ScanLayout, cM as ScanNotice, cN as ScanPhase, cO as ScanReport, cP as ScanSide, cQ as ScanState, cR as SubmitExecutor, cS as TEXT_LOCK_DEFAULTS, cT as TRANSPORT_REPLAY_ATTEMPTS, cU as TRANSPORT_REPLAY_DELAY_MS, cV as VerificationInternals, cW as analyzeDocFrame, cX as analyzeGuide, cY as aspectBand, cZ as aspectFits, c_ as buildDeviceReadHint, c$ as coverPointToVideo, d0 as createDocumentCaptureInternal, d1 as createFaceLandmarker, d2 as createLivePhotoKit, d3 as createLivenessCaptureInternal, d4 as createPortraitCaptureInternal, d5 as createVerificationInternal, d6 as docZoomFor, d7 as encodeDocumentImage, d8 as facesOf, d9 as feedbackVoteOf, da as focusOk, db as guideQuad, dc as guideRegionInFrame, dd as initialScanState, de as lensKindOf, df as mapEngineState, dg as mapErrorKind, dh as mapGuidanceHint, di as nextScanState, dj as observePortraitFrame, dk as openDocCamera, dl as passportBandOf, dm as portraitMatchStep, dn as preloadedDetectorFactory, dp as quadAreaFrac, dq as quadBounds, dr as quadIou, ds as quadTiltRatio, dt as randomUuid, du as rankBackCameras, dv as readStoredLens, dw as resetLivenessAssetsForTests, dx as resolveDocCameraTuning, dy as resolveDocShutterTuning, dz as resolveGuideLockTuning, dA as runLivenessFlow, dB as runSubmission, dC as scannerFormatFor, dD as setPreloadLoaderForTests, dE as settledHint, dF as singleShotFocusAt, dG as specularFraction, dH as supportsFocusMode, dI as warmDocDetector, dJ as writeStoredLens } from '../create-verification-BV_T0-CR.cjs';
|
|
3
3
|
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-B5omafmk.cjs';
|
|
4
|
-
import { H as HostedSessionView, e as CheckType,
|
|
5
|
-
export {
|
|
6
|
-
export { B as BackgroundStats, e as Box, C as CLIPPED_LUMA, F as FaceGeometry, f as FaceLighting, H as HeadPose, g as ICAO_CANVAS, h as ICAO_GATE_CRITERIA, i as ICAO_SHARP_REF, I as IcaoCoachKey, a as IcaoCriterionState, j as IcaoFrameObservation, k as IcaoGate, b as IcaoGateCriterion, l as IcaoGateOptions, c as IcaoGateSummary, d as IcaoGateUpdate, m as IcaoJudgedCriterion, n as IcaoMeasures, o as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, p as backgroundStats, q as createIcaoGate, r as eyeLineRoll, s as eyeOpenness, t as eyeSpecular, u as faceGeometry, v as faceLighting, w as faceSharpness, x as icaoPixelStats, y as icaoWindow, z as judgeIcao, A as lumaPlane, D as percentile, E as portraitCropRegion, G as poseFromMatrix, J as regionStats, K as scoreFrame, M as windowOverflow } from '../icao-gate-
|
|
4
|
+
import { H as HostedSessionView, e as CheckType, k as CheckReason, ae as PlanStepView } from '../types-DPWT_KMn.cjs';
|
|
5
|
+
export { at as ICAO_FALLBACK, Y as IcaoCaptureTuning, au as IcaoProfile, R as ResolvedIcaoTuning, av as resolveIcaoTuning } from '../types-DPWT_KMn.cjs';
|
|
6
|
+
export { B as BackgroundStats, e as Box, C as CLIPPED_LUMA, F as FaceGeometry, f as FaceLighting, H as HeadPose, g as ICAO_CANVAS, h as ICAO_GATE_CRITERIA, i as ICAO_SHARP_REF, I as IcaoCoachKey, a as IcaoCriterionState, j as IcaoFrameObservation, k as IcaoGate, b as IcaoGateCriterion, l as IcaoGateOptions, c as IcaoGateSummary, d as IcaoGateUpdate, m as IcaoJudgedCriterion, n as IcaoMeasures, o as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, p as backgroundStats, q as createIcaoGate, r as eyeLineRoll, s as eyeOpenness, t as eyeSpecular, u as faceGeometry, v as faceLighting, w as faceSharpness, x as icaoPixelStats, y as icaoWindow, z as judgeIcao, A as lumaPlane, D as percentile, E as portraitCropRegion, G as poseFromMatrix, J as regionStats, K as scoreFrame, M as windowOverflow } from '../icao-gate-B0GDH_JS.cjs';
|
|
7
7
|
import '../detect-worker-DclNxkZT.cjs';
|
|
8
|
-
import '../capture-session-v3-
|
|
8
|
+
import '../capture-session-v3-Db4n6d-k.cjs';
|
|
9
9
|
|
|
10
10
|
type DocumentTypeId = DocCatalogEntry["docType"];
|
|
11
11
|
/** Same shape as the hosted view's `acceptedDocuments`. */
|
|
@@ -315,6 +315,7 @@ declare function createStepRunner(deps: RunnerDeps): StepRunner;
|
|
|
315
315
|
* Reasons the backend parks at `input_required` while attempts remain
|
|
316
316
|
* (identity-backend/src/checks/check-reasons.ts isRetryable tables — the single
|
|
317
317
|
* source of truth; identity-hosted/lib/reason-copy.ts mirrors the same rows).
|
|
318
|
+
* Each renamed reason is listed under both its names (person data spec Appendix A.2).
|
|
318
319
|
*/
|
|
319
320
|
declare const RETRYABLE_REASONS: ReadonlySet<CheckReason>;
|
|
320
321
|
/** A check the browser may still submit. */
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a_ as DocCatalogEntry, a$ as LiveMrzTuning, b0 as TextLockTuning, b1 as OcrEngineClient, b2 as DocAssistReport, b3 as ReadyInfo, b4 as LoadFailure, b5 as OcrEngineOptions, b6 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b7 as HostedClientLike } from '../create-verification-
|
|
2
|
-
export { b8 as ANALYSIS_LONG_EDGE, b9 as ASPECT_BANDS, ba as AttestationError, bb as BLUR_REFUSE_SHARPNESS_MAX, bc as BlurStatus, bd as CAPTURE_CANDIDATE_SPACING_MS, be as CAPTURE_EXTRA_CANDIDATES, bf as CLIP_MIME_ALLOWLIST, bg as CaptureEngine, bh as CaptureSessionDoc, bi as CaptureSessionDocEvents, bj as CaptureSessionDocOptions, bk as DOC_ANALYSIS_DEFAULTS, bl as DOC_CADENCE_HZ, bm as DOC_CAMERA_TUNING_DEFAULTS, bn as DOC_CATALOG, bo as DOC_DETECT_WIDTH, bp as DOC_FEEDBACK_STATES, bq as DOC_GATE_V1_DEFAULTS, br as DOC_SHUTTER_DEFAULTS, bs as DeviceReadHint, bt as DocArtifacts, bu as DocAssist, bv as DocAssistEngine, bw as DocAssistTick, bx as DocCameraTuning, by as DocCaptureReport, bz as DocCaptureVia, bA as DocChecksPayload, bB as DocEngineLike, bC as DocFeedbackAggregator, bD as DocFeedbackKey, bE as DocFeedbackState, bF as DocFormat, bG as DocFrameAnalysis, bH as DocFrameMeasures, bI as DocGateQuality, bJ as DocGateThresholds, bK as DocGateTick, bL as DocGateTickInput, bM as DocGateV1, bN as DocQuad, bO as DocQuadPoint, bP as DocShutterReason, bQ as DocShutterTuning, bR as DocSide, bS as DocumentCaptureController, bT as DocumentCaptureInternals, bU as EMPTY_GUIDE_METRICS, bV as EncodedDocument, bW as FLIP_FILL_MIN, bX as FLIP_GAP_MS, bY as FLIP_TIMEOUT_MS, bZ as FocusCaps, b_ as FramingStatus, b$ as GUIDE_LOCK_DEFAULTS, c0 as GlareStatus, c1 as GrabbedFrame, c2 as GuideBlocker, c3 as GuideLock, c4 as GuideLockTick, c5 as GuideLockTuning, c6 as GuideMetrics, c7 as GuideRect, c8 as INFERENCE_RETRY_ATTEMPTS, c9 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, ca as LANDMARKER_MODEL, cb as LENS_STORAGE_KEY, cc as LENS_TRY_MAX, cd as LIVE_MRZ_DEFAULTS, ce as LIVE_PHOTO_IDLE_MS, cf as LIVE_PHOTO_MAX_HZ, cg as LandmarkedFace, ch as LandmarkerLike, ci as LensKind, cj as LensSource, ck as LightingStatus, cl as LiveMrzCapture, cm as LiveMrzState, cn as LivePhotoGate, co as LivePhotoKit, cp as LivePhotoKitInternals, cq as LivePhotoKitOptions, cr as LivePhotoStill, cs as LivenessCaptureInternalHandle, ct as LivenessCaptureInternals, cu as LivenessFlowDeps, cv as LivenessFlowOutcome, cw as MANUAL_SHUTTER_MS, cx as MR_DOC_CATALOG, cy as NO_REPORT_MS, cz as OpenDocCameraDeps, cA as PORTRAIT_JPEG_QUALITY, cB as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cC as PRELOAD_BUDGET_MS, cD as PROCESSING_POLL_DELAY_MS, cE as PROCESSING_POLL_MAX, cF as PortraitCaptureController, cG as PortraitCaptureInternals, cH as REGISTRY_RETRY_DELAY_MS, cI as ReticleType, cJ as SAME_FACE_MAX_DROPS, cK as ScanEvent, cL as ScanLayout, cM as ScanNotice, cN as ScanPhase, cO as ScanReport, cP as ScanSide, cQ as ScanState, cR as SubmitExecutor, cS as TEXT_LOCK_DEFAULTS, cT as TRANSPORT_REPLAY_ATTEMPTS, cU as TRANSPORT_REPLAY_DELAY_MS, cV as VerificationInternals, cW as analyzeDocFrame, cX as analyzeGuide, cY as aspectBand, cZ as aspectFits, c_ as buildDeviceReadHint, c$ as coverPointToVideo, d0 as createDocumentCaptureInternal, d1 as createFaceLandmarker, d2 as createLivePhotoKit, d3 as createLivenessCaptureInternal, d4 as createPortraitCaptureInternal, d5 as createVerificationInternal, d6 as docZoomFor, d7 as encodeDocumentImage, d8 as facesOf, d9 as feedbackVoteOf, da as focusOk, db as guideQuad, dc as guideRegionInFrame, dd as initialScanState, de as lensKindOf, df as mapEngineState, dg as mapErrorKind, dh as mapGuidanceHint, di as nextScanState, dj as observePortraitFrame, dk as openDocCamera, dl as passportBandOf, dm as portraitMatchStep, dn as preloadedDetectorFactory, dp as quadAreaFrac, dq as quadBounds, dr as quadIou, ds as quadTiltRatio, dt as randomUuid, du as rankBackCameras, dv as readStoredLens, dw as resetLivenessAssetsForTests, dx as resolveDocCameraTuning, dy as resolveDocShutterTuning, dz as resolveGuideLockTuning, dA as runLivenessFlow, dB as runSubmission, dC as scannerFormatFor, dD as setPreloadLoaderForTests, dE as settledHint, dF as singleShotFocusAt, dG as specularFraction, dH as supportsFocusMode, dI as warmDocDetector, dJ as writeStoredLens } from '../create-verification-
|
|
1
|
+
import { a_ as DocCatalogEntry, a$ as LiveMrzTuning, b0 as TextLockTuning, b1 as OcrEngineClient, b2 as DocAssistReport, b3 as ReadyInfo, b4 as LoadFailure, b5 as OcrEngineOptions, b6 as SubmitRuntime, a1 as LivenessCaptureOptions, a0 as LivenessCaptureHandle, aJ as VerificationStep, aH as VerificationResult, ay as StepSnapshot, Y as LivePhotoGateUpdate, b7 as HostedClientLike } from '../create-verification-P6i3tyce.js';
|
|
2
|
+
export { b8 as ANALYSIS_LONG_EDGE, b9 as ASPECT_BANDS, ba as AttestationError, bb as BLUR_REFUSE_SHARPNESS_MAX, bc as BlurStatus, bd as CAPTURE_CANDIDATE_SPACING_MS, be as CAPTURE_EXTRA_CANDIDATES, bf as CLIP_MIME_ALLOWLIST, bg as CaptureEngine, bh as CaptureSessionDoc, bi as CaptureSessionDocEvents, bj as CaptureSessionDocOptions, bk as DOC_ANALYSIS_DEFAULTS, bl as DOC_CADENCE_HZ, bm as DOC_CAMERA_TUNING_DEFAULTS, bn as DOC_CATALOG, bo as DOC_DETECT_WIDTH, bp as DOC_FEEDBACK_STATES, bq as DOC_GATE_V1_DEFAULTS, br as DOC_SHUTTER_DEFAULTS, bs as DeviceReadHint, bt as DocArtifacts, bu as DocAssist, bv as DocAssistEngine, bw as DocAssistTick, bx as DocCameraTuning, by as DocCaptureReport, bz as DocCaptureVia, bA as DocChecksPayload, bB as DocEngineLike, bC as DocFeedbackAggregator, bD as DocFeedbackKey, bE as DocFeedbackState, bF as DocFormat, bG as DocFrameAnalysis, bH as DocFrameMeasures, bI as DocGateQuality, bJ as DocGateThresholds, bK as DocGateTick, bL as DocGateTickInput, bM as DocGateV1, bN as DocQuad, bO as DocQuadPoint, bP as DocShutterReason, bQ as DocShutterTuning, bR as DocSide, bS as DocumentCaptureController, bT as DocumentCaptureInternals, bU as EMPTY_GUIDE_METRICS, bV as EncodedDocument, bW as FLIP_FILL_MIN, bX as FLIP_GAP_MS, bY as FLIP_TIMEOUT_MS, bZ as FocusCaps, b_ as FramingStatus, b$ as GUIDE_LOCK_DEFAULTS, c0 as GlareStatus, c1 as GrabbedFrame, c2 as GuideBlocker, c3 as GuideLock, c4 as GuideLockTick, c5 as GuideLockTuning, c6 as GuideMetrics, c7 as GuideRect, c8 as INFERENCE_RETRY_ATTEMPTS, c9 as INFERENCE_RETRY_DEFAULT_S, U as ISSUER_CODES, ca as LANDMARKER_MODEL, cb as LENS_STORAGE_KEY, cc as LENS_TRY_MAX, cd as LIVE_MRZ_DEFAULTS, ce as LIVE_PHOTO_IDLE_MS, cf as LIVE_PHOTO_MAX_HZ, cg as LandmarkedFace, ch as LandmarkerLike, ci as LensKind, cj as LensSource, ck as LightingStatus, cl as LiveMrzCapture, cm as LiveMrzState, cn as LivePhotoGate, co as LivePhotoKit, cp as LivePhotoKitInternals, cq as LivePhotoKitOptions, cr as LivePhotoStill, cs as LivenessCaptureInternalHandle, ct as LivenessCaptureInternals, cu as LivenessFlowDeps, cv as LivenessFlowOutcome, cw as MANUAL_SHUTTER_MS, cx as MR_DOC_CATALOG, cy as NO_REPORT_MS, cz as OpenDocCameraDeps, cA as PORTRAIT_JPEG_QUALITY, cB as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cC as PRELOAD_BUDGET_MS, cD as PROCESSING_POLL_DELAY_MS, cE as PROCESSING_POLL_MAX, cF as PortraitCaptureController, cG as PortraitCaptureInternals, cH as REGISTRY_RETRY_DELAY_MS, cI as ReticleType, cJ as SAME_FACE_MAX_DROPS, cK as ScanEvent, cL as ScanLayout, cM as ScanNotice, cN as ScanPhase, cO as ScanReport, cP as ScanSide, cQ as ScanState, cR as SubmitExecutor, cS as TEXT_LOCK_DEFAULTS, cT as TRANSPORT_REPLAY_ATTEMPTS, cU as TRANSPORT_REPLAY_DELAY_MS, cV as VerificationInternals, cW as analyzeDocFrame, cX as analyzeGuide, cY as aspectBand, cZ as aspectFits, c_ as buildDeviceReadHint, c$ as coverPointToVideo, d0 as createDocumentCaptureInternal, d1 as createFaceLandmarker, d2 as createLivePhotoKit, d3 as createLivenessCaptureInternal, d4 as createPortraitCaptureInternal, d5 as createVerificationInternal, d6 as docZoomFor, d7 as encodeDocumentImage, d8 as facesOf, d9 as feedbackVoteOf, da as focusOk, db as guideQuad, dc as guideRegionInFrame, dd as initialScanState, de as lensKindOf, df as mapEngineState, dg as mapErrorKind, dh as mapGuidanceHint, di as nextScanState, dj as observePortraitFrame, dk as openDocCamera, dl as passportBandOf, dm as portraitMatchStep, dn as preloadedDetectorFactory, dp as quadAreaFrac, dq as quadBounds, dr as quadIou, ds as quadTiltRatio, dt as randomUuid, du as rankBackCameras, dv as readStoredLens, dw as resetLivenessAssetsForTests, dx as resolveDocCameraTuning, dy as resolveDocShutterTuning, dz as resolveGuideLockTuning, dA as runLivenessFlow, dB as runSubmission, dC as scannerFormatFor, dD as setPreloadLoaderForTests, dE as settledHint, dF as singleShotFocusAt, dG as specularFraction, dH as supportsFocusMode, dI as warmDocDetector, dJ as writeStoredLens } from '../create-verification-P6i3tyce.js';
|
|
3
3
|
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-B5omafmk.js';
|
|
4
|
-
import { H as HostedSessionView, e as CheckType,
|
|
5
|
-
export {
|
|
6
|
-
export { B as BackgroundStats, e as Box, C as CLIPPED_LUMA, F as FaceGeometry, f as FaceLighting, H as HeadPose, g as ICAO_CANVAS, h as ICAO_GATE_CRITERIA, i as ICAO_SHARP_REF, I as IcaoCoachKey, a as IcaoCriterionState, j as IcaoFrameObservation, k as IcaoGate, b as IcaoGateCriterion, l as IcaoGateOptions, c as IcaoGateSummary, d as IcaoGateUpdate, m as IcaoJudgedCriterion, n as IcaoMeasures, o as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, p as backgroundStats, q as createIcaoGate, r as eyeLineRoll, s as eyeOpenness, t as eyeSpecular, u as faceGeometry, v as faceLighting, w as faceSharpness, x as icaoPixelStats, y as icaoWindow, z as judgeIcao, A as lumaPlane, D as percentile, E as portraitCropRegion, G as poseFromMatrix, J as regionStats, K as scoreFrame, M as windowOverflow } from '../icao-gate-
|
|
4
|
+
import { H as HostedSessionView, e as CheckType, k as CheckReason, ae as PlanStepView } from '../types-DPWT_KMn.js';
|
|
5
|
+
export { at as ICAO_FALLBACK, Y as IcaoCaptureTuning, au as IcaoProfile, R as ResolvedIcaoTuning, av as resolveIcaoTuning } from '../types-DPWT_KMn.js';
|
|
6
|
+
export { B as BackgroundStats, e as Box, C as CLIPPED_LUMA, F as FaceGeometry, f as FaceLighting, H as HeadPose, g as ICAO_CANVAS, h as ICAO_GATE_CRITERIA, i as ICAO_SHARP_REF, I as IcaoCoachKey, a as IcaoCriterionState, j as IcaoFrameObservation, k as IcaoGate, b as IcaoGateCriterion, l as IcaoGateOptions, c as IcaoGateSummary, d as IcaoGateUpdate, m as IcaoJudgedCriterion, n as IcaoMeasures, o as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, p as backgroundStats, q as createIcaoGate, r as eyeLineRoll, s as eyeOpenness, t as eyeSpecular, u as faceGeometry, v as faceLighting, w as faceSharpness, x as icaoPixelStats, y as icaoWindow, z as judgeIcao, A as lumaPlane, D as percentile, E as portraitCropRegion, G as poseFromMatrix, J as regionStats, K as scoreFrame, M as windowOverflow } from '../icao-gate-BP11XO-h.js';
|
|
7
7
|
import '../detect-worker-DclNxkZT.js';
|
|
8
|
-
import '../capture-session-v3-
|
|
8
|
+
import '../capture-session-v3-C5DRPBhM.js';
|
|
9
9
|
|
|
10
10
|
type DocumentTypeId = DocCatalogEntry["docType"];
|
|
11
11
|
/** Same shape as the hosted view's `acceptedDocuments`. */
|
|
@@ -315,6 +315,7 @@ declare function createStepRunner(deps: RunnerDeps): StepRunner;
|
|
|
315
315
|
* Reasons the backend parks at `input_required` while attempts remain
|
|
316
316
|
* (identity-backend/src/checks/check-reasons.ts isRetryable tables — the single
|
|
317
317
|
* source of truth; identity-hosted/lib/reason-copy.ts mirrors the same rows).
|
|
318
|
+
* Each renamed reason is listed under both its names (person data spec Appendix A.2).
|
|
318
319
|
*/
|
|
319
320
|
declare const RETRYABLE_REASONS: ReadonlySet<CheckReason>;
|
|
320
321
|
/** A check the browser may still submit. */
|
package/dist/internal/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _e,d as Le,e as Re,g as Se,h as Te,i as ce}from"../chunk-
|
|
1
|
+
import{c as _e,d as Le,e as Re,g as Se,h as Te,i as ce}from"../chunk-XBVSYVKA.js";import{a as Bt,b as wt,c as zt,d as Vt,e as Xt,f as Zt,g as Jt,h as Qt,i as jt,j as ae,l as se,n as Ee,o as me}from"../chunk-73M7LS4H.js";import{b as pe,c as ie,d as ne}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import{a as d,b as M,c as F,d as N,e as v}from"../chunk-O5WKNZ2C.js";import{A as yt,B as ft,C as ut,D as Ot,E as At,F as It,G as xt,H as Ct,I as Pt,J as Dt,a as We,b as ke,c as Ke,d as Je,e as Qe,f as je,g as qe,h as $e,i as et,j as tt,k as rt,l as ot,m as pt,n as it,o as nt,p as at,q as st,r as Et,s as mt,t as _t,u as Lt,v as Rt,w as St,x as Tt,y as ct,z as lt}from"../chunk-VJM76LUI.js";import{a as Ye,b as He}from"../chunk-SMKCBUJL.js";import{a as Be,b as we,c as ze,d as Ve,e as Xe,f as Ze}from"../chunk-MXWLCDFX.js";import{a as k,b as Fe,c as Ne,d as ve,e as ge,f as be,g as Ge,h as he,i as Ue,j as K,k as B,l as w,m as Z,n as J,o as Q,p as j,q,r as $,s as ee,t as te,u as re,x as oe}from"../chunk-H6H2RT6M.js";import{a as g,b,c as G,d as h,e as U,f as Y,g as H,h as W,i as z,j as V,l as X}from"../chunk-G6LKLN4U.js";import{a as xe,b as Ce,c as Pe,d as De,e as de,f as Me}from"../chunk-TDLIXFDT.js";import{a as dt,b as Mt,c as Ft,d as Nt,e as vt,f as gt,g as bt,h as Gt,i as ht,j as Ut,k as Yt,l as Ht,m as Wt}from"../chunk-7ZCZY3ZP.js";import{a as kt,b as Kt}from"../chunk-BPE5NSQ2.js";import"../chunk-GI3UFGRQ.js";import{b as ye,c as fe,d as ue,e as Oe,g as Ae,h as qt,i as $t,j as er,k as tr,l as rr,m as or,s as Ie}from"../chunk-WTQE6IGL.js";import{c as S,i as T,j as c,k as l,l as y,n as f,p as u,q as O,r as A,s as I,t as x,u as C,v as P,w as D}from"../chunk-UBDG5IAP.js";import{a as i,b as n,c as a,d as s,i as E,j as m,k as _,l as L,m as R}from"../chunk-JRSIMNB5.js";import"../chunk-GT2ZLGF7.js";import"../chunk-IBA5CPDV.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-FUHDOEBP.js";import"../chunk-POIQGEZM.js";import"../chunk-FHJ7HO3M.js";import"../chunk-FPXL63KZ.js";import"../chunk-57VOMVKM.js";import"../chunk-5OIC5TZS.js";import"../chunk-OKWG3PVH.js";import{a as le}from"../chunk-DFTCAWMP.js";import"../chunk-DK5YPBDQ.js";export{ae as ANALYSIS_LONG_EDGE,xe as ASPECT_BANDS,C as AttestationError,Ge as BLUR_REFUSE_SHARPNESS_MAX,Dt as CAPTURE_CANDIDATE_SPACING_MS,Pt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,u as CLIP_MIME_ALLOWLIST,xt as CaptureSessionDoc,$t as DOCUMENT_TYPE_ORDER,Je as DOC_ANALYSIS_DEFAULTS,Ot as DOC_CADENCE_HZ,$e as DOC_CAMERA_TUNING_DEFAULTS,de as DOC_CATALOG,Be as DOC_DETECT_WIDTH,We as DOC_FEEDBACK_STATES,we as DOC_GATE_V1_DEFAULTS,At as DOC_SHUTTER_DEFAULTS,X as DocAssist,Ke as DocFeedbackAggregator,Ze as DocGateV1,Rt as EMPTY_GUIDE_METRICS,Ne as FLIP_FILL_MIN,Fe as FLIP_GAP_MS,ve as FLIP_TIMEOUT_MS,lt as GUIDE_LOCK_DEFAULTS,ft as GuideLock,Nt as ICAO_CANVAS,kt as ICAO_FALLBACK,Gt as ICAO_GATE_CRITERIA,wt as ICAO_SHARP_REF,I as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,qt as ISSUER_CODES,pe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,_t as LENS_TRY_MAX,V as LIVE_MRZ_DEFAULTS,Le as LIVE_PHOTO_IDLE_MS,_e as LIVE_PHOTO_MAX_HZ,ge as MANUAL_SHUTTER_MS,Ye as MRZ_BAND_DEFAULTS,De as MR_DOC_CATALOG,be as NO_REPORT_MS,le as OCR_ASSET_SET,Te as OTP_RESEND_COOLDOWN_MS,se as PORTRAIT_JPEG_QUALITY,i as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,Se as PROCESSING_BACKOFF_MS,fe as PROCESSING_POLL_DELAY_MS,ue as PROCESSING_POLL_MAX,G as REGION_PAD,ye as REGISTRY_RETRY_DELAY_MS,S as RETRYABLE_REASONS,re as SAME_FACE_MAX_DROPS,g as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,O as TRANSPORT_REPLAY_ATTEMPTS,A as TRANSPORT_REPLAY_DELAY_MS,M as TURNSTILE_EXECUTE_TIMEOUT_MS,d as TURNSTILE_SCRIPT_SRC,Q as WEB_OCR_ENGINE,tr as acceptedIssuers,er as acceptedTypesFor,qe as analyzeDocFrame,Tt as analyzeGuide,Ce as aspectBand,Pe as aspectFits,Jt as backgroundStats,$ as browserFamily,Z as buildDeviceReadHint,B as classifyCardSide,K as classifyCardSideWith,st as coverPointToVideo,oe as createDocumentCaptureInternal,ne as createFaceLandmarker,Wt as createIcaoGate,Re as createLivePhotoKit,R as createLivenessCaptureInternal,me as createPortraitCaptureInternal,ce as createStepRunner,Ae as createVerificationInternal,U as cropImage,e as detectFormFactor,t as detectIsMobile,He as detectMrzBand,Et as docZoomFor,k as encodeDocumentImage,v as executeTurnstile,Ft as eyeLineRoll,Ut as eyeOpenness,Zt as eyeSpecular,dt as faceGeometry,Xt as faceLighting,Qt as faceSharpness,ie as facesOf,ke as feedbackVoteOf,or as flagOf,mt as focusOk,te as formatMismatch,l as frontierStep,ct as guideQuad,St as guideRegionInFrame,jt as icaoPixelStats,vt as icaoWindow,he as initialScanState,T as isExecutable,c as isTerminalView,ht as judgeIcao,tt as lensKindOf,ee as liveMrzWireReport,N as loadTurnstile,zt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,f as mapSessionResult,W as measureBitmapSharpness,H as measureRegionSharpness,Ue as nextScanState,Ee as observePortraitFrame,Lt as openDocCamera,Ct as passportBandOf,Yt as percentile,b as photoSharpness,bt as portraitCropRegion,Ie as portraitMatchStep,Mt as poseFromMatrix,E as preloadedDetectorFactory,ze as quadAreaFrac,Xe as quadBounds,Ve as quadIou,je as quadTiltRatio,Oe as randomUuid,rt as rankBackCameras,pt as readStoredLens,Vt as regionStats,s as resetLivenessAssetsForTests,F as resetTurnstileForTests,Y as resizeLongEdge,rr as resolveAcceptedDocuments,et as resolveDocCameraTuning,It as resolveDocShutterTuning,yt as resolveGuideLockTuning,Kt as resolveIcaoTuning,j as resolveWebOcrPlan,D as runLivenessFlow,P as runSubmission,Me as scannerFormatFor,Ht as scoreFrame,a as setPreloadLoaderForTests,J as settledHint,at as singleShotFocusAt,Qe as specularFraction,q as startWebOcr,y as stepOf,h as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ut as warmDocDetector,gt as windowOverflow,it as writeStoredLens};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as K}from"./chunk-A3FUGHAH.js";import{a as B,b as H,e as F,f as w,i as U}from"./chunk-XBVSYVKA.js";import{o as A}from"./chunk-73M7LS4H.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import{A as T,F as V,i as x}from"./chunk-VJM76LUI.js";import"./chunk-SMKCBUJL.js";import"./chunk-MXWLCDFX.js";import{x as O}from"./chunk-H6H2RT6M.js";import"./chunk-G6LKLN4U.js";import"./chunk-TDLIXFDT.js";import"./chunk-7ZCZY3ZP.js";import"./chunk-BPE5NSQ2.js";import"./chunk-GI3UFGRQ.js";import{a as L,o as I}from"./chunk-UBDG5IAP.js";import"./chunk-JRSIMNB5.js";import"./chunk-GT2ZLGF7.js";import"./chunk-IBA5CPDV.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{h as _}from"./chunk-57VOMVKM.js";import{a as M}from"./chunk-5OIC5TZS.js";import"./chunk-OKWG3PVH.js";import"./chunk-DFTCAWMP.js";import"./chunk-DK5YPBDQ.js";function z(e){let a=null,c=Promise.resolve(),u=!1,g=null,y=null,C=null,k=!1,m=()=>{a?.controller.handle.destroy(),a=null},h=()=>{let i=e.currentView(),l=i===null?null:w(i,{isMobile:e.isMobile()});return l?.kind==="portrait"?l:null},P=async(i,l)=>{if(e.destroyed())return;l.setFlowState("uploading"),u=!1;let d=null;try{await e.runner().submit("portrait_icao",async(n,r)=>{if(d===null){let p=await I(n,"image","image/jpeg",i.image.size,{engine:"portrait"});await n.uploadToSpaces(p.uploadUrl,i.image,"image/jpeg"),d=(await n.completeMedia(p.key)).key}l.setFlowState("checking");let s={media:{portrait:d},gate:_(i.gate),...i.tuningVersion!==void 0?{tuningVersion:i.tuningVersion}:{}};return n.submitCheck("portrait_icao",s,{idempotencyKey:r})},()=>{g=d})}catch{u=!0}if(l.setFlowState("done"),e.destroyed())return;let t=h();(t===null||t.phase!=="capture")&&a?.controller===l&&m(),e.runner().republish()},b=i=>e.runner().submit("face_match",(l,d)=>l.submitCheck("face_match",g!==null?{imageKey:g}:{},{idempotencyKey:d})).then(()=>{},()=>{u=!0,i()});return{bind:(i,l)=>{if(i.phase==="match")return m(),y!==i.attemptsRemaining&&!u&&(y=i.attemptsRemaining,b(l)),{...i,uploadFailed:u,resubmit:()=>(u=!1,y=i.attemptsRemaining,l(),b(l)),capture:()=>{throw new Error("the portrait was already accepted")}};y=null;let d=e.keptPortraitInput?.()??null;return d!==null&&(k||d!==C&&i.report===null&&i.reason===void 0&&!i.retakeOnly)?(k||(C=d,k=!0,e.runner().submit("portrait_icao",(t,n)=>t.submitCheck("portrait_icao",d,{idempotencyKey:n}),()=>{g=d.media.portrait}).catch(()=>{}).finally(()=>{k=!1,l()})),{kind:"processing",key:"processing",context:i.context,section:i.section,stalled:!1,refresh:()=>Promise.resolve()}):{...i,uploadFailed:u,resubmit:()=>Promise.resolve(),capture:t=>{if(a!==null&&a.video===t.video)return a.controller.handle;m(),u=!1;let n=A({video:t.video,tuning:i.tuning,tuningVersion:i.tuningVersion,...i.icao!=null?{policy:i.icao.policy}:{},...t.keepScreenAwake!==void 0?{keepScreenAwake:t.keepScreenAwake}:{},...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.internals,()=>e.destroyed()?"self":L(e.currentView()));return a={video:t.video,controller:n},n.handle.on("captured",r=>{c=c.then(()=>P(r,n)).catch(()=>{})}),n.handle}}},destroy:m}}function j(e){let a=e;if(typeof a.apiOrigin!="string"||typeof a.sessionToken!="string")return;let c=`${a.apiOrigin}/api/v2/hosted/capture-reports`,u=a.sessionToken;return g=>{try{fetch(c,{method:"POST",headers:{"content-type":"application/json","x-session-token":u,"x-sekyro-sdk":`@sekyro/web/${M}`},body:JSON.stringify({reports:g}),keepalive:!0}).catch(()=>{})}catch{}}}function G(e){let a=e.apiOrigin;return K("sdk",typeof a=="string"&&/staging|sandbox|localhost/.test(a)?"sandbox":"live")}function le(e){let a=null,c=null,u=null,g=Promise.resolve(),y=()=>{u?.flow.handle.destroy(),u=null},C=async(t,n)=>{if(e.destroyed())return;n.setFlowState("uploading");let r=null,s,p=!1;try{await a.submit("doc_ocr",async(S,E)=>{if(r===null){let R=await I(S,"image","image/jpeg",t.image.size,{engine:"document"});await S.uploadToSpaces(R.uploadUrl,t.image,"image/jpeg"),r=(await S.completeMedia(R.key)).key}return n.setFlowState("checking"),s===void 0&&(s=n.takeDeviceRead(t)),S.submitCheck("doc_ocr",{imageKey:r,side:t.side,...s!==null?{deviceRead:s}:{}},{idempotencyKey:E})})}catch{p=!0}finally{n.setFlowState("done")}if(e.destroyed())return;if(p){n.settle(t.side,{ok:!1,issue:"technical"});return}let v=e.currentView(),o=v===null?null:w(v,{isMobile:e.isMobile()});if(o?.kind!=="document"){n.settle(t.side,{ok:!0}),u?.flow===n?y():n.handle.destroy();return}if(o.reason==="document_type_not_accepted"){c=null,u?.flow===n&&y(),a.republish();return}t.side==="single"||o.acceptedSides.includes(t.side)||o.reason==="side_missing"?(n.settle(t.side,{ok:!0}),c?.documentType!=="passport"&&n.handle.setSide(o.side)):n.settle(t.side,{ok:!1,issue:"reread"})},k=(t,n)=>({...t,issuer:c?.issuer??null,documentType:c?.documentType??null,captureSide:c===null?null:c.documentType==="passport"?"single":t.side,selectDocument:(r,s)=>{if(!H(t.documents).includes(r)||!B(t.documents,r).includes(s))throw new RangeError(`${s} from ${r} is not accepted`);(c?.issuer!==r||c.documentType!==s)&&y(),c={issuer:r,documentType:s},n()},capture:r=>{if(c===null)throw new Error("selectDocument() first");if(u!==null&&u.video===r.video)return u.flow.handle;y();let s=c,p=s.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,v=O({video:r.video,documentType:s.documentType,issuer:s.issuer,...p!==void 0?{side:p}:{},...r.keepScreenAwake!==void 0?{keepScreenAwake:r.keepScreenAwake}:{},...r.liveMrz!==void 0?{liveMrz:r.liveMrz}:{}},{...e.documentInternals??{},...(()=>{let o=e.currentView()?.capture?.document,f=e.documentInternals?.blurRefuseSharpnessMax??o?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:x(o?.camera),shutter:V(o?.scan),guideLock:T(o?.guide),...e.documentInternals?.engineOptions??{}},...typeof f=="number"&&Number.isFinite(f)&&f>=0&&f<=1?{blurRefuseSharpnessMax:f}:{}}})(),deferRead:!0,...(()=>{let o=e.currentView();if(o===null||e.documentInternals?.webOcr!==void 0)return{};let f=j(e.runtime.client);return{webOcr:{captureDocument:o.capture?.document,salt:o.sessionId,baseUrl:G(e.runtime.client),...f!==void 0?{reports:f}:{}}}})()});return u={video:r.video,flow:v},v.handle.on("captured",o=>{g=g.then(()=>C(o,v)).catch(()=>{})}),v.handle}}),m=null,h=null,P=new Set,b=e.runtime.client;e.runtime.client=new Proxy(b,{get(t,n){if(n==="submitCheck")return(h??t).submitCheck.bind(h??t);let r=Reflect.get(t,n);return typeof r=="function"?r.bind(t):r}});let D=()=>{m?.destroy(),m=null,h=null},i=t=>{let n=e.currentView(),r=n===null?null:w(n,{isMobile:e.isMobile()});if(n===null||r?.kind!=="liveness"||r.livePhoto?.icao!==!0)return;if(m===null){let o=F({tuning:n.capture?.icao??null,tuningVersion:n.capture?.tuningVersion??null,...r.icao!=null?{policy:r.icao.policy}:{},still:r.livePhoto.still,...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.livePhotoInternals);m=o,h=o.decorate(b),o.onGate(f=>{for(let S of P)S(f)})}let s=m,p=e.baseCapture??{},v=p.engineOptions?.telemetry;return{...p,engineOptions:{...p.engineOptions??{},measureQuality:s.engineOptions.measureQuality,telemetry:o=>{v?.(o),s.engineOptions.telemetry(o)}}}},l=z({keptPortraitInput:()=>m?.lastPortraitInput()??null,runner:()=>a,currentView:e.currentView,destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{}}),d=U({...e,bindDocument:k,bindPortrait:l.bind,onLivePhoto:t=>(P.add(t),()=>P.delete(t))});return a=d,{...d,captureInternals:i,destroy:()=>{y(),l.destroy(),D(),P.clear()}}}export{le as createPlanRunner,j as reportSink,G as sdkAssetBase};
|
|
@@ -261,9 +261,9 @@ type CheckState = "pending" | "input_required" | "processing" | "passed" | "fail
|
|
|
261
261
|
*/
|
|
262
262
|
type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth";
|
|
263
263
|
type LivenessReason = "no_face" | "media_unreadable" | "clip_too_short" | "spoof_detected" | "review_band" | "liveness_inconclusive" | "device_integrity_failed" | "mobile_required" | "uncalibrated_capture_channel" | "capture_back_camera" | "capture_not_upright" | "camera_unavailable";
|
|
264
|
-
type PopulationReason = "nni_not_found" | "nni_invalid" | "registry_unavailable" | "result_from_cache" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "nni_recheck";
|
|
264
|
+
type PopulationReason = "registry_record_not_found" | "nni_not_found" | "id_number_invalid" | "nni_invalid" | "registry_unavailable" | "result_from_cache" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "id_number_recheck" | "nni_recheck";
|
|
265
265
|
type FaceMatchReason = "no_face_source" | "no_face_reference" | "low_quality_reference" | "below_threshold" | "review_band" | "match_inconclusive" | "subject_revoked" | "probe_not_from_liveness";
|
|
266
|
-
type DocReason = "side_missing" | "mrz_checksum_failed" | "unreadable" | "expired_document" | "authenticity_review" | "document_authenticity" | "registry_mismatch" | "document_nni_mismatch" | "nationality_unreadable" | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "document_number_mismatch";
|
|
266
|
+
type DocReason = "side_missing" | "mrz_checksum_failed" | "unreadable" | "expired_document" | "authenticity_review" | "document_authenticity" | "registry_mismatch" | "document_id_number_mismatch" | "document_nni_mismatch" | "nationality_unreadable" | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "document_number_mismatch";
|
|
267
267
|
/**
|
|
268
268
|
* Profile v2 step 3 matching reasons: a field the partner sent at session
|
|
269
269
|
* create (`subject`) differs from the reference identity (document or
|
|
@@ -286,7 +286,7 @@ type DecisionReason = "liveness_inconclusive" | "match_inconclusive" | "document
|
|
|
286
286
|
* `otp_expired` (code lapsed or no active send), `otp_send_failed` (the OTP
|
|
287
287
|
* service was unreachable / a send returned no token).
|
|
288
288
|
*/
|
|
289
|
-
type PhoneOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_channel_unavailable" | "otp_destination_not_allowed" | "otp_rate_limited" | "otp_destination_unknown" | "otp_daily_cap_reached";
|
|
289
|
+
type PhoneOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_channel_unavailable" | "otp_destination_not_allowed" | "otp_rate_limited" | "otp_destination_unknown" | "otp_daily_cap_reached" | "payment_method_required" | "spend_cap_reached";
|
|
290
290
|
/**
|
|
291
291
|
* email_otp reasons (Plan 8, profile v2 §4.6.5). All transient: a wrong or
|
|
292
292
|
* expired code, a send outage, too many sends, an address that cannot receive
|
|
@@ -299,7 +299,7 @@ type EmailOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_
|
|
|
299
299
|
* never does — on web the step arrives `skipped` (`platform_unsupported`) or
|
|
300
300
|
* the session shows `failureReason: 'platform_unsupported'`.
|
|
301
301
|
*/
|
|
302
|
-
type NfcChipReason = "chip_read_failed" | "chip_access_denied" | "chip_parse_failed" | "chip_not_present" | "nfc_unavailable" | "chip_document_mismatch" | "chip_integrity_failed" | "registry_mismatch" | "document_nni_mismatch" | "platform_unsupported";
|
|
302
|
+
type NfcChipReason = "chip_read_failed" | "chip_access_denied" | "chip_parse_failed" | "chip_not_present" | "nfc_unavailable" | "chip_document_mismatch" | "chip_integrity_failed" | "registry_mismatch" | "document_id_number_mismatch" | "document_nni_mismatch" | "platform_unsupported";
|
|
303
303
|
/**
|
|
304
304
|
* eid_auth reasons (SDK spec §3.2, generic national eID; Houwiyeti in MR).
|
|
305
305
|
* Retryable: `eid_identifier_invalid` (re-enter the number), `eid_code_invalid`
|
|
@@ -313,6 +313,13 @@ type NfcChipReason = "chip_read_failed" | "chip_access_denied" | "chip_parse_fai
|
|
|
313
313
|
* switch to the camera path when the session offers it.
|
|
314
314
|
*/
|
|
315
315
|
type EidReason = "eid_identifier_invalid" | "eid_code_invalid" | "eid_code_expired" | "eid_locked" | "eid_not_enrolled" | "eid_unavailable" | "eid_resend_too_soon" | "eid_resend_limit";
|
|
316
|
+
/**
|
|
317
|
+
* Reasons of the age check (selfie) step (`age_estimation`, run by the server after the liveness step):
|
|
318
|
+
* `age_uncertain` (the estimate did not settle the minimum age) and `age_unavailable` (the estimate could not run)
|
|
319
|
+
* step up to the document path when the flow has one; `underage_estimated` (clearly under the flow's minimum age)
|
|
320
|
+
* is final and ends the session.
|
|
321
|
+
*/
|
|
322
|
+
type AgeEstimationReason = "age_uncertain" | "age_unavailable" | "underage_estimated";
|
|
316
323
|
/**
|
|
317
324
|
* Any frozen reason code. The backend declares the field `string`, but the
|
|
318
325
|
* taxonomy is frozen (do-not-drift) — the union IS the contract. NB: liveness
|
|
@@ -346,9 +353,9 @@ type SessionFailureReason = "location_not_allowed" | "anonymizer_blocked" | "cap
|
|
|
346
353
|
* The profile-v2 policy reasons a session can end on: the two session-level
|
|
347
354
|
* reasons plus the failed check's policy reasons (`document_type_not_accepted`,
|
|
348
355
|
* `nationality_not_allowed`, `underage`, `age_unverifiable`,
|
|
349
|
-
* `document_nni_mismatch`).
|
|
356
|
+
* `document_id_number_mismatch`, formerly `document_nni_mismatch`).
|
|
350
357
|
*/
|
|
351
|
-
type PolicyFailureReason = SessionFailureReason | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "document_nni_mismatch" | "camera_unavailable";
|
|
358
|
+
type PolicyFailureReason = SessionFailureReason | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "document_id_number_mismatch" | "document_nni_mismatch" | "camera_unavailable" | "underage_estimated";
|
|
352
359
|
/**
|
|
353
360
|
* Why the person has no camera (spec 2026-10-29 §3.4, 2026-10-30): `denied` when the camera permission was refused,
|
|
354
361
|
* `no_camera` when there is no usable camera (none found, an insecure page or a browser that cannot capture).
|
|
@@ -448,6 +455,11 @@ interface PlanStepView extends Omit<HostedStepView, "checkType" | "attemptsRemai
|
|
|
448
455
|
checkType: CheckType | (string & {});
|
|
449
456
|
section: StepSection;
|
|
450
457
|
attempts: PlanAttempts;
|
|
458
|
+
/**
|
|
459
|
+
* Who acts on the step: `person` (a screen) or `server` (the backend runs it while the person waits). Sent by
|
|
460
|
+
* newer servers; a client renders an unknown `server` step as processing instead of asking for an update.
|
|
461
|
+
*/
|
|
462
|
+
interaction?: "person" | "server";
|
|
451
463
|
}
|
|
452
464
|
/** A segment of the progress bar (`plan.sections`): the sections still possible on any remaining path. */
|
|
453
465
|
interface PlanSectionView {
|
|
@@ -474,8 +486,8 @@ type IdentitySummarySource = "registry" | "document" | "chip";
|
|
|
474
486
|
interface IdentitySummaryView {
|
|
475
487
|
/**
|
|
476
488
|
* `full` (document / chip: the record and the photo) or `partial` (the
|
|
477
|
-
* registry from a typed
|
|
478
|
-
*
|
|
489
|
+
* registry from a typed number: the short name, the birth year, the number's
|
|
490
|
+
* last 4, no photo).
|
|
479
491
|
*/
|
|
480
492
|
kind: "full" | "partial" | (string & {});
|
|
481
493
|
source: IdentitySummarySource | (string & {});
|
|
@@ -489,7 +501,10 @@ interface IdentitySummaryView {
|
|
|
489
501
|
nationality?: string;
|
|
490
502
|
documentType?: string;
|
|
491
503
|
documentNumberMasked?: string;
|
|
504
|
+
/** The bound ID number, masked (last 4). @deprecated Read `idNumberMasked` (the server sends both). */
|
|
492
505
|
nniMasked?: string;
|
|
506
|
+
/** The bound ID number, masked (last 4). Absent from servers before person data Task A9: read `nniMasked` then. */
|
|
507
|
+
idNumberMasked?: string;
|
|
493
508
|
/** `YYYY-MM-DD`. */
|
|
494
509
|
expiryDate?: string;
|
|
495
510
|
/** A portrait can be fetched ({@link HostedClient.identityPortrait}). */
|
|
@@ -697,8 +712,20 @@ interface HostedStepView {
|
|
|
697
712
|
* document step already read a valid one — the page submits the registry
|
|
698
713
|
* check with an EMPTY input (no NNI field) and the backend uses the
|
|
699
714
|
* document's number. Absent on older APIs.
|
|
715
|
+
* @deprecated Read `idNumberFromDocument` (the server sends both).
|
|
700
716
|
*/
|
|
701
717
|
nniFromDocument?: boolean;
|
|
718
|
+
/**
|
|
719
|
+
* population_registry only: the twin of `nniFromDocument` (person data spec §5.6),
|
|
720
|
+
* both present or both absent. Absent from servers before person data Task A9.
|
|
721
|
+
*/
|
|
722
|
+
idNumberFromDocument?: boolean;
|
|
723
|
+
/**
|
|
724
|
+
* phone_otp only (person data spec Q16, Task A9): the countries the number may be
|
|
725
|
+
* from, ISO alpha-2, the first the default of the country picker. Absent from an
|
|
726
|
+
* older server: the person types a full international number.
|
|
727
|
+
*/
|
|
728
|
+
phoneCountries?: string[];
|
|
702
729
|
/**
|
|
703
730
|
* liveness / face_match (profile v2 step 4, decision mode `automatic`): the
|
|
704
731
|
* capture must come from a phone — the liveness band is calibrated on
|
|
@@ -1018,8 +1045,16 @@ interface HostedSessionView {
|
|
|
1018
1045
|
* the registry check on an unbound session. The VALUE is never exposed. The
|
|
1019
1046
|
* backend declares it required; optional here so pre-Task-8 fixtures stay
|
|
1020
1047
|
* valid (additive field, always on the wire from Task 8 onward).
|
|
1048
|
+
* Registry-scoped: an MR national ID number the registry can look up.
|
|
1021
1049
|
*/
|
|
1022
1050
|
nniBound?: boolean;
|
|
1051
|
+
/**
|
|
1052
|
+
* Person data spec §5.6: the generic name of `nniBound`, with the same meaning:
|
|
1053
|
+
* the session holds an ID number the registry step can look up, so the step is
|
|
1054
|
+
* submitted with an empty input. A bound passport or another country's number is
|
|
1055
|
+
* not registry-bound. Absent from servers before person data Task A9.
|
|
1056
|
+
*/
|
|
1057
|
+
idNumberBound?: boolean;
|
|
1023
1058
|
/**
|
|
1024
1059
|
* The Sekyro AI-hosted voice-guidance clips of this session, or `null` when no
|
|
1025
1060
|
* clip set is active (the device voice is used). Optional: older APIs omit
|
|
@@ -1289,12 +1324,16 @@ interface LivenessCaptureInput {
|
|
|
1289
1324
|
provenance?: CaptureProvenance;
|
|
1290
1325
|
}
|
|
1291
1326
|
/**
|
|
1292
|
-
* population_registry adapter input. `
|
|
1293
|
-
* session; a session minted with
|
|
1294
|
-
*
|
|
1295
|
-
* value. Sending a DIFFERENT
|
|
1327
|
+
* population_registry adapter input. `idNumber` is the national number the
|
|
1328
|
+
* person typed on an UNBOUND session; a session minted with `subject.idNumber`
|
|
1329
|
+
* is BOUND to it: the browser submits `{}` and the backend reads the sealed
|
|
1330
|
+
* value. Sending a DIFFERENT number on a bound session answers 409
|
|
1331
|
+
* `id_number_locked` (formerly `nni_locked`). `nni` is the former name of
|
|
1332
|
+
* `idNumber` (both accepted; both with different values is `400 validation_error`).
|
|
1296
1333
|
*/
|
|
1297
1334
|
interface PopulationInput {
|
|
1335
|
+
idNumber?: string;
|
|
1336
|
+
/** @deprecated Send `idNumber`. */
|
|
1298
1337
|
nni?: string;
|
|
1299
1338
|
}
|
|
1300
1339
|
/**
|
|
@@ -1429,7 +1468,11 @@ interface CheckInputByType {
|
|
|
1429
1468
|
*/
|
|
1430
1469
|
interface SubmitCheckBody {
|
|
1431
1470
|
input?: Record<string, unknown>;
|
|
1432
|
-
|
|
1471
|
+
/**
|
|
1472
|
+
* `age_over | age_uncertain | age_under | age_unavailable` (liveness submit only) pick what the age check
|
|
1473
|
+
* (selfie) step that follows the liveness step decides in a sandbox session.
|
|
1474
|
+
*/
|
|
1475
|
+
forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
|
|
1433
1476
|
}
|
|
1434
1477
|
|
|
1435
|
-
export { type
|
|
1478
|
+
export { type IdentitySummarySource as $, type AcceptedDocumentType as A, type BackgroundUniformity as B, type ConsentLocale as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchReason as F, type HostedIcaoPolicy as G, type HostedSessionView as H, type IdentityConfirmDecision as I, type HostedIntegrity as J, type HostedLivePhotoTuning as K, type HostedLivenessCaptureTuning as L, type MediaKind as M, type HostedNativeCaptureTuning as N, type HostedOcrTuning as O, type PresignUploadResult as P, type HostedOtpView as Q, type ResolvedIcaoTuning as R, type ScreenRampColour as S, type HostedPlanView as T, type HostedPortraitView as U, type HostedStepView as V, type HostedVoiceLocale as W, type HostedVoiceView as X, type IcaoCaptureTuning as Y, type IcaoReportEntry as Z, type IdentityMethod as _, type HostedConsentView as a, type IdentitySummaryView as a0, type LivenessReason as a1, type MatchReason as a2, type MethodChoiceView as a3, type NationalEidOption as a4, type NfcChipReason as a5, type NfcStepView as a6, type OtpChoiceView as a7, type PhoneOtpReason as a8, type PlanAttempts as a9, type DocDeviceRead as aA, type DocOcrInput as aB, type DocSide as aC, type EmailOtpInput as aD, type FaceMatchInput as aE, type LivenessCaptureInput as aF, type LivenessInput as aG, type PhoneOtpInput as aH, type PopulationInput as aI, type PresignRequest as aJ, type RecordConsentResult as aK, type SessionStepView as aL, type SessionView as aM, type SubmitCheckBody as aN, type PlanChoiceKind as aa, type PlanChoiceOption as ab, type PlanChoiceView as ac, type PlanSectionView as ad, type PlanStepView as ae, type PolicyFailureReason as af, type PopulationReason as ag, type PortraitIcaoInput as ah, type PortraitIcaoReason as ai, type RetakeHint as aj, type ScreenRampChallenge as ak, type ScreenRampRendered as al, type ScreenRampReport as am, type SessionFailureReason as an, type SessionOutcome as ao, type SessionStatus as ap, type StepSection as aq, type VerificationAssurance as ar, type VerificationLevel as as, ICAO_FALLBACK as at, type IcaoProfile as au, resolveIcaoTuning as av, type PersonMask as aw, type AttestationInput as ax, type CaptureNoncesResult as ay, type CaptureProof as az, type CameraUnavailableCause as b, type CaptureContext as c, type CompleteMediaResult as d, type CheckType as e, type CheckInputByType as f, type IcaoCriterion as g, type AgeEstimationReason as h, type CaptureMode as i, type CaptureProvenance as j, type CheckReason as k, type CheckState as l, type ContactChannel as m, type DocReason as n, type EidAuthInput as o, type EidReason as p, type EmailOtpReason as q, type HostedAcceptedDocuments as r, type HostedBranding as s, type HostedBrandingColorKey as t, type HostedCaptureTuning as u, type HostedDocumentCaptureTuning as v, type HostedDocumentScanTuning as w, type HostedEidView as x, type HostedEmailOtpView as y, type HostedFlowRef as z };
|
|
@@ -261,9 +261,9 @@ type CheckState = "pending" | "input_required" | "processing" | "passed" | "fail
|
|
|
261
261
|
*/
|
|
262
262
|
type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth";
|
|
263
263
|
type LivenessReason = "no_face" | "media_unreadable" | "clip_too_short" | "spoof_detected" | "review_band" | "liveness_inconclusive" | "device_integrity_failed" | "mobile_required" | "uncalibrated_capture_channel" | "capture_back_camera" | "capture_not_upright" | "camera_unavailable";
|
|
264
|
-
type PopulationReason = "nni_not_found" | "nni_invalid" | "registry_unavailable" | "result_from_cache" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "nni_recheck";
|
|
264
|
+
type PopulationReason = "registry_record_not_found" | "nni_not_found" | "id_number_invalid" | "nni_invalid" | "registry_unavailable" | "result_from_cache" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "id_number_recheck" | "nni_recheck";
|
|
265
265
|
type FaceMatchReason = "no_face_source" | "no_face_reference" | "low_quality_reference" | "below_threshold" | "review_band" | "match_inconclusive" | "subject_revoked" | "probe_not_from_liveness";
|
|
266
|
-
type DocReason = "side_missing" | "mrz_checksum_failed" | "unreadable" | "expired_document" | "authenticity_review" | "document_authenticity" | "registry_mismatch" | "document_nni_mismatch" | "nationality_unreadable" | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "document_number_mismatch";
|
|
266
|
+
type DocReason = "side_missing" | "mrz_checksum_failed" | "unreadable" | "expired_document" | "authenticity_review" | "document_authenticity" | "registry_mismatch" | "document_id_number_mismatch" | "document_nni_mismatch" | "nationality_unreadable" | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "document_number_mismatch";
|
|
267
267
|
/**
|
|
268
268
|
* Profile v2 step 3 matching reasons: a field the partner sent at session
|
|
269
269
|
* create (`subject`) differs from the reference identity (document or
|
|
@@ -286,7 +286,7 @@ type DecisionReason = "liveness_inconclusive" | "match_inconclusive" | "document
|
|
|
286
286
|
* `otp_expired` (code lapsed or no active send), `otp_send_failed` (the OTP
|
|
287
287
|
* service was unreachable / a send returned no token).
|
|
288
288
|
*/
|
|
289
|
-
type PhoneOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_channel_unavailable" | "otp_destination_not_allowed" | "otp_rate_limited" | "otp_destination_unknown" | "otp_daily_cap_reached";
|
|
289
|
+
type PhoneOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_channel_unavailable" | "otp_destination_not_allowed" | "otp_rate_limited" | "otp_destination_unknown" | "otp_daily_cap_reached" | "payment_method_required" | "spend_cap_reached";
|
|
290
290
|
/**
|
|
291
291
|
* email_otp reasons (Plan 8, profile v2 §4.6.5). All transient: a wrong or
|
|
292
292
|
* expired code, a send outage, too many sends, an address that cannot receive
|
|
@@ -299,7 +299,7 @@ type EmailOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_
|
|
|
299
299
|
* never does — on web the step arrives `skipped` (`platform_unsupported`) or
|
|
300
300
|
* the session shows `failureReason: 'platform_unsupported'`.
|
|
301
301
|
*/
|
|
302
|
-
type NfcChipReason = "chip_read_failed" | "chip_access_denied" | "chip_parse_failed" | "chip_not_present" | "nfc_unavailable" | "chip_document_mismatch" | "chip_integrity_failed" | "registry_mismatch" | "document_nni_mismatch" | "platform_unsupported";
|
|
302
|
+
type NfcChipReason = "chip_read_failed" | "chip_access_denied" | "chip_parse_failed" | "chip_not_present" | "nfc_unavailable" | "chip_document_mismatch" | "chip_integrity_failed" | "registry_mismatch" | "document_id_number_mismatch" | "document_nni_mismatch" | "platform_unsupported";
|
|
303
303
|
/**
|
|
304
304
|
* eid_auth reasons (SDK spec §3.2, generic national eID; Houwiyeti in MR).
|
|
305
305
|
* Retryable: `eid_identifier_invalid` (re-enter the number), `eid_code_invalid`
|
|
@@ -313,6 +313,13 @@ type NfcChipReason = "chip_read_failed" | "chip_access_denied" | "chip_parse_fai
|
|
|
313
313
|
* switch to the camera path when the session offers it.
|
|
314
314
|
*/
|
|
315
315
|
type EidReason = "eid_identifier_invalid" | "eid_code_invalid" | "eid_code_expired" | "eid_locked" | "eid_not_enrolled" | "eid_unavailable" | "eid_resend_too_soon" | "eid_resend_limit";
|
|
316
|
+
/**
|
|
317
|
+
* Reasons of the age check (selfie) step (`age_estimation`, run by the server after the liveness step):
|
|
318
|
+
* `age_uncertain` (the estimate did not settle the minimum age) and `age_unavailable` (the estimate could not run)
|
|
319
|
+
* step up to the document path when the flow has one; `underage_estimated` (clearly under the flow's minimum age)
|
|
320
|
+
* is final and ends the session.
|
|
321
|
+
*/
|
|
322
|
+
type AgeEstimationReason = "age_uncertain" | "age_unavailable" | "underage_estimated";
|
|
316
323
|
/**
|
|
317
324
|
* Any frozen reason code. The backend declares the field `string`, but the
|
|
318
325
|
* taxonomy is frozen (do-not-drift) — the union IS the contract. NB: liveness
|
|
@@ -346,9 +353,9 @@ type SessionFailureReason = "location_not_allowed" | "anonymizer_blocked" | "cap
|
|
|
346
353
|
* The profile-v2 policy reasons a session can end on: the two session-level
|
|
347
354
|
* reasons plus the failed check's policy reasons (`document_type_not_accepted`,
|
|
348
355
|
* `nationality_not_allowed`, `underage`, `age_unverifiable`,
|
|
349
|
-
* `document_nni_mismatch`).
|
|
356
|
+
* `document_id_number_mismatch`, formerly `document_nni_mismatch`).
|
|
350
357
|
*/
|
|
351
|
-
type PolicyFailureReason = SessionFailureReason | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "document_nni_mismatch" | "camera_unavailable";
|
|
358
|
+
type PolicyFailureReason = SessionFailureReason | "document_type_not_accepted" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "document_id_number_mismatch" | "document_nni_mismatch" | "camera_unavailable" | "underage_estimated";
|
|
352
359
|
/**
|
|
353
360
|
* Why the person has no camera (spec 2026-10-29 §3.4, 2026-10-30): `denied` when the camera permission was refused,
|
|
354
361
|
* `no_camera` when there is no usable camera (none found, an insecure page or a browser that cannot capture).
|
|
@@ -448,6 +455,11 @@ interface PlanStepView extends Omit<HostedStepView, "checkType" | "attemptsRemai
|
|
|
448
455
|
checkType: CheckType | (string & {});
|
|
449
456
|
section: StepSection;
|
|
450
457
|
attempts: PlanAttempts;
|
|
458
|
+
/**
|
|
459
|
+
* Who acts on the step: `person` (a screen) or `server` (the backend runs it while the person waits). Sent by
|
|
460
|
+
* newer servers; a client renders an unknown `server` step as processing instead of asking for an update.
|
|
461
|
+
*/
|
|
462
|
+
interaction?: "person" | "server";
|
|
451
463
|
}
|
|
452
464
|
/** A segment of the progress bar (`plan.sections`): the sections still possible on any remaining path. */
|
|
453
465
|
interface PlanSectionView {
|
|
@@ -474,8 +486,8 @@ type IdentitySummarySource = "registry" | "document" | "chip";
|
|
|
474
486
|
interface IdentitySummaryView {
|
|
475
487
|
/**
|
|
476
488
|
* `full` (document / chip: the record and the photo) or `partial` (the
|
|
477
|
-
* registry from a typed
|
|
478
|
-
*
|
|
489
|
+
* registry from a typed number: the short name, the birth year, the number's
|
|
490
|
+
* last 4, no photo).
|
|
479
491
|
*/
|
|
480
492
|
kind: "full" | "partial" | (string & {});
|
|
481
493
|
source: IdentitySummarySource | (string & {});
|
|
@@ -489,7 +501,10 @@ interface IdentitySummaryView {
|
|
|
489
501
|
nationality?: string;
|
|
490
502
|
documentType?: string;
|
|
491
503
|
documentNumberMasked?: string;
|
|
504
|
+
/** The bound ID number, masked (last 4). @deprecated Read `idNumberMasked` (the server sends both). */
|
|
492
505
|
nniMasked?: string;
|
|
506
|
+
/** The bound ID number, masked (last 4). Absent from servers before person data Task A9: read `nniMasked` then. */
|
|
507
|
+
idNumberMasked?: string;
|
|
493
508
|
/** `YYYY-MM-DD`. */
|
|
494
509
|
expiryDate?: string;
|
|
495
510
|
/** A portrait can be fetched ({@link HostedClient.identityPortrait}). */
|
|
@@ -697,8 +712,20 @@ interface HostedStepView {
|
|
|
697
712
|
* document step already read a valid one — the page submits the registry
|
|
698
713
|
* check with an EMPTY input (no NNI field) and the backend uses the
|
|
699
714
|
* document's number. Absent on older APIs.
|
|
715
|
+
* @deprecated Read `idNumberFromDocument` (the server sends both).
|
|
700
716
|
*/
|
|
701
717
|
nniFromDocument?: boolean;
|
|
718
|
+
/**
|
|
719
|
+
* population_registry only: the twin of `nniFromDocument` (person data spec §5.6),
|
|
720
|
+
* both present or both absent. Absent from servers before person data Task A9.
|
|
721
|
+
*/
|
|
722
|
+
idNumberFromDocument?: boolean;
|
|
723
|
+
/**
|
|
724
|
+
* phone_otp only (person data spec Q16, Task A9): the countries the number may be
|
|
725
|
+
* from, ISO alpha-2, the first the default of the country picker. Absent from an
|
|
726
|
+
* older server: the person types a full international number.
|
|
727
|
+
*/
|
|
728
|
+
phoneCountries?: string[];
|
|
702
729
|
/**
|
|
703
730
|
* liveness / face_match (profile v2 step 4, decision mode `automatic`): the
|
|
704
731
|
* capture must come from a phone — the liveness band is calibrated on
|
|
@@ -1018,8 +1045,16 @@ interface HostedSessionView {
|
|
|
1018
1045
|
* the registry check on an unbound session. The VALUE is never exposed. The
|
|
1019
1046
|
* backend declares it required; optional here so pre-Task-8 fixtures stay
|
|
1020
1047
|
* valid (additive field, always on the wire from Task 8 onward).
|
|
1048
|
+
* Registry-scoped: an MR national ID number the registry can look up.
|
|
1021
1049
|
*/
|
|
1022
1050
|
nniBound?: boolean;
|
|
1051
|
+
/**
|
|
1052
|
+
* Person data spec §5.6: the generic name of `nniBound`, with the same meaning:
|
|
1053
|
+
* the session holds an ID number the registry step can look up, so the step is
|
|
1054
|
+
* submitted with an empty input. A bound passport or another country's number is
|
|
1055
|
+
* not registry-bound. Absent from servers before person data Task A9.
|
|
1056
|
+
*/
|
|
1057
|
+
idNumberBound?: boolean;
|
|
1023
1058
|
/**
|
|
1024
1059
|
* The Sekyro AI-hosted voice-guidance clips of this session, or `null` when no
|
|
1025
1060
|
* clip set is active (the device voice is used). Optional: older APIs omit
|
|
@@ -1289,12 +1324,16 @@ interface LivenessCaptureInput {
|
|
|
1289
1324
|
provenance?: CaptureProvenance;
|
|
1290
1325
|
}
|
|
1291
1326
|
/**
|
|
1292
|
-
* population_registry adapter input. `
|
|
1293
|
-
* session; a session minted with
|
|
1294
|
-
*
|
|
1295
|
-
* value. Sending a DIFFERENT
|
|
1327
|
+
* population_registry adapter input. `idNumber` is the national number the
|
|
1328
|
+
* person typed on an UNBOUND session; a session minted with `subject.idNumber`
|
|
1329
|
+
* is BOUND to it: the browser submits `{}` and the backend reads the sealed
|
|
1330
|
+
* value. Sending a DIFFERENT number on a bound session answers 409
|
|
1331
|
+
* `id_number_locked` (formerly `nni_locked`). `nni` is the former name of
|
|
1332
|
+
* `idNumber` (both accepted; both with different values is `400 validation_error`).
|
|
1296
1333
|
*/
|
|
1297
1334
|
interface PopulationInput {
|
|
1335
|
+
idNumber?: string;
|
|
1336
|
+
/** @deprecated Send `idNumber`. */
|
|
1298
1337
|
nni?: string;
|
|
1299
1338
|
}
|
|
1300
1339
|
/**
|
|
@@ -1429,7 +1468,11 @@ interface CheckInputByType {
|
|
|
1429
1468
|
*/
|
|
1430
1469
|
interface SubmitCheckBody {
|
|
1431
1470
|
input?: Record<string, unknown>;
|
|
1432
|
-
|
|
1471
|
+
/**
|
|
1472
|
+
* `age_over | age_uncertain | age_under | age_unavailable` (liveness submit only) pick what the age check
|
|
1473
|
+
* (selfie) step that follows the liveness step decides in a sandbox session.
|
|
1474
|
+
*/
|
|
1475
|
+
forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
|
|
1433
1476
|
}
|
|
1434
1477
|
|
|
1435
|
-
export { type
|
|
1478
|
+
export { type IdentitySummarySource as $, type AcceptedDocumentType as A, type BackgroundUniformity as B, type ConsentLocale as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchReason as F, type HostedIcaoPolicy as G, type HostedSessionView as H, type IdentityConfirmDecision as I, type HostedIntegrity as J, type HostedLivePhotoTuning as K, type HostedLivenessCaptureTuning as L, type MediaKind as M, type HostedNativeCaptureTuning as N, type HostedOcrTuning as O, type PresignUploadResult as P, type HostedOtpView as Q, type ResolvedIcaoTuning as R, type ScreenRampColour as S, type HostedPlanView as T, type HostedPortraitView as U, type HostedStepView as V, type HostedVoiceLocale as W, type HostedVoiceView as X, type IcaoCaptureTuning as Y, type IcaoReportEntry as Z, type IdentityMethod as _, type HostedConsentView as a, type IdentitySummaryView as a0, type LivenessReason as a1, type MatchReason as a2, type MethodChoiceView as a3, type NationalEidOption as a4, type NfcChipReason as a5, type NfcStepView as a6, type OtpChoiceView as a7, type PhoneOtpReason as a8, type PlanAttempts as a9, type DocDeviceRead as aA, type DocOcrInput as aB, type DocSide as aC, type EmailOtpInput as aD, type FaceMatchInput as aE, type LivenessCaptureInput as aF, type LivenessInput as aG, type PhoneOtpInput as aH, type PopulationInput as aI, type PresignRequest as aJ, type RecordConsentResult as aK, type SessionStepView as aL, type SessionView as aM, type SubmitCheckBody as aN, type PlanChoiceKind as aa, type PlanChoiceOption as ab, type PlanChoiceView as ac, type PlanSectionView as ad, type PlanStepView as ae, type PolicyFailureReason as af, type PopulationReason as ag, type PortraitIcaoInput as ah, type PortraitIcaoReason as ai, type RetakeHint as aj, type ScreenRampChallenge as ak, type ScreenRampRendered as al, type ScreenRampReport as am, type SessionFailureReason as an, type SessionOutcome as ao, type SessionStatus as ap, type StepSection as aq, type VerificationAssurance as ar, type VerificationLevel as as, ICAO_FALLBACK as at, type IcaoProfile as au, resolveIcaoTuning as av, type PersonMask as aw, type AttestationInput as ax, type CaptureNoncesResult as ay, type CaptureProof as az, type CameraUnavailableCause as b, type CaptureContext as c, type CompleteMediaResult as d, type CheckType as e, type CheckInputByType as f, type IcaoCriterion as g, type AgeEstimationReason as h, type CaptureMode as i, type CaptureProvenance as j, type CheckReason as k, type CheckState as l, type ContactChannel as m, type DocReason as n, type EidAuthInput as o, type EidReason as p, type EmailOtpReason as q, type HostedAcceptedDocuments as r, type HostedBranding as s, type HostedBrandingColorKey as t, type HostedCaptureTuning as u, type HostedDocumentCaptureTuning as v, type HostedDocumentScanTuning as w, type HostedEidView as x, type HostedEmailOtpView as y, type HostedFlowRef as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/web",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.13",
|
|
4
4
|
"description": "Sekyro AI web SDK \u2014 browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "web",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.13",
|
|
101
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.13",
|
|
102
102
|
"description": "Sekyro AI web SDK — browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/web@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/web@0.1.0-rc.13?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-web",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"name": "tasks-vision",
|
|
151
151
|
"group": "@mediapipe",
|
|
152
152
|
"version": "0.10.35",
|
|
153
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
153
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.13|@mediapipe/tasks-vision@0.10.35",
|
|
154
154
|
"licenses": [
|
|
155
155
|
{
|
|
156
156
|
"license": {
|
|
@@ -183,13 +183,13 @@
|
|
|
183
183
|
],
|
|
184
184
|
"dependencies": [
|
|
185
185
|
{
|
|
186
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
186
|
+
"ref": "@sekyro/web@0.1.0-rc.13",
|
|
187
187
|
"dependsOn": [
|
|
188
|
-
"@sekyro/web@0.1.0-rc.
|
|
188
|
+
"@sekyro/web@0.1.0-rc.13|@mediapipe/tasks-vision@0.10.35"
|
|
189
189
|
]
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
192
|
+
"ref": "@sekyro/web@0.1.0-rc.13|@mediapipe/tasks-vision@0.10.35"
|
|
193
193
|
}
|
|
194
194
|
]
|
|
195
195
|
}
|
package/dist/chunk-AHD4DA2V.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as b,d as x}from"./chunk-URUKV6NC.js";var q=new Set(["no_face","media_unreadable","clip_too_short","no_face_source","side_missing","unreadable","registry_unavailable","otp_mismatch","otp_expired","otp_send_failed","document_type_not_accepted","age_unverifiable","nationality_unreadable","liveness_inconclusive","match_inconclusive","document_authenticity","probe_not_from_liveness","capture_back_camera","capture_not_upright","chip_read_failed","chip_access_denied","chip_parse_failed","icao_pose","icao_eyes","icao_mouth","icao_occlusion","icao_lighting","icao_background","icao_resolution","portrait_not_from_liveness","nni_recheck","device_integrity_failed","eid_identifier_invalid","eid_code_invalid","eid_code_expired","eid_unavailable","eid_resend_too_soon"]),U={document:"document_photo",nfc:"document_chip",population_registry:"national_number",national_eid:"national_eid"};function f(e){return e.plan?.steps??[]}function M(e){return Math.max(0,e.attempts.max-e.attempts.used)}function Y(e){let t=e.plan?.choice;return t!==void 0&&e.plan?.current===t.nodeId?t:null}function pe(e){let t=Y(e);if(t?.kind!=="identity_method")return null;let n=t.options.map(o=>U[o.service]).filter(o=>o!==void 0),i=t.options.find(o=>o.nationalEid)?.nationalEid;return i?{available:!0,selected:null,options:n,nationalEid:i}:{available:!0,selected:null,options:n}}var D=new Set(["liveness","face_match"]);function v(e){return e!==void 0&&(e.state==="pending"||e.state==="input_required")}function A(e){return e.status!=="created"&&e.status!=="in_progress"}function P(e){let t=e.plan?.current,n=t==null?void 0:f(e).find(i=>i.id===t);return v(n)?n:void 0}function S(e,t){return f(e).find(n=>n.checkType===t)}function y(e){let t=f(e),n=t.findIndex(i=>i.checkType==="liveness");return t.find((i,o)=>o>n&&i.checkType==="face_match")}function H(e,t){let n=S(t,"liveness")?.state,i=y(t)?.state;return(y(e)?.state??"pending")==="pending"&&(n==="passed"||n==="review")&&i!==void 0&&i!=="pending"&&i!=="skipped"}function V(e,t){let n=new Map(f(e).map(i=>[i.id,i.state]));return f(t).filter(i=>i.checkType==="face_match"&&(n.get(i.id)??"pending")==="pending"&&i.state!=="pending"&&i.state!=="skipped").map(i=>i.id)}function k(e,t){return t===void 0?{sessionId:e,status:"unavailable"}:{sessionId:e,status:"unavailable",reason:t}}function _(e,t,n){return n===void 0?{sessionId:e,status:t}:{sessionId:e,status:t,reason:n}}function me(e,t){let{sessionId:n}=e;switch(e.status){case"completed":case"failed":case"review_pending":return j(e,$(e));case"expired":return k(n);case"created":case"in_progress":break;default:{let i=e.status;throw new Error(`mapSessionResult: unhandled status ${i}`)}}return X(e,t)}var B=new Set([0,1,2,3]);function j(e,t){return B.has(e.level)&&(t.level=e.level),typeof e.assurance=="string"&&e.assurance.length>0&&(t.assurance=e.assurance),typeof e.subjectId=="string"&&e.subjectId.length>0&&(t.subjectId=e.subjectId),t}function $(e){let{sessionId:t}=e;switch(e.status){case"completed":return e.outcome==="approved"?{sessionId:t,status:"approved"}:e.outcome==="review"?_(t,"review",h(e,"review")):_(t,"rejected",h(e,"failed"));case"failed":{let n=_(t,"rejected",e.failureReason??h(e,"failed"));return e.failureReason==="device_cooldown"&&e.retryAfter!==void 0&&(n.retryAfter=e.retryAfter),n}default:return _(t,"review",h(e,"review"))}}function z(e,t){if(t===void 0)return!1;let n=f(t).find(i=>i.id===e.id);return n!==void 0&&n.attempts.used===e.attempts.used}function X(e,t){let{sessionId:n}=e,i=f(e).find(s=>D.has(s.checkType)&&s.state==="input_required"&&s.reason!==void 0);if(i?.reason==="mobile_required")return k(n,"mobile_required");if(i?.reason!==void 0){let s=t.autoRetry&&M(i)>0&&(q.has(i.reason)||z(i,t.previous)),c={sessionId:n,status:s?"retry":"rejected",reason:i.reason,attemptsRemaining:M(i)};return i.retakeHint!==void 0&&(c.retakeHint=i.retakeHint),c}let o=P(e);return o===void 0&&f(e).some(s=>s.state==="review")?_(n,"review",h(e,"review")):o?.checkType==="portrait_icao"?k(n,"portrait_required"):k(n)}function h(e,t){let n=f(e).filter(i=>i.state===t&&i.reason!==void 0);return n[t==="failed"?n.length-1:0]?.reason}function I(e,t,n,i,o){return e.presignCapture!==void 0?e.presignCapture(t,n,i,o):e.presign(t,n,i)}function L(e){return{engine:e?.engine,durationMs:e?.clipMs}}var W=["video/webm","video/mp4"],T="image/jpeg",G=2,J=1e3,Q=1e4,Z=3,ee=10,te=30,ne=3,ie=new Set(["network_error","timeout","upload_failed","unknown_error","rate_limit_exceeded"]),oe=new Set(["session_not_active","check_not_found","check_already_finalized","check_out_of_order","identity_confirm_required","check_not_active","step_not_on_path"]),g=class extends Error{constructor(){super("verification destroyed"),this.name="FlowCancelledError"}};function se(e){let t=y(e);return S(e,"portrait_icao")?.state!=="pending"&&(t!==void 0?v(t):e.capture?.livePhoto?.oneCapture===!0)}var w=class extends Error{constructor(t){super(t),this.name="AttestationError"}};async function F(e,t,n={}){let i=e.uuid(),o=!1,s=!1,c=0,u=0;for(;;)try{return await t(e.client,i)}catch(r){if(r instanceof w){if(s)throw r;s=!0,n.onAttestationInvalid?.(),i=e.uuid();continue}if(!(r instanceof b))throw r;if(r.code==="consent_required"&&!o){o=!0,await e.ensureConsent({force:!0}),i=e.uuid();continue}if(r.code==="attestation_invalid"&&!s){s=!0,n.onAttestationInvalid?.(),i=e.uuid();continue}if(r.code==="inference_unavailable"&&u<Z){u+=1;let a=Math.min(r.retryAfterSeconds??ee,te);e.onBusy?.({attempt:u,retryAfterSeconds:a}),await e.sleep(a*1e3),n.onAttestationInvalid?.(),i=e.uuid();continue}if(ie.has(r.code)&&c<G){c+=1;let a=r.retryAfterSeconds!==void 0?r.retryAfterSeconds*1e3:void 0;await e.sleep(a!==void 0?Math.min(a,Q):J);continue}throw r}}var re=new Set(["passed","review","processing","skipped"]);async function ge(e){let{artifacts:t}=e,n=t.clip,i=x(t.clipMime??"");if(t.degraded==="NO_RECORDER"||n===void 0||!W.includes(i))return{kind:"unavailable",reason:"no_recorder"};e.client.armCapture?.(2);let o=ae(e,t.keyframe),s=ce(e,n,i,o),c=ue(e,o),u=!1,r=new Set,a=!0,m=0;for(;;){if(e.isCancelled())return{kind:"cancelled"};let l=e.getView();if(A(l))return{kind:"settled"};let R=P(l),E=R?.checkType,C=E==="liveness"&&!u?"liveness":E==="face_match"&&!r.has(R?.id)&&r.size<2&&a?"face_match":null;if(C===null)return{kind:"settled"};if(C==="liveness"&&t.captureChannel==="desktop"&&S(l,"liveness")?.requiresMobile===!0)return{kind:"unavailable",reason:"mobile_required"};try{if(C==="liveness"){u=!0;let d=await s();if(e.isCancelled())return{kind:"cancelled"};H(l,d)&&r.add(y(d)?.id);for(let N of V(l,d))r.add(N);await e.applySubmit(d,"liveness");let p=S(e.getView(),"liveness")?.state;a=p===void 0||re.has(p)}else{r.add(R?.id);let d=await c();if(e.isCancelled())return{kind:"cancelled"};for(let p of V(l,d))r.add(p);await e.applySubmit(d,"face_match")}}catch(d){if(e.isCancelled()||d instanceof g)return{kind:"cancelled"};let p=fe(d);if(p.kind!=="resync"||m>=ne)return p;m+=1,await e.refreshView()}}}function ae(e,t){let n=null,i=null,o=()=>n!==null?Promise.resolve(n):(i??(i=(async()=>{let s=await I(e.client,"image",T,t.size,L(e.artifacts));return await e.client.uploadToSpaces(s.uploadUrl,t,T),n=(await e.client.completeMedia(s.key)).key,e.onKeyframePromoted?.(n),n})().finally(()=>{i=null})),i);return{ensure:o,attempt:()=>o().catch(()=>null),current:()=>n}}function ce(e,t,n,i){let o=null,s,c=null;return()=>F(e,async(u,r)=>{if(o===null||s===void 0){if(e.isCancelled())throw new g;s===void 0&&!se(e.getView())&&(s=null),e.onPhase("uploading");let[a,m]=await Promise.all([o!==null?Promise.resolve(o):(async()=>{let l=await I(u,"clip",n,t.size,L(e.artifacts));return await u.uploadToSpaces(l.uploadUrl,t,n),(await u.completeMedia(l.key)).key})(),s!==void 0?Promise.resolve(s===null?null:s.imageKey):i.attempt()]);o=a,s===void 0&&(s=m===null?null:{imageKey:m})}if(c===null)try{c=await e.getAttestation()}catch(a){throw new w(a instanceof Error?a.message:String(a))}return e.onPhase("checking"),u.submitCheck("liveness",{clipKey:o,attestation:c,captureChannel:e.artifacts.captureChannel,capture:de(e.artifacts),...s!==null?{faceMatch:s}:{}},{idempotencyKey:r})},{onAttestationInvalid:()=>{c=null}})}function ue(e,t){return()=>F(e,async(n,i)=>{if(t.current()===null){if(e.isCancelled())throw new g;e.onPhase("uploading")}let o=await t.ensure();return e.onPhase("checking"),n.submitCheck("face_match",{imageKey:o},{idempotencyKey:i})})}function de(e){let t={width:e.width,height:e.height};for(let n of le)e[n]!==void 0&&(t[n]=e[n]);return t}var le=["engine","facingMode","mode","formFactor","clipMs","cameraReadyMs","faceAcquireMs","captureMs","screenRamp","provenance"];function fe(e){if(e instanceof w)return{kind:"unavailable",reason:"attestation"};if(e instanceof b){if(e.code==="attestation_invalid")return{kind:"unavailable",reason:"attestation"};if(e.code==="inference_unavailable")return{kind:"unavailable",reason:"inference_unavailable"};if(e.code==="mobile_required")return{kind:"unavailable",reason:"mobile_required"};if(oe.has(e.code))return{kind:"resync"}}return{kind:"unavailable",reason:"network"}}var O=class extends Error{constructor(t,n){super(`invalid ${t} (${n})`),this.name="InvalidInputError",this.field=t,this.kind=n}},K=class extends Error{constructor(t,n){super(`invalid ${t} (${n})`),this.name="OtpInputError",this.field=t,this.kind=n}};function Re(e){let t=e?.capture;return t?.mode==="assisted"||t?.mode==="self"?t.mode:t?.cameraSwitch===!0?"assisted":"self"}export{Re as a,q as b,U as c,f as d,M as e,Y as f,pe as g,v as h,A as i,P as j,S as k,k as l,me as m,I as n,W as o,G as p,J as q,Z as r,ee as s,w as t,F as u,ge as v,O as w,K as x};
|