@moss-dev/moss-wasm 0.10.0 → 0.15.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/moss_wasm.d.ts CHANGED
@@ -9,9 +9,15 @@ export class IndexManager {
9
9
  loadIndex(index_name: string): Promise<any>;
10
10
  constructor(project_id: string, project_key: string);
11
11
  query(index_name: string, query_text: string, query_embedding: Float32Array, top_k: number | null | undefined, alpha: number | null | undefined, filter: any): Promise<any>;
12
+ queryMultiIndex(index_names: string[], query_text: string, query_embedding: Float32Array, top_k: number | null | undefined, alpha: number | null | undefined, filter: any): Promise<any>;
13
+ queryMultiIndexWithModelIdentity(index_names: string[], query_text: string, query_embedding: Float32Array, model_id: string, model_artifact_version: string, manifest_sha256: string, top_k: number | null | undefined, alpha: number | null | undefined, filter: any): Promise<any>;
14
+ queryWithModelIdentity(index_name: string, query_text: string, query_embedding: Float32Array, model_id: string, model_artifact_version: string, manifest_sha256: string, top_k: number | null | undefined, alpha: number | null | undefined, filter: any): Promise<any>;
12
15
  refreshIndex(index_name: string): Promise<any>;
13
16
  unloadIndex(index_name: string): Promise<any>;
17
+ unloadIndexes(index_names: string[]): Promise<any>;
18
+ static withAuthenticator(project_id: string, get_auth_header: Function, invalidate_cache?: Function | null, base_url?: string | null): IndexManager;
14
19
  static withBaseUrl(project_id: string, project_key: string, base_url: string): IndexManager;
20
+ static withBaseUrls(project_id: string, project_key: string, base_url: string, auth_url: string): IndexManager;
15
21
  }
16
22
 
17
23
  export class ManageClient {
@@ -27,9 +33,41 @@ export class ManageClient {
27
33
  getJobStatus(job_id: string): Promise<any>;
28
34
  listIndexes(): Promise<any>;
29
35
  constructor(project_id: string, project_key: string);
36
+ static withAuthenticator(project_id: string, get_auth_header: Function, invalidate_cache?: Function | null, base_url?: string | null): ManageClient;
30
37
  static withBaseUrl(project_id: string, project_key: string, base_url: string): ManageClient;
31
38
  }
32
39
 
40
+ export class ModelContentKeys {
41
+ private constructor();
42
+ free(): void;
43
+ [Symbol.dispose](): void;
44
+ readonly keyId: number;
45
+ }
46
+
47
+ export class ModelKeyExchange {
48
+ free(): void;
49
+ [Symbol.dispose](): void;
50
+ capabilityQuery(sku: string): string;
51
+ constructor();
52
+ unwrap(response_json: string, sku: string, project_id: string): ModelContentKeys;
53
+ }
54
+
55
+ export class ProjectKeyAuthenticator {
56
+ free(): void;
57
+ [Symbol.dispose](): void;
58
+ getAuthHeader(): Promise<any>;
59
+ invalidate(): Promise<any>;
60
+ constructor(project_id: string, project_key: string);
61
+ }
62
+
63
+ export class SealedModel {
64
+ private constructor();
65
+ free(): void;
66
+ [Symbol.dispose](): void;
67
+ takeGraph(): Uint8Array;
68
+ takeTokenizer(): Tokenizer;
69
+ }
70
+
33
71
  export class Tokenizer {
34
72
  free(): void;
35
73
  [Symbol.dispose](): void;
@@ -37,6 +75,8 @@ export class Tokenizer {
37
75
  tokenize(text: string): any;
38
76
  }
39
77
 
78
+ export function openSealedModel(bytes: Uint8Array, keys: ModelContentKeys, sku: string): SealedModel;
79
+
40
80
  export function poolAndNormalize(token_embeddings: Float32Array, attention_mask: Int32Array, hidden_dim: number): Float32Array;
41
81
 
42
82
  export function sdk_version(): string;
@@ -45,17 +85,27 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
45
85
 
46
86
  export interface InitOutput {
47
87
  readonly memory: WebAssembly.Memory;
48
- readonly poolAndNormalize: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
49
88
  readonly __wbg_indexmanager_free: (a: number, b: number) => void;
89
+ readonly __wbg_manageclient_free: (a: number, b: number) => void;
90
+ readonly __wbg_modelcontentkeys_free: (a: number, b: number) => void;
91
+ readonly __wbg_modelkeyexchange_free: (a: number, b: number) => void;
92
+ readonly __wbg_projectkeyauthenticator_free: (a: number, b: number) => void;
93
+ readonly __wbg_sealedmodel_free: (a: number, b: number) => void;
94
+ readonly __wbg_tokenizer_free: (a: number, b: number) => void;
50
95
  readonly indexmanager_getIndexInfo: (a: number, b: number, c: number) => any;
51
96
  readonly indexmanager_hasIndex: (a: number, b: number, c: number) => any;
52
97
  readonly indexmanager_loadIndex: (a: number, b: number, c: number) => any;
53
98
  readonly indexmanager_new: (a: number, b: number, c: number, d: number) => number;
54
99
  readonly indexmanager_query: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: any) => any;
100
+ readonly indexmanager_queryMultiIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: any) => any;
101
+ readonly indexmanager_queryMultiIndexWithModelIdentity: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: any) => any;
102
+ readonly indexmanager_queryWithModelIdentity: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: any) => any;
55
103
  readonly indexmanager_refreshIndex: (a: number, b: number, c: number) => any;
56
104
  readonly indexmanager_unloadIndex: (a: number, b: number, c: number) => any;
105
+ readonly indexmanager_unloadIndexes: (a: number, b: number, c: number) => any;
106
+ readonly indexmanager_withAuthenticator: (a: number, b: number, c: any, d: number, e: number, f: number) => number;
57
107
  readonly indexmanager_withBaseUrl: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
58
- readonly __wbg_manageclient_free: (a: number, b: number) => void;
108
+ readonly indexmanager_withBaseUrls: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
59
109
  readonly manageclient_addDocs: (a: number, b: number, c: number, d: any, e: number) => any;
60
110
  readonly manageclient_createIndex: (a: number, b: number, c: number, d: any, e: number, f: number) => any;
61
111
  readonly manageclient_createIndexFromFiles: (a: number, b: number, c: number, d: any, e: number, f: number) => any;
@@ -66,21 +116,33 @@ export interface InitOutput {
66
116
  readonly manageclient_getJobStatus: (a: number, b: number, c: number) => any;
67
117
  readonly manageclient_listIndexes: (a: number) => any;
68
118
  readonly manageclient_new: (a: number, b: number, c: number, d: number) => number;
119
+ readonly manageclient_withAuthenticator: (a: number, b: number, c: any, d: number, e: number, f: number) => number;
69
120
  readonly manageclient_withBaseUrl: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
121
+ readonly modelcontentkeys_keyId: (a: number) => number;
122
+ readonly modelkeyexchange_capabilityQuery: (a: number, b: number, c: number) => [number, number];
123
+ readonly modelkeyexchange_new: () => [number, number, number];
124
+ readonly modelkeyexchange_unwrap: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
125
+ readonly openSealedModel: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
126
+ readonly poolAndNormalize: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
127
+ readonly projectkeyauthenticator_getAuthHeader: (a: number) => any;
128
+ readonly projectkeyauthenticator_invalidate: (a: number) => any;
129
+ readonly projectkeyauthenticator_new: (a: number, b: number, c: number, d: number) => number;
70
130
  readonly sdk_version: () => [number, number];
71
- readonly __wbg_tokenizer_free: (a: number, b: number) => void;
131
+ readonly sealedmodel_takeGraph: (a: number) => [number, number, number];
132
+ readonly sealedmodel_takeTokenizer: (a: number) => [number, number, number];
72
133
  readonly tokenizer_new: (a: number, b: number) => [number, number, number];
73
134
  readonly tokenizer_tokenize: (a: number, b: number, c: number) => [number, number, number];
74
- readonly wasm_bindgen__convert__closures_____invoke__h2c99d349e8a87fd1: (a: number, b: number, c: any) => [number, number];
75
- readonly wasm_bindgen__convert__closures_____invoke__h068729b61954c03c: (a: number, b: number, c: any, d: any) => void;
135
+ readonly wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_: (a: number, b: number, c: any) => [number, number];
136
+ readonly wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
137
+ readonly wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_: (a: number, b: number) => void;
76
138
  readonly __wbindgen_malloc: (a: number, b: number) => number;
77
139
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
78
140
  readonly __wbindgen_exn_store: (a: number) => void;
79
141
  readonly __externref_table_alloc: () => number;
80
142
  readonly __wbindgen_externrefs: WebAssembly.Table;
81
143
  readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
82
- readonly __externref_table_dealloc: (a: number) => void;
83
144
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
145
+ readonly __externref_table_dealloc: (a: number) => void;
84
146
  readonly __wbindgen_start: () => void;
85
147
  }
86
148
 
package/moss_wasm.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  export class IndexManager {
4
4
  static __wrap(ptr) {
5
- ptr = ptr >>> 0;
6
5
  const obj = Object.create(IndexManager.prototype);
7
6
  obj.__wbg_ptr = ptr;
8
7
  IndexManagerFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -58,7 +57,7 @@ export class IndexManager {
58
57
  const ptr1 = passStringToWasm0(project_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
59
58
  const len1 = WASM_VECTOR_LEN;
60
59
  const ret = wasm.indexmanager_new(ptr0, len0, ptr1, len1);
61
- this.__wbg_ptr = ret >>> 0;
60
+ this.__wbg_ptr = ret;
62
61
  IndexManagerFinalization.register(this, this.__wbg_ptr, this);
63
62
  return this;
64
63
  }
@@ -78,7 +77,82 @@ export class IndexManager {
78
77
  const len1 = WASM_VECTOR_LEN;
79
78
  const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
80
79
  const len2 = WASM_VECTOR_LEN;
81
- const ret = wasm.indexmanager_query(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(top_k) ? 0x100000001 : (top_k) >>> 0, isLikeNone(alpha) ? 0x100000001 : Math.fround(alpha), filter);
80
+ const ret = wasm.indexmanager_query(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(top_k) ? Number.MAX_SAFE_INTEGER : (top_k) >>> 0, isLikeNone(alpha) ? Number.MAX_SAFE_INTEGER : Math.fround(alpha), filter);
81
+ return ret;
82
+ }
83
+ /**
84
+ * @param {string[]} index_names
85
+ * @param {string} query_text
86
+ * @param {Float32Array} query_embedding
87
+ * @param {number | null | undefined} top_k
88
+ * @param {number | null | undefined} alpha
89
+ * @param {any} filter
90
+ * @returns {Promise<any>}
91
+ */
92
+ queryMultiIndex(index_names, query_text, query_embedding, top_k, alpha, filter) {
93
+ const ptr0 = passArrayJsValueToWasm0(index_names, wasm.__wbindgen_malloc);
94
+ const len0 = WASM_VECTOR_LEN;
95
+ const ptr1 = passStringToWasm0(query_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
96
+ const len1 = WASM_VECTOR_LEN;
97
+ const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
98
+ const len2 = WASM_VECTOR_LEN;
99
+ const ret = wasm.indexmanager_queryMultiIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(top_k) ? Number.MAX_SAFE_INTEGER : (top_k) >>> 0, isLikeNone(alpha) ? Number.MAX_SAFE_INTEGER : Math.fround(alpha), filter);
100
+ return ret;
101
+ }
102
+ /**
103
+ * @param {string[]} index_names
104
+ * @param {string} query_text
105
+ * @param {Float32Array} query_embedding
106
+ * @param {string} model_id
107
+ * @param {string} model_artifact_version
108
+ * @param {string} manifest_sha256
109
+ * @param {number | null | undefined} top_k
110
+ * @param {number | null | undefined} alpha
111
+ * @param {any} filter
112
+ * @returns {Promise<any>}
113
+ */
114
+ queryMultiIndexWithModelIdentity(index_names, query_text, query_embedding, model_id, model_artifact_version, manifest_sha256, top_k, alpha, filter) {
115
+ const ptr0 = passArrayJsValueToWasm0(index_names, wasm.__wbindgen_malloc);
116
+ const len0 = WASM_VECTOR_LEN;
117
+ const ptr1 = passStringToWasm0(query_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
118
+ const len1 = WASM_VECTOR_LEN;
119
+ const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
120
+ const len2 = WASM_VECTOR_LEN;
121
+ const ptr3 = passStringToWasm0(model_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
122
+ const len3 = WASM_VECTOR_LEN;
123
+ const ptr4 = passStringToWasm0(model_artifact_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
124
+ const len4 = WASM_VECTOR_LEN;
125
+ const ptr5 = passStringToWasm0(manifest_sha256, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
126
+ const len5 = WASM_VECTOR_LEN;
127
+ const ret = wasm.indexmanager_queryMultiIndexWithModelIdentity(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, isLikeNone(top_k) ? Number.MAX_SAFE_INTEGER : (top_k) >>> 0, isLikeNone(alpha) ? Number.MAX_SAFE_INTEGER : Math.fround(alpha), filter);
128
+ return ret;
129
+ }
130
+ /**
131
+ * @param {string} index_name
132
+ * @param {string} query_text
133
+ * @param {Float32Array} query_embedding
134
+ * @param {string} model_id
135
+ * @param {string} model_artifact_version
136
+ * @param {string} manifest_sha256
137
+ * @param {number | null | undefined} top_k
138
+ * @param {number | null | undefined} alpha
139
+ * @param {any} filter
140
+ * @returns {Promise<any>}
141
+ */
142
+ queryWithModelIdentity(index_name, query_text, query_embedding, model_id, model_artifact_version, manifest_sha256, top_k, alpha, filter) {
143
+ const ptr0 = passStringToWasm0(index_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
144
+ const len0 = WASM_VECTOR_LEN;
145
+ const ptr1 = passStringToWasm0(query_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
146
+ const len1 = WASM_VECTOR_LEN;
147
+ const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
148
+ const len2 = WASM_VECTOR_LEN;
149
+ const ptr3 = passStringToWasm0(model_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
150
+ const len3 = WASM_VECTOR_LEN;
151
+ const ptr4 = passStringToWasm0(model_artifact_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
152
+ const len4 = WASM_VECTOR_LEN;
153
+ const ptr5 = passStringToWasm0(manifest_sha256, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
154
+ const len5 = WASM_VECTOR_LEN;
155
+ const ret = wasm.indexmanager_queryWithModelIdentity(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, isLikeNone(top_k) ? Number.MAX_SAFE_INTEGER : (top_k) >>> 0, isLikeNone(alpha) ? Number.MAX_SAFE_INTEGER : Math.fround(alpha), filter);
82
156
  return ret;
83
157
  }
84
158
  /**
@@ -101,6 +175,31 @@ export class IndexManager {
101
175
  const ret = wasm.indexmanager_unloadIndex(this.__wbg_ptr, ptr0, len0);
102
176
  return ret;
103
177
  }
178
+ /**
179
+ * @param {string[]} index_names
180
+ * @returns {Promise<any>}
181
+ */
182
+ unloadIndexes(index_names) {
183
+ const ptr0 = passArrayJsValueToWasm0(index_names, wasm.__wbindgen_malloc);
184
+ const len0 = WASM_VECTOR_LEN;
185
+ const ret = wasm.indexmanager_unloadIndexes(this.__wbg_ptr, ptr0, len0);
186
+ return ret;
187
+ }
188
+ /**
189
+ * @param {string} project_id
190
+ * @param {Function} get_auth_header
191
+ * @param {Function | null} [invalidate_cache]
192
+ * @param {string | null} [base_url]
193
+ * @returns {IndexManager}
194
+ */
195
+ static withAuthenticator(project_id, get_auth_header, invalidate_cache, base_url) {
196
+ const ptr0 = passStringToWasm0(project_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
197
+ const len0 = WASM_VECTOR_LEN;
198
+ var ptr1 = isLikeNone(base_url) ? 0 : passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
199
+ var len1 = WASM_VECTOR_LEN;
200
+ const ret = wasm.indexmanager_withAuthenticator(ptr0, len0, get_auth_header, isLikeNone(invalidate_cache) ? 0 : addToExternrefTable0(invalidate_cache), ptr1, len1);
201
+ return IndexManager.__wrap(ret);
202
+ }
104
203
  /**
105
204
  * @param {string} project_id
106
205
  * @param {string} project_key
@@ -117,12 +216,30 @@ export class IndexManager {
117
216
  const ret = wasm.indexmanager_withBaseUrl(ptr0, len0, ptr1, len1, ptr2, len2);
118
217
  return IndexManager.__wrap(ret);
119
218
  }
219
+ /**
220
+ * @param {string} project_id
221
+ * @param {string} project_key
222
+ * @param {string} base_url
223
+ * @param {string} auth_url
224
+ * @returns {IndexManager}
225
+ */
226
+ static withBaseUrls(project_id, project_key, base_url, auth_url) {
227
+ const ptr0 = passStringToWasm0(project_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
228
+ const len0 = WASM_VECTOR_LEN;
229
+ const ptr1 = passStringToWasm0(project_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
230
+ const len1 = WASM_VECTOR_LEN;
231
+ const ptr2 = passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
232
+ const len2 = WASM_VECTOR_LEN;
233
+ const ptr3 = passStringToWasm0(auth_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
234
+ const len3 = WASM_VECTOR_LEN;
235
+ const ret = wasm.indexmanager_withBaseUrls(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
236
+ return IndexManager.__wrap(ret);
237
+ }
120
238
  }
121
239
  if (Symbol.dispose) IndexManager.prototype[Symbol.dispose] = IndexManager.prototype.free;
122
240
 
123
241
  export class ManageClient {
124
242
  static __wrap(ptr) {
125
- ptr = ptr >>> 0;
126
243
  const obj = Object.create(ManageClient.prototype);
127
244
  obj.__wbg_ptr = ptr;
128
245
  ManageClientFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -251,10 +368,25 @@ export class ManageClient {
251
368
  const ptr1 = passStringToWasm0(project_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
252
369
  const len1 = WASM_VECTOR_LEN;
253
370
  const ret = wasm.manageclient_new(ptr0, len0, ptr1, len1);
254
- this.__wbg_ptr = ret >>> 0;
371
+ this.__wbg_ptr = ret;
255
372
  ManageClientFinalization.register(this, this.__wbg_ptr, this);
256
373
  return this;
257
374
  }
375
+ /**
376
+ * @param {string} project_id
377
+ * @param {Function} get_auth_header
378
+ * @param {Function | null} [invalidate_cache]
379
+ * @param {string | null} [base_url]
380
+ * @returns {ManageClient}
381
+ */
382
+ static withAuthenticator(project_id, get_auth_header, invalidate_cache, base_url) {
383
+ const ptr0 = passStringToWasm0(project_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
384
+ const len0 = WASM_VECTOR_LEN;
385
+ var ptr1 = isLikeNone(base_url) ? 0 : passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
386
+ var len1 = WASM_VECTOR_LEN;
387
+ const ret = wasm.manageclient_withAuthenticator(ptr0, len0, get_auth_header, isLikeNone(invalidate_cache) ? 0 : addToExternrefTable0(invalidate_cache), ptr1, len1);
388
+ return ManageClient.__wrap(ret);
389
+ }
258
390
  /**
259
391
  * @param {string} project_id
260
392
  * @param {string} project_key
@@ -274,7 +406,183 @@ export class ManageClient {
274
406
  }
275
407
  if (Symbol.dispose) ManageClient.prototype[Symbol.dispose] = ManageClient.prototype.free;
276
408
 
409
+ export class ModelContentKeys {
410
+ static __wrap(ptr) {
411
+ const obj = Object.create(ModelContentKeys.prototype);
412
+ obj.__wbg_ptr = ptr;
413
+ ModelContentKeysFinalization.register(obj, obj.__wbg_ptr, obj);
414
+ return obj;
415
+ }
416
+ __destroy_into_raw() {
417
+ const ptr = this.__wbg_ptr;
418
+ this.__wbg_ptr = 0;
419
+ ModelContentKeysFinalization.unregister(this);
420
+ return ptr;
421
+ }
422
+ free() {
423
+ const ptr = this.__destroy_into_raw();
424
+ wasm.__wbg_modelcontentkeys_free(ptr, 0);
425
+ }
426
+ /**
427
+ * @returns {number}
428
+ */
429
+ get keyId() {
430
+ const ret = wasm.modelcontentkeys_keyId(this.__wbg_ptr);
431
+ return ret >>> 0;
432
+ }
433
+ }
434
+ if (Symbol.dispose) ModelContentKeys.prototype[Symbol.dispose] = ModelContentKeys.prototype.free;
435
+
436
+ export class ModelKeyExchange {
437
+ __destroy_into_raw() {
438
+ const ptr = this.__wbg_ptr;
439
+ this.__wbg_ptr = 0;
440
+ ModelKeyExchangeFinalization.unregister(this);
441
+ return ptr;
442
+ }
443
+ free() {
444
+ const ptr = this.__destroy_into_raw();
445
+ wasm.__wbg_modelkeyexchange_free(ptr, 0);
446
+ }
447
+ /**
448
+ * @param {string} sku
449
+ * @returns {string}
450
+ */
451
+ capabilityQuery(sku) {
452
+ let deferred2_0;
453
+ let deferred2_1;
454
+ try {
455
+ const ptr0 = passStringToWasm0(sku, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
456
+ const len0 = WASM_VECTOR_LEN;
457
+ const ret = wasm.modelkeyexchange_capabilityQuery(this.__wbg_ptr, ptr0, len0);
458
+ deferred2_0 = ret[0];
459
+ deferred2_1 = ret[1];
460
+ return getStringFromWasm0(ret[0], ret[1]);
461
+ } finally {
462
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
463
+ }
464
+ }
465
+ constructor() {
466
+ const ret = wasm.modelkeyexchange_new();
467
+ if (ret[2]) {
468
+ throw takeFromExternrefTable0(ret[1]);
469
+ }
470
+ this.__wbg_ptr = ret[0];
471
+ ModelKeyExchangeFinalization.register(this, this.__wbg_ptr, this);
472
+ return this;
473
+ }
474
+ /**
475
+ * @param {string} response_json
476
+ * @param {string} sku
477
+ * @param {string} project_id
478
+ * @returns {ModelContentKeys}
479
+ */
480
+ unwrap(response_json, sku, project_id) {
481
+ const ptr = this.__destroy_into_raw();
482
+ const ptr0 = passStringToWasm0(response_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
483
+ const len0 = WASM_VECTOR_LEN;
484
+ const ptr1 = passStringToWasm0(sku, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
485
+ const len1 = WASM_VECTOR_LEN;
486
+ const ptr2 = passStringToWasm0(project_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
487
+ const len2 = WASM_VECTOR_LEN;
488
+ const ret = wasm.modelkeyexchange_unwrap(ptr, ptr0, len0, ptr1, len1, ptr2, len2);
489
+ if (ret[2]) {
490
+ throw takeFromExternrefTable0(ret[1]);
491
+ }
492
+ return ModelContentKeys.__wrap(ret[0]);
493
+ }
494
+ }
495
+ if (Symbol.dispose) ModelKeyExchange.prototype[Symbol.dispose] = ModelKeyExchange.prototype.free;
496
+
497
+ export class ProjectKeyAuthenticator {
498
+ __destroy_into_raw() {
499
+ const ptr = this.__wbg_ptr;
500
+ this.__wbg_ptr = 0;
501
+ ProjectKeyAuthenticatorFinalization.unregister(this);
502
+ return ptr;
503
+ }
504
+ free() {
505
+ const ptr = this.__destroy_into_raw();
506
+ wasm.__wbg_projectkeyauthenticator_free(ptr, 0);
507
+ }
508
+ /**
509
+ * @returns {Promise<any>}
510
+ */
511
+ getAuthHeader() {
512
+ const ret = wasm.projectkeyauthenticator_getAuthHeader(this.__wbg_ptr);
513
+ return ret;
514
+ }
515
+ /**
516
+ * @returns {Promise<any>}
517
+ */
518
+ invalidate() {
519
+ const ret = wasm.projectkeyauthenticator_invalidate(this.__wbg_ptr);
520
+ return ret;
521
+ }
522
+ /**
523
+ * @param {string} project_id
524
+ * @param {string} project_key
525
+ */
526
+ constructor(project_id, project_key) {
527
+ const ptr0 = passStringToWasm0(project_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
528
+ const len0 = WASM_VECTOR_LEN;
529
+ const ptr1 = passStringToWasm0(project_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
530
+ const len1 = WASM_VECTOR_LEN;
531
+ const ret = wasm.projectkeyauthenticator_new(ptr0, len0, ptr1, len1);
532
+ this.__wbg_ptr = ret;
533
+ ProjectKeyAuthenticatorFinalization.register(this, this.__wbg_ptr, this);
534
+ return this;
535
+ }
536
+ }
537
+ if (Symbol.dispose) ProjectKeyAuthenticator.prototype[Symbol.dispose] = ProjectKeyAuthenticator.prototype.free;
538
+
539
+ export class SealedModel {
540
+ static __wrap(ptr) {
541
+ const obj = Object.create(SealedModel.prototype);
542
+ obj.__wbg_ptr = ptr;
543
+ SealedModelFinalization.register(obj, obj.__wbg_ptr, obj);
544
+ return obj;
545
+ }
546
+ __destroy_into_raw() {
547
+ const ptr = this.__wbg_ptr;
548
+ this.__wbg_ptr = 0;
549
+ SealedModelFinalization.unregister(this);
550
+ return ptr;
551
+ }
552
+ free() {
553
+ const ptr = this.__destroy_into_raw();
554
+ wasm.__wbg_sealedmodel_free(ptr, 0);
555
+ }
556
+ /**
557
+ * @returns {Uint8Array}
558
+ */
559
+ takeGraph() {
560
+ const ret = wasm.sealedmodel_takeGraph(this.__wbg_ptr);
561
+ if (ret[2]) {
562
+ throw takeFromExternrefTable0(ret[1]);
563
+ }
564
+ return takeFromExternrefTable0(ret[0]);
565
+ }
566
+ /**
567
+ * @returns {Tokenizer}
568
+ */
569
+ takeTokenizer() {
570
+ const ret = wasm.sealedmodel_takeTokenizer(this.__wbg_ptr);
571
+ if (ret[2]) {
572
+ throw takeFromExternrefTable0(ret[1]);
573
+ }
574
+ return Tokenizer.__wrap(ret[0]);
575
+ }
576
+ }
577
+ if (Symbol.dispose) SealedModel.prototype[Symbol.dispose] = SealedModel.prototype.free;
578
+
277
579
  export class Tokenizer {
580
+ static __wrap(ptr) {
581
+ const obj = Object.create(Tokenizer.prototype);
582
+ obj.__wbg_ptr = ptr;
583
+ TokenizerFinalization.register(obj, obj.__wbg_ptr, obj);
584
+ return obj;
585
+ }
278
586
  __destroy_into_raw() {
279
587
  const ptr = this.__wbg_ptr;
280
588
  this.__wbg_ptr = 0;
@@ -295,7 +603,7 @@ export class Tokenizer {
295
603
  if (ret[2]) {
296
604
  throw takeFromExternrefTable0(ret[1]);
297
605
  }
298
- this.__wbg_ptr = ret[0] >>> 0;
606
+ this.__wbg_ptr = ret[0];
299
607
  TokenizerFinalization.register(this, this.__wbg_ptr, this);
300
608
  return this;
301
609
  }
@@ -315,6 +623,25 @@ export class Tokenizer {
315
623
  }
316
624
  if (Symbol.dispose) Tokenizer.prototype[Symbol.dispose] = Tokenizer.prototype.free;
317
625
 
626
+ /**
627
+ * @param {Uint8Array} bytes
628
+ * @param {ModelContentKeys} keys
629
+ * @param {string} sku
630
+ * @returns {SealedModel}
631
+ */
632
+ export function openSealedModel(bytes, keys, sku) {
633
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
634
+ const len0 = WASM_VECTOR_LEN;
635
+ _assertClass(keys, ModelContentKeys);
636
+ const ptr1 = passStringToWasm0(sku, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
637
+ const len1 = WASM_VECTOR_LEN;
638
+ const ret = wasm.openSealedModel(ptr0, len0, keys.__wbg_ptr, ptr1, len1);
639
+ if (ret[2]) {
640
+ throw takeFromExternrefTable0(ret[1]);
641
+ }
642
+ return SealedModel.__wrap(ret[0]);
643
+ }
644
+
318
645
  /**
319
646
  * @param {Float32Array} token_embeddings
320
647
  * @param {Int32Array} attention_mask
@@ -353,11 +680,11 @@ export function sdk_version() {
353
680
  function __wbg_get_imports() {
354
681
  const import0 = {
355
682
  __proto__: null,
356
- __wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
683
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
357
684
  const ret = Error(getStringFromWasm0(arg0, arg1));
358
685
  return ret;
359
686
  },
360
- __wbg_Number_32bf70a599af1d4b: function(arg0) {
687
+ __wbg_Number_9a4e0ecb0fa16705: function(arg0) {
361
688
  const ret = Number(arg0);
362
689
  return ret;
363
690
  },
@@ -368,68 +695,68 @@ function __wbg_get_imports() {
368
695
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
369
696
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
370
697
  },
371
- __wbg___wbindgen_bigint_get_as_i64_3d3aba5d616c6a51: function(arg0, arg1) {
698
+ __wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
372
699
  const v = arg1;
373
700
  const ret = typeof(v) === 'bigint' ? v : undefined;
374
701
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
375
702
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
376
703
  },
377
- __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff: function(arg0) {
704
+ __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
378
705
  const v = arg0;
379
706
  const ret = typeof(v) === 'boolean' ? v : undefined;
380
707
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
381
708
  },
382
- __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
709
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
383
710
  const ret = debugString(arg1);
384
711
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
385
712
  const len1 = WASM_VECTOR_LEN;
386
713
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
387
714
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
388
715
  },
389
- __wbg___wbindgen_in_a5d8b22e52b24dd1: function(arg0, arg1) {
716
+ __wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
390
717
  const ret = arg0 in arg1;
391
718
  return ret;
392
719
  },
393
- __wbg___wbindgen_is_bigint_ec25c7f91b4d9e93: function(arg0) {
720
+ __wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
394
721
  const ret = typeof(arg0) === 'bigint';
395
722
  return ret;
396
723
  },
397
- __wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
724
+ __wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
398
725
  const ret = typeof(arg0) === 'function';
399
726
  return ret;
400
727
  },
401
- __wbg___wbindgen_is_null_52ff4ec04186736f: function(arg0) {
728
+ __wbg___wbindgen_is_null_ea9085d691f535d3: function(arg0) {
402
729
  const ret = arg0 === null;
403
730
  return ret;
404
731
  },
405
- __wbg___wbindgen_is_object_63322ec0cd6ea4ef: function(arg0) {
732
+ __wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
406
733
  const val = arg0;
407
734
  const ret = typeof(val) === 'object' && val !== null;
408
735
  return ret;
409
736
  },
410
- __wbg___wbindgen_is_string_6df3bf7ef1164ed3: function(arg0) {
737
+ __wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
411
738
  const ret = typeof(arg0) === 'string';
412
739
  return ret;
413
740
  },
414
- __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
741
+ __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
415
742
  const ret = arg0 === undefined;
416
743
  return ret;
417
744
  },
418
- __wbg___wbindgen_jsval_eq_d3465d8a07697228: function(arg0, arg1) {
745
+ __wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
419
746
  const ret = arg0 === arg1;
420
747
  return ret;
421
748
  },
422
- __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c: function(arg0, arg1) {
749
+ __wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
423
750
  const ret = arg0 == arg1;
424
751
  return ret;
425
752
  },
426
- __wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
753
+ __wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
427
754
  const obj = arg1;
428
755
  const ret = typeof(obj) === 'number' ? obj : undefined;
429
756
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
430
757
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
431
758
  },
432
- __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
759
+ __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
433
760
  const obj = arg1;
434
761
  const ret = typeof(obj) === 'string' ? obj : undefined;
435
762
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -437,73 +764,80 @@ function __wbg_get_imports() {
437
764
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
438
765
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
439
766
  },
440
- __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
767
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
441
768
  throw new Error(getStringFromWasm0(arg0, arg1));
442
769
  },
443
- __wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) {
770
+ __wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
444
771
  arg0._wbg_cb_unref();
445
772
  },
446
- __wbg_abort_4ce5b484434ef6fd: function(arg0) {
773
+ __wbg_abort_8bae0f33e7833997: function(arg0) {
447
774
  arg0.abort();
448
775
  },
449
- __wbg_append_e8fc56ce7c00e874: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
776
+ __wbg_abort_eee9248a6d680839: function(arg0, arg1) {
777
+ arg0.abort(arg1);
778
+ },
779
+ __wbg_append_01c74e5c6b58aa64: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
450
780
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
451
781
  }, arguments); },
452
- __wbg_arrayBuffer_848c392b70c67d3d: function() { return handleError(function (arg0) {
782
+ __wbg_arrayBuffer_3b637f0fa65c5351: function() { return handleError(function (arg0) {
453
783
  const ret = arg0.arrayBuffer();
454
784
  return ret;
455
785
  }, arguments); },
456
- __wbg_call_14b169f759b26747: function() { return handleError(function (arg0, arg1) {
786
+ __wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
457
787
  const ret = arg0.call(arg1);
458
788
  return ret;
459
789
  }, arguments); },
460
- __wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) {
790
+ __wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
461
791
  const ret = arg0.call(arg1, arg2);
462
792
  return ret;
463
793
  }, arguments); },
464
- __wbg_call_bb28efe6b2f55b86: function() { return handleError(function (arg0, arg1, arg2, arg3) {
794
+ __wbg_call_e3b662382210db98: function() { return handleError(function (arg0, arg1, arg2, arg3) {
465
795
  const ret = arg0.call(arg1, arg2, arg3);
466
796
  return ret;
467
797
  }, arguments); },
468
- __wbg_done_9158f7cc8751ba32: function(arg0) {
798
+ __wbg_clearTimeout_6b8d9a38b9263d65: function(arg0) {
799
+ const ret = clearTimeout(arg0);
800
+ return ret;
801
+ },
802
+ __wbg_done_89b2b13e91a60321: function(arg0) {
469
803
  const ret = arg0.done;
470
804
  return ret;
471
805
  },
472
- __wbg_entries_e0b73aa8571ddb56: function(arg0) {
806
+ __wbg_entries_015dc610cd81ede0: function(arg0) {
473
807
  const ret = Object.entries(arg0);
474
808
  return ret;
475
809
  },
476
- __wbg_fetch_0d322c0aed196b8b: function(arg0, arg1) {
477
- const ret = arg0.fetch(arg1);
810
+ __wbg_fetch_9dad4fe911207b37: function(arg0) {
811
+ const ret = fetch(arg0);
478
812
  return ret;
479
813
  },
480
- __wbg_fetch_fda7bc27c982b1f3: function(arg0) {
481
- const ret = fetch(arg0);
814
+ __wbg_fetch_b5951fc96f52f786: function(arg0, arg1) {
815
+ const ret = arg0.fetch(arg1);
482
816
  return ret;
483
817
  },
484
818
  __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
485
819
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
486
820
  }, arguments); },
487
- __wbg_getRandomValues_ef12552bf5acd2fe: function() { return handleError(function (arg0, arg1) {
821
+ __wbg_getRandomValues_bf16787eede473f5: function() { return handleError(function (arg0, arg1) {
488
822
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
489
823
  }, arguments); },
490
- __wbg_getTime_da7c55f52b71e8c6: function(arg0) {
824
+ __wbg_getTime_d6f070c088c9b5ed: function(arg0) {
491
825
  const ret = arg0.getTime();
492
826
  return ret;
493
827
  },
494
- __wbg_get_1affdbdd5573b16a: function() { return handleError(function (arg0, arg1) {
828
+ __wbg_get_507a50627bffa49b: function(arg0, arg1) {
829
+ const ret = arg0[arg1 >>> 0];
830
+ return ret;
831
+ },
832
+ __wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
495
833
  const ret = Reflect.get(arg0, arg1);
496
834
  return ret;
497
835
  }, arguments); },
498
- __wbg_get_6011fa3a58f61074: function() { return handleError(function (arg0, arg1) {
836
+ __wbg_get_c7eb1f358a7654df: function() { return handleError(function (arg0, arg1) {
499
837
  const ret = Reflect.get(arg0, arg1);
500
838
  return ret;
501
839
  }, arguments); },
502
- __wbg_get_8360291721e2339f: function(arg0, arg1) {
503
- const ret = arg0[arg1 >>> 0];
504
- return ret;
505
- },
506
- __wbg_get_unchecked_17f53dad852b9588: function(arg0, arg1) {
840
+ __wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
507
841
  const ret = arg0[arg1 >>> 0];
508
842
  return ret;
509
843
  },
@@ -511,15 +845,15 @@ function __wbg_get_imports() {
511
845
  const ret = arg0[arg1];
512
846
  return ret;
513
847
  },
514
- __wbg_has_880f1d472f7cecba: function() { return handleError(function (arg0, arg1) {
848
+ __wbg_has_8374cf06984d8bfc: function() { return handleError(function (arg0, arg1) {
515
849
  const ret = Reflect.has(arg0, arg1);
516
850
  return ret;
517
851
  }, arguments); },
518
- __wbg_headers_6022deb4e576fb8e: function(arg0) {
852
+ __wbg_headers_cf9c80f30e2a4eff: function(arg0) {
519
853
  const ret = arg0.headers;
520
854
  return ret;
521
855
  },
522
- __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
856
+ __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
523
857
  let result;
524
858
  try {
525
859
  result = arg0 instanceof ArrayBuffer;
@@ -529,7 +863,17 @@ function __wbg_get_imports() {
529
863
  const ret = result;
530
864
  return ret;
531
865
  },
532
- __wbg_instanceof_Map_1b76fd4635be43eb: function(arg0) {
866
+ __wbg_instanceof_Error_1fdac9f13a8181ba: function(arg0) {
867
+ let result;
868
+ try {
869
+ result = arg0 instanceof Error;
870
+ } catch (_) {
871
+ result = false;
872
+ }
873
+ const ret = result;
874
+ return ret;
875
+ },
876
+ __wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
533
877
  let result;
534
878
  try {
535
879
  result = arg0 instanceof Map;
@@ -539,7 +883,17 @@ function __wbg_get_imports() {
539
883
  const ret = result;
540
884
  return ret;
541
885
  },
542
- __wbg_instanceof_Response_9b2d111407865ff2: function(arg0) {
886
+ __wbg_instanceof_Promise_4cb210c0b8f8c959: function(arg0) {
887
+ let result;
888
+ try {
889
+ result = arg0 instanceof Promise;
890
+ } catch (_) {
891
+ result = false;
892
+ }
893
+ const ret = result;
894
+ return ret;
895
+ },
896
+ __wbg_instanceof_Response_c8b64b2256f01bec: function(arg0) {
543
897
  let result;
544
898
  try {
545
899
  result = arg0 instanceof Response;
@@ -549,7 +903,7 @@ function __wbg_get_imports() {
549
903
  const ret = result;
550
904
  return ret;
551
905
  },
552
- __wbg_instanceof_Uint8Array_152ba1f289edcf3f: function(arg0) {
906
+ __wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
553
907
  let result;
554
908
  try {
555
909
  result = arg0 instanceof Uint8Array;
@@ -559,34 +913,58 @@ function __wbg_get_imports() {
559
913
  const ret = result;
560
914
  return ret;
561
915
  },
562
- __wbg_isArray_c3109d14ffc06469: function(arg0) {
916
+ __wbg_isArray_0677c962b281d01a: function(arg0) {
563
917
  const ret = Array.isArray(arg0);
564
918
  return ret;
565
919
  },
566
- __wbg_isSafeInteger_4fc213d1989d6d2a: function(arg0) {
920
+ __wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
567
921
  const ret = Number.isSafeInteger(arg0);
568
922
  return ret;
569
923
  },
570
- __wbg_iterator_013bc09ec998c2a7: function() {
924
+ __wbg_iterator_6f722e4a93058b71: function() {
571
925
  const ret = Symbol.iterator;
572
926
  return ret;
573
927
  },
574
- __wbg_length_3d4ecd04bd8d22f1: function(arg0) {
928
+ __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
575
929
  const ret = arg0.length;
576
930
  return ret;
577
931
  },
578
- __wbg_length_9f1775224cf1d815: function(arg0) {
932
+ __wbg_length_370319915dc99107: function(arg0) {
579
933
  const ret = arg0.length;
580
934
  return ret;
581
935
  },
582
- __wbg_new_036bd6cd9cea9e73: function(arg0, arg1) {
936
+ __wbg_message_8326fb1d549bebc5: function(arg0) {
937
+ const ret = arg0.message;
938
+ return ret;
939
+ },
940
+ __wbg_new_0_3da9e97f24fc69be: function() {
941
+ const ret = new Date();
942
+ return ret;
943
+ },
944
+ __wbg_new_0d809930cd1354c6: function() { return handleError(function () {
945
+ const ret = new Headers();
946
+ return ret;
947
+ }, arguments); },
948
+ __wbg_new_32b398fb48b6d94a: function() {
949
+ const ret = new Array();
950
+ return ret;
951
+ },
952
+ __wbg_new_4339b2a2675a03e3: function() { return handleError(function () {
953
+ const ret = new AbortController();
954
+ return ret;
955
+ }, arguments); },
956
+ __wbg_new_7796ffc7ed656783: function() {
957
+ const ret = new Map();
958
+ return ret;
959
+ },
960
+ __wbg_new_aec3e25493d729fe: function(arg0, arg1) {
583
961
  try {
584
962
  var state0 = {a: arg0, b: arg1};
585
963
  var cb0 = (arg0, arg1) => {
586
964
  const a = state0.a;
587
965
  state0.a = 0;
588
966
  try {
589
- return wasm_bindgen__convert__closures_____invoke__h068729b61954c03c(a, state0.b, arg0, arg1);
967
+ return wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(a, state0.b, arg0, arg1);
590
968
  } finally {
591
969
  state0.a = a;
592
970
  }
@@ -597,46 +975,26 @@ function __wbg_get_imports() {
597
975
  state0.a = 0;
598
976
  }
599
977
  },
600
- __wbg_new_0_4d657201ced14de3: function() {
601
- const ret = new Date();
602
- return ret;
603
- },
604
- __wbg_new_0c7403db6e782f19: function(arg0) {
978
+ __wbg_new_cd45aabdf6073e84: function(arg0) {
605
979
  const ret = new Uint8Array(arg0);
606
980
  return ret;
607
981
  },
608
- __wbg_new_15a4889b4b90734d: function() { return handleError(function () {
609
- const ret = new Headers();
610
- return ret;
611
- }, arguments); },
612
- __wbg_new_34d45cc8e36aaead: function() {
613
- const ret = new Map();
614
- return ret;
615
- },
616
- __wbg_new_682678e2f47e32bc: function() {
617
- const ret = new Array();
618
- return ret;
619
- },
620
- __wbg_new_98c22165a42231aa: function() { return handleError(function () {
621
- const ret = new AbortController();
622
- return ret;
623
- }, arguments); },
624
- __wbg_new_aa8d0fa9762c29bd: function() {
982
+ __wbg_new_da52cf8fe3429cb2: function() {
625
983
  const ret = new Object();
626
984
  return ret;
627
985
  },
628
- __wbg_new_from_slice_b5ea43e23f6008c0: function(arg0, arg1) {
986
+ __wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
629
987
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
630
988
  return ret;
631
989
  },
632
- __wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) {
990
+ __wbg_new_typed_1824d93f294193e5: function(arg0, arg1) {
633
991
  try {
634
992
  var state0 = {a: arg0, b: arg1};
635
993
  var cb0 = (arg0, arg1) => {
636
994
  const a = state0.a;
637
995
  state0.a = 0;
638
996
  try {
639
- return wasm_bindgen__convert__closures_____invoke__h068729b61954c03c(a, state0.b, arg0, arg1);
997
+ return wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(a, state0.b, arg0, arg1);
640
998
  } finally {
641
999
  state0.a = a;
642
1000
  }
@@ -647,136 +1005,148 @@ function __wbg_get_imports() {
647
1005
  state0.a = 0;
648
1006
  }
649
1007
  },
650
- __wbg_new_with_str_and_init_897be1708e42f39d: function() { return handleError(function (arg0, arg1, arg2) {
1008
+ __wbg_new_with_str_and_init_d95cbe11ce28e65e: function() { return handleError(function (arg0, arg1, arg2) {
651
1009
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
652
1010
  return ret;
653
1011
  }, arguments); },
654
- __wbg_next_0340c4ae324393c3: function() { return handleError(function (arg0) {
655
- const ret = arg0.next();
656
- return ret;
657
- }, arguments); },
658
- __wbg_next_7646edaa39458ef7: function(arg0) {
1012
+ __wbg_next_6dbf2c0ac8cde20f: function(arg0) {
659
1013
  const ret = arg0.next;
660
1014
  return ret;
661
1015
  },
662
- __wbg_now_a9b7df1cbee90986: function() {
1016
+ __wbg_next_71f2aa1cb3d1e37e: function() { return handleError(function (arg0) {
1017
+ const ret = arg0.next();
1018
+ return ret;
1019
+ }, arguments); },
1020
+ __wbg_now_86c0d4ba3fa605b8: function() {
663
1021
  const ret = Date.now();
664
1022
  return ret;
665
1023
  },
666
- __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
1024
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
667
1025
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
668
1026
  },
669
- __wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) {
670
- queueMicrotask(arg0);
671
- },
672
- __wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) {
1027
+ __wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
673
1028
  const ret = arg0.queueMicrotask;
674
1029
  return ret;
675
1030
  },
676
- __wbg_resolve_e6c466bc1052f16c: function(arg0) {
1031
+ __wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
1032
+ queueMicrotask(arg0);
1033
+ },
1034
+ __wbg_resolve_2191a4dfe481c25b: function(arg0) {
677
1035
  const ret = Promise.resolve(arg0);
678
1036
  return ret;
679
1037
  },
680
- __wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
681
- arg0[arg1 >>> 0] = arg2;
1038
+ __wbg_setTimeout_f757f00851f76c42: function(arg0, arg1) {
1039
+ const ret = setTimeout(arg0, arg1);
1040
+ return ret;
1041
+ },
1042
+ __wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
1043
+ const ret = arg0.set(arg1, arg2);
1044
+ return ret;
682
1045
  },
683
1046
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
684
1047
  arg0[arg1] = arg2;
685
1048
  },
686
- __wbg_set_body_be11680f34217f75: function(arg0, arg1) {
1049
+ __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
1050
+ arg0[arg1 >>> 0] = arg2;
1051
+ },
1052
+ __wbg_set_body_029f2d171e0a005f: function(arg0, arg1) {
687
1053
  arg0.body = arg1;
688
1054
  },
689
- __wbg_set_credentials_6577be90e0e85eb6: function(arg0, arg1) {
690
- arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1055
+ __wbg_set_cache_b4a740b195c051f4: function(arg0, arg1) {
1056
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
691
1057
  },
692
- __wbg_set_fde2cec06c23692b: function(arg0, arg1, arg2) {
693
- const ret = arg0.set(arg1, arg2);
694
- return ret;
1058
+ __wbg_set_credentials_bb34a40189e3b43b: function(arg0, arg1) {
1059
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
695
1060
  },
696
- __wbg_set_headers_50fc01786240a440: function(arg0, arg1) {
1061
+ __wbg_set_headers_9c61d123c3ee1f10: function(arg0, arg1) {
697
1062
  arg0.headers = arg1;
698
1063
  },
699
- __wbg_set_method_c9f1f985f6b6c427: function(arg0, arg1, arg2) {
1064
+ __wbg_set_method_5532d59b92d76467: function(arg0, arg1, arg2) {
700
1065
  arg0.method = getStringFromWasm0(arg1, arg2);
701
1066
  },
702
- __wbg_set_mode_5e08d503428c06b9: function(arg0, arg1) {
1067
+ __wbg_set_mode_66c79886ad78fc05: function(arg0, arg1) {
703
1068
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
704
1069
  },
705
- __wbg_set_signal_1d4e73c2305a0e7c: function(arg0, arg1) {
1070
+ __wbg_set_signal_c4ef8faddb4c1446: function(arg0, arg1) {
706
1071
  arg0.signal = arg1;
707
1072
  },
708
- __wbg_signal_fdc54643b47bf85b: function(arg0) {
1073
+ __wbg_signal_dad7cb35193abd31: function(arg0) {
709
1074
  const ret = arg0.signal;
710
1075
  return ret;
711
1076
  },
712
- __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
1077
+ __wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
713
1078
  const ret = typeof global === 'undefined' ? null : global;
714
1079
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
715
1080
  },
716
- __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
1081
+ __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
717
1082
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
718
1083
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
719
1084
  },
720
- __wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
1085
+ __wbg_static_accessor_SELF_146583524fe1469b: function() {
721
1086
  const ret = typeof self === 'undefined' ? null : self;
722
1087
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
723
1088
  },
724
- __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
1089
+ __wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
725
1090
  const ret = typeof window === 'undefined' ? null : window;
726
1091
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
727
1092
  },
728
- __wbg_status_43e0d2f15b22d69f: function(arg0) {
1093
+ __wbg_status_c45b3b9b3033184a: function(arg0) {
729
1094
  const ret = arg0.status;
730
1095
  return ret;
731
1096
  },
732
- __wbg_stringify_91082ed7a5a5769e: function() { return handleError(function (arg0) {
1097
+ __wbg_stringify_b54333f60f1e4dad: function() { return handleError(function (arg0) {
733
1098
  const ret = JSON.stringify(arg0);
734
1099
  return ret;
735
1100
  }, arguments); },
736
- __wbg_text_595ef75535aa25c1: function() { return handleError(function (arg0) {
1101
+ __wbg_text_d3a29f7525a132c3: function() { return handleError(function (arg0) {
737
1102
  const ret = arg0.text();
738
1103
  return ret;
739
1104
  }, arguments); },
740
- __wbg_then_792e0c862b060889: function(arg0, arg1, arg2) {
1105
+ __wbg_then_16d107c451e9905d: function(arg0, arg1, arg2) {
741
1106
  const ret = arg0.then(arg1, arg2);
742
1107
  return ret;
743
1108
  },
744
- __wbg_then_8e16ee11f05e4827: function(arg0, arg1) {
1109
+ __wbg_then_6ec10ae38b3e92f7: function(arg0, arg1) {
745
1110
  const ret = arg0.then(arg1);
746
1111
  return ret;
747
1112
  },
748
- __wbg_url_2bf741820e6563a0: function(arg0, arg1) {
1113
+ __wbg_url_abdb8fb08377f8c0: function(arg0, arg1) {
749
1114
  const ret = arg1.url;
750
1115
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
751
1116
  const len1 = WASM_VECTOR_LEN;
752
1117
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
753
1118
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
754
1119
  },
755
- __wbg_value_ee3a06f4579184fa: function(arg0) {
1120
+ __wbg_value_a5d5488a9589444a: function(arg0) {
756
1121
  const ret = arg0.value;
757
1122
  return ret;
758
1123
  },
759
1124
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
760
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1720, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
761
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2c99d349e8a87fd1);
1125
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 155, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1126
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_);
762
1127
  return ret;
763
1128
  },
764
- __wbindgen_cast_0000000000000002: function(arg0) {
1129
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1130
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 305, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1131
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_);
1132
+ return ret;
1133
+ },
1134
+ __wbindgen_cast_0000000000000003: function(arg0) {
765
1135
  // Cast intrinsic for `F64 -> Externref`.
766
1136
  const ret = arg0;
767
1137
  return ret;
768
1138
  },
769
- __wbindgen_cast_0000000000000003: function(arg0) {
1139
+ __wbindgen_cast_0000000000000004: function(arg0) {
770
1140
  // Cast intrinsic for `I64 -> Externref`.
771
1141
  const ret = arg0;
772
1142
  return ret;
773
1143
  },
774
- __wbindgen_cast_0000000000000004: function(arg0, arg1) {
1144
+ __wbindgen_cast_0000000000000005: function(arg0, arg1) {
775
1145
  // Cast intrinsic for `Ref(String) -> Externref`.
776
1146
  const ret = getStringFromWasm0(arg0, arg1);
777
1147
  return ret;
778
1148
  },
779
- __wbindgen_cast_0000000000000005: function(arg0) {
1149
+ __wbindgen_cast_0000000000000006: function(arg0) {
780
1150
  // Cast intrinsic for `U64 -> Externref`.
781
1151
  const ret = BigInt.asUintN(64, arg0);
782
1152
  return ret;
@@ -797,31 +1167,50 @@ function __wbg_get_imports() {
797
1167
  };
798
1168
  }
799
1169
 
800
- function wasm_bindgen__convert__closures_____invoke__h2c99d349e8a87fd1(arg0, arg1, arg2) {
801
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2c99d349e8a87fd1(arg0, arg1, arg2);
1170
+ function wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_(arg0, arg1) {
1171
+ wasm.wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_(arg0, arg1);
1172
+ }
1173
+
1174
+ function wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_(arg0, arg1, arg2) {
1175
+ const ret = wasm.wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_(arg0, arg1, arg2);
802
1176
  if (ret[1]) {
803
1177
  throw takeFromExternrefTable0(ret[0]);
804
1178
  }
805
1179
  }
806
1180
 
807
- function wasm_bindgen__convert__closures_____invoke__h068729b61954c03c(arg0, arg1, arg2, arg3) {
808
- wasm.wasm_bindgen__convert__closures_____invoke__h068729b61954c03c(arg0, arg1, arg2, arg3);
1181
+ function wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1182
+ wasm.wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
809
1183
  }
810
1184
 
811
1185
 
1186
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1187
+
1188
+
812
1189
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
813
1190
 
814
1191
 
815
1192
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
816
1193
  const IndexManagerFinalization = (typeof FinalizationRegistry === 'undefined')
817
1194
  ? { register: () => {}, unregister: () => {} }
818
- : new FinalizationRegistry(ptr => wasm.__wbg_indexmanager_free(ptr >>> 0, 1));
1195
+ : new FinalizationRegistry(ptr => wasm.__wbg_indexmanager_free(ptr, 1));
819
1196
  const ManageClientFinalization = (typeof FinalizationRegistry === 'undefined')
820
1197
  ? { register: () => {}, unregister: () => {} }
821
- : new FinalizationRegistry(ptr => wasm.__wbg_manageclient_free(ptr >>> 0, 1));
1198
+ : new FinalizationRegistry(ptr => wasm.__wbg_manageclient_free(ptr, 1));
1199
+ const ModelContentKeysFinalization = (typeof FinalizationRegistry === 'undefined')
1200
+ ? { register: () => {}, unregister: () => {} }
1201
+ : new FinalizationRegistry(ptr => wasm.__wbg_modelcontentkeys_free(ptr, 1));
1202
+ const ModelKeyExchangeFinalization = (typeof FinalizationRegistry === 'undefined')
1203
+ ? { register: () => {}, unregister: () => {} }
1204
+ : new FinalizationRegistry(ptr => wasm.__wbg_modelkeyexchange_free(ptr, 1));
1205
+ const ProjectKeyAuthenticatorFinalization = (typeof FinalizationRegistry === 'undefined')
1206
+ ? { register: () => {}, unregister: () => {} }
1207
+ : new FinalizationRegistry(ptr => wasm.__wbg_projectkeyauthenticator_free(ptr, 1));
1208
+ const SealedModelFinalization = (typeof FinalizationRegistry === 'undefined')
1209
+ ? { register: () => {}, unregister: () => {} }
1210
+ : new FinalizationRegistry(ptr => wasm.__wbg_sealedmodel_free(ptr, 1));
822
1211
  const TokenizerFinalization = (typeof FinalizationRegistry === 'undefined')
823
1212
  ? { register: () => {}, unregister: () => {} }
824
- : new FinalizationRegistry(ptr => wasm.__wbg_tokenizer_free(ptr >>> 0, 1));
1213
+ : new FinalizationRegistry(ptr => wasm.__wbg_tokenizer_free(ptr, 1));
825
1214
 
826
1215
  function addToExternrefTable0(obj) {
827
1216
  const idx = wasm.__externref_table_alloc();
@@ -829,6 +1218,12 @@ function addToExternrefTable0(obj) {
829
1218
  return idx;
830
1219
  }
831
1220
 
1221
+ function _assertClass(instance, klass) {
1222
+ if (!(instance instanceof klass)) {
1223
+ throw new Error(`expected instance of ${klass.name}`);
1224
+ }
1225
+ }
1226
+
832
1227
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
833
1228
  ? { register: () => {}, unregister: () => {} }
834
1229
  : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
@@ -925,8 +1320,7 @@ function getFloat32ArrayMemory0() {
925
1320
  }
926
1321
 
927
1322
  function getStringFromWasm0(ptr, len) {
928
- ptr = ptr >>> 0;
929
- return decodeText(ptr, len);
1323
+ return decodeText(ptr >>> 0, len);
930
1324
  }
931
1325
 
932
1326
  let cachedUint32ArrayMemory0 = null;
@@ -1089,8 +1483,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
1089
1483
 
1090
1484
  let WASM_VECTOR_LEN = 0;
1091
1485
 
1092
- let wasmModule, wasm;
1486
+ let wasmModule, wasmInstance, wasm;
1093
1487
  function __wbg_finalize_init(instance, module) {
1488
+ wasmInstance = instance;
1094
1489
  wasm = instance.exports;
1095
1490
  wasmModule = module;
1096
1491
  cachedDataViewMemory0 = null;
package/moss_wasm_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@moss-dev/moss-wasm",
3
3
  "type": "module",
4
4
  "description": "Moss WASM bindings for in-browser semantic search",
5
- "version": "0.10.0",
5
+ "version": "0.15.0",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "repository": {
8
8
  "type": "git",