logic-mesh 0.1.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/TypedBlock.d.ts +49 -0
- package/dist/TypedBlock.js +118 -0
- package/dist/index.d.ts +208 -0
- package/dist/index.js +2 -0
- package/dist/logic_mesh.d.ts +183 -0
- package/{logic_mesh.js → dist/logic_mesh.js} +5 -2
- package/dist/logic_mesh_bg.js +1009 -0
- package/dist/logic_mesh_bg.wasm +0 -0
- package/dist/logic_mesh_bg.wasm.d.ts +37 -0
- package/package.json +27 -13
- package/index.d.ts +0 -239
- package/index.js +0 -1
- package/logic_mesh.d.ts +0 -211
- package/logic_mesh_bg.js +0 -1100
- package/logic_mesh_bg.wasm +0 -0
package/logic_mesh_bg.js
DELETED
|
@@ -1,1100 +0,0 @@
|
|
|
1
|
-
let wasm;
|
|
2
|
-
export function __wbg_set_wasm(val) {
|
|
3
|
-
wasm = val;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const heap = new Array(128).fill(undefined);
|
|
8
|
-
|
|
9
|
-
heap.push(undefined, null, true, false);
|
|
10
|
-
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
12
|
-
|
|
13
|
-
let heap_next = heap.length;
|
|
14
|
-
|
|
15
|
-
function dropObject(idx) {
|
|
16
|
-
if (idx < 132) return;
|
|
17
|
-
heap[idx] = heap_next;
|
|
18
|
-
heap_next = idx;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function takeObject(idx) {
|
|
22
|
-
const ret = getObject(idx);
|
|
23
|
-
dropObject(idx);
|
|
24
|
-
return ret;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function isLikeNone(x) {
|
|
28
|
-
return x === undefined || x === null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
let cachedFloat64Memory0 = null;
|
|
32
|
-
|
|
33
|
-
function getFloat64Memory0() {
|
|
34
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
35
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
36
|
-
}
|
|
37
|
-
return cachedFloat64Memory0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let cachedInt32Memory0 = null;
|
|
41
|
-
|
|
42
|
-
function getInt32Memory0() {
|
|
43
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
44
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
45
|
-
}
|
|
46
|
-
return cachedInt32Memory0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function addHeapObject(obj) {
|
|
50
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
51
|
-
const idx = heap_next;
|
|
52
|
-
heap_next = heap[idx];
|
|
53
|
-
|
|
54
|
-
heap[idx] = obj;
|
|
55
|
-
return idx;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
let WASM_VECTOR_LEN = 0;
|
|
59
|
-
|
|
60
|
-
let cachedUint8Memory0 = null;
|
|
61
|
-
|
|
62
|
-
function getUint8Memory0() {
|
|
63
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
64
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
65
|
-
}
|
|
66
|
-
return cachedUint8Memory0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
70
|
-
|
|
71
|
-
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
72
|
-
|
|
73
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
74
|
-
? function (arg, view) {
|
|
75
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
76
|
-
}
|
|
77
|
-
: function (arg, view) {
|
|
78
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
79
|
-
view.set(buf);
|
|
80
|
-
return {
|
|
81
|
-
read: arg.length,
|
|
82
|
-
written: buf.length
|
|
83
|
-
};
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
87
|
-
|
|
88
|
-
if (realloc === undefined) {
|
|
89
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
90
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
91
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
92
|
-
WASM_VECTOR_LEN = buf.length;
|
|
93
|
-
return ptr;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
let len = arg.length;
|
|
97
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
98
|
-
|
|
99
|
-
const mem = getUint8Memory0();
|
|
100
|
-
|
|
101
|
-
let offset = 0;
|
|
102
|
-
|
|
103
|
-
for (; offset < len; offset++) {
|
|
104
|
-
const code = arg.charCodeAt(offset);
|
|
105
|
-
if (code > 0x7F) break;
|
|
106
|
-
mem[ptr + offset] = code;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (offset !== len) {
|
|
110
|
-
if (offset !== 0) {
|
|
111
|
-
arg = arg.slice(offset);
|
|
112
|
-
}
|
|
113
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
114
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
115
|
-
const ret = encodeString(arg, view);
|
|
116
|
-
|
|
117
|
-
offset += ret.written;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
WASM_VECTOR_LEN = offset;
|
|
121
|
-
return ptr;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
125
|
-
|
|
126
|
-
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
127
|
-
|
|
128
|
-
cachedTextDecoder.decode();
|
|
129
|
-
|
|
130
|
-
function getStringFromWasm0(ptr, len) {
|
|
131
|
-
ptr = ptr >>> 0;
|
|
132
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
let cachedBigInt64Memory0 = null;
|
|
136
|
-
|
|
137
|
-
function getBigInt64Memory0() {
|
|
138
|
-
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
139
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
140
|
-
}
|
|
141
|
-
return cachedBigInt64Memory0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function debugString(val) {
|
|
145
|
-
// primitive types
|
|
146
|
-
const type = typeof val;
|
|
147
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
148
|
-
return `${val}`;
|
|
149
|
-
}
|
|
150
|
-
if (type == 'string') {
|
|
151
|
-
return `"${val}"`;
|
|
152
|
-
}
|
|
153
|
-
if (type == 'symbol') {
|
|
154
|
-
const description = val.description;
|
|
155
|
-
if (description == null) {
|
|
156
|
-
return 'Symbol';
|
|
157
|
-
} else {
|
|
158
|
-
return `Symbol(${description})`;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (type == 'function') {
|
|
162
|
-
const name = val.name;
|
|
163
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
164
|
-
return `Function(${name})`;
|
|
165
|
-
} else {
|
|
166
|
-
return 'Function';
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
// objects
|
|
170
|
-
if (Array.isArray(val)) {
|
|
171
|
-
const length = val.length;
|
|
172
|
-
let debug = '[';
|
|
173
|
-
if (length > 0) {
|
|
174
|
-
debug += debugString(val[0]);
|
|
175
|
-
}
|
|
176
|
-
for(let i = 1; i < length; i++) {
|
|
177
|
-
debug += ', ' + debugString(val[i]);
|
|
178
|
-
}
|
|
179
|
-
debug += ']';
|
|
180
|
-
return debug;
|
|
181
|
-
}
|
|
182
|
-
// Test for built-in
|
|
183
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
184
|
-
let className;
|
|
185
|
-
if (builtInMatches.length > 1) {
|
|
186
|
-
className = builtInMatches[1];
|
|
187
|
-
} else {
|
|
188
|
-
// Failed to match the standard '[object ClassName]'
|
|
189
|
-
return toString.call(val);
|
|
190
|
-
}
|
|
191
|
-
if (className == 'Object') {
|
|
192
|
-
// we're a user defined class or Object
|
|
193
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
194
|
-
// easier than looping through ownProperties of `val`.
|
|
195
|
-
try {
|
|
196
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
197
|
-
} catch (_) {
|
|
198
|
-
return 'Object';
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// errors
|
|
202
|
-
if (val instanceof Error) {
|
|
203
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
204
|
-
}
|
|
205
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
206
|
-
return className;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
210
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
211
|
-
const real = (...args) => {
|
|
212
|
-
// First up with a closure we increment the internal reference
|
|
213
|
-
// count. This ensures that the Rust closure environment won't
|
|
214
|
-
// be deallocated while we're invoking it.
|
|
215
|
-
state.cnt++;
|
|
216
|
-
const a = state.a;
|
|
217
|
-
state.a = 0;
|
|
218
|
-
try {
|
|
219
|
-
return f(a, state.b, ...args);
|
|
220
|
-
} finally {
|
|
221
|
-
if (--state.cnt === 0) {
|
|
222
|
-
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
223
|
-
|
|
224
|
-
} else {
|
|
225
|
-
state.a = a;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
real.original = state;
|
|
230
|
-
|
|
231
|
-
return real;
|
|
232
|
-
}
|
|
233
|
-
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
234
|
-
wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
let cachedUint32Memory0 = null;
|
|
238
|
-
|
|
239
|
-
function getUint32Memory0() {
|
|
240
|
-
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
|
|
241
|
-
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
242
|
-
}
|
|
243
|
-
return cachedUint32Memory0;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
247
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
248
|
-
const mem = getUint32Memory0();
|
|
249
|
-
for (let i = 0; i < array.length; i++) {
|
|
250
|
-
mem[ptr / 4 + i] = addHeapObject(array[i]);
|
|
251
|
-
}
|
|
252
|
-
WASM_VECTOR_LEN = array.length;
|
|
253
|
-
return ptr;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* @param {number | undefined} [sleep_duration]
|
|
257
|
-
* @returns {BlocksEngine}
|
|
258
|
-
*/
|
|
259
|
-
export function initEngine(sleep_duration) {
|
|
260
|
-
const ret = wasm.initEngine(!isLikeNone(sleep_duration), isLikeNone(sleep_duration) ? 0 : sleep_duration);
|
|
261
|
-
return BlocksEngine.__wrap(ret);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
*/
|
|
266
|
-
export function start() {
|
|
267
|
-
wasm.start();
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
*/
|
|
272
|
-
export function init_panic_hook() {
|
|
273
|
-
wasm.init_panic_hook();
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
function handleError(f, args) {
|
|
277
|
-
try {
|
|
278
|
-
return f.apply(this, args);
|
|
279
|
-
} catch (e) {
|
|
280
|
-
wasm.__wbindgen_export_5(addHeapObject(e));
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
function __wbg_adapter_157(arg0, arg1, arg2, arg3) {
|
|
284
|
-
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Controls the execution or the blocks.
|
|
289
|
-
* Loads programs and enables inspection and debugging
|
|
290
|
-
* of the blocks and their inputs and outputs.
|
|
291
|
-
*/
|
|
292
|
-
export class BlocksEngine {
|
|
293
|
-
|
|
294
|
-
static __wrap(ptr) {
|
|
295
|
-
ptr = ptr >>> 0;
|
|
296
|
-
const obj = Object.create(BlocksEngine.prototype);
|
|
297
|
-
obj.__wbg_ptr = ptr;
|
|
298
|
-
|
|
299
|
-
return obj;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
__destroy_into_raw() {
|
|
303
|
-
const ptr = this.__wbg_ptr;
|
|
304
|
-
this.__wbg_ptr = 0;
|
|
305
|
-
|
|
306
|
-
return ptr;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
free() {
|
|
310
|
-
const ptr = this.__destroy_into_raw();
|
|
311
|
-
wasm.__wbg_blocksengine_free(ptr);
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Create a new instance of an engine
|
|
315
|
-
* @param {bigint | undefined} [sleep_duration]
|
|
316
|
-
*/
|
|
317
|
-
constructor(sleep_duration) {
|
|
318
|
-
const ret = wasm.blocksengine_new(!isLikeNone(sleep_duration), isLikeNone(sleep_duration) ? BigInt(0) : sleep_duration);
|
|
319
|
-
this.__wbg_ptr = ret >>> 0;
|
|
320
|
-
return this;
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* Lists all available blocks
|
|
324
|
-
* @returns {Array<any>}
|
|
325
|
-
*/
|
|
326
|
-
listBlocks() {
|
|
327
|
-
const ret = wasm.blocksengine_listBlocks(this.__wbg_ptr);
|
|
328
|
-
return takeObject(ret);
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* Register a new JS block in the registry
|
|
332
|
-
* The block is described by a JsBlockDesc object
|
|
333
|
-
*
|
|
334
|
-
* # Arguments
|
|
335
|
-
* * `desc` - The description of the block
|
|
336
|
-
* * `func` - Optional function that implements the block
|
|
337
|
-
* logic. If not provided, the block would do nothing.
|
|
338
|
-
*
|
|
339
|
-
* # Returns
|
|
340
|
-
* The name of the block
|
|
341
|
-
*
|
|
342
|
-
* @param {any} desc
|
|
343
|
-
* @param {Function | undefined} [func]
|
|
344
|
-
* @returns {string}
|
|
345
|
-
*/
|
|
346
|
-
registerBlock(desc, func) {
|
|
347
|
-
let deferred2_0;
|
|
348
|
-
let deferred2_1;
|
|
349
|
-
try {
|
|
350
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
351
|
-
wasm.blocksengine_registerBlock(retptr, this.__wbg_ptr, addHeapObject(desc), isLikeNone(func) ? 0 : addHeapObject(func));
|
|
352
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
353
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
354
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
355
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
356
|
-
var ptr1 = r0;
|
|
357
|
-
var len1 = r1;
|
|
358
|
-
if (r3) {
|
|
359
|
-
ptr1 = 0; len1 = 0;
|
|
360
|
-
throw takeObject(r2);
|
|
361
|
-
}
|
|
362
|
-
deferred2_0 = ptr1;
|
|
363
|
-
deferred2_1 = len1;
|
|
364
|
-
return getStringFromWasm0(ptr1, len1);
|
|
365
|
-
} finally {
|
|
366
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
367
|
-
wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* @returns {EngineCommand}
|
|
372
|
-
*/
|
|
373
|
-
engineCommand() {
|
|
374
|
-
const ret = wasm.blocksengine_engineCommand(this.__wbg_ptr);
|
|
375
|
-
return EngineCommand.__wrap(ret);
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Runs the engine asynchronously
|
|
379
|
-
* After this is called, the engine instance can't be used directly
|
|
380
|
-
* Instead use the command object to communicate with the engine.
|
|
381
|
-
* @returns {Promise<void>}
|
|
382
|
-
*/
|
|
383
|
-
run() {
|
|
384
|
-
const ret = wasm.blocksengine_run(this.__wbg_ptr);
|
|
385
|
-
return takeObject(ret);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Commands a running instance of a Block Engine.
|
|
390
|
-
*/
|
|
391
|
-
export class EngineCommand {
|
|
392
|
-
|
|
393
|
-
static __wrap(ptr) {
|
|
394
|
-
ptr = ptr >>> 0;
|
|
395
|
-
const obj = Object.create(EngineCommand.prototype);
|
|
396
|
-
obj.__wbg_ptr = ptr;
|
|
397
|
-
|
|
398
|
-
return obj;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
__destroy_into_raw() {
|
|
402
|
-
const ptr = this.__wbg_ptr;
|
|
403
|
-
this.__wbg_ptr = 0;
|
|
404
|
-
|
|
405
|
-
return ptr;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
free() {
|
|
409
|
-
const ptr = this.__destroy_into_raw();
|
|
410
|
-
wasm.__wbg_enginecommand_free(ptr);
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Adds a block instance to the engine
|
|
414
|
-
* to be immediately scheduled for execution
|
|
415
|
-
* @param {string} block_name
|
|
416
|
-
* @param {string | undefined} [block_uuid]
|
|
417
|
-
* @param {string | undefined} [lib]
|
|
418
|
-
* @returns {Promise<string>}
|
|
419
|
-
*/
|
|
420
|
-
addBlock(block_name, block_uuid, lib) {
|
|
421
|
-
const ptr0 = passStringToWasm0(block_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
422
|
-
const len0 = WASM_VECTOR_LEN;
|
|
423
|
-
var ptr1 = isLikeNone(block_uuid) ? 0 : passStringToWasm0(block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
424
|
-
var len1 = WASM_VECTOR_LEN;
|
|
425
|
-
var ptr2 = isLikeNone(lib) ? 0 : passStringToWasm0(lib, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
426
|
-
var len2 = WASM_VECTOR_LEN;
|
|
427
|
-
const ret = wasm.enginecommand_addBlock(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
428
|
-
return takeObject(ret);
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Removes a block instance from the engine
|
|
432
|
-
* to be immediately unscheduled for execution
|
|
433
|
-
* and removed from the engine together with all its links.
|
|
434
|
-
*
|
|
435
|
-
* # Arguments
|
|
436
|
-
* * `block_uuid` - The UUID of the block to be removed
|
|
437
|
-
*
|
|
438
|
-
* # Returns
|
|
439
|
-
* The UUID of the removed block
|
|
440
|
-
* @param {string} block_uuid
|
|
441
|
-
* @returns {Promise<string>}
|
|
442
|
-
*/
|
|
443
|
-
removeBlock(block_uuid) {
|
|
444
|
-
const ptr0 = passStringToWasm0(block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
445
|
-
const len0 = WASM_VECTOR_LEN;
|
|
446
|
-
const ret = wasm.enginecommand_removeBlock(this.__wbg_ptr, ptr0, len0);
|
|
447
|
-
return takeObject(ret);
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Creates a link between two blocks
|
|
451
|
-
*
|
|
452
|
-
* # Arguments
|
|
453
|
-
* * `source_block_uuid` - The UUID of the source block
|
|
454
|
-
* * `target_block_uuid` - The UUID of the target block
|
|
455
|
-
* * `source_block_pin_name` - The name of the output pin of the source block
|
|
456
|
-
* * `target_block_input_name` - The name of the input pin of the target block
|
|
457
|
-
*
|
|
458
|
-
* # Returns
|
|
459
|
-
* A `LinkData` object with the following properties:
|
|
460
|
-
* * `source_block_uuid` - The UUID of the source block
|
|
461
|
-
* * `target_block_uuid` - The UUID of the target block
|
|
462
|
-
* * `source_block_pin_name` - The name of the output pin of the source block
|
|
463
|
-
* * `target_block_input_name` - The name of the input pin of the target block
|
|
464
|
-
* @param {string} source_block_uuid
|
|
465
|
-
* @param {string} target_block_uuid
|
|
466
|
-
* @param {string} source_block_pin_name
|
|
467
|
-
* @param {string} target_block_pin_name
|
|
468
|
-
* @returns {Promise<any>}
|
|
469
|
-
*/
|
|
470
|
-
createLink(source_block_uuid, target_block_uuid, source_block_pin_name, target_block_pin_name) {
|
|
471
|
-
const ptr0 = passStringToWasm0(source_block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
472
|
-
const len0 = WASM_VECTOR_LEN;
|
|
473
|
-
const ptr1 = passStringToWasm0(target_block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
474
|
-
const len1 = WASM_VECTOR_LEN;
|
|
475
|
-
const ptr2 = passStringToWasm0(source_block_pin_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
476
|
-
const len2 = WASM_VECTOR_LEN;
|
|
477
|
-
const ptr3 = passStringToWasm0(target_block_pin_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
478
|
-
const len3 = WASM_VECTOR_LEN;
|
|
479
|
-
const ret = wasm.enginecommand_createLink(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
480
|
-
return takeObject(ret);
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* Removes a link between two blocks
|
|
484
|
-
*
|
|
485
|
-
* # Arguments
|
|
486
|
-
* * `link_uuid` - The UUID of the link to be removed
|
|
487
|
-
*
|
|
488
|
-
* # Returns
|
|
489
|
-
* True if the link was removed, false otherwise
|
|
490
|
-
* @param {string} link_uuid
|
|
491
|
-
* @returns {Promise<boolean>}
|
|
492
|
-
*/
|
|
493
|
-
removeLink(link_uuid) {
|
|
494
|
-
const ptr0 = passStringToWasm0(link_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
495
|
-
const len0 = WASM_VECTOR_LEN;
|
|
496
|
-
const ret = wasm.enginecommand_removeLink(this.__wbg_ptr, ptr0, len0);
|
|
497
|
-
return takeObject(ret);
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* Writes the given block out with a value
|
|
501
|
-
*
|
|
502
|
-
* # Arguments
|
|
503
|
-
* * `block_uuid` - The UUID of the block to write to
|
|
504
|
-
* * `output_name` - The name of the output to write to
|
|
505
|
-
* * `value` - The value to write
|
|
506
|
-
*
|
|
507
|
-
* # Returns
|
|
508
|
-
* The block data
|
|
509
|
-
* @param {string} block_uuid
|
|
510
|
-
* @param {string} output_name
|
|
511
|
-
* @param {any} value
|
|
512
|
-
* @returns {Promise<any>}
|
|
513
|
-
*/
|
|
514
|
-
writeBlockOutput(block_uuid, output_name, value) {
|
|
515
|
-
const ptr0 = passStringToWasm0(block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
516
|
-
const len0 = WASM_VECTOR_LEN;
|
|
517
|
-
const ptr1 = passStringToWasm0(output_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
518
|
-
const len1 = WASM_VECTOR_LEN;
|
|
519
|
-
const ret = wasm.enginecommand_writeBlockOutput(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(value));
|
|
520
|
-
return takeObject(ret);
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* Writes the given block input with a value
|
|
524
|
-
*
|
|
525
|
-
* # Arguments
|
|
526
|
-
* * `block_uuid` - The UUID of the block to write to
|
|
527
|
-
* * `input_name` - The name of the input to write to
|
|
528
|
-
* * `value` - The value to write
|
|
529
|
-
*
|
|
530
|
-
* # Returns
|
|
531
|
-
* The previous value of the input
|
|
532
|
-
* @param {string} block_uuid
|
|
533
|
-
* @param {string} input_name
|
|
534
|
-
* @param {any} value
|
|
535
|
-
* @returns {Promise<any>}
|
|
536
|
-
*/
|
|
537
|
-
writeBlockInput(block_uuid, input_name, value) {
|
|
538
|
-
const ptr0 = passStringToWasm0(block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
539
|
-
const len0 = WASM_VECTOR_LEN;
|
|
540
|
-
const ptr1 = passStringToWasm0(input_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
541
|
-
const len1 = WASM_VECTOR_LEN;
|
|
542
|
-
const ret = wasm.enginecommand_writeBlockInput(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(value));
|
|
543
|
-
return takeObject(ret);
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Get the current running engine program.
|
|
547
|
-
* The program contains the scheduled blocks, their properties, and their links.
|
|
548
|
-
* @returns {Promise<any>}
|
|
549
|
-
*/
|
|
550
|
-
getProgram() {
|
|
551
|
-
const ret = wasm.enginecommand_getProgram(this.__wbg_ptr);
|
|
552
|
-
return takeObject(ret);
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Inspects the current state of a block
|
|
556
|
-
* @param {string} block_uuid
|
|
557
|
-
* @returns {Promise<any>}
|
|
558
|
-
*/
|
|
559
|
-
inspectBlock(block_uuid) {
|
|
560
|
-
const ptr0 = passStringToWasm0(block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
561
|
-
const len0 = WASM_VECTOR_LEN;
|
|
562
|
-
const ret = wasm.enginecommand_inspectBlock(this.__wbg_ptr, ptr0, len0);
|
|
563
|
-
return takeObject(ret);
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Evaluates a block by name
|
|
567
|
-
* This will create a block instance and execute it.
|
|
568
|
-
*
|
|
569
|
-
* # Arguments
|
|
570
|
-
* * `block_name` - The name of the block to evaluate
|
|
571
|
-
* * `inputs` - The input values to the block
|
|
572
|
-
* * `lib` - Optional, the library to load the block from, defaults to "core"
|
|
573
|
-
*
|
|
574
|
-
* # Returns
|
|
575
|
-
* A list of values representing the outputs of the block
|
|
576
|
-
* @param {string} block_name
|
|
577
|
-
* @param {any[]} inputs
|
|
578
|
-
* @param {string | undefined} [lib]
|
|
579
|
-
* @returns {Promise<any>}
|
|
580
|
-
*/
|
|
581
|
-
evalBlock(block_name, inputs, lib) {
|
|
582
|
-
const ptr0 = passStringToWasm0(block_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
583
|
-
const len0 = WASM_VECTOR_LEN;
|
|
584
|
-
const ptr1 = passArrayJsValueToWasm0(inputs, wasm.__wbindgen_export_0);
|
|
585
|
-
const len1 = WASM_VECTOR_LEN;
|
|
586
|
-
var ptr2 = isLikeNone(lib) ? 0 : passStringToWasm0(lib, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
587
|
-
var len2 = WASM_VECTOR_LEN;
|
|
588
|
-
const ret = wasm.enginecommand_evalBlock(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
589
|
-
return takeObject(ret);
|
|
590
|
-
}
|
|
591
|
-
/**
|
|
592
|
-
* Creates a watch on block changes
|
|
593
|
-
* @param {Function} callback
|
|
594
|
-
* @returns {Promise<void>}
|
|
595
|
-
*/
|
|
596
|
-
createWatch(callback) {
|
|
597
|
-
const ret = wasm.enginecommand_createWatch(this.__wbg_ptr, addHeapObject(callback));
|
|
598
|
-
return takeObject(ret);
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* Pauses the execution of the engine
|
|
602
|
-
* If the engine is already paused, this does nothing
|
|
603
|
-
* @returns {Promise<void>}
|
|
604
|
-
*/
|
|
605
|
-
pauseExecution() {
|
|
606
|
-
const ret = wasm.enginecommand_pauseExecution(this.__wbg_ptr);
|
|
607
|
-
return takeObject(ret);
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
* Resumes the execution of the engine
|
|
611
|
-
* If the engine is not paused, this does nothing
|
|
612
|
-
* @returns {Promise<void>}
|
|
613
|
-
*/
|
|
614
|
-
resumeExecution() {
|
|
615
|
-
const ret = wasm.enginecommand_resumeExecution(this.__wbg_ptr);
|
|
616
|
-
return takeObject(ret);
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Resets the engine state, clears all blocks and links
|
|
620
|
-
* @returns {Promise<void>}
|
|
621
|
-
*/
|
|
622
|
-
resetEngine() {
|
|
623
|
-
const ret = wasm.enginecommand_resetEngine(this.__wbg_ptr);
|
|
624
|
-
return takeObject(ret);
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* Stop the engine's execution
|
|
628
|
-
* @returns {Promise<void>}
|
|
629
|
-
*/
|
|
630
|
-
stopEngine() {
|
|
631
|
-
const ret = wasm.enginecommand_stopEngine(this.__wbg_ptr);
|
|
632
|
-
return takeObject(ret);
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
export function __wbindgen_object_drop_ref(arg0) {
|
|
637
|
-
takeObject(arg0);
|
|
638
|
-
};
|
|
639
|
-
|
|
640
|
-
export function __wbindgen_is_array(arg0) {
|
|
641
|
-
const ret = Array.isArray(getObject(arg0));
|
|
642
|
-
return ret;
|
|
643
|
-
};
|
|
644
|
-
|
|
645
|
-
export function __wbg_setTimeout_4162f4c94a6c93d5(arg0, arg1) {
|
|
646
|
-
setTimeout(getObject(arg0), arg1);
|
|
647
|
-
};
|
|
648
|
-
|
|
649
|
-
export function __wbindgen_is_undefined(arg0) {
|
|
650
|
-
const ret = getObject(arg0) === undefined;
|
|
651
|
-
return ret;
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
export function __wbindgen_in(arg0, arg1) {
|
|
655
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
656
|
-
return ret;
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
export function __wbindgen_boolean_get(arg0) {
|
|
660
|
-
const v = getObject(arg0);
|
|
661
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
662
|
-
return ret;
|
|
663
|
-
};
|
|
664
|
-
|
|
665
|
-
export function __wbindgen_is_bigint(arg0) {
|
|
666
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
667
|
-
return ret;
|
|
668
|
-
};
|
|
669
|
-
|
|
670
|
-
export function __wbindgen_number_get(arg0, arg1) {
|
|
671
|
-
const obj = getObject(arg1);
|
|
672
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
673
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
674
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
export function __wbindgen_bigint_from_i64(arg0) {
|
|
678
|
-
const ret = arg0;
|
|
679
|
-
return addHeapObject(ret);
|
|
680
|
-
};
|
|
681
|
-
|
|
682
|
-
export function __wbindgen_jsval_eq(arg0, arg1) {
|
|
683
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
684
|
-
return ret;
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
export function __wbindgen_string_get(arg0, arg1) {
|
|
688
|
-
const obj = getObject(arg1);
|
|
689
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
690
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
691
|
-
var len1 = WASM_VECTOR_LEN;
|
|
692
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
693
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
export function __wbindgen_is_object(arg0) {
|
|
697
|
-
const val = getObject(arg0);
|
|
698
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
699
|
-
return ret;
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
export function __wbindgen_bigint_from_u64(arg0) {
|
|
703
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
704
|
-
return addHeapObject(ret);
|
|
705
|
-
};
|
|
706
|
-
|
|
707
|
-
export function __wbg_static_accessor_PERFORMANCE_eb2ef1d41d83dfe5() {
|
|
708
|
-
const ret = performance;
|
|
709
|
-
return addHeapObject(ret);
|
|
710
|
-
};
|
|
711
|
-
|
|
712
|
-
export function __wbindgen_string_new(arg0, arg1) {
|
|
713
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
714
|
-
return addHeapObject(ret);
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
export function __wbg_now_a3547d6cc6335a24(arg0) {
|
|
718
|
-
const ret = getObject(arg0).now();
|
|
719
|
-
return ret;
|
|
720
|
-
};
|
|
721
|
-
|
|
722
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
|
723
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
724
|
-
return addHeapObject(ret);
|
|
725
|
-
};
|
|
726
|
-
|
|
727
|
-
export function __wbindgen_object_clone_ref(arg0) {
|
|
728
|
-
const ret = getObject(arg0);
|
|
729
|
-
return addHeapObject(ret);
|
|
730
|
-
};
|
|
731
|
-
|
|
732
|
-
export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
733
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
734
|
-
return ret;
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
export function __wbg_String_389b54bd9d25375f(arg0, arg1) {
|
|
738
|
-
const ret = String(getObject(arg1));
|
|
739
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
740
|
-
const len1 = WASM_VECTOR_LEN;
|
|
741
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
742
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
export function __wbindgen_number_new(arg0) {
|
|
746
|
-
const ret = arg0;
|
|
747
|
-
return addHeapObject(ret);
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
export function __wbg_getwithrefkey_4a92a5eca60879b9(arg0, arg1) {
|
|
751
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
752
|
-
return addHeapObject(ret);
|
|
753
|
-
};
|
|
754
|
-
|
|
755
|
-
export function __wbg_set_9182712abebf82ef(arg0, arg1, arg2) {
|
|
756
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
export function __wbg_log_53ed96ea72ace5e9(arg0, arg1) {
|
|
760
|
-
console.log(getStringFromWasm0(arg0, arg1));
|
|
761
|
-
};
|
|
762
|
-
|
|
763
|
-
export function __wbg_error_93b671ae91baaee7(arg0, arg1) {
|
|
764
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
export function __wbg_warn_52c5b3e773c3a056(arg0, arg1) {
|
|
768
|
-
console.warn(getStringFromWasm0(arg0, arg1));
|
|
769
|
-
};
|
|
770
|
-
|
|
771
|
-
export function __wbindgen_cb_drop(arg0) {
|
|
772
|
-
const obj = takeObject(arg0).original;
|
|
773
|
-
if (obj.cnt-- == 1) {
|
|
774
|
-
obj.a = 0;
|
|
775
|
-
return true;
|
|
776
|
-
}
|
|
777
|
-
const ret = false;
|
|
778
|
-
return ret;
|
|
779
|
-
};
|
|
780
|
-
|
|
781
|
-
export function __wbg_queueMicrotask_118eeb525d584d9a(arg0) {
|
|
782
|
-
queueMicrotask(getObject(arg0));
|
|
783
|
-
};
|
|
784
|
-
|
|
785
|
-
export function __wbg_queueMicrotask_26a89c14c53809c0(arg0) {
|
|
786
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
787
|
-
return addHeapObject(ret);
|
|
788
|
-
};
|
|
789
|
-
|
|
790
|
-
export function __wbindgen_is_function(arg0) {
|
|
791
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
792
|
-
return ret;
|
|
793
|
-
};
|
|
794
|
-
|
|
795
|
-
export function __wbg_new_abda76e883ba8a5f() {
|
|
796
|
-
const ret = new Error();
|
|
797
|
-
return addHeapObject(ret);
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
|
|
801
|
-
const ret = getObject(arg1).stack;
|
|
802
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
803
|
-
const len1 = WASM_VECTOR_LEN;
|
|
804
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
805
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
806
|
-
};
|
|
807
|
-
|
|
808
|
-
export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
|
|
809
|
-
let deferred0_0;
|
|
810
|
-
let deferred0_1;
|
|
811
|
-
try {
|
|
812
|
-
deferred0_0 = arg0;
|
|
813
|
-
deferred0_1 = arg1;
|
|
814
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
815
|
-
} finally {
|
|
816
|
-
wasm.__wbindgen_export_4(deferred0_0, deferred0_1, 1);
|
|
817
|
-
}
|
|
818
|
-
};
|
|
819
|
-
|
|
820
|
-
export function __wbg_crypto_d05b68a3572bb8ca(arg0) {
|
|
821
|
-
const ret = getObject(arg0).crypto;
|
|
822
|
-
return addHeapObject(ret);
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
export function __wbg_process_b02b3570280d0366(arg0) {
|
|
826
|
-
const ret = getObject(arg0).process;
|
|
827
|
-
return addHeapObject(ret);
|
|
828
|
-
};
|
|
829
|
-
|
|
830
|
-
export function __wbg_versions_c1cb42213cedf0f5(arg0) {
|
|
831
|
-
const ret = getObject(arg0).versions;
|
|
832
|
-
return addHeapObject(ret);
|
|
833
|
-
};
|
|
834
|
-
|
|
835
|
-
export function __wbg_node_43b1089f407e4ec2(arg0) {
|
|
836
|
-
const ret = getObject(arg0).node;
|
|
837
|
-
return addHeapObject(ret);
|
|
838
|
-
};
|
|
839
|
-
|
|
840
|
-
export function __wbindgen_is_string(arg0) {
|
|
841
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
842
|
-
return ret;
|
|
843
|
-
};
|
|
844
|
-
|
|
845
|
-
export function __wbg_require_9a7e0f667ead4995() { return handleError(function () {
|
|
846
|
-
const ret = module.require;
|
|
847
|
-
return addHeapObject(ret);
|
|
848
|
-
}, arguments) };
|
|
849
|
-
|
|
850
|
-
export function __wbg_msCrypto_10fc94afee92bd76(arg0) {
|
|
851
|
-
const ret = getObject(arg0).msCrypto;
|
|
852
|
-
return addHeapObject(ret);
|
|
853
|
-
};
|
|
854
|
-
|
|
855
|
-
export function __wbg_randomFillSync_b70ccbdf4926a99d() { return handleError(function (arg0, arg1) {
|
|
856
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
857
|
-
}, arguments) };
|
|
858
|
-
|
|
859
|
-
export function __wbg_getRandomValues_7e42b4fb8779dc6d() { return handleError(function (arg0, arg1) {
|
|
860
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
861
|
-
}, arguments) };
|
|
862
|
-
|
|
863
|
-
export function __wbg_get_c43534c00f382c8a(arg0, arg1) {
|
|
864
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
865
|
-
return addHeapObject(ret);
|
|
866
|
-
};
|
|
867
|
-
|
|
868
|
-
export function __wbg_length_d99b680fd68bf71b(arg0) {
|
|
869
|
-
const ret = getObject(arg0).length;
|
|
870
|
-
return ret;
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
export function __wbg_new_34c624469fb1d4fd() {
|
|
874
|
-
const ret = new Array();
|
|
875
|
-
return addHeapObject(ret);
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
export function __wbg_newnoargs_5859b6d41c6fe9f7(arg0, arg1) {
|
|
879
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
880
|
-
return addHeapObject(ret);
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
export function __wbg_new_ad4df4628315a892() {
|
|
884
|
-
const ret = new Map();
|
|
885
|
-
return addHeapObject(ret);
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
export function __wbg_next_1938cf110c9491d4(arg0) {
|
|
889
|
-
const ret = getObject(arg0).next;
|
|
890
|
-
return addHeapObject(ret);
|
|
891
|
-
};
|
|
892
|
-
|
|
893
|
-
export function __wbg_next_267398d0e0761bf9() { return handleError(function (arg0) {
|
|
894
|
-
const ret = getObject(arg0).next();
|
|
895
|
-
return addHeapObject(ret);
|
|
896
|
-
}, arguments) };
|
|
897
|
-
|
|
898
|
-
export function __wbg_done_506b44765ba84b9c(arg0) {
|
|
899
|
-
const ret = getObject(arg0).done;
|
|
900
|
-
return ret;
|
|
901
|
-
};
|
|
902
|
-
|
|
903
|
-
export function __wbg_value_31485d8770eb06ab(arg0) {
|
|
904
|
-
const ret = getObject(arg0).value;
|
|
905
|
-
return addHeapObject(ret);
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
export function __wbg_iterator_364187e1ee96b750() {
|
|
909
|
-
const ret = Symbol.iterator;
|
|
910
|
-
return addHeapObject(ret);
|
|
911
|
-
};
|
|
912
|
-
|
|
913
|
-
export function __wbg_get_5027b32da70f39b1() { return handleError(function (arg0, arg1) {
|
|
914
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
915
|
-
return addHeapObject(ret);
|
|
916
|
-
}, arguments) };
|
|
917
|
-
|
|
918
|
-
export function __wbg_call_a79f1973a4f07d5e() { return handleError(function (arg0, arg1) {
|
|
919
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
920
|
-
return addHeapObject(ret);
|
|
921
|
-
}, arguments) };
|
|
922
|
-
|
|
923
|
-
export function __wbg_new_87d841e70661f6e9() {
|
|
924
|
-
const ret = new Object();
|
|
925
|
-
return addHeapObject(ret);
|
|
926
|
-
};
|
|
927
|
-
|
|
928
|
-
export function __wbg_self_086b5302bcafb962() { return handleError(function () {
|
|
929
|
-
const ret = self.self;
|
|
930
|
-
return addHeapObject(ret);
|
|
931
|
-
}, arguments) };
|
|
932
|
-
|
|
933
|
-
export function __wbg_window_132fa5d7546f1de5() { return handleError(function () {
|
|
934
|
-
const ret = window.window;
|
|
935
|
-
return addHeapObject(ret);
|
|
936
|
-
}, arguments) };
|
|
937
|
-
|
|
938
|
-
export function __wbg_globalThis_e5f801a37ad7d07b() { return handleError(function () {
|
|
939
|
-
const ret = globalThis.globalThis;
|
|
940
|
-
return addHeapObject(ret);
|
|
941
|
-
}, arguments) };
|
|
942
|
-
|
|
943
|
-
export function __wbg_global_f9a61fce4af6b7c1() { return handleError(function () {
|
|
944
|
-
const ret = global.global;
|
|
945
|
-
return addHeapObject(ret);
|
|
946
|
-
}, arguments) };
|
|
947
|
-
|
|
948
|
-
export function __wbg_set_379b27f1d5f1bf9c(arg0, arg1, arg2) {
|
|
949
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
950
|
-
};
|
|
951
|
-
|
|
952
|
-
export function __wbg_isArray_fbd24d447869b527(arg0) {
|
|
953
|
-
const ret = Array.isArray(getObject(arg0));
|
|
954
|
-
return ret;
|
|
955
|
-
};
|
|
956
|
-
|
|
957
|
-
export function __wbg_push_906164999551d793(arg0, arg1) {
|
|
958
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
959
|
-
return ret;
|
|
960
|
-
};
|
|
961
|
-
|
|
962
|
-
export function __wbg_instanceof_ArrayBuffer_f4521cec1b99ee35(arg0) {
|
|
963
|
-
let result;
|
|
964
|
-
try {
|
|
965
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
966
|
-
} catch (_) {
|
|
967
|
-
result = false;
|
|
968
|
-
}
|
|
969
|
-
const ret = result;
|
|
970
|
-
return ret;
|
|
971
|
-
};
|
|
972
|
-
|
|
973
|
-
export function __wbg_call_f6a2bc58c19c53c6() { return handleError(function (arg0, arg1, arg2) {
|
|
974
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
975
|
-
return addHeapObject(ret);
|
|
976
|
-
}, arguments) };
|
|
977
|
-
|
|
978
|
-
export function __wbg_set_83e83bc2428e50ab(arg0, arg1, arg2) {
|
|
979
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
980
|
-
return addHeapObject(ret);
|
|
981
|
-
};
|
|
982
|
-
|
|
983
|
-
export function __wbg_isSafeInteger_d8c89788832a17bf(arg0) {
|
|
984
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
985
|
-
return ret;
|
|
986
|
-
};
|
|
987
|
-
|
|
988
|
-
export function __wbg_entries_7a47f5716366056b(arg0) {
|
|
989
|
-
const ret = Object.entries(getObject(arg0));
|
|
990
|
-
return addHeapObject(ret);
|
|
991
|
-
};
|
|
992
|
-
|
|
993
|
-
export function __wbg_new_1d93771b84541aa5(arg0, arg1) {
|
|
994
|
-
try {
|
|
995
|
-
var state0 = {a: arg0, b: arg1};
|
|
996
|
-
var cb0 = (arg0, arg1) => {
|
|
997
|
-
const a = state0.a;
|
|
998
|
-
state0.a = 0;
|
|
999
|
-
try {
|
|
1000
|
-
return __wbg_adapter_157(a, state0.b, arg0, arg1);
|
|
1001
|
-
} finally {
|
|
1002
|
-
state0.a = a;
|
|
1003
|
-
}
|
|
1004
|
-
};
|
|
1005
|
-
const ret = new Promise(cb0);
|
|
1006
|
-
return addHeapObject(ret);
|
|
1007
|
-
} finally {
|
|
1008
|
-
state0.a = state0.b = 0;
|
|
1009
|
-
}
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
|
-
export function __wbg_resolve_97ecd55ee839391b(arg0) {
|
|
1013
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
1014
|
-
return addHeapObject(ret);
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
|
-
export function __wbg_then_7aeb7c5f1536640f(arg0, arg1) {
|
|
1018
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
1019
|
-
return addHeapObject(ret);
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
|
-
export function __wbg_then_5842e4e97f7beace(arg0, arg1, arg2) {
|
|
1023
|
-
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1024
|
-
return addHeapObject(ret);
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
export function __wbg_buffer_5d1b598a01b41a42(arg0) {
|
|
1028
|
-
const ret = getObject(arg0).buffer;
|
|
1029
|
-
return addHeapObject(ret);
|
|
1030
|
-
};
|
|
1031
|
-
|
|
1032
|
-
export function __wbg_newwithbyteoffsetandlength_d695c7957788f922(arg0, arg1, arg2) {
|
|
1033
|
-
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
1034
|
-
return addHeapObject(ret);
|
|
1035
|
-
};
|
|
1036
|
-
|
|
1037
|
-
export function __wbg_new_ace717933ad7117f(arg0) {
|
|
1038
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1039
|
-
return addHeapObject(ret);
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
export function __wbg_set_74906aa30864df5a(arg0, arg1, arg2) {
|
|
1043
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
|
-
export function __wbg_length_f0764416ba5bb237(arg0) {
|
|
1047
|
-
const ret = getObject(arg0).length;
|
|
1048
|
-
return ret;
|
|
1049
|
-
};
|
|
1050
|
-
|
|
1051
|
-
export function __wbg_instanceof_Uint8Array_4f5cffed7df34b2f(arg0) {
|
|
1052
|
-
let result;
|
|
1053
|
-
try {
|
|
1054
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
1055
|
-
} catch (_) {
|
|
1056
|
-
result = false;
|
|
1057
|
-
}
|
|
1058
|
-
const ret = result;
|
|
1059
|
-
return ret;
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
export function __wbg_newwithlength_728575f3bba9959b(arg0) {
|
|
1063
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
1064
|
-
return addHeapObject(ret);
|
|
1065
|
-
};
|
|
1066
|
-
|
|
1067
|
-
export function __wbg_subarray_7f7a652672800851(arg0, arg1, arg2) {
|
|
1068
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1069
|
-
return addHeapObject(ret);
|
|
1070
|
-
};
|
|
1071
|
-
|
|
1072
|
-
export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
|
|
1073
|
-
const v = getObject(arg1);
|
|
1074
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1075
|
-
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
1076
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1077
|
-
};
|
|
1078
|
-
|
|
1079
|
-
export function __wbindgen_debug_string(arg0, arg1) {
|
|
1080
|
-
const ret = debugString(getObject(arg1));
|
|
1081
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1082
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1083
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1084
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1085
|
-
};
|
|
1086
|
-
|
|
1087
|
-
export function __wbindgen_throw(arg0, arg1) {
|
|
1088
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1089
|
-
};
|
|
1090
|
-
|
|
1091
|
-
export function __wbindgen_memory() {
|
|
1092
|
-
const ret = wasm.memory;
|
|
1093
|
-
return addHeapObject(ret);
|
|
1094
|
-
};
|
|
1095
|
-
|
|
1096
|
-
export function __wbindgen_closure_wrapper3501(arg0, arg1, arg2) {
|
|
1097
|
-
const ret = makeMutClosure(arg0, arg1, 1270, __wbg_adapter_50);
|
|
1098
|
-
return addHeapObject(ret);
|
|
1099
|
-
};
|
|
1100
|
-
|