@sekyro/web 0.1.0-rc.1 → 0.1.0-rc.11
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 +225 -0
- package/LICENSE +25 -16
- package/README.md +105 -61
- package/THIRD-PARTY-NOTICES.txt +154 -0
- package/dist/background-monitor-A7FKJOAG.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-DMQ7T3HC.js +1 -0
- package/dist/{capture-session-v3-CAoWM8iT.d.cts → capture-session-v3-CCHws1mz.d.cts} +174 -15
- package/dist/{capture-session-v3-BJ8ciaWl.d.ts → capture-session-v3-DYrhYJoM.d.ts} +174 -15
- package/dist/chunk-73M7LS4H.js +1 -0
- package/dist/chunk-7ZCZY3ZP.js +1 -0
- package/dist/chunk-A3FUGHAH.js +2 -0
- package/dist/chunk-AHD4DA2V.js +1 -0
- package/dist/chunk-BPE5NSQ2.js +1 -0
- package/dist/chunk-CJHMFPL6.js +1 -0
- package/dist/chunk-DFTCAWMP.js +1 -0
- package/dist/chunk-DK5YPBDQ.js +1 -0
- package/dist/chunk-FHJ7HO3M.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-HHCGQSD4.js +1 -0
- package/dist/chunk-IJLHPX35.js +1 -0
- package/dist/chunk-JDGEZ542.js +1 -0
- package/dist/chunk-LUKTHL6K.js +1 -0
- package/dist/chunk-MXNZMTC2.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-OWU22VXP.js +1 -0
- package/dist/chunk-POIQGEZM.js +1 -0
- package/dist/chunk-RI3E7GBN.js +1 -0
- package/dist/chunk-SMKCBUJL.js +1 -0
- package/dist/chunk-TDLIXFDT.js +1 -0
- package/dist/chunk-U6TYL2IJ.js +1 -0
- package/dist/chunk-URUKV6NC.js +1 -0
- package/dist/chunk-V5K2JLC7.js +1 -0
- package/dist/client/index.cjs +1 -357
- package/dist/client/index.d.cts +37 -3
- package/dist/client/index.d.ts +37 -3
- 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-FV4XGUKQ.js +1 -0
- package/dist/create-portrait-capture-C462EIB6.js +1 -0
- package/dist/create-verification-CmJzn7sq.d.ts +3041 -0
- package/dist/create-verification-CzLrQjeM.d.cts +3041 -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-BeznQECA.d.cts +500 -0
- package/dist/icao-gate-Bw5sQVlt.d.ts +500 -0
- package/dist/icao-gate-PWBMKRGC.js +1 -0
- package/dist/icao-tuning-4GGVX6B4.js +1 -0
- package/dist/index.cjs +1 -2580
- package/dist/index.d.cts +84 -5
- package/dist/index.d.ts +84 -5
- package/dist/index.js +1 -28
- package/dist/internal/index.cjs +1 -4110
- package/dist/internal/index.d.cts +364 -324
- package/dist/internal/index.d.ts +364 -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-ZVAY4FSB.js +1 -0
- package/dist/popup/index.cjs +1 -76
- package/dist/popup/index.d.cts +7 -1
- package/dist/popup/index.d.ts +7 -1
- package/dist/popup/index.js +1 -11
- 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-BWyAHKt_.d.cts +1435 -0
- package/dist/types-BWyAHKt_.d.ts +1435 -0
- package/package.json +25 -10
- package/sbom.cdx.json +195 -0
- package/dist/capture-constraints-BujkZcfb.d.cts +0 -21
- package/dist/capture-constraints-BujkZcfb.d.ts +0 -21
- 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-NU4YOLCN.js +0 -796
- package/dist/chunk-NU4YOLCN.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--ldwakXV.d.cts +0 -341
- package/dist/create-verification-BlAPWeW5.d.ts +0 -341
- 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,85 @@
|
|
|
1
|
-
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-CzLrQjeM.cjs';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorKind, g as CaptureState, h as CapturedArtifacts, i as CapturedDocument, j as CapturedPortrait, k as ChoiceOptionSnapshot, l as ChoiceSnapshot, m as ChoiceStepHandle, n as ContactChoiceSnapshot, o as ContactChoiceStepHandle, p as DEFAULT_API_ORIGIN, q as DOCUMENT_TYPE_ORDER, r as DeriveStepEnv, s as DocumentCaptureEvents, t as DocumentCaptureState, u as DocumentFeedback, v as DocumentFeedbackKey, w as DocumentGateUpdate, x as DocumentGuide, y as DocumentGuideMeasure, z as DocumentLiveMrzOptions, B as DocumentMrzUpdate, E as DocumentPoint, F as DocumentQuad, G as DocumentReticle, H as DocumentScanPhase, I as DocumentScanUpdate, J as DocumentSide, K as DocumentSnapshot, L as DocumentStepHandle, M as EidSnapshot, N as EidStepHandle, O as EmailOtpSnapshot, Q as EmailOtpStepHandle, R as EmailSource, S as GateHint, T as GateUpdate, U as ISSUER_CODES, V as IdentitySummarySnapshot, W as IdentitySummaryStepHandle, X as InLaneSwitch, Y as LivePhotoGateUpdate, Z as LivePhotoPlan, _ as LivenessAssetsStatus, $ as LivenessCaptureEvents, a0 as LivenessCaptureHandle, a1 as LivenessCaptureOptions, a2 as LivenessSnapshot, a3 as LivenessStartOptions, a4 as LivenessStepHandle, a5 as MethodSnapshot, a6 as MethodStepHandle, a7 as MobileRequiredSnapshot, a8 as MobileRequiredStepHandle, a9 as OtpChannel, aa as OtpNumberSource, ab as PLATFORM_UNSUPPORTED, ac as PhoneOtpSnapshot, ad as PhoneOtpStepHandle, ae as PlanChoiceSnapshot, af as PortraitCaptureEvents, ag as PortraitCaptureState, ah as PortraitGateUpdate, ai as PortraitSnapshot, aj as PortraitStartOptions, ak as PortraitStepHandle, al as PreloadLivenessAssetsOptions, am as ProcessingSnapshot, an as ProcessingStepHandle, ao as ReasonCode, ap as RegistrySnapshot, aq as RegistrySource, ar as RegistryStepHandle, as as ResultDisplay, at as ResultSnapshot, au as ResultStepHandle, av as SdkFailureReason, aw as StepAttempts, ax as StepContext, ay as StepSnapshot, az as UnsupportedReason, aA as UnsupportedSnapshot, aB as UnsupportedStepHandle, aC as Verification, aD as VerificationBusy, aE as VerificationEvents, aF as VerificationLocale, aG as VerificationOptions, aH as VerificationResult, aI as VerificationStatus, aJ as VerificationStep, aK as WEB_IDENTITY_METHODS, aL as acceptedIssuers, aM as acceptedTypesFor, aN as cameraUnavailableCauseOf, aO as createLivenessCapture, aP as createVerification, aQ as deriveStep, aR as flagOf, aS as getLivenessAssetsStatus, aT as laneOf, aU as otherOptions, aV as preloadLivenessAssets, aW as releaseLivenessAssets, aX as resolveAcceptedDocuments, aY as sectionOf, aZ as subscribeLivenessAssets } from './create-verification-CzLrQjeM.cjs';
|
|
3
|
+
import { S as ScreenRampColour } from './types-BWyAHKt_.cjs';
|
|
4
|
+
export { A as AcceptedDocumentType, b as CameraUnavailableCause, h as CaptureMode, i as CaptureProvenance, j as CheckReason, k as CheckState, e as CheckType, l as ContactChannel, D as DecisionReason, m as DocReason, E as EidAfterPass, n as EidAuthInput, o as EidReason, p as EmailOtpReason, F as FaceMatchReason, q as HostedAcceptedDocuments, r as HostedBranding, s as HostedBrandingColorKey, t as HostedCaptureTuning, a as HostedConsentView, u as HostedDocumentCaptureTuning, v as HostedDocumentScanTuning, w as HostedEidView, x as HostedEmailOtpView, y as HostedFlowRef, z as HostedIcaoPolicy, G as HostedIntegrity, J as HostedLivePhotoTuning, K as HostedLivenessCaptureTuning, L as HostedNativeCaptureTuning, N as HostedOcrTuning, O as HostedOtpView, Q as HostedPlanView, T as HostedPortraitView, H as HostedSessionView, U as HostedStepView, V as HostedVoiceLocale, W as HostedVoiceView, X as IcaoCaptureTuning, g as IcaoCriterion, Y as IcaoReportEntry, I as IdentityConfirmDecision, Z as IdentityMethod, _ as IdentitySummarySource, $ as IdentitySummaryView, a0 as LivenessReason, a1 as MatchReason, a2 as MethodChoiceView, a3 as NationalEidOption, a4 as NfcChipReason, a5 as NfcStepView, a6 as OtpChoiceView, a7 as PhoneOtpReason, a8 as PlanAttempts, a9 as PlanChoiceKind, aa as PlanChoiceOption, ab as PlanChoiceView, ac as PlanSectionView, ad as PlanStepView, ae as PolicyFailureReason, af as PopulationReason, ag as PortraitIcaoInput, ah as PortraitIcaoReason, ai as RetakeHint, aj as ScreenRampChallenge, ak as ScreenRampRendered, al as ScreenRampReport, am as SessionFailureReason, an as SessionOutcome, ao as SessionStatus, ap as StepSection, aq as VerificationAssurance, ar as VerificationLevel } from './types-BWyAHKt_.cjs';
|
|
2
5
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.cjs';
|
|
3
|
-
export { HostedApiError, KNOWN_CODES, KnownCode, isKnownCode } from './client/index.cjs';
|
|
4
|
-
export {
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
6
|
+
export { HostedApiError, HostedErrorDetails, HostedErrorIssue, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.cjs';
|
|
7
|
+
export { H as HeadPose, I as IcaoCoachKey, a as IcaoCriterionState, b as IcaoGateCriterion, c as IcaoGateSummary, d as IcaoGateUpdate } from './icao-gate-BeznQECA.cjs';
|
|
8
|
+
import './detect-worker-DclNxkZT.cjs';
|
|
9
|
+
import './capture-session-v3-CCHws1mz.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
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
41
|
+
declare class InvalidInputError extends Error {
|
|
42
|
+
readonly field: "phone" | "code" | "nni";
|
|
43
|
+
readonly kind: "format" | "check_digit";
|
|
44
|
+
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
48
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
49
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
50
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
51
|
+
*/
|
|
52
|
+
declare class OtpInputError extends Error {
|
|
53
|
+
readonly field: "channel" | "email";
|
|
54
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
55
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** `true` for exactly 10 ASCII digits whose value ≡ 1 (mod 97). */
|
|
59
|
+
declare function isValidNni(nni: string): boolean;
|
|
60
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
61
|
+
declare function normalizeNni(input: string): string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
65
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
66
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
67
|
+
* the first `start()`.
|
|
68
|
+
*/
|
|
69
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
70
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
71
|
+
declare function warmDocumentCapture(): void;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
75
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
|
|
76
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
77
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
78
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
79
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
80
|
+
*/
|
|
81
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
82
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
83
|
+
declare function warmPortraitCapture(): void;
|
|
84
|
+
|
|
85
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,85 @@
|
|
|
1
|
-
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-CmJzn7sq.js';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorKind, g as CaptureState, h as CapturedArtifacts, i as CapturedDocument, j as CapturedPortrait, k as ChoiceOptionSnapshot, l as ChoiceSnapshot, m as ChoiceStepHandle, n as ContactChoiceSnapshot, o as ContactChoiceStepHandle, p as DEFAULT_API_ORIGIN, q as DOCUMENT_TYPE_ORDER, r as DeriveStepEnv, s as DocumentCaptureEvents, t as DocumentCaptureState, u as DocumentFeedback, v as DocumentFeedbackKey, w as DocumentGateUpdate, x as DocumentGuide, y as DocumentGuideMeasure, z as DocumentLiveMrzOptions, B as DocumentMrzUpdate, E as DocumentPoint, F as DocumentQuad, G as DocumentReticle, H as DocumentScanPhase, I as DocumentScanUpdate, J as DocumentSide, K as DocumentSnapshot, L as DocumentStepHandle, M as EidSnapshot, N as EidStepHandle, O as EmailOtpSnapshot, Q as EmailOtpStepHandle, R as EmailSource, S as GateHint, T as GateUpdate, U as ISSUER_CODES, V as IdentitySummarySnapshot, W as IdentitySummaryStepHandle, X as InLaneSwitch, Y as LivePhotoGateUpdate, Z as LivePhotoPlan, _ as LivenessAssetsStatus, $ as LivenessCaptureEvents, a0 as LivenessCaptureHandle, a1 as LivenessCaptureOptions, a2 as LivenessSnapshot, a3 as LivenessStartOptions, a4 as LivenessStepHandle, a5 as MethodSnapshot, a6 as MethodStepHandle, a7 as MobileRequiredSnapshot, a8 as MobileRequiredStepHandle, a9 as OtpChannel, aa as OtpNumberSource, ab as PLATFORM_UNSUPPORTED, ac as PhoneOtpSnapshot, ad as PhoneOtpStepHandle, ae as PlanChoiceSnapshot, af as PortraitCaptureEvents, ag as PortraitCaptureState, ah as PortraitGateUpdate, ai as PortraitSnapshot, aj as PortraitStartOptions, ak as PortraitStepHandle, al as PreloadLivenessAssetsOptions, am as ProcessingSnapshot, an as ProcessingStepHandle, ao as ReasonCode, ap as RegistrySnapshot, aq as RegistrySource, ar as RegistryStepHandle, as as ResultDisplay, at as ResultSnapshot, au as ResultStepHandle, av as SdkFailureReason, aw as StepAttempts, ax as StepContext, ay as StepSnapshot, az as UnsupportedReason, aA as UnsupportedSnapshot, aB as UnsupportedStepHandle, aC as Verification, aD as VerificationBusy, aE as VerificationEvents, aF as VerificationLocale, aG as VerificationOptions, aH as VerificationResult, aI as VerificationStatus, aJ as VerificationStep, aK as WEB_IDENTITY_METHODS, aL as acceptedIssuers, aM as acceptedTypesFor, aN as cameraUnavailableCauseOf, aO as createLivenessCapture, aP as createVerification, aQ as deriveStep, aR as flagOf, aS as getLivenessAssetsStatus, aT as laneOf, aU as otherOptions, aV as preloadLivenessAssets, aW as releaseLivenessAssets, aX as resolveAcceptedDocuments, aY as sectionOf, aZ as subscribeLivenessAssets } from './create-verification-CmJzn7sq.js';
|
|
3
|
+
import { S as ScreenRampColour } from './types-BWyAHKt_.js';
|
|
4
|
+
export { A as AcceptedDocumentType, b as CameraUnavailableCause, h as CaptureMode, i as CaptureProvenance, j as CheckReason, k as CheckState, e as CheckType, l as ContactChannel, D as DecisionReason, m as DocReason, E as EidAfterPass, n as EidAuthInput, o as EidReason, p as EmailOtpReason, F as FaceMatchReason, q as HostedAcceptedDocuments, r as HostedBranding, s as HostedBrandingColorKey, t as HostedCaptureTuning, a as HostedConsentView, u as HostedDocumentCaptureTuning, v as HostedDocumentScanTuning, w as HostedEidView, x as HostedEmailOtpView, y as HostedFlowRef, z as HostedIcaoPolicy, G as HostedIntegrity, J as HostedLivePhotoTuning, K as HostedLivenessCaptureTuning, L as HostedNativeCaptureTuning, N as HostedOcrTuning, O as HostedOtpView, Q as HostedPlanView, T as HostedPortraitView, H as HostedSessionView, U as HostedStepView, V as HostedVoiceLocale, W as HostedVoiceView, X as IcaoCaptureTuning, g as IcaoCriterion, Y as IcaoReportEntry, I as IdentityConfirmDecision, Z as IdentityMethod, _ as IdentitySummarySource, $ as IdentitySummaryView, a0 as LivenessReason, a1 as MatchReason, a2 as MethodChoiceView, a3 as NationalEidOption, a4 as NfcChipReason, a5 as NfcStepView, a6 as OtpChoiceView, a7 as PhoneOtpReason, a8 as PlanAttempts, a9 as PlanChoiceKind, aa as PlanChoiceOption, ab as PlanChoiceView, ac as PlanSectionView, ad as PlanStepView, ae as PolicyFailureReason, af as PopulationReason, ag as PortraitIcaoInput, ah as PortraitIcaoReason, ai as RetakeHint, aj as ScreenRampChallenge, ak as ScreenRampRendered, al as ScreenRampReport, am as SessionFailureReason, an as SessionOutcome, ao as SessionStatus, ap as StepSection, aq as VerificationAssurance, ar as VerificationLevel } from './types-BWyAHKt_.js';
|
|
2
5
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.js';
|
|
3
|
-
export { HostedApiError, KNOWN_CODES, KnownCode, isKnownCode } from './client/index.js';
|
|
4
|
-
export {
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
6
|
+
export { HostedApiError, HostedErrorDetails, HostedErrorIssue, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.js';
|
|
7
|
+
export { H as HeadPose, I as IcaoCoachKey, a as IcaoCriterionState, b as IcaoGateCriterion, c as IcaoGateSummary, d as IcaoGateUpdate } from './icao-gate-Bw5sQVlt.js';
|
|
8
|
+
import './detect-worker-DclNxkZT.js';
|
|
9
|
+
import './capture-session-v3-DYrhYJoM.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
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
41
|
+
declare class InvalidInputError extends Error {
|
|
42
|
+
readonly field: "phone" | "code" | "nni";
|
|
43
|
+
readonly kind: "format" | "check_digit";
|
|
44
|
+
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
48
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
49
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
50
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
51
|
+
*/
|
|
52
|
+
declare class OtpInputError extends Error {
|
|
53
|
+
readonly field: "channel" | "email";
|
|
54
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
55
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** `true` for exactly 10 ASCII digits whose value ≡ 1 (mod 97). */
|
|
59
|
+
declare function isValidNni(nni: string): boolean;
|
|
60
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
61
|
+
declare function normalizeNni(input: string): string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
65
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
66
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
67
|
+
* the first `start()`.
|
|
68
|
+
*/
|
|
69
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
70
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
71
|
+
declare function warmDocumentCapture(): void;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
75
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
|
|
76
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
77
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
78
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
79
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
80
|
+
*/
|
|
81
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
82
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
83
|
+
declare function warmPortraitCapture(): void;
|
|
84
|
+
|
|
85
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, 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-NU4YOLCN.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 $,c as J}from"./chunk-U6TYL2IJ.js";import{a as F,f as K,h as z,i as f,j as C,k as y,l as S,m as h,n as B,o as q,p as Y,q as j,r as W,t as Q}from"./chunk-V5K2JLC7.js";import{w as l,x as m}from"./chunk-AHD4DA2V.js";import{e as w,f as A,g as I,h as T,n as U}from"./chunk-IJLHPX35.js";import{b as V,c as b,d as M}from"./chunk-GT2ZLGF7.js";import{g as R,h as E,i as O,j as L}from"./chunk-HHCGQSD4.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{a as k,b as _,c as G,f as N}from"./chunk-URUKV6NC.js";import"./chunk-LUKTHL6K.js";import"./chunk-OKWG3PVH.js";function X(o){if(o==="permission")return"denied";if(o==="notfound"||o==="insecure"||o==="unsupported")return"no_camera"}function Z(o){return/^\d{10}$/.test(o)&&Number(o)%97===1}function ee(o){let e="";for(let i of o){let n=i.codePointAt(0)??0;n>=1632&&n<=1641?e+=String(n-1632):n>=1776&&n<=1785?e+=String(n-1776):i!==" "&&i!=="-"&&i!=="\xA0"&&(e+=i)}return e}var Ce=f,ye=C,Se=y,he=S,ve=h;var v=()=>import("./create-document-capture-FV4XGUKQ.js");function P(o){let e=null,i=null,n=!1,p=null,c=null,u=[],r=(t,s)=>{t.off=s.on(t.event,t.handler)},a=()=>(i??(i=v().then(t=>{if(n)return null;let s=t.createDocumentCaptureInternal(o,{}).handle;for(let d of u)d.removed||r(d,s);return p!==null&&s.setSide(p),c!==null&&s.setGuide(c.guide),e=s,s})),i);return{get state(){return e?.state??"idle"},on:(t,s)=>{let d={event:t,handler:s,off:null,removed:!1};return u.push(d),e!==null&&r(d,e),()=>{d.removed=!0,d.off?.()}},start:async()=>{let t=await a();t!==null&&!n&&await t.start()},retry:()=>{e!==null?e.retry():a().then(t=>t?.start())},setSide:t=>{e!==null?e.setSide(t):p=t},shutter:()=>e?.shutter(),setTorch:t=>e?.setTorch(t),focusAt:(t,s)=>e?.focusAt(t,s),setGuide:t=>{e!==null?e.setGuide(t):c={guide:t}},destroy:()=>{n=!0,e?.destroy(),e=null,u.length=0}}}function g(){v().then(o=>o.warmDocumentCapture()).catch(()=>{})}function xe(o){return P(o)}function Re(){g()}var H=()=>import("./create-portrait-capture-C462EIB6.js");function D(o){let e=null,i=null,n=!1,p=[],c=(r,a)=>{r.off=a.on(r.event,r.handler)},u=()=>(i??(i=H().then(r=>{if(n)return null;let a=r.createPortraitCaptureInternal(o).handle;for(let t of p)t.removed||c(t,a);return e=a,a})),i);return{get state(){return e?.state??"idle"},get captureMode(){return e?.captureMode??"self"},get facingMode(){return e?.facingMode??"user"},on:(r,a)=>{let t={event:r,handler:a,off:null,removed:!1};return p.push(t),e!==null&&c(t,e),()=>{t.removed=!0,t.off?.()}},start:async r=>{let a=await u();a!==null&&!n&&await a.start(r)},retry:()=>{e!==null?e.retry():u().then(r=>r?.start())},switchCamera:()=>e?.switchCamera()??!1,destroy:()=>{n=!0,e?.destroy(),e=null,p.length=0}}}function x(){H().then(o=>o.warmPortraitCapture()).catch(()=>{})}function be(o){return D(o)}function Me(){x()}export{F as DEFAULT_API_ORIGIN,Ce as DOCUMENT_TYPE_ORDER,G as HostedApiError,z as ISSUER_CODES,l as InvalidInputError,k as KNOWN_CODES,m as OtpInputError,q as PLATFORM_UNSUPPORTED,O as SCREEN_RAMP_COLOURS,E as SCREEN_RAMP_END_MS,R as SCREEN_RAMP_SEGMENT_MS,$ as SEKYRO_EVENTS,B as WEB_IDENTITY_METHODS,Se as acceptedIssuers,ye as acceptedTypesFor,X as cameraUnavailableCauseOf,xe as createDocumentCapture,U as createLivenessCapture,be as createPortraitCapture,K as createVerification,Q as deriveStep,ve as flagOf,A as getLivenessAssetsStatus,M as hasMultipleCameras,N as icaoPolicyOf,_ as isKnownCode,Z as isValidNni,j as laneOf,ee as normalizeNni,J as openHosted,W as otherOptions,w as preloadLivenessAssets,V as queryCameraPermission,T as releaseLivenessAssets,he as resolveAcceptedDocuments,L as screenRampColourValue,Y as sectionOf,b as subscribeCameraPermission,I as subscribeLivenessAssets,Re as warmDocumentCapture,Me as warmPortraitCapture};
|