@sekyro/web 0.1.0-rc.21 → 0.1.0-rc.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +12 -11
- package/dist/camera-trait-V4UAOPIQ.js +1 -0
- package/dist/{capture-constraints-B5omafmk.d.cts → capture-constraints-CVqpMNGA.d.cts} +7 -3
- package/dist/{capture-constraints-B5omafmk.d.ts → capture-constraints-CVqpMNGA.d.ts} +7 -3
- package/dist/{capture-session-doc-XBZGXWOP.js → capture-session-doc-YDUKUN3P.js} +1 -1
- package/dist/{capture-session-v3-26FgzBIl.d.cts → capture-session-v3-CkcuPKSD.d.ts} +90 -13
- package/dist/{capture-session-v3-ZO0QOeQH.d.ts → capture-session-v3-TJL-0Muv.d.cts} +90 -13
- package/dist/chunk-2KTSNAVR.js +1 -0
- package/dist/chunk-2LDOXGY3.js +1 -0
- package/dist/chunk-32ELI5BZ.js +1 -0
- package/dist/chunk-7QZWBDI5.js +1 -0
- package/dist/chunk-7XT5YDSC.js +1 -0
- package/dist/chunk-BATJN3VQ.js +1 -0
- package/dist/chunk-CPUECYAJ.js +1 -0
- package/dist/chunk-FSSMUAKC.js +1 -0
- package/dist/{chunk-QYYJLXKA.js → chunk-HYGINGDC.js} +1 -1
- package/dist/chunk-LJYMZQY2.js +1 -0
- package/dist/chunk-PZYVSLPG.js +1 -0
- package/dist/chunk-RALQBQPT.js +1 -0
- package/dist/chunk-SX7TUC3V.js +1 -0
- package/dist/chunk-TJUM65FN.js +1 -0
- package/dist/chunk-TSA6GHUG.js +1 -0
- package/dist/chunk-VWGKUQ3C.js +1 -0
- package/dist/chunk-Z2BIZYZQ.js +1 -0
- package/dist/chunk-Z5D7SZUW.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +1 -1
- package/dist/clip-inspect-DLJXVKV6.js +1 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +1 -1
- package/dist/core/v3/detect-worker.cjs +1 -1
- package/dist/core/v3/detect-worker.d.cts +1 -1
- package/dist/core/v3/detect-worker.d.ts +1 -1
- package/dist/core/v3/detect-worker.js +1 -1
- package/dist/create-document-capture-K6EHRCWN.js +1 -0
- package/dist/create-portrait-capture-5VGYZUOK.js +1 -0
- package/dist/{create-verification-KlHIU4Fy.d.ts → create-verification-DnyHCSu6.d.cts} +175 -80
- package/dist/{create-verification-CXhXxknV.d.cts → create-verification-DoISHOqL.d.ts} +175 -80
- package/dist/{detect-worker-DclNxkZT.d.cts → detect-worker-CHqsPJoM.d.cts} +19 -2
- package/dist/{detect-worker-DclNxkZT.d.ts → detect-worker-CHqsPJoM.d.ts} +19 -2
- package/dist/{icao-gate-DvzOzHq6.d.cts → icao-gate-BFlSZYCZ.d.cts} +1 -1
- package/dist/{icao-gate-DI8VePWd.d.ts → icao-gate-lZ_fHE7k.d.ts} +1 -1
- package/dist/{icao-policy-DztbA50-.d.ts → icao-policy-BOcutYdD.d.ts} +2 -2
- package/dist/{icao-policy-MRB8NMAu.d.cts → icao-policy-JZH0UdmD.d.cts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11 -15
- package/dist/index.d.ts +11 -15
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +49 -34
- package/dist/internal/index.d.ts +49 -34
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-3ZMV7SFQ.js +1 -0
- package/dist/popup/index.cjs +1 -1
- package/dist/popup/index.d.cts +2 -2
- package/dist/popup/index.d.ts +2 -2
- package/dist/popup/index.js +1 -1
- package/dist/{print-AYSCRSZB.js → print-SEWS3VHQ.js} +1 -1
- package/dist/{turnstile-FATNZ4AG.js → turnstile-2J3LUHCG.js} +1 -1
- package/dist/{types-C_XP92JQ.d.cts → types-DwfyBTte.d.cts} +129 -74
- package/dist/{types-C_XP92JQ.d.ts → types-DwfyBTte.d.ts} +129 -74
- package/package.json +1 -1
- package/sbom.cdx.json +10 -10
- package/dist/camera-trait-45MJTW4K.js +0 -1
- package/dist/chunk-234OZEDB.js +0 -1
- package/dist/chunk-7Q4YPMAF.js +0 -1
- package/dist/chunk-B2X33ZW2.js +0 -1
- package/dist/chunk-CQ7SKLMC.js +0 -1
- package/dist/chunk-FUHDOEBP.js +0 -1
- package/dist/chunk-GT2ZLGF7.js +0 -1
- package/dist/chunk-H3HVCWLF.js +0 -1
- package/dist/chunk-O5WKNZ2C.js +0 -1
- package/dist/chunk-OKWG3PVH.js +0 -1
- package/dist/chunk-P3H3D33O.js +0 -1
- package/dist/chunk-P6UP4UQY.js +0 -1
- package/dist/chunk-SNACCYTL.js +0 -1
- package/dist/chunk-TQB3URP2.js +0 -1
- package/dist/chunk-VIAT4DEA.js +0 -1
- package/dist/chunk-ZADZTM3M.js +0 -1
- package/dist/chunk-ZNIZACXD.js +0 -1
- package/dist/create-document-capture-23R2F47A.js +0 -1
- package/dist/create-portrait-capture-AGFHECK7.js +0 -1
- package/dist/plan-runner-NUWONT7F.js +0 -1
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-
|
|
2
|
-
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as
|
|
3
|
-
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
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-
|
|
7
|
-
import '../detect-worker-
|
|
8
|
-
import '../capture-session-v3-
|
|
1
|
+
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-DnyHCSu6.cjs';
|
|
2
|
+
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as LIVE_MRZ_DEFAULTS, cj as LIVE_PHOTO_IDLE_MS, ck as LIVE_PHOTO_MAX_HZ, cl as LandmarkedFace, cm as LandmarkerLike, cn as LensSource, co as LightingStatus, cp as LiveMrzCapture, cq as LiveMrzState, cr as LivePhotoGate, cs as LivePhotoKit, ct as LivePhotoKitInternals, cu as LivePhotoKitOptions, cv as LivePhotoStill, cw as LivenessCaptureInternalHandle, cx as LivenessCaptureInternals, cy as LivenessFlowDeps, cz as LivenessFlowOutcome, cA as MANUAL_SHUTTER_MS, cB as MR_DOC_CATALOG, cC as NO_REPORT_MS, cD as OpenDocCameraDeps, cE as PORTRAIT_JPEG_QUALITY, cF as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cG as PRELOAD_BUDGET_MS, cH as PROCESSING_POLL_DELAY_MS, cI as PROCESSING_POLL_MAX, cJ as PortraitCaptureController, cK as PortraitCaptureInternals, cL as REGISTRY_RETRY_DELAY_MS, cM as ReticleType, cN as SAME_FACE_MAX_DROPS, cO as ScanEvent, cP as ScanLayout, cQ as ScanNotice, cR as ScanPhase, cS as ScanReport, cT as ScanSide, cU as ScanState, cV as SubmitExecutor, cW as TEXT_LOCK_DEFAULTS, cX as TRANSPORT_REPLAY_ATTEMPTS, cY as TRANSPORT_REPLAY_DELAY_MS, cZ as VerificationInternals, c_ as analyzeDocFrame, c$ as analyzeGuide, d0 as aspectBand, d1 as aspectFits, d2 as buildDeviceReadHint, d3 as coverPointToVideo, d4 as createDocumentCaptureInternal, d5 as createFaceLandmarker, d6 as createLivePhotoKit, d7 as createLivenessCaptureInternal, d8 as createPortraitCaptureInternal, d9 as createVerificationInternal, da as docZoomFor, db as encodeDocumentImage, dc as facesOf, dd as feedbackVoteOf, de as focusOk, df as guideQuad, dg as guideRegionInFrame, dh as initialScanState, di as mapEngineState, dj as mapErrorKind, dk as mapGuidanceHint, dl as nextScanState, dm as observePortraitFrame, dn as openDocCamera, dp as passportBandOf, dq as portraitMatchStep, dr as preloadedDetectorFactory, ds as quadAreaFrac, dt as quadBounds, du as quadIou, dv as quadTiltRatio, dw as randomUuid, dx as readStoredLens, dy as resetLivenessAssetsForTests, dz as resolveDocCameraTuning, dA as resolveDocShutterTuning, dB as resolveGuideLockTuning, dC as runLivenessFlow, dD as runSubmission, dE as scannerFormatFor, dF as setPreloadLoaderForTests, dG as settledHint, dH as singleShotFocusAt, dI as specularFraction, dJ as supportsFocusMode, dK as warmDocDetector, dL as writeStoredLens } from '../create-verification-DnyHCSu6.cjs';
|
|
3
|
+
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-CVqpMNGA.cjs';
|
|
4
|
+
import { S as HostedSessionView, h as CheckType, am as PlanStepView } from '../types-DwfyBTte.cjs';
|
|
5
|
+
export { aY as ICAO_FALLBACK, aS as IcaoCaptureTuning, aZ as IcaoProfile, a_ as ResolvedIcaoTuning, a$ as resolveIcaoTuning } from '../types-DwfyBTte.cjs';
|
|
6
|
+
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-BFlSZYCZ.cjs';
|
|
7
|
+
import '../detect-worker-CHqsPJoM.cjs';
|
|
8
|
+
import '../capture-session-v3-TJL-0Muv.cjs';
|
|
9
|
+
|
|
10
|
+
/** At most this many ranked lenses are tried (each costs a camera reopen). */
|
|
11
|
+
declare const LENS_TRY_MAX = 3;
|
|
12
|
+
type LensKind = "main" | "virtual" | "ultra" | "tele" | "depth" | "front" | "unknown";
|
|
13
|
+
/** What a camera label says about its lens (labels are English on Android Chrome / iOS Safari). */
|
|
14
|
+
declare function lensKindOf(label: string): LensKind;
|
|
15
|
+
/**
|
|
16
|
+
* Back cameras best-first: main wide lenses (lowest Android index first), then
|
|
17
|
+
* iOS virtual multi-lens devices; ultra-wide, telephoto, depth and front lenses
|
|
18
|
+
* are dropped. Empty when nothing is identifiable (keep the browser's pick).
|
|
19
|
+
*/
|
|
20
|
+
declare function rankBackCameras(devices: ReadonlyArray<{
|
|
21
|
+
deviceId: string;
|
|
22
|
+
label: string;
|
|
23
|
+
kind?: string;
|
|
24
|
+
}>): string[];
|
|
9
25
|
|
|
10
26
|
type DocumentTypeId = DocCatalogEntry["docType"];
|
|
11
27
|
/** Same shape as the hosted view's `acceptedDocuments`. */
|
|
@@ -315,13 +331,6 @@ interface StepRunner {
|
|
|
315
331
|
}
|
|
316
332
|
declare function createStepRunner(deps: RunnerDeps): StepRunner;
|
|
317
333
|
|
|
318
|
-
/**
|
|
319
|
-
* Reasons the backend parks at `input_required` while attempts remain
|
|
320
|
-
* (identity-backend/src/checks/check-reasons.ts isRetryable tables — the single
|
|
321
|
-
* source of truth; identity-hosted/lib/reason-copy.ts mirrors the same rows).
|
|
322
|
-
* Each renamed reason is listed under both its names (person data spec Appendix A.2).
|
|
323
|
-
*/
|
|
324
|
-
declare const RETRYABLE_REASONS: ReadonlySet<CheckReason>;
|
|
325
334
|
/** A check the browser may still submit. */
|
|
326
335
|
declare function isExecutable(step: Pick<PlanStepView, "state"> | undefined): boolean;
|
|
327
336
|
/** The session accepts no further submissions. */
|
|
@@ -331,17 +340,18 @@ declare function frontierStep(view: HostedSessionView): PlanStepView | undefined
|
|
|
331
340
|
/** The first plan step of a check type (a step-up lists two `face_match` nodes: see {@link matchAfterLiveness}). */
|
|
332
341
|
declare function stepOf(view: HostedSessionView, checkType: CheckType): PlanStepView | undefined;
|
|
333
342
|
/**
|
|
334
|
-
* Map the session view to the public result:
|
|
335
|
-
* - `
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
* - in flight
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
* `
|
|
344
|
-
*
|
|
343
|
+
* Map the session view to the public result (session outcome model §5.1):
|
|
344
|
+
* - `verified` → `verified`; `review_pending` → `review` (the reviewed step's code);
|
|
345
|
+
* - `not_verified` → `not_verified` with the view's `reason` and `reasonCode` (and
|
|
346
|
+
* `retryAfter` on a device cooldown); a status this version does not know is
|
|
347
|
+
* `not_verified` without a reason, never `review`;
|
|
348
|
+
* - in flight, on the last step's `result`: a biometric step parked at `input_required`
|
|
349
|
+
* with tries left → `retry` when `autoRetry` is on (a step whose result is
|
|
350
|
+
* `unavailable` → `unavailable`: the service could not run it, `mobile_required` →
|
|
351
|
+
* `unavailable`: only a phone can capture it); with `autoRetry` off or no try left the
|
|
352
|
+
* capture was refused → `not_verified` with the reason its result gives; a step in
|
|
353
|
+
* `review` with nothing executable left → `review`; otherwise `unavailable` (a
|
|
354
|
+
* non-biometric frontier the SDK cannot drive, or still processing).
|
|
345
355
|
*/
|
|
346
356
|
declare function mapSessionResult(view: HostedSessionView, opts: ResultOptions): VerificationResult;
|
|
347
357
|
/**
|
|
@@ -356,8 +366,12 @@ interface ResultOptions {
|
|
|
356
366
|
}
|
|
357
367
|
|
|
358
368
|
declare const TURNSTILE_SCRIPT_SRC = "https://challenges.cloudflare.com/turnstile/v0/api.js";
|
|
359
|
-
/**
|
|
360
|
-
|
|
369
|
+
/**
|
|
370
|
+
* Bound on a single execute round-trip (challenge fetch + solve). A healthy
|
|
371
|
+
* invisible challenge settles in a few seconds; a stalled one is retried once by
|
|
372
|
+
* the liveness submission, so a stall costs about this long, not a full minute.
|
|
373
|
+
*/
|
|
374
|
+
declare const TURNSTILE_EXECUTE_TIMEOUT_MS = 10000;
|
|
361
375
|
interface TurnstileRenderParams {
|
|
362
376
|
sitekey: string;
|
|
363
377
|
callback: (token: string) => void;
|
|
@@ -369,9 +383,10 @@ interface TurnstileRenderParams {
|
|
|
369
383
|
interface TurnstileApi {
|
|
370
384
|
render(container: HTMLElement, params: TurnstileRenderParams): string | undefined;
|
|
371
385
|
execute(widgetId: string): void;
|
|
386
|
+
reset(widgetId: string): void;
|
|
372
387
|
remove(widgetId: string): void;
|
|
373
388
|
}
|
|
374
|
-
/** Test-only: reset the module
|
|
389
|
+
/** Test-only: reset the module singletons between cases. */
|
|
375
390
|
declare function resetTurnstileForTests(): void;
|
|
376
391
|
/** Load the Turnstile script once (singleton; a load failure resets it so a
|
|
377
392
|
* retry can re-attempt). */
|
|
@@ -388,10 +403,10 @@ interface ExecuteTurnstileOptions {
|
|
|
388
403
|
signal?: AbortSignal;
|
|
389
404
|
}
|
|
390
405
|
/**
|
|
391
|
-
* Run one invisible execute-mode challenge and resolve its
|
|
392
|
-
* challenge error, on `signal` abort, or after
|
|
393
|
-
* — the verification maps a failure to
|
|
394
|
-
* reason:'attestation'}` after one retry.
|
|
406
|
+
* Run one invisible execute-mode challenge on the kept widget and resolve its
|
|
407
|
+
* token. Rejects on challenge error, on `signal` abort, or after
|
|
408
|
+
* {@link TURNSTILE_EXECUTE_TIMEOUT_MS} — the verification maps a failure to
|
|
409
|
+
* `result {status:'unavailable', reason:'attestation'}` after one retry.
|
|
395
410
|
*/
|
|
396
411
|
declare function executeTurnstile(siteKey: string, opts?: ExecuteTurnstileOptions): Promise<string>;
|
|
397
412
|
|
|
@@ -473,4 +488,4 @@ declare function measureRegionSharpness(image: RawImage, region: StillRegion | n
|
|
|
473
488
|
*/
|
|
474
489
|
declare function measureBitmapSharpness(bitmap: ImageBitmap, region: StillRegion | null): number;
|
|
475
490
|
|
|
476
|
-
export { type AcceptedDocumentsLike, type BrowserFamily, DOCUMENT_TYPE_ORDER, DocAssistReport, DocCatalogEntry, type DocumentTypeId, type ExecuteTurnstileOptions, HostedClientLike, LiveMrzTuning, type LiveMrzWireReport, LoadFailure, MRZ_BAND_DEFAULTS, type MrzBand, type MrzBandThresholds, OCR_ASSET_SET, OTP_RESEND_COOLDOWN_MS, OcrEngineClient, PROCESSING_BACKOFF_MS, REGION_PAD,
|
|
491
|
+
export { type AcceptedDocumentsLike, type BrowserFamily, DOCUMENT_TYPE_ORDER, DocAssistReport, DocCatalogEntry, type DocumentTypeId, type ExecuteTurnstileOptions, HostedClientLike, LENS_TRY_MAX, type LensKind, LiveMrzTuning, type LiveMrzWireReport, LoadFailure, MRZ_BAND_DEFAULTS, type MrzBand, type MrzBandThresholds, OCR_ASSET_SET, OTP_RESEND_COOLDOWN_MS, OcrEngineClient, PROCESSING_BACKOFF_MS, REGION_PAD, ReadyInfo, type RunnerDeps, SHARPNESS_LONG_EDGE, type StepRunner, type StillRegion, SubmitRuntime, TURNSTILE_EXECUTE_TIMEOUT_MS, TURNSTILE_SCRIPT_SRC, TextLockTuning, type TurnstileApi, type TurnstileRenderParams, WEB_OCR_ENGINE, type WebOcrPlan, type WebOcrStart, acceptedIssuers, acceptedTypesFor, browserFamily, classifyCardSide, classifyCardSideWith, createStepRunner, cropImage, detectMrzBand, executeTurnstile, flagOf, formatMismatch, frontierStep, isExecutable, isTerminalView, lensKindOf, liveMrzWireReport, loadTurnstile, mapSessionResult, measureBitmapSharpness, measureRegionSharpness, photoSharpness, rankBackCameras, resetTurnstileForTests, resizeLongEdge, resolveAcceptedDocuments, resolveWebOcrPlan, startWebOcr, stepOf, stillRegionOf, stillToImageData };
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-
|
|
2
|
-
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as
|
|
3
|
-
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
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-
|
|
7
|
-
import '../detect-worker-
|
|
8
|
-
import '../capture-session-v3-
|
|
1
|
+
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-DoISHOqL.js';
|
|
2
|
+
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as LIVE_MRZ_DEFAULTS, cj as LIVE_PHOTO_IDLE_MS, ck as LIVE_PHOTO_MAX_HZ, cl as LandmarkedFace, cm as LandmarkerLike, cn as LensSource, co as LightingStatus, cp as LiveMrzCapture, cq as LiveMrzState, cr as LivePhotoGate, cs as LivePhotoKit, ct as LivePhotoKitInternals, cu as LivePhotoKitOptions, cv as LivePhotoStill, cw as LivenessCaptureInternalHandle, cx as LivenessCaptureInternals, cy as LivenessFlowDeps, cz as LivenessFlowOutcome, cA as MANUAL_SHUTTER_MS, cB as MR_DOC_CATALOG, cC as NO_REPORT_MS, cD as OpenDocCameraDeps, cE as PORTRAIT_JPEG_QUALITY, cF as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cG as PRELOAD_BUDGET_MS, cH as PROCESSING_POLL_DELAY_MS, cI as PROCESSING_POLL_MAX, cJ as PortraitCaptureController, cK as PortraitCaptureInternals, cL as REGISTRY_RETRY_DELAY_MS, cM as ReticleType, cN as SAME_FACE_MAX_DROPS, cO as ScanEvent, cP as ScanLayout, cQ as ScanNotice, cR as ScanPhase, cS as ScanReport, cT as ScanSide, cU as ScanState, cV as SubmitExecutor, cW as TEXT_LOCK_DEFAULTS, cX as TRANSPORT_REPLAY_ATTEMPTS, cY as TRANSPORT_REPLAY_DELAY_MS, cZ as VerificationInternals, c_ as analyzeDocFrame, c$ as analyzeGuide, d0 as aspectBand, d1 as aspectFits, d2 as buildDeviceReadHint, d3 as coverPointToVideo, d4 as createDocumentCaptureInternal, d5 as createFaceLandmarker, d6 as createLivePhotoKit, d7 as createLivenessCaptureInternal, d8 as createPortraitCaptureInternal, d9 as createVerificationInternal, da as docZoomFor, db as encodeDocumentImage, dc as facesOf, dd as feedbackVoteOf, de as focusOk, df as guideQuad, dg as guideRegionInFrame, dh as initialScanState, di as mapEngineState, dj as mapErrorKind, dk as mapGuidanceHint, dl as nextScanState, dm as observePortraitFrame, dn as openDocCamera, dp as passportBandOf, dq as portraitMatchStep, dr as preloadedDetectorFactory, ds as quadAreaFrac, dt as quadBounds, du as quadIou, dv as quadTiltRatio, dw as randomUuid, dx as readStoredLens, dy as resetLivenessAssetsForTests, dz as resolveDocCameraTuning, dA as resolveDocShutterTuning, dB as resolveGuideLockTuning, dC as runLivenessFlow, dD as runSubmission, dE as scannerFormatFor, dF as setPreloadLoaderForTests, dG as settledHint, dH as singleShotFocusAt, dI as specularFraction, dJ as supportsFocusMode, dK as warmDocDetector, dL as writeStoredLens } from '../create-verification-DoISHOqL.js';
|
|
3
|
+
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-CVqpMNGA.js';
|
|
4
|
+
import { S as HostedSessionView, h as CheckType, am as PlanStepView } from '../types-DwfyBTte.js';
|
|
5
|
+
export { aY as ICAO_FALLBACK, aS as IcaoCaptureTuning, aZ as IcaoProfile, a_ as ResolvedIcaoTuning, a$ as resolveIcaoTuning } from '../types-DwfyBTte.js';
|
|
6
|
+
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-lZ_fHE7k.js';
|
|
7
|
+
import '../detect-worker-CHqsPJoM.js';
|
|
8
|
+
import '../capture-session-v3-CkcuPKSD.js';
|
|
9
|
+
|
|
10
|
+
/** At most this many ranked lenses are tried (each costs a camera reopen). */
|
|
11
|
+
declare const LENS_TRY_MAX = 3;
|
|
12
|
+
type LensKind = "main" | "virtual" | "ultra" | "tele" | "depth" | "front" | "unknown";
|
|
13
|
+
/** What a camera label says about its lens (labels are English on Android Chrome / iOS Safari). */
|
|
14
|
+
declare function lensKindOf(label: string): LensKind;
|
|
15
|
+
/**
|
|
16
|
+
* Back cameras best-first: main wide lenses (lowest Android index first), then
|
|
17
|
+
* iOS virtual multi-lens devices; ultra-wide, telephoto, depth and front lenses
|
|
18
|
+
* are dropped. Empty when nothing is identifiable (keep the browser's pick).
|
|
19
|
+
*/
|
|
20
|
+
declare function rankBackCameras(devices: ReadonlyArray<{
|
|
21
|
+
deviceId: string;
|
|
22
|
+
label: string;
|
|
23
|
+
kind?: string;
|
|
24
|
+
}>): string[];
|
|
9
25
|
|
|
10
26
|
type DocumentTypeId = DocCatalogEntry["docType"];
|
|
11
27
|
/** Same shape as the hosted view's `acceptedDocuments`. */
|
|
@@ -315,13 +331,6 @@ interface StepRunner {
|
|
|
315
331
|
}
|
|
316
332
|
declare function createStepRunner(deps: RunnerDeps): StepRunner;
|
|
317
333
|
|
|
318
|
-
/**
|
|
319
|
-
* Reasons the backend parks at `input_required` while attempts remain
|
|
320
|
-
* (identity-backend/src/checks/check-reasons.ts isRetryable tables — the single
|
|
321
|
-
* source of truth; identity-hosted/lib/reason-copy.ts mirrors the same rows).
|
|
322
|
-
* Each renamed reason is listed under both its names (person data spec Appendix A.2).
|
|
323
|
-
*/
|
|
324
|
-
declare const RETRYABLE_REASONS: ReadonlySet<CheckReason>;
|
|
325
334
|
/** A check the browser may still submit. */
|
|
326
335
|
declare function isExecutable(step: Pick<PlanStepView, "state"> | undefined): boolean;
|
|
327
336
|
/** The session accepts no further submissions. */
|
|
@@ -331,17 +340,18 @@ declare function frontierStep(view: HostedSessionView): PlanStepView | undefined
|
|
|
331
340
|
/** The first plan step of a check type (a step-up lists two `face_match` nodes: see {@link matchAfterLiveness}). */
|
|
332
341
|
declare function stepOf(view: HostedSessionView, checkType: CheckType): PlanStepView | undefined;
|
|
333
342
|
/**
|
|
334
|
-
* Map the session view to the public result:
|
|
335
|
-
* - `
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
* - in flight
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
* `
|
|
344
|
-
*
|
|
343
|
+
* Map the session view to the public result (session outcome model §5.1):
|
|
344
|
+
* - `verified` → `verified`; `review_pending` → `review` (the reviewed step's code);
|
|
345
|
+
* - `not_verified` → `not_verified` with the view's `reason` and `reasonCode` (and
|
|
346
|
+
* `retryAfter` on a device cooldown); a status this version does not know is
|
|
347
|
+
* `not_verified` without a reason, never `review`;
|
|
348
|
+
* - in flight, on the last step's `result`: a biometric step parked at `input_required`
|
|
349
|
+
* with tries left → `retry` when `autoRetry` is on (a step whose result is
|
|
350
|
+
* `unavailable` → `unavailable`: the service could not run it, `mobile_required` →
|
|
351
|
+
* `unavailable`: only a phone can capture it); with `autoRetry` off or no try left the
|
|
352
|
+
* capture was refused → `not_verified` with the reason its result gives; a step in
|
|
353
|
+
* `review` with nothing executable left → `review`; otherwise `unavailable` (a
|
|
354
|
+
* non-biometric frontier the SDK cannot drive, or still processing).
|
|
345
355
|
*/
|
|
346
356
|
declare function mapSessionResult(view: HostedSessionView, opts: ResultOptions): VerificationResult;
|
|
347
357
|
/**
|
|
@@ -356,8 +366,12 @@ interface ResultOptions {
|
|
|
356
366
|
}
|
|
357
367
|
|
|
358
368
|
declare const TURNSTILE_SCRIPT_SRC = "https://challenges.cloudflare.com/turnstile/v0/api.js";
|
|
359
|
-
/**
|
|
360
|
-
|
|
369
|
+
/**
|
|
370
|
+
* Bound on a single execute round-trip (challenge fetch + solve). A healthy
|
|
371
|
+
* invisible challenge settles in a few seconds; a stalled one is retried once by
|
|
372
|
+
* the liveness submission, so a stall costs about this long, not a full minute.
|
|
373
|
+
*/
|
|
374
|
+
declare const TURNSTILE_EXECUTE_TIMEOUT_MS = 10000;
|
|
361
375
|
interface TurnstileRenderParams {
|
|
362
376
|
sitekey: string;
|
|
363
377
|
callback: (token: string) => void;
|
|
@@ -369,9 +383,10 @@ interface TurnstileRenderParams {
|
|
|
369
383
|
interface TurnstileApi {
|
|
370
384
|
render(container: HTMLElement, params: TurnstileRenderParams): string | undefined;
|
|
371
385
|
execute(widgetId: string): void;
|
|
386
|
+
reset(widgetId: string): void;
|
|
372
387
|
remove(widgetId: string): void;
|
|
373
388
|
}
|
|
374
|
-
/** Test-only: reset the module
|
|
389
|
+
/** Test-only: reset the module singletons between cases. */
|
|
375
390
|
declare function resetTurnstileForTests(): void;
|
|
376
391
|
/** Load the Turnstile script once (singleton; a load failure resets it so a
|
|
377
392
|
* retry can re-attempt). */
|
|
@@ -388,10 +403,10 @@ interface ExecuteTurnstileOptions {
|
|
|
388
403
|
signal?: AbortSignal;
|
|
389
404
|
}
|
|
390
405
|
/**
|
|
391
|
-
* Run one invisible execute-mode challenge and resolve its
|
|
392
|
-
* challenge error, on `signal` abort, or after
|
|
393
|
-
* — the verification maps a failure to
|
|
394
|
-
* reason:'attestation'}` after one retry.
|
|
406
|
+
* Run one invisible execute-mode challenge on the kept widget and resolve its
|
|
407
|
+
* token. Rejects on challenge error, on `signal` abort, or after
|
|
408
|
+
* {@link TURNSTILE_EXECUTE_TIMEOUT_MS} — the verification maps a failure to
|
|
409
|
+
* `result {status:'unavailable', reason:'attestation'}` after one retry.
|
|
395
410
|
*/
|
|
396
411
|
declare function executeTurnstile(siteKey: string, opts?: ExecuteTurnstileOptions): Promise<string>;
|
|
397
412
|
|
|
@@ -473,4 +488,4 @@ declare function measureRegionSharpness(image: RawImage, region: StillRegion | n
|
|
|
473
488
|
*/
|
|
474
489
|
declare function measureBitmapSharpness(bitmap: ImageBitmap, region: StillRegion | null): number;
|
|
475
490
|
|
|
476
|
-
export { type AcceptedDocumentsLike, type BrowserFamily, DOCUMENT_TYPE_ORDER, DocAssistReport, DocCatalogEntry, type DocumentTypeId, type ExecuteTurnstileOptions, HostedClientLike, LiveMrzTuning, type LiveMrzWireReport, LoadFailure, MRZ_BAND_DEFAULTS, type MrzBand, type MrzBandThresholds, OCR_ASSET_SET, OTP_RESEND_COOLDOWN_MS, OcrEngineClient, PROCESSING_BACKOFF_MS, REGION_PAD,
|
|
491
|
+
export { type AcceptedDocumentsLike, type BrowserFamily, DOCUMENT_TYPE_ORDER, DocAssistReport, DocCatalogEntry, type DocumentTypeId, type ExecuteTurnstileOptions, HostedClientLike, LENS_TRY_MAX, type LensKind, LiveMrzTuning, type LiveMrzWireReport, LoadFailure, MRZ_BAND_DEFAULTS, type MrzBand, type MrzBandThresholds, OCR_ASSET_SET, OTP_RESEND_COOLDOWN_MS, OcrEngineClient, PROCESSING_BACKOFF_MS, REGION_PAD, ReadyInfo, type RunnerDeps, SHARPNESS_LONG_EDGE, type StepRunner, type StillRegion, SubmitRuntime, TURNSTILE_EXECUTE_TIMEOUT_MS, TURNSTILE_SCRIPT_SRC, TextLockTuning, type TurnstileApi, type TurnstileRenderParams, WEB_OCR_ENGINE, type WebOcrPlan, type WebOcrStart, acceptedIssuers, acceptedTypesFor, browserFamily, classifyCardSide, classifyCardSideWith, createStepRunner, cropImage, detectMrzBand, executeTurnstile, flagOf, formatMismatch, frontierStep, isExecutable, isTerminalView, lensKindOf, liveMrzWireReport, loadTurnstile, mapSessionResult, measureBitmapSharpness, measureRegionSharpness, photoSharpness, rankBackCameras, resetTurnstileForTests, resizeLongEdge, resolveAcceptedDocuments, resolveWebOcrPlan, startWebOcr, stepOf, stillRegionOf, stillToImageData };
|
package/dist/internal/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as me,d as _e,e as Le,h as Te,i as Re,j as Se}from"../chunk-TJUM65FN.js";import{a as W,b as ve,c as ge,d as be,e as Ge,f as he,g as Ue,h as Ye,i as He,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-HYGINGDC.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 ae,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 bt,f as Gt,g as ht,h as Ut,i as Yt,j as Ht,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 ie}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import"../chunk-GI3UFGRQ.js";import{a as D,b as d,c as M,d as F,e as N}from"../chunk-Z2BIZYZQ.js";import{A as ut,B as It,C as Ot,D as xt,E as At,F as Ct,G as Pt,H as Dt,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 it,m as nt,n as at,o as st,p as Et,q as mt,r as _t,s as Lt,t as Tt,u as Rt,v as St,w as ct,x as lt,y as yt,z as ft}from"../chunk-Z5D7SZUW.js";import{a as v,b as g,c as b,d as G,e as h,f as U,g as Y,h as H,i as z,j as B,l as V}from"../chunk-G6LKLN4U.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-MXWLCDFX.js";import{a as Pe,b as De,c as de,d as Me,e as Fe,f as Ne}from"../chunk-TDLIXFDT.js";import{b as le,c as ye,d as fe,e as ue,g as Ie,h as er,i as tr,j as rr,k as or,l as pr,m as ir,s as Oe}from"../chunk-32ELI5BZ.js";import{A as C,B as P,i as R,j as S,k as c,l,o as y,u as f,v as u,w as I,x as O,y as x,z as A}from"../chunk-PZYVSLPG.js";import{a as i,b as n,c as a,d as s,i as E,j as m,k as _,l as L,n as T}from"../chunk-RALQBQPT.js";import"../chunk-7QZWBDI5.js";import"../chunk-7XT5YDSC.js";import"../chunk-SX7TUC3V.js";import"../chunk-POIQGEZM.js";import{p as xe,q as Ae,r as Ce}from"../chunk-CPUECYAJ.js";import"../chunk-FPXL63KZ.js";import"../chunk-2KTSNAVR.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-TSA6GHUG.js";import"../chunk-BATJN3VQ.js";import"../chunk-FSSMUAKC.js";import{a as ce}from"../chunk-DFTCAWMP.js";import"../chunk-DK5YPBDQ.js";export{ne as ANALYSIS_LONG_EDGE,Pe as ASPECT_BANDS,A as AttestationError,Ue as BLUR_REFUSE_SHARPNESS_MAX,Mt as CAPTURE_CANDIDATE_SPACING_MS,dt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,f as CLIP_MIME_ALLOWLIST,Pt as CaptureSessionDoc,tr as DOCUMENT_TYPE_ORDER,je as DOC_ANALYSIS_DEFAULTS,It as DOC_BLACK_FRAME_LUMA,Ot as DOC_BLACK_FRAME_TICKS,xt as DOC_CADENCE_HZ,tt as DOC_CAMERA_TUNING_DEFAULTS,Fe as DOC_CATALOG,Be as DOC_DETECT_WIDTH,Ke as DOC_FEEDBACK_STATES,ut as DOC_FIRST_FRAME_MS,Ve as DOC_GATE_V1_DEFAULTS,At 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,be as FLIP_TIMEOUT_MS,ct as GUIDE_LOCK_DEFAULTS,yt as GuideLock,gt as ICAO_CANVAS,wt as ICAO_FALLBACK,Ut 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,Me as MR_DOC_CATALOG,he as NO_REPORT_MS,ce as OCR_ASSET_SET,Re as OTP_RESEND_COOLDOWN_MS,ae as PORTRAIT_JPEG_QUALITY,i as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,Te as PROCESSING_BACKOFF_MS,ye as PROCESSING_POLL_DELAY_MS,fe as PROCESSING_POLL_MAX,b as REGION_PAD,le as REGISTRY_RETRY_DELAY_MS,te as SAME_FACE_MAX_DROPS,v as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,u as TRANSPORT_REPLAY_ATTEMPTS,I as TRANSPORT_REPLAY_DELAY_MS,d as TURNSTILE_EXECUTE_TIMEOUT_MS,D as TURNSTILE_SCRIPT_SRC,J as WEB_OCR_ENGINE,or as acceptedIssuers,rr as acceptedTypesFor,et as analyzeDocFrame,Rt as analyzeGuide,De 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,ie as createFaceLandmarker,Kt as createIcaoGate,Le as createLivePhotoKit,T as createLivenessCaptureInternal,Ee as createPortraitCaptureInternal,Se as createStepRunner,Ie as createVerificationInternal,h as cropImage,e as detectFormFactor,t as detectIsMobile,ke as detectMrzBand,Et as docZoomFor,W as encodeDocumentImage,N as executeTurnstile,vt as eyeLineRoll,Ht as eyeOpenness,Qt as eyeSpecular,Ft as faceGeometry,Jt as faceLighting,qt as faceSharpness,pe as facesOf,we as feedbackVoteOf,ir as flagOf,mt as focusOk,ee as formatMismatch,c as frontierStep,St as guideQuad,Tt as guideRegionInFrame,$t as icaoPixelStats,bt as icaoWindow,Ye as initialScanState,R as isExecutable,S as isTerminalView,Yt as judgeIcao,Ae as lensKindOf,$ as liveMrzWireReport,F as loadTurnstile,Xt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,y as mapSessionResult,H as measureBitmapSharpness,Y as measureRegionSharpness,He as nextScanState,se as observePortraitFrame,_t as openDocCamera,Dt as passportBandOf,Wt as percentile,g as photoSharpness,ht as portraitCropRegion,Oe as portraitMatchStep,Nt as poseFromMatrix,E as preloadedDetectorFactory,Xe as quadAreaFrac,Je as quadBounds,Ze as quadIou,$e as quadTiltRatio,ue as randomUuid,Ce as rankBackCameras,pt as readStoredLens,Zt as regionStats,s as resetLivenessAssetsForTests,M as resetTurnstileForTests,U as resizeLongEdge,pr as resolveAcceptedDocuments,rt as resolveDocCameraTuning,Ct as resolveDocShutterTuning,lt as resolveGuideLockTuning,zt as resolveIcaoTuning,Q as resolveWebOcrPlan,P as runLivenessFlow,C as runSubmission,Ne as scannerFormatFor,kt as scoreFrame,a as setPreloadLoaderForTests,Z as settledHint,at as singleShotFocusAt,qe as specularFraction,j as startWebOcr,l as stepOf,G as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ft as warmDocDetector,Gt as windowOverflow,it as writeStoredLens};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as Z}from"./chunk-A3FUGHAH.js";import{a as Q,b as J,e as X,f as E,g as R,j as Y}from"./chunk-TJUM65FN.js";import{x as $}from"./chunk-HYGINGDC.js";import{n as W}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 N,i as z,x as K}from"./chunk-Z5D7SZUW.js";import"./chunk-G6LKLN4U.js";import"./chunk-SMKCBUJL.js";import"./chunk-MXWLCDFX.js";import"./chunk-TDLIXFDT.js";import{b as O,c as B,q as G,s as j,t as F}from"./chunk-PZYVSLPG.js";import"./chunk-RALQBQPT.js";import"./chunk-7QZWBDI5.js";import"./chunk-7XT5YDSC.js";import"./chunk-SX7TUC3V.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import{c as C,i as q}from"./chunk-2KTSNAVR.js";import"./chunk-TSA6GHUG.js";import{a as H}from"./chunk-BATJN3VQ.js";import"./chunk-FSSMUAKC.js";import"./chunk-DFTCAWMP.js";import"./chunk-DK5YPBDQ.js";var re=2e4,oe=new Set(["media_type_unsupported","media_type_mismatch"]),ee=new Set(["document_upload_not_allowed","portrait_source_not_allowed","uploaded_media_not_allowed"]);function te(e){let c=null,m=Promise.resolve(),d=!1,w=null,M=null,h=!1,D=null,g=!1,_=!1,k=()=>{c?.controller.handle.destroy(),c=null},v=()=>{let t=e.currentView(),r=t===null?null:R(t,{isMobile:e.isMobile()});return r?.kind==="portrait"?r:null},S=()=>{if(e.destroyed())return"self";let t=e.currentView(),r=t===null?void 0:E(t);return r==="self"||r==="assisted"?r:r==="choice"&&e.captureModeSwitch!==void 0?e.captureModeSwitch.pick()??"self":e.cameraMode?.()??j(r??G(t),null)},I=e.captureModeSwitch,x=I===void 0?void 0:{session:()=>{let t=e.currentView();return t!==null&&E(t)==="choice"?"choice":S()},onModeChange:t=>I.choose(t)},T=async(t,r)=>{if(e.destroyed())return;let u=S();r.setFlowState("uploading"),d=!1;let n=null;try{await e.runner().submit("portrait_icao",async(s,y)=>{if(n===null){let f=await F(s,"image","image/jpeg",t.image.size,{engine:"portrait"});await s.uploadToSpaces(f.uploadUrl,t.image,"image/jpeg"),n=(await s.completeMedia(f.key)).key}r.setFlowState("checking");let b={media:{portrait:n},gate:q(t.gate),...t.tuningVersion!==void 0?{tuningVersion:t.tuningVersion}:{},source:"camera",capture:{mode:u,facingMode:t.facingMode}};return s.submitCheck("portrait_icao",b,{idempotencyKey:y})})}catch(s){d=!0,s instanceof C&&ee.has(s.code)&&await e.refreshView?.().catch(()=>{})}if(r.setFlowState("done"),e.destroyed())return;let o=v();(o===null||o.phase!=="capture")&&c?.controller===r&&k(),e.runner().republish()},L=t=>e.runner().submit("face_match",(r,u)=>r.submitCheck("face_match",e.runner().faceProbeSkipped()?{simulatedCapture:!0}:{},{idempotencyKey:u})).then(()=>{},()=>{d=!0,t()}),P=null,V=async t=>{let r=v();if(r===null||r.phase!=="capture"||!r.photo.uploadOffered)throw new RangeError("upload_not_offered");let{prepareUploadFile:u}=await import("./upload-file-UYXOHCRG.js"),n=await u(t,e.uploadInternals);if(e.destroyed())return;k(),d=!1;let o=null;try{await e.runner().submit("portrait_icao",async(s,y)=>{if(o===null){let f=await s.presign("image",n.contentType,n.blob.size,{source:"upload"});await s.uploadToSpaces(f.uploadUrl,n.blob,n.contentType),o=(await s.completeMedia(f.key)).key}let b={media:{portrait:o},source:"upload"};return s.submitCheck("portrait_icao",b,{idempotencyKey:y})})}catch(s){throw s instanceof C&&oe.has(s.code)?new TypeError("unsupported_file"):(s instanceof C&&ee.has(s.code)&&await e.refreshView?.().catch(()=>{}),s)}},i=null,l=t=>{if(i!==null)return i;let r=v();if(r===null||r.phase!=="review")return Promise.reject(new RangeError("no_pending_fix"));let u={fixReview:{accept:t}},n=e.runner().submit("portrait_icao",(o,s)=>o.submitCheck("portrait_icao",u,{idempotencyKey:s})).catch(async o=>{throw o instanceof C&&o.code==="portrait_no_pending_fix"&&await e.refreshView?.().catch(()=>{}),o}).finally(()=>{i=null});return i=n,n},a=t=>{let r=()=>V(t),u=(P===null?r():P.then(r,r)).finally(()=>{P===u&&(P=null)});return P=u,u};return{bind:(t,r)=>{if(t.phase==="review")return k(),{...t,uploadFailed:d,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("the adjusted photo waits for confirmFix()")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:l};if(t.phase==="match")return k(),w!==t.attemptsRemaining&&!d&&(w=t.attemptsRemaining,L(r)),{...t,uploadFailed:d,resubmit:()=>(d=!1,w=t.attemptsRemaining,r(),L(r)),capture:()=>{throw new Error("the portrait was already accepted")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:l};if(w=null,t.reuse===!0&&t.phase==="capture")return k(),!g&&D!==t.attemptsRemaining&&(D=t.attemptsRemaining,g=!0,e.runner().submit("portrait_icao",(n,o)=>n.submitCheck("portrait_icao",{},{idempotencyKey:o})).then(()=>{_=!1},()=>{_=!0}).finally(()=>{g=!1,r()})),{kind:"processing",key:"processing",context:t.context,section:t.section,stalled:_&&!g,refresh:()=>(_=!1,D=null,r(),Promise.resolve())};let u=e.keptPortraitInput?.()??null;return u!==null&&(h||u!==M&&t.report===null&&t.reason===void 0&&!t.retakeOnly)?(h||(M=u,h=!0,e.runner().submit("portrait_icao",(n,o)=>n.submitCheck("portrait_icao",u,{idempotencyKey:o})).catch(()=>{}).finally(()=>{h=!1,r()})),{kind:"processing",key:"processing",context:t.context,section:t.section,stalled:!1,refresh:()=>Promise.resolve()}):{...t,uploadFailed:d,resubmit:()=>Promise.resolve(),capture:n=>{if(c!==null&&c.video===n.video)return c.controller.handle;k(),d=!1;let o=W({video:n.video,tuning:t.tuning,tuningVersion:t.tuningVersion,...t.icao!=null?{policy:t.icao.policy}:{},...n.keepScreenAwake!==void 0?{keepScreenAwake:n.keepScreenAwake}:{},...n.assetBaseUrl!==void 0?{assetBaseUrl:n.assetBaseUrl}:{}},e.internals,S,x);c={video:n.video,controller:o};let s=o.handle.destroy;o.handle.destroy=()=>{c?.controller===o&&(c=null),s()},o.handle.on("error",f=>{e.reportCaptureIssue?.(O("portrait",f,0))});let y=!1,b=(f,U)=>{let A=o.gateScores();A!==null&&e.reportGate?.({kind:"portrait_gate",platform:"web",outcome:f,...U!==null?{failing:U}:{},...A})};return o.handle.on("gate",f=>{!y&&!f.ready&&(o.gateScores()?.elapsedMs??0)>=re&&(y=!0,b("stuck",f.failing))}),o.handle.on("captured",f=>{b("captured",null),y=!1,m=m.then(()=>T(f,o)).catch(()=>{})}),o.handle},uploadPortrait:a,confirmFix:l}},destroy:k}}function ne(e){let c=e;if(typeof c.apiOrigin!="string"||typeof c.sessionToken!="string")return;let m=`${c.apiOrigin}/api/v2/hosted/capture-reports`,d=c.sessionToken;return w=>{try{fetch(m,{method:"POST",headers:{"content-type":"application/json","x-session-token":d,"x-sekyro-sdk":`@sekyro/web/${H}`},body:JSON.stringify({reports:w}),keepalive:!0}).catch(()=>{})}catch{}}}function ie(e){let c=e.apiOrigin;return Z("sdk",typeof c=="string"&&/staging|sandbox|localhost/.test(c)?"sandbox":"live")}function Me(e){let c=null,m=null,d=null,w=B(),M=Promise.resolve(),h=()=>{d?.flow.handle.destroy(),d=null},D=async(i,l)=>{if(e.destroyed())return;l.setFlowState("uploading");let a=null,p,t=!1,r=e.currentView()?.documents!==void 0;try{await c.submit("doc_ocr",async(y,b)=>{if(a===null){let f=await F(y,"image","image/jpeg",i.image.size,{engine:"document"});await y.uploadToSpaces(f.uploadUrl,i.image,"image/jpeg"),a=(await y.completeMedia(f.key)).key}return l.setFlowState("checking"),p===void 0&&(p=l.takeDeviceRead(i)),y.submitCheck("doc_ocr",{imageKey:a,side:i.side,...p!==null?{deviceRead:p}:{},...r?{source:"camera"}:{}},{idempotencyKey:b})})}catch{t=!0}finally{l.setFlowState("done")}if(e.destroyed())return;if(t){l.settle(i.side,{ok:!1,issue:"technical"});return}let u=e.currentView(),n=u===null?null:R(u,{isMobile:e.isMobile()});if(n?.kind!=="document"){l.settle(i.side,{ok:!0}),d?.flow===l?h():l.handle.destroy();return}if(n.reason==="document_type_not_accepted"){m=null,d?.flow===l&&h(),c.republish();return}let o=n.acceptedSides;i.side!=="single"&&(o.includes(i.side)||n.reason==="side_missing")&&!(o.includes("recto")&&o.includes("verso"))?(l.settle(i.side,{ok:!0}),m?.documentType!=="passport"&&l.handle.setSide(n.side)):l.settle(i.side,{ok:!1,issue:"reread"})},g=null,_=async i=>{let l=e.currentView(),a=l===null?null:R(l,{isMobile:e.isMobile()});if(l===null||a?.kind!=="document")throw new RangeError("upload_not_offered");if(!a.photo.uploadOffered)throw new RangeError("upload_not_offered");let p=m?.documentType==="passport"?"single":a.side,{prepareUploadFile:t}=await import("./upload-file-UYXOHCRG.js"),r=await t(i,e.uploadInternals);if(e.destroyed())return;h();let u=null;try{await c.submit("doc_ocr",async(n,o)=>{if(u===null){let s=await n.presign("image",r.contentType,r.blob.size,{source:"upload"});await n.uploadToSpaces(s.uploadUrl,r.blob,r.contentType),u=(await n.completeMedia(s.key)).key}return n.submitCheck("doc_ocr",{imageKey:u,side:p,source:"upload"},{idempotencyKey:o})})}catch(n){throw n instanceof C&&(n.code==="media_type_unsupported"||n.code==="media_type_mismatch")?new TypeError("unsupported_file"):(n instanceof C&&(n.code==="document_upload_not_allowed"||n.code==="uploaded_media_not_allowed")&&await e.refreshView().catch(()=>{}),n)}},k=(i,l)=>({...i,uploadDocument:a=>{let p=()=>_(a),t=(g===null?p():g.then(p,p)).finally(()=>{g===t&&(g=null)});return g=t,t},issuer:m?.issuer??null,documentType:m?.documentType??null,captureSide:m===null?null:m.documentType==="passport"?"single":i.side,selectDocument:(a,p)=>{if(!J(i.documents).includes(a)||!Q(i.documents,a).includes(p))throw new RangeError(`${p} from ${a} is not accepted`);(m?.issuer!==a||m.documentType!==p)&&h(),m={issuer:a,documentType:p},l()},capture:a=>{if(m===null)throw new Error("selectDocument() first");if(d!==null&&d.video===a.video)return d.flow.handle;h();let p=m,t=p.documentType==="passport"?"single":i.acceptedSides.length>0?i.side:void 0,r=$({video:a.video,documentType:p.documentType,issuer:p.issuer,...t!==void 0?{side:t}:{},...a.keepScreenAwake!==void 0?{keepScreenAwake:a.keepScreenAwake}:{},...a.liveMrz!==void 0?{liveMrz:a.liveMrz}:{}},{...e.documentInternals??{},...(()=>{let n=e.currentView()?.capture?.document,o=e.documentInternals?.blurRefuseSharpnessMax??n?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:z(n?.camera),shutter:N(n?.scan),guideLock:K(n?.guide),...e.documentInternals?.engineOptions??{}},...typeof o=="number"&&Number.isFinite(o)&&o>=0&&o<=1?{blurRefuseSharpnessMax:o}:{}}})(),deferRead:!0,...(()=>{let n=e.currentView();if(n===null||e.documentInternals?.webOcr!==void 0)return{};let o=ne(e.runtime.client);return{webOcr:{captureDocument:n.capture?.document,salt:n.sessionId,baseUrl:ie(e.runtime.client),...o!==void 0?{reports:o}:{}}}})()});d={video:a.video,flow:r};let u=r.handle.destroy;return r.handle.destroy=()=>{d?.flow===r&&(d=null),u()},w.newHandle(),r.handle.on("state",n=>w.note(n)),r.handle.on("error",n=>{w.noteError(),e.reportCaptureIssue?.(O("document",n,w.value))}),r.handle.on("captured",n=>{M=M.then(()=>D(n,r)).catch(()=>{})}),r.handle}}),v=null,S=null,I=new Set,x=e.runtime.client;e.runtime.client=new Proxy(x,{get(i,l){if(l==="submitCheck")return(S??i).submitCheck.bind(S??i);let a=Reflect.get(i,l);return typeof a=="function"?a.bind(i):a}});let T=()=>{v?.destroy(),v=null,S=null},L=i=>{let l=e.currentView(),a=l===null?null:R(l,{isMobile:e.isMobile()});if(l===null||a?.kind!=="liveness"||a.livePhoto?.icao!==!0)return;if(v===null){let u=X({tuning:l.capture?.icao??null,tuningVersion:l.capture?.tuningVersion??null,...a.icao!=null?{policy:a.icao.policy}:{},still:a.livePhoto.still,...i.assetBaseUrl!==void 0?{assetBaseUrl:i.assetBaseUrl}:{}},e.livePhotoInternals);v=u,S=u.decorate(x),u.onGate(n=>{for(let o of I)o(n)})}let p=v,t=e.baseCapture??{},r=t.engineOptions?.telemetry;return{...t,engineOptions:{...t.engineOptions??{},measureQuality:p.engineOptions.measureQuality,telemetry:u=>{r?.(u),p.engineOptions.telemetry(u)}}}},P=te({keptPortraitInput:()=>v?.lastPortraitInput()??null,runner:()=>c,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:i=>ne(e.runtime.client)?.([i])}),V=Y({...e,bindDocument:k,bindPortrait:P.bind,stopCameras:()=>{h(),P.destroy(),T(),e.stopLiveness?.()},onLivePhoto:i=>(I.add(i),()=>I.delete(i))});return c=V,{...V,captureInternals:L,destroy:()=>{h(),P.destroy(),T(),I.clear()}}}export{Me as createPlanRunner,ne as reportSink,ie as sdkAssetBase};
|
package/dist/popup/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var S=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},k=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of f(e))!y.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=a(e,o))||r.enumerable});return n};var g=n=>k(s({},"__esModule",{value:!0}),n);var h={};S(h,{SEKYRO_EVENTS:()=>d,open:()=>c,openHosted:()=>m});module.exports=g(h);var d=["session.verified","session.not_verified","session.review_pending","session.cancelled"],w=new Set([0,1,2,3]),O="sekyro-verify",N="width=480,height=720,noopener=false",x=new Set(d);function _(n){if(n===null||typeof n!="object")return!1;let e=n;return e.source==="sekyro"&&e.version===1&&typeof e.sessionId=="string"&&typeof e.event=="string"&&x.has(e.event)}function c(n){let e=new URL(n.hostedUrl).origin,t=window.open(n.hostedUrl,O,N);if(!t)return{error:"popup_blocked"};let r=o=>{if(o.source!==t||o.origin!==e||!_(o.data))return;let{source:v,version:l,event:u,sessionId:E,level:i}=o.data,p={source:v,version:l,event:u,sessionId:E};w.has(i)&&(p.level=i),n.onEvent(p)};return window.addEventListener("message",r),{close(){window.removeEventListener("message",r),t.close()}}}function m(n,e){return e.mode==="redirect"?(window.location.assign(n),{close(){}}):c({hostedUrl:n,onEvent:e.onEvent??(()=>{})})}0&&(module.exports={SEKYRO_EVENTS,open,openHosted});
|
package/dist/popup/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The frozen SDK event-name vocabulary, in catalog order. */
|
|
2
|
-
declare const SEKYRO_EVENTS: readonly ["session.
|
|
2
|
+
declare const SEKYRO_EVENTS: readonly ["session.verified", "session.not_verified", "session.review_pending", "session.cancelled"];
|
|
3
3
|
/** One SDK event name — webhook-catalog terminal names + `session.cancelled`. */
|
|
4
4
|
type SekyroEventName = (typeof SEKYRO_EVENTS)[number];
|
|
5
5
|
/** The frozen postMessage payload: event name + sessionId, plus the level when known. */
|
|
@@ -10,7 +10,7 @@ interface SekyroEvent {
|
|
|
10
10
|
sessionId: string;
|
|
11
11
|
/**
|
|
12
12
|
* What the session proved (`1` live person, `2` identity, `3` corroborated,
|
|
13
|
-
* `0`
|
|
13
|
+
* `0` not verified), on a terminal event when the hosted page knows it. A
|
|
14
14
|
* display hint only: confirm server-side.
|
|
15
15
|
*/
|
|
16
16
|
level?: 0 | 1 | 2 | 3;
|
package/dist/popup/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The frozen SDK event-name vocabulary, in catalog order. */
|
|
2
|
-
declare const SEKYRO_EVENTS: readonly ["session.
|
|
2
|
+
declare const SEKYRO_EVENTS: readonly ["session.verified", "session.not_verified", "session.review_pending", "session.cancelled"];
|
|
3
3
|
/** One SDK event name — webhook-catalog terminal names + `session.cancelled`. */
|
|
4
4
|
type SekyroEventName = (typeof SEKYRO_EVENTS)[number];
|
|
5
5
|
/** The frozen postMessage payload: event name + sessionId, plus the level when known. */
|
|
@@ -10,7 +10,7 @@ interface SekyroEvent {
|
|
|
10
10
|
sessionId: string;
|
|
11
11
|
/**
|
|
12
12
|
* What the session proved (`1` live person, `2` identity, `3` corroborated,
|
|
13
|
-
* `0`
|
|
13
|
+
* `0` not verified), on a terminal event when the hosted page knows it. A
|
|
14
14
|
* display hint only: confirm server-side.
|
|
15
15
|
*/
|
|
16
16
|
level?: 0 | 1 | 2 | 3;
|
package/dist/popup/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-LJYMZQY2.js";export{a as SEKYRO_EVENTS,b as open,c as openHosted};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,b as u}from"./chunk-
|
|
1
|
+
import{a as s,b as u}from"./chunk-2LDOXGY3.js";import{Thumbmark as c}from"@thumbmarkjs/thumbmarkjs";var d=["canvas","webgl","audio","fonts","hardware","screen","system","locales","math","plugins"],f=2e3,l=4e3,m=1e3,g=2e3,h=64,p=32,P=8,b=128;function a(n,t){if(typeof n!="string")return;let e=n.trim();return e.length>0&&e.length<=t?e:void 0}async function y(){let n=navigator.userAgentData;if(typeof n?.getHighEntropyValues!="function")return;let t=await s(()=>n.getHighEntropyValues(["model","platformVersion"]),m);if(t==null)return;let e=a(t.model,h),i=a(t.platformVersion,p),o={...e!==void 0?{model:e}:{},...i!==void 0?{platformVersion:i}:{}};return Object.keys(o).length>0?o:void 0}async function _(){let[n,t]=await Promise.all([new c({stabilize:["private","iframe"],exclude:["permissions","webrtc","speech"],logging:!1,collect_beacon:!1,timeout:f}).get(),y()]),e=n?.thumbmark;if(typeof e!="string"||e.length<P||e.length>b)return;let i={};for(let o of d){let r=n.components?.[o];r==null||r.timeout==="true"||(i[o]=await u(r))}return{hash:e,c:i,...t!==void 0?{hints:t}:{}}}function w(){return new Promise(n=>{typeof globalThis.requestIdleCallback=="function"?globalThis.requestIdleCallback(()=>n(),{timeout:g}):n()})}async function I(n){return n()||(await w(),n())?"busy":s(_,l)}export{I as computePrint,y as readHints};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-Z2BIZYZQ.js";export{b as TURNSTILE_EXECUTE_TIMEOUT_MS,a as TURNSTILE_SCRIPT_SRC,e as executeTurnstile,d as loadTurnstile,c as resetTurnstileForTests};
|