@master/css-binding-wasm-compiler 0.0.0-stage → 3.0.0

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.
@@ -0,0 +1,702 @@
1
+ // artifacts/mastercss_binding_wasm_compiler.js
2
+ var CompilerRenderSession = class {
3
+ __destroy_into_raw() {
4
+ const ptr = this.__wbg_ptr;
5
+ this.__wbg_ptr = 0;
6
+ CompilerRenderSessionFinalization.unregister(this);
7
+ return ptr;
8
+ }
9
+ free() {
10
+ const ptr = this.__destroy_into_raw();
11
+ wasm.__wbg_compilerrendersession_free(ptr, 0);
12
+ }
13
+ dispose() {
14
+ wasm.compilerrendersession_dispose(this.__wbg_ptr);
15
+ }
16
+ /**
17
+ * @returns {any}
18
+ */
19
+ emittedGlobals() {
20
+ const ret = wasm.compilerrendersession_emittedGlobals(this.__wbg_ptr);
21
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
22
+ return takeFromExternrefTable0(ret[0]);
23
+ }
24
+ /**
25
+ * @param {string[]} class_names
26
+ */
27
+ ensureClasses(class_names) {
28
+ const ptr0 = passArrayJsValueToWasm0(class_names, wasm.__wbindgen_malloc);
29
+ const len0 = WASM_VECTOR_LEN;
30
+ const ret = wasm.compilerrendersession_ensureClasses(this.__wbg_ptr, ptr0, len0);
31
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
32
+ }
33
+ /**
34
+ * @param {string} native_css
35
+ */
36
+ ensureStylesheetResources(native_css) {
37
+ const ptr0 = passStringToWasm0(native_css, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38
+ const len0 = WASM_VECTOR_LEN;
39
+ const ret = wasm.compilerrendersession_ensureStylesheetResources(this.__wbg_ptr, ptr0, len0);
40
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
41
+ }
42
+ /**
43
+ * @param {string[]} class_names
44
+ * @returns {any}
45
+ */
46
+ nativeDeclarationCandidates(class_names) {
47
+ const ptr0 = passArrayJsValueToWasm0(class_names, wasm.__wbindgen_malloc);
48
+ const len0 = WASM_VECTOR_LEN;
49
+ const ret = wasm.compilerrendersession_nativeDeclarationCandidates(this.__wbg_ptr, ptr0, len0);
50
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
51
+ return takeFromExternrefTable0(ret[0]);
52
+ }
53
+ /**
54
+ * @param {string} manifest_json
55
+ * @param {string | null} [emitted_globals_json]
56
+ */
57
+ constructor(manifest_json, emitted_globals_json) {
58
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
59
+ const len0 = WASM_VECTOR_LEN;
60
+ var ptr1 = isLikeNone(emitted_globals_json) ? 0 : passStringToWasm0(emitted_globals_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
61
+ var len1 = WASM_VECTOR_LEN;
62
+ const ret = wasm.compilerrendersession_new(ptr0, len0, ptr1, len1);
63
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
64
+ this.__wbg_ptr = ret[0];
65
+ CompilerRenderSessionFinalization.register(this, this.__wbg_ptr, this);
66
+ return this;
67
+ }
68
+ /**
69
+ * @returns {any}
70
+ */
71
+ snapshot() {
72
+ const ret = wasm.compilerrendersession_snapshot(this.__wbg_ptr);
73
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
74
+ return takeFromExternrefTable0(ret[0]);
75
+ }
76
+ };
77
+ if (Symbol.dispose) CompilerRenderSession.prototype[Symbol.dispose] = CompilerRenderSession.prototype.free;
78
+ /**
79
+ * @param {string} source
80
+ * @returns {any}
81
+ */
82
+ function analyzeCSSDependencies(source) {
83
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
84
+ const len0 = WASM_VECTOR_LEN;
85
+ const ret = wasm.analyzeCSSDependencies(ptr0, len0);
86
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
87
+ return takeFromExternrefTable0(ret[0]);
88
+ }
89
+ /**
90
+ * @param {string} source
91
+ * @returns {any}
92
+ */
93
+ function analyzeStandaloneDirectives(source) {
94
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
95
+ const len0 = WASM_VECTOR_LEN;
96
+ const ret = wasm.analyzeStandaloneDirectives(ptr0, len0);
97
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
98
+ return takeFromExternrefTable0(ret[0]);
99
+ }
100
+ /**
101
+ * @returns {any}
102
+ */
103
+ function bindingInfo() {
104
+ const ret = wasm.bindingInfo();
105
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
106
+ return takeFromExternrefTable0(ret[0]);
107
+ }
108
+ /**
109
+ * @param {any} request
110
+ * @returns {any}
111
+ */
112
+ function compareProjectSnapshots(request) {
113
+ const ret = wasm.compareProjectSnapshots(request);
114
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
115
+ return takeFromExternrefTable0(ret[0]);
116
+ }
117
+ /**
118
+ * @param {string} source
119
+ * @param {any} options
120
+ * @returns {any}
121
+ */
122
+ function compileCSSDirectives(source, options) {
123
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
124
+ const len0 = WASM_VECTOR_LEN;
125
+ const ret = wasm.compileCSSDirectives(ptr0, len0, options);
126
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
127
+ return takeFromExternrefTable0(ret[0]);
128
+ }
129
+ /**
130
+ * JSON in and out, like the native binding, so both share the compiler's reuse of
131
+ * identical requests.
132
+ * @param {string} request_json
133
+ * @returns {string}
134
+ */
135
+ function compileCSSStylesheetGraph(request_json) {
136
+ let deferred3_0;
137
+ let deferred3_1;
138
+ try {
139
+ const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
140
+ const len0 = WASM_VECTOR_LEN;
141
+ const ret = wasm.compileCSSStylesheetGraph(ptr0, len0);
142
+ var ptr2 = ret[0];
143
+ var len2 = ret[1];
144
+ if (ret[3]) {
145
+ ptr2 = 0;
146
+ len2 = 0;
147
+ throw takeFromExternrefTable0(ret[2]);
148
+ }
149
+ deferred3_0 = ptr2;
150
+ deferred3_1 = len2;
151
+ return getStringFromWasm0(ptr2, len2);
152
+ } finally {
153
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
154
+ }
155
+ }
156
+ /**
157
+ * @param {any} request
158
+ * @returns {any}
159
+ */
160
+ function compileDefaultPresetManifest(request) {
161
+ const ret = wasm.compileDefaultPresetManifest(request);
162
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
163
+ return takeFromExternrefTable0(ret[0]);
164
+ }
165
+ /**
166
+ * @param {any} input
167
+ * @param {any} options
168
+ * @returns {any}
169
+ */
170
+ function compileManifestInput(input, options) {
171
+ const ret = wasm.compileManifestInput(input, options);
172
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
173
+ return takeFromExternrefTable0(ret[0]);
174
+ }
175
+ /**
176
+ * @param {string} source
177
+ * @param {any} options
178
+ * @returns {any}
179
+ */
180
+ function compileNativeCSS(source, options) {
181
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
182
+ const len0 = WASM_VECTOR_LEN;
183
+ const ret = wasm.compileNativeCSS(ptr0, len0, options);
184
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
185
+ return takeFromExternrefTable0(ret[0]);
186
+ }
187
+ /**
188
+ * @param {string[]} candidates
189
+ * @param {any} blocklist
190
+ * @returns {string[]}
191
+ */
192
+ function filterCSSExtractionCandidates(candidates, blocklist) {
193
+ const ptr0 = passArrayJsValueToWasm0(candidates, wasm.__wbindgen_malloc);
194
+ const len0 = WASM_VECTOR_LEN;
195
+ const ret = wasm.filterCSSExtractionCandidates(ptr0, len0, blocklist);
196
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
197
+ var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]);
198
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
199
+ return v2;
200
+ }
201
+ /**
202
+ * @param {string} source
203
+ * @returns {any}
204
+ */
205
+ function inspectCSS(source) {
206
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
207
+ const len0 = WASM_VECTOR_LEN;
208
+ const ret = wasm.inspectCSS(ptr0, len0);
209
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
210
+ return takeFromExternrefTable0(ret[0]);
211
+ }
212
+ /**
213
+ * @param {any} request
214
+ * @param {any} options
215
+ * @returns {any}
216
+ */
217
+ function lowerCSSDirectives(request, options) {
218
+ const ret = wasm.lowerCSSDirectives(request, options);
219
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
220
+ return takeFromExternrefTable0(ret[0]);
221
+ }
222
+ /**
223
+ * @param {any} policies
224
+ * @returns {any}
225
+ */
226
+ function mergeCSSExtractionPolicies(policies) {
227
+ const ret = wasm.mergeCSSExtractionPolicies(policies);
228
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
229
+ return takeFromExternrefTable0(ret[0]);
230
+ }
231
+ /**
232
+ * @param {any} manifest
233
+ * @returns {any}
234
+ */
235
+ function normalizeDefaultManifestForJSON(manifest) {
236
+ const ret = wasm.normalizeDefaultManifestForJSON(manifest);
237
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
238
+ return takeFromExternrefTable0(ret[0]);
239
+ }
240
+ /**
241
+ * @param {any} manifest
242
+ * @returns {any}
243
+ */
244
+ function normalizeManifestForJSON(manifest) {
245
+ const ret = wasm.normalizeManifestForJSON(manifest);
246
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
247
+ return takeFromExternrefTable0(ret[0]);
248
+ }
249
+ /**
250
+ * @param {any} request
251
+ * @returns {any}
252
+ */
253
+ function prepareCSSStylesheetBundle(request) {
254
+ const ret = wasm.prepareCSSStylesheetBundle(request);
255
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
256
+ return takeFromExternrefTable0(ret[0]);
257
+ }
258
+ /**
259
+ * @param {any} request
260
+ * @returns {any}
261
+ */
262
+ function renderCSSStylesheetBundle(request) {
263
+ const ret = wasm.renderCSSStylesheetBundle(request);
264
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
265
+ return takeFromExternrefTable0(ret[0]);
266
+ }
267
+ /**
268
+ * @param {any} request
269
+ * @returns {any}
270
+ */
271
+ function resolveCSSImportGraph(request) {
272
+ const ret = wasm.resolveCSSImportGraph(request);
273
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
274
+ return takeFromExternrefTable0(ret[0]);
275
+ }
276
+ /**
277
+ * @param {any} request
278
+ * @returns {any}
279
+ */
280
+ function resolveCSSStylesheetGraph(request) {
281
+ const ret = wasm.resolveCSSStylesheetGraph(request);
282
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
283
+ return takeFromExternrefTable0(ret[0]);
284
+ }
285
+ function __wbg_get_imports() {
286
+ return {
287
+ __proto__: null,
288
+ "./mastercss_binding_wasm_compiler_bg.js": {
289
+ __proto__: null,
290
+ __wbg_Error_67e7344beaa85059: function(arg0, arg1) {
291
+ return Error(getStringFromWasm0(arg0, arg1));
292
+ },
293
+ __wbg_Number_c54e7112a3fa7e3e: function(arg0) {
294
+ return Number(arg0);
295
+ },
296
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
297
+ const ptr1 = passStringToWasm0(String(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
298
+ const len1 = WASM_VECTOR_LEN;
299
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
300
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
301
+ },
302
+ __wbg___wbindgen_bigint_get_as_i64_b482365c149396c8: function(arg0, arg1) {
303
+ const v = arg1;
304
+ const ret = typeof v === "bigint" ? v : void 0;
305
+ getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, true);
306
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
307
+ },
308
+ __wbg___wbindgen_boolean_get_7a12af2b3f899c5a: function(arg0) {
309
+ const v = arg0;
310
+ const ret = typeof v === "boolean" ? v : void 0;
311
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
312
+ },
313
+ __wbg___wbindgen_debug_string_0e68cf47c9cbd9b0: function(arg0, arg1) {
314
+ const ptr1 = passStringToWasm0(debugString(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
315
+ const len1 = WASM_VECTOR_LEN;
316
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
317
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
318
+ },
319
+ __wbg___wbindgen_in_50072d4d6e45c193: function(arg0, arg1) {
320
+ return arg0 in arg1;
321
+ },
322
+ __wbg___wbindgen_is_bigint_60fc0336cb14f5d7: function(arg0) {
323
+ return typeof arg0 === "bigint";
324
+ },
325
+ __wbg___wbindgen_is_function_fcda5e3902d732fe: function(arg0) {
326
+ return typeof arg0 === "function";
327
+ },
328
+ __wbg___wbindgen_is_null_5160b3e381865372: function(arg0) {
329
+ return arg0 === null;
330
+ },
331
+ __wbg___wbindgen_is_object_edb6b15aa3afe12e: function(arg0) {
332
+ const val = arg0;
333
+ return typeof val === "object" && val !== null;
334
+ },
335
+ __wbg___wbindgen_is_string_c4f7cb494a2a21f1: function(arg0) {
336
+ return typeof arg0 === "string";
337
+ },
338
+ __wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
339
+ return arg0 === void 0;
340
+ },
341
+ __wbg___wbindgen_jsval_eq_9fdcd3c0a860dd3b: function(arg0, arg1) {
342
+ return arg0 === arg1;
343
+ },
344
+ __wbg___wbindgen_jsval_loose_eq_3c30021c243b64cd: function(arg0, arg1) {
345
+ return arg0 == arg1;
346
+ },
347
+ __wbg___wbindgen_number_get_1dc732b810cb937c: function(arg0, arg1) {
348
+ const obj = arg1;
349
+ const ret = typeof obj === "number" ? obj : void 0;
350
+ getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, true);
351
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
352
+ },
353
+ __wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
354
+ const obj = arg1;
355
+ const ret = typeof obj === "string" ? obj : void 0;
356
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
357
+ var len1 = WASM_VECTOR_LEN;
358
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
359
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
360
+ },
361
+ __wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
362
+ throw new Error(getStringFromWasm0(arg0, arg1));
363
+ },
364
+ __wbg_call_269c5566fbede3eb: function() {
365
+ return handleError(function(arg0, arg1) {
366
+ return arg0.call(arg1);
367
+ }, arguments);
368
+ },
369
+ __wbg_done_cffed884d87aa22e: function(arg0) {
370
+ return arg0.done;
371
+ },
372
+ __wbg_entries_972a87586902cf87: function(arg0) {
373
+ return Object.entries(arg0);
374
+ },
375
+ __wbg_getRandomValues_a608c4436c19407a: function() {
376
+ return handleError(function(arg0, arg1) {
377
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
378
+ }, arguments);
379
+ },
380
+ __wbg_get_6cf5a4d4d8ad3c5a: function() {
381
+ return handleError(function(arg0, arg1) {
382
+ return Reflect.get(arg0, arg1);
383
+ }, arguments);
384
+ },
385
+ __wbg_get_b1f0ab13c737f856: function(arg0, arg1) {
386
+ return arg0[arg1 >>> 0];
387
+ },
388
+ __wbg_get_unchecked_363572bdd397d473: function(arg0, arg1) {
389
+ return arg0[arg1 >>> 0];
390
+ },
391
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
392
+ return arg0[arg1];
393
+ },
394
+ __wbg_instanceof_ArrayBuffer_d4ff01f8247925ae: function(arg0) {
395
+ let result;
396
+ try {
397
+ result = arg0 instanceof ArrayBuffer;
398
+ } catch (_) {
399
+ result = false;
400
+ }
401
+ return result;
402
+ },
403
+ __wbg_instanceof_Map_1ff6a2b54c899f0d: function(arg0) {
404
+ let result;
405
+ try {
406
+ result = arg0 instanceof Map;
407
+ } catch (_) {
408
+ result = false;
409
+ }
410
+ return result;
411
+ },
412
+ __wbg_instanceof_Uint8Array_598adc0fef426aa8: function(arg0) {
413
+ let result;
414
+ try {
415
+ result = arg0 instanceof Uint8Array;
416
+ } catch (_) {
417
+ result = false;
418
+ }
419
+ return result;
420
+ },
421
+ __wbg_isArray_5674713bb7b79043: function(arg0) {
422
+ return Array.isArray(arg0);
423
+ },
424
+ __wbg_isSafeInteger_8f51c743827d1ec5: function(arg0) {
425
+ return Number.isSafeInteger(arg0);
426
+ },
427
+ __wbg_iterator_22ddeb808cf55a6f: function() {
428
+ return Symbol.iterator;
429
+ },
430
+ __wbg_length_31bdaf014f5fbde2: function(arg0) {
431
+ return arg0.length;
432
+ },
433
+ __wbg_length_4e1adc0d42e23620: function(arg0) {
434
+ return arg0.length;
435
+ },
436
+ __wbg_new_1da3429bc3c4541c: function(arg0) {
437
+ return new Uint8Array(arg0);
438
+ },
439
+ __wbg_new_8d36e20aa758e411: function() {
440
+ return /* @__PURE__ */ new Map();
441
+ },
442
+ __wbg_new_bebc3f4757acf305: function() {
443
+ return /* @__PURE__ */ new Object();
444
+ },
445
+ __wbg_new_ffa92086ea89f79c: function() {
446
+ return new Array();
447
+ },
448
+ __wbg_next_95053e306b1c3aed: function(arg0) {
449
+ return arg0.next;
450
+ },
451
+ __wbg_next_f31ecb8646d2c605: function() {
452
+ return handleError(function(arg0) {
453
+ return arg0.next();
454
+ }, arguments);
455
+ },
456
+ __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
457
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
458
+ },
459
+ __wbg_set_13d25b81ab403f5e: function(arg0, arg1, arg2) {
460
+ arg0[arg1 >>> 0] = arg2;
461
+ },
462
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
463
+ arg0[arg1] = arg2;
464
+ },
465
+ __wbg_set_bf6dde4923b9b059: function(arg0, arg1, arg2) {
466
+ return arg0.set(arg1, arg2);
467
+ },
468
+ __wbg_value_c227f843d21da141: function(arg0) {
469
+ return arg0.value;
470
+ },
471
+ __wbindgen_generic_0000000000000001: function(arg0) {
472
+ return arg0;
473
+ },
474
+ __wbindgen_generic_0000000000000002: function(arg0) {
475
+ return arg0;
476
+ },
477
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
478
+ return getStringFromWasm0(arg0, arg1);
479
+ },
480
+ __wbindgen_generic_0000000000000004: function(arg0) {
481
+ return BigInt.asUintN(64, arg0);
482
+ },
483
+ __wbindgen_init_externref_table: function() {
484
+ const table = wasm.__wbindgen_externrefs;
485
+ const offset = table.grow(4);
486
+ table.set(0, void 0);
487
+ table.set(offset + 0, void 0);
488
+ table.set(offset + 1, null);
489
+ table.set(offset + 2, true);
490
+ table.set(offset + 3, false);
491
+ }
492
+ }
493
+ };
494
+ }
495
+ const CompilerRenderSessionFinalization = typeof FinalizationRegistry === "undefined" ? {
496
+ register: () => {},
497
+ unregister: () => {}
498
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_compilerrendersession_free(ptr, 1));
499
+ function addToExternrefTable0(obj) {
500
+ const idx = wasm.__externref_table_alloc();
501
+ wasm.__wbindgen_externrefs.set(idx, obj);
502
+ return idx;
503
+ }
504
+ function debugString(val) {
505
+ const type = typeof val;
506
+ if (type == "number" || type == "boolean" || val == null) return `${val}`;
507
+ if (type == "string") return `"${val}"`;
508
+ if (type == "symbol") {
509
+ const description = val.description;
510
+ if (description == null) return "Symbol";
511
+ else return `Symbol(${description})`;
512
+ }
513
+ if (type == "function") {
514
+ const name = val.name;
515
+ if (typeof name == "string" && name.length > 0) return `Function(${name})`;
516
+ else return "Function";
517
+ }
518
+ if (Array.isArray(val)) {
519
+ const length = val.length;
520
+ let debug = "[";
521
+ if (length > 0) debug += debugString(val[0]);
522
+ for (let i = 1; i < length; i++) debug += ", " + debugString(val[i]);
523
+ debug += "]";
524
+ return debug;
525
+ }
526
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
527
+ let className;
528
+ if (builtInMatches && builtInMatches.length > 1) className = builtInMatches[1];
529
+ else return toString.call(val);
530
+ if (className == "Object") try {
531
+ return "Object(" + JSON.stringify(val) + ")";
532
+ } catch (_) {
533
+ return "Object";
534
+ }
535
+ if (val instanceof Error) return `${val.name}: ${val.message}\n${val.stack}`;
536
+ return className;
537
+ }
538
+ function getArrayJsValueFromWasm0(ptr, len) {
539
+ ptr = ptr >>> 0;
540
+ const mem = getDataViewMemory0();
541
+ const result = [];
542
+ for (let i = ptr; i < ptr + 4 * len; i += 4) result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
543
+ wasm.__externref_drop_slice(ptr, len);
544
+ return result;
545
+ }
546
+ function getArrayU8FromWasm0(ptr, len) {
547
+ ptr = ptr >>> 0;
548
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
549
+ }
550
+ let cachedDataViewMemory0 = null;
551
+ function getDataViewMemory0() {
552
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
553
+ return cachedDataViewMemory0;
554
+ }
555
+ function getStringFromWasm0(ptr, len) {
556
+ return decodeText(ptr >>> 0, len);
557
+ }
558
+ let cachedUint8ArrayMemory0 = null;
559
+ function getUint8ArrayMemory0() {
560
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
561
+ return cachedUint8ArrayMemory0;
562
+ }
563
+ function handleError(f, args) {
564
+ try {
565
+ return f.apply(this, args);
566
+ } catch (e) {
567
+ const idx = addToExternrefTable0(e);
568
+ wasm.__wbindgen_exn_store(idx);
569
+ }
570
+ }
571
+ function isLikeNone(x) {
572
+ return x === void 0 || x === null;
573
+ }
574
+ function passArrayJsValueToWasm0(array, malloc) {
575
+ const ptr = malloc(array.length * 4, 4) >>> 0;
576
+ for (let i = 0; i < array.length; i++) {
577
+ const add = addToExternrefTable0(array[i]);
578
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
579
+ }
580
+ WASM_VECTOR_LEN = array.length;
581
+ return ptr;
582
+ }
583
+ function passStringToWasm0(arg, malloc, realloc) {
584
+ if (realloc === void 0) {
585
+ const buf = cachedTextEncoder.encode(arg);
586
+ const ptr = malloc(buf.length, 1) >>> 0;
587
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
588
+ WASM_VECTOR_LEN = buf.length;
589
+ return ptr;
590
+ }
591
+ let len = arg.length;
592
+ let ptr = malloc(len, 1) >>> 0;
593
+ const mem = getUint8ArrayMemory0();
594
+ let offset = 0;
595
+ for (; offset < len; offset++) {
596
+ const code = arg.charCodeAt(offset);
597
+ if (code > 127) break;
598
+ mem[ptr + offset] = code;
599
+ }
600
+ if (offset !== len) {
601
+ if (offset !== 0) arg = arg.slice(offset);
602
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
603
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
604
+ const ret = cachedTextEncoder.encodeInto(arg, view);
605
+ offset += ret.written;
606
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
607
+ }
608
+ WASM_VECTOR_LEN = offset;
609
+ return ptr;
610
+ }
611
+ function takeFromExternrefTable0(idx) {
612
+ const value = wasm.__wbindgen_externrefs.get(idx);
613
+ wasm.__externref_table_dealloc(idx);
614
+ return value;
615
+ }
616
+ let cachedTextDecoder = new TextDecoder("utf-8", {
617
+ ignoreBOM: true,
618
+ fatal: true
619
+ });
620
+ cachedTextDecoder.decode();
621
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
622
+ let numBytesDecoded = 0;
623
+ function decodeText(ptr, len) {
624
+ numBytesDecoded += len;
625
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
626
+ cachedTextDecoder = new TextDecoder("utf-8", {
627
+ ignoreBOM: true,
628
+ fatal: true
629
+ });
630
+ cachedTextDecoder.decode();
631
+ numBytesDecoded = len;
632
+ }
633
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
634
+ }
635
+ const cachedTextEncoder = new TextEncoder();
636
+ if (!("encodeInto" in cachedTextEncoder)) cachedTextEncoder.encodeInto = function(arg, view) {
637
+ const buf = cachedTextEncoder.encode(arg);
638
+ view.set(buf);
639
+ return {
640
+ read: arg.length,
641
+ written: buf.length
642
+ };
643
+ };
644
+ let WASM_VECTOR_LEN = 0;
645
+ let wasm;
646
+ function __wbg_finalize_init(instance, module) {
647
+ wasm = instance.exports;
648
+ cachedDataViewMemory0 = null;
649
+ cachedUint8ArrayMemory0 = null;
650
+ wasm.__wbindgen_start();
651
+ return wasm;
652
+ }
653
+ async function __wbg_load(module, imports) {
654
+ if (typeof Response === "function" && module instanceof Response) {
655
+ if (!module.ok) throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
656
+ if (typeof WebAssembly.instantiateStreaming === "function") try {
657
+ return await WebAssembly.instantiateStreaming(module, imports);
658
+ } catch (e) {
659
+ if (expectedResponseType(module.type) && module.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", e);
660
+ else throw e;
661
+ }
662
+ const bytes = await module.arrayBuffer();
663
+ return await WebAssembly.instantiate(bytes, imports);
664
+ } else {
665
+ const instance = await WebAssembly.instantiate(module, imports);
666
+ if (instance instanceof WebAssembly.Instance) return {
667
+ instance,
668
+ module
669
+ };
670
+ else return instance;
671
+ }
672
+ function expectedResponseType(type) {
673
+ switch (type) {
674
+ case "basic":
675
+ case "cors":
676
+ case "default": return true;
677
+ }
678
+ return false;
679
+ }
680
+ }
681
+ function initSync(module) {
682
+ if (wasm !== void 0) return wasm;
683
+ if (module !== void 0) {
684
+ if (Object.getPrototypeOf(module) === Object.prototype) ({module} = module);
685
+ else console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
686
+ }
687
+ const imports = __wbg_get_imports();
688
+ if (!(module instanceof WebAssembly.Module)) module = new WebAssembly.Module(module);
689
+ return __wbg_finalize_init(new WebAssembly.Instance(module, imports), module);
690
+ }
691
+ async function __wbg_init(module_or_path) {
692
+ if (wasm !== void 0) return wasm;
693
+ if (module_or_path !== void 0) {
694
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
695
+ else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
696
+ }
697
+ const imports = __wbg_get_imports();
698
+ if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) module_or_path = fetch(module_or_path);
699
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
700
+ return __wbg_finalize_init(instance, module);
701
+ }
702
+ export { CompilerRenderSession, analyzeCSSDependencies, analyzeStandaloneDirectives, bindingInfo, compareProjectSnapshots, compileCSSDirectives, compileCSSStylesheetGraph, compileDefaultPresetManifest, compileManifestInput, compileNativeCSS, __wbg_init as default, filterCSSExtractionCandidates, initSync, inspectCSS, lowerCSSDirectives, mergeCSSExtractionPolicies, normalizeDefaultManifestForJSON, normalizeManifestForJSON, prepareCSSStylesheetBundle, renderCSSStylesheetBundle, resolveCSSImportGraph, resolveCSSStylesheetGraph };