@rive-app/webgl2 2.26.4 → 2.26.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/rive.js CHANGED
@@ -26,9 +26,9 @@ var Rive = (() => {
26
26
  return (
27
27
  function(moduleArg = {}) {
28
28
 
29
- var k = moduleArg, ba, ca;
29
+ var k = moduleArg, aa, ca;
30
30
  k.ready = new Promise((a, b) => {
31
- ba = a;
31
+ aa = a;
32
32
  ca = b;
33
33
  });
34
34
  function da() {
@@ -225,7 +225,7 @@ k.onRuntimeInitialized = function() {
225
225
  }
226
226
  u = Math.min(u, q);
227
227
  u = Math.min(y, q);
228
- A.sort((aa, sb) => sb.Ia - aa.Ia);
228
+ A.sort((ba, sb) => sb.Ia - ba.Ia);
229
229
  z = new k.DynamicRectanizer(q);
230
230
  for (I = 0; I < A.length;) {
231
231
  z.reset(u, y);
@@ -250,13 +250,13 @@ k.onRuntimeInitialized = function() {
250
250
  for (L = I; L < G; ++L) {
251
251
  E = A[L];
252
252
  d.saveClipRect(E.ra, E.sa, E.ra + E.fa, E.sa + E.ea);
253
- let aa = new k.Mat2D();
254
- aa.xx = E.fa / E.F.width;
255
- aa.yy = E.ea / E.F.height;
256
- aa.xy = aa.yx = 0;
257
- aa.tx = E.ra;
258
- aa.ty = E.sa;
259
- d.transform(aa);
253
+ let ba = new k.Mat2D();
254
+ ba.xx = E.fa / E.F.width;
255
+ ba.yy = E.ea / E.F.height;
256
+ ba.xy = ba.yx = 0;
257
+ ba.tx = E.ra;
258
+ ba.ty = E.sa;
259
+ d.transform(ba);
260
260
  for (const sb of E.S) {
261
261
  sb();
262
262
  }
@@ -442,7 +442,7 @@ function Oa(a, b) {
442
442
  return Na(c, a, b);
443
443
  }));
444
444
  }
445
- var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
445
+ var Pa, Qa, Ua = {509966:(a, b, c, d, e) => {
446
446
  if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
447
447
  return 0;
448
448
  }
@@ -505,9 +505,9 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
505
505
  }
506
506
  window.h.Da += 1;
507
507
  return 1;
508
- }, 510096:() => {
508
+ }, 512144:() => {
509
509
  "undefined" !== typeof window.h && (--window.h.Da, 0 === window.h.Da && delete window.h);
510
- }, 510260:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 510364:() => {
510
+ }, 512308:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 512412:() => {
511
511
  try {
512
512
  var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
513
513
  a.close();
@@ -515,7 +515,7 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
515
515
  } catch (c) {
516
516
  return 0;
517
517
  }
518
- }, 510535:(a, b, c, d, e, f) => {
518
+ }, 512583:(a, b, c, d, e, f) => {
519
519
  if ("undefined" === typeof window.h) {
520
520
  return -1;
521
521
  }
@@ -561,7 +561,7 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
561
561
  a == window.h.I.Ba && g.Z.connect(g.J.destination);
562
562
  g.lb = f;
563
563
  return window.h.oc(g);
564
- }, 513412:a => window.h.va(a).J.sampleRate, 513485:a => {
564
+ }, 515460:a => window.h.va(a).J.sampleRate, 515533:a => {
565
565
  a = window.h.va(a);
566
566
  void 0 !== a.Z && (a.Z.onaudioprocess = function() {
567
567
  }, a.Z.disconnect(), a.Z = void 0);
@@ -569,13 +569,13 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
569
569
  a.J.close();
570
570
  a.J = void 0;
571
571
  a.lb = void 0;
572
- }, 513885:a => {
572
+ }, 515933:a => {
573
573
  window.h.yb(a);
574
- }, 513935:a => {
574
+ }, 515983:a => {
575
575
  a = window.h.va(a);
576
576
  a.J.resume();
577
577
  a.state = window.h.ia.tb;
578
- }, 514074:a => {
578
+ }, 516122:a => {
579
579
  a = window.h.va(a);
580
580
  a.J.suspend();
581
581
  a.state = window.h.ia.stopped;
@@ -1311,7 +1311,7 @@ function R(a) {
1311
1311
  var S = a => {
1312
1312
  a || R("Cannot use deleted val. handle = " + a);
1313
1313
  return Q.get(a).value;
1314
- }, cc = a => {
1314
+ }, T = a => {
1315
1315
  switch(a) {
1316
1316
  case void 0:
1317
1317
  return 1;
@@ -1325,7 +1325,7 @@ var S = a => {
1325
1325
  return Q.ta({qb:1, value:a});
1326
1326
  }
1327
1327
  };
1328
- function dc(a) {
1328
+ function cc(a) {
1329
1329
  var b = Error, c = $b(a, function(d) {
1330
1330
  this.name = a;
1331
1331
  this.message = d;
@@ -1339,122 +1339,122 @@ function dc(a) {
1339
1339
  };
1340
1340
  return c;
1341
1341
  }
1342
- var ec = void 0, fc = void 0;
1343
- function T(a) {
1342
+ var dc = void 0, ec = void 0;
1343
+ function U(a) {
1344
1344
  for (var b = ""; F[a];) {
1345
- b += fc[F[a++]];
1345
+ b += ec[F[a++]];
1346
1346
  }
1347
1347
  return b;
1348
1348
  }
1349
- var gc = [];
1350
- function hc() {
1351
- for (; gc.length;) {
1352
- var a = gc.pop();
1349
+ var fc = [];
1350
+ function gc() {
1351
+ for (; fc.length;) {
1352
+ var a = fc.pop();
1353
1353
  a.g.ha = !1;
1354
1354
  a["delete"]();
1355
1355
  }
1356
1356
  }
1357
- var ic = void 0, jc = {};
1358
- function kc(a, b) {
1357
+ var hc = void 0, ic = {};
1358
+ function jc(a, b) {
1359
1359
  for (void 0 === b && R("ptr should not be undefined"); a.A;) {
1360
1360
  b = a.pa(b), a = a.A;
1361
1361
  }
1362
1362
  return b;
1363
1363
  }
1364
- var lc = {};
1365
- function mc(a) {
1366
- a = nc(a);
1367
- var b = T(a);
1368
- oc(a);
1364
+ var kc = {};
1365
+ function lc(a) {
1366
+ a = mc(a);
1367
+ var b = U(a);
1368
+ nc(a);
1369
1369
  return b;
1370
1370
  }
1371
- function pc(a, b) {
1372
- var c = lc[a];
1373
- void 0 === c && R(b + " has unknown type " + mc(a));
1371
+ function oc(a, b) {
1372
+ var c = kc[a];
1373
+ void 0 === c && R(b + " has unknown type " + lc(a));
1374
1374
  return c;
1375
1375
  }
1376
- function qc() {
1376
+ function pc() {
1377
1377
  }
1378
- var rc = !1;
1379
- function sc(a) {
1378
+ var qc = !1;
1379
+ function rc(a) {
1380
1380
  --a.count.value;
1381
1381
  0 === a.count.value && (a.H ? a.L.W(a.H) : a.u.i.W(a.o));
1382
1382
  }
1383
- function tc(a, b, c) {
1383
+ function sc(a, b, c) {
1384
1384
  if (b === c) {
1385
1385
  return a;
1386
1386
  }
1387
1387
  if (void 0 === c.A) {
1388
1388
  return null;
1389
1389
  }
1390
- a = tc(a, b, c.A);
1390
+ a = sc(a, b, c.A);
1391
1391
  return null === a ? null : c.Jb(a);
1392
1392
  }
1393
- var uc = {};
1394
- function vc(a, b) {
1395
- b = kc(a, b);
1396
- return jc[b];
1393
+ var tc = {};
1394
+ function uc(a, b) {
1395
+ b = jc(a, b);
1396
+ return ic[b];
1397
1397
  }
1398
- var wc = void 0;
1399
- function xc(a) {
1400
- throw new wc(a);
1398
+ var vc = void 0;
1399
+ function wc(a) {
1400
+ throw new vc(a);
1401
1401
  }
1402
- function yc(a, b) {
1403
- b.u && b.o || xc("makeClassHandle requires ptr and ptrType");
1404
- !!b.L !== !!b.H && xc("Both smartPtrType and smartPtr must be specified");
1402
+ function xc(a, b) {
1403
+ b.u && b.o || wc("makeClassHandle requires ptr and ptrType");
1404
+ !!b.L !== !!b.H && wc("Both smartPtrType and smartPtr must be specified");
1405
1405
  b.count = {value:1};
1406
- return zc(Object.create(a, {g:{value:b,},}));
1406
+ return yc(Object.create(a, {g:{value:b,},}));
1407
1407
  }
1408
- function zc(a) {
1408
+ function yc(a) {
1409
1409
  if ("undefined" === typeof FinalizationRegistry) {
1410
- return zc = b => b, a;
1410
+ return yc = b => b, a;
1411
1411
  }
1412
- rc = new FinalizationRegistry(b => {
1413
- sc(b.g);
1412
+ qc = new FinalizationRegistry(b => {
1413
+ rc(b.g);
1414
1414
  });
1415
- zc = b => {
1415
+ yc = b => {
1416
1416
  var c = b.g;
1417
- c.H && rc.register(b, {g:c}, b);
1417
+ c.H && qc.register(b, {g:c}, b);
1418
1418
  return b;
1419
1419
  };
1420
- qc = b => {
1421
- rc.unregister(b);
1420
+ pc = b => {
1421
+ qc.unregister(b);
1422
1422
  };
1423
- return zc(a);
1423
+ return yc(a);
1424
1424
  }
1425
- var Ac = {};
1426
- function Bc(a) {
1425
+ var zc = {};
1426
+ function Ac(a) {
1427
1427
  for (; a.length;) {
1428
1428
  var b = a.pop();
1429
1429
  a.pop()(b);
1430
1430
  }
1431
1431
  }
1432
- function Cc(a) {
1432
+ function Bc(a) {
1433
1433
  return this.fromWireType(J[a >> 2]);
1434
1434
  }
1435
- var Dc = {}, Ec = {};
1436
- function U(a, b, c) {
1435
+ var Cc = {}, Dc = {};
1436
+ function V(a, b, c) {
1437
1437
  function d(l) {
1438
1438
  l = c(l);
1439
- l.length !== a.length && xc("Mismatched type converter count");
1439
+ l.length !== a.length && wc("Mismatched type converter count");
1440
1440
  for (var p = 0; p < a.length; ++p) {
1441
- V(a[p], l[p]);
1441
+ W(a[p], l[p]);
1442
1442
  }
1443
1443
  }
1444
1444
  a.forEach(function(l) {
1445
- Ec[l] = b;
1445
+ Dc[l] = b;
1446
1446
  });
1447
1447
  var e = Array(b.length), f = [], g = 0;
1448
1448
  b.forEach((l, p) => {
1449
- lc.hasOwnProperty(l) ? e[p] = lc[l] : (f.push(l), Dc.hasOwnProperty(l) || (Dc[l] = []), Dc[l].push(() => {
1450
- e[p] = lc[l];
1449
+ kc.hasOwnProperty(l) ? e[p] = kc[l] : (f.push(l), Cc.hasOwnProperty(l) || (Cc[l] = []), Cc[l].push(() => {
1450
+ e[p] = kc[l];
1451
1451
  ++g;
1452
1452
  g === f.length && d(e);
1453
1453
  }));
1454
1454
  });
1455
1455
  0 === f.length && d(e);
1456
1456
  }
1457
- function Fc(a) {
1457
+ function Ec(a) {
1458
1458
  switch(a) {
1459
1459
  case 1:
1460
1460
  return 0;
@@ -1468,31 +1468,31 @@ function Fc(a) {
1468
1468
  throw new TypeError(`Unknown type size: ${a}`);
1469
1469
  }
1470
1470
  }
1471
- function Gc(a, b, c = {}) {
1471
+ function Fc(a, b, c = {}) {
1472
1472
  var d = b.name;
1473
1473
  a || R(`type "${d}" must have a positive integer typeid pointer`);
1474
- if (lc.hasOwnProperty(a)) {
1474
+ if (kc.hasOwnProperty(a)) {
1475
1475
  if (c.Ub) {
1476
1476
  return;
1477
1477
  }
1478
1478
  R(`Cannot register type '${d}' twice`);
1479
1479
  }
1480
- lc[a] = b;
1481
- delete Ec[a];
1482
- Dc.hasOwnProperty(a) && (b = Dc[a], delete Dc[a], b.forEach(e => e()));
1480
+ kc[a] = b;
1481
+ delete Dc[a];
1482
+ Cc.hasOwnProperty(a) && (b = Cc[a], delete Cc[a], b.forEach(e => e()));
1483
1483
  }
1484
- function V(a, b, c = {}) {
1484
+ function W(a, b, c = {}) {
1485
1485
  if (!("argPackAdvance" in b)) {
1486
1486
  throw new TypeError("registerType registeredInstance requires argPackAdvance");
1487
1487
  }
1488
- Gc(a, b, c);
1488
+ Fc(a, b, c);
1489
1489
  }
1490
- function Hc(a) {
1490
+ function Gc(a) {
1491
1491
  R(a.g.u.i.name + " instance already deleted");
1492
1492
  }
1493
- function Ic() {
1493
+ function Hc() {
1494
1494
  }
1495
- function Jc(a, b, c) {
1495
+ function Ic(a, b, c) {
1496
1496
  if (void 0 === a[b].B) {
1497
1497
  var d = a[b];
1498
1498
  a[b] = function() {
@@ -1503,10 +1503,10 @@ function Jc(a, b, c) {
1503
1503
  a[b].B[d.ga] = d;
1504
1504
  }
1505
1505
  }
1506
- function Kc(a, b, c) {
1507
- k.hasOwnProperty(a) ? ((void 0 === c || void 0 !== k[a].B && void 0 !== k[a].B[c]) && R(`Cannot register public name '${a}' twice`), Jc(k, a, a), k.hasOwnProperty(c) && R(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`), k[a].B[c] = b) : (k[a] = b, void 0 !== c && (k[a].Mc = c));
1506
+ function Jc(a, b, c) {
1507
+ k.hasOwnProperty(a) ? ((void 0 === c || void 0 !== k[a].B && void 0 !== k[a].B[c]) && R(`Cannot register public name '${a}' twice`), Ic(k, a, a), k.hasOwnProperty(c) && R(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`), k[a].B[c] = b) : (k[a] = b, void 0 !== c && (k[a].Mc = c));
1508
1508
  }
1509
- function Lc(a, b, c, d, e, f, g, l) {
1509
+ function Kc(a, b, c, d, e, f, g, l) {
1510
1510
  this.name = a;
1511
1511
  this.constructor = b;
1512
1512
  this.N = c;
@@ -1517,21 +1517,21 @@ function Lc(a, b, c, d, e, f, g, l) {
1517
1517
  this.Jb = l;
1518
1518
  this.mb = [];
1519
1519
  }
1520
- function Mc(a, b, c) {
1520
+ function Lc(a, b, c) {
1521
1521
  for (; b !== c;) {
1522
1522
  b.pa || R(`Expected null or instance of ${c.name}, got an instance of ${b.name}`), a = b.pa(a), b = b.A;
1523
1523
  }
1524
1524
  return a;
1525
1525
  }
1526
- function Nc(a, b) {
1526
+ function Mc(a, b) {
1527
1527
  if (null === b) {
1528
1528
  return this.Pa && R(`null is not a valid ${this.name}`), 0;
1529
1529
  }
1530
- b.g || R(`Cannot pass "${Oc(b)}" as a ${this.name}`);
1530
+ b.g || R(`Cannot pass "${Nc(b)}" as a ${this.name}`);
1531
1531
  b.g.o || R(`Cannot pass deleted object as a pointer of type ${this.name}`);
1532
- return Mc(b.g.o, b.g.u.i, this.i);
1532
+ return Lc(b.g.o, b.g.u.i, this.i);
1533
1533
  }
1534
- function Pc(a, b) {
1534
+ function Oc(a, b) {
1535
1535
  if (null === b) {
1536
1536
  this.Pa && R(`null is not a valid ${this.name}`);
1537
1537
  if (this.ya) {
@@ -1541,10 +1541,10 @@ function Pc(a, b) {
1541
1541
  }
1542
1542
  return 0;
1543
1543
  }
1544
- b.g || R(`Cannot pass "${Oc(b)}" as a ${this.name}`);
1544
+ b.g || R(`Cannot pass "${Nc(b)}" as a ${this.name}`);
1545
1545
  b.g.o || R(`Cannot pass deleted object as a pointer of type ${this.name}`);
1546
1546
  !this.xa && b.g.u.xa && R(`Cannot convert argument of type ${b.g.L ? b.g.L.name : b.g.u.name} to parameter type ${this.name}`);
1547
- c = Mc(b.g.o, b.g.u.i, this.i);
1547
+ c = Lc(b.g.o, b.g.u.i, this.i);
1548
1548
  if (this.ya) {
1549
1549
  switch(void 0 === b.g.H && R("Passing raw pointer to smart pointer is illegal"), this.jc) {
1550
1550
  case 0:
@@ -1558,7 +1558,7 @@ function Pc(a, b) {
1558
1558
  c = b.g.H;
1559
1559
  } else {
1560
1560
  var d = b.clone();
1561
- c = this.dc(c, cc(function() {
1561
+ c = this.dc(c, T(function() {
1562
1562
  d["delete"]();
1563
1563
  }));
1564
1564
  null !== a && a.push(this.W, c);
@@ -1570,33 +1570,33 @@ function Pc(a, b) {
1570
1570
  }
1571
1571
  return c;
1572
1572
  }
1573
- function Qc(a, b) {
1573
+ function Pc(a, b) {
1574
1574
  if (null === b) {
1575
1575
  return this.Pa && R(`null is not a valid ${this.name}`), 0;
1576
1576
  }
1577
- b.g || R(`Cannot pass "${Oc(b)}" as a ${this.name}`);
1577
+ b.g || R(`Cannot pass "${Nc(b)}" as a ${this.name}`);
1578
1578
  b.g.o || R(`Cannot pass deleted object as a pointer of type ${this.name}`);
1579
1579
  b.g.u.xa && R(`Cannot convert argument of type ${b.g.u.name} to parameter type ${this.name}`);
1580
- return Mc(b.g.o, b.g.u.i, this.i);
1580
+ return Lc(b.g.o, b.g.u.i, this.i);
1581
1581
  }
1582
- function Rc(a, b, c, d) {
1582
+ function Qc(a, b, c, d) {
1583
1583
  this.name = a;
1584
1584
  this.i = b;
1585
1585
  this.Pa = c;
1586
1586
  this.xa = d;
1587
1587
  this.ya = !1;
1588
1588
  this.W = this.dc = this.Ra = this.ob = this.jc = this.cc = void 0;
1589
- void 0 !== b.A ? this.toWireType = Pc : (this.toWireType = d ? Nc : Qc, this.K = null);
1589
+ void 0 !== b.A ? this.toWireType = Oc : (this.toWireType = d ? Mc : Pc, this.K = null);
1590
1590
  }
1591
- function Sc(a, b, c) {
1592
- k.hasOwnProperty(a) || xc("Replacing nonexistant public symbol");
1591
+ function Rc(a, b, c) {
1592
+ k.hasOwnProperty(a) || wc("Replacing nonexistant public symbol");
1593
1593
  void 0 !== k[a].B && void 0 !== c ? k[a].B[c] = b : (k[a] = b, k[a].ga = c);
1594
1594
  }
1595
- var Tc = [], Uc = a => {
1596
- var b = Tc[a];
1597
- b || (a >= Tc.length && (Tc.length = a + 1), Tc[a] = b = Aa.get(a));
1595
+ var Sc = [], Tc = a => {
1596
+ var b = Sc[a];
1597
+ b || (a >= Sc.length && (Sc.length = a + 1), Sc[a] = b = Aa.get(a));
1598
1598
  return b;
1599
- }, Vc = (a, b) => {
1599
+ }, Uc = (a, b) => {
1600
1600
  var c = [];
1601
1601
  return function() {
1602
1602
  c.length = 0;
@@ -1605,27 +1605,27 @@ var Tc = [], Uc = a => {
1605
1605
  var d = k["dynCall_" + a];
1606
1606
  d = c && c.length ? d.apply(null, [b].concat(c)) : d.call(null, b);
1607
1607
  } else {
1608
- d = Uc(b).apply(null, c);
1608
+ d = Tc(b).apply(null, c);
1609
1609
  }
1610
1610
  return d;
1611
1611
  };
1612
1612
  };
1613
- function W(a, b) {
1614
- a = T(a);
1615
- var c = a.includes("j") ? Vc(a, b) : Uc(b);
1613
+ function X(a, b) {
1614
+ a = U(a);
1615
+ var c = a.includes("j") ? Uc(a, b) : Tc(b);
1616
1616
  "function" != typeof c && R(`unknown function pointer with signature ${a}: ${b}`);
1617
1617
  return c;
1618
1618
  }
1619
- var Wc = void 0;
1620
- function Xc(a, b) {
1619
+ var Vc = void 0;
1620
+ function Wc(a, b) {
1621
1621
  function c(f) {
1622
- e[f] || lc[f] || (Ec[f] ? Ec[f].forEach(c) : (d.push(f), e[f] = !0));
1622
+ e[f] || kc[f] || (Dc[f] ? Dc[f].forEach(c) : (d.push(f), e[f] = !0));
1623
1623
  }
1624
1624
  var d = [], e = {};
1625
1625
  b.forEach(c);
1626
- throw new Wc(`${a}: ` + d.map(mc).join([", "]));
1626
+ throw new Vc(`${a}: ` + d.map(lc).join([", "]));
1627
1627
  }
1628
- function Yc(a, b, c, d, e) {
1628
+ function Xc(a, b, c, d, e) {
1629
1629
  var f = b.length;
1630
1630
  2 > f && R("argTypes array size mismatch! Must at least get return value and 'this' types!");
1631
1631
  var g = null !== b[1] && null !== c, l = !1;
@@ -1650,7 +1650,7 @@ function Yc(a, b, c, d, e) {
1650
1650
  }
1651
1651
  q = d.apply(null, v);
1652
1652
  if (l) {
1653
- Bc(x);
1653
+ Ac(x);
1654
1654
  } else {
1655
1655
  for (var u = g ? 1 : 2; u < b.length; u++) {
1656
1656
  var y = 1 === u ? n : t[u - 2];
@@ -1661,22 +1661,22 @@ function Yc(a, b, c, d, e) {
1661
1661
  return n;
1662
1662
  };
1663
1663
  }
1664
- function Zc(a, b) {
1664
+ function Yc(a, b) {
1665
1665
  for (var c = [], d = 0; d < a; d++) {
1666
1666
  c.push(K[b + 4 * d >> 2]);
1667
1667
  }
1668
1668
  return c;
1669
1669
  }
1670
- function $c(a, b, c) {
1670
+ function Zc(a, b, c) {
1671
1671
  a instanceof Object || R(`${c} with invalid "this": ${a}`);
1672
1672
  a instanceof b.i.constructor || R(`${c} incompatible with "this" of type ${a.constructor.name}`);
1673
1673
  a.g.o || R(`cannot call emscripten binding method ${c} on deleted object`);
1674
- return Mc(a.g.o, a.g.u.i, b.i);
1674
+ return Lc(a.g.o, a.g.u.i, b.i);
1675
1675
  }
1676
- function ad(a) {
1676
+ function $c(a) {
1677
1677
  a >= Q.h && 0 === --Q.get(a).qb && Q.Tb(a);
1678
1678
  }
1679
- function bd(a, b, c) {
1679
+ function ad(a, b, c) {
1680
1680
  switch(b) {
1681
1681
  case 0:
1682
1682
  return function(d) {
@@ -1694,14 +1694,14 @@ function bd(a, b, c) {
1694
1694
  throw new TypeError("Unknown integer type: " + a);
1695
1695
  }
1696
1696
  }
1697
- function Oc(a) {
1697
+ function Nc(a) {
1698
1698
  if (null === a) {
1699
1699
  return "null";
1700
1700
  }
1701
1701
  var b = typeof a;
1702
1702
  return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
1703
1703
  }
1704
- function cd(a, b) {
1704
+ function bd(a, b) {
1705
1705
  switch(b) {
1706
1706
  case 2:
1707
1707
  return function(c) {
@@ -1715,7 +1715,7 @@ function cd(a, b) {
1715
1715
  throw new TypeError("Unknown float type: " + a);
1716
1716
  }
1717
1717
  }
1718
- function dd(a, b, c) {
1718
+ function cd(a, b, c) {
1719
1719
  switch(b) {
1720
1720
  case 0:
1721
1721
  return c ? function(d) {
@@ -1739,14 +1739,14 @@ function dd(a, b, c) {
1739
1739
  throw new TypeError("Unknown integer type: " + a);
1740
1740
  }
1741
1741
  }
1742
- var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, fd = (a, b) => {
1742
+ var dd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, ed = (a, b) => {
1743
1743
  var c = a >> 1;
1744
1744
  for (var d = c + b / 2; !(c >= d) && wa[c];) {
1745
1745
  ++c;
1746
1746
  }
1747
1747
  c <<= 1;
1748
- if (32 < c - a && ed) {
1749
- return ed.decode(F.subarray(a, c));
1748
+ if (32 < c - a && dd) {
1749
+ return dd.decode(F.subarray(a, c));
1750
1750
  }
1751
1751
  c = "";
1752
1752
  for (d = 0; !(d >= b / 2); ++d) {
@@ -1757,7 +1757,7 @@ var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
1757
1757
  c += String.fromCharCode(e);
1758
1758
  }
1759
1759
  return c;
1760
- }, gd = (a, b, c) => {
1760
+ }, fd = (a, b, c) => {
1761
1761
  void 0 === c && (c = 2147483647);
1762
1762
  if (2 > c) {
1763
1763
  return 0;
@@ -1770,7 +1770,7 @@ var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
1770
1770
  }
1771
1771
  H[b >> 1] = 0;
1772
1772
  return b - d;
1773
- }, hd = a => 2 * a.length, jd = (a, b) => {
1773
+ }, gd = a => 2 * a.length, hd = (a, b) => {
1774
1774
  for (var c = 0, d = ""; !(c >= b / 4);) {
1775
1775
  var e = J[a + 4 * c >> 2];
1776
1776
  if (0 == e) {
@@ -1780,7 +1780,7 @@ var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
1780
1780
  65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
1781
1781
  }
1782
1782
  return d;
1783
- }, kd = (a, b, c) => {
1783
+ }, jd = (a, b, c) => {
1784
1784
  void 0 === c && (c = 2147483647);
1785
1785
  if (4 > c) {
1786
1786
  return 0;
@@ -1801,43 +1801,43 @@ var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
1801
1801
  }
1802
1802
  J[b >> 2] = 0;
1803
1803
  return b - d;
1804
- }, ld = a => {
1804
+ }, kd = a => {
1805
1805
  for (var b = 0, c = 0; c < a.length; ++c) {
1806
1806
  var d = a.charCodeAt(c);
1807
1807
  55296 <= d && 57343 >= d && ++c;
1808
1808
  b += 4;
1809
1809
  }
1810
1810
  return b;
1811
- }, md = {};
1812
- function nd(a) {
1813
- var b = md[a];
1814
- return void 0 === b ? T(a) : b;
1811
+ }, ld = {};
1812
+ function md(a) {
1813
+ var b = ld[a];
1814
+ return void 0 === b ? U(a) : b;
1815
1815
  }
1816
- var od = [];
1817
- function pd(a) {
1818
- var b = od.length;
1819
- od.push(a);
1816
+ var nd = [];
1817
+ function od(a) {
1818
+ var b = nd.length;
1819
+ nd.push(a);
1820
1820
  return b;
1821
1821
  }
1822
- function qd(a, b) {
1822
+ function pd(a, b) {
1823
1823
  for (var c = Array(a), d = 0; d < a; ++d) {
1824
- c[d] = pc(K[b + 4 * d >> 2], "parameter " + d);
1824
+ c[d] = oc(K[b + 4 * d >> 2], "parameter " + d);
1825
1825
  }
1826
1826
  return c;
1827
1827
  }
1828
- var rd = [], sd = [];
1829
- function td(a) {
1828
+ var qd = [], rd = [];
1829
+ function sd(a) {
1830
1830
  a.Ac = a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");
1831
1831
  }
1832
- function ud(a) {
1832
+ function td(a) {
1833
1833
  a.Ic = a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");
1834
1834
  }
1835
- var vd = 1, wd = [], X = [], xd = [], yd = [], zd = [], Ad = [], Bd = [], w = [], Cd = {};
1835
+ var ud = 1, vd = [], wd = [], xd = [], yd = [], zd = [], Ad = [], Bd = [], w = [], Cd = {};
1836
1836
  function Y(a) {
1837
1837
  Dd || (Dd = a);
1838
1838
  }
1839
1839
  function Ed(a) {
1840
- for (var b = vd++, c = a.length; c < b; c++) {
1840
+ for (var b = ud++, c = a.length; c < b; c++) {
1841
1841
  a[c] = null;
1842
1842
  }
1843
1843
  return b;
@@ -1859,8 +1859,8 @@ function Fd(a) {
1859
1859
  if (!a.Vb) {
1860
1860
  a.Vb = !0;
1861
1861
  var b = a.D;
1862
+ sd(b);
1862
1863
  td(b);
1863
- ud(b);
1864
1864
  2 <= a.version && (b.$a = b.getExtension("EXT_disjoint_timer_query_webgl2"));
1865
1865
  if (2 > a.version || !b.$a) {
1866
1866
  b.$a = b.getExtension("EXT_disjoint_timer_query");
@@ -2183,34 +2183,34 @@ k.count_emval_handles = function() {
2183
2183
  }
2184
2184
  return a;
2185
2185
  };
2186
- ec = k.PureVirtualError = dc("PureVirtualError");
2186
+ dc = k.PureVirtualError = cc("PureVirtualError");
2187
2187
  for (var Ud = Array(256), Vd = 0; 256 > Vd; ++Vd) {
2188
2188
  Ud[Vd] = String.fromCharCode(Vd);
2189
2189
  }
2190
- fc = Ud;
2190
+ ec = Ud;
2191
2191
  k.getInheritedInstanceCount = function() {
2192
- return Object.keys(jc).length;
2192
+ return Object.keys(ic).length;
2193
2193
  };
2194
2194
  k.getLiveInheritedInstances = function() {
2195
2195
  var a = [], b;
2196
- for (b in jc) {
2197
- jc.hasOwnProperty(b) && a.push(jc[b]);
2196
+ for (b in ic) {
2197
+ ic.hasOwnProperty(b) && a.push(ic[b]);
2198
2198
  }
2199
2199
  return a;
2200
2200
  };
2201
- k.flushPendingDeletes = hc;
2201
+ k.flushPendingDeletes = gc;
2202
2202
  k.setDelayFunction = function(a) {
2203
- ic = a;
2204
- gc.length && ic && ic(hc);
2203
+ hc = a;
2204
+ fc.length && hc && hc(gc);
2205
2205
  };
2206
- wc = k.InternalError = class extends Error {
2206
+ vc = k.InternalError = class extends Error {
2207
2207
  constructor(a) {
2208
2208
  super(a);
2209
2209
  this.name = "InternalError";
2210
2210
  }
2211
2211
  };
2212
- Ic.prototype.isAliasOf = function(a) {
2213
- if (!(this instanceof Ic && a instanceof Ic)) {
2212
+ Hc.prototype.isAliasOf = function(a) {
2213
+ if (!(this instanceof Hc && a instanceof Hc)) {
2214
2214
  return !1;
2215
2215
  }
2216
2216
  var b = this.g.u.i, c = this.g.o, d = a.g.u.i;
@@ -2222,58 +2222,58 @@ Ic.prototype.isAliasOf = function(a) {
2222
2222
  }
2223
2223
  return b === d && c === a;
2224
2224
  };
2225
- Ic.prototype.clone = function() {
2226
- this.g.o || Hc(this);
2225
+ Hc.prototype.clone = function() {
2226
+ this.g.o || Gc(this);
2227
2227
  if (this.g.ka) {
2228
2228
  return this.g.count.value += 1, this;
2229
2229
  }
2230
- var a = zc, b = Object, c = b.create, d = Object.getPrototypeOf(this), e = this.g;
2230
+ var a = yc, b = Object, c = b.create, d = Object.getPrototypeOf(this), e = this.g;
2231
2231
  a = a(c.call(b, d, {g:{value:{count:e.count, ha:e.ha, ka:e.ka, o:e.o, u:e.u, H:e.H, L:e.L,},}}));
2232
2232
  a.g.count.value += 1;
2233
2233
  a.g.ha = !1;
2234
2234
  return a;
2235
2235
  };
2236
- Ic.prototype["delete"] = function() {
2237
- this.g.o || Hc(this);
2236
+ Hc.prototype["delete"] = function() {
2237
+ this.g.o || Gc(this);
2238
2238
  this.g.ha && !this.g.ka && R("Object already scheduled for deletion");
2239
- qc(this);
2240
- sc(this.g);
2239
+ pc(this);
2240
+ rc(this.g);
2241
2241
  this.g.ka || (this.g.H = void 0, this.g.o = void 0);
2242
2242
  };
2243
- Ic.prototype.isDeleted = function() {
2243
+ Hc.prototype.isDeleted = function() {
2244
2244
  return !this.g.o;
2245
2245
  };
2246
- Ic.prototype.deleteLater = function() {
2247
- this.g.o || Hc(this);
2246
+ Hc.prototype.deleteLater = function() {
2247
+ this.g.o || Gc(this);
2248
2248
  this.g.ha && !this.g.ka && R("Object already scheduled for deletion");
2249
- gc.push(this);
2250
- 1 === gc.length && ic && ic(hc);
2249
+ fc.push(this);
2250
+ 1 === fc.length && hc && hc(gc);
2251
2251
  this.g.ha = !0;
2252
2252
  return this;
2253
2253
  };
2254
- Rc.prototype.Pb = function(a) {
2254
+ Qc.prototype.Pb = function(a) {
2255
2255
  this.ob && (a = this.ob(a));
2256
2256
  return a;
2257
2257
  };
2258
- Rc.prototype.Za = function(a) {
2258
+ Qc.prototype.Za = function(a) {
2259
2259
  this.W && this.W(a);
2260
2260
  };
2261
- Rc.prototype.argPackAdvance = 8;
2262
- Rc.prototype.readValueFromPointer = Cc;
2263
- Rc.prototype.deleteObject = function(a) {
2261
+ Qc.prototype.argPackAdvance = 8;
2262
+ Qc.prototype.readValueFromPointer = Bc;
2263
+ Qc.prototype.deleteObject = function(a) {
2264
2264
  if (null !== a) {
2265
2265
  a["delete"]();
2266
2266
  }
2267
2267
  };
2268
- Rc.prototype.fromWireType = function(a) {
2268
+ Qc.prototype.fromWireType = function(a) {
2269
2269
  function b() {
2270
- return this.ya ? yc(this.i.N, {u:this.cc, o:c, L:this, H:a,}) : yc(this.i.N, {u:this, o:a,});
2270
+ return this.ya ? xc(this.i.N, {u:this.cc, o:c, L:this, H:a,}) : xc(this.i.N, {u:this, o:a,});
2271
2271
  }
2272
2272
  var c = this.Pb(a);
2273
2273
  if (!c) {
2274
2274
  return this.Za(a), null;
2275
2275
  }
2276
- var d = vc(this.i, c);
2276
+ var d = uc(this.i, c);
2277
2277
  if (void 0 !== d) {
2278
2278
  if (0 === d.g.count.value) {
2279
2279
  return d.g.o = c, d.g.H = a, d.clone();
@@ -2283,15 +2283,15 @@ Rc.prototype.fromWireType = function(a) {
2283
2283
  return d;
2284
2284
  }
2285
2285
  d = this.i.Ob(c);
2286
- d = uc[d];
2286
+ d = tc[d];
2287
2287
  if (!d) {
2288
2288
  return b.call(this);
2289
2289
  }
2290
2290
  d = this.xa ? d.Gb : d.pointerType;
2291
- var e = tc(c, this.i, d.i);
2292
- return null === e ? b.call(this) : this.ya ? yc(d.i.N, {u:d, o:e, L:this, H:a,}) : yc(d.i.N, {u:d, o:e,});
2291
+ var e = sc(c, this.i, d.i);
2292
+ return null === e ? b.call(this) : this.ya ? xc(d.i.N, {u:d, o:e, L:this, H:a,}) : xc(d.i.N, {u:d, o:e,});
2293
2293
  };
2294
- Wc = k.UnboundTypeError = dc("UnboundTypeError");
2294
+ Vc = k.UnboundTypeError = cc("UnboundTypeError");
2295
2295
  for (var Z, Wd = 0; 32 > Wd; ++Wd) {
2296
2296
  Kd.push(Array(Wd));
2297
2297
  }
@@ -2424,14 +2424,14 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2424
2424
  return -l.aa;
2425
2425
  }
2426
2426
  }, _embind_create_inheriting_constructor:function(a, b, c) {
2427
- a = T(a);
2428
- b = pc(b, "wrapper");
2427
+ a = U(a);
2428
+ b = oc(b, "wrapper");
2429
2429
  c = S(c);
2430
2430
  var d = [].slice, e = b.i, f = e.N, g = e.A.N, l = e.A.constructor;
2431
2431
  a = $b(a, function() {
2432
2432
  e.A.mb.forEach(function(m) {
2433
2433
  if (this[m] === g[m]) {
2434
- throw new ec(`Pure virtual function ${m} must be implemented in JavaScript`);
2434
+ throw new dc(`Pure virtual function ${m} must be implemented in JavaScript`);
2435
2435
  }
2436
2436
  }.bind(this));
2437
2437
  Object.defineProperty(this, "__parent", {value:f});
@@ -2440,40 +2440,40 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2440
2440
  f.__construct = function() {
2441
2441
  this === f && R("Pass correct 'this' to __construct");
2442
2442
  var m = l.implement.apply(void 0, [this].concat(d.call(arguments)));
2443
- qc(m);
2443
+ pc(m);
2444
2444
  var t = m.g;
2445
2445
  m.notifyOnDestruction();
2446
2446
  t.ka = !0;
2447
2447
  Object.defineProperties(this, {g:{value:t}});
2448
- zc(this);
2448
+ yc(this);
2449
2449
  m = t.o;
2450
- m = kc(e, m);
2451
- jc.hasOwnProperty(m) ? R(`Tried to register registered instance: ${m}`) : jc[m] = this;
2450
+ m = jc(e, m);
2451
+ ic.hasOwnProperty(m) ? R(`Tried to register registered instance: ${m}`) : ic[m] = this;
2452
2452
  };
2453
2453
  f.__destruct = function() {
2454
2454
  this === f && R("Pass correct 'this' to __destruct");
2455
- qc(this);
2455
+ pc(this);
2456
2456
  var m = this.g.o;
2457
- m = kc(e, m);
2458
- jc.hasOwnProperty(m) ? delete jc[m] : R(`Tried to unregister unregistered instance: ${m}`);
2457
+ m = jc(e, m);
2458
+ ic.hasOwnProperty(m) ? delete ic[m] : R(`Tried to unregister unregistered instance: ${m}`);
2459
2459
  };
2460
2460
  a.prototype = Object.create(f);
2461
2461
  for (var p in c) {
2462
2462
  a.prototype[p] = c[p];
2463
2463
  }
2464
- return cc(a);
2464
+ return T(a);
2465
2465
  }, _embind_finalize_value_object:function(a) {
2466
- var b = Ac[a];
2467
- delete Ac[a];
2466
+ var b = zc[a];
2467
+ delete zc[a];
2468
2468
  var c = b.Ra, d = b.W, e = b.ab, f = e.map(g => g.Sb).concat(e.map(g => g.hc));
2469
- U([a], f, g => {
2469
+ V([a], f, g => {
2470
2470
  var l = {};
2471
2471
  e.forEach((p, m) => {
2472
2472
  var t = g[m], v = p.Qb, x = p.Rb, n = g[m + e.length], q = p.fc, u = p.ic;
2473
2473
  l[p.Mb] = {read:y => t.fromWireType(v(x, y)), write:(y, z) => {
2474
2474
  var A = [];
2475
2475
  q(u, y, n.toWireType(A, z));
2476
- Bc(A);
2476
+ Ac(A);
2477
2477
  }};
2478
2478
  });
2479
2479
  return [{name:b.name, fromWireType:function(p) {
@@ -2495,13 +2495,13 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2495
2495
  }
2496
2496
  null !== p && p.push(d, v);
2497
2497
  return v;
2498
- }, argPackAdvance:8, readValueFromPointer:Cc, K:d,}];
2498
+ }, argPackAdvance:8, readValueFromPointer:Bc, K:d,}];
2499
2499
  });
2500
2500
  }, _embind_register_bigint:function() {
2501
2501
  }, _embind_register_bool:function(a, b, c, d, e) {
2502
- var f = Fc(c);
2503
- b = T(b);
2504
- V(a, {name:b, fromWireType:function(g) {
2502
+ var f = Ec(c);
2503
+ b = U(b);
2504
+ W(a, {name:b, fromWireType:function(g) {
2505
2505
  return !!g;
2506
2506
  }, toWireType:function(g, l) {
2507
2507
  return l ? d : e;
@@ -2518,22 +2518,22 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2518
2518
  return this.fromWireType(l[g >> f]);
2519
2519
  }, K:null,});
2520
2520
  }, _embind_register_class:function(a, b, c, d, e, f, g, l, p, m, t, v, x) {
2521
- t = T(t);
2522
- f = W(e, f);
2523
- l && (l = W(g, l));
2524
- m && (m = W(p, m));
2525
- x = W(v, x);
2521
+ t = U(t);
2522
+ f = X(e, f);
2523
+ l && (l = X(g, l));
2524
+ m && (m = X(p, m));
2525
+ x = X(v, x);
2526
2526
  var n = Zb(t);
2527
- Kc(n, function() {
2528
- Xc(`Cannot construct ${t} due to unbound types`, [d]);
2527
+ Jc(n, function() {
2528
+ Wc(`Cannot construct ${t} due to unbound types`, [d]);
2529
2529
  });
2530
- U([a, b, c], d ? [d] : [], function(q) {
2530
+ V([a, b, c], d ? [d] : [], function(q) {
2531
2531
  q = q[0];
2532
2532
  if (d) {
2533
2533
  var u = q.i;
2534
2534
  var y = u.N;
2535
2535
  } else {
2536
- y = Ic.prototype;
2536
+ y = Hc.prototype;
2537
2537
  }
2538
2538
  q = $b(n, function() {
2539
2539
  if (Object.getPrototypeOf(this) !== z) {
@@ -2550,30 +2550,30 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2550
2550
  });
2551
2551
  var z = Object.create(y, {constructor:{value:q},});
2552
2552
  q.prototype = z;
2553
- var A = new Lc(t, q, z, x, u, f, l, m);
2553
+ var A = new Kc(t, q, z, x, u, f, l, m);
2554
2554
  A.A && (void 0 === A.A.qa && (A.A.qa = []), A.A.qa.push(A));
2555
- u = new Rc(t, A, !0, !1);
2556
- y = new Rc(t + "*", A, !1, !1);
2557
- var G = new Rc(t + " const*", A, !1, !0);
2558
- uc[a] = {pointerType:y, Gb:G};
2559
- Sc(n, q);
2555
+ u = new Qc(t, A, !0, !1);
2556
+ y = new Qc(t + "*", A, !1, !1);
2557
+ var G = new Qc(t + " const*", A, !1, !0);
2558
+ tc[a] = {pointerType:y, Gb:G};
2559
+ Rc(n, q);
2560
2560
  return [u, y, G];
2561
2561
  });
2562
2562
  }, _embind_register_class_class_function:function(a, b, c, d, e, f, g) {
2563
- var l = Zc(c, d);
2564
- b = T(b);
2565
- f = W(e, f);
2566
- U([], [a], function(p) {
2563
+ var l = Yc(c, d);
2564
+ b = U(b);
2565
+ f = X(e, f);
2566
+ V([], [a], function(p) {
2567
2567
  function m() {
2568
- Xc(`Cannot call ${t} due to unbound types`, l);
2568
+ Wc(`Cannot call ${t} due to unbound types`, l);
2569
2569
  }
2570
2570
  p = p[0];
2571
2571
  var t = `${p.name}.${b}`;
2572
2572
  b.startsWith("@@") && (b = Symbol[b.substring(2)]);
2573
2573
  var v = p.i.constructor;
2574
- void 0 === v[b] ? (m.ga = c - 1, v[b] = m) : (Jc(v, b, t), v[b].B[c - 1] = m);
2575
- U([], l, function(x) {
2576
- x = Yc(t, [x[0], null].concat(x.slice(1)), null, f, g);
2574
+ void 0 === v[b] ? (m.ga = c - 1, v[b] = m) : (Ic(v, b, t), v[b].B[c - 1] = m);
2575
+ V([], l, function(x) {
2576
+ x = Xc(t, [x[0], null].concat(x.slice(1)), null, f, g);
2577
2577
  void 0 === v[b].B ? (x.ga = c - 1, v[b] = x) : v[b].B[c - 1] = x;
2578
2578
  if (p.i.qa) {
2579
2579
  for (const n of p.i.qa) {
@@ -2585,28 +2585,28 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2585
2585
  return [];
2586
2586
  });
2587
2587
  }, _embind_register_class_class_property:function(a, b, c, d, e, f, g, l) {
2588
- b = T(b);
2589
- f = W(e, f);
2590
- U([], [a], function(p) {
2588
+ b = U(b);
2589
+ f = X(e, f);
2590
+ V([], [a], function(p) {
2591
2591
  p = p[0];
2592
2592
  var m = `${p.name}.${b}`, t = {get() {
2593
- Xc(`Cannot access ${m} due to unbound types`, [c]);
2593
+ Wc(`Cannot access ${m} due to unbound types`, [c]);
2594
2594
  }, enumerable:!0, configurable:!0};
2595
2595
  t.set = l ? () => {
2596
- Xc(`Cannot access ${m} due to unbound types`, [c]);
2596
+ Wc(`Cannot access ${m} due to unbound types`, [c]);
2597
2597
  } : () => {
2598
2598
  R(`${m} is a read-only property`);
2599
2599
  };
2600
2600
  Object.defineProperty(p.i.constructor, b, t);
2601
- U([], [c], function(v) {
2601
+ V([], [c], function(v) {
2602
2602
  v = v[0];
2603
2603
  var x = {get() {
2604
2604
  return v.fromWireType(f(d));
2605
2605
  }, enumerable:!0};
2606
- l && (l = W(g, l), x.set = n => {
2606
+ l && (l = X(g, l), x.set = n => {
2607
2607
  var q = [];
2608
2608
  l(d, v.toWireType(q, n));
2609
- Bc(q);
2609
+ Ac(q);
2610
2610
  });
2611
2611
  Object.defineProperty(p.i.constructor, b, x);
2612
2612
  return [];
@@ -2614,9 +2614,9 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2614
2614
  return [];
2615
2615
  });
2616
2616
  }, _embind_register_class_constructor:function(a, b, c, d, e, f) {
2617
- var g = Zc(b, c);
2618
- e = W(d, e);
2619
- U([], [a], function(l) {
2617
+ var g = Yc(b, c);
2618
+ e = X(d, e);
2619
+ V([], [a], function(l) {
2620
2620
  l = l[0];
2621
2621
  var p = `constructor ${l.name}`;
2622
2622
  void 0 === l.i.$ && (l.i.$ = []);
@@ -2624,62 +2624,62 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2624
2624
  throw new bc(`Cannot register multiple constructors with identical number of parameters (${b - 1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
2625
2625
  }
2626
2626
  l.i.$[b - 1] = () => {
2627
- Xc(`Cannot construct ${l.name} due to unbound types`, g);
2627
+ Wc(`Cannot construct ${l.name} due to unbound types`, g);
2628
2628
  };
2629
- U([], g, function(m) {
2629
+ V([], g, function(m) {
2630
2630
  m.splice(1, 0, null);
2631
- l.i.$[b - 1] = Yc(p, m, null, e, f);
2631
+ l.i.$[b - 1] = Xc(p, m, null, e, f);
2632
2632
  return [];
2633
2633
  });
2634
2634
  return [];
2635
2635
  });
2636
2636
  }, _embind_register_class_function:function(a, b, c, d, e, f, g, l) {
2637
- var p = Zc(c, d);
2638
- b = T(b);
2639
- f = W(e, f);
2640
- U([], [a], function(m) {
2637
+ var p = Yc(c, d);
2638
+ b = U(b);
2639
+ f = X(e, f);
2640
+ V([], [a], function(m) {
2641
2641
  function t() {
2642
- Xc(`Cannot call ${v} due to unbound types`, p);
2642
+ Wc(`Cannot call ${v} due to unbound types`, p);
2643
2643
  }
2644
2644
  m = m[0];
2645
2645
  var v = `${m.name}.${b}`;
2646
2646
  b.startsWith("@@") && (b = Symbol[b.substring(2)]);
2647
2647
  l && m.i.mb.push(b);
2648
2648
  var x = m.i.N, n = x[b];
2649
- void 0 === n || void 0 === n.B && n.className !== m.name && n.ga === c - 2 ? (t.ga = c - 2, t.className = m.name, x[b] = t) : (Jc(x, b, v), x[b].B[c - 2] = t);
2650
- U([], p, function(q) {
2651
- q = Yc(v, q, m, f, g);
2649
+ void 0 === n || void 0 === n.B && n.className !== m.name && n.ga === c - 2 ? (t.ga = c - 2, t.className = m.name, x[b] = t) : (Ic(x, b, v), x[b].B[c - 2] = t);
2650
+ V([], p, function(q) {
2651
+ q = Xc(v, q, m, f, g);
2652
2652
  void 0 === x[b].B ? (q.ga = c - 2, x[b] = q) : x[b].B[c - 2] = q;
2653
2653
  return [];
2654
2654
  });
2655
2655
  return [];
2656
2656
  });
2657
2657
  }, _embind_register_class_property:function(a, b, c, d, e, f, g, l, p, m) {
2658
- b = T(b);
2659
- e = W(d, e);
2660
- U([], [a], function(t) {
2658
+ b = U(b);
2659
+ e = X(d, e);
2660
+ V([], [a], function(t) {
2661
2661
  t = t[0];
2662
2662
  var v = `${t.name}.${b}`, x = {get() {
2663
- Xc(`Cannot access ${v} due to unbound types`, [c, g]);
2663
+ Wc(`Cannot access ${v} due to unbound types`, [c, g]);
2664
2664
  }, enumerable:!0, configurable:!0};
2665
2665
  x.set = p ? () => {
2666
- Xc(`Cannot access ${v} due to unbound types`, [c, g]);
2666
+ Wc(`Cannot access ${v} due to unbound types`, [c, g]);
2667
2667
  } : () => {
2668
2668
  R(v + " is a read-only property");
2669
2669
  };
2670
2670
  Object.defineProperty(t.i.N, b, x);
2671
- U([], p ? [c, g] : [c], function(n) {
2671
+ V([], p ? [c, g] : [c], function(n) {
2672
2672
  var q = n[0], u = {get() {
2673
- var z = $c(this, t, v + " getter");
2673
+ var z = Zc(this, t, v + " getter");
2674
2674
  return q.fromWireType(e(f, z));
2675
2675
  }, enumerable:!0};
2676
2676
  if (p) {
2677
- p = W(l, p);
2677
+ p = X(l, p);
2678
2678
  var y = n[1];
2679
2679
  u.set = function(z) {
2680
- var A = $c(this, t, v + " setter"), G = [];
2680
+ var A = Zc(this, t, v + " setter"), G = [];
2681
2681
  p(m, A, y.toWireType(G, z));
2682
- Bc(G);
2682
+ Ac(G);
2683
2683
  };
2684
2684
  }
2685
2685
  Object.defineProperty(t.i.N, b, u);
@@ -2688,57 +2688,57 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2688
2688
  return [];
2689
2689
  });
2690
2690
  }, _embind_register_emval:function(a, b) {
2691
- b = T(b);
2692
- V(a, {name:b, fromWireType:function(c) {
2691
+ b = U(b);
2692
+ W(a, {name:b, fromWireType:function(c) {
2693
2693
  var d = S(c);
2694
- ad(c);
2694
+ $c(c);
2695
2695
  return d;
2696
2696
  }, toWireType:function(c, d) {
2697
- return cc(d);
2698
- }, argPackAdvance:8, readValueFromPointer:Cc, K:null,});
2697
+ return T(d);
2698
+ }, argPackAdvance:8, readValueFromPointer:Bc, K:null,});
2699
2699
  }, _embind_register_enum:function(a, b, c, d) {
2700
2700
  function e() {
2701
2701
  }
2702
- c = Fc(c);
2703
- b = T(b);
2702
+ c = Ec(c);
2703
+ b = U(b);
2704
2704
  e.values = {};
2705
- V(a, {name:b, constructor:e, fromWireType:function(f) {
2705
+ W(a, {name:b, constructor:e, fromWireType:function(f) {
2706
2706
  return this.constructor.values[f];
2707
2707
  }, toWireType:function(f, g) {
2708
2708
  return g.value;
2709
- }, argPackAdvance:8, readValueFromPointer:bd(b, c, d), K:null,});
2710
- Kc(b, e);
2709
+ }, argPackAdvance:8, readValueFromPointer:ad(b, c, d), K:null,});
2710
+ Jc(b, e);
2711
2711
  }, _embind_register_enum_value:function(a, b, c) {
2712
- var d = pc(a, "enum");
2713
- b = T(b);
2712
+ var d = oc(a, "enum");
2713
+ b = U(b);
2714
2714
  a = d.constructor;
2715
2715
  d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:$b(`${d.name}_${b}`, function() {
2716
2716
  })},});
2717
2717
  a.values[c] = d;
2718
2718
  a[b] = d;
2719
2719
  }, _embind_register_float:function(a, b, c) {
2720
- c = Fc(c);
2721
- b = T(b);
2722
- V(a, {name:b, fromWireType:function(d) {
2720
+ c = Ec(c);
2721
+ b = U(b);
2722
+ W(a, {name:b, fromWireType:function(d) {
2723
2723
  return d;
2724
2724
  }, toWireType:function(d, e) {
2725
2725
  return e;
2726
- }, argPackAdvance:8, readValueFromPointer:cd(b, c), K:null,});
2726
+ }, argPackAdvance:8, readValueFromPointer:bd(b, c), K:null,});
2727
2727
  }, _embind_register_function:function(a, b, c, d, e, f) {
2728
- var g = Zc(b, c);
2729
- a = T(a);
2730
- e = W(d, e);
2731
- Kc(a, function() {
2732
- Xc(`Cannot call ${a} due to unbound types`, g);
2728
+ var g = Yc(b, c);
2729
+ a = U(a);
2730
+ e = X(d, e);
2731
+ Jc(a, function() {
2732
+ Wc(`Cannot call ${a} due to unbound types`, g);
2733
2733
  }, b - 1);
2734
- U([], g, function(l) {
2735
- Sc(a, Yc(a, [l[0], null].concat(l.slice(1)), null, e, f), b - 1);
2734
+ V([], g, function(l) {
2735
+ Rc(a, Xc(a, [l[0], null].concat(l.slice(1)), null, e, f), b - 1);
2736
2736
  return [];
2737
2737
  });
2738
2738
  }, _embind_register_integer:function(a, b, c, d, e) {
2739
- b = T(b);
2739
+ b = U(b);
2740
2740
  -1 === e && (e = 4294967295);
2741
- e = Fc(c);
2741
+ e = Ec(c);
2742
2742
  var f = l => l;
2743
2743
  if (0 === d) {
2744
2744
  var g = 32 - 8 * c;
@@ -2749,7 +2749,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2749
2749
  } : function(l, p) {
2750
2750
  return p;
2751
2751
  };
2752
- V(a, {name:b, fromWireType:f, toWireType:c, argPackAdvance:8, readValueFromPointer:dd(b, e, 0 !== d), K:null,});
2752
+ W(a, {name:b, fromWireType:f, toWireType:c, argPackAdvance:8, readValueFromPointer:cd(b, e, 0 !== d), K:null,});
2753
2753
  }, _embind_register_memory_view:function(a, b, c) {
2754
2754
  function d(f) {
2755
2755
  f >>= 2;
@@ -2757,12 +2757,12 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2757
2757
  return new e(g.buffer, g[f + 1], g[f]);
2758
2758
  }
2759
2759
  var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b];
2760
- c = T(c);
2761
- V(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Ub:!0,});
2760
+ c = U(c);
2761
+ W(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Ub:!0,});
2762
2762
  }, _embind_register_std_string:function(a, b) {
2763
- b = T(b);
2763
+ b = U(b);
2764
2764
  var c = "std::string" === b;
2765
- V(a, {name:b, fromWireType:function(d) {
2765
+ W(a, {name:b, fromWireType:function(d) {
2766
2766
  var e = K[d >> 2], f = d + 4;
2767
2767
  if (c) {
2768
2768
  for (var g = f, l = 0; l <= e; ++l) {
@@ -2784,7 +2784,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2784
2784
  }
2785
2785
  m = m.join("");
2786
2786
  }
2787
- oc(d);
2787
+ nc(d);
2788
2788
  return m;
2789
2789
  }, toWireType:function(d, e) {
2790
2790
  e instanceof ArrayBuffer && (e = new Uint8Array(e));
@@ -2799,7 +2799,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2799
2799
  if (f) {
2800
2800
  for (f = 0; f < g; ++f) {
2801
2801
  var m = e.charCodeAt(f);
2802
- 255 < m && (oc(p), R("String has UTF-16 code units that do not fit in 8 bits"));
2802
+ 255 < m && (nc(p), R("String has UTF-16 code units that do not fit in 8 bits"));
2803
2803
  F[p + f] = m;
2804
2804
  }
2805
2805
  } else {
@@ -2808,79 +2808,79 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2808
2808
  }
2809
2809
  }
2810
2810
  }
2811
- null !== d && d.push(oc, l);
2811
+ null !== d && d.push(nc, l);
2812
2812
  return l;
2813
- }, argPackAdvance:8, readValueFromPointer:Cc, K:function(d) {
2814
- oc(d);
2813
+ }, argPackAdvance:8, readValueFromPointer:Bc, K:function(d) {
2814
+ nc(d);
2815
2815
  },});
2816
2816
  }, _embind_register_std_wstring:function(a, b, c) {
2817
- c = T(c);
2817
+ c = U(c);
2818
2818
  if (2 === b) {
2819
- var d = fd;
2820
- var e = gd;
2821
- var f = hd;
2819
+ var d = ed;
2820
+ var e = fd;
2821
+ var f = gd;
2822
2822
  var g = () => wa;
2823
2823
  var l = 1;
2824
2824
  } else {
2825
- 4 === b && (d = jd, e = kd, f = ld, g = () => K, l = 2);
2825
+ 4 === b && (d = hd, e = jd, f = kd, g = () => K, l = 2);
2826
2826
  }
2827
- V(a, {name:c, fromWireType:function(p) {
2827
+ W(a, {name:c, fromWireType:function(p) {
2828
2828
  for (var m = K[p >> 2], t = g(), v, x = p + 4, n = 0; n <= m; ++n) {
2829
2829
  var q = p + 4 + n * b;
2830
2830
  if (n == m || 0 == t[q >> l]) {
2831
2831
  x = d(x, q - x), void 0 === v ? v = x : (v += String.fromCharCode(0), v += x), x = q + b;
2832
2832
  }
2833
2833
  }
2834
- oc(p);
2834
+ nc(p);
2835
2835
  return v;
2836
2836
  }, toWireType:function(p, m) {
2837
2837
  "string" != typeof m && R(`Cannot pass non-string to C++ string type ${c}`);
2838
2838
  var t = f(m), v = Nd(4 + t + b);
2839
2839
  K[v >> 2] = t >> l;
2840
2840
  e(m, v + 4, t + b);
2841
- null !== p && p.push(oc, v);
2841
+ null !== p && p.push(nc, v);
2842
2842
  return v;
2843
- }, argPackAdvance:8, readValueFromPointer:Cc, K:function(p) {
2844
- oc(p);
2843
+ }, argPackAdvance:8, readValueFromPointer:Bc, K:function(p) {
2844
+ nc(p);
2845
2845
  },});
2846
2846
  }, _embind_register_value_object:function(a, b, c, d, e, f) {
2847
- Ac[a] = {name:T(b), Ra:W(c, d), W:W(e, f), ab:[],};
2847
+ zc[a] = {name:U(b), Ra:X(c, d), W:X(e, f), ab:[],};
2848
2848
  }, _embind_register_value_object_field:function(a, b, c, d, e, f, g, l, p, m) {
2849
- Ac[a].ab.push({Mb:T(b), Sb:c, Qb:W(d, e), Rb:f, hc:g, fc:W(l, p), ic:m,});
2849
+ zc[a].ab.push({Mb:U(b), Sb:c, Qb:X(d, e), Rb:f, hc:g, fc:X(l, p), ic:m,});
2850
2850
  }, _embind_register_void:function(a, b) {
2851
- b = T(b);
2852
- V(a, {$b:!0, name:b, argPackAdvance:0, fromWireType:function() {
2851
+ b = U(b);
2852
+ W(a, {$b:!0, name:b, argPackAdvance:0, fromWireType:function() {
2853
2853
  }, toWireType:function() {
2854
2854
  },});
2855
2855
  }, _emscripten_get_now_is_monotonic:() => !0, _emval_as:function(a, b, c) {
2856
2856
  a = S(a);
2857
- b = pc(b, "emval::as");
2858
- var d = [], e = cc(d);
2857
+ b = oc(b, "emval::as");
2858
+ var d = [], e = T(d);
2859
2859
  K[c >> 2] = e;
2860
2860
  return b.toWireType(d, a);
2861
2861
  }, _emval_call_method:function(a, b, c, d, e) {
2862
- a = od[a];
2862
+ a = nd[a];
2863
2863
  b = S(b);
2864
- c = nd(c);
2864
+ c = md(c);
2865
2865
  var f = [];
2866
- K[d >> 2] = cc(f);
2866
+ K[d >> 2] = T(f);
2867
2867
  return a(b, c, f, e);
2868
2868
  }, _emval_call_void_method:function(a, b, c, d) {
2869
- a = od[a];
2869
+ a = nd[a];
2870
2870
  b = S(b);
2871
- c = nd(c);
2871
+ c = md(c);
2872
2872
  a(b, c, null, d);
2873
- }, _emval_decref:ad, _emval_get_method_caller:function(a, b) {
2874
- var c = qd(a, b), d = c[0];
2873
+ }, _emval_decref:$c, _emval_get_method_caller:function(a, b) {
2874
+ var c = pd(a, b), d = c[0];
2875
2875
  b = d.name + "_$" + c.slice(1).map(function(g) {
2876
2876
  return g.name;
2877
2877
  }).join("_") + "$";
2878
- var e = rd[b];
2878
+ var e = qd[b];
2879
2879
  if (void 0 !== e) {
2880
2880
  return e;
2881
2881
  }
2882
2882
  var f = Array(a - 1);
2883
- e = pd((g, l, p, m) => {
2883
+ e = od((g, l, p, m) => {
2884
2884
  for (var t = 0, v = 0; v < a - 1; ++v) {
2885
2885
  f[v] = c[v + 1].readValueFromPointer(m + t), t += c[v + 1].argPackAdvance;
2886
2886
  }
@@ -2892,30 +2892,32 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2892
2892
  return d.toWireType(p, g);
2893
2893
  }
2894
2894
  });
2895
- return rd[b] = e;
2895
+ return qd[b] = e;
2896
2896
  }, _emval_get_property:function(a, b) {
2897
2897
  a = S(a);
2898
2898
  b = S(b);
2899
- return cc(a[b]);
2899
+ return T(a[b]);
2900
2900
  }, _emval_incref:function(a) {
2901
2901
  4 < a && (Q.get(a).qb += 1);
2902
+ }, _emval_new_array:function() {
2903
+ return T([]);
2902
2904
  }, _emval_new_cstring:function(a) {
2903
- return cc(nd(a));
2905
+ return T(md(a));
2904
2906
  }, _emval_new_object:function() {
2905
- return cc({});
2907
+ return T({});
2906
2908
  }, _emval_run_destructors:function(a) {
2907
2909
  var b = S(a);
2908
- Bc(b);
2909
- ad(a);
2910
+ Ac(b);
2911
+ $c(a);
2910
2912
  }, _emval_set_property:function(a, b, c) {
2911
2913
  a = S(a);
2912
2914
  b = S(b);
2913
2915
  c = S(c);
2914
2916
  a[b] = c;
2915
2917
  }, _emval_take_value:function(a, b) {
2916
- a = pc(a, "_emval_take_value");
2918
+ a = oc(a, "_emval_take_value");
2917
2919
  a = a.readValueFromPointer(b);
2918
- return cc(a);
2920
+ return T(a);
2919
2921
  }, abort:() => {
2920
2922
  ta("");
2921
2923
  }, beginPixelLocalStorageWEBGL:function(a, b, c) {
@@ -2936,12 +2938,12 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2936
2938
  var b = k.images;
2937
2939
  b && b.get(a) && b.delete(a);
2938
2940
  }, emscripten_asm_const_int:(a, b, c) => {
2939
- sd.length = 0;
2941
+ rd.length = 0;
2940
2942
  var d;
2941
2943
  for (c >>= 2; d = F[b++];) {
2942
- c += 105 != d & c, sd.push(105 == d ? J[c] : ya[c++ >> 1]), ++c;
2944
+ c += 105 != d & c, rd.push(105 == d ? J[c] : ya[c++ >> 1]), ++c;
2943
2945
  }
2944
- return Ua[a].apply(null, sd);
2946
+ return Ua[a].apply(null, rd);
2945
2947
  }, emscripten_date_now:function() {
2946
2948
  return Date.now();
2947
2949
  }, emscripten_get_now:() => performance.now(), emscripten_memcpy_big:(a, b, c) => F.copyWithin(a, b, b + c), emscripten_resize_heap:a => {
@@ -2975,8 +2977,8 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
2975
2977
  a = w[a];
2976
2978
  b = b ? M(F, b) : "";
2977
2979
  b.startsWith("GL_") && (b = b.substr(3));
2978
- "WEBGL_draw_instanced_base_vertex_base_instance" == b && td(Z);
2979
- "WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && ud(Z);
2980
+ "WEBGL_draw_instanced_base_vertex_base_instance" == b && sd(Z);
2981
+ "WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && td(Z);
2980
2982
  "WEBGL_multi_draw" == b && Gd(Z);
2981
2983
  return !!a.D.getExtension(b);
2982
2984
  }, emscripten_webgl_get_current_context:function() {
@@ -3166,12 +3168,12 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3166
3168
  }, glActiveTexture:function(a) {
3167
3169
  Z.activeTexture(a);
3168
3170
  }, glAttachShader:function(a, b) {
3169
- Z.attachShader(X[a], Ad[b]);
3171
+ Z.attachShader(wd[a], Ad[b]);
3170
3172
  }, glBindBuffer:function(a, b) {
3171
3173
  35051 == a ? Z.Ya = b : 35052 == a && (Z.Ma = b);
3172
- Z.bindBuffer(a, wd[b]);
3174
+ Z.bindBuffer(a, vd[b]);
3173
3175
  }, glBindBufferRange:function(a, b, c, d, e) {
3174
- Z.bindBufferRange(a, b, wd[c], d, e);
3176
+ Z.bindBufferRange(a, b, vd[c], d, e);
3175
3177
  }, glBindFramebuffer:function(a, b) {
3176
3178
  Z.bindFramebuffer(a, xd[b]);
3177
3179
  }, glBindRenderbuffer:function(a, b) {
@@ -3203,11 +3205,11 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3203
3205
  }, glCompileShader:function(a) {
3204
3206
  Z.compileShader(Ad[a]);
3205
3207
  }, glCreateProgram:function() {
3206
- var a = Ed(X), b = Z.createProgram();
3208
+ var a = Ed(wd), b = Z.createProgram();
3207
3209
  b.name = a;
3208
3210
  b.Hc = b.Fc = b.Gc = 0;
3209
3211
  b.Ua = 1;
3210
- X[a] = b;
3212
+ wd[a] = b;
3211
3213
  return a;
3212
3214
  }, glCreateShader:function(a) {
3213
3215
  var b = Ed(Ad);
@@ -3217,8 +3219,8 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3217
3219
  Z.cullFace(a);
3218
3220
  }, glDeleteBuffers:function(a, b) {
3219
3221
  for (var c = 0; c < a; c++) {
3220
- var d = J[b + 4 * c >> 2], e = wd[d];
3221
- e && (Z.deleteBuffer(e), e.name = 0, wd[d] = null, d == Z.Ya && (Z.Ya = 0), d == Z.Ma && (Z.Ma = 0));
3222
+ var d = J[b + 4 * c >> 2], e = vd[d];
3223
+ e && (Z.deleteBuffer(e), e.name = 0, vd[d] = null, d == Z.Ya && (Z.Ya = 0), d == Z.Ma && (Z.Ma = 0));
3222
3224
  }
3223
3225
  }, glDeleteFramebuffers:function(a, b) {
3224
3226
  for (var c = 0; c < a; ++c) {
@@ -3227,8 +3229,8 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3227
3229
  }
3228
3230
  }, glDeleteProgram:function(a) {
3229
3231
  if (a) {
3230
- var b = X[a];
3231
- b ? (Z.deleteProgram(b), b.name = 0, X[a] = null) : Y(1281);
3232
+ var b = wd[a];
3233
+ b ? (Z.deleteProgram(b), b.name = 0, wd[a] = null) : Y(1281);
3232
3234
  }
3233
3235
  }, glDeleteRenderbuffers:function(a, b) {
3234
3236
  for (var c = 0; c < a; c++) {
@@ -3285,7 +3287,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3285
3287
  }, glFrontFace:function(a) {
3286
3288
  Z.frontFace(a);
3287
3289
  }, glGenBuffers:function(a, b) {
3288
- Ld(a, b, "createBuffer", wd);
3290
+ Ld(a, b, "createBuffer", vd);
3289
3291
  }, glGenFramebuffers:function(a, b) {
3290
3292
  Ld(a, b, "createFramebuffer", xd);
3291
3293
  }, glGenRenderbuffers:function(a, b) {
@@ -3332,10 +3334,10 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3332
3334
  }
3333
3335
  return b;
3334
3336
  }, glGetUniformBlockIndex:function(a, b) {
3335
- return Z.getUniformBlockIndex(X[a], b ? M(F, b) : "");
3337
+ return Z.getUniformBlockIndex(wd[a], b ? M(F, b) : "");
3336
3338
  }, glGetUniformLocation:function(a, b) {
3337
3339
  b = b ? M(F, b) : "";
3338
- if (a = X[a]) {
3340
+ if (a = wd[a]) {
3339
3341
  var c = a, d = c.oa, e = c.vb, f;
3340
3342
  if (!d) {
3341
3343
  for (c.oa = d = {}, c.ub = {}, f = 0; f < Z.getProgramParameter(c, 35718); ++f) {
@@ -3370,7 +3372,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3370
3372
  }
3371
3373
  Z.invalidateFramebuffer(a, d);
3372
3374
  }, glLinkProgram:function(a) {
3373
- a = X[a];
3375
+ a = wd[a];
3374
3376
  Z.linkProgram(a);
3375
3377
  a.oa = 0;
3376
3378
  a.vb = {};
@@ -3423,10 +3425,10 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3423
3425
  }
3424
3426
  d.call(c, a, b);
3425
3427
  }, glUniformBlockBinding:function(a, b, c) {
3426
- a = X[a];
3428
+ a = wd[a];
3427
3429
  Z.uniformBlockBinding(a, b, c);
3428
3430
  }, glUseProgram:function(a) {
3429
- a = X[a];
3431
+ a = wd[a];
3430
3432
  Z.useProgram(a);
3431
3433
  Z.Hb = a;
3432
3434
  }, glVertexAttribDivisor:function(a, b) {
@@ -3474,12 +3476,12 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
3474
3476
  }).catch(ca);
3475
3477
  return {};
3476
3478
  })();
3477
- var oc = a => (oc = C.free)(a), Nd = a => (Nd = C.malloc)(a);
3479
+ var nc = a => (nc = C.free)(a), Nd = a => (Nd = C.malloc)(a);
3478
3480
  k._setWebImage = (a, b, c) => (k._setWebImage = C.setWebImage)(a, b, c);
3479
3481
  var Ra = k._ma_device__on_notification_unlocked = a => (Ra = k._ma_device__on_notification_unlocked = C.ma_device__on_notification_unlocked)(a);
3480
3482
  k._ma_malloc_emscripten = (a, b) => (k._ma_malloc_emscripten = C.ma_malloc_emscripten)(a, b);
3481
3483
  k._ma_free_emscripten = (a, b) => (k._ma_free_emscripten = C.ma_free_emscripten)(a, b);
3482
- var Sa = k._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Sa = k._ma_device_process_pcm_frames_capture__webaudio = C.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Ta = k._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Ta = k._ma_device_process_pcm_frames_playback__webaudio = C.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Xd = () => (Xd = C.__errno_location)(), nc = a => (nc = C.__getTypeName)(a);
3484
+ var Sa = k._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Sa = k._ma_device_process_pcm_frames_capture__webaudio = C.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Ta = k._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Ta = k._ma_device_process_pcm_frames_playback__webaudio = C.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Xd = () => (Xd = C.__errno_location)(), mc = a => (mc = C.__getTypeName)(a);
3483
3485
  k.__embind_initialize_bindings = () => (k.__embind_initialize_bindings = C._embind_initialize_bindings)();
3484
3486
  k.dynCall_iiji = (a, b, c, d, e) => (k.dynCall_iiji = C.dynCall_iiji)(a, b, c, d, e);
3485
3487
  k.dynCall_iiiji = (a, b, c, d, e, f) => (k.dynCall_iiiji = C.dynCall_iiiji)(a, b, c, d, e, f);
@@ -3490,8 +3492,8 @@ k.dynCall_viijii = (a, b, c, d, e, f, g) => (k.dynCall_viijii = C.dynCall_viijii
3490
3492
  k.dynCall_iiiiij = (a, b, c, d, e, f, g) => (k.dynCall_iiiiij = C.dynCall_iiiiij)(a, b, c, d, e, f, g);
3491
3493
  k.dynCall_iiiiijj = (a, b, c, d, e, f, g, l, p) => (k.dynCall_iiiiijj = C.dynCall_iiiiijj)(a, b, c, d, e, f, g, l, p);
3492
3494
  k.dynCall_iiiiiijj = (a, b, c, d, e, f, g, l, p, m) => (k.dynCall_iiiiiijj = C.dynCall_iiiiiijj)(a, b, c, d, e, f, g, l, p, m);
3493
- k.___start_em_js = 505484;
3494
- k.___stop_em_js = 507918;
3495
+ k.___start_em_js = 507532;
3496
+ k.___stop_em_js = 509966;
3495
3497
  var Zd;
3496
3498
  Ha = function $d() {
3497
3499
  Zd || ae();
@@ -3503,7 +3505,7 @@ function ae() {
3503
3505
  k.noFSInit || Tb || (Tb = !0, Sb(), k.stdin = k.stdin, k.stdout = k.stdout, k.stderr = k.stderr, k.stdin ? Vb("stdin", k.stdin) : Ob("/dev/tty", "/dev/stdin"), k.stdout ? Vb("stdout", null, k.stdout) : Ob("/dev/tty", "/dev/stdout"), k.stderr ? Vb("stderr", null, k.stderr) : Ob("/dev/tty1", "/dev/stderr"), Qb("/dev/stdin", 0), Qb("/dev/stdout", 1), Qb("/dev/stderr", 1));
3504
3506
  zb = !1;
3505
3507
  Va(Ca);
3506
- ba(k);
3508
+ aa(k);
3507
3509
  if (k.onRuntimeInitialized) {
3508
3510
  k.onRuntimeInitialized();
3509
3511
  }
@@ -3551,7 +3553,7 @@ ae();
3551
3553
  /* 2 */
3552
3554
  /***/ ((module) => {
3553
3555
 
3554
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.26.4","description":"Rive\'s webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
3556
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.26.5","description":"Rive\'s webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
3555
3557
 
3556
3558
  /***/ }),
3557
3559
  /* 3 */
@@ -4010,6 +4012,7 @@ var __webpack_exports__ = {};
4010
4012
  __webpack_require__.r(__webpack_exports__);
4011
4013
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4012
4014
  /* harmony export */ Alignment: () => (/* binding */ Alignment),
4015
+ /* harmony export */ DataEnum: () => (/* binding */ DataEnum),
4013
4016
  /* harmony export */ EventType: () => (/* binding */ EventType),
4014
4017
  /* harmony export */ Fit: () => (/* binding */ Fit),
4015
4018
  /* harmony export */ Layout: () => (/* binding */ Layout),
@@ -4021,6 +4024,15 @@ __webpack_require__.r(__webpack_exports__);
4021
4024
  /* harmony export */ StateMachineInput: () => (/* binding */ StateMachineInput),
4022
4025
  /* harmony export */ StateMachineInputType: () => (/* binding */ StateMachineInputType),
4023
4026
  /* harmony export */ Testing: () => (/* binding */ Testing),
4027
+ /* harmony export */ ViewModel: () => (/* binding */ ViewModel),
4028
+ /* harmony export */ ViewModelInstance: () => (/* binding */ ViewModelInstance),
4029
+ /* harmony export */ ViewModelInstanceBoolean: () => (/* binding */ ViewModelInstanceBoolean),
4030
+ /* harmony export */ ViewModelInstanceColor: () => (/* binding */ ViewModelInstanceColor),
4031
+ /* harmony export */ ViewModelInstanceEnum: () => (/* binding */ ViewModelInstanceEnum),
4032
+ /* harmony export */ ViewModelInstanceNumber: () => (/* binding */ ViewModelInstanceNumber),
4033
+ /* harmony export */ ViewModelInstanceString: () => (/* binding */ ViewModelInstanceString),
4034
+ /* harmony export */ ViewModelInstanceTrigger: () => (/* binding */ ViewModelInstanceTrigger),
4035
+ /* harmony export */ ViewModelInstanceValue: () => (/* binding */ ViewModelInstanceValue),
4024
4036
  /* harmony export */ decodeAudio: () => (/* binding */ decodeAudio),
4025
4037
  /* harmony export */ decodeFont: () => (/* binding */ decodeFont),
4026
4038
  /* harmony export */ decodeImage: () => (/* binding */ decodeImage)
@@ -4044,6 +4056,17 @@ var __extends = (undefined && undefined.__extends) || (function () {
4044
4056
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4045
4057
  };
4046
4058
  })();
4059
+ var __assign = (undefined && undefined.__assign) || function () {
4060
+ __assign = Object.assign || function(t) {
4061
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4062
+ s = arguments[i];
4063
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
4064
+ t[p] = s[p];
4065
+ }
4066
+ return t;
4067
+ };
4068
+ return __assign.apply(this, arguments);
4069
+ };
4047
4070
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4048
4071
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4049
4072
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -4480,6 +4503,11 @@ var StateMachine = /** @class */ (function () {
4480
4503
  this.inputs.length = 0;
4481
4504
  this.instance.delete();
4482
4505
  };
4506
+ StateMachine.prototype.bindViewModelInstance = function (viewModelInstance) {
4507
+ if (viewModelInstance.runtimeInstance != null) {
4508
+ this.instance.bindViewModelInstance(viewModelInstance.runtimeInstance);
4509
+ }
4510
+ };
4483
4511
  return StateMachine;
4484
4512
  }());
4485
4513
  // #endregion
@@ -4626,6 +4654,9 @@ var Animator = /** @class */ (function () {
4626
4654
  if (sm) {
4627
4655
  var newStateMachine = new StateMachine(sm, this.runtime, playing, this.artboard);
4628
4656
  this.stateMachines.push(newStateMachine);
4657
+ if (!playing) {
4658
+ newStateMachine.advanceAndApply(0);
4659
+ }
4629
4660
  }
4630
4661
  else {
4631
4662
  // In order to maintain compatibility with current behavior, if a state machine is not found
@@ -5371,6 +5402,8 @@ var Rive = /** @class */ (function () {
5371
5402
  this._audioEventListener = null;
5372
5403
  // draw method bound to the class
5373
5404
  this._boundDraw = null;
5405
+ this._viewModelInstance = null;
5406
+ this._dataEnums = null;
5374
5407
  // Durations to generate a frame for the last second. Used for performance profiling.
5375
5408
  this.durations = [];
5376
5409
  this.frameTimes = [];
@@ -5456,6 +5489,7 @@ var Rive = /** @class */ (function () {
5456
5489
  buffer: this.buffer,
5457
5490
  riveFile: this.riveFile,
5458
5491
  autoplay: params.autoplay,
5492
+ autoBind: params.autoBind,
5459
5493
  animations: params.animations,
5460
5494
  stateMachines: params.stateMachines,
5461
5495
  artboard: params.artboard,
@@ -5474,7 +5508,7 @@ var Rive = /** @class */ (function () {
5474
5508
  // Initializes the Rive object either from constructor or load()
5475
5509
  Rive.prototype.init = function (_a) {
5476
5510
  var _this = this;
5477
- var src = _a.src, buffer = _a.buffer, riveFile = _a.riveFile, animations = _a.animations, stateMachines = _a.stateMachines, artboard = _a.artboard, _b = _a.autoplay, autoplay = _b === void 0 ? false : _b, _c = _a.useOffscreenRenderer, useOffscreenRenderer = _c === void 0 ? false : _c;
5511
+ var src = _a.src, buffer = _a.buffer, riveFile = _a.riveFile, animations = _a.animations, stateMachines = _a.stateMachines, artboard = _a.artboard, _b = _a.autoplay, autoplay = _b === void 0 ? false : _b, _c = _a.useOffscreenRenderer, useOffscreenRenderer = _c === void 0 ? false : _c, _d = _a.autoBind, autoBind = _d === void 0 ? false : _d;
5478
5512
  if (this.destroyed) {
5479
5513
  return;
5480
5514
  }
@@ -5509,7 +5543,7 @@ var Rive = /** @class */ (function () {
5509
5543
  _this.resizeDrawingSurfaceToCanvas();
5510
5544
  }
5511
5545
  // Load Rive data from a source uri or a data buffer
5512
- _this.initData(artboard, startingAnimationNames, startingStateMachineNames, autoplay)
5546
+ _this.initData(artboard, startingAnimationNames, startingStateMachineNames, autoplay, autoBind)
5513
5547
  .then(function () { return _this.setupRiveListeners(); })
5514
5548
  .catch(function (e) {
5515
5549
  console.error(e);
@@ -5590,7 +5624,7 @@ var Rive = /** @class */ (function () {
5590
5624
  this._artboardHeight || this.artboard.height;
5591
5625
  };
5592
5626
  // Initializes runtime with Rive data and preps for playing
5593
- Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay) {
5627
+ Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
5594
5628
  return __awaiter(this, void 0, void 0, function () {
5595
5629
  var error_1, msg;
5596
5630
  var _a;
@@ -5616,7 +5650,7 @@ var Rive = /** @class */ (function () {
5616
5650
  }
5617
5651
  this.file = this.riveFile.getInstance();
5618
5652
  // Initialize and draw frame
5619
- this.initArtboard(artboardName, animationNames, stateMachineNames, autoplay);
5653
+ this.initArtboard(artboardName, animationNames, stateMachineNames, autoplay, autoBind);
5620
5654
  // Initialize the artboard size
5621
5655
  this.initArtboardSize();
5622
5656
  // Check for audio
@@ -5645,7 +5679,7 @@ var Rive = /** @class */ (function () {
5645
5679
  });
5646
5680
  };
5647
5681
  // Initialize for playback
5648
- Rive.prototype.initArtboard = function (artboardName, animationNames, stateMachineNames, autoplay) {
5682
+ Rive.prototype.initArtboard = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
5649
5683
  if (!this.file) {
5650
5684
  return;
5651
5685
  }
@@ -5690,13 +5724,24 @@ var Rive = /** @class */ (function () {
5690
5724
  data: instanceNames,
5691
5725
  },
5692
5726
  });
5727
+ if (autoBind) {
5728
+ var viewModel = this.file.defaultArtboardViewModel(rootArtboard);
5729
+ if (viewModel !== null) {
5730
+ var runtimeInstance = viewModel.defaultInstance();
5731
+ if (runtimeInstance !== null) {
5732
+ var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
5733
+ this.bindViewModelInstance(viewModelInstance);
5734
+ }
5735
+ }
5736
+ }
5693
5737
  };
5694
5738
  // Draws the current artboard frame
5695
5739
  Rive.prototype.drawFrame = function () {
5696
- var _a;
5740
+ var _a, _b;
5697
5741
  if ((_a = document === null || document === void 0 ? void 0 : document.timeline) === null || _a === void 0 ? void 0 : _a.currentTime) {
5698
5742
  if (this.loaded && this.artboard && !this.frameRequestId) {
5699
5743
  this._boundDraw(document.timeline.currentTime);
5744
+ (_b = this.runtime) === null || _b === void 0 ? void 0 : _b.resolveAnimationFrame();
5700
5745
  }
5701
5746
  }
5702
5747
  else {
@@ -5708,6 +5753,7 @@ var Rive = /** @class */ (function () {
5708
5753
  * @param time the time at which to render a frame
5709
5754
  */
5710
5755
  Rive.prototype.draw = function (time, onSecond) {
5756
+ var _a;
5711
5757
  // Clear the frameRequestId, as we're now rendering a fresh frame
5712
5758
  this.frameRequestId = null;
5713
5759
  var before = performance.now();
@@ -5743,8 +5789,8 @@ var Rive = /** @class */ (function () {
5743
5789
  // - Advance non-paused state machines by the elapsed number of seconds
5744
5790
  // - Advance to the first frame even when autoplay is false
5745
5791
  var activeStateMachines = this.animator.stateMachines.filter(function (a) { return a.playing; });
5746
- for (var _a = 0, activeStateMachines_1 = activeStateMachines; _a < activeStateMachines_1.length; _a++) {
5747
- var stateMachine = activeStateMachines_1[_a];
5792
+ for (var _b = 0, activeStateMachines_1 = activeStateMachines; _b < activeStateMachines_1.length; _b++) {
5793
+ var stateMachine = activeStateMachines_1[_b];
5748
5794
  // Check for events before the current frame's state machine advance
5749
5795
  var numEventsReported = stateMachine.reportedEventCount();
5750
5796
  if (numEventsReported) {
@@ -5759,7 +5805,7 @@ var Rive = /** @class */ (function () {
5759
5805
  // Handle the event side effect if explicitly enabled
5760
5806
  if (this.automaticallyHandleEvents) {
5761
5807
  var newAnchorTag = document.createElement("a");
5762
- var _b = event_1, url = _b.url, target = _b.target;
5808
+ var _c = event_1, url = _c.url, target = _c.target;
5763
5809
  var sanitizedUrl = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.sanitizeUrl)(url);
5764
5810
  url && newAnchorTag.setAttribute("href", sanitizedUrl);
5765
5811
  target && newAnchorTag.setAttribute("target", target);
@@ -5812,6 +5858,7 @@ var Rive = /** @class */ (function () {
5812
5858
  this.frameTimes.shift();
5813
5859
  this.durations.shift();
5814
5860
  }
5861
+ (_a = this._viewModelInstance) === null || _a === void 0 ? void 0 : _a.handleCallbacks();
5815
5862
  // Calling requestAnimationFrame will rerun draw() at the correct rate:
5816
5863
  // https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations
5817
5864
  if (this.animator.isPlaying) {
@@ -5869,7 +5916,7 @@ var Rive = /** @class */ (function () {
5869
5916
  * Rive class
5870
5917
  */
5871
5918
  Rive.prototype.cleanup = function () {
5872
- var _a;
5919
+ var _a, _b;
5873
5920
  this.destroyed = true;
5874
5921
  // Stop the renderer if it hasn't already been stopped.
5875
5922
  this.stopRendering();
@@ -5890,6 +5937,9 @@ var Rive = /** @class */ (function () {
5890
5937
  audioManager.remove(this._audioEventListener);
5891
5938
  this._audioEventListener = null;
5892
5939
  }
5940
+ (_b = this._viewModelInstance) === null || _b === void 0 ? void 0 : _b.cleanup();
5941
+ this._viewModelInstance = null;
5942
+ this._dataEnums = null;
5893
5943
  };
5894
5944
  /**
5895
5945
  * Cleans up the Renderer object. Only call this API if you no longer
@@ -6041,16 +6091,17 @@ var Rive = /** @class */ (function () {
6041
6091
  *
6042
6092
  */
6043
6093
  Rive.prototype.reset = function (params) {
6044
- var _a;
6094
+ var _a, _b;
6045
6095
  // Get the current artboard, animations, state machines, and playback states
6046
6096
  var artBoardName = params === null || params === void 0 ? void 0 : params.artboard;
6047
6097
  var animationNames = mapToStringArray(params === null || params === void 0 ? void 0 : params.animations);
6048
6098
  var stateMachineNames = mapToStringArray(params === null || params === void 0 ? void 0 : params.stateMachines);
6049
6099
  var autoplay = (_a = params === null || params === void 0 ? void 0 : params.autoplay) !== null && _a !== void 0 ? _a : false;
6100
+ var autoBind = (_b = params === null || params === void 0 ? void 0 : params.autoBind) !== null && _b !== void 0 ? _b : false;
6050
6101
  // Stop everything and clean up
6051
6102
  this.cleanupInstances();
6052
6103
  // Reinitialize an artboard instance with the state
6053
- this.initArtboard(artBoardName, animationNames, stateMachineNames, autoplay);
6104
+ this.initArtboard(artBoardName, animationNames, stateMachineNames, autoplay, autoBind);
6054
6105
  this.taskQueue.process();
6055
6106
  };
6056
6107
  // Loads a new Rive file, keeping listeners in place
@@ -6673,6 +6724,62 @@ var Rive = /** @class */ (function () {
6673
6724
  enumerable: false,
6674
6725
  configurable: true
6675
6726
  });
6727
+ /**
6728
+ * Initialize the data context with the view model instance.
6729
+ */
6730
+ Rive.prototype.bindViewModelInstance = function (viewModelInstance) {
6731
+ var _a;
6732
+ if (this.artboard && !this.destroyed) {
6733
+ if (viewModelInstance && viewModelInstance.runtimeInstance) {
6734
+ viewModelInstance.internalIncrementReferenceCount();
6735
+ (_a = this._viewModelInstance) === null || _a === void 0 ? void 0 : _a.cleanup();
6736
+ this._viewModelInstance = viewModelInstance;
6737
+ this.artboard.bindViewModelInstance(viewModelInstance.runtimeInstance);
6738
+ this.animator.stateMachines.forEach(function (stateMachine) {
6739
+ return stateMachine.bindViewModelInstance(viewModelInstance);
6740
+ });
6741
+ }
6742
+ }
6743
+ };
6744
+ Object.defineProperty(Rive.prototype, "viewModelInstance", {
6745
+ get: function () {
6746
+ return this._viewModelInstance;
6747
+ },
6748
+ enumerable: false,
6749
+ configurable: true
6750
+ });
6751
+ Rive.prototype.viewModelByIndex = function (index) {
6752
+ var viewModel = this.file.viewModelByIndex(index);
6753
+ if (viewModel !== null) {
6754
+ return new ViewModel(viewModel);
6755
+ }
6756
+ return null;
6757
+ };
6758
+ Rive.prototype.viewModelByName = function (name) {
6759
+ var viewModel = this.file.viewModelByName(name);
6760
+ if (viewModel !== null) {
6761
+ return new ViewModel(viewModel);
6762
+ }
6763
+ return null;
6764
+ };
6765
+ Rive.prototype.enums = function () {
6766
+ if (this._dataEnums === null) {
6767
+ var dataEnums = this.file.enums();
6768
+ this._dataEnums = dataEnums.map(function (dataEnum) {
6769
+ return new DataEnum(dataEnum);
6770
+ });
6771
+ }
6772
+ return this._dataEnums;
6773
+ };
6774
+ Rive.prototype.defaultViewModel = function () {
6775
+ if (this.artboard) {
6776
+ var viewModel = this.file.defaultArtboardViewModel(this.artboard);
6777
+ if (viewModel) {
6778
+ return new ViewModel(viewModel);
6779
+ }
6780
+ }
6781
+ return null;
6782
+ };
6676
6783
  // Error message for missing source or buffer
6677
6784
  Rive.missingErrorMessage = "Rive source file or data buffer required";
6678
6785
  // Error message for removed rive file
@@ -6680,6 +6787,481 @@ var Rive = /** @class */ (function () {
6680
6787
  return Rive;
6681
6788
  }());
6682
6789
 
6790
+ var ViewModel = /** @class */ (function () {
6791
+ function ViewModel(viewModel) {
6792
+ this._viewModel = viewModel;
6793
+ }
6794
+ Object.defineProperty(ViewModel.prototype, "instanceCount", {
6795
+ get: function () {
6796
+ return this._viewModel.instanceCount;
6797
+ },
6798
+ enumerable: false,
6799
+ configurable: true
6800
+ });
6801
+ Object.defineProperty(ViewModel.prototype, "name", {
6802
+ get: function () {
6803
+ return this._viewModel.name;
6804
+ },
6805
+ enumerable: false,
6806
+ configurable: true
6807
+ });
6808
+ ViewModel.prototype.instanceByIndex = function (index) {
6809
+ var instance = this._viewModel.instanceByIndex(index);
6810
+ if (instance !== null) {
6811
+ return new ViewModelInstance(instance, null);
6812
+ }
6813
+ return null;
6814
+ };
6815
+ ViewModel.prototype.instanceByName = function (name) {
6816
+ var instance = this._viewModel.instanceByName(name);
6817
+ if (instance !== null) {
6818
+ return new ViewModelInstance(instance, null);
6819
+ }
6820
+ return null;
6821
+ };
6822
+ ViewModel.prototype.defaultInstance = function () {
6823
+ var runtimeInstance = this._viewModel.defaultInstance();
6824
+ if (runtimeInstance !== null) {
6825
+ return new ViewModelInstance(runtimeInstance, null);
6826
+ }
6827
+ return null;
6828
+ };
6829
+ ViewModel.prototype.instance = function () {
6830
+ var runtimeInstance = this._viewModel.instance();
6831
+ if (runtimeInstance !== null) {
6832
+ return new ViewModelInstance(runtimeInstance, null);
6833
+ }
6834
+ return null;
6835
+ };
6836
+ Object.defineProperty(ViewModel.prototype, "properties", {
6837
+ get: function () {
6838
+ return this._viewModel.getProperties();
6839
+ },
6840
+ enumerable: false,
6841
+ configurable: true
6842
+ });
6843
+ Object.defineProperty(ViewModel.prototype, "instanceNames", {
6844
+ get: function () {
6845
+ return this._viewModel.getInstanceNames();
6846
+ },
6847
+ enumerable: false,
6848
+ configurable: true
6849
+ });
6850
+ return ViewModel;
6851
+ }());
6852
+
6853
+ var DataEnum = /** @class */ (function () {
6854
+ function DataEnum(dataEnum) {
6855
+ this._dataEnum = dataEnum;
6856
+ }
6857
+ Object.defineProperty(DataEnum.prototype, "name", {
6858
+ get: function () {
6859
+ return this._dataEnum.name;
6860
+ },
6861
+ enumerable: false,
6862
+ configurable: true
6863
+ });
6864
+ Object.defineProperty(DataEnum.prototype, "values", {
6865
+ get: function () {
6866
+ return this._dataEnum.values;
6867
+ },
6868
+ enumerable: false,
6869
+ configurable: true
6870
+ });
6871
+ return DataEnum;
6872
+ }());
6873
+
6874
+ var ViewModelInstance = /** @class */ (function () {
6875
+ function ViewModelInstance(runtimeInstance, root) {
6876
+ this._propertiesWithCallbacks = [];
6877
+ this._referenceCount = 0;
6878
+ this._runtimeInstance = runtimeInstance;
6879
+ this._root = root || this;
6880
+ }
6881
+ Object.defineProperty(ViewModelInstance.prototype, "runtimeInstance", {
6882
+ get: function () {
6883
+ return this._runtimeInstance;
6884
+ },
6885
+ enumerable: false,
6886
+ configurable: true
6887
+ });
6888
+ ViewModelInstance.prototype.handleCallbacks = function () {
6889
+ if (this._propertiesWithCallbacks.length !== 0) {
6890
+ this._propertiesWithCallbacks.forEach(function (property) {
6891
+ property.handleCallbacks();
6892
+ });
6893
+ }
6894
+ };
6895
+ ViewModelInstance.prototype.clearCallbacks = function () {
6896
+ this._propertiesWithCallbacks.forEach(function (property) {
6897
+ property.clearCallbacks();
6898
+ });
6899
+ };
6900
+ /**
6901
+ * method to access a property instance of type number belonging
6902
+ * to the view model instance or to a nested view model instance
6903
+ * @param path - path to the number property
6904
+ */
6905
+ ViewModelInstance.prototype.number = function (path) {
6906
+ var _a;
6907
+ var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.number(path);
6908
+ if (instance) {
6909
+ return new ViewModelInstanceNumber(instance, this._root);
6910
+ }
6911
+ return null;
6912
+ };
6913
+ /**
6914
+ * method to access a property instance of type string belonging
6915
+ * to the view model instance or to a nested view model instance
6916
+ * @param path - path to the number property
6917
+ */
6918
+ ViewModelInstance.prototype.string = function (path) {
6919
+ var _a;
6920
+ var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.string(path);
6921
+ if (instance) {
6922
+ return new ViewModelInstanceString(instance, this._root);
6923
+ }
6924
+ return null;
6925
+ };
6926
+ /**
6927
+ * method to access a property instance of type boolean belonging
6928
+ * to the view model instance or to a nested view model instance
6929
+ * @param path - path to the number property
6930
+ */
6931
+ ViewModelInstance.prototype.boolean = function (path) {
6932
+ var _a;
6933
+ var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.boolean(path);
6934
+ if (instance) {
6935
+ return new ViewModelInstanceBoolean(instance, this._root);
6936
+ }
6937
+ return null;
6938
+ };
6939
+ /**
6940
+ * method to access a property instance of type color belonging
6941
+ * to the view model instance or to a nested view model instance
6942
+ * @param path - path to the number property
6943
+ */
6944
+ ViewModelInstance.prototype.color = function (path) {
6945
+ var _a;
6946
+ var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.color(path);
6947
+ if (instance) {
6948
+ return new ViewModelInstanceColor(instance, this._root);
6949
+ }
6950
+ return null;
6951
+ };
6952
+ /**
6953
+ * method to access a property instance of type trigger belonging
6954
+ * to the view model instance or to a nested view model instance
6955
+ * @param path - path to the number property
6956
+ */
6957
+ ViewModelInstance.prototype.trigger = function (path) {
6958
+ var _a;
6959
+ var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.trigger(path);
6960
+ if (instance) {
6961
+ return new ViewModelInstanceTrigger(instance, this._root);
6962
+ }
6963
+ return null;
6964
+ };
6965
+ /**
6966
+ * method to access a property instance of type enum belonging
6967
+ * to the view model instance or to a nested view model instance
6968
+ * @param path - path to the number property
6969
+ */
6970
+ ViewModelInstance.prototype.enum = function (path) {
6971
+ var _a;
6972
+ var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.enum(path);
6973
+ if (instance) {
6974
+ return new ViewModelInstanceEnum(instance, this._root);
6975
+ }
6976
+ return null;
6977
+ };
6978
+ /**
6979
+ * method to access a view model property instance belonging
6980
+ * to the view model instance or to a nested view model instance
6981
+ * @param path - path to the number property
6982
+ */
6983
+ ViewModelInstance.prototype.viewModel = function (path) {
6984
+ var _a;
6985
+ var viewModelInstance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.viewModel(path);
6986
+ if (viewModelInstance) {
6987
+ return new ViewModelInstance(viewModelInstance, this._root);
6988
+ }
6989
+ return null;
6990
+ };
6991
+ /**
6992
+ * method to replace a view model property with another view model value
6993
+ * @param path - path to the view model property
6994
+ * @param value - view model that will replace the original
6995
+ */
6996
+ ViewModelInstance.prototype.replaceViewModel = function (path, value) {
6997
+ var _a;
6998
+ if (value.runtimeInstance !== null) {
6999
+ return (((_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.replaceViewModel(path, value.runtimeInstance)) ||
7000
+ false);
7001
+ }
7002
+ return false;
7003
+ };
7004
+ /*
7005
+ * method for internal use, it shouldn't be called externally
7006
+ */
7007
+ ViewModelInstance.prototype.addToCallbacks = function (property) {
7008
+ if (!this._propertiesWithCallbacks.includes(property)) {
7009
+ this._propertiesWithCallbacks.push(property);
7010
+ }
7011
+ };
7012
+ /*
7013
+ * method for internal use, it shouldn't be called externally
7014
+ */
7015
+ ViewModelInstance.prototype.removeFromCallbacks = function (property) {
7016
+ if (this._propertiesWithCallbacks.includes(property)) {
7017
+ this._propertiesWithCallbacks = this._propertiesWithCallbacks.filter(function (prop) { return prop !== property; });
7018
+ }
7019
+ };
7020
+ /*
7021
+ * method to add one to the reference counter of the instance.
7022
+ * Use if the file owning the reference is destroyed but the instance needs to stay around
7023
+ */
7024
+ ViewModelInstance.prototype.incrementReferenceCount = function () {
7025
+ var _a;
7026
+ this._referenceCount++;
7027
+ (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.incrementReferenceCount();
7028
+ };
7029
+ /*
7030
+ * method to subtract one to the reference counter of the instance.
7031
+ * Use if incrementReferenceCount has been called
7032
+ */
7033
+ ViewModelInstance.prototype.decrementReferenceCount = function () {
7034
+ var _a;
7035
+ this._referenceCount--;
7036
+ (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.decrementReferenceCount();
7037
+ };
7038
+ Object.defineProperty(ViewModelInstance.prototype, "properties", {
7039
+ get: function () {
7040
+ var _a;
7041
+ return (((_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.getProperties().map(function (prop) { return (__assign({}, prop)); })) || []);
7042
+ },
7043
+ enumerable: false,
7044
+ configurable: true
7045
+ });
7046
+ ViewModelInstance.prototype.internalIncrementReferenceCount = function () {
7047
+ this._referenceCount++;
7048
+ };
7049
+ ViewModelInstance.prototype.cleanup = function () {
7050
+ this._referenceCount--;
7051
+ if (this._referenceCount <= 0) {
7052
+ this._runtimeInstance = null;
7053
+ this.clearCallbacks();
7054
+ this._propertiesWithCallbacks = [];
7055
+ }
7056
+ };
7057
+ return ViewModelInstance;
7058
+ }());
7059
+
7060
+ var ViewModelInstanceValue = /** @class */ (function () {
7061
+ function ViewModelInstanceValue(instance, root) {
7062
+ this.callbacks = [];
7063
+ this._viewModelInstanceValue = instance;
7064
+ this._rootViewModel = root;
7065
+ }
7066
+ ViewModelInstanceValue.prototype.on = function (callback) {
7067
+ // Since we don't clean the changed flag for properties that don't have listeners,
7068
+ // we clean it the first time we add a listener to it
7069
+ if (this.callbacks.length === 0) {
7070
+ this._viewModelInstanceValue.clearChanges();
7071
+ }
7072
+ if (!this.callbacks.includes(callback)) {
7073
+ this.callbacks.push(callback);
7074
+ this._rootViewModel.addToCallbacks(this);
7075
+ }
7076
+ };
7077
+ ViewModelInstanceValue.prototype.off = function (callback) {
7078
+ if (!callback) {
7079
+ this.callbacks.length = 0;
7080
+ }
7081
+ else {
7082
+ this.callbacks = this.callbacks.filter(function (cb) { return cb !== callback; });
7083
+ }
7084
+ if (this.callbacks.length === 0) {
7085
+ this._rootViewModel.removeFromCallbacks(this);
7086
+ }
7087
+ };
7088
+ ViewModelInstanceValue.prototype.internalHandleCallback = function (callback) { };
7089
+ ViewModelInstanceValue.prototype.handleCallbacks = function () {
7090
+ var _this = this;
7091
+ if (this._viewModelInstanceValue.hasChanged) {
7092
+ this._viewModelInstanceValue.clearChanges();
7093
+ this.callbacks.forEach(function (callback) {
7094
+ _this.internalHandleCallback(callback);
7095
+ });
7096
+ }
7097
+ };
7098
+ ViewModelInstanceValue.prototype.clearCallbacks = function () {
7099
+ this.callbacks.length = 0;
7100
+ };
7101
+ Object.defineProperty(ViewModelInstanceValue.prototype, "name", {
7102
+ get: function () {
7103
+ return this._viewModelInstanceValue.name;
7104
+ },
7105
+ enumerable: false,
7106
+ configurable: true
7107
+ });
7108
+ return ViewModelInstanceValue;
7109
+ }());
7110
+
7111
+ var ViewModelInstanceString = /** @class */ (function (_super) {
7112
+ __extends(ViewModelInstanceString, _super);
7113
+ function ViewModelInstanceString(instance, root) {
7114
+ return _super.call(this, instance, root) || this;
7115
+ }
7116
+ Object.defineProperty(ViewModelInstanceString.prototype, "value", {
7117
+ get: function () {
7118
+ return this._viewModelInstanceValue.value;
7119
+ },
7120
+ set: function (val) {
7121
+ this._viewModelInstanceValue.value = val;
7122
+ },
7123
+ enumerable: false,
7124
+ configurable: true
7125
+ });
7126
+ ViewModelInstanceString.prototype.internalHandleCallback = function (callback) {
7127
+ callback(this.value);
7128
+ };
7129
+ return ViewModelInstanceString;
7130
+ }(ViewModelInstanceValue));
7131
+
7132
+ var ViewModelInstanceNumber = /** @class */ (function (_super) {
7133
+ __extends(ViewModelInstanceNumber, _super);
7134
+ function ViewModelInstanceNumber(instance, root) {
7135
+ return _super.call(this, instance, root) || this;
7136
+ }
7137
+ Object.defineProperty(ViewModelInstanceNumber.prototype, "value", {
7138
+ get: function () {
7139
+ return this._viewModelInstanceValue.value;
7140
+ },
7141
+ set: function (val) {
7142
+ this._viewModelInstanceValue.value = val;
7143
+ },
7144
+ enumerable: false,
7145
+ configurable: true
7146
+ });
7147
+ ViewModelInstanceNumber.prototype.internalHandleCallback = function (callback) {
7148
+ callback(this.value);
7149
+ };
7150
+ return ViewModelInstanceNumber;
7151
+ }(ViewModelInstanceValue));
7152
+
7153
+ var ViewModelInstanceBoolean = /** @class */ (function (_super) {
7154
+ __extends(ViewModelInstanceBoolean, _super);
7155
+ function ViewModelInstanceBoolean(instance, root) {
7156
+ return _super.call(this, instance, root) || this;
7157
+ }
7158
+ Object.defineProperty(ViewModelInstanceBoolean.prototype, "value", {
7159
+ get: function () {
7160
+ return this._viewModelInstanceValue.value;
7161
+ },
7162
+ set: function (val) {
7163
+ this._viewModelInstanceValue.value = val;
7164
+ },
7165
+ enumerable: false,
7166
+ configurable: true
7167
+ });
7168
+ ViewModelInstanceBoolean.prototype.internalHandleCallback = function (callback) {
7169
+ callback(this.value);
7170
+ };
7171
+ return ViewModelInstanceBoolean;
7172
+ }(ViewModelInstanceValue));
7173
+
7174
+ var ViewModelInstanceTrigger = /** @class */ (function (_super) {
7175
+ __extends(ViewModelInstanceTrigger, _super);
7176
+ function ViewModelInstanceTrigger(instance, root) {
7177
+ return _super.call(this, instance, root) || this;
7178
+ }
7179
+ ViewModelInstanceTrigger.prototype.trigger = function () {
7180
+ return this._viewModelInstanceValue.trigger();
7181
+ };
7182
+ ViewModelInstanceTrigger.prototype.internalHandleCallback = function (callback) {
7183
+ callback();
7184
+ };
7185
+ return ViewModelInstanceTrigger;
7186
+ }(ViewModelInstanceValue));
7187
+
7188
+ var ViewModelInstanceEnum = /** @class */ (function (_super) {
7189
+ __extends(ViewModelInstanceEnum, _super);
7190
+ function ViewModelInstanceEnum(instance, root) {
7191
+ return _super.call(this, instance, root) || this;
7192
+ }
7193
+ Object.defineProperty(ViewModelInstanceEnum.prototype, "value", {
7194
+ get: function () {
7195
+ return this._viewModelInstanceValue.value;
7196
+ },
7197
+ set: function (val) {
7198
+ this._viewModelInstanceValue.value = val;
7199
+ },
7200
+ enumerable: false,
7201
+ configurable: true
7202
+ });
7203
+ Object.defineProperty(ViewModelInstanceEnum.prototype, "valueIndex", {
7204
+ get: function () {
7205
+ return this._viewModelInstanceValue
7206
+ .valueIndex;
7207
+ },
7208
+ set: function (val) {
7209
+ this._viewModelInstanceValue.valueIndex = val;
7210
+ },
7211
+ enumerable: false,
7212
+ configurable: true
7213
+ });
7214
+ Object.defineProperty(ViewModelInstanceEnum.prototype, "values", {
7215
+ get: function () {
7216
+ return this._viewModelInstanceValue.values;
7217
+ },
7218
+ enumerable: false,
7219
+ configurable: true
7220
+ });
7221
+ ViewModelInstanceEnum.prototype.internalHandleCallback = function (callback) {
7222
+ callback(this.value);
7223
+ };
7224
+ return ViewModelInstanceEnum;
7225
+ }(ViewModelInstanceValue));
7226
+
7227
+ var ViewModelInstanceColor = /** @class */ (function (_super) {
7228
+ __extends(ViewModelInstanceColor, _super);
7229
+ function ViewModelInstanceColor(instance, root) {
7230
+ return _super.call(this, instance, root) || this;
7231
+ }
7232
+ Object.defineProperty(ViewModelInstanceColor.prototype, "value", {
7233
+ get: function () {
7234
+ return this._viewModelInstanceValue.value;
7235
+ },
7236
+ set: function (val) {
7237
+ this._viewModelInstanceValue.value = val;
7238
+ },
7239
+ enumerable: false,
7240
+ configurable: true
7241
+ });
7242
+ ViewModelInstanceColor.prototype.rgb = function (r, g, b) {
7243
+ this._viewModelInstanceValue.rgb(r, g, b);
7244
+ };
7245
+ ViewModelInstanceColor.prototype.rgba = function (r, g, b, a) {
7246
+ this._viewModelInstanceValue.argb(a, r, g, b);
7247
+ };
7248
+ ViewModelInstanceColor.prototype.argb = function (a, r, g, b) {
7249
+ this._viewModelInstanceValue.argb(a, r, g, b);
7250
+ };
7251
+ // Value 0 to 255
7252
+ ViewModelInstanceColor.prototype.alpha = function (a) {
7253
+ this._viewModelInstanceValue.alpha(a);
7254
+ };
7255
+ // Value 0 to 1
7256
+ ViewModelInstanceColor.prototype.opacity = function (o) {
7257
+ this._viewModelInstanceValue.alpha(Math.round(Math.max(0, Math.min(1, o)) * 255));
7258
+ };
7259
+ ViewModelInstanceColor.prototype.internalHandleCallback = function (callback) {
7260
+ callback(this.value);
7261
+ };
7262
+ return ViewModelInstanceColor;
7263
+ }(ViewModelInstanceValue));
7264
+
6683
7265
  // Loads Rive data from a URI via fetch.
6684
7266
  var loadRiveFile = function (src) { return __awaiter(void 0, void 0, void 0, function () {
6685
7267
  var req, res, buffer;