@sekyro/web 0.1.0-rc.37 → 0.1.0-rc.38

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 (60) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{capture-session-doc-6MUKGUJ3.js → capture-session-doc-MGDYUASI.js} +1 -1
  3. package/dist/{capture-session-v3-BdpUe0ht.d.cts → capture-session-v3-Dz-AQW52.d.cts} +1 -1
  4. package/dist/{capture-session-v3-Q4otwuve.d.ts → capture-session-v3-Z2KI_2p9.d.ts} +1 -1
  5. package/dist/chunk-5AR5GTEJ.js +1 -0
  6. package/dist/{chunk-DTQTSZAX.js → chunk-C4XDRRU5.js} +1 -1
  7. package/dist/{chunk-KORZGQLS.js → chunk-COZXZAD5.js} +1 -1
  8. package/dist/chunk-IAKYKPL6.js +1 -0
  9. package/dist/chunk-IOCOIZKE.js +3 -0
  10. package/dist/chunk-MQHTFHSN.js +1 -0
  11. package/dist/chunk-PBWIMNSN.js +1 -0
  12. package/dist/{chunk-7GUHA2NM.js → chunk-QTOMWAS6.js} +1 -1
  13. package/dist/{chunk-LTGRPMMY.js → chunk-TOISWBOX.js} +1 -1
  14. package/dist/chunk-TQQK7464.js +1 -0
  15. package/dist/chunk-U5TL63CG.js +1 -0
  16. package/dist/chunk-VMHFHHPP.js +1 -0
  17. package/dist/{chunk-ISMVEF7H.js → chunk-WNBEOK5Q.js} +1 -1
  18. package/dist/chunk-XDB7L5KS.js +1 -0
  19. package/dist/client/index.cjs +1 -1
  20. package/dist/client/index.d.cts +3 -3
  21. package/dist/client/index.d.ts +3 -3
  22. package/dist/client/index.js +1 -1
  23. package/dist/core/index.cjs +1 -1
  24. package/dist/core/index.d.cts +3 -3
  25. package/dist/core/index.d.ts +3 -3
  26. package/dist/core/index.js +1 -1
  27. package/dist/core/ocr/worker.bundle.js +12 -12
  28. package/dist/core/ocr/worker.cjs +12 -12
  29. package/dist/core/ocr/worker.js +9 -9
  30. package/dist/create-document-capture-KISF6XD3.js +1 -0
  31. package/dist/{create-verification-CCCvsDdp.d.ts → create-verification-2Qm_K28Y.d.ts} +5 -4
  32. package/dist/{create-verification-BJGWTzCS.d.cts → create-verification-BG6A2iyO.d.cts} +5 -4
  33. package/dist/{detector-scanic-LYXXX77M.js → detector-scanic-JC25DD3A.js} +1 -1
  34. package/dist/{icao-gate-C2B9Yyz0.d.cts → icao-gate-Dyb0wGO3.d.cts} +8 -1
  35. package/dist/{icao-gate-toRhhMow.d.ts → icao-gate-QqtNED0V.d.ts} +8 -1
  36. package/dist/{icao-policy-xp26r3lv.d.ts → icao-policy-DsaRylAQ.d.ts} +2 -2
  37. package/dist/{icao-policy-CFoaL76l.d.cts → icao-policy-iIBtqhbf.d.cts} +2 -2
  38. package/dist/index.cjs +2 -2
  39. package/dist/index.d.cts +7 -7
  40. package/dist/index.d.ts +7 -7
  41. package/dist/index.js +1 -1
  42. package/dist/internal/index.cjs +3 -3
  43. package/dist/internal/index.d.cts +6 -6
  44. package/dist/internal/index.d.ts +6 -6
  45. package/dist/internal/index.js +1 -1
  46. package/dist/plan-runner-NWK4LZFI.js +1 -0
  47. package/dist/{types-BUvxjU5V.d.cts → types-Cy_SJtPf.d.cts} +30 -3
  48. package/dist/{types-BUvxjU5V.d.ts → types-Cy_SJtPf.d.ts} +30 -3
  49. package/package.json +1 -1
  50. package/sbom.cdx.json +19 -19
  51. package/dist/chunk-2DBOZDYR.js +0 -1
  52. package/dist/chunk-5QUJHFOH.js +0 -1
  53. package/dist/chunk-AYWS6XTB.js +0 -1
  54. package/dist/chunk-EP6FVAR4.js +0 -3
  55. package/dist/chunk-GVAN773O.js +0 -1
  56. package/dist/chunk-JULJQOVT.js +0 -1
  57. package/dist/chunk-PW2HWXBJ.js +0 -1
  58. package/dist/chunk-QPO6LOYB.js +0 -1
  59. package/dist/create-document-capture-EK7EDLTD.js +0 -1
  60. package/dist/plan-runner-7XZH4SBZ.js +0 -1
@@ -1,12 +1,12 @@
1
- import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-BJGWTzCS.cjs';
2
- export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-BJGWTzCS.cjs';
1
+ import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-BG6A2iyO.cjs';
2
+ export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-BG6A2iyO.cjs';
3
3
  export { O as OCR_ASSET_SET } from '../assets.generated-DpkbvoII.cjs';
4
4
  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-CVqpMNGA.cjs';
5
- import { a9 as HostedSessionView, h as CheckType, aG as PlanStepView } from '../types-BUvxjU5V.cjs';
6
- export { bt as ICAO_FALLBACK, bn as IcaoCaptureTuning, bu as IcaoProfile, bv as ResolvedIcaoTuning, bw as resolveIcaoTuning } from '../types-BUvxjU5V.cjs';
7
- export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-C2B9Yyz0.cjs';
5
+ import { aa as HostedSessionView, i as CheckType, aH as PlanStepView } from '../types-Cy_SJtPf.cjs';
6
+ export { bu as ICAO_FALLBACK, bo as IcaoCaptureTuning, bv as IcaoProfile, bw as ResolvedIcaoTuning, bx as resolveIcaoTuning } from '../types-Cy_SJtPf.cjs';
7
+ export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-Dyb0wGO3.cjs';
8
8
  import '../detect-worker-CHqsPJoM.cjs';
9
- import '../capture-session-v3-BdpUe0ht.cjs';
9
+ import '../capture-session-v3-Dz-AQW52.cjs';
10
10
 
11
11
  /** `processing` re-reads (1+2+4+8+15 = 30 s, spec §6.5), then `stalled`. */
12
12
  declare const PROCESSING_BACKOFF_MS: readonly number[];
@@ -1,12 +1,12 @@
1
- import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-CCCvsDdp.js';
2
- export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-CCCvsDdp.js';
1
+ import { bc as SubmitRuntime, a9 as LivenessCaptureOptions, a8 as LivenessCaptureHandle, aX as VerificationStep, aV as VerificationResult, aM as StepSnapshot, a4 as LivePhotoGateUpdate, bd as HostedClientLike, be as DocCatalogEntry, bf as DeviceTier, bg as LiveMrzTuning, bh as TextLockTuning, bi as OcrEngineClient, bj as DocAssistReport, bk as ReadyInfo, bl as LoadFailure, bm as OcrEngineOptions } from '../create-verification-2Qm_K28Y.js';
2
+ export { bn as ANALYSIS_LONG_EDGE, bo as ASPECT_BANDS, bp as AttestationError, bq as BLUR_REFUSE_SHARPNESS_MAX, br as BlurStatus, bs as CAPTURE_CANDIDATE_SPACING_MS, bt as CAPTURE_EXTRA_CANDIDATES, bu as CHALLENGE_EXECUTE_TIMEOUT_MS, bv as CHALLENGE_READY_TIMEOUT_MS, bw as CLIP_MIME_ALLOWLIST, bx as CaptureEngine, by as CaptureSessionDoc, bz as CaptureSessionDocEvents, bA as CaptureSessionDocOptions, bB as ChallengeAction, bC as ChallengeError, m as ChallengeErrorCode, bD as DOC_ANALYSIS_DEFAULTS, bE as DOC_BLACK_FRAME_LUMA, bF as DOC_BLACK_FRAME_TICKS, bG as DOC_CADENCE_HZ, bH as DOC_CAMERA_TUNING_DEFAULTS, bI as DOC_CATALOG, bJ as DOC_DETECT_WIDTH, bK as DOC_FEEDBACK_STATES, bL as DOC_FIRST_FRAME_MS, bM as DOC_GATE_V1_DEFAULTS, bN as DOC_SHUTTER_DEFAULTS, bO as DeviceReadHint, bP as DocArtifacts, bQ as DocAssist, bR as DocAssistEngine, bS as DocAssistTick, bT as DocCameraTuning, bU as DocCaptureReport, bV as DocCaptureVia, bW as DocChecksPayload, bX as DocEngineLike, bY as DocFeedbackAggregator, bZ as DocFeedbackKey, b_ as DocFeedbackState, b$ as DocFormat, c0 as DocFrameAnalysis, c1 as DocFrameMeasures, c2 as DocGateQuality, c3 as DocGateThresholds, c4 as DocGateTick, c5 as DocGateTickInput, c6 as DocGateV1, c7 as DocQuad, c8 as DocQuadPoint, c9 as DocShutterReason, ca as DocShutterTuning, cb as DocSide, cc as DocumentCaptureController, cd as DocumentCaptureInternals, ce as EMPTY_GUIDE_METRICS, cf as EncodedDocument, cg as ExecuteChallengeOptions, ch as FLIP_FILL_MIN, ci as FLIP_GAP_MS, cj as FLIP_TIMEOUT_MS, ck as FocusCaps, cl as FramingStatus, cm as GUIDE_LOCK_DEFAULTS, cn as GlareStatus, co as GrabbedFrame, cp as GuideBlocker, cq as GuideLock, cr as GuideLockTick, cs as GuideLockTuning, ct as GuideMetrics, cu as GuideRect, cv as INFERENCE_RETRY_ATTEMPTS, cw as INFERENCE_RETRY_DEFAULT_S, a0 as ISSUER_CODES, cx as LANDMARKER_MODEL, cy as LENS_STORAGE_KEY, cz as LIVE_MRZ_DEFAULTS, cA as LIVE_PHOTO_IDLE_MS, cB as LIVE_PHOTO_MAX_HZ, cC as LandmarkedFace, cD as LandmarkerLike, cE as LensSource, cF as LightingStatus, cG as LiveMrzCapture, cH as LiveMrzState, cI as LivePhotoGate, cJ as LivePhotoKit, cK as LivePhotoKitInternals, cL as LivePhotoKitOptions, cM as LivePhotoStill, cN as LivenessCaptureInternalHandle, cO as LivenessCaptureInternals, cP as LivenessFlowDeps, cQ as LivenessFlowOutcome, cR as MANUAL_SHUTTER_MS, cS as MR_DOC_CATALOG, cT as NO_REPORT_MS, cU as OpenDocCameraDeps, cV as PORTRAIT_JPEG_QUALITY, cW as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cX as PRELOAD_BUDGET_MS, cY as PROCESSING_POLL_DELAY_MS, cZ as PROCESSING_POLL_MAX, c_ as PortraitCaptureController, c$ as PortraitCaptureInternals, d0 as REGISTRY_RETRY_DELAY_MS, d1 as ReticleType, d2 as SAME_FACE_MAX_DROPS, d3 as ScanEvent, d4 as ScanLayout, d5 as ScanNotice, d6 as ScanPhase, d7 as ScanReport, d8 as ScanSide, d9 as ScanState, da as SubmitExecutor, db as TEXT_LOCK_DEFAULTS, dc as TRANSPORT_REPLAY_ATTEMPTS, dd as TRANSPORT_REPLAY_DELAY_MS, de as VerificationInternals, df as analyzeDocFrame, dg as analyzeGuide, dh as aspectBand, di as aspectFits, dj as buildDeviceReadHint, dk as coverPointToVideo, dl as createDocumentCaptureInternal, dm as createFaceLandmarker, dn as createLivePhotoKit, dp as createLivenessCaptureInternal, dq as createPortraitCaptureInternal, dr as createVerificationInternal, ds as docZoomFor, dt as encodeDocumentImage, du as executeChallenge, dv as facesOf, dw as feedbackVoteOf, dx as focusOk, dy as guideQuad, dz as guideRegionInFrame, dA as initialScanState, dB as mapEngineState, dC as mapErrorKind, dD as mapGuidanceHint, dE as nextScanState, dF as observePortraitFrame, dG as openDocCamera, dH as passportBandOf, dI as portraitMatchStep, dJ as preloadedDetectorFactory, dK as quadAreaFrac, dL as quadBounds, dM as quadIou, dN as quadTiltRatio, dO as randomUuid, dP as readStoredLens, dQ as resetChallengeFrameForTests, dR as resetLivenessAssetsForTests, dS as resolveDocCameraTuning, dT as resolveDocShutterTuning, dU as resolveGuideLockTuning, dV as runLivenessFlow, dW as runSubmission, dX as scannerFormatFor, dY as setPreloadLoaderForTests, dZ as settledHint, d_ as singleShotFocusAt, d$ as specularFraction, e0 as supportsFocusMode, e1 as warmDocDetector, e2 as writeStoredLens } from '../create-verification-2Qm_K28Y.js';
3
3
  export { O as OCR_ASSET_SET } from '../assets.generated-DpkbvoII.js';
4
4
  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-CVqpMNGA.js';
5
- import { a9 as HostedSessionView, h as CheckType, aG as PlanStepView } from '../types-BUvxjU5V.js';
6
- export { bt as ICAO_FALLBACK, bn as IcaoCaptureTuning, bu as IcaoProfile, bv as ResolvedIcaoTuning, bw as resolveIcaoTuning } from '../types-BUvxjU5V.js';
7
- export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-toRhhMow.js';
5
+ import { aa as HostedSessionView, i as CheckType, aH as PlanStepView } from '../types-Cy_SJtPf.js';
6
+ export { bu as ICAO_FALLBACK, bo as IcaoCaptureTuning, bv as IcaoProfile, bw as ResolvedIcaoTuning, bx as resolveIcaoTuning } from '../types-Cy_SJtPf.js';
7
+ export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-QqtNED0V.js';
8
8
  import '../detect-worker-CHqsPJoM.js';
9
- import '../capture-session-v3-Q4otwuve.js';
9
+ import '../capture-session-v3-Z2KI_2p9.js';
10
10
 
11
11
  /** `processing` re-reads (1+2+4+8+15 = 30 s, spec §6.5), then `stalled`. */
12
12
  declare const PROCESSING_BACKOFF_MS: readonly number[];
@@ -1 +1 @@
1
- import{c as me,d as _e,e as Le,h as le,i as ce,j as Se}from"../chunk-DTQTSZAX.js";import{a as W,b as ve,c as ge,d as he,e as Ge,f as be,g as He,h as Ye,i as Ue,j as k,k as K,l as w,m as X,n as Z,o as J,p as Q,q as j,r as q,s as $,t as ee,u as te,x as re}from"../chunk-2DBOZDYR.js";import{a as Bt,b as Vt,c as Xt,d as Zt,e as Jt,f as Qt,g as jt,h as qt,i as $t,j as ne,k as ie,m as se,n as Ee}from"../chunk-VWGKUQ3C.js";import{a as Ft,b as Nt,c as vt,d as gt,e as ht,f as Gt,g as bt,h as Ht,i as Yt,j as Ut,k as Wt,l as kt,m as Kt}from"../chunk-53POX7U4.js";import{a as wt,b as zt}from"../chunk-33KKMPJ5.js";import{b as oe,c as pe,d as ae}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import"../chunk-GI3UFGRQ.js";import{a as P,b as d,c as M,d as F,e as N}from"../chunk-ZVD6VHM2.js";import{A as Ct,B as At,C as Ot,D as xt,E as It,F as ut,G as Dt,H as Pt,I as dt,J as Mt,a as Ke,b as we,c as ze,d as je,e as qe,f as $e,g as et,h as tt,i as rt,j as ot,k as pt,l as at,m as nt,n as it,o as st,p as Et,q as mt,r as _t,s as Lt,t as lt,u as ct,v as St,w as Rt,x as yt,y as Tt,z as ft}from"../chunk-GVAN773O.js";import{a as v,b as g,c as h,d as G,e as b,f as H,g as Y,h as U,i as z,j as B,l as V}from"../chunk-JULJQOVT.js";import{a as We,b as ke}from"../chunk-SMKCBUJL.js";import{a as Be,b as Ve,c as Xe,d as Ze,e as Je,f as Qe}from"../chunk-LTGRPMMY.js";import{b as De,c as Pe,d as de,e as Me,f as Fe,g as Ne}from"../chunk-PW2HWXBJ.js";import{b as ye,c as Te,d as fe,e as Ce,g as Ae,h as er,i as tr,j as rr,k as or,l as pr,m as ar,z as Oe}from"../chunk-EP6FVAR4.js";import{A as I,C as u,D,i as c,j as S,k as R,l as y,o as T,v as f,w as C,x as A,y as O,z as x}from"../chunk-5QUJHFOH.js";import{a,b as n,c as i,d as s,i as E,j as m,k as _,l as L,n as l}from"../chunk-7GUHA2NM.js";import"../chunk-7QZWBDI5.js";import"../chunk-AYWS6XTB.js";import"../chunk-SX7TUC3V.js";import"../chunk-W357WDNU.js";import"../chunk-POIQGEZM.js";import{p as xe,q as Ie,r as ue}from"../chunk-CPUECYAJ.js";import"../chunk-FPXL63KZ.js";import"../chunk-QPO6LOYB.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-TSA6GHUG.js";import"../chunk-KORZGQLS.js";import"../chunk-FSSMUAKC.js";import{a as Re}from"../chunk-QB62OPX5.js";import"../chunk-ISMVEF7H.js";export{ne as ANALYSIS_LONG_EDGE,De as ASPECT_BANDS,I as AttestationError,He as BLUR_REFUSE_SHARPNESS_MAX,Mt as CAPTURE_CANDIDATE_SPACING_MS,dt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,M as CHALLENGE_EXECUTE_TIMEOUT_MS,d as CHALLENGE_READY_TIMEOUT_MS,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,f as CLIP_MIME_ALLOWLIST,Dt as CaptureSessionDoc,P as ChallengeError,tr as DOCUMENT_TYPE_ORDER,je as DOC_ANALYSIS_DEFAULTS,At as DOC_BLACK_FRAME_LUMA,Ot as DOC_BLACK_FRAME_TICKS,xt as DOC_CADENCE_HZ,tt as DOC_CAMERA_TUNING_DEFAULTS,Me as DOC_CATALOG,Be as DOC_DETECT_WIDTH,Ke as DOC_FEEDBACK_STATES,Ct as DOC_FIRST_FRAME_MS,Ve as DOC_GATE_V1_DEFAULTS,It as DOC_SHUTTER_DEFAULTS,V as DocAssist,ze as DocFeedbackAggregator,Qe as DocGateV1,Lt as EMPTY_GUIDE_METRICS,ge as FLIP_FILL_MIN,ve as FLIP_GAP_MS,he as FLIP_TIMEOUT_MS,Rt as GUIDE_LOCK_DEFAULTS,Tt as GuideLock,gt as ICAO_CANVAS,wt as ICAO_FALLBACK,Ht as ICAO_GATE_CRITERIA,Vt as ICAO_SHARP_REF,O as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,er as ISSUER_CODES,oe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,xe as LENS_TRY_MAX,B as LIVE_MRZ_DEFAULTS,_e as LIVE_PHOTO_IDLE_MS,me as LIVE_PHOTO_MAX_HZ,Ge as MANUAL_SHUTTER_MS,We as MRZ_BAND_DEFAULTS,Fe as MR_DOC_CATALOG,be as NO_REPORT_MS,Re as OCR_ASSET_SET,ce as OTP_RESEND_COOLDOWN_MS,ie as PORTRAIT_JPEG_QUALITY,a as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,le as PROCESSING_BACKOFF_MS,Te as PROCESSING_POLL_DELAY_MS,fe as PROCESSING_POLL_MAX,h as REGION_PAD,ye as REGISTRY_RETRY_DELAY_MS,te as SAME_FACE_MAX_DROPS,v as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,C as TRANSPORT_REPLAY_ATTEMPTS,A as TRANSPORT_REPLAY_DELAY_MS,J as WEB_OCR_ENGINE,or as acceptedIssuers,rr as acceptedTypesFor,et as analyzeDocFrame,ct as analyzeGuide,Pe as aspectBand,de as aspectFits,jt as backgroundStats,q as browserFamily,X as buildDeviceReadHint,K as classifyCardSide,k as classifyCardSideWith,st as coverPointToVideo,re as createDocumentCaptureInternal,ae as createFaceLandmarker,Kt as createIcaoGate,Le as createLivePhotoKit,l as createLivenessCaptureInternal,Ee as createPortraitCaptureInternal,Se as createStepRunner,Ae as createVerificationInternal,b as cropImage,e as detectFormFactor,t as detectIsMobile,ke as detectMrzBand,Et as docZoomFor,W as encodeDocumentImage,N as executeChallenge,vt as eyeLineRoll,Ut as eyeOpenness,Qt as eyeSpecular,Ft as faceGeometry,Jt as faceLighting,qt as faceSharpness,pe as facesOf,we as feedbackVoteOf,ar as flagOf,mt as focusOk,ee as formatMismatch,R as frontierStep,St as guideQuad,lt as guideRegionInFrame,$t as icaoPixelStats,ht as icaoWindow,Ye as initialScanState,c as isExecutable,S as isTerminalView,Yt as judgeIcao,Ie as lensKindOf,$ as liveMrzWireReport,Xt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,T as mapSessionResult,U as measureBitmapSharpness,Y as measureRegionSharpness,Ue as nextScanState,se as observePortraitFrame,_t as openDocCamera,Pt as passportBandOf,Wt as percentile,g as photoSharpness,bt as portraitCropRegion,Oe as portraitMatchStep,Nt as poseFromMatrix,E as preloadedDetectorFactory,Xe as quadAreaFrac,Je as quadBounds,Ze as quadIou,$e as quadTiltRatio,Ce as randomUuid,ue as rankBackCameras,pt as readStoredLens,Zt as regionStats,F as resetChallengeFrameForTests,s as resetLivenessAssetsForTests,H as resizeLongEdge,pr as resolveAcceptedDocuments,rt as resolveDocCameraTuning,ut as resolveDocShutterTuning,yt as resolveGuideLockTuning,zt as resolveIcaoTuning,Q as resolveWebOcrPlan,D as runLivenessFlow,u as runSubmission,Ne as scannerFormatFor,kt as scoreFrame,i as setPreloadLoaderForTests,Z as settledHint,it as singleShotFocusAt,qe as specularFraction,j as startWebOcr,y as stepOf,G as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ft as warmDocDetector,Gt as windowOverflow,at as writeStoredLens};
1
+ import{c as me,d as _e,e as Le,h as le,i as ce,j as Se}from"../chunk-C4XDRRU5.js";import{a as W,b as ve,c as ge,d as he,e as Ge,f as be,g as He,h as Ye,i as Ue,j as k,k as K,l as w,m as X,n as Z,o as J,p as Q,q as j,r as q,s as $,t as ee,u as te,y as re}from"../chunk-XDB7L5KS.js";import{a as Bt,b as Vt,c as Xt,d as Zt,e as Jt,f as Qt,g as jt,h as qt,i as $t,j as ne,k as ie,m as se,n as Ee}from"../chunk-VWGKUQ3C.js";import{a as Ft,b as Nt,c as vt,d as gt,e as ht,f as Gt,g as bt,h as Ht,i as Yt,j as Ut,k as Wt,l as kt,m as Kt}from"../chunk-53POX7U4.js";import{a as wt,b as zt}from"../chunk-33KKMPJ5.js";import{b as oe,c as pe,d as ae}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import"../chunk-GI3UFGRQ.js";import{a as P,b as d,c as M,d as F,e as N}from"../chunk-ZVD6VHM2.js";import{A as Ct,B as At,C as Ot,D as xt,E as It,F as ut,G as Dt,H as Pt,I as dt,J as Mt,a as Ke,b as we,c as ze,d as je,e as qe,f as $e,g as et,h as tt,i as rt,j as ot,k as pt,l as at,m as nt,n as it,o as st,p as Et,q as mt,r as _t,s as Lt,t as lt,u as ct,v as St,w as Rt,x as yt,y as Tt,z as ft}from"../chunk-IAKYKPL6.js";import{a as v,b as g,c as h,d as G,e as b,f as H,g as Y,h as U,i as z,j as B,l as V}from"../chunk-MQHTFHSN.js";import{a as We,b as ke}from"../chunk-SMKCBUJL.js";import{a as Be,b as Ve,c as Xe,d as Ze,e as Je,f as Qe}from"../chunk-TOISWBOX.js";import{b as De,c as Pe,d as de,e as Me,f as Fe,g as Ne}from"../chunk-5AR5GTEJ.js";import{b as ye,c as Te,d as fe,e as Ce,g as Ae,h as er,i as tr,j as rr,k as or,l as pr,m as ar,z as Oe}from"../chunk-IOCOIZKE.js";import{A as I,C as u,D,i as c,j as S,k as R,l as y,o as T,v as f,w as C,x as A,y as O,z as x}from"../chunk-VMHFHHPP.js";import{a,b as n,c as i,d as s,i as E,j as m,k as _,l as L,n as l}from"../chunk-QTOMWAS6.js";import"../chunk-7QZWBDI5.js";import"../chunk-PBWIMNSN.js";import"../chunk-SX7TUC3V.js";import"../chunk-W357WDNU.js";import"../chunk-POIQGEZM.js";import{p as xe,q as Ie,r as ue}from"../chunk-CPUECYAJ.js";import"../chunk-FPXL63KZ.js";import"../chunk-TQQK7464.js";import"../chunk-U5TL63CG.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-TSA6GHUG.js";import"../chunk-COZXZAD5.js";import"../chunk-FSSMUAKC.js";import{a as Re}from"../chunk-QB62OPX5.js";import"../chunk-WNBEOK5Q.js";export{ne as ANALYSIS_LONG_EDGE,De as ASPECT_BANDS,I as AttestationError,He as BLUR_REFUSE_SHARPNESS_MAX,Mt as CAPTURE_CANDIDATE_SPACING_MS,dt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,M as CHALLENGE_EXECUTE_TIMEOUT_MS,d as CHALLENGE_READY_TIMEOUT_MS,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,f as CLIP_MIME_ALLOWLIST,Dt as CaptureSessionDoc,P as ChallengeError,tr as DOCUMENT_TYPE_ORDER,je as DOC_ANALYSIS_DEFAULTS,At as DOC_BLACK_FRAME_LUMA,Ot as DOC_BLACK_FRAME_TICKS,xt as DOC_CADENCE_HZ,tt as DOC_CAMERA_TUNING_DEFAULTS,Me as DOC_CATALOG,Be as DOC_DETECT_WIDTH,Ke as DOC_FEEDBACK_STATES,Ct as DOC_FIRST_FRAME_MS,Ve as DOC_GATE_V1_DEFAULTS,It as DOC_SHUTTER_DEFAULTS,V as DocAssist,ze as DocFeedbackAggregator,Qe as DocGateV1,Lt as EMPTY_GUIDE_METRICS,ge as FLIP_FILL_MIN,ve as FLIP_GAP_MS,he as FLIP_TIMEOUT_MS,Rt as GUIDE_LOCK_DEFAULTS,Tt as GuideLock,gt as ICAO_CANVAS,wt as ICAO_FALLBACK,Ht as ICAO_GATE_CRITERIA,Vt as ICAO_SHARP_REF,O as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,er as ISSUER_CODES,oe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,xe as LENS_TRY_MAX,B as LIVE_MRZ_DEFAULTS,_e as LIVE_PHOTO_IDLE_MS,me as LIVE_PHOTO_MAX_HZ,Ge as MANUAL_SHUTTER_MS,We as MRZ_BAND_DEFAULTS,Fe as MR_DOC_CATALOG,be as NO_REPORT_MS,Re as OCR_ASSET_SET,ce as OTP_RESEND_COOLDOWN_MS,ie as PORTRAIT_JPEG_QUALITY,a as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,le as PROCESSING_BACKOFF_MS,Te as PROCESSING_POLL_DELAY_MS,fe as PROCESSING_POLL_MAX,h as REGION_PAD,ye as REGISTRY_RETRY_DELAY_MS,te as SAME_FACE_MAX_DROPS,v as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,C as TRANSPORT_REPLAY_ATTEMPTS,A as TRANSPORT_REPLAY_DELAY_MS,J as WEB_OCR_ENGINE,or as acceptedIssuers,rr as acceptedTypesFor,et as analyzeDocFrame,ct as analyzeGuide,Pe as aspectBand,de as aspectFits,jt as backgroundStats,q as browserFamily,X as buildDeviceReadHint,K as classifyCardSide,k as classifyCardSideWith,st as coverPointToVideo,re as createDocumentCaptureInternal,ae as createFaceLandmarker,Kt as createIcaoGate,Le as createLivePhotoKit,l as createLivenessCaptureInternal,Ee as createPortraitCaptureInternal,Se as createStepRunner,Ae as createVerificationInternal,b as cropImage,e as detectFormFactor,t as detectIsMobile,ke as detectMrzBand,Et as docZoomFor,W as encodeDocumentImage,N as executeChallenge,vt as eyeLineRoll,Ut as eyeOpenness,Qt as eyeSpecular,Ft as faceGeometry,Jt as faceLighting,qt as faceSharpness,pe as facesOf,we as feedbackVoteOf,ar as flagOf,mt as focusOk,ee as formatMismatch,R as frontierStep,St as guideQuad,lt as guideRegionInFrame,$t as icaoPixelStats,ht as icaoWindow,Ye as initialScanState,c as isExecutable,S as isTerminalView,Yt as judgeIcao,Ie as lensKindOf,$ as liveMrzWireReport,Xt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,T as mapSessionResult,U as measureBitmapSharpness,Y as measureRegionSharpness,Ue as nextScanState,se as observePortraitFrame,_t as openDocCamera,Pt as passportBandOf,Wt as percentile,g as photoSharpness,bt as portraitCropRegion,Oe as portraitMatchStep,Nt as poseFromMatrix,E as preloadedDetectorFactory,Xe as quadAreaFrac,Je as quadBounds,Ze as quadIou,$e as quadTiltRatio,Ce as randomUuid,ue as rankBackCameras,pt as readStoredLens,Zt as regionStats,F as resetChallengeFrameForTests,s as resetLivenessAssetsForTests,H as resizeLongEdge,pr as resolveAcceptedDocuments,rt as resolveDocCameraTuning,ut as resolveDocShutterTuning,yt as resolveGuideLockTuning,zt as resolveIcaoTuning,Q as resolveWebOcrPlan,D as runLivenessFlow,u as runSubmission,Ne as scannerFormatFor,kt as scoreFrame,i as setPreloadLoaderForTests,Z as settledHint,it as singleShotFocusAt,qe as specularFraction,j as startWebOcr,y as stepOf,G as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ft as warmDocDetector,Gt as windowOverflow,at as writeStoredLens};
@@ -0,0 +1 @@
1
+ import{d as ie}from"./chunk-BD4KIQQD.js";import"./chunk-JLVZ35QK.js";import{a as ee,b as te,e as oe,f as K,g as O,j as ae}from"./chunk-C4XDRRU5.js";import{y as Z}from"./chunk-XDB7L5KS.js";import{n as re}from"./chunk-VWGKUQ3C.js";import"./chunk-53POX7U4.js";import"./chunk-33KKMPJ5.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import"./chunk-GI3UFGRQ.js";import{F as Y,i as W,x as X}from"./chunk-IAKYKPL6.js";import"./chunk-MQHTFHSN.js";import"./chunk-SMKCBUJL.js";import"./chunk-TOISWBOX.js";import"./chunk-5AR5GTEJ.js";import{b as j,c as q,r as Q,t as J,u as L}from"./chunk-VMHFHHPP.js";import"./chunk-QTOMWAS6.js";import"./chunk-7QZWBDI5.js";import"./chunk-PBWIMNSN.js";import{b as N}from"./chunk-SX7TUC3V.js";import"./chunk-W357WDNU.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import{c as x,i as ne}from"./chunk-TQQK7464.js";import"./chunk-U5TL63CG.js";import"./chunk-TSA6GHUG.js";import{a as z}from"./chunk-COZXZAD5.js";import"./chunk-FSSMUAKC.js";import"./chunk-QB62OPX5.js";import"./chunk-WNBEOK5Q.js";var he=2e4,we=new Set(["media_type_unsupported","media_type_mismatch"]),le=new Set(["document_upload_not_allowed","portrait_source_not_allowed","uploaded_media_not_allowed"]);function se(e){let r=null,a=Promise.resolve(),c=!1,m=null,y=null,w=!1,C=null,I=!1,D=!1,M=()=>{r?.controller.handle.destroy(),r=null},n=()=>{let s=e.currentView(),t=s===null?null:O(s,{isMobile:e.isMobile()});return t?.kind==="portrait"?t:null},l=()=>{if(e.destroyed())return"self";let s=e.currentView(),t=s===null?void 0:K(s);return t==="self"||t==="assisted"?t:t==="choice"&&e.captureModeSwitch!==void 0?e.captureModeSwitch.pick()??"self":e.cameraMode?.()??J(t??Q(s),null)},p=e.captureModeSwitch,h=p===void 0?void 0:{session:()=>{let s=e.currentView();return s!==null&&K(s)==="choice"?"choice":l()},onModeChange:s=>p.choose(s)},v=async(s,t)=>{if(e.destroyed())return;let u=l();t.setFlowState("uploading"),c=!1;let o=null;try{await e.runner().submit("portrait_icao",async(d,S)=>{if(o===null){let f=await L(d,"image","image/jpeg",s.image.size,{engine:"portrait"});await d.uploadToSpaces(f.uploadUrl,s.image,"image/jpeg"),o=(await d.completeMedia(f.key)).key}t.setFlowState("checking");let P={media:{portrait:o},gate:ne(s.gate),...s.tuningVersion!==void 0?{tuningVersion:s.tuningVersion}:{},source:"camera",capture:{mode:u,facingMode:s.facingMode}};return d.submitCheck("portrait_icao",P,{idempotencyKey:S})})}catch(d){c=!0,d instanceof x&&le.has(d.code)&&await e.refreshView?.().catch(()=>{})}if(t.setFlowState("done"),e.destroyed())return;let i=n();(i===null||i.phase!=="capture")&&r?.controller===t&&M(),e.runner().republish()},F=s=>e.runner().submit("face_match",(t,u)=>t.submitCheck("face_match",e.runner().faceProbeSkipped()?{simulatedCapture:!0}:{},{idempotencyKey:u})).then(()=>{},()=>{c=!0,s()}),b=null,k=async s=>{let t=n();if(t===null||t.phase!=="capture"||!t.photo.uploadOffered)throw new RangeError("upload_not_offered");let{prepareUploadFile:u}=await import("./upload-file-EGXXM6TQ.js"),o=await u(s,e.uploadInternals);if(e.destroyed())return;M(),c=!1;let i=null;try{await e.runner().submit("portrait_icao",async(d,S)=>{if(i===null){let f=await d.presign("image",o.contentType,o.blob.size,{source:"upload"});await d.uploadToSpaces(f.uploadUrl,o.blob,o.contentType),i=(await d.completeMedia(f.key)).key}let P={media:{portrait:i},source:"upload"};return d.submitCheck("portrait_icao",P,{idempotencyKey:S})})}catch(d){throw d instanceof x&&we.has(d.code)?new TypeError("unsupported_file"):(d instanceof x&&le.has(d.code)&&await e.refreshView?.().catch(()=>{}),d)}},_=null,T=s=>{if(_!==null)return _;let t=n();if(t===null||t.phase!=="review")return Promise.reject(new RangeError("no_pending_fix"));let u={fixReview:{accept:s}},o=e.runner().submit("portrait_icao",(i,d)=>i.submitCheck("portrait_icao",u,{idempotencyKey:d})).catch(async i=>{throw i instanceof x&&i.code==="portrait_no_pending_fix"&&await e.refreshView?.().catch(()=>{}),i}).finally(()=>{_=null});return _=o,o},B=s=>{let t=()=>k(s),u=(b===null?t():b.then(t,t)).finally(()=>{b===u&&(b=null)});return b=u,u};return{bind:(s,t)=>{if(s.phase==="review")return M(),{...s,uploadFailed:c,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("the adjusted photo waits for confirmFix()")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:T};if(s.phase==="match")return M(),m!==s.attemptsRemaining&&!c&&(m=s.attemptsRemaining,F(t)),{...s,uploadFailed:c,resubmit:()=>(c=!1,m=s.attemptsRemaining,t(),F(t)),capture:()=>{throw new Error("the portrait was already accepted")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:T};if(m=null,s.reuse===!0&&s.phase==="capture")return M(),!I&&C!==s.attemptsRemaining&&(C=s.attemptsRemaining,I=!0,e.runner().submit("portrait_icao",(o,i)=>o.submitCheck("portrait_icao",{},{idempotencyKey:i})).then(()=>{D=!1},()=>{D=!0}).finally(()=>{I=!1,t()})),{kind:"processing",key:"processing",context:s.context,section:s.section,stalled:D&&!I,refresh:()=>(D=!1,C=null,t(),Promise.resolve())};let u=e.keptPortraitInput?.()??null;return u!==null&&(w||u!==y&&s.report===null&&s.reason===void 0&&!s.retakeOnly)?(w||(y=u,w=!0,e.runner().submit("portrait_icao",(o,i)=>o.submitCheck("portrait_icao",u,{idempotencyKey:i})).catch(()=>{}).finally(()=>{w=!1,t()})),{kind:"processing",key:"processing",context:s.context,section:s.section,stalled:!1,refresh:()=>Promise.resolve()}):{...s,uploadFailed:c,resubmit:()=>Promise.resolve(),capture:o=>{if(r!==null&&r.video===o.video)return r.controller.handle;M(),c=!1;let i=re({video:o.video,tuning:s.tuning,tuningVersion:s.tuningVersion,...s.icao!=null?{policy:s.icao.policy}:{},...o.keepScreenAwake!==void 0?{keepScreenAwake:o.keepScreenAwake}:{},...o.assetBaseUrl!==void 0?{assetBaseUrl:o.assetBaseUrl}:{}},e.internals,l,h);r={video:o.video,controller:i};let d=i.handle.destroy;i.handle.destroy=()=>{r?.controller===i&&(r=null),d()},i.handle.on("error",f=>{e.reportCaptureIssue?.(j("portrait",f,0))});let S=!1,P=(f,E)=>{let g=i.gateScores();g!==null&&e.reportGate?.({kind:"portrait_gate",platform:"web",outcome:f,...E!==null?{failing:E}:{},...g})};return i.handle.on("gate",f=>{!S&&!f.ready&&(i.gateScores()?.elapsedMs??0)>=he&&(S=!0,P("stuck",f.failing))}),i.handle.on("captured",f=>{P("captured",null),S=!1,a=a.then(()=>v(f,i)).catch(()=>{})}),i.handle},uploadPortrait:B,confirmFix:T}},destroy:M}}var ve=.92,Pe=()=>N("environment",{width:{ideal:1920},height:{ideal:1080}},{getUserMedia:e=>navigator.mediaDevices.getUserMedia(e),enumerateDevices:()=>navigator.mediaDevices.enumerateDevices()}),be=e=>{let r=document.createElement("canvas");r.width=e.videoWidth,r.height=e.videoHeight;let a=r.getContext("2d");return a===null||r.width===0||r.height===0?Promise.reject(new Error("the camera has no frame yet")):(a.drawImage(e,0,0,r.width,r.height),new Promise((c,m)=>r.toBlob(y=>y===null?m(new Error("the still could not be encoded")):c(y),"image/jpeg",ve)))},ke=(e,r)=>{try{e.muted=!0,e.playsInline=!0,e.srcObject=r,e.play().catch(()=>{})}catch{}};function ue(e){let r=null,a=null,c=n=>{let l=(a===null?n():a.then(n,n)).finally(()=>{a===l&&(a=null)});return a=l,l},m=()=>{r?.handle.destroy(),r=null},y=()=>{let n=e.currentView(),l=n===null?null:O(n,{isMobile:e.isMobile()});return l?.kind==="proof_of_address"?l:null},w=async(n,l)=>{if(l.length===0)throw new RangeError("no_pages");if(l.length>n.maxPages)throw new RangeError("too_many_pages");let{pdfFileKind:p,prepareUploadFile:h}=await import("./upload-file-EGXXM6TQ.js"),v=await Promise.all(l.map(b=>p(b)));if(v.includes("bad"))throw new TypeError("unsupported_file");if(v.includes("pdf")){if(l.length>1)throw new RangeError("too_many_pages");let b=l[0];if(b.size>n.pdf.maxBytes)throw new RangeError("file_too_large");return[{kind:"document_file",blob:b,contentType:"application/pdf"}]}let F=[];for(let b of l){let k=await h(b,e.uploadInternals);F.push({kind:"image",blob:k.blob,contentType:k.contentType})}return F},C=async(n,l,p)=>{let h=null;try{await e.runner().submit("poa",async(v,F)=>{if(h===null){let k=[];for(let _ of p){let T=l==="upload"?await v.presign(_.kind,_.contentType,_.blob.size,{source:"upload"}):await L(v,_.kind,_.contentType,_.blob.size,{engine:"poa_page"});await v.uploadToSpaces(T.uploadUrl,_.blob,_.contentType),k.push((await v.completeMedia(T.key)).key)}h=k}let b=p[0]?.kind==="document_file"?{part:n,source:"upload",pdfKey:h[0]}:{part:n,source:l,imageKeys:h};return v.submitCheck("poa",b,{idempotencyKey:F})})}catch(v){throw v instanceof x&&(v.code==="media_type_unsupported"||v.code==="media_type_mismatch")?new TypeError("unsupported_file"):(v instanceof x&&(v.code==="document_upload_not_allowed"||v.code==="uploaded_media_not_allowed")&&await e.refreshView?.().catch(()=>{}),v)}},I=async(n,l)=>{let p=y();if(p===null||!p.photo.uploadOffered)throw new RangeError("upload_not_offered");if(n==="holder_letter"&&p.phase!=="holder_letter")throw new RangeError("holder_letter_not_requested");let h=await w(p,l);e.destroyed()||(m(),await C(n,"upload",h))},D=(n,l)=>{let p=null,h=[],v=!0,F=()=>{for(let k of p?.getTracks()??[])k.stop();p=null},b={get pages(){return h},start:async()=>{if(!v||p!==null)return;let k=await(e.pageCamera?.open??Pe)();if(!v){for(let _ of k.getTracks())_.stop();return}p=k,(e.pageCamera?.attach??ke)(n,k)},takePage:async()=>{if(h.length>=l)throw new RangeError("too_many_pages");let k=await(e.pageCamera?.grab??be)(n);if(h.length>=l)throw new RangeError("too_many_pages");return h=[...h,k],k},removePage:k=>{h=h.filter((_,T)=>T!==k)},submitPages:()=>c(async()=>{if(h.length===0)throw new RangeError("no_pages");let k=y();if(k===null)throw new RangeError("camera_not_offered");let _=k.phase==="holder_letter"?"holder_letter":"document";await C(_,"camera",h.map(T=>({kind:"image",blob:T,contentType:"image/jpeg"}))),r?.handle===b?m():b.destroy()}),destroy:()=>{v=!1,h=[],F(),r?.handle===b&&(r=null)}};return b},M=async()=>{let n=y();if(n===null||!n.licenceAddressAccepted)throw new RangeError("licence_address_not_accepted");if(e.destroyed())return;m();let l={part:"document"};await e.runner().submit("poa",(p,h)=>p.submitCheck("poa",l,{idempotencyKey:h}))};return{bind:n=>({...n,...n.licenceAddressAccepted?{useLicenceAddress:()=>c(M)}:{},uploadPages:l=>c(()=>I("document",l)),uploadHolderLetter:l=>c(()=>I("holder_letter",l)),capturePage:l=>{if(n.photo.source==="upload")throw new RangeError("camera_not_offered");if(r!==null&&r.video===l.video)return r.handle;m();let p=D(l.video,n.maxPages);return r={video:l.video,handle:p},p}}),destroy:m}}function ce(e,r){let a=null,c=null,m=!1,y=null,w=null,C=[],I=(n,l)=>{n.off=l.on(n.event,n.handler)},D=()=>(c??(c=e.then(n=>{if(m)return null;let l=r(n),p=l.handle;for(let h of C)h.removed||I(h,p);return y!==null&&p.setSide(y),w!==null&&p.setGuide(w.guide),a=l,p}).catch(()=>{if(c=null,!m)for(let n of C)!n.removed&&n.event==="error"&&n.handler({kind:"generic",retryable:!0});return null})),c);return{handle:{get state(){return a?.handle.state??"idle"},on:(n,l)=>{let p={event:n,handler:l,off:null,removed:!1};return C.push(p),a!==null&&I(p,a.handle),()=>{p.removed=!0,p.off?.()}},start:async()=>{let n=await D();n!==null&&!m&&await n.start()},retry:()=>{a!==null?a.handle.retry():D().then(n=>n?.start())},setSide:n=>{a!==null?a.handle.setSide(n):y=n},shutter:()=>a?.handle.shutter(),setTorch:n=>a?.handle.setTorch(n),focusAt:(n,l)=>a?.handle.focusAt(n,l),setGuide:n=>{a!==null?a.handle.setGuide(n):w={guide:n}},destroy:()=>{m=!0,a?.handle.destroy(),C.length=0}},get plan(){return a?.plan??null},setFlowState:n=>a?.setFlowState(n),settle:(n,l)=>a?.settle(n,l),takeDeviceRead:n=>a?.takeDeviceRead(n)??null}}var Ce=1500,Se=["ID-1","ID-2","ID-3"],_e=["recto","verso","single"],Ie=["td1","td2","td3"],De=["pdf417","qr","datamatrix","aztec"],Me=["yes","no","some"],Re=["dmy","mdy","ymd"],Fe=["gregorian","hijri","solar_hijri","thai_buddhist"],Te=24,H=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),V=(e,r)=>typeof e=="string"&&r.includes(e),de=(e,r)=>e===null||V(e,r);function Ae(e){if(!H(e))return null;let{side:r,portrait:a,mrz:c,barcode:m,scripts:y}=e;return!V(r,_e)||typeof a!="boolean"||!de(c,Ie)||!de(m,De)||!Array.isArray(y)||!y.every(w=>typeof w=="string")?null:{side:r,portrait:a,mrz:c,barcode:m,scripts:[...y]}}function Ee(e){if(!H(e))return null;let{id:r,format:a,mrzCode:c,chip:m,dates:y,sides:w}=e;if(typeof r!="string"||!V(a,Se)||!(c===null||typeof c=="string")||!V(m,Me)||!H(y)||!V(y.order,Re)||!V(y.calendar,Fe)||!Array.isArray(w)||w.length<1||w.length>2)return null;let C=w.map(Ae);return C.some(I=>I===null)?null:{id:r,format:a,mrzCode:c,chip:m,dates:{order:y.order,calendar:y.calendar},sides:C}}function xe(e,r,a){if(!H(e)||e.country!==r||e.documentType!==a)return null;let{version:c,series:m}=e;if(typeof c!="number"||!Number.isInteger(c)||!Array.isArray(m)||m.length>Te)return null;let y=m.map(Ee);return y.some(w=>w===null)?null:{country:r,documentType:a,version:c,series:y}}function pe(e){return e.series.map(r=>({format:r.format,sides:r.sides}))}function Oe(e){return H(e)&&"success"in e&&"data"in e?e.data:e}function me(e,r={}){let a=e;if(a===null||typeof a.apiOrigin!="string"||typeof a.sessionToken!="string")return;let c=a.apiOrigin,m=a.sessionToken,y=r.timeoutMs??Ce;return(w,C)=>{let I=r.fetchImpl??(typeof fetch=="function"?fetch:void 0);if(I===void 0)return Promise.resolve(null);let D=typeof AbortController=="function"?new AbortController:void 0,M,n=new Promise(p=>{M=setTimeout(()=>{D?.abort(),p(null)},y)}),l=(async()=>{let p=`country=${encodeURIComponent(w)}&type=${encodeURIComponent(C)}`,h=await I(`${c}/api/v2/hosted/document-facts?${p}`,{method:"GET",headers:{"x-session-token":m,"x-sekyro-sdk":`@sekyro/web/${z}`},cache:"default",...D!==void 0?{signal:D.signal}:{}});return h.ok?xe(Oe(await h.json()),w,C):null})().catch(()=>null);return Promise.race([l,n]).finally(()=>clearTimeout(M))}}function fe(e){let r=e;if(typeof r.apiOrigin!="string"||typeof r.sessionToken!="string")return;let a=`${r.apiOrigin}/api/v2/hosted/capture-reports`,c=r.sessionToken;return m=>{try{fetch(a,{method:"POST",headers:{"content-type":"application/json","x-session-token":c,"x-sekyro-sdk":`@sekyro/web/${z}`},body:JSON.stringify({reports:m}),keepalive:!0}).catch(()=>{})}catch{}}}function ge(e){let r=e.apiOrigin;return ie("sdk",typeof r=="string"&&/staging|sandbox|localhost/.test(r)?"sandbox":"live")}function Le(e){return ge(e).replace(/\/ocr$/,"/barcode")}function yt(e){let r=null,a=null,c=null,m=q(),y=Promise.resolve(),w=()=>{c?.flow.handle.destroy(),c=null},C=null,I=()=>e.documentInternals?.catalogCapture??e.currentView()?.capture?.document?.catalog===!0,D=(t,u)=>{let o=`${t}:${u}`;if(C?.key===o)return C;if(C=null,!I()||e.documentInternals?.captureSeries!==void 0)return null;let i=e.documentFacts??me(e.runtime.client);if(i===void 0)return null;let d={key:o,promise:Promise.resolve(null),settled:!1,value:null};return d.promise=i(t,u).catch(()=>null).then(S=>(d.value=S,d.settled=!0,S)),C=d,d},M=t=>t===null?{}:{documentType:t.documentType,documentCountry:t.issuer},n=async(t,u,o)=>{if(e.destroyed())return;u.setFlowState("uploading");let i=null,d=M(o),S,P=!1,f=e.currentView()?.documents!==void 0;try{await r.submit("doc_ocr",async(G,ye)=>{if(i===null){let $=await L(G,"image","image/jpeg",t.image.size,{engine:"document"});await G.uploadToSpaces($.uploadUrl,t.image,"image/jpeg"),i=(await G.completeMedia($.key)).key}return u.setFlowState("checking"),S===void 0&&(S=u.takeDeviceRead(t)),G.submitCheck("doc_ocr",{imageKey:i,side:t.side,...S!==null?{deviceRead:S}:{},...f?{source:"camera"}:{},...d},{idempotencyKey:ye})})}catch{P=!0}finally{u.setFlowState("done")}if(e.destroyed())return;if(P){u.settle(t.side,{ok:!1,issue:"technical"});return}let E=e.currentView(),g=E===null?null:O(E,{isMobile:e.isMobile()});if(g?.kind!=="document"){u.settle(t.side,{ok:!0}),c?.flow===u?w():u.handle.destroy();return}if(g.reason==="document_type_not_accepted"||g.reason==="document_type_not_supported"){a=null,c?.flow===u&&w(),r.republish();return}let R=g.acceptedSides;t.side!=="single"&&g.side!==t.side&&(R.includes(t.side)||g.reason==="side_missing")&&!(R.includes("recto")&&R.includes("verso"))?(u.settle(t.side,{ok:!0}),a?.documentType!=="passport"&&u.handle.setSide(g.side)):t.side!=="single"&&R.length===0?(u.settle(t.side,{ok:!1,issue:"reread"}),u.handle.retry()):u.settle(t.side,{ok:!1,issue:"reread"})},l=null,p=async t=>{let u=e.currentView(),o=u===null?null:O(u,{isMobile:e.isMobile()});if(u===null||o?.kind!=="document")throw new RangeError("upload_not_offered");if(!o.photo.uploadOffered)throw new RangeError("upload_not_offered");let i=a,d=i?.documentType==="passport"?"single":o.side,{prepareUploadFile:S}=await import("./upload-file-EGXXM6TQ.js"),P=await S(t,e.uploadInternals);if(e.destroyed())return;w();let f=null,E=M(i);try{await r.submit("doc_ocr",async(g,R)=>{if(f===null){let A=await g.presign("image",P.contentType,P.blob.size,{source:"upload"});await g.uploadToSpaces(A.uploadUrl,P.blob,P.contentType),f=(await g.completeMedia(A.key)).key}return g.submitCheck("doc_ocr",{imageKey:f,side:d,source:"upload",...E},{idempotencyKey:R})})}catch(g){throw g instanceof x&&(g.code==="media_type_unsupported"||g.code==="media_type_mismatch")?new TypeError("unsupported_file"):(g instanceof x&&(g.code==="document_upload_not_allowed"||g.code==="uploaded_media_not_allowed")&&await e.refreshView().catch(()=>{}),g)}},h=(t,u)=>({...t,uploadDocument:o=>{let i=()=>p(o),d=(l===null?i():l.then(i,i)).finally(()=>{l===d&&(l=null)});return l=d,d},issuer:a?.issuer??null,documentType:a?.documentType??null,captureSide:a===null?null:a.documentType==="passport"?"single":t.side,selectDocument:(o,i)=>{if(!te(t.documents).includes(o)||!ee(t.documents,o).includes(i))throw new RangeError(`${i} from ${o} is not accepted`);(a?.issuer!==o||a.documentType!==i)&&w(),a={issuer:o,documentType:i},D(o,i),u()},capture:o=>{if(a===null)throw new Error("selectDocument() first");if(c!==null&&c.video===o.video)return c.flow.handle;w();let i=a,d=i.documentType==="passport"?"single":t.acceptedSides.length>0?t.side:void 0,S=g=>Z({video:o.video,documentType:i.documentType,issuer:i.issuer,...d!==void 0?{side:d}:{},...o.keepScreenAwake!==void 0?{keepScreenAwake:o.keepScreenAwake}:{},...o.liveMrz!==void 0?{liveMrz:o.liveMrz}:{},...o.barcodeAssetBaseUrl!==void 0?{barcodeAssetBaseUrl:o.barcodeAssetBaseUrl}:{}},{...e.documentInternals??{},...(()=>{let R=e.currentView()?.capture?.document,A=e.documentInternals?.blurRefuseSharpnessMax??R?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:W(R?.camera),shutter:Y(R?.scan),guideLock:X(R?.guide),...e.documentInternals?.engineOptions??{}},...typeof A=="number"&&Number.isFinite(A)&&A>=0&&A<=1?{blurRefuseSharpnessMax:A}:{},catalogCapture:e.documentInternals?.catalogCapture??R?.catalog===!0,...g!==null&&e.documentInternals?.captureSeries===void 0?{captureSeries:pe(g)}:{}}})(),deferRead:!0,...e.documentInternals?.barcode!==void 0?{}:{barcode:{assetBaseUrl:Le(e.runtime.client)}},...(()=>{let R=e.currentView();if(R===null||e.documentInternals?.webOcr!==void 0)return{};let A=fe(e.runtime.client);return{webOcr:{captureDocument:R.capture?.document,salt:R.sessionId,baseUrl:ge(e.runtime.client),...A!==void 0?{reports:A}:{}}}})()}),P=D(i.issuer,i.documentType),f=P===null||P.settled?S(P?.value??null):ce(P.promise,S);c={video:o.video,flow:f};let E=f.handle.destroy;return f.handle.destroy=()=>{c?.flow===f&&(c=null),E()},m.newHandle(),f.handle.on("state",g=>m.note(g)),f.handle.on("error",g=>{m.noteError(),e.reportCaptureIssue?.(j("document",g,m.value))}),f.handle.on("captured",g=>{y=y.then(()=>n(g,f,i)).catch(()=>{})}),f.handle}}),v=null,F=null,b=new Set,k=e.runtime.client;e.runtime.client=new Proxy(k,{get(t,u){if(u==="submitCheck")return(F??t).submitCheck.bind(F??t);let o=Reflect.get(t,u);return typeof o=="function"?o.bind(t):o}});let _=()=>{v?.destroy(),v=null,F=null},T=t=>{let u=e.currentView(),o=u===null?null:O(u,{isMobile:e.isMobile()});if(u===null||o?.kind!=="liveness"||o.livePhoto?.icao!==!0)return;if(v===null){let P=oe({tuning:u.capture?.icao??null,tuningVersion:u.capture?.tuningVersion??null,...o.icao!=null?{policy:o.icao.policy}:{},still:o.livePhoto.still,...t.assetBaseUrl!==void 0?{assetBaseUrl:t.assetBaseUrl}:{}},e.livePhotoInternals);v=P,F=P.decorate(k),P.onGate(f=>{for(let E of b)E(f)})}let i=v,d=e.baseCapture??{},S=d.engineOptions?.telemetry;return{...d,engineOptions:{...d.engineOptions??{},measureQuality:i.engineOptions.measureQuality,telemetry:P=>{S?.(P),i.engineOptions.telemetry(P)}}}},B=se({keptPortraitInput:()=>v?.lastPortraitInput()??null,runner:()=>r,currentView:e.currentView,...e.cameraMode!==void 0?{cameraMode:e.cameraMode}:{},...e.captureModeSwitch!==void 0?{captureModeSwitch:e.captureModeSwitch}:{},destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{},...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},refreshView:()=>e.refreshView(),...e.reportCaptureIssue!==void 0?{reportCaptureIssue:e.reportCaptureIssue}:{},reportGate:t=>fe(e.runtime.client)?.([t])}),U=ue({runner:()=>r,currentView:e.currentView,destroyed:e.destroyed,isMobile:e.isMobile,...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},...e.pageCameraInternals!==void 0?{pageCamera:e.pageCameraInternals}:{},refreshView:()=>e.refreshView()}),s=ae({...e,bindDocument:h,bindPortrait:B.bind,bindProofOfAddress:U.bind,stopCameras:()=>{w(),B.destroy(),U.destroy(),_(),e.stopLiveness?.()},onLivePhoto:t=>(b.add(t),()=>b.delete(t))});return r=s,{...s,captureInternals:T,destroy:()=>{w(),B.destroy(),U.destroy(),_(),b.clear()}}}export{Le as barcodeAssetBase,yt as createPlanRunner,fe as reportSink,ge as sdkAssetBase};
@@ -280,8 +280,11 @@ type VerificationLevel = 0 | 1 | 2 | 3;
280
280
  * Contact: `device_only`, `contact_email`, `contact_phone`, `unbound_identity`
281
281
  * (identity data with no live face matched to it). Level 2 Human: `live_only`,
282
282
  * `live_unique`. Level 3 Identity: `supplied_biometric`, `document_biometric`,
283
- * `eid_authenticated`, `chip_biometric`, `registry_biometric`. To require a
284
- * particular proof, compare with a list of accepted values on your server.
283
+ * `eid_authenticated`, `chip_biometric`, `registry_biometric`. `chip_biometric`
284
+ * is given only when the chip's signature was verified against the issuing
285
+ * country's certificate; a chip read that passed without it gives
286
+ * `document_biometric`. To require a particular proof, compare with a list of
287
+ * accepted values on your server.
285
288
  */
286
289
  type VerificationAssurance = "device_only" | "contact_email" | "contact_phone" | "unbound_identity" | "live_only" | "live_unique" | "supplied_biometric" | "document_biometric" | "eid_authenticated" | "chip_biometric" | "registry_biometric";
287
290
  /** Per-check seven-state machine (spec §4.3). */
@@ -1339,6 +1342,11 @@ interface HostedIntegrity {
1339
1342
  ios?: {
1340
1343
  appAttest: true;
1341
1344
  };
1345
+ /**
1346
+ * The chip step's app attestation mode, on a session that reads a chip: a native SDK sends an attestation with its
1347
+ * chip read when this is `signal` or `enforce`. Absent on older APIs.
1348
+ */
1349
+ chip?: "off" | "signal" | "enforce";
1342
1350
  }
1343
1351
  /** `HostedSessionView.challenge`: where the browser obtains its attestation token (spec 2026-11-10 §4.3). */
1344
1352
  interface HostedChallengeView {
@@ -1704,6 +1712,20 @@ interface CaptureNoncesResult {
1704
1712
  nonces: string[];
1705
1713
  /** Seconds each nonce stays usable. */
1706
1714
  expiresIn: number;
1715
+ /**
1716
+ * Flash at arm: the colour flash of the capture this call armed (asked with `ramp: true`). Absent on a backend
1717
+ * that issues the flash in the session view, and for a session without one.
1718
+ */
1719
+ screenRamp?: ScreenRampChallenge;
1720
+ /** Seconds from this answer within which the clip of the armed capture must be presigned. */
1721
+ rampExpiresIn?: number;
1722
+ }
1723
+ /** Flash at arm: what {@link HostedClient.armRamp} answers. */
1724
+ interface ArmedRamp {
1725
+ /** The capture's colour flash; absent when the backend issues none at arm (then the session view decides). */
1726
+ challenge?: ScreenRampChallenge;
1727
+ /** Local epoch ms after which the clip's presign is outside the arm's window. */
1728
+ expiresAt: number;
1707
1729
  }
1708
1730
  /** D8: what a capture flow knows about its capture when it presigns. */
1709
1731
  interface CaptureContext {
@@ -1711,6 +1733,11 @@ interface CaptureContext {
1711
1733
  engine?: string;
1712
1734
  /** How long the camera capture took, ms (→ `captureMs`; informational). */
1713
1735
  durationMs?: number;
1736
+ /**
1737
+ * Flash at arm: the nonce of the colour flash this capture painted. The presign then carries a capture nonce of
1738
+ * that arm, which binds the clip to it on the server.
1739
+ */
1740
+ arm?: string;
1714
1741
  }
1715
1742
  /** Result of a presign — the presigned PUT URL plus the pending object key. */
1716
1743
  interface PresignUploadResult {
@@ -2180,4 +2207,4 @@ interface SubmitCheckBody {
2180
2207
  forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
2181
2208
  }
2182
2209
 
2183
- export { type HostedNativeAppView as $, type AcceptedDocumentType as A, type FormFieldName as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type FormFieldQuestionView as G, type FormInput as H, type FormIssueCode as I, type FormLocale as J, type FormQuestionOptions as K, type FormQuestionType as L, type FormQuestionView as M, type HostedAcceptedDocuments as N, type HostedCaptureTuning as O, type HostedChallengeView as P, type HostedConsentView as Q, type HostedDocumentCaptureTuning as R, type HostedDocumentScanTuning as S, type HostedDocumentsView as T, type HostedEidView as U, type HostedEmailOtpView as V, type HostedFlowRef as W, type HostedFormView as X, type HostedIcaoPolicy as Y, type HostedIntegrity as Z, type HostedLivePhotoTuning as _, type AttestationInput as a, type SandboxSimulation as a$, type HostedNativeCaptureTuning as a0, type HostedOcrTuning as a1, type HostedOtpView as a2, type HostedPlanView as a3, type HostedPoaRuleKindView as a4, type HostedPoaRuleView as a5, type HostedPortraitPendingFix as a6, type HostedPortraitView as a7, type HostedProofOfAddressView as a8, type HostedSessionView as a9, type PhotoSourcePick as aA, type PlanAttempts as aB, type PlanChoiceKind as aC, type PlanChoiceOption as aD, type PlanChoiceView as aE, type PlanSectionView as aF, type PlanStepView as aG, type PoaImagesInput as aH, type PoaInput as aI, type PoaKind as aJ, type PoaLicenceInput as aK, type PoaNameMatchMode as aL, type PoaPdfInput as aM, type PoaReason as aN, type PoaRuleSource as aO, type PopulationInput as aP, type PopulationReason as aQ, type PortraitFix as aR, type PortraitFixReviewInput as aS, type PortraitIcaoInput as aT, type PortraitIcaoReason as aU, type PortraitOutputFormat as aV, type PresignRequest as aW, type PresignUploadResult as aX, type RecordConsentResult as aY, type ResolvedCaptureMode as aZ, type SandboxSimulatedReason as a_, type HostedSimulationView as aa, type HostedStepView as ab, type HostedTesterGateView as ac, type HostedVoiceLocale as ad, type HostedVoiceView as ae, type IcaoCriterion as af, type IcaoReportEntry as ag, type IdentityConfirmDecision as ah, type IdentityMethod as ai, type IdentitySummarySource as aj, type IdentitySummaryView as ak, type LivenessCaptureInput as al, type LivenessInput as am, type LivenessReason as an, type MatchReason as ao, type MediaKind as ap, type MethodChoiceView as aq, type NationalEidOption as ar, type NfcChipReason as as, type NfcStepView as at, type OtpChoiceView as au, type PhoneCountryRule as av, type PhoneFormat as aw, type PhoneOtpInput as ax, type PhoneOtpReason as ay, type PhotoSource as az, type CaptureMode as b, type SessionDecidingStep as b0, type SessionFailureReason as b1, type SessionReason as b2, type SessionStatus as b3, type SessionStepView as b4, type SessionView as b5, type SimulatedCaptureInput as b6, type StepResult as b7, type StepSection as b8, type SubmitCheckBody as b9, type TesterGateInput as ba, type TesterGateResponse as bb, type VerificationAssurance as bc, type VerificationLevel as bd, type ScreenRampColour as be, type AgeEstimationReason as bf, type CameraUnavailableCause as bg, type CaptureEnvironment as bh, type CaptureIssueReport as bi, type CaptureProvenance as bj, type HostedBranding as bk, type HostedBrandingColorKey as bl, type HostedLivenessCaptureTuning as bm, type IcaoCaptureTuning as bn, type RetakeHint as bo, type ScreenRampChallenge as bp, type ScreenRampPaint as bq, type ScreenRampRendered as br, type ScreenRampReport as bs, ICAO_FALLBACK as bt, type IcaoProfile as bu, type ResolvedIcaoTuning as bv, resolveIcaoTuning as bw, type PersonMask as bx, type BackgroundUniformity as by, type CaptureNoncesResult as c, type CaptureProof as d, type CheckInputByType as e, type CheckReason as f, type CheckState as g, type CheckType as h, type ClosedBy as i, type CompleteMediaResult as j, type ConsentLocale as k, type ContactChannel as l, type DocDeviceRead as m, type DocOcrInput as n, type DocReason as o, type DocSide as p, type EidAuthInput as q, type EidReason as r, type EmailOtpInput as s, type EmailOtpReason as t, type FaceMatchReason as u, type FormAddressValue as v, type FormAnswerValue as w, type FormChoiceView as x, type FormConsentView as y, type FormCustomQuestionView as z };
2210
+ export { type HostedLivePhotoTuning as $, type AcceptedDocumentType as A, type FormCustomQuestionView as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type FormFieldName as G, type FormFieldQuestionView as H, type FormInput as I, type FormIssueCode as J, type FormLocale as K, type FormQuestionOptions as L, type FormQuestionType as M, type FormQuestionView as N, type HostedAcceptedDocuments as O, type HostedCaptureTuning as P, type HostedChallengeView as Q, type HostedConsentView as R, type HostedDocumentCaptureTuning as S, type HostedDocumentScanTuning as T, type HostedDocumentsView as U, type HostedEidView as V, type HostedEmailOtpView as W, type HostedFlowRef as X, type HostedFormView as Y, type HostedIcaoPolicy as Z, type HostedIntegrity as _, type ArmedRamp as a, type SandboxSimulatedReason as a$, type HostedNativeAppView as a0, type HostedNativeCaptureTuning as a1, type HostedOcrTuning as a2, type HostedOtpView as a3, type HostedPlanView as a4, type HostedPoaRuleKindView as a5, type HostedPoaRuleView as a6, type HostedPortraitPendingFix as a7, type HostedPortraitView as a8, type HostedProofOfAddressView as a9, type PhotoSource as aA, type PhotoSourcePick as aB, type PlanAttempts as aC, type PlanChoiceKind as aD, type PlanChoiceOption as aE, type PlanChoiceView as aF, type PlanSectionView as aG, type PlanStepView as aH, type PoaImagesInput as aI, type PoaInput as aJ, type PoaKind as aK, type PoaLicenceInput as aL, type PoaNameMatchMode as aM, type PoaPdfInput as aN, type PoaReason as aO, type PoaRuleSource as aP, type PopulationInput as aQ, type PopulationReason as aR, type PortraitFix as aS, type PortraitFixReviewInput as aT, type PortraitIcaoInput as aU, type PortraitIcaoReason as aV, type PortraitOutputFormat as aW, type PresignRequest as aX, type PresignUploadResult as aY, type RecordConsentResult as aZ, type ResolvedCaptureMode as a_, type HostedSessionView as aa, type HostedSimulationView as ab, type HostedStepView as ac, type HostedTesterGateView as ad, type HostedVoiceLocale as ae, type HostedVoiceView as af, type IcaoCriterion as ag, type IcaoReportEntry as ah, type IdentityConfirmDecision as ai, type IdentityMethod as aj, type IdentitySummarySource as ak, type IdentitySummaryView as al, type LivenessCaptureInput as am, type LivenessInput as an, type LivenessReason as ao, type MatchReason as ap, type MediaKind as aq, type MethodChoiceView as ar, type NationalEidOption as as, type NfcChipReason as at, type NfcStepView as au, type OtpChoiceView as av, type PhoneCountryRule as aw, type PhoneFormat as ax, type PhoneOtpInput as ay, type PhoneOtpReason as az, type AttestationInput as b, type SandboxSimulation as b0, type SessionDecidingStep as b1, type SessionFailureReason as b2, type SessionReason as b3, type SessionStatus as b4, type SessionStepView as b5, type SessionView as b6, type SimulatedCaptureInput as b7, type StepResult as b8, type StepSection as b9, type SubmitCheckBody as ba, type TesterGateInput as bb, type TesterGateResponse as bc, type VerificationAssurance as bd, type VerificationLevel as be, type ScreenRampColour as bf, type AgeEstimationReason as bg, type CameraUnavailableCause as bh, type CaptureEnvironment as bi, type CaptureIssueReport as bj, type CaptureProvenance as bk, type HostedBranding as bl, type HostedBrandingColorKey as bm, type HostedLivenessCaptureTuning as bn, type IcaoCaptureTuning as bo, type RetakeHint as bp, type ScreenRampChallenge as bq, type ScreenRampPaint as br, type ScreenRampRendered as bs, type ScreenRampReport as bt, ICAO_FALLBACK as bu, type IcaoProfile as bv, type ResolvedIcaoTuning as bw, resolveIcaoTuning as bx, type PersonMask as by, type BackgroundUniformity as bz, type CaptureMode as c, type CaptureNoncesResult as d, type CaptureProof as e, type CheckInputByType as f, type CheckReason as g, type CheckState as h, type CheckType as i, type ClosedBy as j, type CompleteMediaResult as k, type ConsentLocale as l, type ContactChannel as m, type DocDeviceRead as n, type DocOcrInput as o, type DocReason as p, type DocSide as q, type EidAuthInput as r, type EidReason as s, type EmailOtpInput as t, type EmailOtpReason as u, type FaceMatchReason as v, type FormAddressValue as w, type FormAnswerValue as x, type FormChoiceView as y, type FormConsentView as z };
@@ -280,8 +280,11 @@ type VerificationLevel = 0 | 1 | 2 | 3;
280
280
  * Contact: `device_only`, `contact_email`, `contact_phone`, `unbound_identity`
281
281
  * (identity data with no live face matched to it). Level 2 Human: `live_only`,
282
282
  * `live_unique`. Level 3 Identity: `supplied_biometric`, `document_biometric`,
283
- * `eid_authenticated`, `chip_biometric`, `registry_biometric`. To require a
284
- * particular proof, compare with a list of accepted values on your server.
283
+ * `eid_authenticated`, `chip_biometric`, `registry_biometric`. `chip_biometric`
284
+ * is given only when the chip's signature was verified against the issuing
285
+ * country's certificate; a chip read that passed without it gives
286
+ * `document_biometric`. To require a particular proof, compare with a list of
287
+ * accepted values on your server.
285
288
  */
286
289
  type VerificationAssurance = "device_only" | "contact_email" | "contact_phone" | "unbound_identity" | "live_only" | "live_unique" | "supplied_biometric" | "document_biometric" | "eid_authenticated" | "chip_biometric" | "registry_biometric";
287
290
  /** Per-check seven-state machine (spec §4.3). */
@@ -1339,6 +1342,11 @@ interface HostedIntegrity {
1339
1342
  ios?: {
1340
1343
  appAttest: true;
1341
1344
  };
1345
+ /**
1346
+ * The chip step's app attestation mode, on a session that reads a chip: a native SDK sends an attestation with its
1347
+ * chip read when this is `signal` or `enforce`. Absent on older APIs.
1348
+ */
1349
+ chip?: "off" | "signal" | "enforce";
1342
1350
  }
1343
1351
  /** `HostedSessionView.challenge`: where the browser obtains its attestation token (spec 2026-11-10 §4.3). */
1344
1352
  interface HostedChallengeView {
@@ -1704,6 +1712,20 @@ interface CaptureNoncesResult {
1704
1712
  nonces: string[];
1705
1713
  /** Seconds each nonce stays usable. */
1706
1714
  expiresIn: number;
1715
+ /**
1716
+ * Flash at arm: the colour flash of the capture this call armed (asked with `ramp: true`). Absent on a backend
1717
+ * that issues the flash in the session view, and for a session without one.
1718
+ */
1719
+ screenRamp?: ScreenRampChallenge;
1720
+ /** Seconds from this answer within which the clip of the armed capture must be presigned. */
1721
+ rampExpiresIn?: number;
1722
+ }
1723
+ /** Flash at arm: what {@link HostedClient.armRamp} answers. */
1724
+ interface ArmedRamp {
1725
+ /** The capture's colour flash; absent when the backend issues none at arm (then the session view decides). */
1726
+ challenge?: ScreenRampChallenge;
1727
+ /** Local epoch ms after which the clip's presign is outside the arm's window. */
1728
+ expiresAt: number;
1707
1729
  }
1708
1730
  /** D8: what a capture flow knows about its capture when it presigns. */
1709
1731
  interface CaptureContext {
@@ -1711,6 +1733,11 @@ interface CaptureContext {
1711
1733
  engine?: string;
1712
1734
  /** How long the camera capture took, ms (→ `captureMs`; informational). */
1713
1735
  durationMs?: number;
1736
+ /**
1737
+ * Flash at arm: the nonce of the colour flash this capture painted. The presign then carries a capture nonce of
1738
+ * that arm, which binds the clip to it on the server.
1739
+ */
1740
+ arm?: string;
1714
1741
  }
1715
1742
  /** Result of a presign — the presigned PUT URL plus the pending object key. */
1716
1743
  interface PresignUploadResult {
@@ -2180,4 +2207,4 @@ interface SubmitCheckBody {
2180
2207
  forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
2181
2208
  }
2182
2209
 
2183
- export { type HostedNativeAppView as $, type AcceptedDocumentType as A, type FormFieldName as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type FormFieldQuestionView as G, type FormInput as H, type FormIssueCode as I, type FormLocale as J, type FormQuestionOptions as K, type FormQuestionType as L, type FormQuestionView as M, type HostedAcceptedDocuments as N, type HostedCaptureTuning as O, type HostedChallengeView as P, type HostedConsentView as Q, type HostedDocumentCaptureTuning as R, type HostedDocumentScanTuning as S, type HostedDocumentsView as T, type HostedEidView as U, type HostedEmailOtpView as V, type HostedFlowRef as W, type HostedFormView as X, type HostedIcaoPolicy as Y, type HostedIntegrity as Z, type HostedLivePhotoTuning as _, type AttestationInput as a, type SandboxSimulation as a$, type HostedNativeCaptureTuning as a0, type HostedOcrTuning as a1, type HostedOtpView as a2, type HostedPlanView as a3, type HostedPoaRuleKindView as a4, type HostedPoaRuleView as a5, type HostedPortraitPendingFix as a6, type HostedPortraitView as a7, type HostedProofOfAddressView as a8, type HostedSessionView as a9, type PhotoSourcePick as aA, type PlanAttempts as aB, type PlanChoiceKind as aC, type PlanChoiceOption as aD, type PlanChoiceView as aE, type PlanSectionView as aF, type PlanStepView as aG, type PoaImagesInput as aH, type PoaInput as aI, type PoaKind as aJ, type PoaLicenceInput as aK, type PoaNameMatchMode as aL, type PoaPdfInput as aM, type PoaReason as aN, type PoaRuleSource as aO, type PopulationInput as aP, type PopulationReason as aQ, type PortraitFix as aR, type PortraitFixReviewInput as aS, type PortraitIcaoInput as aT, type PortraitIcaoReason as aU, type PortraitOutputFormat as aV, type PresignRequest as aW, type PresignUploadResult as aX, type RecordConsentResult as aY, type ResolvedCaptureMode as aZ, type SandboxSimulatedReason as a_, type HostedSimulationView as aa, type HostedStepView as ab, type HostedTesterGateView as ac, type HostedVoiceLocale as ad, type HostedVoiceView as ae, type IcaoCriterion as af, type IcaoReportEntry as ag, type IdentityConfirmDecision as ah, type IdentityMethod as ai, type IdentitySummarySource as aj, type IdentitySummaryView as ak, type LivenessCaptureInput as al, type LivenessInput as am, type LivenessReason as an, type MatchReason as ao, type MediaKind as ap, type MethodChoiceView as aq, type NationalEidOption as ar, type NfcChipReason as as, type NfcStepView as at, type OtpChoiceView as au, type PhoneCountryRule as av, type PhoneFormat as aw, type PhoneOtpInput as ax, type PhoneOtpReason as ay, type PhotoSource as az, type CaptureMode as b, type SessionDecidingStep as b0, type SessionFailureReason as b1, type SessionReason as b2, type SessionStatus as b3, type SessionStepView as b4, type SessionView as b5, type SimulatedCaptureInput as b6, type StepResult as b7, type StepSection as b8, type SubmitCheckBody as b9, type TesterGateInput as ba, type TesterGateResponse as bb, type VerificationAssurance as bc, type VerificationLevel as bd, type ScreenRampColour as be, type AgeEstimationReason as bf, type CameraUnavailableCause as bg, type CaptureEnvironment as bh, type CaptureIssueReport as bi, type CaptureProvenance as bj, type HostedBranding as bk, type HostedBrandingColorKey as bl, type HostedLivenessCaptureTuning as bm, type IcaoCaptureTuning as bn, type RetakeHint as bo, type ScreenRampChallenge as bp, type ScreenRampPaint as bq, type ScreenRampRendered as br, type ScreenRampReport as bs, ICAO_FALLBACK as bt, type IcaoProfile as bu, type ResolvedIcaoTuning as bv, resolveIcaoTuning as bw, type PersonMask as bx, type BackgroundUniformity as by, type CaptureNoncesResult as c, type CaptureProof as d, type CheckInputByType as e, type CheckReason as f, type CheckState as g, type CheckType as h, type ClosedBy as i, type CompleteMediaResult as j, type ConsentLocale as k, type ContactChannel as l, type DocDeviceRead as m, type DocOcrInput as n, type DocReason as o, type DocSide as p, type EidAuthInput as q, type EidReason as r, type EmailOtpInput as s, type EmailOtpReason as t, type FaceMatchReason as u, type FormAddressValue as v, type FormAnswerValue as w, type FormChoiceView as x, type FormConsentView as y, type FormCustomQuestionView as z };
2210
+ export { type HostedLivePhotoTuning as $, type AcceptedDocumentType as A, type FormCustomQuestionView as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type FormFieldName as G, type FormFieldQuestionView as H, type FormInput as I, type FormIssueCode as J, type FormLocale as K, type FormQuestionOptions as L, type FormQuestionType as M, type FormQuestionView as N, type HostedAcceptedDocuments as O, type HostedCaptureTuning as P, type HostedChallengeView as Q, type HostedConsentView as R, type HostedDocumentCaptureTuning as S, type HostedDocumentScanTuning as T, type HostedDocumentsView as U, type HostedEidView as V, type HostedEmailOtpView as W, type HostedFlowRef as X, type HostedFormView as Y, type HostedIcaoPolicy as Z, type HostedIntegrity as _, type ArmedRamp as a, type SandboxSimulatedReason as a$, type HostedNativeAppView as a0, type HostedNativeCaptureTuning as a1, type HostedOcrTuning as a2, type HostedOtpView as a3, type HostedPlanView as a4, type HostedPoaRuleKindView as a5, type HostedPoaRuleView as a6, type HostedPortraitPendingFix as a7, type HostedPortraitView as a8, type HostedProofOfAddressView as a9, type PhotoSource as aA, type PhotoSourcePick as aB, type PlanAttempts as aC, type PlanChoiceKind as aD, type PlanChoiceOption as aE, type PlanChoiceView as aF, type PlanSectionView as aG, type PlanStepView as aH, type PoaImagesInput as aI, type PoaInput as aJ, type PoaKind as aK, type PoaLicenceInput as aL, type PoaNameMatchMode as aM, type PoaPdfInput as aN, type PoaReason as aO, type PoaRuleSource as aP, type PopulationInput as aQ, type PopulationReason as aR, type PortraitFix as aS, type PortraitFixReviewInput as aT, type PortraitIcaoInput as aU, type PortraitIcaoReason as aV, type PortraitOutputFormat as aW, type PresignRequest as aX, type PresignUploadResult as aY, type RecordConsentResult as aZ, type ResolvedCaptureMode as a_, type HostedSessionView as aa, type HostedSimulationView as ab, type HostedStepView as ac, type HostedTesterGateView as ad, type HostedVoiceLocale as ae, type HostedVoiceView as af, type IcaoCriterion as ag, type IcaoReportEntry as ah, type IdentityConfirmDecision as ai, type IdentityMethod as aj, type IdentitySummarySource as ak, type IdentitySummaryView as al, type LivenessCaptureInput as am, type LivenessInput as an, type LivenessReason as ao, type MatchReason as ap, type MediaKind as aq, type MethodChoiceView as ar, type NationalEidOption as as, type NfcChipReason as at, type NfcStepView as au, type OtpChoiceView as av, type PhoneCountryRule as aw, type PhoneFormat as ax, type PhoneOtpInput as ay, type PhoneOtpReason as az, type AttestationInput as b, type SandboxSimulation as b0, type SessionDecidingStep as b1, type SessionFailureReason as b2, type SessionReason as b3, type SessionStatus as b4, type SessionStepView as b5, type SessionView as b6, type SimulatedCaptureInput as b7, type StepResult as b8, type StepSection as b9, type SubmitCheckBody as ba, type TesterGateInput as bb, type TesterGateResponse as bc, type VerificationAssurance as bd, type VerificationLevel as be, type ScreenRampColour as bf, type AgeEstimationReason as bg, type CameraUnavailableCause as bh, type CaptureEnvironment as bi, type CaptureIssueReport as bj, type CaptureProvenance as bk, type HostedBranding as bl, type HostedBrandingColorKey as bm, type HostedLivenessCaptureTuning as bn, type IcaoCaptureTuning as bo, type RetakeHint as bp, type ScreenRampChallenge as bq, type ScreenRampPaint as br, type ScreenRampRendered as bs, type ScreenRampReport as bt, ICAO_FALLBACK as bu, type IcaoProfile as bv, type ResolvedIcaoTuning as bw, resolveIcaoTuning as bx, type PersonMask as by, type BackgroundUniformity as bz, type CaptureMode as c, type CaptureNoncesResult as d, type CaptureProof as e, type CheckInputByType as f, type CheckReason as g, type CheckState as h, type CheckType as i, type ClosedBy as j, type CompleteMediaResult as k, type ConsentLocale as l, type ContactChannel as m, type DocDeviceRead as n, type DocOcrInput as o, type DocReason as p, type DocSide as q, type EidAuthInput as r, type EidReason as s, type EmailOtpInput as t, type EmailOtpReason as u, type FaceMatchReason as v, type FormAddressValue as w, type FormAnswerValue as x, type FormChoiceView as y, type FormConsentView as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyro/web",
3
- "version": "0.1.0-rc.37",
3
+ "version": "0.1.0-rc.38",
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.37",
101
- "bom-ref": "@sekyro/web@0.1.0-rc.37",
100
+ "version": "0.1.0-rc.38",
101
+ "bom-ref": "@sekyro/web@0.1.0-rc.38",
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.37?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.38?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.37|@mediapipe/tasks-vision@0.10.35",
153
+ "bom-ref": "@sekyro/web@0.1.0-rc.38|@mediapipe/tasks-vision@0.10.35",
154
154
  "licenses": [
155
155
  {
156
156
  "license": {
@@ -185,7 +185,7 @@
185
185
  "name": "thumbmarkjs",
186
186
  "group": "@thumbmarkjs",
187
187
  "version": "1.12.0",
188
- "bom-ref": "@sekyro/web@0.1.0-rc.37|@thumbmarkjs/thumbmarkjs@1.12.0",
188
+ "bom-ref": "@sekyro/web@0.1.0-rc.38|@thumbmarkjs/thumbmarkjs@1.12.0",
189
189
  "licenses": [
190
190
  {
191
191
  "license": {
@@ -220,7 +220,7 @@
220
220
  "name": "emscripten",
221
221
  "group": "@types",
222
222
  "version": "1.41.6",
223
- "bom-ref": "@sekyro/web@0.1.0-rc.37|@types/emscripten@1.41.6",
223
+ "bom-ref": "@sekyro/web@0.1.0-rc.38|@types/emscripten@1.41.6",
224
224
  "licenses": [
225
225
  {
226
226
  "license": {
@@ -254,7 +254,7 @@
254
254
  "type": "library",
255
255
  "name": "type-fest",
256
256
  "version": "4.41.0",
257
- "bom-ref": "@sekyro/web@0.1.0-rc.37|type-fest@4.41.0",
257
+ "bom-ref": "@sekyro/web@0.1.0-rc.38|type-fest@4.41.0",
258
258
  "licenses": [
259
259
  {
260
260
  "expression": "(MIT OR CC0-1.0)",
@@ -286,7 +286,7 @@
286
286
  "type": "library",
287
287
  "name": "zxing-wasm",
288
288
  "version": "2.1.0",
289
- "bom-ref": "@sekyro/web@0.1.0-rc.37|zxing-wasm@2.1.0",
289
+ "bom-ref": "@sekyro/web@0.1.0-rc.38|zxing-wasm@2.1.0",
290
290
  "licenses": [
291
291
  {
292
292
  "license": {
@@ -319,30 +319,30 @@
319
319
  ],
320
320
  "dependencies": [
321
321
  {
322
- "ref": "@sekyro/web@0.1.0-rc.37",
322
+ "ref": "@sekyro/web@0.1.0-rc.38",
323
323
  "dependsOn": [
324
- "@sekyro/web@0.1.0-rc.37|@mediapipe/tasks-vision@0.10.35",
325
- "@sekyro/web@0.1.0-rc.37|@thumbmarkjs/thumbmarkjs@1.12.0",
326
- "@sekyro/web@0.1.0-rc.37|zxing-wasm@2.1.0"
324
+ "@sekyro/web@0.1.0-rc.38|@mediapipe/tasks-vision@0.10.35",
325
+ "@sekyro/web@0.1.0-rc.38|@thumbmarkjs/thumbmarkjs@1.12.0",
326
+ "@sekyro/web@0.1.0-rc.38|zxing-wasm@2.1.0"
327
327
  ]
328
328
  },
329
329
  {
330
- "ref": "@sekyro/web@0.1.0-rc.37|@mediapipe/tasks-vision@0.10.35"
330
+ "ref": "@sekyro/web@0.1.0-rc.38|@mediapipe/tasks-vision@0.10.35"
331
331
  },
332
332
  {
333
- "ref": "@sekyro/web@0.1.0-rc.37|@thumbmarkjs/thumbmarkjs@1.12.0"
333
+ "ref": "@sekyro/web@0.1.0-rc.38|@thumbmarkjs/thumbmarkjs@1.12.0"
334
334
  },
335
335
  {
336
- "ref": "@sekyro/web@0.1.0-rc.37|@types/emscripten@1.41.6"
336
+ "ref": "@sekyro/web@0.1.0-rc.38|@types/emscripten@1.41.6"
337
337
  },
338
338
  {
339
- "ref": "@sekyro/web@0.1.0-rc.37|type-fest@4.41.0"
339
+ "ref": "@sekyro/web@0.1.0-rc.38|type-fest@4.41.0"
340
340
  },
341
341
  {
342
- "ref": "@sekyro/web@0.1.0-rc.37|zxing-wasm@2.1.0",
342
+ "ref": "@sekyro/web@0.1.0-rc.38|zxing-wasm@2.1.0",
343
343
  "dependsOn": [
344
- "@sekyro/web@0.1.0-rc.37|@types/emscripten@1.41.6",
345
- "@sekyro/web@0.1.0-rc.37|type-fest@4.41.0"
344
+ "@sekyro/web@0.1.0-rc.38|@types/emscripten@1.41.6",
345
+ "@sekyro/web@0.1.0-rc.38|type-fest@4.41.0"
346
346
  ]
347
347
  }
348
348
  ]
@@ -1 +0,0 @@
1
- import{d as re,h as ve,i as Le,j as Te,l as _e}from"./chunk-JULJQOVT.js";import{a as ne,e as Ce,g as xe}from"./chunk-PW2HWXBJ.js";import{m as j}from"./chunk-7GUHA2NM.js";import{a as we,g as ke}from"./chunk-7QZWBDI5.js";import{k as te}from"./chunk-CPUECYAJ.js";import{d as Re,f as Pe}from"./chunk-ISMVEF7H.js";function Ee(e,t){let n=new Set(e.flatMap(r=>r.sides.filter(i=>i[t]!==null).map(i=>i.side)));return n.size===1?[...n][0]:null}function st(e){let t=Ce.find(r=>r.docType===e),n=t.mrz==="none"?null:t.mrz==="td3"?"single":"verso";return{sides:t.sides,format:xe(e),mrz:t.mrz==="none"?"none":"required",mrzSide:n,barcodeSide:null,portraitSide:t.portraitSide,scripts:null}}function ct(e){let t=[];for(let n of e)for(let r of n.sides){if(!Array.isArray(r.scripts))return null;for(let i of r.scripts)t.includes(i)||t.push(i)}return t}function Oe(e,t){if(t.length===0)return st(e);let n=t.some(s=>s.sides.length>1),r=new Set(t.map(s=>s.format)),i=r.size===1?[...r][0]:"card",u=t.filter(s=>s.sides.some(p=>p.mrz!==null)).length,c=t.find(s=>s.sides.length>1===n)?.sides.find(s=>s.portrait)?.side;return{sides:n?["recto","verso"]:["single"],format:i,mrz:u===t.length?"required":u===0?"none":"optional",mrzSide:Ee(t,"mrz"),barcodeSide:Ee(t,"barcode"),portraitSide:c??(n?"recto":"single"),scripts:ct(t)}}function Ae(e,t){if(e===void 0)return[];let n=e.toUpperCase();return Object.prototype.hasOwnProperty.call(ne,n)?ne[n]?.[t]??[]:[]}async function Be(e,t,n){return await e(t)?n:n==="recto"?"verso":"recto"}function Ie(e,t,n){return e!==t&&t==="verso"&&n.recto!==void 0&&n.verso===void 0?"verso":e}var ut={low:{maxLongEdge:1920,payloadTargetBytes:7e5,qMin:.7,qMax:.92},mid:{maxLongEdge:2240,payloadTargetBytes:12e5,qMin:.7,qMax:.92},good:{maxLongEdge:2560,payloadTargetBytes:16e5,qMin:.7,qMax:.92}};function lt(e){let{deviceMemory:t,effectiveType:n,saveData:r,downlinkMbps:i,sourceLongEdge:u}=e,c=r===!0||n==="slow-2g"||n==="2g"||i!=null&&i>0&&i<1,s=t!=null&&t<=2,p=n==="4g"||i!=null&&i>=5,l=t!=null&&t>=6,M;c||s?M="low":p&&l?M="good":M="mid";let f=ut[M],T=u&&u>0?Math.min(f.maxLongEdge,u):f.maxLongEdge;return{tier:M,...f,maxLongEdge:T}}function Fe(e){let t={};try{let n=navigator;typeof n.deviceMemory=="number"&&(t.deviceMemory=n.deviceMemory);let r=n.connection;r&&(t.effectiveType=r.effectiveType,t.saveData=r.saveData,t.downlinkMbps=r.downlink)}catch{}return typeof e=="number"&&e>0&&(t.sourceLongEdge=e),lt(t)}function dt(e,t,n){let r=Math.min(1,Math.max(0,(e-.28)/.21999999999999997)),i=(t+n)/2;return Math.max(t,n-r*(n-i))}function mt(e,t,n){let r=Math.max(e,t),i=r>0?Math.min(1,n/r):1;return{width:Math.max(1,Math.round(e*i)),height:Math.max(1,Math.round(t*i))}}async function pt(e,t){let n=t.startQ,r=await e(n);for(let i=0;i<4&&!(r.size<=t.budgetBytes||n<=t.qMin);i++)n=Math.max(t.qMin,n-.08),r=await e(n);return{blob:r,quality:n}}async function We(e,t,n,r,i){if(t<=0||n<=0)return null;let{width:u,height:c}=mt(t,n,r.maxLongEdge),s=document.createElement("canvas");s.width=u,s.height=c;let p=s.getContext("2d");if(!p)return null;p.drawImage(e,0,0,u,c);let l=C=>new Promise((S,P)=>{s.toBlob(d=>d?S(d):P(new Error("canvas toBlob returned null")),"image/jpeg",C)}),M=dt(i,r.qMin,r.qMax),{blob:f,quality:T}=await pt(l,{startQ:M,qMin:r.qMin,budgetBytes:r.payloadTargetBytes}).finally(()=>{s.width=0,s.height=0});if(f.size>5242880)throw new Error("encoded document exceeds the 5242880-byte media cap");return{blob:f,quality:T,width:u,height:c}}async function oe(e){let t=Fe(Math.max(e.width,e.height)),n=await We(e,e.width,e.height,t,.5);if(n===null)throw new Error("canvas encode unavailable");return{blob:n.blob,width:n.width,height:n.height}}async function Ft(e){let t=await createImageBitmap(e);try{return await oe(t)}finally{t.close()}}var zt=250,Ut=.6,Nt=1800,Gt=6e3,qt=2e3,ze=.16;function ie(e,t){return{layout:e,phase:"framing",captured:{},pending:[],lastCaptureAt:t,lastReportAt:t,manualShutter:!1,restPhase:"framing",readSides:[],needFlip:!1,flipped:!1,flipTimeoutSpent:!1,timeoutCapture:!1,lastShotByTimeout:!1}}var Ue=e=>e==="recto"?"verso":"recto",Ne=e=>e.phase==="framing"||e.phase==="locking"||e.phase==="flipCue"||e.phase==="reaskRecto",se=e=>(e.captured.recto!==void 0?1:0)+(e.captured.verso!==void 0?1:0)+e.pending.length;function ae(e,t){return e.lastCaptureAt>=0&&e.lastReportAt>=0?e:{...e,lastCaptureAt:e.lastCaptureAt<0?t:e.lastCaptureAt,lastReportAt:e.lastReportAt<0?t:e.lastReportAt}}function ft(e,t,n){if(e.phase==="result")return{...e,lastReportAt:n};let r=!t.present||e.captureArea!==void 0&&t.areaFrac<.6*e.captureArea,{flipped:i,awaySince:u}=e;r&&(u=u??n),u!==void 0&&n-u>=250&&(i=!0),r||(u=void 0);let c=e.flipTimeoutSpent&&!(i&&!e.flipped),s={...e,lastReportAt:n,flipped:i,awaySince:u,flipTimeoutSpent:c,lastArea:t.areaFrac};if(!Ne(e))return s;if(e.needFlip&&!i){if(!t.ready)return{...s,phase:e.restPhase,goodSince:void 0};let p=e.lastShot!==void 0&&e.pending.includes(e.lastShot);if(c||p)return{...s,goodSince:void 0,phase:e.restPhase};let l=e.goodSince??n;return n-l>=1800?{...s,goodSince:l,phase:"capturing",flipTimeoutSpent:!0,timeoutCapture:!0}:{...s,goodSince:l,phase:e.restPhase}}return t.ready?{...s,phase:"capturing",goodSince:e.goodSince??n}:{...s,goodSince:void 0,phase:t.locking?"locking":e.restPhase}}function gt(e,t){if(!Ne(e)||e.manualShutter)return e;let n=t-e.lastReportAt>=2e3,r=t-e.lastCaptureAt>=6e3;return n||r?{...e,manualShutter:!0}:e}function ht(e,t,n){let r=e.layout==="singlePage",i=r?{recto:t}:e.captured,u=r?[]:[...e.pending,t],c={...e,captured:i,pending:u,lastShot:t,lastCaptureAt:n,lastReportAt:-1,manualShutter:!1,goodSince:void 0,notice:void 0,awaySince:void 0,flipped:!1,lastShotByTimeout:e.timeoutCapture,timeoutCapture:!1,captureArea:e.lastArea};return r||se({captured:i,pending:u})>=2?{...c,phase:"reading",restPhase:"framing",current:void 0,needFlip:!1}:{...c,phase:"flipCue",restPhase:"flipCue",current:void 0,needFlip:!0}}function Ge(e,t,n){return e.pending.includes(t)?{...e,pending:e.pending.filter(r=>r!==t),lastShot:e.lastShot===t?void 0:e.lastShot,phase:e.phase==="capturing"?e.phase:"flipCue",restPhase:"flipCue",current:Ue(n),needFlip:!0,flipTimeoutSpent:!0,goodSince:void 0,manualShutter:!0,notice:"same_face",lastCaptureAt:-1,lastReportAt:-1}:e}function bt(e,t,n){if(!e.pending.includes(t))return e;if(e.captured[n]!==void 0)return Ge(e,t,n);let r=e.pending.filter(p=>p!==t),i={...e,pending:r,captured:{...e.captured,[n]:t}};if(se(i)!==1||e.layout==="singlePage")return i;let u=Ue(n),c=u==="recto"&&e.restPhase==="reaskRecto"?"reaskRecto":"flipCue",s=e.phase==="flipCue"||e.phase==="reaskRecto"||e.phase==="framing";return{...i,restPhase:c,current:u,phase:s?c:e.phase}}function yt(e,t){let n=t.id??e.captured[t.side],r={...e.captured};(t.id===void 0||r[t.side]===t.id)&&delete r[t.side];let i=e.pending.filter(l=>l!==n),u=e.layout==="twoSided"&&se({captured:r,pending:i})>0,c=e.lastShotByTimeout||n===e.lastShot!==e.flipped,s=u&&!c,p=s?t.side==="recto"?"reaskRecto":"flipCue":"framing";return{...e,captured:r,pending:i,readSides:e.readSides.filter(l=>l!==t.side),lastShot:e.lastShot===n?void 0:e.lastShot,notice:t.issue,goodSince:void 0,manualShutter:!1,phase:p,restPhase:p,current:t.side,needFlip:s,flipped:!1,flipTimeoutSpent:!1,awaySince:void 0,lastCaptureAt:-1,lastReportAt:-1}}function qe(e,t){switch(t.type){case"report":return ft(ae(e,t.at),t.report,t.at);case"tick":return gt(ae(e,t.at),t.at);case"captured":return ht(ae(e,t.at),t.id,t.at);case"captureFailed":return{...e,phase:e.restPhase,goodSince:void 0,lastCaptureAt:t.at,manualShutter:!0,timeoutCapture:!1};case"classified":return bt(e,t.id,t.side);case"duplicate":return Ge(e,t.id,t.side);case"readOk":{let n=e.readSides.includes(t.side)?e.readSides:[...e.readSides,t.side],r=["recto","verso"].filter(u=>e.captured[u]!==void 0),i=e.phase==="reading"&&e.pending.length===0&&r.every(u=>n.includes(u));return{...e,readSides:n,flipTimeoutSpent:!1,phase:i?"result":e.phase}}case"readFailed":return yt(e,t);case"clockRestart":return e.lastCaptureAt<0&&e.lastReportAt<0&&e.awaySince===void 0?e:{...e,awaySince:void 0,lastCaptureAt:-1,lastReportAt:-1};case"retake":return{...ie(e.layout,-1),lastCaptureAt:-1,lastReportAt:-1};default:return e}}function St(e,t,n=!1){let r=e(t);return r===null?"recto":!n||r.y+r.height/2>=t.height/2?"verso":"recto"}async function Mt(e,t=!1){let{detectMrzBand:n}=await import("./mrz-band-VYHOTDHY.js");return St(n,e,t)}async function ce(e,t=480,n,r=n!=null){let i=n??{x:0,y:0,width:e.width,height:e.height},u=Math.max(1,Math.round(i.height/i.width*t)),c=document.createElement("canvas");c.width=t,c.height=u;try{let s=c.getContext("2d");return s===null?"recto":(s.drawImage(e,i.x,i.y,i.width,i.height,0,0,t,u),await Mt(s.getImageData(0,0,t,u),r))}finally{c.width=0,c.height=0}}async function Xt(e,t=480){try{let n=await createImageBitmap(e),r=Math.max(1,Math.round(n.height/n.width*t)),i=document.createElement("canvas");i.width=t,i.height=r;let u=i.getContext("2d");return u===null?(n.close(),null):(u.drawImage(n,0,0,t,r),n.close(),u.getImageData(0,0,t,r))}catch{return null}}var ue=(e,t,n)=>Math.min(n,Math.max(t,Math.round(e))),$=e=>Math.round(Math.min(1,Math.max(0,e))*1e4)/1e4;async function He(e,t,n,r){let i=r.decode??(p=>createImageBitmap(p)),u=async()=>e.stillRead(await i(t),r.region??[0,0,1,1],r.detectorLimit),c;try{c=await u()}catch{try{await new Promise(p=>setTimeout(p,r.retryMs??300)),c=await u()}catch{return null}}let s=c.mrzBox;return s===void 0?null:{engine:r.engine,source:"live_mrz",format:n.format,lineCount:ue(n.lineCount,2,3),checkDigitsValid:!0,stillConfirmed:c.valid&&c.digest===n.digest,band:[$(s[0]),$(s[1]),$(Math.min(s[2],1-s[0])),$(Math.min(s[3],1-s[1]))],digest:n.digest,framesToValid:ue(n.framesToValid,1,1e3),msToValid:ue(n.msToValid,0,12e4)}}function Vt(e){let t=null;return e?.then(n=>{t=n}),()=>t}var Dt=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]),wt=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,6,64,11,11]);function Xe(e=globalThis){let t=e.WebAssembly?.validate;if(typeof t!="function")return{ok:!1,reason:"simd"};try{if(!t.call(e.WebAssembly,Dt)||!t.call(e.WebAssembly,wt))return{ok:!1,reason:"simd"}}catch{return{ok:!1,reason:"simd"}}return typeof e.Worker!="function"?{ok:!1,reason:"worker"}:typeof e.createImageBitmap!="function"?{ok:!1,reason:"bitmap"}:{ok:!0}}function Ye(e=globalThis){let t=e.navigator?.connection;return t?.saveData===!0||["slow-2g","2g","3g"].includes(t?.effectiveType??"")}var E=class extends Error{constructor(t){super(t),this.name="OcrEngineError",this.code=t}};function Ve(){let e=t=>(t.close(),Promise.reject(new E("unsupported")));return{ready:Promise.resolve("unsupported"),busy:!1,bandRead:e,stillRead:e,layoutRead:e,dispose:()=>{}}}function Qe(e){let t;try{if(e.createWorker)t=e.createWorker();else if(e.workerUrl!==void 0)t=new Worker(e.workerUrl,{type:"module",name:"sekyro-ocr"});else return Ve()}catch{return Ve()}let n=new Map,r=0,i=!1,u=!1,c=!1;t.addEventListener("message",d=>{let g=d.data,D=n.get(g.id);D&&(n.delete(g.id),D.resolve(g))});let s=()=>{for(let d of n.values())d.reject(new E("error"));n.clear(),l()};t.addEventListener("error",s),t.addEventListener("messageerror",s);function p(d,g=[]){if(i)return Promise.reject(new E("disposed"));let D=++r;return new Promise((A,B)=>{n.set(D,{resolve:A,reject:B});try{t.postMessage({...d,id:D},g)}catch{n.delete(D),B(new E("error"))}})}function l(){if(!i){i=!0;try{t.postMessage({id:++r,kind:"dispose"})}catch{}t.terminate();for(let d of n.values())d.reject(new E("disposed"));n.clear()}}let M=(async()=>{let d=await p({kind:"init",baseUrl:e.baseUrl,salt:e.salt,detectorLimit:e.tuning.detectorLimit,maxDownloadMs:e.tuning.maxDownloadMs});if(d.kind==="failed")return d.reason;if(d.kind!=="ready")return"error";let g=await p({kind:"warmup"});if(g.kind!=="ready")return"error";let D=g.benchMs??g.warmupMs,A=e.deviceMemoryGb===void 0?Pe():e.deviceMemoryGb;return{warmupMs:g.warmupMs,downloadMs:d.downloadMs,cached:d.cached,benchMs:D,tier:Re(D,A)}})().catch(()=>"error"),f,T=new Promise(d=>{f=setTimeout(()=>d("timeout"),e.tuning.loadTimeoutMs)}),C=Promise.race([M,T]).then(d=>(clearTimeout(f),typeof d=="string"?l():c=!0,i&&typeof d!="string"?"error":d));(e.page===void 0?globalThis.addEventListener?globalThis:null:e.page)?.addEventListener("pagehide",l,{once:!0});async function P(d,g,D){if(i)throw g.close(),new E("disposed");if(!c)throw g.close(),new E("not_ready");if(u)throw g.close(),new E("busy");u=!0;let A;try{let B=new Promise((X,z)=>{A=setTimeout(()=>{z(new E("timeout")),l()},e.tuning.readTimeoutMs??1e4)}),O=await Promise.race([p(d,[g]),B]);if(O.kind===D){let{id:X,...z}=O;return z}throw new E(O.kind==="error"?O.code:O.kind==="failed"?O.reason:"error")}finally{clearTimeout(A),u=!1}}return{ready:C,get busy(){return u},bandRead:(d,g=e.tuning.detectorLimit)=>P({kind:"band",bitmap:d,detectorLimit:g},d,"band"),stillRead:(d,g,D=e.tuning.detectorLimit)=>P({kind:"still",bitmap:d,region:g,detectorLimit:D},d,"band"),layoutRead:(d,g)=>P({kind:"layout",bitmap:d,detectorLimit:g},d,"layout"),dispose:l}}var H="sekyro-ocr-1",le=e=>e!==null&&typeof e=="object"?e:{},_=(e,t,n,r)=>typeof e=="number"&&Number.isFinite(e)&&e>=t&&e<=n?e:r,Ke=(e,t)=>typeof e=="boolean"?e:t,je=e=>{let t=typeof e=="string"?/^sekyro-ocr-(\d{1,4})$/.exec(e):null;return t?Number(t[1]):Number.POSITIVE_INFINITY};function $e(e,t={}){let n=le(e),r=le(n.liveMrz),i=le(n.frontLock),u=je(t.engine??H),c=t.mode==="off",s=d=>d.enabled===!0?d.arm==="live"?"live":"control":null,p=s(r),l=s(i),M=(d,g)=>!c&&g==="live"&&je(d.minEngine??H)<=u,f=Te,T=M(r,p)?{detectorLimit:_(r.detectorLimit,320,1600,f.detectorLimit),bandMaxWidthPx:_(r.bandMaxWidthPx,320,4096,f.bandMaxWidthPx),minBandWidthPx:_(r.minBandWidthPx,0,4096,f.minBandWidthPx),bandTop:_(r.bandTop,0,.95,f.bandTop),minIntervalMs:_(r.minIntervalMs,0,5e3,f.minIntervalMs),stableReads:Math.round(_(r.stableReads,1,10,f.stableReads)),profileReads:Math.round(_(r.profileReads,1,100,f.profileReads)),maxReadMs:_(r.maxReadMs,50,6e4,f.maxReadMs),searchTimeoutMs:_(r.searchTimeoutMs,1e3,12e4,f.searchTimeoutMs),hint:Ke(r.hint,!0),stillConfirm:Ke(r.stillConfirm,!0)}:null,C=Le,S=(d,g,D)=>_(i[d],g,D,C[d]),P=M(i,l)?{minLines:Math.round(S("minLines",1,50)),fillMin:S("fillMin",0,1),fillMax:S("fillMax",0,2),offsetMax:S("offsetMax",0,1),steadyFillDelta:S("steadyFillDelta",0,1),steadyOffsetDelta:S("steadyOffsetDelta",0,1),layoutShiftMax:S("layoutShiftMax",0,1),lineCountDelta:Math.round(S("lineCountDelta",0,50)),lockMs:S("lockMs",0,3e4),steadyMs:S("steadyMs",0,3e4),minFrames:Math.round(S("minFrames",1,100)),minIntervalMs:S("minIntervalMs",0,5e3),maxWidthPx:S("maxWidthPx",160,2048),detectorLimit:S("detectorLimit",320,1600),searchTimeoutMs:S("searchTimeoutMs",1e3,12e4)}:null;return{enabled:T!==null||P!==null,liveMrz:T,textLock:P,liveMrzArm:p,frontLockArm:l,load:{detectorLimit:T?.detectorLimit??P?.detectorLimit??f.detectorLimit,loadTimeoutMs:_(r.loadTimeoutMs,1e3,12e4,2e4),maxDownloadMs:_(r.maxDownloadMs,1e3,12e4,2e4)},reportSampleRate:_(r.reportSampleRate,0,1,1)}}function Je(e,t){return e.enabled?!(t.probe??Xe)().ok||(t.slow??Ye)()?{ok:!1,reason:"unsupported"}:{ok:!0,engine:Qe({baseUrl:t.baseUrl,salt:t.salt,tuning:{detectorLimit:e.load.detectorLimit,maxDownloadMs:e.load.maxDownloadMs,loadTimeoutMs:e.load.loadTimeoutMs},...t.workerUrl!==void 0?{workerUrl:t.workerUrl}:{},...t.createWorker!==void 0?{createWorker:t.createWorker}:{},...t.page!==void 0?{page:t.page}:{},...t.deviceMemoryGb!==void 0?{deviceMemoryGb:t.deviceMemoryGb}:{}})}:{ok:!1,reason:"off"}}function kt(e=typeof navigator<"u"?navigator.userAgent:""){return/SamsungBrowser\//.test(e)?"samsung":/Firefox\/|FxiOS\//.test(e)?"firefox":/Chrome\/|CriOS\/|Chromium\//.test(e)&&!/Edg\/|OPR\//.test(e)?"chrome":/Safari\//.test(e)&&/Version\/|Mobile\//.test(e)&&!/Chrome\/|CriOS\//.test(e)?"safari":"other"}var I=e=>e===void 0||!Number.isFinite(e)?void 0:Math.min(6e5,Math.max(0,Math.round(e))),de=(e,t,n)=>e===void 0||!Number.isFinite(e)?void 0:Math.min(n,Math.max(t,Math.round(e)));function Ze(e){let t=e.assist??null,n=e.load!==null&&e.load!==void 0&&typeof e.load=="object"?e.load:null,r=typeof e.load=="string"?e.load:null,i=t!==null?t.outcome:r==="unsupported"||r==="download"||r==="integrity"?r:r==="error"||r==="timeout"?"error":"off",u={kind:"live_mrz",platform:"web",engine:e.engine??H,arm:e.arm,capture:e.capture,outcome:i,reads:de(t?.reads??0,0,1e4)??0,browser:e.browser??kt()},c=(s,p)=>{p!==void 0&&(u[s]=p)};return c("format",t?.format),c("framesToValid",de(t?.framesToValid,1,1e4)),c("msToValid",I(t?.msToValid)),c("framesToLock",de(t?.framesToLock,1,1e4)),c("msToLock",I(t?.msToLock)),c("msToCapture",I(e.msToCapture)),c("readP50Ms",I(t?.readP50Ms)),c("readP90Ms",I(t?.readP90Ms)),c("deviceClass",t?.deviceClass),n!==null&&(c("warmupMs",I(n.warmupMs)),c("downloadMs",I(n.downloadMs)),c("cached",n.cached),c("tier",n.tier),c("benchMs",I(n.benchMs))),c("stillConfirmed",e.stillConfirmed),c("typeMismatch",e.typeMismatch),u}function me(e,t){return e===void 0?!1:t==="passport"?e!=="TD3":e==="TD3"}var Ct=2;async function xt(e){let t=await import("./capture-session-doc-6MUKGUJ3.js");return new t.CaptureSessionDoc(e)}function vt(e){return{topLeft:{x:e.x,y:e.y},topRight:{x:e.x+e.width,y:e.y},bottomRight:{x:e.x+e.width,y:e.y+e.height},bottomLeft:{x:e.x,y:e.y+e.height}}}function Rt(e,t,n){let r=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],i=0;for(let u=0;u<r.length;u+=1){let c=r[u],s=r[(u+1)%r.length];i+=c.x*s.y-s.x*c.y}return t>0&&n>0?Math.abs(i)/2/(t*n):0}function hn(){import("./capture-session-doc-6MUKGUJ3.js").then(e=>e.warmDocDetector()).catch(()=>{})}function bn(e){return Pt(e,{}).handle}function Pt(e,t){let n=we(),r=ke({enabled:e.keepScreenAwake!==!1}),i=t.decode??(o=>createImageBitmap(o)),u=t.blurRefuseSharpnessMax??.16,c=t.now??(()=>performance.now()),s=Oe(e.documentType,t.catalogCapture===!0?t.captureSeries??Ae(e.issuer,e.documentType):[]),p=s.sides.length===1||e.side==="single",l=ie(p?"singlePage":"twoSided",c());if(!p&&(e.side==="recto"||e.side==="verso")){let o=e.side==="recto"?"verso":"recto";l={...l,captured:{[o]:"server"},readSides:[o],current:e.side,phase:"flipCue",restPhase:"flipCue"}}let M="idle",f=null,T=null,C=!0,S=0,P=0,d=!1,g=!1,D="",A=null,B,O=null,X=[],z=s.mrz==="none",et=s.barcodeSide==="recto"||s.barcodeSide==="verso"?s.barcodeSide:null,F=z&&!p?t.barcode?.side??et:null,pe=e.barcodeAssetBaseUrl??t.barcode?.assetBaseUrl,fe=null,ge=()=>F===null||pe===void 0||t.barcode?.seen!==void 0?Promise.resolve(null):(fe??(fe=import("./barcode-detect-C5IOXMKI.js").then(o=>o.loadBarcodeDetect(pe)).catch(()=>null)),fe),tt=async(o,a)=>{if(F===null)return null;let m=F==="recto"?"verso":"recto";try{let h=t.barcode?.seen;if(h!==void 0)return await h(o)?F:m;let[v,w]=await Promise.all([ge(),a()]);if(v===null||w===null)return null;let k=Math.min(1600,w.width),y=document.createElement("canvas");y.width=k,y.height=Math.max(1,Math.round(w.height/w.width*k));try{let b=y.getContext("2d");return b===null?null:(b.drawImage(w,0,0,y.width,y.height),await Be(v,b.getImageData(0,0,y.width,y.height),F))}finally{y.width=0,y.height=0}}catch{return null}},x=t.webOcr!==void 0&&!z?$e(t.webOcr.captureDocument,{mode:e.liveMrz?.mode??"auto"}):null,G=null,U=x===null||!x.enabled?"off":null,Y=null,V=null,he=new WeakMap,J="";if(x!==null&&x.enabled&&t.webOcr!==void 0){let o=t.webOcr,a=Je(x,{baseUrl:e.liveMrz?.assetBaseUrl??o.baseUrl,salt:o.salt,...e.liveMrz?.workerUrl!==void 0?{workerUrl:e.liveMrz.workerUrl}:{},...o.createWorker!==void 0?{createWorker:o.createWorker}:{}});if(a.ok){G=a.engine;let m=new _e({textLock:x.textLock,liveMrz:x.liveMrz});Y=m;let h=a.engine;h.ready.then(v=>{U=v,typeof v!="string"&&C&&m.setEngine(h,v.tier)})}else U=a.reason}let N=o=>{let a=JSON.stringify(o);a!==J&&(J=a,n.emit("mrz",o))},be=(o,a)=>{let m=t.webOcr?.reports;if(m===void 0||x===null||o===void 0)return;let h=o.format==="ID-3"||o.side==="single"?"single":o.side==="verso"?"verso":"recto",v=h!=="recto"?x.liveMrzArm??x.frontLockArm:x.frontLockArm;if(v===null||Math.random()>=x.reportSampleRate)return;let w=o.via==="live_mrz"?V:null,k=()=>{let y=w?.value??null;m([Ze({arm:v,capture:h,assist:o.ocr??null,load:v==="control"?"off":U,...o.msToCapture!==void 0?{msToCapture:o.msToCapture}:{},...y!==null&&y.stillConfirmed!==void 0?{stillConfirmed:y.stillConfirmed}:{},...a!==void 0?{typeMismatch:me(a.format,s.format==="ID-3"?"passport":"card")}:{}})])};w!==null&&w.value===null?Promise.race([w.promise,new Promise(y=>setTimeout(y,3e3))]).then(k):k()},W=o=>{!C||o===M||(M=o,r.setActive(o==="starting"||o==="scanning"),n.emit("state",o))},nt=(o,a)=>a===void 0?null:p?"single":o.captured.recto===a?"recto":o.captured.verso===a?"verso":null,rt=o=>({phase:o.phase,captured:p?o.captured.recto!==void 0?["single"]:[]:["recto","verso"].filter(a=>o.captured[a]!==void 0),expected:p?null:o.current??null,notice:o.notice??null,lastShot:nt(o,o.lastShot),manualShutter:o.manualShutter,torchAvailable:f?.torchAvailable()??!1,torch:g}),ye=()=>{let o=f;o!==null&&o.captureNow().catch(()=>L({type:"captureFailed",at:c()}))};function L(o){if(!C)return;let a=l;l=qe(l,o),l.phase==="capturing"&&a.phase!=="capturing"&&Promise.resolve().then(ye),l.phase==="result"&&a.phase!=="result"&&(W("done"),Se());let m=rt(l),h=JSON.stringify(m);h!==D&&(D=h,n.emit("scan",m))}function Se(){O!==null&&clearInterval(O),O=null;for(let o of X.splice(0))o();f?.destroy(),f=null,r.setActive(!1)}let Me=()=>f?.captureReport?.(),Z=!1,De=(o,a)=>{if(!(o===void 0||t.onFaceReport===void 0))try{t.onFaceReport(o,a)}catch{}},Q=o=>{J="",!(f===null||l.phase==="reading"||l.phase==="result")&&(Z=!1,f.rearm(p?"single":l.current??o))},ot=async(o,a,m,h)=>{if(V=null,h!==void 0&&G!==null&&x?.liveMrz?.hint===!0){let b={promise:He(G,o,h,{engine:H,detectorLimit:x.liveMrz.detectorLimit}).catch(()=>null),value:null};b.promise.then(R=>{b.value=R}),V=b}h!==void 0&&me(h.format,s.format==="ID-3"?"passport":"card")&&N({state:"mismatch",format:h.format});let v=Me();De(v,"captured"),Z=!0,be(v,h);let w=m===void 0?A:m===null?null:{quad:vt(m),frameWidth:0,frameHeight:0,inStill:!0},k={decoded:null},y=()=>(k.decoded??(k.decoded=Promise.resolve().then(()=>i(o)).catch(()=>null)),k.decoded);try{await at(o,a,w,y,V)}finally{k.decoded!==null&&(await k.decoded)?.close()}},at=async(o,a,m,h,v)=>{let w=`shot-${S+=1}`;if(L({type:"captured",id:w,at:c()}),e.haptics!==!1)try{globalThis.navigator?.vibrate?.(30)}catch{}if(!d&&u>0){let b=await(t.measureSharpness!==void 0?t.measureSharpness(o,m):h().then(R=>R===null?-1:ve(R,re(m?.quad??null,m?.inStill===!0?R:{width:m?.frameWidth??0,height:m?.frameHeight??0},R)))).catch(()=>-1);if(!C)return;if(Number.isFinite(b)&&b>=0&&b<u){d=!0;let R=p?"recto":l.current??(l.captured.recto===void 0?"recto":"verso");L({type:"readFailed",side:R,id:w,issue:"blurry"}),Q(R);return}}d=!1;let k;if(p)k="single";else{let b=l.current,R=t.classify===void 0?await tt(o,h):null,q=(R===null||F===null?R:Ie(R,F,l.captured))??await(t.classify!==void 0?t.classify(o):h().then(K=>K===null?b??"recto":m?.inStill===!0?ce(K,480,null,!0):ce(K,480,re(m?.quad??null,{width:m?.frameWidth??0,height:m?.frameHeight??0},K)))).catch(()=>b??"recto");if(!C)return;if(l.captured[q]!==void 0&&P<Ct){P+=1,L({type:"duplicate",id:w,side:q}),Q(q==="recto"?"verso":"recto");return}k=l.captured[q]!==void 0&&b!==void 0?b:q,P=0,L({type:"classified",id:w,side:k})}let y=k==="verso"?"verso":"recto";try{let b=t.encode!==void 0?await t.encode(o):await h().then(R=>{if(R===null)throw new Error("the still could not be decoded");return oe(R)});if(!C)return;v!==null&&he.set(b.blob,v),n.emit("captured",{image:b.blob,side:k,documentType:e.documentType,...e.issuer!==void 0?{issuer:e.issuer}:{},width:b.width,height:b.height,previewDataUrl:a}),t.deferRead!==!0&&L({type:"readOk",side:y})}catch(b){L({type:"readFailed",side:y,id:w,issue:"technical"}),n.emit("error",j("generic",!0,{phase:"keyframes",name:te(b)}))}Q(y==="recto"?"verso":"recto")},it=o=>{X.push(o.on("statechange",({state:a})=>{a==="preflight"||a==="acquiring"?W("starting"):a==="positioning"?W("scanning"):a==="captured"?W("captured"):a==="error"&&W("error")}),o.on("feedback",({key:a,reticle:m})=>n.emit("feedback",{key:a,reticle:m})),o.on("checks",a=>{n.emit("gate",{progress:a.p,quad:a.quad,frameWidth:a.frameWidth,frameHeight:a.frameHeight,...a.guide!==void 0?{guide:{detected:a.guide.detected,fill:a.guide.fill,offsetX:a.guide.offsetX??0,offsetY:a.guide.offsetY??0}}:{}});let m=a.ocr?.mrz;m!==void 0&&(m.state==="fallback"?N({state:"fallback",reason:m.reason}):m.state==="valid"?N({state:"valid",format:m.format}):m.state==="reading"?N({state:"reading",...m.format?{format:m.format}:{},...m.coach?{coach:m.coach}:{}}):N({state:"searching"}));let h=a.quad===null?0:Rt(a.quad,a.frameWidth,a.frameHeight);A=a.quad===null?null:{quad:a.quad,frameWidth:a.frameWidth,frameHeight:a.frameHeight},L({type:"report",report:{present:a.quad!==null&&a.plausible||a.guide?.detected===!0,ready:a.ready===!0,locking:a.p>=.5,areaFrac:h},at:c()})}),o.on("error",({kind:a,retryable:m,detail:h})=>n.emit("error",j(a,m,h))),o.on("artifacts",a=>{ot(a.keyframe,a.previewDataUrl,a.docRegion,a.liveMrz)}))},ee=()=>(T??(T=(async()=>{if(C){if(ge(),f===null){let o;try{o=await(t.createEngine??xt)({...t.engineOptions??{},...B!==void 0?{guide:B}:{},video:e.video,format:s.format,side:p?"single":e.side??"recto",autoCapture:!1,...Y!==null?{ocr:Y}:{}})}catch(m){W("error"),n.emit("error",j("models",!0,{phase:"models",name:te(m)}));return}if(!C){o.destroy();return}f=o,it(o);let a=t.tickMs??500;a>0&&(O=setInterval(()=>L({type:"tick",at:c()}),a))}L({type:"clockRestart"}),x!==null&&x.liveMrzArm==="live"&&(U==="unsupported"||U==="off")&&N({state:"fallback",reason:U}),await f.start()}})().finally(()=>{T=null})),T);return{handle:{get state(){return M},on:(o,a)=>n.on(o,a),start:ee,retry:()=>{if(f===null&&l.phase==="result"){L({type:"retake"}),P=0,d=!1,ee();return}if(f!==null&&M!=="error"){L({type:"retake"}),P=0,d=!1,f.rearm(p?"single":void 0);return}ee()},setSide:o=>{p||o==="single"||(l.current!==o&&(l={...l,current:o}),L({type:"clockRestart"}),l.phase!=="reading"&&l.phase!=="result"&&f?.rearm(o))},shutter:ye,focusAt:(o,a)=>{f?.focusAt?.(o,a)},setGuide:o=>{B=o,f?.setGuide?.(o)},setTorch:o=>{g=o,f?.setTorch(o),L({type:"tick",at:c()})},destroy:()=>{if(C&&f!==null&&M!=="done"){let o=Me();!Z&&o!==void 0&&o.ticks>0&&De(o,"abandoned"),be(o,void 0)}C=!1,Se(),Y?.setEngine(null),G?.dispose(),G=null,n.clear()}},plan:s,setFlowState:o=>{(l.phase==="reading"||l.phase==="result")&&W(o==="done"&&l.phase!=="result"?"scanning":o)},settle:(o,a)=>{let m=o==="verso"?"verso":"recto";L(a.ok?{type:"readOk",side:m}:{type:"readFailed",side:m,issue:a.issue}),a.ok||Q(m)},takeDeviceRead:o=>he.get(o.image)?.value??null}}export{Ft as a,zt as b,Ut as c,Nt as d,Gt as e,qt as f,ze as g,ie as h,qe as i,St as j,Mt as k,Xt as l,He as m,Vt as n,H as o,$e as p,Je as q,kt as r,Ze as s,me as t,Ct as u,hn as v,bn as w,Pt as x};
@@ -1 +0,0 @@
1
- import{c as P,d as H,e as A}from"./chunk-QPO6LOYB.js";var z=new Set(["nni_unbound","id_number_unbound","method_required","mobile_required","portrait_required"]);function be(e){return z.has(e)}function ve(e,n,t){let i=n.detail;return{check:e,kind:n.kind,...i?.name!==void 0?{name:i.name}:{},...i?.phase!==void 0?{phase:i.phase}:{},...i?.engineKind!==void 0?{engineKind:i.engineKind}:{},attempt:Math.max(0,Math.min(1e3,t))}}function Pe(){let e=-1,n="";return{note(t){t==="starting"&&n!=="starting"&&(e+=1),n=t},newHandle(){n=""},noteError(){e<0&&(e=0)},get value(){return e}}}var j={document:"document_photo",nfc:"document_chip",population_registry:"national_number",national_eid:"national_eid"};function f(e){return e.plan?.steps??[]}function x(e){return Math.max(0,e.attempts.max-e.attempts.used)}function W(e){let n=e.plan?.choice;return n!==void 0&&e.plan?.current===n.nodeId?n:null}function Me(e){let n=W(e);if(n?.kind!=="identity_method")return null;let t=n.options.map(r=>j[r.service]).filter(r=>r!==void 0),i=n.options.find(r=>r.nationalEid)?.nationalEid;return i?{available:!0,selected:null,options:t,nationalEid:i}:{available:!0,selected:null,options:t}}var G=new Set(["liveness","face_match"]);function y(e){return e!==void 0&&(e.state==="pending"||e.state==="input_required")}function T(e){return e.status!=="created"&&e.status!=="in_progress"}function M(e){let n=e.plan?.current,t=n==null?void 0:f(e).find(i=>i.id===n);return y(t)?t:void 0}function _(e,n){return f(e).find(t=>t.checkType===n)}function S(e){let n=f(e),t=n.findIndex(i=>i.checkType==="liveness");return n.find((i,r)=>r>t&&i.checkType==="face_match")}function F(e,n){let t=_(n,"liveness")?.state,i=S(n)?.state;return(S(e)?.state??"pending")==="pending"&&(t==="passed"||t==="review")&&i!==void 0&&i!=="pending"&&i!=="skipped"}function V(e,n){let t=new Map(f(e).map(i=>[i.id,i.state]));return f(n).filter(i=>i.checkType==="face_match"&&(t.get(i.id)??"pending")==="pending"&&i.state!=="pending"&&i.state!=="skipped").map(i=>i.id)}var X=/^[0-9a-f]{24}$/i;function R(e){return X.test(e)?`ses_${e}`:e}function w(e,n){let t=R(e);return n===void 0?{sessionId:t,status:"unavailable"}:{sessionId:t,status:"unavailable",reasonCode:n}}function O(e,n,t){let i=R(e);return t===void 0?{sessionId:i,status:n}:{sessionId:i,status:n,reasonCode:t}}function Ve(e,n){let t=Z(e,n),i=Q(e);return i!==void 0&&(t.sandbox={simulated:!0,reason:i}),t}var J=new Set(["no_testers","tester_gate_not_used","tester_gate_missed"]);function Q(e){if(e.sandbox!==!0)return;let n=e.simulation?.reason;return J.has(n)?n:void 0}function Z(e,n){let t=R(e.sessionId);switch(e.status){case"created":case"in_progress":return re(e,n);case"verified":return b(e,{sessionId:t,status:"verified"});case"review_pending":return b(e,O(t,"review",L(e,"review")));case"not_verified":return b(e,ne(e));default:return b(e,{sessionId:t,status:"not_verified"})}}var ee=new Set([0,1,2,3]);function b(e,n){return ee.has(e.level)&&(n.level=e.level),typeof e.assurance=="string"&&e.assurance.length>0&&(n.assurance=e.assurance),n}function ne(e){let n={sessionId:R(e.sessionId),status:"not_verified"};return e.reason!==void 0&&(n.reason=e.reason),e.reasonCode!==void 0&&(n.reasonCode=e.reasonCode),e.reasonCode==="device_cooldown"&&e.retryAfter!==void 0&&(n.retryAfter=e.retryAfter),n}function te(e){return e==="rejected"?"rejected":e==="unavailable"?"unavailable":"inconclusive"}function ie(e,n){if(n===void 0)return!1;let t=f(n).find(i=>i.id===e.id);return t!==void 0&&t.attempts.used===e.attempts.used}function re(e,n){let t=R(e.sessionId),i=f(e).find(o=>G.has(o.checkType)&&o.state==="input_required"&&o.reason!==void 0);if(i?.reason==="mobile_required")return w(t,"mobile_required");if(i?.reason!==void 0){if(i.result==="unavailable")return w(t,i.reason);let u=n.autoRetry&&(x(i)>0||ie(i,n.previous))?{sessionId:t,status:"retry",reasonCode:i.reason,attemptsRemaining:x(i)}:{sessionId:t,status:"not_verified",reason:te(i.result),reasonCode:i.reason,attemptsRemaining:x(i)};return i.retakeHint!==void 0&&(u.retakeHint=i.retakeHint),u}let r=M(e);return r===void 0&&f(e).some(o=>o.state==="review")?O(t,"review",L(e,"review")):r?.checkType==="portrait_icao"?w(t,"portrait_required"):w(t)}function L(e,n){return f(e).find(t=>t.state===n&&t.reason!==void 0)?.reason}function K(e,n,t,i,r){return e.presignCapture!==void 0?e.presignCapture(n,t,i,r):e.presign(n,t,i)}function q(e){return{engine:e?.engine,durationMs:e?.clipMs}}var oe=["video/webm","video/mp4"],N="image/jpeg",se=2,ae=1e3,ue=1e4,de=3,ce=10,le=3,pe=new Set(["network_error","timeout","upload_failed","unknown_error","rate_limit_exceeded"]),fe=new Set(["session_not_active","check_not_found","check_already_finalized","check_out_of_order","identity_confirm_required","check_not_active","step_not_on_path","native_app_required"]),k=class extends Error{constructor(){super("verification destroyed"),this.name="FlowCancelledError"}};function me(e){let n=S(e);return _(e,"portrait_icao")?.state!=="pending"&&(n!==void 0?y(n):e.capture?.livePhoto?.oneCapture===!0)}var h=class extends Error{constructor(n){super(n),this.name="AttestationError"}},E=class extends h{constructor(n){super(`no attestation token: ${n}`),this.name="AttestationUnavailableError",this.code=n}};async function D(e,n,t={}){let i=e.uuid(),r=!1,o=!1,u=0,p=0;for(;;)try{return await n(e.client,i)}catch(s){if(s instanceof h){if(o||s instanceof E)throw s;o=!0,t.onAttestationInvalid?.(),i=e.uuid();continue}if(!(s instanceof P))throw s;if(s.code==="consent_required"&&!r){r=!0,await e.ensureConsent({force:!0}),i=e.uuid();continue}if(s.code==="attestation_invalid"&&!o){o=!0,t.onAttestationInvalid?.(),i=e.uuid();continue}if(s.code==="inference_unavailable"&&p<de){p+=1;let a=H(s.retryAfterSeconds,ce,e.random??Math.random);e.onBusy?.({attempt:p,retryAfterSeconds:a/1e3}),await e.sleep(a),t.onAttestationInvalid?.(),i=e.uuid();continue}if(pe.has(s.code)&&u<se){u+=1;let a=s.retryAfterSeconds!==void 0?s.retryAfterSeconds*1e3:void 0;await e.sleep(a!==void 0?Math.min(a,ue):ae);continue}throw s}}var he=new Set(["passed","review","processing","skipped"]);async function Fe(e){let{artifacts:n}=e,t=n.clip,i=A(n.clipMime??"");if(n.degraded==="NO_RECORDER"||t===void 0||!oe.includes(i))return{kind:"unavailable",reason:"no_recorder"};e.client.armCapture?.(2);let r=_e(e,n.keyframe),o=ge(e,t,i,r),u=Se(e,r),p=!1,s=new Set,a=!0,C=0;for(;;){if(e.isCancelled())return{kind:"cancelled"};let c=e.getView();if(T(c))return{kind:"settled"};let d=M(c),g=d?.checkType,v=g==="liveness"&&!p?"liveness":g==="face_match"&&!s.has(d?.id)&&s.size<2&&a?"face_match":null;if(v===null)return{kind:"settled"};if(v==="liveness"&&n.captureChannel==="desktop")return{kind:"unavailable",reason:"mobile_required"};try{if(v==="liveness"){p=!0;let l=await o();if(e.isCancelled())return{kind:"cancelled"};F(c,l)&&s.add(S(l)?.id);for(let Y of V(c,l))s.add(Y);await e.applySubmit(l,"liveness");let m=_(e.getView(),"liveness")?.state;a=m===void 0||he.has(m)}else{s.add(d?.id);let l=await u();if(e.isCancelled())return{kind:"cancelled"};for(let m of V(c,l))s.add(m);await e.applySubmit(l,"face_match")}}catch(l){if(e.isCancelled()||l instanceof k)return{kind:"cancelled"};let m=Ce(l);if(m.kind!=="resync"||C>=le)return m;C+=1,await e.refreshView()}}}function _e(e,n){let t=null,i=null,r=()=>t!==null?Promise.resolve(t):(i??(i=(async()=>{let o=await K(e.client,"image",N,n.size,q(e.artifacts));return await e.client.uploadToSpaces(o.uploadUrl,n,N),t=(await e.client.completeMedia(o.key)).key,e.onKeyframePromoted?.(t),t})().finally(()=>{i=null})),i);return{ensure:r,attempt:()=>r().catch(()=>null),current:()=>t}}function ge(e,n,t,i){let r=e.clipKeys?.get()??null,o,u=null,p=0,s;return()=>D(e,async(a,C)=>{if(r===null||o===void 0){if(e.isCancelled())throw new k;o===void 0&&!me(e.getView())&&(o=null),e.onPhase("uploading");let[c,d]=await Promise.all([r!==null?Promise.resolve(r):(async()=>{let g=await K(a,"clip",t,n.size,q(e.artifacts));return await a.uploadToSpaces(g.uploadUrl,n,t),(await a.completeMedia(g.key)).key})(),o!==void 0?Promise.resolve(o===null?null:o.imageKey):i.attempt()]);r=c,e.clipKeys?.set(c),o===void 0&&(o=d===null?null:{imageKey:d})}if(u===null){let c=performance.now();try{u=await e.getAttestation(),s=e.attestationError?.()}catch(d){throw d instanceof h?d:new h(d instanceof Error?d.message:String(d))}p=Math.round(performance.now()-c)}return e.onPhase("checking"),a.submitCheck("liveness",{clipKey:r,attestation:u,captureChannel:e.artifacts.captureChannel,capture:{...ye(e.artifacts),attestationMs:p,attestationError:s,...ke(e.attestationFacts?.())},...o!==null?{faceMatch:o}:{}},{idempotencyKey:C})},{onAttestationInvalid:()=>{u=null}})}function Se(e,n){return()=>D(e,async(t,i)=>{if(n.current()===null){if(e.isCancelled())throw new k;e.onPhase("uploading")}let r=await n.ensure();return e.onPhase("checking"),t.submitCheck("face_match",{imageKey:r},{idempotencyKey:i})})}function ye(e){let n={width:e.width,height:e.height};for(let t of Re)e[t]!==void 0&&(n[t]=e[t]);return n}var Re=["engine","facingMode","mode","formFactor","clipMs","clipFrames","fps","clipRetakes","codec","cameraReadyMs","faceAcquireMs","captureMs","screenRamp","provenance"];function ke(e){return e===void 0?{}:{attestationChecks:e.checks,...e.challengeMs!==void 0?{attestationChallengeMs:e.challengeMs}:{}}}function Ce(e){if(e instanceof h)return{kind:"unavailable",reason:"attestation"};if(e instanceof P){if(e.code==="attestation_invalid")return{kind:"unavailable",reason:"attestation"};if(e.code==="inference_unavailable")return{kind:"unavailable",reason:"inference_unavailable"};if(e.code==="mobile_required")return{kind:"unavailable",reason:"mobile_required"};if(fe.has(e.code))return{kind:"resync"}}return{kind:"unavailable",reason:"network"}}var Le="form_answers_invalid",U=class extends Error{constructor(n,t){super(`form answers refused (${n.map(i=>`${i.id}: ${i.code}`).join(", ")})`),this.name="FormAnswersError",this.issues=n,this.source=t}};var B=class extends Error{constructor(n,t){super(`invalid ${n} (${t})`),this.name="InvalidInputError",this.field=n,this.kind=t}},$=class extends Error{constructor(n,t){super(`invalid ${n} (${t})`),this.name="OtpInputError",this.field=n,this.kind=t}};function I(e){return e?.source==="upload"?null:e?.source==="choice"&&e.sourcePick!=="camera"?"upload_or_phone":"phone"}function De(e,n){if(n===void 0||!y(n)||n.requiresMobile!==!0)return null;switch(n.checkType){case"liveness":return"phone";case"face_match":{if(n.reason!==void 0)return"phone";let t=_(e,"portrait_icao");return t?.state==="passed"||t?.state==="review"?null:"phone"}case"doc_ocr":return I(e.documents);case"poa":return I(e.proofOfAddress);case"portrait_icao":{let t=e.portrait;return t?.pendingFix!==void 0||t?.reuse?.pending===!0?null:I(t)}default:return null}}function we(e){let n=e?.capture,t=n?.mode;return t==="assisted"||t==="self"||t==="choice"?t:n?.cameraSwitch===!0?"assisted":"self"}function Be(e){let n=e?.capture?.pick;return we(e)==="choice"&&(n==="self"||n==="assisted")?n:null}function $e(e,n,t=null){return e==="choice"?n??t??"self":e}var ze={"MR:drivers_license":{normalize:"upper_no_space_or_hyphen",pattern:"^[0-9]{8}$",check:null,registrySources:[],describe:"number must be the 8-digit Mauritanian driver's license number"},"MR:national_id":{normalize:"trim",pattern:"^[0-9]{10}$",check:"mr_nni_mod97",registrySources:["MR.anrpts"],describe:"number must be the 10-digit Mauritanian national ID number with a valid check digit"}};export{be as a,ve as b,Pe as c,j as d,f as e,x as f,W as g,Me as h,y as i,T as j,M as k,_ as l,R as m,w as n,Ve as o,Q as p,De as q,we as r,Be as s,$e as t,K as u,oe as v,se as w,ae as x,de as y,ce as z,h as A,E as B,D as C,Fe as D,ye as E,Le as F,U as G,ze as H,B as I,$ as J};