@microblink/capture 1.0.1 → 1.0.3
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/dist/capture.js +2791 -2790
- package/dist/capture.umd.cjs +43 -43
- package/dist/resources/advanced/capture-wasm.js +2 -2
- package/dist/resources/advanced/capture-wasm.wasm +0 -0
- package/dist/resources/advanced-threads/capture-wasm.js +2 -2
- package/dist/resources/advanced-threads/capture-wasm.wasm +0 -0
- package/dist/resources/basic/capture-wasm.wasm +0 -0
- package/package.json +19 -19
- package/types/index.d.ts +2 -0
|
@@ -22,7 +22,7 @@ function ra(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:
|
|
|
22
22
|
function Aa(){var a=h.preRun.shift();xa.unshift(a)}var Ba=0,Ca=null,Da=null;function Ea(){Ba++;h.monitorRunDependencies&&h.monitorRunDependencies(Ba)}function Fa(){Ba--;h.monitorRunDependencies&&h.monitorRunDependencies(Ba);if(0==Ba&&(null!==Ca&&(clearInterval(Ca),Ca=null),Da)){var a=Da;Da=null;a()}}function ma(a){if(h.onAbort)h.onAbort(a);a="Aborted("+a+")";u(a);oa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}
|
|
23
23
|
function Ga(a){return a.startsWith("data:application/octet-stream;base64,")}var Ha;Ha="capture-wasm.wasm";if(!Ga(Ha)){var Ia=Ha;Ha=h.locateFile?h.locateFile(Ia,fa):fa+Ia}function Ja(a){try{if(a==Ha&&la)return new Uint8Array(la);if(ja)return ja(a);throw"both async and sync fetching of the wasm failed";}catch(b){ma(b)}}
|
|
24
24
|
function Ka(a){return la||"function"!=typeof fetch?Promise.resolve().then(function(){return Ja(a)}):fetch(a,{credentials:"same-origin"}).then(function(b){if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(function(){return Ja(a)})}function La(a,b,c){return Ka(a).then(function(d){return WebAssembly.instantiate(d,b)}).then(function(d){return d}).then(c,function(d){u("failed to asynchronously prepare wasm: "+d);ma(d)})}
|
|
25
|
-
function Ma(a,b){var c=Ha;return la||"function"!=typeof WebAssembly.instantiateStreaming||Ga(c)||"function"!=typeof fetch?La(c,a,b):fetch(c,{credentials:"same-origin"}).then(function(d){return WebAssembly.instantiateStreaming(d,a).then(b,function(e){u("wasm streaming compile failed: "+e);u("falling back to ArrayBuffer instantiation");return La(c,a,b)})})}var J,K,Pa={
|
|
25
|
+
function Ma(a,b){var c=Ha;return la||"function"!=typeof WebAssembly.instantiateStreaming||Ga(c)||"function"!=typeof fetch?La(c,a,b):fetch(c,{credentials:"same-origin"}).then(function(d){return WebAssembly.instantiateStreaming(d,a).then(b,function(e){u("wasm streaming compile failed: "+e);u("falling back to ArrayBuffer instantiation");return La(c,a,b)})})}var J,K,Pa={60068:(a,b,c,d)=>{a=v(a);b=v(b);c=v(c);d=v(d);throw Error(a+b+c+d);},60284:(a,b)=>{a=v(a);b=v(b);throw Error(a+b);}};
|
|
26
26
|
function Qa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function Ra(a){for(;0<a.length;)a.shift()(h)}
|
|
27
27
|
var Sa=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},L=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Sa(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Ta=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},Ua=a=>{if("/"===
|
|
28
28
|
a)return"/";a=L(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};function Va(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return()=>{crypto.getRandomValues(a);return a[0]}}return()=>ma("randomDevice")}
|
|
@@ -140,7 +140,7 @@ typeof f&&(f+=z)}F=b}I[d>>2]=F;return 0}catch(G){if("undefined"==typeof S||"Errn
|
|
|
140
140
|
"ErrnoError"!==g.name)throw g;return g.Fa}},r:function(a,b,c,d){try{a:{var e=Yb(a);a=b;for(var f,g=b=0;g<c;g++){var l=I[a>>2],m=I[a+4>>2];a+=8;var n=Mb(e,C,l,m,f);if(0>n){var r=-1;break a}b+=n;"undefined"!==typeof f&&(f+=n)}r=b}I[d>>2]=r;return 0}catch(p){if("undefined"==typeof S||"ErrnoError"!==p.name)throw p;return p.Fa}},_:function(){var a=stackTrace(),b=ra(a)+1,c=zd(b);A(a,w,c,b);return c},C:Kd,$:Nd,D:function(a,b,c,d){return Nd(a,b,c,d)}};
|
|
141
141
|
(function(){function a(c){c=c.exports;h.asm=c;na=h.asm.ea;va();wa=h.asm.ia;ya.unshift(h.asm.fa);Fa("wasm-instantiate");return c}var b={a:Qd};Ea("wasm-instantiate");if(h.instantiateWasm)try{return h.instantiateWasm(b,a)}catch(c){u("Module.instantiateWasm callback failed with error: "+c),ba(c)}Ma(b,function(c){a(c.instance)}).catch(ba);return{}})();function X(){return(X=h.asm.ga).apply(null,arguments)}function zd(){return(zd=h.asm.ha).apply(null,arguments)}
|
|
142
142
|
var Uc=h.___getTypeName=function(){return(Uc=h.___getTypeName=h.asm.ja).apply(null,arguments)};h.__embind_initialize_bindings=function(){return(h.__embind_initialize_bindings=h.asm.ka).apply(null,arguments)};function eb(){return(eb=h.asm.la).apply(null,arguments)}h.dynCall_ji=function(){return(h.dynCall_ji=h.asm.ma).apply(null,arguments)};h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.na).apply(null,arguments)};h.dynCall_viijii=function(){return(h.dynCall_viijii=h.asm.oa).apply(null,arguments)};
|
|
143
|
-
h.dynCall_iiiiij=function(){return(h.dynCall_iiiiij=h.asm.pa).apply(null,arguments)};h.dynCall_iiiiijj=function(){return(h.dynCall_iiiiijj=h.asm.qa).apply(null,arguments)};h.dynCall_iiiiiijj=function(){return(h.dynCall_iiiiiijj=h.asm.ra).apply(null,arguments)};h.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024;h.___start_em_js=
|
|
143
|
+
h.dynCall_iiiiij=function(){return(h.dynCall_iiiiij=h.asm.pa).apply(null,arguments)};h.dynCall_iiiiijj=function(){return(h.dynCall_iiiiijj=h.asm.qa).apply(null,arguments)};h.dynCall_iiiiiijj=function(){return(h.dynCall_iiiiiijj=h.asm.ra).apply(null,arguments)};h.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024;h.___start_em_js=60394;h.___stop_em_js=61267;h.addRunDependency=Ea;h.removeRunDependency=Fa;h.FS_createPath=Qb;h.FS_createDataFile=Sb;h.FS_createPreloadedFile=Wb;
|
|
144
144
|
h.FS_createLazyFile=Ub;h.FS_createDevice=R;h.FS_unlink=Eb;var Rd;Da=function Sd(){Rd||Td();Rd||(Da=Sd)};
|
|
145
145
|
function Td(){function a(){if(!Rd&&(Rd=!0,h.calledRun=!0,!oa)){h.noFSInit||Ob||(Ob=!0,Nb(),h.stdin=h.stdin,h.stdout=h.stdout,h.stderr=h.stderr,h.stdin?R("/dev","stdin",h.stdin):Db("/dev/tty","/dev/stdin"),h.stdout?R("/dev","stdout",null,h.stdout):Db("/dev/tty","/dev/stdout"),h.stderr?R("/dev","stderr",null,h.stderr):Db("/dev/tty1","/dev/stderr"),Jb("/dev/stdin",0),Jb("/dev/stdout",1),Jb("/dev/stderr",1));pb=!1;Ra(ya);aa(h);if(h.onRuntimeInitialized)h.onRuntimeInitialized();if(h.postRun)for("function"==
|
|
146
146
|
typeof h.postRun&&(h.postRun=[h.postRun]);h.postRun.length;){var b=h.postRun.shift();za.unshift(b)}Ra(za)}}if(!(0<Ba)){if(h.preRun)for("function"==typeof h.preRun&&(h.preRun=[h.preRun]);h.preRun.length;)Aa();Ra(xa);0<Ba||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1);a()},1)):a())}}if(h.preInit)for("function"==typeof h.preInit&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();Td();
|
|
Binary file
|
|
@@ -26,7 +26,7 @@ function La(){F||(D.noFSInit||Ma||(Ma=!0,Na(),D.stdin=D.stdin,D.stdout=D.stdout,
|
|
|
26
26
|
function Ya(){Va++;D.monitorRunDependencies&&D.monitorRunDependencies(Va)}function Za(){Va--;D.monitorRunDependencies&&D.monitorRunDependencies(Va);if(0==Va&&(null!==Wa&&(clearInterval(Wa),Wa=null),Xa)){var a=Xa;Xa=null;a()}}function ya(a){if(D.onAbort)D.onAbort(a);a="Aborted("+a+")";E(a);Aa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");na(a);throw a;}function $a(a){return a.startsWith("data:application/octet-stream;base64,")}var ab;ab="capture-wasm.wasm";
|
|
27
27
|
$a(ab)||(ab=sa(ab));function bb(a){try{if(a==ab&&xa)return new Uint8Array(xa);if(va)return va(a);throw"both async and sync fetching of the wasm failed";}catch(b){ya(b)}}function cb(a){return xa||"function"!=typeof fetch?Promise.resolve().then(function(){return bb(a)}):fetch(a,{credentials:"same-origin"}).then(function(b){if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(function(){return bb(a)})}
|
|
28
28
|
function db(a,b,c){return cb(a).then(function(d){return WebAssembly.instantiate(d,b)}).then(function(d){return d}).then(c,function(d){E("failed to asynchronously prepare wasm: "+d);ya(d)})}
|
|
29
|
-
function eb(a,b){var c=ab;return xa||"function"!=typeof WebAssembly.instantiateStreaming||$a(c)||"function"!=typeof fetch?db(c,a,b):fetch(c,{credentials:"same-origin"}).then(function(d){return WebAssembly.instantiateStreaming(d,a).then(b,function(e){E("wasm streaming compile failed: "+e);E("falling back to ArrayBuffer instantiation");return db(c,a,b)})})}var L,M,fb={
|
|
29
|
+
function eb(a,b){var c=ab;return xa||"function"!=typeof WebAssembly.instantiateStreaming||$a(c)||"function"!=typeof fetch?db(c,a,b):fetch(c,{credentials:"same-origin"}).then(function(d){return WebAssembly.instantiateStreaming(d,a).then(b,function(e){E("wasm streaming compile failed: "+e);E("falling back to ArrayBuffer instantiation");return db(c,a,b)})})}var L,M,fb={61937:(a,b,c,d)=>{a=J(a);b=J(b);c=J(c);d=J(d);throw Error(a+b+c+d);},62153:(a,b)=>{a=J(a);b=J(b);throw Error(a+b);}};
|
|
30
30
|
function gb(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function hb(a){a.terminate();a.onmessage=()=>{}}function ib(a){(a=N.kb[a])||ya();N.md(a)}function jb(a){var b=N.Rc();if(!b)return 6;N.qb.push(b);N.kb[a.jb]=b;b.jb=a.jb;b.postMessage({cmd:"run",start_routine:a.td,arg:a.Ec,pthread_ptr:a.jb},a.zd);return 0}
|
|
31
31
|
var kb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},O=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=kb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},lb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},mb=a=>{if("/"===
|
|
32
32
|
a)return"/";a=O(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};function nb(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return()=>{crypto.getRandomValues(a);return a[0]}}return()=>ya("randomDevice")}
|
|
@@ -159,7 +159,7 @@ b,c,d)}};(function(){function a(c,d){c=c.exports;D.asm=c;N.Ac.push(D.asm.ta);Ha=
|
|
|
159
159
|
var vc=D._pthread_self=function(){return(vc=D._pthread_self=D.asm.sa).apply(null,arguments)};D.__emscripten_tls_init=function(){return(D.__emscripten_tls_init=D.asm.ta).apply(null,arguments)};function xb(){return(xb=D.asm.ua).apply(null,arguments)}var Ad=D.___getTypeName=function(){return(Ad=D.___getTypeName=D.asm.va).apply(null,arguments)};D.__embind_initialize_bindings=function(){return(D.__embind_initialize_bindings=D.asm.wa).apply(null,arguments)};
|
|
160
160
|
var Ne=D.__emscripten_thread_init=function(){return(Ne=D.__emscripten_thread_init=D.asm.xa).apply(null,arguments)};D.__emscripten_thread_crashed=function(){return(D.__emscripten_thread_crashed=D.asm.ya).apply(null,arguments)};function ne(){return(ne=D.asm.Aa).apply(null,arguments)}var Rd=D.__emscripten_proxy_execute_task_queue=function(){return(Rd=D.__emscripten_proxy_execute_task_queue=D.asm.Ba).apply(null,arguments)};function uc(){return(uc=D.asm.Ca).apply(null,arguments)}
|
|
161
161
|
var Bc=D.__emscripten_thread_exit=function(){return(Bc=D.__emscripten_thread_exit=D.asm.Da).apply(null,arguments)};function xc(){return(xc=D.asm.Ea).apply(null,arguments)}function le(){return(le=D.asm.Fa).apply(null,arguments)}function yc(){return(yc=D.asm.Ga).apply(null,arguments)}function me(){return(me=D.asm.Ha).apply(null,arguments)}D.dynCall_ji=function(){return(D.dynCall_ji=D.asm.Ia).apply(null,arguments)};D.dynCall_jiji=function(){return(D.dynCall_jiji=D.asm.Ja).apply(null,arguments)};
|
|
162
|
-
D.dynCall_viijii=function(){return(D.dynCall_viijii=D.asm.Ka).apply(null,arguments)};D.dynCall_iiiiij=function(){return(D.dynCall_iiiiij=D.asm.La).apply(null,arguments)};D.dynCall_iiiiijj=function(){return(D.dynCall_iiiiijj=D.asm.Ma).apply(null,arguments)};D.dynCall_iiiiiijj=function(){return(D.dynCall_iiiiiijj=D.asm.Na).apply(null,arguments)};D.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=14816;D.___start_em_js=
|
|
162
|
+
D.dynCall_viijii=function(){return(D.dynCall_viijii=D.asm.Ka).apply(null,arguments)};D.dynCall_iiiiij=function(){return(D.dynCall_iiiiij=D.asm.La).apply(null,arguments)};D.dynCall_iiiiijj=function(){return(D.dynCall_iiiiijj=D.asm.Ma).apply(null,arguments)};D.dynCall_iiiiiijj=function(){return(D.dynCall_iiiiiijj=D.asm.Na).apply(null,arguments)};D.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=14816;D.___start_em_js=60944;D.___stop_em_js=61937;D.addRunDependency=Ya;
|
|
163
163
|
D.removeRunDependency=Za;D.FS_createPath=fc;D.FS_createDataFile=hc;D.FS_createPreloadedFile=lc;D.FS_createLazyFile=jc;D.FS_createDevice=Oa;D.FS_unlink=Wb;D.keepRuntimeAlive=function(){return noExitRuntime};D.wasmMemory=u;D.ExitStatus=gb;D.PThread=N;var Pe;Xa=function Qe(){Pe||Re();Pe||(Xa=Qe)};
|
|
164
164
|
function Re(){function a(){if(!Pe&&(Pe=!0,D.calledRun=!0,!Aa)){La();ma(D);if(D.onRuntimeInitialized)D.onRuntimeInitialized();if(!F){if(D.postRun)for("function"==typeof D.postRun&&(D.postRun=[D.postRun]);D.postRun.length;){var b=D.postRun.shift();Ka.unshift(b)}Sa(Ka)}}}if(!(0<Va))if(F)ma(D),La(),startWorker(D);else{if(D.preRun)for("function"==typeof D.preRun&&(D.preRun=[D.preRun]);D.preRun.length;)Ua();Sa(Ia);0<Va||(D.setStatus?(D.setStatus("Running..."),setTimeout(function(){setTimeout(function(){D.setStatus("")},
|
|
165
165
|
1);a()},1)):a())}}if(D.preInit)for("function"==typeof D.preInit&&(D.preInit=[D.preInit]);0<D.preInit.length;)D.preInit.pop()();Re();
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -3,19 +3,7 @@
|
|
|
3
3
|
"description": "",
|
|
4
4
|
"homepage": "https://microblink.com/",
|
|
5
5
|
"repository": "github:BlinkID/capture-browser",
|
|
6
|
-
"version": "1.0.
|
|
7
|
-
"scripts": {
|
|
8
|
-
"rollup": "api-extractor run --local --verbose",
|
|
9
|
-
"build:js": "vite build",
|
|
10
|
-
"build:js-dev": "vite build --mode development",
|
|
11
|
-
"build:types": "tsc && tsx duplicate-types.mts",
|
|
12
|
-
"build": "concurrently -m 1 pnpm:build:js pnpm:build:types pnpm:rollup",
|
|
13
|
-
"build:dev": "concurrently pnpm:build:js-dev pnpm:build:types",
|
|
14
|
-
"lint:types": "tsc --emitDeclarationOnly false --noEmit",
|
|
15
|
-
"lint:package": "publint && attw --pack . --exclude-entrypoints style.css ",
|
|
16
|
-
"lint": "concurrently pnpm:lint:types pnpm:lint:package",
|
|
17
|
-
"clean": "rimraf .turbo types dist public *.tsbuildinfo"
|
|
18
|
-
},
|
|
6
|
+
"version": "1.0.3",
|
|
19
7
|
"type": "module",
|
|
20
8
|
"files": [
|
|
21
9
|
"dist",
|
|
@@ -40,19 +28,31 @@
|
|
|
40
28
|
},
|
|
41
29
|
"devDependencies": {
|
|
42
30
|
"@arethetypeswrong/cli": "^0.7.0",
|
|
43
|
-
"@mb/utils": "workspace:^",
|
|
44
31
|
"@microsoft/api-extractor": "^7.36.3",
|
|
45
32
|
"concurrently": "^8.2.0",
|
|
46
33
|
"publint": "^0.1.16",
|
|
47
34
|
"rimraf": "^5.0.1",
|
|
48
35
|
"solid-js": "^1.7.8",
|
|
49
|
-
"tsconfig": "workspace:*",
|
|
50
36
|
"tsx": "^3.12.7",
|
|
51
37
|
"vite": "^4.4.6",
|
|
52
|
-
"zx": "^7.2.3"
|
|
38
|
+
"zx": "^7.2.3",
|
|
39
|
+
"@mb/utils": "^0.0.0",
|
|
40
|
+
"tsconfig": "0.0.0"
|
|
53
41
|
},
|
|
54
42
|
"dependencies": {
|
|
55
|
-
"capture-main": "
|
|
56
|
-
"capture-ui": "
|
|
43
|
+
"capture-main": "^1.0.0",
|
|
44
|
+
"capture-ui": "^1.0.1"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"rollup": "api-extractor run --local --verbose",
|
|
48
|
+
"build:js": "vite build",
|
|
49
|
+
"build:js-dev": "vite build --mode development",
|
|
50
|
+
"build:types": "tsc && tsx duplicate-types.mts",
|
|
51
|
+
"build": "concurrently -m 1 pnpm:build:js pnpm:build:types pnpm:rollup",
|
|
52
|
+
"build:dev": "concurrently pnpm:build:js-dev pnpm:build:types",
|
|
53
|
+
"lint:types": "tsc --emitDeclarationOnly false --noEmit",
|
|
54
|
+
"lint:package": "publint && attw --pack . --exclude-entrypoints style.css ",
|
|
55
|
+
"lint": "concurrently pnpm:lint:types pnpm:lint:package",
|
|
56
|
+
"clean": "rimraf .turbo types dist public *.tsbuildinfo"
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|
package/types/index.d.ts
CHANGED