@idscan/idvc2 2.5.1 → 2.5.2
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 +4 -1
- package/dist/idvc.js +26249 -1615
- package/dist/js/environment/langs.js +228 -1
- package/dist/networks/156-6146-chunk.js +216 -0
- package/dist/networks/190-200f-chunk.js +559 -0
- package/dist/networks/77-eca7-chunk.js +282 -0
- package/dist/networks/Face-578d-chunk.js +2272 -0
- package/dist/networks/MRZ-4756-chunk.js +1708 -0
- package/dist/networks/PDF-8ef7-chunk.js +565 -0
- package/dist/networks/ZXing-e864-chunk.js +351 -0
- package/package.json +11 -17
- package/dist/networks/156-9239-chunk.js +0 -1
- package/dist/networks/190-77ed-chunk.js +0 -1
- package/dist/networks/77-9e2f-chunk.js +0 -1
- package/dist/networks/Face-e375-chunk.js +0 -1
- package/dist/networks/MRZ-d498-chunk.js +0 -1
- package/dist/networks/PDF-78d2-chunk.js +0 -1
- package/dist/networks/ZXing-5410-chunk.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idscan/idvc2",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "component for the capturing documents",
|
|
5
5
|
"main": "dist/idvc.js",
|
|
6
6
|
"types": "dist/types/idvc.d.ts",
|
|
@@ -14,28 +14,21 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"prepush": "npm run lint && npm run test",
|
|
17
|
-
"start": "webpack serve --mode development --env
|
|
18
|
-
"
|
|
19
|
-
"build": "webpack --mode
|
|
20
|
-
"build:testing": "webpack --mode production --progress --color --env RUNTIME=webgl",
|
|
21
|
-
"build:develop": "webpack --mode development --progress --color --env RUNTIME=webgl && npm run pack",
|
|
22
|
-
"build:wasm": "webpack --mode production --progress --color --env RUNTIME=wasm",
|
|
23
|
-
"rename": "node -e \"const fs=require('fs');fs.readdirSync('./').forEach(file=>{if(file.match(/^(idscan-idvc-).+(tgz)$/))fs.renameSync(file,'UITests/idscan-idvc.tgz')})\"",
|
|
24
|
-
"build:wasm-rename": "webpack --mode production --progress --color --env RUNTIME=wasm && npm run pack && npm run rename",
|
|
17
|
+
"start": "webpack serve --mode development --env",
|
|
18
|
+
"build": "(webpack --mode production --progress --color) & tsc",
|
|
19
|
+
"build:develop": "webpack --mode development --progress --color && npm run pack",
|
|
25
20
|
"pack": "npm pack",
|
|
26
21
|
"minor": "npm version minor",
|
|
27
22
|
"patch": "npm version patch",
|
|
28
23
|
"test": "jest --coverage",
|
|
29
|
-
"lint": "eslint ./src"
|
|
30
|
-
"readme": "node updateReadme.js"
|
|
24
|
+
"lint": "eslint ./src"
|
|
31
25
|
},
|
|
32
26
|
"devDependencies": {
|
|
33
|
-
"@swc/core": "^1.3.
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
35
|
-
"@typescript-eslint/parser": "^5.
|
|
27
|
+
"@swc/core": "^1.3.56",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
29
|
+
"@typescript-eslint/parser": "^5.59.2",
|
|
36
30
|
"acorn": "^8.8.2",
|
|
37
31
|
"args-parser": "^1.3.0",
|
|
38
|
-
"circular-dependency-plugin": "^5.2.2",
|
|
39
32
|
"copy-webpack-plugin": "^11.0.0",
|
|
40
33
|
"css-loader": "^6.7.1",
|
|
41
34
|
"eslint": "8.39.0",
|
|
@@ -56,9 +49,10 @@
|
|
|
56
49
|
"string-replace-loader": "^3.1.0",
|
|
57
50
|
"swc-loader": "^0.2.3",
|
|
58
51
|
"swc-minify-webpack-plugin": "^2.0.0",
|
|
59
|
-
"
|
|
52
|
+
"typescript": "^5.0.4",
|
|
53
|
+
"webpack": "^5.82.0",
|
|
60
54
|
"webpack-bundle-analyzer": "^4.8.0",
|
|
61
|
-
"webpack-cli": "^5.0.
|
|
55
|
+
"webpack-cli": "^5.0.2",
|
|
62
56
|
"webpack-dev-server": "^4.13.3",
|
|
63
57
|
"webpack-merge": "^5.8.0"
|
|
64
58
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __webpack_exports__={},generateFaceColorFromAngle=function(t){var n=Math.abs(Math.trunc(255-t));return n>200&&(n=200),n<50&&(n=50),"rgba(255,215,".concat(n.toString(),",0.3)")},binarize=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120,o=t.width*t.height,i=new Uint8ClampedArray(o),r=0,u=0;for(n=0;n<o;n+=1){var h=n<<2;77*(r=t.data[h+0])+151*t.data[h+1]+28*t.data[h+2]>>8<e&&(i[n]=1)}return i},topPoint=function(t,n){return t-n},bottomPoint=function(t,n){return t+n},leftPoint=function(t,n){return t%n>1?t-1:-1},rightPoint=function(t,n){return(t+1)%n>=0?t+1:-1},topLeftPoint=function(t,n){return leftPoint(topPoint(t,n),n)},topRightPoint=function(t,n){return rightPoint(topPoint(t,n),n)},bottomLeftPoint=function(t,n){return leftPoint(bottomPoint(t,n),n)},bottomRightPoint=function(t,n){return rightPoint(bottomPoint(t,n),n)},getNeigbors=function(t,n){return[topLeftPoint,topPoint,topRightPoint,rightPoint,bottomRightPoint,bottomPoint,bottomLeftPoint,leftPoint].map(function(e){return e(t,n)})},segmentize2=function(t,n){var e,o=[],i=[],r=t.length,u=0;for(e=0;e<r;e+=1)0!==t[e]&&(i[u]=new Set,o.push(e),function(){for(;o.length;){var e=o.pop();if(!e)break;t[e]=0,i[u].add(e),getNeigbors(e,n).forEach(function(n){n>0&&0!==t[n]&&n<r&&o.push(n)})}}(),u+=1);return i},getResizedSizes=function(t,n){var e=n.baseWidth,o=n.baseHeight,i=t,r=t;return e>o&&(r=(i=t)*o/e),o>e&&(i=(r=t)*e/o),{width:Math.trunc(i),height:Math.trunc(r)}},getCrop=function(t,n){var e=t.width/t.height,o=n.width/n.height,i={x:0,y:0,width:n.width,height:n.height};return e>o?(i.height=~~(n.width/e),i.y=(n.height-i.height)/2):(i.width=~~(i.height*e),i.x=(n.width-i.width)/2),i},POINT_FILL_STYLE="rgba(255, 255, 255, 0.5)",POINT_STROKE_STYLE="rgba(255, 255, 255, 0)",SCALE_FACTOR=.3,getColumn=function(t,n){return t%n},getRow=function(t,n){return Math.floor(t/n)},createCoordFromPointIdx=function(t,n){return[getColumn(t,n),getRow(t,n)]},notNull=function(t){return null!=t},coordinateSegment=function(t){var n=t.segments,e=t.width,o=t.scaleWidth,i=t.scaleHeight;return n.map(function(t){var n=Number.MAX_VALUE,r=Number.MAX_VALUE,u=Number.MIN_VALUE,h=Number.MIN_VALUE;t.forEach(function(t){var o=createCoordFromPointIdx(t,e);o[0]<n&&(n=o[0]),o[1]<r&&(r=o[1]),o[0]>u&&(u=o[0]),o[1]>h&&(h=o[1])});var a=(u-n)*(h-r);return a>5&&a<500?{perimeter:a,x1:Math.trunc(n/SCALE_FACTOR/o),y1:Math.trunc(r/SCALE_FACTOR/i),x2:Math.trunc(u/SCALE_FACTOR/o),y2:Math.trunc(h/SCALE_FACTOR/i)}:null}).filter(notNull)},pointsProcess=function(t,n,e){return coordinateSegment({segments:segmentize2(binarize(t),t.width),width:t.width,scaleWidth:n,scaleHeight:e})};onmessage=function(t){var n=t.data,e=pointsProcess(n.iData,n.resizedToBorderScaleWidth,n.resizedToBorderScaleHeight);postMessage({segments:e})};
|