@innovatrics/dot-face-auto-capture
Version:
Digital onboarding selfie capture
2 lines (1 loc) • 4.2 kB
JavaScript
(function(e,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(e=typeof globalThis<"u"?globalThis:e||self,c(e["@innovatrics/dot-events-auto-capture"]={}))})(this,function(e){"use strict";const c={};c.CONTINUE_DETECTION="continue-detection",c.SWITCH_CAMERA="switch-camera",c.TOGGLE_MIRROR="toggle-mirror";const I=c,s={};s.FIRST_FRAME="first-frame",s.FIRST_VALID_FRAME="first-valid-frame";const m=s,i={};i.REQUEST_CAPTURE="dot-custom-event:request-capture";const O=i;var d=(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))(d||{}),C=(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))(C||{}),l=(t=>(t.ANIMATION_END="magnifeye-auto-capture:animation-end",t.CONTROL="magnifeye-auto-capture:control",t.STATUS_CHANGED="magnifeye-auto-capture:status-changed",t))(l||{}),h=(t=>(t.CONTROL="smile-auto-capture:control",t.INSTRUCTION_ESCALATED="smile:instruction-escalated",t.STATUS_CHANGED="smile-auto-capture:status-changed",t))(h||{}),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||{}),H=(t=>(t.CONTROL="eye-gaze-auto-capture:control",t.STATUS_CHANGED="eye-gaze-auto-capture:status-changed",t))(H||{});const N=(t,a)=>{const u={};u.detail=a,document.dispatchEvent(new CustomEvent(t,u))},g=(t,a)=>{const u={};u.instruction=a,N(t,u)};function f(t){const a={};a.instruction=t;const u=a;N(O.REQUEST_CAPTURE,u)}const _={};_.FRONT="user",_.REAR="environment";const v=_,r={};r.AUTO_CAPTURE="AUTO_CAPTURE",r.WAIT_FOR_REQUEST="WAIT_FOR_REQUEST";const G=r,T={};T.LOADING="LOADING",T.ERROR="ERROR",T.WAITING="WAITING",T.RUNNING="RUNNING";const R=T,S={...R};S.DONE="DONE";const P=S,A={};A.EYE_NOT_PRESENT="eye_not_present";const p=A,o={};o.CANDIDATE_SELECTION="candidate_selection",o.FACE_TOO_CLOSE="face_too_close",o.FACE_TOO_FAR="face_too_far",o.FACE_CENTERING="face_centering",o.FACE_NOT_PRESENT="face_not_present",o.SHARPNESS_TOO_LOW="sharpness_too_low",o.BRIGHTNESS_TOO_LOW="brightness_too_low",o.BRIGHTNESS_TOO_HIGH="brightness_too_high",o.DEVICE_PITCHED="device_pitched",o.LEFT_EYE_NOT_PRESENT="left_"+p.EYE_NOT_PRESENT,o.RIGHT_EYE_NOT_PRESENT="right_"+p.EYE_NOT_PRESENT,o.MOUTH_NOT_PRESENT="mouth_not_present",o.MOUTH_SCORE_TOO_HIGH="mouth_score_too_high",o.MOUTH_SCORE_TOO_LOW="mouth_score_too_low";const n=o,E={};E.isPresent=n.FACE_NOT_PRESENT,E.isNotPitched=n.DEVICE_PITCHED,E.isNotSmall=n.FACE_TOO_FAR,E.isNotLarge=n.FACE_TOO_CLOSE,E.isNotOutOfBounds=n.FACE_CENTERING,E.isNotDim=n.BRIGHTNESS_TOO_LOW,E.isNotBright=n.BRIGHTNESS_TOO_HIGH,E.isSharp=n.SHARPNESS_TOO_LOW,E.isLeftEyePresent=n.LEFT_EYE_NOT_PRESENT,E.isRightEyePresent=n.RIGHT_EYE_NOT_PRESENT,E.isMouthPresent=n.MOUTH_NOT_PRESENT,E.isMouthScoreNotTooHigh=n.MOUTH_SCORE_TOO_HIGH,E.isMouthScoreNotTooLow=n.MOUTH_SCORE_TOO_LOW;const L=E;e.AppStateValues=R,e.CaptureMode=G,e.ComponentCustomEvent=O,e.ControlEventInstruction=I,e.FaceCheckToInstructionCodeMap=L,e.FaceCustomEvent=C,e.FaceInstructionCodeValues=n,e.FacingMode=v,e.LivenessStateValues=P,e.RequestCaptureInstruction=m,e.dispatchCaptureEvent=f,e.dispatchControlEvent=g,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});