@sekyro/web 0.1.0-rc.11 → 0.1.0-rc.12

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 (41) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{capture-session-doc-DMQ7T3HC.js → capture-session-doc-KW5VR4IR.js} +1 -1
  3. package/dist/{capture-session-v3-DYrhYJoM.d.ts → capture-session-v3-DqUUcIU-.d.ts} +1 -1
  4. package/dist/{capture-session-v3-CCHws1mz.d.cts → capture-session-v3-xNtY5m-7.d.cts} +1 -1
  5. package/dist/{chunk-LUKTHL6K.js → chunk-4IVRXJR2.js} +1 -1
  6. package/dist/chunk-6DPFJNGL.js +1 -0
  7. package/dist/{chunk-IJLHPX35.js → chunk-EF52BRBD.js} +1 -1
  8. package/dist/{chunk-AHD4DA2V.js → chunk-IF6YOFFO.js} +1 -1
  9. package/dist/{chunk-URUKV6NC.js → chunk-MUVEJRGK.js} +1 -1
  10. package/dist/{chunk-OWU22VXP.js → chunk-OBLQOE66.js} +1 -1
  11. package/dist/{chunk-JDGEZ542.js → chunk-U6YQAQBD.js} +1 -1
  12. package/dist/chunk-Y7S7LYCL.js +1 -0
  13. package/dist/{chunk-HHCGQSD4.js → chunk-YZH5PR5R.js} +1 -1
  14. package/dist/client/index.cjs +1 -1
  15. package/dist/client/index.d.cts +4 -4
  16. package/dist/client/index.d.ts +4 -4
  17. package/dist/client/index.js +1 -1
  18. package/dist/core/index.cjs +1 -1
  19. package/dist/core/index.d.cts +3 -3
  20. package/dist/core/index.d.ts +3 -3
  21. package/dist/core/index.js +1 -1
  22. package/dist/{create-document-capture-FV4XGUKQ.js → create-document-capture-PXOJHLWV.js} +1 -1
  23. package/dist/{create-verification-CmJzn7sq.d.ts → create-verification-CDOTGHQj.d.ts} +9 -4
  24. package/dist/{create-verification-CzLrQjeM.d.cts → create-verification-D4749F6L.d.cts} +9 -4
  25. package/dist/{icao-gate-BeznQECA.d.cts → icao-gate-BRuIgOE2.d.cts} +6 -3
  26. package/dist/{icao-gate-Bw5sQVlt.d.ts → icao-gate-CphntEQ2.d.ts} +6 -3
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.cts +6 -6
  29. package/dist/index.d.ts +6 -6
  30. package/dist/index.js +1 -1
  31. package/dist/internal/index.cjs +1 -1
  32. package/dist/internal/index.d.cts +6 -6
  33. package/dist/internal/index.d.ts +6 -6
  34. package/dist/internal/index.js +1 -1
  35. package/dist/{plan-runner-ZVAY4FSB.js → plan-runner-2FJLUALJ.js} +1 -1
  36. package/dist/{types-BWyAHKt_.d.cts → types-4rgeNIlz.d.cts} +20 -4
  37. package/dist/{types-BWyAHKt_.d.ts → types-4rgeNIlz.d.ts} +20 -4
  38. package/package.json +1 -1
  39. package/sbom.cdx.json +7 -7
  40. package/dist/chunk-MXNZMTC2.js +0 -1
  41. package/dist/chunk-V5K2JLC7.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-CzLrQjeM.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-CzLrQjeM.cjs';
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-D4749F6L.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-D4749F6L.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, j as CheckReason, ad as PlanStepView } from '../types-BWyAHKt_.cjs';
5
- export { as as ICAO_FALLBACK, X as IcaoCaptureTuning, at as IcaoProfile, R as ResolvedIcaoTuning, au as resolveIcaoTuning } from '../types-BWyAHKt_.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-BeznQECA.cjs';
4
+ import { H as HostedSessionView, e as CheckType, k as CheckReason, ae as PlanStepView } from '../types-4rgeNIlz.cjs';
5
+ export { at as ICAO_FALLBACK, Y as IcaoCaptureTuning, au as IcaoProfile, R as ResolvedIcaoTuning, av as resolveIcaoTuning } from '../types-4rgeNIlz.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-BRuIgOE2.cjs';
7
7
  import '../detect-worker-DclNxkZT.cjs';
8
- import '../capture-session-v3-CCHws1mz.cjs';
8
+ import '../capture-session-v3-xNtY5m-7.cjs';
9
9
 
10
10
  type DocumentTypeId = DocCatalogEntry["docType"];
11
11
  /** Same shape as the hosted view's `acceptedDocuments`. */
@@ -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-CmJzn7sq.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-CmJzn7sq.js';
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-CDOTGHQj.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-CDOTGHQj.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, j as CheckReason, ad as PlanStepView } from '../types-BWyAHKt_.js';
5
- export { as as ICAO_FALLBACK, X as IcaoCaptureTuning, at as IcaoProfile, R as ResolvedIcaoTuning, au as resolveIcaoTuning } from '../types-BWyAHKt_.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-Bw5sQVlt.js';
4
+ import { H as HostedSessionView, e as CheckType, k as CheckReason, ae as PlanStepView } from '../types-4rgeNIlz.js';
5
+ export { at as ICAO_FALLBACK, Y as IcaoCaptureTuning, au as IcaoProfile, R as ResolvedIcaoTuning, av as resolveIcaoTuning } from '../types-4rgeNIlz.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-CphntEQ2.js';
7
7
  import '../detect-worker-DclNxkZT.js';
8
- import '../capture-session-v3-DYrhYJoM.js';
8
+ import '../capture-session-v3-DqUUcIU-.js';
9
9
 
10
10
  type DocumentTypeId = DocCatalogEntry["docType"];
11
11
  /** Same shape as the hosted view's `acceptedDocuments`. */
@@ -1 +1 @@
1
- import{c as _e,d as Le,e as Re,g as Se,h as Te,i as ce}from"../chunk-MXNZMTC2.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-OWU22VXP.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-JDGEZ542.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-V5K2JLC7.js";import{b as S,h as T,i as c,j as l,k as y,m as f,o as u,p as O,q as A,r as I,s as x,t as C,u as P,v as D}from"../chunk-AHD4DA2V.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-IJLHPX35.js";import"../chunk-GT2ZLGF7.js";import"../chunk-HHCGQSD4.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-URUKV6NC.js";import"../chunk-LUKTHL6K.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};
1
+ import{c as _e,d as Le,e as Re,g as Se,h as Te,i as ce}from"../chunk-6DPFJNGL.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-OBLQOE66.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-U6YQAQBD.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-Y7S7LYCL.js";import{b as S,h as T,i as c,j as l,k as y,m as f,o as u,p as O,q as A,r as I,s as x,t as C,u as P,v as D}from"../chunk-IF6YOFFO.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-EF52BRBD.js";import"../chunk-GT2ZLGF7.js";import"../chunk-YZH5PR5R.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-MUVEJRGK.js";import"../chunk-4IVRXJR2.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};
@@ -1 +1 @@
1
- import{e as _}from"./chunk-A3FUGHAH.js";import{a as O,b as B,e as F,f as w,i as U}from"./chunk-MXNZMTC2.js";import{o as A}from"./chunk-73M7LS4H.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import{A as T,F as x,i as L}from"./chunk-OWU22VXP.js";import"./chunk-SMKCBUJL.js";import"./chunk-MXWLCDFX.js";import{x as V}from"./chunk-JDGEZ542.js";import"./chunk-G6LKLN4U.js";import"./chunk-TDLIXFDT.js";import"./chunk-7ZCZY3ZP.js";import"./chunk-BPE5NSQ2.js";import"./chunk-GI3UFGRQ.js";import{a as M,n as I}from"./chunk-AHD4DA2V.js";import"./chunk-IJLHPX35.js";import"./chunk-GT2ZLGF7.js";import"./chunk-HHCGQSD4.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{g as H}from"./chunk-URUKV6NC.js";import"./chunk-LUKTHL6K.js";import"./chunk-OKWG3PVH.js";import"./chunk-DFTCAWMP.js";import"./chunk-DK5YPBDQ.js";function K(e){let a=null,c=Promise.resolve(),u=!1,g=null,y=null,C=null,h=!1,m=()=>{a?.controller.handle.destroy(),a=null},k=()=>{let i=e.currentView(),s=i===null?null:w(i,{isMobile:e.isMobile()});return s?.kind==="portrait"?s:null},P=async(i,s)=>{if(e.destroyed())return;s.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}s.setFlowState("checking");let l={media:{portrait:d},gate:H(i.gate),...i.tuningVersion!==void 0?{tuningVersion:i.tuningVersion}:{}};return n.submitCheck("portrait_icao",l,{idempotencyKey:r})},()=>{g=d})}catch{u=!0}if(s.setFlowState("done"),e.destroyed())return;let t=k();(t===null||t.phase!=="capture")&&a?.controller===s&&m(),e.runner().republish()},b=i=>e.runner().submit("face_match",(s,d)=>s.submitCheck("face_match",g!==null?{imageKey:g}:{},{idempotencyKey:d})).then(()=>{},()=>{u=!0,i()});return{bind:(i,s)=>{if(i.phase==="match")return m(),y!==i.attemptsRemaining&&!u&&(y=i.attemptsRemaining,b(s)),{...i,uploadFailed:u,resubmit:()=>(u=!1,y=i.attemptsRemaining,s(),b(s)),capture:()=>{throw new Error("the portrait was already accepted")}};y=null;let d=e.keptPortraitInput?.()??null;return d!==null&&(h||d!==C&&i.report===null&&i.reason===void 0&&!i.retakeOnly)?(h||(C=d,h=!0,e.runner().submit("portrait_icao",(t,n)=>t.submitCheck("portrait_icao",d,{idempotencyKey:n}),()=>{g=d.media.portrait}).catch(()=>{}).finally(()=>{h=!1,s()})),{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":M(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},body:JSON.stringify({reports:g}),keepalive:!0}).catch(()=>{})}catch{}}}function E(e){let a=e.apiOrigin;return _("sdk",typeof a=="string"&&/staging|sandbox|localhost/.test(a)?"sandbox":"live")}function ue(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,l,p=!1;try{await a.submit("doc_ocr",async(S,z)=>{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"),l===void 0&&(l=n.takeDeviceRead(t)),S.submitCheck("doc_ocr",{imageKey:r,side:t.side,...l!==null?{deviceRead:l}:{}},{idempotencyKey:z})})}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"})},h=(t,n)=>({...t,issuer:c?.issuer??null,documentType:c?.documentType??null,captureSide:c===null?null:c.documentType==="passport"?"single":t.side,selectDocument:(r,l)=>{if(!B(t.documents).includes(r)||!O(t.documents,r).includes(l))throw new RangeError(`${l} from ${r} is not accepted`);(c?.issuer!==r||c.documentType!==l)&&y(),c={issuer:r,documentType:l},n()},capture:r=>{if(c===null)throw new Error("selectDocument() first");if(u!==null&&u.video===r.video)return u.flow.handle;y();let l=c,p=l.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,v=V({video:r.video,documentType:l.documentType,issuer:l.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:L(o?.camera),shutter:x(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:E(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,k=null,P=new Set,b=e.runtime.client;e.runtime.client=new Proxy(b,{get(t,n){if(n==="submitCheck")return(k??t).submitCheck.bind(k??t);let r=Reflect.get(t,n);return typeof r=="function"?r.bind(t):r}});let D=()=>{m?.destroy(),m=null,k=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,k=o.decorate(b),o.onGate(f=>{for(let S of P)S(f)})}let l=m,p=e.baseCapture??{},v=p.engineOptions?.telemetry;return{...p,engineOptions:{...p.engineOptions??{},measureQuality:l.engineOptions.measureQuality,telemetry:o=>{v?.(o),l.engineOptions.telemetry(o)}}}},s=K({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:h,bindPortrait:s.bind,onLivePhoto:t=>(P.add(t),()=>P.delete(t))});return a=d,{...d,captureInternals:i,destroy:()=>{y(),s.destroy(),D(),P.clear()}}}export{ue as createPlanRunner,E as sdkAssetBase};
1
+ import{e as _}from"./chunk-A3FUGHAH.js";import{a as O,b as B,e as F,f as w,i as U}from"./chunk-6DPFJNGL.js";import{o as A}from"./chunk-73M7LS4H.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import{A as T,F as x,i as L}from"./chunk-OBLQOE66.js";import"./chunk-SMKCBUJL.js";import"./chunk-MXWLCDFX.js";import{x as V}from"./chunk-U6YQAQBD.js";import"./chunk-G6LKLN4U.js";import"./chunk-TDLIXFDT.js";import"./chunk-7ZCZY3ZP.js";import"./chunk-BPE5NSQ2.js";import"./chunk-GI3UFGRQ.js";import{a as M,n as I}from"./chunk-IF6YOFFO.js";import"./chunk-EF52BRBD.js";import"./chunk-GT2ZLGF7.js";import"./chunk-YZH5PR5R.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{g as H}from"./chunk-MUVEJRGK.js";import"./chunk-4IVRXJR2.js";import"./chunk-OKWG3PVH.js";import"./chunk-DFTCAWMP.js";import"./chunk-DK5YPBDQ.js";function K(e){let a=null,c=Promise.resolve(),u=!1,g=null,y=null,C=null,h=!1,m=()=>{a?.controller.handle.destroy(),a=null},k=()=>{let i=e.currentView(),s=i===null?null:w(i,{isMobile:e.isMobile()});return s?.kind==="portrait"?s:null},P=async(i,s)=>{if(e.destroyed())return;s.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}s.setFlowState("checking");let l={media:{portrait:d},gate:H(i.gate),...i.tuningVersion!==void 0?{tuningVersion:i.tuningVersion}:{}};return n.submitCheck("portrait_icao",l,{idempotencyKey:r})},()=>{g=d})}catch{u=!0}if(s.setFlowState("done"),e.destroyed())return;let t=k();(t===null||t.phase!=="capture")&&a?.controller===s&&m(),e.runner().republish()},b=i=>e.runner().submit("face_match",(s,d)=>s.submitCheck("face_match",g!==null?{imageKey:g}:{},{idempotencyKey:d})).then(()=>{},()=>{u=!0,i()});return{bind:(i,s)=>{if(i.phase==="match")return m(),y!==i.attemptsRemaining&&!u&&(y=i.attemptsRemaining,b(s)),{...i,uploadFailed:u,resubmit:()=>(u=!1,y=i.attemptsRemaining,s(),b(s)),capture:()=>{throw new Error("the portrait was already accepted")}};y=null;let d=e.keptPortraitInput?.()??null;return d!==null&&(h||d!==C&&i.report===null&&i.reason===void 0&&!i.retakeOnly)?(h||(C=d,h=!0,e.runner().submit("portrait_icao",(t,n)=>t.submitCheck("portrait_icao",d,{idempotencyKey:n}),()=>{g=d.media.portrait}).catch(()=>{}).finally(()=>{h=!1,s()})),{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":M(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},body:JSON.stringify({reports:g}),keepalive:!0}).catch(()=>{})}catch{}}}function E(e){let a=e.apiOrigin;return _("sdk",typeof a=="string"&&/staging|sandbox|localhost/.test(a)?"sandbox":"live")}function ue(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,l,p=!1;try{await a.submit("doc_ocr",async(S,z)=>{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"),l===void 0&&(l=n.takeDeviceRead(t)),S.submitCheck("doc_ocr",{imageKey:r,side:t.side,...l!==null?{deviceRead:l}:{}},{idempotencyKey:z})})}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"})},h=(t,n)=>({...t,issuer:c?.issuer??null,documentType:c?.documentType??null,captureSide:c===null?null:c.documentType==="passport"?"single":t.side,selectDocument:(r,l)=>{if(!B(t.documents).includes(r)||!O(t.documents,r).includes(l))throw new RangeError(`${l} from ${r} is not accepted`);(c?.issuer!==r||c.documentType!==l)&&y(),c={issuer:r,documentType:l},n()},capture:r=>{if(c===null)throw new Error("selectDocument() first");if(u!==null&&u.video===r.video)return u.flow.handle;y();let l=c,p=l.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,v=V({video:r.video,documentType:l.documentType,issuer:l.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:L(o?.camera),shutter:x(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:E(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,k=null,P=new Set,b=e.runtime.client;e.runtime.client=new Proxy(b,{get(t,n){if(n==="submitCheck")return(k??t).submitCheck.bind(k??t);let r=Reflect.get(t,n);return typeof r=="function"?r.bind(t):r}});let D=()=>{m?.destroy(),m=null,k=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,k=o.decorate(b),o.onGate(f=>{for(let S of P)S(f)})}let l=m,p=e.baseCapture??{},v=p.engineOptions?.telemetry;return{...p,engineOptions:{...p.engineOptions??{},measureQuality:l.engineOptions.measureQuality,telemetry:o=>{v?.(o),l.engineOptions.telemetry(o)}}}},s=K({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:h,bindPortrait:s.bind,onLivePhoto:t=>(P.add(t),()=>P.delete(t))});return a=d,{...d,captureInternals:i,destroy:()=>{y(),s.destroy(),D(),P.clear()}}}export{ue as createPlanRunner,E as sdkAssetBase};
@@ -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
@@ -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
@@ -348,7 +355,7 @@ type SessionFailureReason = "location_not_allowed" | "anonymizer_blocked" | "cap
348
355
  * `nationality_not_allowed`, `underage`, `age_unverifiable`,
349
356
  * `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_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 {
@@ -1429,7 +1441,11 @@ interface CheckInputByType {
1429
1441
  */
1430
1442
  interface SubmitCheckBody {
1431
1443
  input?: Record<string, unknown>;
1432
- forceOutcome?: "pass" | "fail";
1444
+ /**
1445
+ * `age_over | age_uncertain | age_under | age_unavailable` (liveness submit only) pick what the age check
1446
+ * (selfie) step that follows the liveness step decides in a sandbox session.
1447
+ */
1448
+ forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
1433
1449
  }
1434
1450
 
1435
- export { type IdentitySummaryView 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 HostedIntegrity as G, type HostedSessionView as H, type IdentityConfirmDecision as I, type HostedLivePhotoTuning as J, type HostedLivenessCaptureTuning as K, type HostedNativeCaptureTuning as L, type MediaKind as M, type HostedOcrTuning as N, type HostedOtpView as O, type PresignUploadResult as P, type HostedPlanView as Q, type ResolvedIcaoTuning as R, type ScreenRampColour as S, type HostedPortraitView as T, type HostedStepView as U, type HostedVoiceLocale as V, type HostedVoiceView as W, type IcaoCaptureTuning as X, type IcaoReportEntry as Y, type IdentityMethod as Z, type IdentitySummarySource as _, type HostedConsentView as a, type LivenessReason as a0, type MatchReason as a1, type MethodChoiceView as a2, type NationalEidOption as a3, type NfcChipReason as a4, type NfcStepView as a5, type OtpChoiceView as a6, type PhoneOtpReason as a7, type PlanAttempts as a8, type PlanChoiceKind as a9, type DocOcrInput as aA, type DocSide as aB, type EmailOtpInput as aC, type FaceMatchInput as aD, type LivenessCaptureInput as aE, type LivenessInput as aF, type PhoneOtpInput as aG, type PopulationInput as aH, type PresignRequest as aI, type RecordConsentResult as aJ, type SessionStepView as aK, type SessionView as aL, type SubmitCheckBody as aM, type PlanChoiceOption as aa, type PlanChoiceView as ab, type PlanSectionView as ac, type PlanStepView as ad, type PolicyFailureReason as ae, type PopulationReason as af, type PortraitIcaoInput as ag, type PortraitIcaoReason as ah, type RetakeHint as ai, type ScreenRampChallenge as aj, type ScreenRampRendered as ak, type ScreenRampReport as al, type SessionFailureReason as am, type SessionOutcome as an, type SessionStatus as ao, type StepSection as ap, type VerificationAssurance as aq, type VerificationLevel as ar, ICAO_FALLBACK as as, type IcaoProfile as at, resolveIcaoTuning as au, type PersonMask as av, type AttestationInput as aw, type CaptureNoncesResult as ax, type CaptureProof as ay, type DocDeviceRead 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 CaptureMode as h, type CaptureProvenance as i, type CheckReason as j, type CheckState as k, type ContactChannel as l, type DocReason as m, type EidAuthInput as n, type EidReason as o, type EmailOtpReason as p, type HostedAcceptedDocuments as q, type HostedBranding as r, type HostedBrandingColorKey as s, type HostedCaptureTuning as t, type HostedDocumentCaptureTuning as u, type HostedDocumentScanTuning as v, type HostedEidView as w, type HostedEmailOtpView as x, type HostedFlowRef as y, type HostedIcaoPolicy as z };
1451
+ 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 };
@@ -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
@@ -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
@@ -348,7 +355,7 @@ type SessionFailureReason = "location_not_allowed" | "anonymizer_blocked" | "cap
348
355
  * `nationality_not_allowed`, `underage`, `age_unverifiable`,
349
356
  * `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_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 {
@@ -1429,7 +1441,11 @@ interface CheckInputByType {
1429
1441
  */
1430
1442
  interface SubmitCheckBody {
1431
1443
  input?: Record<string, unknown>;
1432
- forceOutcome?: "pass" | "fail";
1444
+ /**
1445
+ * `age_over | age_uncertain | age_under | age_unavailable` (liveness submit only) pick what the age check
1446
+ * (selfie) step that follows the liveness step decides in a sandbox session.
1447
+ */
1448
+ forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
1433
1449
  }
1434
1450
 
1435
- export { type IdentitySummaryView 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 HostedIntegrity as G, type HostedSessionView as H, type IdentityConfirmDecision as I, type HostedLivePhotoTuning as J, type HostedLivenessCaptureTuning as K, type HostedNativeCaptureTuning as L, type MediaKind as M, type HostedOcrTuning as N, type HostedOtpView as O, type PresignUploadResult as P, type HostedPlanView as Q, type ResolvedIcaoTuning as R, type ScreenRampColour as S, type HostedPortraitView as T, type HostedStepView as U, type HostedVoiceLocale as V, type HostedVoiceView as W, type IcaoCaptureTuning as X, type IcaoReportEntry as Y, type IdentityMethod as Z, type IdentitySummarySource as _, type HostedConsentView as a, type LivenessReason as a0, type MatchReason as a1, type MethodChoiceView as a2, type NationalEidOption as a3, type NfcChipReason as a4, type NfcStepView as a5, type OtpChoiceView as a6, type PhoneOtpReason as a7, type PlanAttempts as a8, type PlanChoiceKind as a9, type DocOcrInput as aA, type DocSide as aB, type EmailOtpInput as aC, type FaceMatchInput as aD, type LivenessCaptureInput as aE, type LivenessInput as aF, type PhoneOtpInput as aG, type PopulationInput as aH, type PresignRequest as aI, type RecordConsentResult as aJ, type SessionStepView as aK, type SessionView as aL, type SubmitCheckBody as aM, type PlanChoiceOption as aa, type PlanChoiceView as ab, type PlanSectionView as ac, type PlanStepView as ad, type PolicyFailureReason as ae, type PopulationReason as af, type PortraitIcaoInput as ag, type PortraitIcaoReason as ah, type RetakeHint as ai, type ScreenRampChallenge as aj, type ScreenRampRendered as ak, type ScreenRampReport as al, type SessionFailureReason as am, type SessionOutcome as an, type SessionStatus as ao, type StepSection as ap, type VerificationAssurance as aq, type VerificationLevel as ar, ICAO_FALLBACK as as, type IcaoProfile as at, resolveIcaoTuning as au, type PersonMask as av, type AttestationInput as aw, type CaptureNoncesResult as ax, type CaptureProof as ay, type DocDeviceRead 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 CaptureMode as h, type CaptureProvenance as i, type CheckReason as j, type CheckState as k, type ContactChannel as l, type DocReason as m, type EidAuthInput as n, type EidReason as o, type EmailOtpReason as p, type HostedAcceptedDocuments as q, type HostedBranding as r, type HostedBrandingColorKey as s, type HostedCaptureTuning as t, type HostedDocumentCaptureTuning as u, type HostedDocumentScanTuning as v, type HostedEidView as w, type HostedEmailOtpView as x, type HostedFlowRef as y, type HostedIcaoPolicy as z };
1451
+ 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.11",
3
+ "version": "0.1.0-rc.12",
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.11",
101
- "bom-ref": "@sekyro/web@0.1.0-rc.11",
100
+ "version": "0.1.0-rc.12",
101
+ "bom-ref": "@sekyro/web@0.1.0-rc.12",
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.11?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-web",
111
+ "purl": "pkg:npm/%40sekyro/web@0.1.0-rc.12?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.11|@mediapipe/tasks-vision@0.10.35",
153
+ "bom-ref": "@sekyro/web@0.1.0-rc.12|@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.11",
186
+ "ref": "@sekyro/web@0.1.0-rc.12",
187
187
  "dependsOn": [
188
- "@sekyro/web@0.1.0-rc.11|@mediapipe/tasks-vision@0.10.35"
188
+ "@sekyro/web@0.1.0-rc.12|@mediapipe/tasks-vision@0.10.35"
189
189
  ]
190
190
  },
191
191
  {
192
- "ref": "@sekyro/web@0.1.0-rc.11|@mediapipe/tasks-vision@0.10.35"
192
+ "ref": "@sekyro/web@0.1.0-rc.12|@mediapipe/tasks-vision@0.10.35"
193
193
  }
194
194
  ]
195
195
  }
@@ -1 +0,0 @@
1
- import{c as K,d as pe,e as me,f as fe,h as he,i as z,k as Y,m as Se,n as ge,u as ye,w as O,x as j}from"./chunk-AHD4DA2V.js";import{c as le,d as de,e as ue}from"./chunk-FPXL63KZ.js";import{c as F,f as $,g as ke}from"./chunk-URUKV6NC.js";var ve=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"];var Me=["carte_identite","passport","residence_permit"];function Ve(e,n){let i=e.byIssuer?.[n]??e.default;return Me.filter(s=>i==="*"||i.includes(s))}function ht(e,n=ve){return[...new Set([...n,...Object.keys(e.byIssuer??{})])].filter(s=>Ve(e,s).length>0).sort()}function _e(e){if(e.acceptedDocuments)return e.acceptedDocuments;let n=e.acceptedDocumentTypes?.length?[...e.acceptedDocumentTypes]:["carte_identite","passport"];return{default:[],byIssuer:{MR:n}}}var Le=640,He=new Set(["network_error","timeout","upload_failed","unknown_error","rate_limit_exceeded"]),be=6,Pe=1500,Ce={sharpness:1,exposure:1,meanLuma:128},we=null;function De(e,n){try{we??(we=document.createElement("canvas"));let i=we,s=96/Math.max(1,n.width);i.width=Math.max(1,Math.round(n.width*s)),i.height=Math.max(1,Math.round(n.height*s));let a=i.getContext("2d");if(a===null)return Ce;a.drawImage(e,n.x,n.y,n.width,n.height,0,0,i.width,i.height);let c=a.getImageData(0,0,i.width,i.height);return{sharpness:de(c),exposure:ue(c),meanLuma:le(c)}}catch{return Ce}}async function Ne(e,n){let i=e.source;return"convertToBlob"in i?i.convertToBlob({type:"image/jpeg",quality:n}):new Promise((s,a)=>{i.toBlob(c=>c===null?a(new Error("encode failed")):s(c),"image/jpeg",n)})}function vt(e,n={}){let i=n.now??(()=>performance.now()),s=n.setTimer??((t,o)=>setTimeout(t,o)),a=n.clearTimer??(t=>clearTimeout(t)),c=n.encode??Ne,u=n.quality??De,l=e.tuningVersion??null,g=new Set,k=!1,S=e.video??null,h=null,v=n.grabFrame??null,T=null,M=1e3/be,P=null,w=null,D=!1,A=!1,x=Number.NEGATIVE_INFINITY,C=null,U=0,V=null,N=null,G=Promise.all([import("./icao-gate-PWBMKRGC.js"),import("./icao-tuning-4GGVX6B4.js"),import("./create-portrait-capture-C462EIB6.js"),import("./landmarker-KB7LVXAU.js"),import("./background-monitor-A7FKJOAG.js")]).then(async([t,o,r,d,f])=>{let m=o.resolveIcaoTuning(e.tuning,e.tuningVersion??void 0);m.background.required&&(w=f.createBackgroundMonitor({tuning:m.backgroundCheck,assetBaseUrl:e.assetBaseUrl??"/models-v3",...n.createSegmenter!==void 0?{createSegmenter:n.createSegmenter}:{},now:i})),h=t.createIcaoGate(m,{policy:e.policy??"reject"}),v??(v=r.defaultGrabber()),T=r.observe,M=1e3/Math.min(be,m.cadenceHz);let y=(n.createLandmarker??d.createFaceLandmarker)(e.assetBaseUrl??"/models-v3"),p=await new Promise((_,b)=>{let E=setTimeout(()=>{b(new Error("landmarker init timeout")),y.then(I=>I.close(),()=>{})},d.LANDMARKER_INIT_TIMEOUT_MS);y.then(I=>{clearTimeout(E),_(I)},I=>{clearTimeout(E),b(I)})});k?p.close():P=p}).catch(()=>{D=!0}),Q=t=>{for(let o of g)o({holding:A||D,update:t})},B=()=>{if(C=null,!(k||P===null||h===null||v===null||T===null||S===null)){if(i()-x>Pe){Q(null);return}try{let t=v(S,Le);if(t!==null){let o=Math.max(i(),U+1);U=o;let r=P.detect(t.source,o),d=S.videoWidth||t.width,f=S.videoHeight||t.height,m=T(r,t,d,f);m.geometry!==null&&w!==null&&(m.backgroundCheck=w.measure(t,m.geometry.box,d,f));let y=h.push(m,i());A=y.ready,Q(y)}}catch{}C=s(B,M)}},Z=()=>{let t=i()-x>Pe;x=i(),t&&(h?.reset(),A=!1,V=null,N=null),C===null&&P!==null&&!k&&(C=s(B,0))},J=()=>{let t=v===null||S===null?null:v(S,null);if(t===null||h===null||Math.max(t.width,t.height)<e.still.minLongSidePx)return Promise.resolve(null);let o=h.summary();return c(t,e.still.jpegQuality).then(r=>({image:r,width:t.width,height:t.height,gate:o}),()=>null)},L=null;return{engineOptions:{measureQuality:(t,o)=>{S=t,Z();let r=u(t,o);return A||D?r:{...r,sharpness:0}},telemetry:t=>{if(t.type!=="fired"||k)return;V=J();let o=L;o!==null&&V.then(r=>r===null?void 0:o(r).catch(()=>{})),A=!1,C!==null&&a(C),C=null,x=Number.NEGATIVE_INFINITY}},decorate:t=>{let o=new WeakMap,r=new Map,d=p=>{let _=o.get(p);return _===void 0&&(_=(async()=>{let b=await ge(t,"image","image/jpeg",p.image.size,{engine:"portrait"});return await t.uploadToSpaces(b.uploadUrl,p.image,"image/jpeg"),(await t.completeMedia(b.key)).key})(),_.catch(()=>o.delete(p)),o.set(p,_)),_};L=d;let f=async p=>{let _;try{_=await d(p)}catch(b){let E=b?.code;if(typeof E=="string"&&He.has(E))throw b;return null}return{media:{portrait:_},gate:ke(p.gate),...l!==null?{tuningVersion:l}:{}}},m=t.submitCheck.bind(t),y=(async(p,_,b)=>{if(p!=="liveness")return m(p,_,b);let E=b?.idempotencyKey,I=E===void 0?void 0:r.get(E);if(I===void 0){let ae=V;I=ae===null?Promise.resolve(null):ae.then(ce=>ce===null?null:f(ce)),E!==void 0&&(r.set(E,I),I.catch(()=>r.delete(E)))}let X=await I;if(X===null)return m("liveness",_,b);let Re=await m("liveness",{..._,portraitIcao:X},b);return N=X,Re});return new Proxy(t,{get(p,_){if(_==="submitCheck")return y;let b=Reflect.get(p,_);return typeof b=="function"?b.bind(p):b}})},onGate:t=>(g.add(t),()=>g.delete(t)),lastPortraitInput:()=>N,destroy:()=>{k=!0,V=null,N=null,C!==null&&a(C),C=null,g.clear(),G.then(()=>{P?.close(),P=null,w?.close(),w=null})}}}var Ge=new Set(["phone_otp","email_otp","national_eid","document","nfc","population_registry","supplied_identity","summary_confirm","liveness","face_match","aml_screening","face_dedup"]),Ue=new Set(["supplied_identity","aml_screening","face_dedup"]),te=["document","population_registry","national_eid"],ne=["phone_otp","email_otp"],Ee={identity_method:te,contact:ne},Be=["population_registry","document"],Ie="platform_unsupported",Fe=new Set(["prefilled","user_entered","prefilled_or_entered"]),Ke={phone_otp:"contact",email_otp:"contact",eid_auth:"identity",doc_ocr:"identity",nfc_chip:"identity",population_registry:"identity",liveness:"live_photo",portrait_icao:"live_photo",face_match:"live_photo"};function R(e){return e.section??Ke[e.checkType]??null}function ie(e,n){let i=e.plan?.choice;if(i===void 0||i.locked)return;let s=i.options.find(a=>a.id!==i.selected&&a.available!==!1&&n.includes(a.service));return s===void 0?void 0:{nodeId:i.nodeId,option:s}}function oe(e){let n=e.plan,i=n?.choice;if(n===void 0||i===void 0||i.locked||n.current===null||n.current===i.nodeId||z(e))return null;let s=Ee[i.kind]??[...te,...ne],a=i.options.flatMap(l=>l.available===!1||!s.includes(l.service)?[]:[l.nationalEid!=null?{id:l.id,service:l.service,nationalEid:l.nationalEid}:{id:l.id,service:l.service}]),c=n.steps.find(l=>l.id===n.current)?.service,u=i.selected??a.find(l=>l.service===c)?.id??null;return a.some(l=>l.id!==u)?{nodeId:i.nodeId,kind:i.kind,current:u,options:a}:null}function Te(e){return e==null?[]:e.options.filter(n=>n.id!==e.current)}function je(e){let n=(e.plan?.sections??[]).map(a=>({id:a.id,state:a.state})),i={sessionId:e.sessionId,orgName:e.orgName,returning:e.returning===!0,consentRecorded:e.consentRecorded,expiresAt:e.expiresAt,sections:n.map(a=>a.id),progress:n,purpose:e.purpose??"identity"};e.branding!==void 0&&(i.branding=e.branding),e.cameraUnavailableHandled===!0&&(i.cameraUnavailableHandled=!0);let s=oe(e);return s!==null&&(i.switchable=s),i}function qe(e){let n={attemptsRemaining:me(e),attemptsExhausted:e.attemptsExhausted===!0};return e.reason!==void 0&&(n.reason=e.reason),e.retakeHint!==void 0&&(n.retakeHint=e.retakeHint),n}var Oe={phone_otp:"phone",email_otp:"email"};function Qe(e,n){let i=ie(e,[n==="phone_otp"?"email_otp":"phone_otp"]);return i===void 0?void 0:Oe[i.option.service]}function Ye(e,n,i,s){let a=n.checkType==="email_otp",c=(a?n.emailOtp:n.otp)??{},u=a?n.emailOtp?.emailSource:n.otp?.numberSource,l=u!==void 0&&Fe.has(u)?u:a?"prefilled_or_entered":"user_entered",g=typeof c.sentToMasked=="string"&&c.sentToMasked.length>0,k=Qe(e,a?"email_otp":"phone_otp"),S={key:n.checkType,context:i,section:R(n),phase:g?"verify":"send",canSwitch:k!==void 0,...s},h=a?{kind:"email_otp",...S,emailSource:l,needsEmail:l!=="prefilled"}:{kind:"phone_otp",...S,numberSource:l,needsPhone:l!=="prefilled",channels:(n.otp?.channels??[]).filter(v=>v==="whatsapp"||v==="sms")};return k!==void 0&&(h.switchChannel=k),g&&(h.sentToMasked=c.sentToMasked),!a&&n.otp?.channel!==void 0&&(h.channel=n.otp.channel),c.expiresAt!==void 0&&(h.codeExpiresAt=c.expiresAt),c.resendAvailableAt!==void 0&&(h.resendAvailableAt=c.resendAvailableAt),h}function $e(e,n,i,s){let a=e.nniBound===!0?"bound":n.nniFromDocument===!0?"document":"typed",c=a==="typed"&&n.state==="input_required"&&n.reason==="nni_recheck",u=Te(oe(e)),l=!s.attemptsExhausted&&u.length===1&&u[0]?.service==="document";return{kind:"registry",key:"registry",context:i,section:R(n),state:n.state==="input_required"?"input_required":"pending",source:a,recheck:c,canUseDocument:l,...s}}function We(e,n,i,s){let a=[...n.acceptedSides??[]];return{kind:"document",key:"document",context:i,section:R(n),side:a.includes("recto")?"verso":"recto",acceptedSides:a,documents:_e(e),...s}}function Ze(e){let n=Y(e,"liveness");return n?.state==="passed"||n?.state==="review"}function xe(e,n,i,s,a){let c=n.icao?.report;return{kind:"portrait",key:`portrait:${a}`,context:i,section:R(n),phase:a,report:Array.isArray(c)?c:null,review:n.state==="review",tuning:e.capture?.icao??null,tuningVersion:e.capture?.tuningVersion??null,icao:$(e),retakeOnly:a==="capture"&&n.state==="input_required"&&e.capture?.livePhoto?.oneCapture===!0&&Ze(e),...s}}var ee={minLongSidePx:1280,jpegQuality:.95};function Je(e,n){let i=e.capture?.livePhoto;if(i?.oneCapture!==!0)return null;let s=Y(e,"portrait_icao"),a=i.still??ee;return{icao:n==="liveness"&&$(e)!==null&&s!==void 0&&s.state==="pending"&&s.reason===void 0,still:{minLongSidePx:a.minLongSidePx??ee.minLongSidePx,jpegQuality:a.jpegQuality??ee.jpegQuality}}}function Xe(e,n,i,s){let a=n.eid,c=R(n);if(a===void 0||a.challenge!=="app_code")return{kind:"unsupported",key:"unsupported:eid_auth",context:i,section:c,checkType:"eid_auth",reason:"update_required"};let u=Te(oe(e)),l=u.length===1&&Be.includes(u[0]?.service??"")?u[0]:void 0,g=l===void 0?void 0:K[l.service],k=g!==void 0,S={kind:"eid",key:"eid",context:i,section:c,provider:a.provider,providerName:a.providerName,country:a.country,challenge:"app_code",phase:a.awaiting==="code"?"code":"identifier",identifierBound:a.identifierBound===!0,canUseCamera:k,afterPass:a.afterPass==="continue"?"continue":"end",...s};return k&&(S.cameraMethod=g),a.expiresAt!==void 0&&(S.codeExpiresAt=a.expiresAt),a.resendAvailableAt!==void 0&&(S.resendAvailableAt=a.resendAvailableAt),a.resendsRemaining!==void 0&&(S.resendsRemaining=a.resendsRemaining),a.codeAttemptsRemaining!==void 0&&(S.codeAttemptsRemaining=a.codeAttemptsRemaining),S}function ze(e,n){if(n.checkType!=="face_match"||n.reason!==void 0)return null;let i=Y(e,"portrait_icao");return i!==void 0&&(i.state==="passed"||i.state==="review")?i:null}function et(e){return pe(e).filter(n=>n.state==="failed").pop()?.attemptsExhausted===!0}function tt(e,n){let i=e.failureReason,s;i===Ie?s="platform_unsupported":e.status==="expired"?s="expired":e.status==="review_pending"?s="review":e.status==="completed"&&e.outcome==="approved"?s="approved":e.status==="completed"&&e.outcome==="review"?s="review":i==="device_cooldown"?s="cooldown":i!==void 0?s="policy_stop":et(e)?s="attempts_exhausted":s="rejected";let a=s==="platform_unsupported"?{sessionId:e.sessionId,status:"unavailable"}:Se(e,{autoRetry:!1}),c={kind:"result",key:"result",context:n,section:null,display:s,result:a};return i!==void 0&&(c.failureReason=i),e.retryAfter!==void 0&&(c.retryAfter=e.retryAfter),c}function nt(e,n,i){let s=e.identitySummary;if(s==null)return null;let a={kind:"identity_summary",key:"identity_summary",context:n,section:i??"identity",summaryKind:s.kind==="partial"?"partial":s.kind??"full",source:s.source,portraitAvailable:s.portrait?.available===!0,retakeAvailable:s.retakeAvailable===!0};for(let c of it){let u=s[c];typeof u=="string"&&u!==""&&(a[c]=u)}return a}var it=["fullName","birthDate","birthYear","nationality","documentType","documentNumberMasked","nniMasked","expiryDate","retakeTarget"];function q(e,n,i,s){return{kind:"unsupported",key:`unsupported:${i}`,context:e,section:n,checkType:i,reason:s}}function ot(e){return e.kind==="contact"?"contact":(e.kind==="identity_method","identity")}function rt(e,n){let i=Ee[e.kind]??[...te,...ne],s=ot(e),a=e.options.flatMap(u=>{if(u.available===!1||!i.includes(u.service))return[];let l={id:u.id,service:u.service};return u.nationalEid!=null&&(l.nationalEid=u.nationalEid),[l]});if(a.length===0){let u=e.options.length>0&&e.options.every(l=>l.service==="nfc");return q(n,s,"choice",u?"platform_unsupported":"update_required")}let c={nodeId:e.nodeId,kind:e.kind,selected:e.selected,options:a};if(e.kind==="identity_method"){let u={kind:"method",key:"method",context:n,section:s,options:a.map(g=>K[g.service]),choice:c},l=a.find(g=>g.nationalEid!==void 0)?.nationalEid;return l!==void 0&&(u.nationalEid=l),u}return e.kind==="contact"?{kind:"contact_choice",key:"contact_choice",context:n,section:s,options:a.map(u=>Oe[u.service]),selected:null,locked:!1,choice:c}:{kind:"choice",key:`choice:${e.nodeId}`,context:n,section:s,choice:c}}function W(e,n={}){let i=je(e);if(z(e)||e.failureReason===Ie)return tt(e,i);let s=e.plan;if(s===void 0||!Array.isArray(s.sections))return q(i,null,"plan","update_required");let a=fe(e);if(a!==null)return rt(a,i);let c=s.current===null?void 0:s.steps.find(h=>h.id===s.current),u=h=>({kind:"processing",key:"processing",context:i,section:h!==void 0?R(h):s.sections.find(v=>v.state==="current")?.id??null,stalled:!1});if(s.current===null)return u(s.steps.find(h=>h.state==="processing"));if(c===void 0||!Ge.has(c.service))return q(i,c===void 0?null:R(c),c?.service??"step","update_required");if(Ue.has(c.service)||!he(c))return u(c);let l=c,g=qe(l),k=l.checkType,S=R(l);switch(k){case"phone_otp":case"email_otp":return Ye(e,l,i,g);case"population_registry":return $e(e,l,i,g);case"eid_auth":return Xe(e,l,i,g);case"doc_ocr":return We(e,l,i,g);case"identity_confirm":return nt(e,i,S)??u(l);case"portrait_icao":return xe(e,l,i,g,"capture");case"liveness":case"face_match":{let h=ze(e,l);if(h!==null)return xe(e,h,i,g,"match");let v=l.requiresMobile===!0,T=$(e);return v&&n.isMobile===!1?{kind:"mobile_required",key:"mobile_required",context:i,section:S,checkType:k}:{kind:"liveness",key:"biometric",context:i,section:S,mode:k==="face_match"?"selfie":"liveness",requiresMobile:v,instructions:T===null?"standard":"icao",icao:T,livePhoto:Je(e,k),...g}}case"nfc_chip":return q(i,S,k,"platform_unsupported");default:return q(i,S,k,"update_required")}}function re(e){return/^\d{10}$/.test(e)&&Number(e)%97===1}function se(e){let n="";for(let i of e){let s=i.codePointAt(0)??0;s>=1632&&s<=1641?n+=String(s-1632):s>=1776&&s<=1785?n+=String(s-1776):i!==" "&&i!=="-"&&i!=="\xA0"&&(n+=i)}return n}var st=[1e3,2e3,4e3,8e3,15e3],at=3e4,ct=/^\+[1-9]\d{7,14}$/,lt=/^\d{6}$/,dt=/^\d{6}$/,ut=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Ae=new Set(["session_not_active","check_not_found","check_already_finalized","check_out_of_order","identity_confirm_required","identity_confirm_locked","choice_locked","choice_option_unavailable","choice_not_found","step_not_on_path","check_not_active"]),pt=new Set(["network_error","timeout","upload_failed","unknown_error","rate_limit_exceeded"]);function Mt(e){let n=!1,i=null,s="",a=!1,c=!1,u=!1,l={},g={},k=new Set,S=!1,h=null,v="idle",T=new Map,M=new Map,P=(t,o,r)=>{let d=`${t}.${o}`,f=T.get(d);if(f!==void 0)return f;let m=M.get(t),y=(m===void 0?r():m.then(r)).finally(()=>{T.delete(d)});T.set(d,y);let p=y.then(()=>{},()=>{});return M.set(t,p),p.then(()=>{M.get(t)===p&&M.delete(t)}),y},w=async(t,o,r)=>{await e.ensureConsent();let d;try{d=await ye(e.runtime,o)}catch(m){if(m instanceof F&&Ae.has(m.code)){await e.refreshView();return}throw m}if(r?.(),e.destroyed())return;let f=d;f.plan!==void 0&&e.setView!==void 0?e.setView(f):await e.refreshView()},D=async t=>{await e.ensureConsent();let o;try{try{o=await t(e.runtime.client)}catch(r){if(!(r instanceof F)||r.code!=="consent_required")throw r;await e.runtime.ensureConsent({force:!0}),o=await t(e.runtime.client)}}catch(r){if(r instanceof F&&Ae.has(r.code)){await e.refreshView();return}throw r}e.destroyed()||(o!==void 0&&e.setView!==void 0?e.setView(o):await e.refreshView())},A=(t,o)=>P("choice",`${t}:${o}`,()=>D(r=>r.choose(t,o))),x=(t,o)=>t.options.some(r=>r.id===o)?A(t.nodeId,o):Promise.reject(new RangeError(`option ${String(o)} is not offered`)),C=(t,o)=>{let r=e.currentView(),d=r===null?void 0:ie(r,t);return d===void 0?Promise.reject(new RangeError(`the ${o} is not offered`)):A(d.nodeId,d.option.id)},U=t=>P("identity",t,()=>D(o=>o.confirmIdentity===void 0?Promise.reject(new Error("identity confirmation is not available in this build")):o.confirmIdentity(t))),V=(t,o)=>{let r=t.kind,d=r==="phone_otp",f=d?"phone":"email",m={action:"send"};if(d?t.needsPhone:t.needsEmail){let y=o[f]??g[r],p=d?y?.replace(/[\s().-]/g,""):y?.trim();if(p===void 0||!(d?ct:ut).test(p))return Promise.reject(d?new O("phone","format"):new j("email","format"));m[f]=p}if(d){let y=t.channels,p=o.channel??(y.length===1?y[0]:void 0);if(y.length>0){if(p===void 0)return Promise.reject(new j("channel","required"));if(!y.includes(p))return Promise.reject(new j("channel","unavailable"))}p!==void 0&&(m.channel=p)}return P(r,"send",()=>w(r,(y,p)=>y.submitCheck(r,m,{idempotencyKey:p}),()=>{l[r]=e.now(),m[f]!==void 0&&(g[r]=m[f])}))},N=(t,o)=>lt.test(o)?P(t,"verify",()=>w(t,(r,d)=>r.submitCheck(t,{action:"verify",code:o},{idempotencyKey:d}))):Promise.reject(new O("code","format")),G=(t,o)=>P("eid_auth",t,()=>w("eid_auth",(r,d)=>r.submitCheck("eid_auth",o,{idempotencyKey:d}))),Q=(t,o)=>{if(t.identifierBound)return G("start",{action:"start"});let r=se(o??"");if(t.country==="MR"){if(!/^\d{10}$/.test(r))return Promise.reject(new O("nni","format"));if(!re(r))return Promise.reject(new O("nni","check_digit"))}else if(r==="")return Promise.reject(new O("nni","format"));return G("start",{action:"start",identifier:r})},B=t=>{switch(t.kind){case"phone_otp":case"email_otp":{let o={...t,send:(d={})=>V(t,d),verify:d=>N(t.kind,d),switchTo:()=>t.canSwitch&&t.switchChannel!==void 0?C([t.switchChannel==="email"?"email_otp":"phone_otp"],"other contact option"):Promise.reject(new RangeError("this session has no other contact option"))},r=l[t.kind];return o.resendAvailableAt===void 0&&r!==void 0&&(o.resendAvailableAt=new Date(r+at).toISOString()),o}case"eid":return{...t,start:o=>Q(t,o),verify:o=>dt.test(o)?G("verify",{action:"verify",code:o}):Promise.reject(new O("code","format")),resend:()=>t.resendsRemaining===0?Promise.reject(new RangeError("no new code can be sent for this session")):G("resend",{action:"resend"}),useCamera:()=>t.canUseCamera&&t.cameraMethod!==void 0?C(t.cameraMethod==="document_photo"?["document"]:["population_registry"],"camera path"):Promise.reject(new RangeError("the camera path is not offered"))};case"method":return{...t,select:o=>{let r=t.choice.options.find(d=>K[d.service]===o);return r!==void 0?x(t.choice,r.id):Promise.reject(new RangeError(`method ${String(o)} is not offered`))},choose:o=>x(t.choice,o)};case"choice":return{...t,choose:o=>x(t.choice,o)};case"registry":return{...t,submitNni:o=>{if(t.source!=="typed")return Promise.reject(new RangeError("this session already holds the NNI"));let r=se(o);return/^\d{10}$/.test(r)?re(r)?P("population_registry","submitNni",()=>w("population_registry",(d,f)=>d.submitCheck("population_registry",{nni:r},{idempotencyKey:f}),()=>{h=`\u2022\u2022\u2022\u2022\u2022\u2022${r.slice(-4)}`})):Promise.reject(new O("nni","check_digit")):Promise.reject(new O("nni","format"))},confirm:()=>P("population_registry","confirm",()=>w("population_registry",(o,r)=>o.submitCheck("population_registry",{},{idempotencyKey:r}))),useDocument:()=>t.canUseDocument?C(["document"],"document method"):Promise.reject(new RangeError("the document method is not offered"))};case"document":return e.bindDocument!==void 0?e.bindDocument(t,H):{...t,issuer:null,documentType:null,captureSide:null,selectDocument:()=>{throw new Error("document capture is not available in this build")},capture:()=>{throw new Error("document capture is not available in this build")}};case"portrait":return e.bindPortrait!==void 0?e.bindPortrait(t,H):{...t,uploadFailed:!1,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("portrait capture is not available in this build")}};case"contact_choice":return{...t,select:o=>{let r=o==="phone"?"phone_otp":o==="email"?"email_otp":void 0,d=t.choice.options.find(f=>f.service===r);return d!==void 0?x(t.choice,d.id):Promise.reject(new RangeError(`contact ${String(o)} is not offered`))},choose:o=>x(t.choice,o)};case"identity_summary":return{...t,...t.nniMasked===void 0&&t.summaryKind==="partial"&&h!==null?{nniMasked:h}:{},portrait:async()=>{let o=e.runtime.client;if(!t.portraitAvailable||o.identityPortrait===void 0)return null;try{return await o.identityPortrait()}catch{return null}},confirm:()=>U("confirm"),retake:()=>t.retakeAvailable?U("retake"):Promise.reject(new RangeError("no retake is left"))};case"liveness":return{...t,capture:o=>e.liveness(o),onLivePhoto:o=>t.livePhoto?.icao===!0&&e.onLivePhoto!==void 0?e.onLivePhoto(o):()=>{}};case"mobile_required":case"processing":return{...t,refresh:async()=>{a=!1,await e.refreshView()}};case"unsupported":case"result":return{...t};default:{let o=t;throw new Error(`runner: unhandled step ${JSON.stringify(o)}`)}}},Z=async()=>{if(!c){c=!0;try{for(let t of st){if(await e.sleep(t),!n||e.destroyed())return;let o=await e.refreshView().catch(()=>null);if(o!==null&&W(o,{isMobile:e.isMobile()}).kind!=="processing")return}a=!0,H()}finally{c=!1}}},J=t=>{if(t.kind!=="liveness"||t.mode!=="selfie")return null;let o={kind:"processing",key:"processing",context:t.context,section:t.section,stalled:!1};if(v==="inflight")return o;if(!S||v==="done")return null;let r=e.keptFaceKey?.()??null;return r===null?null:(v="inflight",w("face_match",(d,f)=>d.submitCheck("face_match",{imageKey:r},{idempotencyKey:f}),()=>{v="done"}).then(()=>{v==="inflight"&&(v="done",H())},()=>{v="done",H()}),o)},L=(t,o=!1)=>{if(!n||e.destroyed()||e.chainBusy())return;let r=W(t,{isMobile:e.isMobile()});r.kind==="registry"&&r.recheck&&(S=!0,v="idle"),r=J(r)??r,r.kind==="processing"?r.stalled=a:a=!1;let d=B(r),f=r.kind==="result"?void 0:r.context.switchable,m=f===void 0?d:{...d,chooseOption:p=>x({nodeId:f.nodeId,kind:f.kind,selected:f.current,options:f.options},p)},y=JSON.stringify(m);r.kind==="registry"&&r.source==="document"&&r.state==="pending"&&!k.has("registry")&&(k.add("registry"),m.confirm().catch(p=>{(!(p instanceof F)||pt.has(p.code))&&k.delete("registry")})),!(!o&&y===s)&&(s=y,i=m,e.emitStep(m),r.kind==="processing"&&!a&&v!=="inflight"&&Z(),r.kind==="result"&&!u&&(u=!0,e.emitResult(r.result)))};function H(){let t=e.currentView();t!==null&&L(t,!0)}return{run:async()=>{if(e.destroyed())throw new Error("verification destroyed");n=!0;let t=await e.ensureView();return i===null&&L(t),i??B(W(t,{isMobile:e.isMobile()}))},current:()=>i,onView:t=>L(t),onChainIdle:()=>{let t=e.currentView();t!==null&&L(t)},republish:H,submit:w}}export{Ve as a,ht as b,be as c,Pe as d,vt as e,W as f,st as g,at as h,Mt as i};
@@ -1 +0,0 @@
1
- import{a as j,c as M,d as L,e as N,f as Ce,g as E,h as U,i as P,j as B,k as x,l as A,m as V,u as _e,v as ke}from"./chunk-AHD4DA2V.js";import{m as ye}from"./chunk-IJLHPX35.js";import{a as he}from"./chunk-GT2ZLGF7.js";import{d as J}from"./chunk-FUHDOEBP.js";import{c as Q,e as ge,f as F}from"./chunk-URUKV6NC.js";var Ge="https://api.sekyro.ai",Ke=5e3,qe=1500,Ye=10;function We(e){return new Promise(t=>setTimeout(t,e))}function Ze(){let e=globalThis.crypto;if(e!==void 0&&typeof e.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(e!==void 0&&typeof e.getRandomValues=="function")e.getRandomValues(t);else for(let o=0;o<16;o+=1)t[o]=Math.floor(Math.random()*256);t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let i=[...t].map(o=>o.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}function It(e){return Je(e,{})}function Je(e,t){let i=e.apiOrigin??Ge,o=e.autoRetry??!0,r=e.rearm??"auto",s=t.client??new ge({apiOrigin:i,sessionToken:e.clientToken,fetch:e.fetch}),l=t.sleep??We,a=t.uuid??Ze,S=t.getTurnstileToken??((n,c)=>import("./turnstile-FATNZ4AG.js").then(d=>d.executeTurnstile(n,c))),m=he(),f=null,h=null,u=!1,O=new AbortController,p=null,G=null,b=n=>{p=n,m.emit("view",n),f?.onView(n)},_=()=>p!==null?Promise.resolve(p):(G??(G=s.getSession().then(n=>(b(n),n)).finally(()=>{G=null})),G),v=async()=>{let n=await s.getSession();return b(n),n},K=async(n,c)=>{n.plan!==void 0?b(n):await v()},q=null,te=async n=>{let c=await _();if(!n&&c.consentRecorded)return;let d=await s.recordConsent(e.locale);d.plan!==void 0?b(d):p!==null&&b({...p,consentRecorded:!0})},w=n=>n?.force===!0?te(!0):(q??(q=te(!1).finally(()=>{q=null})),q),Y={client:s,ensureConsent:n=>w(n),sleep:l,uuid:a,onBusy:n=>{u||m.emit("busy",n)}},ne=!1,ie=null,W=n=>{if(n.status==="approved"||n.status==="rejected"||n.status==="review"){if(ne)return;ne=!0}ie=JSON.stringify(n),m.emit("result",n)},we=n=>{ie!==JSON.stringify(n)&&W(n)},oe=async n=>{let c=p;n&&(c=await v().catch(()=>p));let d=c===null?null:E(c);return d!==null&&!u&&m.emit("method",d),d!==null},re=null,se=!1,ae=!1,ce=()=>_e(Y,(n,c)=>n.submitCheck("population_registry",{},{idempotencyKey:c})),le=n=>n.nniBound===!0||x(n,"population_registry")?.nniFromDocument===!0,Ee=async()=>{try{let n=await _();if(P(n)||E(n)!==null||B(n)?.checkType!=="population_registry")return;if(!le(n)&&x(n,"population_registry")?.nniFromDocument===void 0&&(n=await v()),!le(n)){ae=!0;return}await w(),await K(await ce(),"population_registry");let c=p===null?void 0:x(p,"population_registry");if(c?.state==="input_required"&&c.reason==="registry_unavailable"&&N(c)>0){if(await l(Ke),u)return;await K(await ce(),"population_registry")}}catch(n){if(n instanceof Q&&(n.code==="check_not_active"||n.code==="step_not_on_path")){await v().catch(()=>{});return}se=!0;return}p!==null&&P(p)&&W(V(p,{autoRetry:o}))},ue=()=>(re??(re=Ee()),re),Oe=async()=>{let c=(await _()).turnstileSiteKey;return c===null?{sandbox:!0}:{channel:"hosted_web",siteKey:c,turnstileToken:await S(c,{signal:O.signal})}},k=null,de=Promise.resolve(),T=0,Te=async()=>{let n=await _();for(let c=0;c<Ye&&!u&&!P(n)&&B(n)===void 0&&L(n).some(d=>d.state==="processing")&&(await l(qe),!u);c+=1)n=await v();return n},Me=async(n,c,d)=>{let{capture:g}=n,C=()=>u,H=()=>n.alive&&n.attempt===d,me=y=>{H()&&g.setFlowState(y)},I=y=>{if(!C()&&(W(y),!!H())){if(y.status==="retry"&&r==="auto"){g.handle.retry();return}g.setFlowState("done")}};if(c.degraded==="NO_RECORDER"){let y=p?.sessionId??(await _().catch(()=>null))?.sessionId??"";I(A(y,"no_recorder"));return}me("uploading");try{if(await ue(),C())return;let y=await _(),Se;if(!P(y)&&E(y)!==null){await oe(!1),I(A(y.sessionId,"method_required"));return}if(!P(y)){if(B(y)?.checkType==="population_registry"){I(A(y.sessionId,ae?"nni_unbound":se?"network":"registry_unavailable"));return}if(await w(),C())return;Se=p??y;let Z=await ke({...Y,artifacts:c,getAttestation:Oe,getView:()=>p??y,refreshView:v,applySubmit:K,onPhase:me,isCancelled:C,onKeyframePromoted:Fe=>{h=Fe}});if(C())return;if(Z.kind==="unavailable"){I(A(y.sessionId,Z.reason));return}if(Z.kind==="resync"&&await v(),p!==null&&E(p)!==null){await oe(!1),I(A(y.sessionId,"method_required"));return}y=await Te()}I(V(y,{autoRetry:o,previous:Se}))}catch{if(C())return;I(A(p?.sessionId??"","network"))}},Ve=(n,c)=>{let d=n.attempt;T>0&&n.alive&&n.capture.setFlowState("uploading"),T+=1,de=de.then(()=>Me(n,c,d)).finally(()=>{T-=1,T===0&&f?.onChainIdle()}).catch(()=>{})},pe=n=>{k?.capture.handle.destroy(),k!==null&&(k.alive=!1);let c=ye(n,f?.captureInternals?.(n)??t.capture,()=>p?.capture?.liveness?.keyframe?.rank===!0,()=>j(p),()=>p?.capture?.liveness?.screenRamp),d={capture:c,alive:!0,attempt:0};k=d,c.handle.on("state",C=>{C==="starting"&&(d.attempt+=1)}),c.handle.on("captured",C=>{Promise.resolve().then(()=>Ve(d,C))});let g=c.handle;return{get state(){return g.state},get captureMode(){return g.captureMode},get facingMode(){return g.facingMode},on:(C,H)=>g.on(C,H),start:async C=>{if(p===null&&await _().catch(()=>{}),!!d.alive)return g.start(C)},retry:()=>g.retry(),switchCamera:()=>g.switchCamera(),destroy:()=>{d.alive=!1,k===d&&(k=null),g.destroy()}}},De=async()=>{if(u)return null;try{let n=await _();return u?null:E(n)}catch{return null}},He=async()=>{if(u)return"self";try{let n=await _();return u?"self":j(n)}catch{return"self"}},Le=async()=>{if(u)return!1;try{let n=await _();if(u||P(n))return!1;let c=x(n,"liveness");return U(c)&&c?.requiresMobile===!0&&!J()}catch{return!1}},Ne=async()=>{if(u)return!1;try{let n=await _();return!u&&n.returning===!0}catch{return!1}},Ue=async n=>{let c=(await _()).plan?.choice,d=c?.options.find(C=>M[C.service]===n);if(!d)throw new RangeError(`method ${String(n)} is not offered`);let g=await s.choose(c.nodeId,d.id);u||b(g)},fe=null,Be=()=>(fe??(fe=import("./plan-runner-ZVAY4FSB.js").then(n=>{let c=n.createPlanRunner({runtime:Y,currentView:()=>p,ensureView:_,refreshView:v,ensureConsent:()=>w(),liveness:pe,chainBusy:()=>T>0,destroyed:()=>u,sleep:l,isMobile:J,now:t.now??Date.now,keptFaceKey:()=>h,setView:b,baseCapture:t.capture,emitStep:d=>{u||m.emit("step",d)},emitResult:we,documentInternals:t.document,portraitInternals:t.portrait,livePhotoInternals:t.livePhoto});return f=c,c})),fe);return{consent:()=>w(),startRegistry:ue,methodChoice:De,selectMethod:Ue,reportCameraUnavailable:async n=>{await w();let c=s.reportCameraUnavailable;if(c===void 0)throw new TypeError("this client cannot report a missing camera");let d=await c.call(s,n).catch(g=>{if(g instanceof Q&&g.code==="check_out_of_order")return s.getSession();throw g});u||b(d)},mobileRequired:Le,captureMode:He,returning:Ne,liveness:pe,run:async()=>{if(u)throw new Error("verification destroyed");return(await Be()).run()},currentStep:()=>f?.current()??null,voiceClips:async()=>{if(u)return null;try{let n=await _();return u?null:n.voice??null}catch{return null}},on:(n,c)=>m.on(n,c),destroy:()=>{u=!0,O.abort(),f?.destroy(),k!==null&&(k.alive=!1,k.capture.handle.destroy(),k=null),m.clear()}}}var Pe=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"];var Qe=["carte_identite","passport","residence_permit"];function je(e,t){let i=e.byIssuer?.[t]??e.default;return Qe.filter(o=>i==="*"||i.includes(o))}function Ot(e,t=Pe){return[...new Set([...t,...Object.keys(e.byIssuer??{})])].filter(o=>je(e,o).length>0).sort()}function xe(e){if(e.acceptedDocuments)return e.acceptedDocuments;let t=e.acceptedDocumentTypes?.length?[...e.acceptedDocumentTypes]:["carte_identite","passport"];return{default:[],byIssuer:{MR:t}}}function Tt(e){return/^[A-Z]{2}$/.test(e)?String.fromCodePoint(...[...e].map(t=>127462+t.charCodeAt(0)-65)):""}var Lt=["national_number","document_photo","national_eid"],$e=new Set(["phone_otp","email_otp","national_eid","document","nfc","population_registry","supplied_identity","summary_confirm","liveness","face_match","aml_screening","face_dedup"]),Xe=new Set(["supplied_identity","aml_screening","face_dedup"]),X=["document","population_registry","national_eid"],z=["phone_otp","email_otp"],ve={identity_method:X,contact:z},ze=["population_registry","document"],Re="platform_unsupported",et=new Set(["prefilled","user_entered","prefilled_or_entered"]),tt={phone_otp:"contact",email_otp:"contact",eid_auth:"identity",doc_ocr:"identity",nfc_chip:"identity",population_registry:"identity",liveness:"live_photo",portrait_icao:"live_photo",face_match:"live_photo"};function R(e){return e.section??tt[e.checkType]??null}function nt(e,t){let i=e.plan?.choice;if(i===void 0||i.locked)return;let o=i.options.find(r=>r.id!==i.selected&&r.available!==!1&&t.includes(r.service));return o===void 0?void 0:{nodeId:i.nodeId,option:o}}function ee(e){let t=e.plan,i=t?.choice;if(t===void 0||i===void 0||i.locked||t.current===null||t.current===i.nodeId||P(e))return null;let o=ve[i.kind]??[...X,...z],r=i.options.flatMap(a=>a.available===!1||!o.includes(a.service)?[]:[a.nationalEid!=null?{id:a.id,service:a.service,nationalEid:a.nationalEid}:{id:a.id,service:a.service}]),s=t.steps.find(a=>a.id===t.current)?.service,l=i.selected??r.find(a=>a.service===s)?.id??null;return r.some(a=>a.id!==l)?{nodeId:i.nodeId,kind:i.kind,current:l,options:r}:null}function Ie(e){return e==null?[]:e.options.filter(t=>t.id!==e.current)}function it(e){let t=(e.plan?.sections??[]).map(r=>({id:r.id,state:r.state})),i={sessionId:e.sessionId,orgName:e.orgName,returning:e.returning===!0,consentRecorded:e.consentRecorded,expiresAt:e.expiresAt,sections:t.map(r=>r.id),progress:t,purpose:e.purpose??"identity"};e.branding!==void 0&&(i.branding=e.branding),e.cameraUnavailableHandled===!0&&(i.cameraUnavailableHandled=!0);let o=ee(e);return o!==null&&(i.switchable=o),i}function ot(e){let t={attemptsRemaining:N(e),attemptsExhausted:e.attemptsExhausted===!0};return e.reason!==void 0&&(t.reason=e.reason),e.retakeHint!==void 0&&(t.retakeHint=e.retakeHint),t}var Ae={phone_otp:"phone",email_otp:"email"};function rt(e,t){let i=nt(e,[t==="phone_otp"?"email_otp":"phone_otp"]);return i===void 0?void 0:Ae[i.option.service]}function st(e,t,i,o){let r=t.checkType==="email_otp",s=(r?t.emailOtp:t.otp)??{},l=r?t.emailOtp?.emailSource:t.otp?.numberSource,a=l!==void 0&&et.has(l)?l:r?"prefilled_or_entered":"user_entered",S=typeof s.sentToMasked=="string"&&s.sentToMasked.length>0,m=rt(e,r?"email_otp":"phone_otp"),f={key:t.checkType,context:i,section:R(t),phase:S?"verify":"send",canSwitch:m!==void 0,...o},h=r?{kind:"email_otp",...f,emailSource:a,needsEmail:a!=="prefilled"}:{kind:"phone_otp",...f,numberSource:a,needsPhone:a!=="prefilled",channels:(t.otp?.channels??[]).filter(u=>u==="whatsapp"||u==="sms")};return m!==void 0&&(h.switchChannel=m),S&&(h.sentToMasked=s.sentToMasked),!r&&t.otp?.channel!==void 0&&(h.channel=t.otp.channel),s.expiresAt!==void 0&&(h.codeExpiresAt=s.expiresAt),s.resendAvailableAt!==void 0&&(h.resendAvailableAt=s.resendAvailableAt),h}function at(e,t,i,o){let r=e.nniBound===!0?"bound":t.nniFromDocument===!0?"document":"typed",s=r==="typed"&&t.state==="input_required"&&t.reason==="nni_recheck",l=Ie(ee(e)),a=!o.attemptsExhausted&&l.length===1&&l[0]?.service==="document";return{kind:"registry",key:"registry",context:i,section:R(t),state:t.state==="input_required"?"input_required":"pending",source:r,recheck:s,canUseDocument:a,...o}}function ct(e,t,i,o){let r=[...t.acceptedSides??[]];return{kind:"document",key:"document",context:i,section:R(t),side:r.includes("recto")?"verso":"recto",acceptedSides:r,documents:xe(e),...o}}function lt(e){let t=x(e,"liveness");return t?.state==="passed"||t?.state==="review"}function be(e,t,i,o,r){let s=t.icao?.report;return{kind:"portrait",key:`portrait:${r}`,context:i,section:R(t),phase:r,report:Array.isArray(s)?s:null,review:t.state==="review",tuning:e.capture?.icao??null,tuningVersion:e.capture?.tuningVersion??null,icao:F(e),retakeOnly:r==="capture"&&t.state==="input_required"&&e.capture?.livePhoto?.oneCapture===!0&&lt(e),...o}}var $={minLongSidePx:1280,jpegQuality:.95};function ut(e,t){let i=e.capture?.livePhoto;if(i?.oneCapture!==!0)return null;let o=x(e,"portrait_icao"),r=i.still??$;return{icao:t==="liveness"&&F(e)!==null&&o!==void 0&&o.state==="pending"&&o.reason===void 0,still:{minLongSidePx:r.minLongSidePx??$.minLongSidePx,jpegQuality:r.jpegQuality??$.jpegQuality}}}function dt(e,t,i,o){let r=t.eid,s=R(t);if(r===void 0||r.challenge!=="app_code")return{kind:"unsupported",key:"unsupported:eid_auth",context:i,section:s,checkType:"eid_auth",reason:"update_required"};let l=Ie(ee(e)),a=l.length===1&&ze.includes(l[0]?.service??"")?l[0]:void 0,S=a===void 0?void 0:M[a.service],m=S!==void 0,f={kind:"eid",key:"eid",context:i,section:s,provider:r.provider,providerName:r.providerName,country:r.country,challenge:"app_code",phase:r.awaiting==="code"?"code":"identifier",identifierBound:r.identifierBound===!0,canUseCamera:m,afterPass:r.afterPass==="continue"?"continue":"end",...o};return m&&(f.cameraMethod=S),r.expiresAt!==void 0&&(f.codeExpiresAt=r.expiresAt),r.resendAvailableAt!==void 0&&(f.resendAvailableAt=r.resendAvailableAt),r.resendsRemaining!==void 0&&(f.resendsRemaining=r.resendsRemaining),r.codeAttemptsRemaining!==void 0&&(f.codeAttemptsRemaining=r.codeAttemptsRemaining),f}function pt(e,t){if(t.checkType!=="face_match"||t.reason!==void 0)return null;let i=x(e,"portrait_icao");return i!==void 0&&(i.state==="passed"||i.state==="review")?i:null}function ft(e){return L(e).filter(t=>t.state==="failed").pop()?.attemptsExhausted===!0}function mt(e,t){let i=e.failureReason,o;i===Re?o="platform_unsupported":e.status==="expired"?o="expired":e.status==="review_pending"?o="review":e.status==="completed"&&e.outcome==="approved"?o="approved":e.status==="completed"&&e.outcome==="review"?o="review":i==="device_cooldown"?o="cooldown":i!==void 0?o="policy_stop":ft(e)?o="attempts_exhausted":o="rejected";let r=o==="platform_unsupported"?{sessionId:e.sessionId,status:"unavailable"}:V(e,{autoRetry:!1}),s={kind:"result",key:"result",context:t,section:null,display:o,result:r};return i!==void 0&&(s.failureReason=i),e.retryAfter!==void 0&&(s.retryAfter=e.retryAfter),s}function St(e,t,i){let o=e.identitySummary;if(o==null)return null;let r={kind:"identity_summary",key:"identity_summary",context:t,section:i??"identity",summaryKind:o.kind==="partial"?"partial":o.kind??"full",source:o.source,portraitAvailable:o.portrait?.available===!0,retakeAvailable:o.retakeAvailable===!0};for(let s of ht){let l=o[s];typeof l=="string"&&l!==""&&(r[s]=l)}return r}var ht=["fullName","birthDate","birthYear","nationality","documentType","documentNumberMasked","nniMasked","expiryDate","retakeTarget"];function D(e,t,i,o){return{kind:"unsupported",key:`unsupported:${i}`,context:e,section:t,checkType:i,reason:o}}function yt(e){return e.kind==="contact"?"contact":(e.kind==="identity_method","identity")}function gt(e,t){let i=ve[e.kind]??[...X,...z],o=yt(e),r=e.options.flatMap(l=>{if(l.available===!1||!i.includes(l.service))return[];let a={id:l.id,service:l.service};return l.nationalEid!=null&&(a.nationalEid=l.nationalEid),[a]});if(r.length===0){let l=e.options.length>0&&e.options.every(a=>a.service==="nfc");return D(t,o,"choice",l?"platform_unsupported":"update_required")}let s={nodeId:e.nodeId,kind:e.kind,selected:e.selected,options:r};if(e.kind==="identity_method"){let l={kind:"method",key:"method",context:t,section:o,options:r.map(S=>M[S.service]),choice:s},a=r.find(S=>S.nationalEid!==void 0)?.nationalEid;return a!==void 0&&(l.nationalEid=a),l}return e.kind==="contact"?{kind:"contact_choice",key:"contact_choice",context:t,section:o,options:r.map(l=>Ae[l.service]),selected:null,locked:!1,choice:s}:{kind:"choice",key:`choice:${e.nodeId}`,context:t,section:o,choice:s}}function Nt(e,t={}){let i=it(e);if(P(e)||e.failureReason===Re)return mt(e,i);let o=e.plan;if(o===void 0||!Array.isArray(o.sections))return D(i,null,"plan","update_required");let r=Ce(e);if(r!==null)return gt(r,i);let s=o.current===null?void 0:o.steps.find(h=>h.id===o.current),l=h=>({kind:"processing",key:"processing",context:i,section:h!==void 0?R(h):o.sections.find(u=>u.state==="current")?.id??null,stalled:!1});if(o.current===null)return l(o.steps.find(h=>h.state==="processing"));if(s===void 0||!$e.has(s.service))return D(i,s===void 0?null:R(s),s?.service??"step","update_required");if(Xe.has(s.service)||!U(s))return l(s);let a=s,S=ot(a),m=a.checkType,f=R(a);switch(m){case"phone_otp":case"email_otp":return st(e,a,i,S);case"population_registry":return at(e,a,i,S);case"eid_auth":return dt(e,a,i,S);case"doc_ocr":return ct(e,a,i,S);case"identity_confirm":return St(e,i,f)??l(a);case"portrait_icao":return be(e,a,i,S,"capture");case"liveness":case"face_match":{let h=pt(e,a);if(h!==null)return be(e,h,i,S,"match");let u=a.requiresMobile===!0,O=F(e);return u&&t.isMobile===!1?{kind:"mobile_required",key:"mobile_required",context:i,section:f,checkType:m}:{kind:"liveness",key:"biometric",context:i,section:f,mode:m==="face_match"?"selfie":"liveness",requiresMobile:u,instructions:O===null?"standard":"icao",icao:O,livePhoto:ut(e,m),...S}}case"nfc_chip":return D(i,f,m,"platform_unsupported");default:return D(i,f,m,"update_required")}}export{Ge as a,Ke as b,qe as c,Ye as d,Ze as e,It as f,Je as g,Pe as h,Qe as i,je as j,Ot as k,xe as l,Tt as m,Lt as n,Re as o,R as p,ee as q,Ie as r,pt as s,Nt as t};