@rive-app/webgl2 2.36.0 → 2.37.1
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 +4 -2
- package/rive.d.ts +9 -24
- package/rive.js +702 -599
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +4 -0
- package/runtimeLoader.d.ts +20 -0
- package/utils/finalizationRegistry.d.ts +94 -0
- package/utils/index.d.ts +4 -0
- package/utils/registerTouchInteractions.d.ts +19 -0
- package/utils/riveFont.d.ts +15 -0
- package/utils/sanitizeUrl.d.ts +2 -0
package/rive.js
CHANGED
|
@@ -13,6 +13,264 @@ return /******/ (() => { // webpackBootstrap
|
|
|
13
13
|
/******/ var __webpack_modules__ = ([
|
|
14
14
|
/* 0 */,
|
|
15
15
|
/* 1 */
|
|
16
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17
|
+
|
|
18
|
+
__webpack_require__.r(__webpack_exports__);
|
|
19
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20
|
+
/* harmony export */ Animation: () => (/* reexport safe */ _Animation__WEBPACK_IMPORTED_MODULE_0__.Animation)
|
|
21
|
+
/* harmony export */ });
|
|
22
|
+
/* harmony import */ var _Animation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/***/ }),
|
|
27
|
+
/* 2 */
|
|
28
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
29
|
+
|
|
30
|
+
__webpack_require__.r(__webpack_exports__);
|
|
31
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32
|
+
/* harmony export */ Animation: () => (/* binding */ Animation)
|
|
33
|
+
/* harmony export */ });
|
|
34
|
+
/**
|
|
35
|
+
* Represents an animation that can be played on an Artboard.
|
|
36
|
+
* Wraps animations and instances from the runtime and keeps track of playback state.
|
|
37
|
+
*
|
|
38
|
+
* The `Animation` class manages the state and behavior of a single animation instance,
|
|
39
|
+
* including its current time, loop count, and ability to scrub to a specific time.
|
|
40
|
+
*
|
|
41
|
+
* The class provides methods to advance the animation, apply its interpolated keyframe
|
|
42
|
+
* values to the Artboard, and clean up the underlying animation instance when the
|
|
43
|
+
* animation is no longer needed.
|
|
44
|
+
*/
|
|
45
|
+
var Animation = /** @class */ (function () {
|
|
46
|
+
/**
|
|
47
|
+
* Constructs a new animation
|
|
48
|
+
* @constructor
|
|
49
|
+
* @param {any} animation: runtime animation object
|
|
50
|
+
* @param {any} instance: runtime animation instance object
|
|
51
|
+
*/
|
|
52
|
+
function Animation(animation, artboard, runtime, playing) {
|
|
53
|
+
this.animation = animation;
|
|
54
|
+
this.artboard = artboard;
|
|
55
|
+
this.playing = playing;
|
|
56
|
+
this.loopCount = 0;
|
|
57
|
+
/**
|
|
58
|
+
* The time to which the animation should move to on the next render.
|
|
59
|
+
* If not null, the animation will scrub to this time instead of advancing by the given time.
|
|
60
|
+
*/
|
|
61
|
+
this.scrubTo = null;
|
|
62
|
+
this.instance = new runtime.LinearAnimationInstance(animation, artboard);
|
|
63
|
+
}
|
|
64
|
+
Object.defineProperty(Animation.prototype, "name", {
|
|
65
|
+
/**
|
|
66
|
+
* Returns the animation's name
|
|
67
|
+
*/
|
|
68
|
+
get: function () {
|
|
69
|
+
return this.animation.name;
|
|
70
|
+
},
|
|
71
|
+
enumerable: false,
|
|
72
|
+
configurable: true
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(Animation.prototype, "time", {
|
|
75
|
+
/**
|
|
76
|
+
* Returns the animation's name
|
|
77
|
+
*/
|
|
78
|
+
get: function () {
|
|
79
|
+
return this.instance.time;
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* Sets the animation's current time
|
|
83
|
+
*/
|
|
84
|
+
set: function (value) {
|
|
85
|
+
this.instance.time = value;
|
|
86
|
+
},
|
|
87
|
+
enumerable: false,
|
|
88
|
+
configurable: true
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(Animation.prototype, "loopValue", {
|
|
91
|
+
/**
|
|
92
|
+
* Returns the animation's loop type
|
|
93
|
+
*/
|
|
94
|
+
get: function () {
|
|
95
|
+
return this.animation.loopValue;
|
|
96
|
+
},
|
|
97
|
+
enumerable: false,
|
|
98
|
+
configurable: true
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(Animation.prototype, "needsScrub", {
|
|
101
|
+
/**
|
|
102
|
+
* Indicates whether the animation needs to be scrubbed.
|
|
103
|
+
* @returns `true` if the animation needs to be scrubbed, `false` otherwise.
|
|
104
|
+
*/
|
|
105
|
+
get: function () {
|
|
106
|
+
return this.scrubTo !== null;
|
|
107
|
+
},
|
|
108
|
+
enumerable: false,
|
|
109
|
+
configurable: true
|
|
110
|
+
});
|
|
111
|
+
/**
|
|
112
|
+
* Advances the animation by the give time. If the animation needs scrubbing,
|
|
113
|
+
* time is ignored and the stored scrub value is used.
|
|
114
|
+
* @param time the time to advance the animation by if no scrubbing required
|
|
115
|
+
*/
|
|
116
|
+
Animation.prototype.advance = function (time) {
|
|
117
|
+
if (this.scrubTo === null) {
|
|
118
|
+
this.instance.advance(time);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.instance.time = 0;
|
|
122
|
+
this.instance.advance(this.scrubTo);
|
|
123
|
+
this.scrubTo = null;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Apply interpolated keyframe values to the artboard. This should be called after calling
|
|
128
|
+
* .advance() on an animation instance so that new values are applied to properties.
|
|
129
|
+
*
|
|
130
|
+
* Note: This does not advance the artboard, which updates all objects on the artboard
|
|
131
|
+
* @param mix - Mix value for the animation from 0 to 1
|
|
132
|
+
*/
|
|
133
|
+
Animation.prototype.apply = function (mix) {
|
|
134
|
+
this.instance.apply(mix);
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Deletes the backing Wasm animation instance; once this is called, this
|
|
138
|
+
* animation is no more.
|
|
139
|
+
*/
|
|
140
|
+
Animation.prototype.cleanup = function () {
|
|
141
|
+
this.instance.delete();
|
|
142
|
+
};
|
|
143
|
+
return Animation;
|
|
144
|
+
}());
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/***/ }),
|
|
149
|
+
/* 3 */
|
|
150
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
151
|
+
|
|
152
|
+
__webpack_require__.r(__webpack_exports__);
|
|
153
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
154
|
+
/* harmony export */ RuntimeLoader: () => (/* binding */ RuntimeLoader)
|
|
155
|
+
/* harmony export */ });
|
|
156
|
+
/* harmony import */ var _rive_advanced_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
|
157
|
+
/* harmony import */ var package_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
// Runtime singleton; use getInstance to provide a callback that returns the
|
|
161
|
+
// Rive runtime
|
|
162
|
+
var RuntimeLoader = /** @class */ (function () {
|
|
163
|
+
// Class is never instantiated
|
|
164
|
+
function RuntimeLoader() {
|
|
165
|
+
}
|
|
166
|
+
// Loads the runtime
|
|
167
|
+
RuntimeLoader.loadRuntime = function () {
|
|
168
|
+
if (RuntimeLoader.enablePerfMarks)
|
|
169
|
+
performance.mark('rive:wasm-init:start');
|
|
170
|
+
_rive_advanced_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]({
|
|
171
|
+
// Loads Wasm bundle
|
|
172
|
+
locateFile: function () { return RuntimeLoader.wasmURL; },
|
|
173
|
+
})
|
|
174
|
+
.then(function (rive) {
|
|
175
|
+
var _a;
|
|
176
|
+
if (RuntimeLoader.enablePerfMarks) {
|
|
177
|
+
performance.mark('rive:wasm-init:end');
|
|
178
|
+
performance.measure('rive:wasm-init', 'rive:wasm-init:start', 'rive:wasm-init:end');
|
|
179
|
+
}
|
|
180
|
+
RuntimeLoader.runtime = rive;
|
|
181
|
+
// Fire all the callbacks
|
|
182
|
+
while (RuntimeLoader.callBackQueue.length > 0) {
|
|
183
|
+
(_a = RuntimeLoader.callBackQueue.shift()) === null || _a === void 0 ? void 0 : _a(RuntimeLoader.runtime);
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
.catch(function (error) {
|
|
187
|
+
// Capture specific error details
|
|
188
|
+
var errorDetails = {
|
|
189
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || "Unknown error",
|
|
190
|
+
type: (error === null || error === void 0 ? void 0 : error.name) || "Error",
|
|
191
|
+
// Some browsers may provide additional WebAssembly-specific details
|
|
192
|
+
wasmError: error instanceof WebAssembly.CompileError ||
|
|
193
|
+
error instanceof WebAssembly.RuntimeError,
|
|
194
|
+
originalError: error,
|
|
195
|
+
};
|
|
196
|
+
// Log detailed error for debugging
|
|
197
|
+
console.debug("Rive WASM load error details:", errorDetails);
|
|
198
|
+
// In case unpkg fails, or the wasm was not supported, we try to load the fallback module from jsdelivr.
|
|
199
|
+
// This `rive_fallback.wasm` is compiled to support older architecture.
|
|
200
|
+
// TODO: (Gordon): preemptively test browser support and load the correct wasm file. Then use jsdelvr only if unpkg fails.
|
|
201
|
+
var backupJsdelivrUrl = "https://cdn.jsdelivr.net/npm/".concat(package_json__WEBPACK_IMPORTED_MODULE_1__.name, "@").concat(package_json__WEBPACK_IMPORTED_MODULE_1__.version, "/rive_fallback.wasm");
|
|
202
|
+
if (RuntimeLoader.wasmURL.toLowerCase() !== backupJsdelivrUrl) {
|
|
203
|
+
console.warn("Failed to load WASM from ".concat(RuntimeLoader.wasmURL, " (").concat(errorDetails.message, "), trying jsdelivr as a backup"));
|
|
204
|
+
RuntimeLoader.setWasmUrl(backupJsdelivrUrl);
|
|
205
|
+
RuntimeLoader.loadRuntime();
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
var errorMessage = [
|
|
209
|
+
"Could not load Rive WASM file from ".concat(RuntimeLoader.wasmURL, " or ").concat(backupJsdelivrUrl, "."),
|
|
210
|
+
"Possible reasons:",
|
|
211
|
+
"- Network connection is down",
|
|
212
|
+
"- WebAssembly is not supported in this environment",
|
|
213
|
+
"- The WASM file is corrupted or incompatible",
|
|
214
|
+
"\nError details:",
|
|
215
|
+
"- Type: ".concat(errorDetails.type),
|
|
216
|
+
"- Message: ".concat(errorDetails.message),
|
|
217
|
+
"- WebAssembly-specific error: ".concat(errorDetails.wasmError),
|
|
218
|
+
"\nTo resolve, you may need to:",
|
|
219
|
+
"1. Check your network connection",
|
|
220
|
+
"2. Set a new WASM source via RuntimeLoader.setWasmUrl()",
|
|
221
|
+
"3. Call RuntimeLoader.loadRuntime() again",
|
|
222
|
+
].join("\n");
|
|
223
|
+
console.error(errorMessage);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
// Provides a runtime instance via a callback
|
|
228
|
+
RuntimeLoader.getInstance = function (callback) {
|
|
229
|
+
// If it's not loading, start loading runtime
|
|
230
|
+
if (!RuntimeLoader.isLoading) {
|
|
231
|
+
RuntimeLoader.isLoading = true;
|
|
232
|
+
RuntimeLoader.loadRuntime();
|
|
233
|
+
}
|
|
234
|
+
if (!RuntimeLoader.runtime) {
|
|
235
|
+
RuntimeLoader.callBackQueue.push(callback);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
callback(RuntimeLoader.runtime);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
// Provides a runtime instance via a promise
|
|
242
|
+
RuntimeLoader.awaitInstance = function () {
|
|
243
|
+
return new Promise(function (resolve) {
|
|
244
|
+
return RuntimeLoader.getInstance(function (rive) { return resolve(rive); });
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
// Manually sets the wasm url
|
|
248
|
+
RuntimeLoader.setWasmUrl = function (url) {
|
|
249
|
+
RuntimeLoader.wasmURL = url;
|
|
250
|
+
};
|
|
251
|
+
// Gets the current wasm url
|
|
252
|
+
RuntimeLoader.getWasmUrl = function () {
|
|
253
|
+
return RuntimeLoader.wasmURL;
|
|
254
|
+
};
|
|
255
|
+
// Flag to indicate that loading has started/completed
|
|
256
|
+
RuntimeLoader.isLoading = false;
|
|
257
|
+
// List of callbacks for the runtime that come in while loading
|
|
258
|
+
RuntimeLoader.callBackQueue = [];
|
|
259
|
+
// Path to the Wasm file; default path works for testing only;
|
|
260
|
+
// if embedded wasm is used then this is never used.
|
|
261
|
+
RuntimeLoader.wasmURL = "https://unpkg.com/".concat(package_json__WEBPACK_IMPORTED_MODULE_1__.name, "@").concat(package_json__WEBPACK_IMPORTED_MODULE_1__.version, "/rive.wasm");
|
|
262
|
+
/**
|
|
263
|
+
* When true, performance.mark / performance.measure entries are emitted for
|
|
264
|
+
* WASM initialization.
|
|
265
|
+
*/
|
|
266
|
+
RuntimeLoader.enablePerfMarks = false;
|
|
267
|
+
return RuntimeLoader;
|
|
268
|
+
}());
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
/***/ }),
|
|
273
|
+
/* 4 */
|
|
16
274
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17
275
|
|
|
18
276
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -36,11 +294,11 @@ function fa() {
|
|
|
36
294
|
const k = d;
|
|
37
295
|
c = b = 0;
|
|
38
296
|
d = new Map();
|
|
39
|
-
k.forEach(
|
|
297
|
+
k.forEach(p => {
|
|
40
298
|
try {
|
|
41
|
-
|
|
42
|
-
} catch (
|
|
43
|
-
console.error(
|
|
299
|
+
p(g);
|
|
300
|
+
} catch (m) {
|
|
301
|
+
console.error(m);
|
|
44
302
|
}
|
|
45
303
|
});
|
|
46
304
|
this.mb();
|
|
@@ -63,10 +321,10 @@ function fa() {
|
|
|
63
321
|
f.innerHTML = "RIVE FPS " + k.toFixed(1);
|
|
64
322
|
}, document.body.appendChild(f));
|
|
65
323
|
e = new function() {
|
|
66
|
-
let k = 0,
|
|
324
|
+
let k = 0, p = 0;
|
|
67
325
|
this.Mb = function() {
|
|
68
|
-
var
|
|
69
|
-
|
|
326
|
+
var m = performance.now();
|
|
327
|
+
p ? (++k, m -= p, 1000 < m && (g(1000 * k / m), k = p = 0)) : (p = m, k = 0);
|
|
70
328
|
};
|
|
71
329
|
}();
|
|
72
330
|
};
|
|
@@ -92,64 +350,70 @@ const ia = l.onRuntimeInitialized;
|
|
|
92
350
|
l.onRuntimeInitialized = function() {
|
|
93
351
|
ia && ia();
|
|
94
352
|
let a = l.decodeAudio;
|
|
95
|
-
l.decodeAudio = function(
|
|
96
|
-
|
|
97
|
-
f
|
|
353
|
+
l.decodeAudio = function(f, g) {
|
|
354
|
+
f = a(f);
|
|
355
|
+
g(f);
|
|
98
356
|
};
|
|
99
357
|
let b = l.decodeFont;
|
|
100
|
-
l.decodeFont = function(
|
|
101
|
-
|
|
102
|
-
f
|
|
358
|
+
l.decodeFont = function(f, g) {
|
|
359
|
+
f = b(f);
|
|
360
|
+
g(f);
|
|
103
361
|
};
|
|
104
|
-
|
|
105
|
-
l.
|
|
106
|
-
|
|
107
|
-
|
|
362
|
+
let c = l.setFallbackFontCb;
|
|
363
|
+
l.setFallbackFontCallback = "function" === typeof c ? function(f) {
|
|
364
|
+
c(f);
|
|
365
|
+
} : function() {
|
|
366
|
+
console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.");
|
|
108
367
|
};
|
|
109
|
-
|
|
368
|
+
const d = l.FileAssetLoader;
|
|
369
|
+
l.ptrToAsset = f => {
|
|
370
|
+
let g = l.ptrToFileAsset(f);
|
|
371
|
+
return g.isImage ? l.ptrToImageAsset(f) : g.isFont ? l.ptrToFontAsset(f) : g.isAudio ? l.ptrToAudioAsset(f) : g;
|
|
372
|
+
};
|
|
373
|
+
l.CustomFileAssetLoader = d.extend("CustomFileAssetLoader", {__construct:function({loadContents:f}) {
|
|
110
374
|
this.__parent.__construct.call(this);
|
|
111
|
-
this.Bb =
|
|
112
|
-
}, loadContents:function(
|
|
113
|
-
|
|
114
|
-
return this.Bb(
|
|
375
|
+
this.Bb = f;
|
|
376
|
+
}, loadContents:function(f, g) {
|
|
377
|
+
f = l.ptrToAsset(f);
|
|
378
|
+
return this.Bb(f, g);
|
|
115
379
|
},});
|
|
116
|
-
l.CDNFileAssetLoader =
|
|
380
|
+
l.CDNFileAssetLoader = d.extend("CDNFileAssetLoader", {__construct:function() {
|
|
117
381
|
this.__parent.__construct.call(this);
|
|
118
|
-
}, loadContents:function(
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
if ("" ===
|
|
382
|
+
}, loadContents:function(f) {
|
|
383
|
+
let g = l.ptrToAsset(f);
|
|
384
|
+
f = g.cdnUuid;
|
|
385
|
+
if ("" === f) {
|
|
122
386
|
return !1;
|
|
123
387
|
}
|
|
124
|
-
(function(
|
|
388
|
+
(function(k, p) {
|
|
125
389
|
var m = new XMLHttpRequest();
|
|
126
390
|
m.responseType = "arraybuffer";
|
|
127
391
|
m.onreadystatechange = function() {
|
|
128
|
-
4 == m.readyState && 200 == m.status &&
|
|
392
|
+
4 == m.readyState && 200 == m.status && p(m);
|
|
129
393
|
};
|
|
130
|
-
m.open("GET",
|
|
394
|
+
m.open("GET", k, !0);
|
|
131
395
|
m.send(null);
|
|
132
|
-
})(
|
|
133
|
-
|
|
396
|
+
})(g.cdnBaseUrl + "/" + f, k => {
|
|
397
|
+
g.decode(new Uint8Array(k.response));
|
|
134
398
|
});
|
|
135
399
|
return !0;
|
|
136
400
|
},});
|
|
137
|
-
l.FallbackFileAssetLoader =
|
|
401
|
+
l.FallbackFileAssetLoader = d.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
138
402
|
this.__parent.__construct.call(this);
|
|
139
403
|
this.ib = [];
|
|
140
|
-
}, addLoader:function(
|
|
141
|
-
this.ib.push(
|
|
142
|
-
}, loadContents:function(
|
|
143
|
-
for (let
|
|
144
|
-
if (
|
|
404
|
+
}, addLoader:function(f) {
|
|
405
|
+
this.ib.push(f);
|
|
406
|
+
}, loadContents:function(f, g) {
|
|
407
|
+
for (let k of this.ib) {
|
|
408
|
+
if (k.loadContents(f, g)) {
|
|
145
409
|
return !0;
|
|
146
410
|
}
|
|
147
411
|
}
|
|
148
412
|
return !1;
|
|
149
413
|
},});
|
|
150
|
-
let
|
|
151
|
-
l.computeAlignment = function(
|
|
152
|
-
return
|
|
414
|
+
let e = l.computeAlignment;
|
|
415
|
+
l.computeAlignment = function(f, g, k, p, m = 1.0) {
|
|
416
|
+
return e.call(this, f, g, k, p, m);
|
|
153
417
|
};
|
|
154
418
|
};
|
|
155
419
|
const ja = l.onRuntimeInitialized;
|
|
@@ -225,7 +489,7 @@ l.onRuntimeInitialized = function() {
|
|
|
225
489
|
}
|
|
226
490
|
u = Math.min(u, r);
|
|
227
491
|
u = Math.min(z, r);
|
|
228
|
-
C.sort((Z,
|
|
492
|
+
C.sort((Z, ob) => ob.Ja - Z.Ja);
|
|
229
493
|
A = new l.DynamicRectanizer(r);
|
|
230
494
|
for (J = 0; J < C.length;) {
|
|
231
495
|
A.reset(u, z);
|
|
@@ -238,8 +502,8 @@ l.onRuntimeInitialized = function() {
|
|
|
238
502
|
K.qa = I & 65535;
|
|
239
503
|
K.ra = I >> 16;
|
|
240
504
|
}
|
|
241
|
-
K =
|
|
242
|
-
I =
|
|
505
|
+
K = p.push(A.drawWidth());
|
|
506
|
+
I = m.push(A.drawHeight());
|
|
243
507
|
console.assert(K >= A.drawWidth());
|
|
244
508
|
console.assert(I >= A.drawHeight());
|
|
245
509
|
console.assert(K <= r);
|
|
@@ -257,8 +521,8 @@ l.onRuntimeInitialized = function() {
|
|
|
257
521
|
Z.tx = I.qa;
|
|
258
522
|
Z.ty = I.ra;
|
|
259
523
|
d.transform(Z);
|
|
260
|
-
for (const
|
|
261
|
-
|
|
524
|
+
for (const ob of I.S) {
|
|
525
|
+
ob();
|
|
262
526
|
}
|
|
263
527
|
d.restoreClipRect();
|
|
264
528
|
I.S = [];
|
|
@@ -305,7 +569,7 @@ l.onRuntimeInitialized = function() {
|
|
|
305
569
|
this.Eb || k.call(this, r.Db);
|
|
306
570
|
}) : k.call(this, r);
|
|
307
571
|
};
|
|
308
|
-
const
|
|
572
|
+
const p = new ha(), m = new ha(), t = new fa();
|
|
309
573
|
l.requestAnimationFrame = t.requestAnimationFrame.bind(t);
|
|
310
574
|
l.cancelAnimationFrame = t.cancelAnimationFrame.bind(t);
|
|
311
575
|
l.enableFPSCounter = t.Kb.bind(t);
|
|
@@ -331,9 +595,9 @@ l.onRuntimeInitialized = function() {
|
|
|
331
595
|
r = l.decodeWebGL2Image(r);
|
|
332
596
|
u(r);
|
|
333
597
|
};
|
|
334
|
-
let
|
|
598
|
+
let n = l.Renderer.prototype.align;
|
|
335
599
|
l.Renderer.prototype.align = function(r, u, z, A, C = 1.0) {
|
|
336
|
-
|
|
600
|
+
n.call(this, r, u, z, A, C);
|
|
337
601
|
};
|
|
338
602
|
};
|
|
339
603
|
var ma = Object.assign({}, l), na = "./this.program", y = "", oa, pa;
|
|
@@ -427,7 +691,7 @@ function Na(a, b) {
|
|
|
427
691
|
return Ma(c, a, b);
|
|
428
692
|
}));
|
|
429
693
|
}
|
|
430
|
-
var Oa, Pa, Ta = {
|
|
694
|
+
var Oa, Pa, Ta = {564097:(a, b, c, d, e) => {
|
|
431
695
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
432
696
|
return 0;
|
|
433
697
|
}
|
|
@@ -476,12 +740,12 @@ var Oa, Pa, Ta = {563121:(a, b, c, d, e) => {
|
|
|
476
740
|
var k = f.D[g];
|
|
477
741
|
null != k && null != k.K && k.state === f.ia.ub && k.K.resume().then(() => {
|
|
478
742
|
Qa(k.nb);
|
|
479
|
-
},
|
|
480
|
-
console.error("Failed to resume audiocontext",
|
|
743
|
+
}, p => {
|
|
744
|
+
console.error("Failed to resume audiocontext", p);
|
|
481
745
|
});
|
|
482
746
|
}
|
|
483
|
-
f.Xa.map(function(
|
|
484
|
-
document.removeEventListener(
|
|
747
|
+
f.Xa.map(function(p) {
|
|
748
|
+
document.removeEventListener(p, f.unlock, !0);
|
|
485
749
|
});
|
|
486
750
|
};
|
|
487
751
|
f.Xa.map(function(g) {
|
|
@@ -490,11 +754,11 @@ var Oa, Pa, Ta = {563121:(a, b, c, d, e) => {
|
|
|
490
754
|
}
|
|
491
755
|
window.h.Ea += 1;
|
|
492
756
|
return 1;
|
|
493
|
-
},
|
|
757
|
+
}, 566275:() => {
|
|
494
758
|
"undefined" !== typeof window.h && (window.h.Xa.map(function(a) {
|
|
495
759
|
document.removeEventListener(a, window.h.unlock, !0);
|
|
496
760
|
}), --window.h.Ea, 0 === window.h.Ea && delete window.h);
|
|
497
|
-
},
|
|
761
|
+
}, 566579:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 566683:() => {
|
|
498
762
|
try {
|
|
499
763
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
500
764
|
a.close();
|
|
@@ -502,7 +766,7 @@ var Oa, Pa, Ta = {563121:(a, b, c, d, e) => {
|
|
|
502
766
|
} catch (c) {
|
|
503
767
|
return 0;
|
|
504
768
|
}
|
|
505
|
-
},
|
|
769
|
+
}, 566854:(a, b, c, d, e, f) => {
|
|
506
770
|
if ("undefined" === typeof window.h) {
|
|
507
771
|
return -1;
|
|
508
772
|
}
|
|
@@ -514,41 +778,41 @@ var Oa, Pa, Ta = {563121:(a, b, c, d, e) => {
|
|
|
514
778
|
c = 0;
|
|
515
779
|
a != window.h.I.Ca && (c = b);
|
|
516
780
|
g.Y = g.K.createScriptProcessor(d, c, b);
|
|
517
|
-
g.Y.onaudioprocess = function(
|
|
781
|
+
g.Y.onaudioprocess = function(p) {
|
|
518
782
|
if (null == g.ua || 0 == g.ua.length) {
|
|
519
783
|
g.ua = new Float32Array(xa.buffer, e, d * b);
|
|
520
784
|
}
|
|
521
785
|
if (a == window.h.I.capture || a == window.h.I.Pa) {
|
|
522
|
-
for (var
|
|
523
|
-
for (var t =
|
|
524
|
-
v[x * b +
|
|
786
|
+
for (var m = 0; m < b; m += 1) {
|
|
787
|
+
for (var t = p.inputBuffer.getChannelData(m), v = g.ua, x = 0; x < d; x += 1) {
|
|
788
|
+
v[x * b + m] = t[x];
|
|
525
789
|
}
|
|
526
790
|
}
|
|
527
791
|
Ra(f, d, e);
|
|
528
792
|
}
|
|
529
793
|
if (a == window.h.I.Ca || a == window.h.I.Pa) {
|
|
530
|
-
for (Sa(f, d, e),
|
|
531
|
-
for (t =
|
|
532
|
-
t[x] = v[x * b +
|
|
794
|
+
for (Sa(f, d, e), m = 0; m < p.outputBuffer.numberOfChannels; ++m) {
|
|
795
|
+
for (t = p.outputBuffer.getChannelData(m), v = g.ua, x = 0; x < d; x += 1) {
|
|
796
|
+
t[x] = v[x * b + m];
|
|
533
797
|
}
|
|
534
798
|
}
|
|
535
799
|
} else {
|
|
536
|
-
for (
|
|
537
|
-
|
|
800
|
+
for (m = 0; m < p.outputBuffer.numberOfChannels; ++m) {
|
|
801
|
+
p.outputBuffer.getChannelData(m).fill(0.0);
|
|
538
802
|
}
|
|
539
803
|
}
|
|
540
804
|
};
|
|
541
|
-
a != window.h.I.capture && a != window.h.I.Pa || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(
|
|
542
|
-
g.Fa = g.K.createMediaStreamSource(
|
|
805
|
+
a != window.h.I.capture && a != window.h.I.Pa || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(p) {
|
|
806
|
+
g.Fa = g.K.createMediaStreamSource(p);
|
|
543
807
|
g.Fa.connect(g.Y);
|
|
544
808
|
g.Y.connect(g.K.destination);
|
|
545
|
-
}).catch(function(
|
|
546
|
-
console.log("Failed to get user media: " +
|
|
809
|
+
}).catch(function(p) {
|
|
810
|
+
console.log("Failed to get user media: " + p);
|
|
547
811
|
});
|
|
548
812
|
a == window.h.I.Ca && g.Y.connect(g.K.destination);
|
|
549
813
|
g.nb = f;
|
|
550
814
|
return window.h.lc(g);
|
|
551
|
-
},
|
|
815
|
+
}, 569731:a => window.h.ta(a).K.sampleRate, 569804:a => {
|
|
552
816
|
a = window.h.ta(a);
|
|
553
817
|
void 0 !== a.Y && (a.Y.onaudioprocess = function() {
|
|
554
818
|
}, a.Y.disconnect(), a.Y = void 0);
|
|
@@ -556,13 +820,13 @@ var Oa, Pa, Ta = {563121:(a, b, c, d, e) => {
|
|
|
556
820
|
a.K.close();
|
|
557
821
|
a.K = void 0;
|
|
558
822
|
a.nb = void 0;
|
|
559
|
-
},
|
|
823
|
+
}, 570204:a => {
|
|
560
824
|
window.h.yb(a);
|
|
561
|
-
},
|
|
825
|
+
}, 570254:a => {
|
|
562
826
|
a = window.h.ta(a);
|
|
563
827
|
a.K.resume();
|
|
564
828
|
a.state = window.h.ia.ub;
|
|
565
|
-
},
|
|
829
|
+
}, 570393:a => {
|
|
566
830
|
a = window.h.ta(a);
|
|
567
831
|
a.K.suspend();
|
|
568
832
|
a.state = window.h.ia.stopped;
|
|
@@ -782,7 +1046,7 @@ var lb = {open(a) {
|
|
|
782
1046
|
return 0;
|
|
783
1047
|
}, Xb() {
|
|
784
1048
|
return [24, 80];
|
|
785
|
-
},},
|
|
1049
|
+
},}, nb = {Sa(a, b) {
|
|
786
1050
|
null === b || 10 === b ? (sa(L(a.H, 0)), a.H = []) : 0 != b && a.H.push(b);
|
|
787
1051
|
}, sa(a) {
|
|
788
1052
|
a.H && 0 < a.H.length && (sa(L(a.H, 0)), a.H = []);
|
|
@@ -1289,34 +1553,34 @@ function Wb(a, b, c) {
|
|
|
1289
1553
|
f.seekable = !1;
|
|
1290
1554
|
}, close() {
|
|
1291
1555
|
c?.buffer?.length && c(10);
|
|
1292
|
-
}, read(f, g, k,
|
|
1293
|
-
for (var
|
|
1556
|
+
}, read(f, g, k, p) {
|
|
1557
|
+
for (var m = 0, t = 0; t < p; t++) {
|
|
1294
1558
|
try {
|
|
1295
1559
|
var v = b();
|
|
1296
1560
|
} catch (x) {
|
|
1297
1561
|
throw new M(29);
|
|
1298
1562
|
}
|
|
1299
|
-
if (void 0 === v && 0 ===
|
|
1563
|
+
if (void 0 === v && 0 === m) {
|
|
1300
1564
|
throw new M(6);
|
|
1301
1565
|
}
|
|
1302
1566
|
if (null === v || void 0 === v) {
|
|
1303
1567
|
break;
|
|
1304
1568
|
}
|
|
1305
|
-
|
|
1569
|
+
m++;
|
|
1306
1570
|
g[k + t] = v;
|
|
1307
1571
|
}
|
|
1308
|
-
|
|
1309
|
-
return
|
|
1310
|
-
}, write(f, g, k,
|
|
1311
|
-
for (var
|
|
1572
|
+
m && (f.node.timestamp = Date.now());
|
|
1573
|
+
return m;
|
|
1574
|
+
}, write(f, g, k, p) {
|
|
1575
|
+
for (var m = 0; m < p; m++) {
|
|
1312
1576
|
try {
|
|
1313
|
-
c(g[k +
|
|
1577
|
+
c(g[k + m]);
|
|
1314
1578
|
} catch (t) {
|
|
1315
1579
|
throw new M(29);
|
|
1316
1580
|
}
|
|
1317
1581
|
}
|
|
1318
|
-
|
|
1319
|
-
return
|
|
1582
|
+
p && (f.node.timestamp = Date.now());
|
|
1583
|
+
return m;
|
|
1320
1584
|
}});
|
|
1321
1585
|
Qb(a, d, e);
|
|
1322
1586
|
}
|
|
@@ -1439,17 +1703,17 @@ var zc = {}, Ac = {}, T = (a, b, c) => {
|
|
|
1439
1703
|
if (k.length !== a.length) {
|
|
1440
1704
|
throw new tc("Mismatched type converter count");
|
|
1441
1705
|
}
|
|
1442
|
-
for (var
|
|
1443
|
-
S(a[
|
|
1706
|
+
for (var p = 0; p < a.length; ++p) {
|
|
1707
|
+
S(a[p], k[p]);
|
|
1444
1708
|
}
|
|
1445
1709
|
}
|
|
1446
1710
|
a.forEach(function(k) {
|
|
1447
1711
|
Ac[k] = b;
|
|
1448
1712
|
});
|
|
1449
1713
|
var e = Array(b.length), f = [], g = 0;
|
|
1450
|
-
b.forEach((k,
|
|
1451
|
-
jc.hasOwnProperty(k) ? e[
|
|
1452
|
-
e[
|
|
1714
|
+
b.forEach((k, p) => {
|
|
1715
|
+
jc.hasOwnProperty(k) ? e[p] = jc[k] : (f.push(k), zc.hasOwnProperty(k) || (zc[k] = []), zc[k].push(() => {
|
|
1716
|
+
e[p] = jc[k];
|
|
1453
1717
|
++g;
|
|
1454
1718
|
g === f.length && d(e);
|
|
1455
1719
|
}));
|
|
@@ -1621,7 +1885,7 @@ function Mc(a, b) {
|
|
|
1621
1885
|
}
|
|
1622
1886
|
return Ic(b.g.o, b.g.u.i, this.i);
|
|
1623
1887
|
}
|
|
1624
|
-
function Nc(a, b, c, d, e, f, g, k,
|
|
1888
|
+
function Nc(a, b, c, d, e, f, g, k, p, m, t) {
|
|
1625
1889
|
this.name = a;
|
|
1626
1890
|
this.i = b;
|
|
1627
1891
|
this.Ra = c;
|
|
@@ -1630,8 +1894,8 @@ function Nc(a, b, c, d, e, f, g, k, m, n, t) {
|
|
|
1630
1894
|
this.ac = f;
|
|
1631
1895
|
this.fc = g;
|
|
1632
1896
|
this.qb = k;
|
|
1633
|
-
this.Ta =
|
|
1634
|
-
this.bc =
|
|
1897
|
+
this.Ta = p;
|
|
1898
|
+
this.bc = m;
|
|
1635
1899
|
this.O = t;
|
|
1636
1900
|
e || void 0 !== b.B ? this.toWireType = Lc : (this.toWireType = d ? Jc : Mc, this.L = null);
|
|
1637
1901
|
}
|
|
@@ -1675,10 +1939,10 @@ function Xc(a, b, c, d, e) {
|
|
|
1675
1939
|
if (2 > f) {
|
|
1676
1940
|
throw new P("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1677
1941
|
}
|
|
1678
|
-
var g = null !== b[1] && null !== c, k = Wc(b),
|
|
1679
|
-
return Zb(a, function(...
|
|
1680
|
-
if (
|
|
1681
|
-
throw new P(`function ${a} called with ${
|
|
1942
|
+
var g = null !== b[1] && null !== c, k = Wc(b), p = "void" !== b[0].name, m = f - 2, t = Array(m), v = [], x = [];
|
|
1943
|
+
return Zb(a, function(...n) {
|
|
1944
|
+
if (n.length !== m) {
|
|
1945
|
+
throw new P(`function ${a} called with ${n.length} arguments, expected ${m}`);
|
|
1682
1946
|
}
|
|
1683
1947
|
x.length = 0;
|
|
1684
1948
|
v.length = g ? 2 : 1;
|
|
@@ -1687,10 +1951,10 @@ function Xc(a, b, c, d, e) {
|
|
|
1687
1951
|
var r = b[1].toWireType(x, this);
|
|
1688
1952
|
v[1] = r;
|
|
1689
1953
|
}
|
|
1690
|
-
for (var u = 0; u <
|
|
1691
|
-
t[u] = b[u + 2].toWireType(x,
|
|
1954
|
+
for (var u = 0; u < m; ++u) {
|
|
1955
|
+
t[u] = b[u + 2].toWireType(x, n[u]), v.push(t[u]);
|
|
1692
1956
|
}
|
|
1693
|
-
|
|
1957
|
+
n = d(...v);
|
|
1694
1958
|
if (k) {
|
|
1695
1959
|
xc(x);
|
|
1696
1960
|
} else {
|
|
@@ -1699,7 +1963,7 @@ function Xc(a, b, c, d, e) {
|
|
|
1699
1963
|
null !== b[u].L && b[u].L(z);
|
|
1700
1964
|
}
|
|
1701
1965
|
}
|
|
1702
|
-
r =
|
|
1966
|
+
r = p ? b[0].fromWireType(n) : void 0;
|
|
1703
1967
|
return r;
|
|
1704
1968
|
});
|
|
1705
1969
|
}
|
|
@@ -1856,12 +2120,12 @@ var Yc = (a, b) => {
|
|
|
1856
2120
|
a = a.toWireType(d, c);
|
|
1857
2121
|
d.length && (H[b >> 2] = ac(d));
|
|
1858
2122
|
return a;
|
|
1859
|
-
}, od = {},
|
|
1860
|
-
var b =
|
|
2123
|
+
}, od = [], pd = {}, qd = a => {
|
|
2124
|
+
var b = pd[a];
|
|
1861
2125
|
return void 0 === b ? R(a) : b;
|
|
1862
|
-
},
|
|
1863
|
-
var b =
|
|
1864
|
-
|
|
2126
|
+
}, rd = a => {
|
|
2127
|
+
var b = od.length;
|
|
2128
|
+
od.push(a);
|
|
1865
2129
|
return b;
|
|
1866
2130
|
}, sd = (a, b) => {
|
|
1867
2131
|
for (var c = Array(a), d = 0; d < a; ++d) {
|
|
@@ -2035,93 +2299,93 @@ var Td = (a, b) => {
|
|
|
2035
2299
|
a -= 5120;
|
|
2036
2300
|
return 0 == a ? B : 1 == a ? D : 2 == a ? E : 4 == a ? F : 6 == a ? xa : 5 == a || 28922 == a || 28520 == a || 30779 == a || 30782 == a ? H : wa;
|
|
2037
2301
|
}, 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) => {
|
|
2038
|
-
function e(
|
|
2039
|
-
for (
|
|
2040
|
-
|
|
2302
|
+
function e(n, r, u) {
|
|
2303
|
+
for (n = "number" == typeof n ? n.toString() : n || ""; n.length < r;) {
|
|
2304
|
+
n = u[0] + n;
|
|
2041
2305
|
}
|
|
2042
|
-
return
|
|
2306
|
+
return n;
|
|
2043
2307
|
}
|
|
2044
|
-
function f(
|
|
2045
|
-
return e(
|
|
2308
|
+
function f(n, r) {
|
|
2309
|
+
return e(n, r, "0");
|
|
2046
2310
|
}
|
|
2047
|
-
function g(
|
|
2311
|
+
function g(n, r) {
|
|
2048
2312
|
function u(A) {
|
|
2049
2313
|
return 0 > A ? -1 : 0 < A ? 1 : 0;
|
|
2050
2314
|
}
|
|
2051
2315
|
var z;
|
|
2052
|
-
0 === (z = u(
|
|
2316
|
+
0 === (z = u(n.getFullYear() - r.getFullYear())) && 0 === (z = u(n.getMonth() - r.getMonth())) && (z = u(n.getDate() - r.getDate()));
|
|
2053
2317
|
return z;
|
|
2054
2318
|
}
|
|
2055
|
-
function k(
|
|
2056
|
-
switch(
|
|
2319
|
+
function k(n) {
|
|
2320
|
+
switch(n.getDay()) {
|
|
2057
2321
|
case 0:
|
|
2058
|
-
return new Date(
|
|
2322
|
+
return new Date(n.getFullYear() - 1, 11, 29);
|
|
2059
2323
|
case 1:
|
|
2060
|
-
return
|
|
2324
|
+
return n;
|
|
2061
2325
|
case 2:
|
|
2062
|
-
return new Date(
|
|
2326
|
+
return new Date(n.getFullYear(), 0, 3);
|
|
2063
2327
|
case 3:
|
|
2064
|
-
return new Date(
|
|
2328
|
+
return new Date(n.getFullYear(), 0, 2);
|
|
2065
2329
|
case 4:
|
|
2066
|
-
return new Date(
|
|
2330
|
+
return new Date(n.getFullYear(), 0, 1);
|
|
2067
2331
|
case 5:
|
|
2068
|
-
return new Date(
|
|
2332
|
+
return new Date(n.getFullYear() - 1, 11, 31);
|
|
2069
2333
|
case 6:
|
|
2070
|
-
return new Date(
|
|
2334
|
+
return new Date(n.getFullYear() - 1, 11, 30);
|
|
2071
2335
|
}
|
|
2072
2336
|
}
|
|
2073
|
-
function
|
|
2074
|
-
var r =
|
|
2075
|
-
for (
|
|
2076
|
-
var u =
|
|
2077
|
-
if (r > z -
|
|
2078
|
-
r -= z -
|
|
2337
|
+
function p(n) {
|
|
2338
|
+
var r = n.ca;
|
|
2339
|
+
for (n = new Date((new Date(n.da + 1900, 0, 1)).getTime()); 0 < r;) {
|
|
2340
|
+
var u = n.getMonth(), z = (ud(n.getFullYear()) ? Yd : Zd)[u];
|
|
2341
|
+
if (r > z - n.getDate()) {
|
|
2342
|
+
r -= z - n.getDate() + 1, n.setDate(1), 11 > u ? n.setMonth(u + 1) : (n.setMonth(0), n.setFullYear(n.getFullYear() + 1));
|
|
2079
2343
|
} else {
|
|
2080
|
-
|
|
2344
|
+
n.setDate(n.getDate() + r);
|
|
2081
2345
|
break;
|
|
2082
2346
|
}
|
|
2083
2347
|
}
|
|
2084
|
-
u = new Date(
|
|
2085
|
-
r = k(new Date(
|
|
2348
|
+
u = new Date(n.getFullYear() + 1, 0, 4);
|
|
2349
|
+
r = k(new Date(n.getFullYear(), 0, 4));
|
|
2086
2350
|
u = k(u);
|
|
2087
|
-
return 0 >= g(r,
|
|
2351
|
+
return 0 >= g(r, n) ? 0 >= g(u, n) ? n.getFullYear() + 1 : n.getFullYear() : n.getFullYear() - 1;
|
|
2088
2352
|
}
|
|
2089
|
-
var
|
|
2090
|
-
d = {jc:F[d >> 2], ic:F[d + 4 >> 2], Ha:F[d + 8 >> 2], Va:F[d + 12 >> 2], Ia:F[d + 16 >> 2], da:F[d + 20 >> 2], R:F[d + 24 >> 2], ca:F[d + 28 >> 2], Lc:F[d + 32 >> 2], hc:F[d + 36 >> 2], kc:
|
|
2353
|
+
var m = H[d + 40 >> 2];
|
|
2354
|
+
d = {jc:F[d >> 2], ic:F[d + 4 >> 2], Ha:F[d + 8 >> 2], Va:F[d + 12 >> 2], Ia:F[d + 16 >> 2], da:F[d + 20 >> 2], R:F[d + 24 >> 2], ca:F[d + 28 >> 2], Lc:F[d + 32 >> 2], hc:F[d + 36 >> 2], kc:m ? m ? L(D, m) : "" : ""};
|
|
2091
2355
|
c = c ? L(D, c) : "";
|
|
2092
|
-
|
|
2093
|
-
for (var t in
|
|
2094
|
-
c = c.replace(new RegExp(t, "g"),
|
|
2356
|
+
m = {"%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",};
|
|
2357
|
+
for (var t in m) {
|
|
2358
|
+
c = c.replace(new RegExp(t, "g"), m[t]);
|
|
2095
2359
|
}
|
|
2096
2360
|
var v = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), x = "January February March April May June July August September October November December".split(" ");
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
0 ==
|
|
2100
|
-
return f(
|
|
2101
|
-
}, "%j":
|
|
2102
|
-
for (var r = 0, u = 0; u <=
|
|
2103
|
-
}
|
|
2104
|
-
return f(
|
|
2105
|
-
}, "%m":
|
|
2106
|
-
var r = Math.floor((
|
|
2107
|
-
2 >= (
|
|
2361
|
+
m = {"%a":n => v[n.R].substring(0, 3), "%A":n => v[n.R], "%b":n => x[n.Ia].substring(0, 3), "%B":n => x[n.Ia], "%C":n => f((n.da + 1900) / 100 | 0, 2), "%d":n => f(n.Va, 2), "%e":n => e(n.Va, 2, " "), "%g":n => p(n).toString().substring(2), "%G":p, "%H":n => f(n.Ha, 2), "%I":n => {
|
|
2362
|
+
n = n.Ha;
|
|
2363
|
+
0 == n ? n = 12 : 12 < n && (n -= 12);
|
|
2364
|
+
return f(n, 2);
|
|
2365
|
+
}, "%j":n => {
|
|
2366
|
+
for (var r = 0, u = 0; u <= n.Ia - 1; r += (ud(n.da + 1900) ? Yd : Zd)[u++]) {
|
|
2367
|
+
}
|
|
2368
|
+
return f(n.Va + r, 3);
|
|
2369
|
+
}, "%m":n => f(n.Ia + 1, 2), "%M":n => f(n.ic, 2), "%n":() => "\n", "%p":n => 0 <= n.Ha && 12 > n.Ha ? "AM" : "PM", "%S":n => f(n.jc, 2), "%t":() => "\t", "%u":n => n.R || 7, "%U":n => f(Math.floor((n.ca + 7 - n.R) / 7), 2), "%V":n => {
|
|
2370
|
+
var r = Math.floor((n.ca + 7 - (n.R + 6) % 7) / 7);
|
|
2371
|
+
2 >= (n.R + 371 - n.ca - 2) % 7 && r++;
|
|
2108
2372
|
if (r) {
|
|
2109
|
-
53 == r && (u = (
|
|
2373
|
+
53 == r && (u = (n.R + 371 - n.ca) % 7, 4 == u || 3 == u && ud(n.da) || (r = 1));
|
|
2110
2374
|
} else {
|
|
2111
2375
|
r = 52;
|
|
2112
|
-
var u = (
|
|
2113
|
-
(4 == u || 5 == u && ud(
|
|
2376
|
+
var u = (n.R + 7 - n.ca - 1) % 7;
|
|
2377
|
+
(4 == u || 5 == u && ud(n.da % 400 - 1)) && r++;
|
|
2114
2378
|
}
|
|
2115
2379
|
return f(r, 2);
|
|
2116
|
-
}, "%w":
|
|
2117
|
-
|
|
2118
|
-
var r = 0 <=
|
|
2119
|
-
|
|
2120
|
-
return (r ? "+" : "-") + String("0000" + (
|
|
2121
|
-
}, "%Z":
|
|
2380
|
+
}, "%w":n => n.R, "%W":n => f(Math.floor((n.ca + 7 - (n.R + 6) % 7) / 7), 2), "%y":n => (n.da + 1900).toString().substring(2), "%Y":n => n.da + 1900, "%z":n => {
|
|
2381
|
+
n = n.hc;
|
|
2382
|
+
var r = 0 <= n;
|
|
2383
|
+
n = Math.abs(n) / 60;
|
|
2384
|
+
return (r ? "+" : "-") + String("0000" + (n / 60 * 100 + n % 60)).slice(-4);
|
|
2385
|
+
}, "%Z":n => n.kc, "%%":() => "%"};
|
|
2122
2386
|
c = c.replace(/%%/g, "\x00\x00");
|
|
2123
|
-
for (t in
|
|
2124
|
-
c.includes(t) && (c = c.replace(new RegExp(t, "g"),
|
|
2387
|
+
for (t in m) {
|
|
2388
|
+
c.includes(t) && (c = c.replace(new RegExp(t, "g"), m[t](d)));
|
|
2125
2389
|
}
|
|
2126
2390
|
c = c.replace(/\0\0/g, "%");
|
|
2127
2391
|
t = hb(c, !1);
|
|
@@ -2145,7 +2409,7 @@ Pb("/home/web_user");
|
|
|
2145
2409
|
kb(259, {read:() => 0, write:(d, e, f, g) => g,});
|
|
2146
2410
|
Qb("/dev/null", 259);
|
|
2147
2411
|
jb(1280, mb);
|
|
2148
|
-
jb(1536,
|
|
2412
|
+
jb(1536, nb);
|
|
2149
2413
|
Qb("/dev/tty", 1280);
|
|
2150
2414
|
Qb("/dev/tty1", 1536);
|
|
2151
2415
|
var a = new Uint8Array(1024), b = 0, c = () => {
|
|
@@ -2420,9 +2684,9 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2420
2684
|
c = Q(c);
|
|
2421
2685
|
var d = b.i, e = d.M, f = d.B.M, g = d.B.constructor;
|
|
2422
2686
|
a = Zb(a, function(...k) {
|
|
2423
|
-
d.B.ob.forEach(function(
|
|
2424
|
-
if (this[
|
|
2425
|
-
throw new cc(`Pure virtual function ${
|
|
2687
|
+
d.B.ob.forEach(function(p) {
|
|
2688
|
+
if (this[p] === f[p]) {
|
|
2689
|
+
throw new cc(`Pure virtual function ${p} must be implemented in JavaScript`);
|
|
2426
2690
|
}
|
|
2427
2691
|
}.bind(this));
|
|
2428
2692
|
Object.defineProperty(this, "__parent", {value:e});
|
|
@@ -2434,12 +2698,12 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2434
2698
|
}
|
|
2435
2699
|
k = g.implement(this, ...k);
|
|
2436
2700
|
oc(k);
|
|
2437
|
-
var
|
|
2701
|
+
var p = k.g;
|
|
2438
2702
|
k.notifyOnDestruction();
|
|
2439
|
-
|
|
2440
|
-
Object.defineProperties(this, {g:{value:
|
|
2703
|
+
p.ja = !0;
|
|
2704
|
+
Object.defineProperties(this, {g:{value:p}});
|
|
2441
2705
|
uc(this);
|
|
2442
|
-
k =
|
|
2706
|
+
k = p.o;
|
|
2443
2707
|
k = ic(d, k);
|
|
2444
2708
|
if (hc.hasOwnProperty(k)) {
|
|
2445
2709
|
throw new P(`Tried to register registered instance: ${k}`);
|
|
@@ -2468,32 +2732,32 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2468
2732
|
var c = b.Ta, d = b.O, e = b.eb, f = e.map(g => g.Rb).concat(e.map(g => g.dc));
|
|
2469
2733
|
T([a], f, g => {
|
|
2470
2734
|
var k = {};
|
|
2471
|
-
e.forEach((
|
|
2472
|
-
var t = g[
|
|
2473
|
-
k[
|
|
2735
|
+
e.forEach((p, m) => {
|
|
2736
|
+
var t = g[m], v = p.Pb, x = p.Qb, n = g[m + e.length], r = p.cc, u = p.ec;
|
|
2737
|
+
k[p.Lb] = {read:z => t.fromWireType(v(x, z)), write:(z, A) => {
|
|
2474
2738
|
var C = [];
|
|
2475
|
-
r(u, z,
|
|
2739
|
+
r(u, z, n.toWireType(C, A));
|
|
2476
2740
|
xc(C);
|
|
2477
2741
|
}};
|
|
2478
2742
|
});
|
|
2479
|
-
return [{name:b.name, fromWireType:
|
|
2480
|
-
var
|
|
2743
|
+
return [{name:b.name, fromWireType:p => {
|
|
2744
|
+
var m = {}, t;
|
|
2481
2745
|
for (t in k) {
|
|
2482
|
-
|
|
2746
|
+
m[t] = k[t].read(p);
|
|
2483
2747
|
}
|
|
2484
|
-
d(
|
|
2485
|
-
return
|
|
2486
|
-
}, toWireType:(
|
|
2748
|
+
d(p);
|
|
2749
|
+
return m;
|
|
2750
|
+
}, toWireType:(p, m) => {
|
|
2487
2751
|
for (var t in k) {
|
|
2488
|
-
if (!(t in
|
|
2752
|
+
if (!(t in m)) {
|
|
2489
2753
|
throw new TypeError(`Missing field: "${t}"`);
|
|
2490
2754
|
}
|
|
2491
2755
|
}
|
|
2492
2756
|
var v = c();
|
|
2493
2757
|
for (t in k) {
|
|
2494
|
-
k[t].write(v,
|
|
2758
|
+
k[t].write(v, m[t]);
|
|
2495
2759
|
}
|
|
2496
|
-
null !==
|
|
2760
|
+
null !== p && p.push(d, v);
|
|
2497
2761
|
return v;
|
|
2498
2762
|
}, argPackAdvance:8, readValueFromPointer:yc, L:d,}];
|
|
2499
2763
|
});
|
|
@@ -2507,14 +2771,14 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2507
2771
|
}, argPackAdvance:8, readValueFromPointer:function(e) {
|
|
2508
2772
|
return this.fromWireType(D[e]);
|
|
2509
2773
|
}, L:null,});
|
|
2510
|
-
}, _embind_register_class:(a, b, c, d, e, f, g, k,
|
|
2774
|
+
}, _embind_register_class:(a, b, c, d, e, f, g, k, p, m, t, v, x) => {
|
|
2511
2775
|
t = R(t);
|
|
2512
2776
|
f = U(e, f);
|
|
2513
2777
|
k &&= U(g, k);
|
|
2514
|
-
|
|
2778
|
+
m &&= U(p, m);
|
|
2515
2779
|
x = U(v, x);
|
|
2516
|
-
var
|
|
2517
|
-
Fc(
|
|
2780
|
+
var n = Gc(t);
|
|
2781
|
+
Fc(n, function() {
|
|
2518
2782
|
Vc(`Cannot construct ${t} due to unbound types`, [d]);
|
|
2519
2783
|
});
|
|
2520
2784
|
T([a, b, c], d ? [d] : [], r => {
|
|
@@ -2540,7 +2804,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2540
2804
|
});
|
|
2541
2805
|
var A = Object.create(z, {constructor:{value:r},});
|
|
2542
2806
|
r.prototype = A;
|
|
2543
|
-
var C = new Hc(t, r, A, x, u, f, k,
|
|
2807
|
+
var C = new Hc(t, r, A, x, u, f, k, m);
|
|
2544
2808
|
if (C.B) {
|
|
2545
2809
|
var G;
|
|
2546
2810
|
(G = C.B).pa ?? (G.pa = []);
|
|
@@ -2550,7 +2814,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2550
2814
|
G = new Nc(t + "*", C, !1, !1, !1);
|
|
2551
2815
|
z = new Nc(t + " const*", C, !1, !0, !1);
|
|
2552
2816
|
rc[a] = {pointerType:G, Gb:z};
|
|
2553
|
-
Oc(
|
|
2817
|
+
Oc(n, r);
|
|
2554
2818
|
return [u, G, z];
|
|
2555
2819
|
});
|
|
2556
2820
|
}, _embind_register_class_class_function:(a, b, c, d, e, f, g) => {
|
|
@@ -2558,21 +2822,21 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2558
2822
|
b = R(b);
|
|
2559
2823
|
b = Zc(b);
|
|
2560
2824
|
f = U(e, f);
|
|
2561
|
-
T([], [a],
|
|
2562
|
-
function
|
|
2825
|
+
T([], [a], p => {
|
|
2826
|
+
function m() {
|
|
2563
2827
|
Vc(`Cannot call ${t} due to unbound types`, k);
|
|
2564
2828
|
}
|
|
2565
|
-
|
|
2566
|
-
var t = `${
|
|
2829
|
+
p = p[0];
|
|
2830
|
+
var t = `${p.name}.${b}`;
|
|
2567
2831
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2568
|
-
var v =
|
|
2569
|
-
void 0 === v[b] ? (
|
|
2832
|
+
var v = p.i.constructor;
|
|
2833
|
+
void 0 === v[b] ? (m.ga = c - 1, v[b] = m) : (Ec(v, b, t), v[b].A[c - 1] = m);
|
|
2570
2834
|
T([], k, x => {
|
|
2571
2835
|
x = Xc(t, [x[0], null].concat(x.slice(1)), null, f, g);
|
|
2572
2836
|
void 0 === v[b].A ? (x.ga = c - 1, v[b] = x) : v[b].A[c - 1] = x;
|
|
2573
|
-
if (
|
|
2574
|
-
for (const
|
|
2575
|
-
|
|
2837
|
+
if (p.i.pa) {
|
|
2838
|
+
for (const n of p.i.pa) {
|
|
2839
|
+
n.constructor.hasOwnProperty(b) || (n.constructor[b] = x);
|
|
2576
2840
|
}
|
|
2577
2841
|
}
|
|
2578
2842
|
return [];
|
|
@@ -2582,28 +2846,28 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2582
2846
|
}, _embind_register_class_class_property:(a, b, c, d, e, f, g, k) => {
|
|
2583
2847
|
b = R(b);
|
|
2584
2848
|
f = U(e, f);
|
|
2585
|
-
T([], [a],
|
|
2586
|
-
|
|
2587
|
-
var
|
|
2588
|
-
Vc(`Cannot access ${
|
|
2849
|
+
T([], [a], p => {
|
|
2850
|
+
p = p[0];
|
|
2851
|
+
var m = `${p.name}.${b}`, t = {get() {
|
|
2852
|
+
Vc(`Cannot access ${m} due to unbound types`, [c]);
|
|
2589
2853
|
}, enumerable:!0, configurable:!0};
|
|
2590
2854
|
t.set = k ? () => {
|
|
2591
|
-
Vc(`Cannot access ${
|
|
2855
|
+
Vc(`Cannot access ${m} due to unbound types`, [c]);
|
|
2592
2856
|
} : () => {
|
|
2593
|
-
throw new P(`${
|
|
2857
|
+
throw new P(`${m} is a read-only property`);
|
|
2594
2858
|
};
|
|
2595
|
-
Object.defineProperty(
|
|
2859
|
+
Object.defineProperty(p.i.constructor, b, t);
|
|
2596
2860
|
T([], [c], v => {
|
|
2597
2861
|
v = v[0];
|
|
2598
2862
|
var x = {get() {
|
|
2599
2863
|
return v.fromWireType(f(d));
|
|
2600
2864
|
}, enumerable:!0};
|
|
2601
|
-
k && (k = U(g, k), x.set =
|
|
2865
|
+
k && (k = U(g, k), x.set = n => {
|
|
2602
2866
|
var r = [];
|
|
2603
|
-
k(d, v.toWireType(r,
|
|
2867
|
+
k(d, v.toWireType(r, n));
|
|
2604
2868
|
xc(r);
|
|
2605
2869
|
});
|
|
2606
|
-
Object.defineProperty(
|
|
2870
|
+
Object.defineProperty(p.i.constructor, b, x);
|
|
2607
2871
|
return [];
|
|
2608
2872
|
});
|
|
2609
2873
|
return [];
|
|
@@ -2613,7 +2877,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2613
2877
|
e = U(d, e);
|
|
2614
2878
|
T([], [a], k => {
|
|
2615
2879
|
k = k[0];
|
|
2616
|
-
var
|
|
2880
|
+
var p = `constructor ${k.name}`;
|
|
2617
2881
|
void 0 === k.i.Z && (k.i.Z = []);
|
|
2618
2882
|
if (void 0 !== k.i.Z[b - 1]) {
|
|
2619
2883
|
throw new P(`Cannot register multiple constructors with identical number of parameters (${b - 1}) for class '${k.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
@@ -2621,36 +2885,36 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2621
2885
|
k.i.Z[b - 1] = () => {
|
|
2622
2886
|
Vc(`Cannot construct ${k.name} due to unbound types`, g);
|
|
2623
2887
|
};
|
|
2624
|
-
T([], g,
|
|
2625
|
-
|
|
2626
|
-
k.i.Z[b - 1] = Xc(
|
|
2888
|
+
T([], g, m => {
|
|
2889
|
+
m.splice(1, 0, null);
|
|
2890
|
+
k.i.Z[b - 1] = Xc(p, m, null, e, f);
|
|
2627
2891
|
return [];
|
|
2628
2892
|
});
|
|
2629
2893
|
return [];
|
|
2630
2894
|
});
|
|
2631
2895
|
}, _embind_register_class_function:(a, b, c, d, e, f, g, k) => {
|
|
2632
|
-
var
|
|
2896
|
+
var p = Yc(c, d);
|
|
2633
2897
|
b = R(b);
|
|
2634
2898
|
b = Zc(b);
|
|
2635
2899
|
f = U(e, f);
|
|
2636
|
-
T([], [a],
|
|
2900
|
+
T([], [a], m => {
|
|
2637
2901
|
function t() {
|
|
2638
|
-
Vc(`Cannot call ${v} due to unbound types`,
|
|
2902
|
+
Vc(`Cannot call ${v} due to unbound types`, p);
|
|
2639
2903
|
}
|
|
2640
|
-
|
|
2641
|
-
var v = `${
|
|
2904
|
+
m = m[0];
|
|
2905
|
+
var v = `${m.name}.${b}`;
|
|
2642
2906
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2643
|
-
k &&
|
|
2644
|
-
var x =
|
|
2645
|
-
void 0 ===
|
|
2646
|
-
T([],
|
|
2647
|
-
r = Xc(v, r,
|
|
2907
|
+
k && m.i.ob.push(b);
|
|
2908
|
+
var x = m.i.M, n = x[b];
|
|
2909
|
+
void 0 === n || void 0 === n.A && n.className !== m.name && n.ga === c - 2 ? (t.ga = c - 2, t.className = m.name, x[b] = t) : (Ec(x, b, v), x[b].A[c - 2] = t);
|
|
2910
|
+
T([], p, r => {
|
|
2911
|
+
r = Xc(v, r, m, f, g);
|
|
2648
2912
|
void 0 === x[b].A ? (r.ga = c - 2, x[b] = r) : x[b].A[c - 2] = r;
|
|
2649
2913
|
return [];
|
|
2650
2914
|
});
|
|
2651
2915
|
return [];
|
|
2652
2916
|
});
|
|
2653
|
-
}, _embind_register_class_property:(a, b, c, d, e, f, g, k,
|
|
2917
|
+
}, _embind_register_class_property:(a, b, c, d, e, f, g, k, p, m) => {
|
|
2654
2918
|
b = R(b);
|
|
2655
2919
|
e = U(d, e);
|
|
2656
2920
|
T([], [a], t => {
|
|
@@ -2658,21 +2922,21 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2658
2922
|
var v = `${t.name}.${b}`, x = {get() {
|
|
2659
2923
|
Vc(`Cannot access ${v} due to unbound types`, [c, g]);
|
|
2660
2924
|
}, enumerable:!0, configurable:!0};
|
|
2661
|
-
x.set =
|
|
2925
|
+
x.set = p ? () => Vc(`Cannot access ${v} due to unbound types`, [c, g]) : () => {
|
|
2662
2926
|
throw new P(v + " is a read-only property");
|
|
2663
2927
|
};
|
|
2664
2928
|
Object.defineProperty(t.i.M, b, x);
|
|
2665
|
-
T([],
|
|
2666
|
-
var r =
|
|
2929
|
+
T([], p ? [c, g] : [c], n => {
|
|
2930
|
+
var r = n[0], u = {get() {
|
|
2667
2931
|
var A = $c(this, t, v + " getter");
|
|
2668
2932
|
return r.fromWireType(e(f, A));
|
|
2669
2933
|
}, enumerable:!0};
|
|
2670
|
-
if (
|
|
2671
|
-
|
|
2672
|
-
var z =
|
|
2934
|
+
if (p) {
|
|
2935
|
+
p = U(k, p);
|
|
2936
|
+
var z = n[1];
|
|
2673
2937
|
u.set = function(A) {
|
|
2674
2938
|
var C = $c(this, t, v + " setter"), G = [];
|
|
2675
|
-
m
|
|
2939
|
+
p(m, C, z.toWireType(G, A));
|
|
2676
2940
|
xc(G);
|
|
2677
2941
|
};
|
|
2678
2942
|
}
|
|
@@ -2721,10 +2985,10 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2721
2985
|
var f = 32 - 8 * c;
|
|
2722
2986
|
e = k => k << f >>> f;
|
|
2723
2987
|
}
|
|
2724
|
-
var g = b.includes("unsigned") ? function(k,
|
|
2725
|
-
return
|
|
2726
|
-
} : function(k,
|
|
2727
|
-
return
|
|
2988
|
+
var g = b.includes("unsigned") ? function(k, p) {
|
|
2989
|
+
return p >>> 0;
|
|
2990
|
+
} : function(k, p) {
|
|
2991
|
+
return p;
|
|
2728
2992
|
};
|
|
2729
2993
|
S(a, {name:b, fromWireType:e, toWireType:g, argPackAdvance:8, readValueFromPointer:ed(b, c, 0 !== d), L:null,});
|
|
2730
2994
|
}, _embind_register_memory_view:(a, b, c) => {
|
|
@@ -2741,26 +3005,26 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2741
3005
|
var e = H[d >> 2], f = d + 4;
|
|
2742
3006
|
if (c) {
|
|
2743
3007
|
for (var g = f, k = 0; k <= e; ++k) {
|
|
2744
|
-
var
|
|
2745
|
-
if (k == e || 0 == D[
|
|
2746
|
-
g = g ? L(D, g,
|
|
2747
|
-
if (void 0 ===
|
|
2748
|
-
var
|
|
3008
|
+
var p = f + k;
|
|
3009
|
+
if (k == e || 0 == D[p]) {
|
|
3010
|
+
g = g ? L(D, g, p - g) : "";
|
|
3011
|
+
if (void 0 === m) {
|
|
3012
|
+
var m = g;
|
|
2749
3013
|
} else {
|
|
2750
|
-
|
|
3014
|
+
m += String.fromCharCode(0), m += g;
|
|
2751
3015
|
}
|
|
2752
|
-
g =
|
|
3016
|
+
g = p + 1;
|
|
2753
3017
|
}
|
|
2754
3018
|
}
|
|
2755
3019
|
} else {
|
|
2756
|
-
|
|
3020
|
+
m = Array(e);
|
|
2757
3021
|
for (k = 0; k < e; ++k) {
|
|
2758
|
-
|
|
3022
|
+
m[k] = String.fromCharCode(D[f + k]);
|
|
2759
3023
|
}
|
|
2760
|
-
|
|
3024
|
+
m = m.join("");
|
|
2761
3025
|
}
|
|
2762
3026
|
lc(d);
|
|
2763
|
-
return
|
|
3027
|
+
return m;
|
|
2764
3028
|
}, toWireType:function(d, e) {
|
|
2765
3029
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
2766
3030
|
var f = "string" == typeof e;
|
|
@@ -2768,22 +3032,22 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2768
3032
|
throw new P("Cannot pass non-string to std::string");
|
|
2769
3033
|
}
|
|
2770
3034
|
var g = c && f ? fb(e) : e.length;
|
|
2771
|
-
var k = Ud(4 + g + 1),
|
|
3035
|
+
var k = Ud(4 + g + 1), p = k + 4;
|
|
2772
3036
|
H[k >> 2] = g;
|
|
2773
3037
|
if (c && f) {
|
|
2774
|
-
gb(e, D,
|
|
3038
|
+
gb(e, D, p, g + 1);
|
|
2775
3039
|
} else {
|
|
2776
3040
|
if (f) {
|
|
2777
3041
|
for (f = 0; f < g; ++f) {
|
|
2778
|
-
var
|
|
2779
|
-
if (255 <
|
|
2780
|
-
throw lc(
|
|
3042
|
+
var m = e.charCodeAt(f);
|
|
3043
|
+
if (255 < m) {
|
|
3044
|
+
throw lc(p), new P("String has UTF-16 code units that do not fit in 8 bits");
|
|
2781
3045
|
}
|
|
2782
|
-
D[
|
|
3046
|
+
D[p + f] = m;
|
|
2783
3047
|
}
|
|
2784
3048
|
} else {
|
|
2785
3049
|
for (f = 0; f < g; ++f) {
|
|
2786
|
-
D[
|
|
3050
|
+
D[p + f] = e[f];
|
|
2787
3051
|
}
|
|
2788
3052
|
}
|
|
2789
3053
|
}
|
|
@@ -2803,21 +3067,21 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2803
3067
|
4 === b && (d = kd, e = ld, f = md, g = k => H[k >> 2]);
|
|
2804
3068
|
}
|
|
2805
3069
|
S(a, {name:c, fromWireType:k => {
|
|
2806
|
-
for (var
|
|
3070
|
+
for (var p = H[k >> 2], m, t = k + 4, v = 0; v <= p; ++v) {
|
|
2807
3071
|
var x = k + 4 + v * b;
|
|
2808
|
-
if (v ==
|
|
2809
|
-
t = d(t, x - t), void 0 ===
|
|
3072
|
+
if (v == p || 0 == g(x)) {
|
|
3073
|
+
t = d(t, x - t), void 0 === m ? m = t : (m += String.fromCharCode(0), m += t), t = x + b;
|
|
2810
3074
|
}
|
|
2811
3075
|
}
|
|
2812
3076
|
lc(k);
|
|
2813
|
-
return
|
|
2814
|
-
}, toWireType:(k,
|
|
2815
|
-
if ("string" != typeof
|
|
3077
|
+
return m;
|
|
3078
|
+
}, toWireType:(k, p) => {
|
|
3079
|
+
if ("string" != typeof p) {
|
|
2816
3080
|
throw new P(`Cannot pass non-string to C++ string type ${c}`);
|
|
2817
3081
|
}
|
|
2818
|
-
var
|
|
2819
|
-
H[t >> 2] =
|
|
2820
|
-
e(
|
|
3082
|
+
var m = f(p), t = Ud(4 + m + b);
|
|
3083
|
+
H[t >> 2] = m / b;
|
|
3084
|
+
e(p, t + 4, m + b);
|
|
2821
3085
|
null !== k && k.push(lc, t);
|
|
2822
3086
|
return t;
|
|
2823
3087
|
}, argPackAdvance:8, readValueFromPointer:yc, L(k) {
|
|
@@ -2825,8 +3089,8 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2825
3089
|
}});
|
|
2826
3090
|
}, _embind_register_value_object:(a, b, c, d, e, f) => {
|
|
2827
3091
|
wc[a] = {name:R(b), Ta:U(c, d), O:U(e, f), eb:[],};
|
|
2828
|
-
}, _embind_register_value_object_field:(a, b, c, d, e, f, g, k,
|
|
2829
|
-
wc[a].eb.push({Lb:R(b), Rb:c, Pb:U(d, e), Qb:f, dc:g, cc:U(k,
|
|
3092
|
+
}, _embind_register_value_object_field:(a, b, c, d, e, f, g, k, p, m) => {
|
|
3093
|
+
wc[a].eb.push({Lb:R(b), Rb:c, Pb:U(d, e), Qb:f, dc:g, cc:U(k, p), ec:m,});
|
|
2830
3094
|
}, _embind_register_void:(a, b) => {
|
|
2831
3095
|
b = R(b);
|
|
2832
3096
|
S(a, {Dc:!0, name:b, argPackAdvance:0, fromWireType:() => {
|
|
@@ -2838,22 +3102,26 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2838
3102
|
a = Q(a);
|
|
2839
3103
|
b = nc(b, "emval::as");
|
|
2840
3104
|
return nd(b, c, a);
|
|
3105
|
+
}, _emval_call:(a, b, c, d) => {
|
|
3106
|
+
a = od[a];
|
|
3107
|
+
b = Q(b);
|
|
3108
|
+
return a(null, b, c, d);
|
|
2841
3109
|
}, _emval_call_method:(a, b, c, d, e) => {
|
|
2842
|
-
a =
|
|
3110
|
+
a = od[a];
|
|
2843
3111
|
b = Q(b);
|
|
2844
|
-
c =
|
|
3112
|
+
c = qd(c);
|
|
2845
3113
|
return a(b, b[c], d, e);
|
|
2846
3114
|
}, _emval_decref:ad, _emval_get_method_caller:(a, b, c) => {
|
|
2847
3115
|
var d = sd(a, b), e = d.shift();
|
|
2848
3116
|
a--;
|
|
2849
3117
|
var f = Array(a);
|
|
2850
3118
|
b = `methodCaller<(${d.map(g => g.name).join(", ")}) => ${e.name}>`;
|
|
2851
|
-
return rd(Zb(b, (g, k,
|
|
3119
|
+
return rd(Zb(b, (g, k, p, m) => {
|
|
2852
3120
|
for (var t = 0, v = 0; v < a; ++v) {
|
|
2853
|
-
f[v] = d[v].readValueFromPointer(
|
|
3121
|
+
f[v] = d[v].readValueFromPointer(m + t), t += d[v].argPackAdvance;
|
|
2854
3122
|
}
|
|
2855
3123
|
g = 1 === c ? td(k, f) : k.apply(g, f);
|
|
2856
|
-
return nd(e,
|
|
3124
|
+
return nd(e, p, g);
|
|
2857
3125
|
}));
|
|
2858
3126
|
}, _emval_get_property:(a, b) => {
|
|
2859
3127
|
a = Q(a);
|
|
@@ -2861,7 +3129,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2861
3129
|
return ac(a[b]);
|
|
2862
3130
|
}, _emval_incref:a => {
|
|
2863
3131
|
9 < a && (O[a + 1] += 1);
|
|
2864
|
-
}, _emval_new_array:() => ac([]), _emval_new_cstring:a => ac(
|
|
3132
|
+
}, _emval_new_array:() => ac([]), _emval_new_cstring:a => ac(qd(a)), _emval_new_object:() => ac({}), _emval_run_destructors:a => {
|
|
2865
3133
|
var b = Q(a);
|
|
2866
3134
|
xc(b);
|
|
2867
3135
|
ad(a);
|
|
@@ -2904,7 +3172,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2904
3172
|
var k = g.getTimezoneOffset();
|
|
2905
3173
|
H[a >> 2] = 60 * Math.max(e, k);
|
|
2906
3174
|
F[b >> 2] = Number(e != k);
|
|
2907
|
-
a =
|
|
3175
|
+
a = p => p.toLocaleTimeString(void 0, {hour12:!1, timeZoneName:"short"}).split(" ")[1];
|
|
2908
3176
|
f = a(f);
|
|
2909
3177
|
g = a(g);
|
|
2910
3178
|
k < e ? (gb(f, D, c, 17), gb(g, D, d, 17)) : (gb(f, D, d, 17), gb(g, D, c, 17));
|
|
@@ -3027,39 +3295,39 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3027
3295
|
var e = Kb(a);
|
|
3028
3296
|
a = b;
|
|
3029
3297
|
for (var f, g = b = 0; g < c; g++) {
|
|
3030
|
-
var k = H[a >> 2],
|
|
3298
|
+
var k = H[a >> 2], p = H[a + 4 >> 2];
|
|
3031
3299
|
a += 8;
|
|
3032
|
-
var
|
|
3033
|
-
if (0 >
|
|
3300
|
+
var m = e, t = f, v = B;
|
|
3301
|
+
if (0 > p || 0 > t) {
|
|
3034
3302
|
throw new M(28);
|
|
3035
3303
|
}
|
|
3036
|
-
if (null ===
|
|
3304
|
+
if (null === m.W) {
|
|
3037
3305
|
throw new M(8);
|
|
3038
3306
|
}
|
|
3039
|
-
if (1 === (
|
|
3307
|
+
if (1 === (m.flags & 2097155)) {
|
|
3040
3308
|
throw new M(8);
|
|
3041
3309
|
}
|
|
3042
|
-
if (16384 === (
|
|
3310
|
+
if (16384 === (m.node.mode & 61440)) {
|
|
3043
3311
|
throw new M(31);
|
|
3044
3312
|
}
|
|
3045
|
-
if (!
|
|
3313
|
+
if (!m.m.read) {
|
|
3046
3314
|
throw new M(28);
|
|
3047
3315
|
}
|
|
3048
3316
|
var x = "undefined" != typeof t;
|
|
3049
3317
|
if (!x) {
|
|
3050
|
-
t =
|
|
3051
|
-
} else if (!
|
|
3318
|
+
t = m.position;
|
|
3319
|
+
} else if (!m.seekable) {
|
|
3052
3320
|
throw new M(70);
|
|
3053
3321
|
}
|
|
3054
|
-
var
|
|
3055
|
-
x || (
|
|
3056
|
-
var r =
|
|
3322
|
+
var n = m.m.read(m, v, k, p, t);
|
|
3323
|
+
x || (m.position += n);
|
|
3324
|
+
var r = n;
|
|
3057
3325
|
if (0 > r) {
|
|
3058
3326
|
var u = -1;
|
|
3059
3327
|
break a;
|
|
3060
3328
|
}
|
|
3061
3329
|
b += r;
|
|
3062
|
-
if (r <
|
|
3330
|
+
if (r < p) {
|
|
3063
3331
|
break;
|
|
3064
3332
|
}
|
|
3065
3333
|
"undefined" != typeof f && (f += r);
|
|
@@ -3099,33 +3367,33 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3099
3367
|
var e = Kb(a);
|
|
3100
3368
|
a = b;
|
|
3101
3369
|
for (var f, g = b = 0; g < c; g++) {
|
|
3102
|
-
var k = H[a >> 2],
|
|
3370
|
+
var k = H[a >> 2], p = H[a + 4 >> 2];
|
|
3103
3371
|
a += 8;
|
|
3104
|
-
var
|
|
3372
|
+
var m = e, t = k, v = p, x = f, n = B;
|
|
3105
3373
|
if (0 > v || 0 > x) {
|
|
3106
3374
|
throw new M(28);
|
|
3107
3375
|
}
|
|
3108
|
-
if (null ===
|
|
3376
|
+
if (null === m.W) {
|
|
3109
3377
|
throw new M(8);
|
|
3110
3378
|
}
|
|
3111
|
-
if (0 === (
|
|
3379
|
+
if (0 === (m.flags & 2097155)) {
|
|
3112
3380
|
throw new M(8);
|
|
3113
3381
|
}
|
|
3114
|
-
if (16384 === (
|
|
3382
|
+
if (16384 === (m.node.mode & 61440)) {
|
|
3115
3383
|
throw new M(31);
|
|
3116
3384
|
}
|
|
3117
|
-
if (!
|
|
3385
|
+
if (!m.m.write) {
|
|
3118
3386
|
throw new M(28);
|
|
3119
3387
|
}
|
|
3120
|
-
|
|
3388
|
+
m.seekable && m.flags & 1024 && Ub(m, 0, 2);
|
|
3121
3389
|
var r = "undefined" != typeof x;
|
|
3122
3390
|
if (!r) {
|
|
3123
|
-
x =
|
|
3124
|
-
} else if (!
|
|
3391
|
+
x = m.position;
|
|
3392
|
+
} else if (!m.seekable) {
|
|
3125
3393
|
throw new M(70);
|
|
3126
3394
|
}
|
|
3127
|
-
var u =
|
|
3128
|
-
r || (
|
|
3395
|
+
var u = m.m.write(m, n, t, v, x, void 0);
|
|
3396
|
+
r || (m.position += u);
|
|
3129
3397
|
var z = u;
|
|
3130
3398
|
if (0 > z) {
|
|
3131
3399
|
var A = -1;
|
|
@@ -3165,7 +3433,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3165
3433
|
W.bindTexture(a, Fd[b]);
|
|
3166
3434
|
}, glBindVertexArray:a => {
|
|
3167
3435
|
W.bindVertexArray(Hd[a]);
|
|
3168
|
-
}, glBlendEquation:a => W.blendEquation(a), glBlendFunc:(a, b) => W.blendFunc(a, b), glBlitFramebuffer:(a, b, c, d, e, f, g, k,
|
|
3436
|
+
}, glBlendEquation:a => W.blendEquation(a), glBlendFunc:(a, b) => W.blendFunc(a, b), glBlitFramebuffer:(a, b, c, d, e, f, g, k, p, m) => W.blitFramebuffer(a, b, c, d, e, f, g, k, p, m), glBufferData:(a, b, c, d) => {
|
|
3169
3437
|
c && b ? W.bufferData(a, D, d, c, b) : W.bufferData(a, b, d);
|
|
3170
3438
|
}, glBufferSubData:(a, b, c, d) => {
|
|
3171
3439
|
c && W.bufferSubData(a, b, D, d, c);
|
|
@@ -3332,13 +3600,13 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3332
3600
|
var g = W.getActiveUniform(c, f);
|
|
3333
3601
|
var k = g.name;
|
|
3334
3602
|
g = g.size;
|
|
3335
|
-
var
|
|
3336
|
-
|
|
3337
|
-
var
|
|
3603
|
+
var p = Wd(k);
|
|
3604
|
+
p = 0 < p ? k.slice(0, p) : k;
|
|
3605
|
+
var m = c.Wa;
|
|
3338
3606
|
c.Wa += g;
|
|
3339
|
-
e[
|
|
3607
|
+
e[p] = [g, m];
|
|
3340
3608
|
for (k = 0; k < g; ++k) {
|
|
3341
|
-
d[
|
|
3609
|
+
d[m] = k, c.vb[m++] = p;
|
|
3342
3610
|
}
|
|
3343
3611
|
}
|
|
3344
3612
|
}
|
|
@@ -3382,22 +3650,22 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3382
3650
|
}
|
|
3383
3651
|
W.shaderSource(Gd[a], e);
|
|
3384
3652
|
}, glStencilFunc:(a, b, c) => W.stencilFunc(a, b, c), glStencilFuncSeparate:(a, b, c, d) => W.stencilFuncSeparate(a, b, c, d), glStencilMask:a => W.stencilMask(a), glStencilOp:(a, b, c) => W.stencilOp(a, b, c), glStencilOpSeparate:(a, b, c, d) => W.stencilOpSeparate(a, b, c, d), glTexParameteri:(a, b, c) => W.texParameteri(a, b, c), glTexStorage2D:(a, b, c, d, e) => W.texStorage2D(a, b, c, d, e), glTexStorage3D:(a, b, c, d, e, f) => W.texStorage3D(a, b, c, d, e, f), glTexSubImage2D:(a, b, c, d, e,
|
|
3385
|
-
f, g, k,
|
|
3653
|
+
f, g, k, p) => {
|
|
3386
3654
|
if (W.Oa) {
|
|
3387
|
-
W.texSubImage2D(a, b, c, d, e, f, g, k,
|
|
3655
|
+
W.texSubImage2D(a, b, c, d, e, f, g, k, p);
|
|
3388
3656
|
} else {
|
|
3389
|
-
if (
|
|
3390
|
-
var
|
|
3391
|
-
W.texSubImage2D(a, b, c, d, e, f, g, k,
|
|
3657
|
+
if (p) {
|
|
3658
|
+
var m = Xd(k);
|
|
3659
|
+
W.texSubImage2D(a, b, c, d, e, f, g, k, m, p >>> 31 - Math.clz32(m.BYTES_PER_ELEMENT));
|
|
3392
3660
|
} else {
|
|
3393
|
-
if (
|
|
3394
|
-
|
|
3395
|
-
var t = f * ((Kd || e) * ({5:3, 6:4, 8:2, 29502:3, 29504:4, 26917:2, 26918:2, 29846:3, 29847:4}[g - 6402] || 1) *
|
|
3396
|
-
|
|
3661
|
+
if (p) {
|
|
3662
|
+
m = Xd(k);
|
|
3663
|
+
var t = f * ((Kd || e) * ({5:3, 6:4, 8:2, 29502:3, 29504:4, 26917:2, 26918:2, 29846:3, 29847:4}[g - 6402] || 1) * m.BYTES_PER_ELEMENT + Jd - 1 & -Jd);
|
|
3664
|
+
p = m.subarray(p >>> 31 - Math.clz32(m.BYTES_PER_ELEMENT), p + t >>> 31 - Math.clz32(m.BYTES_PER_ELEMENT));
|
|
3397
3665
|
} else {
|
|
3398
|
-
|
|
3666
|
+
p = null;
|
|
3399
3667
|
}
|
|
3400
|
-
W.texSubImage2D(a, b, c, d, e, f, g, k,
|
|
3668
|
+
W.texSubImage2D(a, b, c, d, e, f, g, k, p);
|
|
3401
3669
|
}
|
|
3402
3670
|
}
|
|
3403
3671
|
}, glUniform1i:(a, b) => {
|
|
@@ -3472,8 +3740,8 @@ l.dynCall_vijj = (a, b, c, d, e, f) => (l.dynCall_vijj = Y.dynCall_vijj)(a, b, c
|
|
|
3472
3740
|
l.dynCall_jiji = (a, b, c, d, e) => (l.dynCall_jiji = Y.dynCall_jiji)(a, b, c, d, e);
|
|
3473
3741
|
l.dynCall_viijii = (a, b, c, d, e, f, g) => (l.dynCall_viijii = Y.dynCall_viijii)(a, b, c, d, e, f, g);
|
|
3474
3742
|
l.dynCall_iiiiij = (a, b, c, d, e, f, g) => (l.dynCall_iiiiij = Y.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3475
|
-
l.dynCall_iiiiijj = (a, b, c, d, e, f, g, k,
|
|
3476
|
-
l.dynCall_iiiiiijj = (a, b, c, d, e, f, g, k,
|
|
3743
|
+
l.dynCall_iiiiijj = (a, b, c, d, e, f, g, k, p) => (l.dynCall_iiiiijj = Y.dynCall_iiiiijj)(a, b, c, d, e, f, g, k, p);
|
|
3744
|
+
l.dynCall_iiiiiijj = (a, b, c, d, e, f, g, k, p, m) => (l.dynCall_iiiiiijj = Y.dynCall_iiiiiijj)(a, b, c, d, e, f, g, k, p, m);
|
|
3477
3745
|
function de(a, b, c) {
|
|
3478
3746
|
var d = he();
|
|
3479
3747
|
try {
|
|
@@ -3543,147 +3811,13 @@ moduleRtn = ca;
|
|
|
3543
3811
|
|
|
3544
3812
|
|
|
3545
3813
|
/***/ }),
|
|
3546
|
-
/*
|
|
3814
|
+
/* 5 */
|
|
3547
3815
|
/***/ ((module) => {
|
|
3548
3816
|
|
|
3549
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.
|
|
3817
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.37.1","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","runtimeLoader.d.ts","utils"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3550
3818
|
|
|
3551
3819
|
/***/ }),
|
|
3552
|
-
/*
|
|
3553
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3554
|
-
|
|
3555
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3556
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3557
|
-
/* harmony export */ Animation: () => (/* reexport safe */ _Animation__WEBPACK_IMPORTED_MODULE_0__.Animation)
|
|
3558
|
-
/* harmony export */ });
|
|
3559
|
-
/* harmony import */ var _Animation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
/***/ }),
|
|
3564
|
-
/* 4 */
|
|
3565
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3566
|
-
|
|
3567
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3568
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3569
|
-
/* harmony export */ Animation: () => (/* binding */ Animation)
|
|
3570
|
-
/* harmony export */ });
|
|
3571
|
-
/**
|
|
3572
|
-
* Represents an animation that can be played on an Artboard.
|
|
3573
|
-
* Wraps animations and instances from the runtime and keeps track of playback state.
|
|
3574
|
-
*
|
|
3575
|
-
* The `Animation` class manages the state and behavior of a single animation instance,
|
|
3576
|
-
* including its current time, loop count, and ability to scrub to a specific time.
|
|
3577
|
-
*
|
|
3578
|
-
* The class provides methods to advance the animation, apply its interpolated keyframe
|
|
3579
|
-
* values to the Artboard, and clean up the underlying animation instance when the
|
|
3580
|
-
* animation is no longer needed.
|
|
3581
|
-
*/
|
|
3582
|
-
var Animation = /** @class */ (function () {
|
|
3583
|
-
/**
|
|
3584
|
-
* Constructs a new animation
|
|
3585
|
-
* @constructor
|
|
3586
|
-
* @param {any} animation: runtime animation object
|
|
3587
|
-
* @param {any} instance: runtime animation instance object
|
|
3588
|
-
*/
|
|
3589
|
-
function Animation(animation, artboard, runtime, playing) {
|
|
3590
|
-
this.animation = animation;
|
|
3591
|
-
this.artboard = artboard;
|
|
3592
|
-
this.playing = playing;
|
|
3593
|
-
this.loopCount = 0;
|
|
3594
|
-
/**
|
|
3595
|
-
* The time to which the animation should move to on the next render.
|
|
3596
|
-
* If not null, the animation will scrub to this time instead of advancing by the given time.
|
|
3597
|
-
*/
|
|
3598
|
-
this.scrubTo = null;
|
|
3599
|
-
this.instance = new runtime.LinearAnimationInstance(animation, artboard);
|
|
3600
|
-
}
|
|
3601
|
-
Object.defineProperty(Animation.prototype, "name", {
|
|
3602
|
-
/**
|
|
3603
|
-
* Returns the animation's name
|
|
3604
|
-
*/
|
|
3605
|
-
get: function () {
|
|
3606
|
-
return this.animation.name;
|
|
3607
|
-
},
|
|
3608
|
-
enumerable: false,
|
|
3609
|
-
configurable: true
|
|
3610
|
-
});
|
|
3611
|
-
Object.defineProperty(Animation.prototype, "time", {
|
|
3612
|
-
/**
|
|
3613
|
-
* Returns the animation's name
|
|
3614
|
-
*/
|
|
3615
|
-
get: function () {
|
|
3616
|
-
return this.instance.time;
|
|
3617
|
-
},
|
|
3618
|
-
/**
|
|
3619
|
-
* Sets the animation's current time
|
|
3620
|
-
*/
|
|
3621
|
-
set: function (value) {
|
|
3622
|
-
this.instance.time = value;
|
|
3623
|
-
},
|
|
3624
|
-
enumerable: false,
|
|
3625
|
-
configurable: true
|
|
3626
|
-
});
|
|
3627
|
-
Object.defineProperty(Animation.prototype, "loopValue", {
|
|
3628
|
-
/**
|
|
3629
|
-
* Returns the animation's loop type
|
|
3630
|
-
*/
|
|
3631
|
-
get: function () {
|
|
3632
|
-
return this.animation.loopValue;
|
|
3633
|
-
},
|
|
3634
|
-
enumerable: false,
|
|
3635
|
-
configurable: true
|
|
3636
|
-
});
|
|
3637
|
-
Object.defineProperty(Animation.prototype, "needsScrub", {
|
|
3638
|
-
/**
|
|
3639
|
-
* Indicates whether the animation needs to be scrubbed.
|
|
3640
|
-
* @returns `true` if the animation needs to be scrubbed, `false` otherwise.
|
|
3641
|
-
*/
|
|
3642
|
-
get: function () {
|
|
3643
|
-
return this.scrubTo !== null;
|
|
3644
|
-
},
|
|
3645
|
-
enumerable: false,
|
|
3646
|
-
configurable: true
|
|
3647
|
-
});
|
|
3648
|
-
/**
|
|
3649
|
-
* Advances the animation by the give time. If the animation needs scrubbing,
|
|
3650
|
-
* time is ignored and the stored scrub value is used.
|
|
3651
|
-
* @param time the time to advance the animation by if no scrubbing required
|
|
3652
|
-
*/
|
|
3653
|
-
Animation.prototype.advance = function (time) {
|
|
3654
|
-
if (this.scrubTo === null) {
|
|
3655
|
-
this.instance.advance(time);
|
|
3656
|
-
}
|
|
3657
|
-
else {
|
|
3658
|
-
this.instance.time = 0;
|
|
3659
|
-
this.instance.advance(this.scrubTo);
|
|
3660
|
-
this.scrubTo = null;
|
|
3661
|
-
}
|
|
3662
|
-
};
|
|
3663
|
-
/**
|
|
3664
|
-
* Apply interpolated keyframe values to the artboard. This should be called after calling
|
|
3665
|
-
* .advance() on an animation instance so that new values are applied to properties.
|
|
3666
|
-
*
|
|
3667
|
-
* Note: This does not advance the artboard, which updates all objects on the artboard
|
|
3668
|
-
* @param mix - Mix value for the animation from 0 to 1
|
|
3669
|
-
*/
|
|
3670
|
-
Animation.prototype.apply = function (mix) {
|
|
3671
|
-
this.instance.apply(mix);
|
|
3672
|
-
};
|
|
3673
|
-
/**
|
|
3674
|
-
* Deletes the backing Wasm animation instance; once this is called, this
|
|
3675
|
-
* animation is no more.
|
|
3676
|
-
*/
|
|
3677
|
-
Animation.prototype.cleanup = function () {
|
|
3678
|
-
this.instance.delete();
|
|
3679
|
-
};
|
|
3680
|
-
return Animation;
|
|
3681
|
-
}());
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
/***/ }),
|
|
3686
|
-
/* 5 */
|
|
3820
|
+
/* 6 */
|
|
3687
3821
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3688
3822
|
|
|
3689
3823
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -3698,21 +3832,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3698
3832
|
/* harmony export */ FontWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.FontWrapper),
|
|
3699
3833
|
/* harmony export */ ImageAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.ImageAssetWrapper),
|
|
3700
3834
|
/* harmony export */ ImageWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.ImageWrapper),
|
|
3835
|
+
/* harmony export */ RiveFont: () => (/* reexport safe */ _riveFont__WEBPACK_IMPORTED_MODULE_3__.RiveFont),
|
|
3701
3836
|
/* harmony export */ createFinalization: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.createFinalization),
|
|
3702
3837
|
/* harmony export */ finalizationRegistry: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.finalizationRegistry),
|
|
3703
3838
|
/* harmony export */ registerTouchInteractions: () => (/* reexport safe */ _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__.registerTouchInteractions),
|
|
3704
3839
|
/* harmony export */ sanitizeUrl: () => (/* reexport safe */ _sanitizeUrl__WEBPACK_IMPORTED_MODULE_1__.sanitizeUrl)
|
|
3705
3840
|
/* harmony export */ });
|
|
3706
|
-
/* harmony import */ var _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3707
|
-
/* harmony import */ var _sanitizeUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3708
|
-
/* harmony import */ var _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
3841
|
+
/* harmony import */ var _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
|
|
3842
|
+
/* harmony import */ var _sanitizeUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
|
|
3843
|
+
/* harmony import */ var _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
|
|
3844
|
+
/* harmony import */ var _riveFont__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
|
|
3845
|
+
|
|
3709
3846
|
|
|
3710
3847
|
|
|
3711
3848
|
|
|
3712
3849
|
|
|
3713
3850
|
|
|
3714
3851
|
/***/ }),
|
|
3715
|
-
/*
|
|
3852
|
+
/* 7 */
|
|
3716
3853
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3717
3854
|
|
|
3718
3855
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -3966,7 +4103,7 @@ var registerTouchInteractions = function (_a) {
|
|
|
3966
4103
|
|
|
3967
4104
|
|
|
3968
4105
|
/***/ }),
|
|
3969
|
-
/*
|
|
4106
|
+
/* 8 */
|
|
3970
4107
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3971
4108
|
|
|
3972
4109
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -4019,7 +4156,7 @@ function sanitizeUrl(url) {
|
|
|
4019
4156
|
|
|
4020
4157
|
|
|
4021
4158
|
/***/ }),
|
|
4022
|
-
/*
|
|
4159
|
+
/* 9 */
|
|
4023
4160
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4024
4161
|
|
|
4025
4162
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -4297,6 +4434,79 @@ var createFinalization = function (target, finalizable) {
|
|
|
4297
4434
|
|
|
4298
4435
|
|
|
4299
4436
|
|
|
4437
|
+
/***/ }),
|
|
4438
|
+
/* 10 */
|
|
4439
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4440
|
+
|
|
4441
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4442
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4443
|
+
/* harmony export */ RiveFont: () => (/* binding */ RiveFont)
|
|
4444
|
+
/* harmony export */ });
|
|
4445
|
+
/* harmony import */ var _runtimeLoader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
|
4446
|
+
|
|
4447
|
+
// Class to manage fallback fonts for Rive.
|
|
4448
|
+
var RiveFont = /** @class */ (function () {
|
|
4449
|
+
// Class is never instantiated
|
|
4450
|
+
function RiveFont() {
|
|
4451
|
+
}
|
|
4452
|
+
/**
|
|
4453
|
+
* Set a callback to dynamically set a list of fallback fonts based on the missing glyph and/or style of the default font.
|
|
4454
|
+
* Set null to clear the callback.
|
|
4455
|
+
* @param fontCallback Callback to set a list of fallback fonts.
|
|
4456
|
+
*/
|
|
4457
|
+
RiveFont.setFallbackFontCallback = function (fontCallback) {
|
|
4458
|
+
RiveFont._fallbackFontCallback = fontCallback !== null && fontCallback !== void 0 ? fontCallback : null;
|
|
4459
|
+
RiveFont._wireFallbackProc();
|
|
4460
|
+
};
|
|
4461
|
+
// Get the pointer value to the Embind Font object from FontWrapper
|
|
4462
|
+
RiveFont._fontToPtr = function (fontWrapper) {
|
|
4463
|
+
var _a;
|
|
4464
|
+
if (fontWrapper == null)
|
|
4465
|
+
return null;
|
|
4466
|
+
var embindFont = fontWrapper.nativeFont;
|
|
4467
|
+
var ptr = (_a = embindFont === null || embindFont === void 0 ? void 0 : embindFont.ptr) === null || _a === void 0 ? void 0 : _a.call(embindFont);
|
|
4468
|
+
return ptr !== null && ptr !== void 0 ? ptr : null;
|
|
4469
|
+
};
|
|
4470
|
+
RiveFont._getFallbackPtr = function (fonts, index) {
|
|
4471
|
+
if (index < 0 || index >= fonts.length)
|
|
4472
|
+
return null;
|
|
4473
|
+
return RiveFont._fontToPtr(fonts[index]);
|
|
4474
|
+
};
|
|
4475
|
+
// Create the callback Rive expects to use for fallback fonts (regardless if set via a user-supplied static list, or callback)
|
|
4476
|
+
// 1. Ensure WASM is ready
|
|
4477
|
+
// 2. Bias for checking user callback over static list of fonts and pass it down to Rive to store as reference
|
|
4478
|
+
// - When calling the user callback, check if we have any fonts left to check, and if not, return null to indicate there are no more fallbacks to try.
|
|
4479
|
+
// - If the user callback returns an array of fonts, pass the pointer value to Rive of the font to try
|
|
4480
|
+
// 3. If no callback is provided, or the callback returns null, try the static list of fonts if they set any
|
|
4481
|
+
// 4. If no fallback method is set, return null.
|
|
4482
|
+
RiveFont._wireFallbackProc = function () {
|
|
4483
|
+
_runtimeLoader__WEBPACK_IMPORTED_MODULE_0__.RuntimeLoader.getInstance(function (rive) {
|
|
4484
|
+
var cb = RiveFont._fallbackFontCallback;
|
|
4485
|
+
if (cb) {
|
|
4486
|
+
rive.setFallbackFontCallback((function (missingGlyph, fallbackFontIndex, weight) {
|
|
4487
|
+
var fontsReturned = cb(missingGlyph, weight);
|
|
4488
|
+
if (fontsReturned) {
|
|
4489
|
+
if (Array.isArray(fontsReturned)) {
|
|
4490
|
+
return RiveFont._getFallbackPtr(fontsReturned, fallbackFontIndex);
|
|
4491
|
+
}
|
|
4492
|
+
// If the user callback only returns a single font, provide it to Rive the first time, otherwise if Rive
|
|
4493
|
+
// calls back a second time, return null to indicate there are no more fallbacks to try.
|
|
4494
|
+
return fallbackFontIndex === 0 ? RiveFont._fontToPtr(fontsReturned) : null;
|
|
4495
|
+
}
|
|
4496
|
+
return null;
|
|
4497
|
+
}));
|
|
4498
|
+
}
|
|
4499
|
+
else {
|
|
4500
|
+
rive.setFallbackFontCallback(null);
|
|
4501
|
+
}
|
|
4502
|
+
});
|
|
4503
|
+
};
|
|
4504
|
+
RiveFont._fallbackFontCallback = null;
|
|
4505
|
+
return RiveFont;
|
|
4506
|
+
}());
|
|
4507
|
+
|
|
4508
|
+
|
|
4509
|
+
|
|
4300
4510
|
/***/ })
|
|
4301
4511
|
/******/ ]);
|
|
4302
4512
|
/************************************************************************/
|
|
@@ -4370,7 +4580,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4370
4580
|
/* harmony export */ Rive: () => (/* binding */ Rive),
|
|
4371
4581
|
/* harmony export */ RiveEventType: () => (/* binding */ RiveEventType),
|
|
4372
4582
|
/* harmony export */ RiveFile: () => (/* binding */ RiveFile),
|
|
4373
|
-
/* harmony export */
|
|
4583
|
+
/* harmony export */ RiveFont: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_2__.RiveFont),
|
|
4584
|
+
/* harmony export */ RuntimeLoader: () => (/* reexport safe */ _runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader),
|
|
4374
4585
|
/* harmony export */ StateMachineInput: () => (/* binding */ StateMachineInput),
|
|
4375
4586
|
/* harmony export */ StateMachineInputType: () => (/* binding */ StateMachineInputType),
|
|
4376
4587
|
/* harmony export */ Testing: () => (/* binding */ Testing),
|
|
@@ -4390,10 +4601,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4390
4601
|
/* harmony export */ decodeFont: () => (/* binding */ decodeFont),
|
|
4391
4602
|
/* harmony export */ decodeImage: () => (/* binding */ decodeImage)
|
|
4392
4603
|
/* harmony export */ });
|
|
4393
|
-
/* harmony import */ var
|
|
4394
|
-
/* harmony import */ var
|
|
4395
|
-
/* harmony import */ var
|
|
4396
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
4604
|
+
/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
4605
|
+
/* harmony import */ var _runtimeLoader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
4606
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
4397
4607
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
4398
4608
|
var extendStatics = function (d, b) {
|
|
4399
4609
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -4468,7 +4678,6 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
|
4468
4678
|
|
|
4469
4679
|
|
|
4470
4680
|
|
|
4471
|
-
|
|
4472
4681
|
var RiveError = /** @class */ (function (_super) {
|
|
4473
4682
|
__extends(RiveError, _super);
|
|
4474
4683
|
function RiveError() {
|
|
@@ -4478,6 +4687,7 @@ var RiveError = /** @class */ (function (_super) {
|
|
|
4478
4687
|
}
|
|
4479
4688
|
return RiveError;
|
|
4480
4689
|
}(Error));
|
|
4690
|
+
|
|
4481
4691
|
// #regions helpers
|
|
4482
4692
|
var resolveErrorMessage = function (error) {
|
|
4483
4693
|
return error && error.isHandledError
|
|
@@ -4602,115 +4812,8 @@ var Layout = /** @class */ (function () {
|
|
|
4602
4812
|
return Layout;
|
|
4603
4813
|
}());
|
|
4604
4814
|
|
|
4605
|
-
//
|
|
4606
|
-
//
|
|
4607
|
-
var RuntimeLoader = /** @class */ (function () {
|
|
4608
|
-
// Class is never instantiated
|
|
4609
|
-
function RuntimeLoader() {
|
|
4610
|
-
}
|
|
4611
|
-
// Loads the runtime
|
|
4612
|
-
RuntimeLoader.loadRuntime = function () {
|
|
4613
|
-
if (RuntimeLoader.enablePerfMarks)
|
|
4614
|
-
performance.mark('rive:wasm-init:start');
|
|
4615
|
-
_rive_advanced_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]({
|
|
4616
|
-
// Loads Wasm bundle
|
|
4617
|
-
locateFile: function () { return RuntimeLoader.wasmURL; },
|
|
4618
|
-
})
|
|
4619
|
-
.then(function (rive) {
|
|
4620
|
-
var _a;
|
|
4621
|
-
if (RuntimeLoader.enablePerfMarks) {
|
|
4622
|
-
performance.mark('rive:wasm-init:end');
|
|
4623
|
-
performance.measure('rive:wasm-init', 'rive:wasm-init:start', 'rive:wasm-init:end');
|
|
4624
|
-
}
|
|
4625
|
-
RuntimeLoader.runtime = rive;
|
|
4626
|
-
// Fire all the callbacks
|
|
4627
|
-
while (RuntimeLoader.callBackQueue.length > 0) {
|
|
4628
|
-
(_a = RuntimeLoader.callBackQueue.shift()) === null || _a === void 0 ? void 0 : _a(RuntimeLoader.runtime);
|
|
4629
|
-
}
|
|
4630
|
-
})
|
|
4631
|
-
.catch(function (error) {
|
|
4632
|
-
// Capture specific error details
|
|
4633
|
-
var errorDetails = {
|
|
4634
|
-
message: (error === null || error === void 0 ? void 0 : error.message) || "Unknown error",
|
|
4635
|
-
type: (error === null || error === void 0 ? void 0 : error.name) || "Error",
|
|
4636
|
-
// Some browsers may provide additional WebAssembly-specific details
|
|
4637
|
-
wasmError: error instanceof WebAssembly.CompileError ||
|
|
4638
|
-
error instanceof WebAssembly.RuntimeError,
|
|
4639
|
-
originalError: error,
|
|
4640
|
-
};
|
|
4641
|
-
// Log detailed error for debugging
|
|
4642
|
-
console.debug("Rive WASM load error details:", errorDetails);
|
|
4643
|
-
// In case unpkg fails, or the wasm was not supported, we try to load the fallback module from jsdelivr.
|
|
4644
|
-
// This `rive_fallback.wasm` is compiled to support older architecture.
|
|
4645
|
-
// TODO: (Gordon): preemptively test browser support and load the correct wasm file. Then use jsdelvr only if unpkg fails.
|
|
4646
|
-
var backupJsdelivrUrl = "https://cdn.jsdelivr.net/npm/".concat(package_json__WEBPACK_IMPORTED_MODULE_1__.name, "@").concat(package_json__WEBPACK_IMPORTED_MODULE_1__.version, "/rive_fallback.wasm");
|
|
4647
|
-
if (RuntimeLoader.wasmURL.toLowerCase() !== backupJsdelivrUrl) {
|
|
4648
|
-
console.warn("Failed to load WASM from ".concat(RuntimeLoader.wasmURL, " (").concat(errorDetails.message, "), trying jsdelivr as a backup"));
|
|
4649
|
-
RuntimeLoader.setWasmUrl(backupJsdelivrUrl);
|
|
4650
|
-
RuntimeLoader.loadRuntime();
|
|
4651
|
-
}
|
|
4652
|
-
else {
|
|
4653
|
-
var errorMessage = [
|
|
4654
|
-
"Could not load Rive WASM file from ".concat(RuntimeLoader.wasmURL, " or ").concat(backupJsdelivrUrl, "."),
|
|
4655
|
-
"Possible reasons:",
|
|
4656
|
-
"- Network connection is down",
|
|
4657
|
-
"- WebAssembly is not supported in this environment",
|
|
4658
|
-
"- The WASM file is corrupted or incompatible",
|
|
4659
|
-
"\nError details:",
|
|
4660
|
-
"- Type: ".concat(errorDetails.type),
|
|
4661
|
-
"- Message: ".concat(errorDetails.message),
|
|
4662
|
-
"- WebAssembly-specific error: ".concat(errorDetails.wasmError),
|
|
4663
|
-
"\nTo resolve, you may need to:",
|
|
4664
|
-
"1. Check your network connection",
|
|
4665
|
-
"2. Set a new WASM source via RuntimeLoader.setWasmUrl()",
|
|
4666
|
-
"3. Call RuntimeLoader.loadRuntime() again",
|
|
4667
|
-
].join("\n");
|
|
4668
|
-
console.error(errorMessage);
|
|
4669
|
-
}
|
|
4670
|
-
});
|
|
4671
|
-
};
|
|
4672
|
-
// Provides a runtime instance via a callback
|
|
4673
|
-
RuntimeLoader.getInstance = function (callback) {
|
|
4674
|
-
// If it's not loading, start loading runtime
|
|
4675
|
-
if (!RuntimeLoader.isLoading) {
|
|
4676
|
-
RuntimeLoader.isLoading = true;
|
|
4677
|
-
RuntimeLoader.loadRuntime();
|
|
4678
|
-
}
|
|
4679
|
-
if (!RuntimeLoader.runtime) {
|
|
4680
|
-
RuntimeLoader.callBackQueue.push(callback);
|
|
4681
|
-
}
|
|
4682
|
-
else {
|
|
4683
|
-
callback(RuntimeLoader.runtime);
|
|
4684
|
-
}
|
|
4685
|
-
};
|
|
4686
|
-
// Provides a runtime instance via a promise
|
|
4687
|
-
RuntimeLoader.awaitInstance = function () {
|
|
4688
|
-
return new Promise(function (resolve) {
|
|
4689
|
-
return RuntimeLoader.getInstance(function (rive) { return resolve(rive); });
|
|
4690
|
-
});
|
|
4691
|
-
};
|
|
4692
|
-
// Manually sets the wasm url
|
|
4693
|
-
RuntimeLoader.setWasmUrl = function (url) {
|
|
4694
|
-
RuntimeLoader.wasmURL = url;
|
|
4695
|
-
};
|
|
4696
|
-
// Gets the current wasm url
|
|
4697
|
-
RuntimeLoader.getWasmUrl = function () {
|
|
4698
|
-
return RuntimeLoader.wasmURL;
|
|
4699
|
-
};
|
|
4700
|
-
// Flag to indicate that loading has started/completed
|
|
4701
|
-
RuntimeLoader.isLoading = false;
|
|
4702
|
-
// List of callbacks for the runtime that come in while loading
|
|
4703
|
-
RuntimeLoader.callBackQueue = [];
|
|
4704
|
-
// Path to the Wasm file; default path works for testing only;
|
|
4705
|
-
// if embedded wasm is used then this is never used.
|
|
4706
|
-
RuntimeLoader.wasmURL = "https://unpkg.com/".concat(package_json__WEBPACK_IMPORTED_MODULE_1__.name, "@").concat(package_json__WEBPACK_IMPORTED_MODULE_1__.version, "/rive.wasm");
|
|
4707
|
-
/**
|
|
4708
|
-
* When true, performance.mark / performance.measure entries are emitted for
|
|
4709
|
-
* WASM initialization.
|
|
4710
|
-
*/
|
|
4711
|
-
RuntimeLoader.enablePerfMarks = false;
|
|
4712
|
-
return RuntimeLoader;
|
|
4713
|
-
}());
|
|
4815
|
+
// #endregion
|
|
4816
|
+
// #region runtime
|
|
4714
4817
|
|
|
4715
4818
|
// #endregion
|
|
4716
4819
|
// #region state machines
|
|
@@ -4989,7 +5092,7 @@ var Animator = /** @class */ (function () {
|
|
|
4989
5092
|
// Try to create a new animation instance
|
|
4990
5093
|
var anim = this.artboard.animationByName(animatables[i]);
|
|
4991
5094
|
if (anim) {
|
|
4992
|
-
var newAnimation = new
|
|
5095
|
+
var newAnimation = new _animation__WEBPACK_IMPORTED_MODULE_0__.Animation(anim, this.artboard, this.runtime, playing);
|
|
4993
5096
|
// Display the first frame of the specified animation
|
|
4994
5097
|
newAnimation.advance(0);
|
|
4995
5098
|
newAnimation.apply(1.0);
|
|
@@ -5043,7 +5146,7 @@ var Animator = /** @class */ (function () {
|
|
|
5043
5146
|
// Try to create a new animation instance
|
|
5044
5147
|
var anim = this.artboard.animationByName(animatables[i]);
|
|
5045
5148
|
if (anim) {
|
|
5046
|
-
var newAnimation = new
|
|
5149
|
+
var newAnimation = new _animation__WEBPACK_IMPORTED_MODULE_0__.Animation(anim, this.artboard, this.runtime, playing);
|
|
5047
5150
|
// Display the first frame of the specified animation
|
|
5048
5151
|
newAnimation.advance(0);
|
|
5049
5152
|
newAnimation.apply(1.0);
|
|
@@ -5662,7 +5765,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5662
5765
|
: true;
|
|
5663
5766
|
this.enablePerfMarks = !!params.enablePerfMarks;
|
|
5664
5767
|
if (this.enablePerfMarks)
|
|
5665
|
-
RuntimeLoader.enablePerfMarks = true;
|
|
5768
|
+
_runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.enablePerfMarks = true;
|
|
5666
5769
|
// New event management system
|
|
5667
5770
|
this.eventManager = new EventManager();
|
|
5668
5771
|
if (params.onLoad)
|
|
@@ -5699,7 +5802,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5699
5802
|
return [2 /*return*/];
|
|
5700
5803
|
}
|
|
5701
5804
|
if (this.assetLoader) {
|
|
5702
|
-
loaderWrapper = new
|
|
5805
|
+
loaderWrapper = new _utils__WEBPACK_IMPORTED_MODULE_2__.CustomFileAssetLoaderWrapper(this.runtime, this.assetLoader);
|
|
5703
5806
|
loader = loaderWrapper.assetLoader;
|
|
5704
5807
|
}
|
|
5705
5808
|
// Load the Rive file
|
|
@@ -5713,8 +5816,8 @@ var RiveFile = /** @class */ (function () {
|
|
|
5713
5816
|
performance.mark('rive:file-load:end');
|
|
5714
5817
|
performance.measure('rive:file-load', 'rive:file-load:start', 'rive:file-load:end');
|
|
5715
5818
|
}
|
|
5716
|
-
fileFinalizer = new
|
|
5717
|
-
|
|
5819
|
+
fileFinalizer = new _utils__WEBPACK_IMPORTED_MODULE_2__.FileFinalizer(this.file);
|
|
5820
|
+
_utils__WEBPACK_IMPORTED_MODULE_2__.finalizationRegistry.register(this, fileFinalizer);
|
|
5718
5821
|
if (this.destroyed) {
|
|
5719
5822
|
this.releaseFile();
|
|
5720
5823
|
return [2 /*return*/];
|
|
@@ -5758,7 +5861,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5758
5861
|
return __generator(this, function (_a) {
|
|
5759
5862
|
if (this.enablePerfMarks)
|
|
5760
5863
|
performance.mark('rive:await-wasm:start');
|
|
5761
|
-
runtimePromise = RuntimeLoader.awaitInstance();
|
|
5864
|
+
runtimePromise = _runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.awaitInstance();
|
|
5762
5865
|
if (this.enablePerfMarks) {
|
|
5763
5866
|
runtimePromise.then(function () {
|
|
5764
5867
|
performance.mark('rive:await-wasm:end');
|
|
@@ -5872,7 +5975,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5872
5975
|
RiveFile.prototype.createBindableArtboard = function (nativeBindableArtboard) {
|
|
5873
5976
|
if (nativeBindableArtboard != null) {
|
|
5874
5977
|
var bindableArtboard = new BindableArtboard(nativeBindableArtboard);
|
|
5875
|
-
(0,
|
|
5978
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(bindableArtboard, bindableArtboard.nativeArtboard);
|
|
5876
5979
|
this.bindableArtboards.push(bindableArtboard);
|
|
5877
5980
|
return bindableArtboard;
|
|
5878
5981
|
}
|
|
@@ -6018,7 +6121,7 @@ var Rive = /** @class */ (function () {
|
|
|
6018
6121
|
: params.enableRiveAssetCDN;
|
|
6019
6122
|
this.enablePerfMarks = !!params.enablePerfMarks;
|
|
6020
6123
|
if (this.enablePerfMarks)
|
|
6021
|
-
RuntimeLoader.enablePerfMarks = true;
|
|
6124
|
+
_runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.enablePerfMarks = true;
|
|
6022
6125
|
// New event management system
|
|
6023
6126
|
this.eventManager = new EventManager();
|
|
6024
6127
|
if (params.onLoad)
|
|
@@ -6111,7 +6214,7 @@ var Rive = /** @class */ (function () {
|
|
|
6111
6214
|
this.loaded = false;
|
|
6112
6215
|
this.readyForPlaying = false;
|
|
6113
6216
|
// Ensure the runtime is loaded
|
|
6114
|
-
RuntimeLoader.awaitInstance()
|
|
6217
|
+
_runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.awaitInstance()
|
|
6115
6218
|
.then(function (runtime) {
|
|
6116
6219
|
if (_this.destroyed) {
|
|
6117
6220
|
return;
|
|
@@ -6169,7 +6272,7 @@ var Rive = /** @class */ (function () {
|
|
|
6169
6272
|
"isTouchScrollEnabled" in riveListenerOptions) {
|
|
6170
6273
|
touchScrollEnabledOption = riveListenerOptions.isTouchScrollEnabled;
|
|
6171
6274
|
}
|
|
6172
|
-
this.eventCleanup = (0,
|
|
6275
|
+
this.eventCleanup = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.registerTouchInteractions)({
|
|
6173
6276
|
canvas: this.canvas,
|
|
6174
6277
|
artboard: this.artboard,
|
|
6175
6278
|
stateMachines: activeStateMachines,
|
|
@@ -6331,7 +6434,7 @@ var Rive = /** @class */ (function () {
|
|
|
6331
6434
|
var runtimeInstance = viewModel.defaultInstance();
|
|
6332
6435
|
if (runtimeInstance !== null) {
|
|
6333
6436
|
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
6334
|
-
(0,
|
|
6437
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(viewModelInstance, viewModelInstance.runtimeInstance);
|
|
6335
6438
|
this.bindViewModelInstance(viewModelInstance);
|
|
6336
6439
|
}
|
|
6337
6440
|
}
|
|
@@ -6425,10 +6528,10 @@ var Rive = /** @class */ (function () {
|
|
|
6425
6528
|
if (this.automaticallyHandleEvents) {
|
|
6426
6529
|
var newAnchorTag = document.createElement("a");
|
|
6427
6530
|
var _c = event_1, url = _c.url, target = _c.target;
|
|
6428
|
-
var sanitizedUrl = (0,
|
|
6531
|
+
var sanitizedUrl = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.sanitizeUrl)(url);
|
|
6429
6532
|
url && newAnchorTag.setAttribute("href", sanitizedUrl);
|
|
6430
6533
|
target && newAnchorTag.setAttribute("target", target);
|
|
6431
|
-
if (sanitizedUrl && sanitizedUrl !==
|
|
6534
|
+
if (sanitizedUrl && sanitizedUrl !== _utils__WEBPACK_IMPORTED_MODULE_2__.BLANK_URL) {
|
|
6432
6535
|
newAnchorTag.click();
|
|
6433
6536
|
}
|
|
6434
6537
|
}
|
|
@@ -7499,7 +7602,7 @@ var ViewModel = /** @class */ (function () {
|
|
|
7499
7602
|
var instance = this._viewModel.instanceByIndex(index);
|
|
7500
7603
|
if (instance !== null) {
|
|
7501
7604
|
var viewModelInstance = new ViewModelInstance(instance, null);
|
|
7502
|
-
(0,
|
|
7605
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(viewModelInstance, instance);
|
|
7503
7606
|
return viewModelInstance;
|
|
7504
7607
|
}
|
|
7505
7608
|
return null;
|
|
@@ -7508,7 +7611,7 @@ var ViewModel = /** @class */ (function () {
|
|
|
7508
7611
|
var instance = this._viewModel.instanceByName(name);
|
|
7509
7612
|
if (instance !== null) {
|
|
7510
7613
|
var viewModelInstance = new ViewModelInstance(instance, null);
|
|
7511
|
-
(0,
|
|
7614
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(viewModelInstance, instance);
|
|
7512
7615
|
return viewModelInstance;
|
|
7513
7616
|
}
|
|
7514
7617
|
return null;
|
|
@@ -7517,7 +7620,7 @@ var ViewModel = /** @class */ (function () {
|
|
|
7517
7620
|
var runtimeInstance = this._viewModel.defaultInstance();
|
|
7518
7621
|
if (runtimeInstance !== null) {
|
|
7519
7622
|
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
7520
|
-
(0,
|
|
7623
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(viewModelInstance, runtimeInstance);
|
|
7521
7624
|
return viewModelInstance;
|
|
7522
7625
|
}
|
|
7523
7626
|
return null;
|
|
@@ -7526,7 +7629,7 @@ var ViewModel = /** @class */ (function () {
|
|
|
7526
7629
|
var runtimeInstance = this._viewModel.instance();
|
|
7527
7630
|
if (runtimeInstance !== null) {
|
|
7528
7631
|
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
7529
|
-
(0,
|
|
7632
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(viewModelInstance, runtimeInstance);
|
|
7530
7633
|
return viewModelInstance;
|
|
7531
7634
|
}
|
|
7532
7635
|
return null;
|
|
@@ -7791,7 +7894,7 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
7791
7894
|
var viewModelRuntimeInstance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.viewModel(name);
|
|
7792
7895
|
if (viewModelRuntimeInstance !== null) {
|
|
7793
7896
|
var viewModelInstance = new ViewModelInstance(viewModelRuntimeInstance, this);
|
|
7794
|
-
(0,
|
|
7897
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(viewModelInstance, viewModelRuntimeInstance);
|
|
7795
7898
|
viewModelInstance.internalIncrementReferenceCount();
|
|
7796
7899
|
this._viewModelInstances.set(name, viewModelInstance);
|
|
7797
7900
|
return viewModelInstance;
|
|
@@ -8208,7 +8311,7 @@ var ViewModelInstanceList = /** @class */ (function (_super) {
|
|
|
8208
8311
|
var runtimeInstance = this._viewModelInstanceValue.instanceAt(index);
|
|
8209
8312
|
if (runtimeInstance != null) {
|
|
8210
8313
|
var viewModelInstance = new ViewModelInstance(runtimeInstance, this._parentViewModel);
|
|
8211
|
-
(0,
|
|
8314
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.createFinalization)(viewModelInstance, runtimeInstance);
|
|
8212
8315
|
return viewModelInstance;
|
|
8213
8316
|
}
|
|
8214
8317
|
return null;
|
|
@@ -8361,15 +8464,15 @@ var decodeAudio = function (bytes) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
8361
8464
|
switch (_a.label) {
|
|
8362
8465
|
case 0:
|
|
8363
8466
|
decodedPromise = new Promise(function (resolve) {
|
|
8364
|
-
return RuntimeLoader.getInstance(function (rive) {
|
|
8467
|
+
return _runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.getInstance(function (rive) {
|
|
8365
8468
|
rive.decodeAudio(bytes, resolve);
|
|
8366
8469
|
});
|
|
8367
8470
|
});
|
|
8368
8471
|
return [4 /*yield*/, decodedPromise];
|
|
8369
8472
|
case 1:
|
|
8370
8473
|
audio = _a.sent();
|
|
8371
|
-
audioWrapper = new
|
|
8372
|
-
|
|
8474
|
+
audioWrapper = new _utils__WEBPACK_IMPORTED_MODULE_2__.AudioWrapper(audio);
|
|
8475
|
+
_utils__WEBPACK_IMPORTED_MODULE_2__.finalizationRegistry.register(audioWrapper, audio);
|
|
8373
8476
|
return [2 /*return*/, audioWrapper];
|
|
8374
8477
|
}
|
|
8375
8478
|
});
|
|
@@ -8386,15 +8489,15 @@ var decodeImage = function (bytes) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
8386
8489
|
switch (_a.label) {
|
|
8387
8490
|
case 0:
|
|
8388
8491
|
decodedPromise = new Promise(function (resolve) {
|
|
8389
|
-
return RuntimeLoader.getInstance(function (rive) {
|
|
8492
|
+
return _runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.getInstance(function (rive) {
|
|
8390
8493
|
rive.decodeImage(bytes, resolve);
|
|
8391
8494
|
});
|
|
8392
8495
|
});
|
|
8393
8496
|
return [4 /*yield*/, decodedPromise];
|
|
8394
8497
|
case 1:
|
|
8395
8498
|
image = _a.sent();
|
|
8396
|
-
imageWrapper = new
|
|
8397
|
-
|
|
8499
|
+
imageWrapper = new _utils__WEBPACK_IMPORTED_MODULE_2__.ImageWrapper(image);
|
|
8500
|
+
_utils__WEBPACK_IMPORTED_MODULE_2__.finalizationRegistry.register(imageWrapper, image);
|
|
8398
8501
|
return [2 /*return*/, imageWrapper];
|
|
8399
8502
|
}
|
|
8400
8503
|
});
|
|
@@ -8411,15 +8514,15 @@ var decodeFont = function (bytes) { return __awaiter(void 0, void 0, void 0, fun
|
|
|
8411
8514
|
switch (_a.label) {
|
|
8412
8515
|
case 0:
|
|
8413
8516
|
decodedPromise = new Promise(function (resolve) {
|
|
8414
|
-
return RuntimeLoader.getInstance(function (rive) {
|
|
8517
|
+
return _runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.getInstance(function (rive) {
|
|
8415
8518
|
rive.decodeFont(bytes, resolve);
|
|
8416
8519
|
});
|
|
8417
8520
|
});
|
|
8418
8521
|
return [4 /*yield*/, decodedPromise];
|
|
8419
8522
|
case 1:
|
|
8420
8523
|
font = _a.sent();
|
|
8421
|
-
fontWrapper = new
|
|
8422
|
-
|
|
8524
|
+
fontWrapper = new _utils__WEBPACK_IMPORTED_MODULE_2__.FontWrapper(font);
|
|
8525
|
+
_utils__WEBPACK_IMPORTED_MODULE_2__.finalizationRegistry.register(fontWrapper, font);
|
|
8423
8526
|
return [2 /*return*/, fontWrapper];
|
|
8424
8527
|
}
|
|
8425
8528
|
});
|