@innovatrics/dot-document-auto-capture
Version:
Digital onboarding document capture
46 lines (45 loc) • 3.57 kB
JavaScript
const u = {};
u.CONTINUE_DETECTION = "continue-detection", u.SWITCH_CAMERA = "switch-camera", u.TOGGLE_MIRROR = "toggle-mirror";
const I = u, T = {};
T.FIRST_FRAME = "first-frame", T.FIRST_VALID_FRAME = "first-valid-frame";
const D = T, N = {};
N.REQUEST_CAPTURE = "dot-custom-event:request-capture";
const _ = N;
var O = ((t) => (t.CAMERA_PROPS_CHANGED = "document-auto-capture:camera-props-changed", t.CONTROL = "document-auto-capture:control", t.DETECTED_DOCUMENT_CHANGED = "document-auto-capture:detected-document-changed", t.DOCUMENT_DETECTION = "document-auto-capture:document-detection", t.INSTRUCTION_CHANGED = "document-auto-capture:instruction-changed", t.INSTRUCTION_ESCALATED = "document-auto-capture:instruction-escalated", t.STATE_CHANGED = "document-auto-capture:state-changed", t.VIDEO_ELEMENT_SIZE = "document-auto-capture:video-element-size", t))(O || {}), i = ((t) => (t.CAMERA_PROPS_CHANGED = "face-auto-capture:camera-props-changed", t.CONTROL = "face-auto-capture:control", t.DETECTED_FACE_CHANGED = "face-auto-capture:detected-face-changed", t.FACE_DETECTION = "face-auto-capture:face-detection", t.INSTRUCTION_CHANGED = "face-auto-capture:instruction-changed", t.STATE_CHANGED = "face-auto-capture:state-changed", t.VIDEO_ELEMENT_SIZE = "face-auto-capture:video-element-size", t))(i || {}), A = ((t) => (t.ANIMATION_END = "magnifeye-auto-capture:animation-end", t.STATUS_CHANGED = "magnifeye-auto-capture:status-changed", t))(A || {}), R = ((t) => (t.INSTRUCTION_ESCALATED = "smile:instruction-escalated", t.STATUS_CHANGED = "smile-auto-capture:status-changed", t))(R || {}), p = ((t) => (t.CAMERA_PROPS_CHANGED = "palm-capture:camera-props-changed", t.CONTROL = "palm-capture:control", t.DETECTED_PALM_CHANGED = "palm-capture:detected-palm-changed", t.INSTRUCTION_CHANGED = "palm-capture:instruction-changed", t.STATE_CHANGED = "palm-capture:state-changed", t.VIDEO_ELEMENT_SIZE = "palm-capture:video-element-size", t))(p || {}), S = ((t) => (t.STATUS_CHANGED = "eye-gaze-auto-capture:status-changed", t))(S || {});
const C = (t, c) => {
const o = {};
o.detail = c, document.dispatchEvent(new CustomEvent(t, o));
}, d = (t, c) => {
const o = {};
o.instruction = c, C(t, o);
};
function G(t) {
const c = {};
c.instruction = t;
const o = c;
C(_.REQUEST_CAPTURE, o);
}
const s = {};
s.FRONT = "user", s.REAR = "environment";
const l = s, r = {};
r.AUTO_CAPTURE = "AUTO_CAPTURE", r.WAIT_FOR_REQUEST = "WAIT_FOR_REQUEST";
const h = r, E = {};
E.LOADING = "LOADING", E.ERROR = "ERROR", E.WAITING = "WAITING", E.RUNNING = "RUNNING";
const H = E, e = {};
e.CANDIDATE_SELECTION = "candidate_selection", e.DOCUMENT_CENTERING = "document_centering", e.DOCUMENT_NOT_PRESENT = "document_not_present", e.DOCUMENT_TOO_FAR = "document_too_far", e.SHARPNESS_TOO_LOW = "sharpness_too_low", e.BRIGHTNESS_TOO_LOW = "brightness_too_low", e.BRIGHTNESS_TOO_HIGH = "brightness_too_high", e.HOTSPOTS_PRESENT = "hotspots_present";
const a = e, n = {};
n.isPresent = a.DOCUMENT_NOT_PRESENT, n.isNotSmall = a.DOCUMENT_TOO_FAR, n.isNotOutOfBounds = a.DOCUMENT_CENTERING, n.isSharp = a.SHARPNESS_TOO_LOW, n.isNotDim = a.BRIGHTNESS_TOO_LOW, n.isNotBright = a.BRIGHTNESS_TOO_HIGH, n.noHotspots = a.HOTSPOTS_PRESENT;
const U = n;
export {
H as AppStateValues,
h as CaptureMode,
_ as ComponentCustomEvent,
I as ControlEventInstruction,
U as DocumentCheckToInstructionCodeMap,
O as DocumentCustomEvent,
a as DocumentInstructionCodeValues,
l as FacingMode,
D as RequestCaptureInstruction,
G as dispatchCaptureEvent,
d as dispatchControlEvent
};