@idscan/idvc2 2.7.7 → 2.8.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.
- package/README.md +9 -0
- package/dist/css/idvc.css +1 -1
- package/dist/idvc.js +811 -811
- package/dist/index.html +38 -37
- package/dist/js/environment/stepsDescription.ts +2 -2
- package/dist/networks/Blur-chunk.js +1 -1
- package/dist/networks/Bubble-chunk.js +1 -1
- package/dist/networks/ClassLocal-chunk.js +1 -1
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/networks/MRZ-chunk.js +1 -1
- package/dist/networks/PDF-chunk.js +1 -1
- package/dist/networks/ZXing-chunk.js +1 -1
- package/dist/networks/mrzWorker.js +5 -1
- package/dist/types/constatnts/pdf.d.ts +1 -1
- package/dist/types/helpers/canvas.d.ts +1 -1
- package/dist/types/helpers/geometry.d.ts +11 -0
- package/dist/types/modules/FrontProcessing.d.ts +8 -5
- package/dist/types/modules/PdfModule.d.ts +4 -4
- package/dist/types/modules/step-functions/pdf.d.ts +1 -18
- package/dist/types/modules/ui/MaskCapture.d.ts +23 -3
- package/dist/types/ui.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.html
CHANGED
|
@@ -29,53 +29,54 @@
|
|
|
29
29
|
{
|
|
30
30
|
type: 'ID',
|
|
31
31
|
steps:[
|
|
32
|
-
{ type: 'front', name: 'Document Front' },
|
|
33
|
-
{ type: '
|
|
34
|
-
{ type: 'face', name: 'Face', mode: { uploader: true, video: true } },
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: 'VIN',
|
|
39
|
-
steps:[
|
|
40
|
-
{ type: 'photo', name: 'VIN' },
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: 'Barcode',
|
|
45
|
-
steps:[
|
|
46
|
-
{ type: 'barcode', name: 'barcode detection' },
|
|
32
|
+
// { type: 'front', name: 'Document Front' },
|
|
33
|
+
{ type: 'pdf', name: 'Document Back' },
|
|
34
|
+
// { type: 'face', name: 'Face', mode: { uploader: true, video: true } },
|
|
47
35
|
],
|
|
48
36
|
},
|
|
37
|
+
// {
|
|
38
|
+
// type: 'VIN',
|
|
39
|
+
// steps:[
|
|
40
|
+
// { type: 'photo', name: 'VIN' },
|
|
41
|
+
// ],
|
|
42
|
+
// },
|
|
43
|
+
// {
|
|
44
|
+
// type: 'Barcode',
|
|
45
|
+
// steps:[
|
|
46
|
+
// { type: 'barcode', name: 'barcode detection' },
|
|
47
|
+
// ],
|
|
48
|
+
// },
|
|
49
49
|
{
|
|
50
50
|
type: 'Passport',
|
|
51
51
|
steps:[
|
|
52
|
-
{ type: 'front', name: '
|
|
53
|
-
{ type: '
|
|
52
|
+
// { type: 'front', name: 'Passport Front' },
|
|
53
|
+
{ type: 'mrz', name: 'Passport MRZ' },
|
|
54
|
+
// { type: 'face', name: 'Face', mode: { uploader: true, video: true } }
|
|
54
55
|
],
|
|
55
56
|
},
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},
|
|
57
|
+
// {
|
|
58
|
+
// type: 'PassportCard',
|
|
59
|
+
// steps:[
|
|
60
|
+
// { type: 'front', name: 'document front' },
|
|
61
|
+
// { type: 'mrz', name: 'passport back', mode: { uploader: true, video: true } },
|
|
62
|
+
// { type: 'face', name: 'Face', mode: { uploader: true, video: true } }
|
|
63
|
+
// ],
|
|
64
|
+
// },
|
|
65
|
+
// {
|
|
66
|
+
// type: 'GreenCard',
|
|
67
|
+
// steps:[
|
|
68
|
+
// { type: 'front', name: 'Document Front' },
|
|
69
|
+
// { type: 'back', name: 'Passport Back', mode: { uploader: true, video: true } },
|
|
70
|
+
// { type: 'face', name: 'Face', mode: { uploader: true, video: true } }
|
|
71
|
+
// ],
|
|
72
|
+
// },
|
|
72
73
|
{
|
|
73
74
|
type: 'InternationalId',
|
|
74
|
-
steps:[
|
|
75
|
-
{ type: 'front', name: 'Document Front', mode: { uploader: true, video:
|
|
75
|
+
steps: [
|
|
76
|
+
// { type: 'front', name: 'Document Front', mode: { uploader: true, video: true } },
|
|
76
77
|
{ type: 'back', name: 'Passport Back', mode: { uploader: true, video: true } },
|
|
77
|
-
{ type: 'face', name: 'Face', mode: { uploader: true, video:
|
|
78
|
-
]
|
|
78
|
+
// { type: 'face', name: 'Face', mode: { uploader: true, video: true } }
|
|
79
|
+
]
|
|
79
80
|
},
|
|
80
81
|
],
|
|
81
82
|
clickGuidlines () {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: 'MRZ',
|
|
8
8
|
time: 5,
|
|
9
9
|
core: [
|
|
10
|
-
'mrz', 'blur',
|
|
10
|
+
'mrz', 'blur', 'classLocal',
|
|
11
11
|
],
|
|
12
12
|
description: 'detection, capture and parsing of the mrz-code of a document.',
|
|
13
13
|
},
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
name: 'PDF',
|
|
29
29
|
time: 5,
|
|
30
30
|
core: [
|
|
31
|
-
'pdf', '
|
|
31
|
+
'pdf', 'blur',
|
|
32
32
|
],
|
|
33
33
|
description: 'detection and capture of pdf417 of a document.',
|
|
34
34
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[311],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){t(e);return}a.done?n(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var n=this,t=arguments;return new Promise(function(o,i){var u=e.apply(n,t);function a(e){r(u,o,i,a,c,"next",e)}function c(e){r(u,o,i,a,c,"throw",e)}a(void 0)})}}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){i(e,n,t[n])})}return e}function a(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}t.d(n,{o:()=>s});var c="application/javascript",l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=u({skipSameOrigin:!0,useBlob:!0},n);return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise(function(n,r){return fetch(e).then(function(e){return e.text()}).then(function(r){var o=new URL(e).href.split("/");o.pop();var i="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),u="data:".concat(c,",").concat(encodeURIComponent(i+r));t.useBlob&&(u=URL.createObjectURL(new Blob(['importScripts("'.concat(u,'")')],{type:c}))),n(u)}).catch(r)})},s=function(){var e=o(function(e){var n;return a(this,function(t){switch(t.label){case 0:return[4,l(e)];case 1:return n=t.sent(),[2,new Worker(n)]}})});return function(n){return e.apply(this,arguments)}}()},6790:(e,n,t)=>{t.r(n),t.d(n,{default:()=>w});var r=t(
|
|
1
|
+
(self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[311],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){t(e);return}a.done?n(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var n=this,t=arguments;return new Promise(function(o,i){var u=e.apply(n,t);function a(e){r(u,o,i,a,c,"next",e)}function c(e){r(u,o,i,a,c,"throw",e)}a(void 0)})}}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){i(e,n,t[n])})}return e}function a(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}t.d(n,{o:()=>s});var c="application/javascript",l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=u({skipSameOrigin:!0,useBlob:!0},n);return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise(function(n,r){return fetch(e).then(function(e){return e.text()}).then(function(r){var o=new URL(e).href.split("/");o.pop();var i="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),u="data:".concat(c,",").concat(encodeURIComponent(i+r));t.useBlob&&(u=URL.createObjectURL(new Blob(['importScripts("'.concat(u,'")')],{type:c}))),n(u)}).catch(r)})},s=function(){var e=o(function(e){var n;return a(this,function(t){switch(t.label){case 0:return[4,l(e)];case 1:return n=t.sent(),[2,new Worker(n)]}})});return function(n){return e.apply(this,arguments)}}()},6790:(e,n,t)=>{t.r(n),t.d(n,{default:()=>w});var r=t(7286);function o(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){t(e);return}a.done?n(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var n=this,t=arguments;return new Promise(function(r,i){var u=e.apply(n,t);function a(e){o(u,r,i,a,c,"next",e)}function c(e){o(u,r,i,a,c,"throw",e)}a(void 0)})}}function u(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}function a(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,n,t){return n&&a(e.prototype,n),t&&a(e,t),e}function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var f=function(){"use strict";function e(n){u(this,e),l(this,"worker",void 0),this.worker=n,this.worker.postMessage({fn:"init"})}return c(e,[{key:"process",value:function(e){var n=this;return new Promise(function(t){var r;n.worker.postMessage({fn:"process",iData:e}),n.worker.onmessage=(r=i(function(e){return s(this,function(n){return t(e.data.blurConfidence),[2]})}),function(e){return r.apply(this,arguments)})})}},{key:"drop",value:function(){this.worker.postMessage({fn:"drop"})}}]),e}(),p=t(4550),b=t(4328);function h(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){t(e);return}a.done?n(c):Promise.resolve(c).then(r,o)}function v(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function u(e){h(i,r,o,u,a,"next",e)}function a(e){h(i,r,o,u,a,"throw",e)}u(void 0)})}}function y(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}let w=v(function(){var e,n;return y(this,function(t){switch(t.label){case 0:return[4,(0,p.o)("".concat(b.Z.chunkPublicPath,"blurWorker.js"))];case 1:return e=t.sent(),n=new f(e),r.Z.setModule("module","blur",n),[2]}})})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[373],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){t(e);return}c.done?n(a):Promise.resolve(a).then(r,o)}function o(e){return function(){var n=this,t=arguments;return new Promise(function(o,i){var u=e.apply(n,t);function c(e){r(u,o,i,c,a,"next",e)}function a(e){r(u,o,i,c,a,"throw",e)}c(void 0)})}}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){i(e,n,t[n])})}return e}function c(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}t.d(n,{o:()=>s});var a="application/javascript",l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=u({skipSameOrigin:!0,useBlob:!0},n);return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise(function(n,r){return fetch(e).then(function(e){return e.text()}).then(function(r){var o=new URL(e).href.split("/");o.pop();var i="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),u="data:".concat(a,",").concat(encodeURIComponent(i+r));t.useBlob&&(u=URL.createObjectURL(new Blob(['importScripts("'.concat(u,'")')],{type:a}))),n(u)}).catch(r)})},s=function(){var e=o(function(e){var n;return c(this,function(t){switch(t.label){case 0:return[4,l(e)];case 1:return n=t.sent(),[2,new Worker(n)]}})});return function(n){return e.apply(this,arguments)}}()},4942:(e,n,t)=>{t.r(n),t.d(n,{default:()=>h});var r=t(
|
|
1
|
+
(self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[373],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){t(e);return}c.done?n(a):Promise.resolve(a).then(r,o)}function o(e){return function(){var n=this,t=arguments;return new Promise(function(o,i){var u=e.apply(n,t);function c(e){r(u,o,i,c,a,"next",e)}function a(e){r(u,o,i,c,a,"throw",e)}c(void 0)})}}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){i(e,n,t[n])})}return e}function c(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}t.d(n,{o:()=>s});var a="application/javascript",l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=u({skipSameOrigin:!0,useBlob:!0},n);return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise(function(n,r){return fetch(e).then(function(e){return e.text()}).then(function(r){var o=new URL(e).href.split("/");o.pop();var i="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),u="data:".concat(a,",").concat(encodeURIComponent(i+r));t.useBlob&&(u=URL.createObjectURL(new Blob(['importScripts("'.concat(u,'")')],{type:a}))),n(u)}).catch(r)})},s=function(){var e=o(function(e){var n;return c(this,function(t){switch(t.label){case 0:return[4,l(e)];case 1:return n=t.sent(),[2,new Worker(n)]}})});return function(n){return e.apply(this,arguments)}}()},4942:(e,n,t)=>{t.r(n),t.d(n,{default:()=>h});var r=t(7286);function o(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}function i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,n,t){return n&&i(e.prototype,n),t&&i(e,t),e}function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var a=function(){"use strict";function e(n){o(this,e),c(this,"worker",void 0),this.worker=n}return u(e,[{key:"process",value:function(e){var n=this;return new Promise(function(t){n.worker.postMessage(e),n.worker.onmessage=function(e){t(e.data.segments)}})}}]),e}(),l=t(4550),s=t(4328);function f(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){t(e);return}c.done?n(a):Promise.resolve(a).then(r,o)}function p(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function u(e){f(i,r,o,u,c,"next",e)}function c(e){f(i,r,o,u,c,"throw",e)}u(void 0)})}}function b(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}let h=p(function(){var e,n;return b(this,function(t){switch(t.label){case 0:return[4,(0,l.o)("".concat(s.Z.chunkPublicPath,"bubbleWorker.js"))];case 1:return e=t.sent(),n=new a(e),r.Z.setModule("module","bubble",n),[2]}})})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[423],{3457:(t,e,n)=>{n.r(e),n.d(e,{default:()=>Z});var r=n(4328),o=n(4554),i=n(
|
|
1
|
+
(self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[423],{3457:(t,e,n)=>{n.r(e),n.d(e,{default:()=>Z});var r=n(4328),o=n(4554),i=n(7286),u=n(8736),a=n(6955),c=n(813),l=n(528),f=n(683),s=n(7672);function h(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){n(t);return}a.done?e(c):Promise.resolve(c).then(r,o)}function b(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function u(t){p(i,r,o,u,a,"next",t)}function a(t){p(i,r,o,u,a,"throw",t)}u(void 0)})}}function v(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e,n){return e&&y(t.prototype,e),n&&y(t,n),t}function w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&x(t,e)}function S(t,e){return e&&("object"===k(e)||"function"==typeof e)?e:h(t)}function x(t,e){return(x=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function k(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function P(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function _(t){var e=P();return function(){var n,r=g(t);if(e){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function O(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var z=320,R=320,j=[1,320,320,3],T="serving_default_input_2:0",E="StatefulPartitionedCall:0",I="StatefulPartitionedCall:1",C=function(t){"use strict";m(n,t);var e=_(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.z.WASM,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return v(this,n),w(h(t=e.call(this,r,o,i)),"canvasSize",{width:1,height:1}),t}return d(n,[{key:"setSizes",value:function(t){var e=t.height,n=t.width;this.canvasSize.width=n,this.canvasSize.height=e}},{key:"predict",value:function(t){var e=w({},T,new u.Tensor("float32",t,j));return this.session.run(e)}},{key:"predictFromImage",value:function(t,e,n,r){var o=this;return b(function(){var i,u,a,c,s;return O(this,function(h){switch(h.label){case 0:if(o.loading)return[2,[]];return i=o.createSrc(t,"angles-input-canvas"),u=e||(0,l.vL)("angles-canvas",{width:z,height:R}),a=(0,l.SI)(i,u,n,r),c=(0,f.Di)(a,f.eQ.WITHOUT),[4,o.predict(c)];case 1:return s=h.sent(),o.setSizes(i),[2,o.interpret(s[I].data,s[E].data)]}})})()}},{key:"interpret",value:function(t,e){var n={side:"None",bbox:{topLeft:{x:0,y:0},bottomRight:{x:1,y:1}},perimeterInPercents:{width:0,height:0}},r=[];return t.forEach(function(t,e){return r.push({label:s.mR[e],score:t})}),n.side=r.sort(function(t,e){return e.score-t.score})[0].label,n.bbox.topLeft.x=~~(e[0]*this.canvasSize.width),n.bbox.topLeft.y=~~(e[1]*this.canvasSize.height),n.bbox.bottomRight.x=~~(e[2]*this.canvasSize.width),n.bbox.bottomRight.y=~~(e[3]*this.canvasSize.height),n.perimeterInPercents.width=~~((e[2]-e[0])*100),n.perimeterInPercents.height=~~((e[3]-e[1])*100),n}}]),n}(a.Z);function L(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){n(t);return}a.done?e(c):Promise.resolve(c).then(r,o)}function M(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function u(t){L(i,r,o,u,a,"next",t)}function a(t){L(i,r,o,u,a,"throw",t)}u(void 0)})}}function W(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}let Z=M(function(){var t;return W(this,function(e){return t=new C("".concat(o.t.cK),c.z.WASM,r.Z.networkUrl),i.Z.setModule("model","classLocal",t),[2,[t.initialize.bind(t)]]})})}}]);
|