@sekyro/web 0.1.0-rc.3 → 0.1.0-rc.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/CHANGELOG.md +427 -0
  2. package/LICENSE +25 -16
  3. package/README.md +150 -62
  4. package/THIRD-PARTY-NOTICES.txt +154 -0
  5. package/dist/background-monitor-A7FKJOAG.js +1 -0
  6. package/dist/barcode-detect-C5IOXMKI.js +1 -0
  7. package/dist/camera-trait-V4UAOPIQ.js +1 -0
  8. package/dist/capture-constraints-CVqpMNGA.d.cts +48 -0
  9. package/dist/capture-constraints-CVqpMNGA.d.ts +48 -0
  10. package/dist/capture-session-doc-ESEZJBQM.js +1 -0
  11. package/dist/{capture-session-v3-CvIfcwST.d.ts → capture-session-v3-CTQL6eFd.d.cts} +259 -13
  12. package/dist/{capture-session-v3-COIO_F2w.d.cts → capture-session-v3-DHlOE6cS.d.ts} +259 -13
  13. package/dist/challenge-frame-YAQJ5YMB.js +1 -0
  14. package/dist/chunk-2LDOXGY3.js +1 -0
  15. package/dist/chunk-33KKMPJ5.js +1 -0
  16. package/dist/chunk-3LMJ4335.js +1 -0
  17. package/dist/chunk-53POX7U4.js +1 -0
  18. package/dist/chunk-7252SFZ6.js +1 -0
  19. package/dist/chunk-7QZWBDI5.js +1 -0
  20. package/dist/chunk-A7QFTU6M.js +1 -0
  21. package/dist/chunk-CJHMFPL6.js +1 -0
  22. package/dist/chunk-CMXN4SOZ.js +1 -0
  23. package/dist/chunk-CPUECYAJ.js +1 -0
  24. package/dist/chunk-DFTCAWMP.js +1 -0
  25. package/dist/chunk-DK5YPBDQ.js +1 -0
  26. package/dist/chunk-FPXL63KZ.js +1 -0
  27. package/dist/chunk-FSSMUAKC.js +1 -0
  28. package/dist/chunk-G6LKLN4U.js +1 -0
  29. package/dist/chunk-GFJATPUR.js +1 -0
  30. package/dist/chunk-GI3UFGRQ.js +1 -0
  31. package/dist/chunk-JLVZ35QK.js +2 -0
  32. package/dist/chunk-KA43AAM7.js +1 -0
  33. package/dist/chunk-KXFHVAYQ.js +1 -0
  34. package/dist/chunk-ODI4A5K4.js +1 -0
  35. package/dist/chunk-OEQJ62CC.js +3 -0
  36. package/dist/chunk-POIQGEZM.js +1 -0
  37. package/dist/chunk-RI3E7GBN.js +1 -0
  38. package/dist/chunk-S5BUCUZ4.js +1 -0
  39. package/dist/chunk-SLKRT74K.js +1 -0
  40. package/dist/chunk-SMKCBUJL.js +1 -0
  41. package/dist/chunk-SX7TUC3V.js +1 -0
  42. package/dist/chunk-TSA6GHUG.js +1 -0
  43. package/dist/chunk-UTPUHE4J.js +1 -0
  44. package/dist/chunk-VVUQ4PFU.js +1 -0
  45. package/dist/chunk-VWGKUQ3C.js +1 -0
  46. package/dist/chunk-ZKF2XMNX.js +1 -0
  47. package/dist/client/index.cjs +1 -357
  48. package/dist/client/index.d.cts +6 -37
  49. package/dist/client/index.d.ts +6 -37
  50. package/dist/client/index.js +1 -15
  51. package/dist/clip-inspect-DLJXVKV6.js +1 -0
  52. package/dist/core/index.cjs +1 -1606
  53. package/dist/core/index.d.cts +5 -4
  54. package/dist/core/index.d.ts +5 -4
  55. package/dist/core/index.js +1 -139
  56. package/dist/core/ocr/worker.bundle.js +42 -0
  57. package/dist/core/ocr/worker.cjs +42 -0
  58. package/dist/core/ocr/worker.d.cts +84 -0
  59. package/dist/core/ocr/worker.d.ts +84 -0
  60. package/dist/core/ocr/worker.js +41 -0
  61. package/dist/core/v3/detect-worker.cjs +1 -392
  62. package/dist/core/v3/detect-worker.d.cts +1 -1
  63. package/dist/core/v3/detect-worker.d.ts +1 -1
  64. package/dist/core/v3/detect-worker.js +1 -13
  65. package/dist/create-document-capture-V7XCRRDV.js +1 -0
  66. package/dist/create-portrait-capture-5VGYZUOK.js +1 -0
  67. package/dist/create-verification-CGBe2yLE.d.cts +3719 -0
  68. package/dist/create-verification-aoY2QoRx.d.ts +3719 -0
  69. package/dist/{detect-worker-CKXHlXx9.d.ts → detect-worker-CHqsPJoM.d.cts} +25 -2
  70. package/dist/{detect-worker-CKXHlXx9.d.cts → detect-worker-CHqsPJoM.d.ts} +25 -2
  71. package/dist/detector-scanic-SE3CL55N.js +1 -0
  72. package/dist/icao-gate-DveU9Cr8.d.ts +573 -0
  73. package/dist/icao-gate-T3BTOKFJ.js +1 -0
  74. package/dist/icao-gate-xyWB7dz2.d.cts +573 -0
  75. package/dist/icao-policy-BWu1JLgi.d.cts +80 -0
  76. package/dist/icao-policy-OOEQDG9_.d.ts +80 -0
  77. package/dist/icao-tuning-4ETMF53W.js +1 -0
  78. package/dist/index.cjs +3 -2649
  79. package/dist/index.d.cts +138 -5
  80. package/dist/index.d.ts +138 -5
  81. package/dist/index.js +1 -28
  82. package/dist/internal/index.cjs +3 -4179
  83. package/dist/internal/index.d.cts +390 -371
  84. package/dist/internal/index.d.ts +390 -371
  85. package/dist/internal/index.js +1 -647
  86. package/dist/keyframe-rank-YAJLYJYF.js +1 -0
  87. package/dist/landmarker-KB7LVXAU.js +1 -0
  88. package/dist/mrz-band-VYHOTDHY.js +1 -0
  89. package/dist/plan-runner-IXCKR4DB.js +1 -0
  90. package/dist/popup/index.cjs +1 -76
  91. package/dist/popup/index.d.cts +9 -3
  92. package/dist/popup/index.d.ts +9 -3
  93. package/dist/popup/index.js +1 -11
  94. package/dist/print-SEWS3VHQ.js +1 -0
  95. package/dist/scanic-ml-stub-KW7IZHUT.js +1 -0
  96. package/dist/segmenter-USLNBX65.js +1 -0
  97. package/dist/types-CezFEXzl.d.cts +2103 -0
  98. package/dist/types-CezFEXzl.d.ts +2103 -0
  99. package/dist/upload-file-EGXXM6TQ.js +1 -0
  100. package/package.json +30 -11
  101. package/sbom.cdx.json +349 -0
  102. package/dist/capture-constraints-BujkZcfb.d.cts +0 -21
  103. package/dist/capture-constraints-BujkZcfb.d.ts +0 -21
  104. package/dist/chunk-7TC6TOZ4.js +0 -1095
  105. package/dist/chunk-7TC6TOZ4.js.map +0 -1
  106. package/dist/chunk-FIXX2AXC.js +0 -864
  107. package/dist/chunk-FIXX2AXC.js.map +0 -1
  108. package/dist/chunk-MWNFSNMP.js +0 -52
  109. package/dist/chunk-MWNFSNMP.js.map +0 -1
  110. package/dist/chunk-NILNKLK6.js +0 -50
  111. package/dist/chunk-NILNKLK6.js.map +0 -1
  112. package/dist/chunk-NWF46H7K.js +0 -359
  113. package/dist/chunk-NWF46H7K.js.map +0 -1
  114. package/dist/chunk-WY6U7AIK.js +0 -193
  115. package/dist/chunk-WY6U7AIK.js.map +0 -1
  116. package/dist/chunk-YVFF4Q4G.js +0 -327
  117. package/dist/chunk-YVFF4Q4G.js.map +0 -1
  118. package/dist/client/index.cjs.map +0 -1
  119. package/dist/client/index.js.map +0 -1
  120. package/dist/core/index.cjs.map +0 -1
  121. package/dist/core/index.js.map +0 -1
  122. package/dist/core/v3/detect-worker.cjs.map +0 -1
  123. package/dist/core/v3/detect-worker.js.map +0 -1
  124. package/dist/create-verification-CP18eq1Q.d.cts +0 -348
  125. package/dist/create-verification-CswF2As-.d.ts +0 -348
  126. package/dist/detector-scanic-4C6IEW2K.js +0 -787
  127. package/dist/detector-scanic-4C6IEW2K.js.map +0 -1
  128. package/dist/hosted-client-BpvBqu9f.d.cts +0 -408
  129. package/dist/hosted-client-BpvBqu9f.d.ts +0 -408
  130. package/dist/index.cjs.map +0 -1
  131. package/dist/index.js.map +0 -1
  132. package/dist/internal/index.cjs.map +0 -1
  133. package/dist/internal/index.js.map +0 -1
  134. package/dist/popup/index.cjs.map +0 -1
  135. package/dist/popup/index.js.map +0 -1
  136. package/dist/scanic-ml-stub-S2OZ6HEF.js +0 -10
  137. package/dist/scanic-ml-stub-S2OZ6HEF.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,6 +1,139 @@
1
- export { C as CaptureChannel, a as CaptureError, b as CaptureErrorKind, c as CaptureState, d as CapturedArtifacts, D as DEFAULT_API_ORIGIN, G as GateHint, e as GateUpdate, L as LivenessCaptureEvents, f as LivenessCaptureHandle, g as LivenessCaptureOptions, R as ReasonCode, S as SdkFailureReason, V as Verification, h as VerificationEvents, i as VerificationLocale, j as VerificationOptions, k as VerificationResult, l as VerificationStatus, m as createLivenessCapture, n as createVerification } from './create-verification-CP18eq1Q.cjs';
1
+ import { F as FormIssue, D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-CGBe2yLE.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 ChallengeErrorCode, n as ChoiceOptionSnapshot, o as ChoiceSnapshot, p as ChoiceStepHandle, q as ContactChoiceSnapshot, r as ContactChoiceStepHandle, s as DEFAULT_API_ORIGIN, t as DOCUMENT_TYPE_ORDER, u as DeriveStepEnv, v as DocumentCaptureEvents, w as DocumentCaptureState, x as DocumentFeedback, y as DocumentFeedbackKey, z as DocumentGateUpdate, B as DocumentGuide, E as DocumentGuideMeasure, G as DocumentLiveMrzOptions, H as DocumentMrzUpdate, I as DocumentPoint, J as DocumentQuad, K as DocumentReticle, L as DocumentScanPhase, M as DocumentScanUpdate, N as DocumentSide, O as DocumentSnapshot, Q as DocumentStepHandle, R as EidSnapshot, S as EidStepHandle, T as EmailOtpSnapshot, U as EmailOtpStepHandle, V as EmailSource, W as FORM_ANSWERS_INVALID, X as FormAnswersError, Y as FormSnapshot, Z as FormStepHandle, _ as GateHint, $ as GateUpdate, a0 as ISSUER_CODES, a1 as IdentitySummarySnapshot, a2 as IdentitySummaryStepHandle, a3 as InLaneSwitch, a4 as LivePhotoGateUpdate, a5 as LivePhotoPlan, a6 as LivenessAssetsStatus, a7 as LivenessCaptureEvents, a8 as LivenessCaptureHandle, a9 as LivenessCaptureOptions, aa as LivenessSnapshot, ab as LivenessStartOptions, ac as LivenessStepHandle, ad as MethodSnapshot, ae as MethodStepHandle, af as MobileRequiredSnapshot, ag as MobileRequiredStepHandle, ah as NativeAppRequiredSnapshot, ai as NativeAppRequiredStepHandle, aj as OtpChannel, ak as OtpNumberSource, al as PLATFORM_UNSUPPORTED, am as PageCaptureHandle, an as PhoneOtpSnapshot, ao as PhoneOtpStepHandle, ap as PhotoSourceState, aq as PlanChoiceSnapshot, ar as PortraitCaptureEvents, as as PortraitCaptureState, at as PortraitGateUpdate, au as PortraitSnapshot, av as PortraitStartOptions, aw as PortraitStepHandle, ax as PreloadLivenessAssetsOptions, ay as ProcessingSnapshot, az as ProcessingStepHandle, aA as ProofOfAddressSnapshot, aB as ProofOfAddressStepHandle, aC as ReasonCode, aD as RegistrySnapshot, aE as RegistrySource, aF as RegistryStepHandle, aG as ResultDisplay, aH as ResultSnapshot, aI as ResultStepHandle, aJ as SdkFailureReason, aK as StepAttempts, aL as StepContext, aM as StepSnapshot, aN as UnsupportedReason, aO as UnsupportedSnapshot, aP as UnsupportedStepHandle, aQ as Verification, aR as VerificationBusy, aS as VerificationEvents, aT as VerificationLocale, aU as VerificationOptions, aV as VerificationResult, aW as VerificationStatus, aX as VerificationStep, aY as WEB_IDENTITY_METHODS, aZ as acceptedIssuers, a_ as acceptedTypesFor, a$ as cameraUnavailableCauseOf, b0 as createLivenessCapture, b1 as createVerification, b2 as deriveStep, b3 as flagOf, b4 as getLivenessAssetsStatus, b5 as laneOf, b6 as otherOptions, b7 as preloadLivenessAssets, b8 as releaseLivenessAssets, b9 as resolveAcceptedDocuments, ba as sectionOf, bb as subscribeLivenessAssets } from './create-verification-CGBe2yLE.cjs';
3
+ import { be as ScreenRampColour, X as HostedFormView, H as FormInput } from './types-CezFEXzl.cjs';
4
+ export { A as AcceptedDocumentType, bf as AgeEstimationReason, bg as CameraUnavailableCause, bh as CaptureIssueReport, b as CaptureMode, bi as CaptureProvenance, f as CheckReason, g as CheckState, h as CheckType, i as ClosedBy, l as ContactChannel, D as DecisionReason, o as DocReason, E as EidAfterPass, q as EidAuthInput, r as EidReason, t as EmailOtpReason, u as FaceMatchReason, v as FormAddressValue, w as FormAnswerValue, x as FormChoiceView, y as FormConsentView, z as FormCustomQuestionView, B as FormFieldName, G as FormFieldQuestionView, I as FormIssueCode, J as FormLocale, K as FormQuestionOptions, L as FormQuestionType, M as FormQuestionView, N as HostedAcceptedDocuments, bj as HostedBranding, bk as HostedBrandingColorKey, O as HostedCaptureTuning, P as HostedChallengeView, Q as HostedConsentView, R as HostedDocumentCaptureTuning, S as HostedDocumentScanTuning, T as HostedDocumentsView, U as HostedEidView, V as HostedEmailOtpView, W as HostedFlowRef, Y as HostedIcaoPolicy, Z as HostedIntegrity, _ as HostedLivePhotoTuning, bl as HostedLivenessCaptureTuning, $ as HostedNativeAppView, a0 as HostedNativeCaptureTuning, a1 as HostedOcrTuning, a2 as HostedOtpView, a3 as HostedPlanView, a4 as HostedPoaRuleKindView, a5 as HostedPoaRuleView, a6 as HostedPortraitPendingFix, a7 as HostedPortraitView, a8 as HostedProofOfAddressView, a9 as HostedSessionView, aa as HostedSimulationView, ab as HostedStepView, ac as HostedTesterGateView, ad as HostedVoiceLocale, ae as HostedVoiceView, bm as IcaoCaptureTuning, af as IcaoCriterion, ag as IcaoReportEntry, ah as IdentityConfirmDecision, ai as IdentityMethod, aj as IdentitySummarySource, ak as IdentitySummaryView, an as LivenessReason, ao as MatchReason, aq as MethodChoiceView, ar as NationalEidOption, as as NfcChipReason, at as NfcStepView, au as OtpChoiceView, av as PhoneCountryRule, aw as PhoneFormat, ay as PhoneOtpReason, az as PhotoSource, aA as PhotoSourcePick, aB as PlanAttempts, aC as PlanChoiceKind, aD as PlanChoiceOption, aE as PlanChoiceView, aF as PlanSectionView, aG as PlanStepView, aJ as PoaKind, aL as PoaNameMatchMode, aN as PoaReason, aO as PoaRuleSource, aQ as PopulationReason, aR as PortraitFix, aS as PortraitFixReviewInput, aT as PortraitIcaoInput, aU as PortraitIcaoReason, aV as PortraitOutputFormat, aZ as ResolvedCaptureMode, bn as RetakeHint, a_ as SandboxSimulatedReason, a$ as SandboxSimulation, bo as ScreenRampChallenge, bp as ScreenRampPaint, bq as ScreenRampRendered, br as ScreenRampReport, b0 as SessionDecidingStep, b1 as SessionFailureReason, b2 as SessionReason, b3 as SessionStatus, b6 as SimulatedCaptureInput, b7 as StepResult, b8 as StepSection, ba as TesterGateInput, bb as TesterGateResponse, bc as VerificationAssurance, bd as VerificationLevel } from './types-CezFEXzl.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 { C as CheckReason, a as CheckState, b as CheckType, D as DocReason, F as FaceMatchReason, H as HostedOtpView, c as HostedSessionView, d as HostedStepView, L as LivenessReason, P as PhoneOtpReason, e as PopulationReason, S as SessionOutcome, f as SessionStatus } from './hosted-client-BpvBqu9f.cjs';
5
- import './capture-session-v3-COIO_F2w.cjs';
6
- import './detect-worker-CKXHlXx9.cjs';
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-BWu1JLgi.cjs';
7
+ export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-xyWB7dz2.cjs';
8
+ import './detect-worker-CHqsPJoM.cjs';
9
+ import './capture-session-v3-CTQL6eFd.cjs';
10
+
11
+ /** The closed palette, in the order the backend lists it. */
12
+ declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
13
+ /** The CSS colour of a palette entry or of the dark gap (`rgb(r, g, b)`). */
14
+ declare function screenRampColourValue(colour: ScreenRampColour | "dark"): string;
15
+
16
+ /** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
17
+ type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
18
+ /** One-shot camera permission read. */
19
+ declare function queryCameraPermission(): Promise<CameraPermissionState>;
20
+ /**
21
+ * Subscribe to camera-permission changes; returns the unsubscribe function.
22
+ * Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
23
+ * (as soon as the Permissions API answers — asynchronously, `'unknown'` where
24
+ * unsupported), then on every change. Not a `useSyncExternalStore` source:
25
+ * there is no synchronous snapshot — drive a `useState` from it.
26
+ */
27
+ declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
28
+ /**
29
+ * Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
30
+ * desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
31
+ * permission was ever granted some desktops report a single placeholder — the
32
+ * in-capture switch remains available either way.
33
+ */
34
+ declare function hasMultipleCameras(): Promise<boolean>;
35
+
36
+ /** The document type of an ID number (`drivers_license`: spec 2026-11-10 §6.1). @public */
37
+ type IdNumberType = "national_id" | "passport" | "residence_permit" | "drivers_license";
38
+ /** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
39
+ interface IdNumber {
40
+ type: IdNumberType;
41
+ /** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
42
+ issuingCountry: string;
43
+ number: string;
44
+ }
45
+
46
+ /** A step action refused its input before any network call (nothing was submitted or billed). */
47
+ declare class InvalidInputError extends Error {
48
+ /**
49
+ * The refused input: `phone`, `code`, `idNumber` (the registry step's
50
+ * `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
51
+ */
52
+ readonly field: "phone" | "code" | "idNumber" | "nni";
53
+ readonly kind: "format" | "check_digit";
54
+ constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
55
+ }
56
+ /**
57
+ * An OTP step action refused its input before any network call (Plan 8; nothing
58
+ * was submitted or billed): the phone OTP `channel` choice is `required`
59
+ * (several channels offered, none chosen) or `unavailable` (not one of the
60
+ * step's channels), or the email OTP `email` address has a bad `format`.
61
+ */
62
+ declare class OtpInputError extends Error {
63
+ readonly field: "channel" | "email";
64
+ readonly kind: "format" | "required" | "unavailable";
65
+ constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
66
+ }
67
+
68
+ /**
69
+ * `true` when the number passes its issuing country's rule after normalizing (an MR
70
+ * national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
71
+ * digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
72
+ * country uses the generic rule.
73
+ */
74
+ declare function isValidIdNumber(id: IdNumber): boolean;
75
+ /**
76
+ * @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
77
+ * `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
78
+ */
79
+ declare function isValidNni(nni: string): boolean;
80
+ /** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
81
+ declare function normalizeDigits(input: string): string;
82
+ /** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
83
+ declare function normalizeNni(input: string): string;
84
+
85
+ /** §5 "Why these limits": the answer limits the client checks (the settings limits are the builder's). */
86
+ declare const FORM_ANSWER_LIMITS: {
87
+ readonly fullNameMin: 2;
88
+ readonly fullName: 200;
89
+ readonly email: 254;
90
+ readonly occupation: 120;
91
+ readonly shortText: 120;
92
+ readonly longText: 1000;
93
+ readonly addressLine: 120;
94
+ readonly addressLines: 4;
95
+ readonly city: 80;
96
+ readonly postcode: 16;
97
+ readonly number: 1000000000000;
98
+ readonly dateMin: "1900-01-01";
99
+ readonly dateMax: "2100-12-31";
100
+ };
101
+ /** The writing direction of a language (the client's text is shown with its own `lang` and `dir`, §8). */
102
+ declare function directionOf(locale: string): "rtl" | "ltr";
103
+ /** A real calendar date `YYYY-MM-DD` between 1900 and 2100. */
104
+ declare function isFormDate(s: unknown): s is string;
105
+ /** A number the form takes: finite, under 10^12 in size, at most two decimals. */
106
+ declare function isFormNumber(n: unknown): n is number;
107
+ /** A payment card number (13 to 19 digits, spaces and dashes ignored, passing the Luhn check) anywhere in a text. */
108
+ declare function containsCardNumber(text: string): boolean;
109
+ /** Today as `YYYY-MM-DD` in UTC (the clock the server compares with). */
110
+ declare function todayIso(now?: number): string;
111
+ /**
112
+ * Every refused answer of `input`, in the form's order (questions, then consents). An optional question left empty
113
+ * (absent, blank text, no choice) is fine; a required one is `required` (a consent: `consent_required`).
114
+ */
115
+ declare function formIssues(form: HostedFormView, input: FormInput, today?: string): FormIssue[];
116
+
117
+ /**
118
+ * The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
119
+ * residence permits and passport data pages of any issuing country. Live camera
120
+ * only; `captured` delivers an upload-ready JPEG per face. The engine loads on
121
+ * the first `start()`.
122
+ */
123
+ declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
124
+ /** Prefetch the document engine (call when the document step mounts). */
125
+ declare function warmDocumentCapture(): void;
126
+
127
+ /**
128
+ * The ICAO portrait capture for sessions whose selfie is ICAO-checked
129
+ * (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
130
+ * per-criterion coaching (pose, eyes against the person's own baseline, mouth,
131
+ * framing, lighting, background, glare, resolution, sharpness) and an
132
+ * automatic full-resolution still once every criterion has held. The server
133
+ * re-checks every criterion. The engine loads on the first `start()`.
134
+ */
135
+ declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
136
+ /** Prefetch the portrait engine (call when the portrait step mounts). */
137
+ declare function warmPortraitCapture(): void;
138
+
139
+ export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, FORM_ANSWER_LIMITS, FormInput, FormIssue, HostedFormView, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, ScreenRampColour, containsCardNumber, createDocumentCapture, createPortraitCapture, directionOf, formIssues, hasMultipleCameras, isFormDate, isFormNumber, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, todayIso, warmDocumentCapture, warmPortraitCapture };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,139 @@
1
- export { C as CaptureChannel, a as CaptureError, b as CaptureErrorKind, c as CaptureState, d as CapturedArtifacts, D as DEFAULT_API_ORIGIN, G as GateHint, e as GateUpdate, L as LivenessCaptureEvents, f as LivenessCaptureHandle, g as LivenessCaptureOptions, R as ReasonCode, S as SdkFailureReason, V as Verification, h as VerificationEvents, i as VerificationLocale, j as VerificationOptions, k as VerificationResult, l as VerificationStatus, m as createLivenessCapture, n as createVerification } from './create-verification-CswF2As-.js';
1
+ import { F as FormIssue, D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-aoY2QoRx.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 ChallengeErrorCode, n as ChoiceOptionSnapshot, o as ChoiceSnapshot, p as ChoiceStepHandle, q as ContactChoiceSnapshot, r as ContactChoiceStepHandle, s as DEFAULT_API_ORIGIN, t as DOCUMENT_TYPE_ORDER, u as DeriveStepEnv, v as DocumentCaptureEvents, w as DocumentCaptureState, x as DocumentFeedback, y as DocumentFeedbackKey, z as DocumentGateUpdate, B as DocumentGuide, E as DocumentGuideMeasure, G as DocumentLiveMrzOptions, H as DocumentMrzUpdate, I as DocumentPoint, J as DocumentQuad, K as DocumentReticle, L as DocumentScanPhase, M as DocumentScanUpdate, N as DocumentSide, O as DocumentSnapshot, Q as DocumentStepHandle, R as EidSnapshot, S as EidStepHandle, T as EmailOtpSnapshot, U as EmailOtpStepHandle, V as EmailSource, W as FORM_ANSWERS_INVALID, X as FormAnswersError, Y as FormSnapshot, Z as FormStepHandle, _ as GateHint, $ as GateUpdate, a0 as ISSUER_CODES, a1 as IdentitySummarySnapshot, a2 as IdentitySummaryStepHandle, a3 as InLaneSwitch, a4 as LivePhotoGateUpdate, a5 as LivePhotoPlan, a6 as LivenessAssetsStatus, a7 as LivenessCaptureEvents, a8 as LivenessCaptureHandle, a9 as LivenessCaptureOptions, aa as LivenessSnapshot, ab as LivenessStartOptions, ac as LivenessStepHandle, ad as MethodSnapshot, ae as MethodStepHandle, af as MobileRequiredSnapshot, ag as MobileRequiredStepHandle, ah as NativeAppRequiredSnapshot, ai as NativeAppRequiredStepHandle, aj as OtpChannel, ak as OtpNumberSource, al as PLATFORM_UNSUPPORTED, am as PageCaptureHandle, an as PhoneOtpSnapshot, ao as PhoneOtpStepHandle, ap as PhotoSourceState, aq as PlanChoiceSnapshot, ar as PortraitCaptureEvents, as as PortraitCaptureState, at as PortraitGateUpdate, au as PortraitSnapshot, av as PortraitStartOptions, aw as PortraitStepHandle, ax as PreloadLivenessAssetsOptions, ay as ProcessingSnapshot, az as ProcessingStepHandle, aA as ProofOfAddressSnapshot, aB as ProofOfAddressStepHandle, aC as ReasonCode, aD as RegistrySnapshot, aE as RegistrySource, aF as RegistryStepHandle, aG as ResultDisplay, aH as ResultSnapshot, aI as ResultStepHandle, aJ as SdkFailureReason, aK as StepAttempts, aL as StepContext, aM as StepSnapshot, aN as UnsupportedReason, aO as UnsupportedSnapshot, aP as UnsupportedStepHandle, aQ as Verification, aR as VerificationBusy, aS as VerificationEvents, aT as VerificationLocale, aU as VerificationOptions, aV as VerificationResult, aW as VerificationStatus, aX as VerificationStep, aY as WEB_IDENTITY_METHODS, aZ as acceptedIssuers, a_ as acceptedTypesFor, a$ as cameraUnavailableCauseOf, b0 as createLivenessCapture, b1 as createVerification, b2 as deriveStep, b3 as flagOf, b4 as getLivenessAssetsStatus, b5 as laneOf, b6 as otherOptions, b7 as preloadLivenessAssets, b8 as releaseLivenessAssets, b9 as resolveAcceptedDocuments, ba as sectionOf, bb as subscribeLivenessAssets } from './create-verification-aoY2QoRx.js';
3
+ import { be as ScreenRampColour, X as HostedFormView, H as FormInput } from './types-CezFEXzl.js';
4
+ export { A as AcceptedDocumentType, bf as AgeEstimationReason, bg as CameraUnavailableCause, bh as CaptureIssueReport, b as CaptureMode, bi as CaptureProvenance, f as CheckReason, g as CheckState, h as CheckType, i as ClosedBy, l as ContactChannel, D as DecisionReason, o as DocReason, E as EidAfterPass, q as EidAuthInput, r as EidReason, t as EmailOtpReason, u as FaceMatchReason, v as FormAddressValue, w as FormAnswerValue, x as FormChoiceView, y as FormConsentView, z as FormCustomQuestionView, B as FormFieldName, G as FormFieldQuestionView, I as FormIssueCode, J as FormLocale, K as FormQuestionOptions, L as FormQuestionType, M as FormQuestionView, N as HostedAcceptedDocuments, bj as HostedBranding, bk as HostedBrandingColorKey, O as HostedCaptureTuning, P as HostedChallengeView, Q as HostedConsentView, R as HostedDocumentCaptureTuning, S as HostedDocumentScanTuning, T as HostedDocumentsView, U as HostedEidView, V as HostedEmailOtpView, W as HostedFlowRef, Y as HostedIcaoPolicy, Z as HostedIntegrity, _ as HostedLivePhotoTuning, bl as HostedLivenessCaptureTuning, $ as HostedNativeAppView, a0 as HostedNativeCaptureTuning, a1 as HostedOcrTuning, a2 as HostedOtpView, a3 as HostedPlanView, a4 as HostedPoaRuleKindView, a5 as HostedPoaRuleView, a6 as HostedPortraitPendingFix, a7 as HostedPortraitView, a8 as HostedProofOfAddressView, a9 as HostedSessionView, aa as HostedSimulationView, ab as HostedStepView, ac as HostedTesterGateView, ad as HostedVoiceLocale, ae as HostedVoiceView, bm as IcaoCaptureTuning, af as IcaoCriterion, ag as IcaoReportEntry, ah as IdentityConfirmDecision, ai as IdentityMethod, aj as IdentitySummarySource, ak as IdentitySummaryView, an as LivenessReason, ao as MatchReason, aq as MethodChoiceView, ar as NationalEidOption, as as NfcChipReason, at as NfcStepView, au as OtpChoiceView, av as PhoneCountryRule, aw as PhoneFormat, ay as PhoneOtpReason, az as PhotoSource, aA as PhotoSourcePick, aB as PlanAttempts, aC as PlanChoiceKind, aD as PlanChoiceOption, aE as PlanChoiceView, aF as PlanSectionView, aG as PlanStepView, aJ as PoaKind, aL as PoaNameMatchMode, aN as PoaReason, aO as PoaRuleSource, aQ as PopulationReason, aR as PortraitFix, aS as PortraitFixReviewInput, aT as PortraitIcaoInput, aU as PortraitIcaoReason, aV as PortraitOutputFormat, aZ as ResolvedCaptureMode, bn as RetakeHint, a_ as SandboxSimulatedReason, a$ as SandboxSimulation, bo as ScreenRampChallenge, bp as ScreenRampPaint, bq as ScreenRampRendered, br as ScreenRampReport, b0 as SessionDecidingStep, b1 as SessionFailureReason, b2 as SessionReason, b3 as SessionStatus, b6 as SimulatedCaptureInput, b7 as StepResult, b8 as StepSection, ba as TesterGateInput, bb as TesterGateResponse, bc as VerificationAssurance, bd as VerificationLevel } from './types-CezFEXzl.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 { C as CheckReason, a as CheckState, b as CheckType, D as DocReason, F as FaceMatchReason, H as HostedOtpView, c as HostedSessionView, d as HostedStepView, L as LivenessReason, P as PhoneOtpReason, e as PopulationReason, S as SessionOutcome, f as SessionStatus } from './hosted-client-BpvBqu9f.js';
5
- import './capture-session-v3-CvIfcwST.js';
6
- import './detect-worker-CKXHlXx9.js';
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-OOEQDG9_.js';
7
+ export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-DveU9Cr8.js';
8
+ import './detect-worker-CHqsPJoM.js';
9
+ import './capture-session-v3-DHlOE6cS.js';
10
+
11
+ /** The closed palette, in the order the backend lists it. */
12
+ declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
13
+ /** The CSS colour of a palette entry or of the dark gap (`rgb(r, g, b)`). */
14
+ declare function screenRampColourValue(colour: ScreenRampColour | "dark"): string;
15
+
16
+ /** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
17
+ type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
18
+ /** One-shot camera permission read. */
19
+ declare function queryCameraPermission(): Promise<CameraPermissionState>;
20
+ /**
21
+ * Subscribe to camera-permission changes; returns the unsubscribe function.
22
+ * Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
23
+ * (as soon as the Permissions API answers — asynchronously, `'unknown'` where
24
+ * unsupported), then on every change. Not a `useSyncExternalStore` source:
25
+ * there is no synchronous snapshot — drive a `useState` from it.
26
+ */
27
+ declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
28
+ /**
29
+ * Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
30
+ * desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
31
+ * permission was ever granted some desktops report a single placeholder — the
32
+ * in-capture switch remains available either way.
33
+ */
34
+ declare function hasMultipleCameras(): Promise<boolean>;
35
+
36
+ /** The document type of an ID number (`drivers_license`: spec 2026-11-10 §6.1). @public */
37
+ type IdNumberType = "national_id" | "passport" | "residence_permit" | "drivers_license";
38
+ /** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
39
+ interface IdNumber {
40
+ type: IdNumberType;
41
+ /** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
42
+ issuingCountry: string;
43
+ number: string;
44
+ }
45
+
46
+ /** A step action refused its input before any network call (nothing was submitted or billed). */
47
+ declare class InvalidInputError extends Error {
48
+ /**
49
+ * The refused input: `phone`, `code`, `idNumber` (the registry step's
50
+ * `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
51
+ */
52
+ readonly field: "phone" | "code" | "idNumber" | "nni";
53
+ readonly kind: "format" | "check_digit";
54
+ constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
55
+ }
56
+ /**
57
+ * An OTP step action refused its input before any network call (Plan 8; nothing
58
+ * was submitted or billed): the phone OTP `channel` choice is `required`
59
+ * (several channels offered, none chosen) or `unavailable` (not one of the
60
+ * step's channels), or the email OTP `email` address has a bad `format`.
61
+ */
62
+ declare class OtpInputError extends Error {
63
+ readonly field: "channel" | "email";
64
+ readonly kind: "format" | "required" | "unavailable";
65
+ constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
66
+ }
67
+
68
+ /**
69
+ * `true` when the number passes its issuing country's rule after normalizing (an MR
70
+ * national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
71
+ * digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
72
+ * country uses the generic rule.
73
+ */
74
+ declare function isValidIdNumber(id: IdNumber): boolean;
75
+ /**
76
+ * @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
77
+ * `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
78
+ */
79
+ declare function isValidNni(nni: string): boolean;
80
+ /** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
81
+ declare function normalizeDigits(input: string): string;
82
+ /** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
83
+ declare function normalizeNni(input: string): string;
84
+
85
+ /** §5 "Why these limits": the answer limits the client checks (the settings limits are the builder's). */
86
+ declare const FORM_ANSWER_LIMITS: {
87
+ readonly fullNameMin: 2;
88
+ readonly fullName: 200;
89
+ readonly email: 254;
90
+ readonly occupation: 120;
91
+ readonly shortText: 120;
92
+ readonly longText: 1000;
93
+ readonly addressLine: 120;
94
+ readonly addressLines: 4;
95
+ readonly city: 80;
96
+ readonly postcode: 16;
97
+ readonly number: 1000000000000;
98
+ readonly dateMin: "1900-01-01";
99
+ readonly dateMax: "2100-12-31";
100
+ };
101
+ /** The writing direction of a language (the client's text is shown with its own `lang` and `dir`, §8). */
102
+ declare function directionOf(locale: string): "rtl" | "ltr";
103
+ /** A real calendar date `YYYY-MM-DD` between 1900 and 2100. */
104
+ declare function isFormDate(s: unknown): s is string;
105
+ /** A number the form takes: finite, under 10^12 in size, at most two decimals. */
106
+ declare function isFormNumber(n: unknown): n is number;
107
+ /** A payment card number (13 to 19 digits, spaces and dashes ignored, passing the Luhn check) anywhere in a text. */
108
+ declare function containsCardNumber(text: string): boolean;
109
+ /** Today as `YYYY-MM-DD` in UTC (the clock the server compares with). */
110
+ declare function todayIso(now?: number): string;
111
+ /**
112
+ * Every refused answer of `input`, in the form's order (questions, then consents). An optional question left empty
113
+ * (absent, blank text, no choice) is fine; a required one is `required` (a consent: `consent_required`).
114
+ */
115
+ declare function formIssues(form: HostedFormView, input: FormInput, today?: string): FormIssue[];
116
+
117
+ /**
118
+ * The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
119
+ * residence permits and passport data pages of any issuing country. Live camera
120
+ * only; `captured` delivers an upload-ready JPEG per face. The engine loads on
121
+ * the first `start()`.
122
+ */
123
+ declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
124
+ /** Prefetch the document engine (call when the document step mounts). */
125
+ declare function warmDocumentCapture(): void;
126
+
127
+ /**
128
+ * The ICAO portrait capture for sessions whose selfie is ICAO-checked
129
+ * (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
130
+ * per-criterion coaching (pose, eyes against the person's own baseline, mouth,
131
+ * framing, lighting, background, glare, resolution, sharpness) and an
132
+ * automatic full-resolution still once every criterion has held. The server
133
+ * re-checks every criterion. The engine loads on the first `start()`.
134
+ */
135
+ declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
136
+ /** Prefetch the portrait engine (call when the portrait step mounts). */
137
+ declare function warmPortraitCapture(): void;
138
+
139
+ export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, FORM_ANSWER_LIMITS, FormInput, FormIssue, HostedFormView, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, ScreenRampColour, containsCardNumber, createDocumentCapture, createPortraitCapture, directionOf, formIssues, hasMultipleCameras, isFormDate, isFormNumber, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, todayIso, 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-FIXX2AXC.js";
10
- import "./chunk-7TC6TOZ4.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 de,c as ue}from"./chunk-GFJATPUR.js";import{A as pe,a as W,f as q,h as J,i as h,j as P,k as v,l as R,m as g,n as Q,o as j,p as X,q as $,r as ee,s as te,t as oe,u as re,v as ne,w as ie,x as ae,y as se}from"./chunk-OEQJ62CC.js";import{F as z,G as Y,H as S,I as f,J as y}from"./chunk-UTPUHE4J.js";import{e as G,f as U,g as F,h as B,o as w}from"./chunk-7252SFZ6.js";import{b as x,c as T,d as V}from"./chunk-7QZWBDI5.js";import{o as b,p as N}from"./chunk-S5BUCUZ4.js";import"./chunk-SX7TUC3V.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import{a as K,b as k,c as _,h as Z}from"./chunk-ODI4A5K4.js";import"./chunk-TSA6GHUG.js";import"./chunk-A7QFTU6M.js";import"./chunk-FSSMUAKC.js";function ce(e){if(e==="permission")return"denied";if(e==="notfound"||e==="insecure"||e==="unsupported")return"no_camera"}var le=/^[A-Z0-9][A-Z0-9 -]{0,39}$/,me=Object.freeze({normalize:e=>e.trim().toUpperCase().replace(/\s+/g," "),check:e=>le.test(e),registrySources:Object.freeze([]),describe:"number must be 1 to 40 letters, digits, spaces or hyphens"}),Ce=/^[A-Z0-9]{4,20}$/,m=e=>e.trim().toUpperCase().replace(/[\s-]+/g,""),Se=Object.freeze({normalize:m,check:e=>Ce.test(m(e)),registrySources:Object.freeze([]),describe:"number must be 4 to 20 letters or digits"});function fe(e){return typeof e=="string"&&/^\d{10}$/.test(e)&&Number(e)%97===1}var ye={trim:e=>e.trim(),upper_single_space:e=>e.trim().toUpperCase().replace(/\s+/g," "),upper_no_space_or_hyphen:m},he={mr_nni_mod97:e=>fe(e)};function Pe(e){let t=new RegExp(e.pattern,"u"),r=e.check===null?void 0:he[e.check];return Object.freeze({normalize:ye[e.normalize],check:n=>t.test(n.trim())&&(r===void 0||r(n)),registrySources:Object.freeze([...e.registrySources]),describe:e.describe})}var ve=Object.freeze(Object.fromEntries(Object.entries(S).map(([e,t])=>[e,Pe(t)])));function C(e,t){return ve[`${e.toUpperCase()}:${t}`]??(t==="drivers_license"?Se:me)}var Re=Object.freeze({MRT:"MR"});function M(e,t){let r=e.trim().toUpperCase();return C(Re[r]??r,t)}function ge(e){let t=M(e.issuingCountry,e.type);return t.check(t.normalize(e.number))}function Me(e){return C("MR","national_id").check(e)}function H(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 He(e){return H(e)}var Ze=h,ze=P,Ye=v,We=R,qe=g;var E=()=>import("./create-document-capture-V7XCRRDV.js");function A(e){let t=null,r=null,n=!1,d=null,l=null,u=[],i=(o,s)=>{o.off=s.on(o.event,o.handler)},a=()=>(r??(r=E().then(o=>{if(n)return null;let s=o.createDocumentCaptureInternal(e,{}).handle;for(let c of u)c.removed||i(c,s);return d!==null&&s.setSide(d),l!==null&&s.setGuide(l.guide),t=s,s})),r),p=()=>a().catch(()=>{if(r=null,!n)for(let o of u)!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 u.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):d=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,u.length=0}}}function D(){E().then(e=>e.warmDocumentCapture()).catch(()=>{})}function $e(e){return A(e)}function et(){D()}var O=()=>import("./create-portrait-capture-5VGYZUOK.js");function L(e){let t=null,r=null,n=!1,d=[],l=(i,a)=>{i.off=a.on(i.event,i.handler)},u=()=>(r??(r=O().then(i=>{if(n)return null;let a=i.createPortraitCaptureInternal(e).handle;for(let p of d)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 d.push(p),t!==null&&l(p,t),()=>{p.removed=!0,p.off?.()}},start:async i=>{let a=await u();a!==null&&!n&&await a.start(i)},retry:()=>{t!==null?t.retry():u().then(i=>i?.start())},switchCamera:()=>t?.switchCamera()??!1,canSwitchCaptureMode:async()=>!1,setCaptureMode:async()=>!1,destroy:()=>{n=!0,t?.destroy(),t=null,d.length=0}}}function I(){O().then(e=>e.warmPortraitCapture()).catch(()=>{})}function it(e){return L(e)}function at(){I()}export{W as DEFAULT_API_ORIGIN,Ze as DOCUMENT_TYPE_ORDER,z as FORM_ANSWERS_INVALID,Q as FORM_ANSWER_LIMITS,Y as FormAnswersError,_ as HostedApiError,J as ISSUER_CODES,f as InvalidInputError,K as KNOWN_CODES,y as OtpInputError,ne as PLATFORM_UNSUPPORTED,b as SCREEN_RAMP_COLOURS,de as SEKYRO_EVENTS,re as WEB_IDENTITY_METHODS,Ye as acceptedIssuers,ze as acceptedTypesFor,ce as cameraUnavailableCauseOf,ee as containsCardNumber,$e as createDocumentCapture,w as createLivenessCapture,it as createPortraitCapture,q as createVerification,pe as deriveStep,j as directionOf,qe as flagOf,oe as formIssues,U as getLivenessAssetsStatus,V as hasMultipleCameras,Z as icaoPolicyOf,X as isFormDate,$ as isFormNumber,k as isKnownCode,ge as isValidIdNumber,Me as isValidNni,ae as laneOf,H as normalizeDigits,He as normalizeNni,ue as openHosted,se as otherOptions,G as preloadLivenessAssets,x as queryCameraPermission,B as releaseLivenessAssets,We as resolveAcceptedDocuments,N as screenRampColourValue,ie as sectionOf,T as subscribeCameraPermission,F as subscribeLivenessAssets,te as todayIso,et as warmDocumentCapture,at as warmPortraitCapture};