@sekyro/web 0.1.0-rc.27 → 0.1.0-rc.29

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 (62) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +4 -1
  3. package/dist/barcode-detect-C5IOXMKI.js +1 -0
  4. package/dist/{capture-session-doc-FRBI7OKF.js → capture-session-doc-YC4CT2EQ.js} +1 -1
  5. package/dist/{capture-session-v3-DZmmTeDY.d.cts → capture-session-v3-CTQL6eFd.d.cts} +1 -1
  6. package/dist/{capture-session-v3-CjaciYJQ.d.ts → capture-session-v3-DHlOE6cS.d.ts} +1 -1
  7. package/dist/{challenge-frame-NUGPTWFP.js → challenge-frame-5GG4NDF5.js} +1 -1
  8. package/dist/{chunk-Y5ZLVLCU.js → chunk-34IITQFB.js} +1 -1
  9. package/dist/chunk-6AH7FXVC.js +1 -0
  10. package/dist/chunk-AL6LIOLW.js +1 -0
  11. package/dist/chunk-BF7CLNFA.js +1 -0
  12. package/dist/chunk-CKHBGAUA.js +1 -0
  13. package/dist/chunk-EVIGRYOX.js +3 -0
  14. package/dist/chunk-FVWFAO45.js +1 -0
  15. package/dist/{chunk-U3JUGEIW.js → chunk-IA5M34P7.js} +1 -1
  16. package/dist/chunk-JLVZ35QK.js +2 -0
  17. package/dist/{chunk-4DEPREJ3.js → chunk-KXFHVAYQ.js} +1 -1
  18. package/dist/chunk-VVUQ4PFU.js +1 -0
  19. package/dist/{chunk-HLV2XYHX.js → chunk-WOVWAJD4.js} +1 -1
  20. package/dist/chunk-XIKMTHHH.js +1 -0
  21. package/dist/chunk-ZKF2XMNX.js +1 -0
  22. package/dist/client/index.cjs +1 -1
  23. package/dist/client/index.d.cts +3 -3
  24. package/dist/client/index.d.ts +3 -3
  25. package/dist/client/index.js +1 -1
  26. package/dist/core/index.cjs +1 -1
  27. package/dist/core/index.d.cts +3 -3
  28. package/dist/core/index.d.ts +3 -3
  29. package/dist/core/index.js +1 -1
  30. package/dist/core/ocr/worker.js +1 -1
  31. package/dist/create-document-capture-O64FR2DA.js +1 -0
  32. package/dist/{create-verification-ClZ9Nvop.d.ts → create-verification-BvldYuLZ.d.ts} +131 -16
  33. package/dist/{create-verification-CnsFqT2E.d.cts → create-verification-DzPluhA3.d.cts} +131 -16
  34. package/dist/{detector-scanic-23DAYT3H.js → detector-scanic-SE3CL55N.js} +1 -1
  35. package/dist/{icao-gate-DWexlqVW.d.ts → icao-gate-DveU9Cr8.d.ts} +1 -1
  36. package/dist/{icao-gate-Dfpj4nT4.d.cts → icao-gate-xyWB7dz2.d.cts} +1 -1
  37. package/dist/{icao-policy-eLrX6Twc.d.ts → icao-policy-BWu1JLgi.d.cts} +12 -3
  38. package/dist/{icao-policy-BnXH_-WM.d.cts → icao-policy-OOEQDG9_.d.ts} +12 -3
  39. package/dist/index.cjs +2 -2
  40. package/dist/index.d.cts +40 -8
  41. package/dist/index.d.ts +40 -8
  42. package/dist/index.js +1 -1
  43. package/dist/internal/index.cjs +2 -2
  44. package/dist/internal/index.d.cts +6 -6
  45. package/dist/internal/index.d.ts +6 -6
  46. package/dist/internal/index.js +1 -1
  47. package/dist/plan-runner-WGMNUBWJ.js +1 -0
  48. package/dist/{types-BGUwaKjk.d.ts → types-CezFEXzl.d.cts} +169 -8
  49. package/dist/{types-BGUwaKjk.d.cts → types-CezFEXzl.d.ts} +169 -8
  50. package/package.json +6 -3
  51. package/sbom.cdx.json +125 -10
  52. package/dist/chunk-3XVIDHFY.js +0 -3
  53. package/dist/chunk-A3FUGHAH.js +0 -2
  54. package/dist/chunk-C5FD3ADY.js +0 -1
  55. package/dist/chunk-HVW2AB35.js +0 -1
  56. package/dist/chunk-NFHLJOHW.js +0 -1
  57. package/dist/chunk-SDDM5ZTK.js +0 -1
  58. package/dist/chunk-VXHK5YC6.js +0 -1
  59. package/dist/chunk-ZCOWTM46.js +0 -1
  60. package/dist/chunk-ZCZ2E2YN.js +0 -1
  61. package/dist/create-document-capture-2YBCDEUB.js +0 -1
  62. package/dist/plan-runner-KQM7I4MR.js +0 -1
package/dist/index.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-CnsFqT2E.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, F as DocumentLiveMrzOptions, G as DocumentMrzUpdate, H as DocumentPoint, I as DocumentQuad, J as DocumentReticle, K as DocumentScanPhase, L as DocumentScanUpdate, M as DocumentSide, N as DocumentSnapshot, O as DocumentStepHandle, Q as EidSnapshot, R as EidStepHandle, S as EmailOtpSnapshot, T as EmailOtpStepHandle, U as EmailSource, V as GateHint, W as GateUpdate, X as ISSUER_CODES, Y as IdentitySummarySnapshot, Z as IdentitySummaryStepHandle, _ as InLaneSwitch, $ as LivePhotoGateUpdate, a0 as LivePhotoPlan, a1 as LivenessAssetsStatus, a2 as LivenessCaptureEvents, a3 as LivenessCaptureHandle, a4 as LivenessCaptureOptions, a5 as LivenessSnapshot, a6 as LivenessStartOptions, a7 as LivenessStepHandle, a8 as MethodSnapshot, a9 as MethodStepHandle, aa as MobileRequiredSnapshot, ab as MobileRequiredStepHandle, ac as OtpChannel, ad as OtpNumberSource, ae as PLATFORM_UNSUPPORTED, af as PageCaptureHandle, ag as PhoneOtpSnapshot, ah as PhoneOtpStepHandle, ai as PhotoSourceState, aj as PlanChoiceSnapshot, ak as PortraitCaptureEvents, al as PortraitCaptureState, am as PortraitGateUpdate, an as PortraitSnapshot, ao as PortraitStartOptions, ap as PortraitStepHandle, aq as PreloadLivenessAssetsOptions, ar as ProcessingSnapshot, as as ProcessingStepHandle, at as ProofOfAddressSnapshot, au as ProofOfAddressStepHandle, av as ReasonCode, aw as RegistrySnapshot, ax as RegistrySource, ay as RegistryStepHandle, az as ResultDisplay, aA as ResultSnapshot, aB as ResultStepHandle, aC as SdkFailureReason, aD as StepAttempts, aE as StepContext, aF as StepSnapshot, aG as UnsupportedReason, aH as UnsupportedSnapshot, aI as UnsupportedStepHandle, aJ as Verification, aK as VerificationBusy, aL as VerificationEvents, aM as VerificationLocale, aN as VerificationOptions, aO as VerificationResult, aP as VerificationStatus, aQ as VerificationStep, aR as WEB_IDENTITY_METHODS, aS as acceptedIssuers, aT as acceptedTypesFor, aU as cameraUnavailableCauseOf, aV as createLivenessCapture, aW as createVerification, aX as deriveStep, aY as flagOf, aZ as getLivenessAssetsStatus, a_ as laneOf, a$ as otherOptions, b0 as preloadLivenessAssets, b1 as releaseLivenessAssets, b2 as resolveAcceptedDocuments, b3 as sectionOf, b4 as subscribeLivenessAssets } from './create-verification-CnsFqT2E.cjs';
3
- import { aZ as ScreenRampColour } from './types-BGUwaKjk.cjs';
4
- export { A as AcceptedDocumentType, a_ as AgeEstimationReason, a$ as CameraUnavailableCause, b0 as CaptureIssueReport, b as CaptureMode, b1 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, H as HostedAcceptedDocuments, b2 as HostedBranding, b3 as HostedBrandingColorKey, v as HostedCaptureTuning, w as HostedChallengeView, x as HostedConsentView, y as HostedDocumentCaptureTuning, z as HostedDocumentScanTuning, B as HostedDocumentsView, G as HostedEidView, I as HostedEmailOtpView, J as HostedFlowRef, K as HostedIcaoPolicy, L as HostedIntegrity, M as HostedLivePhotoTuning, b4 as HostedLivenessCaptureTuning, N as HostedNativeCaptureTuning, O as HostedOcrTuning, P as HostedOtpView, Q as HostedPlanView, R as HostedPoaRuleKindView, S as HostedPoaRuleView, T as HostedPortraitPendingFix, U as HostedPortraitView, V as HostedProofOfAddressView, W as HostedSessionView, X as HostedSimulationView, Y as HostedStepView, Z as HostedTesterGateView, _ as HostedVoiceLocale, $ as HostedVoiceView, b5 as IcaoCaptureTuning, a0 as IcaoCriterion, a1 as IcaoReportEntry, a2 as IdentityConfirmDecision, a3 as IdentityMethod, a4 as IdentitySummarySource, a5 as IdentitySummaryView, a8 as LivenessReason, a9 as MatchReason, ab as MethodChoiceView, ac as NationalEidOption, ad as NfcChipReason, ae as NfcStepView, af as OtpChoiceView, ag as PhoneCountryRule, ah as PhoneFormat, aj as PhoneOtpReason, ak as PhotoSource, al as PhotoSourcePick, am as PlanAttempts, an as PlanChoiceKind, ao as PlanChoiceOption, ap as PlanChoiceView, aq as PlanSectionView, ar as PlanStepView, au as PoaKind, aw as PoaNameMatchMode, ay as PoaReason, az as PoaRuleSource, aB as PopulationReason, aC as PortraitFix, aD as PortraitFixReviewInput, aE as PortraitIcaoInput, aF as PortraitIcaoReason, aG as PortraitOutputFormat, aK as ResolvedCaptureMode, b6 as RetakeHint, b7 as ScreenRampChallenge, b8 as ScreenRampPaint, b9 as ScreenRampRendered, ba as ScreenRampReport, aL as SessionDecidingStep, aM as SessionFailureReason, aN as SessionReason, aO as SessionStatus, aR as SimulatedCaptureInput, aS as StepResult, aT as StepSection, aV as TesterGateInput, aW as TesterGateResponse, aX as VerificationAssurance, aY as VerificationLevel } from './types-BGUwaKjk.cjs';
1
+ import { F as FormIssue, D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-DzPluhA3.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-DzPluhA3.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';
5
5
  export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.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-BnXH_-WM.cjs';
7
- export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-Dfpj4nT4.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
8
  import './detect-worker-CHqsPJoM.cjs';
9
- import './capture-session-v3-DZmmTeDY.cjs';
9
+ import './capture-session-v3-CTQL6eFd.cjs';
10
10
 
11
11
  /** The closed palette, in the order the backend lists it. */
12
12
  declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
@@ -82,6 +82,38 @@ declare function normalizeDigits(input: string): string;
82
82
  /** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
83
83
  declare function normalizeNni(input: string): string;
84
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
+
85
117
  /**
86
118
  * The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
87
119
  * residence permits and passport data pages of any issuing country. Live camera
@@ -104,4 +136,4 @@ declare function createPortraitCapture(options: PortraitCaptureOptions): Portrai
104
136
  /** Prefetch the portrait engine (call when the portrait step mounts). */
105
137
  declare function warmPortraitCapture(): void;
106
138
 
107
- export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
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,12 +1,12 @@
1
- import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-ClZ9Nvop.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, F as DocumentLiveMrzOptions, G as DocumentMrzUpdate, H as DocumentPoint, I as DocumentQuad, J as DocumentReticle, K as DocumentScanPhase, L as DocumentScanUpdate, M as DocumentSide, N as DocumentSnapshot, O as DocumentStepHandle, Q as EidSnapshot, R as EidStepHandle, S as EmailOtpSnapshot, T as EmailOtpStepHandle, U as EmailSource, V as GateHint, W as GateUpdate, X as ISSUER_CODES, Y as IdentitySummarySnapshot, Z as IdentitySummaryStepHandle, _ as InLaneSwitch, $ as LivePhotoGateUpdate, a0 as LivePhotoPlan, a1 as LivenessAssetsStatus, a2 as LivenessCaptureEvents, a3 as LivenessCaptureHandle, a4 as LivenessCaptureOptions, a5 as LivenessSnapshot, a6 as LivenessStartOptions, a7 as LivenessStepHandle, a8 as MethodSnapshot, a9 as MethodStepHandle, aa as MobileRequiredSnapshot, ab as MobileRequiredStepHandle, ac as OtpChannel, ad as OtpNumberSource, ae as PLATFORM_UNSUPPORTED, af as PageCaptureHandle, ag as PhoneOtpSnapshot, ah as PhoneOtpStepHandle, ai as PhotoSourceState, aj as PlanChoiceSnapshot, ak as PortraitCaptureEvents, al as PortraitCaptureState, am as PortraitGateUpdate, an as PortraitSnapshot, ao as PortraitStartOptions, ap as PortraitStepHandle, aq as PreloadLivenessAssetsOptions, ar as ProcessingSnapshot, as as ProcessingStepHandle, at as ProofOfAddressSnapshot, au as ProofOfAddressStepHandle, av as ReasonCode, aw as RegistrySnapshot, ax as RegistrySource, ay as RegistryStepHandle, az as ResultDisplay, aA as ResultSnapshot, aB as ResultStepHandle, aC as SdkFailureReason, aD as StepAttempts, aE as StepContext, aF as StepSnapshot, aG as UnsupportedReason, aH as UnsupportedSnapshot, aI as UnsupportedStepHandle, aJ as Verification, aK as VerificationBusy, aL as VerificationEvents, aM as VerificationLocale, aN as VerificationOptions, aO as VerificationResult, aP as VerificationStatus, aQ as VerificationStep, aR as WEB_IDENTITY_METHODS, aS as acceptedIssuers, aT as acceptedTypesFor, aU as cameraUnavailableCauseOf, aV as createLivenessCapture, aW as createVerification, aX as deriveStep, aY as flagOf, aZ as getLivenessAssetsStatus, a_ as laneOf, a$ as otherOptions, b0 as preloadLivenessAssets, b1 as releaseLivenessAssets, b2 as resolveAcceptedDocuments, b3 as sectionOf, b4 as subscribeLivenessAssets } from './create-verification-ClZ9Nvop.js';
3
- import { aZ as ScreenRampColour } from './types-BGUwaKjk.js';
4
- export { A as AcceptedDocumentType, a_ as AgeEstimationReason, a$ as CameraUnavailableCause, b0 as CaptureIssueReport, b as CaptureMode, b1 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, H as HostedAcceptedDocuments, b2 as HostedBranding, b3 as HostedBrandingColorKey, v as HostedCaptureTuning, w as HostedChallengeView, x as HostedConsentView, y as HostedDocumentCaptureTuning, z as HostedDocumentScanTuning, B as HostedDocumentsView, G as HostedEidView, I as HostedEmailOtpView, J as HostedFlowRef, K as HostedIcaoPolicy, L as HostedIntegrity, M as HostedLivePhotoTuning, b4 as HostedLivenessCaptureTuning, N as HostedNativeCaptureTuning, O as HostedOcrTuning, P as HostedOtpView, Q as HostedPlanView, R as HostedPoaRuleKindView, S as HostedPoaRuleView, T as HostedPortraitPendingFix, U as HostedPortraitView, V as HostedProofOfAddressView, W as HostedSessionView, X as HostedSimulationView, Y as HostedStepView, Z as HostedTesterGateView, _ as HostedVoiceLocale, $ as HostedVoiceView, b5 as IcaoCaptureTuning, a0 as IcaoCriterion, a1 as IcaoReportEntry, a2 as IdentityConfirmDecision, a3 as IdentityMethod, a4 as IdentitySummarySource, a5 as IdentitySummaryView, a8 as LivenessReason, a9 as MatchReason, ab as MethodChoiceView, ac as NationalEidOption, ad as NfcChipReason, ae as NfcStepView, af as OtpChoiceView, ag as PhoneCountryRule, ah as PhoneFormat, aj as PhoneOtpReason, ak as PhotoSource, al as PhotoSourcePick, am as PlanAttempts, an as PlanChoiceKind, ao as PlanChoiceOption, ap as PlanChoiceView, aq as PlanSectionView, ar as PlanStepView, au as PoaKind, aw as PoaNameMatchMode, ay as PoaReason, az as PoaRuleSource, aB as PopulationReason, aC as PortraitFix, aD as PortraitFixReviewInput, aE as PortraitIcaoInput, aF as PortraitIcaoReason, aG as PortraitOutputFormat, aK as ResolvedCaptureMode, b6 as RetakeHint, b7 as ScreenRampChallenge, b8 as ScreenRampPaint, b9 as ScreenRampRendered, ba as ScreenRampReport, aL as SessionDecidingStep, aM as SessionFailureReason, aN as SessionReason, aO as SessionStatus, aR as SimulatedCaptureInput, aS as StepResult, aT as StepSection, aV as TesterGateInput, aW as TesterGateResponse, aX as VerificationAssurance, aY as VerificationLevel } from './types-BGUwaKjk.js';
1
+ import { F as FormIssue, D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-BvldYuLZ.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-BvldYuLZ.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';
5
5
  export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.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-eLrX6Twc.js';
7
- export { c as HeadPose, I as IcaoCoachKey, d as IcaoCriterionState, e as IcaoGateCriterion, f as IcaoGateSummary, g as IcaoGateUpdate } from './icao-gate-DWexlqVW.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
8
  import './detect-worker-CHqsPJoM.js';
9
- import './capture-session-v3-CjaciYJQ.js';
9
+ import './capture-session-v3-DHlOE6cS.js';
10
10
 
11
11
  /** The closed palette, in the order the backend lists it. */
12
12
  declare const SCREEN_RAMP_COLOURS: readonly ScreenRampColour[];
@@ -82,6 +82,38 @@ declare function normalizeDigits(input: string): string;
82
82
  /** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
83
83
  declare function normalizeNni(input: string): string;
84
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
+
85
117
  /**
86
118
  * The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
87
119
  * residence permits and passport data pages of any issuing country. Live camera
@@ -104,4 +136,4 @@ declare function createPortraitCapture(options: PortraitCaptureOptions): Portrai
104
136
  /** Prefetch the portrait engine (call when the portrait step mounts). */
105
137
  declare function warmPortraitCapture(): void;
106
138
 
107
- export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
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 +1 @@
1
- import{a as ee,c as te}from"./chunk-GFJATPUR.js";import{a as z,f as Y,h as W,i as f,j as y,k as P,l as h,m as v,n as J,o as q,p as Q,q as X,r as j,t as $}from"./chunk-3XVIDHFY.js";import{D as C,E as S}from"./chunk-ZCZ2E2YN.js";import{e as G,f as U,g as B,h as w,o as K}from"./chunk-Y5ZLVLCU.js";import{b as x,c as T,d as V}from"./chunk-7QZWBDI5.js";import{o as b,p as N}from"./chunk-ZCOWTM46.js";import"./chunk-SX7TUC3V.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import{a as F,b as k,c as _,h as Z}from"./chunk-C5FD3ADY.js";import"./chunk-TSA6GHUG.js";import"./chunk-U3JUGEIW.js";import"./chunk-FSSMUAKC.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"}),ie=/^[A-Z0-9]{4,20}$/,R=e=>e.trim().toUpperCase().replace(/[\s-]+/g,""),g=Object.freeze({normalize:R,check:e=>ie.test(R(e)),registrySources:Object.freeze([]),describe:"number must be 4 to 20 letters or digits"});function ae(e){return typeof e=="string"&&/^\d{10}$/.test(e)&&Number(e)%97===1}var se=Object.freeze({normalize:e=>e.trim(),check:e=>ae(e),registrySources:Object.freeze(["MR.anrpts"]),describe:"number must be the 10-digit Mauritanian national ID number with a valid check digit"}),pe=Object.freeze({...g,check:e=>/^\d{8}$/.test(e.trim()),describe:"number must be the 8-digit Mauritanian driver's license number"}),de=Object.freeze({"MR:national_id":se,"MR:drivers_license":pe});function m(e,t){return de[`${e.toUpperCase()}:${t}`]??(t==="drivers_license"?g:ne)}var ue=Object.freeze({MRT:"MR"});function M(e,t){let r=e.trim().toUpperCase();return m(ue[r]??r,t)}function ce(e){let t=M(e.issuingCountry,e.type);return t.check(t.normalize(e.number))}function le(e){return m("MR","national_id").check(e)}function E(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 me(e){return E(e)}var Ie=f,be=y,Ne=P,xe=h,Te=v;var H=()=>import("./create-document-capture-2YBCDEUB.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=H().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(){H().then(e=>e.warmDocumentCapture()).catch(()=>{})}function we(e){return A(e)}function Ke(){D()}var L=()=>import("./create-portrait-capture-5VGYZUOK.js");function O(e){let t=null,r=null,n=!1,d=[],l=(i,a)=>{i.off=a.on(i.event,i.handler)},u=()=>(r??(r=L().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(){L().then(e=>e.warmPortraitCapture()).catch(()=>{})}function ze(e){return O(e)}function Ye(){I()}export{z as DEFAULT_API_ORIGIN,Ie as DOCUMENT_TYPE_ORDER,_ as HostedApiError,W as ISSUER_CODES,C as InvalidInputError,F as KNOWN_CODES,S as OtpInputError,q as PLATFORM_UNSUPPORTED,b as SCREEN_RAMP_COLOURS,ee as SEKYRO_EVENTS,J as WEB_IDENTITY_METHODS,Ne as acceptedIssuers,be as acceptedTypesFor,oe as cameraUnavailableCauseOf,we as createDocumentCapture,K as createLivenessCapture,ze as createPortraitCapture,Y as createVerification,$ as deriveStep,Te as flagOf,U as getLivenessAssetsStatus,V as hasMultipleCameras,Z as icaoPolicyOf,k as isKnownCode,ce as isValidIdNumber,le as isValidNni,X as laneOf,E as normalizeDigits,me as normalizeNni,te as openHosted,j as otherOptions,G as preloadLivenessAssets,x as queryCameraPermission,w as releaseLivenessAssets,xe as resolveAcceptedDocuments,N as screenRampColourValue,Q as sectionOf,T as subscribeCameraPermission,B as subscribeLivenessAssets,Ke as warmDocumentCapture,Ye as warmPortraitCapture};
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-EVIGRYOX.js";import{F as z,G as Y,H as S,I as f,J as y}from"./chunk-BF7CLNFA.js";import{e as G,f as U,g as F,h as B,o as w}from"./chunk-34IITQFB.js";import{b as x,c as T,d as V}from"./chunk-7QZWBDI5.js";import{o as b,p as N}from"./chunk-AL6LIOLW.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-6AH7FXVC.js";import"./chunk-TSA6GHUG.js";import"./chunk-IA5M34P7.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-O64FR2DA.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};