@mediapipe/tasks-text 0.10.34 → 0.10.36-rc.20260507

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.
@@ -198,14 +198,17 @@ var EXITSTATUS;
198
198
  // include: runtime_stack_check.js
199
199
  // end include: runtime_stack_check.js
200
200
  // include: runtime_exceptions.js
201
+ // Base Emscripten EH error class
202
+ class EmscriptenEH {}
203
+
204
+ class EmscriptenSjLj extends EmscriptenEH {}
205
+
201
206
  // end include: runtime_exceptions.js
202
207
  // include: runtime_debug.js
203
208
  // end include: runtime_debug.js
204
209
  var readyPromiseResolve, readyPromiseReject;
205
210
 
206
211
  // Memory management
207
- var /** @type {!Int8Array} */ HEAP8, /** @type {!Uint8Array} */ HEAPU8, /** @type {!Int16Array} */ HEAP16, /** @type {!Uint16Array} */ HEAPU16, /** @type {!Int32Array} */ HEAP32, /** @type {!Uint32Array} */ HEAPU32, /** @type {!Float32Array} */ HEAPF32, /** @type {!Float64Array} */ HEAPF64;
208
-
209
212
  var runtimeInitialized = false;
210
213
 
211
214
  function updateMemoryViews() {
@@ -257,9 +260,11 @@ function postRun() {
257
260
  callRuntimeCallbacks(onPostRuns);
258
261
  }
259
262
 
260
- /** @param {string|number=} what */ function abort(what) {
263
+ /**
264
+ * @param {string|number=} what
265
+ */ function abort(what) {
261
266
  Module["onAbort"]?.(what);
262
- what = "Aborted(" + what + ")";
267
+ what = `Aborted(${what})`;
263
268
  // TODO(sbc): Should we remove printing and leave it up to whoever
264
269
  // catches the exception?
265
270
  err(what);
@@ -289,10 +294,10 @@ var wasmBinaryFile;
289
294
 
290
295
  function findWasmBinary() {
291
296
  if (Module["locateFile"]) {
292
- return locateFile("text_wasm_module_internal.wasm");
297
+ return locateFile("text_wasm_module_raw_internal.wasm");
293
298
  }
294
299
  // Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.
295
- return new URL("text_wasm_module_internal.wasm", import.meta.url).href;
300
+ return new URL("text_wasm_module_raw_internal.wasm", import.meta.url).href;
296
301
  }
297
302
 
298
303
  function getBinarySync(file) {
@@ -795,13 +800,8 @@ var Browser = {
795
800
  // in the coordinates.
796
801
  var canvas = Browser.getCanvas();
797
802
  var rect = canvas.getBoundingClientRect();
798
- // Neither .scrollX or .pageXOffset are defined in a spec, but
799
- // we prefer .scrollX because it is currently in a spec draft.
800
- // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/)
801
- var scrollX = ((typeof window.scrollX != "undefined") ? window.scrollX : window.pageXOffset);
802
- var scrollY = ((typeof window.scrollY != "undefined") ? window.scrollY : window.pageYOffset);
803
- var adjustedX = pageX - (scrollX + rect.left);
804
- var adjustedY = pageY - (scrollY + rect.top);
803
+ var adjustedX = pageX - (window.scrollX + rect.left);
804
+ var adjustedY = pageY - (window.scrollY + rect.top);
805
805
  // the canvas might be CSS-scaled compared to its backbuffer;
806
806
  // SDL-using content will want mouse coordinates in terms
807
807
  // of backbuffer units.
@@ -934,6 +934,22 @@ var Browser = {
934
934
  }
935
935
  };
936
936
 
937
+ /** @type {!Int16Array} */ var HEAP16;
938
+
939
+ /** @type {!Int32Array} */ var HEAP32;
940
+
941
+ /** @type {!Int8Array} */ var HEAP8;
942
+
943
+ /** @type {!Float32Array} */ var HEAPF32;
944
+
945
+ /** @type {!Float64Array} */ var HEAPF64;
946
+
947
+ /** @type {!Uint16Array} */ var HEAPU16;
948
+
949
+ /** @type {!Uint32Array} */ var HEAPU32;
950
+
951
+ /** @type {!Uint8Array} */ var HEAPU8;
952
+
937
953
  var callRuntimeCallbacks = callbacks => {
938
954
  while (callbacks.length > 0) {
939
955
  // Pass the module as the first argument.
@@ -1019,13 +1035,10 @@ var initRandomFill = () => {
1019
1035
  var nodeCrypto = require("node:crypto");
1020
1036
  return view => nodeCrypto.randomFillSync(view);
1021
1037
  }
1022
- return view => crypto.getRandomValues(view);
1038
+ return view => (crypto.getRandomValues(view), 0);
1023
1039
  };
1024
1040
 
1025
- var randomFill = view => {
1026
- // Lazily init on the first invocation.
1027
- (randomFill = initRandomFill())(view);
1028
- };
1041
+ var randomFill = view => (randomFill = initRandomFill())(view);
1029
1042
 
1030
1043
  var PATH_FS = {
1031
1044
  resolve: (...args) => {
@@ -1420,12 +1433,14 @@ var MEMFS = {
1420
1433
  } else if (FS.isFile(node.mode)) {
1421
1434
  node.node_ops = MEMFS.ops_table.file.node;
1422
1435
  node.stream_ops = MEMFS.ops_table.file.stream;
1436
+ // The actual number of bytes used in the typed array, as opposed to
1437
+ // contents.length which gives the whole capacity.
1423
1438
  node.usedBytes = 0;
1424
- // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity.
1425
- // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred
1426
- // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size
1427
- // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme.
1428
- node.contents = null;
1439
+ // The byte data of the file is stored in a typed array.
1440
+ // Note: typed arrays are not resizable like normal JS arrays are, so
1441
+ // there is a small penalty involved for appending file writes that
1442
+ // continuously grow a file similar to std::vector capacity vs used.
1443
+ node.contents = MEMFS.emptyFileContents ??= new Uint8Array(0);
1429
1444
  } else if (FS.isLink(node.mode)) {
1430
1445
  node.node_ops = MEMFS.ops_table.link.node;
1431
1446
  node.stream_ops = MEMFS.ops_table.link.stream;
@@ -1442,42 +1457,34 @@ var MEMFS = {
1442
1457
  return node;
1443
1458
  },
1444
1459
  getFileDataAsTypedArray(node) {
1445
- if (!node.contents) return new Uint8Array(0);
1446
- if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes);
1447
- // Make sure to not return excess unused bytes.
1448
- return new Uint8Array(node.contents);
1460
+ return node.contents.subarray(0, node.usedBytes);
1449
1461
  },
1450
1462
  expandFileStorage(node, newCapacity) {
1451
- var prevCapacity = node.contents ? node.contents.length : 0;
1463
+ var prevCapacity = node.contents.length;
1452
1464
  if (prevCapacity >= newCapacity) return;
1453
1465
  // No need to expand, the storage was already large enough.
1454
- // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity.
1455
- // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to
1456
- // avoid overshooting the allocation cap by a very large margin.
1466
+ // Don't expand strictly to the given requested limit if it's only a very
1467
+ // small increase, but instead geometrically grow capacity.
1468
+ // For small filesizes (<1MB), perform size*2 geometric increase, but for
1469
+ // large sizes, do a much more conservative size*1.125 increase to avoid
1470
+ // overshooting the allocation cap by a very large margin.
1457
1471
  var CAPACITY_DOUBLING_MAX = 1024 * 1024;
1458
1472
  newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125)) >>> 0);
1459
- if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256);
1473
+ if (prevCapacity) newCapacity = Math.max(newCapacity, 256);
1460
1474
  // At minimum allocate 256b for each file when expanding.
1461
- var oldContents = node.contents;
1475
+ var oldContents = MEMFS.getFileDataAsTypedArray(node);
1462
1476
  node.contents = new Uint8Array(newCapacity);
1463
1477
  // Allocate new storage.
1464
- if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0);
1478
+ node.contents.set(oldContents);
1465
1479
  },
1466
1480
  resizeFileStorage(node, newSize) {
1467
1481
  if (node.usedBytes == newSize) return;
1468
- if (newSize == 0) {
1469
- node.contents = null;
1470
- // Fully decommit when requesting a resize to zero.
1471
- node.usedBytes = 0;
1472
- } else {
1473
- var oldContents = node.contents;
1474
- node.contents = new Uint8Array(newSize);
1475
- // Allocate new storage.
1476
- if (oldContents) {
1477
- node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes)));
1478
- }
1479
- node.usedBytes = newSize;
1480
- }
1482
+ var oldContents = node.contents;
1483
+ node.contents = new Uint8Array(newSize);
1484
+ // Allocate new storage.
1485
+ node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes)));
1486
+ // Copy old data over to the new storage.
1487
+ node.usedBytes = newSize;
1481
1488
  },
1482
1489
  node_ops: {
1483
1490
  getattr(node) {
@@ -1582,12 +1589,7 @@ var MEMFS = {
1582
1589
  var contents = stream.node.contents;
1583
1590
  if (position >= stream.node.usedBytes) return 0;
1584
1591
  var size = Math.min(stream.node.usedBytes - position, length);
1585
- if (size > 8 && contents.subarray) {
1586
- // non-trivial, and typed array
1587
- buffer.set(contents.subarray(position, position + size), offset);
1588
- } else {
1589
- for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];
1590
- }
1592
+ buffer.set(contents.subarray(position, position + size), offset);
1591
1593
  return size;
1592
1594
  },
1593
1595
  write(stream, buffer, offset, length, position, canOwn) {
@@ -1601,34 +1603,19 @@ var MEMFS = {
1601
1603
  if (!length) return 0;
1602
1604
  var node = stream.node;
1603
1605
  node.mtime = node.ctime = Date.now();
1604
- if (buffer.subarray && (!node.contents || node.contents.subarray)) {
1605
- // This write is from a typed array to a typed array?
1606
- if (canOwn) {
1607
- node.contents = buffer.subarray(offset, offset + length);
1608
- node.usedBytes = length;
1609
- return length;
1610
- } else if (node.usedBytes === 0 && position === 0) {
1611
- // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
1612
- node.contents = buffer.slice(offset, offset + length);
1613
- node.usedBytes = length;
1614
- return length;
1615
- } else if (position + length <= node.usedBytes) {
1616
- // Writing to an already allocated and used subrange of the file?
1617
- node.contents.set(buffer.subarray(offset, offset + length), position);
1618
- return length;
1619
- }
1620
- }
1621
- // Appending to an existing file and we need to reallocate, or source data did not come as a typed array.
1622
- MEMFS.expandFileStorage(node, position + length);
1623
- if (node.contents.subarray && buffer.subarray) {
1606
+ if (canOwn) {
1607
+ node.contents = buffer.subarray(offset, offset + length);
1608
+ node.usedBytes = length;
1609
+ } else if (node.usedBytes === 0 && position === 0) {
1610
+ // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
1611
+ node.contents = buffer.slice(offset, offset + length);
1612
+ node.usedBytes = length;
1613
+ } else {
1614
+ MEMFS.expandFileStorage(node, position + length);
1624
1615
  // Use typed array write which is available.
1625
1616
  node.contents.set(buffer.subarray(offset, offset + length), position);
1626
- } else {
1627
- for (var i = 0; i < length; i++) {
1628
- node.contents[position + i] = buffer[offset + i];
1629
- }
1617
+ node.usedBytes = Math.max(node.usedBytes, position + length);
1630
1618
  }
1631
- node.usedBytes = Math.max(node.usedBytes, position + length);
1632
1619
  return length;
1633
1620
  },
1634
1621
  llseek(stream, offset, whence) {
@@ -1653,7 +1640,7 @@ var MEMFS = {
1653
1640
  var allocated;
1654
1641
  var contents = stream.node.contents;
1655
1642
  // Only make a new copy when MAP_PRIVATE is specified.
1656
- if (!(flags & 2) && contents && contents.buffer === HEAP8.buffer) {
1643
+ if (!(flags & 2) && contents.buffer === HEAP8.buffer) {
1657
1644
  // We can't emulate MAP_SHARED when the file is not backed by the
1658
1645
  // buffer we're mapping to (e.g. the HEAP buffer).
1659
1646
  allocated = false;
@@ -1690,6 +1677,7 @@ var MEMFS = {
1690
1677
  };
1691
1678
 
1692
1679
  var FS_modeStringToFlags = str => {
1680
+ if (typeof str != "string") return str;
1693
1681
  var flagModes = {
1694
1682
  "r": 0,
1695
1683
  "r+": 2,
@@ -1705,6 +1693,16 @@ var FS_modeStringToFlags = str => {
1705
1693
  return flags;
1706
1694
  };
1707
1695
 
1696
+ var FS_fileDataToTypedArray = data => {
1697
+ if (typeof data == "string") {
1698
+ data = intArrayFromString(data, true);
1699
+ }
1700
+ if (!data.subarray) {
1701
+ data = new Uint8Array(data);
1702
+ }
1703
+ return data;
1704
+ };
1705
+
1708
1706
  var FS_getMode = (canRead, canWrite) => {
1709
1707
  var mode = 0;
1710
1708
  if (canRead) mode |= 292 | 73;
@@ -1880,7 +1878,7 @@ var FS = {
1880
1878
  if (!PATH.isAbs(path)) {
1881
1879
  path = FS.cwd() + "/" + path;
1882
1880
  }
1883
- // limit max consecutive symlinks to 40 (SYMLOOP_MAX).
1881
+ // limit max consecutive symlinks to SYMLOOP_MAX.
1884
1882
  linkloop: for (var nlinks = 0; nlinks < 40; nlinks++) {
1885
1883
  // split the absolute path
1886
1884
  var parts = path.split("/").filter(p => !!p);
@@ -2163,7 +2161,14 @@ var FS = {
2163
2161
  var arg = setattr ? stream : node;
2164
2162
  setattr ??= node.node_ops.setattr;
2165
2163
  FS.checkOpExists(setattr, 63);
2166
- setattr(arg, attr);
2164
+ try {
2165
+ setattr(arg, attr);
2166
+ } catch (e) {
2167
+ if (e instanceof RangeError) {
2168
+ throw new FS.ErrnoError(22);
2169
+ }
2170
+ throw e;
2171
+ }
2167
2172
  },
2168
2173
  chrdev_stream_ops: {
2169
2174
  open(stream) {
@@ -2681,7 +2686,7 @@ var FS = {
2681
2686
  if (path === "") {
2682
2687
  throw new FS.ErrnoError(44);
2683
2688
  }
2684
- flags = typeof flags == "string" ? FS_modeStringToFlags(flags) : flags;
2689
+ flags = FS_modeStringToFlags(flags);
2685
2690
  if ((flags & 64)) {
2686
2691
  mode = (mode & 4095) | 32768;
2687
2692
  } else {
@@ -2913,14 +2918,8 @@ var FS = {
2913
2918
  writeFile(path, data, opts = {}) {
2914
2919
  opts.flags = opts.flags || 577;
2915
2920
  var stream = FS.open(path, opts.flags, opts.mode);
2916
- if (typeof data == "string") {
2917
- data = new Uint8Array(intArrayFromString(data, true));
2918
- }
2919
- if (ArrayBuffer.isView(data)) {
2920
- FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
2921
- } else {
2922
- abort("Unsupported data type");
2923
- }
2921
+ data = FS_fileDataToTypedArray(data);
2922
+ FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
2924
2923
  FS.close(stream);
2925
2924
  },
2926
2925
  cwd: () => FS.currentPath,
@@ -3150,11 +3149,7 @@ var FS = {
3150
3149
  var mode = FS_getMode(canRead, canWrite);
3151
3150
  var node = FS.create(path, mode);
3152
3151
  if (data) {
3153
- if (typeof data == "string") {
3154
- var arr = new Array(data.length);
3155
- for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
3156
- data = arr;
3157
- }
3152
+ data = FS_fileDataToTypedArray(data);
3158
3153
  // make sure we can write to the file
3159
3154
  FS.chmod(node, mode | 146);
3160
3155
  var stream = FS.open(node, 577);
@@ -3417,6 +3412,7 @@ var FS = {
3417
3412
  };
3418
3413
 
3419
3414
  var SYSCALLS = {
3415
+ currentUmask: 18,
3420
3416
  calculateAt(dirfd, path, allowEmpty) {
3421
3417
  if (PATH.isAbs(path)) {
3422
3418
  return path;
@@ -3585,7 +3581,8 @@ function ___syscall_fcntl64(fd, cmd, varargs) {
3585
3581
  case 4:
3586
3582
  {
3587
3583
  var arg = syscallGetVarargI();
3588
- stream.flags |= arg;
3584
+ var mask = 289792;
3585
+ stream.flags = (stream.flags & ~mask) | (arg & mask);
3589
3586
  return 0;
3590
3587
  }
3591
3588
 
@@ -3627,7 +3624,7 @@ var convertI32PairToI53Checked = (lo, hi) => ((hi + 2097152) >>> 0 < 4194305 - !
3627
3624
  function ___syscall_ftruncate64(fd, length_low, length_high) {
3628
3625
  var length = convertI32PairToI53Checked(length_low, length_high);
3629
3626
  try {
3630
- if (isNaN(length)) return -61;
3627
+ if (isNaN(length)) return -22;
3631
3628
  FS.ftruncate(fd, length);
3632
3629
  return 0;
3633
3630
  } catch (e) {
@@ -3788,6 +3785,9 @@ function ___syscall_openat(dirfd, path, flags, varargs) {
3788
3785
  path = SYSCALLS.getStr(path);
3789
3786
  path = SYSCALLS.calculateAt(dirfd, path);
3790
3787
  var mode = varargs ? syscallGetVarargI() : 0;
3788
+ if (flags & 64) {
3789
+ mode &= ~SYSCALLS.currentUmask;
3790
+ }
3791
3791
  return FS.open(path, flags, mode).fd;
3792
3792
  } catch (e) {
3793
3793
  if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
@@ -3862,6 +3862,9 @@ var setTempRet0 = val => __emscripten_tempret_set(val);
3862
3862
  var __mktime_js = function(tmPtr) {
3863
3863
  var ret = (() => {
3864
3864
  var date = new Date(HEAP32[(((tmPtr) + (20)) >> 2)] + 1900, HEAP32[(((tmPtr) + (16)) >> 2)], HEAP32[(((tmPtr) + (12)) >> 2)], HEAP32[(((tmPtr) + (8)) >> 2)], HEAP32[(((tmPtr) + (4)) >> 2)], HEAP32[((tmPtr) >> 2)], 0);
3865
+ if (isNaN(date.getTime())) {
3866
+ return -1;
3867
+ }
3865
3868
  // There's an ambiguous hour when the time goes back; the tm_isdst field is
3866
3869
  // used to disambiguate it. Date() basically guesses, so we fix it up if it
3867
3870
  // guessed wrong, or fill in tm_isdst with the guess if it's -1.
@@ -3891,12 +3894,8 @@ var __mktime_js = function(tmPtr) {
3891
3894
  HEAP32[(((tmPtr) + (12)) >> 2)] = date.getDate();
3892
3895
  HEAP32[(((tmPtr) + (16)) >> 2)] = date.getMonth();
3893
3896
  HEAP32[(((tmPtr) + (20)) >> 2)] = date.getYear();
3894
- var timeMs = date.getTime();
3895
- if (isNaN(timeMs)) {
3896
- return -1;
3897
- }
3898
- // Return time in microseconds
3899
- return timeMs / 1e3;
3897
+ // Return time in seconds
3898
+ return date.getTime() / 1e3;
3900
3899
  })();
3901
3900
  return (setTempRet0((tempDouble = ret, (+(Math.abs(tempDouble))) >= 1 ? (tempDouble > 0 ? (+(Math.floor((tempDouble) / 4294967296))) >>> 0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296))))) >>> 0) : 0)),
3902
3901
  ret >>> 0);
@@ -5218,7 +5217,7 @@ var WebGPU = {
5218
5217
  ToneMappingMode: [ , "standard", "extended" ],
5219
5218
  VertexFormat: [ , "uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra" ],
5220
5219
  VertexStepMode: [ , "vertex", "instance" ],
5221
- WGSLLanguageFeatureName: [ , "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1" ]
5220
+ WGSLLanguageFeatureName: [ , "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1", "linear_indexing" ]
5222
5221
  };
5223
5222
 
5224
5223
  var _emwgpuBufferDestroy = bufferPtr => {
@@ -5274,7 +5273,6 @@ var getExecutableName = () => thisProgram || "./this.program";
5274
5273
  var getEnvStrings = () => {
5275
5274
  if (!getEnvStrings.strings) {
5276
5275
  // Default values.
5277
- // Browser language detection #8751
5278
5276
  var lang = (globalThis.navigator?.language ?? "C").replace("-", "_") + ".UTF-8";
5279
5277
  var env = {
5280
5278
  "USER": "web_user",
@@ -5368,7 +5366,7 @@ function _fd_read(fd, iov, iovcnt, pnum) {
5368
5366
  function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {
5369
5367
  var offset = convertI32PairToI53Checked(offset_low, offset_high);
5370
5368
  try {
5371
- if (isNaN(offset)) return 61;
5369
+ if (isNaN(offset)) return 22;
5372
5370
  var stream = SYSCALLS.getStreamFromFD(fd);
5373
5371
  FS.llseek(stream, offset, whence);
5374
5372
  (tempI64 = [ stream.position >>> 0, (tempDouble = stream.position, (+(Math.abs(tempDouble))) >= 1 ? (tempDouble > 0 ? (+(Math.floor((tempDouble) / 4294967296))) >>> 0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296))))) >>> 0) : 0) ],
@@ -6229,15 +6227,7 @@ var _emscripten_glViewport = (x0, x1, x2, x3) => GLctx.viewport(x0, x1, x2, x3);
6229
6227
 
6230
6228
  var _glViewport = _emscripten_glViewport;
6231
6229
 
6232
- function _random_get(buffer, size) {
6233
- try {
6234
- randomFill(HEAPU8.subarray(buffer, buffer + size));
6235
- return 0;
6236
- } catch (e) {
6237
- if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
6238
- return e.errno;
6239
- }
6240
- }
6230
+ var _random_get = (buffer, size) => randomFill(HEAPU8.subarray(buffer, buffer + size));
6241
6231
 
6242
6232
  var _wgpuCommandEncoderCopyTextureToBuffer = (encoderPtr, srcPtr, dstPtr, copySizePtr) => {
6243
6233
  var commandEncoder = WebGPU.getJsObject(encoderPtr);
@@ -6410,7 +6400,7 @@ Module["FS_createLazyFile"] = FS_createLazyFile;
6410
6400
  // End JS library exports
6411
6401
  // end include: postlibrary.js
6412
6402
  var ASM_CONSTS = {
6413
- 706631: () => {
6403
+ 722479: () => {
6414
6404
  specialHTMLTargets["#canvas"] = Module.canvas;
6415
6405
  }
6416
6406
  };
@@ -6551,7 +6541,7 @@ function custom_emscripten_dbgn(str, len) {
6551
6541
  }
6552
6542
 
6553
6543
  // Imports from the Wasm binary.
6554
- var _free, _malloc, _registerModelResourcesGraphService, _bindTextureToStream, _addBoundTextureToStream, _addDoubleToInputStream, _addFloatToInputStream, _addBoolToInputStream, _addIntToInputStream, _addUintToInputStream, _addStringToInputStream, _addRawDataSpanToInputStream, _allocateBoolVector, _allocateFloatVector, _allocateDoubleVector, _allocateIntVector, _allocateUintVector, _allocateStringVector, _addBoolVectorEntry, _addFloatVectorEntry, _addDoubleVectorEntry, _addIntVectorEntry, _addUintVectorEntry, _addStringVectorEntry, _addBoolVectorToInputStream, _addFloatVectorToInputStream, _addDoubleVectorToInputStream, _addIntVectorToInputStream, _addUintVectorToInputStream, _addStringVectorToInputStream, _addFlatHashMapToInputStream, _addProtoToInputStream, _addEmptyPacketToInputStream, _addBoolToInputSidePacket, _addDoubleToInputSidePacket, _addFloatToInputSidePacket, _addIntToInputSidePacket, _addUintToInputSidePacket, _addStringToInputSidePacket, _addRawDataSpanToInputSidePacket, _addProtoToInputSidePacket, _addBoolVectorToInputSidePacket, _addDoubleVectorToInputSidePacket, _addFloatVectorToInputSidePacket, _addIntVectorToInputSidePacket, _addUintVectorToInputSidePacket, _addStringVectorToInputSidePacket, _attachBoolListener, _attachBoolVectorListener, _attachDoubleListener, _attachDoubleVectorListener, _attachFloatListener, _attachFloatVectorListener, _attachIntListener, _attachIntVectorListener, _attachUintListener, _attachUintVectorListener, _attachStringListener, _attachStringVectorListener, _attachProtoListener, _attachProtoVectorListener, _getGraphConfig, _emwgpuCreateBindGroup, _emwgpuCreateBindGroupLayout, _emwgpuCreateCommandBuffer, _emwgpuCreateCommandEncoder, _emwgpuCreateComputePassEncoder, _emwgpuCreateComputePipeline, _emwgpuCreateExternalTexture, _emwgpuCreatePipelineLayout, _emwgpuCreateQuerySet, _emwgpuCreateRenderBundle, _emwgpuCreateRenderBundleEncoder, _emwgpuCreateRenderPassEncoder, _emwgpuCreateRenderPipeline, _emwgpuCreateSampler, _emwgpuCreateSurface, _emwgpuCreateTexture, _emwgpuCreateTextureView, _emwgpuCreateAdapter, _emwgpuImportBuffer, _emwgpuCreateDevice, _emwgpuCreateQueue, _emwgpuCreateShaderModule, _clearSubgraphs, _pushBinarySubgraph, _pushTextSubgraph, _changeBinaryGraph, _changeTextGraph, _processGl, _process, _bindTextureToCanvas, _requestShaderRefreshOnGraphChange, _waitUntilIdle, _closeGraph, _setAutoRenderToScreen, _emscripten_builtin_memalign, __emscripten_tempret_set, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, dynCall_jii, dynCall_ji, dynCall_iiiijij, dynCall_viji, dynCall_viijii, dynCall_jjj, dynCall_iiiijj, dynCall_viijj, dynCall_viiijjj, dynCall_iiiji, dynCall_vij, dynCall_viiiji, dynCall_viiji, dynCall_vijjj, dynCall_vj, dynCall_viij, dynCall_jiji, dynCall_iiiiij, dynCall_iiiiijj, dynCall_iiiiiijj, memory, _kVersionStampBuildChangelistStr, _kVersionStampCitcSnapshotStr, _kVersionStampCitcWorkspaceIdStr, _kVersionStampSourceUriStr, _kVersionStampBuildClientStr, _kVersionStampBuildClientMintStatusStr, _kVersionStampBuildCompilerStr, _kVersionStampBuildDateTimePstStr, _kVersionStampBuildDepotPathStr, _kVersionStampBuildIdStr, _kVersionStampBuildInfoStr, _kVersionStampBuildLabelStr, _kVersionStampBuildTargetStr, _kVersionStampBuildTimestampStr, _kVersionStampBuildToolStr, _kVersionStampG3BuildTargetStr, _kVersionStampVerifiableStr, _kVersionStampBuildFdoTypeStr, _kVersionStampBuildBaselineChangelistStr, _kVersionStampBuildLtoTypeStr, _kVersionStampBuildPropellerTypeStr, _kVersionStampBuildPghoTypeStr, _kVersionStampBuildUsernameStr, _kVersionStampBuildHostnameStr, _kVersionStampBuildDirectoryStr, _kVersionStampBuildChangelistInt, _kVersionStampCitcSnapshotInt, _kVersionStampBuildClientMintStatusInt, _kVersionStampBuildTimestampInt, _kVersionStampVerifiableInt, _kVersionStampBuildCoverageEnabledInt, _kVersionStampBuildBaselineChangelistInt, _kVersionStampPrecookedTimestampStr, _kVersionStampPrecookedClientInfoStr, __indirect_function_table, wasmMemory, wasmTable;
6544
+ var _free, _malloc, _registerModelResourcesGraphService, _bindTextureToStream, _addBoundTextureToStream, _addDoubleToInputStream, _addFloatToInputStream, _addBoolToInputStream, _addIntToInputStream, _addUintToInputStream, _addStringToInputStream, _addRawDataSpanToInputStream, _allocateBoolVector, _allocateFloatVector, _allocateDoubleVector, _allocateIntVector, _allocateUintVector, _allocateStringVector, _addBoolVectorEntry, _addFloatVectorEntry, _addDoubleVectorEntry, _addIntVectorEntry, _addUintVectorEntry, _addStringVectorEntry, _addBoolVectorToInputStream, _addFloatVectorToInputStream, _addDoubleVectorToInputStream, _addIntVectorToInputStream, _addUintVectorToInputStream, _addStringVectorToInputStream, _addFlatHashMapToInputStream, _addProtoToInputStream, _addEmptyPacketToInputStream, _addBoolToInputSidePacket, _addDoubleToInputSidePacket, _addFloatToInputSidePacket, _addIntToInputSidePacket, _addUintToInputSidePacket, _addStringToInputSidePacket, _addRawDataSpanToInputSidePacket, _addProtoToInputSidePacket, _addBoolVectorToInputSidePacket, _addDoubleVectorToInputSidePacket, _addFloatVectorToInputSidePacket, _addIntVectorToInputSidePacket, _addUintVectorToInputSidePacket, _addStringVectorToInputSidePacket, _attachBoolListener, _attachBoolVectorListener, _attachDoubleListener, _attachDoubleVectorListener, _attachFloatListener, _attachFloatVectorListener, _attachIntListener, _attachIntVectorListener, _attachUintListener, _attachUintVectorListener, _attachStringListener, _attachStringVectorListener, _attachProtoListener, _attachProtoVectorListener, _getGraphConfig, _emwgpuCreateBindGroup, _emwgpuCreateBindGroupLayout, _emwgpuCreateCommandBuffer, _emwgpuCreateCommandEncoder, _emwgpuCreateComputePassEncoder, _emwgpuCreateComputePipeline, _emwgpuCreateExternalTexture, _emwgpuCreatePipelineLayout, _emwgpuCreateQuerySet, _emwgpuCreateRenderBundle, _emwgpuCreateRenderBundleEncoder, _emwgpuCreateRenderPassEncoder, _emwgpuCreateRenderPipeline, _emwgpuCreateSampler, _emwgpuCreateSurface, _emwgpuCreateTexture, _emwgpuCreateTextureView, _emwgpuCreateAdapter, _emwgpuImportBuffer, _emwgpuCreateDevice, _emwgpuCreateQueue, _emwgpuCreateShaderModule, _clearSubgraphs, _pushBinarySubgraph, _pushTextSubgraph, _changeBinaryGraph, _changeTextGraph, _processGl, _process, _bindTextureToCanvas, _requestShaderRefreshOnGraphChange, _waitUntilIdle, _closeGraph, _setAutoRenderToScreen, _emscripten_builtin_memalign, __emscripten_tempret_set, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, dynCall_jii, dynCall_ji, dynCall_iiiijij, dynCall_viji, dynCall_viijii, dynCall_jjj, dynCall_iiiijj, dynCall_viijj, dynCall_viiijjj, dynCall_iiiji, dynCall_vij, dynCall_viiiji, dynCall_viiji, dynCall_vijjj, dynCall_vj, dynCall_viij, dynCall_jiji, dynCall_iiiiij, dynCall_iiiiijj, dynCall_iiiiiijj, memory, _kVersionStampBuildChangelistStr, _kVersionStampCitcSnapshotStr, _kVersionStampCitcWorkspaceIdStr, _kVersionStampSourceUriStr, _kVersionStampBuildClientStr, _kVersionStampBuildClientMintStatusStr, _kVersionStampBuildCompilerStr, _kVersionStampBuildDateTimePstStr, _kVersionStampBuildDepotPathStr, _kVersionStampBuildIdStr, _kVersionStampBuildInfoStr, _kVersionStampBuildLabelStr, _kVersionStampBuildTargetStr, _kVersionStampBuildTimestampStr, _kVersionStampBuildToolStr, _kVersionStampG3BuildTargetStr, _kVersionStampVerifiableStr, _kVersionStampBuildFdoTypeStr, _kVersionStampBuildBaselineChangelistStr, _kVersionStampBuildLtoTypeStr, _kVersionStampBuildPropellerTypeStr, _kVersionStampBuildPghoTypeStr, _kVersionStampBuildUsernameStr, _kVersionStampBuildHostnameStr, _kVersionStampBuildDirectoryStr, _kVersionStampBuildChangelistInt, _kVersionStampCitcSnapshotInt, _kVersionStampBuildClientMintStatusInt, _kVersionStampBuildTimestampInt, _kVersionStampVerifiableInt, _kVersionStampBuildCoverageEnabledInt, _kVersionStampBuildBaselineChangelistInt, _kVersionStampPrecookedTimestampStr, _kVersionStampPrecookedClientInfoStr, __indirect_function_table, _kVersionStampBuildHasHardeningProtobuf, wasmMemory, wasmTable;
6555
6545
 
6556
6546
  function assignWasmExports(wasmExports) {
6557
6547
  _free = Module["_free"] = wasmExports["Sb"];
@@ -6650,11 +6640,11 @@ function assignWasmExports(wasmExports) {
6650
6640
  _waitUntilIdle = Module["_waitUntilIdle"] = wasmExports["Dd"];
6651
6641
  _closeGraph = Module["_closeGraph"] = wasmExports["Ed"];
6652
6642
  _setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = wasmExports["Fd"];
6653
- _emscripten_builtin_memalign = wasmExports["Gd"];
6654
- __emscripten_tempret_set = wasmExports["Hd"];
6655
- __emscripten_stack_restore = wasmExports["Id"];
6656
- __emscripten_stack_alloc = wasmExports["Jd"];
6657
- _emscripten_stack_get_current = wasmExports["Kd"];
6643
+ _emscripten_builtin_memalign = wasmExports["Hd"];
6644
+ __emscripten_tempret_set = wasmExports["Id"];
6645
+ __emscripten_stack_restore = wasmExports["Jd"];
6646
+ __emscripten_stack_alloc = wasmExports["Kd"];
6647
+ _emscripten_stack_get_current = wasmExports["Ld"];
6658
6648
  dynCall_jii = wasmExports["dynCall_jii"];
6659
6649
  dynCall_ji = wasmExports["dynCall_ji"];
6660
6650
  dynCall_iiiijij = wasmExports["dynCall_iiiijij"];
@@ -6711,11 +6701,12 @@ function assignWasmExports(wasmExports) {
6711
6701
  _kVersionStampPrecookedTimestampStr = Module["_kVersionStampPrecookedTimestampStr"] = wasmExports["Pb"].value;
6712
6702
  _kVersionStampPrecookedClientInfoStr = Module["_kVersionStampPrecookedClientInfoStr"] = wasmExports["Qb"].value;
6713
6703
  __indirect_function_table = wasmTable = wasmExports["Rb"];
6704
+ _kVersionStampBuildHasHardeningProtobuf = Module["_kVersionStampBuildHasHardeningProtobuf"] = wasmExports["Gd"].value;
6714
6705
  }
6715
6706
 
6716
6707
  var wasmImports = {
6717
6708
  /** @export */ gb: JsOnEmptyPacketListener,
6718
- /** @export */ R: JsOnSimpleListenerBinaryArray,
6709
+ /** @export */ S: JsOnSimpleListenerBinaryArray,
6719
6710
  /** @export */ fb: JsOnSimpleListenerBool,
6720
6711
  /** @export */ eb: JsOnSimpleListenerDouble,
6721
6712
  /** @export */ db: JsOnSimpleListenerFloat,
@@ -6732,36 +6723,36 @@ var wasmImports = {
6732
6723
  /** @export */ Va: JsOnVectorListenerUint,
6733
6724
  /** @export */ x: JsWrapErrorListener,
6734
6725
  /** @export */ a: JsWrapSimpleListeners,
6735
- /** @export */ Q: UseBottomLeftGpuOrigin,
6736
- /** @export */ Y: __asyncjs__mediapipe_map_buffer_jspi,
6726
+ /** @export */ R: UseBottomLeftGpuOrigin,
6727
+ /** @export */ Z: __asyncjs__mediapipe_map_buffer_jspi,
6737
6728
  /** @export */ Ua: ___syscall_dup,
6738
6729
  /** @export */ Ta: ___syscall_faccessat,
6739
- /** @export */ P: ___syscall_fcntl64,
6730
+ /** @export */ Q: ___syscall_fcntl64,
6740
6731
  /** @export */ Sa: ___syscall_fstat64,
6741
- /** @export */ ea: ___syscall_ftruncate64,
6732
+ /** @export */ fa: ___syscall_ftruncate64,
6742
6733
  /** @export */ Ra: ___syscall_ioctl,
6743
6734
  /** @export */ Qa: ___syscall_lstat64,
6744
6735
  /** @export */ Pa: ___syscall_newfstatat,
6745
- /** @export */ O: ___syscall_openat,
6736
+ /** @export */ P: ___syscall_openat,
6746
6737
  /** @export */ Oa: ___syscall_stat64,
6747
6738
  /** @export */ Ja: __abort_js,
6748
- /** @export */ ba: __gmtime_js,
6749
- /** @export */ aa: __localtime_js,
6750
- /** @export */ $: __mktime_js,
6751
- /** @export */ _: __mmap_js,
6752
- /** @export */ Z: __munmap_js,
6739
+ /** @export */ ca: __gmtime_js,
6740
+ /** @export */ ba: __localtime_js,
6741
+ /** @export */ aa: __mktime_js,
6742
+ /** @export */ $: __mmap_js,
6743
+ /** @export */ _: __munmap_js,
6753
6744
  /** @export */ Ia: __tzset_js,
6754
- /** @export */ da: _clock_time_get,
6745
+ /** @export */ ea: _clock_time_get,
6755
6746
  /** @export */ Ha: custom_emscripten_dbgn,
6756
6747
  /** @export */ Ga: _emscripten_asm_const_int,
6757
6748
  /** @export */ u: _emscripten_errn,
6758
6749
  /** @export */ Fa: _emscripten_get_heap_max,
6759
6750
  /** @export */ b: _emscripten_get_now,
6760
- /** @export */ M: _emscripten_has_asyncify,
6751
+ /** @export */ N: _emscripten_has_asyncify,
6761
6752
  /** @export */ Ea: _emscripten_outn,
6762
6753
  /** @export */ Da: _emscripten_pc_get_function,
6763
6754
  /** @export */ Ca: _emscripten_resize_heap,
6764
- /** @export */ L: _emscripten_stack_snapshot,
6755
+ /** @export */ M: _emscripten_stack_snapshot,
6765
6756
  /** @export */ Ba: _emscripten_stack_unwind_buffer,
6766
6757
  /** @export */ Aa: _emscripten_webgl_create_context,
6767
6758
  /** @export */ za: _emscripten_webgl_destroy_context,
@@ -6774,61 +6765,61 @@ var wasmImports = {
6774
6765
  /** @export */ ua: _emwgpuDeviceDestroy,
6775
6766
  /** @export */ Na: _environ_get,
6776
6767
  /** @export */ Ma: _environ_sizes_get,
6777
- /** @export */ ta: _exit,
6768
+ /** @export */ L: _exit,
6778
6769
  /** @export */ w: _fd_close,
6779
- /** @export */ N: _fd_read,
6780
- /** @export */ ca: _fd_seek,
6770
+ /** @export */ O: _fd_read,
6771
+ /** @export */ da: _fd_seek,
6781
6772
  /** @export */ v: _fd_write,
6782
6773
  /** @export */ t: _glActiveTexture,
6783
6774
  /** @export */ K: _glAttachShader,
6784
- /** @export */ sa: _glBindAttribLocation,
6775
+ /** @export */ ta: _glBindAttribLocation,
6785
6776
  /** @export */ f: _glBindBuffer,
6786
6777
  /** @export */ m: _glBindFramebuffer,
6787
6778
  /** @export */ e: _glBindTexture,
6788
6779
  /** @export */ s: _glBufferData,
6789
6780
  /** @export */ h: _glClientWaitSync,
6790
- /** @export */ ra: _glCompileShader,
6791
- /** @export */ qa: _glCreateProgram,
6792
- /** @export */ pa: _glCreateShader,
6781
+ /** @export */ sa: _glCompileShader,
6782
+ /** @export */ ra: _glCreateProgram,
6783
+ /** @export */ qa: _glCreateShader,
6793
6784
  /** @export */ J: _glDeleteFramebuffers,
6794
- /** @export */ oa: _glDeleteProgram,
6785
+ /** @export */ pa: _glDeleteProgram,
6795
6786
  /** @export */ I: _glDeleteShader,
6796
6787
  /** @export */ l: _glDeleteSync,
6797
6788
  /** @export */ H: _glDeleteTextures,
6798
6789
  /** @export */ G: _glDetachShader,
6799
6790
  /** @export */ F: _glDisableVertexAttribArray,
6800
- /** @export */ na: _glDrawArrays,
6791
+ /** @export */ oa: _glDrawArrays,
6801
6792
  /** @export */ E: _glEnableVertexAttribArray,
6802
6793
  /** @export */ D: _glFenceSync,
6803
6794
  /** @export */ k: _glFinish,
6804
6795
  /** @export */ r: _glFramebufferTexture2D,
6805
6796
  /** @export */ C: _glGenBuffers,
6806
- /** @export */ ma: _glGenFramebuffers,
6797
+ /** @export */ na: _glGenFramebuffers,
6807
6798
  /** @export */ q: _glGenTextures,
6808
6799
  /** @export */ j: _glGetError,
6809
6800
  /** @export */ B: _glGetIntegerv,
6810
6801
  /** @export */ p: _glGetString,
6811
- /** @export */ la: _glGetUniformLocation,
6812
- /** @export */ ka: _glLinkProgram,
6802
+ /** @export */ ma: _glGetUniformLocation,
6803
+ /** @export */ la: _glLinkProgram,
6813
6804
  /** @export */ o: _glPixelStorei,
6814
6805
  /** @export */ A: _glReadPixels,
6815
- /** @export */ ja: _glShaderSource,
6816
- /** @export */ ia: _glTexImage2D,
6806
+ /** @export */ ka: _glShaderSource,
6807
+ /** @export */ ja: _glTexImage2D,
6817
6808
  /** @export */ d: _glTexParameteri,
6818
6809
  /** @export */ z: _glTexStorage2D,
6819
- /** @export */ ha: _glUniform1i,
6820
- /** @export */ ga: _glUseProgram,
6810
+ /** @export */ ia: _glUniform1i,
6811
+ /** @export */ ha: _glUseProgram,
6821
6812
  /** @export */ y: _glVertexAttribPointer,
6822
- /** @export */ fa: _glViewport,
6813
+ /** @export */ ga: _glViewport,
6823
6814
  /** @export */ n: hardware_concurrency,
6824
6815
  /** @export */ La: _proc_exit,
6825
6816
  /** @export */ Ka: _random_get,
6826
- /** @export */ X: _wgpuCommandEncoderCopyTextureToBuffer,
6827
- /** @export */ W: _wgpuCommandEncoderFinish,
6828
- /** @export */ V: _wgpuDeviceCreateCommandEncoder,
6829
- /** @export */ U: _wgpuQueueSubmit,
6830
- /** @export */ T: _wgpuTextureDestroy,
6831
- /** @export */ S: _wgpuTextureGetFormat
6817
+ /** @export */ Y: _wgpuCommandEncoderCopyTextureToBuffer,
6818
+ /** @export */ X: _wgpuCommandEncoderFinish,
6819
+ /** @export */ W: _wgpuDeviceCreateCommandEncoder,
6820
+ /** @export */ V: _wgpuQueueSubmit,
6821
+ /** @export */ U: _wgpuTextureDestroy,
6822
+ /** @export */ T: _wgpuTextureGetFormat
6832
6823
  };
6833
6824
 
6834
6825
  // include: postamble.js
@@ -6894,5 +6885,5 @@ if (runtimeInitialized) {
6894
6885
  }
6895
6886
 
6896
6887
  // Export using a UMD style export, or ES6 exports if selected
6897
- export default ModuleFactory;
6888
+ globalThis.ModuleFactory = ModuleFactory; globalThis.custom_dbg = console.warn.bind(console); export default ModuleFactory;
6898
6889
 
Binary file