@trust0/ridb-core 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/ridb_core.js CHANGED
@@ -20,15 +20,6 @@ function takeObject(idx) {
20
20
  return ret;
21
21
  }
22
22
 
23
- function addHeapObject(obj) {
24
- if (heap_next === heap.length) heap.push(heap.length + 1);
25
- const idx = heap_next;
26
- heap_next = heap[idx];
27
-
28
- heap[idx] = obj;
29
- return idx;
30
- }
31
-
32
23
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
33
24
 
34
25
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -47,6 +38,15 @@ function getStringFromWasm0(ptr, len) {
47
38
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
48
39
  }
49
40
 
41
+ function addHeapObject(obj) {
42
+ if (heap_next === heap.length) heap.push(heap.length + 1);
43
+ const idx = heap_next;
44
+ heap_next = heap[idx];
45
+
46
+ heap[idx] = obj;
47
+ return idx;
48
+ }
49
+
50
50
  let WASM_VECTOR_LEN = 0;
51
51
 
52
52
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -205,20 +205,23 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
205
205
  wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
206
206
  });
207
207
 
208
- function makeClosure(arg0, arg1, dtor, f) {
208
+ function makeMutClosure(arg0, arg1, dtor, f) {
209
209
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
210
210
  const real = (...args) => {
211
211
  // First up with a closure we increment the internal reference
212
212
  // count. This ensures that the Rust closure environment won't
213
213
  // be deallocated while we're invoking it.
214
214
  state.cnt++;
215
+ const a = state.a;
216
+ state.a = 0;
215
217
  try {
216
- return f(state.a, state.b, ...args);
218
+ return f(a, state.b, ...args);
217
219
  } finally {
218
220
  if (--state.cnt === 0) {
219
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
220
- state.a = 0;
221
+ wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
221
222
  CLOSURE_DTORS.unregister(state);
223
+ } else {
224
+ state.a = a;
222
225
  }
223
226
  }
224
227
  };
@@ -226,39 +229,24 @@ function makeClosure(arg0, arg1, dtor, f) {
226
229
  CLOSURE_DTORS.register(real, state, state);
227
230
  return real;
228
231
  }
229
- function __wbg_adapter_56(arg0, arg1, arg2, arg3, arg4) {
230
- try {
231
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
232
- wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb43f4ea73c3b7f8b(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
233
- var r0 = getInt32Memory0()[retptr / 4 + 0];
234
- var r1 = getInt32Memory0()[retptr / 4 + 1];
235
- var r2 = getInt32Memory0()[retptr / 4 + 2];
236
- if (r2) {
237
- throw takeObject(r1);
238
- }
239
- return takeObject(r0);
240
- } finally {
241
- wasm.__wbindgen_add_to_stack_pointer(16);
242
- }
232
+ function __wbg_adapter_56(arg0, arg1, arg2) {
233
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0b4dc78d20138ec8(arg0, arg1, addHeapObject(arg2));
243
234
  }
244
235
 
245
- function makeMutClosure(arg0, arg1, dtor, f) {
236
+ function makeClosure(arg0, arg1, dtor, f) {
246
237
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
247
238
  const real = (...args) => {
248
239
  // First up with a closure we increment the internal reference
249
240
  // count. This ensures that the Rust closure environment won't
250
241
  // be deallocated while we're invoking it.
251
242
  state.cnt++;
252
- const a = state.a;
253
- state.a = 0;
254
243
  try {
255
- return f(a, state.b, ...args);
244
+ return f(state.a, state.b, ...args);
256
245
  } finally {
257
246
  if (--state.cnt === 0) {
258
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
247
+ wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
248
+ state.a = 0;
259
249
  CLOSURE_DTORS.unregister(state);
260
- } else {
261
- state.a = a;
262
250
  }
263
251
  }
264
252
  };
@@ -266,12 +254,24 @@ function makeMutClosure(arg0, arg1, dtor, f) {
266
254
  CLOSURE_DTORS.register(real, state, state);
267
255
  return real;
268
256
  }
269
- function __wbg_adapter_59(arg0, arg1, arg2) {
270
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h57c5f273361b47b1(arg0, arg1, addHeapObject(arg2));
257
+ function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
258
+ try {
259
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
260
+ wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdcf54b3c6e50bf47(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
261
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
262
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
263
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
264
+ if (r2) {
265
+ throw takeObject(r1);
266
+ }
267
+ return takeObject(r0);
268
+ } finally {
269
+ wasm.__wbindgen_add_to_stack_pointer(16);
270
+ }
271
271
  }
272
272
 
273
- function __wbg_adapter_64(arg0, arg1, arg2) {
274
- const ret = wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb3063b9244661be(arg0, arg1, addHeapObject(arg2));
273
+ function __wbg_adapter_62(arg0, arg1, arg2) {
274
+ const ret = wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9ad206a193337a57(arg0, arg1, addHeapObject(arg2));
275
275
  return takeObject(ret);
276
276
  }
277
277
 
@@ -314,14 +314,6 @@ function addBorrowedObject(obj) {
314
314
  return stack_pointer;
315
315
  }
316
316
 
317
- function handleError(f, args) {
318
- try {
319
- return f.apply(this, args);
320
- } catch (e) {
321
- wasm.__wbindgen_exn_store(addHeapObject(e));
322
- }
323
- }
324
-
325
317
  function passArrayJsValueToWasm0(array, malloc) {
326
318
  const ptr = malloc(array.length * 4, 4) >>> 0;
327
319
  const mem = getUint32Memory0();
@@ -331,6 +323,14 @@ function passArrayJsValueToWasm0(array, malloc) {
331
323
  WASM_VECTOR_LEN = array.length;
332
324
  return ptr;
333
325
  }
326
+
327
+ function handleError(f, args) {
328
+ try {
329
+ return f.apply(this, args);
330
+ } catch (e) {
331
+ wasm.__wbindgen_exn_store(addHeapObject(e));
332
+ }
333
+ }
334
334
  /**
335
335
  */
336
336
  export function main_js() {
@@ -410,15 +410,15 @@ export function __wbgtest_console_error(args) {
410
410
  }
411
411
  }
412
412
 
413
- function __wbg_adapter_265(arg0, arg1) {
413
+ function __wbg_adapter_280(arg0, arg1) {
414
414
  wasm.wasm_bindgen__convert__closures__invoke0_mut__haf3b101083ea1baf(arg0, arg1);
415
415
  }
416
416
 
417
- function __wbg_adapter_308(arg0, arg1, arg2, arg3, arg4) {
417
+ function __wbg_adapter_323(arg0, arg1, arg2, arg3, arg4) {
418
418
  wasm.wasm_bindgen__convert__closures__invoke3_mut__h2c719ebcebf5f8cb(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
419
419
  }
420
420
 
421
- function __wbg_adapter_361(arg0, arg1, arg2, arg3) {
421
+ function __wbg_adapter_376(arg0, arg1, arg2, arg3) {
422
422
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h1ff4641e5edbc834(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
423
423
  }
424
424
 
@@ -722,22 +722,43 @@ export class Collection {
722
722
  * This function is asynchronous and returns a `JsValue` representing
723
723
  * the documents found in the collection.
724
724
  * @param {any} query_js
725
+ * @param {any} options_js
725
726
  * @returns {Promise<any>}
726
727
  */
727
- find(query_js) {
728
- const ret = wasm.collection_find(this.__wbg_ptr, addHeapObject(query_js));
728
+ find(query_js, options_js) {
729
+ const ret = wasm.collection_find(this.__wbg_ptr, addHeapObject(query_js), addHeapObject(options_js));
729
730
  return takeObject(ret);
730
731
  }
731
732
  /**
733
+ * @param {any} options
734
+ * @returns {QueryOptions}
735
+ */
736
+ parse_query_options(options) {
737
+ try {
738
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
739
+ wasm.collection_parse_query_options(retptr, this.__wbg_ptr, addHeapObject(options));
740
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
741
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
742
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
743
+ if (r2) {
744
+ throw takeObject(r1);
745
+ }
746
+ return QueryOptions.__wrap(r0);
747
+ } finally {
748
+ wasm.__wbindgen_add_to_stack_pointer(16);
749
+ }
750
+ }
751
+ /**
732
752
  * counts and returns all documents in the collection.
733
753
  *
734
754
  * This function is asynchronous and returns a `Schema` representing
735
755
  * the documents found in the collection.
736
756
  * @param {any} query_js
757
+ * @param {any} options_js
737
758
  * @returns {Promise<any>}
738
759
  */
739
- count(query_js) {
740
- const ret = wasm.collection_count(this.__wbg_ptr, addHeapObject(query_js));
760
+ count(query_js, options_js) {
761
+ const ret = wasm.collection_count(this.__wbg_ptr, addHeapObject(query_js), addHeapObject(options_js));
741
762
  return takeObject(ret);
742
763
  }
743
764
  /**
@@ -1047,12 +1068,14 @@ export class InMemory {
1047
1068
  /**
1048
1069
  * @param {string} collection_name
1049
1070
  * @param {any} query_js
1071
+ * @param {QueryOptions} options
1050
1072
  * @returns {Promise<any>}
1051
1073
  */
1052
- find(collection_name, query_js) {
1074
+ find(collection_name, query_js, options) {
1053
1075
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1054
1076
  const len0 = WASM_VECTOR_LEN;
1055
- const ret = wasm.inmemory_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js));
1077
+ _assertClass(options, QueryOptions);
1078
+ const ret = wasm.inmemory_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), options.__wbg_ptr);
1056
1079
  return takeObject(ret);
1057
1080
  }
1058
1081
  /**
@@ -1069,12 +1092,14 @@ export class InMemory {
1069
1092
  /**
1070
1093
  * @param {string} collection_name
1071
1094
  * @param {any} query_js
1095
+ * @param {QueryOptions} options
1072
1096
  * @returns {Promise<any>}
1073
1097
  */
1074
- count(collection_name, query_js) {
1098
+ count(collection_name, query_js, options) {
1075
1099
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1076
1100
  const len0 = WASM_VECTOR_LEN;
1077
- const ret = wasm.inmemory_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js));
1101
+ _assertClass(options, QueryOptions);
1102
+ const ret = wasm.inmemory_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), options.__wbg_ptr);
1078
1103
  return takeObject(ret);
1079
1104
  }
1080
1105
  /**
@@ -1179,12 +1204,14 @@ export class IndexDB {
1179
1204
  /**
1180
1205
  * @param {string} collection_name
1181
1206
  * @param {any} query
1207
+ * @param {QueryOptions} options
1182
1208
  * @returns {Promise<any>}
1183
1209
  */
1184
- find(collection_name, query) {
1210
+ find(collection_name, query, options) {
1185
1211
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1186
1212
  const len0 = WASM_VECTOR_LEN;
1187
- const ret = wasm.indexdb_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query));
1213
+ _assertClass(options, QueryOptions);
1214
+ const ret = wasm.indexdb_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query), options.__wbg_ptr);
1188
1215
  return takeObject(ret);
1189
1216
  }
1190
1217
  /**
@@ -1201,12 +1228,14 @@ export class IndexDB {
1201
1228
  /**
1202
1229
  * @param {string} collection_name
1203
1230
  * @param {any} query
1231
+ * @param {QueryOptions} options
1204
1232
  * @returns {Promise<any>}
1205
1233
  */
1206
- count(collection_name, query) {
1234
+ count(collection_name, query, options) {
1207
1235
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1208
1236
  const len0 = WASM_VECTOR_LEN;
1209
- const ret = wasm.indexdb_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query));
1237
+ _assertClass(options, QueryOptions);
1238
+ const ret = wasm.indexdb_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query), options.__wbg_ptr);
1210
1239
  return takeObject(ret);
1211
1240
  }
1212
1241
  /**
@@ -1698,6 +1727,70 @@ export class Query {
1698
1727
  }
1699
1728
  }
1700
1729
 
1730
+ const QueryOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
1731
+ ? { register: () => {}, unregister: () => {} }
1732
+ : new FinalizationRegistry(ptr => wasm.__wbg_queryoptions_free(ptr >>> 0));
1733
+ /**
1734
+ */
1735
+ export class QueryOptions {
1736
+
1737
+ static __wrap(ptr) {
1738
+ ptr = ptr >>> 0;
1739
+ const obj = Object.create(QueryOptions.prototype);
1740
+ obj.__wbg_ptr = ptr;
1741
+ QueryOptionsFinalization.register(obj, obj.__wbg_ptr, obj);
1742
+ return obj;
1743
+ }
1744
+
1745
+ __destroy_into_raw() {
1746
+ const ptr = this.__wbg_ptr;
1747
+ this.__wbg_ptr = 0;
1748
+ QueryOptionsFinalization.unregister(this);
1749
+ return ptr;
1750
+ }
1751
+
1752
+ free() {
1753
+ const ptr = this.__destroy_into_raw();
1754
+ wasm.__wbg_queryoptions_free(ptr);
1755
+ }
1756
+ /**
1757
+ * @returns {any}
1758
+ */
1759
+ get limit() {
1760
+ try {
1761
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1762
+ wasm.queryoptions_limit(retptr, this.__wbg_ptr);
1763
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1764
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1765
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1766
+ if (r2) {
1767
+ throw takeObject(r1);
1768
+ }
1769
+ return takeObject(r0);
1770
+ } finally {
1771
+ wasm.__wbindgen_add_to_stack_pointer(16);
1772
+ }
1773
+ }
1774
+ /**
1775
+ * @returns {any}
1776
+ */
1777
+ get offset() {
1778
+ try {
1779
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1780
+ wasm.queryoptions_offset(retptr, this.__wbg_ptr);
1781
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1782
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1783
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1784
+ if (r2) {
1785
+ throw takeObject(r1);
1786
+ }
1787
+ return takeObject(r0);
1788
+ } finally {
1789
+ wasm.__wbindgen_add_to_stack_pointer(16);
1790
+ }
1791
+ }
1792
+ }
1793
+
1701
1794
  const SchemaFinalization = (typeof FinalizationRegistry === 'undefined')
1702
1795
  ? { register: () => {}, unregister: () => {} }
1703
1796
  : new FinalizationRegistry(ptr => wasm.__wbg_schema_free(ptr >>> 0));
@@ -2017,32 +2110,12 @@ function __wbg_get_imports() {
2017
2110
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2018
2111
  takeObject(arg0);
2019
2112
  };
2020
- imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2021
- const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3));
2022
- return addHeapObject(ret);
2023
- }, arguments) };
2024
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2025
- const ret = getObject(arg0);
2026
- return addHeapObject(ret);
2027
- };
2028
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
2029
- const ret = getObject(arg0) === undefined;
2030
- return ret;
2031
- };
2032
- imports.wbg.__wbindgen_is_null = function(arg0) {
2033
- const ret = getObject(arg0) === null;
2034
- return ret;
2035
- };
2036
2113
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2037
2114
  const ret = getStringFromWasm0(arg0, arg1);
2038
2115
  return addHeapObject(ret);
2039
2116
  };
2040
- imports.wbg.__wbg_inmemory_new = function(arg0) {
2041
- const ret = InMemory.__wrap(arg0);
2042
- return addHeapObject(ret);
2043
- };
2044
- imports.wbg.__wbindgen_number_new = function(arg0) {
2045
- const ret = arg0;
2117
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2118
+ const ret = getObject(arg0);
2046
2119
  return addHeapObject(ret);
2047
2120
  };
2048
2121
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
@@ -2053,22 +2126,18 @@ function __wbg_get_imports() {
2053
2126
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2054
2127
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2055
2128
  };
2056
- imports.wbg.__wbg_indexdb_new = function(arg0) {
2057
- const ret = IndexDB.__wrap(arg0);
2058
- return addHeapObject(ret);
2129
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
2130
+ const ret = getObject(arg0) === undefined;
2131
+ return ret;
2059
2132
  };
2060
- imports.wbg.__wbg_count_19db4c3174d573d5 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2061
- const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3));
2062
- return addHeapObject(ret);
2063
- }, arguments) };
2064
- imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() { return handleError(function (arg0) {
2065
- const ret = getObject(arg0).close();
2133
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2134
+ const ret = arg0;
2066
2135
  return addHeapObject(ret);
2067
- }, arguments) };
2068
- imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() { return handleError(function (arg0) {
2069
- const ret = getObject(arg0).start();
2136
+ };
2137
+ imports.wbg.__wbg_inmemory_new = function(arg0) {
2138
+ const ret = InMemory.__wrap(arg0);
2070
2139
  return addHeapObject(ret);
2071
- }, arguments) };
2140
+ };
2072
2141
  imports.wbg.__wbg_apply_9f557eba1534d597 = function() { return handleError(function (arg0, arg1, arg2) {
2073
2142
  const ret = getObject(arg1).apply(takeObject(arg2));
2074
2143
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc);
@@ -2076,10 +2145,34 @@ function __wbg_get_imports() {
2076
2145
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2077
2146
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2078
2147
  }, arguments) };
2148
+ imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() { return handleError(function (arg0) {
2149
+ const ret = getObject(arg0).start();
2150
+ return addHeapObject(ret);
2151
+ }, arguments) };
2079
2152
  imports.wbg.__wbg_database_new = function(arg0) {
2080
2153
  const ret = Database.__wrap(arg0);
2081
2154
  return addHeapObject(ret);
2082
2155
  };
2156
+ imports.wbg.__wbindgen_is_null = function(arg0) {
2157
+ const ret = getObject(arg0) === null;
2158
+ return ret;
2159
+ };
2160
+ imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() { return handleError(function (arg0) {
2161
+ const ret = getObject(arg0).close();
2162
+ return addHeapObject(ret);
2163
+ }, arguments) };
2164
+ imports.wbg.__wbg_count_19db4c3174d573d5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2165
+ const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2166
+ return addHeapObject(ret);
2167
+ }, arguments) };
2168
+ imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2169
+ const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2170
+ return addHeapObject(ret);
2171
+ }, arguments) };
2172
+ imports.wbg.__wbg_indexdb_new = function(arg0) {
2173
+ const ret = IndexDB.__wrap(arg0);
2174
+ return addHeapObject(ret);
2175
+ };
2083
2176
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2084
2177
  const obj = getObject(arg1);
2085
2178
  const ret = typeof(obj) === 'number' ? obj : undefined;
@@ -2094,39 +2187,6 @@ function __wbg_get_imports() {
2094
2187
  const ret = getObject(arg0).write(Operation.__wrap(arg1));
2095
2188
  return addHeapObject(ret);
2096
2189
  }, arguments) };
2097
- imports.wbg.__wbg_collection_new = function(arg0) {
2098
- const ret = Collection.__wrap(arg0);
2099
- return addHeapObject(ret);
2100
- };
2101
- imports.wbg.__wbindgen_is_array = function(arg0) {
2102
- const ret = Array.isArray(getObject(arg0));
2103
- return ret;
2104
- };
2105
- imports.wbg.__wbindgen_is_object = function(arg0) {
2106
- const val = getObject(arg0);
2107
- const ret = typeof(val) === 'object' && val !== null;
2108
- return ret;
2109
- };
2110
- imports.wbg.__wbindgen_is_string = function(arg0) {
2111
- const ret = typeof(getObject(arg0)) === 'string';
2112
- return ret;
2113
- };
2114
- imports.wbg.__wbindgen_is_falsy = function(arg0) {
2115
- const ret = !getObject(arg0);
2116
- return ret;
2117
- };
2118
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2119
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2120
- return addHeapObject(ret);
2121
- };
2122
- imports.wbg.__wbindgen_is_function = function(arg0) {
2123
- const ret = typeof(getObject(arg0)) === 'function';
2124
- return ret;
2125
- };
2126
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
2127
- const ret = typeof(getObject(arg0)) === 'bigint';
2128
- return ret;
2129
- };
2130
2190
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
2131
2191
  const obj = takeObject(arg0).original;
2132
2192
  if (obj.cnt-- == 1) {
@@ -2141,6 +2201,15 @@ function __wbg_get_imports() {
2141
2201
  const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
2142
2202
  return ret;
2143
2203
  };
2204
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
2205
+ const ret = typeof(getObject(arg0)) === 'bigint';
2206
+ return ret;
2207
+ };
2208
+ imports.wbg.__wbindgen_is_object = function(arg0) {
2209
+ const val = getObject(arg0);
2210
+ const ret = typeof(val) === 'object' && val !== null;
2211
+ return ret;
2212
+ };
2144
2213
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
2145
2214
  const ret = getObject(arg0) in getObject(arg1);
2146
2215
  return ret;
@@ -2157,6 +2226,30 @@ function __wbg_get_imports() {
2157
2226
  const ret = BigInt.asUintN(64, arg0);
2158
2227
  return addHeapObject(ret);
2159
2228
  };
2229
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2230
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2231
+ return addHeapObject(ret);
2232
+ };
2233
+ imports.wbg.__wbindgen_is_string = function(arg0) {
2234
+ const ret = typeof(getObject(arg0)) === 'string';
2235
+ return ret;
2236
+ };
2237
+ imports.wbg.__wbindgen_is_array = function(arg0) {
2238
+ const ret = Array.isArray(getObject(arg0));
2239
+ return ret;
2240
+ };
2241
+ imports.wbg.__wbindgen_is_falsy = function(arg0) {
2242
+ const ret = !getObject(arg0);
2243
+ return ret;
2244
+ };
2245
+ imports.wbg.__wbindgen_is_function = function(arg0) {
2246
+ const ret = typeof(getObject(arg0)) === 'function';
2247
+ return ret;
2248
+ };
2249
+ imports.wbg.__wbg_collection_new = function(arg0) {
2250
+ const ret = Collection.__wrap(arg0);
2251
+ return addHeapObject(ret);
2252
+ };
2160
2253
  imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
2161
2254
  const ret = getObject(arg0).crypto;
2162
2255
  return addHeapObject(ret);
@@ -2205,90 +2298,25 @@ function __wbg_get_imports() {
2205
2298
  const ret = getObject(arg0).indexedDB;
2206
2299
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2207
2300
  }, arguments) };
2208
- imports.wbg.__wbg_length_9ae5daf9a690cba9 = function(arg0) {
2209
- const ret = getObject(arg0).length;
2210
- return ret;
2211
- };
2212
- imports.wbg.__wbg_contains_c65b44400b549286 = function(arg0, arg1, arg2) {
2213
- const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2214
- return ret;
2215
- };
2216
- imports.wbg.__wbg_get_910bbb94abdcf488 = function(arg0, arg1, arg2) {
2217
- const ret = getObject(arg1)[arg2 >>> 0];
2218
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2219
- var len1 = WASM_VECTOR_LEN;
2220
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2221
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2222
- };
2223
2301
  imports.wbg.__wbg_target_2fc177e386c8b7b0 = function(arg0) {
2224
2302
  const ret = getObject(arg0).target;
2225
2303
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2226
2304
  };
2227
- imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
2228
- let result;
2229
- try {
2230
- result = getObject(arg0) instanceof IDBOpenDBRequest;
2231
- } catch (_) {
2232
- result = false;
2233
- }
2234
- const ret = result;
2235
- return ret;
2236
- };
2237
- imports.wbg.__wbg_setonupgradeneeded_ad7645373c7d5e1b = function(arg0, arg1) {
2238
- getObject(arg0).onupgradeneeded = getObject(arg1);
2239
- };
2240
- imports.wbg.__wbg_instanceof_IdbRequest_93249da04f5370b6 = function(arg0) {
2241
- let result;
2242
- try {
2243
- result = getObject(arg0) instanceof IDBRequest;
2244
- } catch (_) {
2245
- result = false;
2246
- }
2247
- const ret = result;
2248
- return ret;
2249
- };
2250
- imports.wbg.__wbg_result_6cedf5f78600a79c = function() { return handleError(function (arg0) {
2251
- const ret = getObject(arg0).result;
2305
+ imports.wbg.__wbg_open_f0d7259fd7e689ce = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2306
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
2252
2307
  return addHeapObject(ret);
2253
2308
  }, arguments) };
2254
- imports.wbg.__wbg_error_685b20024dc2d6ca = function() { return handleError(function (arg0) {
2255
- const ret = getObject(arg0).error;
2256
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2309
+ imports.wbg.__wbg_openCursor_425aba9cbe1d4d39 = function() { return handleError(function (arg0) {
2310
+ const ret = getObject(arg0).openCursor();
2311
+ return addHeapObject(ret);
2257
2312
  }, arguments) };
2258
- imports.wbg.__wbg_setonsuccess_632ce0a1460455c2 = function(arg0, arg1) {
2259
- getObject(arg0).onsuccess = getObject(arg1);
2260
- };
2261
- imports.wbg.__wbg_setonerror_8479b33e7568a904 = function(arg0, arg1) {
2262
- getObject(arg0).onerror = getObject(arg1);
2263
- };
2264
- imports.wbg.__wbg_setoncomplete_d8e4236665cbf1e2 = function(arg0, arg1) {
2265
- getObject(arg0).oncomplete = getObject(arg1);
2266
- };
2267
- imports.wbg.__wbg_setonerror_da071ec94e148397 = function(arg0, arg1) {
2268
- getObject(arg0).onerror = getObject(arg1);
2269
- };
2270
- imports.wbg.__wbg_objectStore_da468793bd9df17b = function() { return handleError(function (arg0, arg1, arg2) {
2271
- const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2313
+ imports.wbg.__wbg_openCursor_e3042770817a8d57 = function() { return handleError(function (arg0, arg1) {
2314
+ const ret = getObject(arg0).openCursor(getObject(arg1));
2272
2315
  return addHeapObject(ret);
2273
2316
  }, arguments) };
2274
2317
  imports.wbg.__wbg_log_5bb5f88f245d7762 = function(arg0) {
2275
2318
  console.log(getObject(arg0));
2276
2319
  };
2277
- imports.wbg.__wbg_open_f0d7259fd7e689ce = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2278
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
2279
- return addHeapObject(ret);
2280
- }, arguments) };
2281
- imports.wbg.__wbg_getAll_0ab46ba1dfcee129 = function() { return handleError(function (arg0, arg1) {
2282
- const ret = getObject(arg0).getAll(getObject(arg1));
2283
- return addHeapObject(ret);
2284
- }, arguments) };
2285
- imports.wbg.__wbg_getItem_164e8e5265095b87 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2286
- const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
2287
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2288
- var len1 = WASM_VECTOR_LEN;
2289
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2290
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2291
- }, arguments) };
2292
2320
  imports.wbg.__wbg_createIndex_b8da1f5571f644be = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2293
2321
  const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getObject(arg5));
2294
2322
  return addHeapObject(ret);
@@ -2301,14 +2329,18 @@ function __wbg_get_imports() {
2301
2329
  const ret = getObject(arg0).get(getObject(arg1));
2302
2330
  return addHeapObject(ret);
2303
2331
  }, arguments) };
2304
- imports.wbg.__wbg_getAll_2782e438df699384 = function() { return handleError(function (arg0) {
2305
- const ret = getObject(arg0).getAll();
2306
- return addHeapObject(ret);
2307
- }, arguments) };
2308
2332
  imports.wbg.__wbg_index_383b6812c1508030 = function() { return handleError(function (arg0, arg1, arg2) {
2309
2333
  const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
2310
2334
  return addHeapObject(ret);
2311
2335
  }, arguments) };
2336
+ imports.wbg.__wbg_openCursor_30d58ae27a327629 = function() { return handleError(function (arg0) {
2337
+ const ret = getObject(arg0).openCursor();
2338
+ return addHeapObject(ret);
2339
+ }, arguments) };
2340
+ imports.wbg.__wbg_openCursor_611b1e488c393dd8 = function() { return handleError(function (arg0, arg1) {
2341
+ const ret = getObject(arg0).openCursor(getObject(arg1));
2342
+ return addHeapObject(ret);
2343
+ }, arguments) };
2312
2344
  imports.wbg.__wbg_put_22792e17580ca18b = function() { return handleError(function (arg0, arg1, arg2) {
2313
2345
  const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
2314
2346
  return addHeapObject(ret);
@@ -2342,6 +2374,96 @@ function __wbg_get_imports() {
2342
2374
  const ret = getObject(arg0).transaction(getStringFromWasm0(arg1, arg2), takeObject(arg3));
2343
2375
  return addHeapObject(ret);
2344
2376
  }, arguments) };
2377
+ imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
2378
+ let result;
2379
+ try {
2380
+ result = getObject(arg0) instanceof IDBOpenDBRequest;
2381
+ } catch (_) {
2382
+ result = false;
2383
+ }
2384
+ const ret = result;
2385
+ return ret;
2386
+ };
2387
+ imports.wbg.__wbg_setonupgradeneeded_ad7645373c7d5e1b = function(arg0, arg1) {
2388
+ getObject(arg0).onupgradeneeded = getObject(arg1);
2389
+ };
2390
+ imports.wbg.__wbg_length_9ae5daf9a690cba9 = function(arg0) {
2391
+ const ret = getObject(arg0).length;
2392
+ return ret;
2393
+ };
2394
+ imports.wbg.__wbg_contains_c65b44400b549286 = function(arg0, arg1, arg2) {
2395
+ const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2396
+ return ret;
2397
+ };
2398
+ imports.wbg.__wbg_get_910bbb94abdcf488 = function(arg0, arg1, arg2) {
2399
+ const ret = getObject(arg1)[arg2 >>> 0];
2400
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2401
+ var len1 = WASM_VECTOR_LEN;
2402
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2403
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2404
+ };
2405
+ imports.wbg.__wbg_instanceof_IdbCursorWithValue_abeb44d13d947bc2 = function(arg0) {
2406
+ let result;
2407
+ try {
2408
+ result = getObject(arg0) instanceof IDBCursorWithValue;
2409
+ } catch (_) {
2410
+ result = false;
2411
+ }
2412
+ const ret = result;
2413
+ return ret;
2414
+ };
2415
+ imports.wbg.__wbg_value_86d3334f5075b232 = function() { return handleError(function (arg0) {
2416
+ const ret = getObject(arg0).value;
2417
+ return addHeapObject(ret);
2418
+ }, arguments) };
2419
+ imports.wbg.__wbg_only_cacf767244bdc280 = function() { return handleError(function (arg0) {
2420
+ const ret = IDBKeyRange.only(getObject(arg0));
2421
+ return addHeapObject(ret);
2422
+ }, arguments) };
2423
+ imports.wbg.__wbg_continue_f1c3e0815924de62 = function() { return handleError(function (arg0) {
2424
+ getObject(arg0).continue();
2425
+ }, arguments) };
2426
+ imports.wbg.__wbg_getItem_164e8e5265095b87 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2427
+ const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
2428
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2429
+ var len1 = WASM_VECTOR_LEN;
2430
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2431
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2432
+ }, arguments) };
2433
+ imports.wbg.__wbg_instanceof_IdbRequest_93249da04f5370b6 = function(arg0) {
2434
+ let result;
2435
+ try {
2436
+ result = getObject(arg0) instanceof IDBRequest;
2437
+ } catch (_) {
2438
+ result = false;
2439
+ }
2440
+ const ret = result;
2441
+ return ret;
2442
+ };
2443
+ imports.wbg.__wbg_result_6cedf5f78600a79c = function() { return handleError(function (arg0) {
2444
+ const ret = getObject(arg0).result;
2445
+ return addHeapObject(ret);
2446
+ }, arguments) };
2447
+ imports.wbg.__wbg_error_685b20024dc2d6ca = function() { return handleError(function (arg0) {
2448
+ const ret = getObject(arg0).error;
2449
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2450
+ }, arguments) };
2451
+ imports.wbg.__wbg_setonsuccess_632ce0a1460455c2 = function(arg0, arg1) {
2452
+ getObject(arg0).onsuccess = getObject(arg1);
2453
+ };
2454
+ imports.wbg.__wbg_setonerror_8479b33e7568a904 = function(arg0, arg1) {
2455
+ getObject(arg0).onerror = getObject(arg1);
2456
+ };
2457
+ imports.wbg.__wbg_setoncomplete_d8e4236665cbf1e2 = function(arg0, arg1) {
2458
+ getObject(arg0).oncomplete = getObject(arg1);
2459
+ };
2460
+ imports.wbg.__wbg_setonerror_da071ec94e148397 = function(arg0, arg1) {
2461
+ getObject(arg0).onerror = getObject(arg1);
2462
+ };
2463
+ imports.wbg.__wbg_objectStore_da468793bd9df17b = function() { return handleError(function (arg0, arg1, arg2) {
2464
+ const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2465
+ return addHeapObject(ret);
2466
+ }, arguments) };
2345
2467
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2346
2468
  const ret = getObject(arg0) == getObject(arg1);
2347
2469
  return ret;
@@ -2388,7 +2510,7 @@ function __wbg_get_imports() {
2388
2510
  const a = state0.a;
2389
2511
  state0.a = 0;
2390
2512
  try {
2391
- return __wbg_adapter_265(a, state0.b, );
2513
+ return __wbg_adapter_280(a, state0.b, );
2392
2514
  } finally {
2393
2515
  state0.a = a;
2394
2516
  }
@@ -2553,7 +2675,7 @@ function __wbg_get_imports() {
2553
2675
  const a = state0.a;
2554
2676
  state0.a = 0;
2555
2677
  try {
2556
- return __wbg_adapter_308(a, state0.b, arg0, arg1, arg2);
2678
+ return __wbg_adapter_323(a, state0.b, arg0, arg1, arg2);
2557
2679
  } finally {
2558
2680
  state0.a = a;
2559
2681
  }
@@ -2636,7 +2758,7 @@ function __wbg_get_imports() {
2636
2758
  const a = state0.a;
2637
2759
  state0.a = 0;
2638
2760
  try {
2639
- return __wbg_adapter_361(a, state0.b, arg0, arg1);
2761
+ return __wbg_adapter_376(a, state0.b, arg0, arg1);
2640
2762
  } finally {
2641
2763
  state0.a = a;
2642
2764
  }
@@ -2736,24 +2858,24 @@ function __wbg_get_imports() {
2736
2858
  const ret = wasm.memory;
2737
2859
  return addHeapObject(ret);
2738
2860
  };
2739
- imports.wbg.__wbindgen_closure_wrapper524 = function(arg0, arg1, arg2) {
2740
- const ret = makeClosure(arg0, arg1, 166, __wbg_adapter_56);
2861
+ imports.wbg.__wbindgen_closure_wrapper959 = function(arg0, arg1, arg2) {
2862
+ const ret = makeMutClosure(arg0, arg1, 354, __wbg_adapter_56);
2741
2863
  return addHeapObject(ret);
2742
2864
  };
2743
- imports.wbg.__wbindgen_closure_wrapper526 = function(arg0, arg1, arg2) {
2744
- const ret = makeMutClosure(arg0, arg1, 166, __wbg_adapter_59);
2865
+ imports.wbg.__wbindgen_closure_wrapper961 = function(arg0, arg1, arg2) {
2866
+ const ret = makeClosure(arg0, arg1, 354, __wbg_adapter_59);
2745
2867
  return addHeapObject(ret);
2746
2868
  };
2747
- imports.wbg.__wbindgen_closure_wrapper528 = function(arg0, arg1, arg2) {
2748
- const ret = makeMutClosure(arg0, arg1, 166, __wbg_adapter_59);
2869
+ imports.wbg.__wbindgen_closure_wrapper963 = function(arg0, arg1, arg2) {
2870
+ const ret = makeMutClosure(arg0, arg1, 354, __wbg_adapter_62);
2749
2871
  return addHeapObject(ret);
2750
2872
  };
2751
- imports.wbg.__wbindgen_closure_wrapper530 = function(arg0, arg1, arg2) {
2752
- const ret = makeMutClosure(arg0, arg1, 166, __wbg_adapter_64);
2873
+ imports.wbg.__wbindgen_closure_wrapper965 = function(arg0, arg1, arg2) {
2874
+ const ret = makeMutClosure(arg0, arg1, 354, __wbg_adapter_56);
2753
2875
  return addHeapObject(ret);
2754
2876
  };
2755
- imports.wbg.__wbindgen_closure_wrapper1511 = function(arg0, arg1, arg2) {
2756
- const ret = makeMutClosure(arg0, arg1, 420, __wbg_adapter_67);
2877
+ imports.wbg.__wbindgen_closure_wrapper1588 = function(arg0, arg1, arg2) {
2878
+ const ret = makeMutClosure(arg0, arg1, 446, __wbg_adapter_67);
2757
2879
  return addHeapObject(ret);
2758
2880
  };
2759
2881