@innovatrics/dot-document-auto-capture
Version:
Digital onboarding document capture
2 lines (1 loc) • 3.51 kB
JavaScript
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e["@innovatrics/dot-events-auto-capture"]={}))})(this,function(e){"use strict";const o={};o.CONTINUE_DETECTION="continue-detection",o.SWITCH_CAMERA="switch-camera",o.TOGGLE_MIRROR="toggle-mirror";const d=o,T={};T.FIRST_FRAME="first-frame",T.FIRST_VALID_FRAME="first-valid-frame";const m=T,C={};C.REQUEST_CAPTURE="dot-custom-event:request-capture";const N=C;var _=(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))(_||{}),p=(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))(p||{}),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||{}),S=(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))(S||{}),I=(t=>(t.STATUS_CHANGED="eye-gaze-auto-capture:status-changed",t))(I||{});const O=(t,E)=>{const u={};u.detail=E,document.dispatchEvent(new CustomEvent(t,u))},D=(t,E)=>{const u={};u.instruction=E,O(t,u)};function l(t){const E={};E.instruction=t;const u=E;O(N.REQUEST_CAPTURE,u)}const r={};r.FRONT="user",r.REAR="environment";const h=r,i={};i.AUTO_CAPTURE="AUTO_CAPTURE",i.WAIT_FOR_REQUEST="WAIT_FOR_REQUEST";const f=i,s={};s.LOADING="LOADING",s.ERROR="ERROR",s.WAITING="WAITING",s.RUNNING="RUNNING";const v=s,n={};n.CANDIDATE_SELECTION="candidate_selection",n.DOCUMENT_CENTERING="document_centering",n.DOCUMENT_NOT_PRESENT="document_not_present",n.DOCUMENT_TOO_FAR="document_too_far",n.SHARPNESS_TOO_LOW="sharpness_too_low",n.BRIGHTNESS_TOO_LOW="brightness_too_low",n.BRIGHTNESS_TOO_HIGH="brightness_too_high",n.HOTSPOTS_PRESENT="hotspots_present";const a=n,c={};c.isPresent=a.DOCUMENT_NOT_PRESENT,c.isNotSmall=a.DOCUMENT_TOO_FAR,c.isNotOutOfBounds=a.DOCUMENT_CENTERING,c.isSharp=a.SHARPNESS_TOO_LOW,c.isNotDim=a.BRIGHTNESS_TOO_LOW,c.isNotBright=a.BRIGHTNESS_TOO_HIGH,c.noHotspots=a.HOTSPOTS_PRESENT;const G=c;e.AppStateValues=v,e.CaptureMode=f,e.ComponentCustomEvent=N,e.ControlEventInstruction=d,e.DocumentCheckToInstructionCodeMap=G,e.DocumentCustomEvent=_,e.DocumentInstructionCodeValues=a,e.FacingMode=h,e.RequestCaptureInstruction=m,e.dispatchCaptureEvent=l,e.dispatchControlEvent=D,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});