@kreuzberg/wasm 4.0.5 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,244 +1,4 @@
1
-
2
- let imports = {};
3
- imports['__wbindgen_placeholder__'] = module.exports;
4
-
5
- function addToExternrefTable0(obj) {
6
- const idx = wasm.__externref_table_alloc();
7
- wasm.__wbindgen_externrefs.set(idx, obj);
8
- return idx;
9
- }
10
-
11
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
12
- ? { register: () => {}, unregister: () => {} }
13
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
14
-
15
- function debugString(val) {
16
- // primitive types
17
- const type = typeof val;
18
- if (type == 'number' || type == 'boolean' || val == null) {
19
- return `${val}`;
20
- }
21
- if (type == 'string') {
22
- return `"${val}"`;
23
- }
24
- if (type == 'symbol') {
25
- const description = val.description;
26
- if (description == null) {
27
- return 'Symbol';
28
- } else {
29
- return `Symbol(${description})`;
30
- }
31
- }
32
- if (type == 'function') {
33
- const name = val.name;
34
- if (typeof name == 'string' && name.length > 0) {
35
- return `Function(${name})`;
36
- } else {
37
- return 'Function';
38
- }
39
- }
40
- // objects
41
- if (Array.isArray(val)) {
42
- const length = val.length;
43
- let debug = '[';
44
- if (length > 0) {
45
- debug += debugString(val[0]);
46
- }
47
- for(let i = 1; i < length; i++) {
48
- debug += ', ' + debugString(val[i]);
49
- }
50
- debug += ']';
51
- return debug;
52
- }
53
- // Test for built-in
54
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
55
- let className;
56
- if (builtInMatches && builtInMatches.length > 1) {
57
- className = builtInMatches[1];
58
- } else {
59
- // Failed to match the standard '[object ClassName]'
60
- return toString.call(val);
61
- }
62
- if (className == 'Object') {
63
- // we're a user defined class or Object
64
- // JSON.stringify avoids problems with cycles, and is generally much
65
- // easier than looping through ownProperties of `val`.
66
- try {
67
- return 'Object(' + JSON.stringify(val) + ')';
68
- } catch (_) {
69
- return 'Object';
70
- }
71
- }
72
- // errors
73
- if (val instanceof Error) {
74
- return `${val.name}: ${val.message}\n${val.stack}`;
75
- }
76
- // TODO we could test for more things here, like `Set`s and `Map`s.
77
- return className;
78
- }
79
-
80
- function getArrayU8FromWasm0(ptr, len) {
81
- ptr = ptr >>> 0;
82
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
83
- }
84
-
85
- function getCachedStringFromWasm0(ptr, len) {
86
- if (ptr === 0) {
87
- return getFromExternrefTable0(len);
88
- } else {
89
- return getStringFromWasm0(ptr, len);
90
- }
91
- }
92
-
93
- let cachedDataViewMemory0 = null;
94
- function getDataViewMemory0() {
95
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
96
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
97
- }
98
- return cachedDataViewMemory0;
99
- }
100
-
101
- function getFromExternrefTable0(idx) { return wasm.__wbindgen_externrefs.get(idx); }
102
-
103
- function getStringFromWasm0(ptr, len) {
104
- ptr = ptr >>> 0;
105
- return decodeText(ptr, len);
106
- }
107
-
108
- let cachedUint8ArrayMemory0 = null;
109
- function getUint8ArrayMemory0() {
110
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
111
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
112
- }
113
- return cachedUint8ArrayMemory0;
114
- }
115
-
116
- function handleError(f, args) {
117
- try {
118
- return f.apply(this, args);
119
- } catch (e) {
120
- const idx = addToExternrefTable0(e);
121
- wasm.__wbindgen_exn_store(idx);
122
- }
123
- }
124
-
125
- function isLikeNone(x) {
126
- return x === undefined || x === null;
127
- }
128
-
129
- function makeMutClosure(arg0, arg1, dtor, f) {
130
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
131
- const real = (...args) => {
132
-
133
- // First up with a closure we increment the internal reference
134
- // count. This ensures that the Rust closure environment won't
135
- // be deallocated while we're invoking it.
136
- state.cnt++;
137
- const a = state.a;
138
- state.a = 0;
139
- try {
140
- return f(a, state.b, ...args);
141
- } finally {
142
- state.a = a;
143
- real._wbg_cb_unref();
144
- }
145
- };
146
- real._wbg_cb_unref = () => {
147
- if (--state.cnt === 0) {
148
- state.dtor(state.a, state.b);
149
- state.a = 0;
150
- CLOSURE_DTORS.unregister(state);
151
- }
152
- };
153
- CLOSURE_DTORS.register(real, state, state);
154
- return real;
155
- }
156
-
157
- function passArrayJsValueToWasm0(array, malloc) {
158
- const ptr = malloc(array.length * 4, 4) >>> 0;
159
- for (let i = 0; i < array.length; i++) {
160
- const add = addToExternrefTable0(array[i]);
161
- getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
162
- }
163
- WASM_VECTOR_LEN = array.length;
164
- return ptr;
165
- }
166
-
167
- function passStringToWasm0(arg, malloc, realloc) {
168
- if (realloc === undefined) {
169
- const buf = cachedTextEncoder.encode(arg);
170
- const ptr = malloc(buf.length, 1) >>> 0;
171
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
172
- WASM_VECTOR_LEN = buf.length;
173
- return ptr;
174
- }
175
-
176
- let len = arg.length;
177
- let ptr = malloc(len, 1) >>> 0;
178
-
179
- const mem = getUint8ArrayMemory0();
180
-
181
- let offset = 0;
182
-
183
- for (; offset < len; offset++) {
184
- const code = arg.charCodeAt(offset);
185
- if (code > 0x7F) break;
186
- mem[ptr + offset] = code;
187
- }
188
- if (offset !== len) {
189
- if (offset !== 0) {
190
- arg = arg.slice(offset);
191
- }
192
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
193
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
194
- const ret = cachedTextEncoder.encodeInto(arg, view);
195
-
196
- offset += ret.written;
197
- ptr = realloc(ptr, len, offset, 1) >>> 0;
198
- }
199
-
200
- WASM_VECTOR_LEN = offset;
201
- return ptr;
202
- }
203
-
204
- function takeFromExternrefTable0(idx) {
205
- const value = wasm.__wbindgen_externrefs.get(idx);
206
- wasm.__externref_table_dealloc(idx);
207
- return value;
208
- }
209
-
210
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
211
- cachedTextDecoder.decode();
212
- function decodeText(ptr, len) {
213
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
214
- }
215
-
216
- const cachedTextEncoder = new TextEncoder();
217
-
218
- if (!('encodeInto' in cachedTextEncoder)) {
219
- cachedTextEncoder.encodeInto = function (arg, view) {
220
- const buf = cachedTextEncoder.encode(arg);
221
- view.set(buf);
222
- return {
223
- read: arg.length,
224
- written: buf.length
225
- };
226
- }
227
- }
228
-
229
- let WASM_VECTOR_LEN = 0;
230
-
231
- function wasm_bindgen_4fcc1eb3154b8c24___convert__closures_____invoke___wasm_bindgen_4fcc1eb3154b8c24___JsValue_____(arg0, arg1, arg2) {
232
- wasm.wasm_bindgen_4fcc1eb3154b8c24___convert__closures_____invoke___wasm_bindgen_4fcc1eb3154b8c24___JsValue_____(arg0, arg1, arg2);
233
- }
234
-
235
- function wasm_bindgen_4fcc1eb3154b8c24___convert__closures_____invoke___wasm_bindgen_4fcc1eb3154b8c24___JsValue__wasm_bindgen_4fcc1eb3154b8c24___JsValue_____(arg0, arg1, arg2, arg3) {
236
- wasm.wasm_bindgen_4fcc1eb3154b8c24___convert__closures_____invoke___wasm_bindgen_4fcc1eb3154b8c24___JsValue__wasm_bindgen_4fcc1eb3154b8c24___JsValue_____(arg0, arg1, arg2, arg3);
237
- }
238
-
239
- const ModuleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
240
- ? { register: () => {}, unregister: () => {} }
241
- : new FinalizationRegistry(ptr => wasm.__wbg_moduleinfo_free(ptr >>> 0, 1));
1
+ /* @ts-self-types="./kreuzberg_wasm.d.ts" */
242
2
 
243
3
  /**
244
4
  * Get information about the WASM module
@@ -1332,588 +1092,731 @@ function write_block_from_callback_wasm(param, buf, size) {
1332
1092
  }
1333
1093
  exports.write_block_from_callback_wasm = write_block_from_callback_wasm;
1334
1094
 
1335
- exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
1336
- var v0 = getCachedStringFromWasm0(arg0, arg1);
1337
- const ret = Error(v0);
1338
- return ret;
1339
- };
1340
-
1341
- exports.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
1342
- const ret = Number(arg0);
1343
- return ret;
1344
- };
1095
+ function __wbg_get_imports() {
1096
+ const import0 = {
1097
+ __proto__: null,
1098
+ __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
1099
+ var v0 = getCachedStringFromWasm0(arg0, arg1);
1100
+ const ret = Error(v0);
1101
+ return ret;
1102
+ },
1103
+ __wbg_Number_04624de7d0e8332d: function(arg0) {
1104
+ const ret = Number(arg0);
1105
+ return ret;
1106
+ },
1107
+ __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
1108
+ const ret = String(arg1);
1109
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1110
+ const len1 = WASM_VECTOR_LEN;
1111
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1112
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1113
+ },
1114
+ __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(arg0, arg1) {
1115
+ const v = arg1;
1116
+ const ret = typeof(v) === 'bigint' ? v : undefined;
1117
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1118
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1119
+ },
1120
+ __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
1121
+ const v = arg0;
1122
+ const ret = typeof(v) === 'boolean' ? v : undefined;
1123
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1124
+ },
1125
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
1126
+ const ret = debugString(arg1);
1127
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1128
+ const len1 = WASM_VECTOR_LEN;
1129
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1130
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1131
+ },
1132
+ __wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
1133
+ const ret = arg0 in arg1;
1134
+ return ret;
1135
+ },
1136
+ __wbg___wbindgen_is_bigint_31b12575b56f32fc: function(arg0) {
1137
+ const ret = typeof(arg0) === 'bigint';
1138
+ return ret;
1139
+ },
1140
+ __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
1141
+ const ret = typeof(arg0) === 'function';
1142
+ return ret;
1143
+ },
1144
+ __wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
1145
+ const val = arg0;
1146
+ const ret = typeof(val) === 'object' && val !== null;
1147
+ return ret;
1148
+ },
1149
+ __wbg___wbindgen_is_string_cd444516edc5b180: function(arg0) {
1150
+ const ret = typeof(arg0) === 'string';
1151
+ return ret;
1152
+ },
1153
+ __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
1154
+ const ret = arg0 === undefined;
1155
+ return ret;
1156
+ },
1157
+ __wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
1158
+ const ret = arg0 === arg1;
1159
+ return ret;
1160
+ },
1161
+ __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
1162
+ const ret = arg0 == arg1;
1163
+ return ret;
1164
+ },
1165
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
1166
+ const obj = arg1;
1167
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1168
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1169
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1170
+ },
1171
+ __wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
1172
+ const obj = arg1;
1173
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1174
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1175
+ var len1 = WASM_VECTOR_LEN;
1176
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1177
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1178
+ },
1179
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
1180
+ var v0 = getCachedStringFromWasm0(arg0, arg1);
1181
+ throw new Error(v0);
1182
+ },
1183
+ __wbg__wbg_cb_unref_d9b87ff7982e3b21: function(arg0) {
1184
+ arg0._wbg_cb_unref();
1185
+ },
1186
+ __wbg_addEventListener_3acb0aad4483804c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1187
+ var v0 = getCachedStringFromWasm0(arg1, arg2);
1188
+ arg0.addEventListener(v0, arg3);
1189
+ }, arguments); },
1190
+ __wbg_apply_ada2ee1a60ac7b3c: function() { return handleError(function (arg0, arg1, arg2) {
1191
+ const ret = arg0.apply(arg1, arg2);
1192
+ return ret;
1193
+ }, arguments); },
1194
+ __wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
1195
+ const ret = arg0.call(arg1);
1196
+ return ret;
1197
+ }, arguments); },
1198
+ __wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
1199
+ const ret = arg0.call(arg1, arg2);
1200
+ return ret;
1201
+ }, arguments); },
1202
+ __wbg_call_812d25f1510c13c8: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1203
+ const ret = arg0.call(arg1, arg2, arg3);
1204
+ return ret;
1205
+ }, arguments); },
1206
+ __wbg_codePointAt_bf59dbf74d8db275: function(arg0, arg1) {
1207
+ const ret = arg0.codePointAt(arg1 >>> 0);
1208
+ return ret;
1209
+ },
1210
+ __wbg_construct_86626e847de3b629: function() { return handleError(function (arg0, arg1) {
1211
+ const ret = Reflect.construct(arg0, arg1);
1212
+ return ret;
1213
+ }, arguments); },
1214
+ __wbg_debug_a4099fa12db6cd61: function(arg0) {
1215
+ console.debug(arg0);
1216
+ },
1217
+ __wbg_decode_9cea5b72e50871c4: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1218
+ const ret = arg1.decode(getArrayU8FromWasm0(arg2, arg3));
1219
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1220
+ const len1 = WASM_VECTOR_LEN;
1221
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1222
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1223
+ }, arguments); },
1224
+ __wbg_done_57b39ecd9addfe81: function(arg0) {
1225
+ const ret = arg0.done;
1226
+ return ret;
1227
+ },
1228
+ __wbg_entries_58c7934c745daac7: function(arg0) {
1229
+ const ret = Object.entries(arg0);
1230
+ return ret;
1231
+ },
1232
+ __wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
1233
+ var v0 = getCachedStringFromWasm0(arg0, arg1);
1234
+ if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1, 1); }
1235
+ console.error(v0);
1236
+ },
1237
+ __wbg_error_9a7fe3f932034cde: function(arg0) {
1238
+ console.error(arg0);
1239
+ },
1240
+ __wbg_fromCodePoint_22365db7b7d6ac39: function() { return handleError(function (arg0) {
1241
+ const ret = String.fromCodePoint(arg0 >>> 0);
1242
+ return ret;
1243
+ }, arguments); },
1244
+ __wbg_from_bddd64e7d5ff6941: function(arg0) {
1245
+ const ret = Array.from(arg0);
1246
+ return ret;
1247
+ },
1248
+ __wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
1249
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1250
+ }, arguments); },
1251
+ __wbg_getTime_1e3cd1391c5c3995: function(arg0) {
1252
+ const ret = arg0.getTime();
1253
+ return ret;
1254
+ },
1255
+ __wbg_get_7efbcc3819719b0f: function() { return handleError(function (arg0, arg1) {
1256
+ const ret = arg0.get(arg1 >>> 0);
1257
+ return ret;
1258
+ }, arguments); },
1259
+ __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
1260
+ const ret = arg0[arg1 >>> 0];
1261
+ return ret;
1262
+ },
1263
+ __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
1264
+ const ret = Reflect.get(arg0, arg1);
1265
+ return ret;
1266
+ }, arguments); },
1267
+ __wbg_get_index_9a5bfdd2ca49c65f: function(arg0, arg1) {
1268
+ const ret = arg0[arg1 >>> 0];
1269
+ return ret;
1270
+ },
1271
+ __wbg_get_with_ref_key_1dc361bd10053bfe: function(arg0, arg1) {
1272
+ const ret = arg0[arg1];
1273
+ return ret;
1274
+ },
1275
+ __wbg_info_148d043840582012: function(arg0) {
1276
+ console.info(arg0);
1277
+ },
1278
+ __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
1279
+ let result;
1280
+ try {
1281
+ result = arg0 instanceof ArrayBuffer;
1282
+ } catch (_) {
1283
+ result = false;
1284
+ }
1285
+ const ret = result;
1286
+ return ret;
1287
+ },
1288
+ __wbg_instanceof_Map_53af74335dec57f4: function(arg0) {
1289
+ let result;
1290
+ try {
1291
+ result = arg0 instanceof Map;
1292
+ } catch (_) {
1293
+ result = false;
1294
+ }
1295
+ const ret = result;
1296
+ return ret;
1297
+ },
1298
+ __wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
1299
+ let result;
1300
+ try {
1301
+ result = arg0 instanceof Uint8Array;
1302
+ } catch (_) {
1303
+ result = false;
1304
+ }
1305
+ const ret = result;
1306
+ return ret;
1307
+ },
1308
+ __wbg_isArray_d314bb98fcf08331: function(arg0) {
1309
+ const ret = Array.isArray(arg0);
1310
+ return ret;
1311
+ },
1312
+ __wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
1313
+ const ret = Number.isSafeInteger(arg0);
1314
+ return ret;
1315
+ },
1316
+ __wbg_iterator_6ff6560ca1568e55: function() {
1317
+ const ret = Symbol.iterator;
1318
+ return ret;
1319
+ },
1320
+ __wbg_length_32ed9a279acd054c: function(arg0) {
1321
+ const ret = arg0.length;
1322
+ return ret;
1323
+ },
1324
+ __wbg_length_35a7bace40f36eac: function(arg0) {
1325
+ const ret = arg0.length;
1326
+ return ret;
1327
+ },
1328
+ __wbg_length_68dc7c5cf1b6d349: function(arg0) {
1329
+ const ret = arg0.length;
1330
+ return ret;
1331
+ },
1332
+ __wbg_length_aeb94ff17a8a8556: function(arg0) {
1333
+ const ret = arg0.length;
1334
+ return ret;
1335
+ },
1336
+ __wbg_length_c8c85e3b2adbc8be: function(arg0) {
1337
+ const ret = arg0.length;
1338
+ return ret;
1339
+ },
1340
+ __wbg_log_6b5ca2e6124b2808: function(arg0) {
1341
+ console.log(arg0);
1342
+ },
1343
+ __wbg_new_0_73afc35eb544e539: function() {
1344
+ const ret = new Date();
1345
+ return ret;
1346
+ },
1347
+ __wbg_new_361308b2356cecd0: function() {
1348
+ const ret = new Object();
1349
+ return ret;
1350
+ },
1351
+ __wbg_new_3eb36ae241fe6f44: function() {
1352
+ const ret = new Array();
1353
+ return ret;
1354
+ },
1355
+ __wbg_new_8a6f238a6ece86ea: function() {
1356
+ const ret = new Error();
1357
+ return ret;
1358
+ },
1359
+ __wbg_new_b5d9e2fb389fef91: function(arg0, arg1) {
1360
+ try {
1361
+ var state0 = {a: arg0, b: arg1};
1362
+ var cb0 = (arg0, arg1) => {
1363
+ const a = state0.a;
1364
+ state0.a = 0;
1365
+ try {
1366
+ return wasm_bindgen_d5f0760cbbd6023b___convert__closures_____invoke___wasm_bindgen_d5f0760cbbd6023b___JsValue__wasm_bindgen_d5f0760cbbd6023b___JsValue_____(a, state0.b, arg0, arg1);
1367
+ } finally {
1368
+ state0.a = a;
1369
+ }
1370
+ };
1371
+ const ret = new Promise(cb0);
1372
+ return ret;
1373
+ } finally {
1374
+ state0.a = state0.b = 0;
1375
+ }
1376
+ },
1377
+ __wbg_new_c1eaab32d813ec69: function() { return handleError(function () {
1378
+ const ret = new FileReader();
1379
+ return ret;
1380
+ }, arguments); },
1381
+ __wbg_new_dca287b076112a51: function() {
1382
+ const ret = new Map();
1383
+ return ret;
1384
+ },
1385
+ __wbg_new_dd2b680c8bf6ae29: function(arg0) {
1386
+ const ret = new Uint8Array(arg0);
1387
+ return ret;
1388
+ },
1389
+ __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
1390
+ var v0 = getCachedStringFromWasm0(arg0, arg1);
1391
+ const ret = new Function(v0);
1392
+ return ret;
1393
+ },
1394
+ __wbg_new_with_label_868725b8d51e8ff3: function() { return handleError(function (arg0, arg1) {
1395
+ var v0 = getCachedStringFromWasm0(arg0, arg1);
1396
+ const ret = new TextDecoder(v0);
1397
+ return ret;
1398
+ }, arguments); },
1399
+ __wbg_new_with_length_1763c527b2923202: function(arg0) {
1400
+ const ret = new Array(arg0 >>> 0);
1401
+ return ret;
1402
+ },
1403
+ __wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
1404
+ const ret = arg0.next();
1405
+ return ret;
1406
+ }, arguments); },
1407
+ __wbg_next_418f80d8f5303233: function(arg0) {
1408
+ const ret = arg0.next;
1409
+ return ret;
1410
+ },
1411
+ __wbg_of_0774a9663fb93da1: function(arg0, arg1, arg2, arg3) {
1412
+ const ret = Array.of(arg0, arg1, arg2, arg3);
1413
+ return ret;
1414
+ },
1415
+ __wbg_of_9ab14f9d4bfb5040: function(arg0, arg1) {
1416
+ const ret = Array.of(arg0, arg1);
1417
+ return ret;
1418
+ },
1419
+ __wbg_of_ab479ddbf595c4a7: function(arg0, arg1, arg2, arg3, arg4) {
1420
+ const ret = Array.of(arg0, arg1, arg2, arg3, arg4);
1421
+ return ret;
1422
+ },
1423
+ __wbg_of_ddc0942b0dce16a1: function(arg0, arg1, arg2) {
1424
+ const ret = Array.of(arg0, arg1, arg2);
1425
+ return ret;
1426
+ },
1427
+ __wbg_of_f915f7cd925b21a5: function(arg0) {
1428
+ const ret = Array.of(arg0);
1429
+ return ret;
1430
+ },
1431
+ __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
1432
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1433
+ },
1434
+ __wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
1435
+ const ret = arg0.push(arg1);
1436
+ return ret;
1437
+ },
1438
+ __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
1439
+ const ret = arg0.queueMicrotask;
1440
+ return ret;
1441
+ },
1442
+ __wbg_queueMicrotask_5bb536982f78a56f: function(arg0) {
1443
+ queueMicrotask(arg0);
1444
+ },
1445
+ __wbg_readAsArrayBuffer_7dda4bab363b1552: function() { return handleError(function (arg0, arg1) {
1446
+ arg0.readAsArrayBuffer(arg1);
1447
+ }, arguments); },
1448
+ __wbg_reject_a2176de7f1212be5: function(arg0) {
1449
+ const ret = Promise.reject(arg0);
1450
+ return ret;
1451
+ },
1452
+ __wbg_resolve_002c4b7d9d8f6b64: function(arg0) {
1453
+ const ret = Promise.resolve(arg0);
1454
+ return ret;
1455
+ },
1456
+ __wbg_result_a9f41cf43ff6e60f: function() { return handleError(function (arg0) {
1457
+ const ret = arg0.result;
1458
+ return ret;
1459
+ }, arguments); },
1460
+ __wbg_set_0af2522656c2a71b: function() { return handleError(function (arg0, arg1, arg2) {
1461
+ arg0.set(arg1 >>> 0, arg2);
1462
+ }, arguments); },
1463
+ __wbg_set_1eb0999cf5d27fc8: function(arg0, arg1, arg2) {
1464
+ const ret = arg0.set(arg1, arg2);
1465
+ return ret;
1466
+ },
1467
+ __wbg_set_25cf9deff6bf0ea8: function(arg0, arg1, arg2) {
1468
+ arg0.set(arg1, arg2 >>> 0);
1469
+ },
1470
+ __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
1471
+ arg0[arg1] = arg2;
1472
+ },
1473
+ __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
1474
+ arg0[arg1 >>> 0] = arg2;
1475
+ },
1476
+ __wbg_slice_8bbd46adb2100583: function(arg0, arg1, arg2) {
1477
+ const ret = arg0.slice(arg1 >>> 0, arg2 >>> 0);
1478
+ return ret;
1479
+ },
1480
+ __wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
1481
+ const ret = arg1.stack;
1482
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1483
+ const len1 = WASM_VECTOR_LEN;
1484
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1485
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1486
+ },
1487
+ __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
1488
+ const ret = typeof global === 'undefined' ? null : global;
1489
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1490
+ },
1491
+ __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
1492
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1493
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1494
+ },
1495
+ __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
1496
+ const ret = typeof self === 'undefined' ? null : self;
1497
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1498
+ },
1499
+ __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
1500
+ const ret = typeof window === 'undefined' ? null : window;
1501
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1502
+ },
1503
+ __wbg_subarray_a96e1fef17ed23cb: function(arg0, arg1, arg2) {
1504
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1505
+ return ret;
1506
+ },
1507
+ __wbg_then_0d9fe2c7b1857d32: function(arg0, arg1, arg2) {
1508
+ const ret = arg0.then(arg1, arg2);
1509
+ return ret;
1510
+ },
1511
+ __wbg_then_b9e7b3b5f1a9e1b5: function(arg0, arg1) {
1512
+ const ret = arg0.then(arg1);
1513
+ return ret;
1514
+ },
1515
+ __wbg_type_e8c7fade6d73451b: function(arg0, arg1) {
1516
+ const ret = arg1.type;
1517
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1518
+ const len1 = WASM_VECTOR_LEN;
1519
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1520
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1521
+ },
1522
+ __wbg_value_0546255b415e96c1: function(arg0) {
1523
+ const ret = arg0.value;
1524
+ return ret;
1525
+ },
1526
+ __wbg_warn_f7ae1b2e66ccb930: function(arg0) {
1527
+ console.warn(arg0);
1528
+ },
1529
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1530
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1981, function: Function { arguments: [Externref], shim_idx: 1982, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1531
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_d5f0760cbbd6023b___closure__destroy___dyn_core_67558b4ca73dc0a8___ops__function__FnMut__wasm_bindgen_d5f0760cbbd6023b___JsValue____Output_______, wasm_bindgen_d5f0760cbbd6023b___convert__closures_____invoke___wasm_bindgen_d5f0760cbbd6023b___JsValue_____);
1532
+ return ret;
1533
+ },
1534
+ __wbindgen_cast_0000000000000002: function(arg0) {
1535
+ // Cast intrinsic for `F64 -> Externref`.
1536
+ const ret = arg0;
1537
+ return ret;
1538
+ },
1539
+ __wbindgen_cast_0000000000000003: function(arg0) {
1540
+ // Cast intrinsic for `I64 -> Externref`.
1541
+ const ret = arg0;
1542
+ return ret;
1543
+ },
1544
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
1545
+ var v0 = getCachedStringFromWasm0(arg0, arg1);
1546
+ // Cast intrinsic for `Ref(CachedString) -> Externref`.
1547
+ const ret = v0;
1548
+ return ret;
1549
+ },
1550
+ __wbindgen_cast_0000000000000005: function(arg0, arg1) {
1551
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1552
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1553
+ return ret;
1554
+ },
1555
+ __wbindgen_cast_0000000000000006: function(arg0) {
1556
+ // Cast intrinsic for `U64 -> Externref`.
1557
+ const ret = BigInt.asUintN(64, arg0);
1558
+ return ret;
1559
+ },
1560
+ __wbindgen_init_externref_table: function() {
1561
+ const table = wasm.__wbindgen_externrefs;
1562
+ const offset = table.grow(4);
1563
+ table.set(0, undefined);
1564
+ table.set(offset + 0, undefined);
1565
+ table.set(offset + 1, null);
1566
+ table.set(offset + 2, true);
1567
+ table.set(offset + 3, false);
1568
+ },
1569
+ __wbindgen_object_is_undefined: function(arg0) {
1570
+ const ret = arg0 === undefined;
1571
+ return ret;
1572
+ },
1573
+ };
1574
+ return {
1575
+ __proto__: null,
1576
+ "./kreuzberg_wasm_bg.js": import0,
1577
+ };
1578
+ }
1345
1579
 
1346
- exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1347
- const ret = String(arg1);
1348
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1349
- const len1 = WASM_VECTOR_LEN;
1350
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1351
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1352
- };
1353
-
1354
- exports.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
1355
- const v = arg1;
1356
- const ret = typeof(v) === 'bigint' ? v : undefined;
1357
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1358
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1359
- };
1360
-
1361
- exports.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
1362
- const v = arg0;
1363
- const ret = typeof(v) === 'boolean' ? v : undefined;
1364
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1365
- };
1366
-
1367
- exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
1368
- const ret = debugString(arg1);
1369
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1370
- const len1 = WASM_VECTOR_LEN;
1371
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1372
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1373
- };
1580
+ function wasm_bindgen_d5f0760cbbd6023b___convert__closures_____invoke___wasm_bindgen_d5f0760cbbd6023b___JsValue_____(arg0, arg1, arg2) {
1581
+ wasm.wasm_bindgen_d5f0760cbbd6023b___convert__closures_____invoke___wasm_bindgen_d5f0760cbbd6023b___JsValue_____(arg0, arg1, arg2);
1582
+ }
1374
1583
 
1375
- exports.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
1376
- const ret = arg0 in arg1;
1377
- return ret;
1378
- };
1584
+ function wasm_bindgen_d5f0760cbbd6023b___convert__closures_____invoke___wasm_bindgen_d5f0760cbbd6023b___JsValue__wasm_bindgen_d5f0760cbbd6023b___JsValue_____(arg0, arg1, arg2, arg3) {
1585
+ wasm.wasm_bindgen_d5f0760cbbd6023b___convert__closures_____invoke___wasm_bindgen_d5f0760cbbd6023b___JsValue__wasm_bindgen_d5f0760cbbd6023b___JsValue_____(arg0, arg1, arg2, arg3);
1586
+ }
1379
1587
 
1380
- exports.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
1381
- const ret = typeof(arg0) === 'bigint';
1382
- return ret;
1383
- };
1384
-
1385
- exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
1386
- const ret = typeof(arg0) === 'function';
1387
- return ret;
1388
- };
1389
-
1390
- exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
1391
- const val = arg0;
1392
- const ret = typeof(val) === 'object' && val !== null;
1393
- return ret;
1394
- };
1395
-
1396
- exports.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
1397
- const ret = typeof(arg0) === 'string';
1398
- return ret;
1399
- };
1400
-
1401
- exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
1402
- const ret = arg0 === undefined;
1403
- return ret;
1404
- };
1405
-
1406
- exports.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
1407
- const ret = arg0 === arg1;
1408
- return ret;
1409
- };
1410
-
1411
- exports.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
1412
- const ret = arg0 == arg1;
1413
- return ret;
1414
- };
1415
-
1416
- exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
1417
- const obj = arg1;
1418
- const ret = typeof(obj) === 'number' ? obj : undefined;
1419
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1420
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1421
- };
1422
-
1423
- exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
1424
- const obj = arg1;
1425
- const ret = typeof(obj) === 'string' ? obj : undefined;
1426
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1427
- var len1 = WASM_VECTOR_LEN;
1428
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1429
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1430
- };
1431
-
1432
- exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
1433
- var v0 = getCachedStringFromWasm0(arg0, arg1);
1434
- throw new Error(v0);
1435
- };
1436
-
1437
- exports.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
1438
- arg0._wbg_cb_unref();
1439
- };
1440
-
1441
- exports.__wbg_addEventListener_6a82629b3d430a48 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1442
- var v0 = getCachedStringFromWasm0(arg1, arg2);
1443
- arg0.addEventListener(v0, arg3);
1444
- }, arguments) };
1445
-
1446
- exports.__wbg_apply_52e9ae668d017009 = function() { return handleError(function (arg0, arg1, arg2) {
1447
- const ret = arg0.apply(arg1, arg2);
1448
- return ret;
1449
- }, arguments) };
1450
-
1451
- exports.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
1452
- const ret = arg0.call(arg1, arg2);
1453
- return ret;
1454
- }, arguments) };
1455
-
1456
- exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
1457
- const ret = arg0.call(arg1);
1458
- return ret;
1459
- }, arguments) };
1460
-
1461
- exports.__wbg_call_c8baa5c5e72d274e = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1462
- const ret = arg0.call(arg1, arg2, arg3);
1463
- return ret;
1464
- }, arguments) };
1465
-
1466
- exports.__wbg_codePointAt_6fd4439a1e465afd = function(arg0, arg1) {
1467
- const ret = arg0.codePointAt(arg1 >>> 0);
1468
- return ret;
1469
- };
1470
-
1471
- exports.__wbg_construct_8d61a09a064d7a0e = function() { return handleError(function (arg0, arg1) {
1472
- const ret = Reflect.construct(arg0, arg1);
1473
- return ret;
1474
- }, arguments) };
1475
-
1476
- exports.__wbg_debug_9d0c87ddda3dc485 = function(arg0) {
1477
- console.debug(arg0);
1478
- };
1479
-
1480
- exports.__wbg_decode_47d91d32f8c229af = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1481
- const ret = arg1.decode(getArrayU8FromWasm0(arg2, arg3));
1482
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1483
- const len1 = WASM_VECTOR_LEN;
1484
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1485
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1486
- }, arguments) };
1487
-
1488
- exports.__wbg_done_62ea16af4ce34b24 = function(arg0) {
1489
- const ret = arg0.done;
1490
- return ret;
1491
- };
1492
-
1493
- exports.__wbg_entries_83c79938054e065f = function(arg0) {
1494
- const ret = Object.entries(arg0);
1495
- return ret;
1496
- };
1497
-
1498
- exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
1499
- var v0 = getCachedStringFromWasm0(arg0, arg1);
1500
- if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1, 1); }
1501
- console.error(v0);
1502
- };
1503
-
1504
- exports.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
1505
- console.error(arg0);
1506
- };
1507
-
1508
- exports.__wbg_fromCodePoint_50facac709b76f67 = function() { return handleError(function (arg0) {
1509
- const ret = String.fromCodePoint(arg0 >>> 0);
1510
- return ret;
1511
- }, arguments) };
1512
-
1513
- exports.__wbg_from_29a8414a7a7cd19d = function(arg0) {
1514
- const ret = Array.from(arg0);
1515
- return ret;
1516
- };
1517
-
1518
- exports.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
1519
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1520
- }, arguments) };
1521
-
1522
- exports.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
1523
- const ret = arg0.getTime();
1524
- return ret;
1525
- };
1526
-
1527
- exports.__wbg_get_16458e8ef25ea5fa = function() { return handleError(function (arg0, arg1) {
1528
- const ret = arg0.get(arg1 >>> 0);
1529
- return ret;
1530
- }, arguments) };
1531
-
1532
- exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
1533
- const ret = arg0[arg1 >>> 0];
1534
- return ret;
1535
- };
1536
-
1537
- exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
1538
- const ret = Reflect.get(arg0, arg1);
1539
- return ret;
1540
- }, arguments) };
1541
-
1542
- exports.__wbg_get_index_4e7b3f629a0ab9cd = function(arg0, arg1) {
1543
- const ret = arg0[arg1 >>> 0];
1544
- return ret;
1545
- };
1588
+ const ModuleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
1589
+ ? { register: () => {}, unregister: () => {} }
1590
+ : new FinalizationRegistry(ptr => wasm.__wbg_moduleinfo_free(ptr >>> 0, 1));
1546
1591
 
1547
- exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
1548
- const ret = arg0[arg1];
1549
- return ret;
1550
- };
1592
+ function addToExternrefTable0(obj) {
1593
+ const idx = wasm.__externref_table_alloc();
1594
+ wasm.__wbindgen_externrefs.set(idx, obj);
1595
+ return idx;
1596
+ }
1551
1597
 
1552
- exports.__wbg_info_ce6bcc489c22f6f0 = function(arg0) {
1553
- console.info(arg0);
1554
- };
1598
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1599
+ ? { register: () => {}, unregister: () => {} }
1600
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
1555
1601
 
1556
- exports.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
1557
- let result;
1558
- try {
1559
- result = arg0 instanceof ArrayBuffer;
1560
- } catch (_) {
1561
- result = false;
1602
+ function debugString(val) {
1603
+ // primitive types
1604
+ const type = typeof val;
1605
+ if (type == 'number' || type == 'boolean' || val == null) {
1606
+ return `${val}`;
1562
1607
  }
1563
- const ret = result;
1564
- return ret;
1565
- };
1566
-
1567
- exports.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
1568
- let result;
1569
- try {
1570
- result = arg0 instanceof Map;
1571
- } catch (_) {
1572
- result = false;
1608
+ if (type == 'string') {
1609
+ return `"${val}"`;
1573
1610
  }
1574
- const ret = result;
1575
- return ret;
1576
- };
1577
-
1578
- exports.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
1579
- let result;
1580
- try {
1581
- result = arg0 instanceof Uint8Array;
1582
- } catch (_) {
1583
- result = false;
1611
+ if (type == 'symbol') {
1612
+ const description = val.description;
1613
+ if (description == null) {
1614
+ return 'Symbol';
1615
+ } else {
1616
+ return `Symbol(${description})`;
1617
+ }
1584
1618
  }
1585
- const ret = result;
1586
- return ret;
1587
- };
1588
-
1589
- exports.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
1590
- const ret = Array.isArray(arg0);
1591
- return ret;
1592
- };
1593
-
1594
- exports.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
1595
- const ret = Number.isSafeInteger(arg0);
1596
- return ret;
1597
- };
1598
-
1599
- exports.__wbg_iterator_27b7c8b35ab3e86b = function() {
1600
- const ret = Symbol.iterator;
1601
- return ret;
1602
- };
1603
-
1604
- exports.__wbg_length_1f83b8e5895c84aa = function(arg0) {
1605
- const ret = arg0.length;
1606
- return ret;
1607
- };
1608
-
1609
- exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
1610
- const ret = arg0.length;
1611
- return ret;
1612
- };
1613
-
1614
- exports.__wbg_length_3a9ca660d3d3391b = function(arg0) {
1615
- const ret = arg0.length;
1616
- return ret;
1617
- };
1618
-
1619
- exports.__wbg_length_bd124cfd1a9444fe = function(arg0) {
1620
- const ret = arg0.length;
1621
- return ret;
1622
- };
1623
-
1624
- exports.__wbg_length_d45040a40c570362 = function(arg0) {
1625
- const ret = arg0.length;
1626
- return ret;
1627
- };
1628
-
1629
- exports.__wbg_log_1d990106d99dacb7 = function(arg0) {
1630
- console.log(arg0);
1631
- };
1632
-
1633
- exports.__wbg_new_0_23cedd11d9b40c9d = function() {
1634
- const ret = new Date();
1635
- return ret;
1636
- };
1619
+ if (type == 'function') {
1620
+ const name = val.name;
1621
+ if (typeof name == 'string' && name.length > 0) {
1622
+ return `Function(${name})`;
1623
+ } else {
1624
+ return 'Function';
1625
+ }
1626
+ }
1627
+ // objects
1628
+ if (Array.isArray(val)) {
1629
+ const length = val.length;
1630
+ let debug = '[';
1631
+ if (length > 0) {
1632
+ debug += debugString(val[0]);
1633
+ }
1634
+ for(let i = 1; i < length; i++) {
1635
+ debug += ', ' + debugString(val[i]);
1636
+ }
1637
+ debug += ']';
1638
+ return debug;
1639
+ }
1640
+ // Test for built-in
1641
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1642
+ let className;
1643
+ if (builtInMatches && builtInMatches.length > 1) {
1644
+ className = builtInMatches[1];
1645
+ } else {
1646
+ // Failed to match the standard '[object ClassName]'
1647
+ return toString.call(val);
1648
+ }
1649
+ if (className == 'Object') {
1650
+ // we're a user defined class or Object
1651
+ // JSON.stringify avoids problems with cycles, and is generally much
1652
+ // easier than looping through ownProperties of `val`.
1653
+ try {
1654
+ return 'Object(' + JSON.stringify(val) + ')';
1655
+ } catch (_) {
1656
+ return 'Object';
1657
+ }
1658
+ }
1659
+ // errors
1660
+ if (val instanceof Error) {
1661
+ return `${val.name}: ${val.message}\n${val.stack}`;
1662
+ }
1663
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1664
+ return className;
1665
+ }
1637
1666
 
1638
- exports.__wbg_new_111dde64cffa8ba1 = function() { return handleError(function () {
1639
- const ret = new FileReader();
1640
- return ret;
1641
- }, arguments) };
1667
+ function getArrayU8FromWasm0(ptr, len) {
1668
+ ptr = ptr >>> 0;
1669
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1670
+ }
1642
1671
 
1643
- exports.__wbg_new_1ba21ce319a06297 = function() {
1644
- const ret = new Object();
1645
- return ret;
1646
- };
1672
+ function getCachedStringFromWasm0(ptr, len) {
1673
+ if (ptr === 0) {
1674
+ return getFromExternrefTable0(len);
1675
+ } else {
1676
+ return getStringFromWasm0(ptr, len);
1677
+ }
1678
+ }
1647
1679
 
1648
- exports.__wbg_new_25f239778d6112b9 = function() {
1649
- const ret = new Array();
1650
- return ret;
1651
- };
1680
+ let cachedDataViewMemory0 = null;
1681
+ function getDataViewMemory0() {
1682
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1683
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1684
+ }
1685
+ return cachedDataViewMemory0;
1686
+ }
1652
1687
 
1653
- exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1654
- const ret = new Uint8Array(arg0);
1655
- return ret;
1656
- };
1688
+ function getFromExternrefTable0(idx) { return wasm.__wbindgen_externrefs.get(idx); }
1657
1689
 
1658
- exports.__wbg_new_8a6f238a6ece86ea = function() {
1659
- const ret = new Error();
1660
- return ret;
1661
- };
1690
+ function getStringFromWasm0(ptr, len) {
1691
+ ptr = ptr >>> 0;
1692
+ return decodeText(ptr, len);
1693
+ }
1662
1694
 
1663
- exports.__wbg_new_b546ae120718850e = function() {
1664
- const ret = new Map();
1665
- return ret;
1666
- };
1695
+ let cachedUint8ArrayMemory0 = null;
1696
+ function getUint8ArrayMemory0() {
1697
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1698
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1699
+ }
1700
+ return cachedUint8ArrayMemory0;
1701
+ }
1667
1702
 
1668
- exports.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
1703
+ function handleError(f, args) {
1669
1704
  try {
1670
- var state0 = {a: arg0, b: arg1};
1671
- var cb0 = (arg0, arg1) => {
1672
- const a = state0.a;
1673
- state0.a = 0;
1674
- try {
1675
- return wasm_bindgen_4fcc1eb3154b8c24___convert__closures_____invoke___wasm_bindgen_4fcc1eb3154b8c24___JsValue__wasm_bindgen_4fcc1eb3154b8c24___JsValue_____(a, state0.b, arg0, arg1);
1676
- } finally {
1677
- state0.a = a;
1678
- }
1679
- };
1680
- const ret = new Promise(cb0);
1681
- return ret;
1682
- } finally {
1683
- state0.a = state0.b = 0;
1705
+ return f.apply(this, args);
1706
+ } catch (e) {
1707
+ const idx = addToExternrefTable0(e);
1708
+ wasm.__wbindgen_exn_store(idx);
1684
1709
  }
1685
- };
1686
-
1687
- exports.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1688
- var v0 = getCachedStringFromWasm0(arg0, arg1);
1689
- const ret = new Function(v0);
1690
- return ret;
1691
- };
1692
-
1693
- exports.__wbg_new_with_label_a21974f868c72f0c = function() { return handleError(function (arg0, arg1) {
1694
- var v0 = getCachedStringFromWasm0(arg0, arg1);
1695
- const ret = new TextDecoder(v0);
1696
- return ret;
1697
- }, arguments) };
1698
-
1699
- exports.__wbg_new_with_length_12c6de4fac33117a = function(arg0) {
1700
- const ret = new Array(arg0 >>> 0);
1701
- return ret;
1702
- };
1703
-
1704
- exports.__wbg_next_138a17bbf04e926c = function(arg0) {
1705
- const ret = arg0.next;
1706
- return ret;
1707
- };
1708
-
1709
- exports.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
1710
- const ret = arg0.next();
1711
- return ret;
1712
- }, arguments) };
1713
-
1714
- exports.__wbg_of_122077a9318f8376 = function(arg0, arg1, arg2, arg3, arg4) {
1715
- const ret = Array.of(arg0, arg1, arg2, arg3, arg4);
1716
- return ret;
1717
- };
1718
-
1719
- exports.__wbg_of_6505a0eb509da02e = function(arg0) {
1720
- const ret = Array.of(arg0);
1721
- return ret;
1722
- };
1723
-
1724
- exports.__wbg_of_7779827fa663eec8 = function(arg0, arg1, arg2) {
1725
- const ret = Array.of(arg0, arg1, arg2);
1726
- return ret;
1727
- };
1728
-
1729
- exports.__wbg_of_b8cd42ebb79fb759 = function(arg0, arg1) {
1730
- const ret = Array.of(arg0, arg1);
1731
- return ret;
1732
- };
1733
-
1734
- exports.__wbg_of_fdf875aa87d9498c = function(arg0, arg1, arg2, arg3) {
1735
- const ret = Array.of(arg0, arg1, arg2, arg3);
1736
- return ret;
1737
- };
1738
-
1739
- exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1740
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1741
- };
1742
-
1743
- exports.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
1744
- const ret = arg0.push(arg1);
1745
- return ret;
1746
- };
1747
-
1748
- exports.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1749
- const ret = arg0.queueMicrotask;
1750
- return ret;
1751
- };
1752
-
1753
- exports.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1754
- queueMicrotask(arg0);
1755
- };
1756
-
1757
- exports.__wbg_readAsArrayBuffer_0aca937439be3197 = function() { return handleError(function (arg0, arg1) {
1758
- arg0.readAsArrayBuffer(arg1);
1759
- }, arguments) };
1760
-
1761
- exports.__wbg_reject_e9f21cdd3c968ce3 = function(arg0) {
1762
- const ret = Promise.reject(arg0);
1763
- return ret;
1764
- };
1765
-
1766
- exports.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1767
- const ret = Promise.resolve(arg0);
1768
- return ret;
1769
- };
1770
-
1771
- exports.__wbg_result_893437a1eaacc4df = function() { return handleError(function (arg0) {
1772
- const ret = arg0.result;
1773
- return ret;
1774
- }, arguments) };
1775
-
1776
- exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1777
- arg0[arg1] = arg2;
1778
- };
1779
-
1780
- exports.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
1781
- arg0[arg1 >>> 0] = arg2;
1782
- };
1710
+ }
1783
1711
 
1784
- exports.__wbg_set_bc3a432bdcd60886 = function(arg0, arg1, arg2) {
1785
- arg0.set(arg1, arg2 >>> 0);
1786
- };
1712
+ function isLikeNone(x) {
1713
+ return x === undefined || x === null;
1714
+ }
1787
1715
 
1788
- exports.__wbg_set_c50d03a32da17043 = function() { return handleError(function (arg0, arg1, arg2) {
1789
- arg0.set(arg1 >>> 0, arg2);
1790
- }, arguments) };
1716
+ function makeMutClosure(arg0, arg1, dtor, f) {
1717
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
1718
+ const real = (...args) => {
1791
1719
 
1792
- exports.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
1793
- const ret = arg0.set(arg1, arg2);
1794
- return ret;
1795
- };
1720
+ // First up with a closure we increment the internal reference
1721
+ // count. This ensures that the Rust closure environment won't
1722
+ // be deallocated while we're invoking it.
1723
+ state.cnt++;
1724
+ const a = state.a;
1725
+ state.a = 0;
1726
+ try {
1727
+ return f(a, state.b, ...args);
1728
+ } finally {
1729
+ state.a = a;
1730
+ real._wbg_cb_unref();
1731
+ }
1732
+ };
1733
+ real._wbg_cb_unref = () => {
1734
+ if (--state.cnt === 0) {
1735
+ state.dtor(state.a, state.b);
1736
+ state.a = 0;
1737
+ CLOSURE_DTORS.unregister(state);
1738
+ }
1739
+ };
1740
+ CLOSURE_DTORS.register(real, state, state);
1741
+ return real;
1742
+ }
1796
1743
 
1797
- exports.__wbg_slice_27b3dfe21d8ce752 = function(arg0, arg1, arg2) {
1798
- const ret = arg0.slice(arg1 >>> 0, arg2 >>> 0);
1799
- return ret;
1800
- };
1744
+ function passArrayJsValueToWasm0(array, malloc) {
1745
+ const ptr = malloc(array.length * 4, 4) >>> 0;
1746
+ for (let i = 0; i < array.length; i++) {
1747
+ const add = addToExternrefTable0(array[i]);
1748
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
1749
+ }
1750
+ WASM_VECTOR_LEN = array.length;
1751
+ return ptr;
1752
+ }
1801
1753
 
1802
- exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
1803
- const ret = arg1.stack;
1804
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1805
- const len1 = WASM_VECTOR_LEN;
1806
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1807
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1808
- };
1809
-
1810
- exports.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
1811
- const ret = typeof global === 'undefined' ? null : global;
1812
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1813
- };
1814
-
1815
- exports.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
1816
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1817
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1818
- };
1819
-
1820
- exports.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1821
- const ret = typeof self === 'undefined' ? null : self;
1822
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1823
- };
1824
-
1825
- exports.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1826
- const ret = typeof window === 'undefined' ? null : window;
1827
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1828
- };
1829
-
1830
- exports.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
1831
- const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1832
- return ret;
1833
- };
1754
+ function passStringToWasm0(arg, malloc, realloc) {
1755
+ if (realloc === undefined) {
1756
+ const buf = cachedTextEncoder.encode(arg);
1757
+ const ptr = malloc(buf.length, 1) >>> 0;
1758
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1759
+ WASM_VECTOR_LEN = buf.length;
1760
+ return ptr;
1761
+ }
1834
1762
 
1835
- exports.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1836
- const ret = arg0.then(arg1, arg2);
1837
- return ret;
1838
- };
1763
+ let len = arg.length;
1764
+ let ptr = malloc(len, 1) >>> 0;
1839
1765
 
1840
- exports.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1841
- const ret = arg0.then(arg1);
1842
- return ret;
1843
- };
1766
+ const mem = getUint8ArrayMemory0();
1844
1767
 
1845
- exports.__wbg_type_cb833fc71b5282fb = function(arg0, arg1) {
1846
- const ret = arg1.type;
1847
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1848
- const len1 = WASM_VECTOR_LEN;
1849
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1850
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1851
- };
1768
+ let offset = 0;
1852
1769
 
1853
- exports.__wbg_value_57b7b035e117f7ee = function(arg0) {
1854
- const ret = arg0.value;
1855
- return ret;
1856
- };
1770
+ for (; offset < len; offset++) {
1771
+ const code = arg.charCodeAt(offset);
1772
+ if (code > 0x7F) break;
1773
+ mem[ptr + offset] = code;
1774
+ }
1775
+ if (offset !== len) {
1776
+ if (offset !== 0) {
1777
+ arg = arg.slice(offset);
1778
+ }
1779
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1780
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1781
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1857
1782
 
1858
- exports.__wbg_warn_6e567d0d926ff881 = function(arg0) {
1859
- console.warn(arg0);
1860
- };
1783
+ offset += ret.written;
1784
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1785
+ }
1861
1786
 
1862
- exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1863
- // Cast intrinsic for `U64 -> Externref`.
1864
- const ret = BigInt.asUintN(64, arg0);
1865
- return ret;
1866
- };
1787
+ WASM_VECTOR_LEN = offset;
1788
+ return ptr;
1789
+ }
1867
1790
 
1868
- exports.__wbindgen_cast_7e9c58eeb11b0a6f = function(arg0, arg1) {
1869
- var v0 = getCachedStringFromWasm0(arg0, arg1);
1870
- // Cast intrinsic for `Ref(CachedString) -> Externref`.
1871
- const ret = v0;
1872
- return ret;
1873
- };
1791
+ function takeFromExternrefTable0(idx) {
1792
+ const value = wasm.__wbindgen_externrefs.get(idx);
1793
+ wasm.__externref_table_dealloc(idx);
1794
+ return value;
1795
+ }
1874
1796
 
1875
- exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1876
- // Cast intrinsic for `I64 -> Externref`.
1877
- const ret = arg0;
1878
- return ret;
1879
- };
1797
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1798
+ cachedTextDecoder.decode();
1799
+ function decodeText(ptr, len) {
1800
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1801
+ }
1880
1802
 
1881
- exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1882
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1883
- const ret = getArrayU8FromWasm0(arg0, arg1);
1884
- return ret;
1885
- };
1803
+ const cachedTextEncoder = new TextEncoder();
1886
1804
 
1887
- exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1888
- // Cast intrinsic for `F64 -> Externref`.
1889
- const ret = arg0;
1890
- return ret;
1891
- };
1805
+ if (!('encodeInto' in cachedTextEncoder)) {
1806
+ cachedTextEncoder.encodeInto = function (arg, view) {
1807
+ const buf = cachedTextEncoder.encode(arg);
1808
+ view.set(buf);
1809
+ return {
1810
+ read: arg.length,
1811
+ written: buf.length
1812
+ };
1813
+ };
1814
+ }
1892
1815
 
1893
- exports.__wbindgen_cast_f624fc0274c44f54 = function(arg0, arg1) {
1894
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1981, function: Function { arguments: [Externref], shim_idx: 1982, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1895
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_4fcc1eb3154b8c24___closure__destroy___dyn_core_67558b4ca73dc0a8___ops__function__FnMut__wasm_bindgen_4fcc1eb3154b8c24___JsValue____Output_______, wasm_bindgen_4fcc1eb3154b8c24___convert__closures_____invoke___wasm_bindgen_4fcc1eb3154b8c24___JsValue_____);
1896
- return ret;
1897
- };
1898
-
1899
- exports.__wbindgen_init_externref_table = function() {
1900
- const table = wasm.__wbindgen_externrefs;
1901
- const offset = table.grow(4);
1902
- table.set(0, undefined);
1903
- table.set(offset + 0, undefined);
1904
- table.set(offset + 1, null);
1905
- table.set(offset + 2, true);
1906
- table.set(offset + 3, false);
1907
- };
1908
-
1909
- exports.__wbindgen_object_is_undefined = function(arg0) {
1910
- const ret = arg0 === undefined;
1911
- return ret;
1912
- };
1816
+ let WASM_VECTOR_LEN = 0;
1913
1817
 
1914
1818
  const wasmPath = `${__dirname}/kreuzberg_wasm_bg.wasm`;
1915
1819
  const wasmBytes = require('fs').readFileSync(wasmPath);
1916
1820
  const wasmModule = new WebAssembly.Module(wasmBytes);
1917
- const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
1918
-
1821
+ const wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
1919
1822
  wasm.__wbindgen_start();