fix for seedrandom

pull/50/head
Vladimir Mandic 2020-10-30 07:14:42 -04:00
parent 5ef228a5cb
commit 837f8625d1
16 changed files with 2288 additions and 181 deletions

View File

@ -5777,7 +5777,7 @@ var require_config = __commonJS((exports) => {
var require_package = __commonJS((exports, module) => {
module.exports = {
name: "@vladmandic/human",
version: "0.4.8",
version: "0.4.9",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.node.js",
@ -5799,6 +5799,7 @@ var require_package = __commonJS((exports, module) => {
dependencies: {},
peerDependencies: {},
devDependencies: {
seedrandom: "^3.0.5",
"@tensorflow/tfjs": "^2.7.0",
"@tensorflow/tfjs-node": "^2.7.0",
"@vladmandic/pilogger": "^0.2.6",
@ -5816,11 +5817,11 @@ var require_package = __commonJS((exports, module) => {
scripts: {
start: "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
lint: "eslint src/*.js demo/*.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --external:seedrandom --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --external:seedrandom --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --external:seedrandom --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --external:seedrandom --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --external:seedrandom --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
build: "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && ls -l dist/",
update: "npm update --depth 20 --force && npm dedupe && npm prune && npm audit",
changelog: "node changelog.js"

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
"imports": []
},
"package.json": {
"bytes": 2952,
"bytes": 2870,
"imports": []
},
"src/emotion/emotion.js": {
@ -260,7 +260,7 @@
"dist/human.esm-nobundle.js.map": {
"imports": [],
"inputs": {},
"bytes": 248629
"bytes": 248630
},
"dist/human.esm-nobundle.js": {
"imports": [],
@ -353,7 +353,7 @@
"bytesInOutput": 2230
},
"package.json": {
"bytesInOutput": 3094
"bytesInOutput": 3012
},
"src/human.js": {
"bytesInOutput": 10775
@ -362,7 +362,7 @@
"bytesInOutput": 0
}
},
"bytes": 155320
"bytes": 155238
}
}
}

723
dist/human.esm.js vendored
View File

@ -11826,7 +11826,7 @@ var require_tf_core_node = __commonJS((exports) => {
return module2 = {exports: {}}, fn(module2, module2.exports), module2.exports;
}
var alea = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
@ -11898,8 +11898,8 @@ var require_tf_core_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -11908,7 +11908,7 @@ var require_tf_core_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xor128 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
@ -11962,8 +11962,8 @@ var require_tf_core_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -11972,7 +11972,7 @@ var require_tf_core_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xorwow = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -12033,8 +12033,8 @@ var require_tf_core_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -12043,7 +12043,7 @@ var require_tf_core_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xorshift7 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -12120,8 +12120,8 @@ var require_tf_core_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -12130,7 +12130,7 @@ var require_tf_core_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xor4096 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -12221,8 +12221,8 @@ var require_tf_core_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -12231,7 +12231,7 @@ var require_tf_core_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var tychei = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -12290,8 +12290,8 @@ var require_tf_core_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46305,7 +46305,7 @@ var require_tf_data_node = __commonJS((exports) => {
return module2 = {exports: {}}, fn(module2, module2.exports), module2.exports;
}
var alea = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
@ -46377,8 +46377,8 @@ var require_tf_data_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46387,7 +46387,7 @@ var require_tf_data_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xor128 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
@ -46441,8 +46441,8 @@ var require_tf_data_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46451,7 +46451,7 @@ var require_tf_data_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xorwow = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -46512,8 +46512,8 @@ var require_tf_data_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46522,7 +46522,7 @@ var require_tf_data_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xorshift7 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -46599,8 +46599,8 @@ var require_tf_data_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46609,7 +46609,7 @@ var require_tf_data_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var xor4096 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -46700,8 +46700,8 @@ var require_tf_data_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46710,7 +46710,7 @@ var require_tf_data_node = __commonJS((exports) => {
})(commonjsGlobal, module2, false);
});
var tychei = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -46769,8 +46769,8 @@ var require_tf_data_node = __commonJS((exports) => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -49866,6 +49866,642 @@ var require_tf_data_node = __commonJS((exports) => {
exports.zip = zip;
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js
var require_alea = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
var t = 2091639 * me.s0 + me.c * 23283064365386963e-26;
me.s0 = me.s1;
me.s1 = me.s2;
return me.s2 = t - (me.c = t | 0);
};
me.c = 1;
me.s0 = mash(" ");
me.s1 = mash(" ");
me.s2 = mash(" ");
me.s0 -= mash(seed);
if (me.s0 < 0) {
me.s0 += 1;
}
me.s1 -= mash(seed);
if (me.s1 < 0) {
me.s1 += 1;
}
me.s2 -= mash(seed);
if (me.s2 < 0) {
me.s2 += 1;
}
mash = null;
}
function copy(f, t) {
t.c = f.c;
t.s0 = f.s0;
t.s1 = f.s1;
t.s2 = f.s2;
return t;
}
function impl(seed, opts) {
var xg = new Alea(seed), state = opts && opts.state, prng = xg.next;
prng.int32 = function() {
return xg.next() * 4294967296 | 0;
};
prng.double = function() {
return prng() + (prng() * 2097152 | 0) * 11102230246251565e-32;
};
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
function Mash() {
var n = 4022871197;
var mash = function(data) {
data = data.toString();
for (var i = 0; i < data.length; i++) {
n += data.charCodeAt(i);
var h = 0.02519603282416938 * n;
n = h >>> 0;
h -= n;
h *= n;
n = h >>> 0;
h -= n;
n += h * 4294967296;
}
return (n >>> 0) * 23283064365386963e-26;
};
return mash;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.alea = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js
var require_xor128 = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
me.y = 0;
me.z = 0;
me.w = 0;
me.next = function() {
var t = me.x ^ me.x << 11;
me.x = me.y;
me.y = me.z;
me.z = me.w;
return me.w ^= me.w >>> 19 ^ t ^ t >>> 8;
};
if (seed === (seed | 0)) {
me.x = seed;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 64; k++) {
me.x ^= strseed.charCodeAt(k) | 0;
me.next();
}
}
function copy(f, t) {
t.x = f.x;
t.y = f.y;
t.z = f.z;
t.w = f.w;
return t;
}
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xor128 = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js
var require_xorwow = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
var t = me.x ^ me.x >>> 2;
me.x = me.y;
me.y = me.z;
me.z = me.w;
me.w = me.v;
return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t ^ t << 1)) | 0;
};
me.x = 0;
me.y = 0;
me.z = 0;
me.w = 0;
me.v = 0;
if (seed === (seed | 0)) {
me.x = seed;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 64; k++) {
me.x ^= strseed.charCodeAt(k) | 0;
if (k == strseed.length) {
me.d = me.x << 10 ^ me.x >>> 4;
}
me.next();
}
}
function copy(f, t) {
t.x = f.x;
t.y = f.y;
t.z = f.z;
t.w = f.w;
t.v = f.v;
t.d = f.d;
return t;
}
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xorwow = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js
var require_xorshift7 = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
var X = me.x, i = me.i, t, v, w;
t = X[i];
t ^= t >>> 7;
v = t ^ t << 24;
t = X[i + 1 & 7];
v ^= t ^ t >>> 10;
t = X[i + 3 & 7];
v ^= t ^ t >>> 3;
t = X[i + 4 & 7];
v ^= t ^ t << 7;
t = X[i + 7 & 7];
t = t ^ t << 13;
v ^= t ^ t << 9;
X[i] = v;
me.i = i + 1 & 7;
return v;
};
function init(me2, seed2) {
var j, w, X = [];
if (seed2 === (seed2 | 0)) {
w = X[0] = seed2;
} else {
seed2 = "" + seed2;
for (j = 0; j < seed2.length; ++j) {
X[j & 7] = X[j & 7] << 15 ^ seed2.charCodeAt(j) + X[j + 1 & 7] << 13;
}
}
while (X.length < 8)
X.push(0);
for (j = 0; j < 8 && X[j] === 0; ++j)
;
if (j == 8)
w = X[7] = -1;
else
w = X[j];
me2.x = X;
me2.i = 0;
for (j = 256; j > 0; --j) {
me2.next();
}
}
init(me, seed);
}
function copy(f, t) {
t.x = f.x.slice();
t.i = f.i;
return t;
}
function impl(seed, opts) {
if (seed == null)
seed = +new Date();
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (state.x)
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xorshift7 = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js
var require_xor4096 = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
var w = me.w, X = me.X, i = me.i, t, v;
me.w = w = w + 1640531527 | 0;
v = X[i + 34 & 127];
t = X[i = i + 1 & 127];
v ^= v << 13;
t ^= t << 17;
v ^= v >>> 15;
t ^= t >>> 12;
v = X[i] = v ^ t;
me.i = i;
return v + (w ^ w >>> 16) | 0;
};
function init(me2, seed2) {
var t, v, i, j, w, X = [], limit = 128;
if (seed2 === (seed2 | 0)) {
v = seed2;
seed2 = null;
} else {
seed2 = seed2 + "\0";
v = 0;
limit = Math.max(limit, seed2.length);
}
for (i = 0, j = -32; j < limit; ++j) {
if (seed2)
v ^= seed2.charCodeAt((j + 32) % seed2.length);
if (j === 0)
w = v;
v ^= v << 10;
v ^= v >>> 15;
v ^= v << 4;
v ^= v >>> 13;
if (j >= 0) {
w = w + 1640531527 | 0;
t = X[j & 127] ^= v + w;
i = t == 0 ? i + 1 : 0;
}
}
if (i >= 128) {
X[(seed2 && seed2.length || 0) & 127] = -1;
}
i = 127;
for (j = 4 * 128; j > 0; --j) {
v = X[i + 34 & 127];
t = X[i = i + 1 & 127];
v ^= v << 13;
t ^= t << 17;
v ^= v >>> 15;
t ^= t >>> 12;
X[i] = v ^ t;
}
me2.w = w;
me2.X = X;
me2.i = i;
}
init(me, seed);
}
function copy(f, t) {
t.i = f.i;
t.w = f.w;
t.X = f.X.slice();
return t;
}
;
function impl(seed, opts) {
if (seed == null)
seed = +new Date();
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (state.X)
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xor4096 = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js
var require_tychei = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
var b = me.b, c = me.c, d = me.d, a = me.a;
b = b << 25 ^ b >>> 7 ^ c;
c = c - d | 0;
d = d << 24 ^ d >>> 8 ^ a;
a = a - b | 0;
me.b = b = b << 20 ^ b >>> 12 ^ c;
me.c = c = c - d | 0;
me.d = d << 16 ^ c >>> 16 ^ a;
return me.a = a - b | 0;
};
me.a = 0;
me.b = 0;
me.c = 2654435769 | 0;
me.d = 1367130551;
if (seed === Math.floor(seed)) {
me.a = seed / 4294967296 | 0;
me.b = seed | 0;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 20; k++) {
me.b ^= strseed.charCodeAt(k) | 0;
me.next();
}
}
function copy(f, t) {
t.a = f.a;
t.b = f.b;
t.c = f.c;
t.d = f.d;
return t;
}
;
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.tychei = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js
var require_seedrandom = __commonJS((exports, module) => {
(function(pool, math) {
var global2 = this, width = 256, chunks = 6, digits = 52, rngname = "random", startdenom = math.pow(width, chunks), significance = math.pow(2, digits), overflow = significance * 2, mask = width - 1, nodecrypto;
function seedrandom(seed, options, callback) {
var key = [];
options = options == true ? {entropy: true} : options || {};
var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed == null ? autoseed() : seed, 3), key);
var arc4 = new ARC4(key);
var prng = function() {
var n = arc4.g(chunks), d = startdenom, x = 0;
while (n < significance) {
n = (n + x) * width;
d *= width;
x = arc4.g(1);
}
while (n >= overflow) {
n /= 2;
d /= 2;
x >>>= 1;
}
return (n + x) / d;
};
prng.int32 = function() {
return arc4.g(4) | 0;
};
prng.quick = function() {
return arc4.g(4) / 4294967296;
};
prng.double = prng;
mixkey(tostring(arc4.S), pool);
return (options.pass || callback || function(prng2, seed2, is_math_call, state) {
if (state) {
if (state.S) {
copy(state, arc4);
}
prng2.state = function() {
return copy(arc4, {});
};
}
if (is_math_call) {
math[rngname] = prng2;
return seed2;
} else
return prng2;
})(prng, shortseed, "global" in options ? options.global : this == math, options.state);
}
math["seed" + rngname] = seedrandom;
function ARC4(key) {
var t, keylen = key.length, me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
if (!keylen) {
key = [keylen++];
}
while (i < width) {
s[i] = i++;
}
for (i = 0; i < width; i++) {
s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
s[j] = t;
}
(me.g = function(count) {
var t2, r = 0, i2 = me.i, j2 = me.j, s2 = me.S;
while (count--) {
t2 = s2[i2 = mask & i2 + 1];
r = r * width + s2[mask & (s2[i2] = s2[j2 = mask & j2 + t2]) + (s2[j2] = t2)];
}
me.i = i2;
me.j = j2;
return r;
})(width);
}
function copy(f, t) {
t.i = f.i;
t.j = f.j;
t.S = f.S.slice();
return t;
}
;
function flatten(obj, depth) {
var result = [], typ = typeof obj, prop;
if (depth && typ == "object") {
for (prop in obj) {
try {
result.push(flatten(obj[prop], depth - 1));
} catch (e) {
}
}
}
return result.length ? result : typ == "string" ? obj : obj + "\0";
}
function mixkey(seed, key) {
var stringseed = seed + "", smear, j = 0;
while (j < stringseed.length) {
key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
}
return tostring(key);
}
function autoseed() {
try {
var out;
if (nodecrypto && (out = nodecrypto.randomBytes)) {
out = out(width);
} else {
out = new Uint8Array(width);
(global2.crypto || global2.msCrypto).getRandomValues(out);
}
return tostring(out);
} catch (e) {
var browser = global2.navigator, plugins = browser && browser.plugins;
return [+new Date(), global2, plugins, global2.screen, tostring(pool)];
}
}
function tostring(a) {
return String.fromCharCode.apply(0, a);
}
mixkey(math.random(), pool);
if (typeof module == "object" && module.exports) {
module.exports = seedrandom;
try {
nodecrypto = require_crypto();
} catch (ex) {
}
} else if (typeof define == "function" && define.amd) {
define(function() {
return seedrandom;
});
}
})([], Math);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js
var require_seedrandom2 = __commonJS((exports, module) => {
var alea = require_alea();
var xor128 = require_xor128();
var xorwow = require_xorwow();
var xorshift7 = require_xorshift7();
var xor4096 = require_xor4096();
var tychei = require_tychei();
var sr = require_seedrandom();
sr.alea = alea;
sr.xor128 = xor128;
sr.xorwow = xorwow;
sr.xorshift7 = xorshift7;
sr.xor4096 = xor4096;
sr.tychei = tychei;
module.exports = sr;
});
// node_modules/@tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js
var require_tf_backend_cpu_node = __commonJS((exports) => {
/**
@ -49887,7 +50523,7 @@ var require_tf_backend_cpu_node = __commonJS((exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {value: true});
var tf2 = require_tf_core_node();
var seedrandom = require("seedrandom");
var seedrandom = require_seedrandom2();
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@ -72190,7 +72826,7 @@ var require_config = __commonJS((exports) => {
var require_package = __commonJS((exports, module) => {
module.exports = {
name: "@vladmandic/human",
version: "0.4.8",
version: "0.4.9",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.node.js",
@ -72212,6 +72848,7 @@ var require_package = __commonJS((exports, module) => {
dependencies: {},
peerDependencies: {},
devDependencies: {
seedrandom: "^3.0.5",
"@tensorflow/tfjs": "^2.7.0",
"@tensorflow/tfjs-node": "^2.7.0",
"@vladmandic/pilogger": "^0.2.6",
@ -72229,11 +72866,11 @@ var require_package = __commonJS((exports, module) => {
scripts: {
start: "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
lint: "eslint src/*.js demo/*.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --external:seedrandom --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --external:seedrandom --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --external:seedrandom --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --external:seedrandom --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --external:seedrandom --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
build: "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && ls -l dist/",
update: "npm update --depth 20 --force && npm dedupe && npm prune && npm audit",
changelog: "node changelog.js"

File diff suppressed because one or more lines are too long

97
dist/human.esm.json vendored
View File

@ -9,6 +9,67 @@
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js"
}
]
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js": {
"bytes": 2110,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js"
}
]
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js": {
"bytes": 3243,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js": {
"bytes": 2525,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js": {
"bytes": 1748,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js": {
"bytes": 4559,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js": {
"bytes": 2418,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js": {
"bytes": 1919,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js": {
"bytes": 8358,
"imports": [
{
"path": "empty:crypto"
}
]
},
@ -88,7 +149,7 @@
]
},
"package.json": {
"bytes": 2952,
"bytes": 2870,
"imports": []
},
"src/emotion/emotion.js": {
@ -407,7 +468,7 @@
"dist/human.esm.js.map": {
"imports": [],
"inputs": {},
"bytes": 5083151
"bytes": 5121936
},
"dist/human.esm.js": {
"imports": [],
@ -422,7 +483,7 @@
"bytesInOutput": 44
},
"node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js": {
"bytesInOutput": 1010313
"bytesInOutput": 1010337
},
"node_modules/@tensorflow/tfjs-layers/dist/tf-layers.node.js": {
"bytesInOutput": 514491
@ -434,7 +495,31 @@
"bytesInOutput": 52
},
"node_modules/@tensorflow/tfjs-data/dist/tf-data.node.js": {
"bytesInOutput": 129561
"bytesInOutput": 129585
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js": {
"bytesInOutput": 2112
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js": {
"bytesInOutput": 1699
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js": {
"bytesInOutput": 1897
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js": {
"bytesInOutput": 2307
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js": {
"bytesInOutput": 2742
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js": {
"bytesInOutput": 1940
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js": {
"bytesInOutput": 4019
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js": {
"bytesInOutput": 458
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js": {
"bytesInOutput": 272394
@ -533,7 +618,7 @@
"bytesInOutput": 2230
},
"package.json": {
"bytesInOutput": 3094
"bytesInOutput": 3012
},
"src/human.js": {
"bytesInOutput": 10765
@ -542,7 +627,7 @@
"bytesInOutput": 0
}
},
"bytes": 2906393
"bytes": 2924202
}
}
}

723
dist/human.js vendored
View File

@ -11827,7 +11827,7 @@ var Human = (() => {
return module2 = {exports: {}}, fn(module2, module2.exports), module2.exports;
}
var alea = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
@ -11899,8 +11899,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -11909,7 +11909,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xor128 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
@ -11963,8 +11963,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -11973,7 +11973,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xorwow = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -12034,8 +12034,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -12044,7 +12044,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xorshift7 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -12121,8 +12121,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -12131,7 +12131,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xor4096 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -12222,8 +12222,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -12232,7 +12232,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var tychei = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -12291,8 +12291,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46306,7 +46306,7 @@ var Human = (() => {
return module2 = {exports: {}}, fn(module2, module2.exports), module2.exports;
}
var alea = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
@ -46378,8 +46378,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46388,7 +46388,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xor128 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
@ -46442,8 +46442,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46452,7 +46452,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xorwow = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -46513,8 +46513,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46523,7 +46523,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xorshift7 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -46600,8 +46600,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46610,7 +46610,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var xor4096 = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -46701,8 +46701,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -46711,7 +46711,7 @@ var Human = (() => {
})(commonjsGlobal, module2, false);
});
var tychei = createCommonjsModule(function(module2) {
(function(global2, module3, define) {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -46770,8 +46770,8 @@ var Human = (() => {
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -49867,6 +49867,642 @@ var Human = (() => {
exports.zip = zip;
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js
var require_alea = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
var t = 2091639 * me.s0 + me.c * 23283064365386963e-26;
me.s0 = me.s1;
me.s1 = me.s2;
return me.s2 = t - (me.c = t | 0);
};
me.c = 1;
me.s0 = mash(" ");
me.s1 = mash(" ");
me.s2 = mash(" ");
me.s0 -= mash(seed);
if (me.s0 < 0) {
me.s0 += 1;
}
me.s1 -= mash(seed);
if (me.s1 < 0) {
me.s1 += 1;
}
me.s2 -= mash(seed);
if (me.s2 < 0) {
me.s2 += 1;
}
mash = null;
}
function copy(f, t) {
t.c = f.c;
t.s0 = f.s0;
t.s1 = f.s1;
t.s2 = f.s2;
return t;
}
function impl(seed, opts) {
var xg = new Alea(seed), state = opts && opts.state, prng = xg.next;
prng.int32 = function() {
return xg.next() * 4294967296 | 0;
};
prng.double = function() {
return prng() + (prng() * 2097152 | 0) * 11102230246251565e-32;
};
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
function Mash() {
var n = 4022871197;
var mash = function(data) {
data = data.toString();
for (var i = 0; i < data.length; i++) {
n += data.charCodeAt(i);
var h = 0.02519603282416938 * n;
n = h >>> 0;
h -= n;
h *= n;
n = h >>> 0;
h -= n;
n += h * 4294967296;
}
return (n >>> 0) * 23283064365386963e-26;
};
return mash;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.alea = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js
var require_xor128 = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
me.y = 0;
me.z = 0;
me.w = 0;
me.next = function() {
var t = me.x ^ me.x << 11;
me.x = me.y;
me.y = me.z;
me.z = me.w;
return me.w ^= me.w >>> 19 ^ t ^ t >>> 8;
};
if (seed === (seed | 0)) {
me.x = seed;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 64; k++) {
me.x ^= strseed.charCodeAt(k) | 0;
me.next();
}
}
function copy(f, t) {
t.x = f.x;
t.y = f.y;
t.z = f.z;
t.w = f.w;
return t;
}
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xor128 = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js
var require_xorwow = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
var t = me.x ^ me.x >>> 2;
me.x = me.y;
me.y = me.z;
me.z = me.w;
me.w = me.v;
return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t ^ t << 1)) | 0;
};
me.x = 0;
me.y = 0;
me.z = 0;
me.w = 0;
me.v = 0;
if (seed === (seed | 0)) {
me.x = seed;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 64; k++) {
me.x ^= strseed.charCodeAt(k) | 0;
if (k == strseed.length) {
me.d = me.x << 10 ^ me.x >>> 4;
}
me.next();
}
}
function copy(f, t) {
t.x = f.x;
t.y = f.y;
t.z = f.z;
t.w = f.w;
t.v = f.v;
t.d = f.d;
return t;
}
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xorwow = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js
var require_xorshift7 = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
var X = me.x, i = me.i, t, v, w;
t = X[i];
t ^= t >>> 7;
v = t ^ t << 24;
t = X[i + 1 & 7];
v ^= t ^ t >>> 10;
t = X[i + 3 & 7];
v ^= t ^ t >>> 3;
t = X[i + 4 & 7];
v ^= t ^ t << 7;
t = X[i + 7 & 7];
t = t ^ t << 13;
v ^= t ^ t << 9;
X[i] = v;
me.i = i + 1 & 7;
return v;
};
function init(me2, seed2) {
var j, w, X = [];
if (seed2 === (seed2 | 0)) {
w = X[0] = seed2;
} else {
seed2 = "" + seed2;
for (j = 0; j < seed2.length; ++j) {
X[j & 7] = X[j & 7] << 15 ^ seed2.charCodeAt(j) + X[j + 1 & 7] << 13;
}
}
while (X.length < 8)
X.push(0);
for (j = 0; j < 8 && X[j] === 0; ++j)
;
if (j == 8)
w = X[7] = -1;
else
w = X[j];
me2.x = X;
me2.i = 0;
for (j = 256; j > 0; --j) {
me2.next();
}
}
init(me, seed);
}
function copy(f, t) {
t.x = f.x.slice();
t.i = f.i;
return t;
}
function impl(seed, opts) {
if (seed == null)
seed = +new Date();
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (state.x)
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xorshift7 = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js
var require_xor4096 = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
var w = me.w, X = me.X, i = me.i, t, v;
me.w = w = w + 1640531527 | 0;
v = X[i + 34 & 127];
t = X[i = i + 1 & 127];
v ^= v << 13;
t ^= t << 17;
v ^= v >>> 15;
t ^= t >>> 12;
v = X[i] = v ^ t;
me.i = i;
return v + (w ^ w >>> 16) | 0;
};
function init(me2, seed2) {
var t, v, i, j, w, X = [], limit = 128;
if (seed2 === (seed2 | 0)) {
v = seed2;
seed2 = null;
} else {
seed2 = seed2 + "\0";
v = 0;
limit = Math.max(limit, seed2.length);
}
for (i = 0, j = -32; j < limit; ++j) {
if (seed2)
v ^= seed2.charCodeAt((j + 32) % seed2.length);
if (j === 0)
w = v;
v ^= v << 10;
v ^= v >>> 15;
v ^= v << 4;
v ^= v >>> 13;
if (j >= 0) {
w = w + 1640531527 | 0;
t = X[j & 127] ^= v + w;
i = t == 0 ? i + 1 : 0;
}
}
if (i >= 128) {
X[(seed2 && seed2.length || 0) & 127] = -1;
}
i = 127;
for (j = 4 * 128; j > 0; --j) {
v = X[i + 34 & 127];
t = X[i = i + 1 & 127];
v ^= v << 13;
t ^= t << 17;
v ^= v >>> 15;
t ^= t >>> 12;
X[i] = v ^ t;
}
me2.w = w;
me2.X = X;
me2.i = i;
}
init(me, seed);
}
function copy(f, t) {
t.i = f.i;
t.w = f.w;
t.X = f.X.slice();
return t;
}
;
function impl(seed, opts) {
if (seed == null)
seed = +new Date();
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (state.X)
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xor4096 = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js
var require_tychei = __commonJS((exports, module) => {
(function(global2, module2, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
var b = me.b, c = me.c, d = me.d, a = me.a;
b = b << 25 ^ b >>> 7 ^ c;
c = c - d | 0;
d = d << 24 ^ d >>> 8 ^ a;
a = a - b | 0;
me.b = b = b << 20 ^ b >>> 12 ^ c;
me.c = c = c - d | 0;
me.d = d << 16 ^ c >>> 16 ^ a;
return me.a = a - b | 0;
};
me.a = 0;
me.b = 0;
me.c = 2654435769 | 0;
me.d = 1367130551;
if (seed === Math.floor(seed)) {
me.a = seed / 4294967296 | 0;
me.b = seed | 0;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 20; k++) {
me.b ^= strseed.charCodeAt(k) | 0;
me.next();
}
}
function copy(f, t) {
t.a = f.a;
t.b = f.b;
t.c = f.c;
t.d = f.d;
return t;
}
;
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module2 && module2.exports) {
module2.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.tychei = impl;
}
})(exports, typeof module == "object" && module, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js
var require_seedrandom = __commonJS((exports, module) => {
(function(pool, math) {
var global2 = this, width = 256, chunks = 6, digits = 52, rngname = "random", startdenom = math.pow(width, chunks), significance = math.pow(2, digits), overflow = significance * 2, mask = width - 1, nodecrypto;
function seedrandom(seed, options, callback) {
var key = [];
options = options == true ? {entropy: true} : options || {};
var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed == null ? autoseed() : seed, 3), key);
var arc4 = new ARC4(key);
var prng = function() {
var n = arc4.g(chunks), d = startdenom, x = 0;
while (n < significance) {
n = (n + x) * width;
d *= width;
x = arc4.g(1);
}
while (n >= overflow) {
n /= 2;
d /= 2;
x >>>= 1;
}
return (n + x) / d;
};
prng.int32 = function() {
return arc4.g(4) | 0;
};
prng.quick = function() {
return arc4.g(4) / 4294967296;
};
prng.double = prng;
mixkey(tostring(arc4.S), pool);
return (options.pass || callback || function(prng2, seed2, is_math_call, state) {
if (state) {
if (state.S) {
copy(state, arc4);
}
prng2.state = function() {
return copy(arc4, {});
};
}
if (is_math_call) {
math[rngname] = prng2;
return seed2;
} else
return prng2;
})(prng, shortseed, "global" in options ? options.global : this == math, options.state);
}
math["seed" + rngname] = seedrandom;
function ARC4(key) {
var t, keylen = key.length, me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
if (!keylen) {
key = [keylen++];
}
while (i < width) {
s[i] = i++;
}
for (i = 0; i < width; i++) {
s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
s[j] = t;
}
(me.g = function(count) {
var t2, r = 0, i2 = me.i, j2 = me.j, s2 = me.S;
while (count--) {
t2 = s2[i2 = mask & i2 + 1];
r = r * width + s2[mask & (s2[i2] = s2[j2 = mask & j2 + t2]) + (s2[j2] = t2)];
}
me.i = i2;
me.j = j2;
return r;
})(width);
}
function copy(f, t) {
t.i = f.i;
t.j = f.j;
t.S = f.S.slice();
return t;
}
;
function flatten(obj, depth) {
var result = [], typ = typeof obj, prop;
if (depth && typ == "object") {
for (prop in obj) {
try {
result.push(flatten(obj[prop], depth - 1));
} catch (e) {
}
}
}
return result.length ? result : typ == "string" ? obj : obj + "\0";
}
function mixkey(seed, key) {
var stringseed = seed + "", smear, j = 0;
while (j < stringseed.length) {
key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
}
return tostring(key);
}
function autoseed() {
try {
var out;
if (nodecrypto && (out = nodecrypto.randomBytes)) {
out = out(width);
} else {
out = new Uint8Array(width);
(global2.crypto || global2.msCrypto).getRandomValues(out);
}
return tostring(out);
} catch (e) {
var browser = global2.navigator, plugins = browser && browser.plugins;
return [+new Date(), global2, plugins, global2.screen, tostring(pool)];
}
}
function tostring(a) {
return String.fromCharCode.apply(0, a);
}
mixkey(math.random(), pool);
if (typeof module == "object" && module.exports) {
module.exports = seedrandom;
try {
nodecrypto = require_crypto();
} catch (ex) {
}
} else if (typeof define == "function" && define.amd) {
define(function() {
return seedrandom;
});
}
})([], Math);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js
var require_seedrandom2 = __commonJS((exports, module) => {
var alea = require_alea();
var xor128 = require_xor128();
var xorwow = require_xorwow();
var xorshift7 = require_xorshift7();
var xor4096 = require_xor4096();
var tychei = require_tychei();
var sr = require_seedrandom();
sr.alea = alea;
sr.xor128 = xor128;
sr.xorwow = xorwow;
sr.xorshift7 = xorshift7;
sr.xor4096 = xor4096;
sr.tychei = tychei;
module.exports = sr;
});
// node_modules/@tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js
var require_tf_backend_cpu_node = __commonJS((exports) => {
/**
@ -49888,7 +50524,7 @@ var Human = (() => {
"use strict";
Object.defineProperty(exports, "__esModule", {value: true});
var tf = require_tf_core_node();
var seedrandom = require("seedrandom");
var seedrandom = require_seedrandom2();
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@ -72191,7 +72827,7 @@ var Human = (() => {
var require_package = __commonJS((exports, module) => {
module.exports = {
name: "@vladmandic/human",
version: "0.4.8",
version: "0.4.9",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.node.js",
@ -72213,6 +72849,7 @@ var Human = (() => {
dependencies: {},
peerDependencies: {},
devDependencies: {
seedrandom: "^3.0.5",
"@tensorflow/tfjs": "^2.7.0",
"@tensorflow/tfjs-node": "^2.7.0",
"@vladmandic/pilogger": "^0.2.6",
@ -72230,11 +72867,11 @@ var Human = (() => {
scripts: {
start: "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
lint: "eslint src/*.js demo/*.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --external:seedrandom --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --external:seedrandom --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --external:seedrandom --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --external:seedrandom --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --external:seedrandom --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
build: "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && ls -l dist/",
update: "npm update --depth 20 --force && npm dedupe && npm prune && npm audit",
changelog: "node changelog.js"

6
dist/human.js.map vendored

File diff suppressed because one or more lines are too long

97
dist/human.json vendored
View File

@ -9,6 +9,67 @@
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js"
}
]
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js": {
"bytes": 2110,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js"
},
{
"path": "node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js"
}
]
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js": {
"bytes": 3243,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js": {
"bytes": 2525,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js": {
"bytes": 1748,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js": {
"bytes": 4559,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js": {
"bytes": 2418,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js": {
"bytes": 1919,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js": {
"bytes": 8358,
"imports": [
{
"path": "empty:crypto"
}
]
},
@ -88,7 +149,7 @@
]
},
"package.json": {
"bytes": 2952,
"bytes": 2870,
"imports": []
},
"src/emotion/emotion.js": {
@ -407,7 +468,7 @@
"dist/human.js.map": {
"imports": [],
"inputs": {},
"bytes": 5086901
"bytes": 5125792
},
"dist/human.js": {
"imports": [],
@ -422,7 +483,7 @@
"bytesInOutput": 48
},
"node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js": {
"bytesInOutput": 1061222
"bytesInOutput": 1061246
},
"node_modules/@tensorflow/tfjs-layers/dist/tf-layers.node.js": {
"bytesInOutput": 541660
@ -434,7 +495,31 @@
"bytesInOutput": 56
},
"node_modules/@tensorflow/tfjs-data/dist/tf-data.node.js": {
"bytesInOutput": 136948
"bytesInOutput": 136972
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js": {
"bytesInOutput": 2276
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js": {
"bytesInOutput": 1827
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js": {
"bytesInOutput": 2039
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js": {
"bytesInOutput": 2481
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js": {
"bytesInOutput": 2946
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js": {
"bytesInOutput": 2080
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js": {
"bytesInOutput": 4275
},
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js": {
"bytesInOutput": 490
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js": {
"bytesInOutput": 284249
@ -533,13 +618,13 @@
"bytesInOutput": 2424
},
"package.json": {
"bytesInOutput": 3224
"bytesInOutput": 3144
},
"src/human.js": {
"bytesInOutput": 11994
}
},
"bytes": 3051012
"bytes": 3070079
}
}
}

View File

@ -5777,7 +5777,7 @@ var require_config = __commonJS((exports2) => {
var require_package = __commonJS((exports2, module2) => {
module2.exports = {
name: "@vladmandic/human",
version: "0.4.8",
version: "0.4.9",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.node.js",
@ -5799,6 +5799,7 @@ var require_package = __commonJS((exports2, module2) => {
dependencies: {},
peerDependencies: {},
devDependencies: {
seedrandom: "^3.0.5",
"@tensorflow/tfjs": "^2.7.0",
"@tensorflow/tfjs-node": "^2.7.0",
"@vladmandic/pilogger": "^0.2.6",
@ -5816,11 +5817,11 @@ var require_package = __commonJS((exports2, module2) => {
scripts: {
start: "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
lint: "eslint src/*.js demo/*.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --external:seedrandom --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --external:seedrandom --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --external:seedrandom --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --external:seedrandom --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --external:seedrandom --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
build: "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && ls -l dist/",
update: "npm update --depth 20 --force && npm dedupe && npm prune && npm audit",
changelog: "node changelog.js"

File diff suppressed because one or more lines are too long

723
dist/human.node.js vendored
View File

@ -12872,7 +12872,7 @@ var require_tf_core_node = __commonJS((exports2) => {
return module3 = {exports: {}}, fn(module3, module3.exports), module3.exports;
}
var alea = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
@ -12944,8 +12944,8 @@ var require_tf_core_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -12954,7 +12954,7 @@ var require_tf_core_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xor128 = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
@ -13008,8 +13008,8 @@ var require_tf_core_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -13018,7 +13018,7 @@ var require_tf_core_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xorwow = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -13079,8 +13079,8 @@ var require_tf_core_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -13089,7 +13089,7 @@ var require_tf_core_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xorshift7 = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -13166,8 +13166,8 @@ var require_tf_core_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -13176,7 +13176,7 @@ var require_tf_core_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xor4096 = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -13267,8 +13267,8 @@ var require_tf_core_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -13277,7 +13277,7 @@ var require_tf_core_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var tychei = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -13336,8 +13336,8 @@ var require_tf_core_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -47347,7 +47347,7 @@ var require_tf_data_node = __commonJS((exports2) => {
return module3 = {exports: {}}, fn(module3, module3.exports), module3.exports;
}
var alea = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
@ -47419,8 +47419,8 @@ var require_tf_data_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -47429,7 +47429,7 @@ var require_tf_data_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xor128 = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
@ -47483,8 +47483,8 @@ var require_tf_data_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -47493,7 +47493,7 @@ var require_tf_data_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xorwow = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -47554,8 +47554,8 @@ var require_tf_data_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -47564,7 +47564,7 @@ var require_tf_data_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xorshift7 = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -47641,8 +47641,8 @@ var require_tf_data_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -47651,7 +47651,7 @@ var require_tf_data_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var xor4096 = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
@ -47742,8 +47742,8 @@ var require_tf_data_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -47752,7 +47752,7 @@ var require_tf_data_node = __commonJS((exports2) => {
})(commonjsGlobal, module3, false);
});
var tychei = createCommonjsModule(function(module3) {
(function(global2, module4, define) {
(function(global2, module4, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
@ -47811,8 +47811,8 @@ var require_tf_data_node = __commonJS((exports2) => {
}
if (module4 && module4.exports) {
module4.exports = impl;
} else if (define && define.amd) {
define(function() {
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
@ -50908,6 +50908,642 @@ var require_tf_data_node = __commonJS((exports2) => {
exports2.zip = zip;
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js
var require_alea = __commonJS((exports2, module2) => {
(function(global2, module3, define2) {
function Alea(seed) {
var me = this, mash = Mash();
me.next = function() {
var t = 2091639 * me.s0 + me.c * 23283064365386963e-26;
me.s0 = me.s1;
me.s1 = me.s2;
return me.s2 = t - (me.c = t | 0);
};
me.c = 1;
me.s0 = mash(" ");
me.s1 = mash(" ");
me.s2 = mash(" ");
me.s0 -= mash(seed);
if (me.s0 < 0) {
me.s0 += 1;
}
me.s1 -= mash(seed);
if (me.s1 < 0) {
me.s1 += 1;
}
me.s2 -= mash(seed);
if (me.s2 < 0) {
me.s2 += 1;
}
mash = null;
}
function copy(f, t) {
t.c = f.c;
t.s0 = f.s0;
t.s1 = f.s1;
t.s2 = f.s2;
return t;
}
function impl(seed, opts) {
var xg = new Alea(seed), state = opts && opts.state, prng = xg.next;
prng.int32 = function() {
return xg.next() * 4294967296 | 0;
};
prng.double = function() {
return prng() + (prng() * 2097152 | 0) * 11102230246251565e-32;
};
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
function Mash() {
var n = 4022871197;
var mash = function(data) {
data = data.toString();
for (var i = 0; i < data.length; i++) {
n += data.charCodeAt(i);
var h = 0.02519603282416938 * n;
n = h >>> 0;
h -= n;
h *= n;
n = h >>> 0;
h -= n;
n += h * 4294967296;
}
return (n >>> 0) * 23283064365386963e-26;
};
return mash;
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.alea = impl;
}
})(exports2, typeof module2 == "object" && module2, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js
var require_xor128 = __commonJS((exports2, module2) => {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.x = 0;
me.y = 0;
me.z = 0;
me.w = 0;
me.next = function() {
var t = me.x ^ me.x << 11;
me.x = me.y;
me.y = me.z;
me.z = me.w;
return me.w ^= me.w >>> 19 ^ t ^ t >>> 8;
};
if (seed === (seed | 0)) {
me.x = seed;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 64; k++) {
me.x ^= strseed.charCodeAt(k) | 0;
me.next();
}
}
function copy(f, t) {
t.x = f.x;
t.y = f.y;
t.z = f.z;
t.w = f.w;
return t;
}
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xor128 = impl;
}
})(exports2, typeof module2 == "object" && module2, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js
var require_xorwow = __commonJS((exports2, module2) => {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
var t = me.x ^ me.x >>> 2;
me.x = me.y;
me.y = me.z;
me.z = me.w;
me.w = me.v;
return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t ^ t << 1)) | 0;
};
me.x = 0;
me.y = 0;
me.z = 0;
me.w = 0;
me.v = 0;
if (seed === (seed | 0)) {
me.x = seed;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 64; k++) {
me.x ^= strseed.charCodeAt(k) | 0;
if (k == strseed.length) {
me.d = me.x << 10 ^ me.x >>> 4;
}
me.next();
}
}
function copy(f, t) {
t.x = f.x;
t.y = f.y;
t.z = f.z;
t.w = f.w;
t.v = f.v;
t.d = f.d;
return t;
}
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xorwow = impl;
}
})(exports2, typeof module2 == "object" && module2, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js
var require_xorshift7 = __commonJS((exports2, module2) => {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
var X = me.x, i = me.i, t, v, w;
t = X[i];
t ^= t >>> 7;
v = t ^ t << 24;
t = X[i + 1 & 7];
v ^= t ^ t >>> 10;
t = X[i + 3 & 7];
v ^= t ^ t >>> 3;
t = X[i + 4 & 7];
v ^= t ^ t << 7;
t = X[i + 7 & 7];
t = t ^ t << 13;
v ^= t ^ t << 9;
X[i] = v;
me.i = i + 1 & 7;
return v;
};
function init(me2, seed2) {
var j, w, X = [];
if (seed2 === (seed2 | 0)) {
w = X[0] = seed2;
} else {
seed2 = "" + seed2;
for (j = 0; j < seed2.length; ++j) {
X[j & 7] = X[j & 7] << 15 ^ seed2.charCodeAt(j) + X[j + 1 & 7] << 13;
}
}
while (X.length < 8)
X.push(0);
for (j = 0; j < 8 && X[j] === 0; ++j)
;
if (j == 8)
w = X[7] = -1;
else
w = X[j];
me2.x = X;
me2.i = 0;
for (j = 256; j > 0; --j) {
me2.next();
}
}
init(me, seed);
}
function copy(f, t) {
t.x = f.x.slice();
t.i = f.i;
return t;
}
function impl(seed, opts) {
if (seed == null)
seed = +new Date();
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (state.x)
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xorshift7 = impl;
}
})(exports2, typeof module2 == "object" && module2, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js
var require_xor4096 = __commonJS((exports2, module2) => {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this;
me.next = function() {
var w = me.w, X = me.X, i = me.i, t, v;
me.w = w = w + 1640531527 | 0;
v = X[i + 34 & 127];
t = X[i = i + 1 & 127];
v ^= v << 13;
t ^= t << 17;
v ^= v >>> 15;
t ^= t >>> 12;
v = X[i] = v ^ t;
me.i = i;
return v + (w ^ w >>> 16) | 0;
};
function init(me2, seed2) {
var t, v, i, j, w, X = [], limit = 128;
if (seed2 === (seed2 | 0)) {
v = seed2;
seed2 = null;
} else {
seed2 = seed2 + "\0";
v = 0;
limit = Math.max(limit, seed2.length);
}
for (i = 0, j = -32; j < limit; ++j) {
if (seed2)
v ^= seed2.charCodeAt((j + 32) % seed2.length);
if (j === 0)
w = v;
v ^= v << 10;
v ^= v >>> 15;
v ^= v << 4;
v ^= v >>> 13;
if (j >= 0) {
w = w + 1640531527 | 0;
t = X[j & 127] ^= v + w;
i = t == 0 ? i + 1 : 0;
}
}
if (i >= 128) {
X[(seed2 && seed2.length || 0) & 127] = -1;
}
i = 127;
for (j = 4 * 128; j > 0; --j) {
v = X[i + 34 & 127];
t = X[i = i + 1 & 127];
v ^= v << 13;
t ^= t << 17;
v ^= v >>> 15;
t ^= t >>> 12;
X[i] = v ^ t;
}
me2.w = w;
me2.X = X;
me2.i = i;
}
init(me, seed);
}
function copy(f, t) {
t.i = f.i;
t.w = f.w;
t.X = f.X.slice();
return t;
}
;
function impl(seed, opts) {
if (seed == null)
seed = +new Date();
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (state.X)
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.xor4096 = impl;
}
})(exports2, typeof module2 == "object" && module2, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js
var require_tychei = __commonJS((exports2, module2) => {
(function(global2, module3, define2) {
function XorGen(seed) {
var me = this, strseed = "";
me.next = function() {
var b = me.b, c = me.c, d = me.d, a = me.a;
b = b << 25 ^ b >>> 7 ^ c;
c = c - d | 0;
d = d << 24 ^ d >>> 8 ^ a;
a = a - b | 0;
me.b = b = b << 20 ^ b >>> 12 ^ c;
me.c = c = c - d | 0;
me.d = d << 16 ^ c >>> 16 ^ a;
return me.a = a - b | 0;
};
me.a = 0;
me.b = 0;
me.c = 2654435769 | 0;
me.d = 1367130551;
if (seed === Math.floor(seed)) {
me.a = seed / 4294967296 | 0;
me.b = seed | 0;
} else {
strseed += seed;
}
for (var k = 0; k < strseed.length + 20; k++) {
me.b ^= strseed.charCodeAt(k) | 0;
me.next();
}
}
function copy(f, t) {
t.a = f.a;
t.b = f.b;
t.c = f.c;
t.d = f.d;
return t;
}
;
function impl(seed, opts) {
var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
return (xg.next() >>> 0) / 4294967296;
};
prng.double = function() {
do {
var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);
} while (result === 0);
return result;
};
prng.int32 = xg.next;
prng.quick = prng;
if (state) {
if (typeof state == "object")
copy(state, xg);
prng.state = function() {
return copy(xg, {});
};
}
return prng;
}
if (module3 && module3.exports) {
module3.exports = impl;
} else if (define2 && define2.amd) {
define2(function() {
return impl;
});
} else {
this.tychei = impl;
}
})(exports2, typeof module2 == "object" && module2, typeof define == "function" && define);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js
var require_seedrandom = __commonJS((exports2, module2) => {
(function(pool, math) {
var global2 = this, width = 256, chunks = 6, digits = 52, rngname = "random", startdenom = math.pow(width, chunks), significance = math.pow(2, digits), overflow = significance * 2, mask = width - 1, nodecrypto;
function seedrandom(seed, options, callback) {
var key = [];
options = options == true ? {entropy: true} : options || {};
var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed == null ? autoseed() : seed, 3), key);
var arc4 = new ARC4(key);
var prng = function() {
var n = arc4.g(chunks), d = startdenom, x = 0;
while (n < significance) {
n = (n + x) * width;
d *= width;
x = arc4.g(1);
}
while (n >= overflow) {
n /= 2;
d /= 2;
x >>>= 1;
}
return (n + x) / d;
};
prng.int32 = function() {
return arc4.g(4) | 0;
};
prng.quick = function() {
return arc4.g(4) / 4294967296;
};
prng.double = prng;
mixkey(tostring(arc4.S), pool);
return (options.pass || callback || function(prng2, seed2, is_math_call, state) {
if (state) {
if (state.S) {
copy(state, arc4);
}
prng2.state = function() {
return copy(arc4, {});
};
}
if (is_math_call) {
math[rngname] = prng2;
return seed2;
} else
return prng2;
})(prng, shortseed, "global" in options ? options.global : this == math, options.state);
}
math["seed" + rngname] = seedrandom;
function ARC4(key) {
var t, keylen = key.length, me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
if (!keylen) {
key = [keylen++];
}
while (i < width) {
s[i] = i++;
}
for (i = 0; i < width; i++) {
s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
s[j] = t;
}
(me.g = function(count) {
var t2, r = 0, i2 = me.i, j2 = me.j, s2 = me.S;
while (count--) {
t2 = s2[i2 = mask & i2 + 1];
r = r * width + s2[mask & (s2[i2] = s2[j2 = mask & j2 + t2]) + (s2[j2] = t2)];
}
me.i = i2;
me.j = j2;
return r;
})(width);
}
function copy(f, t) {
t.i = f.i;
t.j = f.j;
t.S = f.S.slice();
return t;
}
;
function flatten(obj, depth) {
var result = [], typ = typeof obj, prop;
if (depth && typ == "object") {
for (prop in obj) {
try {
result.push(flatten(obj[prop], depth - 1));
} catch (e) {
}
}
}
return result.length ? result : typ == "string" ? obj : obj + "\0";
}
function mixkey(seed, key) {
var stringseed = seed + "", smear, j = 0;
while (j < stringseed.length) {
key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
}
return tostring(key);
}
function autoseed() {
try {
var out;
if (nodecrypto && (out = nodecrypto.randomBytes)) {
out = out(width);
} else {
out = new Uint8Array(width);
(global2.crypto || global2.msCrypto).getRandomValues(out);
}
return tostring(out);
} catch (e) {
var browser = global2.navigator, plugins = browser && browser.plugins;
return [+new Date(), global2, plugins, global2.screen, tostring(pool)];
}
}
function tostring(a) {
return String.fromCharCode.apply(0, a);
}
mixkey(math.random(), pool);
if (typeof module2 == "object" && module2.exports) {
module2.exports = seedrandom;
try {
nodecrypto = require("crypto");
} catch (ex) {
}
} else if (typeof define == "function" && define.amd) {
define(function() {
return seedrandom;
});
}
})([], Math);
});
// node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js
var require_seedrandom2 = __commonJS((exports2, module2) => {
var alea = require_alea();
var xor128 = require_xor128();
var xorwow = require_xorwow();
var xorshift7 = require_xorshift7();
var xor4096 = require_xor4096();
var tychei = require_tychei();
var sr = require_seedrandom();
sr.alea = alea;
sr.xor128 = xor128;
sr.xorwow = xorwow;
sr.xorshift7 = xorshift7;
sr.xor4096 = xor4096;
sr.tychei = tychei;
module2.exports = sr;
});
// node_modules/@tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js
var require_tf_backend_cpu_node = __commonJS((exports2) => {
/**
@ -50929,7 +51565,7 @@ var require_tf_backend_cpu_node = __commonJS((exports2) => {
"use strict";
Object.defineProperty(exports2, "__esModule", {value: true});
var tf2 = require_tf_core_node();
var seedrandom = require("seedrandom");
var seedrandom = require_seedrandom2();
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@ -73232,7 +73868,7 @@ var require_config = __commonJS((exports2) => {
var require_package = __commonJS((exports2, module2) => {
module2.exports = {
name: "@vladmandic/human",
version: "0.4.8",
version: "0.4.9",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.node.js",
@ -73254,6 +73890,7 @@ var require_package = __commonJS((exports2, module2) => {
dependencies: {},
peerDependencies: {},
devDependencies: {
seedrandom: "^3.0.5",
"@tensorflow/tfjs": "^2.7.0",
"@tensorflow/tfjs-node": "^2.7.0",
"@vladmandic/pilogger": "^0.2.6",
@ -73271,11 +73908,11 @@ var require_package = __commonJS((exports2, module2) => {
scripts: {
start: "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
lint: "eslint src/*.js demo/*.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --external:seedrandom --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --external:seedrandom --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --external:seedrandom --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --external:seedrandom --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --external:seedrandom --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
build: "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && ls -l dist/",
update: "npm update --depth 20 --force && npm dedupe && npm prune && npm audit",
changelog: "node changelog.js"

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
"imports": []
},
"package.json": {
"bytes": 2952,
"bytes": 2870,
"imports": []
},
"src/emotion/emotion.js": {
@ -260,7 +260,7 @@
"dist/human.node-nobundle.js.map": {
"imports": [],
"inputs": {},
"bytes": 260881
"bytes": 260882
},
"dist/human.node-nobundle.js": {
"imports": [],
@ -353,7 +353,7 @@
"bytesInOutput": 2232
},
"package.json": {
"bytesInOutput": 3097
"bytesInOutput": 3015
},
"src/human.js": {
"bytesInOutput": 47
@ -362,7 +362,7 @@
"bytesInOutput": 10775
}
},
"bytes": 155474
"bytes": 155392
}
}
}

31
package-lock.json generated
View File

@ -170,6 +170,14 @@
"requires": {
"@types/seedrandom": "2.4.27",
"seedrandom": "2.4.3"
},
"dependencies": {
"seedrandom": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz",
"integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=",
"dev": true
}
}
},
"@tensorflow/tfjs-backend-webgl": {
@ -184,6 +192,14 @@
"@types/webgl-ext": "0.0.30",
"@types/webgl2": "0.0.5",
"seedrandom": "2.4.3"
},
"dependencies": {
"seedrandom": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz",
"integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=",
"dev": true
}
}
},
"@tensorflow/tfjs-converter": {
@ -203,6 +219,14 @@
"@types/webgl-ext": "0.0.30",
"node-fetch": "~2.6.1",
"seedrandom": "2.4.3"
},
"dependencies": {
"seedrandom": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz",
"integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=",
"dev": true
}
}
},
"@tensorflow/tfjs-data": {
@ -2114,10 +2138,9 @@
"dev": true
},
"seedrandom": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz",
"integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=",
"dev": true
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
"integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
},
"semver": {
"version": "5.7.1",

View File

@ -22,6 +22,7 @@
"dependencies": {},
"peerDependencies": {},
"devDependencies": {
"seedrandom": "^3.0.5",
"@tensorflow/tfjs": "^2.7.0",
"@tensorflow/tfjs-node": "^2.7.0",
"@vladmandic/pilogger": "^0.2.6",
@ -39,11 +40,11 @@
"scripts": {
"start": "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
"lint": "eslint src/*.js demo/*.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --external:seedrandom --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --external:seedrandom --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --external:seedrandom --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --external:seedrandom --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --external:seedrandom --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
"build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js",
"build-esm-bundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js",
"build-esm-nobundle": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js",
"build-node": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js",
"build-node-nobundle": "esbuild --bundle --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js",
"build": "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && ls -l dist/",
"update": "npm update --depth 20 --force && npm dedupe && npm prune && npm audit",
"changelog": "node changelog.js"