@lynx-js/web-core-wasm-canary 0.0.0 → 0.0.1-canary-20260116-ce265e8f

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 (204) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/{LICENSE → LICENSE.txt} +1 -1
  3. package/Notice.txt +1 -0
  4. package/README.md +1 -0
  5. package/binary/client/client.d.ts +263 -0
  6. package/binary/client/client.js +1339 -0
  7. package/binary/client/client_bg.wasm +0 -0
  8. package/binary/client/client_bg.wasm.d.ts +70 -0
  9. package/binary/client/client_debug.d.ts +263 -0
  10. package/binary/client/client_debug.js +1339 -0
  11. package/binary/client/client_debug_bg.wasm +0 -0
  12. package/binary/client/client_debug_bg.wasm.d.ts +70 -0
  13. package/binary/encode/encode.d.ts +157 -0
  14. package/binary/encode/encode.js +17 -0
  15. package/binary/encode/encode_bg.js +749 -0
  16. package/binary/encode/encode_bg.wasm +0 -0
  17. package/binary/encode/encode_bg.wasm.d.ts +50 -0
  18. package/binary/encode/encode_debug.d.ts +157 -0
  19. package/binary/encode/encode_debug.js +17 -0
  20. package/binary/encode/encode_debug_bg.js +822 -0
  21. package/binary/encode/encode_debug_bg.wasm +0 -0
  22. package/binary/encode/encode_debug_bg.wasm.d.ts +50 -0
  23. package/binary/encode/package.json +4 -0
  24. package/css/in_shadow.css +10 -0
  25. package/css/index.css +119 -0
  26. package/dist/client/LynxCrossThreadContext.d.ts +22 -0
  27. package/dist/client/LynxCrossThreadContext.js +44 -0
  28. package/dist/client/background/background-apis/createBackgroundLynx.d.ts +24 -0
  29. package/dist/client/background/background-apis/createBackgroundLynx.js +38 -0
  30. package/dist/client/background/background-apis/createChunkLoading.d.ts +7 -0
  31. package/dist/client/background/background-apis/createChunkLoading.js +66 -0
  32. package/dist/client/background/background-apis/createElement.d.ts +5 -0
  33. package/dist/client/background/background-apis/createElement.js +18 -0
  34. package/dist/client/background/background-apis/createNapiLoader.d.ts +5 -0
  35. package/dist/client/background/background-apis/createNapiLoader.js +23 -0
  36. package/dist/client/background/background-apis/createNativeApp.d.ts +4 -0
  37. package/dist/client/background/background-apis/createNativeApp.js +98 -0
  38. package/dist/client/background/background-apis/createNativeModules.d.ts +3 -0
  39. package/dist/client/background/background-apis/createNativeModules.js +33 -0
  40. package/dist/client/background/background-apis/createPerformanceApis.d.ts +3 -0
  41. package/dist/client/background/background-apis/createPerformanceApis.js +47 -0
  42. package/dist/client/background/background-apis/createTimingSystem.d.ts +8 -0
  43. package/dist/client/background/background-apis/createTimingSystem.js +86 -0
  44. package/dist/client/background/background-apis/crossThreadHandlers/createGetCustomSection.d.ts +3 -0
  45. package/dist/client/background/background-apis/crossThreadHandlers/createGetCustomSection.js +14 -0
  46. package/dist/client/background/background-apis/crossThreadHandlers/createGetPathInfo.d.ts +3 -0
  47. package/dist/client/background/background-apis/crossThreadHandlers/createGetPathInfo.js +23 -0
  48. package/dist/client/background/background-apis/crossThreadHandlers/createInvokeUIMethod.d.ts +3 -0
  49. package/dist/client/background/background-apis/crossThreadHandlers/createInvokeUIMethod.js +24 -0
  50. package/dist/client/background/background-apis/crossThreadHandlers/createJSObjectDestructionObserver.d.ts +2 -0
  51. package/dist/client/background/background-apis/crossThreadHandlers/createJSObjectDestructionObserver.js +12 -0
  52. package/dist/client/background/background-apis/crossThreadHandlers/registerDisposeHandler.d.ts +3 -0
  53. package/dist/client/background/background-apis/crossThreadHandlers/registerDisposeHandler.js +9 -0
  54. package/dist/client/background/background-apis/crossThreadHandlers/registerPublicComponentEventHandler.d.ts +3 -0
  55. package/dist/client/background/background-apis/crossThreadHandlers/registerPublicComponentEventHandler.js +8 -0
  56. package/dist/client/background/background-apis/crossThreadHandlers/registerPublishEventHandler.d.ts +3 -0
  57. package/dist/client/background/background-apis/crossThreadHandlers/registerPublishEventHandler.js +8 -0
  58. package/dist/client/background/background-apis/crossThreadHandlers/registerSendGlobalEvent.d.ts +3 -0
  59. package/dist/client/background/background-apis/crossThreadHandlers/registerSendGlobalEvent.js +10 -0
  60. package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateDataHandler.d.ts +3 -0
  61. package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateDataHandler.js +5 -0
  62. package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateGlobalPropsHandler.d.ts +3 -0
  63. package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateGlobalPropsHandler.js +5 -0
  64. package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateI18nResource.d.ts +3 -0
  65. package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateI18nResource.js +9 -0
  66. package/dist/client/background/background-apis/startBackgroundThread.d.ts +2 -0
  67. package/dist/client/background/background-apis/startBackgroundThread.js +42 -0
  68. package/dist/client/background/index.d.ts +1 -0
  69. package/dist/client/background/index.js +15 -0
  70. package/dist/client/decodeWorker/cssLoader.d.ts +12 -0
  71. package/dist/client/decodeWorker/cssLoader.js +96 -0
  72. package/dist/client/decodeWorker/decode.worker.d.ts +1 -0
  73. package/dist/client/decodeWorker/decode.worker.js +338 -0
  74. package/dist/client/decodeWorker/types.d.ts +32 -0
  75. package/dist/client/decodeWorker/types.js +2 -0
  76. package/dist/client/endpoints.d.ts +53 -0
  77. package/dist/client/endpoints.js +37 -0
  78. package/dist/client/index.d.ts +3 -0
  79. package/dist/client/index.js +3 -0
  80. package/dist/client/mainthread/Background.d.ts +30 -0
  81. package/dist/client/mainthread/Background.js +207 -0
  82. package/dist/client/mainthread/ExposureServices.d.ts +11 -0
  83. package/dist/client/mainthread/ExposureServices.js +211 -0
  84. package/dist/client/mainthread/I18n.d.ts +9 -0
  85. package/dist/client/mainthread/I18n.js +44 -0
  86. package/dist/client/mainthread/LynxView.d.ts +170 -0
  87. package/dist/client/mainthread/LynxView.js +367 -0
  88. package/dist/client/mainthread/LynxViewInstance.d.ts +56 -0
  89. package/dist/client/mainthread/LynxViewInstance.js +196 -0
  90. package/dist/client/mainthread/StyleManager.d.ts +15 -0
  91. package/dist/client/mainthread/StyleManager.js +72 -0
  92. package/dist/client/mainthread/TemplateManager.d.ts +11 -0
  93. package/dist/client/mainthread/TemplateManager.js +257 -0
  94. package/dist/client/mainthread/createIFrameRealm.d.ts +6 -0
  95. package/dist/client/mainthread/createIFrameRealm.js +68 -0
  96. package/dist/client/mainthread/createMainThreadGlobalAPIs.d.ts +3 -0
  97. package/dist/client/mainthread/createMainThreadGlobalAPIs.js +82 -0
  98. package/dist/client/mainthread/crossThreadHandlers/queryNodes.d.ts +3 -0
  99. package/dist/client/mainthread/crossThreadHandlers/queryNodes.js +74 -0
  100. package/dist/client/mainthread/crossThreadHandlers/registerGetPathInfoHandler.d.ts +3 -0
  101. package/dist/client/mainthread/crossThreadHandlers/registerGetPathInfoHandler.js +51 -0
  102. package/dist/client/mainthread/crossThreadHandlers/registerInvokeUIMethodHandler.d.ts +3 -0
  103. package/dist/client/mainthread/crossThreadHandlers/registerInvokeUIMethodHandler.js +49 -0
  104. package/dist/client/mainthread/crossThreadHandlers/registerNapiModulesCallHandler.d.ts +3 -0
  105. package/dist/client/mainthread/crossThreadHandlers/registerNapiModulesCallHandler.js +8 -0
  106. package/dist/client/mainthread/crossThreadHandlers/registerNativeModulesCallHandler.d.ts +3 -0
  107. package/dist/client/mainthread/crossThreadHandlers/registerNativeModulesCallHandler.js +7 -0
  108. package/dist/client/mainthread/crossThreadHandlers/registerSelectComponentHandler.d.ts +3 -0
  109. package/dist/client/mainthread/crossThreadHandlers/registerSelectComponentHandler.js +20 -0
  110. package/dist/client/mainthread/crossThreadHandlers/registerSetNativePropsHandler.d.ts +3 -0
  111. package/dist/client/mainthread/crossThreadHandlers/registerSetNativePropsHandler.js +28 -0
  112. package/dist/client/mainthread/crossThreadHandlers/registerTriggerComponentEventHandler.d.ts +3 -0
  113. package/dist/client/mainthread/crossThreadHandlers/registerTriggerComponentEventHandler.js +12 -0
  114. package/dist/client/mainthread/crossThreadHandlers/registerTriggerElementMethodEndpointHandler.d.ts +3 -0
  115. package/dist/client/mainthread/crossThreadHandlers/registerTriggerElementMethodEndpointHandler.js +29 -0
  116. package/dist/client/mainthread/elementAPIs/WASMJSBinding.d.ts +38 -0
  117. package/dist/client/mainthread/elementAPIs/WASMJSBinding.js +122 -0
  118. package/dist/client/mainthread/elementAPIs/createCrossThreadEvent.d.ts +2 -0
  119. package/dist/client/mainthread/elementAPIs/createCrossThreadEvent.js +77 -0
  120. package/dist/client/mainthread/elementAPIs/createElementAPI.d.ts +3 -0
  121. package/dist/client/mainthread/elementAPIs/createElementAPI.js +346 -0
  122. package/dist/client/mainthread/elementAPIs/index.d.ts +2 -0
  123. package/dist/client/mainthread/elementAPIs/index.js +3 -0
  124. package/dist/client/mainthread/elementAPIs/pureElementPAPIs.d.ts +26 -0
  125. package/dist/client/mainthread/elementAPIs/pureElementPAPIs.js +85 -0
  126. package/dist/client/mainthread/utils/convertLengthToPx.d.ts +1 -0
  127. package/dist/client/mainthread/utils/convertLengthToPx.js +25 -0
  128. package/dist/client/wasm.d.ts +11 -0
  129. package/dist/client/wasm.js +52 -0
  130. package/dist/client/webElementsDynamicLoader.d.ts +8 -0
  131. package/dist/client/webElementsDynamicLoader.js +80 -0
  132. package/dist/client_prod/static/css/async/web-core-main-chunk.css +1 -0
  133. package/dist/client_prod/static/css/client.css +1 -0
  134. package/dist/client_prod/static/js/async/lynx-core-chunk.js +3 -0
  135. package/dist/client_prod/static/js/async/web-core-main-chunk.js +303 -0
  136. package/dist/client_prod/static/js/async/web-core-template-loader-thread.js +8 -0
  137. package/dist/client_prod/static/js/async/web-core-worker-chunk.js +1 -0
  138. package/dist/client_prod/static/js/async/web-elements-audio.js +1 -0
  139. package/dist/client_prod/static/js/async/web-elements-foldview.js +1 -0
  140. package/dist/client_prod/static/js/async/web-elements-input.js +1 -0
  141. package/dist/client_prod/static/js/async/web-elements-list.js +1 -0
  142. package/dist/client_prod/static/js/async/web-elements-overlay.js +1 -0
  143. package/dist/client_prod/static/js/async/web-elements-refrshview.js +1 -0
  144. package/dist/client_prod/static/js/async/web-elements-swiper.js +1 -0
  145. package/dist/client_prod/static/js/async/web-elements-textarea.js +1 -0
  146. package/dist/client_prod/static/js/async/web-elements-viewpager.js +1 -0
  147. package/dist/client_prod/static/js/client.js +2 -0
  148. package/dist/client_prod/static/wasm/7ff75609.module.wasm +0 -0
  149. package/dist/constants.d.ts +58 -0
  150. package/dist/constants.js +114 -0
  151. package/dist/encode/encodeCSS.d.ts +3 -0
  152. package/dist/encode/encodeCSS.js +99 -0
  153. package/dist/encode/encodeElementTemplate.d.ts +2 -0
  154. package/dist/encode/encodeElementTemplate.js +52 -0
  155. package/dist/encode/index.d.ts +1 -0
  156. package/dist/encode/index.js +7 -0
  157. package/dist/encode/webEncoder.d.ts +21 -0
  158. package/dist/encode/webEncoder.js +125 -0
  159. package/dist/types/BTSChunk.d.ts +3 -0
  160. package/dist/types/BTSChunk.js +5 -0
  161. package/dist/types/Cloneable.d.ts +2 -0
  162. package/dist/types/Cloneable.js +2 -0
  163. package/dist/types/DecodedTemplate.d.ts +10 -0
  164. package/dist/types/DecodedTemplate.js +7 -0
  165. package/dist/types/Element.d.ts +35 -0
  166. package/dist/types/Element.js +5 -0
  167. package/dist/types/ElementTemplateData.d.ts +15 -0
  168. package/dist/types/ElementTemplateData.js +7 -0
  169. package/dist/types/EventType.d.ts +56 -0
  170. package/dist/types/EventType.js +5 -0
  171. package/dist/types/I18nTypes.d.ts +21 -0
  172. package/dist/types/I18nTypes.js +2 -0
  173. package/dist/types/IElementPAPI.d.ts +184 -0
  174. package/dist/types/IElementPAPI.js +2 -0
  175. package/dist/types/IMtsBinding.d.ts +11 -0
  176. package/dist/types/IMtsBinding.js +7 -0
  177. package/dist/types/JSRealm.d.ts +5 -0
  178. package/dist/types/JSRealm.js +7 -0
  179. package/dist/types/LynxContextEventTarget.d.ts +12 -0
  180. package/dist/types/LynxContextEventTarget.js +5 -0
  181. package/dist/types/MainThreadLynx.d.ts +15 -0
  182. package/dist/types/MainThreadLynx.js +2 -0
  183. package/dist/types/NapiModules.d.ts +9 -0
  184. package/dist/types/NapiModules.js +5 -0
  185. package/dist/types/NativeApp.d.ts +120 -0
  186. package/dist/types/NativeApp.js +5 -0
  187. package/dist/types/NativeModules.d.ts +2 -0
  188. package/dist/types/NativeModules.js +5 -0
  189. package/dist/types/PageConfig.d.ts +9 -0
  190. package/dist/types/PageConfig.js +2 -0
  191. package/dist/types/ProcessDataCallback.d.ts +1 -0
  192. package/dist/types/ProcessDataCallback.js +2 -0
  193. package/dist/types/TimingAPIs.d.ts +32 -0
  194. package/dist/types/TimingAPIs.js +5 -0
  195. package/dist/types/UpdateDataOptions.d.ts +8 -0
  196. package/dist/types/UpdateDataOptions.js +6 -0
  197. package/dist/types/WorkerStartMessage.d.ts +14 -0
  198. package/dist/types/WorkerStartMessage.js +5 -0
  199. package/dist/types/index.d.ts +20 -0
  200. package/dist/types/index.js +7 -0
  201. package/eslint.config.js +34 -0
  202. package/package.json +87 -4
  203. package/index.js +0 -1
  204. package/selfIdentity.plist +0 -0
@@ -0,0 +1,1339 @@
1
+ let wasm;
2
+
3
+ let cachedUint8ArrayMemory0 = null;
4
+
5
+ function getUint8ArrayMemory0() {
6
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
+ }
9
+ return cachedUint8ArrayMemory0;
10
+ }
11
+
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
+
14
+ cachedTextDecoder.decode();
15
+
16
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ let numBytesDecoded = 0;
18
+ function decodeText(ptr, len) {
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
+ }
27
+
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
+ }
32
+
33
+ function debugString(val) {
34
+ // primitive types
35
+ const type = typeof val;
36
+ if (type == 'number' || type == 'boolean' || val == null) {
37
+ return `${val}`;
38
+ }
39
+ if (type == 'string') {
40
+ return `"${val}"`;
41
+ }
42
+ if (type == 'symbol') {
43
+ const description = val.description;
44
+ if (description == null) {
45
+ return 'Symbol';
46
+ } else {
47
+ return `Symbol(${description})`;
48
+ }
49
+ }
50
+ if (type == 'function') {
51
+ const name = val.name;
52
+ if (typeof name == 'string' && name.length > 0) {
53
+ return `Function(${name})`;
54
+ } else {
55
+ return 'Function';
56
+ }
57
+ }
58
+ // objects
59
+ if (Array.isArray(val)) {
60
+ const length = val.length;
61
+ let debug = '[';
62
+ if (length > 0) {
63
+ debug += debugString(val[0]);
64
+ }
65
+ for(let i = 1; i < length; i++) {
66
+ debug += ', ' + debugString(val[i]);
67
+ }
68
+ debug += ']';
69
+ return debug;
70
+ }
71
+ // Test for built-in
72
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
73
+ let className;
74
+ if (builtInMatches && builtInMatches.length > 1) {
75
+ className = builtInMatches[1];
76
+ } else {
77
+ // Failed to match the standard '[object ClassName]'
78
+ return toString.call(val);
79
+ }
80
+ if (className == 'Object') {
81
+ // we're a user defined class or Object
82
+ // JSON.stringify avoids problems with cycles, and is generally much
83
+ // easier than looping through ownProperties of `val`.
84
+ try {
85
+ return 'Object(' + JSON.stringify(val) + ')';
86
+ } catch (_) {
87
+ return 'Object';
88
+ }
89
+ }
90
+ // errors
91
+ if (val instanceof Error) {
92
+ return `${val.name}: ${val.message}\n${val.stack}`;
93
+ }
94
+ // TODO we could test for more things here, like `Set`s and `Map`s.
95
+ return className;
96
+ }
97
+
98
+ let WASM_VECTOR_LEN = 0;
99
+
100
+ const cachedTextEncoder = new TextEncoder();
101
+
102
+ if (!('encodeInto' in cachedTextEncoder)) {
103
+ cachedTextEncoder.encodeInto = function (arg, view) {
104
+ const buf = cachedTextEncoder.encode(arg);
105
+ view.set(buf);
106
+ return {
107
+ read: arg.length,
108
+ written: buf.length
109
+ };
110
+ }
111
+ }
112
+
113
+ function passStringToWasm0(arg, malloc, realloc) {
114
+
115
+ if (realloc === undefined) {
116
+ const buf = cachedTextEncoder.encode(arg);
117
+ const ptr = malloc(buf.length, 1) >>> 0;
118
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
119
+ WASM_VECTOR_LEN = buf.length;
120
+ return ptr;
121
+ }
122
+
123
+ let len = arg.length;
124
+ let ptr = malloc(len, 1) >>> 0;
125
+
126
+ const mem = getUint8ArrayMemory0();
127
+
128
+ let offset = 0;
129
+
130
+ for (; offset < len; offset++) {
131
+ const code = arg.charCodeAt(offset);
132
+ if (code > 0x7F) break;
133
+ mem[ptr + offset] = code;
134
+ }
135
+
136
+ if (offset !== len) {
137
+ if (offset !== 0) {
138
+ arg = arg.slice(offset);
139
+ }
140
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
141
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
142
+ const ret = cachedTextEncoder.encodeInto(arg, view);
143
+
144
+ offset += ret.written;
145
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
146
+ }
147
+
148
+ WASM_VECTOR_LEN = offset;
149
+ return ptr;
150
+ }
151
+
152
+ let cachedDataViewMemory0 = null;
153
+
154
+ function getDataViewMemory0() {
155
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
156
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
157
+ }
158
+ return cachedDataViewMemory0;
159
+ }
160
+
161
+ function isLikeNone(x) {
162
+ return x === undefined || x === null;
163
+ }
164
+
165
+ function addToExternrefTable0(obj) {
166
+ const idx = wasm.__externref_table_alloc();
167
+ wasm.__wbindgen_externrefs.set(idx, obj);
168
+ return idx;
169
+ }
170
+
171
+ function handleError(f, args) {
172
+ try {
173
+ return f.apply(this, args);
174
+ } catch (e) {
175
+ const idx = addToExternrefTable0(e);
176
+ wasm.__wbindgen_exn_store(idx);
177
+ }
178
+ }
179
+
180
+ function getArrayU8FromWasm0(ptr, len) {
181
+ ptr = ptr >>> 0;
182
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
183
+ }
184
+
185
+ function takeFromExternrefTable0(idx) {
186
+ const value = wasm.__wbindgen_externrefs.get(idx);
187
+ wasm.__externref_table_dealloc(idx);
188
+ return value;
189
+ }
190
+
191
+ function _assertClass(instance, klass) {
192
+ if (!(instance instanceof klass)) {
193
+ throw new Error(`expected instance of ${klass.name}`);
194
+ }
195
+ }
196
+
197
+ function getArrayJsValueFromWasm0(ptr, len) {
198
+ ptr = ptr >>> 0;
199
+ const mem = getDataViewMemory0();
200
+ const result = [];
201
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
202
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
203
+ }
204
+ wasm.__externref_drop_slice(ptr, len);
205
+ return result;
206
+ }
207
+
208
+ let cachedUint32ArrayMemory0 = null;
209
+
210
+ function getUint32ArrayMemory0() {
211
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
212
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
213
+ }
214
+ return cachedUint32ArrayMemory0;
215
+ }
216
+
217
+ function passArray32ToWasm0(arg, malloc) {
218
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
219
+ getUint32ArrayMemory0().set(arg, ptr / 4);
220
+ WASM_VECTOR_LEN = arg.length;
221
+ return ptr;
222
+ }
223
+
224
+ function passArrayJsValueToWasm0(array, malloc) {
225
+ const ptr = malloc(array.length * 4, 4) >>> 0;
226
+ for (let i = 0; i < array.length; i++) {
227
+ const add = addToExternrefTable0(array[i]);
228
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
229
+ }
230
+ WASM_VECTOR_LEN = array.length;
231
+ return ptr;
232
+ }
233
+
234
+ const DecodedStyleDataFinalization = (typeof FinalizationRegistry === 'undefined')
235
+ ? { register: () => {}, unregister: () => {} }
236
+ : new FinalizationRegistry(ptr => wasm.__wbg_decodedstyledata_free(ptr >>> 0, 1));
237
+
238
+ export class DecodedStyleData {
239
+
240
+ __destroy_into_raw() {
241
+ const ptr = this.__wbg_ptr;
242
+ this.__wbg_ptr = 0;
243
+ DecodedStyleDataFinalization.unregister(this);
244
+ return ptr;
245
+ }
246
+
247
+ free() {
248
+ const ptr = this.__destroy_into_raw();
249
+ wasm.__wbg_decodedstyledata_free(ptr, 0);
250
+ }
251
+ /**
252
+ * @param {Uint8Array} buffer
253
+ */
254
+ constructor(buffer) {
255
+ const ret = wasm.decodedstyledata_new(buffer);
256
+ if (ret[2]) {
257
+ throw takeFromExternrefTable0(ret[1]);
258
+ }
259
+ this.__wbg_ptr = ret[0] >>> 0;
260
+ DecodedStyleDataFinalization.register(this, this.__wbg_ptr, this);
261
+ return this;
262
+ }
263
+ /**
264
+ * @returns {string}
265
+ */
266
+ get style_content() {
267
+ let deferred1_0;
268
+ let deferred1_1;
269
+ try {
270
+ const ret = wasm.decodedstyledata_style_content(this.__wbg_ptr);
271
+ deferred1_0 = ret[0];
272
+ deferred1_1 = ret[1];
273
+ return getStringFromWasm0(ret[0], ret[1]);
274
+ } finally {
275
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
276
+ }
277
+ }
278
+ /**
279
+ * @returns {string}
280
+ */
281
+ get font_face_content() {
282
+ let deferred1_0;
283
+ let deferred1_1;
284
+ try {
285
+ const ret = wasm.decodedstyledata_font_face_content(this.__wbg_ptr);
286
+ deferred1_0 = ret[0];
287
+ deferred1_1 = ret[1];
288
+ return getStringFromWasm0(ret[0], ret[1]);
289
+ } finally {
290
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
291
+ }
292
+ }
293
+ /**
294
+ * @param {number} css_id
295
+ * @param {string[]} class_name
296
+ * @returns {string}
297
+ */
298
+ query_css_og_declarations_by_css_id(css_id, class_name) {
299
+ let deferred2_0;
300
+ let deferred2_1;
301
+ try {
302
+ const ptr0 = passArrayJsValueToWasm0(class_name, wasm.__wbindgen_malloc);
303
+ const len0 = WASM_VECTOR_LEN;
304
+ const ret = wasm.decodedstyledata_query_css_og_declarations_by_css_id(this.__wbg_ptr, css_id, ptr0, len0);
305
+ deferred2_0 = ret[0];
306
+ deferred2_1 = ret[1];
307
+ return getStringFromWasm0(ret[0], ret[1]);
308
+ } finally {
309
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
310
+ }
311
+ }
312
+ /**
313
+ * @param {Uint8Array} buffer
314
+ * @param {string | null | undefined} entry_name
315
+ * @param {boolean} config_enable_css_selector
316
+ * @returns {Uint8Array}
317
+ */
318
+ static decode_into(buffer, entry_name, config_enable_css_selector) {
319
+ var ptr0 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
320
+ var len0 = WASM_VECTOR_LEN;
321
+ const ret = wasm.decodedstyledata_decode_into(buffer, ptr0, len0, config_enable_css_selector);
322
+ if (ret[2]) {
323
+ throw takeFromExternrefTable0(ret[1]);
324
+ }
325
+ return takeFromExternrefTable0(ret[0]);
326
+ }
327
+ /**
328
+ * @param {RawStyleInfo} raw_style_info
329
+ * @param {boolean} config_enable_css_selector
330
+ * @param {string | null} [entry_name]
331
+ * @returns {Uint8Array}
332
+ */
333
+ static encode_from_raw_style_info(raw_style_info, config_enable_css_selector, entry_name) {
334
+ _assertClass(raw_style_info, RawStyleInfo);
335
+ var ptr0 = raw_style_info.__destroy_into_raw();
336
+ var ptr1 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
337
+ var len1 = WASM_VECTOR_LEN;
338
+ const ret = wasm.decodedstyledata_encode_from_raw_style_info(ptr0, config_enable_css_selector, ptr1, len1);
339
+ if (ret[2]) {
340
+ throw takeFromExternrefTable0(ret[1]);
341
+ }
342
+ return takeFromExternrefTable0(ret[0]);
343
+ }
344
+ }
345
+ if (Symbol.dispose) DecodedStyleData.prototype[Symbol.dispose] = DecodedStyleData.prototype.free;
346
+
347
+ const ElementTemplateSectionFinalization = (typeof FinalizationRegistry === 'undefined')
348
+ ? { register: () => {}, unregister: () => {} }
349
+ : new FinalizationRegistry(ptr => wasm.__wbg_elementtemplatesection_free(ptr >>> 0, 1));
350
+
351
+ export class ElementTemplateSection {
352
+
353
+ static __wrap(ptr) {
354
+ ptr = ptr >>> 0;
355
+ const obj = Object.create(ElementTemplateSection.prototype);
356
+ obj.__wbg_ptr = ptr;
357
+ ElementTemplateSectionFinalization.register(obj, obj.__wbg_ptr, obj);
358
+ return obj;
359
+ }
360
+
361
+ __destroy_into_raw() {
362
+ const ptr = this.__wbg_ptr;
363
+ this.__wbg_ptr = 0;
364
+ ElementTemplateSectionFinalization.unregister(this);
365
+ return ptr;
366
+ }
367
+
368
+ free() {
369
+ const ptr = this.__destroy_into_raw();
370
+ wasm.__wbg_elementtemplatesection_free(ptr, 0);
371
+ }
372
+ /**
373
+ * @param {Uint8Array} buffer
374
+ * @returns {ElementTemplateSection}
375
+ */
376
+ static from_encoded(buffer) {
377
+ const ret = wasm.elementtemplatesection_from_encoded(buffer);
378
+ if (ret[2]) {
379
+ throw takeFromExternrefTable0(ret[1]);
380
+ }
381
+ return ElementTemplateSection.__wrap(ret[0]);
382
+ }
383
+ }
384
+ if (Symbol.dispose) ElementTemplateSection.prototype[Symbol.dispose] = ElementTemplateSection.prototype.free;
385
+
386
+ const EventInfoFinalization = (typeof FinalizationRegistry === 'undefined')
387
+ ? { register: () => {}, unregister: () => {} }
388
+ : new FinalizationRegistry(ptr => wasm.__wbg_eventinfo_free(ptr >>> 0, 1));
389
+ /**
390
+ *
391
+ * * for return of __GetEvents
392
+ *
393
+ */
394
+ export class EventInfo {
395
+
396
+ static __wrap(ptr) {
397
+ ptr = ptr >>> 0;
398
+ const obj = Object.create(EventInfo.prototype);
399
+ obj.__wbg_ptr = ptr;
400
+ EventInfoFinalization.register(obj, obj.__wbg_ptr, obj);
401
+ return obj;
402
+ }
403
+
404
+ __destroy_into_raw() {
405
+ const ptr = this.__wbg_ptr;
406
+ this.__wbg_ptr = 0;
407
+ EventInfoFinalization.unregister(this);
408
+ return ptr;
409
+ }
410
+
411
+ free() {
412
+ const ptr = this.__destroy_into_raw();
413
+ wasm.__wbg_eventinfo_free(ptr, 0);
414
+ }
415
+ /**
416
+ * @returns {string}
417
+ */
418
+ get name() {
419
+ let deferred1_0;
420
+ let deferred1_1;
421
+ try {
422
+ const ret = wasm.__wbg_get_eventinfo_name(this.__wbg_ptr);
423
+ deferred1_0 = ret[0];
424
+ deferred1_1 = ret[1];
425
+ return getStringFromWasm0(ret[0], ret[1]);
426
+ } finally {
427
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
428
+ }
429
+ }
430
+ /**
431
+ * @param {string} arg0
432
+ */
433
+ set name(arg0) {
434
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
435
+ const len0 = WASM_VECTOR_LEN;
436
+ wasm.__wbg_set_eventinfo_name(this.__wbg_ptr, ptr0, len0);
437
+ }
438
+ /**
439
+ * @returns {string}
440
+ */
441
+ get type() {
442
+ let deferred1_0;
443
+ let deferred1_1;
444
+ try {
445
+ const ret = wasm.__wbg_get_eventinfo_type(this.__wbg_ptr);
446
+ deferred1_0 = ret[0];
447
+ deferred1_1 = ret[1];
448
+ return getStringFromWasm0(ret[0], ret[1]);
449
+ } finally {
450
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
451
+ }
452
+ }
453
+ /**
454
+ * @param {string} arg0
455
+ */
456
+ set type(arg0) {
457
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
458
+ const len0 = WASM_VECTOR_LEN;
459
+ wasm.__wbg_set_eventinfo_type(this.__wbg_ptr, ptr0, len0);
460
+ }
461
+ /**
462
+ * @returns {any}
463
+ */
464
+ get function() {
465
+ const ret = wasm.__wbg_get_eventinfo_function(this.__wbg_ptr);
466
+ return ret;
467
+ }
468
+ /**
469
+ * @param {any} arg0
470
+ */
471
+ set function(arg0) {
472
+ wasm.__wbg_set_eventinfo_function(this.__wbg_ptr, arg0);
473
+ }
474
+ }
475
+ if (Symbol.dispose) EventInfo.prototype[Symbol.dispose] = EventInfo.prototype.free;
476
+
477
+ const MainThreadWasmContextFinalization = (typeof FinalizationRegistry === 'undefined')
478
+ ? { register: () => {}, unregister: () => {} }
479
+ : new FinalizationRegistry(ptr => wasm.__wbg_mainthreadwasmcontext_free(ptr >>> 0, 1));
480
+
481
+ export class MainThreadWasmContext {
482
+
483
+ __destroy_into_raw() {
484
+ const ptr = this.__wbg_ptr;
485
+ this.__wbg_ptr = 0;
486
+ MainThreadWasmContextFinalization.unregister(this);
487
+ return ptr;
488
+ }
489
+
490
+ free() {
491
+ const ptr = this.__destroy_into_raw();
492
+ wasm.__wbg_mainthreadwasmcontext_free(ptr, 0);
493
+ }
494
+ /**
495
+ * @param {number} unique_id
496
+ * @returns {string | undefined}
497
+ */
498
+ __GetComponentID(unique_id) {
499
+ const ret = wasm.mainthreadwasmcontext___GetComponentID(this.__wbg_ptr, unique_id);
500
+ if (ret[3]) {
501
+ throw takeFromExternrefTable0(ret[2]);
502
+ }
503
+ let v1;
504
+ if (ret[0] !== 0) {
505
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
506
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
507
+ }
508
+ return v1;
509
+ }
510
+ /**
511
+ * @param {number} unique_id
512
+ * @returns {object | undefined}
513
+ */
514
+ __GetElementConfig(unique_id) {
515
+ const ret = wasm.mainthreadwasmcontext___GetElementConfig(this.__wbg_ptr, unique_id);
516
+ if (ret[2]) {
517
+ throw takeFromExternrefTable0(ret[1]);
518
+ }
519
+ return takeFromExternrefTable0(ret[0]);
520
+ }
521
+ /**
522
+ *
523
+ * * key: String
524
+ * * value: stringifyed js value
525
+ *
526
+ * @param {number} unique_id
527
+ * @param {object} config
528
+ */
529
+ __SetConfig(unique_id, config) {
530
+ const ret = wasm.mainthreadwasmcontext___SetConfig(this.__wbg_ptr, unique_id, config);
531
+ if (ret[1]) {
532
+ throw takeFromExternrefTable0(ret[0]);
533
+ }
534
+ }
535
+ /**
536
+ * @param {number} unique_id
537
+ * @returns {object}
538
+ */
539
+ __GetConfig(unique_id) {
540
+ const ret = wasm.mainthreadwasmcontext___GetConfig(this.__wbg_ptr, unique_id);
541
+ if (ret[2]) {
542
+ throw takeFromExternrefTable0(ret[1]);
543
+ }
544
+ return takeFromExternrefTable0(ret[0]);
545
+ }
546
+ /**
547
+ * @param {number} unique_id
548
+ * @param {string | null} [component_id]
549
+ */
550
+ __UpdateComponentID(unique_id, component_id) {
551
+ var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
552
+ var len0 = WASM_VECTOR_LEN;
553
+ const ret = wasm.mainthreadwasmcontext___UpdateComponentID(this.__wbg_ptr, unique_id, ptr0, len0);
554
+ if (ret[1]) {
555
+ throw takeFromExternrefTable0(ret[0]);
556
+ }
557
+ }
558
+ /**
559
+ * @param {number} unique_id
560
+ * @param {HTMLElement} dom
561
+ * @param {object} new_dataset
562
+ */
563
+ __SetDataset(unique_id, dom, new_dataset) {
564
+ const ret = wasm.mainthreadwasmcontext___SetDataset(this.__wbg_ptr, unique_id, dom, new_dataset);
565
+ if (ret[1]) {
566
+ throw takeFromExternrefTable0(ret[0]);
567
+ }
568
+ }
569
+ /**
570
+ * @param {number} unique_id
571
+ * @param {any} key
572
+ * @param {any} value
573
+ */
574
+ __AddDataset(unique_id, key, value) {
575
+ const ret = wasm.mainthreadwasmcontext___AddDataset(this.__wbg_ptr, unique_id, key, value);
576
+ if (ret[1]) {
577
+ throw takeFromExternrefTable0(ret[0]);
578
+ }
579
+ }
580
+ /**
581
+ * @param {number} unique_id
582
+ * @returns {object}
583
+ */
584
+ __GetDataset(unique_id) {
585
+ const ret = wasm.mainthreadwasmcontext___GetDataset(this.__wbg_ptr, unique_id);
586
+ if (ret[2]) {
587
+ throw takeFromExternrefTable0(ret[1]);
588
+ }
589
+ return takeFromExternrefTable0(ret[0]);
590
+ }
591
+ /**
592
+ * @param {number} unique_id
593
+ * @param {string} key
594
+ * @returns {any}
595
+ */
596
+ __GetDataByKey(unique_id, key) {
597
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
598
+ const len0 = WASM_VECTOR_LEN;
599
+ const ret = wasm.mainthreadwasmcontext___GetDataByKey(this.__wbg_ptr, unique_id, ptr0, len0);
600
+ if (ret[2]) {
601
+ throw takeFromExternrefTable0(ret[1]);
602
+ }
603
+ return takeFromExternrefTable0(ret[0]);
604
+ }
605
+ /**
606
+ * @param {number} parent_component_unique_id
607
+ * @param {string} template_url
608
+ * @param {string} element_template_name
609
+ * @param {ElementTemplateSection} element_template_section
610
+ * @returns {Element}
611
+ */
612
+ _wasm_elementFromBinary(parent_component_unique_id, template_url, element_template_name, element_template_section) {
613
+ const ptr0 = passStringToWasm0(template_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
614
+ const len0 = WASM_VECTOR_LEN;
615
+ const ptr1 = passStringToWasm0(element_template_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
616
+ const len1 = WASM_VECTOR_LEN;
617
+ _assertClass(element_template_section, ElementTemplateSection);
618
+ const ret = wasm.mainthreadwasmcontext__wasm_elementFromBinary(this.__wbg_ptr, parent_component_unique_id, ptr0, len0, ptr1, len1, element_template_section.__wbg_ptr);
619
+ if (ret[2]) {
620
+ throw takeFromExternrefTable0(ret[1]);
621
+ }
622
+ return takeFromExternrefTable0(ret[0]);
623
+ }
624
+ /**
625
+ * @param {number} unique_id
626
+ * @param {string} event_type
627
+ * @param {string} event_name
628
+ * @param {string | null} [event_handler_identifier]
629
+ */
630
+ __wasm_add_event_bts(unique_id, event_type, event_name, event_handler_identifier) {
631
+ const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
632
+ const len0 = WASM_VECTOR_LEN;
633
+ const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
634
+ const len1 = WASM_VECTOR_LEN;
635
+ var ptr2 = isLikeNone(event_handler_identifier) ? 0 : passStringToWasm0(event_handler_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
636
+ var len2 = WASM_VECTOR_LEN;
637
+ wasm.mainthreadwasmcontext___wasm_add_event_bts(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, ptr2, len2);
638
+ }
639
+ /**
640
+ * @param {number} unique_id
641
+ * @param {string} event_type
642
+ * @param {string} event_name
643
+ * @param {any | null} [event_handler_identifier]
644
+ */
645
+ __wasm_add_event_run_worklet(unique_id, event_type, event_name, event_handler_identifier) {
646
+ const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
647
+ const len0 = WASM_VECTOR_LEN;
648
+ const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
649
+ const len1 = WASM_VECTOR_LEN;
650
+ wasm.mainthreadwasmcontext___wasm_add_event_run_worklet(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, isLikeNone(event_handler_identifier) ? 0 : addToExternrefTable0(event_handler_identifier));
651
+ }
652
+ /**
653
+ * @param {number} unique_id
654
+ * @param {string} event_name
655
+ * @param {string} event_type
656
+ * @returns {any}
657
+ */
658
+ __GetEvent(unique_id, event_name, event_type) {
659
+ const ptr0 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
660
+ const len0 = WASM_VECTOR_LEN;
661
+ const ptr1 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
662
+ const len1 = WASM_VECTOR_LEN;
663
+ const ret = wasm.mainthreadwasmcontext___GetEvent(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1);
664
+ return ret;
665
+ }
666
+ /**
667
+ * @param {number} unique_id
668
+ * @returns {EventInfo[]}
669
+ */
670
+ __GetEvents(unique_id) {
671
+ const ret = wasm.mainthreadwasmcontext___GetEvents(this.__wbg_ptr, unique_id);
672
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
673
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
674
+ return v1;
675
+ }
676
+ /**
677
+ * @param {Uint32Array} bubble_unique_id_path
678
+ * @param {string} event_name
679
+ * @param {boolean} is_capture
680
+ * @param {any} serialized_event
681
+ * @returns {boolean}
682
+ */
683
+ dispatch_event_by_path(bubble_unique_id_path, event_name, is_capture, serialized_event) {
684
+ const ptr0 = passArray32ToWasm0(bubble_unique_id_path, wasm.__wbindgen_malloc);
685
+ const len0 = WASM_VECTOR_LEN;
686
+ const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
687
+ const len1 = WASM_VECTOR_LEN;
688
+ const ret = wasm.mainthreadwasmcontext_dispatch_event_by_path(this.__wbg_ptr, ptr0, len0, ptr1, len1, is_capture, serialized_event);
689
+ return ret !== 0;
690
+ }
691
+ /**
692
+ * @param {any} event
693
+ * @param {Uint32Array} bubble_unique_id_path
694
+ * @param {string} event_name
695
+ */
696
+ __wasm_commonEventHandler(event, bubble_unique_id_path, event_name) {
697
+ const ptr0 = passArray32ToWasm0(bubble_unique_id_path, wasm.__wbindgen_malloc);
698
+ const len0 = WASM_VECTOR_LEN;
699
+ const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
700
+ const len1 = WASM_VECTOR_LEN;
701
+ wasm.mainthreadwasmcontext___wasm_commonEventHandler(this.__wbg_ptr, event, ptr0, len0, ptr1, len1);
702
+ }
703
+ /**
704
+ * @param {Uint32Array} elements_unique_id
705
+ * @param {number} css_id
706
+ */
707
+ __wasm_set_css_id(elements_unique_id, css_id) {
708
+ const ptr0 = passArray32ToWasm0(elements_unique_id, wasm.__wbindgen_malloc);
709
+ const len0 = WASM_VECTOR_LEN;
710
+ wasm.mainthreadwasmcontext___wasm_set_css_id(this.__wbg_ptr, ptr0, len0, css_id);
711
+ }
712
+ /**
713
+ *
714
+ * * The key could be string or number
715
+ * * The value could be string or number or null or undefined
716
+ *
717
+ * @param {HTMLElement} dom
718
+ * @param {string} key
719
+ * @param {string | null} [value]
720
+ */
721
+ __wasm_AddInlineStyle_str_key(dom, key, value) {
722
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
723
+ const len0 = WASM_VECTOR_LEN;
724
+ var ptr1 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
725
+ var len1 = WASM_VECTOR_LEN;
726
+ wasm.mainthreadwasmcontext___wasm_AddInlineStyle_str_key(this.__wbg_ptr, dom, ptr0, len0, ptr1, len1);
727
+ }
728
+ /**
729
+ * @param {HTMLElement} dom
730
+ * @param {number} key
731
+ * @param {string | null} [value]
732
+ */
733
+ __wasm_AddInlineStyle_number_key(dom, key, value) {
734
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
735
+ var len0 = WASM_VECTOR_LEN;
736
+ wasm.mainthreadwasmcontext___wasm_AddInlineStyle_number_key(this.__wbg_ptr, dom, key, ptr0, len0);
737
+ }
738
+ /**
739
+ * @param {HTMLElement} dom
740
+ * @param {string} styles
741
+ * @returns {boolean}
742
+ */
743
+ __wasm_SetInlineStyles(dom, styles) {
744
+ const ptr0 = passStringToWasm0(styles, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
745
+ const len0 = WASM_VECTOR_LEN;
746
+ const ret = wasm.mainthreadwasmcontext___wasm_SetInlineStyles(this.__wbg_ptr, dom, ptr0, len0);
747
+ return ret !== 0;
748
+ }
749
+ /**
750
+ * @param {Document} document
751
+ * @param {Node} root_node
752
+ * @param {any} mts_binding
753
+ * @param {any} unique_id_symbol
754
+ * @param {boolean} config_enable_css_selector
755
+ */
756
+ constructor(document, root_node, mts_binding, unique_id_symbol, config_enable_css_selector) {
757
+ const ret = wasm.mainthreadwasmcontext_new(document, root_node, mts_binding, unique_id_symbol, config_enable_css_selector);
758
+ this.__wbg_ptr = ret >>> 0;
759
+ MainThreadWasmContextFinalization.register(this, this.__wbg_ptr, this);
760
+ return this;
761
+ }
762
+ /**
763
+ * @param {number} unique_id
764
+ */
765
+ __wasm_set_page_element_unique_id(unique_id) {
766
+ wasm.mainthreadwasmcontext___wasm_set_page_element_unique_id(this.__wbg_ptr, unique_id);
767
+ }
768
+ /**
769
+ * @param {number} parent_component_unique_id
770
+ * @param {HTMLElement} dom
771
+ * @param {number | null} [css_id]
772
+ * @param {string | null} [component_id]
773
+ * @returns {number}
774
+ */
775
+ __CreateElementCommon(parent_component_unique_id, dom, css_id, component_id) {
776
+ var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
777
+ var len0 = WASM_VECTOR_LEN;
778
+ const ret = wasm.mainthreadwasmcontext___CreateElementCommon(this.__wbg_ptr, parent_component_unique_id, dom, isLikeNone(css_id) ? 0x100000001 : (css_id) >> 0, ptr0, len0);
779
+ return ret >>> 0;
780
+ }
781
+ /**
782
+ * @returns {string[]}
783
+ */
784
+ __wasm_take_timing_flags() {
785
+ const ret = wasm.mainthreadwasmcontext___wasm_take_timing_flags(this.__wbg_ptr);
786
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
787
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
788
+ return v1;
789
+ }
790
+ /**
791
+ * @param {string} component_id
792
+ * @returns {number | undefined}
793
+ */
794
+ __wasm_get_unique_id_by_component_id(component_id) {
795
+ const ptr0 = passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
796
+ const len0 = WASM_VECTOR_LEN;
797
+ const ret = wasm.mainthreadwasmcontext___wasm_get_unique_id_by_component_id(this.__wbg_ptr, ptr0, len0);
798
+ return ret === 0x100000001 ? undefined : ret;
799
+ }
800
+ /**
801
+ * @param {number} unique_id
802
+ * @returns {number | undefined}
803
+ */
804
+ __wasm_get_css_id_by_unique_id(unique_id) {
805
+ const ret = wasm.mainthreadwasmcontext___wasm_get_css_id_by_unique_id(this.__wbg_ptr, unique_id);
806
+ return ret === 0x100000001 ? undefined : ret;
807
+ }
808
+ }
809
+ if (Symbol.dispose) MainThreadWasmContext.prototype[Symbol.dispose] = MainThreadWasmContext.prototype.free;
810
+
811
+ const RawStyleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
812
+ ? { register: () => {}, unregister: () => {} }
813
+ : new FinalizationRegistry(ptr => wasm.__wbg_rawstyleinfo_free(ptr >>> 0, 1));
814
+ /**
815
+ *
816
+ * * key: cssId
817
+ * * value: StyleSheet
818
+ *
819
+ */
820
+ export class RawStyleInfo {
821
+
822
+ __destroy_into_raw() {
823
+ const ptr = this.__wbg_ptr;
824
+ this.__wbg_ptr = 0;
825
+ RawStyleInfoFinalization.unregister(this);
826
+ return ptr;
827
+ }
828
+
829
+ free() {
830
+ const ptr = this.__destroy_into_raw();
831
+ wasm.__wbg_rawstyleinfo_free(ptr, 0);
832
+ }
833
+ constructor() {
834
+ const ret = wasm.rawstyleinfo_new();
835
+ this.__wbg_ptr = ret >>> 0;
836
+ RawStyleInfoFinalization.register(this, this.__wbg_ptr, this);
837
+ return this;
838
+ }
839
+ /**
840
+ *
841
+ * * Appends an import to the stylesheet identified by `css_id`.
842
+ * * If the stylesheet does not exist, it is created.
843
+ * * @param css_id - The ID of the CSS file.
844
+ * * @param import_css_id - The ID of the imported CSS file.
845
+ *
846
+ * @param {number} css_id
847
+ * @param {number} import_css_id
848
+ */
849
+ append_import(css_id, import_css_id) {
850
+ wasm.rawstyleinfo_append_import(this.__wbg_ptr, css_id, import_css_id);
851
+ }
852
+ /**
853
+ *
854
+ * * Pushes a rule to the stylesheet identified by `css_id`.
855
+ * * If the stylesheet does not exist, it is created.
856
+ * * @param css_id - The ID of the CSS file.
857
+ * * @param rule - The rule to append.
858
+ *
859
+ * @param {number} css_id
860
+ * @param {Rule} rule
861
+ */
862
+ push_rule(css_id, rule) {
863
+ _assertClass(rule, Rule);
864
+ var ptr0 = rule.__destroy_into_raw();
865
+ wasm.rawstyleinfo_push_rule(this.__wbg_ptr, css_id, ptr0);
866
+ }
867
+ }
868
+ if (Symbol.dispose) RawStyleInfo.prototype[Symbol.dispose] = RawStyleInfo.prototype.free;
869
+
870
+ const RuleFinalization = (typeof FinalizationRegistry === 'undefined')
871
+ ? { register: () => {}, unregister: () => {} }
872
+ : new FinalizationRegistry(ptr => wasm.__wbg_rule_free(ptr >>> 0, 1));
873
+
874
+ export class Rule {
875
+
876
+ __destroy_into_raw() {
877
+ const ptr = this.__wbg_ptr;
878
+ this.__wbg_ptr = 0;
879
+ RuleFinalization.unregister(this);
880
+ return ptr;
881
+ }
882
+
883
+ free() {
884
+ const ptr = this.__destroy_into_raw();
885
+ wasm.__wbg_rule_free(ptr, 0);
886
+ }
887
+ /**
888
+ *
889
+ * * Creates a new Rule with the specified type.
890
+ * * @param rule_type - The type of the rule (e.g., "StyleRule", "FontFaceRule", "KeyframesRule").
891
+ *
892
+ * @param {string} rule_type
893
+ */
894
+ constructor(rule_type) {
895
+ const ptr0 = passStringToWasm0(rule_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
896
+ const len0 = WASM_VECTOR_LEN;
897
+ const ret = wasm.rule_new(ptr0, len0);
898
+ if (ret[2]) {
899
+ throw takeFromExternrefTable0(ret[1]);
900
+ }
901
+ this.__wbg_ptr = ret[0] >>> 0;
902
+ RuleFinalization.register(this, this.__wbg_ptr, this);
903
+ return this;
904
+ }
905
+ /**
906
+ *
907
+ * * Sets the prelude for the rule.
908
+ * * @param prelude - The prelude to set (SelectorList or KeyFramesPrelude).
909
+ *
910
+ * @param {RulePrelude} prelude
911
+ */
912
+ set_prelude(prelude) {
913
+ _assertClass(prelude, RulePrelude);
914
+ var ptr0 = prelude.__destroy_into_raw();
915
+ wasm.rule_set_prelude(this.__wbg_ptr, ptr0);
916
+ }
917
+ /**
918
+ *
919
+ * * Pushes a declaration to the rule's declaration block.
920
+ * * @param property_name - The property name.
921
+ * * @param value - The property value.
922
+ *
923
+ * @param {string} property_name
924
+ * @param {string} value
925
+ */
926
+ push_declaration(property_name, value) {
927
+ const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
928
+ const len0 = WASM_VECTOR_LEN;
929
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
930
+ const len1 = WASM_VECTOR_LEN;
931
+ wasm.rule_push_declaration(this.__wbg_ptr, ptr0, len0, ptr1, len1);
932
+ }
933
+ /**
934
+ *
935
+ * * Pushes a nested rule to the rule.
936
+ * * @param rule - The nested rule to add.
937
+ *
938
+ * @param {Rule} rule
939
+ */
940
+ push_rule_children(rule) {
941
+ _assertClass(rule, Rule);
942
+ var ptr0 = rule.__destroy_into_raw();
943
+ wasm.rule_push_rule_children(this.__wbg_ptr, ptr0);
944
+ }
945
+ }
946
+ if (Symbol.dispose) Rule.prototype[Symbol.dispose] = Rule.prototype.free;
947
+
948
+ const RulePreludeFinalization = (typeof FinalizationRegistry === 'undefined')
949
+ ? { register: () => {}, unregister: () => {} }
950
+ : new FinalizationRegistry(ptr => wasm.__wbg_ruleprelude_free(ptr >>> 0, 1));
951
+ /**
952
+ *
953
+ * * Either SelectorList or KeyFramesPrelude
954
+ * * Depending on the RuleType
955
+ * * If it is SelectorList, then selectors is a list of Selector
956
+ * * If it is KeyFramesPrelude, then selectors has only one selector which is Prelude text, its simple_selectors is empty
957
+ * * If the parent is FontFace, then selectors is empty
958
+ *
959
+ */
960
+ export class RulePrelude {
961
+
962
+ __destroy_into_raw() {
963
+ const ptr = this.__wbg_ptr;
964
+ this.__wbg_ptr = 0;
965
+ RulePreludeFinalization.unregister(this);
966
+ return ptr;
967
+ }
968
+
969
+ free() {
970
+ const ptr = this.__destroy_into_raw();
971
+ wasm.__wbg_ruleprelude_free(ptr, 0);
972
+ }
973
+ constructor() {
974
+ const ret = wasm.ruleprelude_new();
975
+ this.__wbg_ptr = ret >>> 0;
976
+ RulePreludeFinalization.register(this, this.__wbg_ptr, this);
977
+ return this;
978
+ }
979
+ /**
980
+ *
981
+ * * Pushes a selector to the list.
982
+ * * @param selector - The selector to add.
983
+ *
984
+ * @param {Selector} selector
985
+ */
986
+ push_selector(selector) {
987
+ _assertClass(selector, Selector);
988
+ var ptr0 = selector.__destroy_into_raw();
989
+ wasm.ruleprelude_push_selector(this.__wbg_ptr, ptr0);
990
+ }
991
+ }
992
+ if (Symbol.dispose) RulePrelude.prototype[Symbol.dispose] = RulePrelude.prototype.free;
993
+
994
+ const SelectorFinalization = (typeof FinalizationRegistry === 'undefined')
995
+ ? { register: () => {}, unregister: () => {} }
996
+ : new FinalizationRegistry(ptr => wasm.__wbg_selector_free(ptr >>> 0, 1));
997
+
998
+ export class Selector {
999
+
1000
+ __destroy_into_raw() {
1001
+ const ptr = this.__wbg_ptr;
1002
+ this.__wbg_ptr = 0;
1003
+ SelectorFinalization.unregister(this);
1004
+ return ptr;
1005
+ }
1006
+
1007
+ free() {
1008
+ const ptr = this.__destroy_into_raw();
1009
+ wasm.__wbg_selector_free(ptr, 0);
1010
+ }
1011
+ constructor() {
1012
+ const ret = wasm.ruleprelude_new();
1013
+ this.__wbg_ptr = ret >>> 0;
1014
+ SelectorFinalization.register(this, this.__wbg_ptr, this);
1015
+ return this;
1016
+ }
1017
+ /**
1018
+ *
1019
+ * * Pushes a selector section to the selector.
1020
+ * * @param selector_type - The type of the selector section (e.g., "ClassSelector", "IdSelector").
1021
+ * * @param value - The value of the selector section.
1022
+ *
1023
+ * @param {string} selector_type
1024
+ * @param {string} value
1025
+ */
1026
+ push_one_selector_section(selector_type, value) {
1027
+ const ptr0 = passStringToWasm0(selector_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1028
+ const len0 = WASM_VECTOR_LEN;
1029
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1030
+ const len1 = WASM_VECTOR_LEN;
1031
+ const ret = wasm.selector_push_one_selector_section(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1032
+ if (ret[1]) {
1033
+ throw takeFromExternrefTable0(ret[0]);
1034
+ }
1035
+ }
1036
+ }
1037
+ if (Symbol.dispose) Selector.prototype[Symbol.dispose] = Selector.prototype.free;
1038
+
1039
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
1040
+
1041
+ async function __wbg_load(module, imports) {
1042
+ if (typeof Response === 'function' && module instanceof Response) {
1043
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1044
+ try {
1045
+ return await WebAssembly.instantiateStreaming(module, imports);
1046
+
1047
+ } catch (e) {
1048
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
1049
+
1050
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1051
+ 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);
1052
+
1053
+ } else {
1054
+ throw e;
1055
+ }
1056
+ }
1057
+ }
1058
+
1059
+ const bytes = await module.arrayBuffer();
1060
+ return await WebAssembly.instantiate(bytes, imports);
1061
+
1062
+ } else {
1063
+ const instance = await WebAssembly.instantiate(module, imports);
1064
+
1065
+ if (instance instanceof WebAssembly.Instance) {
1066
+ return { instance, module };
1067
+
1068
+ } else {
1069
+ return instance;
1070
+ }
1071
+ }
1072
+ }
1073
+
1074
+ function __wbg_get_imports() {
1075
+ const imports = {};
1076
+ imports.wbg = {};
1077
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
1078
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1079
+ return ret;
1080
+ };
1081
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
1082
+ const ret = debugString(arg1);
1083
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1084
+ const len1 = WASM_VECTOR_LEN;
1085
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1086
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1087
+ };
1088
+ imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
1089
+ const ret = arg0 === null;
1090
+ return ret;
1091
+ };
1092
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
1093
+ const ret = arg0 === undefined;
1094
+ return ret;
1095
+ };
1096
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
1097
+ const ret = arg0 === arg1;
1098
+ return ret;
1099
+ };
1100
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
1101
+ const obj = arg1;
1102
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1103
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1104
+ var len1 = WASM_VECTOR_LEN;
1105
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1106
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1107
+ };
1108
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
1109
+ throw new Error(getStringFromWasm0(arg0, arg1));
1110
+ };
1111
+ imports.wbg.__wbg_addEventListener_509b0778ff0f5d80 = function(arg0, arg1, arg2) {
1112
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2));
1113
+ };
1114
+ imports.wbg.__wbg_appendChild_aec7a8a4bd6cac61 = function() { return handleError(function (arg0, arg1) {
1115
+ const ret = arg0.appendChild(arg1);
1116
+ return ret;
1117
+ }, arguments) };
1118
+ imports.wbg.__wbg_assign_322cd025d1feae78 = function(arg0, arg1) {
1119
+ const ret = Object.assign(arg0, arg1);
1120
+ return ret;
1121
+ };
1122
+ imports.wbg.__wbg_cloneNode_4ff138eda9fcd474 = function() { return handleError(function (arg0, arg1) {
1123
+ const ret = arg0.cloneNode(arg1 !== 0);
1124
+ return ret;
1125
+ }, arguments) };
1126
+ imports.wbg.__wbg_content_a7b60fc3c1ac64bd = function(arg0) {
1127
+ const ret = arg0.content;
1128
+ return ret;
1129
+ };
1130
+ imports.wbg.__wbg_createElement_964ab674a0176cd8 = function() { return handleError(function (arg0, arg1, arg2) {
1131
+ const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
1132
+ return ret;
1133
+ }, arguments) };
1134
+ imports.wbg.__wbg_disableElementEvent_54563f003ce6f005 = function(arg0, arg1, arg2, arg3) {
1135
+ arg0.disableElementEvent(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
1136
+ };
1137
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
1138
+ const ret = arg0.done;
1139
+ return ret;
1140
+ };
1141
+ imports.wbg.__wbg_enableElementEvent_b56814551effb38c = function(arg0, arg1, arg2, arg3) {
1142
+ arg0.enableElementEvent(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
1143
+ };
1144
+ imports.wbg.__wbg_eventinfo_new = function(arg0) {
1145
+ const ret = EventInfo.__wrap(arg0);
1146
+ return ret;
1147
+ };
1148
+ imports.wbg.__wbg_firstChild_dab0d4655f86bce5 = function(arg0) {
1149
+ const ret = arg0.firstChild;
1150
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1151
+ };
1152
+ imports.wbg.__wbg_getAttribute_a0d65fabc2f0d559 = function(arg0, arg1, arg2, arg3) {
1153
+ const ret = arg1.getAttribute(getStringFromWasm0(arg2, arg3));
1154
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1155
+ var len1 = WASM_VECTOR_LEN;
1156
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1157
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1158
+ };
1159
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
1160
+ const ret = arg0[arg1 >>> 0];
1161
+ return ret;
1162
+ };
1163
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
1164
+ const ret = Reflect.get(arg0, arg1);
1165
+ return ret;
1166
+ }, arguments) };
1167
+ imports.wbg.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
1168
+ const ret = Reflect.has(arg0, arg1);
1169
+ return ret;
1170
+ }, arguments) };
1171
+ imports.wbg.__wbg_keys_b4d27b02ad14f4be = function(arg0) {
1172
+ const ret = Object.keys(arg0);
1173
+ return ret;
1174
+ };
1175
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
1176
+ const ret = arg0.length;
1177
+ return ret;
1178
+ };
1179
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
1180
+ const ret = arg0.length;
1181
+ return ret;
1182
+ };
1183
+ imports.wbg.__wbg_loadInternalWebElement_8cae19b87cc26220 = function(arg0, arg1) {
1184
+ arg0.loadInternalWebElement(arg1 >>> 0);
1185
+ };
1186
+ imports.wbg.__wbg_loadUnknownElement_762c72a091c9dc9e = function(arg0, arg1, arg2) {
1187
+ arg0.loadUnknownElement(getStringFromWasm0(arg1, arg2));
1188
+ };
1189
+ imports.wbg.__wbg_markExposureRelatedElementByUniqueId_c37ed9a4da654c4e = function(arg0, arg1, arg2) {
1190
+ arg0.markExposureRelatedElementByUniqueId(arg1 >>> 0, arg2 !== 0);
1191
+ };
1192
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
1193
+ const ret = new Object();
1194
+ return ret;
1195
+ };
1196
+ imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
1197
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1198
+ return ret;
1199
+ };
1200
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
1201
+ const ret = arg0.next();
1202
+ return ret;
1203
+ }, arguments) };
1204
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
1205
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1206
+ };
1207
+ imports.wbg.__wbg_publishEvent_9003166a9524dc81 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
1208
+ arg0.publishEvent(getStringFromWasm0(arg1, arg2), arg3 === 0 ? undefined : getStringFromWasm0(arg3, arg4), arg5, arg6 >>> 0, arg7, arg8 >>> 0, arg9);
1209
+ };
1210
+ imports.wbg.__wbg_querySelectorAll_28da62a91120d3e9 = function() { return handleError(function (arg0, arg1, arg2) {
1211
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
1212
+ return ret;
1213
+ }, arguments) };
1214
+ imports.wbg.__wbg_removeAttribute_993c4bef8df6e74d = function() { return handleError(function (arg0, arg1, arg2) {
1215
+ arg0.removeAttribute(getStringFromWasm0(arg1, arg2));
1216
+ }, arguments) };
1217
+ imports.wbg.__wbg_removeProperty_f76e32d12224854d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1218
+ const ret = arg1.removeProperty(getStringFromWasm0(arg2, arg3));
1219
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1220
+ const len1 = WASM_VECTOR_LEN;
1221
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1222
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1223
+ }, arguments) };
1224
+ imports.wbg.__wbg_runWorklet_6d04359b8a8c370f = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1225
+ arg0.runWorklet(arg1, arg2, arg3 >>> 0, arg4, arg5 >>> 0, arg6);
1226
+ };
1227
+ imports.wbg.__wbg_setAttribute_9bad76f39609daac = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1228
+ arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1229
+ }, arguments) };
1230
+ imports.wbg.__wbg_setProperty_7b188d7e71d4aca8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1231
+ arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1232
+ }, arguments) };
1233
+ imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
1234
+ const ret = Reflect.set(arg0, arg1, arg2);
1235
+ return ret;
1236
+ }, arguments) };
1237
+ imports.wbg.__wbg_style_763a7ccfd47375da = function(arg0) {
1238
+ const ret = arg0.style;
1239
+ return ret;
1240
+ };
1241
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
1242
+ const ret = arg0.value;
1243
+ return ret;
1244
+ };
1245
+ imports.wbg.__wbg_values_fea03b2a33fe593c = function(arg0) {
1246
+ const ret = arg0.values();
1247
+ return ret;
1248
+ };
1249
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1250
+ // Cast intrinsic for `Ref(String) -> Externref`.
1251
+ const ret = getStringFromWasm0(arg0, arg1);
1252
+ return ret;
1253
+ };
1254
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1255
+ // Cast intrinsic for `F64 -> Externref`.
1256
+ const ret = arg0;
1257
+ return ret;
1258
+ };
1259
+ imports.wbg.__wbindgen_init_externref_table = function() {
1260
+ const table = wasm.__wbindgen_externrefs;
1261
+ const offset = table.grow(4);
1262
+ table.set(0, undefined);
1263
+ table.set(offset + 0, undefined);
1264
+ table.set(offset + 1, null);
1265
+ table.set(offset + 2, true);
1266
+ table.set(offset + 3, false);
1267
+ ;
1268
+ };
1269
+ imports.wbg.__wbindgen_object_is_undefined = function(arg0) {
1270
+ const ret = arg0 === undefined;
1271
+ return ret;
1272
+ };
1273
+
1274
+ return imports;
1275
+ }
1276
+
1277
+ function __wbg_finalize_init(instance, module) {
1278
+ wasm = instance.exports;
1279
+ __wbg_init.__wbindgen_wasm_module = module;
1280
+ cachedDataViewMemory0 = null;
1281
+ cachedUint32ArrayMemory0 = null;
1282
+ cachedUint8ArrayMemory0 = null;
1283
+
1284
+
1285
+ wasm.__wbindgen_start();
1286
+ return wasm;
1287
+ }
1288
+
1289
+ function initSync(module) {
1290
+ if (wasm !== undefined) return wasm;
1291
+
1292
+
1293
+ if (typeof module !== 'undefined') {
1294
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1295
+ ({module} = module)
1296
+ } else {
1297
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1298
+ }
1299
+ }
1300
+
1301
+ const imports = __wbg_get_imports();
1302
+
1303
+ if (!(module instanceof WebAssembly.Module)) {
1304
+ module = new WebAssembly.Module(module);
1305
+ }
1306
+
1307
+ const instance = new WebAssembly.Instance(module, imports);
1308
+
1309
+ return __wbg_finalize_init(instance, module);
1310
+ }
1311
+
1312
+ async function __wbg_init(module_or_path) {
1313
+ if (wasm !== undefined) return wasm;
1314
+
1315
+
1316
+ if (typeof module_or_path !== 'undefined') {
1317
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1318
+ ({module_or_path} = module_or_path)
1319
+ } else {
1320
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1321
+ }
1322
+ }
1323
+
1324
+ if (typeof module_or_path === 'undefined') {
1325
+ module_or_path = new URL('client_bg.wasm', import.meta.url);
1326
+ }
1327
+ const imports = __wbg_get_imports();
1328
+
1329
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1330
+ module_or_path = fetch(module_or_path);
1331
+ }
1332
+
1333
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1334
+
1335
+ return __wbg_finalize_init(instance, module);
1336
+ }
1337
+
1338
+ export { initSync };
1339
+ export default __wbg_init;