@css-inline/css-inline-wasm 0.14.1 → 0.14.3
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/index.js +66 -70
- package/index.min.js +2 -2
- package/index.mjs +66 -70
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -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
|
|
44
|
-
function
|
|
45
|
-
if (
|
|
46
|
-
|
|
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
|
|
48
|
+
return cachedUint8ArrayMemory0;
|
|
49
49
|
}
|
|
50
50
|
function getStringFromWasm0(ptr, len) {
|
|
51
51
|
ptr = ptr >>> 0;
|
|
52
|
-
return cachedTextDecoder.decode(
|
|
52
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
53
53
|
}
|
|
54
54
|
var heap_next = heap.length;
|
|
55
55
|
function addHeapObject(obj) {
|
|
@@ -60,17 +60,6 @@ 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
|
-
}
|
|
74
63
|
var WASM_VECTOR_LEN = 0;
|
|
75
64
|
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
|
|
76
65
|
throw Error("TextEncoder not available");
|
|
@@ -89,13 +78,13 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
89
78
|
if (realloc === void 0) {
|
|
90
79
|
const buf = cachedTextEncoder.encode(arg);
|
|
91
80
|
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
92
|
-
|
|
81
|
+
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
93
82
|
WASM_VECTOR_LEN = buf.length;
|
|
94
83
|
return ptr2;
|
|
95
84
|
}
|
|
96
85
|
let len = arg.length;
|
|
97
86
|
let ptr = malloc(len, 1) >>> 0;
|
|
98
|
-
const mem =
|
|
87
|
+
const mem = getUint8ArrayMemory0();
|
|
99
88
|
let offset = 0;
|
|
100
89
|
for (; offset < len; offset++) {
|
|
101
90
|
const code = arg.charCodeAt(offset);
|
|
@@ -108,7 +97,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
108
97
|
arg = arg.slice(offset);
|
|
109
98
|
}
|
|
110
99
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
111
|
-
const view =
|
|
100
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
112
101
|
const ret = encodeString(arg, view);
|
|
113
102
|
offset += ret.written;
|
|
114
103
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -119,19 +108,23 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
119
108
|
function isLikeNone(x) {
|
|
120
109
|
return x === void 0 || x === null;
|
|
121
110
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
125
|
-
|
|
111
|
+
var cachedDataViewMemory0 = null;
|
|
112
|
+
function getDataViewMemory0() {
|
|
113
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
114
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
126
115
|
}
|
|
127
|
-
return
|
|
116
|
+
return cachedDataViewMemory0;
|
|
128
117
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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;
|
|
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 =
|
|
201
|
-
var r1 =
|
|
202
|
-
var r2 =
|
|
203
|
-
var r3 =
|
|
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 =
|
|
230
|
-
var r1 =
|
|
231
|
-
var r2 =
|
|
232
|
-
var r3 =
|
|
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 =
|
|
255
|
-
var r1 =
|
|
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,7 +306,7 @@ function __wbg_get_imports() {
|
|
|
313
306
|
const ret = getObject(arg0) in getObject(arg1);
|
|
314
307
|
return ret;
|
|
315
308
|
};
|
|
316
|
-
imports.wbg.
|
|
309
|
+
imports.wbg.__wbg_isSafeInteger_7f1ed56200d90674 = function(arg0) {
|
|
317
310
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
318
311
|
return ret;
|
|
319
312
|
};
|
|
@@ -321,9 +314,6 @@ function __wbg_get_imports() {
|
|
|
321
314
|
const ret = +getObject(arg0);
|
|
322
315
|
return ret;
|
|
323
316
|
};
|
|
324
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
325
|
-
takeObject(arg0);
|
|
326
|
-
};
|
|
327
317
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
328
318
|
const v = getObject(arg0);
|
|
329
319
|
const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
@@ -334,10 +324,10 @@ function __wbg_get_imports() {
|
|
|
334
324
|
const ret = typeof obj === "string" ? obj : void 0;
|
|
335
325
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
336
326
|
var len1 = WASM_VECTOR_LEN;
|
|
337
|
-
|
|
338
|
-
|
|
327
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
328
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
339
329
|
};
|
|
340
|
-
imports.wbg.
|
|
330
|
+
imports.wbg.__wbg_length_8339fcf5d8ecd12e = function(arg0) {
|
|
341
331
|
const ret = getObject(arg0).length;
|
|
342
332
|
return ret;
|
|
343
333
|
};
|
|
@@ -345,17 +335,20 @@ function __wbg_get_imports() {
|
|
|
345
335
|
const ret = wasm.memory;
|
|
346
336
|
return addHeapObject(ret);
|
|
347
337
|
};
|
|
348
|
-
imports.wbg.
|
|
338
|
+
imports.wbg.__wbg_buffer_b7b08af79b0b0974 = function(arg0) {
|
|
349
339
|
const ret = getObject(arg0).buffer;
|
|
350
340
|
return addHeapObject(ret);
|
|
351
341
|
};
|
|
352
|
-
imports.wbg.
|
|
342
|
+
imports.wbg.__wbg_new_ea1883e1e5e86686 = function(arg0) {
|
|
353
343
|
const ret = new Uint8Array(getObject(arg0));
|
|
354
344
|
return addHeapObject(ret);
|
|
355
345
|
};
|
|
356
|
-
imports.wbg.
|
|
346
|
+
imports.wbg.__wbg_set_d1e79e2388520f18 = function(arg0, arg1, arg2) {
|
|
357
347
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
358
348
|
};
|
|
349
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
350
|
+
takeObject(arg0);
|
|
351
|
+
};
|
|
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
|
-
|
|
371
|
-
|
|
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.
|
|
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.
|
|
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
|
-
|
|
398
|
-
|
|
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,
|
|
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
|
-
|
|
411
|
-
|
|
412
|
-
cachedUint8Memory0 = null;
|
|
403
|
+
cachedDataViewMemory0 = null;
|
|
404
|
+
cachedUint8ArrayMemory0 = null;
|
|
413
405
|
return wasm;
|
|
414
406
|
}
|
|
415
|
-
async function __wbg_init(
|
|
407
|
+
async function __wbg_init(module_or_path) {
|
|
416
408
|
if (wasm !== void 0)
|
|
417
409
|
return wasm;
|
|
418
|
-
if (typeof
|
|
419
|
-
|
|
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
|
|
423
|
-
|
|
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
|
|
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;
|
package/index.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var cssInline=(()=>{var
|
|
2
|
-
${
|
|
1
|
+
"use strict";var cssInline=(()=>{var S=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var V=(e,n)=>{for(var t in n)S(e,t,{get:n[t],enumerable:!0})},q=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of B(n))!P.call(e,i)&&i!==t&&S(e,i,{get:()=>n[i],enumerable:!(r=z(n,i))||r.enumerable});return e};var C=e=>q(S({},"__esModule",{value:!0}),e);var ne={};V(ne,{initWasm:()=>X,inline:()=>Y,inlineFragment:()=>Z,version:()=>ee});var o,d=new Array(128).fill(void 0);d.push(void 0,null,!0,!1);function c(e){return d[e]}var T=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&T.decode();var h=null;function j(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(o.memory.buffer)),h}function m(e,n){return e=e>>>0,T.decode(j().subarray(e,e+n))}var I=d.length;function g(e){I===d.length&&d.push(d.length+1);let n=I;return I=d[n],d[n]=e,n}var p=0,x=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},H=typeof x.encodeInto=="function"?function(e,n){return x.encodeInto(e,n)}:function(e,n){let t=x.encode(e);return n.set(t),{read:e.length,written:t.length}};function A(e,n,t){if(t===void 0){let u=x.encode(e),a=n(u.length,1)>>>0;return j().subarray(a,a+u.length).set(u),p=u.length,a}let r=e.length,i=n(r,1)>>>0,_=j(),s=0;for(;s<r;s++){let u=e.charCodeAt(s);if(u>127)break;_[i+s]=u}if(s!==r){s!==0&&(e=e.slice(s)),i=t(i,r,r=s+e.length*3,1)>>>0;let u=j().subarray(i+s,i+r),a=H(e,u);s+=a.written,i=t(i,r,s,1)>>>0}return p=s,i}function W(e){return e==null}var y=null;function f(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==o.memory.buffer)&&(y=new DataView(o.memory.buffer)),y}function J(e){e<132||(d[e]=I,I=e)}function E(e){let n=c(e);return J(e),n}function v(e){let n=typeof e;if(n=="number"||n=="boolean"||e==null)return`${e}`;if(n=="string")return`"${e}"`;if(n=="symbol"){let i=e.description;return i==null?"Symbol":`Symbol(${i})`}if(n=="function"){let i=e.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(e)){let i=e.length,_="[";i>0&&(_+=v(e[0]));for(let s=1;s<i;s++)_+=", "+v(e[s]);return _+="]",_}let t=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(t.length>1)r=t[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
|
|
2
|
+
${e.stack}`:r}function k(e,n){let t,r;try{let b=o.__wbindgen_add_to_stack_pointer(-16),w=A(e,o.__wbindgen_malloc,o.__wbindgen_realloc),O=p;o.inline(b,w,O,g(n));var i=f().getInt32(b+4*0,!0),_=f().getInt32(b+4*1,!0),s=f().getInt32(b+4*2,!0),u=f().getInt32(b+4*3,!0),a=i,l=_;if(u)throw a=0,l=0,E(s);return t=a,r=l,m(a,l)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(t,r,1)}}function F(e,n,t){let r,i;try{let w=o.__wbindgen_add_to_stack_pointer(-16),O=A(e,o.__wbindgen_malloc,o.__wbindgen_realloc),$=p,L=A(n,o.__wbindgen_malloc,o.__wbindgen_realloc),N=p;o.inlineFragment(w,O,$,L,N,g(t));var _=f().getInt32(w+4*0,!0),s=f().getInt32(w+4*1,!0),u=f().getInt32(w+4*2,!0),a=f().getInt32(w+4*3,!0),l=_,b=s;if(a)throw l=0,b=0,E(u);return r=l,i=b,m(l,b)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(r,i,1)}}function M(){let e,n;try{let i=o.__wbindgen_add_to_stack_pointer(-16);o.version(i);var t=f().getInt32(i+4*0,!0),r=f().getInt32(i+4*1,!0);return e=t,n=r,m(t,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(e,n,1)}}async function G(e,n){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,n)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")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",r);else throw r}let t=await e.arrayBuffer();return await WebAssembly.instantiate(t,n)}else{let t=await WebAssembly.instantiate(e,n);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}function K(){let e={};return e.wbg={},e.wbg.__wbindgen_is_undefined=function(n){return c(n)===void 0},e.wbg.__wbindgen_string_new=function(n,t){let r=m(n,t);return g(r)},e.wbg.__wbindgen_is_object=function(n){let t=c(n);return typeof t=="object"&&t!==null},e.wbg.__wbindgen_object_clone_ref=function(n){let t=c(n);return g(t)},e.wbg.__wbg_getwithrefkey_edc2c8960f0f1191=function(n,t){let r=c(n)[c(t)];return g(r)},e.wbg.__wbindgen_in=function(n,t){return c(n)in c(t)},e.wbg.__wbg_isSafeInteger_7f1ed56200d90674=function(n){return Number.isSafeInteger(c(n))},e.wbg.__wbindgen_as_number=function(n){return+c(n)},e.wbg.__wbindgen_boolean_get=function(n){let t=c(n);return typeof t=="boolean"?t?1:0:2},e.wbg.__wbindgen_string_get=function(n,t){let r=c(t),i=typeof r=="string"?r:void 0;var _=W(i)?0:A(i,o.__wbindgen_malloc,o.__wbindgen_realloc),s=p;f().setInt32(n+4*1,s,!0),f().setInt32(n+4*0,_,!0)},e.wbg.__wbg_length_8339fcf5d8ecd12e=function(n){return c(n).length},e.wbg.__wbindgen_memory=function(){let n=o.memory;return g(n)},e.wbg.__wbg_buffer_b7b08af79b0b0974=function(n){let t=c(n).buffer;return g(t)},e.wbg.__wbg_new_ea1883e1e5e86686=function(n){let t=new Uint8Array(c(n));return g(t)},e.wbg.__wbg_set_d1e79e2388520f18=function(n,t,r){c(n).set(c(t),r>>>0)},e.wbg.__wbindgen_object_drop_ref=function(n){E(n)},e.wbg.__wbindgen_error_new=function(n,t){let r=new Error(m(n,t));return g(r)},e.wbg.__wbindgen_jsval_loose_eq=function(n,t){return c(n)==c(t)},e.wbg.__wbindgen_number_get=function(n,t){let r=c(t),i=typeof r=="number"?r:void 0;f().setFloat64(n+8*1,W(i)?0:i,!0),f().setInt32(n+4*0,!W(i),!0)},e.wbg.__wbg_instanceof_Uint8Array_247a91427532499e=function(n){let t;try{t=c(n)instanceof Uint8Array}catch{t=!1}return t},e.wbg.__wbg_instanceof_ArrayBuffer_61dfc3198373c902=function(n){let t;try{t=c(n)instanceof ArrayBuffer}catch{t=!1}return t},e.wbg.__wbindgen_throw=function(n,t){throw new Error(m(n,t))},e.wbg.__wbindgen_debug_string=function(n,t){let r=v(c(t)),i=A(r,o.__wbindgen_malloc,o.__wbindgen_realloc),_=p;f().setInt32(n+4*1,_,!0),f().setInt32(n+4*0,i,!0)},e}function Q(e,n){return o=e.exports,U.__wbindgen_wasm_module=n,y=null,h=null,o}async function U(e){if(o!==void 0)return o;typeof e<"u"&&Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead"),typeof e>"u"&&(e=new URL("index_bg.wasm",void 0));let n=K();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:t,module:r}=await G(await e,n);return Q(t,r)}var D=U;var R=!1,X=async e=>{if(R)throw new Error("Already initialized. The `initWasm()` function can be used only once.");await D(await e),R=!0};function Y(e,n){return k(e,n)}function Z(e,n,t){return F(e,n,t)}function ee(){return M()}return C(ne);})();
|
package/index.mjs
CHANGED
|
@@ -11,16 +11,16 @@ var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("ut
|
|
|
11
11
|
if (typeof TextDecoder !== "undefined") {
|
|
12
12
|
cachedTextDecoder.decode();
|
|
13
13
|
}
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
14
|
+
var cachedUint8ArrayMemory0 = null;
|
|
15
|
+
function getUint8ArrayMemory0() {
|
|
16
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
17
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return cachedUint8ArrayMemory0;
|
|
20
20
|
}
|
|
21
21
|
function getStringFromWasm0(ptr, len) {
|
|
22
22
|
ptr = ptr >>> 0;
|
|
23
|
-
return cachedTextDecoder.decode(
|
|
23
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
24
24
|
}
|
|
25
25
|
var heap_next = heap.length;
|
|
26
26
|
function addHeapObject(obj) {
|
|
@@ -31,17 +31,6 @@ function addHeapObject(obj) {
|
|
|
31
31
|
heap[idx] = obj;
|
|
32
32
|
return idx;
|
|
33
33
|
}
|
|
34
|
-
function dropObject(idx) {
|
|
35
|
-
if (idx < 132)
|
|
36
|
-
return;
|
|
37
|
-
heap[idx] = heap_next;
|
|
38
|
-
heap_next = idx;
|
|
39
|
-
}
|
|
40
|
-
function takeObject(idx) {
|
|
41
|
-
const ret = getObject(idx);
|
|
42
|
-
dropObject(idx);
|
|
43
|
-
return ret;
|
|
44
|
-
}
|
|
45
34
|
var WASM_VECTOR_LEN = 0;
|
|
46
35
|
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
|
|
47
36
|
throw Error("TextEncoder not available");
|
|
@@ -60,13 +49,13 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
60
49
|
if (realloc === void 0) {
|
|
61
50
|
const buf = cachedTextEncoder.encode(arg);
|
|
62
51
|
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
63
|
-
|
|
52
|
+
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
64
53
|
WASM_VECTOR_LEN = buf.length;
|
|
65
54
|
return ptr2;
|
|
66
55
|
}
|
|
67
56
|
let len = arg.length;
|
|
68
57
|
let ptr = malloc(len, 1) >>> 0;
|
|
69
|
-
const mem =
|
|
58
|
+
const mem = getUint8ArrayMemory0();
|
|
70
59
|
let offset = 0;
|
|
71
60
|
for (; offset < len; offset++) {
|
|
72
61
|
const code = arg.charCodeAt(offset);
|
|
@@ -79,7 +68,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
79
68
|
arg = arg.slice(offset);
|
|
80
69
|
}
|
|
81
70
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
82
|
-
const view =
|
|
71
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
83
72
|
const ret = encodeString(arg, view);
|
|
84
73
|
offset += ret.written;
|
|
85
74
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -90,19 +79,23 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
90
79
|
function isLikeNone(x) {
|
|
91
80
|
return x === void 0 || x === null;
|
|
92
81
|
}
|
|
93
|
-
var
|
|
94
|
-
function
|
|
95
|
-
if (
|
|
96
|
-
|
|
82
|
+
var cachedDataViewMemory0 = null;
|
|
83
|
+
function getDataViewMemory0() {
|
|
84
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
85
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
97
86
|
}
|
|
98
|
-
return
|
|
87
|
+
return cachedDataViewMemory0;
|
|
99
88
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
89
|
+
function dropObject(idx) {
|
|
90
|
+
if (idx < 132)
|
|
91
|
+
return;
|
|
92
|
+
heap[idx] = heap_next;
|
|
93
|
+
heap_next = idx;
|
|
94
|
+
}
|
|
95
|
+
function takeObject(idx) {
|
|
96
|
+
const ret = getObject(idx);
|
|
97
|
+
dropObject(idx);
|
|
98
|
+
return ret;
|
|
106
99
|
}
|
|
107
100
|
function debugString(val) {
|
|
108
101
|
const type = typeof val;
|
|
@@ -168,10 +161,10 @@ function inline(html, options) {
|
|
|
168
161
|
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
169
162
|
const len0 = WASM_VECTOR_LEN;
|
|
170
163
|
wasm.inline(retptr, ptr0, len0, addHeapObject(options));
|
|
171
|
-
var r0 =
|
|
172
|
-
var r1 =
|
|
173
|
-
var r2 =
|
|
174
|
-
var r3 =
|
|
164
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
165
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
166
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
167
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
175
168
|
var ptr2 = r0;
|
|
176
169
|
var len2 = r1;
|
|
177
170
|
if (r3) {
|
|
@@ -197,10 +190,10 @@ function inlineFragment(html, css, options) {
|
|
|
197
190
|
const ptr1 = passStringToWasm0(css, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
198
191
|
const len1 = WASM_VECTOR_LEN;
|
|
199
192
|
wasm.inlineFragment(retptr, ptr0, len0, ptr1, len1, addHeapObject(options));
|
|
200
|
-
var r0 =
|
|
201
|
-
var r1 =
|
|
202
|
-
var r2 =
|
|
203
|
-
var r3 =
|
|
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 ptr3 = r0;
|
|
205
198
|
var len3 = r1;
|
|
206
199
|
if (r3) {
|
|
@@ -222,8 +215,8 @@ function version() {
|
|
|
222
215
|
try {
|
|
223
216
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
224
217
|
wasm.version(retptr);
|
|
225
|
-
var r0 =
|
|
226
|
-
var r1 =
|
|
218
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
219
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
227
220
|
deferred1_0 = r0;
|
|
228
221
|
deferred1_1 = r1;
|
|
229
222
|
return getStringFromWasm0(r0, r1);
|
|
@@ -284,7 +277,7 @@ function __wbg_get_imports() {
|
|
|
284
277
|
const ret = getObject(arg0) in getObject(arg1);
|
|
285
278
|
return ret;
|
|
286
279
|
};
|
|
287
|
-
imports.wbg.
|
|
280
|
+
imports.wbg.__wbg_isSafeInteger_7f1ed56200d90674 = function(arg0) {
|
|
288
281
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
289
282
|
return ret;
|
|
290
283
|
};
|
|
@@ -292,9 +285,6 @@ function __wbg_get_imports() {
|
|
|
292
285
|
const ret = +getObject(arg0);
|
|
293
286
|
return ret;
|
|
294
287
|
};
|
|
295
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
296
|
-
takeObject(arg0);
|
|
297
|
-
};
|
|
298
288
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
299
289
|
const v = getObject(arg0);
|
|
300
290
|
const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
@@ -305,10 +295,10 @@ function __wbg_get_imports() {
|
|
|
305
295
|
const ret = typeof obj === "string" ? obj : void 0;
|
|
306
296
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
307
297
|
var len1 = WASM_VECTOR_LEN;
|
|
308
|
-
|
|
309
|
-
|
|
298
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
299
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
310
300
|
};
|
|
311
|
-
imports.wbg.
|
|
301
|
+
imports.wbg.__wbg_length_8339fcf5d8ecd12e = function(arg0) {
|
|
312
302
|
const ret = getObject(arg0).length;
|
|
313
303
|
return ret;
|
|
314
304
|
};
|
|
@@ -316,17 +306,20 @@ function __wbg_get_imports() {
|
|
|
316
306
|
const ret = wasm.memory;
|
|
317
307
|
return addHeapObject(ret);
|
|
318
308
|
};
|
|
319
|
-
imports.wbg.
|
|
309
|
+
imports.wbg.__wbg_buffer_b7b08af79b0b0974 = function(arg0) {
|
|
320
310
|
const ret = getObject(arg0).buffer;
|
|
321
311
|
return addHeapObject(ret);
|
|
322
312
|
};
|
|
323
|
-
imports.wbg.
|
|
313
|
+
imports.wbg.__wbg_new_ea1883e1e5e86686 = function(arg0) {
|
|
324
314
|
const ret = new Uint8Array(getObject(arg0));
|
|
325
315
|
return addHeapObject(ret);
|
|
326
316
|
};
|
|
327
|
-
imports.wbg.
|
|
317
|
+
imports.wbg.__wbg_set_d1e79e2388520f18 = function(arg0, arg1, arg2) {
|
|
328
318
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
329
319
|
};
|
|
320
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
321
|
+
takeObject(arg0);
|
|
322
|
+
};
|
|
330
323
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
331
324
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
332
325
|
return addHeapObject(ret);
|
|
@@ -338,10 +331,10 @@ function __wbg_get_imports() {
|
|
|
338
331
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
339
332
|
const obj = getObject(arg1);
|
|
340
333
|
const ret = typeof obj === "number" ? obj : void 0;
|
|
341
|
-
|
|
342
|
-
|
|
334
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
335
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
343
336
|
};
|
|
344
|
-
imports.wbg.
|
|
337
|
+
imports.wbg.__wbg_instanceof_Uint8Array_247a91427532499e = function(arg0) {
|
|
345
338
|
let result;
|
|
346
339
|
try {
|
|
347
340
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -351,7 +344,7 @@ function __wbg_get_imports() {
|
|
|
351
344
|
const ret = result;
|
|
352
345
|
return ret;
|
|
353
346
|
};
|
|
354
|
-
imports.wbg.
|
|
347
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_61dfc3198373c902 = function(arg0) {
|
|
355
348
|
let result;
|
|
356
349
|
try {
|
|
357
350
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -361,40 +354,43 @@ function __wbg_get_imports() {
|
|
|
361
354
|
const ret = result;
|
|
362
355
|
return ret;
|
|
363
356
|
};
|
|
357
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
358
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
359
|
+
};
|
|
364
360
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
365
361
|
const ret = debugString(getObject(arg1));
|
|
366
362
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
367
363
|
const len1 = WASM_VECTOR_LEN;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
};
|
|
371
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
372
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
364
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
365
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
373
366
|
};
|
|
374
367
|
return imports;
|
|
375
368
|
}
|
|
376
|
-
function __wbg_init_memory(imports,
|
|
369
|
+
function __wbg_init_memory(imports, memory) {
|
|
377
370
|
}
|
|
378
371
|
function __wbg_finalize_init(instance, module) {
|
|
379
372
|
wasm = instance.exports;
|
|
380
373
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
cachedUint8Memory0 = null;
|
|
374
|
+
cachedDataViewMemory0 = null;
|
|
375
|
+
cachedUint8ArrayMemory0 = null;
|
|
384
376
|
return wasm;
|
|
385
377
|
}
|
|
386
|
-
async function __wbg_init(
|
|
378
|
+
async function __wbg_init(module_or_path) {
|
|
387
379
|
if (wasm !== void 0)
|
|
388
380
|
return wasm;
|
|
389
|
-
if (typeof
|
|
390
|
-
|
|
381
|
+
if (typeof module_or_path !== "undefined" && Object.getPrototypeOf(module_or_path) === Object.prototype)
|
|
382
|
+
({ module_or_path } = module_or_path);
|
|
383
|
+
else
|
|
384
|
+
console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
385
|
+
if (typeof module_or_path === "undefined") {
|
|
386
|
+
module_or_path = new URL("index_bg.wasm", void 0);
|
|
391
387
|
}
|
|
392
388
|
const imports = __wbg_get_imports();
|
|
393
|
-
if (typeof
|
|
394
|
-
|
|
389
|
+
if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
|
|
390
|
+
module_or_path = fetch(module_or_path);
|
|
395
391
|
}
|
|
396
392
|
__wbg_init_memory(imports);
|
|
397
|
-
const { instance, module } = await __wbg_load(await
|
|
393
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
398
394
|
return __wbg_finalize_init(instance, module);
|
|
399
395
|
}
|
|
400
396
|
var dist_default = __wbg_init;
|
package/index_bg.wasm
CHANGED
|
Binary file
|