@@ -40,16 +40,16 @@ var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("ut
40
40
if ( typeof TextDecoder !== "undefined" ) {
41
41
cachedTextDecoder . decode ( ) ;
42
42
}
43
- var cachedUint8Memory0 = null ;
44
- function getUint8Memory0 ( ) {
45
- if ( cachedUint8Memory0 === null || cachedUint8Memory0 . byteLength === 0 ) {
46
- cachedUint8Memory0 = new Uint8Array ( wasm . memory . buffer ) ;
43
+ var cachedUint8ArrayMemory0 = null ;
44
+ function getUint8ArrayMemory0 ( ) {
45
+ if ( cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0 . byteLength === 0 ) {
46
+ cachedUint8ArrayMemory0 = new Uint8Array ( wasm . memory . buffer ) ;
47
47
}
48
- return cachedUint8Memory0 ;
48
+ return cachedUint8ArrayMemory0 ;
49
49
}
50
50
function getStringFromWasm0 ( ptr , len ) {
51
51
ptr = ptr >>> 0 ;
52
- return cachedTextDecoder . decode ( getUint8Memory0 ( ) . subarray ( ptr , ptr + len ) ) ;
52
+ return cachedTextDecoder . decode ( getUint8ArrayMemory0 ( ) . subarray ( ptr , ptr + len ) ) ;
53
53
}
54
54
var heap_next = heap . length ;
55
55
function addHeapObject ( obj ) {
@@ -60,6 +60,17 @@ function addHeapObject(obj) {
60
60
heap [ idx ] = obj ;
61
61
return idx ;
62
62
}
63
+ function dropObject ( idx ) {
64
+ if ( idx < 132 )
65
+ return ;
66
+ heap [ idx ] = heap_next ;
67
+ heap_next = idx ;
68
+ }
69
+ function takeObject ( idx ) {
70
+ const ret = getObject ( idx ) ;
71
+ dropObject ( idx ) ;
72
+ return ret ;
73
+ }
63
74
var WASM_VECTOR_LEN = 0 ;
64
75
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder ( "utf-8" ) : { encode : ( ) => {
65
76
throw Error ( "TextEncoder not available" ) ;
@@ -78,13 +89,13 @@ function passStringToWasm0(arg, malloc, realloc) {
78
89
if ( realloc === void 0 ) {
79
90
const buf = cachedTextEncoder . encode ( arg ) ;
80
91
const ptr2 = malloc ( buf . length , 1 ) >>> 0 ;
81
- getUint8Memory0 ( ) . subarray ( ptr2 , ptr2 + buf . length ) . set ( buf ) ;
92
+ getUint8ArrayMemory0 ( ) . subarray ( ptr2 , ptr2 + buf . length ) . set ( buf ) ;
82
93
WASM_VECTOR_LEN = buf . length ;
83
94
return ptr2 ;
84
95
}
85
96
let len = arg . length ;
86
97
let ptr = malloc ( len , 1 ) >>> 0 ;
87
- const mem = getUint8Memory0 ( ) ;
98
+ const mem = getUint8ArrayMemory0 ( ) ;
88
99
let offset = 0 ;
89
100
for ( ; offset < len ; offset ++ ) {
90
101
const code = arg . charCodeAt ( offset ) ;
@@ -97,7 +108,7 @@ function passStringToWasm0(arg, malloc, realloc) {
97
108
arg = arg . slice ( offset ) ;
98
109
}
99
110
ptr = realloc ( ptr , len , len = offset + arg . length * 3 , 1 ) >>> 0 ;
100
- const view = getUint8Memory0 ( ) . subarray ( ptr + offset , ptr + len ) ;
111
+ const view = getUint8ArrayMemory0 ( ) . subarray ( ptr + offset , ptr + len ) ;
101
112
const ret = encodeString ( arg , view ) ;
102
113
offset += ret . written ;
103
114
ptr = realloc ( ptr , len , offset , 1 ) >>> 0 ;
@@ -108,30 +119,12 @@ function passStringToWasm0(arg, malloc, realloc) {
108
119
function isLikeNone ( x ) {
109
120
return x === void 0 || x === null ;
110
121
}
111
- var cachedInt32Memory0 = null ;
112
- function getInt32Memory0 ( ) {
113
- if ( cachedInt32Memory0 === null || cachedInt32Memory0 . byteLength === 0 ) {
114
- cachedInt32Memory0 = new Int32Array ( wasm . memory . buffer ) ;
115
- }
116
- return cachedInt32Memory0 ;
117
- }
118
- function dropObject ( idx ) {
119
- if ( idx < 132 )
120
- return ;
121
- heap [ idx ] = heap_next ;
122
- heap_next = idx ;
123
- }
124
- function takeObject ( idx ) {
125
- const ret = getObject ( idx ) ;
126
- dropObject ( idx ) ;
127
- return ret ;
128
- }
129
- var cachedFloat64Memory0 = null ;
130
- function getFloat64Memory0 ( ) {
131
- if ( cachedFloat64Memory0 === null || cachedFloat64Memory0 . byteLength === 0 ) {
132
- cachedFloat64Memory0 = new Float64Array ( wasm . memory . buffer ) ;
122
+ var cachedDataViewMemory0 = null ;
123
+ function getDataViewMemory0 ( ) {
124
+ if ( cachedDataViewMemory0 === null || cachedDataViewMemory0 . buffer . detached === true || cachedDataViewMemory0 . buffer . detached === void 0 && cachedDataViewMemory0 . buffer !== wasm . memory . buffer ) {
125
+ cachedDataViewMemory0 = new DataView ( wasm . memory . buffer ) ;
133
126
}
134
- return cachedFloat64Memory0 ;
127
+ return cachedDataViewMemory0 ;
135
128
}
136
129
function debugString ( val ) {
137
130
const type = typeof val ;
@@ -197,10 +190,10 @@ function inline(html, options) {
197
190
const ptr0 = passStringToWasm0 ( html , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
198
191
const len0 = WASM_VECTOR_LEN ;
199
192
wasm . inline ( retptr , ptr0 , len0 , addHeapObject ( options ) ) ;
200
- var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
201
- var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
202
- var r2 = getInt32Memory0 ( ) [ retptr / 4 + 2 ] ;
203
- var r3 = getInt32Memory0 ( ) [ retptr / 4 + 3 ] ;
193
+ var r0 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 0 , true ) ;
194
+ var r1 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 1 , true ) ;
195
+ var r2 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 2 , true ) ;
196
+ var r3 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 3 , true ) ;
204
197
var ptr2 = r0 ;
205
198
var len2 = r1 ;
206
199
if ( r3 ) {
@@ -226,10 +219,10 @@ function inlineFragment(html, css, options) {
226
219
const ptr1 = passStringToWasm0 ( css , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
227
220
const len1 = WASM_VECTOR_LEN ;
228
221
wasm . inlineFragment ( retptr , ptr0 , len0 , ptr1 , len1 , addHeapObject ( options ) ) ;
229
- var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
230
- var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
231
- var r2 = getInt32Memory0 ( ) [ retptr / 4 + 2 ] ;
232
- var r3 = getInt32Memory0 ( ) [ retptr / 4 + 3 ] ;
222
+ var r0 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 0 , true ) ;
223
+ var r1 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 1 , true ) ;
224
+ var r2 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 2 , true ) ;
225
+ var r3 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 3 , true ) ;
233
226
var ptr3 = r0 ;
234
227
var len3 = r1 ;
235
228
if ( r3 ) {
@@ -251,8 +244,8 @@ function version() {
251
244
try {
252
245
const retptr = wasm . __wbindgen_add_to_stack_pointer ( - 16 ) ;
253
246
wasm . version ( retptr ) ;
254
- var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
255
- var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
247
+ var r0 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 0 , true ) ;
248
+ var r1 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 1 , true ) ;
256
249
deferred1_0 = r0 ;
257
250
deferred1_1 = r1 ;
258
251
return getStringFromWasm0 ( r0 , r1 ) ;
@@ -313,14 +306,17 @@ function __wbg_get_imports() {
313
306
const ret = getObject ( arg0 ) in getObject ( arg1 ) ;
314
307
return ret ;
315
308
} ;
316
- imports . wbg . __wbg_isSafeInteger_f7b04ef02296c4d2 = function ( arg0 ) {
309
+ imports . wbg . __wbg_isSafeInteger_7f1ed56200d90674 = function ( arg0 ) {
317
310
const ret = Number . isSafeInteger ( getObject ( arg0 ) ) ;
318
311
return ret ;
319
312
} ;
320
313
imports . wbg . __wbindgen_as_number = function ( arg0 ) {
321
314
const ret = + getObject ( arg0 ) ;
322
315
return ret ;
323
316
} ;
317
+ imports . wbg . __wbindgen_object_drop_ref = function ( arg0 ) {
318
+ takeObject ( arg0 ) ;
319
+ } ;
324
320
imports . wbg . __wbindgen_boolean_get = function ( arg0 ) {
325
321
const v = getObject ( arg0 ) ;
326
322
const ret = typeof v === "boolean" ? v ? 1 : 0 : 2 ;
@@ -331,31 +327,28 @@ function __wbg_get_imports() {
331
327
const ret = typeof obj === "string" ? obj : void 0 ;
332
328
var ptr1 = isLikeNone ( ret ) ? 0 : passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
333
329
var len1 = WASM_VECTOR_LEN ;
334
- getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len1 ;
335
- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr1 ;
330
+ getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
331
+ getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
336
332
} ;
337
- imports . wbg . __wbg_length_c20a40f15020d68a = function ( arg0 ) {
333
+ imports . wbg . __wbg_length_8339fcf5d8ecd12e = function ( arg0 ) {
338
334
const ret = getObject ( arg0 ) . length ;
339
335
return ret ;
340
336
} ;
341
337
imports . wbg . __wbindgen_memory = function ( ) {
342
338
const ret = wasm . memory ;
343
339
return addHeapObject ( ret ) ;
344
340
} ;
345
- imports . wbg . __wbg_buffer_12d079cc21e14bdb = function ( arg0 ) {
341
+ imports . wbg . __wbg_buffer_b7b08af79b0b0974 = function ( arg0 ) {
346
342
const ret = getObject ( arg0 ) . buffer ;
347
343
return addHeapObject ( ret ) ;
348
344
} ;
349
- imports . wbg . __wbg_new_63b92bc8671ed464 = function ( arg0 ) {
345
+ imports . wbg . __wbg_new_ea1883e1e5e86686 = function ( arg0 ) {
350
346
const ret = new Uint8Array ( getObject ( arg0 ) ) ;
351
347
return addHeapObject ( ret ) ;
352
348
} ;
353
- imports . wbg . __wbg_set_a47bac70306a19a7 = function ( arg0 , arg1 , arg2 ) {
349
+ imports . wbg . __wbg_set_d1e79e2388520f18 = function ( arg0 , arg1 , arg2 ) {
354
350
getObject ( arg0 ) . set ( getObject ( arg1 ) , arg2 >>> 0 ) ;
355
351
} ;
356
- imports . wbg . __wbindgen_object_drop_ref = function ( arg0 ) {
357
- takeObject ( arg0 ) ;
358
- } ;
359
352
imports . wbg . __wbindgen_error_new = function ( arg0 , arg1 ) {
360
353
const ret = new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
361
354
return addHeapObject ( ret ) ;
@@ -367,10 +360,10 @@ function __wbg_get_imports() {
367
360
imports . wbg . __wbindgen_number_get = function ( arg0 , arg1 ) {
368
361
const obj = getObject ( arg1 ) ;
369
362
const ret = typeof obj === "number" ? obj : void 0 ;
370
- getFloat64Memory0 ( ) [ arg0 / 8 + 1 ] = isLikeNone ( ret ) ? 0 : ret ;
371
- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ! isLikeNone ( ret ) ;
363
+ getDataViewMemory0 ( ) . setFloat64 ( arg0 + 8 * 1 , isLikeNone ( ret ) ? 0 : ret , true ) ;
364
+ getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ! isLikeNone ( ret ) , true ) ;
372
365
} ;
373
- imports . wbg . __wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function ( arg0 ) {
366
+ imports . wbg . __wbg_instanceof_Uint8Array_247a91427532499e = function ( arg0 ) {
374
367
let result ;
375
368
try {
376
369
result = getObject ( arg0 ) instanceof Uint8Array ;
@@ -380,7 +373,7 @@ function __wbg_get_imports() {
380
373
const ret = result ;
381
374
return ret ;
382
375
} ;
383
- imports . wbg . __wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function ( arg0 ) {
376
+ imports . wbg . __wbg_instanceof_ArrayBuffer_61dfc3198373c902 = function ( arg0 ) {
384
377
let result ;
385
378
try {
386
379
result = getObject ( arg0 ) instanceof ArrayBuffer ;
@@ -390,40 +383,43 @@ function __wbg_get_imports() {
390
383
const ret = result ;
391
384
return ret ;
392
385
} ;
386
+ imports . wbg . __wbindgen_throw = function ( arg0 , arg1 ) {
387
+ throw new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
388
+ } ;
393
389
imports . wbg . __wbindgen_debug_string = function ( arg0 , arg1 ) {
394
390
const ret = debugString ( getObject ( arg1 ) ) ;
395
391
const ptr1 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
396
392
const len1 = WASM_VECTOR_LEN ;
397
- getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len1 ;
398
- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr1 ;
399
- } ;
400
- imports . wbg . __wbindgen_throw = function ( arg0 , arg1 ) {
401
- throw new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
393
+ getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
394
+ getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
402
395
} ;
403
396
return imports ;
404
397
}
405
- function __wbg_init_memory ( imports , maybe_memory ) {
398
+ function __wbg_init_memory ( imports , memory ) {
406
399
}
407
400
function __wbg_finalize_init ( instance , module2 ) {
408
401
wasm = instance . exports ;
409
402
__wbg_init . __wbindgen_wasm_module = module2 ;
410
- cachedFloat64Memory0 = null ;
411
- cachedInt32Memory0 = null ;
412
- cachedUint8Memory0 = null ;
403
+ cachedDataViewMemory0 = null ;
404
+ cachedUint8ArrayMemory0 = null ;
413
405
return wasm ;
414
406
}
415
- async function __wbg_init ( input ) {
407
+ async function __wbg_init ( module_or_path ) {
416
408
if ( wasm !== void 0 )
417
409
return wasm ;
418
- if ( typeof input === "undefined" ) {
419
- input = new URL ( "index_bg.wasm" , void 0 ) ;
410
+ if ( typeof module_or_path !== "undefined" && Object . getPrototypeOf ( module_or_path ) === Object . prototype )
411
+ ( { module_or_path } = module_or_path ) ;
412
+ else
413
+ console . warn ( "using deprecated parameters for the initialization function; pass a single object instead" ) ;
414
+ if ( typeof module_or_path === "undefined" ) {
415
+ module_or_path = new URL ( "index_bg.wasm" , void 0 ) ;
420
416
}
421
417
const imports = __wbg_get_imports ( ) ;
422
- if ( typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL ) {
423
- input = fetch ( input ) ;
418
+ if ( typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL ) {
419
+ module_or_path = fetch ( module_or_path ) ;
424
420
}
425
421
__wbg_init_memory ( imports ) ;
426
- const { instance, module : module2 } = await __wbg_load ( await input , imports ) ;
422
+ const { instance, module : module2 } = await __wbg_load ( await module_or_path , imports ) ;
427
423
return __wbg_finalize_init ( instance , module2 ) ;
428
424
}
429
425
var dist_default = __wbg_init ;
0 commit comments