UNPKG

@seontechnologies/seon-id-verification

Version:

An advanced SDK featuring web components for natural person identification through document scanning, facial recognition, hand gesture, and face turning detection, designed for secure and efficient user verification.

34 lines (33 loc) 1.12 kB
var m = Object.defineProperty; var d = (e, t, r) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r; var i = (e, t, r) => d(e, typeof t != "symbol" ? t + "" : t, r); import { a as n, t as R, i as a, l as o, c as h } from "./index-oGnhSncZ.mjs"; class u { constructor(t, r) { i(this, "errorCode"); i(this, "counter", 0); i(this, "RetryLimit"); var s; this.errorCode = t, this.RetryLimit = r === "liveness" ? n.config.livenessRetryLimit : (s = n.config.idVerificationSettings) == null ? void 0 : s.documentCaptureLimit; } handleRetry(t) { if (!this.RetryLimit) { R({ ERROR: "Retry limit is not defined" }); return; } this.counter++, this.counter >= this.RetryLimit ? R({ logo: "general-error", title: o.error_many_attempts_title, description: o.error_many_attempts_description, btnText: o.restart_button, ERROR: "Retry limit reached", btnAction: () => { h("error", this.errorCode), this.counter = 0; }, hideBtn: a() }) : t == null || t(); } } export { u as R };