@innovatrics/dot-document-auto-capture
Version:
Digital onboarding document capture
2 lines (1 loc) • 2.37 kB
JavaScript
(function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t["@innovatrics/dot-events-auto-capture"]={}))})(this,(function(t){"use strict";const o={};o.CONTINUE_DETECTION="continue-detection",o.SWITCH_CAMERA="switch-camera",o.TOGGLE_MIRROR="toggle-mirror";const S=o,a={};a.FIRST_FRAME="first-frame",a.FIRST_VALID_FRAME="first-valid-frame";const R=a,_={};_.REQUEST_CAPTURE="dot-custom-event:request-capture";const T=_,r=(n,i)=>{const E={};E.detail=i,document.dispatchEvent(new CustomEvent(n,E))},m=(n,i)=>{const E={};E.instruction=i,r(n,E)};function I(n){const i={};i.instruction=n;const E=i;r(T.REQUEST_CAPTURE,E)}const u={};u.LOADING="loading",u.ERROR="error",u.WAITING="waiting",u.RUNNING="running",u.COMPLETE="complete",u.BLURRED="blurred";const d=u,O={...d};O.DONE="done";const p=O,C={};C.EYE_NOT_PRESENT="eye_not_present";const l=C,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 s=e,c={};c.isPresent=s.DOCUMENT_NOT_PRESENT,c.isNotSmall=s.DOCUMENT_TOO_FAR,c.isNotOutOfBounds=s.DOCUMENT_CENTERING,c.isSharp=s.SHARPNESS_TOO_LOW,c.isNotDim=s.BRIGHTNESS_TOO_LOW,c.isNotBright=s.BRIGHTNESS_TOO_HIGH,c.noHotspots=s.HOTSPOTS_PRESENT;const D=c;var N=(n=>(n.CAMERA_PROPS_CHANGED="document-auto-capture:camera-props-changed",n.CONTROL="document-auto-capture:control",n.DETECTION_CHANGED="document-auto-capture:detection-changed",n.INSTRUCTION_CHANGED="document-auto-capture:instruction-changed",n.INSTRUCTION_ESCALATED="document-auto-capture:instruction-escalated",n.STATE_CHANGED="document-auto-capture:state-changed",n.VIDEO_ELEMENT_SIZE="document-auto-capture:video-element-size",n))(N||{});t.AppStateValues=d,t.ComponentCustomEvent=T,t.ControlEventInstruction=S,t.DocumentCheckToInstructionCodeMap=D,t.DocumentCustomEvent=N,t.DocumentInstructionCodeValues=s,t.EyeInstructionCodeValues=l,t.LivenessStateValues=p,t.RequestCaptureInstruction=R,t.dispatchCaptureEvent=I,t.dispatchControlEvent=m,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));