@rive-app/canvas 2.37.5 → 2.37.7
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/package.json +1 -1
- package/rive.js +392 -321
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_fallback.wasm +0 -0
- package/runtimeLoader.d.ts +3 -1
package/rive.js
CHANGED
|
@@ -174,6 +174,16 @@ var RuntimeLoader = /** @class */ (function () {
|
|
|
174
174
|
// Class is never instantiated
|
|
175
175
|
function RuntimeLoader() {
|
|
176
176
|
}
|
|
177
|
+
// Rejects all pending awaitInstance() promises and resets loading state so
|
|
178
|
+
// the next call to getInstance() / awaitInstance() can retry with a new URL.
|
|
179
|
+
RuntimeLoader.notifyError = function (error) {
|
|
180
|
+
var _a;
|
|
181
|
+
RuntimeLoader.isLoading = false;
|
|
182
|
+
while (RuntimeLoader.errorCallbackQueue.length > 0) {
|
|
183
|
+
(_a = RuntimeLoader.errorCallbackQueue.shift()) === null || _a === void 0 ? void 0 : _a(error);
|
|
184
|
+
}
|
|
185
|
+
RuntimeLoader.callBackQueue = [];
|
|
186
|
+
};
|
|
177
187
|
// Loads the runtime
|
|
178
188
|
RuntimeLoader.loadRuntime = function () {
|
|
179
189
|
// Capture the URL at call time so the catch closure always refers to the
|
|
@@ -192,6 +202,7 @@ var RuntimeLoader = /** @class */ (function () {
|
|
|
192
202
|
performance.measure('rive:wasm-init', 'rive:wasm-init:start', 'rive:wasm-init:end');
|
|
193
203
|
}
|
|
194
204
|
RuntimeLoader.runtime = rive;
|
|
205
|
+
RuntimeLoader.errorCallbackQueue = [];
|
|
195
206
|
// Fire all the callbacks
|
|
196
207
|
while (RuntimeLoader.callBackQueue.length > 0) {
|
|
197
208
|
(_a = RuntimeLoader.callBackQueue.shift()) === null || _a === void 0 ? void 0 : _a(RuntimeLoader.runtime);
|
|
@@ -244,14 +255,15 @@ var RuntimeLoader = /** @class */ (function () {
|
|
|
244
255
|
"\nTo resolve, you may need to:",
|
|
245
256
|
"1. Check your network connection",
|
|
246
257
|
"2. Set a new WASM source via RuntimeLoader.setWasmUrl()",
|
|
247
|
-
"3. Call RuntimeLoader.
|
|
258
|
+
"3. Call RuntimeLoader.awaitInstance() again",
|
|
248
259
|
].join("\n");
|
|
249
260
|
console.error(errorMessage);
|
|
261
|
+
RuntimeLoader.notifyError(new Error(errorMessage));
|
|
250
262
|
}
|
|
251
263
|
});
|
|
252
264
|
};
|
|
253
265
|
// Provides a runtime instance via a callback
|
|
254
|
-
RuntimeLoader.getInstance = function (callback) {
|
|
266
|
+
RuntimeLoader.getInstance = function (callback, onError) {
|
|
255
267
|
// If it's not loading, start loading runtime
|
|
256
268
|
if (!RuntimeLoader.isLoading) {
|
|
257
269
|
RuntimeLoader.isLoading = true;
|
|
@@ -259,15 +271,18 @@ var RuntimeLoader = /** @class */ (function () {
|
|
|
259
271
|
}
|
|
260
272
|
if (!RuntimeLoader.runtime) {
|
|
261
273
|
RuntimeLoader.callBackQueue.push(callback);
|
|
274
|
+
if (onError) {
|
|
275
|
+
RuntimeLoader.errorCallbackQueue.push(onError);
|
|
276
|
+
}
|
|
262
277
|
}
|
|
263
278
|
else {
|
|
264
279
|
callback(RuntimeLoader.runtime);
|
|
265
280
|
}
|
|
266
281
|
};
|
|
267
|
-
// Provides a runtime instance via a promise
|
|
282
|
+
// Provides a runtime instance via a promise; rejects if WASM fails to load.
|
|
268
283
|
RuntimeLoader.awaitInstance = function () {
|
|
269
|
-
return new Promise(function (resolve) {
|
|
270
|
-
return RuntimeLoader.getInstance(
|
|
284
|
+
return new Promise(function (resolve, reject) {
|
|
285
|
+
return RuntimeLoader.getInstance(resolve, reject);
|
|
271
286
|
});
|
|
272
287
|
};
|
|
273
288
|
// Manually sets the wasm url
|
|
@@ -314,6 +329,8 @@ var RuntimeLoader = /** @class */ (function () {
|
|
|
314
329
|
// the fallback entirely. Defaults to pulling from the jsdelivr CDN.
|
|
315
330
|
RuntimeLoader.wasmFallbackURL = "https://cdn.jsdelivr.net/npm/".concat(package_json__WEBPACK_IMPORTED_MODULE_1__.name, "@").concat(package_json__WEBPACK_IMPORTED_MODULE_1__.version, "/rive_fallback.wasm");
|
|
316
331
|
RuntimeLoader.wasmBinary = null;
|
|
332
|
+
// Error callbacks enqueued from .getInstance()
|
|
333
|
+
RuntimeLoader.errorCallbackQueue = [];
|
|
317
334
|
/**
|
|
318
335
|
* When true, performance.mark / performance.measure entries are emitted for
|
|
319
336
|
* WASM initialization.
|
|
@@ -340,7 +357,7 @@ var Rive = (() => {
|
|
|
340
357
|
function(moduleArg = {}) {
|
|
341
358
|
var moduleRtn;
|
|
342
359
|
|
|
343
|
-
var
|
|
360
|
+
var l = moduleArg, ca, da, ea = new Promise((a, b) => {
|
|
344
361
|
ca = a;
|
|
345
362
|
da = b;
|
|
346
363
|
}), fa = "object" == typeof window, ia = "function" == typeof importScripts;
|
|
@@ -357,7 +374,7 @@ function ja() {
|
|
|
357
374
|
}
|
|
358
375
|
});
|
|
359
376
|
this.ob();
|
|
360
|
-
e && e.
|
|
377
|
+
e && e.Rb();
|
|
361
378
|
}
|
|
362
379
|
let b = 0, c = 0, d = new Map(), e = null, f = null;
|
|
363
380
|
this.requestAnimationFrame = function(g) {
|
|
@@ -370,20 +387,20 @@ function ja() {
|
|
|
370
387
|
d.delete(g);
|
|
371
388
|
b && 0 == d.size && (cancelAnimationFrame(b), b = 0);
|
|
372
389
|
};
|
|
373
|
-
this.
|
|
390
|
+
this.Pb = function(g) {
|
|
374
391
|
f && (document.body.remove(f), f = null);
|
|
375
392
|
g || (f = document.createElement("div"), f.style.backgroundColor = "black", f.style.position = "fixed", f.style.right = 0, f.style.top = 0, f.style.color = "white", f.style.padding = "4px", f.innerHTML = "RIVE FPS", g = function(k) {
|
|
376
393
|
f.innerHTML = "RIVE FPS " + k.toFixed(1);
|
|
377
394
|
}, document.body.appendChild(f));
|
|
378
395
|
e = new function() {
|
|
379
396
|
let k = 0, p = 0;
|
|
380
|
-
this.
|
|
397
|
+
this.Rb = function() {
|
|
381
398
|
var n = performance.now();
|
|
382
399
|
p ? (++k, n -= p, 1000 < n && (g(1000 * k / n), k = p = 0)) : (p = n, k = 0);
|
|
383
400
|
};
|
|
384
401
|
}();
|
|
385
402
|
};
|
|
386
|
-
this.
|
|
403
|
+
this.Mb = function() {
|
|
387
404
|
f && (document.body.remove(f), f = null);
|
|
388
405
|
e = null;
|
|
389
406
|
};
|
|
@@ -405,41 +422,41 @@ function ka(a) {
|
|
|
405
422
|
return c << a;
|
|
406
423
|
};
|
|
407
424
|
}
|
|
408
|
-
const la =
|
|
409
|
-
|
|
425
|
+
const la = l.onRuntimeInitialized;
|
|
426
|
+
l.onRuntimeInitialized = function() {
|
|
410
427
|
la && la();
|
|
411
|
-
let a =
|
|
412
|
-
|
|
428
|
+
let a = l.decodeAudio;
|
|
429
|
+
l.decodeAudio = function(f, g) {
|
|
413
430
|
f = a(f);
|
|
414
431
|
g(f);
|
|
415
432
|
};
|
|
416
|
-
let b =
|
|
417
|
-
|
|
433
|
+
let b = l.decodeFont;
|
|
434
|
+
l.decodeFont = function(f, g) {
|
|
418
435
|
f = b(f);
|
|
419
436
|
g(f);
|
|
420
437
|
};
|
|
421
|
-
let c =
|
|
422
|
-
|
|
438
|
+
let c = l.setFallbackFontCb;
|
|
439
|
+
l.setFallbackFontCallback = "function" === typeof c ? function(f) {
|
|
423
440
|
c(f);
|
|
424
441
|
} : function() {
|
|
425
442
|
console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.");
|
|
426
443
|
};
|
|
427
|
-
const d =
|
|
428
|
-
|
|
429
|
-
let g =
|
|
430
|
-
return g.isImage ?
|
|
444
|
+
const d = l.FileAssetLoader;
|
|
445
|
+
l.ptrToAsset = f => {
|
|
446
|
+
let g = l.ptrToFileAsset(f);
|
|
447
|
+
return g.isImage ? l.ptrToImageAsset(f) : g.isFont ? l.ptrToFontAsset(f) : g.isAudio ? l.ptrToAudioAsset(f) : g;
|
|
431
448
|
};
|
|
432
|
-
|
|
449
|
+
l.CustomFileAssetLoader = d.extend("CustomFileAssetLoader", {__construct:function({loadContents:f}) {
|
|
433
450
|
this.__parent.__construct.call(this);
|
|
434
451
|
this.Eb = f;
|
|
435
452
|
}, loadContents:function(f, g) {
|
|
436
|
-
f =
|
|
453
|
+
f = l.ptrToAsset(f);
|
|
437
454
|
return this.Eb(f, g);
|
|
438
455
|
},});
|
|
439
|
-
|
|
456
|
+
l.CDNFileAssetLoader = d.extend("CDNFileAssetLoader", {__construct:function() {
|
|
440
457
|
this.__parent.__construct.call(this);
|
|
441
458
|
}, loadContents:function(f) {
|
|
442
|
-
let g =
|
|
459
|
+
let g = l.ptrToAsset(f);
|
|
443
460
|
f = g.cdnUuid;
|
|
444
461
|
if ("" === f) {
|
|
445
462
|
return !1;
|
|
@@ -457,7 +474,7 @@ m.onRuntimeInitialized = function() {
|
|
|
457
474
|
});
|
|
458
475
|
return !0;
|
|
459
476
|
},});
|
|
460
|
-
|
|
477
|
+
l.FallbackFileAssetLoader = d.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
461
478
|
this.__parent.__construct.call(this);
|
|
462
479
|
this.kb = [];
|
|
463
480
|
}, addLoader:function(f) {
|
|
@@ -470,25 +487,25 @@ m.onRuntimeInitialized = function() {
|
|
|
470
487
|
}
|
|
471
488
|
return !1;
|
|
472
489
|
},});
|
|
473
|
-
let e =
|
|
474
|
-
|
|
490
|
+
let e = l.computeAlignment;
|
|
491
|
+
l.computeAlignment = function(f, g, k, p, n = 1.0) {
|
|
475
492
|
return e.call(this, f, g, k, p, n);
|
|
476
493
|
};
|
|
477
494
|
};
|
|
478
495
|
const ma = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), na = new function() {
|
|
479
496
|
function a() {
|
|
480
497
|
if (!b) {
|
|
481
|
-
var
|
|
498
|
+
var m = document.createElement("canvas"), u = {alpha:1, depth:0, stencil:0, antialias:0, premultipliedAlpha:1, preserveDrawingBuffer:0, powerPreference:"high-performance", failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:1, explicitSwapControl:1, renderViaOffscreenBackBuffer:1,};
|
|
482
499
|
let r;
|
|
483
500
|
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
|
484
|
-
if (r =
|
|
501
|
+
if (r = m.getContext("webgl", u), c = 1, !r) {
|
|
485
502
|
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
486
503
|
}
|
|
487
504
|
} else {
|
|
488
|
-
if (r =
|
|
505
|
+
if (r = m.getContext("webgl2", u)) {
|
|
489
506
|
c = 2;
|
|
490
507
|
} else {
|
|
491
|
-
if (r =
|
|
508
|
+
if (r = m.getContext("webgl", u)) {
|
|
492
509
|
c = 1;
|
|
493
510
|
} else {
|
|
494
511
|
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
@@ -524,24 +541,24 @@ const ma = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
524
541
|
}
|
|
525
542
|
r.attachShader(I, w);
|
|
526
543
|
}
|
|
527
|
-
|
|
528
|
-
D(
|
|
529
|
-
D(
|
|
530
|
-
r.bindAttribLocation(
|
|
531
|
-
r.bindAttribLocation(
|
|
532
|
-
r.linkProgram(
|
|
533
|
-
u = r.getProgramInfoLog(
|
|
544
|
+
m = r.createProgram();
|
|
545
|
+
D(m, r.VERTEX_SHADER, "attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }");
|
|
546
|
+
D(m, r.FRAGMENT_SHADER, "precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }");
|
|
547
|
+
r.bindAttribLocation(m, 0, "vertex");
|
|
548
|
+
r.bindAttribLocation(m, 1, "uv");
|
|
549
|
+
r.linkProgram(m);
|
|
550
|
+
u = r.getProgramInfoLog(m);
|
|
534
551
|
if (0 < (u || "").trim().length) {
|
|
535
552
|
throw u;
|
|
536
553
|
}
|
|
537
|
-
e = r.getUniformLocation(
|
|
538
|
-
f = r.getUniformLocation(
|
|
539
|
-
r.useProgram(
|
|
554
|
+
e = r.getUniformLocation(m, "mat");
|
|
555
|
+
f = r.getUniformLocation(m, "translate");
|
|
556
|
+
r.useProgram(m);
|
|
540
557
|
r.bindBuffer(r.ARRAY_BUFFER, r.createBuffer());
|
|
541
558
|
r.enableVertexAttribArray(0);
|
|
542
559
|
r.enableVertexAttribArray(1);
|
|
543
560
|
r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, r.createBuffer());
|
|
544
|
-
r.uniform1i(r.getUniformLocation(
|
|
561
|
+
r.uniform1i(r.getUniformLocation(m, "image"), 0);
|
|
545
562
|
r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);
|
|
546
563
|
b = r;
|
|
547
564
|
}
|
|
@@ -549,14 +566,14 @@ const ma = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
549
566
|
}
|
|
550
567
|
let b = null, c = 0, d = 0, e = null, f = null, g = 0, k = 0, p = !1;
|
|
551
568
|
a();
|
|
552
|
-
this.
|
|
569
|
+
this.cc = function() {
|
|
553
570
|
a();
|
|
554
571
|
return d;
|
|
555
572
|
};
|
|
556
|
-
this.
|
|
557
|
-
b.deleteTexture && b.deleteTexture(
|
|
573
|
+
this.Lb = function(m) {
|
|
574
|
+
b.deleteTexture && b.deleteTexture(m);
|
|
558
575
|
};
|
|
559
|
-
this.
|
|
576
|
+
this.Kb = function(m) {
|
|
560
577
|
if (!a()) {
|
|
561
578
|
return null;
|
|
562
579
|
}
|
|
@@ -565,7 +582,7 @@ const ma = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
565
582
|
return null;
|
|
566
583
|
}
|
|
567
584
|
b.bindTexture(b.TEXTURE_2D, u);
|
|
568
|
-
b.texImage2D(b.TEXTURE_2D, 0, b.RGBA, b.RGBA, b.UNSIGNED_BYTE,
|
|
585
|
+
b.texImage2D(b.TEXTURE_2D, 0, b.RGBA, b.RGBA, b.UNSIGNED_BYTE, m);
|
|
569
586
|
b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE);
|
|
570
587
|
b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE);
|
|
571
588
|
b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.LINEAR);
|
|
@@ -573,14 +590,14 @@ const ma = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
573
590
|
return u;
|
|
574
591
|
};
|
|
575
592
|
const n = new ka(8), t = new ka(8), x = new ka(10), y = new ka(10);
|
|
576
|
-
this.
|
|
593
|
+
this.Ob = function(m, u, r, D, I) {
|
|
577
594
|
if (a()) {
|
|
578
|
-
var w = n.push(
|
|
595
|
+
var w = n.push(m), L = t.push(u);
|
|
579
596
|
if (b.canvas) {
|
|
580
597
|
if (b.canvas.width != w || b.canvas.height != L) {
|
|
581
598
|
b.canvas.width = w, b.canvas.height = L;
|
|
582
599
|
}
|
|
583
|
-
b.viewport(0, L - u,
|
|
600
|
+
b.viewport(0, L - u, m, u);
|
|
584
601
|
b.disable(b.SCISSOR_TEST);
|
|
585
602
|
b.clearColor(0, 0, 0, 0);
|
|
586
603
|
b.clear(b.COLOR_BUFFER_BIT);
|
|
@@ -609,11 +626,11 @@ const ma = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
609
626
|
w = R = 0;
|
|
610
627
|
for (const K of r) {
|
|
611
628
|
K.image.Ja != qa && (b.bindTexture(b.TEXTURE_2D, K.image.Ia || null), qa = K.image.Ja);
|
|
612
|
-
K.
|
|
613
|
-
r = 2 /
|
|
629
|
+
K.ic ? (b.scissor(K.Za, L - K.$a - K.jb, K.vc, K.jb), V = !0) : V && (b.scissor(0, L - u, m, u), V = !1);
|
|
630
|
+
r = 2 / m;
|
|
614
631
|
const aa = -2 / u;
|
|
615
632
|
b.uniform4f(e, K.ha[0] * r * K.Aa, K.ha[1] * aa * K.Ba, K.ha[2] * r * K.Aa, K.ha[3] * aa * K.Ba);
|
|
616
|
-
b.uniform2f(f, K.ha[4] * r * K.Aa + r * (K.Za - K.
|
|
633
|
+
b.uniform2f(f, K.ha[4] * r * K.Aa + r * (K.Za - K.dc * K.Aa) - 1, K.ha[5] * aa * K.Ba + aa * (K.$a - K.ec * K.Ba) + 1);
|
|
617
634
|
b.vertexAttribPointer(0, 2, b.FLOAT, !1, 0, w);
|
|
618
635
|
b.vertexAttribPointer(1, 2, b.FLOAT, !1, 0, w + 4 * D);
|
|
619
636
|
b.drawElements(b.TRIANGLES, K.indices.length, b.UNSIGNED_SHORT, R);
|
|
@@ -628,8 +645,8 @@ const ma = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
628
645
|
this.canvas = function() {
|
|
629
646
|
return a() && b.canvas;
|
|
630
647
|
};
|
|
631
|
-
}(), oa =
|
|
632
|
-
|
|
648
|
+
}(), oa = l.onRuntimeInitialized;
|
|
649
|
+
l.onRuntimeInitialized = function() {
|
|
633
650
|
function a(q) {
|
|
634
651
|
switch(q) {
|
|
635
652
|
case n.srcOver:
|
|
@@ -670,7 +687,7 @@ m.onRuntimeInitialized = function() {
|
|
|
670
687
|
return "rgba(" + ((16711680 & q) >>> 16) + "," + ((65280 & q) >>> 8) + "," + ((255 & q) >>> 0) + "," + ((4278190080 & q) >>> 24) / 255 + ")";
|
|
671
688
|
}
|
|
672
689
|
function c() {
|
|
673
|
-
0 < L.length && (na.
|
|
690
|
+
0 < L.length && (na.Ob(w.drawWidth(), w.drawHeight(), L, R, V), L = [], V = R = 0, w.reset(512, 512));
|
|
674
691
|
for (const q of I) {
|
|
675
692
|
for (const v of q.I) {
|
|
676
693
|
v();
|
|
@@ -680,17 +697,17 @@ m.onRuntimeInitialized = function() {
|
|
|
680
697
|
I.clear();
|
|
681
698
|
}
|
|
682
699
|
oa && oa();
|
|
683
|
-
var d =
|
|
684
|
-
const e =
|
|
685
|
-
let
|
|
686
|
-
var u =
|
|
700
|
+
var d = l.RenderPaintStyle;
|
|
701
|
+
const e = l.RenderPath, f = l.RenderPaint, g = l.Renderer, k = l.StrokeCap, p = l.StrokeJoin, n = l.BlendMode, t = d.fill, x = d.stroke, y = l.FillRule.evenOdd;
|
|
702
|
+
let m = 1;
|
|
703
|
+
var u = l.RenderImage.extend("CanvasRenderImage", {__construct:function({la:q, wa:v} = {}) {
|
|
687
704
|
this.__parent.__construct.call(this);
|
|
688
|
-
this.Ja =
|
|
689
|
-
|
|
705
|
+
this.Ja = m;
|
|
706
|
+
m = m + 1 & 2147483647 || 1;
|
|
690
707
|
this.la = q;
|
|
691
708
|
this.wa = v;
|
|
692
709
|
}, __destruct:function() {
|
|
693
|
-
this.Ia && (na.
|
|
710
|
+
this.Ia && (na.Lb(this.Ia), URL.revokeObjectURL(this.Wa));
|
|
694
711
|
this.__parent.__destruct.call(this);
|
|
695
712
|
}, decode:function(q) {
|
|
696
713
|
var v = this;
|
|
@@ -699,7 +716,7 @@ m.onRuntimeInitialized = function() {
|
|
|
699
716
|
v.Wa = URL.createObjectURL(new Blob([q], {type:"image/png",}));
|
|
700
717
|
J.onload = function() {
|
|
701
718
|
v.Db = J;
|
|
702
|
-
v.Ia = na.
|
|
719
|
+
v.Ia = na.Kb(J);
|
|
703
720
|
v.size(J.width, J.height);
|
|
704
721
|
v.la && v.la(v);
|
|
705
722
|
};
|
|
@@ -733,7 +750,7 @@ m.onRuntimeInitialized = function() {
|
|
|
733
750
|
},}), D = f.extend("CanvasRenderPaint", {color:function(q) {
|
|
734
751
|
this.Xa = b(q);
|
|
735
752
|
}, thickness:function(q) {
|
|
736
|
-
this.
|
|
753
|
+
this.Hb = q;
|
|
737
754
|
}, join:function(q) {
|
|
738
755
|
switch(q) {
|
|
739
756
|
case p.miter:
|
|
@@ -757,7 +774,7 @@ m.onRuntimeInitialized = function() {
|
|
|
757
774
|
this.Ga = "square";
|
|
758
775
|
}
|
|
759
776
|
}, style:function(q) {
|
|
760
|
-
this.
|
|
777
|
+
this.Gb = q;
|
|
761
778
|
}, blendMode:function(q) {
|
|
762
779
|
this.Cb = a(q);
|
|
763
780
|
}, clearGradient:function() {
|
|
@@ -765,12 +782,12 @@ m.onRuntimeInitialized = function() {
|
|
|
765
782
|
}, linearGradient:function(q, v, J, G) {
|
|
766
783
|
this.ja = {xb:q, yb:v, cb:J, eb:G, Qa:[],};
|
|
767
784
|
}, radialGradient:function(q, v, J, G) {
|
|
768
|
-
this.ja = {xb:q, yb:v, cb:J, eb:G, Qa:[],
|
|
785
|
+
this.ja = {xb:q, yb:v, cb:J, eb:G, Qa:[], bc:!0,};
|
|
769
786
|
}, addStop:function(q, v) {
|
|
770
787
|
this.ja.Qa.push({color:q, stop:v,});
|
|
771
788
|
}, completeGradient:function() {
|
|
772
789
|
}, draw:function(q, v, J, G) {
|
|
773
|
-
let A = this.
|
|
790
|
+
let A = this.Gb;
|
|
774
791
|
var H = this.Xa, E = this.ja;
|
|
775
792
|
const M = q.globalCompositeOperation, ya = q.globalAlpha;
|
|
776
793
|
q.globalCompositeOperation = this.Cb;
|
|
@@ -780,7 +797,7 @@ m.onRuntimeInitialized = function() {
|
|
|
780
797
|
const X = E.yb, ha = E.cb;
|
|
781
798
|
var T = E.eb;
|
|
782
799
|
G = E.Qa;
|
|
783
|
-
E.
|
|
800
|
+
E.bc ? (E = ha - H, T -= X, H = q.createRadialGradient(H, X, 0, H, X, Math.sqrt(E * E + T * T))) : H = q.createLinearGradient(H, X, ha, T);
|
|
784
801
|
for (let Y = 0, ba = G.length; Y < ba; Y++) {
|
|
785
802
|
E = G[Y], H.addColorStop(E.stop, b(E.color));
|
|
786
803
|
}
|
|
@@ -790,7 +807,7 @@ m.onRuntimeInitialized = function() {
|
|
|
790
807
|
switch(A) {
|
|
791
808
|
case x:
|
|
792
809
|
q.strokeStyle = H;
|
|
793
|
-
q.lineWidth = this.
|
|
810
|
+
q.lineWidth = this.Hb;
|
|
794
811
|
q.lineCap = this.Ga;
|
|
795
812
|
q.lineJoin = this.Ha;
|
|
796
813
|
q.stroke(v);
|
|
@@ -803,7 +820,7 @@ m.onRuntimeInitialized = function() {
|
|
|
803
820
|
},});
|
|
804
821
|
const I = new Set();
|
|
805
822
|
let w = null, L = [], R = 0, V = 0;
|
|
806
|
-
var qa =
|
|
823
|
+
var qa = l.CanvasRenderer = g.extend("Renderer", {__construct:function(q) {
|
|
807
824
|
this.__parent.__construct.call(this);
|
|
808
825
|
this.T = [1, 0, 0, 1, 0, 0];
|
|
809
826
|
this.G = [1.0];
|
|
@@ -853,7 +870,7 @@ m.onRuntimeInitialized = function() {
|
|
|
853
870
|
}, _drawImageMesh:function(q, v, J, G, A, H, E, M, ya, T, X, ha, Y, ba) {
|
|
854
871
|
let ac, bc, cc;
|
|
855
872
|
try {
|
|
856
|
-
ac =
|
|
873
|
+
ac = l.HEAPF32.slice(A >> 2, (A >> 2) + H), bc = l.HEAPF32.slice(E >> 2, (E >> 2) + M), cc = l.HEAPU16.slice(ya >> 1, (ya >> 1) + T);
|
|
857
874
|
} catch (tb) {
|
|
858
875
|
console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");
|
|
859
876
|
return;
|
|
@@ -873,14 +890,14 @@ m.onRuntimeInitialized = function() {
|
|
|
873
890
|
Y = Ga < E || Ha < M;
|
|
874
891
|
v = ba = 1;
|
|
875
892
|
var ra = Math.ceil(Ga * ba), sa = Math.ceil(Ha * v);
|
|
876
|
-
A = na.
|
|
893
|
+
A = na.cc();
|
|
877
894
|
ra > A && (ba *= A / ra, ra = A);
|
|
878
895
|
sa > A && (v *= A / sa, sa = A);
|
|
879
|
-
w || (w = new
|
|
896
|
+
w || (w = new l.DynamicRectanizer(A), w.reset(512, 512));
|
|
880
897
|
A = w.addRect(ra, sa);
|
|
881
898
|
0 > A && (c(), I.add(this), A = w.addRect(ra, sa), console.assert(0 <= A));
|
|
882
899
|
var dc = A & 65535, ec = A >> 16;
|
|
883
|
-
L.push({ha:this.T.slice(this.T.length - 6), image:q, Za:dc, $a:ec,
|
|
900
|
+
L.push({ha:this.T.slice(this.T.length - 6), image:q, Za:dc, $a:ec, dc:X, ec:ha, vc:ra, jb:sa, Aa:ba, Ba:v, Ta:ac, Bb:bc, indices:cc, ic:Y, vb:q.Ja << 1 | (Y ? 1 : 0),});
|
|
884
901
|
R += H;
|
|
885
902
|
V += T;
|
|
886
903
|
var za = this.B, rd = a(J), sd = Math.max(0, G * this.G[this.G.length - 1]);
|
|
@@ -903,7 +920,7 @@ m.onRuntimeInitialized = function() {
|
|
|
903
920
|
}, translate:function(q, v) {
|
|
904
921
|
this.transform(1, 0, 0, 1, q, v);
|
|
905
922
|
},});
|
|
906
|
-
|
|
923
|
+
l.makeRenderer = function(q) {
|
|
907
924
|
const v = new qa(q), J = v.B;
|
|
908
925
|
return new Proxy(v, {get(G, A) {
|
|
909
926
|
if ("function" === typeof G[A]) {
|
|
@@ -928,10 +945,10 @@ m.onRuntimeInitialized = function() {
|
|
|
928
945
|
}
|
|
929
946
|
},});
|
|
930
947
|
};
|
|
931
|
-
|
|
948
|
+
l.decodeImage = function(q, v) {
|
|
932
949
|
(new u({la:v})).decode(q);
|
|
933
950
|
};
|
|
934
|
-
|
|
951
|
+
l.renderFactory = {makeRenderPaint:function() {
|
|
935
952
|
return new D();
|
|
936
953
|
}, makeRenderPath:function() {
|
|
937
954
|
return new r();
|
|
@@ -947,11 +964,11 @@ m.onRuntimeInitialized = function() {
|
|
|
947
964
|
}
|
|
948
965
|
},});
|
|
949
966
|
},};
|
|
950
|
-
let K =
|
|
951
|
-
|
|
952
|
-
const G = new
|
|
967
|
+
let K = l.load, aa = null;
|
|
968
|
+
l.load = function(q, v, J = !0) {
|
|
969
|
+
const G = new l.FallbackFileAssetLoader();
|
|
953
970
|
void 0 !== v && G.addLoader(v);
|
|
954
|
-
J && (v = new
|
|
971
|
+
J && (v = new l.CDNFileAssetLoader(), G.addLoader(v));
|
|
955
972
|
return new Promise(function(A) {
|
|
956
973
|
let H = null;
|
|
957
974
|
aa = {total:0, loaded:0, ready:function() {
|
|
@@ -961,22 +978,22 @@ m.onRuntimeInitialized = function() {
|
|
|
961
978
|
0 == aa.total && A(H);
|
|
962
979
|
});
|
|
963
980
|
};
|
|
964
|
-
let td =
|
|
965
|
-
|
|
981
|
+
let td = l.RendererWrapper.prototype.align;
|
|
982
|
+
l.RendererWrapper.prototype.align = function(q, v, J, G, A = 1.0) {
|
|
966
983
|
td.call(this, q, v, J, G, A);
|
|
967
984
|
};
|
|
968
985
|
d = new ja();
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
986
|
+
l.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
987
|
+
l.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
988
|
+
l.enableFPSCounter = d.Pb.bind(d);
|
|
989
|
+
l.disableFPSCounter = d.Mb;
|
|
973
990
|
d.ob = c;
|
|
974
|
-
|
|
975
|
-
|
|
991
|
+
l.resolveAnimationFrame = c;
|
|
992
|
+
l.cleanup = function() {
|
|
976
993
|
w && w.delete();
|
|
977
994
|
};
|
|
978
995
|
};
|
|
979
|
-
var pa = Object.assign({},
|
|
996
|
+
var pa = Object.assign({}, l), ta = "./this.program", ua = "", va, wa;
|
|
980
997
|
if (fa || ia) {
|
|
981
998
|
ia ? ua = self.location.href : "undefined" != typeof document && document.currentScript && (ua = document.currentScript.src), _scriptName && (ua = _scriptName), ua.startsWith("blob:") ? ua = "" : ua = ua.substr(0, ua.replace(/[?#].*/, "").lastIndexOf("/") + 1), ia && (wa = a => {
|
|
982
999
|
var b = new XMLHttpRequest();
|
|
@@ -999,32 +1016,32 @@ if (fa || ia) {
|
|
|
999
1016
|
}
|
|
1000
1017
|
};
|
|
1001
1018
|
}
|
|
1002
|
-
var Aa =
|
|
1003
|
-
Object.assign(
|
|
1019
|
+
var Aa = l.print || console.log.bind(console), Ba = l.printErr || console.error.bind(console);
|
|
1020
|
+
Object.assign(l, pa);
|
|
1004
1021
|
pa = null;
|
|
1005
|
-
|
|
1022
|
+
l.thisProgram && (ta = l.thisProgram);
|
|
1006
1023
|
var Ca;
|
|
1007
|
-
|
|
1024
|
+
l.wasmBinary && (Ca = l.wasmBinary);
|
|
1008
1025
|
var Da, Ea = !1, z, B, Fa, Ia, C, F, Ja, Ka;
|
|
1009
1026
|
function La() {
|
|
1010
1027
|
var a = Da.buffer;
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1028
|
+
l.HEAP8 = z = new Int8Array(a);
|
|
1029
|
+
l.HEAP16 = Fa = new Int16Array(a);
|
|
1030
|
+
l.HEAPU8 = B = new Uint8Array(a);
|
|
1031
|
+
l.HEAPU16 = Ia = new Uint16Array(a);
|
|
1032
|
+
l.HEAP32 = C = new Int32Array(a);
|
|
1033
|
+
l.HEAPU32 = F = new Uint32Array(a);
|
|
1034
|
+
l.HEAPF32 = Ja = new Float32Array(a);
|
|
1035
|
+
l.HEAPF64 = Ka = new Float64Array(a);
|
|
1019
1036
|
}
|
|
1020
1037
|
var Ma = [], Na = [], Oa = [];
|
|
1021
1038
|
function Pa() {
|
|
1022
|
-
var a =
|
|
1039
|
+
var a = l.preRun.shift();
|
|
1023
1040
|
Ma.unshift(a);
|
|
1024
1041
|
}
|
|
1025
1042
|
var Qa = 0, Ra = null, Sa = null;
|
|
1026
1043
|
function Ta(a) {
|
|
1027
|
-
|
|
1044
|
+
l.onAbort?.(a);
|
|
1028
1045
|
a = "Aborted(" + a + ")";
|
|
1029
1046
|
Ba(a);
|
|
1030
1047
|
Ea = !0;
|
|
@@ -1067,7 +1084,7 @@ function Za(a, b) {
|
|
|
1067
1084
|
return Ya(c, a, b);
|
|
1068
1085
|
}));
|
|
1069
1086
|
}
|
|
1070
|
-
var $a, ab, eb = {
|
|
1087
|
+
var $a, ab, eb = {484301:(a, b, c, d, e) => {
|
|
1071
1088
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
1072
1089
|
return 0;
|
|
1073
1090
|
}
|
|
@@ -1082,7 +1099,7 @@ var $a, ab, eb = {480578:(a, b, c, d, e) => {
|
|
|
1082
1099
|
window.h.ga.wb = e;
|
|
1083
1100
|
let f = window.h;
|
|
1084
1101
|
f.D = [];
|
|
1085
|
-
f.
|
|
1102
|
+
f.tc = function(g) {
|
|
1086
1103
|
for (var k = 0; k < f.D.length; ++k) {
|
|
1087
1104
|
if (null == f.D[k]) {
|
|
1088
1105
|
return f.D[k] = g, k;
|
|
@@ -1100,7 +1117,7 @@ var $a, ab, eb = {480578:(a, b, c, d, e) => {
|
|
|
1100
1117
|
}
|
|
1101
1118
|
}
|
|
1102
1119
|
};
|
|
1103
|
-
f.
|
|
1120
|
+
f.Wc = function(g) {
|
|
1104
1121
|
for (var k = 0; k < f.D.length; ++k) {
|
|
1105
1122
|
if (f.D[k] == g) {
|
|
1106
1123
|
return f.Ab(k);
|
|
@@ -1130,11 +1147,11 @@ var $a, ab, eb = {480578:(a, b, c, d, e) => {
|
|
|
1130
1147
|
}
|
|
1131
1148
|
window.h.za += 1;
|
|
1132
1149
|
return 1;
|
|
1133
|
-
},
|
|
1150
|
+
}, 486479:() => {
|
|
1134
1151
|
"undefined" !== typeof window.h && (window.h.Sa.map(function(a) {
|
|
1135
1152
|
document.removeEventListener(a, window.h.unlock, !0);
|
|
1136
1153
|
}), --window.h.za, 0 === window.h.za && delete window.h);
|
|
1137
|
-
},
|
|
1154
|
+
}, 486783:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 486887:() => {
|
|
1138
1155
|
try {
|
|
1139
1156
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
1140
1157
|
a.close();
|
|
@@ -1142,7 +1159,7 @@ var $a, ab, eb = {480578:(a, b, c, d, e) => {
|
|
|
1142
1159
|
} catch (c) {
|
|
1143
1160
|
return 0;
|
|
1144
1161
|
}
|
|
1145
|
-
},
|
|
1162
|
+
}, 487058:(a, b, c, d, e, f) => {
|
|
1146
1163
|
if ("undefined" === typeof window.h) {
|
|
1147
1164
|
return -1;
|
|
1148
1165
|
}
|
|
@@ -1187,8 +1204,8 @@ var $a, ab, eb = {480578:(a, b, c, d, e) => {
|
|
|
1187
1204
|
});
|
|
1188
1205
|
a == window.h.J.xa && g.Z.connect(g.L.destination);
|
|
1189
1206
|
g.pb = f;
|
|
1190
|
-
return window.h.
|
|
1191
|
-
},
|
|
1207
|
+
return window.h.tc(g);
|
|
1208
|
+
}, 489935:a => window.h.qa(a).L.sampleRate, 490008:a => {
|
|
1192
1209
|
a = window.h.qa(a);
|
|
1193
1210
|
void 0 !== a.Z && (a.Z.onaudioprocess = function() {
|
|
1194
1211
|
}, a.Z.disconnect(), a.Z = void 0);
|
|
@@ -1196,19 +1213,19 @@ var $a, ab, eb = {480578:(a, b, c, d, e) => {
|
|
|
1196
1213
|
a.L.close();
|
|
1197
1214
|
a.L = void 0;
|
|
1198
1215
|
a.pb = void 0;
|
|
1199
|
-
},
|
|
1216
|
+
}, 490408:a => {
|
|
1200
1217
|
window.h.Ab(a);
|
|
1201
|
-
},
|
|
1218
|
+
}, 490458:a => {
|
|
1202
1219
|
a = window.h.qa(a);
|
|
1203
1220
|
a.L.resume();
|
|
1204
1221
|
a.state = window.h.ga.wb;
|
|
1205
|
-
},
|
|
1222
|
+
}, 490597:a => {
|
|
1206
1223
|
a = window.h.qa(a);
|
|
1207
1224
|
a.L.suspend();
|
|
1208
1225
|
a.state = window.h.ga.stopped;
|
|
1209
1226
|
}}, fb = a => {
|
|
1210
1227
|
for (; 0 < a.length;) {
|
|
1211
|
-
a.shift()(
|
|
1228
|
+
a.shift()(l);
|
|
1212
1229
|
}
|
|
1213
1230
|
};
|
|
1214
1231
|
function gb() {
|
|
@@ -1416,11 +1433,11 @@ var zb = {open(a) {
|
|
|
1416
1433
|
null === b || 10 === b ? (Aa(qb(a.H, 0)), a.H = []) : 0 != b && a.H.push(b);
|
|
1417
1434
|
}, pa(a) {
|
|
1418
1435
|
a.H && 0 < a.H.length && (Aa(qb(a.H, 0)), a.H = []);
|
|
1419
|
-
}, Yb() {
|
|
1420
|
-
return {Ac:25856, Cc:5, zc:191, Bc:35387, yc:[3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]};
|
|
1421
1436
|
}, Zb() {
|
|
1422
|
-
return 0;
|
|
1437
|
+
return {Fc:25856, Hc:5, Ec:191, Gc:35387, Dc:[3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]};
|
|
1423
1438
|
}, $b() {
|
|
1439
|
+
return 0;
|
|
1440
|
+
}, ac() {
|
|
1424
1441
|
return [24, 80];
|
|
1425
1442
|
},}, Bb = {Na(a, b) {
|
|
1426
1443
|
null === b || 10 === b ? (Ba(qb(a.H, 0)), a.H = []) : 0 != b && a.H.push(b);
|
|
@@ -1443,23 +1460,23 @@ var O = {O:null, V() {
|
|
|
1443
1460
|
c.timestamp = Date.now();
|
|
1444
1461
|
a && (a.l[b] = c, a.timestamp = c.timestamp);
|
|
1445
1462
|
return c;
|
|
1446
|
-
},
|
|
1463
|
+
}, Lc(a) {
|
|
1447
1464
|
return a.l ? a.l.subarray ? a.l.subarray(0, a.v) : new Uint8Array(a.l) : new Uint8Array(0);
|
|
1448
1465
|
}, j:{Y(a) {
|
|
1449
1466
|
var b = {};
|
|
1450
|
-
b.
|
|
1451
|
-
b.
|
|
1467
|
+
b.Jc = 8192 === (a.mode & 61440) ? a.id : 1;
|
|
1468
|
+
b.Nc = a.id;
|
|
1452
1469
|
b.mode = a.mode;
|
|
1453
|
-
b.
|
|
1470
|
+
b.Rc = 1;
|
|
1454
1471
|
b.uid = 0;
|
|
1455
|
-
b.
|
|
1472
|
+
b.Mc = 0;
|
|
1456
1473
|
b.ya = a.ya;
|
|
1457
1474
|
16384 === (a.mode & 61440) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.v : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
|
|
1458
|
-
b.
|
|
1459
|
-
b.
|
|
1460
|
-
b.
|
|
1461
|
-
b.
|
|
1462
|
-
b.
|
|
1475
|
+
b.Bc = new Date(a.timestamp);
|
|
1476
|
+
b.Qc = new Date(a.timestamp);
|
|
1477
|
+
b.Ic = new Date(a.timestamp);
|
|
1478
|
+
b.Ib = 4096;
|
|
1479
|
+
b.Cc = Math.ceil(b.size / b.Ib);
|
|
1463
1480
|
return b;
|
|
1464
1481
|
}, R(a, b) {
|
|
1465
1482
|
void 0 !== b.mode && (a.mode = b.mode);
|
|
@@ -1590,7 +1607,7 @@ var O = {O:null, V() {
|
|
|
1590
1607
|
} else {
|
|
1591
1608
|
c = !1, b = a.byteOffset;
|
|
1592
1609
|
}
|
|
1593
|
-
return {o:b,
|
|
1610
|
+
return {o:b, Ac:c};
|
|
1594
1611
|
}, nb(a, b, c, d) {
|
|
1595
1612
|
O.m.write(a, b, 0, d, c, !1);
|
|
1596
1613
|
return 0;
|
|
@@ -1695,7 +1712,7 @@ function Gb(a, b) {
|
|
|
1695
1712
|
if (c) {
|
|
1696
1713
|
throw new N(c);
|
|
1697
1714
|
}
|
|
1698
|
-
for (c = Mb[Tb(a.id, b)]; c; c = c.
|
|
1715
|
+
for (c = Mb[Tb(a.id, b)]; c; c = c.hc) {
|
|
1699
1716
|
var d = c.name;
|
|
1700
1717
|
if (c.parent.id === a.id && d === b) {
|
|
1701
1718
|
return c;
|
|
@@ -1706,7 +1723,7 @@ function Gb(a, b) {
|
|
|
1706
1723
|
function Eb(a, b, c, d) {
|
|
1707
1724
|
a = new Pb(a, b, c, d);
|
|
1708
1725
|
b = Tb(a.parent.id, a.name);
|
|
1709
|
-
a.
|
|
1726
|
+
a.hc = Mb[b];
|
|
1710
1727
|
return Mb[b] = a;
|
|
1711
1728
|
}
|
|
1712
1729
|
function Vb(a) {
|
|
@@ -1758,7 +1775,7 @@ function Yb(a, b = -1) {
|
|
|
1758
1775
|
}
|
|
1759
1776
|
function Zb(a, b = -1) {
|
|
1760
1777
|
a = Yb(a, b);
|
|
1761
|
-
a.m?.
|
|
1778
|
+
a.m?.Kc?.(a);
|
|
1762
1779
|
return a;
|
|
1763
1780
|
}
|
|
1764
1781
|
var Db = {open(a) {
|
|
@@ -1786,11 +1803,11 @@ function $b(a, b) {
|
|
|
1786
1803
|
throw new N(54);
|
|
1787
1804
|
}
|
|
1788
1805
|
}
|
|
1789
|
-
b = {type:a,
|
|
1806
|
+
b = {type:a, Tc:{}, mb:b, fc:[]};
|
|
1790
1807
|
a = a.V(b);
|
|
1791
1808
|
a.V = b;
|
|
1792
1809
|
b.root = a;
|
|
1793
|
-
c ? Ib = a : d && (d.va = b, d.V && d.V.
|
|
1810
|
+
c ? Ib = a : d && (d.va = b, d.V && d.V.fc.push(b));
|
|
1794
1811
|
}
|
|
1795
1812
|
function fc(a, b, c) {
|
|
1796
1813
|
var d = Qb(a, {parent:!0}).node;
|
|
@@ -1901,9 +1918,9 @@ function jc(a, b, c) {
|
|
|
1901
1918
|
c.j.R(c, {size:0, timestamp:Date.now()});
|
|
1902
1919
|
}
|
|
1903
1920
|
b &= -131713;
|
|
1904
|
-
e = Yb({node:e, path:Sb(e), flags:b, seekable:!0, position:0, m:e.m,
|
|
1921
|
+
e = Yb({node:e, path:Sb(e), flags:b, seekable:!0, position:0, m:e.m, uc:[], error:!1});
|
|
1905
1922
|
e.m.open && e.m.open(e);
|
|
1906
|
-
!
|
|
1923
|
+
!l.logReadFiles || b & 1 || (kc ||= {}, a in kc || (kc[a] = 1));
|
|
1907
1924
|
return e;
|
|
1908
1925
|
}
|
|
1909
1926
|
function lc(a, b, c) {
|
|
@@ -1917,7 +1934,7 @@ function lc(a, b, c) {
|
|
|
1917
1934
|
throw new N(28);
|
|
1918
1935
|
}
|
|
1919
1936
|
a.position = a.m.ba(a, b, c);
|
|
1920
|
-
a.
|
|
1937
|
+
a.uc = [];
|
|
1921
1938
|
}
|
|
1922
1939
|
var mc;
|
|
1923
1940
|
function nc(a, b, c) {
|
|
@@ -2033,7 +2050,7 @@ var oc, pc = {}, kc, hb = void 0, qc = (a, b) => Object.defineProperty(b, "name"
|
|
|
2033
2050
|
return null;
|
|
2034
2051
|
}
|
|
2035
2052
|
a = Jc(a, b, c.C);
|
|
2036
|
-
return null === a ? null : c.
|
|
2053
|
+
return null === a ? null : c.Nb(a);
|
|
2037
2054
|
}, Kc = {}, Lc = (a, b) => {
|
|
2038
2055
|
b = Bc(a, b);
|
|
2039
2056
|
return Ac[b];
|
|
@@ -2102,7 +2119,7 @@ function Vc(a, b, c = {}) {
|
|
|
2102
2119
|
throw new P(`type "${d}" must have a positive integer typeid pointer`);
|
|
2103
2120
|
}
|
|
2104
2121
|
if (Cc.hasOwnProperty(a)) {
|
|
2105
|
-
if (c.
|
|
2122
|
+
if (c.Xb) {
|
|
2106
2123
|
return;
|
|
2107
2124
|
}
|
|
2108
2125
|
throw new P(`Cannot register type '${d}' twice`);
|
|
@@ -2135,17 +2152,17 @@ var Yc = (a, b, c) => {
|
|
|
2135
2152
|
a[b].A[d.ea] = d;
|
|
2136
2153
|
}
|
|
2137
2154
|
}, Zc = (a, b, c) => {
|
|
2138
|
-
if (
|
|
2139
|
-
if (void 0 === c || void 0 !==
|
|
2155
|
+
if (l.hasOwnProperty(a)) {
|
|
2156
|
+
if (void 0 === c || void 0 !== l[a].A && void 0 !== l[a].A[c]) {
|
|
2140
2157
|
throw new P(`Cannot register public name '${a}' twice`);
|
|
2141
2158
|
}
|
|
2142
|
-
Yc(
|
|
2143
|
-
if (
|
|
2159
|
+
Yc(l, a, a);
|
|
2160
|
+
if (l.hasOwnProperty(c)) {
|
|
2144
2161
|
throw new P(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
|
|
2145
2162
|
}
|
|
2146
|
-
|
|
2163
|
+
l[a].A[c] = b;
|
|
2147
2164
|
} else {
|
|
2148
|
-
|
|
2165
|
+
l[a] = b, void 0 !== c && (l[a].Sc = c);
|
|
2149
2166
|
}
|
|
2150
2167
|
}, $c = a => {
|
|
2151
2168
|
if (void 0 === a) {
|
|
@@ -2161,9 +2178,9 @@ function ad(a, b, c, d, e, f, g, k) {
|
|
|
2161
2178
|
this.N = c;
|
|
2162
2179
|
this.P = d;
|
|
2163
2180
|
this.C = e;
|
|
2164
|
-
this.
|
|
2181
|
+
this.Sb = f;
|
|
2165
2182
|
this.na = g;
|
|
2166
|
-
this.
|
|
2183
|
+
this.Nb = k;
|
|
2167
2184
|
this.qb = [];
|
|
2168
2185
|
}
|
|
2169
2186
|
var bd = (a, b, c) => {
|
|
@@ -2217,7 +2234,7 @@ function ed(a, b) {
|
|
|
2217
2234
|
if (void 0 === b.g.F) {
|
|
2218
2235
|
throw new P("Passing raw pointer to smart pointer is illegal");
|
|
2219
2236
|
}
|
|
2220
|
-
switch(this.
|
|
2237
|
+
switch(this.oc) {
|
|
2221
2238
|
case 0:
|
|
2222
2239
|
if (b.g.K === this) {
|
|
2223
2240
|
c = b.g.F;
|
|
@@ -2233,7 +2250,7 @@ function ed(a, b) {
|
|
|
2233
2250
|
c = b.g.F;
|
|
2234
2251
|
} else {
|
|
2235
2252
|
var d = b.clone();
|
|
2236
|
-
c = this.
|
|
2253
|
+
c = this.kc(c, tc(() => d["delete"]()));
|
|
2237
2254
|
null !== a && a.push(this.P, c);
|
|
2238
2255
|
}
|
|
2239
2256
|
break;
|
|
@@ -2267,25 +2284,25 @@ function gd(a, b, c, d, e, f, g, k, p, n, t) {
|
|
|
2267
2284
|
this.Ma = c;
|
|
2268
2285
|
this.sa = d;
|
|
2269
2286
|
this.ta = e;
|
|
2270
|
-
this.
|
|
2271
|
-
this.
|
|
2287
|
+
this.jc = f;
|
|
2288
|
+
this.oc = g;
|
|
2272
2289
|
this.rb = k;
|
|
2273
2290
|
this.Oa = p;
|
|
2274
|
-
this.
|
|
2291
|
+
this.kc = n;
|
|
2275
2292
|
this.P = t;
|
|
2276
2293
|
e || void 0 !== b.C ? this.toWireType = ed : (this.toWireType = d ? cd : fd, this.M = null);
|
|
2277
2294
|
}
|
|
2278
2295
|
var hd = (a, b, c) => {
|
|
2279
|
-
if (!
|
|
2296
|
+
if (!l.hasOwnProperty(a)) {
|
|
2280
2297
|
throw new Mc("Replacing nonexistent public symbol");
|
|
2281
2298
|
}
|
|
2282
|
-
void 0 !==
|
|
2299
|
+
void 0 !== l[a].A && void 0 !== c ? l[a].A[c] = b : (l[a] = b, l[a].ea = c);
|
|
2283
2300
|
}, jd = [], kd, ld = a => {
|
|
2284
2301
|
var b = jd[a];
|
|
2285
2302
|
b || (a >= jd.length && (jd.length = a + 1), jd[a] = b = kd.get(a));
|
|
2286
2303
|
return b;
|
|
2287
2304
|
}, md = (a, b, c = []) => {
|
|
2288
|
-
a.includes("j") ? (a = a.replace(/p/g, "i"), b = (0,
|
|
2305
|
+
a.includes("j") ? (a = a.replace(/p/g, "i"), b = (0,l["dynCall_" + a])(b, ...c)) : b = ld(b)(...c);
|
|
2289
2306
|
return b;
|
|
2290
2307
|
}, nd = (a, b) => (...c) => md(a, b, c), W = (a, b) => {
|
|
2291
2308
|
a = S(a);
|
|
@@ -2316,9 +2333,9 @@ function ud(a, b, c, d, e) {
|
|
|
2316
2333
|
throw new P("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
2317
2334
|
}
|
|
2318
2335
|
var g = null !== b[1] && null !== c, k = qd(b), p = "void" !== b[0].name, n = f - 2, t = Array(n), x = [], y = [];
|
|
2319
|
-
return qc(a, function(...
|
|
2320
|
-
if (
|
|
2321
|
-
throw new P(`function ${a} called with ${
|
|
2336
|
+
return qc(a, function(...m) {
|
|
2337
|
+
if (m.length !== n) {
|
|
2338
|
+
throw new P(`function ${a} called with ${m.length} arguments, expected ${n}`);
|
|
2322
2339
|
}
|
|
2323
2340
|
y.length = 0;
|
|
2324
2341
|
x.length = g ? 2 : 1;
|
|
@@ -2328,9 +2345,9 @@ function ud(a, b, c, d, e) {
|
|
|
2328
2345
|
x[1] = u;
|
|
2329
2346
|
}
|
|
2330
2347
|
for (var r = 0; r < n; ++r) {
|
|
2331
|
-
t[r] = b[r + 2].toWireType(y,
|
|
2348
|
+
t[r] = b[r + 2].toWireType(y, m[r]), x.push(t[r]);
|
|
2332
2349
|
}
|
|
2333
|
-
|
|
2350
|
+
m = d(...x);
|
|
2334
2351
|
if (k) {
|
|
2335
2352
|
Qc(y);
|
|
2336
2353
|
} else {
|
|
@@ -2339,7 +2356,7 @@ function ud(a, b, c, d, e) {
|
|
|
2339
2356
|
null !== b[r].M && b[r].M(D);
|
|
2340
2357
|
}
|
|
2341
2358
|
}
|
|
2342
|
-
u = p ? b[0].fromWireType(
|
|
2359
|
+
u = p ? b[0].fromWireType(m) : void 0;
|
|
2343
2360
|
return u;
|
|
2344
2361
|
});
|
|
2345
2362
|
}
|
|
@@ -2522,90 +2539,90 @@ var vd = (a, b) => {
|
|
|
2522
2539
|
}
|
|
2523
2540
|
return Wd;
|
|
2524
2541
|
}, Wd, Yd = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Zd = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], $d = (a, b, c, d) => {
|
|
2525
|
-
function e(
|
|
2526
|
-
for (
|
|
2527
|
-
|
|
2542
|
+
function e(m, u, r) {
|
|
2543
|
+
for (m = "number" == typeof m ? m.toString() : m || ""; m.length < u;) {
|
|
2544
|
+
m = r[0] + m;
|
|
2528
2545
|
}
|
|
2529
|
-
return
|
|
2546
|
+
return m;
|
|
2530
2547
|
}
|
|
2531
|
-
function f(
|
|
2532
|
-
return e(
|
|
2548
|
+
function f(m, u) {
|
|
2549
|
+
return e(m, u, "0");
|
|
2533
2550
|
}
|
|
2534
|
-
function g(
|
|
2551
|
+
function g(m, u) {
|
|
2535
2552
|
function r(I) {
|
|
2536
2553
|
return 0 > I ? -1 : 0 < I ? 1 : 0;
|
|
2537
2554
|
}
|
|
2538
2555
|
var D;
|
|
2539
|
-
0 === (D = r(
|
|
2556
|
+
0 === (D = r(m.getFullYear() - u.getFullYear())) && 0 === (D = r(m.getMonth() - u.getMonth())) && (D = r(m.getDate() - u.getDate()));
|
|
2540
2557
|
return D;
|
|
2541
2558
|
}
|
|
2542
|
-
function k(
|
|
2543
|
-
switch(
|
|
2559
|
+
function k(m) {
|
|
2560
|
+
switch(m.getDay()) {
|
|
2544
2561
|
case 0:
|
|
2545
|
-
return new Date(
|
|
2562
|
+
return new Date(m.getFullYear() - 1, 11, 29);
|
|
2546
2563
|
case 1:
|
|
2547
|
-
return
|
|
2564
|
+
return m;
|
|
2548
2565
|
case 2:
|
|
2549
|
-
return new Date(
|
|
2566
|
+
return new Date(m.getFullYear(), 0, 3);
|
|
2550
2567
|
case 3:
|
|
2551
|
-
return new Date(
|
|
2568
|
+
return new Date(m.getFullYear(), 0, 2);
|
|
2552
2569
|
case 4:
|
|
2553
|
-
return new Date(
|
|
2570
|
+
return new Date(m.getFullYear(), 0, 1);
|
|
2554
2571
|
case 5:
|
|
2555
|
-
return new Date(
|
|
2572
|
+
return new Date(m.getFullYear() - 1, 11, 31);
|
|
2556
2573
|
case 6:
|
|
2557
|
-
return new Date(
|
|
2574
|
+
return new Date(m.getFullYear() - 1, 11, 30);
|
|
2558
2575
|
}
|
|
2559
2576
|
}
|
|
2560
|
-
function p(
|
|
2561
|
-
var u =
|
|
2562
|
-
for (
|
|
2563
|
-
var r =
|
|
2564
|
-
if (u > D -
|
|
2565
|
-
u -= D -
|
|
2577
|
+
function p(m) {
|
|
2578
|
+
var u = m.ca;
|
|
2579
|
+
for (m = new Date((new Date(m.da + 1900, 0, 1)).getTime()); 0 < u;) {
|
|
2580
|
+
var r = m.getMonth(), D = (Rd(m.getFullYear()) ? Yd : Zd)[r];
|
|
2581
|
+
if (u > D - m.getDate()) {
|
|
2582
|
+
u -= D - m.getDate() + 1, m.setDate(1), 11 > r ? m.setMonth(r + 1) : (m.setMonth(0), m.setFullYear(m.getFullYear() + 1));
|
|
2566
2583
|
} else {
|
|
2567
|
-
|
|
2584
|
+
m.setDate(m.getDate() + u);
|
|
2568
2585
|
break;
|
|
2569
2586
|
}
|
|
2570
2587
|
}
|
|
2571
|
-
r = new Date(
|
|
2572
|
-
u = k(new Date(
|
|
2588
|
+
r = new Date(m.getFullYear() + 1, 0, 4);
|
|
2589
|
+
u = k(new Date(m.getFullYear(), 0, 4));
|
|
2573
2590
|
r = k(r);
|
|
2574
|
-
return 0 >= g(u,
|
|
2591
|
+
return 0 >= g(u, m) ? 0 >= g(r, m) ? m.getFullYear() + 1 : m.getFullYear() : m.getFullYear() - 1;
|
|
2575
2592
|
}
|
|
2576
2593
|
var n = F[d + 40 >> 2];
|
|
2577
|
-
d = {
|
|
2594
|
+
d = {rc:C[d >> 2], qc:C[d + 4 >> 2], Ea:C[d + 8 >> 2], Ra:C[d + 12 >> 2], Fa:C[d + 16 >> 2], da:C[d + 20 >> 2], S:C[d + 24 >> 2], ca:C[d + 28 >> 2], Vc:C[d + 32 >> 2], pc:C[d + 36 >> 2], sc:n ? n ? qb(B, n) : "" : ""};
|
|
2578
2595
|
c = c ? qb(B, c) : "";
|
|
2579
2596
|
n = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y",};
|
|
2580
2597
|
for (var t in n) {
|
|
2581
2598
|
c = c.replace(new RegExp(t, "g"), n[t]);
|
|
2582
2599
|
}
|
|
2583
2600
|
var x = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), y = "January February March April May June July August September October November December".split(" ");
|
|
2584
|
-
n = {"%a":
|
|
2585
|
-
|
|
2586
|
-
0 ==
|
|
2587
|
-
return f(
|
|
2588
|
-
}, "%j":
|
|
2589
|
-
for (var u = 0, r = 0; r <=
|
|
2590
|
-
}
|
|
2591
|
-
return f(
|
|
2592
|
-
}, "%m":
|
|
2593
|
-
var u = Math.floor((
|
|
2594
|
-
2 >= (
|
|
2601
|
+
n = {"%a":m => x[m.S].substring(0, 3), "%A":m => x[m.S], "%b":m => y[m.Fa].substring(0, 3), "%B":m => y[m.Fa], "%C":m => f((m.da + 1900) / 100 | 0, 2), "%d":m => f(m.Ra, 2), "%e":m => e(m.Ra, 2, " "), "%g":m => p(m).toString().substring(2), "%G":p, "%H":m => f(m.Ea, 2), "%I":m => {
|
|
2602
|
+
m = m.Ea;
|
|
2603
|
+
0 == m ? m = 12 : 12 < m && (m -= 12);
|
|
2604
|
+
return f(m, 2);
|
|
2605
|
+
}, "%j":m => {
|
|
2606
|
+
for (var u = 0, r = 0; r <= m.Fa - 1; u += (Rd(m.da + 1900) ? Yd : Zd)[r++]) {
|
|
2607
|
+
}
|
|
2608
|
+
return f(m.Ra + u, 3);
|
|
2609
|
+
}, "%m":m => f(m.Fa + 1, 2), "%M":m => f(m.qc, 2), "%n":() => "\n", "%p":m => 0 <= m.Ea && 12 > m.Ea ? "AM" : "PM", "%S":m => f(m.rc, 2), "%t":() => "\t", "%u":m => m.S || 7, "%U":m => f(Math.floor((m.ca + 7 - m.S) / 7), 2), "%V":m => {
|
|
2610
|
+
var u = Math.floor((m.ca + 7 - (m.S + 6) % 7) / 7);
|
|
2611
|
+
2 >= (m.S + 371 - m.ca - 2) % 7 && u++;
|
|
2595
2612
|
if (u) {
|
|
2596
|
-
53 == u && (r = (
|
|
2613
|
+
53 == u && (r = (m.S + 371 - m.ca) % 7, 4 == r || 3 == r && Rd(m.da) || (u = 1));
|
|
2597
2614
|
} else {
|
|
2598
2615
|
u = 52;
|
|
2599
|
-
var r = (
|
|
2600
|
-
(4 == r || 5 == r && Rd(
|
|
2616
|
+
var r = (m.S + 7 - m.ca - 1) % 7;
|
|
2617
|
+
(4 == r || 5 == r && Rd(m.da % 400 - 1)) && u++;
|
|
2601
2618
|
}
|
|
2602
2619
|
return f(u, 2);
|
|
2603
|
-
}, "%w":
|
|
2604
|
-
|
|
2605
|
-
var u = 0 <=
|
|
2606
|
-
|
|
2607
|
-
return (u ? "+" : "-") + String("0000" + (
|
|
2608
|
-
}, "%Z":
|
|
2620
|
+
}, "%w":m => m.S, "%W":m => f(Math.floor((m.ca + 7 - (m.S + 6) % 7) / 7), 2), "%y":m => (m.da + 1900).toString().substring(2), "%Y":m => m.da + 1900, "%z":m => {
|
|
2621
|
+
m = m.pc;
|
|
2622
|
+
var u = 0 <= m;
|
|
2623
|
+
m = Math.abs(m) / 60;
|
|
2624
|
+
return (u ? "+" : "-") + String("0000" + (m / 60 * 100 + m % 60)).slice(-4);
|
|
2625
|
+
}, "%Z":m => m.sc, "%%":() => "%"};
|
|
2609
2626
|
c = c.replace(/%%/g, "\x00\x00");
|
|
2610
2627
|
for (t in n) {
|
|
2611
2628
|
c.includes(t) && (c = c.replace(new RegExp(t, "g"), n[t](d)));
|
|
@@ -2658,33 +2675,33 @@ gc("/home/web_user");
|
|
|
2658
2675
|
return b;
|
|
2659
2676
|
}}, "/proc/self/fd");
|
|
2660
2677
|
})();
|
|
2661
|
-
P =
|
|
2678
|
+
P = l.BindingError = class extends Error {
|
|
2662
2679
|
constructor(a) {
|
|
2663
2680
|
super(a);
|
|
2664
2681
|
this.name = "BindingError";
|
|
2665
2682
|
}
|
|
2666
2683
|
};
|
|
2667
2684
|
sc.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1,);
|
|
2668
|
-
|
|
2669
|
-
vc =
|
|
2685
|
+
l.count_emval_handles = () => sc.length / 2 - 5 - rc.length;
|
|
2686
|
+
vc = l.PureVirtualError = uc("PureVirtualError");
|
|
2670
2687
|
for (var ae = Array(256), be = 0; 256 > be; ++be) {
|
|
2671
2688
|
ae[be] = String.fromCharCode(be);
|
|
2672
2689
|
}
|
|
2673
2690
|
wc = ae;
|
|
2674
|
-
|
|
2675
|
-
|
|
2691
|
+
l.getInheritedInstanceCount = () => Object.keys(Ac).length;
|
|
2692
|
+
l.getLiveInheritedInstances = () => {
|
|
2676
2693
|
var a = [], b;
|
|
2677
2694
|
for (b in Ac) {
|
|
2678
2695
|
Ac.hasOwnProperty(b) && a.push(Ac[b]);
|
|
2679
2696
|
}
|
|
2680
2697
|
return a;
|
|
2681
2698
|
};
|
|
2682
|
-
|
|
2683
|
-
|
|
2699
|
+
l.flushPendingDeletes = yc;
|
|
2700
|
+
l.setDelayFunction = a => {
|
|
2684
2701
|
zc = a;
|
|
2685
2702
|
xc.length && zc && zc(yc);
|
|
2686
2703
|
};
|
|
2687
|
-
Mc =
|
|
2704
|
+
Mc = l.InternalError = class extends Error {
|
|
2688
2705
|
constructor(a) {
|
|
2689
2706
|
super(a);
|
|
2690
2707
|
this.name = "InternalError";
|
|
@@ -2736,16 +2753,16 @@ Object.assign(Xc.prototype, {isAliasOf:function(a) {
|
|
|
2736
2753
|
this.g.fa = !0;
|
|
2737
2754
|
return this;
|
|
2738
2755
|
},});
|
|
2739
|
-
Object.assign(gd.prototype, {
|
|
2756
|
+
Object.assign(gd.prototype, {Tb(a) {
|
|
2740
2757
|
this.rb && (a = this.rb(a));
|
|
2741
2758
|
return a;
|
|
2742
2759
|
}, bb(a) {
|
|
2743
2760
|
this.P?.(a);
|
|
2744
2761
|
}, argPackAdvance:8, readValueFromPointer:Rc, fromWireType:function(a) {
|
|
2745
2762
|
function b() {
|
|
2746
|
-
return this.ta ? Oc(this.i.N, {u:this.
|
|
2763
|
+
return this.ta ? Oc(this.i.N, {u:this.jc, o:c, K:this, F:a,}) : Oc(this.i.N, {u:this, o:a,});
|
|
2747
2764
|
}
|
|
2748
|
-
var c = this.
|
|
2765
|
+
var c = this.Tb(a);
|
|
2749
2766
|
if (!c) {
|
|
2750
2767
|
return this.bb(a), null;
|
|
2751
2768
|
}
|
|
@@ -2758,16 +2775,16 @@ Object.assign(gd.prototype, {Sb(a) {
|
|
|
2758
2775
|
this.bb(a);
|
|
2759
2776
|
return d;
|
|
2760
2777
|
}
|
|
2761
|
-
d = this.i.
|
|
2778
|
+
d = this.i.Sb(c);
|
|
2762
2779
|
d = Kc[d];
|
|
2763
2780
|
if (!d) {
|
|
2764
2781
|
return b.call(this);
|
|
2765
2782
|
}
|
|
2766
|
-
d = this.sa ? d.
|
|
2783
|
+
d = this.sa ? d.Jb : d.pointerType;
|
|
2767
2784
|
var e = Jc(c, this.i, d.i);
|
|
2768
2785
|
return null === e ? b.call(this) : this.ta ? Oc(d.i.N, {u:d, o:e, K:this, F:a,}) : Oc(d.i.N, {u:d, o:e,});
|
|
2769
2786
|
},});
|
|
2770
|
-
od =
|
|
2787
|
+
od = l.UnboundTypeError = uc("UnboundTypeError");
|
|
2771
2788
|
var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
2772
2789
|
hb = c;
|
|
2773
2790
|
try {
|
|
@@ -2813,7 +2830,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2813
2830
|
if (!d.s) {
|
|
2814
2831
|
return -59;
|
|
2815
2832
|
}
|
|
2816
|
-
if (d.s.W.
|
|
2833
|
+
if (d.s.W.Zb) {
|
|
2817
2834
|
a = [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,];
|
|
2818
2835
|
var e = gb();
|
|
2819
2836
|
C[e >> 2] = 25856;
|
|
@@ -2835,7 +2852,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2835
2852
|
if (!d.s) {
|
|
2836
2853
|
return -59;
|
|
2837
2854
|
}
|
|
2838
|
-
if (d.s.W
|
|
2855
|
+
if (d.s.W.$b) {
|
|
2839
2856
|
for (e = gb(), a = [], f = 0; 32 > f; f++) {
|
|
2840
2857
|
a.push(z[e + f + 17]);
|
|
2841
2858
|
}
|
|
@@ -2851,15 +2868,15 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2851
2868
|
return d.s ? -28 : -59;
|
|
2852
2869
|
case 21531:
|
|
2853
2870
|
e = gb();
|
|
2854
|
-
if (!d.m.
|
|
2871
|
+
if (!d.m.Yb) {
|
|
2855
2872
|
throw new N(59);
|
|
2856
2873
|
}
|
|
2857
|
-
return d.m.
|
|
2874
|
+
return d.m.Yb(d, b, e);
|
|
2858
2875
|
case 21523:
|
|
2859
2876
|
if (!d.s) {
|
|
2860
2877
|
return -59;
|
|
2861
2878
|
}
|
|
2862
|
-
d.s.W
|
|
2879
|
+
d.s.W.ac && (f = [24, 80], e = gb(), Fa[e >> 1] = f[0], Fa[e + 2 >> 1] = f[1]);
|
|
2863
2880
|
return 0;
|
|
2864
2881
|
case 21524:
|
|
2865
2882
|
return d.s ? 0 : -59;
|
|
@@ -2949,14 +2966,14 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2949
2966
|
}, _embind_finalize_value_object:a => {
|
|
2950
2967
|
var b = Pc[a];
|
|
2951
2968
|
delete Pc[a];
|
|
2952
|
-
var c = b.Oa, d = b.P, e = b.fb, f = e.map(g => g.
|
|
2969
|
+
var c = b.Oa, d = b.P, e = b.fb, f = e.map(g => g.Wb).concat(e.map(g => g.mc));
|
|
2953
2970
|
U([a], f, g => {
|
|
2954
2971
|
var k = {};
|
|
2955
2972
|
e.forEach((p, n) => {
|
|
2956
|
-
var t = g[n], x = p.
|
|
2957
|
-
k[p.
|
|
2973
|
+
var t = g[n], x = p.Ub, y = p.Vb, m = g[n + e.length], u = p.lc, r = p.nc;
|
|
2974
|
+
k[p.Qb] = {read:D => t.fromWireType(x(y, D)), write:(D, I) => {
|
|
2958
2975
|
var w = [];
|
|
2959
|
-
u(r, D,
|
|
2976
|
+
u(r, D, m.toWireType(w, I));
|
|
2960
2977
|
Qc(w);
|
|
2961
2978
|
}};
|
|
2962
2979
|
});
|
|
@@ -2997,8 +3014,8 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2997
3014
|
k &&= W(g, k);
|
|
2998
3015
|
n &&= W(p, n);
|
|
2999
3016
|
y = W(x, y);
|
|
3000
|
-
var
|
|
3001
|
-
Zc(
|
|
3017
|
+
var m = $c(t);
|
|
3018
|
+
Zc(m, function() {
|
|
3002
3019
|
pd(`Cannot construct ${t} due to unbound types`, [d]);
|
|
3003
3020
|
});
|
|
3004
3021
|
U([a, b, c], d ? [d] : [], u => {
|
|
@@ -3033,8 +3050,8 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3033
3050
|
r = new gd(t, w, !0, !1, !1);
|
|
3034
3051
|
L = new gd(t + "*", w, !1, !1, !1);
|
|
3035
3052
|
D = new gd(t + " const*", w, !1, !0, !1);
|
|
3036
|
-
Kc[a] = {pointerType:L,
|
|
3037
|
-
hd(
|
|
3053
|
+
Kc[a] = {pointerType:L, Jb:D};
|
|
3054
|
+
hd(m, u);
|
|
3038
3055
|
return [r, L, D];
|
|
3039
3056
|
});
|
|
3040
3057
|
}, _embind_register_class_class_function:(a, b, c, d, e, f, g) => {
|
|
@@ -3055,8 +3072,8 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3055
3072
|
y = ud(t, [y[0], null].concat(y.slice(1)), null, f, g);
|
|
3056
3073
|
void 0 === x[b].A ? (y.ea = c - 1, x[b] = y) : x[b].A[c - 1] = y;
|
|
3057
3074
|
if (p.i.oa) {
|
|
3058
|
-
for (const
|
|
3059
|
-
|
|
3075
|
+
for (const m of p.i.oa) {
|
|
3076
|
+
m.constructor.hasOwnProperty(b) || (m.constructor[b] = y);
|
|
3060
3077
|
}
|
|
3061
3078
|
}
|
|
3062
3079
|
return [];
|
|
@@ -3082,9 +3099,9 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3082
3099
|
var y = {get() {
|
|
3083
3100
|
return x.fromWireType(f(d));
|
|
3084
3101
|
}, enumerable:!0};
|
|
3085
|
-
k && (k = W(g, k), y.set =
|
|
3102
|
+
k && (k = W(g, k), y.set = m => {
|
|
3086
3103
|
var u = [];
|
|
3087
|
-
k(d, x.toWireType(u,
|
|
3104
|
+
k(d, x.toWireType(u, m));
|
|
3088
3105
|
Qc(u);
|
|
3089
3106
|
});
|
|
3090
3107
|
Object.defineProperty(p.i.constructor, b, y);
|
|
@@ -3125,8 +3142,8 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3125
3142
|
var x = `${n.name}.${b}`;
|
|
3126
3143
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
3127
3144
|
k && n.i.qb.push(b);
|
|
3128
|
-
var y = n.i.N,
|
|
3129
|
-
void 0 ===
|
|
3145
|
+
var y = n.i.N, m = y[b];
|
|
3146
|
+
void 0 === m || void 0 === m.A && m.className !== n.name && m.ea === c - 2 ? (t.ea = c - 2, t.className = n.name, y[b] = t) : (Yc(y, b, x), y[b].A[c - 2] = t);
|
|
3130
3147
|
U([], p, u => {
|
|
3131
3148
|
u = ud(x, u, n, f, g);
|
|
3132
3149
|
void 0 === y[b].A ? (u.ea = c - 2, y[b] = u) : y[b].A[c - 2] = u;
|
|
@@ -3146,14 +3163,14 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3146
3163
|
throw new P(x + " is a read-only property");
|
|
3147
3164
|
};
|
|
3148
3165
|
Object.defineProperty(t.i.N, b, y);
|
|
3149
|
-
U([], p ? [c, g] : [c],
|
|
3150
|
-
var u =
|
|
3166
|
+
U([], p ? [c, g] : [c], m => {
|
|
3167
|
+
var u = m[0], r = {get() {
|
|
3151
3168
|
var I = xd(this, t, x + " getter");
|
|
3152
3169
|
return u.fromWireType(e(f, I));
|
|
3153
3170
|
}, enumerable:!0};
|
|
3154
3171
|
if (p) {
|
|
3155
3172
|
p = W(k, p);
|
|
3156
|
-
var D =
|
|
3173
|
+
var D = m[1];
|
|
3157
3174
|
r.set = function(I) {
|
|
3158
3175
|
var w = xd(this, t, x + " setter"), L = [];
|
|
3159
3176
|
p(n, w, D.toWireType(L, I));
|
|
@@ -3217,7 +3234,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3217
3234
|
}
|
|
3218
3235
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b];
|
|
3219
3236
|
c = S(c);
|
|
3220
|
-
Uc(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {
|
|
3237
|
+
Uc(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Xb:!0,});
|
|
3221
3238
|
}, _embind_register_std_string:(a, b) => {
|
|
3222
3239
|
b = S(b);
|
|
3223
3240
|
var c = "std::string" === b;
|
|
@@ -3310,10 +3327,10 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3310
3327
|
}, _embind_register_value_object:(a, b, c, d, e, f) => {
|
|
3311
3328
|
Pc[a] = {name:S(b), Oa:W(c, d), P:W(e, f), fb:[],};
|
|
3312
3329
|
}, _embind_register_value_object_field:(a, b, c, d, e, f, g, k, p, n) => {
|
|
3313
|
-
Pc[a].fb.push({
|
|
3330
|
+
Pc[a].fb.push({Qb:S(b), Wb:c, Ub:W(d, e), Vb:f, mc:g, lc:W(k, p), nc:n,});
|
|
3314
3331
|
}, _embind_register_void:(a, b) => {
|
|
3315
3332
|
b = S(b);
|
|
3316
|
-
Uc(a, {
|
|
3333
|
+
Uc(a, {Oc:!0, name:b, argPackAdvance:0, fromWireType:() => {
|
|
3317
3334
|
}, toWireType:() => {
|
|
3318
3335
|
},});
|
|
3319
3336
|
}, _emscripten_get_now_is_monotonic:() => 1, _emscripten_memcpy_js:(a, b, c) => B.copyWithin(a, b, b + c), _emscripten_throw_longjmp:() => {
|
|
@@ -3345,7 +3362,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3345
3362
|
}));
|
|
3346
3363
|
}, _emval_get_module_property:a => {
|
|
3347
3364
|
a = Nd(a);
|
|
3348
|
-
return tc(
|
|
3365
|
+
return tc(l[a]);
|
|
3349
3366
|
}, _emval_get_property:(a, b) => {
|
|
3350
3367
|
a = Q(a);
|
|
3351
3368
|
b = Q(b);
|
|
@@ -3507,9 +3524,9 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3507
3524
|
} else if (!n.seekable) {
|
|
3508
3525
|
throw new N(70);
|
|
3509
3526
|
}
|
|
3510
|
-
var
|
|
3511
|
-
y || (n.position +=
|
|
3512
|
-
var u =
|
|
3527
|
+
var m = n.m.read(n, x, k, p, t);
|
|
3528
|
+
y || (n.position += m);
|
|
3529
|
+
var u = m;
|
|
3513
3530
|
if (0 > u) {
|
|
3514
3531
|
var r = -1;
|
|
3515
3532
|
break a;
|
|
@@ -3557,7 +3574,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3557
3574
|
for (var f, g = b = 0; g < c; g++) {
|
|
3558
3575
|
var k = F[a >> 2], p = F[a + 4 >> 2];
|
|
3559
3576
|
a += 8;
|
|
3560
|
-
var n = e, t = k, x = p, y = f,
|
|
3577
|
+
var n = e, t = k, x = p, y = f, m = z;
|
|
3561
3578
|
if (0 > x || 0 > y) {
|
|
3562
3579
|
throw new N(28);
|
|
3563
3580
|
}
|
|
@@ -3580,7 +3597,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3580
3597
|
} else if (!n.seekable) {
|
|
3581
3598
|
throw new N(70);
|
|
3582
3599
|
}
|
|
3583
|
-
var r = n.m.write(n,
|
|
3600
|
+
var r = n.m.write(n, m, t, x, y, void 0);
|
|
3584
3601
|
u || (n.position += r);
|
|
3585
3602
|
var D = r;
|
|
3586
3603
|
if (0 > D) {
|
|
@@ -3602,7 +3619,25 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3602
3619
|
}
|
|
3603
3620
|
}, invoke_vii:de, isWindowsBrowser:function() {
|
|
3604
3621
|
return -1 < navigator.platform.indexOf("Win");
|
|
3605
|
-
}, strftime:$d, strftime_l:(a, b, c, d) => $d(a, b, c, d)
|
|
3622
|
+
}, strftime:$d, strftime_l:(a, b, c, d) => $d(a, b, c, d), wasm_start_image_decode:function(a, b, c) {
|
|
3623
|
+
b = l.HEAP8.subarray(b, b + c);
|
|
3624
|
+
c = new Uint8Array(c);
|
|
3625
|
+
c.set(b);
|
|
3626
|
+
createImageBitmap(new Blob([c])).then(function(d) {
|
|
3627
|
+
var e = (new OffscreenCanvas(d.width, d.height)).getContext("2d");
|
|
3628
|
+
e.drawImage(d, 0, 0);
|
|
3629
|
+
e = e.getImageData(0, 0, d.width, d.height);
|
|
3630
|
+
var f = e.data.length, g = l.Fb(f);
|
|
3631
|
+
l.wc.set(e.data, g);
|
|
3632
|
+
l.yc(a, d.width, d.height, g, f);
|
|
3633
|
+
}).catch(function(d) {
|
|
3634
|
+
d = d.message || "decode failed";
|
|
3635
|
+
var e = l.Pc(d) + 1, f = l.Fb(e);
|
|
3636
|
+
l.Uc(d, f, e);
|
|
3637
|
+
l.zc(a, f);
|
|
3638
|
+
l.xc(f);
|
|
3639
|
+
});
|
|
3640
|
+
}}, Z = function() {
|
|
3606
3641
|
function a(c) {
|
|
3607
3642
|
Z = c.exports;
|
|
3608
3643
|
Da = Z.memory;
|
|
@@ -3610,38 +3645,41 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3610
3645
|
kd = Z.__indirect_function_table;
|
|
3611
3646
|
Na.unshift(Z.__wasm_call_ctors);
|
|
3612
3647
|
Qa--;
|
|
3613
|
-
|
|
3648
|
+
l.monitorRunDependencies?.(Qa);
|
|
3614
3649
|
0 == Qa && (null !== Ra && (clearInterval(Ra), Ra = null), Sa && (c = Sa, Sa = null, c()));
|
|
3615
3650
|
return Z;
|
|
3616
3651
|
}
|
|
3617
3652
|
var b = {env:ee, wasi_snapshot_preview1:ee,};
|
|
3618
3653
|
Qa++;
|
|
3619
|
-
|
|
3620
|
-
if (
|
|
3654
|
+
l.monitorRunDependencies?.(Qa);
|
|
3655
|
+
if (l.instantiateWasm) {
|
|
3621
3656
|
try {
|
|
3622
|
-
return
|
|
3657
|
+
return l.instantiateWasm(b, a);
|
|
3623
3658
|
} catch (c) {
|
|
3624
3659
|
Ba(`Module.instantiateWasm callback failed with error: ${c}`), da(c);
|
|
3625
3660
|
}
|
|
3626
3661
|
}
|
|
3627
|
-
Va ||= Ua("canvas_advanced.wasm") ? "canvas_advanced.wasm" :
|
|
3662
|
+
Va ||= Ua("canvas_advanced.wasm") ? "canvas_advanced.wasm" : l.locateFile ? l.locateFile("canvas_advanced.wasm", ua) : ua + "canvas_advanced.wasm";
|
|
3628
3663
|
Za(b, function(c) {
|
|
3629
3664
|
a(c.instance);
|
|
3630
3665
|
}).catch(da);
|
|
3631
3666
|
return {};
|
|
3632
|
-
}(), Ec = a => (Ec = Z.free)(a), ce = a => (ce = Z.malloc)(a), Dc = a => (Dc = Z.__getTypeName)(a)
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
var
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3667
|
+
}(), Ec = a => (Ec = Z.free)(a), ce = a => (ce = Z.malloc)(a), Dc = a => (Dc = Z.__getTypeName)(a);
|
|
3668
|
+
l._wasm_image_decode_complete = (a, b, c, d, e) => (l._wasm_image_decode_complete = Z.wasm_image_decode_complete)(a, b, c, d, e);
|
|
3669
|
+
l._wasm_image_decode_error = (a, b) => (l._wasm_image_decode_error = Z.wasm_image_decode_error)(a, b);
|
|
3670
|
+
var bb = l._ma_device__on_notification_unlocked = a => (bb = l._ma_device__on_notification_unlocked = Z.ma_device__on_notification_unlocked)(a);
|
|
3671
|
+
l._ma_malloc_emscripten = (a, b) => (l._ma_malloc_emscripten = Z.ma_malloc_emscripten)(a, b);
|
|
3672
|
+
l._ma_free_emscripten = (a, b) => (l._ma_free_emscripten = Z.ma_free_emscripten)(a, b);
|
|
3673
|
+
var cb = l._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (cb = l._ma_device_process_pcm_frames_capture__webaudio = Z.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), db = l._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (db = l._ma_device_process_pcm_frames_playback__webaudio = Z.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), fe = (a, b) => (fe = Z.setThrew)(a, b), ge = a => (ge = Z._emscripten_stack_restore)(a), he = () => (he = Z.emscripten_stack_get_current)();
|
|
3674
|
+
l.dynCall_iiji = (a, b, c, d, e) => (l.dynCall_iiji = Z.dynCall_iiji)(a, b, c, d, e);
|
|
3675
|
+
l.dynCall_jiji = (a, b, c, d, e) => (l.dynCall_jiji = Z.dynCall_jiji)(a, b, c, d, e);
|
|
3676
|
+
l.dynCall_iiiji = (a, b, c, d, e, f) => (l.dynCall_iiiji = Z.dynCall_iiiji)(a, b, c, d, e, f);
|
|
3677
|
+
l.dynCall_iij = (a, b, c, d) => (l.dynCall_iij = Z.dynCall_iij)(a, b, c, d);
|
|
3678
|
+
l.dynCall_jii = (a, b, c) => (l.dynCall_jii = Z.dynCall_jii)(a, b, c);
|
|
3679
|
+
l.dynCall_viijii = (a, b, c, d, e, f, g) => (l.dynCall_viijii = Z.dynCall_viijii)(a, b, c, d, e, f, g);
|
|
3680
|
+
l.dynCall_iiiiij = (a, b, c, d, e, f, g) => (l.dynCall_iiiiij = Z.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3681
|
+
l.dynCall_iiiiijj = (a, b, c, d, e, f, g, k, p) => (l.dynCall_iiiiijj = Z.dynCall_iiiiijj)(a, b, c, d, e, f, g, k, p);
|
|
3682
|
+
l.dynCall_iiiiiijj = (a, b, c, d, e, f, g, k, p, n) => (l.dynCall_iiiiiijj = Z.dynCall_iiiiiijj)(a, b, c, d, e, f, g, k, p, n);
|
|
3645
3683
|
function de(a, b, c) {
|
|
3646
3684
|
var d = he();
|
|
3647
3685
|
try {
|
|
@@ -3661,17 +3699,17 @@ Sa = function je() {
|
|
|
3661
3699
|
};
|
|
3662
3700
|
function ke() {
|
|
3663
3701
|
function a() {
|
|
3664
|
-
if (!ie && (ie = !0,
|
|
3665
|
-
|
|
3702
|
+
if (!ie && (ie = !0, l.calledRun = !0, !Ea)) {
|
|
3703
|
+
l.noFSInit || mc || (mc = !0, l.stdin = l.stdin, l.stdout = l.stdout, l.stderr = l.stderr, l.stdin ? nc("stdin", l.stdin) : ic("/dev/tty", "/dev/stdin"), l.stdout ? nc("stdout", null, l.stdout) : ic("/dev/tty", "/dev/stdout"), l.stderr ? nc("stderr", null, l.stderr) : ic("/dev/tty1", "/dev/stderr"), jc("/dev/stdin", 0), jc("/dev/stdout", 1), jc("/dev/stderr", 1));
|
|
3666
3704
|
Nb = !1;
|
|
3667
3705
|
fb(Na);
|
|
3668
|
-
ca(
|
|
3669
|
-
if (
|
|
3670
|
-
|
|
3706
|
+
ca(l);
|
|
3707
|
+
if (l.onRuntimeInitialized) {
|
|
3708
|
+
l.onRuntimeInitialized();
|
|
3671
3709
|
}
|
|
3672
|
-
if (
|
|
3673
|
-
for ("function" == typeof
|
|
3674
|
-
var b =
|
|
3710
|
+
if (l.postRun) {
|
|
3711
|
+
for ("function" == typeof l.postRun && (l.postRun = [l.postRun]); l.postRun.length;) {
|
|
3712
|
+
var b = l.postRun.shift();
|
|
3675
3713
|
Oa.unshift(b);
|
|
3676
3714
|
}
|
|
3677
3715
|
}
|
|
@@ -3679,23 +3717,23 @@ function ke() {
|
|
|
3679
3717
|
}
|
|
3680
3718
|
}
|
|
3681
3719
|
if (!(0 < Qa)) {
|
|
3682
|
-
if (
|
|
3683
|
-
for ("function" == typeof
|
|
3720
|
+
if (l.preRun) {
|
|
3721
|
+
for ("function" == typeof l.preRun && (l.preRun = [l.preRun]); l.preRun.length;) {
|
|
3684
3722
|
Pa();
|
|
3685
3723
|
}
|
|
3686
3724
|
}
|
|
3687
3725
|
fb(Ma);
|
|
3688
|
-
0 < Qa || (
|
|
3726
|
+
0 < Qa || (l.setStatus ? (l.setStatus("Running..."), setTimeout(function() {
|
|
3689
3727
|
setTimeout(function() {
|
|
3690
|
-
|
|
3728
|
+
l.setStatus("");
|
|
3691
3729
|
}, 1);
|
|
3692
3730
|
a();
|
|
3693
3731
|
}, 1)) : a());
|
|
3694
3732
|
}
|
|
3695
3733
|
}
|
|
3696
|
-
if (
|
|
3697
|
-
for ("function" == typeof
|
|
3698
|
-
|
|
3734
|
+
if (l.preInit) {
|
|
3735
|
+
for ("function" == typeof l.preInit && (l.preInit = [l.preInit]); 0 < l.preInit.length;) {
|
|
3736
|
+
l.preInit.pop()();
|
|
3699
3737
|
}
|
|
3700
3738
|
}
|
|
3701
3739
|
ke();
|
|
@@ -3714,7 +3752,7 @@ moduleRtn = ea;
|
|
|
3714
3752
|
/* 5 */
|
|
3715
3753
|
/***/ ((module) => {
|
|
3716
3754
|
|
|
3717
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.37.
|
|
3755
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.37.7","description":"Rive\'s canvas 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)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3718
3756
|
|
|
3719
3757
|
/***/ }),
|
|
3720
3758
|
/* 6 */
|
|
@@ -5068,7 +5106,8 @@ var Animator = /** @class */ (function () {
|
|
|
5068
5106
|
* @param animatables the name(s) of animations to add
|
|
5069
5107
|
* @param playing whether animations should play on instantiation
|
|
5070
5108
|
*/
|
|
5071
|
-
Animator.prototype.initLinearAnimations = function (animatables, playing) {
|
|
5109
|
+
Animator.prototype.initLinearAnimations = function (animatables, playing, isFallingBackFromStateMachines) {
|
|
5110
|
+
if (isFallingBackFromStateMachines === void 0) { isFallingBackFromStateMachines = false; }
|
|
5072
5111
|
// Play/pause already instanced items, or create new instances
|
|
5073
5112
|
// This validation is kept to maintain compatibility with current behavior.
|
|
5074
5113
|
// But given that it this is called during artboard initialization
|
|
@@ -5089,6 +5128,10 @@ var Animator = /** @class */ (function () {
|
|
|
5089
5128
|
newAnimation.apply(1.0);
|
|
5090
5129
|
this.animations.push(newAnimation);
|
|
5091
5130
|
}
|
|
5131
|
+
else if (isFallingBackFromStateMachines) { // Throw LoadError if we cannot load the state machine name at all
|
|
5132
|
+
var smInitializationMessage = "State Machine with name ".concat(animatables[i], " not found");
|
|
5133
|
+
throw new RiveError(smInitializationMessage);
|
|
5134
|
+
}
|
|
5092
5135
|
else {
|
|
5093
5136
|
console.error("Animation with name ".concat(animatables[i], " not found."));
|
|
5094
5137
|
}
|
|
@@ -5119,10 +5162,11 @@ var Animator = /** @class */ (function () {
|
|
|
5119
5162
|
this.stateMachines.push(newStateMachine);
|
|
5120
5163
|
}
|
|
5121
5164
|
else {
|
|
5122
|
-
console.warn("State Machine with name ".concat(animatables[i], " not found."));
|
|
5165
|
+
console.warn("State Machine with name ".concat(animatables[i], " not found. Falling back to find an animation with the same name."));
|
|
5166
|
+
// TODO: Remove this fallback in next major release as it complicates initialization.
|
|
5123
5167
|
// In order to maintain compatibility with current behavior, if a state machine is not found
|
|
5124
5168
|
// we look for an animation with the same name
|
|
5125
|
-
this.initLinearAnimations([animatables[i]], playing);
|
|
5169
|
+
this.initLinearAnimations([animatables[i]], playing, true);
|
|
5126
5170
|
}
|
|
5127
5171
|
}
|
|
5128
5172
|
}
|
|
@@ -5724,17 +5768,26 @@ var RiveFile = /** @class */ (function () {
|
|
|
5724
5768
|
};
|
|
5725
5769
|
RiveFile.prototype.initData = function () {
|
|
5726
5770
|
return __awaiter(this, void 0, void 0, function () {
|
|
5727
|
-
var _a, loader, loaderWrapper, _b, fileFinalizer;
|
|
5771
|
+
var _a, error_1, loader, loaderWrapper, _b, fileFinalizer;
|
|
5728
5772
|
return __generator(this, function (_c) {
|
|
5729
5773
|
switch (_c.label) {
|
|
5730
5774
|
case 0:
|
|
5731
|
-
if (!(this.src && !this.buffer)) return [3 /*break*/,
|
|
5775
|
+
if (!(this.src && !this.buffer)) return [3 /*break*/, 4];
|
|
5776
|
+
_c.label = 1;
|
|
5777
|
+
case 1:
|
|
5778
|
+
_c.trys.push([1, 3, , 4]);
|
|
5732
5779
|
_a = this;
|
|
5733
5780
|
return [4 /*yield*/, loadRiveFile(this.src)];
|
|
5734
|
-
case 1:
|
|
5735
|
-
_a.buffer = _c.sent();
|
|
5736
|
-
_c.label = 2;
|
|
5737
5781
|
case 2:
|
|
5782
|
+
_a.buffer = _c.sent();
|
|
5783
|
+
return [3 /*break*/, 4];
|
|
5784
|
+
case 3:
|
|
5785
|
+
error_1 = _c.sent();
|
|
5786
|
+
if (error_1 instanceof Error) {
|
|
5787
|
+
throw error_1;
|
|
5788
|
+
}
|
|
5789
|
+
throw new RiveError(RiveFile.fileLoadErrorMessage);
|
|
5790
|
+
case 4:
|
|
5738
5791
|
if (this.destroyed) {
|
|
5739
5792
|
return [2 /*return*/];
|
|
5740
5793
|
}
|
|
@@ -5747,7 +5800,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5747
5800
|
performance.mark('rive:file-load:start');
|
|
5748
5801
|
_b = this;
|
|
5749
5802
|
return [4 /*yield*/, this.runtime.load(new Uint8Array(this.buffer), loader, this.enableRiveAssetCDN)];
|
|
5750
|
-
case
|
|
5803
|
+
case 5:
|
|
5751
5804
|
_b.file = _c.sent();
|
|
5752
5805
|
if (this.enablePerfMarks) {
|
|
5753
5806
|
performance.mark('rive:file-load:end');
|
|
@@ -5811,7 +5864,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5811
5864
|
};
|
|
5812
5865
|
RiveFile.prototype.init = function () {
|
|
5813
5866
|
return __awaiter(this, void 0, void 0, function () {
|
|
5814
|
-
var _a, bufferResolved, runtimeResolved,
|
|
5867
|
+
var _a, bufferResolved, runtimeResolved, error_2;
|
|
5815
5868
|
return __generator(this, function (_b) {
|
|
5816
5869
|
switch (_b.label) {
|
|
5817
5870
|
case 0:
|
|
@@ -5843,8 +5896,8 @@ var RiveFile = /** @class */ (function () {
|
|
|
5843
5896
|
}
|
|
5844
5897
|
return [3 /*break*/, 5];
|
|
5845
5898
|
case 4:
|
|
5846
|
-
|
|
5847
|
-
this.fireLoadError(
|
|
5899
|
+
error_2 = _b.sent();
|
|
5900
|
+
this.fireLoadError(error_2 instanceof Error ? error_2.message : RiveFile.fileLoadErrorMessage);
|
|
5848
5901
|
return [3 /*break*/, 5];
|
|
5849
5902
|
case 5: return [2 /*return*/];
|
|
5850
5903
|
}
|
|
@@ -5856,7 +5909,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5856
5909
|
type: EventType.LoadError,
|
|
5857
5910
|
data: message,
|
|
5858
5911
|
});
|
|
5859
|
-
throw new
|
|
5912
|
+
throw new RiveError(message);
|
|
5860
5913
|
};
|
|
5861
5914
|
/**
|
|
5862
5915
|
* Subscribe to Rive-generated events
|
|
@@ -6162,7 +6215,16 @@ var Rive = /** @class */ (function () {
|
|
|
6162
6215
|
// Get the canvas where you want to render the animation and create a renderer
|
|
6163
6216
|
if (_this.enablePerfMarks)
|
|
6164
6217
|
performance.mark('rive:make-renderer:start');
|
|
6165
|
-
|
|
6218
|
+
try {
|
|
6219
|
+
_this.renderer = _this.runtime.makeRenderer(_this.canvas, useOffscreenRenderer);
|
|
6220
|
+
if (!_this.renderer) {
|
|
6221
|
+
throw new Error("Renderer is null, cannot render Rive on the canvas.");
|
|
6222
|
+
}
|
|
6223
|
+
}
|
|
6224
|
+
catch (e) {
|
|
6225
|
+
console.error(e);
|
|
6226
|
+
throw new RiveError("Unable to create the renderer, your environment may not support WebGL. Try the @rive-app/canvas runtime as an alternative.");
|
|
6227
|
+
}
|
|
6166
6228
|
if (_this.enablePerfMarks) {
|
|
6167
6229
|
performance.mark('rive:make-renderer:end');
|
|
6168
6230
|
performance.measure('rive:make-renderer', 'rive:make-renderer:start', 'rive:make-renderer:end');
|
|
@@ -6180,11 +6242,13 @@ var Rive = /** @class */ (function () {
|
|
|
6180
6242
|
}
|
|
6181
6243
|
})
|
|
6182
6244
|
.catch(function (e) {
|
|
6245
|
+
// initData already catches RiveErrors for load issues like artboard/state machine initialization
|
|
6246
|
+
// failures, so just console error and catch here so we don't double-fire the LoadError event
|
|
6183
6247
|
console.error(e);
|
|
6184
6248
|
});
|
|
6185
6249
|
})
|
|
6186
6250
|
.catch(function (e) {
|
|
6187
|
-
|
|
6251
|
+
_this.eventManager.fire({ type: EventType.LoadError, data: e.message });
|
|
6188
6252
|
});
|
|
6189
6253
|
};
|
|
6190
6254
|
/**
|
|
@@ -6266,7 +6330,7 @@ var Rive = /** @class */ (function () {
|
|
|
6266
6330
|
// Returns true for successful initialization.
|
|
6267
6331
|
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
6268
6332
|
return __awaiter(this, void 0, void 0, function () {
|
|
6269
|
-
var riveFile,
|
|
6333
|
+
var riveFile, error_3, msg;
|
|
6270
6334
|
var _a;
|
|
6271
6335
|
return __generator(this, function (_b) {
|
|
6272
6336
|
switch (_b.label) {
|
|
@@ -6300,11 +6364,19 @@ var Rive = /** @class */ (function () {
|
|
|
6300
6364
|
// Check for audio
|
|
6301
6365
|
this.initializeAudio();
|
|
6302
6366
|
// Everything's set up, emit a load event
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6367
|
+
try {
|
|
6368
|
+
this.loaded = true;
|
|
6369
|
+
this.eventManager.fire({
|
|
6370
|
+
type: EventType.Load,
|
|
6371
|
+
data: (_a = this.src) !== null && _a !== void 0 ? _a : "buffer",
|
|
6372
|
+
});
|
|
6373
|
+
}
|
|
6374
|
+
catch (e) {
|
|
6375
|
+
// If any synchronous errors surface from the user-supplied onLoad callback,
|
|
6376
|
+
// this will console.error the error but will not invoke LoadError (onLoadError).
|
|
6377
|
+
// Notably, this will not interfere with Rive rendering
|
|
6378
|
+
console.error(e);
|
|
6379
|
+
}
|
|
6308
6380
|
// Only initialize paused state machines after the load event has been fired
|
|
6309
6381
|
// to allow users to initialize inputs and view models before the first advance
|
|
6310
6382
|
this.animator.advanceIfPaused();
|
|
@@ -6315,9 +6387,8 @@ var Rive = /** @class */ (function () {
|
|
|
6315
6387
|
this.drawFrame();
|
|
6316
6388
|
return [2 /*return*/, true];
|
|
6317
6389
|
case 3:
|
|
6318
|
-
|
|
6319
|
-
msg = resolveErrorMessage(
|
|
6320
|
-
console.warn(msg);
|
|
6390
|
+
error_3 = _b.sent();
|
|
6391
|
+
msg = resolveErrorMessage(error_3);
|
|
6321
6392
|
this.eventManager.fire({ type: EventType.LoadError, data: msg });
|
|
6322
6393
|
return [2 /*return*/, Promise.reject(msg)];
|
|
6323
6394
|
case 4: return [2 /*return*/];
|
|
@@ -6336,10 +6407,7 @@ var Rive = /** @class */ (function () {
|
|
|
6336
6407
|
: this.file.defaultArtboard();
|
|
6337
6408
|
// Check we have a working artboard
|
|
6338
6409
|
if (!rootArtboard) {
|
|
6339
|
-
|
|
6340
|
-
console.warn(msg);
|
|
6341
|
-
this.eventManager.fire({ type: EventType.LoadError, data: msg });
|
|
6342
|
-
return;
|
|
6410
|
+
throw new RiveError("Invalid artboard name or no default artboard");
|
|
6343
6411
|
}
|
|
6344
6412
|
this.artboard = rootArtboard;
|
|
6345
6413
|
rootArtboard.volume = this._volume * audioManager.systemVolume;
|
|
@@ -8358,6 +8426,9 @@ var loadRiveFile = function (src) { return __awaiter(void 0, void 0, void 0, fun
|
|
|
8358
8426
|
return [4 /*yield*/, fetch(req)];
|
|
8359
8427
|
case 1:
|
|
8360
8428
|
res = _a.sent();
|
|
8429
|
+
if (!res.ok) {
|
|
8430
|
+
throw new Error("Failed to fetch the Rive file: HTTP ".concat(res.status));
|
|
8431
|
+
}
|
|
8361
8432
|
return [4 /*yield*/, res.arrayBuffer()];
|
|
8362
8433
|
case 2:
|
|
8363
8434
|
buffer = _a.sent();
|