wraithterm 0.0.0-stage → 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.
Files changed (210) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +313 -2
  3. package/css/xterm.css +285 -0
  4. package/dist/index.d.ts +88 -0
  5. package/dist/index.js +707 -0
  6. package/dist/keycodes.d.ts +1 -0
  7. package/dist/keycodes.js +179 -0
  8. package/dist/protocol.d.ts +117 -0
  9. package/dist/protocol.js +1 -0
  10. package/dist/types.d.ts +66 -0
  11. package/dist/types.js +19 -0
  12. package/dist/vite.d.ts +11 -0
  13. package/dist/vite.js +11 -0
  14. package/dist/worker.d.ts +1 -0
  15. package/dist/worker.js +302 -0
  16. package/dist/xterm-api.d.ts +1956 -0
  17. package/dist/xterm-atlas.d.ts +39 -0
  18. package/dist/xterm-atlas.js +176 -0
  19. package/dist/xterm-internals.d.ts +120 -0
  20. package/dist/xterm-internals.js +19 -0
  21. package/dist/xterm-renderer.d.ts +77 -0
  22. package/dist/xterm-renderer.js +540 -0
  23. package/dist/xterm.d.ts +17 -0
  24. package/dist/xterm.js +35 -0
  25. package/docs/ARCHITECTURE.md +179 -0
  26. package/docs/COMPATIBILITY.md +66 -0
  27. package/docs/PERFORMANCE.md +122 -0
  28. package/docs/TOP_TIER.md +124 -0
  29. package/docs/XTERM_API.md +163 -0
  30. package/docs/compatibility/xterm-chrome.json +34 -0
  31. package/licenses/Ghostty-MIT.txt +21 -0
  32. package/licenses/JetBrainsMono-OFL.txt +93 -0
  33. package/licenses/NOTICE.md +93 -0
  34. package/licenses/Zig-MIT.txt +21 -0
  35. package/licenses/rust/arrayvec-0.7.8/LICENSE-APACHE +201 -0
  36. package/licenses/rust/arrayvec-0.7.8/LICENSE-MIT +25 -0
  37. package/licenses/rust/autocfg-1.5.1/LICENSE-APACHE +201 -0
  38. package/licenses/rust/autocfg-1.5.1/LICENSE-MIT +25 -0
  39. package/licenses/rust/bit-set-0.10.0/LICENSE-APACHE +201 -0
  40. package/licenses/rust/bit-set-0.10.0/LICENSE-MIT +25 -0
  41. package/licenses/rust/bit-vec-0.9.1/LICENSE-APACHE +201 -0
  42. package/licenses/rust/bit-vec-0.9.1/LICENSE-MIT +25 -0
  43. package/licenses/rust/bitflags-2.13.2/LICENSE-APACHE +201 -0
  44. package/licenses/rust/bitflags-2.13.2/LICENSE-MIT +25 -0
  45. package/licenses/rust/bumpalo-3.20.3/LICENSE-APACHE +201 -0
  46. package/licenses/rust/bumpalo-3.20.3/LICENSE-MIT +25 -0
  47. package/licenses/rust/bytemuck-1.25.2/LICENSE-APACHE +61 -0
  48. package/licenses/rust/bytemuck-1.25.2/LICENSE-MIT +9 -0
  49. package/licenses/rust/bytemuck-1.25.2/LICENSE-ZLIB +11 -0
  50. package/licenses/rust/bytemuck_derive-1.12.1/LICENSE-APACHE +61 -0
  51. package/licenses/rust/bytemuck_derive-1.12.1/LICENSE-MIT +9 -0
  52. package/licenses/rust/bytemuck_derive-1.12.1/LICENSE-ZLIB +11 -0
  53. package/licenses/rust/cfg-if-1.0.5/LICENSE-APACHE +201 -0
  54. package/licenses/rust/cfg-if-1.0.5/LICENSE-MIT +25 -0
  55. package/licenses/rust/cfg_aliases-0.2.2/LICENSE +9 -0
  56. package/licenses/rust/codespan-reporting-0.13.1/LICENSE +201 -0
  57. package/licenses/rust/crunchy-0.2.4/LICENSE +21 -0
  58. package/licenses/rust/document-features-0.2.12/LICENSE-APACHE +73 -0
  59. package/licenses/rust/document-features-0.2.12/LICENSE-MIT +19 -0
  60. package/licenses/rust/equivalent-1.0.2/LICENSE-APACHE +201 -0
  61. package/licenses/rust/equivalent-1.0.2/LICENSE-MIT +25 -0
  62. package/licenses/rust/foldhash-0.2.0/LICENSE +19 -0
  63. package/licenses/rust/font-types-0.12.6/LICENSE-APACHE +67 -0
  64. package/licenses/rust/font-types-0.12.6/LICENSE-MIT +25 -0
  65. package/licenses/rust/futures-core-0.3.34/LICENSE-APACHE +202 -0
  66. package/licenses/rust/futures-core-0.3.34/LICENSE-MIT +26 -0
  67. package/licenses/rust/futures-task-0.3.34/LICENSE-APACHE +202 -0
  68. package/licenses/rust/futures-task-0.3.34/LICENSE-MIT +26 -0
  69. package/licenses/rust/futures-util-0.3.34/LICENSE-APACHE +202 -0
  70. package/licenses/rust/futures-util-0.3.34/LICENSE-MIT +26 -0
  71. package/licenses/rust/half-2.7.1/LICENSE-APACHE +176 -0
  72. package/licenses/rust/half-2.7.1/LICENSE-MIT +19 -0
  73. package/licenses/rust/harfrust-0.13.3/LICENSE +22 -0
  74. package/licenses/rust/hashbrown-0.17.1/LICENSE-APACHE +201 -0
  75. package/licenses/rust/hashbrown-0.17.1/LICENSE-MIT +25 -0
  76. package/licenses/rust/indexmap-2.14.2/LICENSE-APACHE +201 -0
  77. package/licenses/rust/indexmap-2.14.2/LICENSE-MIT +25 -0
  78. package/licenses/rust/js-sys-0.3.106/LICENSE-APACHE +201 -0
  79. package/licenses/rust/js-sys-0.3.106/LICENSE-MIT +25 -0
  80. package/licenses/rust/libc-0.2.190/LICENSE-APACHE +176 -0
  81. package/licenses/rust/libc-0.2.190/LICENSE-MIT +25 -0
  82. package/licenses/rust/libloading-0.8.9/LICENSE +12 -0
  83. package/licenses/rust/libm-0.2.16/LICENSE.txt +258 -0
  84. package/licenses/rust/litrs-1.0.0/LICENSE-APACHE +176 -0
  85. package/licenses/rust/litrs-1.0.0/LICENSE-MIT +25 -0
  86. package/licenses/rust/lock_api-0.4.14/LICENSE-APACHE +201 -0
  87. package/licenses/rust/lock_api-0.4.14/LICENSE-MIT +25 -0
  88. package/licenses/rust/log-0.4.34/LICENSE-APACHE +201 -0
  89. package/licenses/rust/log-0.4.34/LICENSE-MIT +25 -0
  90. package/licenses/rust/naga-30.0.1/LICENSE.APACHE +176 -0
  91. package/licenses/rust/naga-30.0.1/LICENSE.MIT +21 -0
  92. package/licenses/rust/naga-types-30.0.1/LICENSE.APACHE +176 -0
  93. package/licenses/rust/naga-types-30.0.1/LICENSE.MIT +21 -0
  94. package/licenses/rust/num-traits-0.2.19/LICENSE-APACHE +201 -0
  95. package/licenses/rust/num-traits-0.2.19/LICENSE-MIT +25 -0
  96. package/licenses/rust/once_cell-1.21.4/LICENSE-APACHE +201 -0
  97. package/licenses/rust/once_cell-1.21.4/LICENSE-MIT +23 -0
  98. package/licenses/rust/parking_lot-0.12.5/LICENSE-APACHE +201 -0
  99. package/licenses/rust/parking_lot-0.12.5/LICENSE-MIT +25 -0
  100. package/licenses/rust/parking_lot_core-0.9.12/LICENSE-APACHE +201 -0
  101. package/licenses/rust/parking_lot_core-0.9.12/LICENSE-MIT +25 -0
  102. package/licenses/rust/pin-project-lite-0.2.17/LICENSE-APACHE +177 -0
  103. package/licenses/rust/pin-project-lite-0.2.17/LICENSE-MIT +23 -0
  104. package/licenses/rust/portable-atomic-1.15.0/LICENSE-APACHE +177 -0
  105. package/licenses/rust/portable-atomic-1.15.0/LICENSE-MIT +23 -0
  106. package/licenses/rust/portable-atomic-util-0.2.8/LICENSE-APACHE +177 -0
  107. package/licenses/rust/portable-atomic-util-0.2.8/LICENSE-MIT +23 -0
  108. package/licenses/rust/proc-macro2-1.0.107/LICENSE-APACHE +176 -0
  109. package/licenses/rust/proc-macro2-1.0.107/LICENSE-MIT +23 -0
  110. package/licenses/rust/quote-1.0.47/LICENSE-APACHE +176 -0
  111. package/licenses/rust/quote-1.0.47/LICENSE-MIT +23 -0
  112. package/licenses/rust/raw-window-handle-0.6.2/LICENSE-APACHE.md +177 -0
  113. package/licenses/rust/raw-window-handle-0.6.2/LICENSE-MIT.md +21 -0
  114. package/licenses/rust/raw-window-handle-0.6.2/LICENSE-ZLIB.md +11 -0
  115. package/licenses/rust/read-fonts-0.41.0/LICENSE-APACHE +67 -0
  116. package/licenses/rust/read-fonts-0.41.0/LICENSE-MIT +25 -0
  117. package/licenses/rust/read-fonts-0.43.3/LICENSE-APACHE +67 -0
  118. package/licenses/rust/read-fonts-0.43.3/LICENSE-MIT +25 -0
  119. package/licenses/rust/redox_syscall-0.5.18/LICENSE +22 -0
  120. package/licenses/rust/renderdoc-sys-1.1.0/LICENSE-APACHE +201 -0
  121. package/licenses/rust/renderdoc-sys-1.1.0/LICENSE-MIT +25 -0
  122. package/licenses/rust/rustc-hash-1.1.0/LICENSE-APACHE +201 -0
  123. package/licenses/rust/rustc-hash-1.1.0/LICENSE-MIT +23 -0
  124. package/licenses/rust/rustversion-1.0.23/LICENSE-APACHE +176 -0
  125. package/licenses/rust/rustversion-1.0.23/LICENSE-MIT +23 -0
  126. package/licenses/rust/scopeguard-1.2.0/LICENSE-APACHE +201 -0
  127. package/licenses/rust/scopeguard-1.2.0/LICENSE-MIT +25 -0
  128. package/licenses/rust/serde-1.0.229/LICENSE-APACHE +176 -0
  129. package/licenses/rust/serde-1.0.229/LICENSE-MIT +23 -0
  130. package/licenses/rust/serde_core-1.0.229/LICENSE-APACHE +176 -0
  131. package/licenses/rust/serde_core-1.0.229/LICENSE-MIT +23 -0
  132. package/licenses/rust/serde_derive-1.0.229/LICENSE-APACHE +176 -0
  133. package/licenses/rust/serde_derive-1.0.229/LICENSE-MIT +23 -0
  134. package/licenses/rust/skrifa-0.44.0/LICENSE-APACHE +67 -0
  135. package/licenses/rust/skrifa-0.44.0/LICENSE-MIT +25 -0
  136. package/licenses/rust/slab-0.4.12/LICENSE +25 -0
  137. package/licenses/rust/smallvec-1.16.2/LICENSE-APACHE +201 -0
  138. package/licenses/rust/smallvec-1.16.2/LICENSE-MIT +25 -0
  139. package/licenses/rust/static_assertions-1.1.0/LICENSE-APACHE +202 -0
  140. package/licenses/rust/static_assertions-1.1.0/LICENSE-MIT +21 -0
  141. package/licenses/rust/swash-0.2.10/LICENSE-APACHE +201 -0
  142. package/licenses/rust/swash-0.2.10/LICENSE-MIT +25 -0
  143. package/licenses/rust/syn-2.0.119/LICENSE-APACHE +176 -0
  144. package/licenses/rust/syn-2.0.119/LICENSE-MIT +23 -0
  145. package/licenses/rust/syn-3.0.6/LICENSE-APACHE +176 -0
  146. package/licenses/rust/syn-3.0.6/LICENSE-MIT +23 -0
  147. package/licenses/rust/termcolor-1.4.1/COPYING +3 -0
  148. package/licenses/rust/termcolor-1.4.1/LICENSE-MIT +21 -0
  149. package/licenses/rust/termcolor-1.4.1/UNLICENSE +24 -0
  150. package/licenses/rust/thiserror-2.0.21/LICENSE-APACHE +176 -0
  151. package/licenses/rust/thiserror-2.0.21/LICENSE-MIT +23 -0
  152. package/licenses/rust/thiserror-impl-2.0.21/LICENSE-APACHE +176 -0
  153. package/licenses/rust/thiserror-impl-2.0.21/LICENSE-MIT +23 -0
  154. package/licenses/rust/tokio-1.53.2/LICENSE +21 -0
  155. package/licenses/rust/unicode-ident-1.0.26/LICENSE-APACHE +176 -0
  156. package/licenses/rust/unicode-ident-1.0.26/LICENSE-MIT +23 -0
  157. package/licenses/rust/unicode-ident-1.0.26/LICENSE-UNICODE +39 -0
  158. package/licenses/rust/unicode-width-0.2.2/LICENSE-APACHE +201 -0
  159. package/licenses/rust/unicode-width-0.2.2/LICENSE-MIT +25 -0
  160. package/licenses/rust/wasm-bindgen-0.2.129/LICENSE-APACHE +201 -0
  161. package/licenses/rust/wasm-bindgen-0.2.129/LICENSE-MIT +25 -0
  162. package/licenses/rust/wasm-bindgen-futures-0.4.79/LICENSE-APACHE +201 -0
  163. package/licenses/rust/wasm-bindgen-futures-0.4.79/LICENSE-MIT +25 -0
  164. package/licenses/rust/wasm-bindgen-macro-0.2.129/LICENSE-APACHE +201 -0
  165. package/licenses/rust/wasm-bindgen-macro-0.2.129/LICENSE-MIT +25 -0
  166. package/licenses/rust/wasm-bindgen-macro-support-0.2.129/LICENSE-APACHE +201 -0
  167. package/licenses/rust/wasm-bindgen-macro-support-0.2.129/LICENSE-MIT +25 -0
  168. package/licenses/rust/wasm-bindgen-shared-0.2.129/LICENSE-APACHE +201 -0
  169. package/licenses/rust/wasm-bindgen-shared-0.2.129/LICENSE-MIT +25 -0
  170. package/licenses/rust/web-sys-0.3.106/LICENSE-APACHE +201 -0
  171. package/licenses/rust/web-sys-0.3.106/LICENSE-MIT +25 -0
  172. package/licenses/rust/wgpu-30.0.1/LICENSE.APACHE +176 -0
  173. package/licenses/rust/wgpu-30.0.1/LICENSE.MIT +21 -0
  174. package/licenses/rust/wgpu-core-30.0.1/LICENSE.APACHE +176 -0
  175. package/licenses/rust/wgpu-core-30.0.1/LICENSE.MIT +21 -0
  176. package/licenses/rust/wgpu-core-deps-windows-linux-android-30.0.1/LICENSE.APACHE +176 -0
  177. package/licenses/rust/wgpu-core-deps-windows-linux-android-30.0.1/LICENSE.MIT +21 -0
  178. package/licenses/rust/wgpu-hal-30.0.1/LICENSE.APACHE +176 -0
  179. package/licenses/rust/wgpu-hal-30.0.1/LICENSE.MIT +21 -0
  180. package/licenses/rust/wgpu-naga-bridge-30.0.1/LICENSE.APACHE +176 -0
  181. package/licenses/rust/wgpu-naga-bridge-30.0.1/LICENSE.MIT +21 -0
  182. package/licenses/rust/wgpu-types-30.0.1/LICENSE.APACHE +176 -0
  183. package/licenses/rust/wgpu-types-30.0.1/LICENSE.MIT +21 -0
  184. package/licenses/rust/winapi-util-0.1.11/COPYING +3 -0
  185. package/licenses/rust/winapi-util-0.1.11/LICENSE-MIT +21 -0
  186. package/licenses/rust/winapi-util-0.1.11/UNLICENSE +24 -0
  187. package/licenses/rust/windows-link-0.2.1/license-apache-2.0 +201 -0
  188. package/licenses/rust/windows-link-0.2.1/license-mit +21 -0
  189. package/licenses/rust/windows-sys-0.61.2/license-apache-2.0 +201 -0
  190. package/licenses/rust/windows-sys-0.61.2/license-mit +21 -0
  191. package/licenses/rust/yazi-0.2.1/LICENSE-APACHE +201 -0
  192. package/licenses/rust/yazi-0.2.1/LICENSE-MIT +19 -0
  193. package/licenses/rust/zeno-0.3.3/LICENSE-APACHE +201 -0
  194. package/licenses/rust/zeno-0.3.3/LICENSE-MIT +25 -0
  195. package/licenses/rust/zerocopy-0.8.62/LICENSE-APACHE +202 -0
  196. package/licenses/rust/zerocopy-0.8.62/LICENSE-BSD +24 -0
  197. package/licenses/rust/zerocopy-0.8.62/LICENSE-MIT +26 -0
  198. package/licenses/rust/zerocopy-derive-0.8.62/LICENSE-APACHE +202 -0
  199. package/licenses/rust/zerocopy-derive-0.8.62/LICENSE-BSD +24 -0
  200. package/licenses/rust/zerocopy-derive-0.8.62/LICENSE-MIT +26 -0
  201. package/licenses/xterm-MIT.txt +21 -0
  202. package/package.json +69 -4
  203. package/wasm/Ghostty-MIT.txt +21 -0
  204. package/wasm/JetBrainsMono-Regular.ttf +0 -0
  205. package/wasm/OFL.txt +93 -0
  206. package/wasm/optimization.json +6 -0
  207. package/wasm/wraith_engine.d.ts +176 -0
  208. package/wasm/wraith_engine.js +2057 -0
  209. package/wasm/wraith_engine_bg.wasm +0 -0
  210. package/wasm/wraith_engine_bg.wasm.d.ts +71 -0
@@ -0,0 +1,2057 @@
1
+ /* @ts-self-types="./wraith_engine.d.ts" */
2
+
3
+ /**
4
+ * Stateless Rust/WebGPU compositor for the xterm-compatible semantic core.
5
+ */
6
+ export class Compositor {
7
+ static __wrap(ptr) {
8
+ const obj = Object.create(Compositor.prototype);
9
+ obj.__wbg_ptr = ptr;
10
+ CompositorFinalization.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
+ CompositorFinalization.unregister(this);
17
+ return ptr;
18
+ }
19
+ free() {
20
+ const ptr = this.__destroy_into_raw();
21
+ wasm.__wbg_compositor_free(ptr, 0);
22
+ }
23
+ /**
24
+ * @param {number} cols
25
+ * @param {number} rows
26
+ * @param {number} width
27
+ * @param {number} height
28
+ */
29
+ configure(cols, rows, width, height) {
30
+ const ret = wasm.compositor_configure(this.__wbg_ptr, cols, rows, width, height);
31
+ if (ret[1]) {
32
+ throw takeFromExternrefTable0(ret[0]);
33
+ }
34
+ }
35
+ /**
36
+ * @param {OffscreenCanvas} canvas
37
+ * @returns {Promise<Compositor>}
38
+ */
39
+ static create(canvas) {
40
+ const ret = wasm.compositor_create(canvas);
41
+ return ret;
42
+ }
43
+ /**
44
+ * Wait for submitted GPU work. Call only while the renderer is paused;
45
+ * the Wasm borrow remains live until the asynchronous fence completes.
46
+ * @returns {Promise<void>}
47
+ */
48
+ fence() {
49
+ const ret = wasm.compositor_fence(this.__wbg_ptr);
50
+ return ret;
51
+ }
52
+ /**
53
+ * @returns {bigint}
54
+ */
55
+ get frames() {
56
+ const ret = wasm.compositor_frames(this.__wbg_ptr);
57
+ return BigInt.asUintN(64, ret);
58
+ }
59
+ /**
60
+ * @param {Uint32Array} packed
61
+ * @param {number} start
62
+ * @param {Float32Array} dimensions
63
+ * @param {Uint32Array} frame
64
+ * @returns {boolean}
65
+ */
66
+ render(packed, start, dimensions, frame) {
67
+ const ptr0 = passArray32ToWasm0(packed, wasm.__wbindgen_malloc);
68
+ const len0 = WASM_VECTOR_LEN;
69
+ const ptr1 = passArrayF32ToWasm0(dimensions, wasm.__wbindgen_malloc);
70
+ const len1 = WASM_VECTOR_LEN;
71
+ const ptr2 = passArray32ToWasm0(frame, wasm.__wbindgen_malloc);
72
+ const len2 = WASM_VECTOR_LEN;
73
+ const ret = wasm.compositor_render(this.__wbg_ptr, ptr0, len0, start, ptr1, len1, ptr2, len2);
74
+ if (ret[2]) {
75
+ throw takeFromExternrefTable0(ret[1]);
76
+ }
77
+ return ret[0] !== 0;
78
+ }
79
+ /**
80
+ * Upload staged cells `start..start + cells` (indices into the grid, at
81
+ * the same offsets in staging) and present with the staged uniforms.
82
+ * @param {number} cells
83
+ * @param {number} start
84
+ * @returns {boolean}
85
+ */
86
+ render_staged(cells, start) {
87
+ const ret = wasm.compositor_render_staged(this.__wbg_ptr, cells, start);
88
+ if (ret[2]) {
89
+ throw takeFromExternrefTable0(ret[1]);
90
+ }
91
+ return ret[0] !== 0;
92
+ }
93
+ /**
94
+ * Cell words followed by four f32 dimensions and eight u32 frame words.
95
+ * Views are valid until configure/free; refresh them after memory growth.
96
+ * Fill them only between synchronous calls, with rendering paused at fences.
97
+ * @returns {number}
98
+ */
99
+ get staging_ptr() {
100
+ const ret = wasm.compositor_staging_ptr(this.__wbg_ptr);
101
+ return ret >>> 0;
102
+ }
103
+ /**
104
+ * @returns {number}
105
+ */
106
+ get staging_words() {
107
+ const ret = wasm.compositor_staging_words(this.__wbg_ptr);
108
+ return ret >>> 0;
109
+ }
110
+ /**
111
+ * @param {number} x
112
+ * @param {number} y
113
+ * @param {number} width
114
+ * @param {number} height
115
+ * @param {Uint8Array} pixels
116
+ */
117
+ upload(x, y, width, height, pixels) {
118
+ const ptr0 = passArray8ToWasm0(pixels, wasm.__wbindgen_malloc);
119
+ const len0 = WASM_VECTOR_LEN;
120
+ const ret = wasm.compositor_upload(this.__wbg_ptr, x, y, width, height, ptr0, len0);
121
+ if (ret[1]) {
122
+ throw takeFromExternrefTable0(ret[0]);
123
+ }
124
+ }
125
+ }
126
+ if (Symbol.dispose) Compositor.prototype[Symbol.dispose] = Compositor.prototype.free;
127
+
128
+ export class Engine {
129
+ static __wrap(ptr) {
130
+ const obj = Object.create(Engine.prototype);
131
+ obj.__wbg_ptr = ptr;
132
+ EngineFinalization.register(obj, obj.__wbg_ptr, obj);
133
+ return obj;
134
+ }
135
+ __destroy_into_raw() {
136
+ const ptr = this.__wbg_ptr;
137
+ this.__wbg_ptr = 0;
138
+ EngineFinalization.unregister(this);
139
+ return ptr;
140
+ }
141
+ free() {
142
+ const ptr = this.__destroy_into_raw();
143
+ wasm.__wbg_engine_free(ptr, 0);
144
+ }
145
+ /**
146
+ * @returns {string}
147
+ */
148
+ get adapter() {
149
+ let deferred1_0;
150
+ let deferred1_1;
151
+ try {
152
+ const ret = wasm.engine_adapter(this.__wbg_ptr);
153
+ deferred1_0 = ret[0];
154
+ deferred1_1 = ret[1];
155
+ return getStringFromWasm0(ret[0], ret[1]);
156
+ } finally {
157
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
158
+ }
159
+ }
160
+ /**
161
+ * @param {Uint8Array} bytes
162
+ */
163
+ add_font(bytes) {
164
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
165
+ const len0 = WASM_VECTOR_LEN;
166
+ const ret = wasm.engine_add_font(this.__wbg_ptr, ptr0, len0);
167
+ if (ret[1]) {
168
+ throw takeFromExternrefTable0(ret[0]);
169
+ }
170
+ }
171
+ /**
172
+ * @returns {number}
173
+ */
174
+ get cell_height() {
175
+ const ret = wasm.engine_cell_height(this.__wbg_ptr);
176
+ return ret >>> 0;
177
+ }
178
+ /**
179
+ * @returns {number}
180
+ */
181
+ get cell_width() {
182
+ const ret = wasm.engine_cell_width(this.__wbg_ptr);
183
+ return ret >>> 0;
184
+ }
185
+ /**
186
+ * @param {OffscreenCanvas} canvas
187
+ * @param {Uint8Array} font
188
+ * @param {number} cols
189
+ * @param {number} rows
190
+ * @param {number} font_size
191
+ * @param {number} line_height
192
+ * @param {number} history
193
+ * @returns {Promise<Engine>}
194
+ */
195
+ static create(canvas, font, cols, rows, font_size, line_height, history) {
196
+ const ptr0 = passArray8ToWasm0(font, wasm.__wbindgen_malloc);
197
+ const len0 = WASM_VECTOR_LEN;
198
+ const ret = wasm.engine_create(canvas, ptr0, len0, cols, rows, font_size, line_height, history);
199
+ return ret;
200
+ }
201
+ /**
202
+ * @returns {number}
203
+ */
204
+ get cursor_x() {
205
+ const ret = wasm.engine_cursor_x(this.__wbg_ptr);
206
+ return ret >>> 0;
207
+ }
208
+ /**
209
+ * @returns {number}
210
+ */
211
+ get cursor_y() {
212
+ const ret = wasm.engine_cursor_y(this.__wbg_ptr);
213
+ return ret >>> 0;
214
+ }
215
+ /**
216
+ * @returns {Promise<void>}
217
+ */
218
+ fence() {
219
+ const ret = wasm.engine_fence(this.__wbg_ptr);
220
+ return ret;
221
+ }
222
+ /**
223
+ * @param {number} key
224
+ * @param {number} mods
225
+ * @param {number} action
226
+ * @param {string} text
227
+ * @param {number} unshifted
228
+ */
229
+ key(key, mods, action, text, unshifted) {
230
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
231
+ const len0 = WASM_VECTOR_LEN;
232
+ const ret = wasm.engine_key(this.__wbg_ptr, key, mods, action, ptr0, len0, unshifted);
233
+ if (ret[1]) {
234
+ throw takeFromExternrefTable0(ret[0]);
235
+ }
236
+ }
237
+ /**
238
+ * @param {number} x
239
+ * @param {number} y
240
+ * @returns {string}
241
+ */
242
+ link(x, y) {
243
+ let deferred1_0;
244
+ let deferred1_1;
245
+ try {
246
+ const ret = wasm.engine_link(this.__wbg_ptr, x, y);
247
+ deferred1_0 = ret[0];
248
+ deferred1_1 = ret[1];
249
+ return getStringFromWasm0(ret[0], ret[1]);
250
+ } finally {
251
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
252
+ }
253
+ }
254
+ /**
255
+ * @returns {Float64Array}
256
+ */
257
+ metrics() {
258
+ const ret = wasm.engine_metrics(this.__wbg_ptr);
259
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
260
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
261
+ return v1;
262
+ }
263
+ /**
264
+ * @param {number} mode
265
+ * @returns {boolean}
266
+ */
267
+ mode(mode) {
268
+ const ret = wasm.engine_mode(this.__wbg_ptr, mode);
269
+ return ret !== 0;
270
+ }
271
+ /**
272
+ * @param {number} action
273
+ * @param {number} button
274
+ * @param {number} mods
275
+ * @param {number} x
276
+ * @param {number} y
277
+ * @param {number} pressed
278
+ */
279
+ mouse(action, button, mods, x, y, pressed) {
280
+ const ret = wasm.engine_mouse(this.__wbg_ptr, action, button, mods, x, y, pressed);
281
+ if (ret[1]) {
282
+ throw takeFromExternrefTable0(ret[0]);
283
+ }
284
+ }
285
+ /**
286
+ * @returns {boolean}
287
+ */
288
+ get needs_present() {
289
+ const ret = wasm.engine_needs_present(this.__wbg_ptr);
290
+ return ret !== 0;
291
+ }
292
+ release_hold() {
293
+ wasm.engine_release_hold(this.__wbg_ptr);
294
+ }
295
+ /**
296
+ * @param {number} time
297
+ * @param {boolean} force
298
+ * @returns {boolean}
299
+ */
300
+ render(time, force) {
301
+ const ret = wasm.engine_render(this.__wbg_ptr, time, force);
302
+ if (ret[2]) {
303
+ throw takeFromExternrefTable0(ret[1]);
304
+ }
305
+ return ret[0] !== 0;
306
+ }
307
+ /**
308
+ * @param {number} cols
309
+ * @param {number} rows
310
+ */
311
+ resize(cols, rows) {
312
+ const ret = wasm.engine_resize(this.__wbg_ptr, cols, rows);
313
+ if (ret[1]) {
314
+ throw takeFromExternrefTable0(ret[0]);
315
+ }
316
+ }
317
+ /**
318
+ * @param {number} delta
319
+ */
320
+ scroll(delta) {
321
+ wasm.engine_scroll(this.__wbg_ptr, delta);
322
+ }
323
+ /**
324
+ * @param {number} x1
325
+ * @param {number} y1
326
+ * @param {number} x2
327
+ * @param {number} y2
328
+ */
329
+ select(x1, y1, x2, y2) {
330
+ const ret = wasm.engine_select(this.__wbg_ptr, x1, y1, x2, y2);
331
+ if (ret[1]) {
332
+ throw takeFromExternrefTable0(ret[0]);
333
+ }
334
+ }
335
+ /**
336
+ * @returns {Array<any>}
337
+ */
338
+ take_events() {
339
+ const ret = wasm.engine_take_events(this.__wbg_ptr);
340
+ return ret;
341
+ }
342
+ /**
343
+ * @param {boolean} selected
344
+ * @returns {string}
345
+ */
346
+ text(selected) {
347
+ let deferred2_0;
348
+ let deferred2_1;
349
+ try {
350
+ const ret = wasm.engine_text(this.__wbg_ptr, selected);
351
+ var ptr1 = ret[0];
352
+ var len1 = ret[1];
353
+ if (ret[3]) {
354
+ ptr1 = 0; len1 = 0;
355
+ throw takeFromExternrefTable0(ret[2]);
356
+ }
357
+ deferred2_0 = ptr1;
358
+ deferred2_1 = len1;
359
+ return getStringFromWasm0(ptr1, len1);
360
+ } finally {
361
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
362
+ }
363
+ }
364
+ /**
365
+ * @param {number} fg
366
+ * @param {number} bg
367
+ * @param {number} cursor
368
+ */
369
+ theme(fg, bg, cursor) {
370
+ wasm.engine_theme(this.__wbg_ptr, fg, bg, cursor);
371
+ }
372
+ /**
373
+ * @param {Uint8Array} bytes
374
+ */
375
+ write(bytes) {
376
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
377
+ const len0 = WASM_VECTOR_LEN;
378
+ wasm.engine_write(this.__wbg_ptr, ptr0, len0);
379
+ }
380
+ }
381
+ if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
382
+
383
+ /**
384
+ * Headless browser instance for tests, replay, and serverless terminal analysis.
385
+ */
386
+ export class Headless {
387
+ __destroy_into_raw() {
388
+ const ptr = this.__wbg_ptr;
389
+ this.__wbg_ptr = 0;
390
+ HeadlessFinalization.unregister(this);
391
+ return ptr;
392
+ }
393
+ free() {
394
+ const ptr = this.__destroy_into_raw();
395
+ wasm.__wbg_headless_free(ptr, 0);
396
+ }
397
+ /**
398
+ * @param {number} x
399
+ * @param {number} y
400
+ * @returns {Array<any>}
401
+ */
402
+ cell(x, y) {
403
+ const ret = wasm.headless_cell(this.__wbg_ptr, x, y);
404
+ if (ret[2]) {
405
+ throw takeFromExternrefTable0(ret[1]);
406
+ }
407
+ return takeFromExternrefTable0(ret[0]);
408
+ }
409
+ /**
410
+ * @param {number} key
411
+ * @param {number} mods
412
+ * @param {number} action
413
+ * @param {string} text
414
+ * @param {number} unshifted
415
+ */
416
+ key(key, mods, action, text, unshifted) {
417
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
418
+ const len0 = WASM_VECTOR_LEN;
419
+ const ret = wasm.headless_key(this.__wbg_ptr, key, mods, action, ptr0, len0, unshifted);
420
+ if (ret[1]) {
421
+ throw takeFromExternrefTable0(ret[0]);
422
+ }
423
+ }
424
+ /**
425
+ * @param {number} mode
426
+ * @returns {boolean}
427
+ */
428
+ mode(mode) {
429
+ const ret = wasm.headless_mode(this.__wbg_ptr, mode);
430
+ return ret !== 0;
431
+ }
432
+ /**
433
+ * @param {number} cols
434
+ * @param {number} rows
435
+ * @param {number} history
436
+ */
437
+ constructor(cols, rows, history) {
438
+ const ret = wasm.headless_new(cols, rows, history);
439
+ if (ret[2]) {
440
+ throw takeFromExternrefTable0(ret[1]);
441
+ }
442
+ this.__wbg_ptr = ret[0];
443
+ HeadlessFinalization.register(this, this.__wbg_ptr, this);
444
+ return this;
445
+ }
446
+ release_hold() {
447
+ wasm.headless_release_hold(this.__wbg_ptr);
448
+ }
449
+ /**
450
+ * @param {number} cols
451
+ * @param {number} rows
452
+ */
453
+ resize(cols, rows) {
454
+ const ret = wasm.headless_resize(this.__wbg_ptr, cols, rows);
455
+ if (ret[1]) {
456
+ throw takeFromExternrefTable0(ret[0]);
457
+ }
458
+ }
459
+ /**
460
+ * @param {number} delta
461
+ */
462
+ scroll(delta) {
463
+ wasm.headless_scroll(this.__wbg_ptr, delta);
464
+ }
465
+ /**
466
+ * @returns {Array<any>}
467
+ */
468
+ take_events() {
469
+ const ret = wasm.headless_take_events(this.__wbg_ptr);
470
+ return ret;
471
+ }
472
+ /**
473
+ * @returns {string}
474
+ */
475
+ text() {
476
+ let deferred2_0;
477
+ let deferred2_1;
478
+ try {
479
+ const ret = wasm.headless_text(this.__wbg_ptr);
480
+ var ptr1 = ret[0];
481
+ var len1 = ret[1];
482
+ if (ret[3]) {
483
+ ptr1 = 0; len1 = 0;
484
+ throw takeFromExternrefTable0(ret[2]);
485
+ }
486
+ deferred2_0 = ptr1;
487
+ deferred2_1 = len1;
488
+ return getStringFromWasm0(ptr1, len1);
489
+ } finally {
490
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
491
+ }
492
+ }
493
+ /**
494
+ * @param {Uint8Array} data
495
+ */
496
+ write(data) {
497
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
498
+ const len0 = WASM_VECTOR_LEN;
499
+ wasm.headless_write(this.__wbg_ptr, ptr0, len0);
500
+ }
501
+ }
502
+ if (Symbol.dispose) Headless.prototype[Symbol.dispose] = Headless.prototype.free;
503
+ function __wbg_get_imports() {
504
+ const import0 = {
505
+ __proto__: null,
506
+ __wbg_Window_a2a6c4d665047b14: function(arg0) {
507
+ const ret = arg0.Window;
508
+ return ret;
509
+ },
510
+ __wbg_WorkerGlobalScope_2664448a7c667d67: function(arg0) {
511
+ const ret = arg0.WorkerGlobalScope;
512
+ return ret;
513
+ },
514
+ __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
515
+ const ret = debugString(arg1);
516
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
517
+ const len1 = WASM_VECTOR_LEN;
518
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
519
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
520
+ },
521
+ __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
522
+ const ret = typeof(arg0) === 'function';
523
+ return ret;
524
+ },
525
+ __wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
526
+ const ret = arg0 === null;
527
+ return ret;
528
+ },
529
+ __wbg___wbindgen_is_string_90b56bc79aad6f6c: function(arg0) {
530
+ const ret = typeof(arg0) === 'string';
531
+ return ret;
532
+ },
533
+ __wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
534
+ const ret = arg0 === undefined;
535
+ return ret;
536
+ },
537
+ __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
538
+ const obj = arg1;
539
+ const ret = typeof(obj) === 'string' ? obj : undefined;
540
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
541
+ var len1 = WASM_VECTOR_LEN;
542
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
543
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
544
+ },
545
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
546
+ throw new Error(getStringFromWasm0(arg0, arg1));
547
+ },
548
+ __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
549
+ arg0._wbg_cb_unref();
550
+ },
551
+ __wbg_beginRenderPass_3c53642423af50dc: function() { return handleError(function (arg0, arg1) {
552
+ const ret = arg0.beginRenderPass(arg1);
553
+ return ret;
554
+ }, arguments); },
555
+ __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
556
+ const ret = arg0.call(arg1, arg2);
557
+ return ret;
558
+ }, arguments); },
559
+ __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
560
+ const ret = arg0.call(arg1);
561
+ return ret;
562
+ }, arguments); },
563
+ __wbg_compositor_new: function(arg0) {
564
+ const ret = Compositor.__wrap(arg0);
565
+ return ret;
566
+ },
567
+ __wbg_configure_1e2c1c9edad07d26: function() { return handleError(function (arg0, arg1) {
568
+ arg0.configure(arg1);
569
+ }, arguments); },
570
+ __wbg_copyBufferToBuffer_01766818654a9868: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
571
+ arg0.copyBufferToBuffer(arg1, arg2, arg3, arg4);
572
+ }, arguments); },
573
+ __wbg_copyBufferToBuffer_9c174b96fb08d551: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
574
+ arg0.copyBufferToBuffer(arg1, arg2, arg3, arg4, arg5);
575
+ }, arguments); },
576
+ __wbg_createBindGroup_f539b26ca341308f: function(arg0, arg1) {
577
+ const ret = arg0.createBindGroup(arg1);
578
+ return ret;
579
+ },
580
+ __wbg_createBuffer_d800e9b1d41b2ee5: function() { return handleError(function (arg0, arg1) {
581
+ const ret = arg0.createBuffer(arg1);
582
+ return ret;
583
+ }, arguments); },
584
+ __wbg_createCommandEncoder_3352d1ffc36c6fc0: function(arg0, arg1) {
585
+ const ret = arg0.createCommandEncoder(arg1);
586
+ return ret;
587
+ },
588
+ __wbg_createRenderPipeline_0ebb7ebc653e9207: function() { return handleError(function (arg0, arg1) {
589
+ const ret = arg0.createRenderPipeline(arg1);
590
+ return ret;
591
+ }, arguments); },
592
+ __wbg_createSampler_9bd91d7e928c0060: function(arg0, arg1) {
593
+ const ret = arg0.createSampler(arg1);
594
+ return ret;
595
+ },
596
+ __wbg_createShaderModule_cefa51336cb288ae: function(arg0, arg1) {
597
+ const ret = arg0.createShaderModule(arg1);
598
+ return ret;
599
+ },
600
+ __wbg_createTexture_ed7e9fc04dd54d84: function() { return handleError(function (arg0, arg1) {
601
+ const ret = arg0.createTexture(arg1);
602
+ return ret;
603
+ }, arguments); },
604
+ __wbg_createView_da41c2d2cb212715: function() { return handleError(function (arg0, arg1) {
605
+ const ret = arg0.createView(arg1);
606
+ return ret;
607
+ }, arguments); },
608
+ __wbg_description_83b8a393160021b9: function(arg0, arg1) {
609
+ const ret = arg1.description;
610
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
611
+ const len1 = WASM_VECTOR_LEN;
612
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
613
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
614
+ },
615
+ __wbg_document_9854e03c05fc8834: function(arg0) {
616
+ const ret = arg0.document;
617
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
618
+ },
619
+ __wbg_draw_086a9578fc9898c2: function(arg0, arg1, arg2, arg3, arg4) {
620
+ arg0.draw(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
621
+ },
622
+ __wbg_end_b57473834b877409: function(arg0) {
623
+ arg0.end();
624
+ },
625
+ __wbg_engine_new: function(arg0) {
626
+ const ret = Engine.__wrap(arg0);
627
+ return ret;
628
+ },
629
+ __wbg_error_8c8dff942c7c4f11: function(arg0) {
630
+ const ret = arg0.error;
631
+ return ret;
632
+ },
633
+ __wbg_finish_09ec094c10f41e7b: function(arg0) {
634
+ const ret = arg0.finish();
635
+ return ret;
636
+ },
637
+ __wbg_finish_ec1c191f66a895b1: function(arg0, arg1) {
638
+ const ret = arg0.finish(arg1);
639
+ return ret;
640
+ },
641
+ __wbg_getBindGroupLayout_fb40c3b93d37f466: function(arg0, arg1) {
642
+ const ret = arg0.getBindGroupLayout(arg1 >>> 0);
643
+ return ret;
644
+ },
645
+ __wbg_getContext_635e36719cad2623: function() { return handleError(function (arg0, arg1, arg2) {
646
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
647
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
648
+ }, arguments); },
649
+ __wbg_getContext_e567868594d2e0c6: function() { return handleError(function (arg0, arg1, arg2) {
650
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
651
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
652
+ }, arguments); },
653
+ __wbg_getCurrentTexture_9f3b84d0eaa6cd95: function() { return handleError(function (arg0) {
654
+ const ret = arg0.getCurrentTexture();
655
+ return ret;
656
+ }, arguments); },
657
+ __wbg_getPreferredCanvasFormat_0ef5034c8902201b: function(arg0) {
658
+ const ret = arg0.getPreferredCanvasFormat();
659
+ return (__wbindgen_enum_GpuTextureFormat.indexOf(ret) + 1 || 102) - 1;
660
+ },
661
+ __wbg_get_fd12a9100976c296: function(arg0, arg1) {
662
+ const ret = arg0[arg1 >>> 0];
663
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
664
+ },
665
+ __wbg_gpu_afdd4387c7afe5f9: function(arg0) {
666
+ const ret = arg0.gpu;
667
+ return ret;
668
+ },
669
+ __wbg_info_971d8b9db3dae69f: function(arg0) {
670
+ const ret = arg0.info;
671
+ return ret;
672
+ },
673
+ __wbg_instanceof_GpuOutOfMemoryError_5c3b8a2499f59adb: function(arg0) {
674
+ let result;
675
+ try {
676
+ result = arg0 instanceof GPUOutOfMemoryError;
677
+ } catch (_) {
678
+ result = false;
679
+ }
680
+ const ret = result;
681
+ return ret;
682
+ },
683
+ __wbg_instanceof_GpuValidationError_7659e07b12d4e184: function(arg0) {
684
+ let result;
685
+ try {
686
+ result = arg0 instanceof GPUValidationError;
687
+ } catch (_) {
688
+ result = false;
689
+ }
690
+ const ret = result;
691
+ return ret;
692
+ },
693
+ __wbg_instanceof_Window_82d71df4eddf88bc: function(arg0) {
694
+ let result;
695
+ try {
696
+ result = arg0 instanceof Window;
697
+ } catch (_) {
698
+ result = false;
699
+ }
700
+ const ret = result;
701
+ return ret;
702
+ },
703
+ __wbg_isFallbackAdapter_4c8cc3b18677460a: function(arg0) {
704
+ const ret = arg0.isFallbackAdapter;
705
+ return ret;
706
+ },
707
+ __wbg_label_7add8cb37a6ef98f: function(arg0, arg1) {
708
+ const ret = arg1.label;
709
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
710
+ const len1 = WASM_VECTOR_LEN;
711
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
712
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
713
+ },
714
+ __wbg_limits_06bcb36c8409843b: function(arg0) {
715
+ const ret = arg0.limits;
716
+ return ret;
717
+ },
718
+ __wbg_lost_bb454eb62101af1a: function(arg0) {
719
+ const ret = arg0.lost;
720
+ return ret;
721
+ },
722
+ __wbg_mapAsync_b0597127f5037286: function(arg0, arg1, arg2, arg3) {
723
+ const ret = arg0.mapAsync(arg1 >>> 0, arg2, arg3);
724
+ return ret;
725
+ },
726
+ __wbg_maxBindGroupsPlusVertexBuffers_52369f089736ef9d: function(arg0) {
727
+ const ret = arg0.maxBindGroupsPlusVertexBuffers;
728
+ return ret;
729
+ },
730
+ __wbg_maxBindGroups_4e424afe6ce86ca2: function(arg0) {
731
+ const ret = arg0.maxBindGroups;
732
+ return ret;
733
+ },
734
+ __wbg_maxBindingsPerBindGroup_7d035da36821c44f: function(arg0) {
735
+ const ret = arg0.maxBindingsPerBindGroup;
736
+ return ret;
737
+ },
738
+ __wbg_maxBufferSize_423f4a084e32a195: function(arg0) {
739
+ const ret = arg0.maxBufferSize;
740
+ return ret;
741
+ },
742
+ __wbg_maxColorAttachmentBytesPerSample_c4cd9126f6d287c6: function(arg0) {
743
+ const ret = arg0.maxColorAttachmentBytesPerSample;
744
+ return ret;
745
+ },
746
+ __wbg_maxColorAttachments_d924670762b9e250: function(arg0) {
747
+ const ret = arg0.maxColorAttachments;
748
+ return ret;
749
+ },
750
+ __wbg_maxComputeInvocationsPerWorkgroup_707a3868f7cebb59: function(arg0) {
751
+ const ret = arg0.maxComputeInvocationsPerWorkgroup;
752
+ return ret;
753
+ },
754
+ __wbg_maxComputeWorkgroupSizeX_0a4d99463cbd6e5e: function(arg0) {
755
+ const ret = arg0.maxComputeWorkgroupSizeX;
756
+ return ret;
757
+ },
758
+ __wbg_maxComputeWorkgroupSizeY_85123ea0587f7558: function(arg0) {
759
+ const ret = arg0.maxComputeWorkgroupSizeY;
760
+ return ret;
761
+ },
762
+ __wbg_maxComputeWorkgroupSizeZ_a3186b4c5267d44f: function(arg0) {
763
+ const ret = arg0.maxComputeWorkgroupSizeZ;
764
+ return ret;
765
+ },
766
+ __wbg_maxComputeWorkgroupStorageSize_57b297355cfb6204: function(arg0) {
767
+ const ret = arg0.maxComputeWorkgroupStorageSize;
768
+ return ret;
769
+ },
770
+ __wbg_maxComputeWorkgroupsPerDimension_4158f95e673d54c4: function(arg0) {
771
+ const ret = arg0.maxComputeWorkgroupsPerDimension;
772
+ return ret;
773
+ },
774
+ __wbg_maxDynamicStorageBuffersPerPipelineLayout_226b0b70910aa16c: function(arg0) {
775
+ const ret = arg0.maxDynamicStorageBuffersPerPipelineLayout;
776
+ return ret;
777
+ },
778
+ __wbg_maxDynamicUniformBuffersPerPipelineLayout_0e835fda711fc7e6: function(arg0) {
779
+ const ret = arg0.maxDynamicUniformBuffersPerPipelineLayout;
780
+ return ret;
781
+ },
782
+ __wbg_maxInterStageShaderVariables_8c4a1d727e2aa35a: function(arg0) {
783
+ const ret = arg0.maxInterStageShaderVariables;
784
+ return ret;
785
+ },
786
+ __wbg_maxSampledTexturesPerShaderStage_6675f5e91d9a728a: function(arg0) {
787
+ const ret = arg0.maxSampledTexturesPerShaderStage;
788
+ return ret;
789
+ },
790
+ __wbg_maxSamplersPerShaderStage_1910fa38a6ed1e1f: function(arg0) {
791
+ const ret = arg0.maxSamplersPerShaderStage;
792
+ return ret;
793
+ },
794
+ __wbg_maxStorageBufferBindingSize_2e244bded070b18d: function(arg0) {
795
+ const ret = arg0.maxStorageBufferBindingSize;
796
+ return ret;
797
+ },
798
+ __wbg_maxStorageBuffersPerShaderStage_a285f3ebca51ca0d: function(arg0) {
799
+ const ret = arg0.maxStorageBuffersPerShaderStage;
800
+ return ret;
801
+ },
802
+ __wbg_maxStorageTexturesPerShaderStage_7aa946f0fc322a2b: function(arg0) {
803
+ const ret = arg0.maxStorageTexturesPerShaderStage;
804
+ return ret;
805
+ },
806
+ __wbg_maxTextureArrayLayers_0e699147ad00502d: function(arg0) {
807
+ const ret = arg0.maxTextureArrayLayers;
808
+ return ret;
809
+ },
810
+ __wbg_maxTextureDimension1D_aabf6add54decfe2: function(arg0) {
811
+ const ret = arg0.maxTextureDimension1D;
812
+ return ret;
813
+ },
814
+ __wbg_maxTextureDimension2D_dd598b27e9c0c1c4: function(arg0) {
815
+ const ret = arg0.maxTextureDimension2D;
816
+ return ret;
817
+ },
818
+ __wbg_maxTextureDimension3D_f944266c65dfd1a9: function(arg0) {
819
+ const ret = arg0.maxTextureDimension3D;
820
+ return ret;
821
+ },
822
+ __wbg_maxUniformBufferBindingSize_59fa6be7cfbeeb53: function(arg0) {
823
+ const ret = arg0.maxUniformBufferBindingSize;
824
+ return ret;
825
+ },
826
+ __wbg_maxUniformBuffersPerShaderStage_bee5f00a4d706c7f: function(arg0) {
827
+ const ret = arg0.maxUniformBuffersPerShaderStage;
828
+ return ret;
829
+ },
830
+ __wbg_maxVertexAttributes_5cf6392c4e9033fe: function(arg0) {
831
+ const ret = arg0.maxVertexAttributes;
832
+ return ret;
833
+ },
834
+ __wbg_maxVertexBufferArrayStride_548baa887375d865: function(arg0) {
835
+ const ret = arg0.maxVertexBufferArrayStride;
836
+ return ret;
837
+ },
838
+ __wbg_maxVertexBuffers_75d881156591f5da: function(arg0) {
839
+ const ret = arg0.maxVertexBuffers;
840
+ return ret;
841
+ },
842
+ __wbg_message_2aad50368e15e8f1: function(arg0, arg1) {
843
+ const ret = arg1.message;
844
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
845
+ const len1 = WASM_VECTOR_LEN;
846
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
847
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
848
+ },
849
+ __wbg_message_ab4cad9eeb386607: function(arg0, arg1) {
850
+ const ret = arg1.message;
851
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
852
+ const len1 = WASM_VECTOR_LEN;
853
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
854
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
855
+ },
856
+ __wbg_minStorageBufferOffsetAlignment_5ba9b77792bdadb3: function(arg0) {
857
+ const ret = arg0.minStorageBufferOffsetAlignment;
858
+ return ret;
859
+ },
860
+ __wbg_minUniformBufferOffsetAlignment_ab7d52a5293b22bd: function(arg0) {
861
+ const ret = arg0.minUniformBufferOffsetAlignment;
862
+ return ret;
863
+ },
864
+ __wbg_navigator_2156486643462a87: function(arg0) {
865
+ const ret = arg0.navigator;
866
+ return ret;
867
+ },
868
+ __wbg_navigator_c9bce48d4b578c9c: function(arg0) {
869
+ const ret = arg0.navigator;
870
+ return ret;
871
+ },
872
+ __wbg_new_343a093a3c2ffb4e: function(arg0, arg1) {
873
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
874
+ return ret;
875
+ },
876
+ __wbg_new_5502aad30c185fc8: function(arg0, arg1) {
877
+ try {
878
+ var state0 = {a: arg0, b: arg1};
879
+ var cb0 = (arg0, arg1) => {
880
+ const a = state0.a;
881
+ state0.a = 0;
882
+ try {
883
+ return wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined_______true_(a, state0.b, arg0, arg1);
884
+ } finally {
885
+ state0.a = a;
886
+ }
887
+ };
888
+ const ret = new Promise(cb0);
889
+ return ret;
890
+ } finally {
891
+ state0.a = 0;
892
+ }
893
+ },
894
+ __wbg_new_617a8cdb8bb1130e: function() {
895
+ const ret = new Object();
896
+ return ret;
897
+ },
898
+ __wbg_new_a217df4351db4b9b: function() { return handleError(function (arg0, arg1) {
899
+ const ret = new OffscreenCanvas(arg0 >>> 0, arg1 >>> 0);
900
+ return ret;
901
+ }, arguments); },
902
+ __wbg_new_ee2291f50781bf1d: function() {
903
+ const ret = new Array();
904
+ return ret;
905
+ },
906
+ __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
907
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
908
+ return ret;
909
+ },
910
+ __wbg_new_typed_689a3a281a8d4da6: function() {
911
+ const ret = new Object();
912
+ return ret;
913
+ },
914
+ __wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
915
+ try {
916
+ var state0 = {a: arg0, b: arg1};
917
+ var cb0 = (arg0, arg1) => {
918
+ const a = state0.a;
919
+ state0.a = 0;
920
+ try {
921
+ return wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined_______true_(a, state0.b, arg0, arg1);
922
+ } finally {
923
+ state0.a = a;
924
+ }
925
+ };
926
+ const ret = new Promise(cb0);
927
+ return ret;
928
+ } finally {
929
+ state0.a = 0;
930
+ }
931
+ },
932
+ __wbg_now_e2c6a2dd9302c7d9: function() {
933
+ const ret = performance.now();
934
+ return ret;
935
+ },
936
+ __wbg_onSubmittedWorkDone_1190213cee1ecf7e: function(arg0) {
937
+ const ret = arg0.onSubmittedWorkDone();
938
+ return ret;
939
+ },
940
+ __wbg_popErrorScope_182b8e03671d81ef: function(arg0) {
941
+ const ret = arg0.popErrorScope();
942
+ return ret;
943
+ },
944
+ __wbg_pushErrorScope_fa7df784c43bdb51: function(arg0, arg1) {
945
+ arg0.pushErrorScope(__wbindgen_enum_GpuErrorFilter[arg1]);
946
+ },
947
+ __wbg_push_2baf45db356cf468: function(arg0, arg1) {
948
+ const ret = arg0.push(arg1);
949
+ return ret;
950
+ },
951
+ __wbg_querySelectorAll_6aebfe3df1fb2014: function() { return handleError(function (arg0, arg1, arg2) {
952
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
953
+ return ret;
954
+ }, arguments); },
955
+ __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
956
+ const ret = arg0.queueMicrotask;
957
+ return ret;
958
+ },
959
+ __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
960
+ queueMicrotask(arg0);
961
+ },
962
+ __wbg_queue_7b62c28143d44293: function(arg0) {
963
+ const ret = arg0.queue;
964
+ return ret;
965
+ },
966
+ __wbg_reason_b4fa3af867fc4430: function(arg0) {
967
+ const ret = arg0.reason;
968
+ return (__wbindgen_enum_GpuDeviceLostReason.indexOf(ret) + 1 || 3) - 1;
969
+ },
970
+ __wbg_requestAdapter_a539af006419f2e9: function(arg0, arg1) {
971
+ const ret = arg0.requestAdapter(arg1);
972
+ return ret;
973
+ },
974
+ __wbg_requestDevice_5cb8a582e55d08cb: function(arg0, arg1) {
975
+ const ret = arg0.requestDevice(arg1);
976
+ return ret;
977
+ },
978
+ __wbg_resolve_0076e10020304ede: function(arg0) {
979
+ const ret = Promise.resolve(arg0);
980
+ return ret;
981
+ },
982
+ __wbg_setBindGroup_11bdbb60cc8b54b9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
983
+ arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
984
+ }, arguments); },
985
+ __wbg_setBindGroup_418c3e0eb6943ce0: function(arg0, arg1, arg2) {
986
+ arg0.setBindGroup(arg1 >>> 0, arg2);
987
+ },
988
+ __wbg_setPipeline_b6f981027e02cd16: function(arg0, arg1) {
989
+ arg0.setPipeline(arg1);
990
+ },
991
+ __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
992
+ const ret = Reflect.set(arg0, arg1, arg2);
993
+ return ret;
994
+ }, arguments); },
995
+ __wbg_set_a_82818effc94f6256: function(arg0, arg1) {
996
+ arg0.a = arg1;
997
+ },
998
+ __wbg_set_address_mode_u_a68737cf5d288f95: function(arg0, arg1) {
999
+ arg0.addressModeU = __wbindgen_enum_GpuAddressMode[arg1];
1000
+ },
1001
+ __wbg_set_address_mode_v_b1c3c45933f540d1: function(arg0, arg1) {
1002
+ arg0.addressModeV = __wbindgen_enum_GpuAddressMode[arg1];
1003
+ },
1004
+ __wbg_set_address_mode_w_889c31cf7022c764: function(arg0, arg1) {
1005
+ arg0.addressModeW = __wbindgen_enum_GpuAddressMode[arg1];
1006
+ },
1007
+ __wbg_set_alpha_106f21a936a85eba: function(arg0, arg1) {
1008
+ arg0.alpha = arg1;
1009
+ },
1010
+ __wbg_set_alpha_mode_5544568dbac50280: function(arg0, arg1) {
1011
+ arg0.alphaMode = __wbindgen_enum_GpuCanvasAlphaMode[arg1];
1012
+ },
1013
+ __wbg_set_alpha_to_coverage_enabled_3372ce329447b8f1: function(arg0, arg1) {
1014
+ arg0.alphaToCoverageEnabled = arg1 !== 0;
1015
+ },
1016
+ __wbg_set_array_layer_count_22afa0a979e4ad55: function(arg0, arg1) {
1017
+ arg0.arrayLayerCount = arg1 >>> 0;
1018
+ },
1019
+ __wbg_set_array_stride_f64_6816040e5e7598c3: function(arg0, arg1) {
1020
+ arg0.arrayStride = arg1;
1021
+ },
1022
+ __wbg_set_aspect_a48d046965270281: function(arg0, arg1) {
1023
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
1024
+ },
1025
+ __wbg_set_aspect_b1a9909bf315433f: function(arg0, arg1) {
1026
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
1027
+ },
1028
+ __wbg_set_attributes_9e38cb1dde387a5b: function(arg0, arg1, arg2) {
1029
+ arg0.attributes = getArrayJsValueViewFromWasm0(arg1, arg2);
1030
+ },
1031
+ __wbg_set_b_a3297ee7e7cac3a8: function(arg0, arg1) {
1032
+ arg0.b = arg1;
1033
+ },
1034
+ __wbg_set_base_array_layer_2435ba92c80346ae: function(arg0, arg1) {
1035
+ arg0.baseArrayLayer = arg1 >>> 0;
1036
+ },
1037
+ __wbg_set_base_mip_level_8b6093e875e7c65d: function(arg0, arg1) {
1038
+ arg0.baseMipLevel = arg1 >>> 0;
1039
+ },
1040
+ __wbg_set_beginning_of_pass_write_index_e552c5e8b8bbf52f: function(arg0, arg1) {
1041
+ arg0.beginningOfPassWriteIndex = arg1 >>> 0;
1042
+ },
1043
+ __wbg_set_binding_b6cee57f35ac5190: function(arg0, arg1) {
1044
+ arg0.binding = arg1 >>> 0;
1045
+ },
1046
+ __wbg_set_blend_1a801617945f7945: function(arg0, arg1) {
1047
+ arg0.blend = arg1;
1048
+ },
1049
+ __wbg_set_buffer_1548ae88a9188037: function(arg0, arg1) {
1050
+ arg0.buffer = arg1;
1051
+ },
1052
+ __wbg_set_buffers_5d0e0c50791f710e: function(arg0, arg1, arg2) {
1053
+ arg0.buffers = getArrayJsValueViewFromWasm0(arg1, arg2);
1054
+ },
1055
+ __wbg_set_bytes_per_row_c28583f0063160f1: function(arg0, arg1) {
1056
+ arg0.bytesPerRow = arg1 >>> 0;
1057
+ },
1058
+ __wbg_set_clear_value_gpu_color_dict_a9f763e8372ac1de: function(arg0, arg1) {
1059
+ arg0.clearValue = arg1;
1060
+ },
1061
+ __wbg_set_code_5d5b0b9e2fd0dca7: function(arg0, arg1, arg2) {
1062
+ arg0.code = getStringFromWasm0(arg1, arg2);
1063
+ },
1064
+ __wbg_set_color_8ecace4011f47d2e: function(arg0, arg1) {
1065
+ arg0.color = arg1;
1066
+ },
1067
+ __wbg_set_color_attachments_622fe2d5997fda7a: function(arg0, arg1, arg2) {
1068
+ arg0.colorAttachments = getArrayJsValueViewFromWasm0(arg1, arg2);
1069
+ },
1070
+ __wbg_set_compare_080c9e492ff36990: function(arg0, arg1) {
1071
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
1072
+ },
1073
+ __wbg_set_compare_817cf3695599eaa6: function(arg0, arg1) {
1074
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
1075
+ },
1076
+ __wbg_set_count_8ff0c9474e39a849: function(arg0, arg1) {
1077
+ arg0.count = arg1 >>> 0;
1078
+ },
1079
+ __wbg_set_cull_mode_85d2b4ab0ce3a564: function(arg0, arg1) {
1080
+ arg0.cullMode = __wbindgen_enum_GpuCullMode[arg1];
1081
+ },
1082
+ __wbg_set_depth_bias_95abf479cae3f3cd: function(arg0, arg1) {
1083
+ arg0.depthBias = arg1;
1084
+ },
1085
+ __wbg_set_depth_bias_clamp_ba3d0b8348151350: function(arg0, arg1) {
1086
+ arg0.depthBiasClamp = arg1;
1087
+ },
1088
+ __wbg_set_depth_bias_slope_scale_6b2584d93f5b9cd2: function(arg0, arg1) {
1089
+ arg0.depthBiasSlopeScale = arg1;
1090
+ },
1091
+ __wbg_set_depth_clear_value_e30a4c754c6b3b26: function(arg0, arg1) {
1092
+ arg0.depthClearValue = arg1;
1093
+ },
1094
+ __wbg_set_depth_compare_a90de4e3714397ab: function(arg0, arg1) {
1095
+ arg0.depthCompare = __wbindgen_enum_GpuCompareFunction[arg1];
1096
+ },
1097
+ __wbg_set_depth_fail_op_b5c64541d1b6b482: function(arg0, arg1) {
1098
+ arg0.depthFailOp = __wbindgen_enum_GpuStencilOperation[arg1];
1099
+ },
1100
+ __wbg_set_depth_load_op_932888016d762d3e: function(arg0, arg1) {
1101
+ arg0.depthLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
1102
+ },
1103
+ __wbg_set_depth_or_array_layers_e2f074a0284e4806: function(arg0, arg1) {
1104
+ arg0.depthOrArrayLayers = arg1 >>> 0;
1105
+ },
1106
+ __wbg_set_depth_read_only_be790175a1c2db9a: function(arg0, arg1) {
1107
+ arg0.depthReadOnly = arg1 !== 0;
1108
+ },
1109
+ __wbg_set_depth_stencil_attachment_54a8922f5fbe08bf: function(arg0, arg1) {
1110
+ arg0.depthStencilAttachment = arg1;
1111
+ },
1112
+ __wbg_set_depth_stencil_b7cffc59ad4da529: function(arg0, arg1) {
1113
+ arg0.depthStencil = arg1;
1114
+ },
1115
+ __wbg_set_depth_store_op_9054814f164ab55d: function(arg0, arg1) {
1116
+ arg0.depthStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
1117
+ },
1118
+ __wbg_set_depth_write_enabled_31a821ee1fb3b0b3: function(arg0, arg1) {
1119
+ arg0.depthWriteEnabled = arg1 !== 0;
1120
+ },
1121
+ __wbg_set_device_210484a77b675c9c: function(arg0, arg1) {
1122
+ arg0.device = arg1;
1123
+ },
1124
+ __wbg_set_dimension_3da9d03131a9f446: function(arg0, arg1) {
1125
+ arg0.dimension = __wbindgen_enum_GpuTextureDimension[arg1];
1126
+ },
1127
+ __wbg_set_dimension_56332450afa3e0c0: function(arg0, arg1) {
1128
+ arg0.dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1129
+ },
1130
+ __wbg_set_dst_factor_865ba9aaf187890c: function(arg0, arg1) {
1131
+ arg0.dstFactor = __wbindgen_enum_GpuBlendFactor[arg1];
1132
+ },
1133
+ __wbg_set_end_of_pass_write_index_8f164f9e60d4ad16: function(arg0, arg1) {
1134
+ arg0.endOfPassWriteIndex = arg1 >>> 0;
1135
+ },
1136
+ __wbg_set_entries_f26b77ab9548e906: function(arg0, arg1, arg2) {
1137
+ arg0.entries = getArrayJsValueViewFromWasm0(arg1, arg2);
1138
+ },
1139
+ __wbg_set_entry_point_71cef95c137b5774: function(arg0, arg1, arg2) {
1140
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
1141
+ },
1142
+ __wbg_set_entry_point_b70f98f5025a114d: function(arg0, arg1, arg2) {
1143
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
1144
+ },
1145
+ __wbg_set_fail_op_d59d0187e4111dfe: function(arg0, arg1) {
1146
+ arg0.failOp = __wbindgen_enum_GpuStencilOperation[arg1];
1147
+ },
1148
+ __wbg_set_format_23f7f32549751d43: function(arg0, arg1) {
1149
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1150
+ },
1151
+ __wbg_set_format_283dca56552f07a3: function(arg0, arg1) {
1152
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1153
+ },
1154
+ __wbg_set_format_5080a858117ad2c1: function(arg0, arg1) {
1155
+ arg0.format = __wbindgen_enum_GpuVertexFormat[arg1];
1156
+ },
1157
+ __wbg_set_format_66735b94bd868ba2: function(arg0, arg1) {
1158
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1159
+ },
1160
+ __wbg_set_format_7f2bdbfb101b1ae1: function(arg0, arg1) {
1161
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1162
+ },
1163
+ __wbg_set_format_f009e603f7d4c28e: function(arg0, arg1) {
1164
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1165
+ },
1166
+ __wbg_set_fragment_d2b0ec97d7cf8d47: function(arg0, arg1) {
1167
+ arg0.fragment = arg1;
1168
+ },
1169
+ __wbg_set_front_face_d3f8a2e07e7b25dd: function(arg0, arg1) {
1170
+ arg0.frontFace = __wbindgen_enum_GpuFrontFace[arg1];
1171
+ },
1172
+ __wbg_set_g_b527ee8a9bed553d: function(arg0, arg1) {
1173
+ arg0.g = arg1;
1174
+ },
1175
+ __wbg_set_height_c9789c1c77eaedff: function(arg0, arg1) {
1176
+ arg0.height = arg1 >>> 0;
1177
+ },
1178
+ __wbg_set_height_f6619158e5735877: function(arg0, arg1) {
1179
+ arg0.height = arg1 >>> 0;
1180
+ },
1181
+ __wbg_set_height_fde391767df1ce27: function(arg0, arg1) {
1182
+ arg0.height = arg1 >>> 0;
1183
+ },
1184
+ __wbg_set_label_2fefb39c0e0dbbe8: function(arg0, arg1, arg2) {
1185
+ arg0.label = getStringFromWasm0(arg1, arg2);
1186
+ },
1187
+ __wbg_set_label_3cb2322e6f6db14c: function(arg0, arg1, arg2) {
1188
+ arg0.label = getStringFromWasm0(arg1, arg2);
1189
+ },
1190
+ __wbg_set_label_3f2ccaafef5ff7c9: function(arg0, arg1, arg2) {
1191
+ arg0.label = getStringFromWasm0(arg1, arg2);
1192
+ },
1193
+ __wbg_set_label_70a09ee68d6b1b26: function(arg0, arg1, arg2) {
1194
+ arg0.label = getStringFromWasm0(arg1, arg2);
1195
+ },
1196
+ __wbg_set_label_92cd3811e96b487c: function(arg0, arg1, arg2) {
1197
+ arg0.label = getStringFromWasm0(arg1, arg2);
1198
+ },
1199
+ __wbg_set_label_9c2a186152427ee0: function(arg0, arg1, arg2) {
1200
+ arg0.label = getStringFromWasm0(arg1, arg2);
1201
+ },
1202
+ __wbg_set_label_c3eaf136aa464cba: function(arg0, arg1, arg2) {
1203
+ arg0.label = getStringFromWasm0(arg1, arg2);
1204
+ },
1205
+ __wbg_set_label_c7987704d29f284b: function(arg0, arg1, arg2) {
1206
+ arg0.label = getStringFromWasm0(arg1, arg2);
1207
+ },
1208
+ __wbg_set_label_cfe64bca8945ee30: function(arg0, arg1, arg2) {
1209
+ arg0.label = getStringFromWasm0(arg1, arg2);
1210
+ },
1211
+ __wbg_set_label_e02179cf97e95763: function(arg0, arg1, arg2) {
1212
+ arg0.label = getStringFromWasm0(arg1, arg2);
1213
+ },
1214
+ __wbg_set_label_ee172cd5f6a96961: function(arg0, arg1, arg2) {
1215
+ arg0.label = getStringFromWasm0(arg1, arg2);
1216
+ },
1217
+ __wbg_set_layout_454e3a091b390cd4: function(arg0, arg1) {
1218
+ arg0.layout = arg1;
1219
+ },
1220
+ __wbg_set_layout_75dc1ca3f2421cff: function(arg0, arg1) {
1221
+ arg0.layout = arg1;
1222
+ },
1223
+ __wbg_set_layout_gpu_auto_layout_mode_06a2b95af1043098: function(arg0, arg1) {
1224
+ arg0.layout = __wbindgen_enum_GpuAutoLayoutMode[arg1];
1225
+ },
1226
+ __wbg_set_load_op_c56b1269acc2d51f: function(arg0, arg1) {
1227
+ arg0.loadOp = __wbindgen_enum_GpuLoadOp[arg1];
1228
+ },
1229
+ __wbg_set_lod_max_clamp_db24179f67f3aa31: function(arg0, arg1) {
1230
+ arg0.lodMaxClamp = arg1;
1231
+ },
1232
+ __wbg_set_lod_min_clamp_2bbce566e9fefa04: function(arg0, arg1) {
1233
+ arg0.lodMinClamp = arg1;
1234
+ },
1235
+ __wbg_set_mag_filter_db8e6b42d4f8846d: function(arg0, arg1) {
1236
+ arg0.magFilter = __wbindgen_enum_GpuFilterMode[arg1];
1237
+ },
1238
+ __wbg_set_mapped_at_creation_3f320fef6761b02c: function(arg0, arg1) {
1239
+ arg0.mappedAtCreation = arg1 !== 0;
1240
+ },
1241
+ __wbg_set_mask_c1079e551ec360dc: function(arg0, arg1) {
1242
+ arg0.mask = arg1 >>> 0;
1243
+ },
1244
+ __wbg_set_max_anisotropy_84749fdcec362dc4: function(arg0, arg1) {
1245
+ arg0.maxAnisotropy = arg1;
1246
+ },
1247
+ __wbg_set_min_filter_d435bbfc5a637757: function(arg0, arg1) {
1248
+ arg0.minFilter = __wbindgen_enum_GpuFilterMode[arg1];
1249
+ },
1250
+ __wbg_set_mip_level_count_047936c630acee7b: function(arg0, arg1) {
1251
+ arg0.mipLevelCount = arg1 >>> 0;
1252
+ },
1253
+ __wbg_set_mip_level_count_44bc46a1ae6f6daa: function(arg0, arg1) {
1254
+ arg0.mipLevelCount = arg1 >>> 0;
1255
+ },
1256
+ __wbg_set_mip_level_f3745730372683d5: function(arg0, arg1) {
1257
+ arg0.mipLevel = arg1 >>> 0;
1258
+ },
1259
+ __wbg_set_mipmap_filter_62fb49a84b0747ff: function(arg0, arg1) {
1260
+ arg0.mipmapFilter = __wbindgen_enum_GpuMipmapFilterMode[arg1];
1261
+ },
1262
+ __wbg_set_mode_7edfbc344ef9c650: function(arg0, arg1) {
1263
+ arg0.mode = __wbindgen_enum_GpuCanvasToneMappingMode[arg1];
1264
+ },
1265
+ __wbg_set_module_392eeaa269f203b0: function(arg0, arg1) {
1266
+ arg0.module = arg1;
1267
+ },
1268
+ __wbg_set_module_715d37652c4998ec: function(arg0, arg1) {
1269
+ arg0.module = arg1;
1270
+ },
1271
+ __wbg_set_multisample_ff72a7a5456cbeb7: function(arg0, arg1) {
1272
+ arg0.multisample = arg1;
1273
+ },
1274
+ __wbg_set_offset_f64_127e8a0aa5c5485a: function(arg0, arg1) {
1275
+ arg0.offset = arg1;
1276
+ },
1277
+ __wbg_set_offset_f64_457756429ede426d: function(arg0, arg1) {
1278
+ arg0.offset = arg1;
1279
+ },
1280
+ __wbg_set_offset_f64_a903425d5a8e5815: function(arg0, arg1) {
1281
+ arg0.offset = arg1;
1282
+ },
1283
+ __wbg_set_onuncapturederror_bb813f1102da2296: function(arg0, arg1) {
1284
+ arg0.onuncapturederror = arg1;
1285
+ },
1286
+ __wbg_set_operation_00a77386523b88f9: function(arg0, arg1) {
1287
+ arg0.operation = __wbindgen_enum_GpuBlendOperation[arg1];
1288
+ },
1289
+ __wbg_set_origin_gpu_origin_3d_dict_0619d4860adb4eb6: function(arg0, arg1) {
1290
+ arg0.origin = arg1;
1291
+ },
1292
+ __wbg_set_pass_op_3cf10feb3d76ab97: function(arg0, arg1) {
1293
+ arg0.passOp = __wbindgen_enum_GpuStencilOperation[arg1];
1294
+ },
1295
+ __wbg_set_power_preference_b42d00a8facfbade: function(arg0, arg1) {
1296
+ arg0.powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
1297
+ },
1298
+ __wbg_set_primitive_e796cf76f0ff89f3: function(arg0, arg1) {
1299
+ arg0.primitive = arg1;
1300
+ },
1301
+ __wbg_set_query_set_f030702f1b69199f: function(arg0, arg1) {
1302
+ arg0.querySet = arg1;
1303
+ },
1304
+ __wbg_set_r_6ece4d74af63364f: function(arg0, arg1) {
1305
+ arg0.r = arg1;
1306
+ },
1307
+ __wbg_set_required_features_bbab71414c45e621: function(arg0, arg1, arg2) {
1308
+ arg0.requiredFeatures = getArrayJsValueViewFromWasm0(arg1, arg2);
1309
+ },
1310
+ __wbg_set_required_limits_837f62d865e7cfac: function(arg0, arg1) {
1311
+ arg0.requiredLimits = arg1;
1312
+ },
1313
+ __wbg_set_resolve_target_gpu_texture_view_e4c1e3bbb8c27d87: function(arg0, arg1) {
1314
+ arg0.resolveTarget = arg1;
1315
+ },
1316
+ __wbg_set_resource_8fd8658b30d86ecf: function(arg0, arg1) {
1317
+ arg0.resource = arg1;
1318
+ },
1319
+ __wbg_set_resource_gpu_buffer_binding_33099b25da65b610: function(arg0, arg1) {
1320
+ arg0.resource = arg1;
1321
+ },
1322
+ __wbg_set_resource_gpu_texture_view_4cffe7bc7c8e5cbe: function(arg0, arg1) {
1323
+ arg0.resource = arg1;
1324
+ },
1325
+ __wbg_set_rows_per_image_c6d50d227e634379: function(arg0, arg1) {
1326
+ arg0.rowsPerImage = arg1 >>> 0;
1327
+ },
1328
+ __wbg_set_sample_count_481c255a12054e1d: function(arg0, arg1) {
1329
+ arg0.sampleCount = arg1 >>> 0;
1330
+ },
1331
+ __wbg_set_shader_location_3fb9f6a012eba494: function(arg0, arg1) {
1332
+ arg0.shaderLocation = arg1 >>> 0;
1333
+ },
1334
+ __wbg_set_size_f64_2f591b0654540477: function(arg0, arg1) {
1335
+ arg0.size = arg1;
1336
+ },
1337
+ __wbg_set_size_f64_e844c985b8f95261: function(arg0, arg1) {
1338
+ arg0.size = arg1;
1339
+ },
1340
+ __wbg_set_size_gpu_extent_3d_dict_adf57388ab1d4f18: function(arg0, arg1) {
1341
+ arg0.size = arg1;
1342
+ },
1343
+ __wbg_set_src_factor_6f2c9ec8e4d3d979: function(arg0, arg1) {
1344
+ arg0.srcFactor = __wbindgen_enum_GpuBlendFactor[arg1];
1345
+ },
1346
+ __wbg_set_stencil_back_c54d0443b8b6a957: function(arg0, arg1) {
1347
+ arg0.stencilBack = arg1;
1348
+ },
1349
+ __wbg_set_stencil_clear_value_a321b0e045bfd8c2: function(arg0, arg1) {
1350
+ arg0.stencilClearValue = arg1 >>> 0;
1351
+ },
1352
+ __wbg_set_stencil_front_3ff3f8385852efff: function(arg0, arg1) {
1353
+ arg0.stencilFront = arg1;
1354
+ },
1355
+ __wbg_set_stencil_load_op_37d20deccb26a0f1: function(arg0, arg1) {
1356
+ arg0.stencilLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
1357
+ },
1358
+ __wbg_set_stencil_read_mask_021ef4271b24352c: function(arg0, arg1) {
1359
+ arg0.stencilReadMask = arg1 >>> 0;
1360
+ },
1361
+ __wbg_set_stencil_read_only_75fe66a2356d6e92: function(arg0, arg1) {
1362
+ arg0.stencilReadOnly = arg1 !== 0;
1363
+ },
1364
+ __wbg_set_stencil_store_op_501f91638dd386e6: function(arg0, arg1) {
1365
+ arg0.stencilStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
1366
+ },
1367
+ __wbg_set_stencil_write_mask_ec1c12237e094bdd: function(arg0, arg1) {
1368
+ arg0.stencilWriteMask = arg1 >>> 0;
1369
+ },
1370
+ __wbg_set_step_mode_3cbbdeba1e5dfd62: function(arg0, arg1) {
1371
+ arg0.stepMode = __wbindgen_enum_GpuVertexStepMode[arg1];
1372
+ },
1373
+ __wbg_set_store_op_678f33376d741711: function(arg0, arg1) {
1374
+ arg0.storeOp = __wbindgen_enum_GpuStoreOp[arg1];
1375
+ },
1376
+ __wbg_set_strip_index_format_70313df755145d5e: function(arg0, arg1) {
1377
+ arg0.stripIndexFormat = __wbindgen_enum_GpuIndexFormat[arg1];
1378
+ },
1379
+ __wbg_set_targets_674b33931e512fb1: function(arg0, arg1, arg2) {
1380
+ arg0.targets = getArrayJsValueViewFromWasm0(arg1, arg2);
1381
+ },
1382
+ __wbg_set_texture_95f2bfdf7767e76f: function(arg0, arg1) {
1383
+ arg0.texture = arg1;
1384
+ },
1385
+ __wbg_set_timestamp_writes_de6a09f299b71b76: function(arg0, arg1) {
1386
+ arg0.timestampWrites = arg1;
1387
+ },
1388
+ __wbg_set_tone_mapping_320c1aad31db2e7f: function(arg0, arg1) {
1389
+ arg0.toneMapping = arg1;
1390
+ },
1391
+ __wbg_set_topology_b92cfe523bd9653b: function(arg0, arg1) {
1392
+ arg0.topology = __wbindgen_enum_GpuPrimitiveTopology[arg1];
1393
+ },
1394
+ __wbg_set_unclipped_depth_32b7caf29fa5633d: function(arg0, arg1) {
1395
+ arg0.unclippedDepth = arg1 !== 0;
1396
+ },
1397
+ __wbg_set_usage_1ee33d98267e787d: function(arg0, arg1) {
1398
+ arg0.usage = arg1 >>> 0;
1399
+ },
1400
+ __wbg_set_usage_2365e2704b1fdb10: function(arg0, arg1) {
1401
+ arg0.usage = arg1 >>> 0;
1402
+ },
1403
+ __wbg_set_usage_d53ee6f0c7aedbfa: function(arg0, arg1) {
1404
+ arg0.usage = arg1 >>> 0;
1405
+ },
1406
+ __wbg_set_usage_f3e34822998d2147: function(arg0, arg1) {
1407
+ arg0.usage = arg1 >>> 0;
1408
+ },
1409
+ __wbg_set_vertex_77ed7a1229239b5a: function(arg0, arg1) {
1410
+ arg0.vertex = arg1;
1411
+ },
1412
+ __wbg_set_view_formats_427069064d8b7139: function(arg0, arg1, arg2) {
1413
+ arg0.viewFormats = getArrayJsValueViewFromWasm0(arg1, arg2);
1414
+ },
1415
+ __wbg_set_view_formats_9c2f01a6f3b365c7: function(arg0, arg1, arg2) {
1416
+ arg0.viewFormats = getArrayJsValueViewFromWasm0(arg1, arg2);
1417
+ },
1418
+ __wbg_set_view_gpu_texture_view_35f4655788535c4d: function(arg0, arg1) {
1419
+ arg0.view = arg1;
1420
+ },
1421
+ __wbg_set_view_gpu_texture_view_a532c825c52042c0: function(arg0, arg1) {
1422
+ arg0.view = arg1;
1423
+ },
1424
+ __wbg_set_width_0ca908d167690992: function(arg0, arg1) {
1425
+ arg0.width = arg1 >>> 0;
1426
+ },
1427
+ __wbg_set_width_b0e1267db4b196b5: function(arg0, arg1) {
1428
+ arg0.width = arg1 >>> 0;
1429
+ },
1430
+ __wbg_set_width_b20525f5f4df4eb8: function(arg0, arg1) {
1431
+ arg0.width = arg1 >>> 0;
1432
+ },
1433
+ __wbg_set_write_mask_42d89f182ade6b2d: function(arg0, arg1) {
1434
+ arg0.writeMask = arg1 >>> 0;
1435
+ },
1436
+ __wbg_set_x_f470b03dd54724cd: function(arg0, arg1) {
1437
+ arg0.x = arg1 >>> 0;
1438
+ },
1439
+ __wbg_set_y_4c44eb40ebca5bfc: function(arg0, arg1) {
1440
+ arg0.y = arg1 >>> 0;
1441
+ },
1442
+ __wbg_set_z_2e6820ef0f5821ed: function(arg0, arg1) {
1443
+ arg0.z = arg1 >>> 0;
1444
+ },
1445
+ __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
1446
+ const ret = typeof global === 'undefined' ? null : global;
1447
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1448
+ },
1449
+ __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
1450
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1451
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1452
+ },
1453
+ __wbg_static_accessor_SELF_0b583911f537483a: function() {
1454
+ const ret = typeof self === 'undefined' ? null : self;
1455
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1456
+ },
1457
+ __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
1458
+ const ret = typeof window === 'undefined' ? null : window;
1459
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1460
+ },
1461
+ __wbg_subgroupMaxSize_b43be0aa16182403: function(arg0) {
1462
+ const ret = arg0.subgroupMaxSize;
1463
+ return ret;
1464
+ },
1465
+ __wbg_subgroupMinSize_03feb6ee0cda6775: function(arg0) {
1466
+ const ret = arg0.subgroupMinSize;
1467
+ return ret;
1468
+ },
1469
+ __wbg_submit_077c85cc28e36892: function(arg0, arg1, arg2) {
1470
+ arg0.submit(getArrayJsValueViewFromWasm0(arg1, arg2));
1471
+ },
1472
+ __wbg_then_c8a35d4ad59c6b8e: function(arg0, arg1) {
1473
+ const ret = arg0.then(arg1);
1474
+ return ret;
1475
+ },
1476
+ __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
1477
+ const ret = arg0.then(arg1, arg2);
1478
+ return ret;
1479
+ },
1480
+ __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
1481
+ const ret = arg0.then(arg1);
1482
+ return ret;
1483
+ },
1484
+ __wbg_unconfigure_835307f58dc68d80: function(arg0) {
1485
+ arg0.unconfigure();
1486
+ },
1487
+ __wbg_unmap_6a96b14c9ef5f7f5: function(arg0) {
1488
+ arg0.unmap();
1489
+ },
1490
+ __wbg_valueOf_02fd4d101b7553c7: function(arg0) {
1491
+ const ret = arg0.valueOf();
1492
+ return ret;
1493
+ },
1494
+ __wbg_writeBuffer_f4bb3f54adfe1330: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1495
+ arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
1496
+ }, arguments); },
1497
+ __wbg_writeTexture_30e592e8c061c3d9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1498
+ arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
1499
+ }, arguments); },
1500
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1501
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 311, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1502
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true_);
1503
+ return ret;
1504
+ },
1505
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
1506
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 250, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1507
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true_);
1508
+ return ret;
1509
+ },
1510
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
1511
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 254, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1512
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
1513
+ return ret;
1514
+ },
1515
+ __wbindgen_generic_0000000000000004: function(arg0, arg1) {
1516
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 254, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1517
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__46);
1518
+ return ret;
1519
+ },
1520
+ __wbindgen_generic_0000000000000005: function(arg0, arg1) {
1521
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 250, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1522
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true__47);
1523
+ return ret;
1524
+ },
1525
+ __wbindgen_generic_0000000000000006: function(arg0, arg1) {
1526
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 250, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1527
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true__48);
1528
+ return ret;
1529
+ },
1530
+ __wbindgen_generic_0000000000000007: function(arg0) {
1531
+ // Cast intrinsic for `F64 -> Externref`.
1532
+ const ret = arg0;
1533
+ return ret;
1534
+ },
1535
+ __wbindgen_generic_0000000000000008: function(arg0, arg1) {
1536
+ // Cast intrinsic for `Ref(String) -> Externref`.
1537
+ const ret = getStringFromWasm0(arg0, arg1);
1538
+ return ret;
1539
+ },
1540
+ __wbindgen_init_externref_table: function() {
1541
+ const table = wasm.__wbindgen_externrefs;
1542
+ const offset = table.grow(4);
1543
+ table.set(0, undefined);
1544
+ table.set(offset + 0, undefined);
1545
+ table.set(offset + 1, null);
1546
+ table.set(offset + 2, true);
1547
+ table.set(offset + 3, false);
1548
+ },
1549
+ };
1550
+ return {
1551
+ __proto__: null,
1552
+ "./wraith_engine_bg.js": import0,
1553
+ };
1554
+ }
1555
+
1556
+ function wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_(arg0, arg1, arg2) {
1557
+ wasm.wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_(arg0, arg1, arg2);
1558
+ }
1559
+
1560
+ function wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__46(arg0, arg1, arg2) {
1561
+ wasm.wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__46(arg0, arg1, arg2);
1562
+ }
1563
+
1564
+ function wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true_(arg0, arg1, arg2) {
1565
+ const ret = wasm.wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true_(arg0, arg1, arg2);
1566
+ if (ret[1]) {
1567
+ throw takeFromExternrefTable0(ret[0]);
1568
+ }
1569
+ }
1570
+
1571
+ function wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true_(arg0, arg1, arg2) {
1572
+ const ret = wasm.wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true_(arg0, arg1, arg2);
1573
+ if (ret[1]) {
1574
+ throw takeFromExternrefTable0(ret[0]);
1575
+ }
1576
+ }
1577
+
1578
+ function wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true__47(arg0, arg1, arg2) {
1579
+ const ret = wasm.wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true__47(arg0, arg1, arg2);
1580
+ if (ret[1]) {
1581
+ throw takeFromExternrefTable0(ret[0]);
1582
+ }
1583
+ }
1584
+
1585
+ function wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true__48(arg0, arg1, arg2) {
1586
+ const ret = wasm.wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___wasm_bindgen_6325b3aeff69b3ec___sys__JsNullable_wgpu_766cd644c37f70b3___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6325b3aeff69b3ec___JsError___true__48(arg0, arg1, arg2);
1587
+ if (ret[1]) {
1588
+ throw takeFromExternrefTable0(ret[0]);
1589
+ }
1590
+ }
1591
+
1592
+ function wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1593
+ wasm.wasm_bindgen_6325b3aeff69b3ec___convert__closures_____invoke___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined___js_sys_f456faec7bc9c5ad___Function_fn_wasm_bindgen_6325b3aeff69b3ec___JsValue_____wasm_bindgen_6325b3aeff69b3ec___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1594
+ }
1595
+
1596
+
1597
+ const __wbindgen_enum_GpuAddressMode = ["clamp-to-edge", "repeat", "mirror-repeat"];
1598
+
1599
+
1600
+ const __wbindgen_enum_GpuAutoLayoutMode = ["auto"];
1601
+
1602
+
1603
+ 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"];
1604
+
1605
+
1606
+ const __wbindgen_enum_GpuBlendOperation = ["add", "subtract", "reverse-subtract", "min", "max"];
1607
+
1608
+
1609
+ const __wbindgen_enum_GpuCanvasAlphaMode = ["opaque", "premultiplied"];
1610
+
1611
+
1612
+ const __wbindgen_enum_GpuCanvasToneMappingMode = ["standard", "extended"];
1613
+
1614
+
1615
+ const __wbindgen_enum_GpuCompareFunction = ["never", "less", "equal", "less-equal", "greater", "not-equal", "greater-equal", "always"];
1616
+
1617
+
1618
+ const __wbindgen_enum_GpuCullMode = ["none", "front", "back"];
1619
+
1620
+
1621
+ const __wbindgen_enum_GpuDeviceLostReason = ["unknown", "destroyed"];
1622
+
1623
+
1624
+ const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
1625
+
1626
+
1627
+ const __wbindgen_enum_GpuFilterMode = ["nearest", "linear"];
1628
+
1629
+
1630
+ const __wbindgen_enum_GpuFrontFace = ["ccw", "cw"];
1631
+
1632
+
1633
+ const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"];
1634
+
1635
+
1636
+ const __wbindgen_enum_GpuLoadOp = ["load", "clear"];
1637
+
1638
+
1639
+ const __wbindgen_enum_GpuMipmapFilterMode = ["nearest", "linear"];
1640
+
1641
+
1642
+ const __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
1643
+
1644
+
1645
+ const __wbindgen_enum_GpuPrimitiveTopology = ["point-list", "line-list", "line-strip", "triangle-list", "triangle-strip"];
1646
+
1647
+
1648
+ const __wbindgen_enum_GpuStencilOperation = ["keep", "zero", "replace", "invert", "increment-clamp", "decrement-clamp", "increment-wrap", "decrement-wrap"];
1649
+
1650
+
1651
+ const __wbindgen_enum_GpuStoreOp = ["store", "discard"];
1652
+
1653
+
1654
+ const __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
1655
+
1656
+
1657
+ const __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
1658
+
1659
+
1660
+ 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"];
1661
+
1662
+
1663
+ const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
1664
+
1665
+
1666
+ 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"];
1667
+
1668
+
1669
+ const __wbindgen_enum_GpuVertexStepMode = ["vertex", "instance"];
1670
+ const CompositorFinalization = (typeof FinalizationRegistry === 'undefined')
1671
+ ? { register: () => {}, unregister: () => {} }
1672
+ : new FinalizationRegistry(ptr => wasm.__wbg_compositor_free(ptr, 1));
1673
+ const EngineFinalization = (typeof FinalizationRegistry === 'undefined')
1674
+ ? { register: () => {}, unregister: () => {} }
1675
+ : new FinalizationRegistry(ptr => wasm.__wbg_engine_free(ptr, 1));
1676
+ const HeadlessFinalization = (typeof FinalizationRegistry === 'undefined')
1677
+ ? { register: () => {}, unregister: () => {} }
1678
+ : new FinalizationRegistry(ptr => wasm.__wbg_headless_free(ptr, 1));
1679
+
1680
+ function addToExternrefTable0(obj) {
1681
+ const idx = wasm.__externref_table_alloc();
1682
+ wasm.__wbindgen_externrefs.set(idx, obj);
1683
+ return idx;
1684
+ }
1685
+
1686
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1687
+ ? { register: () => {}, unregister: () => {} }
1688
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
1689
+
1690
+ function debugString(val) {
1691
+ // primitive types
1692
+ const type = typeof val;
1693
+ if (type == 'number' || type == 'boolean' || val == null) {
1694
+ return `${val}`;
1695
+ }
1696
+ if (type == 'string') {
1697
+ return `"${val}"`;
1698
+ }
1699
+ if (type == 'symbol') {
1700
+ const description = val.description;
1701
+ if (description == null) {
1702
+ return 'Symbol';
1703
+ } else {
1704
+ return `Symbol(${description})`;
1705
+ }
1706
+ }
1707
+ if (type == 'function') {
1708
+ const name = val.name;
1709
+ if (typeof name == 'string' && name.length > 0) {
1710
+ return `Function(${name})`;
1711
+ } else {
1712
+ return 'Function';
1713
+ }
1714
+ }
1715
+ // objects
1716
+ if (Array.isArray(val)) {
1717
+ const length = val.length;
1718
+ let debug = '[';
1719
+ if (length > 0) {
1720
+ debug += debugString(val[0]);
1721
+ }
1722
+ for(let i = 1; i < length; i++) {
1723
+ debug += ', ' + debugString(val[i]);
1724
+ }
1725
+ debug += ']';
1726
+ return debug;
1727
+ }
1728
+ // Test for built-in
1729
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1730
+ let className;
1731
+ if (builtInMatches && builtInMatches.length > 1) {
1732
+ className = builtInMatches[1];
1733
+ } else {
1734
+ // Failed to match the standard '[object ClassName]'
1735
+ return toString.call(val);
1736
+ }
1737
+ if (className == 'Object') {
1738
+ // we're a user defined class or Object
1739
+ // JSON.stringify avoids problems with cycles, and is generally much
1740
+ // easier than looping through ownProperties of `val`.
1741
+ try {
1742
+ return 'Object(' + JSON.stringify(val) + ')';
1743
+ } catch (_) {
1744
+ return 'Object';
1745
+ }
1746
+ }
1747
+ // errors
1748
+ if (val instanceof Error) {
1749
+ return `${val.name}: ${val.message}\n${val.stack}`;
1750
+ }
1751
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1752
+ return className;
1753
+ }
1754
+
1755
+ function getArrayF64FromWasm0(ptr, len) {
1756
+ ptr = ptr >>> 0;
1757
+ return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
1758
+ }
1759
+
1760
+ function getArrayJsValueViewFromWasm0(ptr, len) {
1761
+ ptr = ptr >>> 0;
1762
+ const mem = getDataViewMemory0();
1763
+ const result = [];
1764
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
1765
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
1766
+ }
1767
+ return result;
1768
+ }
1769
+
1770
+ function getArrayU32FromWasm0(ptr, len) {
1771
+ ptr = ptr >>> 0;
1772
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
1773
+ }
1774
+
1775
+ function getArrayU8FromWasm0(ptr, len) {
1776
+ ptr = ptr >>> 0;
1777
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1778
+ }
1779
+
1780
+ let cachedDataViewMemory0 = null;
1781
+ function getDataViewMemory0() {
1782
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1783
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1784
+ }
1785
+ return cachedDataViewMemory0;
1786
+ }
1787
+
1788
+ let cachedFloat32ArrayMemory0 = null;
1789
+ function getFloat32ArrayMemory0() {
1790
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
1791
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
1792
+ }
1793
+ return cachedFloat32ArrayMemory0;
1794
+ }
1795
+
1796
+ let cachedFloat64ArrayMemory0 = null;
1797
+ function getFloat64ArrayMemory0() {
1798
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
1799
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
1800
+ }
1801
+ return cachedFloat64ArrayMemory0;
1802
+ }
1803
+
1804
+ function getStringFromWasm0(ptr, len) {
1805
+ return decodeText(ptr >>> 0, len);
1806
+ }
1807
+
1808
+ let cachedUint32ArrayMemory0 = null;
1809
+ function getUint32ArrayMemory0() {
1810
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
1811
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
1812
+ }
1813
+ return cachedUint32ArrayMemory0;
1814
+ }
1815
+
1816
+ let cachedUint8ArrayMemory0 = null;
1817
+ function getUint8ArrayMemory0() {
1818
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1819
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1820
+ }
1821
+ return cachedUint8ArrayMemory0;
1822
+ }
1823
+
1824
+ function handleError(f, args) {
1825
+ try {
1826
+ return f.apply(this, args);
1827
+ } catch (e) {
1828
+ const idx = addToExternrefTable0(e);
1829
+ wasm.__wbindgen_exn_store(idx);
1830
+ }
1831
+ }
1832
+
1833
+ function isLikeNone(x) {
1834
+ return x === undefined || x === null;
1835
+ }
1836
+
1837
+ function makeMutClosure(arg0, arg1, f) {
1838
+ const state = { a: arg0, b: arg1, cnt: 1 };
1839
+ const real = (...args) => {
1840
+
1841
+ // First up with a closure we increment the internal reference
1842
+ // count. This ensures that the Rust closure environment won't
1843
+ // be deallocated while we're invoking it.
1844
+ state.cnt++;
1845
+ const a = state.a;
1846
+ state.a = 0;
1847
+ try {
1848
+ return f(a, state.b, ...args);
1849
+ } finally {
1850
+ state.a = a;
1851
+ real._wbg_cb_unref();
1852
+ }
1853
+ };
1854
+ real._wbg_cb_unref = () => {
1855
+ if (--state.cnt === 0) {
1856
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1857
+ state.a = 0;
1858
+ CLOSURE_DTORS.unregister(state);
1859
+ }
1860
+ };
1861
+ CLOSURE_DTORS.register(real, state, state);
1862
+ return real;
1863
+ }
1864
+
1865
+ function passArray32ToWasm0(arg, malloc) {
1866
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
1867
+ getUint32ArrayMemory0().set(arg, ptr / 4);
1868
+ WASM_VECTOR_LEN = arg.length;
1869
+ return ptr;
1870
+ }
1871
+
1872
+ function passArray8ToWasm0(arg, malloc) {
1873
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
1874
+ getUint8ArrayMemory0().set(arg, ptr / 1);
1875
+ WASM_VECTOR_LEN = arg.length;
1876
+ return ptr;
1877
+ }
1878
+
1879
+ function passArrayF32ToWasm0(arg, malloc) {
1880
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
1881
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
1882
+ WASM_VECTOR_LEN = arg.length;
1883
+ return ptr;
1884
+ }
1885
+
1886
+ function passStringToWasm0(arg, malloc, realloc) {
1887
+ if (realloc === undefined) {
1888
+ const buf = cachedTextEncoder.encode(arg);
1889
+ const ptr = malloc(buf.length, 1) >>> 0;
1890
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1891
+ WASM_VECTOR_LEN = buf.length;
1892
+ return ptr;
1893
+ }
1894
+
1895
+ let len = arg.length;
1896
+ let ptr = malloc(len, 1) >>> 0;
1897
+
1898
+ const mem = getUint8ArrayMemory0();
1899
+
1900
+ let offset = 0;
1901
+
1902
+ for (; offset < len; offset++) {
1903
+ const code = arg.charCodeAt(offset);
1904
+ if (code > 0x7F) break;
1905
+ mem[ptr + offset] = code;
1906
+ }
1907
+ if (offset !== len) {
1908
+ if (offset !== 0) {
1909
+ arg = arg.slice(offset);
1910
+ }
1911
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1912
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1913
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1914
+
1915
+ offset += ret.written;
1916
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1917
+ }
1918
+
1919
+ WASM_VECTOR_LEN = offset;
1920
+ return ptr;
1921
+ }
1922
+
1923
+ function takeFromExternrefTable0(idx) {
1924
+ const value = wasm.__wbindgen_externrefs.get(idx);
1925
+ wasm.__externref_table_dealloc(idx);
1926
+ return value;
1927
+ }
1928
+
1929
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1930
+ cachedTextDecoder.decode();
1931
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1932
+ let numBytesDecoded = 0;
1933
+ function decodeText(ptr, len) {
1934
+ numBytesDecoded += len;
1935
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1936
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1937
+ cachedTextDecoder.decode();
1938
+ numBytesDecoded = len;
1939
+ }
1940
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1941
+ }
1942
+
1943
+ const cachedTextEncoder = new TextEncoder();
1944
+
1945
+ if (!('encodeInto' in cachedTextEncoder)) {
1946
+ cachedTextEncoder.encodeInto = function (arg, view) {
1947
+ const buf = cachedTextEncoder.encode(arg);
1948
+ view.set(buf);
1949
+ return {
1950
+ read: arg.length,
1951
+ written: buf.length
1952
+ };
1953
+ };
1954
+ }
1955
+
1956
+ let WASM_VECTOR_LEN = 0;
1957
+
1958
+ let wasmModule, wasmInstance, wasm;
1959
+ function __wbg_finalize_init(instance, module) {
1960
+ wasmInstance = instance;
1961
+ wasm = instance.exports;
1962
+ wasmModule = module;
1963
+ cachedDataViewMemory0 = null;
1964
+ cachedFloat32ArrayMemory0 = null;
1965
+ cachedFloat64ArrayMemory0 = null;
1966
+ cachedUint32ArrayMemory0 = null;
1967
+ cachedUint8ArrayMemory0 = null;
1968
+ wasm.__wbindgen_start();
1969
+ return wasm;
1970
+ }
1971
+
1972
+ async function __wbg_load(module, imports) {
1973
+ if (typeof Response === 'function' && module instanceof Response) {
1974
+ if (!module.ok) {
1975
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
1976
+ }
1977
+
1978
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1979
+ try {
1980
+ return await WebAssembly.instantiateStreaming(module, imports);
1981
+ } catch (e) {
1982
+ const validResponse = expectedResponseType(module.type);
1983
+
1984
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1985
+ 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);
1986
+
1987
+ } else { throw e; }
1988
+ }
1989
+ }
1990
+
1991
+ const bytes = await module.arrayBuffer();
1992
+ return await WebAssembly.instantiate(bytes, imports);
1993
+ } else {
1994
+ const instance = await WebAssembly.instantiate(module, imports);
1995
+
1996
+ if (instance instanceof WebAssembly.Instance) {
1997
+ return { instance, module };
1998
+ } else {
1999
+ return instance;
2000
+ }
2001
+ }
2002
+
2003
+ function expectedResponseType(type) {
2004
+ switch (type) {
2005
+ case 'basic': case 'cors': case 'default': return true;
2006
+ }
2007
+ return false;
2008
+ }
2009
+ }
2010
+
2011
+ function initSync(module) {
2012
+ if (wasm !== undefined) return wasm;
2013
+
2014
+
2015
+ if (module !== undefined) {
2016
+ if (Object.getPrototypeOf(module) === Object.prototype) {
2017
+ ({module} = module)
2018
+ } else {
2019
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
2020
+ }
2021
+ }
2022
+
2023
+ const imports = __wbg_get_imports();
2024
+ if (!(module instanceof WebAssembly.Module)) {
2025
+ module = new WebAssembly.Module(module);
2026
+ }
2027
+ const instance = new WebAssembly.Instance(module, imports);
2028
+ return __wbg_finalize_init(instance, module);
2029
+ }
2030
+
2031
+ async function __wbg_init(module_or_path) {
2032
+ if (wasm !== undefined) return wasm;
2033
+
2034
+
2035
+ if (module_or_path !== undefined) {
2036
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2037
+ ({module_or_path} = module_or_path)
2038
+ } else {
2039
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
2040
+ }
2041
+ }
2042
+
2043
+ if (module_or_path === undefined) {
2044
+ module_or_path = new URL('wraith_engine_bg.wasm', import.meta.url);
2045
+ }
2046
+ const imports = __wbg_get_imports();
2047
+
2048
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
2049
+ module_or_path = fetch(module_or_path);
2050
+ }
2051
+
2052
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
2053
+
2054
+ return __wbg_finalize_init(instance, module);
2055
+ }
2056
+
2057
+ export { initSync, __wbg_init as default };