@sekyro/web 0.1.0-rc.2 → 0.1.0-rc.21
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 +313 -0
- package/LICENSE +25 -16
- package/README.md +111 -60
- package/THIRD-PARTY-NOTICES.txt +154 -0
- package/dist/background-monitor-A7FKJOAG.js +1 -0
- package/dist/camera-trait-45MJTW4K.js +1 -0
- package/dist/capture-constraints-B5omafmk.d.cts +44 -0
- package/dist/capture-constraints-B5omafmk.d.ts +44 -0
- package/dist/capture-session-doc-XBZGXWOP.js +1 -0
- package/dist/{capture-session-v3-CAoWM8iT.d.cts → capture-session-v3-26FgzBIl.d.cts} +185 -15
- package/dist/{capture-session-v3-BJ8ciaWl.d.ts → capture-session-v3-ZO0QOeQH.d.ts} +185 -15
- package/dist/chunk-234OZEDB.js +1 -0
- package/dist/chunk-33KKMPJ5.js +1 -0
- package/dist/chunk-53POX7U4.js +1 -0
- package/dist/chunk-7Q4YPMAF.js +1 -0
- package/dist/chunk-A3FUGHAH.js +2 -0
- package/dist/chunk-B2X33ZW2.js +1 -0
- package/dist/chunk-CJHMFPL6.js +1 -0
- package/dist/chunk-CQ7SKLMC.js +1 -0
- package/dist/chunk-DFTCAWMP.js +1 -0
- package/dist/chunk-DK5YPBDQ.js +1 -0
- package/dist/chunk-FPXL63KZ.js +1 -0
- package/dist/chunk-FUHDOEBP.js +1 -0
- package/dist/chunk-G6LKLN4U.js +1 -0
- package/dist/chunk-GI3UFGRQ.js +1 -0
- package/dist/chunk-GT2ZLGF7.js +1 -0
- package/dist/chunk-H3HVCWLF.js +1 -0
- package/dist/chunk-MXWLCDFX.js +1 -0
- package/dist/chunk-O5WKNZ2C.js +1 -0
- package/dist/chunk-OKWG3PVH.js +1 -0
- package/dist/chunk-P3H3D33O.js +1 -0
- package/dist/chunk-P6UP4UQY.js +1 -0
- package/dist/chunk-POIQGEZM.js +1 -0
- package/dist/chunk-QYYJLXKA.js +1 -0
- package/dist/chunk-RI3E7GBN.js +1 -0
- package/dist/chunk-SMKCBUJL.js +1 -0
- package/dist/chunk-SNACCYTL.js +1 -0
- package/dist/chunk-TDLIXFDT.js +1 -0
- package/dist/chunk-TQB3URP2.js +1 -0
- package/dist/chunk-VIAT4DEA.js +1 -0
- package/dist/chunk-ZADZTM3M.js +1 -0
- package/dist/chunk-ZNIZACXD.js +1 -0
- package/dist/client/index.cjs +1 -357
- package/dist/client/index.d.cts +6 -37
- package/dist/client/index.d.ts +6 -37
- package/dist/client/index.js +1 -15
- package/dist/core/index.cjs +1 -1605
- package/dist/core/index.d.cts +5 -4
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.js +1 -139
- package/dist/core/ocr/worker.bundle.js +42 -0
- package/dist/core/ocr/worker.cjs +42 -0
- package/dist/core/ocr/worker.d.cts +84 -0
- package/dist/core/ocr/worker.d.ts +84 -0
- package/dist/core/ocr/worker.js +41 -0
- package/dist/core/v3/detect-worker.cjs +1 -392
- 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 -13
- package/dist/create-document-capture-23R2F47A.js +1 -0
- package/dist/create-portrait-capture-AGFHECK7.js +1 -0
- package/dist/create-verification-CXhXxknV.d.cts +3313 -0
- package/dist/create-verification-KlHIU4Fy.d.ts +3313 -0
- package/dist/{detect-worker-CKXHlXx9.d.cts → detect-worker-DclNxkZT.d.cts} +6 -0
- package/dist/{detect-worker-CKXHlXx9.d.ts → detect-worker-DclNxkZT.d.ts} +6 -0
- package/dist/detector-scanic-YCDNLCGV.js +1 -0
- package/dist/icao-gate-DI8VePWd.d.ts +566 -0
- package/dist/icao-gate-DvzOzHq6.d.cts +566 -0
- package/dist/icao-gate-T3BTOKFJ.js +1 -0
- package/dist/icao-policy-DztbA50-.d.ts +71 -0
- package/dist/icao-policy-MRB8NMAu.d.cts +71 -0
- package/dist/icao-tuning-4ETMF53W.js +1 -0
- package/dist/index.cjs +1 -2636
- package/dist/index.d.cts +110 -5
- package/dist/index.d.ts +110 -5
- package/dist/index.js +1 -28
- package/dist/internal/index.cjs +1 -4166
- package/dist/internal/index.d.cts +369 -324
- package/dist/internal/index.d.ts +369 -324
- package/dist/internal/index.js +1 -647
- package/dist/keyframe-rank-YAJLYJYF.js +1 -0
- package/dist/landmarker-KB7LVXAU.js +1 -0
- package/dist/mrz-band-VYHOTDHY.js +1 -0
- package/dist/plan-runner-NUWONT7F.js +1 -0
- package/dist/popup/index.cjs +1 -76
- package/dist/popup/index.d.cts +8 -2
- package/dist/popup/index.d.ts +8 -2
- package/dist/popup/index.js +1 -11
- package/dist/print-AYSCRSZB.js +1 -0
- package/dist/scanic-ml-stub-KW7IZHUT.js +1 -0
- package/dist/segmenter-USLNBX65.js +1 -0
- package/dist/turnstile-FATNZ4AG.js +1 -0
- package/dist/types-C_XP92JQ.d.cts +1732 -0
- package/dist/types-C_XP92JQ.d.ts +1732 -0
- package/dist/upload-file-UYXOHCRG.js +1 -0
- package/package.json +27 -11
- package/sbom.cdx.json +234 -0
- package/dist/capture-constraints-BujkZcfb.d.cts +0 -21
- package/dist/capture-constraints-BujkZcfb.d.ts +0 -21
- package/dist/chunk-BPYVZUJA.js +0 -852
- package/dist/chunk-BPYVZUJA.js.map +0 -1
- package/dist/chunk-LOTAJDRE.js +0 -1094
- package/dist/chunk-LOTAJDRE.js.map +0 -1
- package/dist/chunk-MWNFSNMP.js +0 -52
- package/dist/chunk-MWNFSNMP.js.map +0 -1
- package/dist/chunk-NILNKLK6.js +0 -50
- package/dist/chunk-NILNKLK6.js.map +0 -1
- package/dist/chunk-NWF46H7K.js +0 -359
- package/dist/chunk-NWF46H7K.js.map +0 -1
- package/dist/chunk-WY6U7AIK.js +0 -193
- package/dist/chunk-WY6U7AIK.js.map +0 -1
- package/dist/chunk-YVFF4Q4G.js +0 -327
- package/dist/chunk-YVFF4Q4G.js.map +0 -1
- package/dist/client/index.cjs.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/v3/detect-worker.cjs.map +0 -1
- package/dist/core/v3/detect-worker.js.map +0 -1
- package/dist/create-verification-CjLnJ0w6.d.ts +0 -348
- package/dist/create-verification-EnZ13uY4.d.cts +0 -348
- package/dist/detector-scanic-4C6IEW2K.js +0 -787
- package/dist/detector-scanic-4C6IEW2K.js.map +0 -1
- package/dist/hosted-client-BpvBqu9f.d.cts +0 -408
- package/dist/hosted-client-BpvBqu9f.d.ts +0 -408
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/index.cjs.map +0 -1
- package/dist/internal/index.js.map +0 -1
- package/dist/popup/index.cjs.map +0 -1
- package/dist/popup/index.js.map +0 -1
- package/dist/scanic-ml-stub-S2OZ6HEF.js +0 -10
- package/dist/scanic-ml-stub-S2OZ6HEF.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,111 @@
|
|
|
1
|
-
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-CXhXxknV.cjs';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorDetail, g as CaptureErrorKind, h as CaptureErrorPhase, i as CaptureState, j as CapturedArtifacts, k as CapturedDocument, l as CapturedPortrait, m as ChoiceOptionSnapshot, n as ChoiceSnapshot, o as ChoiceStepHandle, p as ContactChoiceSnapshot, q as ContactChoiceStepHandle, r as DEFAULT_API_ORIGIN, s as DOCUMENT_TYPE_ORDER, t as DeriveStepEnv, u as DocumentCaptureEvents, v as DocumentCaptureState, w as DocumentFeedback, x as DocumentFeedbackKey, y as DocumentGateUpdate, z as DocumentGuide, B as DocumentGuideMeasure, E as DocumentLiveMrzOptions, F as DocumentMrzUpdate, G as DocumentPoint, H as DocumentQuad, I as DocumentReticle, J as DocumentScanPhase, K as DocumentScanUpdate, L as DocumentSide, M as DocumentSnapshot, N as DocumentStepHandle, O as EidSnapshot, Q as EidStepHandle, R as EmailOtpSnapshot, S as EmailOtpStepHandle, T as EmailSource, U as GateHint, V as GateUpdate, W as ISSUER_CODES, X as IdentitySummarySnapshot, Y as IdentitySummaryStepHandle, Z as InLaneSwitch, _ as LivePhotoGateUpdate, $ as LivePhotoPlan, a0 as LivenessAssetsStatus, a1 as LivenessCaptureEvents, a2 as LivenessCaptureHandle, a3 as LivenessCaptureOptions, a4 as LivenessSnapshot, a5 as LivenessStartOptions, a6 as LivenessStepHandle, a7 as MethodSnapshot, a8 as MethodStepHandle, a9 as MobileRequiredSnapshot, aa as MobileRequiredStepHandle, ab as OtpChannel, ac as OtpNumberSource, ad as PLATFORM_UNSUPPORTED, ae as PhoneOtpSnapshot, af as PhoneOtpStepHandle, ag as PhotoSourceState, ah as PlanChoiceSnapshot, ai as PortraitCaptureEvents, aj as PortraitCaptureState, ak as PortraitGateUpdate, al as PortraitSnapshot, am as PortraitStartOptions, an as PortraitStepHandle, ao as PreloadLivenessAssetsOptions, ap as ProcessingSnapshot, aq as ProcessingStepHandle, ar as ReasonCode, as as RegistrySnapshot, at as RegistrySource, au as RegistryStepHandle, av as ResultDisplay, aw as ResultSnapshot, ax as ResultStepHandle, ay as SdkFailureReason, az as StepAttempts, aA as StepContext, aB as StepSnapshot, aC as UnsupportedReason, aD as UnsupportedSnapshot, aE as UnsupportedStepHandle, aF as Verification, aG as VerificationBusy, aH as VerificationEvents, aI as VerificationLocale, aJ as VerificationOptions, aK as VerificationResult, aL as VerificationStatus, aM as VerificationStep, aN as WEB_IDENTITY_METHODS, aO as acceptedIssuers, aP as acceptedTypesFor, aQ as cameraUnavailableCauseOf, aR as createLivenessCapture, aS as createVerification, aT as deriveStep, aU as flagOf, aV as getLivenessAssetsStatus, aW as laneOf, aX as otherOptions, aY as preloadLivenessAssets, aZ as releaseLivenessAssets, a_ as resolveAcceptedDocuments, a$ as sectionOf, b0 as subscribeLivenessAssets } from './create-verification-CXhXxknV.cjs';
|
|
3
|
+
import { aI as ScreenRampColour } from './types-C_XP92JQ.cjs';
|
|
4
|
+
export { A as AcceptedDocumentType, aJ as AgeEstimationReason, aK as CameraUnavailableCause, aL as CaptureIssueReport, b as CaptureMode, aM as CaptureProvenance, f as CheckReason, g as CheckState, h as CheckType, k as ContactChannel, D as DecisionReason, n as DocReason, E as EidAfterPass, p as EidAuthInput, q as EidReason, s as EmailOtpReason, t as FaceMatchReason, H as HostedAcceptedDocuments, aN as HostedBranding, aO as HostedBrandingColorKey, u as HostedCaptureTuning, v as HostedConsentView, w as HostedDocumentCaptureTuning, x as HostedDocumentScanTuning, y as HostedDocumentsView, z as HostedEidView, B as HostedEmailOtpView, G as HostedFlowRef, I as HostedIcaoPolicy, J as HostedIntegrity, K as HostedLivePhotoTuning, aP as HostedLivenessCaptureTuning, L as HostedNativeCaptureTuning, M as HostedOcrTuning, N as HostedOtpView, O as HostedPlanView, P as HostedPortraitPendingFix, Q as HostedPortraitView, R as HostedSessionView, S as HostedSimulationView, T as HostedStepView, U as HostedVoiceLocale, V as HostedVoiceView, aQ as IcaoCaptureTuning, W as IcaoCriterion, X as IcaoReportEntry, Y as IdentityConfirmDecision, Z as IdentityMethod, _ as IdentitySummarySource, $ as IdentitySummaryView, a2 as LivenessReason, a3 as MatchReason, a5 as MethodChoiceView, a6 as NationalEidOption, a7 as NfcChipReason, a8 as NfcStepView, a9 as OtpChoiceView, aa as PhoneCountryRule, ab as PhoneFormat, ad as PhoneOtpReason, ae as PhotoSource, af as PhotoSourcePick, ag as PlanAttempts, ah as PlanChoiceKind, ai as PlanChoiceOption, aj as PlanChoiceView, ak as PlanSectionView, al as PlanStepView, am as PolicyFailureReason, ao as PopulationReason, ap as PortraitFix, aq as PortraitFixReviewInput, ar as PortraitIcaoInput, as as PortraitIcaoReason, at as PortraitOutputFormat, ax as ResolvedCaptureMode, aR as RetakeHint, aS as ScreenRampChallenge, aT as ScreenRampRendered, aU as ScreenRampReport, ay as SessionFailureReason, az as SessionOutcome, aA as SessionStatus, aD as SimulatedCaptureInput, aE as StepSection, aG as VerificationAssurance, aH as VerificationLevel } from './types-C_XP92JQ.cjs';
|
|
2
5
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.cjs';
|
|
3
|
-
export { HostedApiError, KNOWN_CODES, KnownCode, isKnownCode } from './
|
|
4
|
-
export {
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
6
|
+
export { H as HostedApiError, a as HostedErrorDetails, b as HostedErrorIssue, K as KNOWN_CODES, c as KnownCode, i as icaoPolicyOf, d as isKnownCode } from './icao-policy-MRB8NMAu.cjs';
|
|
7
|
+
export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-DvzOzHq6.cjs';
|
|
8
|
+
import './detect-worker-DclNxkZT.cjs';
|
|
9
|
+
import './capture-session-v3-26FgzBIl.cjs';
|
|
10
|
+
|
|
11
|
+
/** Each colour holds for 400 ms (the service measures the mean chroma per segment). */
|
|
12
|
+
declare const SCREEN_RAMP_SEGMENT_MS = 400;
|
|
13
|
+
/** The layer returns to transparent at 2,000 ms on the clip timeline (before the 2,500 ms clip ends). */
|
|
14
|
+
declare const SCREEN_RAMP_END_MS = 2000;
|
|
15
|
+
/** The closed palette, in the order the backend lists it. */
|
|
16
|
+
declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
|
|
17
|
+
/** The CSS colour of a palette entry (`rgb(r, g, b)`). */
|
|
18
|
+
declare function screenRampColourValue(colour: ScreenRampColour): string;
|
|
19
|
+
|
|
20
|
+
/** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
|
|
21
|
+
type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
|
|
22
|
+
/** One-shot camera permission read. */
|
|
23
|
+
declare function queryCameraPermission(): Promise<CameraPermissionState>;
|
|
24
|
+
/**
|
|
25
|
+
* Subscribe to camera-permission changes; returns the unsubscribe function.
|
|
26
|
+
* Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
|
|
27
|
+
* (as soon as the Permissions API answers — asynchronously, `'unknown'` where
|
|
28
|
+
* unsupported), then on every change. Not a `useSyncExternalStore` source:
|
|
29
|
+
* there is no synchronous snapshot — drive a `useState` from it.
|
|
30
|
+
*/
|
|
31
|
+
declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
|
|
34
|
+
* desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
|
|
35
|
+
* permission was ever granted some desktops report a single placeholder — the
|
|
36
|
+
* in-capture switch remains available either way.
|
|
37
|
+
*/
|
|
38
|
+
declare function hasMultipleCameras(): Promise<boolean>;
|
|
39
|
+
|
|
40
|
+
/** The document type of an ID number. @public */
|
|
41
|
+
type IdNumberType = "national_id" | "passport" | "residence_permit";
|
|
42
|
+
/** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
|
|
43
|
+
interface IdNumber {
|
|
44
|
+
type: IdNumberType;
|
|
45
|
+
/** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
|
|
46
|
+
issuingCountry: string;
|
|
47
|
+
number: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
51
|
+
declare class InvalidInputError extends Error {
|
|
52
|
+
/**
|
|
53
|
+
* The refused input: `phone`, `code`, `idNumber` (the registry step's
|
|
54
|
+
* `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
|
|
55
|
+
*/
|
|
56
|
+
readonly field: "phone" | "code" | "idNumber" | "nni";
|
|
57
|
+
readonly kind: "format" | "check_digit";
|
|
58
|
+
constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
62
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
63
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
64
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
65
|
+
*/
|
|
66
|
+
declare class OtpInputError extends Error {
|
|
67
|
+
readonly field: "channel" | "email";
|
|
68
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
69
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* `true` when the number passes its issuing country's rule after normalizing (an MR
|
|
74
|
+
* national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
|
|
75
|
+
* digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
|
|
76
|
+
* country uses the generic rule.
|
|
77
|
+
*/
|
|
78
|
+
declare function isValidIdNumber(id: IdNumber): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
|
|
81
|
+
* `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
|
|
82
|
+
*/
|
|
83
|
+
declare function isValidNni(nni: string): boolean;
|
|
84
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
85
|
+
declare function normalizeDigits(input: string): string;
|
|
86
|
+
/** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
|
|
87
|
+
declare function normalizeNni(input: string): string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
91
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
92
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
93
|
+
* the first `start()`.
|
|
94
|
+
*/
|
|
95
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
96
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
97
|
+
declare function warmDocumentCapture(): void;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
101
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
|
|
102
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
103
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
104
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
105
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
106
|
+
*/
|
|
107
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
108
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
109
|
+
declare function warmPortraitCapture(): void;
|
|
110
|
+
|
|
111
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,111 @@
|
|
|
1
|
-
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-KlHIU4Fy.js';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorDetail, g as CaptureErrorKind, h as CaptureErrorPhase, i as CaptureState, j as CapturedArtifacts, k as CapturedDocument, l as CapturedPortrait, m as ChoiceOptionSnapshot, n as ChoiceSnapshot, o as ChoiceStepHandle, p as ContactChoiceSnapshot, q as ContactChoiceStepHandle, r as DEFAULT_API_ORIGIN, s as DOCUMENT_TYPE_ORDER, t as DeriveStepEnv, u as DocumentCaptureEvents, v as DocumentCaptureState, w as DocumentFeedback, x as DocumentFeedbackKey, y as DocumentGateUpdate, z as DocumentGuide, B as DocumentGuideMeasure, E as DocumentLiveMrzOptions, F as DocumentMrzUpdate, G as DocumentPoint, H as DocumentQuad, I as DocumentReticle, J as DocumentScanPhase, K as DocumentScanUpdate, L as DocumentSide, M as DocumentSnapshot, N as DocumentStepHandle, O as EidSnapshot, Q as EidStepHandle, R as EmailOtpSnapshot, S as EmailOtpStepHandle, T as EmailSource, U as GateHint, V as GateUpdate, W as ISSUER_CODES, X as IdentitySummarySnapshot, Y as IdentitySummaryStepHandle, Z as InLaneSwitch, _ as LivePhotoGateUpdate, $ as LivePhotoPlan, a0 as LivenessAssetsStatus, a1 as LivenessCaptureEvents, a2 as LivenessCaptureHandle, a3 as LivenessCaptureOptions, a4 as LivenessSnapshot, a5 as LivenessStartOptions, a6 as LivenessStepHandle, a7 as MethodSnapshot, a8 as MethodStepHandle, a9 as MobileRequiredSnapshot, aa as MobileRequiredStepHandle, ab as OtpChannel, ac as OtpNumberSource, ad as PLATFORM_UNSUPPORTED, ae as PhoneOtpSnapshot, af as PhoneOtpStepHandle, ag as PhotoSourceState, ah as PlanChoiceSnapshot, ai as PortraitCaptureEvents, aj as PortraitCaptureState, ak as PortraitGateUpdate, al as PortraitSnapshot, am as PortraitStartOptions, an as PortraitStepHandle, ao as PreloadLivenessAssetsOptions, ap as ProcessingSnapshot, aq as ProcessingStepHandle, ar as ReasonCode, as as RegistrySnapshot, at as RegistrySource, au as RegistryStepHandle, av as ResultDisplay, aw as ResultSnapshot, ax as ResultStepHandle, ay as SdkFailureReason, az as StepAttempts, aA as StepContext, aB as StepSnapshot, aC as UnsupportedReason, aD as UnsupportedSnapshot, aE as UnsupportedStepHandle, aF as Verification, aG as VerificationBusy, aH as VerificationEvents, aI as VerificationLocale, aJ as VerificationOptions, aK as VerificationResult, aL as VerificationStatus, aM as VerificationStep, aN as WEB_IDENTITY_METHODS, aO as acceptedIssuers, aP as acceptedTypesFor, aQ as cameraUnavailableCauseOf, aR as createLivenessCapture, aS as createVerification, aT as deriveStep, aU as flagOf, aV as getLivenessAssetsStatus, aW as laneOf, aX as otherOptions, aY as preloadLivenessAssets, aZ as releaseLivenessAssets, a_ as resolveAcceptedDocuments, a$ as sectionOf, b0 as subscribeLivenessAssets } from './create-verification-KlHIU4Fy.js';
|
|
3
|
+
import { aI as ScreenRampColour } from './types-C_XP92JQ.js';
|
|
4
|
+
export { A as AcceptedDocumentType, aJ as AgeEstimationReason, aK as CameraUnavailableCause, aL as CaptureIssueReport, b as CaptureMode, aM as CaptureProvenance, f as CheckReason, g as CheckState, h as CheckType, k as ContactChannel, D as DecisionReason, n as DocReason, E as EidAfterPass, p as EidAuthInput, q as EidReason, s as EmailOtpReason, t as FaceMatchReason, H as HostedAcceptedDocuments, aN as HostedBranding, aO as HostedBrandingColorKey, u as HostedCaptureTuning, v as HostedConsentView, w as HostedDocumentCaptureTuning, x as HostedDocumentScanTuning, y as HostedDocumentsView, z as HostedEidView, B as HostedEmailOtpView, G as HostedFlowRef, I as HostedIcaoPolicy, J as HostedIntegrity, K as HostedLivePhotoTuning, aP as HostedLivenessCaptureTuning, L as HostedNativeCaptureTuning, M as HostedOcrTuning, N as HostedOtpView, O as HostedPlanView, P as HostedPortraitPendingFix, Q as HostedPortraitView, R as HostedSessionView, S as HostedSimulationView, T as HostedStepView, U as HostedVoiceLocale, V as HostedVoiceView, aQ as IcaoCaptureTuning, W as IcaoCriterion, X as IcaoReportEntry, Y as IdentityConfirmDecision, Z as IdentityMethod, _ as IdentitySummarySource, $ as IdentitySummaryView, a2 as LivenessReason, a3 as MatchReason, a5 as MethodChoiceView, a6 as NationalEidOption, a7 as NfcChipReason, a8 as NfcStepView, a9 as OtpChoiceView, aa as PhoneCountryRule, ab as PhoneFormat, ad as PhoneOtpReason, ae as PhotoSource, af as PhotoSourcePick, ag as PlanAttempts, ah as PlanChoiceKind, ai as PlanChoiceOption, aj as PlanChoiceView, ak as PlanSectionView, al as PlanStepView, am as PolicyFailureReason, ao as PopulationReason, ap as PortraitFix, aq as PortraitFixReviewInput, ar as PortraitIcaoInput, as as PortraitIcaoReason, at as PortraitOutputFormat, ax as ResolvedCaptureMode, aR as RetakeHint, aS as ScreenRampChallenge, aT as ScreenRampRendered, aU as ScreenRampReport, ay as SessionFailureReason, az as SessionOutcome, aA as SessionStatus, aD as SimulatedCaptureInput, aE as StepSection, aG as VerificationAssurance, aH as VerificationLevel } from './types-C_XP92JQ.js';
|
|
2
5
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.js';
|
|
3
|
-
export { HostedApiError, KNOWN_CODES, KnownCode, isKnownCode } from './
|
|
4
|
-
export {
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
6
|
+
export { H as HostedApiError, a as HostedErrorDetails, b as HostedErrorIssue, K as KNOWN_CODES, c as KnownCode, i as icaoPolicyOf, d as isKnownCode } from './icao-policy-DztbA50-.js';
|
|
7
|
+
export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-DI8VePWd.js';
|
|
8
|
+
import './detect-worker-DclNxkZT.js';
|
|
9
|
+
import './capture-session-v3-ZO0QOeQH.js';
|
|
10
|
+
|
|
11
|
+
/** Each colour holds for 400 ms (the service measures the mean chroma per segment). */
|
|
12
|
+
declare const SCREEN_RAMP_SEGMENT_MS = 400;
|
|
13
|
+
/** The layer returns to transparent at 2,000 ms on the clip timeline (before the 2,500 ms clip ends). */
|
|
14
|
+
declare const SCREEN_RAMP_END_MS = 2000;
|
|
15
|
+
/** The closed palette, in the order the backend lists it. */
|
|
16
|
+
declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
|
|
17
|
+
/** The CSS colour of a palette entry (`rgb(r, g, b)`). */
|
|
18
|
+
declare function screenRampColourValue(colour: ScreenRampColour): string;
|
|
19
|
+
|
|
20
|
+
/** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
|
|
21
|
+
type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
|
|
22
|
+
/** One-shot camera permission read. */
|
|
23
|
+
declare function queryCameraPermission(): Promise<CameraPermissionState>;
|
|
24
|
+
/**
|
|
25
|
+
* Subscribe to camera-permission changes; returns the unsubscribe function.
|
|
26
|
+
* Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
|
|
27
|
+
* (as soon as the Permissions API answers — asynchronously, `'unknown'` where
|
|
28
|
+
* unsupported), then on every change. Not a `useSyncExternalStore` source:
|
|
29
|
+
* there is no synchronous snapshot — drive a `useState` from it.
|
|
30
|
+
*/
|
|
31
|
+
declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
|
|
34
|
+
* desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
|
|
35
|
+
* permission was ever granted some desktops report a single placeholder — the
|
|
36
|
+
* in-capture switch remains available either way.
|
|
37
|
+
*/
|
|
38
|
+
declare function hasMultipleCameras(): Promise<boolean>;
|
|
39
|
+
|
|
40
|
+
/** The document type of an ID number. @public */
|
|
41
|
+
type IdNumberType = "national_id" | "passport" | "residence_permit";
|
|
42
|
+
/** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
|
|
43
|
+
interface IdNumber {
|
|
44
|
+
type: IdNumberType;
|
|
45
|
+
/** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
|
|
46
|
+
issuingCountry: string;
|
|
47
|
+
number: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
51
|
+
declare class InvalidInputError extends Error {
|
|
52
|
+
/**
|
|
53
|
+
* The refused input: `phone`, `code`, `idNumber` (the registry step's
|
|
54
|
+
* `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
|
|
55
|
+
*/
|
|
56
|
+
readonly field: "phone" | "code" | "idNumber" | "nni";
|
|
57
|
+
readonly kind: "format" | "check_digit";
|
|
58
|
+
constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
62
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
63
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
64
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
65
|
+
*/
|
|
66
|
+
declare class OtpInputError extends Error {
|
|
67
|
+
readonly field: "channel" | "email";
|
|
68
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
69
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* `true` when the number passes its issuing country's rule after normalizing (an MR
|
|
74
|
+
* national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
|
|
75
|
+
* digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
|
|
76
|
+
* country uses the generic rule.
|
|
77
|
+
*/
|
|
78
|
+
declare function isValidIdNumber(id: IdNumber): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
|
|
81
|
+
* `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
|
|
82
|
+
*/
|
|
83
|
+
declare function isValidNni(nni: string): boolean;
|
|
84
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
85
|
+
declare function normalizeDigits(input: string): string;
|
|
86
|
+
/** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
|
|
87
|
+
declare function normalizeNni(input: string): string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
91
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
92
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
93
|
+
* the first `start()`.
|
|
94
|
+
*/
|
|
95
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
96
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
97
|
+
declare function warmDocumentCapture(): void;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
101
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
|
|
102
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
103
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
104
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
105
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
106
|
+
*/
|
|
107
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
108
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
109
|
+
declare function warmPortraitCapture(): void;
|
|
110
|
+
|
|
111
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SEKYRO_EVENTS,
|
|
3
|
-
openHosted
|
|
4
|
-
} from "./chunk-NILNKLK6.js";
|
|
5
|
-
import {
|
|
6
|
-
DEFAULT_API_ORIGIN,
|
|
7
|
-
createLivenessCapture,
|
|
8
|
-
createVerification
|
|
9
|
-
} from "./chunk-BPYVZUJA.js";
|
|
10
|
-
import "./chunk-LOTAJDRE.js";
|
|
11
|
-
import {
|
|
12
|
-
HostedApiError,
|
|
13
|
-
KNOWN_CODES,
|
|
14
|
-
isKnownCode
|
|
15
|
-
} from "./chunk-YVFF4Q4G.js";
|
|
16
|
-
import "./chunk-NWF46H7K.js";
|
|
17
|
-
import "./chunk-MWNFSNMP.js";
|
|
18
|
-
export {
|
|
19
|
-
DEFAULT_API_ORIGIN,
|
|
20
|
-
HostedApiError,
|
|
21
|
-
KNOWN_CODES,
|
|
22
|
-
SEKYRO_EVENTS,
|
|
23
|
-
createLivenessCapture,
|
|
24
|
-
createVerification,
|
|
25
|
-
isKnownCode,
|
|
26
|
-
openHosted
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{a as ee,c as te}from"./chunk-SNACCYTL.js";import{a as Y,f as z,h as W,i as f,j as y,k as h,l as P,m as v,n as J,o as q,p as Q,q as X,r as j,t as $}from"./chunk-ZADZTM3M.js";import{C,D as S}from"./chunk-H3HVCWLF.js";import{e as G,f as U,g as B,h as F,o as K}from"./chunk-P3H3D33O.js";import{b as x,c as b,d as V}from"./chunk-GT2ZLGF7.js";import{g as O,h as I,i as N,j as T}from"./chunk-7Q4YPMAF.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-CQ7SKLMC.js";import"./chunk-FPXL63KZ.js";import{a as w,b as k,c as _,h as Z}from"./chunk-B2X33ZW2.js";import"./chunk-VIAT4DEA.js";import"./chunk-OKWG3PVH.js";function oe(e){if(e==="permission")return"denied";if(e==="notfound"||e==="insecure"||e==="unsupported")return"no_camera"}var re=/^[A-Z0-9][A-Z0-9 -]{0,39}$/,ne=Object.freeze({normalize:e=>e.trim().toUpperCase().replace(/\s+/g," "),check:e=>re.test(e),registrySources:Object.freeze([]),describe:"number must be 1 to 40 letters, digits, spaces or hyphens"});function ie(e){return typeof e=="string"&&/^\d{10}$/.test(e)&&Number(e)%97===1}var ae=Object.freeze({normalize:e=>e.trim(),check:e=>ie(e),registrySources:Object.freeze(["MR.anrpts"]),describe:"number must be the 10-digit Mauritanian national ID number with a valid check digit"}),se=Object.freeze({"MR:national_id":ae});function m(e,t){return se[`${e.toUpperCase()}:${t}`]??ne}var pe=Object.freeze({MRT:"MR"});function R(e,t){let r=e.trim().toUpperCase();return m(pe[r]??r,t)}function ue(e){let t=R(e.issuingCountry,e.type);return t.check(t.normalize(e.number))}function de(e){return m("MR","national_id").check(e)}function g(e){let t="";for(let r of e){let n=r.codePointAt(0)??0;n>=1632&&n<=1641?t+=String(n-1632):n>=1776&&n<=1785?t+=String(n-1776):r!==" "&&r!=="-"&&r!==" "&&(t+=r)}return t}function ce(e){return g(e)}var Le=f,Oe=y,Ie=h,Ne=P,Te=v;var M=()=>import("./create-document-capture-23R2F47A.js");function E(e){let t=null,r=null,n=!1,u=null,l=null,d=[],i=(o,s)=>{o.off=s.on(o.event,o.handler)},a=()=>(r??(r=M().then(o=>{if(n)return null;let s=o.createDocumentCaptureInternal(e,{}).handle;for(let c of d)c.removed||i(c,s);return u!==null&&s.setSide(u),l!==null&&s.setGuide(l.guide),t=s,s})),r),p=()=>a().catch(()=>{if(r=null,!n)for(let o of d)!o.removed&&o.event==="error"&&o.handler({kind:"generic",retryable:!0});return null});return{get state(){return t?.state??"idle"},on:(o,s)=>{let c={event:o,handler:s,off:null,removed:!1};return d.push(c),t!==null&&i(c,t),()=>{c.removed=!0,c.off?.()}},start:async()=>{let o=await p();o!==null&&!n&&await o.start()},retry:()=>{t!==null?t.retry():p().then(o=>o?.start())},setSide:o=>{t!==null?t.setSide(o):u=o},shutter:()=>t?.shutter(),setTorch:o=>t?.setTorch(o),focusAt:(o,s)=>t?.focusAt(o,s),setGuide:o=>{t!==null?t.setGuide(o):l={guide:o}},destroy:()=>{n=!0,t?.destroy(),t=null,d.length=0}}}function H(){M().then(e=>e.warmDocumentCapture()).catch(()=>{})}function Ue(e){return E(e)}function Be(){H()}var D=()=>import("./create-portrait-capture-AGFHECK7.js");function A(e){let t=null,r=null,n=!1,u=[],l=(i,a)=>{i.off=a.on(i.event,i.handler)},d=()=>(r??(r=D().then(i=>{if(n)return null;let a=i.createPortraitCaptureInternal(e).handle;for(let p of u)p.removed||l(p,a);return t=a,a})),r);return{get state(){return t?.state??"idle"},get captureMode(){return t?.captureMode??"self"},get facingMode(){return t?.facingMode??"user"},on:(i,a)=>{let p={event:i,handler:a,off:null,removed:!1};return u.push(p),t!==null&&l(p,t),()=>{p.removed=!0,p.off?.()}},start:async i=>{let a=await d();a!==null&&!n&&await a.start(i)},retry:()=>{t!==null?t.retry():d().then(i=>i?.start())},switchCamera:()=>t?.switchCamera()??!1,destroy:()=>{n=!0,t?.destroy(),t=null,u.length=0}}}function L(){D().then(e=>e.warmPortraitCapture()).catch(()=>{})}function _e(e){return A(e)}function Ze(){L()}export{Y as DEFAULT_API_ORIGIN,Le as DOCUMENT_TYPE_ORDER,_ as HostedApiError,W as ISSUER_CODES,C as InvalidInputError,w as KNOWN_CODES,S as OtpInputError,q as PLATFORM_UNSUPPORTED,N as SCREEN_RAMP_COLOURS,I as SCREEN_RAMP_END_MS,O as SCREEN_RAMP_SEGMENT_MS,ee as SEKYRO_EVENTS,J as WEB_IDENTITY_METHODS,Ie as acceptedIssuers,Oe as acceptedTypesFor,oe as cameraUnavailableCauseOf,Ue as createDocumentCapture,K as createLivenessCapture,_e as createPortraitCapture,z as createVerification,$ as deriveStep,Te as flagOf,U as getLivenessAssetsStatus,V as hasMultipleCameras,Z as icaoPolicyOf,k as isKnownCode,ue as isValidIdNumber,de as isValidNni,X as laneOf,g as normalizeDigits,ce as normalizeNni,te as openHosted,j as otherOptions,G as preloadLivenessAssets,x as queryCameraPermission,F as releaseLivenessAssets,Ne as resolveAcceptedDocuments,T as screenRampColourValue,Q as sectionOf,b as subscribeCameraPermission,B as subscribeLivenessAssets,Be as warmDocumentCapture,Ze as warmPortraitCapture};
|