@innovatrics/dot-document-auto-capture
Version:
Digital onboarding document capture
2 lines (1 loc) • 3.69 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 p=o,T={};T.FIRST_FRAME="first-frame",T.FIRST_VALID_FRAME="first-valid-frame";const A=T,C={};C.REQUEST_CAPTURE="dot-custom-event:request-capture";const N=C;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||{}),R=(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))(R||{}),S=(t=>(t.ANIMATION_END="magnifeye-auto-capture:animation-end",t.CONTROL="magnifeye-auto-capture:control",t.STATUS_CHANGED="magnifeye-auto-capture:status-changed",t))(S||{}),I=(t=>(t.CONTROL="smile-auto-capture:control",t.INSTRUCTION_ESCALATED="smile:instruction-escalated",t.STATUS_CHANGED="smile-auto-capture:status-changed",t))(I||{}),D=(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))(D||{}),l=(t=>(t.CONTROL="eye-gaze-auto-capture:control",t.STATUS_CHANGED="eye-gaze-auto-capture:status-changed",t))(l||{});const d=(t,E)=>{const u={};u.detail=E,document.dispatchEvent(new CustomEvent(t,u))},h=(t,E)=>{const u={};u.instruction=E,d(t,u)};function v(t){const E={};E.instruction=t;const u=E;d(N.REQUEST_CAPTURE,u)}const r={};r.FRONT="user",r.REAR="environment";const g=r,i={};i.AUTO_CAPTURE="AUTO_CAPTURE",i.WAIT_FOR_REQUEST="WAIT_FOR_REQUEST";const G=i,s={};s.LOADING="LOADING",s.ERROR="ERROR",s.WAITING="WAITING",s.RUNNING="RUNNING";const _=s,m={..._};m.DONE="DONE";const H=m,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 c=n,a={};a.isPresent=c.DOCUMENT_NOT_PRESENT,a.isNotSmall=c.DOCUMENT_TOO_FAR,a.isNotOutOfBounds=c.DOCUMENT_CENTERING,a.isSharp=c.SHARPNESS_TOO_LOW,a.isNotDim=c.BRIGHTNESS_TOO_LOW,a.isNotBright=c.BRIGHTNESS_TOO_HIGH,a.noHotspots=c.HOTSPOTS_PRESENT;const U=a;e.AppStateValues=_,e.CaptureMode=G,e.ComponentCustomEvent=N,e.ControlEventInstruction=p,e.DocumentCheckToInstructionCodeMap=U,e.DocumentCustomEvent=O,e.DocumentInstructionCodeValues=c,e.FacingMode=g,e.LivenessStateValues=H,e.RequestCaptureInstruction=A,e.dispatchCaptureEvent=v,e.dispatchControlEvent=h,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});