hermes-wasm 1.8.31 → 1.8.33

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/README.md CHANGED
@@ -131,43 +131,47 @@ const doc = await index.get_document(
131
131
 
132
132
  ### `LocalIndex`
133
133
 
134
- | Method | Description |
135
- | ------------------------------------------ | -------------------------------------------------- |
136
- | `LocalIndex.create(sdl)` | Create in-memory index from SDL schema |
137
- | `LocalIndex.withStorage(storage, sdl)` | Create or open index with pluggable storage |
138
- | `index.addDocument(json)` | Add a single document |
139
- | `index.addDocuments(jsonArray)` | Add multiple documents, returns count |
140
- | `index.commit()` | Commit pending docs, sync to storage if configured |
141
- | `index.search(query, limit)` | Search with BM25 ranking |
142
- | `index.searchOffset(query, limit, offset)` | Search with pagination |
143
- | `index.getDocument(segmentId, docId)` | Retrieve stored document |
144
- | `index.numDocs()` | Count of committed documents |
145
- | `index.pendingDocs()` | Count of uncommitted documents |
146
- | `index.fieldNames()` | List of field names |
134
+ | Method | Description |
135
+ | ------------------------------------------------------- | -------------------------------------------------- |
136
+ | `LocalIndex.create(sdl)` | Create in-memory index from SDL schema |
137
+ | `LocalIndex.withStorage(storage, sdl)` | Create or open index with pluggable storage |
138
+ | `index.addDocument(json)` | Add a single document |
139
+ | `index.addDocuments(jsonArray)` | Add multiple documents, returns count |
140
+ | `index.commit()` | Commit pending docs, sync to storage if configured |
141
+ | `index.search(query, limit)` | Search with BM25 ranking |
142
+ | `index.searchOffset(query, limit, offset)` | Search with pagination |
143
+ | `index.searchStructured(request)` | Structured query with inline doc retrieval |
144
+ | `index.getDocument(segmentId, docId)` | Retrieve stored document |
145
+ | `index.getDocumentWithFields(segmentId, docId, fields)` | Retrieve only specified fields |
146
+ | `index.numDocs()` | Count of committed documents |
147
+ | `index.pendingDocs()` | Count of uncommitted documents |
148
+ | `index.fieldNames()` | List of field names |
147
149
 
148
150
  ### `RemoteIndex`
149
151
 
150
- | Method | Description |
151
- | ------------------------------------------- | ----------------------------------- |
152
- | `new RemoteIndex(url)` | Create remote index pointing to URL |
153
- | `RemoteIndex.with_cache_size(url, bytes)` | Create with custom cache size |
154
- | `index.load()` | Load index metadata and segments |
155
- | `index.load_with_idb_cache()` | Load with IndexedDB cache pre-fill |
156
- | `index.search(query, limit)` | Search |
157
- | `index.search_offset(query, limit, offset)` | Search with pagination |
158
- | `index.get_document(segmentId, docId)` | Retrieve document |
159
- | `index.num_docs()` | Document count |
160
- | `index.num_segments()` | Segment count |
161
- | `index.field_names()` | Field names |
162
- | `index.default_fields()` | Default search fields |
163
- | `index.export_cache()` | Export slice cache as `Uint8Array` |
164
- | `index.import_cache(data)` | Import previously exported cache |
165
- | `index.save_cache_to_idb()` | Persist slice cache to IndexedDB |
166
- | `index.load_cache_from_idb()` | Restore cache from IndexedDB |
167
- | `index.clear_idb_cache()` | Remove persisted cache |
168
- | `index.cache_stats()` | Cache utilization info |
169
- | `index.network_stats()` | HTTP request statistics |
170
- | `index.reset_network_stats()` | Clear network statistics |
152
+ | Method | Description |
153
+ | ---------------------------------------------------------- | ----------------------------------- |
154
+ | `new RemoteIndex(url)` | Create remote index pointing to URL |
155
+ | `RemoteIndex.with_cache_size(url, bytes)` | Create with custom cache size |
156
+ | `index.load()` | Load index metadata and segments |
157
+ | `index.load_with_idb_cache()` | Load with IndexedDB cache pre-fill |
158
+ | `index.search(query, limit)` | Search |
159
+ | `index.search_offset(query, limit, offset)` | Search with pagination |
160
+ | `index.searchStructured(request)` | Structured query with inline docs |
161
+ | `index.get_document(segmentId, docId)` | Retrieve document |
162
+ | `index.get_document_with_fields(segmentId, docId, fields)` | Retrieve only specified fields |
163
+ | `index.num_docs()` | Document count |
164
+ | `index.num_segments()` | Segment count |
165
+ | `index.field_names()` | Field names |
166
+ | `index.default_fields()` | Default search fields |
167
+ | `index.export_cache()` | Export slice cache as `Uint8Array` |
168
+ | `index.import_cache(data)` | Import previously exported cache |
169
+ | `index.save_cache_to_idb()` | Persist slice cache to IndexedDB |
170
+ | `index.load_cache_from_idb()` | Restore cache from IndexedDB |
171
+ | `index.clear_idb_cache()` | Remove persisted cache |
172
+ | `index.cache_stats()` | Cache utilization info |
173
+ | `index.network_stats()` | HTTP request statistics |
174
+ | `index.reset_network_stats()` | Clear network statistics |
171
175
 
172
176
  ### `IpfsIndex`
173
177
 
@@ -185,6 +189,16 @@ Same API as `RemoteIndex` but loaded via JavaScript callbacks instead of HTTP:
185
189
 
186
190
  All other methods (`search`, `get_document`, `cache_stats`, etc.) are identical to `RemoteIndex`.
187
191
 
192
+ ### Logging
193
+
194
+ Debug output is off by default (level: `warn`). Enable verbose logging for diagnostics:
195
+
196
+ ```js
197
+ import { set_log_level } from "hermes-wasm";
198
+
199
+ set_log_level("debug"); // "error" | "warn" | "info" | "debug" | "trace"
200
+ ```
201
+
188
202
  ### `IndexRegistry`
189
203
 
190
204
  Manages multiple named remote indexes:
@@ -223,6 +237,46 @@ index <name> {
223
237
  | Group | `(rust OR go) AND web` | Grouping |
224
238
  | Phrase | `"search engine"` | Exact phrase |
225
239
 
240
+ ### Structured Query API
241
+
242
+ `searchStructured()` accepts a query object and returns hits with documents inline:
243
+
244
+ ```js
245
+ const results = await index.searchStructured({
246
+ query: { term: { field: "title", value: "rust" } },
247
+ limit: 10,
248
+ offset: 0,
249
+ fieldsToLoad: ["title", "body"],
250
+ });
251
+ // { hits: [{ address, score, doc: { title: "...", body: "..." } }], total_hits }
252
+ ```
253
+
254
+ **Query types:**
255
+
256
+ ```js
257
+ // Term query (tokenized with field's stemmer)
258
+ { term: { field: "title", value: "rust" } }
259
+
260
+ // Match query (tokenized, OR across tokens)
261
+ { match: { field: "body", text: "search engine" } }
262
+
263
+ // Boolean query (recursive composition)
264
+ { boolean: {
265
+ must: [{ term: { field: "title", value: "rust" } }],
266
+ should: [{ match: { field: "body", text: "fast" } }],
267
+ mustNot: [{ term: { field: "title", value: "python" } }],
268
+ } }
269
+
270
+ // Prefix query
271
+ { prefix: { field: "title", value: "rus" } }
272
+
273
+ // Sparse vector query (pre-tokenized)
274
+ { sparseVector: { field: "emb", indices: [1, 5, 10], values: [0.5, 0.3, 0.2] } }
275
+
276
+ // Dense vector query (ANN)
277
+ { denseVector: { field: "emb", vector: [0.1, 0.2, 0.3], nprobe: 32 } }
278
+ ```
279
+
226
280
  ## Building
227
281
 
228
282
  ```bash
package/hermes_wasm.d.ts CHANGED
@@ -55,6 +55,10 @@ export class IpfsIndex {
55
55
  * Get field names
56
56
  */
57
57
  field_names(): any;
58
+ /**
59
+ * Get a document by address, loading only the specified fields.
60
+ */
61
+ getDocumentWithFields(segment_id: string, doc_id: number, fields_to_load: string[]): Promise<any>;
58
62
  /**
59
63
  * Get a document by address
60
64
  */
@@ -118,6 +122,10 @@ export class IpfsIndex {
118
122
  * Use `get_document(hit.address.segment_id, hit.address.doc_id)` to fetch document content.
119
123
  */
120
124
  search(query_str: string, limit: number): Promise<any>;
125
+ /**
126
+ * Structured search: accepts a query object instead of a query string.
127
+ */
128
+ searchStructured(request: any): Promise<any>;
121
129
  /**
122
130
  * Search the index with offset for pagination
123
131
  */
@@ -171,6 +179,12 @@ export class LocalIndex {
171
179
  * Get a document by its address.
172
180
  */
173
181
  getDocument(segment_id: string, doc_id: number): Promise<any>;
182
+ /**
183
+ * Get a document by its address, loading only the specified fields.
184
+ *
185
+ * `fields_to_load` is a JS array of field name strings, e.g. `["title", "body"]`.
186
+ */
187
+ getDocumentWithFields(segment_id: string, doc_id: number, fields_to_load: string[]): Promise<any>;
174
188
  /**
175
189
  * Number of indexed documents (across all committed segments).
176
190
  */
@@ -189,6 +203,19 @@ export class LocalIndex {
189
203
  * Search with offset for pagination.
190
204
  */
191
205
  searchOffset(query_str: string, limit: number, offset: number): Promise<any>;
206
+ /**
207
+ * Structured search: accepts a query object instead of a query string.
208
+ *
209
+ * ```js
210
+ * const results = await index.searchStructured({
211
+ * query: { boolean: { must: [{ term: { field: "title", value: "rust" } }] } },
212
+ * limit: 10,
213
+ * offset: 0,
214
+ * fieldsToLoad: ["title"],
215
+ * });
216
+ * ```
217
+ */
218
+ searchStructured(request: any): Promise<any>;
192
219
  /**
193
220
  * Create or open an index with a pluggable storage backend.
194
221
  *
@@ -237,6 +264,13 @@ export class RemoteIndex {
237
264
  * Get field names
238
265
  */
239
266
  field_names(): any;
267
+ /**
268
+ * Get a document by its address, loading only the specified fields.
269
+ *
270
+ * `fields_to_load` is a JS array of field name strings, e.g. `["title", "body"]`.
271
+ * Only the requested fields are returned (skips expensive reads for dense vectors).
272
+ */
273
+ getDocumentWithFields(segment_id: string, doc_id: number, fields_to_load: string[]): Promise<any>;
240
274
  /**
241
275
  * Get a document by its address (segment_id + doc_id)
242
276
  *
@@ -307,6 +341,10 @@ export class RemoteIndex {
307
341
  * Use `get_document(hit.address.segment_id, hit.address.doc_id)` to fetch document content.
308
342
  */
309
343
  search(query_str: string, limit: number): Promise<any>;
344
+ /**
345
+ * Structured search: accepts a query object instead of a query string.
346
+ */
347
+ searchStructured(request: any): Promise<any>;
310
348
  /**
311
349
  * Search with offset for pagination
312
350
  */
@@ -318,10 +356,15 @@ export class RemoteIndex {
318
356
  }
319
357
 
320
358
  /**
321
- * Initialize panic hook and logging
359
+ * Initialize panic hook and logging (defaults to Warn level)
322
360
  */
323
361
  export function init(): void;
324
362
 
363
+ /**
364
+ * Set log level: "error", "warn", "info", "debug", "trace", "off"
365
+ */
366
+ export function set_log_level(level: string): void;
367
+
325
368
  /**
326
369
  * Setup logging to browser console (can be called explicitly)
327
370
  */
@@ -344,6 +387,7 @@ export interface InitOutput {
344
387
  readonly ipfsindex_default_fields: (a: number) => any;
345
388
  readonly ipfsindex_export_cache: (a: number) => [number, number];
346
389
  readonly ipfsindex_field_names: (a: number) => any;
390
+ readonly ipfsindex_getDocumentWithFields: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
347
391
  readonly ipfsindex_get_document: (a: number, b: number, c: number, d: number) => any;
348
392
  readonly ipfsindex_import_cache: (a: number, b: number, c: number) => [number, number];
349
393
  readonly ipfsindex_load: (a: number, b: any, c: any) => any;
@@ -356,6 +400,7 @@ export interface InitOutput {
356
400
  readonly ipfsindex_reset_network_stats: (a: number) => void;
357
401
  readonly ipfsindex_save_cache_to_idb: (a: number) => any;
358
402
  readonly ipfsindex_search: (a: number, b: number, c: number, d: number) => any;
403
+ readonly ipfsindex_searchStructured: (a: number, b: any) => any;
359
404
  readonly ipfsindex_search_offset: (a: number, b: number, c: number, d: number, e: number) => any;
360
405
  readonly ipfsindex_with_cache_size: (a: number, b: number, c: number) => number;
361
406
  readonly remoteindex_cache_stats: (a: number) => any;
@@ -363,6 +408,7 @@ export interface InitOutput {
363
408
  readonly remoteindex_default_fields: (a: number) => any;
364
409
  readonly remoteindex_export_cache: (a: number) => [number, number];
365
410
  readonly remoteindex_field_names: (a: number) => any;
411
+ readonly remoteindex_getDocumentWithFields: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
366
412
  readonly remoteindex_get_document: (a: number, b: number, c: number, d: number) => any;
367
413
  readonly remoteindex_import_cache: (a: number, b: number, c: number) => [number, number];
368
414
  readonly remoteindex_load: (a: number) => any;
@@ -373,8 +419,12 @@ export interface InitOutput {
373
419
  readonly remoteindex_reset_network_stats: (a: number) => void;
374
420
  readonly remoteindex_save_cache_to_idb: (a: number) => any;
375
421
  readonly remoteindex_search: (a: number, b: number, c: number, d: number) => any;
422
+ readonly remoteindex_searchStructured: (a: number, b: any) => any;
376
423
  readonly remoteindex_search_offset: (a: number, b: number, c: number, d: number, e: number) => any;
377
424
  readonly remoteindex_with_cache_size: (a: number, b: number, c: number) => number;
425
+ readonly set_log_level: (a: number, b: number) => void;
426
+ readonly init: () => void;
427
+ readonly setup_logging: () => void;
378
428
  readonly remoteindex_num_docs: (a: number) => number;
379
429
  readonly remoteindex_num_segments: (a: number) => number;
380
430
  readonly __wbg_localindex_free: (a: number, b: number) => void;
@@ -384,13 +434,13 @@ export interface InitOutput {
384
434
  readonly localindex_create: (a: number, b: number) => any;
385
435
  readonly localindex_fieldNames: (a: number) => any;
386
436
  readonly localindex_getDocument: (a: number, b: number, c: number, d: number) => any;
437
+ readonly localindex_getDocumentWithFields: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
387
438
  readonly localindex_numDocs: (a: number) => number;
388
439
  readonly localindex_pendingDocs: (a: number) => number;
389
440
  readonly localindex_search: (a: number, b: number, c: number, d: number) => any;
390
441
  readonly localindex_searchOffset: (a: number, b: number, c: number, d: number, e: number) => any;
442
+ readonly localindex_searchStructured: (a: number, b: any) => any;
391
443
  readonly localindex_withStorage: (a: any, b: number, c: number) => any;
392
- readonly init: () => void;
393
- readonly setup_logging: () => void;
394
444
  readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
395
445
  readonly rust_zstd_wasm_shim_free: (a: number) => void;
396
446
  readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
@@ -399,20 +449,18 @@ export interface InitOutput {
399
449
  readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
400
450
  readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
401
451
  readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
402
- readonly wasm_bindgen_efede8c867e8014b___closure__destroy___dyn_core_5858575f5ab61d4b___ops__function__FnMut__web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent____Output_______: (a: number, b: number) => void;
403
- readonly wasm_bindgen_efede8c867e8014b___closure__destroy___dyn_core_5858575f5ab61d4b___ops__function__FnMut_____Output_______: (a: number, b: number) => void;
404
- readonly wasm_bindgen_efede8c867e8014b___closure__destroy___dyn_core_5858575f5ab61d4b___ops__function__FnMut__wasm_bindgen_efede8c867e8014b___JsValue____Output___core_5858575f5ab61d4b___result__Result_____wasm_bindgen_efede8c867e8014b___JsError___: (a: number, b: number) => void;
405
- readonly wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___wasm_bindgen_efede8c867e8014b___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_efede8c867e8014b___JsError___true_: (a: number, b: number, c: any) => [number, number];
406
- readonly wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
407
- readonly wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_: (a: number, b: number, c: any) => void;
408
- readonly wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__1: (a: number, b: number, c: any) => void;
409
- readonly wasm_bindgen_efede8c867e8014b___convert__closures_____invoke_______true_: (a: number, b: number) => void;
452
+ readonly wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___wasm_bindgen_7e519ff5bc59ba8e___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_7e519ff5bc59ba8e___JsError___true_: (a: number, b: number, c: any) => [number, number];
453
+ readonly wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
454
+ readonly wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_: (a: number, b: number, c: any) => void;
455
+ readonly wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__2: (a: number, b: number, c: any) => void;
456
+ readonly wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke_______true_: (a: number, b: number) => void;
410
457
  readonly __wbindgen_malloc: (a: number, b: number) => number;
411
458
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
412
459
  readonly __wbindgen_exn_store: (a: number) => void;
413
460
  readonly __externref_table_alloc: () => number;
414
461
  readonly __wbindgen_externrefs: WebAssembly.Table;
415
462
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
463
+ readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
416
464
  readonly __externref_table_dealloc: (a: number) => void;
417
465
  readonly __wbindgen_start: () => void;
418
466
  }
package/hermes_wasm.js CHANGED
@@ -138,6 +138,21 @@ export class IpfsIndex {
138
138
  const ret = wasm.ipfsindex_field_names(this.__wbg_ptr);
139
139
  return ret;
140
140
  }
141
+ /**
142
+ * Get a document by address, loading only the specified fields.
143
+ * @param {string} segment_id
144
+ * @param {number} doc_id
145
+ * @param {string[]} fields_to_load
146
+ * @returns {Promise<any>}
147
+ */
148
+ getDocumentWithFields(segment_id, doc_id, fields_to_load) {
149
+ const ptr0 = passStringToWasm0(segment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
150
+ const len0 = WASM_VECTOR_LEN;
151
+ const ptr1 = passArrayJsValueToWasm0(fields_to_load, wasm.__wbindgen_malloc);
152
+ const len1 = WASM_VECTOR_LEN;
153
+ const ret = wasm.ipfsindex_getDocumentWithFields(this.__wbg_ptr, ptr0, len0, doc_id, ptr1, len1);
154
+ return ret;
155
+ }
141
156
  /**
142
157
  * Get a document by address
143
158
  * @param {string} segment_id
@@ -267,6 +282,15 @@ export class IpfsIndex {
267
282
  const ret = wasm.ipfsindex_search(this.__wbg_ptr, ptr0, len0, limit);
268
283
  return ret;
269
284
  }
285
+ /**
286
+ * Structured search: accepts a query object instead of a query string.
287
+ * @param {any} request
288
+ * @returns {Promise<any>}
289
+ */
290
+ searchStructured(request) {
291
+ const ret = wasm.ipfsindex_searchStructured(this.__wbg_ptr, request);
292
+ return ret;
293
+ }
270
294
  /**
271
295
  * Search the index with offset for pagination
272
296
  * @param {string} query_str
@@ -385,6 +409,23 @@ export class LocalIndex {
385
409
  const ret = wasm.localindex_getDocument(this.__wbg_ptr, ptr0, len0, doc_id);
386
410
  return ret;
387
411
  }
412
+ /**
413
+ * Get a document by its address, loading only the specified fields.
414
+ *
415
+ * `fields_to_load` is a JS array of field name strings, e.g. `["title", "body"]`.
416
+ * @param {string} segment_id
417
+ * @param {number} doc_id
418
+ * @param {string[]} fields_to_load
419
+ * @returns {Promise<any>}
420
+ */
421
+ getDocumentWithFields(segment_id, doc_id, fields_to_load) {
422
+ const ptr0 = passStringToWasm0(segment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
423
+ const len0 = WASM_VECTOR_LEN;
424
+ const ptr1 = passArrayJsValueToWasm0(fields_to_load, wasm.__wbindgen_malloc);
425
+ const len1 = WASM_VECTOR_LEN;
426
+ const ret = wasm.localindex_getDocumentWithFields(this.__wbg_ptr, ptr0, len0, doc_id, ptr1, len1);
427
+ return ret;
428
+ }
388
429
  /**
389
430
  * Number of indexed documents (across all committed segments).
390
431
  * @returns {number}
@@ -428,6 +469,24 @@ export class LocalIndex {
428
469
  const ret = wasm.localindex_searchOffset(this.__wbg_ptr, ptr0, len0, limit, offset);
429
470
  return ret;
430
471
  }
472
+ /**
473
+ * Structured search: accepts a query object instead of a query string.
474
+ *
475
+ * ```js
476
+ * const results = await index.searchStructured({
477
+ * query: { boolean: { must: [{ term: { field: "title", value: "rust" } }] } },
478
+ * limit: 10,
479
+ * offset: 0,
480
+ * fieldsToLoad: ["title"],
481
+ * });
482
+ * ```
483
+ * @param {any} request
484
+ * @returns {Promise<any>}
485
+ */
486
+ searchStructured(request) {
487
+ const ret = wasm.localindex_searchStructured(this.__wbg_ptr, request);
488
+ return ret;
489
+ }
431
490
  /**
432
491
  * Create or open an index with a pluggable storage backend.
433
492
  *
@@ -525,6 +584,24 @@ export class RemoteIndex {
525
584
  const ret = wasm.remoteindex_field_names(this.__wbg_ptr);
526
585
  return ret;
527
586
  }
587
+ /**
588
+ * Get a document by its address, loading only the specified fields.
589
+ *
590
+ * `fields_to_load` is a JS array of field name strings, e.g. `["title", "body"]`.
591
+ * Only the requested fields are returned (skips expensive reads for dense vectors).
592
+ * @param {string} segment_id
593
+ * @param {number} doc_id
594
+ * @param {string[]} fields_to_load
595
+ * @returns {Promise<any>}
596
+ */
597
+ getDocumentWithFields(segment_id, doc_id, fields_to_load) {
598
+ const ptr0 = passStringToWasm0(segment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
599
+ const len0 = WASM_VECTOR_LEN;
600
+ const ptr1 = passArrayJsValueToWasm0(fields_to_load, wasm.__wbindgen_malloc);
601
+ const len1 = WASM_VECTOR_LEN;
602
+ const ret = wasm.remoteindex_getDocumentWithFields(this.__wbg_ptr, ptr0, len0, doc_id, ptr1, len1);
603
+ return ret;
604
+ }
528
605
  /**
529
606
  * Get a document by its address (segment_id + doc_id)
530
607
  *
@@ -657,6 +734,15 @@ export class RemoteIndex {
657
734
  const ret = wasm.remoteindex_search(this.__wbg_ptr, ptr0, len0, limit);
658
735
  return ret;
659
736
  }
737
+ /**
738
+ * Structured search: accepts a query object instead of a query string.
739
+ * @param {any} request
740
+ * @returns {Promise<any>}
741
+ */
742
+ searchStructured(request) {
743
+ const ret = wasm.remoteindex_searchStructured(this.__wbg_ptr, request);
744
+ return ret;
745
+ }
660
746
  /**
661
747
  * Search with offset for pagination
662
748
  * @param {string} query_str
@@ -686,12 +772,22 @@ export class RemoteIndex {
686
772
  if (Symbol.dispose) RemoteIndex.prototype[Symbol.dispose] = RemoteIndex.prototype.free;
687
773
 
688
774
  /**
689
- * Initialize panic hook and logging
775
+ * Initialize panic hook and logging (defaults to Warn level)
690
776
  */
691
777
  export function init() {
692
778
  wasm.init();
693
779
  }
694
780
 
781
+ /**
782
+ * Set log level: "error", "warn", "info", "debug", "trace", "off"
783
+ * @param {string} level
784
+ */
785
+ export function set_log_level(level) {
786
+ const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
787
+ const len0 = WASM_VECTOR_LEN;
788
+ wasm.set_log_level(ptr0, len0);
789
+ }
790
+
695
791
  /**
696
792
  * Setup logging to browser console (can be called explicitly)
697
793
  */
@@ -702,10 +798,14 @@ export function setup_logging() {
702
798
  function __wbg_get_imports() {
703
799
  const import0 = {
704
800
  __proto__: null,
705
- __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
801
+ __wbg_Error_2e59b1b37a9a34c3: function(arg0, arg1) {
706
802
  const ret = Error(getStringFromWasm0(arg0, arg1));
707
803
  return ret;
708
804
  },
805
+ __wbg_Number_e6ffdb596c888833: function(arg0) {
806
+ const ret = Number(arg0);
807
+ return ret;
808
+ },
709
809
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
710
810
  const ret = String(arg1);
711
811
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -713,68 +813,68 @@ function __wbg_get_imports() {
713
813
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
714
814
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
715
815
  },
716
- __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
816
+ __wbg___wbindgen_bigint_get_as_i64_2c5082002e4826e2: function(arg0, arg1) {
717
817
  const v = arg1;
718
818
  const ret = typeof(v) === 'bigint' ? v : undefined;
719
819
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
720
820
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
721
821
  },
722
- __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
822
+ __wbg___wbindgen_boolean_get_a86c216575a75c30: function(arg0) {
723
823
  const v = arg0;
724
824
  const ret = typeof(v) === 'boolean' ? v : undefined;
725
825
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
726
826
  },
727
- __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
827
+ __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
728
828
  const ret = debugString(arg1);
729
829
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
730
830
  const len1 = WASM_VECTOR_LEN;
731
831
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
732
832
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
733
833
  },
734
- __wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
834
+ __wbg___wbindgen_in_4bd7a57e54337366: function(arg0, arg1) {
735
835
  const ret = arg0 in arg1;
736
836
  return ret;
737
837
  },
738
- __wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
838
+ __wbg___wbindgen_is_bigint_6c98f7e945dacdde: function(arg0) {
739
839
  const ret = typeof(arg0) === 'bigint';
740
840
  return ret;
741
841
  },
742
- __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
842
+ __wbg___wbindgen_is_function_49868bde5eb1e745: function(arg0) {
743
843
  const ret = typeof(arg0) === 'function';
744
844
  return ret;
745
845
  },
746
- __wbg___wbindgen_is_null_0b605fc6b167c56f: function(arg0) {
846
+ __wbg___wbindgen_is_null_344c8750a8525473: function(arg0) {
747
847
  const ret = arg0 === null;
748
848
  return ret;
749
849
  },
750
- __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
850
+ __wbg___wbindgen_is_object_40c5a80572e8f9d3: function(arg0) {
751
851
  const val = arg0;
752
852
  const ret = typeof(val) === 'object' && val !== null;
753
853
  return ret;
754
854
  },
755
- __wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
855
+ __wbg___wbindgen_is_string_b29b5c5a8065ba1a: function(arg0) {
756
856
  const ret = typeof(arg0) === 'string';
757
857
  return ret;
758
858
  },
759
- __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
859
+ __wbg___wbindgen_is_undefined_c0cca72b82b86f4d: function(arg0) {
760
860
  const ret = arg0 === undefined;
761
861
  return ret;
762
862
  },
763
- __wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
863
+ __wbg___wbindgen_jsval_eq_7d430e744a913d26: function(arg0, arg1) {
764
864
  const ret = arg0 === arg1;
765
865
  return ret;
766
866
  },
767
- __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
867
+ __wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944: function(arg0, arg1) {
768
868
  const ret = arg0 == arg1;
769
869
  return ret;
770
870
  },
771
- __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
871
+ __wbg___wbindgen_number_get_7579aab02a8a620c: function(arg0, arg1) {
772
872
  const obj = arg1;
773
873
  const ret = typeof(obj) === 'number' ? obj : undefined;
774
874
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
775
875
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
776
876
  },
777
- __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
877
+ __wbg___wbindgen_string_get_914df97fcfa788f2: function(arg0, arg1) {
778
878
  const obj = arg1;
779
879
  const ret = typeof(obj) === 'string' ? obj : undefined;
780
880
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -782,42 +882,42 @@ function __wbg_get_imports() {
782
882
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
783
883
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
784
884
  },
785
- __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
885
+ __wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
786
886
  throw new Error(getStringFromWasm0(arg0, arg1));
787
887
  },
788
- __wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
888
+ __wbg__wbg_cb_unref_3c3b4f651835fbcb: function(arg0) {
789
889
  arg0._wbg_cb_unref();
790
890
  },
791
- __wbg_abort_5ef96933660780b7: function(arg0) {
891
+ __wbg_abort_5ee4083ce26e0b01: function(arg0) {
792
892
  arg0.abort();
793
893
  },
794
- __wbg_abort_6479c2d794ebf2ee: function(arg0, arg1) {
894
+ __wbg_abort_7a67cb8f9383baa1: function(arg0, arg1) {
795
895
  arg0.abort(arg1);
796
896
  },
797
- __wbg_append_608dfb635ee8998f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
897
+ __wbg_append_c015600138ae60bb: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
798
898
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
799
899
  }, arguments); },
800
- __wbg_arrayBuffer_eb8e9ca620af2a19: function() { return handleError(function (arg0) {
900
+ __wbg_arrayBuffer_dae084a298aa5fe0: function() { return handleError(function (arg0) {
801
901
  const ret = arg0.arrayBuffer();
802
902
  return ret;
803
903
  }, arguments); },
804
- __wbg_buffer_60b8043cd926067d: function(arg0) {
904
+ __wbg_buffer_a77cc90da4bdb503: function(arg0) {
805
905
  const ret = arg0.buffer;
806
906
  return ret;
807
907
  },
808
- __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
809
- const ret = arg0.call(arg1, arg2);
810
- return ret;
811
- }, arguments); },
812
- __wbg_call_dcc2662fa17a72cf: function() { return handleError(function (arg0, arg1, arg2, arg3) {
908
+ __wbg_call_368fa9c372d473ba: function() { return handleError(function (arg0, arg1, arg2, arg3) {
813
909
  const ret = arg0.call(arg1, arg2, arg3);
814
910
  return ret;
815
911
  }, arguments); },
816
- __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
912
+ __wbg_call_7f2987183bb62793: function() { return handleError(function (arg0, arg1) {
817
913
  const ret = arg0.call(arg1);
818
914
  return ret;
819
915
  }, arguments); },
820
- __wbg_call_f858478a02f9600f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
916
+ __wbg_call_d578befcc3145dee: function() { return handleError(function (arg0, arg1, arg2) {
917
+ const ret = arg0.call(arg1, arg2);
918
+ return ret;
919
+ }, arguments); },
920
+ __wbg_call_f2ac1622600b957f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
821
921
  const ret = arg0.call(arg1, arg2, arg3, arg4);
822
922
  return ret;
823
923
  }, arguments); },
@@ -825,34 +925,34 @@ function __wbg_get_imports() {
825
925
  const ret = clearTimeout(arg0);
826
926
  return ret;
827
927
  },
828
- __wbg_contains_ef4bfb7fa5a241b7: function(arg0, arg1, arg2) {
928
+ __wbg_contains_04f0b15b3b6b3f6f: function(arg0, arg1, arg2) {
829
929
  const ret = arg0.contains(getStringFromWasm0(arg1, arg2));
830
930
  return ret;
831
931
  },
832
- __wbg_createObjectStore_92a8aebcc6f9d7e3: function() { return handleError(function (arg0, arg1, arg2) {
932
+ __wbg_createObjectStore_11c03f9eac3c3672: function() { return handleError(function (arg0, arg1, arg2) {
833
933
  const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2));
834
934
  return ret;
835
935
  }, arguments); },
836
- __wbg_debug_4b9b1a2d5972be57: function(arg0) {
936
+ __wbg_debug_50e24f25b064ded1: function(arg0) {
837
937
  console.debug(arg0);
838
938
  },
839
- __wbg_delete_40db93c05c546fb9: function() { return handleError(function (arg0, arg1) {
939
+ __wbg_delete_fc24bd7dfa57938e: function() { return handleError(function (arg0, arg1) {
840
940
  const ret = arg0.delete(arg1);
841
941
  return ret;
842
942
  }, arguments); },
843
- __wbg_done_08ce71ee07e3bd17: function(arg0) {
943
+ __wbg_done_547d467e97529006: function(arg0) {
844
944
  const ret = arg0.done;
845
945
  return ret;
846
946
  },
847
- __wbg_entries_5b8fe91cea59610e: function(arg0) {
848
- const ret = arg0.entries();
947
+ __wbg_entries_616b1a459b85be0b: function(arg0) {
948
+ const ret = Object.entries(arg0);
849
949
  return ret;
850
950
  },
851
- __wbg_entries_e8a20ff8c9757101: function(arg0) {
852
- const ret = Object.entries(arg0);
951
+ __wbg_entries_69f235654ec4ccc6: function(arg0) {
952
+ const ret = arg0.entries();
853
953
  return ret;
854
954
  },
855
- __wbg_error_8d9a8e04cd1d3588: function(arg0) {
955
+ __wbg_error_38bec0a78dd8ded8: function(arg0) {
856
956
  console.error(arg0);
857
957
  },
858
958
  __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
@@ -866,57 +966,61 @@ function __wbg_get_imports() {
866
966
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
867
967
  }
868
968
  },
869
- __wbg_fetch_43b2f110608a59ff: function(arg0) {
870
- const ret = fetch(arg0);
969
+ __wbg_fetch_0e70fe3bd20ee8c4: function(arg0, arg1) {
970
+ const ret = arg0.fetch(arg1);
871
971
  return ret;
872
972
  },
873
- __wbg_fetch_5550a88cf343aaa9: function(arg0, arg1) {
973
+ __wbg_fetch_1a731e18c5e21884: function(arg0, arg1) {
874
974
  const ret = arg0.fetch(arg1);
875
975
  return ret;
876
976
  },
877
- __wbg_fetch_f8a611684c3b5fe5: function(arg0, arg1) {
878
- const ret = arg0.fetch(arg1);
977
+ __wbg_fetch_43b2f110608a59ff: function(arg0) {
978
+ const ret = fetch(arg0);
879
979
  return ret;
880
980
  },
881
981
  __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
882
982
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
883
983
  }, arguments); },
884
- __wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
885
- const ret = Reflect.get(arg0, arg1);
984
+ __wbg_get_4848e350b40afc16: function(arg0, arg1) {
985
+ const ret = arg0[arg1 >>> 0];
986
+ return ret;
987
+ },
988
+ __wbg_get_560cb483e5c0133e: function() { return handleError(function (arg0, arg1) {
989
+ const ret = arg0.get(arg1);
886
990
  return ret;
887
991
  }, arguments); },
888
- __wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
992
+ __wbg_get_ed0642c4b9d31ddf: function() { return handleError(function (arg0, arg1) {
889
993
  const ret = Reflect.get(arg0, arg1);
890
994
  return ret;
891
995
  }, arguments); },
892
- __wbg_get_6ac8c8119f577720: function() { return handleError(function (arg0, arg1) {
893
- const ret = arg0.get(arg1);
996
+ __wbg_get_f96702c6245e4ef9: function() { return handleError(function (arg0, arg1) {
997
+ const ret = Reflect.get(arg0, arg1);
894
998
  return ret;
895
999
  }, arguments); },
896
- __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
1000
+ __wbg_get_unchecked_7d7babe32e9e6a54: function(arg0, arg1) {
897
1001
  const ret = arg0[arg1 >>> 0];
898
1002
  return ret;
899
1003
  },
900
- __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
901
- const ret = arg0[arg1 >>> 0];
1004
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
1005
+ const ret = arg0[arg1];
902
1006
  return ret;
903
1007
  },
904
- __wbg_has_926ef2ff40b308cf: function() { return handleError(function (arg0, arg1) {
1008
+ __wbg_has_3ec5c22db2e5237a: function() { return handleError(function (arg0, arg1) {
905
1009
  const ret = Reflect.has(arg0, arg1);
906
1010
  return ret;
907
1011
  }, arguments); },
908
- __wbg_headers_eb2234545f9ff993: function(arg0) {
1012
+ __wbg_headers_e08dcb5aa09b9a63: function(arg0) {
909
1013
  const ret = arg0.headers;
910
1014
  return ret;
911
1015
  },
912
- __wbg_indexedDB_c83feb7151bbde52: function() { return handleError(function (arg0) {
1016
+ __wbg_indexedDB_af74cb6df65fa636: function() { return handleError(function (arg0) {
913
1017
  const ret = arg0.indexedDB;
914
1018
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
915
1019
  }, arguments); },
916
- __wbg_info_7d4e223bb1a7e671: function(arg0) {
1020
+ __wbg_info_4e3339024d0fb613: function(arg0) {
917
1021
  console.info(arg0);
918
1022
  },
919
- __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
1023
+ __wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a: function(arg0) {
920
1024
  let result;
921
1025
  try {
922
1026
  result = arg0 instanceof ArrayBuffer;
@@ -926,7 +1030,7 @@ function __wbg_get_imports() {
926
1030
  const ret = result;
927
1031
  return ret;
928
1032
  },
929
- __wbg_instanceof_IdbDatabase_5f436cc89cc07f14: function(arg0) {
1033
+ __wbg_instanceof_IdbDatabase_0af111edb4be95f4: function(arg0) {
930
1034
  let result;
931
1035
  try {
932
1036
  result = arg0 instanceof IDBDatabase;
@@ -936,7 +1040,7 @@ function __wbg_get_imports() {
936
1040
  const ret = result;
937
1041
  return ret;
938
1042
  },
939
- __wbg_instanceof_IdbOpenDbRequest_10c2576001eb6613: function(arg0) {
1043
+ __wbg_instanceof_IdbOpenDbRequest_92df356941adf31e: function(arg0) {
940
1044
  let result;
941
1045
  try {
942
1046
  result = arg0 instanceof IDBOpenDBRequest;
@@ -946,7 +1050,7 @@ function __wbg_get_imports() {
946
1050
  const ret = result;
947
1051
  return ret;
948
1052
  },
949
- __wbg_instanceof_IdbRequest_6a0e24572d4f1d46: function(arg0) {
1053
+ __wbg_instanceof_IdbRequest_fc5918c726448f04: function(arg0) {
950
1054
  let result;
951
1055
  try {
952
1056
  result = arg0 instanceof IDBRequest;
@@ -956,7 +1060,7 @@ function __wbg_get_imports() {
956
1060
  const ret = result;
957
1061
  return ret;
958
1062
  },
959
- __wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
1063
+ __wbg_instanceof_Map_a10a2795ef4bfe97: function(arg0) {
960
1064
  let result;
961
1065
  try {
962
1066
  result = arg0 instanceof Map;
@@ -966,7 +1070,7 @@ function __wbg_get_imports() {
966
1070
  const ret = result;
967
1071
  return ret;
968
1072
  },
969
- __wbg_instanceof_Response_9b4d9fd451e051b1: function(arg0) {
1073
+ __wbg_instanceof_Response_06795eab66cc4036: function(arg0) {
970
1074
  let result;
971
1075
  try {
972
1076
  result = arg0 instanceof Response;
@@ -976,7 +1080,7 @@ function __wbg_get_imports() {
976
1080
  const ret = result;
977
1081
  return ret;
978
1082
  },
979
- __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
1083
+ __wbg_instanceof_Uint8Array_4b8da683deb25d72: function(arg0) {
980
1084
  let result;
981
1085
  try {
982
1086
  result = arg0 instanceof Uint8Array;
@@ -986,7 +1090,7 @@ function __wbg_get_imports() {
986
1090
  const ret = result;
987
1091
  return ret;
988
1092
  },
989
- __wbg_instanceof_Window_23e677d2c6843922: function(arg0) {
1093
+ __wbg_instanceof_Window_c0fee4c064502536: function(arg0) {
990
1094
  let result;
991
1095
  try {
992
1096
  result = arg0 instanceof Window;
@@ -996,23 +1100,23 @@ function __wbg_get_imports() {
996
1100
  const ret = result;
997
1101
  return ret;
998
1102
  },
999
- __wbg_isArray_33b91feb269ff46e: function(arg0) {
1103
+ __wbg_isArray_db61795ad004c139: function(arg0) {
1000
1104
  const ret = Array.isArray(arg0);
1001
1105
  return ret;
1002
1106
  },
1003
- __wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
1107
+ __wbg_isSafeInteger_ea83862ba994770c: function(arg0) {
1004
1108
  const ret = Number.isSafeInteger(arg0);
1005
1109
  return ret;
1006
1110
  },
1007
- __wbg_iterator_d8f549ec8fb061b1: function() {
1111
+ __wbg_iterator_de403ef31815a3e6: function() {
1008
1112
  const ret = Symbol.iterator;
1009
1113
  return ret;
1010
1114
  },
1011
- __wbg_length_b3416cf66a5452c8: function(arg0) {
1115
+ __wbg_length_0c32cb8543c8e4c8: function(arg0) {
1012
1116
  const ret = arg0.length;
1013
1117
  return ret;
1014
1118
  },
1015
- __wbg_length_ea16607d7b61445b: function(arg0) {
1119
+ __wbg_length_6e821edde497a532: function(arg0) {
1016
1120
  const ret = arg0.length;
1017
1121
  return ret;
1018
1122
  },
@@ -1020,49 +1124,49 @@ function __wbg_get_imports() {
1020
1124
  const ret = LocalIndex.__wrap(arg0);
1021
1125
  return ret;
1022
1126
  },
1023
- __wbg_log_524eedafa26daa59: function(arg0) {
1127
+ __wbg_log_4c0baeb8af2f8f89: function(arg0) {
1024
1128
  console.log(arg0);
1025
1129
  },
1026
- __wbg_new_0837727332ac86ba: function() { return handleError(function () {
1130
+ __wbg_new_227d7c05414eb861: function() {
1131
+ const ret = new Error();
1132
+ return ret;
1133
+ },
1134
+ __wbg_new_3a112826a89cb962: function() { return handleError(function () {
1027
1135
  const ret = new Headers();
1028
1136
  return ret;
1029
1137
  }, arguments); },
1030
- __wbg_new_227d7c05414eb861: function() {
1031
- const ret = new Error();
1138
+ __wbg_new_4f9fafbb3909af72: function() {
1139
+ const ret = new Object();
1032
1140
  return ret;
1033
1141
  },
1034
- __wbg_new_49d5571bd3f0c4d4: function() {
1142
+ __wbg_new_99cabae501c0a8a0: function() {
1035
1143
  const ret = new Map();
1036
1144
  return ret;
1037
1145
  },
1038
- __wbg_new_5f486cdf45a04d78: function(arg0) {
1146
+ __wbg_new_9abbf7148481485e: function() { return handleError(function () {
1147
+ const ret = new AbortController();
1148
+ return ret;
1149
+ }, arguments); },
1150
+ __wbg_new_a560378ea1240b14: function(arg0) {
1039
1151
  const ret = new Uint8Array(arg0);
1040
1152
  return ret;
1041
1153
  },
1042
- __wbg_new_a70fbab9066b301f: function() {
1154
+ __wbg_new_f3c9df4f38f3f798: function() {
1043
1155
  const ret = new Array();
1044
1156
  return ret;
1045
1157
  },
1046
- __wbg_new_ab79df5bd7c26067: function() {
1047
- const ret = new Object();
1048
- return ret;
1049
- },
1050
- __wbg_new_c518c60af666645b: function() { return handleError(function () {
1051
- const ret = new AbortController();
1052
- return ret;
1053
- }, arguments); },
1054
- __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
1158
+ __wbg_new_from_slice_2580ff33d0d10520: function(arg0, arg1) {
1055
1159
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1056
1160
  return ret;
1057
1161
  },
1058
- __wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
1162
+ __wbg_new_typed_14d7cc391ce53d2c: function(arg0, arg1) {
1059
1163
  try {
1060
1164
  var state0 = {a: arg0, b: arg1};
1061
1165
  var cb0 = (arg0, arg1) => {
1062
1166
  const a = state0.a;
1063
1167
  state0.a = 0;
1064
1168
  try {
1065
- return wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1169
+ return wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1066
1170
  } finally {
1067
1171
  state0.a = a;
1068
1172
  }
@@ -1070,64 +1174,64 @@ function __wbg_get_imports() {
1070
1174
  const ret = new Promise(cb0);
1071
1175
  return ret;
1072
1176
  } finally {
1073
- state0.a = state0.b = 0;
1177
+ state0.a = 0;
1074
1178
  }
1075
1179
  },
1076
- __wbg_new_with_str_and_init_b4b54d1a819bc724: function() { return handleError(function (arg0, arg1, arg2) {
1180
+ __wbg_new_with_str_and_init_f663b6d334baa878: function() { return handleError(function (arg0, arg1, arg2) {
1077
1181
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1078
1182
  return ret;
1079
1183
  }, arguments); },
1080
- __wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
1081
- const ret = arg0.next();
1082
- return ret;
1083
- }, arguments); },
1084
- __wbg_next_e01a967809d1aa68: function(arg0) {
1184
+ __wbg_next_01132ed6134b8ef5: function(arg0) {
1085
1185
  const ret = arg0.next;
1086
1186
  return ret;
1087
1187
  },
1088
- __wbg_now_c6d7a7d35f74f6f1: function(arg0) {
1188
+ __wbg_next_b3713ec761a9dbfd: function() { return handleError(function (arg0) {
1189
+ const ret = arg0.next();
1190
+ return ret;
1191
+ }, arguments); },
1192
+ __wbg_now_2c44418ca0623664: function(arg0) {
1089
1193
  const ret = arg0.now();
1090
1194
  return ret;
1091
1195
  },
1092
- __wbg_objectStoreNames_564985d2e9ae7523: function(arg0) {
1196
+ __wbg_objectStoreNames_990d8e55c661828b: function(arg0) {
1093
1197
  const ret = arg0.objectStoreNames;
1094
1198
  return ret;
1095
1199
  },
1096
- __wbg_objectStore_f314ab152a5c7bd0: function() { return handleError(function (arg0, arg1, arg2) {
1200
+ __wbg_objectStore_3d4cade4416cd432: function() { return handleError(function (arg0, arg1, arg2) {
1097
1201
  const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));
1098
1202
  return ret;
1099
1203
  }, arguments); },
1100
- __wbg_ok_7ec8b94facac7704: function(arg0) {
1204
+ __wbg_ok_36f7b13b74596c24: function(arg0) {
1101
1205
  const ret = arg0.ok;
1102
1206
  return ret;
1103
1207
  },
1104
- __wbg_open_e7a9d3d6344572f6: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1208
+ __wbg_open_ac04ec9d75d0eeaf: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1105
1209
  const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
1106
1210
  return ret;
1107
1211
  }, arguments); },
1108
- __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
1212
+ __wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {
1109
1213
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1110
1214
  },
1111
- __wbg_push_e87b0e732085a946: function(arg0, arg1) {
1215
+ __wbg_push_6bdbc990be5ac37b: function(arg0, arg1) {
1112
1216
  const ret = arg0.push(arg1);
1113
1217
  return ret;
1114
1218
  },
1115
- __wbg_put_f1673d719f93ce22: function() { return handleError(function (arg0, arg1, arg2) {
1219
+ __wbg_put_4485a4012273f7ef: function() { return handleError(function (arg0, arg1, arg2) {
1116
1220
  const ret = arg0.put(arg1, arg2);
1117
1221
  return ret;
1118
1222
  }, arguments); },
1119
- __wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
1223
+ __wbg_queueMicrotask_abaf92f0bd4e80a4: function(arg0) {
1120
1224
  const ret = arg0.queueMicrotask;
1121
1225
  return ret;
1122
1226
  },
1123
- __wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
1227
+ __wbg_queueMicrotask_df5a6dac26d818f3: function(arg0) {
1124
1228
  queueMicrotask(arg0);
1125
1229
  },
1126
- __wbg_resolve_ae8d83246e5bcc12: function(arg0) {
1230
+ __wbg_resolve_0a79de24e9d2267b: function(arg0) {
1127
1231
  const ret = Promise.resolve(arg0);
1128
1232
  return ret;
1129
1233
  },
1130
- __wbg_result_c5baa2d3d690a01a: function() { return handleError(function (arg0) {
1234
+ __wbg_result_452c1006fc727317: function() { return handleError(function (arg0) {
1131
1235
  const ret = arg0.result;
1132
1236
  return ret;
1133
1237
  }, arguments); },
@@ -1135,50 +1239,50 @@ function __wbg_get_imports() {
1135
1239
  const ret = setTimeout(arg0, arg1);
1136
1240
  return ret;
1137
1241
  },
1138
- __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
1139
- arg0[arg1 >>> 0] = arg2;
1242
+ __wbg_set_08463b1df38a7e29: function(arg0, arg1, arg2) {
1243
+ const ret = arg0.set(arg1, arg2);
1244
+ return ret;
1140
1245
  },
1141
1246
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
1142
1247
  arg0[arg1] = arg2;
1143
1248
  },
1144
- __wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
1145
- const ret = arg0.set(arg1, arg2);
1146
- return ret;
1249
+ __wbg_set_6c60b2e8ad0e9383: function(arg0, arg1, arg2) {
1250
+ arg0[arg1 >>> 0] = arg2;
1147
1251
  },
1148
- __wbg_set_body_a3d856b097dfda04: function(arg0, arg1) {
1252
+ __wbg_set_body_a304d09cb50cefbe: function(arg0, arg1) {
1149
1253
  arg0.body = arg1;
1150
1254
  },
1151
- __wbg_set_cache_ec7e430c6056ebda: function(arg0, arg1) {
1255
+ __wbg_set_cache_cc687e2b96e9608c: function(arg0, arg1) {
1152
1256
  arg0.cache = __wbindgen_enum_RequestCache[arg1];
1153
1257
  },
1154
- __wbg_set_credentials_ed63183445882c65: function(arg0, arg1) {
1258
+ __wbg_set_credentials_7693e63055f5e838: function(arg0, arg1) {
1155
1259
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1156
1260
  },
1157
- __wbg_set_headers_3c8fecc693b75327: function(arg0, arg1) {
1261
+ __wbg_set_headers_6ab1105e542834e2: function(arg0, arg1) {
1158
1262
  arg0.headers = arg1;
1159
1263
  },
1160
- __wbg_set_method_8c015e8bcafd7be1: function(arg0, arg1, arg2) {
1264
+ __wbg_set_method_1971272fe557e972: function(arg0, arg1, arg2) {
1161
1265
  arg0.method = getStringFromWasm0(arg1, arg2);
1162
1266
  },
1163
- __wbg_set_mode_5a87f2c809cf37c2: function(arg0, arg1) {
1267
+ __wbg_set_mode_d1b643087602281a: function(arg0, arg1) {
1164
1268
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
1165
1269
  },
1166
- __wbg_set_oncomplete_f31e6dc6d16c1ff8: function(arg0, arg1) {
1270
+ __wbg_set_oncomplete_20fb27150b4ee0d4: function(arg0, arg1) {
1167
1271
  arg0.oncomplete = arg1;
1168
1272
  },
1169
- __wbg_set_onerror_8a268cb237177bba: function(arg0, arg1) {
1273
+ __wbg_set_onerror_2b7dfa4e6dea4159: function(arg0, arg1) {
1170
1274
  arg0.onerror = arg1;
1171
1275
  },
1172
- __wbg_set_onsuccess_fca94ded107b64af: function(arg0, arg1) {
1276
+ __wbg_set_onsuccess_f7e5b5cbed5008b1: function(arg0, arg1) {
1173
1277
  arg0.onsuccess = arg1;
1174
1278
  },
1175
- __wbg_set_onupgradeneeded_860ce42184f987e7: function(arg0, arg1) {
1279
+ __wbg_set_onupgradeneeded_d7e8e03a1999bf5d: function(arg0, arg1) {
1176
1280
  arg0.onupgradeneeded = arg1;
1177
1281
  },
1178
- __wbg_set_signal_0cebecb698f25d21: function(arg0, arg1) {
1282
+ __wbg_set_signal_8564a226c5c6853c: function(arg0, arg1) {
1179
1283
  arg0.signal = arg1;
1180
1284
  },
1181
- __wbg_signal_166e1da31adcac18: function(arg0) {
1285
+ __wbg_signal_9172c3282bfba2f5: function(arg0) {
1182
1286
  const ret = arg0.signal;
1183
1287
  return ret;
1184
1288
  },
@@ -1189,78 +1293,78 @@ function __wbg_get_imports() {
1189
1293
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1190
1294
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1191
1295
  },
1192
- __wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
1193
- const ret = typeof global === 'undefined' ? null : global;
1296
+ __wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f: function() {
1297
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1194
1298
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1195
1299
  },
1196
- __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
1197
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1300
+ __wbg_static_accessor_GLOBAL_f2e0f995a21329ff: function() {
1301
+ const ret = typeof global === 'undefined' ? null : global;
1198
1302
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1199
1303
  },
1200
- __wbg_static_accessor_SELF_f207c857566db248: function() {
1304
+ __wbg_static_accessor_SELF_24f78b6d23f286ea: function() {
1201
1305
  const ret = typeof self === 'undefined' ? null : self;
1202
1306
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1203
1307
  },
1204
- __wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
1308
+ __wbg_static_accessor_WINDOW_59fd959c540fe405: function() {
1205
1309
  const ret = typeof window === 'undefined' ? null : window;
1206
1310
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1207
1311
  },
1208
- __wbg_status_318629ab93a22955: function(arg0) {
1312
+ __wbg_status_44ecb0ac1da253f4: function(arg0) {
1209
1313
  const ret = arg0.status;
1210
1314
  return ret;
1211
1315
  },
1212
- __wbg_target_7bc90f314634b37b: function(arg0) {
1316
+ __wbg_target_732d56b173b7e87c: function(arg0) {
1213
1317
  const ret = arg0.target;
1214
1318
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1215
1319
  },
1216
- __wbg_then_098abe61755d12f6: function(arg0, arg1) {
1217
- const ret = arg0.then(arg1);
1320
+ __wbg_then_00eed3ac0b8e82cb: function(arg0, arg1, arg2) {
1321
+ const ret = arg0.then(arg1, arg2);
1218
1322
  return ret;
1219
1323
  },
1220
- __wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
1221
- const ret = arg0.then(arg1, arg2);
1324
+ __wbg_then_a0c8db0381c8994c: function(arg0, arg1) {
1325
+ const ret = arg0.then(arg1);
1222
1326
  return ret;
1223
1327
  },
1224
- __wbg_transaction_1309b463c399d2b3: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1225
- const ret = arg0.transaction(getStringFromWasm0(arg1, arg2), __wbindgen_enum_IdbTransactionMode[arg3]);
1328
+ __wbg_transaction_16a3adcdaf3724fd: function() { return handleError(function (arg0, arg1, arg2) {
1329
+ const ret = arg0.transaction(getStringFromWasm0(arg1, arg2));
1226
1330
  return ret;
1227
1331
  }, arguments); },
1228
- __wbg_transaction_2237af0233efbdf3: function() { return handleError(function (arg0, arg1, arg2) {
1229
- const ret = arg0.transaction(getStringFromWasm0(arg1, arg2));
1332
+ __wbg_transaction_f909284bfed41115: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1333
+ const ret = arg0.transaction(getStringFromWasm0(arg1, arg2), __wbindgen_enum_IdbTransactionMode[arg3]);
1230
1334
  return ret;
1231
1335
  }, arguments); },
1232
- __wbg_url_7fefc1820fba4e0c: function(arg0, arg1) {
1336
+ __wbg_url_95d8a83d33709572: function(arg0, arg1) {
1233
1337
  const ret = arg1.url;
1234
1338
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1235
1339
  const len1 = WASM_VECTOR_LEN;
1236
1340
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1237
1341
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1238
1342
  },
1239
- __wbg_value_21fc78aab0322612: function(arg0) {
1343
+ __wbg_value_7f6052747ccf940f: function(arg0) {
1240
1344
  const ret = arg0.value;
1241
1345
  return ret;
1242
1346
  },
1243
- __wbg_warn_69424c2d92a2fa73: function(arg0) {
1347
+ __wbg_warn_2b0a27f629a4bb1e: function(arg0) {
1244
1348
  console.warn(arg0);
1245
1349
  },
1246
1350
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1247
- // Cast intrinsic for `Closure(Closure { dtor_idx: 243, function: Function { arguments: [NamedExternref("Event")], shim_idx: 244, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1248
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_efede8c867e8014b___closure__destroy___dyn_core_5858575f5ab61d4b___ops__function__FnMut__web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent____Output_______, wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_);
1351
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1652, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1352
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___wasm_bindgen_7e519ff5bc59ba8e___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_7e519ff5bc59ba8e___JsError___true_);
1249
1353
  return ret;
1250
1354
  },
1251
1355
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1252
- // Cast intrinsic for `Closure(Closure { dtor_idx: 243, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 244, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1253
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_efede8c867e8014b___closure__destroy___dyn_core_5858575f5ab61d4b___ops__function__FnMut__web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent____Output_______, wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__1);
1356
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 227, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1357
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_);
1254
1358
  return ret;
1255
1359
  },
1256
1360
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1257
- // Cast intrinsic for `Closure(Closure { dtor_idx: 741, function: Function { arguments: [], shim_idx: 742, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1258
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_efede8c867e8014b___closure__destroy___dyn_core_5858575f5ab61d4b___ops__function__FnMut_____Output_______, wasm_bindgen_efede8c867e8014b___convert__closures_____invoke_______true_);
1361
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 227, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1362
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__2);
1259
1363
  return ret;
1260
1364
  },
1261
1365
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
1262
- // Cast intrinsic for `Closure(Closure { dtor_idx: 771, function: Function { arguments: [Externref], shim_idx: 772, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1263
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_efede8c867e8014b___closure__destroy___dyn_core_5858575f5ab61d4b___ops__function__FnMut__wasm_bindgen_efede8c867e8014b___JsValue____Output___core_5858575f5ab61d4b___result__Result_____wasm_bindgen_efede8c867e8014b___JsError___, wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___wasm_bindgen_efede8c867e8014b___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_efede8c867e8014b___JsError___true_);
1366
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 804, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1367
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke_______true_);
1264
1368
  return ret;
1265
1369
  },
1266
1370
  __wbindgen_cast_0000000000000005: function(arg0) {
@@ -1299,27 +1403,27 @@ function __wbg_get_imports() {
1299
1403
  };
1300
1404
  }
1301
1405
 
1302
- function wasm_bindgen_efede8c867e8014b___convert__closures_____invoke_______true_(arg0, arg1) {
1303
- wasm.wasm_bindgen_efede8c867e8014b___convert__closures_____invoke_______true_(arg0, arg1);
1406
+ function wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke_______true_(arg0, arg1) {
1407
+ wasm.wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke_______true_(arg0, arg1);
1304
1408
  }
1305
1409
 
1306
- function wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_(arg0, arg1, arg2) {
1307
- wasm.wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_(arg0, arg1, arg2);
1410
+ function wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_(arg0, arg1, arg2) {
1411
+ wasm.wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true_(arg0, arg1, arg2);
1308
1412
  }
1309
1413
 
1310
- function wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__1(arg0, arg1, arg2) {
1311
- wasm.wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___web_sys_108d82c43c7519e2___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__1(arg0, arg1, arg2);
1414
+ function wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__2(arg0, arg1, arg2) {
1415
+ wasm.wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___web_sys_653f9c5ad68810ef___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent______true__2(arg0, arg1, arg2);
1312
1416
  }
1313
1417
 
1314
- function wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___wasm_bindgen_efede8c867e8014b___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_efede8c867e8014b___JsError___true_(arg0, arg1, arg2) {
1315
- const ret = wasm.wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___wasm_bindgen_efede8c867e8014b___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_efede8c867e8014b___JsError___true_(arg0, arg1, arg2);
1418
+ function wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___wasm_bindgen_7e519ff5bc59ba8e___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_7e519ff5bc59ba8e___JsError___true_(arg0, arg1, arg2) {
1419
+ const ret = wasm.wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___wasm_bindgen_7e519ff5bc59ba8e___JsValue__core_5858575f5ab61d4b___result__Result_____wasm_bindgen_7e519ff5bc59ba8e___JsError___true_(arg0, arg1, arg2);
1316
1420
  if (ret[1]) {
1317
1421
  throw takeFromExternrefTable0(ret[0]);
1318
1422
  }
1319
1423
  }
1320
1424
 
1321
- function wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1322
- wasm.wasm_bindgen_efede8c867e8014b___convert__closures_____invoke___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined___js_sys_855885ac49497d5a___Function_fn_wasm_bindgen_efede8c867e8014b___JsValue_____wasm_bindgen_efede8c867e8014b___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1425
+ function wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1426
+ wasm.wasm_bindgen_7e519ff5bc59ba8e___convert__closures_____invoke___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined___js_sys_f1382650b4d99aec___Function_fn_wasm_bindgen_7e519ff5bc59ba8e___JsValue_____wasm_bindgen_7e519ff5bc59ba8e___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1323
1427
  }
1324
1428
 
1325
1429
 
@@ -1354,7 +1458,7 @@ function addToExternrefTable0(obj) {
1354
1458
 
1355
1459
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1356
1460
  ? { register: () => {}, unregister: () => {} }
1357
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
1461
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
1358
1462
 
1359
1463
  function debugString(val) {
1360
1464
  // primitive types
@@ -1460,8 +1564,8 @@ function isLikeNone(x) {
1460
1564
  return x === undefined || x === null;
1461
1565
  }
1462
1566
 
1463
- function makeMutClosure(arg0, arg1, dtor, f) {
1464
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
1567
+ function makeMutClosure(arg0, arg1, f) {
1568
+ const state = { a: arg0, b: arg1, cnt: 1 };
1465
1569
  const real = (...args) => {
1466
1570
 
1467
1571
  // First up with a closure we increment the internal reference
@@ -1479,7 +1583,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
1479
1583
  };
1480
1584
  real._wbg_cb_unref = () => {
1481
1585
  if (--state.cnt === 0) {
1482
- state.dtor(state.a, state.b);
1586
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1483
1587
  state.a = 0;
1484
1588
  CLOSURE_DTORS.unregister(state);
1485
1589
  }
@@ -1495,6 +1599,16 @@ function passArray8ToWasm0(arg, malloc) {
1495
1599
  return ptr;
1496
1600
  }
1497
1601
 
1602
+ function passArrayJsValueToWasm0(array, malloc) {
1603
+ const ptr = malloc(array.length * 4, 4) >>> 0;
1604
+ for (let i = 0; i < array.length; i++) {
1605
+ const add = addToExternrefTable0(array[i]);
1606
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
1607
+ }
1608
+ WASM_VECTOR_LEN = array.length;
1609
+ return ptr;
1610
+ }
1611
+
1498
1612
  function passStringToWasm0(arg, malloc, realloc) {
1499
1613
  if (realloc === undefined) {
1500
1614
  const buf = cachedTextEncoder.encode(arg);
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "izihawa"
6
6
  ],
7
7
  "description": "WASM bindings for Hermes search engine",
8
- "version": "1.8.31",
8
+ "version": "1.8.33",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",