@lynx-js/web-core-wasm-canary 0.0.1-canary-20260119-82b4052d → 0.0.1-canary-20260119-609be14f

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.
@@ -1,279 +1,47 @@
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));
1
+ /* @ts-self-types="./client.d.ts" */
237
2
 
238
3
  export class DecodedStyleData {
239
-
240
4
  __destroy_into_raw() {
241
5
  const ptr = this.__wbg_ptr;
242
6
  this.__wbg_ptr = 0;
243
7
  DecodedStyleDataFinalization.unregister(this);
244
8
  return ptr;
245
9
  }
246
-
247
10
  free() {
248
11
  const ptr = this.__destroy_into_raw();
249
12
  wasm.__wbg_decodedstyledata_free(ptr, 0);
250
13
  }
251
14
  /**
252
15
  * @param {Uint8Array} buffer
16
+ * @param {string | null | undefined} entry_name
17
+ * @param {boolean} config_enable_css_selector
18
+ * @returns {Uint8Array}
253
19
  */
254
- constructor(buffer) {
255
- const ret = wasm.decodedstyledata_new(buffer);
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);
256
24
  if (ret[2]) {
257
25
  throw takeFromExternrefTable0(ret[1]);
258
26
  }
259
- this.__wbg_ptr = ret[0] >>> 0;
260
- DecodedStyleDataFinalization.register(this, this.__wbg_ptr, this);
261
- return this;
27
+ return takeFromExternrefTable0(ret[0]);
262
28
  }
263
29
  /**
264
- * @returns {string}
30
+ * @param {RawStyleInfo} raw_style_info
31
+ * @param {boolean} config_enable_css_selector
32
+ * @param {string | null} [entry_name]
33
+ * @returns {Uint8Array}
265
34
  */
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);
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]);
276
43
  }
44
+ return takeFromExternrefTable0(ret[0]);
277
45
  }
278
46
  /**
279
47
  * @returns {string}
@@ -290,6 +58,18 @@ export class DecodedStyleData {
290
58
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
291
59
  }
292
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
+ }
293
73
  /**
294
74
  * @param {number} css_id
295
75
  * @param {string[]} class_name
@@ -310,46 +90,24 @@ export class DecodedStyleData {
310
90
  }
311
91
  }
312
92
  /**
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}
93
+ * @returns {string}
332
94
  */
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]);
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);
341
105
  }
342
- return takeFromExternrefTable0(ret[0]);
343
106
  }
344
107
  }
345
108
  if (Symbol.dispose) DecodedStyleData.prototype[Symbol.dispose] = DecodedStyleData.prototype.free;
346
109
 
347
- const ElementTemplateSectionFinalization = (typeof FinalizationRegistry === 'undefined')
348
- ? { register: () => {}, unregister: () => {} }
349
- : new FinalizationRegistry(ptr => wasm.__wbg_elementtemplatesection_free(ptr >>> 0, 1));
350
-
351
110
  export class ElementTemplateSection {
352
-
353
111
  static __wrap(ptr) {
354
112
  ptr = ptr >>> 0;
355
113
  const obj = Object.create(ElementTemplateSection.prototype);
@@ -357,14 +115,12 @@ export class ElementTemplateSection {
357
115
  ElementTemplateSectionFinalization.register(obj, obj.__wbg_ptr, obj);
358
116
  return obj;
359
117
  }
360
-
361
118
  __destroy_into_raw() {
362
119
  const ptr = this.__wbg_ptr;
363
120
  this.__wbg_ptr = 0;
364
121
  ElementTemplateSectionFinalization.unregister(this);
365
122
  return ptr;
366
123
  }
367
-
368
124
  free() {
369
125
  const ptr = this.__destroy_into_raw();
370
126
  wasm.__wbg_elementtemplatesection_free(ptr, 0);
@@ -383,16 +139,12 @@ export class ElementTemplateSection {
383
139
  }
384
140
  if (Symbol.dispose) ElementTemplateSection.prototype[Symbol.dispose] = ElementTemplateSection.prototype.free;
385
141
 
386
- const EventInfoFinalization = (typeof FinalizationRegistry === 'undefined')
387
- ? { register: () => {}, unregister: () => {} }
388
- : new FinalizationRegistry(ptr => wasm.__wbg_eventinfo_free(ptr >>> 0, 1));
389
142
  /**
390
143
  *
391
144
  * * for return of __GetEvents
392
145
  *
393
146
  */
394
147
  export class EventInfo {
395
-
396
148
  static __wrap(ptr) {
397
149
  ptr = ptr >>> 0;
398
150
  const obj = Object.create(EventInfo.prototype);
@@ -400,18 +152,23 @@ export class EventInfo {
400
152
  EventInfoFinalization.register(obj, obj.__wbg_ptr, obj);
401
153
  return obj;
402
154
  }
403
-
404
155
  __destroy_into_raw() {
405
156
  const ptr = this.__wbg_ptr;
406
157
  this.__wbg_ptr = 0;
407
158
  EventInfoFinalization.unregister(this);
408
159
  return ptr;
409
160
  }
410
-
411
161
  free() {
412
162
  const ptr = this.__destroy_into_raw();
413
163
  wasm.__wbg_eventinfo_free(ptr, 0);
414
164
  }
165
+ /**
166
+ * @returns {any}
167
+ */
168
+ get function() {
169
+ const ret = wasm.__wbg_get_eventinfo_function(this.__wbg_ptr);
170
+ return ret;
171
+ }
415
172
  /**
416
173
  * @returns {string}
417
174
  */
@@ -427,14 +184,6 @@ export class EventInfo {
427
184
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
428
185
  }
429
186
  }
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
187
  /**
439
188
  * @returns {string}
440
189
  */
@@ -451,138 +200,87 @@ export class EventInfo {
451
200
  }
452
201
  }
453
202
  /**
454
- * @param {string} arg0
203
+ * @param {any} arg0
455
204
  */
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);
205
+ set function(arg0) {
206
+ wasm.__wbg_set_eventinfo_function(this.__wbg_ptr, arg0);
460
207
  }
461
208
  /**
462
- * @returns {any}
209
+ * @param {string} arg0
463
210
  */
464
- get function() {
465
- const ret = wasm.__wbg_get_eventinfo_function(this.__wbg_ptr);
466
- return ret;
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);
467
215
  }
468
216
  /**
469
- * @param {any} arg0
217
+ * @param {string} arg0
470
218
  */
471
- set function(arg0) {
472
- wasm.__wbg_set_eventinfo_function(this.__wbg_ptr, arg0);
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);
473
223
  }
474
224
  }
475
225
  if (Symbol.dispose) EventInfo.prototype[Symbol.dispose] = EventInfo.prototype.free;
476
226
 
477
- const MainThreadWasmContextFinalization = (typeof FinalizationRegistry === 'undefined')
478
- ? { register: () => {}, unregister: () => {} }
479
- : new FinalizationRegistry(ptr => wasm.__wbg_mainthreadwasmcontext_free(ptr >>> 0, 1));
480
-
481
227
  export class MainThreadWasmContext {
482
-
483
228
  __destroy_into_raw() {
484
229
  const ptr = this.__wbg_ptr;
485
230
  this.__wbg_ptr = 0;
486
231
  MainThreadWasmContextFinalization.unregister(this);
487
232
  return ptr;
488
233
  }
489
-
490
234
  free() {
491
235
  const ptr = this.__destroy_into_raw();
492
236
  wasm.__wbg_mainthreadwasmcontext_free(ptr, 0);
493
237
  }
494
238
  /**
495
239
  * @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
240
+ * @param {any} key
241
+ * @param {any} value
528
242
  */
529
- __SetConfig(unique_id, config) {
530
- const ret = wasm.mainthreadwasmcontext___SetConfig(this.__wbg_ptr, unique_id, config);
243
+ __AddDataset(unique_id, key, value) {
244
+ const ret = wasm.mainthreadwasmcontext___AddDataset(this.__wbg_ptr, unique_id, key, value);
531
245
  if (ret[1]) {
532
246
  throw takeFromExternrefTable0(ret[0]);
533
247
  }
534
248
  }
535
249
  /**
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
250
+ * @param {number} parent_component_unique_id
251
+ * @param {HTMLElement} dom
252
+ * @param {number | null} [css_id]
548
253
  * @param {string | null} [component_id]
254
+ * @returns {number}
549
255
  */
550
- __UpdateComponentID(unique_id, component_id) {
256
+ __CreateElementCommon(parent_component_unique_id, dom, css_id, component_id) {
551
257
  var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
552
258
  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
- }
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;
557
261
  }
558
262
  /**
559
263
  * @param {number} unique_id
560
- * @param {HTMLElement} dom
561
- * @param {object} new_dataset
264
+ * @returns {string | undefined}
562
265
  */
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]);
266
+ __GetComponentID(unique_id) {
267
+ const ret = wasm.mainthreadwasmcontext___GetComponentID(this.__wbg_ptr, unique_id);
268
+ if (ret[3]) {
269
+ throw takeFromExternrefTable0(ret[2]);
567
270
  }
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]);
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);
578
275
  }
276
+ return v1;
579
277
  }
580
278
  /**
581
279
  * @param {number} unique_id
582
280
  * @returns {object}
583
281
  */
584
- __GetDataset(unique_id) {
585
- const ret = wasm.mainthreadwasmcontext___GetDataset(this.__wbg_ptr, unique_id);
282
+ __GetConfig(unique_id) {
283
+ const ret = wasm.mainthreadwasmcontext___GetConfig(this.__wbg_ptr, unique_id);
586
284
  if (ret[2]) {
587
285
  throw takeFromExternrefTable0(ret[1]);
588
286
  }
@@ -603,19 +301,11 @@ export class MainThreadWasmContext {
603
301
  return takeFromExternrefTable0(ret[0]);
604
302
  }
605
303
  /**
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}
304
+ * @param {number} unique_id
305
+ * @returns {object}
611
306
  */
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);
307
+ __GetDataset(unique_id) {
308
+ const ret = wasm.mainthreadwasmcontext___GetDataset(this.__wbg_ptr, unique_id);
619
309
  if (ret[2]) {
620
310
  throw takeFromExternrefTable0(ret[1]);
621
311
  }
@@ -623,31 +313,14 @@ export class MainThreadWasmContext {
623
313
  }
624
314
  /**
625
315
  * @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]
316
+ * @returns {object | undefined}
644
317
  */
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));
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]);
651
324
  }
652
325
  /**
653
326
  * @param {number} unique_id
@@ -674,40 +347,51 @@ export class MainThreadWasmContext {
674
347
  return v1;
675
348
  }
676
349
  /**
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}
350
+ *
351
+ * * key: String
352
+ * * value: stringifyed js value
353
+ *
354
+ * @param {number} unique_id
355
+ * @param {object} config
682
356
  */
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;
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
+ }
690
362
  }
691
363
  /**
692
- * @param {any} event
693
- * @param {Uint32Array} bubble_unique_id_path
694
- * @param {string} event_name
364
+ * @param {number} unique_id
365
+ * @param {HTMLElement} dom
366
+ * @param {object} new_dataset
695
367
  */
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);
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
+ }
702
373
  }
703
374
  /**
704
- * @param {Uint32Array} elements_unique_id
705
- * @param {number} css_id
375
+ * @param {number} unique_id
376
+ * @param {string | null} [component_id]
706
377
  */
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);
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);
711
395
  }
712
396
  /**
713
397
  *
@@ -725,16 +409,6 @@ export class MainThreadWasmContext {
725
409
  var len1 = WASM_VECTOR_LEN;
726
410
  wasm.mainthreadwasmcontext___wasm_AddInlineStyle_str_key(this.__wbg_ptr, dom, ptr0, len0, ptr1, len1);
727
411
  }
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
412
  /**
739
413
  * @param {HTMLElement} dom
740
414
  * @param {string} styles
@@ -747,45 +421,52 @@ export class MainThreadWasmContext {
747
421
  return ret !== 0;
748
422
  }
749
423
  /**
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
424
+ * @param {number} unique_id
425
+ * @param {string} event_type
426
+ * @param {string} event_name
427
+ * @param {string | null} [event_handler_identifier]
755
428
  */
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;
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);
761
437
  }
762
438
  /**
763
439
  * @param {number} unique_id
440
+ * @param {string} event_type
441
+ * @param {string} event_name
442
+ * @param {any | null} [event_handler_identifier]
764
443
  */
765
- __wasm_set_page_element_unique_id(unique_id) {
766
- wasm.mainthreadwasmcontext___wasm_set_page_element_unique_id(this.__wbg_ptr, unique_id);
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));
767
450
  }
768
451
  /**
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}
452
+ * @param {any} event
453
+ * @param {Uint32Array} bubble_unique_id_path
454
+ * @param {string} event_name
774
455
  */
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;
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);
780
462
  }
781
463
  /**
782
- * @returns {string[]}
464
+ * @param {number} unique_id
465
+ * @returns {number | undefined}
783
466
  */
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;
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;
789
470
  }
790
471
  /**
791
472
  * @param {string} component_id
@@ -797,20 +478,80 @@ export class MainThreadWasmContext {
797
478
  const ret = wasm.mainthreadwasmcontext___wasm_get_unique_id_by_component_id(this.__wbg_ptr, ptr0, len0);
798
479
  return ret === 0x100000001 ? undefined : ret;
799
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
+ }
800
490
  /**
801
491
  * @param {number} unique_id
802
- * @returns {number | undefined}
803
492
  */
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;
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;
807
551
  }
808
552
  }
809
553
  if (Symbol.dispose) MainThreadWasmContext.prototype[Symbol.dispose] = MainThreadWasmContext.prototype.free;
810
554
 
811
- const RawStyleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
812
- ? { register: () => {}, unregister: () => {} }
813
- : new FinalizationRegistry(ptr => wasm.__wbg_rawstyleinfo_free(ptr >>> 0, 1));
814
555
  /**
815
556
  *
816
557
  * * key: cssId
@@ -818,24 +559,16 @@ const RawStyleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
818
559
  *
819
560
  */
820
561
  export class RawStyleInfo {
821
-
822
562
  __destroy_into_raw() {
823
563
  const ptr = this.__wbg_ptr;
824
564
  this.__wbg_ptr = 0;
825
565
  RawStyleInfoFinalization.unregister(this);
826
566
  return ptr;
827
567
  }
828
-
829
568
  free() {
830
569
  const ptr = this.__destroy_into_raw();
831
570
  wasm.__wbg_rawstyleinfo_free(ptr, 0);
832
571
  }
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
572
  /**
840
573
  *
841
574
  * * Appends an import to the stylesheet identified by `css_id`.
@@ -849,6 +582,12 @@ export class RawStyleInfo {
849
582
  append_import(css_id, import_css_id) {
850
583
  wasm.rawstyleinfo_append_import(this.__wbg_ptr, css_id, import_css_id);
851
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
+ }
852
591
  /**
853
592
  *
854
593
  * * Pushes a rule to the stylesheet identified by `css_id`.
@@ -867,19 +606,13 @@ export class RawStyleInfo {
867
606
  }
868
607
  if (Symbol.dispose) RawStyleInfo.prototype[Symbol.dispose] = RawStyleInfo.prototype.free;
869
608
 
870
- const RuleFinalization = (typeof FinalizationRegistry === 'undefined')
871
- ? { register: () => {}, unregister: () => {} }
872
- : new FinalizationRegistry(ptr => wasm.__wbg_rule_free(ptr >>> 0, 1));
873
-
874
609
  export class Rule {
875
-
876
610
  __destroy_into_raw() {
877
611
  const ptr = this.__wbg_ptr;
878
612
  this.__wbg_ptr = 0;
879
613
  RuleFinalization.unregister(this);
880
614
  return ptr;
881
615
  }
882
-
883
616
  free() {
884
617
  const ptr = this.__destroy_into_raw();
885
618
  wasm.__wbg_rule_free(ptr, 0);
@@ -902,18 +635,6 @@ export class Rule {
902
635
  RuleFinalization.register(this, this.__wbg_ptr, this);
903
636
  return this;
904
637
  }
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
638
  /**
918
639
  *
919
640
  * * Pushes a declaration to the rule's declaration block.
@@ -942,12 +663,21 @@ export class Rule {
942
663
  var ptr0 = rule.__destroy_into_raw();
943
664
  wasm.rule_push_rule_children(this.__wbg_ptr, ptr0);
944
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
+ }
945
678
  }
946
679
  if (Symbol.dispose) Rule.prototype[Symbol.dispose] = Rule.prototype.free;
947
680
 
948
- const RulePreludeFinalization = (typeof FinalizationRegistry === 'undefined')
949
- ? { register: () => {}, unregister: () => {} }
950
- : new FinalizationRegistry(ptr => wasm.__wbg_ruleprelude_free(ptr >>> 0, 1));
951
681
  /**
952
682
  *
953
683
  * * Either SelectorList or KeyFramesPrelude
@@ -958,339 +688,581 @@ const RulePreludeFinalization = (typeof FinalizationRegistry === 'undefined')
958
688
  *
959
689
  */
960
690
  export class RulePrelude {
961
-
962
691
  __destroy_into_raw() {
963
692
  const ptr = this.__wbg_ptr;
964
693
  this.__wbg_ptr = 0;
965
694
  RulePreludeFinalization.unregister(this);
966
695
  return ptr;
967
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
+ }
968
1096
 
969
- free() {
970
- const ptr = this.__destroy_into_raw();
971
- wasm.__wbg_ruleprelude_free(ptr, 0);
1097
+ let cachedUint32ArrayMemory0 = null;
1098
+ function getUint32ArrayMemory0() {
1099
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
1100
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
972
1101
  }
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;
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);
978
1109
  }
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);
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);
990
1119
  }
991
1120
  }
992
- if (Symbol.dispose) RulePrelude.prototype[Symbol.dispose] = RulePrelude.prototype.free;
993
1121
 
994
- const SelectorFinalization = (typeof FinalizationRegistry === 'undefined')
995
- ? { register: () => {}, unregister: () => {} }
996
- : new FinalizationRegistry(ptr => wasm.__wbg_selector_free(ptr >>> 0, 1));
1122
+ function isLikeNone(x) {
1123
+ return x === undefined || x === null;
1124
+ }
997
1125
 
998
- export class Selector {
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
+ }
999
1132
 
1000
- __destroy_into_raw() {
1001
- const ptr = this.__wbg_ptr;
1002
- this.__wbg_ptr = 0;
1003
- SelectorFinalization.unregister(this);
1004
- return ptr;
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);
1005
1138
  }
1139
+ WASM_VECTOR_LEN = array.length;
1140
+ return ptr;
1141
+ }
1006
1142
 
1007
- free() {
1008
- const ptr = this.__destroy_into_raw();
1009
- wasm.__wbg_selector_free(ptr, 0);
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;
1010
1150
  }
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;
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;
1016
1163
  }
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]);
1164
+ if (offset !== len) {
1165
+ if (offset !== 0) {
1166
+ arg = arg.slice(offset);
1034
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;
1035
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));
1036
1198
  }
1037
- if (Symbol.dispose) Selector.prototype[Symbol.dispose] = Selector.prototype.free;
1038
1199
 
1039
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
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
+ }
1040
1225
 
1041
1226
  async function __wbg_load(module, imports) {
1042
1227
  if (typeof Response === 'function' && module instanceof Response) {
1043
1228
  if (typeof WebAssembly.instantiateStreaming === 'function') {
1044
1229
  try {
1045
1230
  return await WebAssembly.instantiateStreaming(module, imports);
1046
-
1047
1231
  } catch (e) {
1048
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
1232
+ const validResponse = module.ok && expectedResponseType(module.type);
1049
1233
 
1050
1234
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1051
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);
1052
1236
 
1053
- } else {
1054
- throw e;
1055
- }
1237
+ } else { throw e; }
1056
1238
  }
1057
1239
  }
1058
1240
 
1059
1241
  const bytes = await module.arrayBuffer();
1060
1242
  return await WebAssembly.instantiate(bytes, imports);
1061
-
1062
1243
  } else {
1063
1244
  const instance = await WebAssembly.instantiate(module, imports);
1064
1245
 
1065
1246
  if (instance instanceof WebAssembly.Instance) {
1066
1247
  return { instance, module };
1067
-
1068
1248
  } else {
1069
1249
  return instance;
1070
1250
  }
1071
1251
  }
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
1252
 
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;
1253
+ function expectedResponseType(type) {
1254
+ switch (type) {
1255
+ case 'basic': case 'cors': case 'default': return true;
1256
+ }
1257
+ return false;
1258
+ }
1287
1259
  }
1288
1260
 
1289
1261
  function initSync(module) {
1290
1262
  if (wasm !== undefined) return wasm;
1291
1263
 
1292
1264
 
1293
- if (typeof module !== 'undefined') {
1265
+ if (module !== undefined) {
1294
1266
  if (Object.getPrototypeOf(module) === Object.prototype) {
1295
1267
  ({module} = module)
1296
1268
  } else {
@@ -1299,13 +1271,10 @@ function initSync(module) {
1299
1271
  }
1300
1272
 
1301
1273
  const imports = __wbg_get_imports();
1302
-
1303
1274
  if (!(module instanceof WebAssembly.Module)) {
1304
1275
  module = new WebAssembly.Module(module);
1305
1276
  }
1306
-
1307
1277
  const instance = new WebAssembly.Instance(module, imports);
1308
-
1309
1278
  return __wbg_finalize_init(instance, module);
1310
1279
  }
1311
1280
 
@@ -1313,7 +1282,7 @@ async function __wbg_init(module_or_path) {
1313
1282
  if (wasm !== undefined) return wasm;
1314
1283
 
1315
1284
 
1316
- if (typeof module_or_path !== 'undefined') {
1285
+ if (module_or_path !== undefined) {
1317
1286
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1318
1287
  ({module_or_path} = module_or_path)
1319
1288
  } else {
@@ -1321,7 +1290,7 @@ async function __wbg_init(module_or_path) {
1321
1290
  }
1322
1291
  }
1323
1292
 
1324
- if (typeof module_or_path === 'undefined') {
1293
+ if (module_or_path === undefined) {
1325
1294
  module_or_path = new URL('client_bg.wasm', import.meta.url);
1326
1295
  }
1327
1296
  const imports = __wbg_get_imports();
@@ -1335,5 +1304,4 @@ async function __wbg_init(module_or_path) {
1335
1304
  return __wbg_finalize_init(instance, module);
1336
1305
  }
1337
1306
 
1338
- export { initSync };
1339
- export default __wbg_init;
1307
+ export { initSync, __wbg_init as default };