rregex 1.7.0 → 1.7.2

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.
package/lib/module.js DELETED
@@ -1,646 +0,0 @@
1
- import * as wasm from './rregex.wasm';
2
-
3
- const heap = new Array(32).fill(undefined);
4
-
5
- heap.push(undefined, null, true, false);
6
-
7
- function getObject(idx) { return heap[idx]; }
8
-
9
- let heap_next = heap.length;
10
-
11
- function dropObject(idx) {
12
- if (idx < 36) return;
13
- heap[idx] = heap_next;
14
- heap_next = idx;
15
- }
16
-
17
- function takeObject(idx) {
18
- const ret = getObject(idx);
19
- dropObject(idx);
20
- return ret;
21
- }
22
-
23
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
24
-
25
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
26
-
27
- cachedTextDecoder.decode();
28
-
29
- let cachedUint8Memory0;
30
- function getUint8Memory0() {
31
- if (cachedUint8Memory0.byteLength === 0) {
32
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
33
- }
34
- return cachedUint8Memory0;
35
- }
36
-
37
- function getStringFromWasm0(ptr, len) {
38
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
39
- }
40
-
41
- function addHeapObject(obj) {
42
- if (heap_next === heap.length) heap.push(heap.length + 1);
43
- const idx = heap_next;
44
- heap_next = heap[idx];
45
-
46
- heap[idx] = obj;
47
- return idx;
48
- }
49
-
50
- let WASM_VECTOR_LEN = 0;
51
-
52
- const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
53
-
54
- let cachedTextEncoder = new lTextEncoder('utf-8');
55
-
56
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
57
- ? function (arg, view) {
58
- return cachedTextEncoder.encodeInto(arg, view);
59
- }
60
- : function (arg, view) {
61
- const buf = cachedTextEncoder.encode(arg);
62
- view.set(buf);
63
- return {
64
- read: arg.length,
65
- written: buf.length
66
- };
67
- });
68
-
69
- function passStringToWasm0(arg, malloc, realloc) {
70
-
71
- if (realloc === undefined) {
72
- const buf = cachedTextEncoder.encode(arg);
73
- const ptr = malloc(buf.length);
74
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
75
- WASM_VECTOR_LEN = buf.length;
76
- return ptr;
77
- }
78
-
79
- let len = arg.length;
80
- let ptr = malloc(len);
81
-
82
- const mem = getUint8Memory0();
83
-
84
- let offset = 0;
85
-
86
- for (; offset < len; offset++) {
87
- const code = arg.charCodeAt(offset);
88
- if (code > 0x7F) break;
89
- mem[ptr + offset] = code;
90
- }
91
-
92
- if (offset !== len) {
93
- if (offset !== 0) {
94
- arg = arg.slice(offset);
95
- }
96
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
97
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
98
- const ret = encodeString(arg, view);
99
-
100
- offset += ret.written;
101
- }
102
-
103
- WASM_VECTOR_LEN = offset;
104
- return ptr;
105
- }
106
-
107
- function isLikeNone(x) {
108
- return x === undefined || x === null;
109
- }
110
-
111
- let cachedInt32Memory0;
112
- function getInt32Memory0() {
113
- if (cachedInt32Memory0.byteLength === 0) {
114
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
115
- }
116
- return cachedInt32Memory0;
117
- }
118
-
119
- function debugString(val) {
120
- // primitive types
121
- const type = typeof val;
122
- if (type == 'number' || type == 'boolean' || val == null) {
123
- return `${val}`;
124
- }
125
- if (type == 'string') {
126
- return `"${val}"`;
127
- }
128
- if (type == 'symbol') {
129
- const description = val.description;
130
- if (description == null) {
131
- return 'Symbol';
132
- } else {
133
- return `Symbol(${description})`;
134
- }
135
- }
136
- if (type == 'function') {
137
- const name = val.name;
138
- if (typeof name == 'string' && name.length > 0) {
139
- return `Function(${name})`;
140
- } else {
141
- return 'Function';
142
- }
143
- }
144
- // objects
145
- if (Array.isArray(val)) {
146
- const length = val.length;
147
- let debug = '[';
148
- if (length > 0) {
149
- debug += debugString(val[0]);
150
- }
151
- for(let i = 1; i < length; i++) {
152
- debug += ', ' + debugString(val[i]);
153
- }
154
- debug += ']';
155
- return debug;
156
- }
157
- // Test for built-in
158
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
159
- let className;
160
- if (builtInMatches.length > 1) {
161
- className = builtInMatches[1];
162
- } else {
163
- // Failed to match the standard '[object ClassName]'
164
- return toString.call(val);
165
- }
166
- if (className == 'Object') {
167
- // we're a user defined class or Object
168
- // JSON.stringify avoids problems with cycles, and is generally much
169
- // easier than looping through ownProperties of `val`.
170
- try {
171
- return 'Object(' + JSON.stringify(val) + ')';
172
- } catch (_) {
173
- return 'Object';
174
- }
175
- }
176
- // errors
177
- if (val instanceof Error) {
178
- return `${val.name}: ${val.message}\n${val.stack}`;
179
- }
180
- // TODO we could test for more things here, like `Set`s and `Map`s.
181
- return className;
182
- }
183
- /**
184
- * @param {string} text
185
- * @returns {string}
186
- */
187
- export function escape(text) {
188
- try {
189
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
190
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
191
- const len0 = WASM_VECTOR_LEN;
192
- wasm.escape(retptr, ptr0, len0);
193
- var r0 = getInt32Memory0()[retptr / 4 + 0];
194
- var r1 = getInt32Memory0()[retptr / 4 + 1];
195
- return getStringFromWasm0(r0, r1);
196
- } finally {
197
- wasm.__wbindgen_add_to_stack_pointer(16);
198
- wasm.__wbindgen_free(r0, r1);
199
- }
200
- }
201
-
202
- let stack_pointer = 32;
203
-
204
- function addBorrowedObject(obj) {
205
- if (stack_pointer == 1) throw new Error('out of js stack');
206
- heap[--stack_pointer] = obj;
207
- return stack_pointer;
208
- }
209
-
210
- function handleError(f, args) {
211
- try {
212
- return f.apply(this, args);
213
- } catch (e) {
214
- wasm.__wbindgen_exn_store(addHeapObject(e));
215
- }
216
- }
217
- /**
218
- * A compiled regular expression for matching Unicode strings.
219
- * @see https://docs.rs/regex/latest/regex/
220
- */
221
- export class RRegex {
222
-
223
- static __wrap(ptr) {
224
- const obj = Object.create(RRegex.prototype);
225
- obj.ptr = ptr;
226
-
227
- return obj;
228
- }
229
-
230
- __destroy_into_raw() {
231
- const ptr = this.ptr;
232
- this.ptr = 0;
233
-
234
- return ptr;
235
- }
236
-
237
- free() {
238
- const ptr = this.__destroy_into_raw();
239
- wasm.__wbg_rregex_free(ptr);
240
- }
241
- /**
242
- * Compiles a regular expression. Once compiled, it can be used repeatedly to search, split or replace text in a string.
243
- * If an invalid expression is given, then an error is returned.
244
- * @param {string} re
245
- */
246
- constructor(re) {
247
- try {
248
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
249
- const ptr0 = passStringToWasm0(re, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
250
- const len0 = WASM_VECTOR_LEN;
251
- wasm.rregex_new(retptr, ptr0, len0);
252
- var r0 = getInt32Memory0()[retptr / 4 + 0];
253
- var r1 = getInt32Memory0()[retptr / 4 + 1];
254
- var r2 = getInt32Memory0()[retptr / 4 + 2];
255
- if (r2) {
256
- throw takeObject(r1);
257
- }
258
- return RRegex.__wrap(r0);
259
- } finally {
260
- wasm.__wbindgen_add_to_stack_pointer(16);
261
- }
262
- }
263
- /**
264
- * Returns true if and only if there is a match for the regex in the string given.
265
- * It is recommended to use this method if all you need to do is test a match, since the underlying matching engine may be able to do less work.
266
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.is_match
267
- * @param {string} text
268
- * @returns {boolean}
269
- */
270
- isMatch(text) {
271
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
272
- const len0 = WASM_VECTOR_LEN;
273
- const ret = wasm.rregex_isMatch(this.ptr, ptr0, len0);
274
- return ret !== 0;
275
- }
276
- /**
277
- * Returns the same as is_match, but starts the search at the given offset.
278
- * The significance of the starting point is that it takes the surrounding context into consideration. For example, the `\A` anchor can only match when `start == 0`.
279
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.is_match_at
280
- * @param {string} text
281
- * @param {number} start
282
- * @returns {boolean}
283
- */
284
- isMatchAt(text, start) {
285
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
286
- const len0 = WASM_VECTOR_LEN;
287
- const ret = wasm.rregex_isMatchAt(this.ptr, ptr0, len0, start);
288
- return ret !== 0;
289
- }
290
- /**
291
- * Returns the start and end byte range of the leftmost-first match in `text`. If no match exists, then `undefined` is returned.
292
- * Note that this should only be used if you want to discover the position of the match. Testing the existence of a match is faster if you use `is_match`.
293
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.find
294
- * @param {string} text
295
- * @returns {any}
296
- */
297
- find(text) {
298
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
299
- const len0 = WASM_VECTOR_LEN;
300
- const ret = wasm.rregex_find(this.ptr, ptr0, len0);
301
- return takeObject(ret);
302
- }
303
- /**
304
- * Returns the same as find, but starts the search at the given offset.
305
- * The significance of the starting point is that it takes the surrounding context into consideration. For example, the \A anchor can only match when `start == 0`.
306
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.find_at
307
- * @param {string} text
308
- * @param {number} start
309
- * @returns {any}
310
- */
311
- findAt(text, start) {
312
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
313
- const len0 = WASM_VECTOR_LEN;
314
- const ret = wasm.rregex_findAt(this.ptr, ptr0, len0, start);
315
- return takeObject(ret);
316
- }
317
- /**
318
- * Returns an array for each successive non-overlapping match in text, returning the start and end byte indices with respect to text.
319
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.find_iter
320
- * @param {string} text
321
- * @returns {any}
322
- */
323
- findAll(text) {
324
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
325
- const len0 = WASM_VECTOR_LEN;
326
- const ret = wasm.rregex_findAll(this.ptr, ptr0, len0);
327
- return takeObject(ret);
328
- }
329
- /**
330
- * Replaces the leftmost-first match with the replacement provided.
331
- * The replacement can be a regular string (where `$N` and `$name` are expanded to match capture groups) or a function that takes the matches’ `Captures` and returns the replaced string.
332
- * If no match is found, then a copy of the string is returned unchanged.
333
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace
334
- * @param {string} text
335
- * @param {string} rep
336
- * @returns {string}
337
- */
338
- replace(text, rep) {
339
- try {
340
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
341
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
342
- const len0 = WASM_VECTOR_LEN;
343
- const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
344
- const len1 = WASM_VECTOR_LEN;
345
- wasm.rregex_replace(retptr, this.ptr, ptr0, len0, ptr1, len1);
346
- var r0 = getInt32Memory0()[retptr / 4 + 0];
347
- var r1 = getInt32Memory0()[retptr / 4 + 1];
348
- return getStringFromWasm0(r0, r1);
349
- } finally {
350
- wasm.__wbindgen_add_to_stack_pointer(16);
351
- wasm.__wbindgen_free(r0, r1);
352
- }
353
- }
354
- /**
355
- * Replaces at most `limit` non-overlapping matches in `text` with the replacement provided. If `limit` is 0, then all non-overlapping matches are replaced.
356
- * See the documentation for `replace` for details on how to access capturing group matches in the replacement string.
357
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.replacen
358
- * @param {string} text
359
- * @param {number} limit
360
- * @param {string} rep
361
- * @returns {string}
362
- */
363
- replacen(text, limit, rep) {
364
- try {
365
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
366
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
367
- const len0 = WASM_VECTOR_LEN;
368
- const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
369
- const len1 = WASM_VECTOR_LEN;
370
- wasm.rregex_replacen(retptr, this.ptr, ptr0, len0, limit, ptr1, len1);
371
- var r0 = getInt32Memory0()[retptr / 4 + 0];
372
- var r1 = getInt32Memory0()[retptr / 4 + 1];
373
- return getStringFromWasm0(r0, r1);
374
- } finally {
375
- wasm.__wbindgen_add_to_stack_pointer(16);
376
- wasm.__wbindgen_free(r0, r1);
377
- }
378
- }
379
- /**
380
- * Replaces all non-overlapping matches in `text` with the replacement provided. This is the same as calling `replacen` with `limit` set to `0`.
381
- * See the documentation for `replace` for details on how to access capturing group matches in the replacement string.
382
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace_all
383
- * @param {string} text
384
- * @param {string} rep
385
- * @returns {string}
386
- */
387
- replaceAll(text, rep) {
388
- try {
389
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
390
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
391
- const len0 = WASM_VECTOR_LEN;
392
- const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
393
- const len1 = WASM_VECTOR_LEN;
394
- wasm.rregex_replaceAll(retptr, this.ptr, ptr0, len0, ptr1, len1);
395
- var r0 = getInt32Memory0()[retptr / 4 + 0];
396
- var r1 = getInt32Memory0()[retptr / 4 + 1];
397
- return getStringFromWasm0(r0, r1);
398
- } finally {
399
- wasm.__wbindgen_add_to_stack_pointer(16);
400
- wasm.__wbindgen_free(r0, r1);
401
- }
402
- }
403
- /**
404
- * Returns an iterator of substrings of `text` delimited by a match of the regular expression. Namely, each element of the iterator corresponds to text that isn’t matched by the regular expression.
405
- * This method will not copy the text given.
406
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.split
407
- * @param {string} text
408
- * @returns {any}
409
- */
410
- split(text) {
411
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
412
- const len0 = WASM_VECTOR_LEN;
413
- const ret = wasm.rregex_split(this.ptr, ptr0, len0);
414
- return takeObject(ret);
415
- }
416
- /**
417
- * Returns an iterator of at most `limit` substrings of `text` delimited by a match of the regular expression. (A limit of 0 will return no substrings.) Namely, each element of the iterator corresponds to text that isn’t matched by the regular expression. The remainder of the string that is not split will be the last element in the iterator.
418
- * This method will not copy the text given.
419
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.splitn
420
- * @param {string} text
421
- * @param {number} limit
422
- * @returns {any}
423
- */
424
- splitn(text, limit) {
425
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
426
- const len0 = WASM_VECTOR_LEN;
427
- const ret = wasm.rregex_splitn(this.ptr, ptr0, len0, limit);
428
- return takeObject(ret);
429
- }
430
- /**
431
- * Returns the end location of a match in the text given.
432
- * This method may have the same performance characteristics as `is_match`, except it provides an end location for a match. In particular, the location returned may be shorter than the proper end of the leftmost-first match.
433
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.shortest_match
434
- * @param {string} text
435
- * @returns {number | undefined}
436
- */
437
- shortestMatch(text) {
438
- try {
439
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
440
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
441
- const len0 = WASM_VECTOR_LEN;
442
- wasm.rregex_shortestMatch(retptr, this.ptr, ptr0, len0);
443
- var r0 = getInt32Memory0()[retptr / 4 + 0];
444
- var r1 = getInt32Memory0()[retptr / 4 + 1];
445
- return r0 === 0 ? undefined : r1 >>> 0;
446
- } finally {
447
- wasm.__wbindgen_add_to_stack_pointer(16);
448
- }
449
- }
450
- /**
451
- * Returns the same as shortest_match, but starts the search at the given offset.
452
- * The significance of the starting point is that it takes the surrounding context into consideration. For example, the \A anchor can only match when `start == 0`.
453
- * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.shortest_match_at
454
- * @param {string} text
455
- * @param {number} limit
456
- * @returns {number | undefined}
457
- */
458
- shortestMatchAt(text, limit) {
459
- try {
460
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
461
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
- const len0 = WASM_VECTOR_LEN;
463
- wasm.rregex_shortestMatchAt(retptr, this.ptr, ptr0, len0, limit);
464
- var r0 = getInt32Memory0()[retptr / 4 + 0];
465
- var r1 = getInt32Memory0()[retptr / 4 + 1];
466
- return r0 === 0 ? undefined : r1 >>> 0;
467
- } finally {
468
- wasm.__wbindgen_add_to_stack_pointer(16);
469
- }
470
- }
471
- /**
472
- * Return the Regex syntax object
473
- * @returns {any}
474
- */
475
- syntax() {
476
- const ret = wasm.rregex_syntax(this.ptr);
477
- return takeObject(ret);
478
- }
479
- /**
480
- * Returns a string representing the regular expression
481
- * @returns {string}
482
- */
483
- toString() {
484
- try {
485
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
486
- wasm.rregex_toString(retptr, this.ptr);
487
- var r0 = getInt32Memory0()[retptr / 4 + 0];
488
- var r1 = getInt32Memory0()[retptr / 4 + 1];
489
- return getStringFromWasm0(r0, r1);
490
- } finally {
491
- wasm.__wbindgen_add_to_stack_pointer(16);
492
- wasm.__wbindgen_free(r0, r1);
493
- }
494
- }
495
- }
496
- /**
497
- * Match multiple (possibly overlapping) regular expressions in a single scan.
498
- * A regex set corresponds to the union of two or more regular expressions. That is, a regex set will match text where at least one of its constituent regular expressions matches. A regex set as its formulated here provides a touch more power: it will also report which regular expressions in the set match. Indeed, this is the key difference between regex sets and a single `Regex` with many alternates, since only one alternate can match at a time.
499
- * @see https://docs.rs/regex/latest/regex/struct.RegexSet.html#method.empty
500
- */
501
- export class RRegexSet {
502
-
503
- static __wrap(ptr) {
504
- const obj = Object.create(RRegexSet.prototype);
505
- obj.ptr = ptr;
506
-
507
- return obj;
508
- }
509
-
510
- __destroy_into_raw() {
511
- const ptr = this.ptr;
512
- this.ptr = 0;
513
-
514
- return ptr;
515
- }
516
-
517
- free() {
518
- const ptr = this.__destroy_into_raw();
519
- wasm.__wbg_rregexset_free(ptr);
520
- }
521
- /**
522
- * Create a new regex set with the given regular expressions.
523
- * @param {Array<any>} list
524
- */
525
- constructor(list) {
526
- try {
527
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
528
- wasm.rregexset_new(retptr, addBorrowedObject(list));
529
- var r0 = getInt32Memory0()[retptr / 4 + 0];
530
- var r1 = getInt32Memory0()[retptr / 4 + 1];
531
- var r2 = getInt32Memory0()[retptr / 4 + 2];
532
- if (r2) {
533
- throw takeObject(r1);
534
- }
535
- return RRegexSet.__wrap(r0);
536
- } finally {
537
- wasm.__wbindgen_add_to_stack_pointer(16);
538
- heap[stack_pointer++] = undefined;
539
- }
540
- }
541
- /**
542
- * Returns true if and only if one of the regexes in this set matches the text given.
543
- * This method should be preferred if you only need to test whether any of the regexes in the set should match, but don’t care about which regexes matched. This is because the underlying matching engine will quit immediately after seeing the first match instead of continuing to find all matches.
544
- * @see https://docs.rs/regex/latest/regex/struct.RegexSet.html#method.is_match
545
- * @param {string} text
546
- * @returns {boolean}
547
- */
548
- isMatch(text) {
549
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
550
- const len0 = WASM_VECTOR_LEN;
551
- const ret = wasm.rregexset_isMatch(this.ptr, ptr0, len0);
552
- return ret !== 0;
553
- }
554
- /**
555
- * Returns the set of regular expressions that match in the given text.
556
- * The set returned contains the index of each regular expression that matches in the given text. The index is in correspondence with the order of regular expressions given to RegexSet’s constructor.
557
- * the set can also be used to iterate over the matched indices.
558
- * @param {string} text
559
- * @returns {any}
560
- */
561
- matches(text) {
562
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
563
- const len0 = WASM_VECTOR_LEN;
564
- const ret = wasm.rregexset_matches(this.ptr, ptr0, len0);
565
- return takeObject(ret);
566
- }
567
- }
568
-
569
- export function __wbindgen_object_drop_ref(arg0) {
570
- takeObject(arg0);
571
- };
572
-
573
- export function __wbindgen_string_new(arg0, arg1) {
574
- const ret = getStringFromWasm0(arg0, arg1);
575
- return addHeapObject(ret);
576
- };
577
-
578
- export function __wbindgen_number_new(arg0) {
579
- const ret = arg0;
580
- return addHeapObject(ret);
581
- };
582
-
583
- export function __wbindgen_is_string(arg0) {
584
- const ret = typeof(getObject(arg0)) === 'string';
585
- return ret;
586
- };
587
-
588
- export function __wbindgen_string_get(arg0, arg1) {
589
- const obj = getObject(arg1);
590
- const ret = typeof(obj) === 'string' ? obj : undefined;
591
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
592
- var len0 = WASM_VECTOR_LEN;
593
- getInt32Memory0()[arg0 / 4 + 1] = len0;
594
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
595
- };
596
-
597
- export function __wbg_get_f0f4f1608ebf633e(arg0, arg1) {
598
- const ret = getObject(arg0)[arg1 >>> 0];
599
- return addHeapObject(ret);
600
- };
601
-
602
- export function __wbg_length_93debb0e2e184ab6(arg0) {
603
- const ret = getObject(arg0).length;
604
- return ret;
605
- };
606
-
607
- export function __wbg_new_2ab697f1555e0dbc() {
608
- const ret = new Array();
609
- return addHeapObject(ret);
610
- };
611
-
612
- export function __wbg_new_306ce8d57919e6ae() {
613
- const ret = new Object();
614
- return addHeapObject(ret);
615
- };
616
-
617
- export function __wbg_push_811c8b08bf4ff9d5(arg0, arg1) {
618
- const ret = getObject(arg0).push(getObject(arg1));
619
- return ret;
620
- };
621
-
622
- export function __wbg_new_651776e932b7e9c7(arg0, arg1) {
623
- const ret = new Error(getStringFromWasm0(arg0, arg1));
624
- return addHeapObject(ret);
625
- };
626
-
627
- export function __wbg_set_b12cd0ab82903c2f() { return handleError(function (arg0, arg1, arg2) {
628
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
629
- return ret;
630
- }, arguments) };
631
-
632
- export function __wbindgen_debug_string(arg0, arg1) {
633
- const ret = debugString(getObject(arg1));
634
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
635
- const len0 = WASM_VECTOR_LEN;
636
- getInt32Memory0()[arg0 / 4 + 1] = len0;
637
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
638
- };
639
-
640
- export function __wbindgen_throw(arg0, arg1) {
641
- throw new Error(getStringFromWasm0(arg0, arg1));
642
- };
643
-
644
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
645
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
646
-