@canvist/canvas 0.0.0 → 0.2.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.
@@ -0,0 +1,1946 @@
1
+ /* @ts-self-types="./canvist_canvas_wasm.d.ts" */
2
+
3
+ /**
4
+ * The canvist canvas on a `<canvas>` element.
5
+ */
6
+ export class CanvasApp {
7
+ static __wrap(ptr) {
8
+ const obj = Object.create(CanvasApp.prototype);
9
+ obj.__wbg_ptr = ptr;
10
+ CanvasAppFinalization.register(obj, obj.__wbg_ptr, obj);
11
+ return obj;
12
+ }
13
+ __destroy_into_raw() {
14
+ const ptr = this.__wbg_ptr;
15
+ this.__wbg_ptr = 0;
16
+ CanvasAppFinalization.unregister(this);
17
+ return ptr;
18
+ }
19
+ free() {
20
+ const ptr = this.__destroy_into_raw();
21
+ wasm.__wbg_canvasapp_free(ptr, 0);
22
+ }
23
+ /**
24
+ * Add `count` rectangles below the demo: a heavier scene for measuring
25
+ * frame times.
26
+ * @param {number} count
27
+ */
28
+ add_stress(count) {
29
+ const ret = wasm.canvasapp_add_stress(this.__wbg_ptr, count);
30
+ if (ret[1]) {
31
+ throw takeFromExternrefTable0(ret[0]);
32
+ }
33
+ }
34
+ /**
35
+ * Integrate a collaborator's update. Returns whether anything changed.
36
+ * @param {Uint8Array} update
37
+ * @returns {boolean}
38
+ */
39
+ apply_update(update) {
40
+ const ptr0 = passArray8ToWasm0(update, wasm.__wbindgen_malloc);
41
+ const len0 = WASM_VECTOR_LEN;
42
+ const ret = wasm.canvasapp_apply_update(this.__wbg_ptr, ptr0, len0);
43
+ if (ret[2]) {
44
+ throw takeFromExternrefTable0(ret[1]);
45
+ }
46
+ return ret[0] !== 0;
47
+ }
48
+ /**
49
+ * `"webgpu"` or `"cpu"`.
50
+ * @returns {string}
51
+ */
52
+ backend() {
53
+ let deferred1_0;
54
+ let deferred1_1;
55
+ try {
56
+ const ret = wasm.canvasapp_backend(this.__wbg_ptr);
57
+ deferred1_0 = ret[0];
58
+ deferred1_1 = ret[1];
59
+ return getStringFromWasm0(ret[0], ret[1]);
60
+ } finally {
61
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
62
+ }
63
+ }
64
+ /**
65
+ * Start the canvas on `canvas` as peer `client` (any id but 1), from
66
+ * `scene` (scene JSON text) or, without one, the demo scene, on WebGPU
67
+ * when `prefer_gpu` is set and the browser supports it.
68
+ * @param {HTMLCanvasElement} canvas
69
+ * @param {number} client
70
+ * @param {boolean} prefer_gpu
71
+ * @param {string | null} [scene]
72
+ * @returns {Promise<CanvasApp>}
73
+ */
74
+ static create(canvas, client, prefer_gpu, scene) {
75
+ var ptr0 = isLikeNone(scene) ? 0 : passStringToWasm0(scene, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
76
+ var len0 = WASM_VECTOR_LEN;
77
+ const ret = wasm.canvasapp_create(canvas, client, prefer_gpu, ptr0, len0);
78
+ return ret;
79
+ }
80
+ /**
81
+ * The CSS cursor the canvas wants.
82
+ * @returns {string}
83
+ */
84
+ cursor() {
85
+ let deferred1_0;
86
+ let deferred1_1;
87
+ try {
88
+ const ret = wasm.canvasapp_cursor(this.__wbg_ptr);
89
+ deferred1_0 = ret[0];
90
+ deferred1_1 = ret[1];
91
+ return getStringFromWasm0(ret[0], ret[1]);
92
+ } finally {
93
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
94
+ }
95
+ }
96
+ /**
97
+ * Whether a text frame is open in the text editor.
98
+ * @returns {boolean}
99
+ */
100
+ editing() {
101
+ const ret = wasm.canvasapp_editing(this.__wbg_ptr);
102
+ return ret !== 0;
103
+ }
104
+ /**
105
+ * Everything the peer with state vector `state_vector` lacks.
106
+ * @param {Uint8Array} state_vector
107
+ * @returns {Uint8Array}
108
+ */
109
+ encode_diff(state_vector) {
110
+ const ptr0 = passArray8ToWasm0(state_vector, wasm.__wbindgen_malloc);
111
+ const len0 = WASM_VECTOR_LEN;
112
+ const ret = wasm.canvasapp_encode_diff(this.__wbg_ptr, ptr0, len0);
113
+ if (ret[3]) {
114
+ throw takeFromExternrefTable0(ret[2]);
115
+ }
116
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
117
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
118
+ return v2;
119
+ }
120
+ /**
121
+ * The whole shared scene as one v1 Yjs update.
122
+ * @returns {Uint8Array}
123
+ */
124
+ encode_state() {
125
+ const ret = wasm.canvasapp_encode_state(this.__wbg_ptr);
126
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
127
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
128
+ return v1;
129
+ }
130
+ /**
131
+ * Advance camera momentum by `elapsed` seconds. Returns whether to
132
+ * paint another frame.
133
+ * @param {number} elapsed
134
+ * @returns {boolean}
135
+ */
136
+ frame(elapsed) {
137
+ const ret = wasm.canvasapp_frame(this.__wbg_ptr, elapsed);
138
+ return ret !== 0;
139
+ }
140
+ /**
141
+ * A key event; `key` is the DOM `KeyboardEvent.key`. Returns whether
142
+ * the canvas used it, so the host can prevent the browser's default.
143
+ * @param {string} key
144
+ * @param {boolean} down
145
+ * @param {number} modifiers
146
+ * @param {number} time
147
+ * @returns {boolean}
148
+ */
149
+ key(key, down, modifiers, time) {
150
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
151
+ const len0 = WASM_VECTOR_LEN;
152
+ const ret = wasm.canvasapp_key(this.__wbg_ptr, ptr0, len0, down, modifiers, time);
153
+ if (ret[2]) {
154
+ throw takeFromExternrefTable0(ret[1]);
155
+ }
156
+ return ret[0] !== 0;
157
+ }
158
+ /**
159
+ * How many nodes the scene shows.
160
+ * @returns {number}
161
+ */
162
+ node_count() {
163
+ const ret = wasm.canvasapp_node_count(this.__wbg_ptr);
164
+ return ret >>> 0;
165
+ }
166
+ /**
167
+ * A pointer event: `phase` is `down`, `move`, `up`, or `cancel`, and
168
+ * `kind` is `mouse`, `pen`, or `touch`. Positions are CSS pixels from
169
+ * the canvas's top left; `time` is milliseconds. Returns whether to
170
+ * repaint.
171
+ * @param {string} phase
172
+ * @param {number} id
173
+ * @param {string} kind
174
+ * @param {number} x
175
+ * @param {number} y
176
+ * @param {number} buttons
177
+ * @param {number} modifiers
178
+ * @param {number} time
179
+ * @returns {boolean}
180
+ */
181
+ pointer(phase, id, kind, x, y, buttons, modifiers, time) {
182
+ const ptr0 = passStringToWasm0(phase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
183
+ const len0 = WASM_VECTOR_LEN;
184
+ const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
185
+ const len1 = WASM_VECTOR_LEN;
186
+ const ret = wasm.canvasapp_pointer(this.__wbg_ptr, ptr0, len0, id, ptr1, len1, x, y, buttons, modifiers, time);
187
+ if (ret[2]) {
188
+ throw takeFromExternrefTable0(ret[1]);
189
+ }
190
+ return ret[0] !== 0;
191
+ }
192
+ /**
193
+ * Paint and present a frame.
194
+ */
195
+ render() {
196
+ const ret = wasm.canvasapp_render(this.__wbg_ptr);
197
+ if (ret[1]) {
198
+ throw takeFromExternrefTable0(ret[0]);
199
+ }
200
+ }
201
+ /**
202
+ * Size the canvas to `width` by `height` CSS pixels at `scale` device
203
+ * pixels per CSS pixel.
204
+ * @param {number} width
205
+ * @param {number} height
206
+ * @param {number} scale
207
+ */
208
+ resize(width, height, scale) {
209
+ wasm.canvasapp_resize(this.__wbg_ptr, width, height, scale);
210
+ }
211
+ /**
212
+ * The scene as canonical JSON, to store or to compare peers.
213
+ * @returns {string}
214
+ */
215
+ scene_json() {
216
+ let deferred1_0;
217
+ let deferred1_1;
218
+ try {
219
+ const ret = wasm.canvasapp_scene_json(this.__wbg_ptr);
220
+ deferred1_0 = ret[0];
221
+ deferred1_1 = ret[1];
222
+ return getStringFromWasm0(ret[0], ret[1]);
223
+ } finally {
224
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
225
+ }
226
+ }
227
+ /**
228
+ * How many nodes are selected.
229
+ * @returns {number}
230
+ */
231
+ selected_count() {
232
+ const ret = wasm.canvasapp_selected_count(this.__wbg_ptr);
233
+ return ret >>> 0;
234
+ }
235
+ /**
236
+ * Switch to the tool named `name`. Returns whether one exists.
237
+ * @param {string} name
238
+ * @returns {boolean}
239
+ */
240
+ set_tool(name) {
241
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
242
+ const len0 = WASM_VECTOR_LEN;
243
+ const ret = wasm.canvasapp_set_tool(this.__wbg_ptr, ptr0, len0);
244
+ if (ret[2]) {
245
+ throw takeFromExternrefTable0(ret[1]);
246
+ }
247
+ return ret[0] !== 0;
248
+ }
249
+ /**
250
+ * The shared document's state vector, to ask a peer for what this peer
251
+ * lacks.
252
+ * @returns {Uint8Array}
253
+ */
254
+ state_vector() {
255
+ const ret = wasm.canvasapp_state_vector(this.__wbg_ptr);
256
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
257
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
258
+ return v1;
259
+ }
260
+ /**
261
+ * The updates made since the last call, to broadcast.
262
+ * @returns {Uint8Array[]}
263
+ */
264
+ take_updates() {
265
+ const ret = wasm.canvasapp_take_updates(this.__wbg_ptr);
266
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
267
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
268
+ return v1;
269
+ }
270
+ /**
271
+ * The active tool's name.
272
+ * @returns {string}
273
+ */
274
+ tool() {
275
+ let deferred1_0;
276
+ let deferred1_1;
277
+ try {
278
+ const ret = wasm.canvasapp_tool(this.__wbg_ptr);
279
+ deferred1_0 = ret[0];
280
+ deferred1_1 = ret[1];
281
+ return getStringFromWasm0(ret[0], ret[1]);
282
+ } finally {
283
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
284
+ }
285
+ }
286
+ /**
287
+ * The registered tools' names.
288
+ * @returns {string[]}
289
+ */
290
+ tools() {
291
+ const ret = wasm.canvasapp_tools(this.__wbg_ptr);
292
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
293
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
294
+ return v1;
295
+ }
296
+ /**
297
+ * Text from an IME or a paste, typed into the open text frame.
298
+ * @param {string} text
299
+ * @param {number} time
300
+ * @returns {boolean}
301
+ */
302
+ type_text(text, time) {
303
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
+ const len0 = WASM_VECTOR_LEN;
305
+ const ret = wasm.canvasapp_type_text(this.__wbg_ptr, ptr0, len0, time);
306
+ if (ret[2]) {
307
+ throw takeFromExternrefTable0(ret[1]);
308
+ }
309
+ return ret[0] !== 0;
310
+ }
311
+ /**
312
+ * A wheel event in CSS pixels. `pinch` marks a trackpad pinch, which
313
+ * browsers report as a wheel event with Ctrl held.
314
+ * @param {number} dx
315
+ * @param {number} dy
316
+ * @param {number} x
317
+ * @param {number} y
318
+ * @param {number} modifiers
319
+ * @param {boolean} pinch
320
+ * @param {number} time
321
+ * @returns {boolean}
322
+ */
323
+ wheel(dx, dy, x, y, modifiers, pinch, time) {
324
+ const ret = wasm.canvasapp_wheel(this.__wbg_ptr, dx, dy, x, y, modifiers, pinch, time);
325
+ if (ret[2]) {
326
+ throw takeFromExternrefTable0(ret[1]);
327
+ }
328
+ return ret[0] !== 0;
329
+ }
330
+ /**
331
+ * The camera zoom.
332
+ * @returns {number}
333
+ */
334
+ zoom() {
335
+ const ret = wasm.canvasapp_zoom(this.__wbg_ptr);
336
+ return ret;
337
+ }
338
+ }
339
+ if (Symbol.dispose) CanvasApp.prototype[Symbol.dispose] = CanvasApp.prototype.free;
340
+ function __wbg_get_imports() {
341
+ const import0 = {
342
+ __proto__: null,
343
+ __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
344
+ const ret = Error(getStringFromWasm0(arg0, arg1));
345
+ return ret;
346
+ },
347
+ __wbg_Window_a2a6c4d665047b14: function(arg0) {
348
+ const ret = arg0.Window;
349
+ return ret;
350
+ },
351
+ __wbg_WorkerGlobalScope_2664448a7c667d67: function(arg0) {
352
+ const ret = arg0.WorkerGlobalScope;
353
+ return ret;
354
+ },
355
+ __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
356
+ const ret = debugString(arg1);
357
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
358
+ const len1 = WASM_VECTOR_LEN;
359
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
360
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
361
+ },
362
+ __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
363
+ const ret = typeof(arg0) === 'function';
364
+ return ret;
365
+ },
366
+ __wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
367
+ const ret = arg0 === null;
368
+ return ret;
369
+ },
370
+ __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
371
+ const val = arg0;
372
+ const ret = typeof(val) === 'object' && val !== null;
373
+ return ret;
374
+ },
375
+ __wbg___wbindgen_is_string_90b56bc79aad6f6c: function(arg0) {
376
+ const ret = typeof(arg0) === 'string';
377
+ return ret;
378
+ },
379
+ __wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
380
+ const ret = arg0 === undefined;
381
+ return ret;
382
+ },
383
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
384
+ throw new Error(getStringFromWasm0(arg0, arg1));
385
+ },
386
+ __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
387
+ arg0._wbg_cb_unref();
388
+ },
389
+ __wbg_beginComputePass_b9a325184985e6ff: function(arg0, arg1) {
390
+ const ret = arg0.beginComputePass(arg1);
391
+ return ret;
392
+ },
393
+ __wbg_beginRenderPass_3c53642423af50dc: function() { return handleError(function (arg0, arg1) {
394
+ const ret = arg0.beginRenderPass(arg1);
395
+ return ret;
396
+ }, arguments); },
397
+ __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
398
+ const ret = arg0.call(arg1, arg2);
399
+ return ret;
400
+ }, arguments); },
401
+ __wbg_canvasapp_new: function(arg0) {
402
+ const ret = CanvasApp.__wrap(arg0);
403
+ return ret;
404
+ },
405
+ __wbg_clearBuffer_3d5a3057c3c8a9bf: function(arg0, arg1, arg2, arg3) {
406
+ arg0.clearBuffer(arg1, arg2, arg3);
407
+ },
408
+ __wbg_clearBuffer_82ba999c294f42fb: function(arg0, arg1, arg2) {
409
+ arg0.clearBuffer(arg1, arg2);
410
+ },
411
+ __wbg_configure_1e2c1c9edad07d26: function() { return handleError(function (arg0, arg1) {
412
+ arg0.configure(arg1);
413
+ }, arguments); },
414
+ __wbg_copyBufferToBuffer_01766818654a9868: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
415
+ arg0.copyBufferToBuffer(arg1, arg2, arg3, arg4);
416
+ }, arguments); },
417
+ __wbg_copyBufferToBuffer_9c174b96fb08d551: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
418
+ arg0.copyBufferToBuffer(arg1, arg2, arg3, arg4, arg5);
419
+ }, arguments); },
420
+ __wbg_copyTextureToTexture_d2e6a1eb3254b828: function() { return handleError(function (arg0, arg1, arg2, arg3) {
421
+ arg0.copyTextureToTexture(arg1, arg2, arg3);
422
+ }, arguments); },
423
+ __wbg_createBindGroupLayout_b1bd63b4e88459d8: function() { return handleError(function (arg0, arg1) {
424
+ const ret = arg0.createBindGroupLayout(arg1);
425
+ return ret;
426
+ }, arguments); },
427
+ __wbg_createBindGroup_f539b26ca341308f: function(arg0, arg1) {
428
+ const ret = arg0.createBindGroup(arg1);
429
+ return ret;
430
+ },
431
+ __wbg_createBuffer_d800e9b1d41b2ee5: function() { return handleError(function (arg0, arg1) {
432
+ const ret = arg0.createBuffer(arg1);
433
+ return ret;
434
+ }, arguments); },
435
+ __wbg_createCommandEncoder_3352d1ffc36c6fc0: function(arg0, arg1) {
436
+ const ret = arg0.createCommandEncoder(arg1);
437
+ return ret;
438
+ },
439
+ __wbg_createComputePipeline_224fa2618d9948a0: function(arg0, arg1) {
440
+ const ret = arg0.createComputePipeline(arg1);
441
+ return ret;
442
+ },
443
+ __wbg_createPipelineLayout_6eab52c327118937: function(arg0, arg1) {
444
+ const ret = arg0.createPipelineLayout(arg1);
445
+ return ret;
446
+ },
447
+ __wbg_createRenderPipeline_0ebb7ebc653e9207: function() { return handleError(function (arg0, arg1) {
448
+ const ret = arg0.createRenderPipeline(arg1);
449
+ return ret;
450
+ }, arguments); },
451
+ __wbg_createSampler_9bd91d7e928c0060: function(arg0, arg1) {
452
+ const ret = arg0.createSampler(arg1);
453
+ return ret;
454
+ },
455
+ __wbg_createShaderModule_cefa51336cb288ae: function(arg0, arg1) {
456
+ const ret = arg0.createShaderModule(arg1);
457
+ return ret;
458
+ },
459
+ __wbg_createTexture_ed7e9fc04dd54d84: function() { return handleError(function (arg0, arg1) {
460
+ const ret = arg0.createTexture(arg1);
461
+ return ret;
462
+ }, arguments); },
463
+ __wbg_createView_da41c2d2cb212715: function() { return handleError(function (arg0, arg1) {
464
+ const ret = arg0.createView(arg1);
465
+ return ret;
466
+ }, arguments); },
467
+ __wbg_crypto_38df2bab126b63dc: function(arg0) {
468
+ const ret = arg0.crypto;
469
+ return ret;
470
+ },
471
+ __wbg_destroy_249478e98a7943d5: function(arg0) {
472
+ arg0.destroy();
473
+ },
474
+ __wbg_dispatchWorkgroupsIndirect_efe17f2da3a39a3f: function(arg0, arg1, arg2) {
475
+ arg0.dispatchWorkgroupsIndirect(arg1, arg2);
476
+ },
477
+ __wbg_dispatchWorkgroups_56b943172790add0: function(arg0, arg1, arg2, arg3) {
478
+ arg0.dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
479
+ },
480
+ __wbg_document_9854e03c05fc8834: function(arg0) {
481
+ const ret = arg0.document;
482
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
483
+ },
484
+ __wbg_draw_086a9578fc9898c2: function(arg0, arg1, arg2, arg3, arg4) {
485
+ arg0.draw(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
486
+ },
487
+ __wbg_end_82fd0c12ba185009: function(arg0) {
488
+ arg0.end();
489
+ },
490
+ __wbg_end_b57473834b877409: function(arg0) {
491
+ arg0.end();
492
+ },
493
+ __wbg_finish_09ec094c10f41e7b: function(arg0) {
494
+ const ret = arg0.finish();
495
+ return ret;
496
+ },
497
+ __wbg_finish_ec1c191f66a895b1: function(arg0, arg1) {
498
+ const ret = arg0.finish(arg1);
499
+ return ret;
500
+ },
501
+ __wbg_getContext_635e36719cad2623: function() { return handleError(function (arg0, arg1, arg2) {
502
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
503
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
504
+ }, arguments); },
505
+ __wbg_getContext_e567868594d2e0c6: function() { return handleError(function (arg0, arg1, arg2) {
506
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
507
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
508
+ }, arguments); },
509
+ __wbg_getCurrentTexture_9f3b84d0eaa6cd95: function() { return handleError(function (arg0) {
510
+ const ret = arg0.getCurrentTexture();
511
+ return ret;
512
+ }, arguments); },
513
+ __wbg_getPreferredCanvasFormat_0ef5034c8902201b: function(arg0) {
514
+ const ret = arg0.getPreferredCanvasFormat();
515
+ return (__wbindgen_enum_GpuTextureFormat.indexOf(ret) + 1 || 102) - 1;
516
+ },
517
+ __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
518
+ arg0.getRandomValues(arg1);
519
+ }, arguments); },
520
+ __wbg_get_fd12a9100976c296: function(arg0, arg1) {
521
+ const ret = arg0[arg1 >>> 0];
522
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
523
+ },
524
+ __wbg_gpu_afdd4387c7afe5f9: function(arg0) {
525
+ const ret = arg0.gpu;
526
+ return ret;
527
+ },
528
+ __wbg_height_fc97e1a0c2e7331f: function(arg0) {
529
+ const ret = arg0.height;
530
+ return ret;
531
+ },
532
+ __wbg_instanceof_CanvasRenderingContext2d_769208c72dcbf5e6: function(arg0) {
533
+ let result;
534
+ try {
535
+ result = arg0 instanceof CanvasRenderingContext2D;
536
+ } catch (_) {
537
+ result = false;
538
+ }
539
+ const ret = result;
540
+ return ret;
541
+ },
542
+ __wbg_instanceof_Window_82d71df4eddf88bc: function(arg0) {
543
+ let result;
544
+ try {
545
+ result = arg0 instanceof Window;
546
+ } catch (_) {
547
+ result = false;
548
+ }
549
+ const ret = result;
550
+ return ret;
551
+ },
552
+ __wbg_label_7add8cb37a6ef98f: function(arg0, arg1) {
553
+ const ret = arg1.label;
554
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
555
+ const len1 = WASM_VECTOR_LEN;
556
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
557
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
558
+ },
559
+ __wbg_length_7f3c00c40364105e: function(arg0) {
560
+ const ret = arg0.length;
561
+ return ret;
562
+ },
563
+ __wbg_limits_601ad2e086ef8141: function(arg0) {
564
+ const ret = arg0.limits;
565
+ return ret;
566
+ },
567
+ __wbg_mapAsync_b0597127f5037286: function(arg0, arg1, arg2, arg3) {
568
+ const ret = arg0.mapAsync(arg1 >>> 0, arg2, arg3);
569
+ return ret;
570
+ },
571
+ __wbg_maxBindGroupsPlusVertexBuffers_52369f089736ef9d: function(arg0) {
572
+ const ret = arg0.maxBindGroupsPlusVertexBuffers;
573
+ return ret;
574
+ },
575
+ __wbg_maxBindGroups_4e424afe6ce86ca2: function(arg0) {
576
+ const ret = arg0.maxBindGroups;
577
+ return ret;
578
+ },
579
+ __wbg_maxBindingsPerBindGroup_7d035da36821c44f: function(arg0) {
580
+ const ret = arg0.maxBindingsPerBindGroup;
581
+ return ret;
582
+ },
583
+ __wbg_maxBufferSize_423f4a084e32a195: function(arg0) {
584
+ const ret = arg0.maxBufferSize;
585
+ return ret;
586
+ },
587
+ __wbg_maxColorAttachmentBytesPerSample_c4cd9126f6d287c6: function(arg0) {
588
+ const ret = arg0.maxColorAttachmentBytesPerSample;
589
+ return ret;
590
+ },
591
+ __wbg_maxColorAttachments_d924670762b9e250: function(arg0) {
592
+ const ret = arg0.maxColorAttachments;
593
+ return ret;
594
+ },
595
+ __wbg_maxComputeInvocationsPerWorkgroup_707a3868f7cebb59: function(arg0) {
596
+ const ret = arg0.maxComputeInvocationsPerWorkgroup;
597
+ return ret;
598
+ },
599
+ __wbg_maxComputeWorkgroupSizeX_0a4d99463cbd6e5e: function(arg0) {
600
+ const ret = arg0.maxComputeWorkgroupSizeX;
601
+ return ret;
602
+ },
603
+ __wbg_maxComputeWorkgroupSizeY_85123ea0587f7558: function(arg0) {
604
+ const ret = arg0.maxComputeWorkgroupSizeY;
605
+ return ret;
606
+ },
607
+ __wbg_maxComputeWorkgroupSizeZ_a3186b4c5267d44f: function(arg0) {
608
+ const ret = arg0.maxComputeWorkgroupSizeZ;
609
+ return ret;
610
+ },
611
+ __wbg_maxComputeWorkgroupStorageSize_57b297355cfb6204: function(arg0) {
612
+ const ret = arg0.maxComputeWorkgroupStorageSize;
613
+ return ret;
614
+ },
615
+ __wbg_maxComputeWorkgroupsPerDimension_4158f95e673d54c4: function(arg0) {
616
+ const ret = arg0.maxComputeWorkgroupsPerDimension;
617
+ return ret;
618
+ },
619
+ __wbg_maxDynamicStorageBuffersPerPipelineLayout_226b0b70910aa16c: function(arg0) {
620
+ const ret = arg0.maxDynamicStorageBuffersPerPipelineLayout;
621
+ return ret;
622
+ },
623
+ __wbg_maxDynamicUniformBuffersPerPipelineLayout_0e835fda711fc7e6: function(arg0) {
624
+ const ret = arg0.maxDynamicUniformBuffersPerPipelineLayout;
625
+ return ret;
626
+ },
627
+ __wbg_maxInterStageShaderVariables_8c4a1d727e2aa35a: function(arg0) {
628
+ const ret = arg0.maxInterStageShaderVariables;
629
+ return ret;
630
+ },
631
+ __wbg_maxSampledTexturesPerShaderStage_6675f5e91d9a728a: function(arg0) {
632
+ const ret = arg0.maxSampledTexturesPerShaderStage;
633
+ return ret;
634
+ },
635
+ __wbg_maxSamplersPerShaderStage_1910fa38a6ed1e1f: function(arg0) {
636
+ const ret = arg0.maxSamplersPerShaderStage;
637
+ return ret;
638
+ },
639
+ __wbg_maxStorageBufferBindingSize_2e244bded070b18d: function(arg0) {
640
+ const ret = arg0.maxStorageBufferBindingSize;
641
+ return ret;
642
+ },
643
+ __wbg_maxStorageBuffersPerShaderStage_a285f3ebca51ca0d: function(arg0) {
644
+ const ret = arg0.maxStorageBuffersPerShaderStage;
645
+ return ret;
646
+ },
647
+ __wbg_maxStorageTexturesPerShaderStage_7aa946f0fc322a2b: function(arg0) {
648
+ const ret = arg0.maxStorageTexturesPerShaderStage;
649
+ return ret;
650
+ },
651
+ __wbg_maxTextureArrayLayers_0e699147ad00502d: function(arg0) {
652
+ const ret = arg0.maxTextureArrayLayers;
653
+ return ret;
654
+ },
655
+ __wbg_maxTextureDimension1D_aabf6add54decfe2: function(arg0) {
656
+ const ret = arg0.maxTextureDimension1D;
657
+ return ret;
658
+ },
659
+ __wbg_maxTextureDimension2D_dd598b27e9c0c1c4: function(arg0) {
660
+ const ret = arg0.maxTextureDimension2D;
661
+ return ret;
662
+ },
663
+ __wbg_maxTextureDimension3D_f944266c65dfd1a9: function(arg0) {
664
+ const ret = arg0.maxTextureDimension3D;
665
+ return ret;
666
+ },
667
+ __wbg_maxUniformBufferBindingSize_59fa6be7cfbeeb53: function(arg0) {
668
+ const ret = arg0.maxUniformBufferBindingSize;
669
+ return ret;
670
+ },
671
+ __wbg_maxUniformBuffersPerShaderStage_bee5f00a4d706c7f: function(arg0) {
672
+ const ret = arg0.maxUniformBuffersPerShaderStage;
673
+ return ret;
674
+ },
675
+ __wbg_maxVertexAttributes_5cf6392c4e9033fe: function(arg0) {
676
+ const ret = arg0.maxVertexAttributes;
677
+ return ret;
678
+ },
679
+ __wbg_maxVertexBufferArrayStride_548baa887375d865: function(arg0) {
680
+ const ret = arg0.maxVertexBufferArrayStride;
681
+ return ret;
682
+ },
683
+ __wbg_maxVertexBuffers_75d881156591f5da: function(arg0) {
684
+ const ret = arg0.maxVertexBuffers;
685
+ return ret;
686
+ },
687
+ __wbg_minStorageBufferOffsetAlignment_5ba9b77792bdadb3: function(arg0) {
688
+ const ret = arg0.minStorageBufferOffsetAlignment;
689
+ return ret;
690
+ },
691
+ __wbg_minUniformBufferOffsetAlignment_ab7d52a5293b22bd: function(arg0) {
692
+ const ret = arg0.minUniformBufferOffsetAlignment;
693
+ return ret;
694
+ },
695
+ __wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
696
+ const ret = arg0.msCrypto;
697
+ return ret;
698
+ },
699
+ __wbg_navigator_2156486643462a87: function(arg0) {
700
+ const ret = arg0.navigator;
701
+ return ret;
702
+ },
703
+ __wbg_navigator_c9bce48d4b578c9c: function(arg0) {
704
+ const ret = arg0.navigator;
705
+ return ret;
706
+ },
707
+ __wbg_new_617a8cdb8bb1130e: function() {
708
+ const ret = new Object();
709
+ return ret;
710
+ },
711
+ __wbg_new_a217df4351db4b9b: function() { return handleError(function (arg0, arg1) {
712
+ const ret = new OffscreenCanvas(arg0 >>> 0, arg1 >>> 0);
713
+ return ret;
714
+ }, arguments); },
715
+ __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
716
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
717
+ return ret;
718
+ },
719
+ __wbg_new_typed_689a3a281a8d4da6: function() {
720
+ const ret = new Object();
721
+ return ret;
722
+ },
723
+ __wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
724
+ try {
725
+ var state0 = {a: arg0, b: arg1};
726
+ var cb0 = (arg0, arg1) => {
727
+ const a = state0.a;
728
+ state0.a = 0;
729
+ try {
730
+ return wasm_bindgen__convert__closures_____invoke__h570d8909b223014a(a, state0.b, arg0, arg1);
731
+ } finally {
732
+ state0.a = a;
733
+ }
734
+ };
735
+ const ret = new Promise(cb0);
736
+ return ret;
737
+ } finally {
738
+ state0.a = 0;
739
+ }
740
+ },
741
+ __wbg_new_with_length_3da0ad195f6f63ba: function(arg0) {
742
+ const ret = new Uint8Array(arg0 >>> 0);
743
+ return ret;
744
+ },
745
+ __wbg_new_with_u8_clamped_array_and_sh_af3f0dee40638e18: function() { return handleError(function (arg0, arg1, arg2, arg3) {
746
+ const ret = new ImageData(getClampedArrayU8FromWasm0(arg0, arg1), arg2 >>> 0, arg3 >>> 0);
747
+ return ret;
748
+ }, arguments); },
749
+ __wbg_node_84ea875411254db1: function(arg0) {
750
+ const ret = arg0.node;
751
+ return ret;
752
+ },
753
+ __wbg_onSubmittedWorkDone_1190213cee1ecf7e: function(arg0) {
754
+ const ret = arg0.onSubmittedWorkDone();
755
+ return ret;
756
+ },
757
+ __wbg_process_44c7a14e11e9f69e: function(arg0) {
758
+ const ret = arg0.process;
759
+ return ret;
760
+ },
761
+ __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
762
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
763
+ },
764
+ __wbg_putImageData_11570c06086c9e05: function() { return handleError(function (arg0, arg1, arg2, arg3) {
765
+ arg0.putImageData(arg1, arg2, arg3);
766
+ }, arguments); },
767
+ __wbg_querySelectorAll_6aebfe3df1fb2014: function() { return handleError(function (arg0, arg1, arg2) {
768
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
769
+ return ret;
770
+ }, arguments); },
771
+ __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
772
+ const ret = arg0.queueMicrotask;
773
+ return ret;
774
+ },
775
+ __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
776
+ queueMicrotask(arg0);
777
+ },
778
+ __wbg_queue_7b62c28143d44293: function(arg0) {
779
+ const ret = arg0.queue;
780
+ return ret;
781
+ },
782
+ __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
783
+ arg0.randomFillSync(arg1);
784
+ }, arguments); },
785
+ __wbg_requestAdapter_a539af006419f2e9: function(arg0, arg1) {
786
+ const ret = arg0.requestAdapter(arg1);
787
+ return ret;
788
+ },
789
+ __wbg_requestDevice_5cb8a582e55d08cb: function(arg0, arg1) {
790
+ const ret = arg0.requestDevice(arg1);
791
+ return ret;
792
+ },
793
+ __wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
794
+ const ret = module.require;
795
+ return ret;
796
+ }, arguments); },
797
+ __wbg_resolve_0076e10020304ede: function(arg0) {
798
+ const ret = Promise.resolve(arg0);
799
+ return ret;
800
+ },
801
+ __wbg_setBindGroup_0b7c2a055ef1f314: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
802
+ arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
803
+ }, arguments); },
804
+ __wbg_setBindGroup_418c3e0eb6943ce0: function(arg0, arg1, arg2) {
805
+ arg0.setBindGroup(arg1 >>> 0, arg2);
806
+ },
807
+ __wbg_setBindGroup_c83391351ce68826: function(arg0, arg1, arg2) {
808
+ arg0.setBindGroup(arg1 >>> 0, arg2);
809
+ },
810
+ __wbg_setPipeline_5146f7b8d2b4af5c: function(arg0, arg1) {
811
+ arg0.setPipeline(arg1);
812
+ },
813
+ __wbg_setPipeline_b6f981027e02cd16: function(arg0, arg1) {
814
+ arg0.setPipeline(arg1);
815
+ },
816
+ __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
817
+ const ret = Reflect.set(arg0, arg1, arg2);
818
+ return ret;
819
+ }, arguments); },
820
+ __wbg_set_a_82818effc94f6256: function(arg0, arg1) {
821
+ arg0.a = arg1;
822
+ },
823
+ __wbg_set_access_a099cfbbeec9b96f: function(arg0, arg1) {
824
+ arg0.access = __wbindgen_enum_GpuStorageTextureAccess[arg1];
825
+ },
826
+ __wbg_set_address_mode_u_a68737cf5d288f95: function(arg0, arg1) {
827
+ arg0.addressModeU = __wbindgen_enum_GpuAddressMode[arg1];
828
+ },
829
+ __wbg_set_address_mode_v_b1c3c45933f540d1: function(arg0, arg1) {
830
+ arg0.addressModeV = __wbindgen_enum_GpuAddressMode[arg1];
831
+ },
832
+ __wbg_set_address_mode_w_889c31cf7022c764: function(arg0, arg1) {
833
+ arg0.addressModeW = __wbindgen_enum_GpuAddressMode[arg1];
834
+ },
835
+ __wbg_set_alpha_106f21a936a85eba: function(arg0, arg1) {
836
+ arg0.alpha = arg1;
837
+ },
838
+ __wbg_set_alpha_mode_5544568dbac50280: function(arg0, arg1) {
839
+ arg0.alphaMode = __wbindgen_enum_GpuCanvasAlphaMode[arg1];
840
+ },
841
+ __wbg_set_alpha_to_coverage_enabled_3372ce329447b8f1: function(arg0, arg1) {
842
+ arg0.alphaToCoverageEnabled = arg1 !== 0;
843
+ },
844
+ __wbg_set_array_layer_count_22afa0a979e4ad55: function(arg0, arg1) {
845
+ arg0.arrayLayerCount = arg1 >>> 0;
846
+ },
847
+ __wbg_set_array_stride_f64_6816040e5e7598c3: function(arg0, arg1) {
848
+ arg0.arrayStride = arg1;
849
+ },
850
+ __wbg_set_aspect_a48d046965270281: function(arg0, arg1) {
851
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
852
+ },
853
+ __wbg_set_aspect_b1a9909bf315433f: function(arg0, arg1) {
854
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
855
+ },
856
+ __wbg_set_attributes_9e38cb1dde387a5b: function(arg0, arg1, arg2) {
857
+ arg0.attributes = getArrayJsValueViewFromWasm0(arg1, arg2);
858
+ },
859
+ __wbg_set_b_a3297ee7e7cac3a8: function(arg0, arg1) {
860
+ arg0.b = arg1;
861
+ },
862
+ __wbg_set_base_array_layer_2435ba92c80346ae: function(arg0, arg1) {
863
+ arg0.baseArrayLayer = arg1 >>> 0;
864
+ },
865
+ __wbg_set_base_mip_level_8b6093e875e7c65d: function(arg0, arg1) {
866
+ arg0.baseMipLevel = arg1 >>> 0;
867
+ },
868
+ __wbg_set_beginning_of_pass_write_index_e552c5e8b8bbf52f: function(arg0, arg1) {
869
+ arg0.beginningOfPassWriteIndex = arg1 >>> 0;
870
+ },
871
+ __wbg_set_beginning_of_pass_write_index_fa9ae10d5d2804ce: function(arg0, arg1) {
872
+ arg0.beginningOfPassWriteIndex = arg1 >>> 0;
873
+ },
874
+ __wbg_set_bind_group_layouts_458c44ba55100b82: function(arg0, arg1, arg2) {
875
+ arg0.bindGroupLayouts = getArrayJsValueViewFromWasm0(arg1, arg2);
876
+ },
877
+ __wbg_set_binding_81b3fac7f7acaf8d: function(arg0, arg1) {
878
+ arg0.binding = arg1 >>> 0;
879
+ },
880
+ __wbg_set_binding_b6cee57f35ac5190: function(arg0, arg1) {
881
+ arg0.binding = arg1 >>> 0;
882
+ },
883
+ __wbg_set_blend_1a801617945f7945: function(arg0, arg1) {
884
+ arg0.blend = arg1;
885
+ },
886
+ __wbg_set_buffer_1548ae88a9188037: function(arg0, arg1) {
887
+ arg0.buffer = arg1;
888
+ },
889
+ __wbg_set_buffer_8d0ac64ad20dfc84: function(arg0, arg1) {
890
+ arg0.buffer = arg1;
891
+ },
892
+ __wbg_set_buffers_5d0e0c50791f710e: function(arg0, arg1, arg2) {
893
+ arg0.buffers = getArrayJsValueViewFromWasm0(arg1, arg2);
894
+ },
895
+ __wbg_set_bytes_per_row_c28583f0063160f1: function(arg0, arg1) {
896
+ arg0.bytesPerRow = arg1 >>> 0;
897
+ },
898
+ __wbg_set_clear_value_gpu_color_dict_a9f763e8372ac1de: function(arg0, arg1) {
899
+ arg0.clearValue = arg1;
900
+ },
901
+ __wbg_set_code_5d5b0b9e2fd0dca7: function(arg0, arg1, arg2) {
902
+ arg0.code = getStringFromWasm0(arg1, arg2);
903
+ },
904
+ __wbg_set_color_8ecace4011f47d2e: function(arg0, arg1) {
905
+ arg0.color = arg1;
906
+ },
907
+ __wbg_set_color_attachments_622fe2d5997fda7a: function(arg0, arg1, arg2) {
908
+ arg0.colorAttachments = getArrayJsValueViewFromWasm0(arg1, arg2);
909
+ },
910
+ __wbg_set_compare_080c9e492ff36990: function(arg0, arg1) {
911
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
912
+ },
913
+ __wbg_set_compare_817cf3695599eaa6: function(arg0, arg1) {
914
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
915
+ },
916
+ __wbg_set_compute_bc754d9e37f6e4c9: function(arg0, arg1) {
917
+ arg0.compute = arg1;
918
+ },
919
+ __wbg_set_count_8ff0c9474e39a849: function(arg0, arg1) {
920
+ arg0.count = arg1 >>> 0;
921
+ },
922
+ __wbg_set_cull_mode_85d2b4ab0ce3a564: function(arg0, arg1) {
923
+ arg0.cullMode = __wbindgen_enum_GpuCullMode[arg1];
924
+ },
925
+ __wbg_set_depth_bias_95abf479cae3f3cd: function(arg0, arg1) {
926
+ arg0.depthBias = arg1;
927
+ },
928
+ __wbg_set_depth_bias_clamp_ba3d0b8348151350: function(arg0, arg1) {
929
+ arg0.depthBiasClamp = arg1;
930
+ },
931
+ __wbg_set_depth_bias_slope_scale_6b2584d93f5b9cd2: function(arg0, arg1) {
932
+ arg0.depthBiasSlopeScale = arg1;
933
+ },
934
+ __wbg_set_depth_clear_value_e30a4c754c6b3b26: function(arg0, arg1) {
935
+ arg0.depthClearValue = arg1;
936
+ },
937
+ __wbg_set_depth_compare_a90de4e3714397ab: function(arg0, arg1) {
938
+ arg0.depthCompare = __wbindgen_enum_GpuCompareFunction[arg1];
939
+ },
940
+ __wbg_set_depth_fail_op_b5c64541d1b6b482: function(arg0, arg1) {
941
+ arg0.depthFailOp = __wbindgen_enum_GpuStencilOperation[arg1];
942
+ },
943
+ __wbg_set_depth_load_op_932888016d762d3e: function(arg0, arg1) {
944
+ arg0.depthLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
945
+ },
946
+ __wbg_set_depth_or_array_layers_e2f074a0284e4806: function(arg0, arg1) {
947
+ arg0.depthOrArrayLayers = arg1 >>> 0;
948
+ },
949
+ __wbg_set_depth_read_only_be790175a1c2db9a: function(arg0, arg1) {
950
+ arg0.depthReadOnly = arg1 !== 0;
951
+ },
952
+ __wbg_set_depth_stencil_attachment_54a8922f5fbe08bf: function(arg0, arg1) {
953
+ arg0.depthStencilAttachment = arg1;
954
+ },
955
+ __wbg_set_depth_stencil_b7cffc59ad4da529: function(arg0, arg1) {
956
+ arg0.depthStencil = arg1;
957
+ },
958
+ __wbg_set_depth_store_op_9054814f164ab55d: function(arg0, arg1) {
959
+ arg0.depthStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
960
+ },
961
+ __wbg_set_depth_write_enabled_31a821ee1fb3b0b3: function(arg0, arg1) {
962
+ arg0.depthWriteEnabled = arg1 !== 0;
963
+ },
964
+ __wbg_set_device_210484a77b675c9c: function(arg0, arg1) {
965
+ arg0.device = arg1;
966
+ },
967
+ __wbg_set_dimension_3da9d03131a9f446: function(arg0, arg1) {
968
+ arg0.dimension = __wbindgen_enum_GpuTextureDimension[arg1];
969
+ },
970
+ __wbg_set_dimension_56332450afa3e0c0: function(arg0, arg1) {
971
+ arg0.dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
972
+ },
973
+ __wbg_set_dst_factor_865ba9aaf187890c: function(arg0, arg1) {
974
+ arg0.dstFactor = __wbindgen_enum_GpuBlendFactor[arg1];
975
+ },
976
+ __wbg_set_end_of_pass_write_index_8f164f9e60d4ad16: function(arg0, arg1) {
977
+ arg0.endOfPassWriteIndex = arg1 >>> 0;
978
+ },
979
+ __wbg_set_end_of_pass_write_index_b54a8e3802b9ae0d: function(arg0, arg1) {
980
+ arg0.endOfPassWriteIndex = arg1 >>> 0;
981
+ },
982
+ __wbg_set_entries_6f866302103b81e9: function(arg0, arg1, arg2) {
983
+ arg0.entries = getArrayJsValueViewFromWasm0(arg1, arg2);
984
+ },
985
+ __wbg_set_entries_f26b77ab9548e906: function(arg0, arg1, arg2) {
986
+ arg0.entries = getArrayJsValueViewFromWasm0(arg1, arg2);
987
+ },
988
+ __wbg_set_entry_point_71cef95c137b5774: function(arg0, arg1, arg2) {
989
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
990
+ },
991
+ __wbg_set_entry_point_ac8db535971761fe: function(arg0, arg1, arg2) {
992
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
993
+ },
994
+ __wbg_set_entry_point_b70f98f5025a114d: function(arg0, arg1, arg2) {
995
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
996
+ },
997
+ __wbg_set_external_texture_7f966c604c4f8098: function(arg0, arg1) {
998
+ arg0.externalTexture = arg1;
999
+ },
1000
+ __wbg_set_fail_op_d59d0187e4111dfe: function(arg0, arg1) {
1001
+ arg0.failOp = __wbindgen_enum_GpuStencilOperation[arg1];
1002
+ },
1003
+ __wbg_set_format_23f7f32549751d43: function(arg0, arg1) {
1004
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1005
+ },
1006
+ __wbg_set_format_283dca56552f07a3: function(arg0, arg1) {
1007
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1008
+ },
1009
+ __wbg_set_format_5080a858117ad2c1: function(arg0, arg1) {
1010
+ arg0.format = __wbindgen_enum_GpuVertexFormat[arg1];
1011
+ },
1012
+ __wbg_set_format_66735b94bd868ba2: function(arg0, arg1) {
1013
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1014
+ },
1015
+ __wbg_set_format_7f2bdbfb101b1ae1: function(arg0, arg1) {
1016
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1017
+ },
1018
+ __wbg_set_format_92732ea75d3b79f5: function(arg0, arg1) {
1019
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1020
+ },
1021
+ __wbg_set_format_f009e603f7d4c28e: function(arg0, arg1) {
1022
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1023
+ },
1024
+ __wbg_set_fragment_d2b0ec97d7cf8d47: function(arg0, arg1) {
1025
+ arg0.fragment = arg1;
1026
+ },
1027
+ __wbg_set_front_face_d3f8a2e07e7b25dd: function(arg0, arg1) {
1028
+ arg0.frontFace = __wbindgen_enum_GpuFrontFace[arg1];
1029
+ },
1030
+ __wbg_set_g_b527ee8a9bed553d: function(arg0, arg1) {
1031
+ arg0.g = arg1;
1032
+ },
1033
+ __wbg_set_has_dynamic_offset_0c72ffa900c5a269: function(arg0, arg1) {
1034
+ arg0.hasDynamicOffset = arg1 !== 0;
1035
+ },
1036
+ __wbg_set_height_c9789c1c77eaedff: function(arg0, arg1) {
1037
+ arg0.height = arg1 >>> 0;
1038
+ },
1039
+ __wbg_set_height_f6619158e5735877: function(arg0, arg1) {
1040
+ arg0.height = arg1 >>> 0;
1041
+ },
1042
+ __wbg_set_height_fde391767df1ce27: function(arg0, arg1) {
1043
+ arg0.height = arg1 >>> 0;
1044
+ },
1045
+ __wbg_set_label_09e2da5f8522dbe8: function(arg0, arg1, arg2) {
1046
+ arg0.label = getStringFromWasm0(arg1, arg2);
1047
+ },
1048
+ __wbg_set_label_17202740051e9722: function(arg0, arg1, arg2) {
1049
+ arg0.label = getStringFromWasm0(arg1, arg2);
1050
+ },
1051
+ __wbg_set_label_17b4858e1eef23dd: function(arg0, arg1, arg2) {
1052
+ arg0.label = getStringFromWasm0(arg1, arg2);
1053
+ },
1054
+ __wbg_set_label_2fefb39c0e0dbbe8: function(arg0, arg1, arg2) {
1055
+ arg0.label = getStringFromWasm0(arg1, arg2);
1056
+ },
1057
+ __wbg_set_label_3cb2322e6f6db14c: function(arg0, arg1, arg2) {
1058
+ arg0.label = getStringFromWasm0(arg1, arg2);
1059
+ },
1060
+ __wbg_set_label_3f2ccaafef5ff7c9: function(arg0, arg1, arg2) {
1061
+ arg0.label = getStringFromWasm0(arg1, arg2);
1062
+ },
1063
+ __wbg_set_label_612add98a4398f92: function(arg0, arg1, arg2) {
1064
+ arg0.label = getStringFromWasm0(arg1, arg2);
1065
+ },
1066
+ __wbg_set_label_70a09ee68d6b1b26: function(arg0, arg1, arg2) {
1067
+ arg0.label = getStringFromWasm0(arg1, arg2);
1068
+ },
1069
+ __wbg_set_label_92cd3811e96b487c: function(arg0, arg1, arg2) {
1070
+ arg0.label = getStringFromWasm0(arg1, arg2);
1071
+ },
1072
+ __wbg_set_label_9c2a186152427ee0: function(arg0, arg1, arg2) {
1073
+ arg0.label = getStringFromWasm0(arg1, arg2);
1074
+ },
1075
+ __wbg_set_label_c3eaf136aa464cba: function(arg0, arg1, arg2) {
1076
+ arg0.label = getStringFromWasm0(arg1, arg2);
1077
+ },
1078
+ __wbg_set_label_c7987704d29f284b: function(arg0, arg1, arg2) {
1079
+ arg0.label = getStringFromWasm0(arg1, arg2);
1080
+ },
1081
+ __wbg_set_label_cfe64bca8945ee30: function(arg0, arg1, arg2) {
1082
+ arg0.label = getStringFromWasm0(arg1, arg2);
1083
+ },
1084
+ __wbg_set_label_e02179cf97e95763: function(arg0, arg1, arg2) {
1085
+ arg0.label = getStringFromWasm0(arg1, arg2);
1086
+ },
1087
+ __wbg_set_label_ee172cd5f6a96961: function(arg0, arg1, arg2) {
1088
+ arg0.label = getStringFromWasm0(arg1, arg2);
1089
+ },
1090
+ __wbg_set_layout_454e3a091b390cd4: function(arg0, arg1) {
1091
+ arg0.layout = arg1;
1092
+ },
1093
+ __wbg_set_layout_4b5d5b12fbb72a76: function(arg0, arg1) {
1094
+ arg0.layout = arg1;
1095
+ },
1096
+ __wbg_set_layout_75dc1ca3f2421cff: function(arg0, arg1) {
1097
+ arg0.layout = arg1;
1098
+ },
1099
+ __wbg_set_layout_gpu_auto_layout_mode_06a2b95af1043098: function(arg0, arg1) {
1100
+ arg0.layout = __wbindgen_enum_GpuAutoLayoutMode[arg1];
1101
+ },
1102
+ __wbg_set_layout_gpu_auto_layout_mode_ee432e515c357fa8: function(arg0, arg1) {
1103
+ arg0.layout = __wbindgen_enum_GpuAutoLayoutMode[arg1];
1104
+ },
1105
+ __wbg_set_load_op_c56b1269acc2d51f: function(arg0, arg1) {
1106
+ arg0.loadOp = __wbindgen_enum_GpuLoadOp[arg1];
1107
+ },
1108
+ __wbg_set_lod_max_clamp_db24179f67f3aa31: function(arg0, arg1) {
1109
+ arg0.lodMaxClamp = arg1;
1110
+ },
1111
+ __wbg_set_lod_min_clamp_2bbce566e9fefa04: function(arg0, arg1) {
1112
+ arg0.lodMinClamp = arg1;
1113
+ },
1114
+ __wbg_set_mag_filter_db8e6b42d4f8846d: function(arg0, arg1) {
1115
+ arg0.magFilter = __wbindgen_enum_GpuFilterMode[arg1];
1116
+ },
1117
+ __wbg_set_mapped_at_creation_3f320fef6761b02c: function(arg0, arg1) {
1118
+ arg0.mappedAtCreation = arg1 !== 0;
1119
+ },
1120
+ __wbg_set_mask_c1079e551ec360dc: function(arg0, arg1) {
1121
+ arg0.mask = arg1 >>> 0;
1122
+ },
1123
+ __wbg_set_max_anisotropy_84749fdcec362dc4: function(arg0, arg1) {
1124
+ arg0.maxAnisotropy = arg1;
1125
+ },
1126
+ __wbg_set_min_binding_size_f64_897e3cd4496ddec9: function(arg0, arg1) {
1127
+ arg0.minBindingSize = arg1;
1128
+ },
1129
+ __wbg_set_min_filter_d435bbfc5a637757: function(arg0, arg1) {
1130
+ arg0.minFilter = __wbindgen_enum_GpuFilterMode[arg1];
1131
+ },
1132
+ __wbg_set_mip_level_count_047936c630acee7b: function(arg0, arg1) {
1133
+ arg0.mipLevelCount = arg1 >>> 0;
1134
+ },
1135
+ __wbg_set_mip_level_count_44bc46a1ae6f6daa: function(arg0, arg1) {
1136
+ arg0.mipLevelCount = arg1 >>> 0;
1137
+ },
1138
+ __wbg_set_mip_level_f3745730372683d5: function(arg0, arg1) {
1139
+ arg0.mipLevel = arg1 >>> 0;
1140
+ },
1141
+ __wbg_set_mipmap_filter_62fb49a84b0747ff: function(arg0, arg1) {
1142
+ arg0.mipmapFilter = __wbindgen_enum_GpuMipmapFilterMode[arg1];
1143
+ },
1144
+ __wbg_set_mode_7edfbc344ef9c650: function(arg0, arg1) {
1145
+ arg0.mode = __wbindgen_enum_GpuCanvasToneMappingMode[arg1];
1146
+ },
1147
+ __wbg_set_module_392eeaa269f203b0: function(arg0, arg1) {
1148
+ arg0.module = arg1;
1149
+ },
1150
+ __wbg_set_module_715d37652c4998ec: function(arg0, arg1) {
1151
+ arg0.module = arg1;
1152
+ },
1153
+ __wbg_set_module_c9946af218d23b53: function(arg0, arg1) {
1154
+ arg0.module = arg1;
1155
+ },
1156
+ __wbg_set_multisample_ff72a7a5456cbeb7: function(arg0, arg1) {
1157
+ arg0.multisample = arg1;
1158
+ },
1159
+ __wbg_set_multisampled_039f032dc4b67367: function(arg0, arg1) {
1160
+ arg0.multisampled = arg1 !== 0;
1161
+ },
1162
+ __wbg_set_offset_f64_127e8a0aa5c5485a: function(arg0, arg1) {
1163
+ arg0.offset = arg1;
1164
+ },
1165
+ __wbg_set_offset_f64_457756429ede426d: function(arg0, arg1) {
1166
+ arg0.offset = arg1;
1167
+ },
1168
+ __wbg_set_offset_f64_a903425d5a8e5815: function(arg0, arg1) {
1169
+ arg0.offset = arg1;
1170
+ },
1171
+ __wbg_set_operation_00a77386523b88f9: function(arg0, arg1) {
1172
+ arg0.operation = __wbindgen_enum_GpuBlendOperation[arg1];
1173
+ },
1174
+ __wbg_set_origin_gpu_origin_3d_dict_0619d4860adb4eb6: function(arg0, arg1) {
1175
+ arg0.origin = arg1;
1176
+ },
1177
+ __wbg_set_pass_op_3cf10feb3d76ab97: function(arg0, arg1) {
1178
+ arg0.passOp = __wbindgen_enum_GpuStencilOperation[arg1];
1179
+ },
1180
+ __wbg_set_power_preference_b42d00a8facfbade: function(arg0, arg1) {
1181
+ arg0.powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
1182
+ },
1183
+ __wbg_set_primitive_e796cf76f0ff89f3: function(arg0, arg1) {
1184
+ arg0.primitive = arg1;
1185
+ },
1186
+ __wbg_set_query_set_f030702f1b69199f: function(arg0, arg1) {
1187
+ arg0.querySet = arg1;
1188
+ },
1189
+ __wbg_set_query_set_f9a94586851fdba2: function(arg0, arg1) {
1190
+ arg0.querySet = arg1;
1191
+ },
1192
+ __wbg_set_r_6ece4d74af63364f: function(arg0, arg1) {
1193
+ arg0.r = arg1;
1194
+ },
1195
+ __wbg_set_required_features_bbab71414c45e621: function(arg0, arg1, arg2) {
1196
+ arg0.requiredFeatures = getArrayJsValueViewFromWasm0(arg1, arg2);
1197
+ },
1198
+ __wbg_set_required_limits_837f62d865e7cfac: function(arg0, arg1) {
1199
+ arg0.requiredLimits = arg1;
1200
+ },
1201
+ __wbg_set_resolve_target_gpu_texture_view_e4c1e3bbb8c27d87: function(arg0, arg1) {
1202
+ arg0.resolveTarget = arg1;
1203
+ },
1204
+ __wbg_set_resource_8fd8658b30d86ecf: function(arg0, arg1) {
1205
+ arg0.resource = arg1;
1206
+ },
1207
+ __wbg_set_resource_gpu_buffer_binding_33099b25da65b610: function(arg0, arg1) {
1208
+ arg0.resource = arg1;
1209
+ },
1210
+ __wbg_set_resource_gpu_texture_view_4cffe7bc7c8e5cbe: function(arg0, arg1) {
1211
+ arg0.resource = arg1;
1212
+ },
1213
+ __wbg_set_rows_per_image_c6d50d227e634379: function(arg0, arg1) {
1214
+ arg0.rowsPerImage = arg1 >>> 0;
1215
+ },
1216
+ __wbg_set_sample_count_481c255a12054e1d: function(arg0, arg1) {
1217
+ arg0.sampleCount = arg1 >>> 0;
1218
+ },
1219
+ __wbg_set_sample_type_ebc5fcd029513bda: function(arg0, arg1) {
1220
+ arg0.sampleType = __wbindgen_enum_GpuTextureSampleType[arg1];
1221
+ },
1222
+ __wbg_set_sampler_89cb4a7efcfc6005: function(arg0, arg1) {
1223
+ arg0.sampler = arg1;
1224
+ },
1225
+ __wbg_set_shader_location_3fb9f6a012eba494: function(arg0, arg1) {
1226
+ arg0.shaderLocation = arg1 >>> 0;
1227
+ },
1228
+ __wbg_set_size_f64_2f591b0654540477: function(arg0, arg1) {
1229
+ arg0.size = arg1;
1230
+ },
1231
+ __wbg_set_size_f64_e844c985b8f95261: function(arg0, arg1) {
1232
+ arg0.size = arg1;
1233
+ },
1234
+ __wbg_set_size_gpu_extent_3d_dict_adf57388ab1d4f18: function(arg0, arg1) {
1235
+ arg0.size = arg1;
1236
+ },
1237
+ __wbg_set_src_factor_6f2c9ec8e4d3d979: function(arg0, arg1) {
1238
+ arg0.srcFactor = __wbindgen_enum_GpuBlendFactor[arg1];
1239
+ },
1240
+ __wbg_set_stencil_back_c54d0443b8b6a957: function(arg0, arg1) {
1241
+ arg0.stencilBack = arg1;
1242
+ },
1243
+ __wbg_set_stencil_clear_value_a321b0e045bfd8c2: function(arg0, arg1) {
1244
+ arg0.stencilClearValue = arg1 >>> 0;
1245
+ },
1246
+ __wbg_set_stencil_front_3ff3f8385852efff: function(arg0, arg1) {
1247
+ arg0.stencilFront = arg1;
1248
+ },
1249
+ __wbg_set_stencil_load_op_37d20deccb26a0f1: function(arg0, arg1) {
1250
+ arg0.stencilLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
1251
+ },
1252
+ __wbg_set_stencil_read_mask_021ef4271b24352c: function(arg0, arg1) {
1253
+ arg0.stencilReadMask = arg1 >>> 0;
1254
+ },
1255
+ __wbg_set_stencil_read_only_75fe66a2356d6e92: function(arg0, arg1) {
1256
+ arg0.stencilReadOnly = arg1 !== 0;
1257
+ },
1258
+ __wbg_set_stencil_store_op_501f91638dd386e6: function(arg0, arg1) {
1259
+ arg0.stencilStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
1260
+ },
1261
+ __wbg_set_stencil_write_mask_ec1c12237e094bdd: function(arg0, arg1) {
1262
+ arg0.stencilWriteMask = arg1 >>> 0;
1263
+ },
1264
+ __wbg_set_step_mode_3cbbdeba1e5dfd62: function(arg0, arg1) {
1265
+ arg0.stepMode = __wbindgen_enum_GpuVertexStepMode[arg1];
1266
+ },
1267
+ __wbg_set_storage_texture_786aea7c5773b6c1: function(arg0, arg1) {
1268
+ arg0.storageTexture = arg1;
1269
+ },
1270
+ __wbg_set_store_op_678f33376d741711: function(arg0, arg1) {
1271
+ arg0.storeOp = __wbindgen_enum_GpuStoreOp[arg1];
1272
+ },
1273
+ __wbg_set_strip_index_format_70313df755145d5e: function(arg0, arg1) {
1274
+ arg0.stripIndexFormat = __wbindgen_enum_GpuIndexFormat[arg1];
1275
+ },
1276
+ __wbg_set_targets_674b33931e512fb1: function(arg0, arg1, arg2) {
1277
+ arg0.targets = getArrayJsValueViewFromWasm0(arg1, arg2);
1278
+ },
1279
+ __wbg_set_texture_95f2bfdf7767e76f: function(arg0, arg1) {
1280
+ arg0.texture = arg1;
1281
+ },
1282
+ __wbg_set_texture_a33be3fe02ac6264: function(arg0, arg1) {
1283
+ arg0.texture = arg1;
1284
+ },
1285
+ __wbg_set_timestamp_writes_5f240bbaad97fcaf: function(arg0, arg1) {
1286
+ arg0.timestampWrites = arg1;
1287
+ },
1288
+ __wbg_set_timestamp_writes_de6a09f299b71b76: function(arg0, arg1) {
1289
+ arg0.timestampWrites = arg1;
1290
+ },
1291
+ __wbg_set_tone_mapping_320c1aad31db2e7f: function(arg0, arg1) {
1292
+ arg0.toneMapping = arg1;
1293
+ },
1294
+ __wbg_set_topology_b92cfe523bd9653b: function(arg0, arg1) {
1295
+ arg0.topology = __wbindgen_enum_GpuPrimitiveTopology[arg1];
1296
+ },
1297
+ __wbg_set_type_43e0092f16775979: function(arg0, arg1) {
1298
+ arg0.type = __wbindgen_enum_GpuSamplerBindingType[arg1];
1299
+ },
1300
+ __wbg_set_type_79cec55caf4cdb6d: function(arg0, arg1) {
1301
+ arg0.type = __wbindgen_enum_GpuBufferBindingType[arg1];
1302
+ },
1303
+ __wbg_set_unclipped_depth_32b7caf29fa5633d: function(arg0, arg1) {
1304
+ arg0.unclippedDepth = arg1 !== 0;
1305
+ },
1306
+ __wbg_set_usage_1ee33d98267e787d: function(arg0, arg1) {
1307
+ arg0.usage = arg1 >>> 0;
1308
+ },
1309
+ __wbg_set_usage_2365e2704b1fdb10: function(arg0, arg1) {
1310
+ arg0.usage = arg1 >>> 0;
1311
+ },
1312
+ __wbg_set_usage_d53ee6f0c7aedbfa: function(arg0, arg1) {
1313
+ arg0.usage = arg1 >>> 0;
1314
+ },
1315
+ __wbg_set_usage_f3e34822998d2147: function(arg0, arg1) {
1316
+ arg0.usage = arg1 >>> 0;
1317
+ },
1318
+ __wbg_set_vertex_77ed7a1229239b5a: function(arg0, arg1) {
1319
+ arg0.vertex = arg1;
1320
+ },
1321
+ __wbg_set_view_dimension_893e2d16561e56e8: function(arg0, arg1) {
1322
+ arg0.viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1323
+ },
1324
+ __wbg_set_view_dimension_f2c5fe4bf927c3fe: function(arg0, arg1) {
1325
+ arg0.viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1326
+ },
1327
+ __wbg_set_view_formats_427069064d8b7139: function(arg0, arg1, arg2) {
1328
+ arg0.viewFormats = getArrayJsValueViewFromWasm0(arg1, arg2);
1329
+ },
1330
+ __wbg_set_view_formats_9c2f01a6f3b365c7: function(arg0, arg1, arg2) {
1331
+ arg0.viewFormats = getArrayJsValueViewFromWasm0(arg1, arg2);
1332
+ },
1333
+ __wbg_set_view_gpu_texture_view_35f4655788535c4d: function(arg0, arg1) {
1334
+ arg0.view = arg1;
1335
+ },
1336
+ __wbg_set_view_gpu_texture_view_a532c825c52042c0: function(arg0, arg1) {
1337
+ arg0.view = arg1;
1338
+ },
1339
+ __wbg_set_visibility_d8a6821789538c25: function(arg0, arg1) {
1340
+ arg0.visibility = arg1 >>> 0;
1341
+ },
1342
+ __wbg_set_width_0ca908d167690992: function(arg0, arg1) {
1343
+ arg0.width = arg1 >>> 0;
1344
+ },
1345
+ __wbg_set_width_b0e1267db4b196b5: function(arg0, arg1) {
1346
+ arg0.width = arg1 >>> 0;
1347
+ },
1348
+ __wbg_set_width_b20525f5f4df4eb8: function(arg0, arg1) {
1349
+ arg0.width = arg1 >>> 0;
1350
+ },
1351
+ __wbg_set_write_mask_42d89f182ade6b2d: function(arg0, arg1) {
1352
+ arg0.writeMask = arg1 >>> 0;
1353
+ },
1354
+ __wbg_set_x_f470b03dd54724cd: function(arg0, arg1) {
1355
+ arg0.x = arg1 >>> 0;
1356
+ },
1357
+ __wbg_set_y_4c44eb40ebca5bfc: function(arg0, arg1) {
1358
+ arg0.y = arg1 >>> 0;
1359
+ },
1360
+ __wbg_set_z_2e6820ef0f5821ed: function(arg0, arg1) {
1361
+ arg0.z = arg1 >>> 0;
1362
+ },
1363
+ __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
1364
+ const ret = typeof global === 'undefined' ? null : global;
1365
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1366
+ },
1367
+ __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
1368
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1369
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1370
+ },
1371
+ __wbg_static_accessor_SELF_0b583911f537483a: function() {
1372
+ const ret = typeof self === 'undefined' ? null : self;
1373
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1374
+ },
1375
+ __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
1376
+ const ret = typeof window === 'undefined' ? null : window;
1377
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1378
+ },
1379
+ __wbg_subarray_002b94d5e13d1411: function(arg0, arg1, arg2) {
1380
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1381
+ return ret;
1382
+ },
1383
+ __wbg_submit_077c85cc28e36892: function(arg0, arg1, arg2) {
1384
+ arg0.submit(getArrayJsValueViewFromWasm0(arg1, arg2));
1385
+ },
1386
+ __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
1387
+ const ret = arg0.then(arg1, arg2);
1388
+ return ret;
1389
+ },
1390
+ __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
1391
+ const ret = arg0.then(arg1);
1392
+ return ret;
1393
+ },
1394
+ __wbg_unconfigure_835307f58dc68d80: function(arg0) {
1395
+ arg0.unconfigure();
1396
+ },
1397
+ __wbg_versions_276b2795b1c6a219: function(arg0) {
1398
+ const ret = arg0.versions;
1399
+ return ret;
1400
+ },
1401
+ __wbg_warn_13abc63e0d4b3527: function(arg0) {
1402
+ console.warn(arg0);
1403
+ },
1404
+ __wbg_width_3d0dce3d9892e35e: function(arg0) {
1405
+ const ret = arg0.width;
1406
+ return ret;
1407
+ },
1408
+ __wbg_writeBuffer_f4bb3f54adfe1330: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1409
+ arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
1410
+ }, arguments); },
1411
+ __wbg_writeTexture_30e592e8c061c3d9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1412
+ arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
1413
+ }, arguments); },
1414
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1415
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1045, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1416
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4851abff709ee24b);
1417
+ return ret;
1418
+ },
1419
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
1420
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 426, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1421
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632);
1422
+ return ret;
1423
+ },
1424
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
1425
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 426, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1426
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632_27);
1427
+ return ret;
1428
+ },
1429
+ __wbindgen_generic_0000000000000004: function(arg0, arg1) {
1430
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 426, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1431
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632_28);
1432
+ return ret;
1433
+ },
1434
+ __wbindgen_generic_0000000000000005: function(arg0) {
1435
+ // Cast intrinsic for `F64 -> Externref`.
1436
+ const ret = arg0;
1437
+ return ret;
1438
+ },
1439
+ __wbindgen_generic_0000000000000006: function(arg0, arg1) {
1440
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1441
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1442
+ return ret;
1443
+ },
1444
+ __wbindgen_generic_0000000000000007: function(arg0, arg1) {
1445
+ // Cast intrinsic for `Ref(String) -> Externref`.
1446
+ const ret = getStringFromWasm0(arg0, arg1);
1447
+ return ret;
1448
+ },
1449
+ __wbindgen_init_externref_table: function() {
1450
+ const table = wasm.__wbindgen_externrefs;
1451
+ const offset = table.grow(4);
1452
+ table.set(0, undefined);
1453
+ table.set(offset + 0, undefined);
1454
+ table.set(offset + 1, null);
1455
+ table.set(offset + 2, true);
1456
+ table.set(offset + 3, false);
1457
+ },
1458
+ };
1459
+ return {
1460
+ __proto__: null,
1461
+ "./canvist_canvas_wasm_bg.js": import0,
1462
+ };
1463
+ }
1464
+
1465
+ function wasm_bindgen__convert__closures_____invoke__h4851abff709ee24b(arg0, arg1, arg2) {
1466
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4851abff709ee24b(arg0, arg1, arg2);
1467
+ if (ret[1]) {
1468
+ throw takeFromExternrefTable0(ret[0]);
1469
+ }
1470
+ }
1471
+
1472
+ function wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632(arg0, arg1, arg2) {
1473
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632(arg0, arg1, arg2);
1474
+ if (ret[1]) {
1475
+ throw takeFromExternrefTable0(ret[0]);
1476
+ }
1477
+ }
1478
+
1479
+ function wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632_27(arg0, arg1, arg2) {
1480
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632_27(arg0, arg1, arg2);
1481
+ if (ret[1]) {
1482
+ throw takeFromExternrefTable0(ret[0]);
1483
+ }
1484
+ }
1485
+
1486
+ function wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632_28(arg0, arg1, arg2) {
1487
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h33ea48098cd73632_28(arg0, arg1, arg2);
1488
+ if (ret[1]) {
1489
+ throw takeFromExternrefTable0(ret[0]);
1490
+ }
1491
+ }
1492
+
1493
+ function wasm_bindgen__convert__closures_____invoke__h570d8909b223014a(arg0, arg1, arg2, arg3) {
1494
+ wasm.wasm_bindgen__convert__closures_____invoke__h570d8909b223014a(arg0, arg1, arg2, arg3);
1495
+ }
1496
+
1497
+
1498
+ const __wbindgen_enum_GpuAddressMode = ["clamp-to-edge", "repeat", "mirror-repeat"];
1499
+
1500
+
1501
+ const __wbindgen_enum_GpuAutoLayoutMode = ["auto"];
1502
+
1503
+
1504
+ const __wbindgen_enum_GpuBlendFactor = ["zero", "one", "src", "one-minus-src", "src-alpha", "one-minus-src-alpha", "dst", "one-minus-dst", "dst-alpha", "one-minus-dst-alpha", "src-alpha-saturated", "constant", "one-minus-constant", "src1", "one-minus-src1", "src1-alpha", "one-minus-src1-alpha"];
1505
+
1506
+
1507
+ const __wbindgen_enum_GpuBlendOperation = ["add", "subtract", "reverse-subtract", "min", "max"];
1508
+
1509
+
1510
+ const __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
1511
+
1512
+
1513
+ const __wbindgen_enum_GpuCanvasAlphaMode = ["opaque", "premultiplied"];
1514
+
1515
+
1516
+ const __wbindgen_enum_GpuCanvasToneMappingMode = ["standard", "extended"];
1517
+
1518
+
1519
+ const __wbindgen_enum_GpuCompareFunction = ["never", "less", "equal", "less-equal", "greater", "not-equal", "greater-equal", "always"];
1520
+
1521
+
1522
+ const __wbindgen_enum_GpuCullMode = ["none", "front", "back"];
1523
+
1524
+
1525
+ const __wbindgen_enum_GpuFilterMode = ["nearest", "linear"];
1526
+
1527
+
1528
+ const __wbindgen_enum_GpuFrontFace = ["ccw", "cw"];
1529
+
1530
+
1531
+ const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"];
1532
+
1533
+
1534
+ const __wbindgen_enum_GpuLoadOp = ["load", "clear"];
1535
+
1536
+
1537
+ const __wbindgen_enum_GpuMipmapFilterMode = ["nearest", "linear"];
1538
+
1539
+
1540
+ const __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
1541
+
1542
+
1543
+ const __wbindgen_enum_GpuPrimitiveTopology = ["point-list", "line-list", "line-strip", "triangle-list", "triangle-strip"];
1544
+
1545
+
1546
+ const __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
1547
+
1548
+
1549
+ const __wbindgen_enum_GpuStencilOperation = ["keep", "zero", "replace", "invert", "increment-clamp", "decrement-clamp", "increment-wrap", "decrement-wrap"];
1550
+
1551
+
1552
+ const __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
1553
+
1554
+
1555
+ const __wbindgen_enum_GpuStoreOp = ["store", "discard"];
1556
+
1557
+
1558
+ const __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
1559
+
1560
+
1561
+ const __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
1562
+
1563
+
1564
+ const __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16unorm", "r16snorm", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16unorm", "rg16snorm", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16unorm", "rgba16snorm", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
1565
+
1566
+
1567
+ const __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "depth", "sint", "uint"];
1568
+
1569
+
1570
+ const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
1571
+
1572
+
1573
+ const __wbindgen_enum_GpuVertexFormat = ["uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra"];
1574
+
1575
+
1576
+ const __wbindgen_enum_GpuVertexStepMode = ["vertex", "instance"];
1577
+ const CanvasAppFinalization = (typeof FinalizationRegistry === 'undefined')
1578
+ ? { register: () => {}, unregister: () => {} }
1579
+ : new FinalizationRegistry(ptr => wasm.__wbg_canvasapp_free(ptr, 1));
1580
+
1581
+ function addToExternrefTable0(obj) {
1582
+ const idx = wasm.__externref_table_alloc();
1583
+ wasm.__wbindgen_externrefs.set(idx, obj);
1584
+ return idx;
1585
+ }
1586
+
1587
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1588
+ ? { register: () => {}, unregister: () => {} }
1589
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
1590
+
1591
+ function debugString(val) {
1592
+ // primitive types
1593
+ const type = typeof val;
1594
+ if (type == 'number' || type == 'boolean' || val == null) {
1595
+ return `${val}`;
1596
+ }
1597
+ if (type == 'string') {
1598
+ return `"${val}"`;
1599
+ }
1600
+ if (type == 'symbol') {
1601
+ const description = val.description;
1602
+ if (description == null) {
1603
+ return 'Symbol';
1604
+ } else {
1605
+ return `Symbol(${description})`;
1606
+ }
1607
+ }
1608
+ if (type == 'function') {
1609
+ const name = val.name;
1610
+ if (typeof name == 'string' && name.length > 0) {
1611
+ return `Function(${name})`;
1612
+ } else {
1613
+ return 'Function';
1614
+ }
1615
+ }
1616
+ // objects
1617
+ if (Array.isArray(val)) {
1618
+ const length = val.length;
1619
+ let debug = '[';
1620
+ if (length > 0) {
1621
+ debug += debugString(val[0]);
1622
+ }
1623
+ for(let i = 1; i < length; i++) {
1624
+ debug += ', ' + debugString(val[i]);
1625
+ }
1626
+ debug += ']';
1627
+ return debug;
1628
+ }
1629
+ // Test for built-in
1630
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1631
+ let className;
1632
+ if (builtInMatches && builtInMatches.length > 1) {
1633
+ className = builtInMatches[1];
1634
+ } else {
1635
+ // Failed to match the standard '[object ClassName]'
1636
+ return toString.call(val);
1637
+ }
1638
+ if (className == 'Object') {
1639
+ // we're a user defined class or Object
1640
+ // JSON.stringify avoids problems with cycles, and is generally much
1641
+ // easier than looping through ownProperties of `val`.
1642
+ try {
1643
+ return 'Object(' + JSON.stringify(val) + ')';
1644
+ } catch (_) {
1645
+ return 'Object';
1646
+ }
1647
+ }
1648
+ // errors
1649
+ if (val instanceof Error) {
1650
+ return `${val.name}: ${val.message}\n${val.stack}`;
1651
+ }
1652
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1653
+ return className;
1654
+ }
1655
+
1656
+ function getArrayJsValueFromWasm0(ptr, len) {
1657
+ ptr = ptr >>> 0;
1658
+ const mem = getDataViewMemory0();
1659
+ const result = [];
1660
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
1661
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
1662
+ }
1663
+ wasm.__externref_drop_slice(ptr, len);
1664
+ return result;
1665
+ }
1666
+
1667
+ function getArrayJsValueViewFromWasm0(ptr, len) {
1668
+ ptr = ptr >>> 0;
1669
+ const mem = getDataViewMemory0();
1670
+ const result = [];
1671
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
1672
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
1673
+ }
1674
+ return result;
1675
+ }
1676
+
1677
+ function getArrayU32FromWasm0(ptr, len) {
1678
+ ptr = ptr >>> 0;
1679
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
1680
+ }
1681
+
1682
+ function getArrayU8FromWasm0(ptr, len) {
1683
+ ptr = ptr >>> 0;
1684
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1685
+ }
1686
+
1687
+ function getClampedArrayU8FromWasm0(ptr, len) {
1688
+ ptr = ptr >>> 0;
1689
+ return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1690
+ }
1691
+
1692
+ let cachedDataViewMemory0 = null;
1693
+ function getDataViewMemory0() {
1694
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1695
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1696
+ }
1697
+ return cachedDataViewMemory0;
1698
+ }
1699
+
1700
+ function getStringFromWasm0(ptr, len) {
1701
+ return decodeText(ptr >>> 0, len);
1702
+ }
1703
+
1704
+ let cachedUint32ArrayMemory0 = null;
1705
+ function getUint32ArrayMemory0() {
1706
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
1707
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
1708
+ }
1709
+ return cachedUint32ArrayMemory0;
1710
+ }
1711
+
1712
+ let cachedUint8ArrayMemory0 = null;
1713
+ function getUint8ArrayMemory0() {
1714
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1715
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1716
+ }
1717
+ return cachedUint8ArrayMemory0;
1718
+ }
1719
+
1720
+ let cachedUint8ClampedArrayMemory0 = null;
1721
+ function getUint8ClampedArrayMemory0() {
1722
+ if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) {
1723
+ cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
1724
+ }
1725
+ return cachedUint8ClampedArrayMemory0;
1726
+ }
1727
+
1728
+ function handleError(f, args) {
1729
+ try {
1730
+ return f.apply(this, args);
1731
+ } catch (e) {
1732
+ const idx = addToExternrefTable0(e);
1733
+ wasm.__wbindgen_exn_store(idx);
1734
+ }
1735
+ }
1736
+
1737
+ function isLikeNone(x) {
1738
+ return x === undefined || x === null;
1739
+ }
1740
+
1741
+ function makeMutClosure(arg0, arg1, f) {
1742
+ const state = { a: arg0, b: arg1, cnt: 1 };
1743
+ const real = (...args) => {
1744
+
1745
+ // First up with a closure we increment the internal reference
1746
+ // count. This ensures that the Rust closure environment won't
1747
+ // be deallocated while we're invoking it.
1748
+ state.cnt++;
1749
+ const a = state.a;
1750
+ state.a = 0;
1751
+ try {
1752
+ return f(a, state.b, ...args);
1753
+ } finally {
1754
+ state.a = a;
1755
+ real._wbg_cb_unref();
1756
+ }
1757
+ };
1758
+ real._wbg_cb_unref = () => {
1759
+ if (--state.cnt === 0) {
1760
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1761
+ state.a = 0;
1762
+ CLOSURE_DTORS.unregister(state);
1763
+ }
1764
+ };
1765
+ CLOSURE_DTORS.register(real, state, state);
1766
+ return real;
1767
+ }
1768
+
1769
+ function passArray8ToWasm0(arg, malloc) {
1770
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
1771
+ getUint8ArrayMemory0().set(arg, ptr / 1);
1772
+ WASM_VECTOR_LEN = arg.length;
1773
+ return ptr;
1774
+ }
1775
+
1776
+ function passStringToWasm0(arg, malloc, realloc) {
1777
+ if (realloc === undefined) {
1778
+ const buf = cachedTextEncoder.encode(arg);
1779
+ const ptr = malloc(buf.length, 1) >>> 0;
1780
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1781
+ WASM_VECTOR_LEN = buf.length;
1782
+ return ptr;
1783
+ }
1784
+
1785
+ let len = arg.length;
1786
+ let ptr = malloc(len, 1) >>> 0;
1787
+
1788
+ const mem = getUint8ArrayMemory0();
1789
+
1790
+ let offset = 0;
1791
+
1792
+ for (; offset < len; offset++) {
1793
+ const code = arg.charCodeAt(offset);
1794
+ if (code > 0x7F) break;
1795
+ mem[ptr + offset] = code;
1796
+ }
1797
+ if (offset !== len) {
1798
+ if (offset !== 0) {
1799
+ arg = arg.slice(offset);
1800
+ }
1801
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1802
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1803
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1804
+
1805
+ offset += ret.written;
1806
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1807
+ }
1808
+
1809
+ WASM_VECTOR_LEN = offset;
1810
+ return ptr;
1811
+ }
1812
+
1813
+ function takeFromExternrefTable0(idx) {
1814
+ const value = wasm.__wbindgen_externrefs.get(idx);
1815
+ wasm.__externref_table_dealloc(idx);
1816
+ return value;
1817
+ }
1818
+
1819
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1820
+ cachedTextDecoder.decode();
1821
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1822
+ let numBytesDecoded = 0;
1823
+ function decodeText(ptr, len) {
1824
+ numBytesDecoded += len;
1825
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1826
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1827
+ cachedTextDecoder.decode();
1828
+ numBytesDecoded = len;
1829
+ }
1830
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1831
+ }
1832
+
1833
+ const cachedTextEncoder = new TextEncoder();
1834
+
1835
+ if (!('encodeInto' in cachedTextEncoder)) {
1836
+ cachedTextEncoder.encodeInto = function (arg, view) {
1837
+ const buf = cachedTextEncoder.encode(arg);
1838
+ view.set(buf);
1839
+ return {
1840
+ read: arg.length,
1841
+ written: buf.length
1842
+ };
1843
+ };
1844
+ }
1845
+
1846
+ let WASM_VECTOR_LEN = 0;
1847
+
1848
+ let wasmModule, wasmInstance, wasm;
1849
+ function __wbg_finalize_init(instance, module) {
1850
+ wasmInstance = instance;
1851
+ wasm = instance.exports;
1852
+ wasmModule = module;
1853
+ cachedDataViewMemory0 = null;
1854
+ cachedUint32ArrayMemory0 = null;
1855
+ cachedUint8ArrayMemory0 = null;
1856
+ cachedUint8ClampedArrayMemory0 = null;
1857
+ wasm.__wbindgen_start();
1858
+ return wasm;
1859
+ }
1860
+
1861
+ async function __wbg_load(module, imports) {
1862
+ if (typeof Response === 'function' && module instanceof Response) {
1863
+ if (!module.ok) {
1864
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
1865
+ }
1866
+
1867
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1868
+ try {
1869
+ return await WebAssembly.instantiateStreaming(module, imports);
1870
+ } catch (e) {
1871
+ const validResponse = expectedResponseType(module.type);
1872
+
1873
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1874
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
1875
+
1876
+ } else { throw e; }
1877
+ }
1878
+ }
1879
+
1880
+ const bytes = await module.arrayBuffer();
1881
+ return await WebAssembly.instantiate(bytes, imports);
1882
+ } else {
1883
+ const instance = await WebAssembly.instantiate(module, imports);
1884
+
1885
+ if (instance instanceof WebAssembly.Instance) {
1886
+ return { instance, module };
1887
+ } else {
1888
+ return instance;
1889
+ }
1890
+ }
1891
+
1892
+ function expectedResponseType(type) {
1893
+ switch (type) {
1894
+ case 'basic': case 'cors': case 'default': return true;
1895
+ }
1896
+ return false;
1897
+ }
1898
+ }
1899
+
1900
+ function initSync(module) {
1901
+ if (wasm !== undefined) return wasm;
1902
+
1903
+
1904
+ if (module !== undefined) {
1905
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1906
+ ({module} = module)
1907
+ } else {
1908
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1909
+ }
1910
+ }
1911
+
1912
+ const imports = __wbg_get_imports();
1913
+ if (!(module instanceof WebAssembly.Module)) {
1914
+ module = new WebAssembly.Module(module);
1915
+ }
1916
+ const instance = new WebAssembly.Instance(module, imports);
1917
+ return __wbg_finalize_init(instance, module);
1918
+ }
1919
+
1920
+ async function __wbg_init(module_or_path) {
1921
+ if (wasm !== undefined) return wasm;
1922
+
1923
+
1924
+ if (module_or_path !== undefined) {
1925
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1926
+ ({module_or_path} = module_or_path)
1927
+ } else {
1928
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1929
+ }
1930
+ }
1931
+
1932
+ if (module_or_path === undefined) {
1933
+ module_or_path = new URL('canvist_canvas_wasm_bg.wasm', import.meta.url);
1934
+ }
1935
+ const imports = __wbg_get_imports();
1936
+
1937
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1938
+ module_or_path = fetch(module_or_path);
1939
+ }
1940
+
1941
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1942
+
1943
+ return __wbg_finalize_init(instance, module);
1944
+ }
1945
+
1946
+ export { initSync, __wbg_init as default };