@monogrid/gainmap-js 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +103 -19
  3. package/dist/LoaderBase-aa4842c4.js +373 -0
  4. package/dist/_commonjsHelpers-1789f0cf.js +1 -1
  5. package/dist/compress-a4b59cab.js +1 -1
  6. package/dist/decode.d.ts +25 -6
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.js +173 -246
  9. package/dist/index.umd.js +305 -14
  10. package/dist/libultrahdr-esm.wasm +0 -0
  11. package/dist/libultrahdr.d.ts +14 -19
  12. package/dist/libultrahdr.js +245 -203
  13. package/dist/libultrahdr.umd.js +611 -206
  14. package/dist/loaders/GainMapLoader.d.ts +68 -0
  15. package/dist/loaders/JPEGRLoader.d.ts +60 -0
  16. package/dist/loaders/LoaderBase.d.ts +27 -0
  17. package/dist/materials/GainMapDecoderMaterial.d.ts +44 -1
  18. package/dist/materials/GainMapEncoderMaterial.d.ts +29 -2
  19. package/dist/types.d.ts +10 -0
  20. package/dist/utils/QuadRenderer.d.ts +2 -1
  21. package/dist/worker-interface.js +1 -1
  22. package/dist/worker-interface.umd.js +1 -1
  23. package/dist/worker.js +1 -1
  24. package/dist/worker.umd.js +1 -1
  25. package/libultrahdr-wasm/build/libultrahdr-debug.js +156 -182
  26. package/libultrahdr-wasm/build/libultrahdr-debug.wasm +0 -0
  27. package/libultrahdr-wasm/build/libultrahdr-esm.js +153 -182
  28. package/libultrahdr-wasm/build/libultrahdr-esm.wasm +0 -0
  29. package/libultrahdr-wasm/build/libultrahdr.js +151 -180
  30. package/libultrahdr-wasm/build/libultrahdr.wasm +0 -0
  31. package/package.json +1 -1
  32. package/examples/README.md +0 -3
  33. package/examples/compress.ts +0 -43
  34. package/examples/decode-from-jpeg.ts +0 -40
  35. package/examples/decode-from-separate-data.ts +0 -41
  36. package/examples/decode-to-datatexture.ts +0 -65
  37. package/examples/encode-and-compress.ts +0 -29
  38. package/examples/encode-jpeg-metadata.ts +0 -57
  39. package/examples/encode.ts +0 -28
  40. package/examples/globals.d.ts +0 -6
  41. package/examples/worker.ts +0 -41
  42. package/reports/eslint-examples.json +0 -1
  43. package/reports/eslint-src.json +0 -1
  44. package/reports/eslint-tests.json +0 -1
  45. package/reports/junit.xml +0 -35
  46. package/reports/typecheck-examples.log +0 -0
  47. package/reports/typecheck-tests.log +0 -0
  48. package/reports/typecheck.log +0 -0
@@ -27,7 +27,7 @@ Module['ready'] = new Promise((resolve, reject) => {
27
27
  readyPromiseResolve = resolve;
28
28
  readyPromiseReject = reject;
29
29
  });
30
- ["_main","_memory","___indirect_function_table","__embind_initialize_bindings","_fflush","onRuntimeInitialized"].forEach((prop) => {
30
+ ["_main","_memory","___indirect_function_table","_fflush","onRuntimeInitialized"].forEach((prop) => {
31
31
  if (!Object.getOwnPropertyDescriptor(Module['ready'], prop)) {
32
32
  Object.defineProperty(Module['ready'], prop, {
33
33
  get: () => abort('You are getting ' + prop + ' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'),
@@ -359,7 +359,7 @@ assert(!ENVIRONMENT_IS_SHELL, "shell environment detected but not enabled at bui
359
359
  // An online HTML version (which may be of a different version of Emscripten)
360
360
  // is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
361
361
 
362
- var wasmBinary;
362
+ var wasmBinary;
363
363
  if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary');
364
364
 
365
365
  if (typeof WebAssembly != 'object') {
@@ -383,6 +383,10 @@ var ABORT = false;
383
383
  // but only when noExitRuntime is false.
384
384
  var EXITSTATUS;
385
385
 
386
+ // In STRICT mode, we only define assert() when ASSERTIONS is set. i.e. we
387
+ // don't define it at all in release modes. This matches the behaviour of
388
+ // MINIMAL_RUNTIME.
389
+ // TODO(sbc): Make this the default even without STRICT enabled.
386
390
  /** @type {function(*, string=)} */
387
391
  function assert(condition, text) {
388
392
  if (!condition) {
@@ -1242,10 +1246,7 @@ function dbg(text) {
1242
1246
  var setter = field.setter;
1243
1247
  var setterContext = field.setterContext;
1244
1248
  fields[fieldName] = {
1245
- read: (ptr) => {
1246
- return getterReturnType['fromWireType'](
1247
- getter(getterContext, ptr));
1248
- },
1249
+ read: (ptr) => getterReturnType['fromWireType'](getter(getterContext, ptr)),
1249
1250
  write: (ptr, o) => {
1250
1251
  var destructors = [];
1251
1252
  setter(setterContext, ptr, setterArgumentType['toWireType'](destructors, o));
@@ -1512,33 +1513,12 @@ function dbg(text) {
1512
1513
  });
1513
1514
  };
1514
1515
 
1515
- var char_0 = 48;
1516
-
1517
- var char_9 = 57;
1518
- var makeLegalFunctionName = (name) => {
1519
- if (undefined === name) {
1520
- return '_unknown';
1521
- }
1522
- name = name.replace(/[^a-zA-Z0-9_]/g, '$');
1523
- var f = name.charCodeAt(0);
1524
- if (f >= char_0 && f <= char_9) {
1525
- return `_${name}`;
1526
- }
1527
- return name;
1528
- };
1516
+ var createNamedFunction = (name, body) => Object.defineProperty(body, 'name', {
1517
+ value: name
1518
+ });
1529
1519
 
1530
1520
 
1531
1521
 
1532
- function createNamedFunction(name, body) {
1533
- name = makeLegalFunctionName(name);
1534
- // Use an abject with a computed property name to create a new function with
1535
- // a name specified at runtime, but without using `new Function` or `eval`.
1536
- return {
1537
- [name]: function() {
1538
- return body.apply(this, arguments);
1539
- }
1540
- }[name];
1541
- }
1542
1522
  function newFunc(constructor, argumentList) {
1543
1523
  if (!(constructor instanceof Function)) {
1544
1524
  throw new TypeError(`new_ called with constructor type ${typeof(constructor)} which is not a function`);
@@ -1607,7 +1587,7 @@ function dbg(text) {
1607
1587
  }
1608
1588
 
1609
1589
  var invokerFnBody = `
1610
- return function ${makeLegalFunctionName(humanName)}(${argsList}) {
1590
+ return function (${argsList}) {
1611
1591
  if (arguments.length !== ${argCount - 2}) {
1612
1592
  throwBindingError('function ${humanName} called with ' + arguments.length + ' arguments, expected ${argCount - 2}');
1613
1593
  }`;
@@ -1660,7 +1640,8 @@ function dbg(text) {
1660
1640
 
1661
1641
  args1.push(invokerFnBody);
1662
1642
 
1663
- return newFunc(Function, args1).apply(null, args2);
1643
+ var invokerFn = newFunc(Function, args1).apply(null, args2);
1644
+ return createNamedFunction(humanName, invokerFn);
1664
1645
  }
1665
1646
 
1666
1647
  var ensureOverloadTable = (proto, methodName, humanName) => {
@@ -1992,7 +1973,7 @@ function dbg(text) {
1992
1973
 
1993
1974
 
1994
1975
  var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
1995
- assert(typeof str === 'string');
1976
+ assert(typeof str === 'string', `stringToUTF8Array expects a string (got ${typeof str})`);
1996
1977
  // Parameter maxBytesToWrite is not optional. Negative values, 0, null,
1997
1978
  // undefined and false each don't write out any bytes.
1998
1979
  if (!(maxBytesToWrite > 0))
@@ -2136,7 +2117,7 @@ function dbg(text) {
2136
2117
  * @return {string}
2137
2118
  */
2138
2119
  var UTF8ToString = (ptr, maxBytesToRead) => {
2139
- assert(typeof ptr == 'number');
2120
+ assert(typeof ptr == 'number', `UTF8ToString expects a number (got ${typeof ptr})`);
2140
2121
  return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
2141
2122
  };
2142
2123
  var __embind_register_std_string = (rawType, name) => {
@@ -2510,9 +2491,7 @@ function dbg(text) {
2510
2491
  return symbol;
2511
2492
  };
2512
2493
 
2513
- var __emval_new_cstring = (v) => {
2514
- return Emval.toHandle(getStringOrSymbol(v));
2515
- };
2494
+ var __emval_new_cstring = (v) => Emval.toHandle(getStringOrSymbol(v));
2516
2495
 
2517
2496
 
2518
2497
 
@@ -2727,9 +2706,7 @@ function dbg(text) {
2727
2706
  var paths = Array.prototype.slice.call(arguments);
2728
2707
  return PATH.normalize(paths.join('/'));
2729
2708
  },
2730
- join2:(l, r) => {
2731
- return PATH.normalize(l + '/' + r);
2732
- },
2709
+ join2:(l, r) => PATH.normalize(l + '/' + r),
2733
2710
  };
2734
2711
 
2735
2712
  var initRandomFill = () => {
@@ -3397,7 +3374,7 @@ function dbg(text) {
3397
3374
 
3398
3375
 
3399
3376
  var FS_createDataFile = (parent, name, fileData, canRead, canWrite, canOwn) => {
3400
- return FS.createDataFile(parent, name, fileData, canRead, canWrite, canOwn);
3377
+ FS.createDataFile(parent, name, fileData, canRead, canWrite, canOwn);
3401
3378
  };
3402
3379
 
3403
3380
  var preloadPlugins = Module['preloadPlugins'] || [];
@@ -3594,7 +3571,128 @@ function dbg(text) {
3594
3571
  };
3595
3572
 
3596
3573
  var ERRNO_CODES = {
3597
- };
3574
+ 'EPERM': 63,
3575
+ 'ENOENT': 44,
3576
+ 'ESRCH': 71,
3577
+ 'EINTR': 27,
3578
+ 'EIO': 29,
3579
+ 'ENXIO': 60,
3580
+ 'E2BIG': 1,
3581
+ 'ENOEXEC': 45,
3582
+ 'EBADF': 8,
3583
+ 'ECHILD': 12,
3584
+ 'EAGAIN': 6,
3585
+ 'EWOULDBLOCK': 6,
3586
+ 'ENOMEM': 48,
3587
+ 'EACCES': 2,
3588
+ 'EFAULT': 21,
3589
+ 'ENOTBLK': 105,
3590
+ 'EBUSY': 10,
3591
+ 'EEXIST': 20,
3592
+ 'EXDEV': 75,
3593
+ 'ENODEV': 43,
3594
+ 'ENOTDIR': 54,
3595
+ 'EISDIR': 31,
3596
+ 'EINVAL': 28,
3597
+ 'ENFILE': 41,
3598
+ 'EMFILE': 33,
3599
+ 'ENOTTY': 59,
3600
+ 'ETXTBSY': 74,
3601
+ 'EFBIG': 22,
3602
+ 'ENOSPC': 51,
3603
+ 'ESPIPE': 70,
3604
+ 'EROFS': 69,
3605
+ 'EMLINK': 34,
3606
+ 'EPIPE': 64,
3607
+ 'EDOM': 18,
3608
+ 'ERANGE': 68,
3609
+ 'ENOMSG': 49,
3610
+ 'EIDRM': 24,
3611
+ 'ECHRNG': 106,
3612
+ 'EL2NSYNC': 156,
3613
+ 'EL3HLT': 107,
3614
+ 'EL3RST': 108,
3615
+ 'ELNRNG': 109,
3616
+ 'EUNATCH': 110,
3617
+ 'ENOCSI': 111,
3618
+ 'EL2HLT': 112,
3619
+ 'EDEADLK': 16,
3620
+ 'ENOLCK': 46,
3621
+ 'EBADE': 113,
3622
+ 'EBADR': 114,
3623
+ 'EXFULL': 115,
3624
+ 'ENOANO': 104,
3625
+ 'EBADRQC': 103,
3626
+ 'EBADSLT': 102,
3627
+ 'EDEADLOCK': 16,
3628
+ 'EBFONT': 101,
3629
+ 'ENOSTR': 100,
3630
+ 'ENODATA': 116,
3631
+ 'ETIME': 117,
3632
+ 'ENOSR': 118,
3633
+ 'ENONET': 119,
3634
+ 'ENOPKG': 120,
3635
+ 'EREMOTE': 121,
3636
+ 'ENOLINK': 47,
3637
+ 'EADV': 122,
3638
+ 'ESRMNT': 123,
3639
+ 'ECOMM': 124,
3640
+ 'EPROTO': 65,
3641
+ 'EMULTIHOP': 36,
3642
+ 'EDOTDOT': 125,
3643
+ 'EBADMSG': 9,
3644
+ 'ENOTUNIQ': 126,
3645
+ 'EBADFD': 127,
3646
+ 'EREMCHG': 128,
3647
+ 'ELIBACC': 129,
3648
+ 'ELIBBAD': 130,
3649
+ 'ELIBSCN': 131,
3650
+ 'ELIBMAX': 132,
3651
+ 'ELIBEXEC': 133,
3652
+ 'ENOSYS': 52,
3653
+ 'ENOTEMPTY': 55,
3654
+ 'ENAMETOOLONG': 37,
3655
+ 'ELOOP': 32,
3656
+ 'EOPNOTSUPP': 138,
3657
+ 'EPFNOSUPPORT': 139,
3658
+ 'ECONNRESET': 15,
3659
+ 'ENOBUFS': 42,
3660
+ 'EAFNOSUPPORT': 5,
3661
+ 'EPROTOTYPE': 67,
3662
+ 'ENOTSOCK': 57,
3663
+ 'ENOPROTOOPT': 50,
3664
+ 'ESHUTDOWN': 140,
3665
+ 'ECONNREFUSED': 14,
3666
+ 'EADDRINUSE': 3,
3667
+ 'ECONNABORTED': 13,
3668
+ 'ENETUNREACH': 40,
3669
+ 'ENETDOWN': 38,
3670
+ 'ETIMEDOUT': 73,
3671
+ 'EHOSTDOWN': 142,
3672
+ 'EHOSTUNREACH': 23,
3673
+ 'EINPROGRESS': 26,
3674
+ 'EALREADY': 7,
3675
+ 'EDESTADDRREQ': 17,
3676
+ 'EMSGSIZE': 35,
3677
+ 'EPROTONOSUPPORT': 66,
3678
+ 'ESOCKTNOSUPPORT': 137,
3679
+ 'EADDRNOTAVAIL': 4,
3680
+ 'ENETRESET': 39,
3681
+ 'EISCONN': 30,
3682
+ 'ENOTCONN': 53,
3683
+ 'ETOOMANYREFS': 141,
3684
+ 'EUSERS': 136,
3685
+ 'EDQUOT': 19,
3686
+ 'ESTALE': 72,
3687
+ 'ENOTSUP': 138,
3688
+ 'ENOMEDIUM': 148,
3689
+ 'EILSEQ': 25,
3690
+ 'EOVERFLOW': 61,
3691
+ 'ECANCELED': 11,
3692
+ 'ENOTRECOVERABLE': 56,
3693
+ 'EOWNERDEAD': 62,
3694
+ 'ESTRPIPE': 135,
3695
+ };
3598
3696
 
3599
3697
  var demangle = (func) => {
3600
3698
  warnOnce('warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling');
@@ -4935,7 +5033,6 @@ function dbg(text) {
4935
5033
  FS.close(stream);
4936
5034
  FS.chmod(node, mode);
4937
5035
  }
4938
- return node;
4939
5036
  },
4940
5037
  createDevice(parent, name, input, output) {
4941
5038
  var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name);
@@ -5235,19 +5332,19 @@ function dbg(text) {
5235
5332
  HEAP32[(((buf)+(12))>>2)] = stat.uid;
5236
5333
  HEAP32[(((buf)+(16))>>2)] = stat.gid;
5237
5334
  HEAP32[(((buf)+(20))>>2)] = stat.rdev;
5238
- (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(24))>>2)] = tempI64[0],HEAP32[(((buf)+(28))>>2)] = tempI64[1]);
5335
+ (tempI64 = [stat.size>>>0,(tempDouble = stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(24))>>2)] = tempI64[0],HEAP32[(((buf)+(28))>>2)] = tempI64[1]);
5239
5336
  HEAP32[(((buf)+(32))>>2)] = 4096;
5240
5337
  HEAP32[(((buf)+(36))>>2)] = stat.blocks;
5241
5338
  var atime = stat.atime.getTime();
5242
5339
  var mtime = stat.mtime.getTime();
5243
5340
  var ctime = stat.ctime.getTime();
5244
- (tempI64 = [Math.floor(atime / 1000)>>>0,(tempDouble=Math.floor(atime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(40))>>2)] = tempI64[0],HEAP32[(((buf)+(44))>>2)] = tempI64[1]);
5341
+ (tempI64 = [Math.floor(atime / 1000)>>>0,(tempDouble = Math.floor(atime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(40))>>2)] = tempI64[0],HEAP32[(((buf)+(44))>>2)] = tempI64[1]);
5245
5342
  HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000;
5246
- (tempI64 = [Math.floor(mtime / 1000)>>>0,(tempDouble=Math.floor(mtime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(56))>>2)] = tempI64[0],HEAP32[(((buf)+(60))>>2)] = tempI64[1]);
5343
+ (tempI64 = [Math.floor(mtime / 1000)>>>0,(tempDouble = Math.floor(mtime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(56))>>2)] = tempI64[0],HEAP32[(((buf)+(60))>>2)] = tempI64[1]);
5247
5344
  HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000;
5248
- (tempI64 = [Math.floor(ctime / 1000)>>>0,(tempDouble=Math.floor(ctime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(72))>>2)] = tempI64[0],HEAP32[(((buf)+(76))>>2)] = tempI64[1]);
5345
+ (tempI64 = [Math.floor(ctime / 1000)>>>0,(tempDouble = Math.floor(ctime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(72))>>2)] = tempI64[0],HEAP32[(((buf)+(76))>>2)] = tempI64[1]);
5249
5346
  HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000;
5250
- (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(88))>>2)] = tempI64[0],HEAP32[(((buf)+(92))>>2)] = tempI64[1]);
5347
+ (tempI64 = [stat.ino>>>0,(tempDouble = stat.ino,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(88))>>2)] = tempI64[0],HEAP32[(((buf)+(92))>>2)] = tempI64[1]);
5251
5348
  return 0;
5252
5349
  },
5253
5350
  doMsync(addr, stream, len, flags, offset) {
@@ -5389,7 +5486,7 @@ function dbg(text) {
5389
5486
  if (isNaN(offset)) return 61;
5390
5487
  var stream = SYSCALLS.getStreamFromFD(fd);
5391
5488
  FS.llseek(stream, offset, whence);
5392
- (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[((newOffset)>>2)] = tempI64[0],HEAP32[(((newOffset)+(4))>>2)] = tempI64[1]);
5489
+ (tempI64 = [stream.position>>>0,(tempDouble = stream.position,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[((newOffset)>>2)] = tempI64[0],HEAP32[(((newOffset)+(4))>>2)] = tempI64[1]);
5393
5490
  if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
5394
5491
  return 0;
5395
5492
  } catch (e) {
@@ -5429,9 +5526,7 @@ function dbg(text) {
5429
5526
  }
5430
5527
  }
5431
5528
 
5432
- var isLeapYear = (year) => {
5433
- return year%4 === 0 && (year%100 !== 0 || year%400 === 0);
5434
- };
5529
+ var isLeapYear = (year) => year%4 === 0 && (year%100 !== 0 || year%400 === 0);
5435
5530
 
5436
5531
  var arraySum = (array, index) => {
5437
5532
  var sum = 0;
@@ -5806,129 +5901,6 @@ UnboundTypeError = Module['UnboundTypeError'] = extendError(Error, 'UnboundTypeE
5806
5901
  FS.FSNode = FSNode;
5807
5902
  FS.createPreloadedFile = FS_createPreloadedFile;
5808
5903
  FS.staticInit();;
5809
- ERRNO_CODES = {
5810
- 'EPERM': 63,
5811
- 'ENOENT': 44,
5812
- 'ESRCH': 71,
5813
- 'EINTR': 27,
5814
- 'EIO': 29,
5815
- 'ENXIO': 60,
5816
- 'E2BIG': 1,
5817
- 'ENOEXEC': 45,
5818
- 'EBADF': 8,
5819
- 'ECHILD': 12,
5820
- 'EAGAIN': 6,
5821
- 'EWOULDBLOCK': 6,
5822
- 'ENOMEM': 48,
5823
- 'EACCES': 2,
5824
- 'EFAULT': 21,
5825
- 'ENOTBLK': 105,
5826
- 'EBUSY': 10,
5827
- 'EEXIST': 20,
5828
- 'EXDEV': 75,
5829
- 'ENODEV': 43,
5830
- 'ENOTDIR': 54,
5831
- 'EISDIR': 31,
5832
- 'EINVAL': 28,
5833
- 'ENFILE': 41,
5834
- 'EMFILE': 33,
5835
- 'ENOTTY': 59,
5836
- 'ETXTBSY': 74,
5837
- 'EFBIG': 22,
5838
- 'ENOSPC': 51,
5839
- 'ESPIPE': 70,
5840
- 'EROFS': 69,
5841
- 'EMLINK': 34,
5842
- 'EPIPE': 64,
5843
- 'EDOM': 18,
5844
- 'ERANGE': 68,
5845
- 'ENOMSG': 49,
5846
- 'EIDRM': 24,
5847
- 'ECHRNG': 106,
5848
- 'EL2NSYNC': 156,
5849
- 'EL3HLT': 107,
5850
- 'EL3RST': 108,
5851
- 'ELNRNG': 109,
5852
- 'EUNATCH': 110,
5853
- 'ENOCSI': 111,
5854
- 'EL2HLT': 112,
5855
- 'EDEADLK': 16,
5856
- 'ENOLCK': 46,
5857
- 'EBADE': 113,
5858
- 'EBADR': 114,
5859
- 'EXFULL': 115,
5860
- 'ENOANO': 104,
5861
- 'EBADRQC': 103,
5862
- 'EBADSLT': 102,
5863
- 'EDEADLOCK': 16,
5864
- 'EBFONT': 101,
5865
- 'ENOSTR': 100,
5866
- 'ENODATA': 116,
5867
- 'ETIME': 117,
5868
- 'ENOSR': 118,
5869
- 'ENONET': 119,
5870
- 'ENOPKG': 120,
5871
- 'EREMOTE': 121,
5872
- 'ENOLINK': 47,
5873
- 'EADV': 122,
5874
- 'ESRMNT': 123,
5875
- 'ECOMM': 124,
5876
- 'EPROTO': 65,
5877
- 'EMULTIHOP': 36,
5878
- 'EDOTDOT': 125,
5879
- 'EBADMSG': 9,
5880
- 'ENOTUNIQ': 126,
5881
- 'EBADFD': 127,
5882
- 'EREMCHG': 128,
5883
- 'ELIBACC': 129,
5884
- 'ELIBBAD': 130,
5885
- 'ELIBSCN': 131,
5886
- 'ELIBMAX': 132,
5887
- 'ELIBEXEC': 133,
5888
- 'ENOSYS': 52,
5889
- 'ENOTEMPTY': 55,
5890
- 'ENAMETOOLONG': 37,
5891
- 'ELOOP': 32,
5892
- 'EOPNOTSUPP': 138,
5893
- 'EPFNOSUPPORT': 139,
5894
- 'ECONNRESET': 15,
5895
- 'ENOBUFS': 42,
5896
- 'EAFNOSUPPORT': 5,
5897
- 'EPROTOTYPE': 67,
5898
- 'ENOTSOCK': 57,
5899
- 'ENOPROTOOPT': 50,
5900
- 'ESHUTDOWN': 140,
5901
- 'ECONNREFUSED': 14,
5902
- 'EADDRINUSE': 3,
5903
- 'ECONNABORTED': 13,
5904
- 'ENETUNREACH': 40,
5905
- 'ENETDOWN': 38,
5906
- 'ETIMEDOUT': 73,
5907
- 'EHOSTDOWN': 142,
5908
- 'EHOSTUNREACH': 23,
5909
- 'EINPROGRESS': 26,
5910
- 'EALREADY': 7,
5911
- 'EDESTADDRREQ': 17,
5912
- 'EMSGSIZE': 35,
5913
- 'EPROTONOSUPPORT': 66,
5914
- 'ESOCKTNOSUPPORT': 137,
5915
- 'EADDRNOTAVAIL': 4,
5916
- 'ENETRESET': 39,
5917
- 'EISCONN': 30,
5918
- 'ENOTCONN': 53,
5919
- 'ETOOMANYREFS': 141,
5920
- 'EUSERS': 136,
5921
- 'EDQUOT': 19,
5922
- 'ESTALE': 72,
5923
- 'ENOTSUP': 138,
5924
- 'ENOMEDIUM': 148,
5925
- 'EILSEQ': 25,
5926
- 'EOVERFLOW': 61,
5927
- 'ECANCELED': 11,
5928
- 'ENOTRECOVERABLE': 56,
5929
- 'EOWNERDEAD': 62,
5930
- 'ESTRPIPE': 135,
5931
- };;
5932
5904
  function checkIncomingModuleAPI() {
5933
5905
  ignoredModuleProp('fetchSettings');
5934
5906
  }
@@ -6013,7 +5985,6 @@ var _main = Module['_main'] = createExportWrapper('main');
6013
5985
  var _free = createExportWrapper('free');
6014
5986
  var ___errno_location = createExportWrapper('__errno_location');
6015
5987
  var ___getTypeName = createExportWrapper('__getTypeName');
6016
- var __embind_initialize_bindings = Module['__embind_initialize_bindings'] = createExportWrapper('_embind_initialize_bindings');
6017
5988
  var _fflush = Module['_fflush'] = createExportWrapper('fflush');
6018
5989
  var _setThrew = createExportWrapper('setThrew');
6019
5990
  var _emscripten_stack_init = () => (_emscripten_stack_init = wasmExports['emscripten_stack_init'])();
@@ -6280,8 +6251,11 @@ var missingLibrarySymbols = [
6280
6251
  'downcastPointer',
6281
6252
  'upcastPointer',
6282
6253
  'validateThis',
6283
- 'craftEmvalAllocator',
6254
+ 'char_0',
6255
+ 'char_9',
6256
+ 'makeLegalFunctionName',
6284
6257
  'emval_get_global',
6258
+ 'emval_returnValue',
6285
6259
  'emval_lookupTypes',
6286
6260
  'emval_addMethodCaller',
6287
6261
  ];
@@ -6462,17 +6436,14 @@ var unexportedSymbols = [
6462
6436
  'detachFinalizer_deps',
6463
6437
  'deletionQueue',
6464
6438
  'delayFunction',
6465
- 'char_0',
6466
- 'char_9',
6467
- 'makeLegalFunctionName',
6468
6439
  'emval_handles',
6469
6440
  'emval_symbols',
6470
6441
  'init_emval',
6471
6442
  'count_emval_handles',
6472
6443
  'getStringOrSymbol',
6473
6444
  'Emval',
6474
- 'emval_newers',
6475
6445
  'emval_methodCallers',
6446
+ 'reflectConstruct',
6476
6447
  ];
6477
6448
  unexportedSymbols.forEach(unexportedRuntimeSymbol);
6478
6449
 
@@ -6627,7 +6598,7 @@ run();
6627
6598
 
6628
6599
  return moduleArg.ready
6629
6600
  }
6630
-
6631
6601
  );
6632
6602
  })();
6603
+ ;
6633
6604
  export default Module;