@lynx-js/web-core-wasm 0.0.0 → 0.0.1

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