@ahmed_hani/dot-document-auto-capture 7.6.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/events.mjs CHANGED
@@ -1,51 +1,44 @@
1
- const u = {};
2
- u.CONTINUE_DETECTION = "continue-detection", u.SWITCH_CAMERA = "switch-camera", u.TOGGLE_MIRROR = "toggle-mirror";
3
- const l = u, s = {};
4
- s.FIRST_FRAME = "first-frame", s.FIRST_VALID_FRAME = "first-valid-frame";
5
- const G = s, N = {};
6
- N.REQUEST_CAPTURE = "dot-custom-event:request-capture";
7
- const i = N;
8
- var R = ((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))(R || {}), 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.CONTROL = "magnifeye-auto-capture:control", t.STATUS_CHANGED = "magnifeye-auto-capture:status-changed", t))(A || {}), S = ((t) => (t.CONTROL = "smile-auto-capture:control", t.INSTRUCTION_ESCALATED = "smile:instruction-escalated", t.STATUS_CHANGED = "smile-auto-capture:status-changed", t))(S || {}), 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 || {}), m = ((t) => (t.CONTROL = "eye-gaze-auto-capture:control", t.STATUS_CHANGED = "eye-gaze-auto-capture:status-changed", t))(m || {});
9
- const O = (t, E) => {
1
+ const _ = {};
2
+ _.CONTINUE_DETECTION = "continue-detection", _.SWITCH_CAMERA = "switch-camera", _.TOGGLE_MIRROR = "toggle-mirror";
3
+ const S = _, T = {};
4
+ T.FIRST_FRAME = "first-frame", T.FIRST_VALID_FRAME = "first-valid-frame";
5
+ const R = T, u = {};
6
+ u.REQUEST_CAPTURE = "dot-custom-event:request-capture";
7
+ const N = u, a = (t, s) => {
10
8
  const n = {};
11
- n.detail = E, document.dispatchEvent(new CustomEvent(t, n));
12
- }, g = (t, E) => {
9
+ n.detail = s, document.dispatchEvent(new CustomEvent(t, n));
10
+ }, I = (t, s) => {
13
11
  const n = {};
14
- n.instruction = E, O(t, n);
12
+ n.instruction = s, a(t, n);
15
13
  };
16
- function h(t) {
17
- const E = {};
18
- E.instruction = t;
19
- const n = E;
20
- O(i.REQUEST_CAPTURE, n);
14
+ function m(t) {
15
+ const s = {};
16
+ s.instruction = t;
17
+ const n = s;
18
+ a(N.REQUEST_CAPTURE, n);
21
19
  }
22
- const T = {};
23
- T.FRONT = "user", T.REAR = "environment";
24
- const H = T, r = {};
25
- r.AUTO_CAPTURE = "AUTO_CAPTURE", r.WAIT_FOR_REQUEST = "WAIT_FOR_REQUEST";
26
- const U = r, c = {};
27
- c.LOADING = "LOADING", c.ERROR = "ERROR", c.WAITING = "WAITING", c.RUNNING = "RUNNING", c.COMPLETE = "COMPLETE";
28
- const I = c, C = { ...I };
29
- C.DONE = "DONE";
30
- const v = C, _ = {};
31
- _.EYE_NOT_PRESENT = "eye_not_present";
32
- const M = _, e = {};
20
+ const E = {};
21
+ E.LOADING = "loading", E.ERROR = "error", E.WAITING = "waiting", E.RUNNING = "running", E.COMPLETE = "complete";
22
+ const i = E, r = { ...i };
23
+ r.DONE = "done";
24
+ const p = r, O = {};
25
+ O.EYE_NOT_PRESENT = "eye_not_present";
26
+ const A = O, e = {};
33
27
  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";
34
- const a = e, o = {};
35
- o.isPresent = a.DOCUMENT_NOT_PRESENT, o.isNotSmall = a.DOCUMENT_TOO_FAR, o.isNotOutOfBounds = a.DOCUMENT_CENTERING, o.isSharp = a.SHARPNESS_TOO_LOW, o.isNotDim = a.BRIGHTNESS_TOO_LOW, o.isNotBright = a.BRIGHTNESS_TOO_HIGH, o.noHotspots = a.HOTSPOTS_PRESENT;
36
- const L = o;
28
+ const c = e, o = {};
29
+ o.isPresent = c.DOCUMENT_NOT_PRESENT, o.isNotSmall = c.DOCUMENT_TOO_FAR, o.isNotOutOfBounds = c.DOCUMENT_CENTERING, o.isSharp = c.SHARPNESS_TOO_LOW, o.isNotDim = c.BRIGHTNESS_TOO_LOW, o.isNotBright = c.BRIGHTNESS_TOO_HIGH, o.noHotspots = c.HOTSPOTS_PRESENT;
30
+ const D = o;
31
+ var C = ((t) => (t.CAMERA_PROPS_CHANGED = "document-auto-capture:camera-props-changed", t.CONTROL = "document-auto-capture:control", t.DETECTION_CHANGED = "document-auto-capture:detection-changed", 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))(C || {});
37
32
  export {
38
- I as AppStateValues,
39
- U as CaptureMode,
40
- i as ComponentCustomEvent,
41
- l as ControlEventInstruction,
42
- L as DocumentCheckToInstructionCodeMap,
43
- R as DocumentCustomEvent,
44
- a as DocumentInstructionCodeValues,
45
- M as EyeInstructionCodeValues,
46
- H as FacingMode,
47
- v as LivenessStateValues,
48
- G as RequestCaptureInstruction,
49
- h as dispatchCaptureEvent,
50
- g as dispatchControlEvent
33
+ i as AppStateValues,
34
+ N as ComponentCustomEvent,
35
+ S as ControlEventInstruction,
36
+ D as DocumentCheckToInstructionCodeMap,
37
+ C as DocumentCustomEvent,
38
+ c as DocumentInstructionCodeValues,
39
+ A as EyeInstructionCodeValues,
40
+ p as LivenessStateValues,
41
+ R as RequestCaptureInstruction,
42
+ m as dispatchCaptureEvent,
43
+ I as dispatchControlEvent
51
44
  };
package/events.umd.js CHANGED
@@ -1 +1 @@
1
- (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 R=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||{}),S=(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))(S||{}),I=(t=>(t.ANIMATION_END="magnifeye-auto-capture:animation-end",t.CONTROL="magnifeye-auto-capture:control",t.STATUS_CHANGED="magnifeye-auto-capture:status-changed",t))(I||{}),D=(t=>(t.CONTROL="smile-auto-capture:control",t.INSTRUCTION_ESCALATED="smile:instruction-escalated",t.STATUS_CHANGED="smile-auto-capture:status-changed",t))(D||{}),l=(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))(l||{}),h=(t=>(t.CONTROL="eye-gaze-auto-capture:control",t.STATUS_CHANGED="eye-gaze-auto-capture:status-changed",t))(h||{});const d=(t,s)=>{const u={};u.detail=s,document.dispatchEvent(new CustomEvent(t,u))},v=(t,s)=>{const u={};u.instruction=s,d(t,u)};function g(t){const s={};s.instruction=t;const u=s;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 M=i,E={};E.LOADING="LOADING",E.ERROR="ERROR",E.WAITING="WAITING",E.RUNNING="RUNNING",E.COMPLETE="COMPLETE";const _=E,m={..._};m.DONE="DONE";const H=m,p={};p.EYE_NOT_PRESENT="eye_not_present";const U=p,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 L=c;e.AppStateValues=_,e.CaptureMode=M,e.ComponentCustomEvent=N,e.ControlEventInstruction=R,e.DocumentCheckToInstructionCodeMap=L,e.DocumentCustomEvent=O,e.DocumentInstructionCodeValues=a,e.EyeInstructionCodeValues=U,e.FacingMode=G,e.LivenessStateValues=H,e.RequestCaptureInstruction=A,e.dispatchCaptureEvent=g,e.dispatchControlEvent=v,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ (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 m=a,_={};_.REQUEST_CAPTURE="dot-custom-event:request-capture";const T=_,d=(e,i)=>{const u={};u.detail=i,document.dispatchEvent(new CustomEvent(e,u))},I=(e,i)=>{const u={};u.instruction=i,d(e,u)};function R(e){const i={};i.instruction=e;const u=i;d(T.REQUEST_CAPTURE,u)}const E={};E.LOADING="loading",E.ERROR="error",E.WAITING="waiting",E.RUNNING="running",E.COMPLETE="complete";const r=E,O={...r};O.DONE="done";const p=O,C={};C.EYE_NOT_PRESENT="eye_not_present";const l=C,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,s={};s.isPresent=c.DOCUMENT_NOT_PRESENT,s.isNotSmall=c.DOCUMENT_TOO_FAR,s.isNotOutOfBounds=c.DOCUMENT_CENTERING,s.isSharp=c.SHARPNESS_TOO_LOW,s.isNotDim=c.BRIGHTNESS_TOO_LOW,s.isNotBright=c.BRIGHTNESS_TOO_HIGH,s.noHotspots=c.HOTSPOTS_PRESENT;const A=s;var N=(e=>(e.CAMERA_PROPS_CHANGED="document-auto-capture:camera-props-changed",e.CONTROL="document-auto-capture:control",e.DETECTION_CHANGED="document-auto-capture:detection-changed",e.INSTRUCTION_CHANGED="document-auto-capture:instruction-changed",e.INSTRUCTION_ESCALATED="document-auto-capture:instruction-escalated",e.STATE_CHANGED="document-auto-capture:state-changed",e.VIDEO_ELEMENT_SIZE="document-auto-capture:video-element-size",e))(N||{});t.AppStateValues=r,t.ComponentCustomEvent=T,t.ControlEventInstruction=S,t.DocumentCheckToInstructionCodeMap=A,t.DocumentCustomEvent=N,t.DocumentInstructionCodeValues=c,t.EyeInstructionCodeValues=l,t.LivenessStateValues=p,t.RequestCaptureInstruction=m,t.dispatchCaptureEvent=R,t.dispatchControlEvent=I,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});