@idscan/idvc2 2.13.0 → 2.15.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.
Files changed (34) hide show
  1. package/README.md +15 -0
  2. package/dist/idvc.js +1 -1
  3. package/dist/idvc.js.gzip +0 -0
  4. package/dist/index.html +46 -15
  5. package/dist/js/defaultConfig.ts +27 -36
  6. package/dist/js/environment/documentTypes.ts +25 -7
  7. package/dist/js/environment/langs.js +1 -1
  8. package/dist/langs.js.gzip +0 -0
  9. package/dist/networks/Blur-chunk.js +1 -1
  10. package/dist/networks/Bubble-chunk.js +1 -1
  11. package/dist/networks/GeneralTypeDetectionYolo-chunk.js +1 -1
  12. package/dist/networks/MRZ-chunk.js +1 -1
  13. package/dist/networks/PDF-chunk.js +1 -1
  14. package/dist/types/constatnts/imageProcessing.d.ts +3 -0
  15. package/dist/types/defaultConfig.d.ts +1 -1
  16. package/dist/types/environment/documentTypes.d.ts +7 -4
  17. package/dist/types/environment/langs.d.ts +14 -9
  18. package/dist/types/eventListeners/eventListeners.d.ts +1 -1
  19. package/dist/types/eventListeners/selectDocumentType/selectHandler.d.ts +1 -1
  20. package/dist/types/helpers/validationEligibility.d.ts +1 -0
  21. package/dist/types/initialize.d.ts +3 -0
  22. package/dist/types/loader/asyncLoader.d.ts +1 -1
  23. package/dist/types/loop.d.ts +0 -1
  24. package/dist/types/modules/App/UI.d.ts +1 -1
  25. package/dist/types/modules/Config.d.ts +8 -20
  26. package/dist/types/modules/PdfModule.d.ts +1 -0
  27. package/dist/types/modules/camera/camera.d.ts +1 -1
  28. package/dist/types/modules/ui/MessageBox/MessageBox.d.ts +1 -1
  29. package/dist/types/modules/ui/StepsList/StepsScreen.d.ts +3 -1
  30. package/dist/types/stepProcessing.d.ts +1 -1
  31. package/dist/types/types/context.d.ts +2 -1
  32. package/dist/types/util.d.ts +1 -6
  33. package/package.json +1 -1
  34. package/dist/types/loader/loaderUploadMode.d.ts +0 -1
@@ -1 +1 @@
1
- (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[596],{4550:(e,r,t)=>{t.d(r,{o:()=>c});var n=t(7885),o=t(7666);function i(e,r,t,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void t(e)}u.done?r(s):Promise.resolve(s).then(n,o)}function a(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var a=e.apply(r,t);function u(e){i(a,n,o,u,s,"next",e)}function s(e){i(a,n,o,u,s,"throw",e)}u(void 0)}))}}function u(e,r){var t,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var s,l=(s=a((function(e){var r,t,i,a,s;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),t=Uint8Array.bind,[4,(0,o.xl)(e)];case 1:return r=new(t.apply(Uint8Array,[void 0,u.sent()])),i=(0,n.ec)(r),a=new Blob([i.buffer],{type:"application/javascript"}),[2,URL.createObjectURL(a)];case 2:throw s=u.sent(),console.error("Error loading and decompressing worker file:",s),s;case 3:return[2]}}))})),function(e){return s.apply(this,arguments)}),c=function(){var e=a((function(e){var r;return u(this,(function(t){switch(t.label){case 0:return[4,l(e)];case 1:return r=t.sent(),[2,new Worker(r)]}}))}));return function(r){return e.apply(this,arguments)}}()},8766:(e,r,t)=>{t.r(r),t.d(r,{default:()=>k});var n=t(4328),o=t(6399);function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function a(e,r,t,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void t(e)}u.done?r(s):Promise.resolve(s).then(n,o)}function u(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var i=e.apply(r,t);function u(e){a(i,n,o,u,s,"next",e)}function s(e){a(i,n,o,u,s,"throw",e)}u(void 0)}))}}function s(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return i(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,r){var t,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var d=function(){function e(r,t,n){var o=this;!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"module",void 0),l(this,"handle",null),l(this,"bw",0),l(this,"bh",0),l(this,"src",null),l(this,"out",null),l(this,"isAllocate",!1),l(this,"worker",void 0),l(this,"isProcessing",!1),l(this,"isInitialized",!1),l(this,"successCount",0),l(this,"pdfCapturedCount",0),l(this,"src2",null),l(this,"locations",null),l(this,"pdfCount",0),l(this,"geometry",void 0),l(this,"minPDFframes",1),l(this,"cropSizes",void 0),l(this,"canvasSizes",void 0),l(this,"privateErrorId",0),this.worker=r,this.worker.onmessage=function(e){var r=e.data,t=r.name,n=r.data;"initialization"===t&&(o.isInitialized=n)},this.worker.postMessage({fn:"init",key:t,isNeedToLoadPDFWIthPreprocess:n})}var r,t,n;return r=e,(t=[{key:"errorId",get:function(){return this.privateErrorId},set:function(e){this.privateErrorId=[o.l.Detected,o.l.Decoded].includes(e)?0:e}},{key:"errorVal",get:function(){var e;return this.errorId===o.l.LicenseKeyHasExpired&&(e=0),this.errorId===o.l.InvalidLicenseKey&&(e=1),e}},{key:"init",value:function(e,r,t,n){this.geometry=e,this.minPDFframes=r,this.cropSizes=t,this.canvasSizes=n}},{key:"licenseError",value:function(){return{error:!0,errorType:"licenceKeyError",errorVal:this.errorVal}}},{key:"create",value:function(){}},{key:"setSizes",value:function(e,r){this.bw=e,this.bh=r,this.worker.postMessage({fn:"setSizes",bw:e,bh:r})}},{key:"allocate",value:function(){this.worker.postMessage({fn:"allocate"})}},{key:"calculateCords",value:function(e){var r=this,t=[];if(e){var n=[];Object.entries(e).forEach((function(e){var t=c(e,2),o=t[0],i=t[1],a=Math.trunc(i),u=o[0],s=+o[1]-1;n[s]||(n[s]={x:0,y:0}),"x"===u?n[s].x=r.canvasSizes.width*a/r.bw:n[s].y=r.canvasSizes.height*a/r.bh}));var o=[n[3].x-n[0].x,n[3].y-n[0].y],i=[n[1].x-n[0].x,n[1].y-n[0].y],a=[n[2].x-n[1].x,n[2].y-n[1].y],u=[n[3].x-n[2].x,n[3].y-n[2].y],s=this.geometry.angleBetweenTwoVectors(o,i),l=this.geometry.angleBetweenTwoVectors(a,u);s<=100&&s>=80&&l<=100&&l>=80&&(t=n)}return t}},{key:"processPDF",value:function(e){var r=this;return u((function(){var t,n;return f(this,(function(i){switch(i.label){case 0:return r.isProcessing?[2,{}]:(t={status:!1,predict:!1,touch:!1,image:null,type:"pdf",error:null,coords:[],trackString:"",pdfSuccessCount:0,pdfCount:0,isSuccessProcess:!1,pdfCapturedCount:0},r.isInitialized?(r.isProcessing=!0,[4,r.readPDF(e)]):[2,t]);case 1:return(n=i.sent()).error?(r.isProcessing=!1,t.error=n,[2,t]):(n&&"status"in n&&(n.status.value===o.l.Detected&&(r.pdfCapturedCount+=1),n.status.value===o.l.Detected||n.status.value===o.l.Decoded?(t.coords=r.calculateCords(n.location),t.isSuccessProcess=!0):(r.successCount+=1,r.calculateCords(null)),n.status.value===o.l.Decoded?(r.pdfCount+=1,r.pdfCount>=r.minPDFframes&&(r.successCount=0,r.pdfCapturedCount=0,r.pdfCount=0,t.trackString=n.trackString||n.data||"",t.status=!0,t.image=e,t.pdfCapturedCount=0)):r.pdfCount=0),t.pdfSuccessCount=r.successCount,t.pdfCount=r.pdfCount,t.pdfCapturedCount=r.pdfCapturedCount,r.isProcessing=!1,[2,t])}}))}))()}},{key:"processPDFWithPreProcess",value:function(e){var r=this;return new Promise((function(t){r.worker.onmessage=function(e){var n=e.data,o=n.name,i=n.data;if("result"===o){var a;r.errorId=null==i||null===(a=i.status)||void 0===a?void 0:a.value;var u=r.errorId?r.licenseError():null;t(u||i)}else t(i)},r.worker.postMessage({fn:"pdfWithPreProcess",iData:e})}))}},{key:"readPDF",value:function(e){var r=this;return u((function(){return f(this,(function(t){return[2,new Promise((function(t){r.worker.onmessage=function(e){var n=e.data,o=n.name,i=n.data,a=n.bw,u=n.bh;if("ready"===o)r.worker.postMessage({fn:"process"});else if("result"===o){var s;r.errorId=null==i||null===(s=i.status)||void 0===s?void 0:s.value;var l=(r.errorId?r.licenseError():null)||i;r.bw=a,r.bh=u,t(l)}else t(i)},r.worker.postMessage({fn:"prepare",iData:e})}))]}))}))()}}])&&s(r.prototype,t),n&&s(r,n),e}();var p,h,y=t(7286),v=t(4550);function b(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function w(e,r,t,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void t(e)}u.done?r(s):Promise.resolve(s).then(n,o)}function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return b(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return b(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,r){var t,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}const k=(p=function(e){var r,t,o,i;return g(this,(function(a){switch(a.label){case 0:return r=e.pdf417key,t=!!Object.entries(n.Z.config.documentTypes).find((function(e){var r=m(e,2);return r[0],r[1].find((function(e){return("pdf"===e.type||"back"===e.type)&&e.mode.uploader}))})),[4,(0,v.o)("".concat(n.Z.chunkPublicPath,"pdfWorker.js.gzip"))];case 1:return o=a.sent(),i=new d(o,r,t),y.Z.setModule("module","pdf",i),[2]}}))},h=function(){var e=this,r=arguments;return new Promise((function(t,n){var o=p.apply(e,r);function i(e){w(o,t,n,i,a,"next",e)}function a(e){w(o,t,n,i,a,"throw",e)}i(void 0)}))},function(e){return h.apply(this,arguments)})}}]);
1
+ (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[596],{4550:(e,t,r)=>{r.d(t,{o:()=>l});var n=r(7885),o=r(7666);function i(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,s,"next",e)}function s(e){i(a,n,o,u,s,"throw",e)}u(void 0)}))}}function u(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var s,c=(s=a((function(e){var t,r,i,a,s;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),r=Uint8Array.bind,[4,(0,o.xl)(e)];case 1:return t=new(r.apply(Uint8Array,[void 0,u.sent()])),i=(0,n.ec)(t),a=new Blob([i.buffer],{type:"application/javascript"}),[2,URL.createObjectURL(a)];case 2:throw s=u.sent(),console.error("Error loading and decompressing worker file:",s),s;case 3:return[2]}}))})),function(e){return s.apply(this,arguments)}),l=function(){var e=a((function(e){var t;return u(this,(function(r){switch(r.label){case 0:return[4,c(e)];case 1:return t=r.sent(),[2,new Worker(t)]}}))}));return function(t){return e.apply(this,arguments)}}()},8766:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var n=r(4328),o=r(6399);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){a(i,n,o,u,s,"next",e)}function s(e){a(i,n,o,u,s,"throw",e)}u(void 0)}))}}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var d=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"module",void 0),c(this,"handle",null),c(this,"bw",0),c(this,"bh",0),c(this,"src",null),c(this,"out",null),c(this,"isAllocate",!1),c(this,"worker",void 0),c(this,"isProcessing",!1),c(this,"isInitialized",!1),c(this,"successCount",0),c(this,"pdfCapturedCount",0),c(this,"src2",null),c(this,"locations",null),c(this,"pdfCount",0),c(this,"geometry",void 0),c(this,"minPDFframes",1),c(this,"cropSizes",void 0),c(this,"canvasSizes",void 0),c(this,"privateErrorId",0),this.worker=t,this.worker.onmessage=function(e){var t=e.data,r=t.name,n=t.data;"initialization"===r&&(o.isInitialized=n)},this.worker.postMessage({fn:"init",key:r,isNeedToLoadPDFWIthPreprocess:n})}var t,r,n;return t=e,(r=[{key:"errorId",get:function(){return this.privateErrorId},set:function(e){this.privateErrorId=[o.l.Detected,o.l.Decoded].includes(e)?0:e}},{key:"errorVal",get:function(){var e;return this.errorId===o.l.LicenseKeyHasExpired&&(e=0),this.errorId===o.l.InvalidLicenseKey&&(e=1),e}},{key:"init",value:function(e,t,r,n){this.geometry=e,this.minPDFframes=t,this.cropSizes=r,this.canvasSizes=n}},{key:"licenseError",value:function(){return{error:!0,errorType:"licenceKeyError",errorVal:this.errorVal}}},{key:"create",value:function(){}},{key:"setSizes",value:function(e,t){this.bw=e,this.bh=t,this.worker.postMessage({fn:"setSizes",bw:e,bh:t})}},{key:"allocate",value:function(){this.worker.postMessage({fn:"allocate"})}},{key:"calculateCords",value:function(e){var t=this,r=[];if(e){var n=[];Object.entries(e).forEach((function(e){var r=l(e,2),o=r[0],i=r[1],a=Math.trunc(i),u=o[0],s=+o[1]-1;n[s]||(n[s]={x:0,y:0}),"x"===u?n[s].x=t.canvasSizes.width*a/t.bw:n[s].y=t.canvasSizes.height*a/t.bh}));var o=[n[3].x-n[0].x,n[3].y-n[0].y],i=[n[1].x-n[0].x,n[1].y-n[0].y],a=[n[2].x-n[1].x,n[2].y-n[1].y],u=[n[3].x-n[2].x,n[3].y-n[2].y],s=this.geometry.angleBetweenTwoVectors(o,i),c=this.geometry.angleBetweenTwoVectors(a,u);s<=100&&s>=80&&c<=100&&c>=80&&(r=n)}return r}},{key:"processPDF",value:function(e){var t=this;return u((function(){var r,n;return f(this,(function(i){switch(i.label){case 0:return t.isProcessing?[2,{}]:(r={status:!1,predict:!1,touch:!1,image:null,type:"pdf",error:null,coords:[],trackString:"",pdfSuccessCount:0,pdfCount:0,isSuccessProcess:!1,pdfCapturedCount:0},t.isInitialized?(t.isProcessing=!0,[4,t.readPDF(e)]):[2,r]);case 1:return(n=i.sent()).error?(t.isProcessing=!1,r.error=n,[2,r]):(n&&"status"in n&&(n.status.value===o.l.Detected&&(t.pdfCapturedCount+=1),n.status.value===o.l.Detected||n.status.value===o.l.Decoded?(r.coords=t.calculateCords(n.location),r.isSuccessProcess=!0):(t.successCount+=1,t.calculateCords(null)),n.status.value===o.l.Decoded?(t.pdfCount+=1,t.pdfCount>=t.minPDFframes&&(t.successCount=0,t.pdfCapturedCount=0,t.pdfCount=0,r.trackString=n.trackString||n.data||"",r.status=!0,r.image=e,r.pdfCapturedCount=0)):t.pdfCount=0),r.pdfSuccessCount=t.successCount,r.pdfCount=t.pdfCount,r.pdfCapturedCount=t.pdfCapturedCount,t.isProcessing=!1,[2,r])}}))}))()}},{key:"decodeSubmitString",value:function(e){var t=e.data,r=e.resultParams,n=r.columns,o=r.rows,i=r.ecl,a=Object.fromEntries(Object.entries(e.location).map((function(e){var t=l(e,2),r=t[0],n=t[1];return[r,Number(n.toFixed(6))]}))),u="columns:".concat(n,",rows:").concat(o,",ecl:").concat(i,",").concat(Object.entries(a).map((function(e){var t=l(e,2),r=t[0],n=t[1];return"".concat(r,":").concat(n)})).join(","));return"".concat(t,".").concat(btoa(u))}},{key:"processPDFWithPreProcess",value:function(e){var t=this;return new Promise((function(r){t.worker.onmessage=function(e){var n=e.data,o=n.name,i=n.data;if("result"===o){var a;t.errorId=null==i||null===(a=i.status)||void 0===a?void 0:a.value;var u=t.errorId?t.licenseError():null;i.data&&(i.data=t.decodeSubmitString(i)),r(u||i)}else r(i)},t.worker.postMessage({fn:"pdfWithPreProcess",iData:e})}))}},{key:"readPDF",value:function(e){var t=this;return u((function(){return f(this,(function(r){return[2,new Promise((function(r){t.worker.onmessage=function(e){var n=e.data,o=n.name,i=n.data,a=n.bw,u=n.bh;if("ready"===o)t.worker.postMessage({fn:"process"});else if("result"===o){var s;t.errorId=null==i||null===(s=i.status)||void 0===s?void 0:s.value;var c=(t.errorId?t.licenseError():null)||i;t.bw=a,t.bh=u,r(c)}else r(i)},t.worker.postMessage({fn:"prepare",iData:e})}))]}))}))()}}])&&s(t.prototype,r),n&&s(t,n),e}();var p,h,y=r(7286),v=r(4550);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}const k=(p=function(e){var t,r,o,i;return g(this,(function(a){switch(a.label){case 0:return t=e.pdf417key,r=!!Object.entries(n.Z.config.documentTypes).find((function(e){var t=m(e,2);return t[0],t[1].find((function(e){return("pdf"===e.type||"back"===e.type)&&e.mode.uploader}))})),[4,(0,v.o)("".concat(n.Z.networkUrl,"pdfWorker.js.gzip"))];case 1:return o=a.sent(),i=new d(o,t,r),y.Z.setModule("module","pdf",i),[2]}}))},h=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=p.apply(e,t);function i(e){w(o,r,n,i,a,"next",e)}function a(e){w(o,r,n,i,a,"throw",e)}i(void 0)}))},function(e){return h.apply(this,arguments)})}}]);
@@ -1,4 +1,7 @@
1
+ import type { DocumentTypeName } from '../environment/documentTypes';
2
+ import type { GeneralTypeExitYolo } from '../neural models/generalTypeYolo/exits';
1
3
  export declare const POINT_FILL_STYLE = "rgba(255, 255, 255, 0.5)";
2
4
  export declare const POINT_STROKE_STYLE = "rgba(255, 255, 255, 0)";
3
5
  export declare const SCALE_FACTOR = 0.3;
4
6
  export declare const MAX_DOCUMENT_COUNT = 7;
7
+ export declare const documentTypesFrontSidesDict: Record<DocumentTypeName, Array<GeneralTypeExitYolo | ''>>;
@@ -29,7 +29,7 @@ export type DocumentType = {
29
29
  mode?: StepMode;
30
30
  };
31
31
  type ImageURI = 'png' | 'jpeg' | 'webp';
32
- export type DefaultConfigName = 'el' | 'licenseKey' | 'networkUrl' | 'chunkPublicPath' | 'language' | 'documentTypes' | 'realFaceMode' | 'modalPosition' | 'resizeUploadedImage' | 'showSubmitBtn' | 'isShowDocumentTypeSelect' | 'useCDN' | 'processingImageFormat' | 'allowSubmitWithWarnings' | 'autoContinue' | 'autoStart' | 'playPreviewAnimations' | 'autocaptureDelay' | 'isShowGuidelinesButton' | 'fixFrontOrientAfterUpload' | 'captureTimeout' | 'onCaptureTimeout' | 'onChange' | 'onReset' | 'submit' | 'onRetakeHook' | 'onCameraError' | 'onMounted' | 'onReloaded';
32
+ export type DefaultConfigName = 'el' | 'licenseKey' | 'networkUrl' | 'language' | 'documentTypes' | 'realFaceMode' | 'modalPosition' | 'resizeUploadedImage' | 'showSubmitBtn' | 'isShowDocumentTypeSelect' | 'useCDN' | 'processingImageFormat' | 'allowSubmitWithWarnings' | 'autocaptureConfidence' | 'autoContinue' | 'autoStart' | 'playPreviewAnimations' | 'autocaptureDelay' | 'fixFrontOrientAfterUpload' | 'onChange' | 'onReset' | 'submit' | 'onRetakeHook' | 'onCameraError' | 'onMounted' | 'onReloaded';
33
33
  /**
34
34
  * IDefaultConfig
35
35
  * @param {string} name,
@@ -1,9 +1,11 @@
1
- export type DocumentTypeIndex = 1 | 2 | 3 | 6 | 7 | 9 | 10 | 11;
2
- export type DocumentTypeName = 'ID' | 'Passport' | 'PassportCard' | 'GreenCard' | 'InternationalId' | 'Barcode' | 'FaceAuthorization' | 'EmploymentAuthorization';
3
- export type HumanName = 'Driver\'s License or State Identification Card' | 'Passport' | 'US Passport Card' | 'Green Card' | 'International ID' | '1-D and 2-D Barcodes' | 'Face Authorization' | 'Employment Authorization';
1
+ export type DocumentTypeIndex = 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 11;
2
+ export type DIVEDocumentTypeIndex = 1 | 2 | 3 | 6 | 7 | 9 | 10 | 11;
3
+ export type DocumentTypeName = 'DL' | 'IC' | 'Passport' | 'PassportCard' | 'GreenCard' | 'InternationalId' | 'Barcode' | 'FaceAuthorization' | 'EmploymentAuthorization';
4
+ export type HumanName = 'Driver\'s License' | 'Identification Card' | 'Passport' | 'US Passport Card' | 'Green Card' | 'International ID' | '1-D and 2-D Barcodes' | 'Face Authorization' | 'Employment Authorization';
4
5
  export type ImageSource = 'video' | 'file';
5
6
  export declare enum DocumentTypeIDs {
6
- 'ID' = 1,
7
+ 'DL' = 1,
8
+ 'IC' = 1,
7
9
  'Passport' = 2,
8
10
  'PassportCard' = 3,
9
11
  'GreenCard' = 6,
@@ -15,6 +17,7 @@ export declare enum DocumentTypeIDs {
15
17
  export interface DocumentRecord {
16
18
  name: DocumentTypeName;
17
19
  id: DocumentTypeIndex;
20
+ diveDocumentID: DIVEDocumentTypeIndex;
18
21
  nName: string;
19
22
  humanName: HumanName;
20
23
  }
@@ -1,6 +1,6 @@
1
1
  import { CameraNotSupportedReason } from '../types/modules/camera.enum';
2
- type LabelGroup = 'errorCodes' | 'hintTexts' | 'keyErrors' | 'camera' | 'general' | 'uploaderDescription' | 'documentsTypes' | 'loaderText';
3
- type AllTypes = IErrorCodes | IHintTexts | KeyError | ICameraLabels | IGeneral | IDocumentsTypes | IUploaderDescription | ISpinnerText;
2
+ type LabelGroup = 'errorCodes' | 'hintTexts' | 'keyErrors' | 'general' | 'uploaderDescription' | 'documentsTypes' | 'loaderText';
3
+ type AllTypes = IErrorCodes | IHintTexts | KeyError | IGeneral | IDocumentsTypes | IUploaderDescription | ISpinnerText;
4
4
  type Label = Record<LabelGroup, AllTypes>;
5
5
  type KeyError = string[];
6
6
  type GetTranslation = {
@@ -8,7 +8,6 @@ type GetTranslation = {
8
8
  (groupName: 'errorCodes'): IErrorCodes;
9
9
  (groupName: 'hintTexts'): IHintTexts;
10
10
  (groupName: 'keyErrors'): KeyError;
11
- (groupName: 'camera'): ICameraLabels;
12
11
  (groupName: 'general'): IGeneral;
13
12
  (groupName: 'loaderText'): ISpinnerText;
14
13
  (groupName: LabelGroup): AllTypes;
@@ -51,10 +50,7 @@ interface IHintTexts {
51
50
  documentCloser: string;
52
51
  holdCamera: string;
53
52
  captureCorners: string;
54
- }
55
- interface ICameraLabels {
56
- loading: string;
57
- awaiting: string;
53
+ frontSideNotMatch: string;
58
54
  }
59
55
  interface IGeneral {
60
56
  step: string;
@@ -75,6 +71,7 @@ interface IGeneral {
75
71
  notificationSubmit: string;
76
72
  notificationCaptureHook: string;
77
73
  notificationCaptureSide: string;
74
+ notificationCaptureWithWarnings: string;
78
75
  idvcVersionPlank: string;
79
76
  submitProcessSpinner: {
80
77
  top: string;
@@ -101,6 +98,7 @@ interface IGeneral {
101
98
  default: string;
102
99
  changeDocumentTypeText: string;
103
100
  documentTypeText: string;
101
+ disableProcessing: string;
104
102
  };
105
103
  controlButtons: {
106
104
  upload: string;
@@ -135,7 +133,8 @@ interface IGeneral {
135
133
  pressToUpdateTextSuccess: string;
136
134
  }
137
135
  interface IDocumentsTypes {
138
- ID: string;
136
+ DL: string;
137
+ IC: string;
139
138
  Passport: string;
140
139
  PassportCard: string;
141
140
  GreenCard: string;
@@ -159,8 +158,14 @@ interface ISpinnerText {
159
158
  top: string;
160
159
  bottom: string;
161
160
  };
161
+ awaiting: string;
162
+ loadingStep: string;
163
+ changeMode: string;
164
+ resetting: string;
165
+ uploading: string;
166
+ preparingToWork: string;
167
+ loadingDocument: string;
162
168
  }
163
- export type CameraLabels = keyof ICameraLabels;
164
169
  export declare const supportedLanguages: readonly ["en", "es"];
165
170
  export declare const setTranslation: (translationLang?: SupportedLanguage) => void;
166
171
  export declare const getTranslation: GetTranslation;
@@ -1,5 +1,5 @@
1
1
  import { IConfig } from '../modules/Config';
2
- export declare const startProcessing: () => Promise<void>;
2
+ export declare const startProcessing: (label?: string) => Promise<void>;
3
3
  type BLTemp2 = {
4
4
  postInit: () => Promise<void>;
5
5
  mount: (() => Promise<void>);
@@ -1,3 +1,3 @@
1
1
  import { DocumentSelectEvent } from '../../modules/ui/selectDocumentType/documentSelectedEvent';
2
- declare const _default: ({ docType, id }: DocumentSelectEvent) => Promise<void>;
2
+ declare const _default: ({ docType, id }: DocumentSelectEvent, isNeedToClearLoaderState?: boolean) => Promise<void>;
3
3
  export default _default;
@@ -0,0 +1 @@
1
+ export declare const checkEligibilityForValidation: () => void;
@@ -6,6 +6,9 @@ declare const _default: {
6
6
  isCameraRequired: () => any;
7
7
  isUploaderRequired: () => any;
8
8
  isCameraNeeded: () => any;
9
+ isUploaderRequiredForCurrentDocument: () => any;
10
+ isCameraRequiredForCurrentDocument: () => any;
11
+ isCameraNeededForCurrentDocument: () => any;
9
12
  detectAndSetBrowser: () => void;
10
13
  detectAndSetRealFaceMode: () => void;
11
14
  };
@@ -1 +1 @@
1
- export declare const asyncLoader: () => Promise<void>;
1
+ export declare const asyncLoader: (isNeedToClearLoaderState?: boolean) => Promise<void>;
@@ -3,7 +3,6 @@ export interface IMrzCoords {
3
3
  locations: MRZLocation;
4
4
  color: 'green' | 'yellow';
5
5
  }
6
- export declare const videoCaptureTimeout: (ms: number) => Promise<unknown>;
7
6
  export declare const loopTimeout: (ms: number) => Promise<unknown>;
8
7
  export declare const unmountIDVC: () => void;
9
8
  export declare const loop: () => Promise<false>;
@@ -19,7 +19,7 @@ export declare class WeblibUI {
19
19
  remountUI(): void;
20
20
  createNotification(notificationContainer: HTMLElement, { status, message, }: NotificationState, animationSettings: AnimationSettings): Notification;
21
21
  updateResetButton({ steps, }: Context): void;
22
- updateControlButtons({ steps, config, }: Context): void;
22
+ updateControlButtons({ steps, config, licenseKeyError, isProcessingDisabledForCurrentDocumentType, }: Context): void;
23
23
  initGeneralText(context: Context): void;
24
24
  updateMessageBox({ type, licenseKeyError }: Context): void;
25
25
  resizeBorders(): void;
@@ -5,7 +5,7 @@ import { StepType } from '../environment/stepsDescription';
5
5
  import { DocumentTypeName } from '../environment/documentTypes';
6
6
  import { IDocumentTypeConfig } from './validator';
7
7
  import { IStepCallback } from './Step';
8
- import { CaptureTimeoutData, IDataForSubmit } from '../util';
8
+ import { IDataForSubmit } from '../util';
9
9
  /**
10
10
  * @param {string} el,
11
11
  * @param {string} licenseKey,
@@ -39,7 +39,9 @@ export interface IConfig {
39
39
  * - PassportCard (3) – with 3 lines MRZ (most European IDs, USA passports/cards)
40
40
  * - GreenCard (6) – USA Permanent Resident Cards (only MRZ)
41
41
  * - InternationalId (7) – Internationally approved U.S. IDs with 3 lines MRZ
42
- * - Barcode (9) – 1-D and 2-D barcodes
42
+ * - EmploymentAuthorization (9) - Employment Authorization
43
+ * - Barcode (11) – 1-D and 2-D barcodes
44
+
43
45
  *
44
46
  * Available Step Types
45
47
  *
@@ -70,14 +72,6 @@ export interface IConfig {
70
72
  networkUrl?: string;
71
73
  /** the web library supports two languages, english and spanish. English uses en and Spanish uses es */
72
74
  language?: SupportedLanguage;
73
- /**
74
- * Path to the folder with chunks. Specify the path on the server if you need to remove the folder to another location.
75
- */
76
- chunkPublicPath?: string;
77
- /**
78
- * switches on/off the button to show guide lines
79
- */
80
- isShowGuidelinesButton?: boolean;
81
75
  /**
82
76
  * if this setting is set to false the document type dialog will not be displayed to the end user
83
77
  */
@@ -94,6 +88,10 @@ export interface IConfig {
94
88
  * This option allows the user to perform a 'submit' even if there are warnings
95
89
  */
96
90
  allowSubmitWithWarnings?: boolean;
91
+ /**
92
+ * The option specifies the strictness of the type recognition decision filter. The value must be a floating point number between 0 and 1. Where 1 is the strictest filter, 0 is the least strict.
93
+ */
94
+ autocaptureConfidence?: number;
97
95
  /**
98
96
  * This option allows you not to display the step selection screen when selecting a document.
99
97
  */
@@ -102,16 +100,6 @@ export interface IConfig {
102
100
  * This option allows you to turn off step preview animations.
103
101
  */
104
102
  playPreviewAnimations?: boolean;
105
- /**
106
- * This option allows you to set a timer in seconds, how long after the start of video capture the hook 'onCaptureTimeout' will be triggered.
107
- */
108
- captureTimeout?: number;
109
- /**
110
- * function will be called after the user failed to capture the document from the camera
111
- * in the time specified by the 'captureTimeout' option
112
- * @param data - Step objects of current pipeline
113
- */
114
- onCaptureTimeout?: (data: CaptureTimeoutData) => void;
115
103
  /** function which will be called after each step completes */
116
104
  onChange?: (data: {
117
105
  step: IStepCallback;
@@ -49,6 +49,7 @@ export declare class PdfModule {
49
49
  allocate(): void;
50
50
  calculateCords(locations: PDFLocation): Coordinate[];
51
51
  processPDF(data: ImageData): Promise<Record<string, any>>;
52
+ decodeSubmitString(obj: Record<string, any>): string;
52
53
  processPDFWithPreProcess(iData: ImageData): Promise<unknown>;
53
54
  readPDF(iData: any): Promise<unknown>;
54
55
  }
@@ -5,7 +5,7 @@ export declare const cameraErrorHandling: (err: Error | CameraError) => Promise<
5
5
  declare const _default: {
6
6
  initUploader: () => Promise<void>;
7
7
  stopTrack: () => void;
8
- init: () => Promise<void>;
8
+ init: (label?: string) => Promise<void>;
9
9
  start: (mode: VideoFacingModeEnum) => Promise<void>;
10
10
  setCapture: (val: boolean) => void;
11
11
  checkFlashAvailable: (mode?: VideoFacingModeEnum) => void;
@@ -1,5 +1,5 @@
1
1
  import { Component } from '../Component';
2
- type MessageBoxType = 'error' | 'primary' | 'pointer' | 'disabled' | null;
2
+ export type MessageBoxType = 'error' | 'primary' | 'pointer' | 'disabled' | 'warning' | null;
3
3
  export type CallbackHandler = (event: Event) => void;
4
4
  type MessageBoxState = {
5
5
  isHidden: boolean;
@@ -1,7 +1,7 @@
1
1
  import { Component, StateBase } from '../Component';
2
2
  import { DocumentTypeName } from '../../../environment/documentTypes';
3
3
  import Step from '../../Step';
4
- import { CallbackHandler, MessageBox } from '../MessageBox/MessageBox';
4
+ import { CallbackHandler, MessageBox, MessageBoxType } from '../MessageBox/MessageBox';
5
5
  import { ControlButton, ControlButtonClickedCustomEvent } from '../ControlButton/ControlButton';
6
6
  import { CardStep } from '../CardStep/CardStep';
7
7
  import { CardState } from '../CardStep/Card';
@@ -25,10 +25,12 @@ export declare class StepsScreen {
25
25
  steps: CardStep[];
26
26
  constructor(mountElement: HTMLElement, events: any, context: Context);
27
27
  disableScreen(): void;
28
+ disableCurrentDocumentProcessing(): void;
28
29
  setVisibility(isVisible: boolean): void;
29
30
  resetState(): void;
30
31
  addChangeDocumentTypeListener(handler: CallbackHandler): void;
31
32
  updateKeyError(licenseKeyError: string): void;
33
+ updateMessageBoxState(message: string, type: MessageBoxType): void;
32
34
  updateStepImg({ steps, currentStep, currentStepImg, }: {
33
35
  steps: Step[];
34
36
  currentStep: number;
@@ -1,7 +1,7 @@
1
1
  export declare const isFullFilled: () => boolean;
2
2
  export declare const generateSteps: () => void;
3
3
  export declare const updateSteps: () => void;
4
- export declare const changeStep: (nextStepNumber: number) => Promise<void>;
4
+ export declare const changeStep: (nextStepNumber: number, label?: string) => Promise<void>;
5
5
  export declare const getNextStep: () => number;
6
6
  export declare const changeStepAuto: () => Promise<void>;
7
7
  export declare const updateStepImgCallback: () => void;
@@ -28,7 +28,6 @@ export type Context = {
28
28
  isMirroring: boolean;
29
29
  config: Record<string, any>;
30
30
  networkUrl: string;
31
- chunkPublicPath: string;
32
31
  imageFormat: 'webp' | 'jpeg';
33
32
  supabase: ReturnType<typeof InitClient> | null;
34
33
  cameraInfo: Record<string, any>;
@@ -75,6 +74,8 @@ export type Context = {
75
74
  commonLicenseKey: string;
76
75
  };
77
76
  licenseKeyError: string | null | undefined;
77
+ isProcessingDisabledForCurrentDocumentType: boolean;
78
+ isSubmitWithWarningsNotificationShowed: boolean;
78
79
  resizedCanvasSizes: Size;
79
80
  videoCanvasSizes: Size;
80
81
  resizedToBorderScale: Size;
@@ -1,18 +1,13 @@
1
1
  import { Base64Image } from './helpers/image';
2
2
  import { IStepCallback } from './modules/Step';
3
- import { DocumentTypeIndex, DocumentTypeName } from './environment/documentTypes';
3
+ import { DocumentTypeIndex } from './environment/documentTypes';
4
4
  import { Context } from './types/context';
5
- import { StepType } from './environment/stepsDescription';
6
5
  export interface IDataForSubmit {
7
6
  metaData?: string;
8
7
  payload?: Record<string, any>;
9
8
  steps: IStepCallback[];
10
9
  documentType: DocumentTypeIndex | 0;
11
10
  }
12
- export type CaptureTimeoutData = {
13
- stepType: StepType;
14
- documentName: DocumentTypeName;
15
- };
16
11
  interface IError {
17
12
  code?: string;
18
13
  message?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/idvc2",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
4
4
  "description": "component for the capturing documents",
5
5
  "main": "dist/idvc.js",
6
6
  "types": "dist/types/idvc.d.ts",
@@ -1 +0,0 @@
1
- export declare const loadNetworksUploadMode: () => Promise<void>;