@perspective-dev/client 4.1.1 → 4.2.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/dist/cdn/perspective.js +2 -2
- package/dist/cdn/perspective.js.map +4 -4
- package/dist/esm/perspective.browser.d.ts +4 -0
- package/dist/esm/perspective.inline.js +2 -2
- package/dist/esm/perspective.inline.js.map +4 -4
- package/dist/esm/perspective.js +2 -2
- package/dist/esm/perspective.js.map +4 -4
- package/dist/esm/perspective.node.d.ts +9 -0
- package/dist/esm/perspective.node.js +1629 -1291
- package/dist/esm/perspective.node.js.map +3 -3
- package/dist/esm/virtual_server.d.ts +1 -8
- package/dist/esm/virtual_servers/clickhouse.js +2 -0
- package/dist/esm/virtual_servers/clickhouse.js.map +7 -0
- package/dist/esm/virtual_servers/duckdb.d.ts +21 -7
- package/dist/esm/virtual_servers/duckdb.js +1 -11
- package/dist/esm/virtual_servers/duckdb.js.map +3 -3
- package/dist/wasm/perspective-js.d.ts +723 -647
- package/dist/wasm/perspective-js.js +2115 -1841
- package/dist/wasm/perspective-js.wasm +0 -0
- package/dist/wasm/perspective-js.wasm.d.ts +61 -49
- package/package.json +2 -1
- package/src/rust/generic_sql_model.rs +189 -0
- package/src/rust/lib.rs +2 -2
- package/src/rust/utils/console_logger.rs +4 -4
- package/src/rust/virtual_server.rs +50 -46
- package/src/ts/perspective.browser.ts +15 -2
- package/src/ts/perspective.node.ts +21 -1
- package/src/ts/virtual_server.ts +4 -14
- package/src/ts/virtual_servers/clickhouse.ts +362 -0
- package/src/ts/virtual_servers/duckdb.ts +114 -292
|
@@ -18,267 +18,16 @@ import { createRequire } from "node:module";
|
|
|
18
18
|
var perspective_js_exports = {};
|
|
19
19
|
__export(perspective_js_exports, {
|
|
20
20
|
Client: () => Client,
|
|
21
|
-
|
|
22
|
-
JsVirtualServer: () => JsVirtualServer,
|
|
21
|
+
GenericSQLVirtualServerModel: () => GenericSQLVirtualServerModel,
|
|
23
22
|
ProxySession: () => ProxySession,
|
|
24
23
|
Table: () => Table,
|
|
25
24
|
View: () => View,
|
|
26
|
-
|
|
25
|
+
VirtualDataSlice: () => VirtualDataSlice,
|
|
26
|
+
VirtualServer: () => VirtualServer,
|
|
27
|
+
default: () => __wbg_init,
|
|
27
28
|
init: () => init,
|
|
28
29
|
initSync: () => initSync
|
|
29
30
|
});
|
|
30
|
-
var wasm;
|
|
31
|
-
var heap = new Array(128).fill(void 0);
|
|
32
|
-
heap.push(void 0, null, true, false);
|
|
33
|
-
function getObject(idx) {
|
|
34
|
-
return heap[idx];
|
|
35
|
-
}
|
|
36
|
-
var cachedUint8ArrayMemory0 = null;
|
|
37
|
-
function getUint8ArrayMemory0() {
|
|
38
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
39
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
40
|
-
}
|
|
41
|
-
return cachedUint8ArrayMemory0;
|
|
42
|
-
}
|
|
43
|
-
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
44
|
-
cachedTextDecoder.decode();
|
|
45
|
-
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
46
|
-
var numBytesDecoded = 0;
|
|
47
|
-
function decodeText(ptr, len) {
|
|
48
|
-
numBytesDecoded += len;
|
|
49
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
50
|
-
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
51
|
-
cachedTextDecoder.decode();
|
|
52
|
-
numBytesDecoded = len;
|
|
53
|
-
}
|
|
54
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
55
|
-
}
|
|
56
|
-
function getStringFromWasm0(ptr, len) {
|
|
57
|
-
ptr = ptr >>> 0;
|
|
58
|
-
return decodeText(ptr, len);
|
|
59
|
-
}
|
|
60
|
-
function getCachedStringFromWasm0(ptr, len) {
|
|
61
|
-
if (ptr === 0) {
|
|
62
|
-
return getObject(len);
|
|
63
|
-
} else {
|
|
64
|
-
return getStringFromWasm0(ptr, len);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
var heap_next = heap.length;
|
|
68
|
-
function addHeapObject(obj) {
|
|
69
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
70
|
-
const idx = heap_next;
|
|
71
|
-
heap_next = heap[idx];
|
|
72
|
-
heap[idx] = obj;
|
|
73
|
-
return idx;
|
|
74
|
-
}
|
|
75
|
-
var WASM_VECTOR_LEN = 0;
|
|
76
|
-
var cachedTextEncoder = new TextEncoder();
|
|
77
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
78
|
-
if (realloc === void 0) {
|
|
79
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
80
|
-
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
81
|
-
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
82
|
-
WASM_VECTOR_LEN = buf.length;
|
|
83
|
-
return ptr2;
|
|
84
|
-
}
|
|
85
|
-
let len = arg.length;
|
|
86
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
87
|
-
const mem = getUint8ArrayMemory0();
|
|
88
|
-
let offset = 0;
|
|
89
|
-
for (; offset < len; offset++) {
|
|
90
|
-
const code = arg.charCodeAt(offset);
|
|
91
|
-
if (code > 127) break;
|
|
92
|
-
mem[ptr + offset] = code;
|
|
93
|
-
}
|
|
94
|
-
if (offset !== len) {
|
|
95
|
-
if (offset !== 0) {
|
|
96
|
-
arg = arg.slice(offset);
|
|
97
|
-
}
|
|
98
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
99
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
100
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
101
|
-
offset += ret.written;
|
|
102
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
103
|
-
}
|
|
104
|
-
WASM_VECTOR_LEN = offset;
|
|
105
|
-
return ptr;
|
|
106
|
-
}
|
|
107
|
-
var cachedDataViewMemory0 = null;
|
|
108
|
-
function getDataViewMemory0() {
|
|
109
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
110
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
111
|
-
}
|
|
112
|
-
return cachedDataViewMemory0;
|
|
113
|
-
}
|
|
114
|
-
function isLikeNone(x) {
|
|
115
|
-
return x === void 0 || x === null;
|
|
116
|
-
}
|
|
117
|
-
function debugString(val) {
|
|
118
|
-
const type = typeof val;
|
|
119
|
-
if (type == "number" || type == "boolean" || val == null) {
|
|
120
|
-
return `${val}`;
|
|
121
|
-
}
|
|
122
|
-
if (type == "string") {
|
|
123
|
-
return `"${val}"`;
|
|
124
|
-
}
|
|
125
|
-
if (type == "symbol") {
|
|
126
|
-
const description = val.description;
|
|
127
|
-
if (description == null) {
|
|
128
|
-
return "Symbol";
|
|
129
|
-
} else {
|
|
130
|
-
return `Symbol(${description})`;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (type == "function") {
|
|
134
|
-
const name = val.name;
|
|
135
|
-
if (typeof name == "string" && name.length > 0) {
|
|
136
|
-
return `Function(${name})`;
|
|
137
|
-
} else {
|
|
138
|
-
return "Function";
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (Array.isArray(val)) {
|
|
142
|
-
const length = val.length;
|
|
143
|
-
let debug = "[";
|
|
144
|
-
if (length > 0) {
|
|
145
|
-
debug += debugString(val[0]);
|
|
146
|
-
}
|
|
147
|
-
for (let i = 1; i < length; i++) {
|
|
148
|
-
debug += ", " + debugString(val[i]);
|
|
149
|
-
}
|
|
150
|
-
debug += "]";
|
|
151
|
-
return debug;
|
|
152
|
-
}
|
|
153
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
154
|
-
let className;
|
|
155
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
156
|
-
className = builtInMatches[1];
|
|
157
|
-
} else {
|
|
158
|
-
return toString.call(val);
|
|
159
|
-
}
|
|
160
|
-
if (className == "Object") {
|
|
161
|
-
try {
|
|
162
|
-
return "Object(" + JSON.stringify(val) + ")";
|
|
163
|
-
} catch (_) {
|
|
164
|
-
return "Object";
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if (val instanceof Error) {
|
|
168
|
-
return `${val.name}: ${val.message}
|
|
169
|
-
${val.stack}`;
|
|
170
|
-
}
|
|
171
|
-
return className;
|
|
172
|
-
}
|
|
173
|
-
function handleError(f, args) {
|
|
174
|
-
try {
|
|
175
|
-
return f.apply(this, args);
|
|
176
|
-
} catch (e) {
|
|
177
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
181
|
-
ptr = ptr >>> 0;
|
|
182
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
183
|
-
}
|
|
184
|
-
function dropObject(idx) {
|
|
185
|
-
if (idx < 132) return;
|
|
186
|
-
heap[idx] = heap_next;
|
|
187
|
-
heap_next = idx;
|
|
188
|
-
}
|
|
189
|
-
function takeObject(idx) {
|
|
190
|
-
const ret = getObject(idx);
|
|
191
|
-
dropObject(idx);
|
|
192
|
-
return ret;
|
|
193
|
-
}
|
|
194
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
195
|
-
ptr = ptr >>> 0;
|
|
196
|
-
const mem = getDataViewMemory0();
|
|
197
|
-
const result = [];
|
|
198
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
199
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
200
|
-
}
|
|
201
|
-
return result;
|
|
202
|
-
}
|
|
203
|
-
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
204
|
-
}, unregister: () => {
|
|
205
|
-
} } : new FinalizationRegistry((state) => state.dtor(state.a, state.b));
|
|
206
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
207
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
208
|
-
const real = (...args) => {
|
|
209
|
-
state.cnt++;
|
|
210
|
-
const a = state.a;
|
|
211
|
-
state.a = 0;
|
|
212
|
-
try {
|
|
213
|
-
return f(a, state.b, ...args);
|
|
214
|
-
} finally {
|
|
215
|
-
state.a = a;
|
|
216
|
-
real._wbg_cb_unref();
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
real._wbg_cb_unref = () => {
|
|
220
|
-
if (--state.cnt === 0) {
|
|
221
|
-
state.dtor(state.a, state.b);
|
|
222
|
-
state.a = 0;
|
|
223
|
-
CLOSURE_DTORS.unregister(state);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
227
|
-
return real;
|
|
228
|
-
}
|
|
229
|
-
function makeClosure(arg0, arg1, dtor, f) {
|
|
230
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
231
|
-
const real = (...args) => {
|
|
232
|
-
state.cnt++;
|
|
233
|
-
try {
|
|
234
|
-
return f(state.a, state.b, ...args);
|
|
235
|
-
} finally {
|
|
236
|
-
real._wbg_cb_unref();
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
real._wbg_cb_unref = () => {
|
|
240
|
-
if (--state.cnt === 0) {
|
|
241
|
-
state.dtor(state.a, state.b);
|
|
242
|
-
state.a = 0;
|
|
243
|
-
CLOSURE_DTORS.unregister(state);
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
247
|
-
return real;
|
|
248
|
-
}
|
|
249
|
-
function _assertClass(instance, klass) {
|
|
250
|
-
if (!(instance instanceof klass)) {
|
|
251
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
var stack_pointer = 128;
|
|
255
|
-
function addBorrowedObject(obj) {
|
|
256
|
-
if (stack_pointer == 1) throw new Error("out of js stack");
|
|
257
|
-
heap[--stack_pointer] = obj;
|
|
258
|
-
return stack_pointer;
|
|
259
|
-
}
|
|
260
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
261
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
262
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
263
|
-
WASM_VECTOR_LEN = arg.length;
|
|
264
|
-
return ptr;
|
|
265
|
-
}
|
|
266
|
-
function init() {
|
|
267
|
-
wasm.init();
|
|
268
|
-
}
|
|
269
|
-
function __wasm_bindgen_func_elem_553(arg0, arg1) {
|
|
270
|
-
const ret = wasm.__wasm_bindgen_func_elem_553(arg0, arg1);
|
|
271
|
-
return takeObject(ret);
|
|
272
|
-
}
|
|
273
|
-
function __wasm_bindgen_func_elem_3515(arg0, arg1, arg2) {
|
|
274
|
-
wasm.__wasm_bindgen_func_elem_3515(arg0, arg1, addHeapObject(arg2));
|
|
275
|
-
}
|
|
276
|
-
function __wasm_bindgen_func_elem_5070(arg0, arg1, arg2, arg3) {
|
|
277
|
-
wasm.__wasm_bindgen_func_elem_5070(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
278
|
-
}
|
|
279
|
-
var ClientFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
280
|
-
}, unregister: () => {
|
|
281
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_client_free(ptr >>> 0, 1));
|
|
282
31
|
var Client = class _Client {
|
|
283
32
|
static __wrap(ptr) {
|
|
284
33
|
ptr = ptr >>> 0;
|
|
@@ -316,16 +65,54 @@ var Client = class _Client {
|
|
|
316
65
|
}
|
|
317
66
|
}
|
|
318
67
|
/**
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
68
|
+
* Retrieves the names of all tables that this client has access to.
|
|
69
|
+
*
|
|
70
|
+
* `name` is a string identifier unique to the [`Table`] (per [`Client`]),
|
|
71
|
+
* which can be used in conjunction with [`Client::open_table`] to get
|
|
72
|
+
* a [`Table`] instance without the use of [`Client::table`]
|
|
73
|
+
* constructor directly (e.g., one created by another [`Client`]).
|
|
74
|
+
*
|
|
75
|
+
* # JavaScript Examples
|
|
76
|
+
*
|
|
77
|
+
* ```javascript
|
|
78
|
+
* const tables = await client.get_hosted_table_names();
|
|
79
|
+
* ```
|
|
80
|
+
* @returns {Promise<string[]>}
|
|
81
|
+
*/
|
|
82
|
+
get_hosted_table_names() {
|
|
83
|
+
const ret = wasm.client_get_hosted_table_names(this.__wbg_ptr);
|
|
84
|
+
return takeObject(ret);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @param {string} error
|
|
88
|
+
* @param {Function | null} [reconnect]
|
|
89
|
+
* @returns {Promise<void>}
|
|
90
|
+
*/
|
|
91
|
+
handle_error(error, reconnect) {
|
|
92
|
+
const ptr0 = passStringToWasm0(error, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
93
|
+
const len0 = WASM_VECTOR_LEN;
|
|
94
|
+
const ret = wasm.client_handle_error(this.__wbg_ptr, ptr0, len0, isLikeNone(reconnect) ? 0 : addHeapObject(reconnect));
|
|
95
|
+
return takeObject(ret);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @param {any} value
|
|
99
|
+
* @returns {Promise<void>}
|
|
100
|
+
*/
|
|
101
|
+
handle_response(value) {
|
|
102
|
+
const ret = wasm.client_handle_response(this.__wbg_ptr, addHeapObject(value));
|
|
103
|
+
return takeObject(ret);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @param {Function} send_request
|
|
107
|
+
* @param {Function | null} [close]
|
|
108
|
+
*/
|
|
109
|
+
constructor(send_request, close) {
|
|
110
|
+
try {
|
|
111
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
112
|
+
wasm.client_new(retptr, addHeapObject(send_request), isLikeNone(close) ? 0 : addHeapObject(close));
|
|
113
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
114
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
115
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
329
116
|
if (r2) {
|
|
330
117
|
throw takeObject(r1);
|
|
331
118
|
}
|
|
@@ -349,30 +136,74 @@ var Client = class _Client {
|
|
|
349
136
|
}
|
|
350
137
|
}
|
|
351
138
|
/**
|
|
352
|
-
* @param {
|
|
353
|
-
* @returns {Promise<
|
|
139
|
+
* @param {Function} callback
|
|
140
|
+
* @returns {Promise<number>}
|
|
354
141
|
*/
|
|
355
|
-
|
|
356
|
-
const ret = wasm.
|
|
142
|
+
on_error(callback) {
|
|
143
|
+
const ret = wasm.client_on_error(this.__wbg_ptr, addHeapObject(callback));
|
|
357
144
|
return takeObject(ret);
|
|
358
145
|
}
|
|
359
146
|
/**
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
147
|
+
* Register a callback which is invoked whenever [`Client::table`] (on this
|
|
148
|
+
* [`Client`]) or [`Table::delete`] (on a [`Table`] belinging to this
|
|
149
|
+
* [`Client`]) are called.
|
|
150
|
+
* @param {Function} on_update_js
|
|
151
|
+
* @returns {Promise<number>}
|
|
363
152
|
*/
|
|
364
|
-
|
|
365
|
-
const
|
|
153
|
+
on_hosted_tables_update(on_update_js) {
|
|
154
|
+
const ret = wasm.client_on_hosted_tables_update(this.__wbg_ptr, addHeapObject(on_update_js));
|
|
155
|
+
return takeObject(ret);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Opens a [`Table`] that is hosted on the `perspective_server::Server`
|
|
159
|
+
* that is connected to this [`Client`].
|
|
160
|
+
*
|
|
161
|
+
* The `name` property of [`TableInitOptions`] is used to identify each
|
|
162
|
+
* [`Table`]. [`Table`] `name`s can be looked up for each [`Client`]
|
|
163
|
+
* via [`Client::get_hosted_table_names`].
|
|
164
|
+
*
|
|
165
|
+
* # JavaScript Examples
|
|
166
|
+
*
|
|
167
|
+
* Get a virtual [`Table`] named "table_one" from this [`Client`]
|
|
168
|
+
*
|
|
169
|
+
* ```javascript
|
|
170
|
+
* const tables = await client.open_table("table_one");
|
|
171
|
+
* ```
|
|
172
|
+
* @param {string} entity_id
|
|
173
|
+
* @returns {Promise<Table>}
|
|
174
|
+
*/
|
|
175
|
+
open_table(entity_id) {
|
|
176
|
+
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
366
177
|
const len0 = WASM_VECTOR_LEN;
|
|
367
|
-
const ret = wasm.
|
|
178
|
+
const ret = wasm.client_open_table(this.__wbg_ptr, ptr0, len0);
|
|
368
179
|
return takeObject(ret);
|
|
369
180
|
}
|
|
370
181
|
/**
|
|
371
|
-
*
|
|
372
|
-
*
|
|
182
|
+
* Remove a callback previously registered via
|
|
183
|
+
* `Client::on_hosted_tables_update`.
|
|
184
|
+
* @param {number} update_id
|
|
185
|
+
* @returns {Promise<void>}
|
|
373
186
|
*/
|
|
374
|
-
|
|
375
|
-
const ret = wasm.
|
|
187
|
+
remove_hosted_tables_update(update_id) {
|
|
188
|
+
const ret = wasm.client_remove_hosted_tables_update(this.__wbg_ptr, update_id);
|
|
189
|
+
return takeObject(ret);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Provides the [`SystemInfo`] struct, implementation-specific metadata
|
|
193
|
+
* about the [`perspective_server::Server`] runtime such as Memory and
|
|
194
|
+
* CPU usage.
|
|
195
|
+
*
|
|
196
|
+
* For WebAssembly servers, this method includes the WebAssembly heap size.
|
|
197
|
+
*
|
|
198
|
+
* # JavaScript Examples
|
|
199
|
+
*
|
|
200
|
+
* ```javascript
|
|
201
|
+
* const info = await client.system_info();
|
|
202
|
+
* ```
|
|
203
|
+
* @returns {Promise<SystemInfo>}
|
|
204
|
+
*/
|
|
205
|
+
system_info() {
|
|
206
|
+
const ret = wasm.client_system_info(this.__wbg_ptr);
|
|
376
207
|
return takeObject(ret);
|
|
377
208
|
}
|
|
378
209
|
/**
|
|
@@ -477,297 +308,320 @@ var Client = class _Client {
|
|
|
477
308
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
478
309
|
}
|
|
479
310
|
}
|
|
480
|
-
/**
|
|
481
|
-
* Opens a [`Table`] that is hosted on the `perspective_server::Server`
|
|
482
|
-
* that is connected to this [`Client`].
|
|
483
|
-
*
|
|
484
|
-
* The `name` property of [`TableInitOptions`] is used to identify each
|
|
485
|
-
* [`Table`]. [`Table`] `name`s can be looked up for each [`Client`]
|
|
486
|
-
* via [`Client::get_hosted_table_names`].
|
|
487
|
-
*
|
|
488
|
-
* # JavaScript Examples
|
|
489
|
-
*
|
|
490
|
-
* Get a virtual [`Table`] named "table_one" from this [`Client`]
|
|
491
|
-
*
|
|
492
|
-
* ```javascript
|
|
493
|
-
* const tables = await client.open_table("table_one");
|
|
494
|
-
* ```
|
|
495
|
-
* @param {string} entity_id
|
|
496
|
-
* @returns {Promise<Table>}
|
|
497
|
-
*/
|
|
498
|
-
open_table(entity_id) {
|
|
499
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
500
|
-
const len0 = WASM_VECTOR_LEN;
|
|
501
|
-
const ret = wasm.client_open_table(this.__wbg_ptr, ptr0, len0);
|
|
502
|
-
return takeObject(ret);
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* Retrieves the names of all tables that this client has access to.
|
|
506
|
-
*
|
|
507
|
-
* `name` is a string identifier unique to the [`Table`] (per [`Client`]),
|
|
508
|
-
* which can be used in conjunction with [`Client::open_table`] to get
|
|
509
|
-
* a [`Table`] instance without the use of [`Client::table`]
|
|
510
|
-
* constructor directly (e.g., one created by another [`Client`]).
|
|
511
|
-
*
|
|
512
|
-
* # JavaScript Examples
|
|
513
|
-
*
|
|
514
|
-
* ```javascript
|
|
515
|
-
* const tables = await client.get_hosted_table_names();
|
|
516
|
-
* ```
|
|
517
|
-
* @returns {Promise<string[]>}
|
|
518
|
-
*/
|
|
519
|
-
get_hosted_table_names() {
|
|
520
|
-
const ret = wasm.client_get_hosted_table_names(this.__wbg_ptr);
|
|
521
|
-
return takeObject(ret);
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* Register a callback which is invoked whenever [`Client::table`] (on this
|
|
525
|
-
* [`Client`]) or [`Table::delete`] (on a [`Table`] belinging to this
|
|
526
|
-
* [`Client`]) are called.
|
|
527
|
-
* @param {Function} on_update_js
|
|
528
|
-
* @returns {Promise<number>}
|
|
529
|
-
*/
|
|
530
|
-
on_hosted_tables_update(on_update_js) {
|
|
531
|
-
const ret = wasm.client_on_hosted_tables_update(this.__wbg_ptr, addHeapObject(on_update_js));
|
|
532
|
-
return takeObject(ret);
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* Remove a callback previously registered via
|
|
536
|
-
* `Client::on_hosted_tables_update`.
|
|
537
|
-
* @param {number} update_id
|
|
538
|
-
* @returns {Promise<void>}
|
|
539
|
-
*/
|
|
540
|
-
remove_hosted_tables_update(update_id) {
|
|
541
|
-
const ret = wasm.client_remove_hosted_tables_update(this.__wbg_ptr, update_id);
|
|
542
|
-
return takeObject(ret);
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Provides the [`SystemInfo`] struct, implementation-specific metadata
|
|
546
|
-
* about the [`perspective_server::Server`] runtime such as Memory and
|
|
547
|
-
* CPU usage.
|
|
548
|
-
*
|
|
549
|
-
* For WebAssembly servers, this method includes the WebAssembly heap size.
|
|
550
|
-
*
|
|
551
|
-
* # JavaScript Examples
|
|
552
|
-
*
|
|
553
|
-
* ```javascript
|
|
554
|
-
* const info = await client.system_info();
|
|
555
|
-
* ```
|
|
556
|
-
* @returns {Promise<SystemInfo>}
|
|
557
|
-
*/
|
|
558
|
-
system_info() {
|
|
559
|
-
const ret = wasm.client_system_info(this.__wbg_ptr);
|
|
560
|
-
return takeObject(ret);
|
|
561
|
-
}
|
|
562
311
|
};
|
|
563
312
|
if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
|
|
564
|
-
var
|
|
565
|
-
}, unregister: () => {
|
|
566
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_jsvirtualdataslice_free(ptr >>> 0, 1));
|
|
567
|
-
var JsVirtualDataSlice = class _JsVirtualDataSlice {
|
|
568
|
-
static __wrap(ptr) {
|
|
569
|
-
ptr = ptr >>> 0;
|
|
570
|
-
const obj = Object.create(_JsVirtualDataSlice.prototype);
|
|
571
|
-
obj.__wbg_ptr = ptr;
|
|
572
|
-
JsVirtualDataSliceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
573
|
-
return obj;
|
|
574
|
-
}
|
|
313
|
+
var GenericSQLVirtualServerModel = class {
|
|
575
314
|
__destroy_into_raw() {
|
|
576
315
|
const ptr = this.__wbg_ptr;
|
|
577
316
|
this.__wbg_ptr = 0;
|
|
578
|
-
|
|
317
|
+
GenericSQLVirtualServerModelFinalization.unregister(this);
|
|
579
318
|
return ptr;
|
|
580
319
|
}
|
|
581
320
|
free() {
|
|
582
321
|
const ptr = this.__destroy_into_raw();
|
|
583
|
-
wasm.
|
|
584
|
-
}
|
|
585
|
-
constructor() {
|
|
586
|
-
const ret = wasm.jsvirtualdataslice_new();
|
|
587
|
-
this.__wbg_ptr = ret >>> 0;
|
|
588
|
-
JsVirtualDataSliceFinalization.register(this, this.__wbg_ptr, this);
|
|
589
|
-
return this;
|
|
322
|
+
wasm.__wbg_genericsqlvirtualservermodel_free(ptr, 0);
|
|
590
323
|
}
|
|
591
324
|
/**
|
|
592
|
-
*
|
|
593
|
-
* @
|
|
594
|
-
* @param {number} index
|
|
595
|
-
* @param {any} val
|
|
596
|
-
* @param {number | null} [group_by_index]
|
|
325
|
+
* Returns the SQL query to list all hosted tables.
|
|
326
|
+
* @returns {string}
|
|
597
327
|
*/
|
|
598
|
-
|
|
328
|
+
getHostedTables() {
|
|
599
329
|
try {
|
|
600
330
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
601
|
-
|
|
602
|
-
const len0 = WASM_VECTOR_LEN;
|
|
603
|
-
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
604
|
-
const len1 = WASM_VECTOR_LEN;
|
|
605
|
-
wasm.jsvirtualdataslice_setCol(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
331
|
+
wasm.genericsqlvirtualservermodel_getHostedTables(retptr, this.__wbg_ptr);
|
|
606
332
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
607
333
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
608
|
-
|
|
609
|
-
|
|
334
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
335
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
336
|
+
if (r3) {
|
|
337
|
+
throw takeObject(r2);
|
|
338
|
+
}
|
|
339
|
+
var v1 = getCachedStringFromWasm0(r0, r1);
|
|
340
|
+
if (r0 !== 0) {
|
|
341
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
610
342
|
}
|
|
343
|
+
return v1;
|
|
611
344
|
} finally {
|
|
612
345
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
613
346
|
}
|
|
614
347
|
}
|
|
615
348
|
/**
|
|
616
|
-
*
|
|
617
|
-
* @param {
|
|
618
|
-
* @param {any} val
|
|
619
|
-
* @param {number | null} [group_by_index]
|
|
349
|
+
* Creates a new `JsDuckDBSqlBuilder` instance.
|
|
350
|
+
* @param {any | null} [args]
|
|
620
351
|
*/
|
|
621
|
-
|
|
352
|
+
constructor(args) {
|
|
622
353
|
try {
|
|
623
354
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
624
|
-
|
|
625
|
-
const len0 = WASM_VECTOR_LEN;
|
|
626
|
-
wasm.jsvirtualdataslice_setStringCol(retptr, this.__wbg_ptr, ptr0, len0, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
355
|
+
wasm.genericsqlvirtualservermodel_new(retptr, isLikeNone(args) ? 0 : addHeapObject(args));
|
|
627
356
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
628
357
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
629
|
-
|
|
630
|
-
|
|
358
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
359
|
+
if (r2) {
|
|
360
|
+
throw takeObject(r1);
|
|
631
361
|
}
|
|
362
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
363
|
+
GenericSQLVirtualServerModelFinalization.register(this, this.__wbg_ptr, this);
|
|
364
|
+
return this;
|
|
632
365
|
} finally {
|
|
633
366
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
634
367
|
}
|
|
635
368
|
}
|
|
636
369
|
/**
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
* @param {
|
|
640
|
-
* @param {
|
|
370
|
+
* Returns the SQL query to create a view from a table with the given
|
|
371
|
+
* configuration.
|
|
372
|
+
* @param {string} table_id
|
|
373
|
+
* @param {string} view_id
|
|
374
|
+
* @param {any} config
|
|
375
|
+
* @returns {string}
|
|
641
376
|
*/
|
|
642
|
-
|
|
377
|
+
tableMakeView(table_id, view_id, config) {
|
|
643
378
|
try {
|
|
644
379
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
645
|
-
const ptr0 = passStringToWasm0(
|
|
380
|
+
const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
646
381
|
const len0 = WASM_VECTOR_LEN;
|
|
647
|
-
|
|
382
|
+
const ptr1 = passStringToWasm0(view_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
383
|
+
const len1 = WASM_VECTOR_LEN;
|
|
384
|
+
wasm.genericsqlvirtualservermodel_tableMakeView(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(config));
|
|
648
385
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
649
386
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
650
|
-
|
|
651
|
-
|
|
387
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
388
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
389
|
+
if (r3) {
|
|
390
|
+
throw takeObject(r2);
|
|
652
391
|
}
|
|
653
|
-
|
|
392
|
+
var v3 = getCachedStringFromWasm0(r0, r1);
|
|
393
|
+
if (r0 !== 0) {
|
|
394
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
395
|
+
}
|
|
396
|
+
return v3;
|
|
397
|
+
} finally {
|
|
654
398
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
655
399
|
}
|
|
656
400
|
}
|
|
657
401
|
/**
|
|
658
|
-
*
|
|
659
|
-
* @param {
|
|
660
|
-
* @
|
|
661
|
-
* @param {number | null} [group_by_index]
|
|
402
|
+
* Returns the SQL query to describe a table's schema.
|
|
403
|
+
* @param {string} table_id
|
|
404
|
+
* @returns {string}
|
|
662
405
|
*/
|
|
663
|
-
|
|
406
|
+
tableSchema(table_id) {
|
|
664
407
|
try {
|
|
665
408
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
666
|
-
const ptr0 = passStringToWasm0(
|
|
409
|
+
const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
667
410
|
const len0 = WASM_VECTOR_LEN;
|
|
668
|
-
wasm.
|
|
411
|
+
wasm.genericsqlvirtualservermodel_tableSchema(retptr, this.__wbg_ptr, ptr0, len0);
|
|
669
412
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
670
413
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
671
|
-
|
|
672
|
-
|
|
414
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
415
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
416
|
+
if (r3) {
|
|
417
|
+
throw takeObject(r2);
|
|
418
|
+
}
|
|
419
|
+
var v2 = getCachedStringFromWasm0(r0, r1);
|
|
420
|
+
if (r0 !== 0) {
|
|
421
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
673
422
|
}
|
|
423
|
+
return v2;
|
|
674
424
|
} finally {
|
|
675
425
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
676
426
|
}
|
|
677
427
|
}
|
|
678
428
|
/**
|
|
679
|
-
*
|
|
680
|
-
* @param {
|
|
681
|
-
* @
|
|
682
|
-
* @param {number | null} [group_by_index]
|
|
429
|
+
* Returns the SQL query to get the row count of a table.
|
|
430
|
+
* @param {string} table_id
|
|
431
|
+
* @returns {string}
|
|
683
432
|
*/
|
|
684
|
-
|
|
433
|
+
tableSize(table_id) {
|
|
685
434
|
try {
|
|
686
435
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
687
|
-
const ptr0 = passStringToWasm0(
|
|
436
|
+
const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
688
437
|
const len0 = WASM_VECTOR_LEN;
|
|
689
|
-
wasm.
|
|
438
|
+
wasm.genericsqlvirtualservermodel_tableSize(retptr, this.__wbg_ptr, ptr0, len0);
|
|
690
439
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
691
440
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
692
|
-
|
|
693
|
-
|
|
441
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
442
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
443
|
+
if (r3) {
|
|
444
|
+
throw takeObject(r2);
|
|
445
|
+
}
|
|
446
|
+
var v2 = getCachedStringFromWasm0(r0, r1);
|
|
447
|
+
if (r0 !== 0) {
|
|
448
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
694
449
|
}
|
|
450
|
+
return v2;
|
|
695
451
|
} finally {
|
|
696
452
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
697
453
|
}
|
|
698
454
|
}
|
|
699
455
|
/**
|
|
700
|
-
*
|
|
701
|
-
* @param {
|
|
702
|
-
* @param {
|
|
703
|
-
* @
|
|
456
|
+
* Returns the SQL query to validate an expression against a table.
|
|
457
|
+
* @param {string} table_id
|
|
458
|
+
* @param {string} expression
|
|
459
|
+
* @returns {string}
|
|
704
460
|
*/
|
|
705
|
-
|
|
461
|
+
tableValidateExpression(table_id, expression) {
|
|
706
462
|
try {
|
|
707
463
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
708
|
-
const ptr0 = passStringToWasm0(
|
|
464
|
+
const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
709
465
|
const len0 = WASM_VECTOR_LEN;
|
|
710
|
-
|
|
466
|
+
const ptr1 = passStringToWasm0(expression, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
467
|
+
const len1 = WASM_VECTOR_LEN;
|
|
468
|
+
wasm.genericsqlvirtualservermodel_tableValidateExpression(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
711
469
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
712
470
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
713
|
-
|
|
714
|
-
|
|
471
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
472
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
473
|
+
if (r3) {
|
|
474
|
+
throw takeObject(r2);
|
|
475
|
+
}
|
|
476
|
+
var v3 = getCachedStringFromWasm0(r0, r1);
|
|
477
|
+
if (r0 !== 0) {
|
|
478
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
715
479
|
}
|
|
480
|
+
return v3;
|
|
716
481
|
} finally {
|
|
717
482
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
718
483
|
}
|
|
719
484
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
485
|
+
/**
|
|
486
|
+
* Returns the SQL query to get the column count of a view.
|
|
487
|
+
* @param {string} view_id
|
|
488
|
+
* @returns {string}
|
|
489
|
+
*/
|
|
490
|
+
viewColumnSize(view_id) {
|
|
491
|
+
try {
|
|
492
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
493
|
+
const ptr0 = passStringToWasm0(view_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
494
|
+
const len0 = WASM_VECTOR_LEN;
|
|
495
|
+
wasm.genericsqlvirtualservermodel_viewColumnSize(retptr, this.__wbg_ptr, ptr0, len0);
|
|
496
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
497
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
498
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
499
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
500
|
+
if (r3) {
|
|
501
|
+
throw takeObject(r2);
|
|
502
|
+
}
|
|
503
|
+
var v2 = getCachedStringFromWasm0(r0, r1);
|
|
504
|
+
if (r0 !== 0) {
|
|
505
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
506
|
+
}
|
|
507
|
+
return v2;
|
|
508
|
+
} finally {
|
|
509
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
510
|
+
}
|
|
731
511
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
512
|
+
/**
|
|
513
|
+
* Returns the SQL query to delete a view.
|
|
514
|
+
* @param {string} view_id
|
|
515
|
+
* @returns {string}
|
|
516
|
+
*/
|
|
517
|
+
viewDelete(view_id) {
|
|
518
|
+
try {
|
|
519
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
520
|
+
const ptr0 = passStringToWasm0(view_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
521
|
+
const len0 = WASM_VECTOR_LEN;
|
|
522
|
+
wasm.genericsqlvirtualservermodel_viewDelete(retptr, this.__wbg_ptr, ptr0, len0);
|
|
523
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
524
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
525
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
526
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
527
|
+
if (r3) {
|
|
528
|
+
throw takeObject(r2);
|
|
529
|
+
}
|
|
530
|
+
var v2 = getCachedStringFromWasm0(r0, r1);
|
|
531
|
+
if (r0 !== 0) {
|
|
532
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
533
|
+
}
|
|
534
|
+
return v2;
|
|
535
|
+
} finally {
|
|
536
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
537
|
+
}
|
|
735
538
|
}
|
|
736
539
|
/**
|
|
737
|
-
*
|
|
540
|
+
* Returns the SQL query to fetch data from a view with the given viewport.
|
|
541
|
+
* @param {string} view_id
|
|
542
|
+
* @param {any} config
|
|
543
|
+
* @param {any} viewport
|
|
544
|
+
* @param {any} schema
|
|
545
|
+
* @returns {string}
|
|
738
546
|
*/
|
|
739
|
-
|
|
547
|
+
viewGetData(view_id, config, viewport, schema) {
|
|
740
548
|
try {
|
|
741
549
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
742
|
-
wasm.
|
|
550
|
+
const ptr0 = passStringToWasm0(view_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
551
|
+
const len0 = WASM_VECTOR_LEN;
|
|
552
|
+
wasm.genericsqlvirtualservermodel_viewGetData(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(config), addHeapObject(viewport), addHeapObject(schema));
|
|
743
553
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
744
554
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
745
555
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
746
|
-
|
|
747
|
-
|
|
556
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
557
|
+
if (r3) {
|
|
558
|
+
throw takeObject(r2);
|
|
748
559
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
560
|
+
var v2 = getCachedStringFromWasm0(r0, r1);
|
|
561
|
+
if (r0 !== 0) {
|
|
562
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
563
|
+
}
|
|
564
|
+
return v2;
|
|
752
565
|
} finally {
|
|
753
566
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
754
567
|
}
|
|
755
568
|
}
|
|
756
569
|
/**
|
|
757
|
-
*
|
|
758
|
-
* @
|
|
570
|
+
* Returns the SQL query to describe a view's schema.
|
|
571
|
+
* @param {string} view_id
|
|
572
|
+
* @returns {string}
|
|
759
573
|
*/
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
574
|
+
viewSchema(view_id) {
|
|
575
|
+
try {
|
|
576
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
577
|
+
const ptr0 = passStringToWasm0(view_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
578
|
+
const len0 = WASM_VECTOR_LEN;
|
|
579
|
+
wasm.genericsqlvirtualservermodel_viewSchema(retptr, this.__wbg_ptr, ptr0, len0);
|
|
580
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
581
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
582
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
583
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
584
|
+
if (r3) {
|
|
585
|
+
throw takeObject(r2);
|
|
586
|
+
}
|
|
587
|
+
var v2 = getCachedStringFromWasm0(r0, r1);
|
|
588
|
+
if (r0 !== 0) {
|
|
589
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
590
|
+
}
|
|
591
|
+
return v2;
|
|
592
|
+
} finally {
|
|
593
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Returns the SQL query to get the row count of a view.
|
|
598
|
+
* @param {string} view_id
|
|
599
|
+
* @returns {string}
|
|
600
|
+
*/
|
|
601
|
+
viewSize(view_id) {
|
|
602
|
+
try {
|
|
603
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
604
|
+
const ptr0 = passStringToWasm0(view_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
605
|
+
const len0 = WASM_VECTOR_LEN;
|
|
606
|
+
wasm.genericsqlvirtualservermodel_viewSize(retptr, this.__wbg_ptr, ptr0, len0);
|
|
607
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
608
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
609
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
610
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
611
|
+
if (r3) {
|
|
612
|
+
throw takeObject(r2);
|
|
613
|
+
}
|
|
614
|
+
var v2 = getCachedStringFromWasm0(r0, r1);
|
|
615
|
+
if (r0 !== 0) {
|
|
616
|
+
wasm.__wbindgen_export4(r0, r1, 1);
|
|
617
|
+
}
|
|
618
|
+
return v2;
|
|
619
|
+
} finally {
|
|
620
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
621
|
+
}
|
|
765
622
|
}
|
|
766
623
|
};
|
|
767
|
-
if (Symbol.dispose)
|
|
768
|
-
var ProxySessionFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
769
|
-
}, unregister: () => {
|
|
770
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_proxysession_free(ptr >>> 0, 1));
|
|
624
|
+
if (Symbol.dispose) GenericSQLVirtualServerModel.prototype[Symbol.dispose] = GenericSQLVirtualServerModel.prototype.free;
|
|
771
625
|
var ProxySession = class _ProxySession {
|
|
772
626
|
static __wrap(ptr) {
|
|
773
627
|
ptr = ptr >>> 0;
|
|
@@ -787,19 +641,12 @@ var ProxySession = class _ProxySession {
|
|
|
787
641
|
wasm.__wbg_proxysession_free(ptr, 0);
|
|
788
642
|
}
|
|
789
643
|
/**
|
|
790
|
-
* @
|
|
791
|
-
* @param {Function} on_response
|
|
644
|
+
* @returns {Promise<void>}
|
|
792
645
|
*/
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
this.__wbg_ptr = ret >>> 0;
|
|
798
|
-
ProxySessionFinalization.register(this, this.__wbg_ptr, this);
|
|
799
|
-
return this;
|
|
800
|
-
} finally {
|
|
801
|
-
heap[stack_pointer++] = void 0;
|
|
802
|
-
}
|
|
646
|
+
close() {
|
|
647
|
+
const ptr = this.__destroy_into_raw();
|
|
648
|
+
const ret = wasm.proxysession_close(ptr);
|
|
649
|
+
return takeObject(ret);
|
|
803
650
|
}
|
|
804
651
|
/**
|
|
805
652
|
* @param {any} value
|
|
@@ -810,18 +657,22 @@ var ProxySession = class _ProxySession {
|
|
|
810
657
|
return takeObject(ret);
|
|
811
658
|
}
|
|
812
659
|
/**
|
|
813
|
-
* @
|
|
660
|
+
* @param {Client} client
|
|
661
|
+
* @param {Function} on_response
|
|
814
662
|
*/
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
663
|
+
constructor(client, on_response) {
|
|
664
|
+
try {
|
|
665
|
+
_assertClass(client, Client);
|
|
666
|
+
const ret = wasm.proxysession_new(client.__wbg_ptr, addBorrowedObject(on_response));
|
|
667
|
+
this.__wbg_ptr = ret >>> 0;
|
|
668
|
+
ProxySessionFinalization.register(this, this.__wbg_ptr, this);
|
|
669
|
+
return this;
|
|
670
|
+
} finally {
|
|
671
|
+
heap[stack_pointer++] = void 0;
|
|
672
|
+
}
|
|
819
673
|
}
|
|
820
674
|
};
|
|
821
675
|
if (Symbol.dispose) ProxySession.prototype[Symbol.dispose] = ProxySession.prototype.free;
|
|
822
|
-
var TableFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
823
|
-
}, unregister: () => {
|
|
824
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_table_free(ptr >>> 0, 1));
|
|
825
676
|
var Table = class _Table {
|
|
826
677
|
static __wrap(ptr) {
|
|
827
678
|
ptr = ptr >>> 0;
|
|
@@ -858,46 +709,6 @@ var Table = class _Table {
|
|
|
858
709
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
859
710
|
}
|
|
860
711
|
}
|
|
861
|
-
/**
|
|
862
|
-
* Returns the name of the index column for the table.
|
|
863
|
-
*
|
|
864
|
-
* # JavaScript Examples
|
|
865
|
-
*
|
|
866
|
-
* ```javascript
|
|
867
|
-
* const table = await client.table("x,y\n1,2\n3,4", { index: "x" });
|
|
868
|
-
* const index = table.get_index(); // "x"
|
|
869
|
-
* ```
|
|
870
|
-
* @returns {Promise<string>}
|
|
871
|
-
*/
|
|
872
|
-
get_index() {
|
|
873
|
-
const ret = wasm.table_get_index(this.__wbg_ptr);
|
|
874
|
-
return takeObject(ret);
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* Get a copy of the [`Client`] this [`Table`] came from.
|
|
878
|
-
* @returns {Promise<Client>}
|
|
879
|
-
*/
|
|
880
|
-
get_client() {
|
|
881
|
-
const ret = wasm.table_get_client(this.__wbg_ptr);
|
|
882
|
-
return takeObject(ret);
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* Returns the user-specified name for this table, or the auto-generated
|
|
886
|
-
* name if a name was not specified when the table was created.
|
|
887
|
-
* @returns {Promise<string>}
|
|
888
|
-
*/
|
|
889
|
-
get_name() {
|
|
890
|
-
const ret = wasm.table_get_name(this.__wbg_ptr);
|
|
891
|
-
return takeObject(ret);
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
* Returns the user-specified row limit for this table.
|
|
895
|
-
* @returns {Promise<number | undefined>}
|
|
896
|
-
*/
|
|
897
|
-
get_limit() {
|
|
898
|
-
const ret = wasm.table_get_limit(this.__wbg_ptr);
|
|
899
|
-
return takeObject(ret);
|
|
900
|
-
}
|
|
901
712
|
/**
|
|
902
713
|
* Removes all the rows in the [`Table`], but preserves everything else
|
|
903
714
|
* including the schema, index, and any callbacks or registered
|
|
@@ -912,6 +723,21 @@ var Table = class _Table {
|
|
|
912
723
|
const ret = wasm.table_clear(this.__wbg_ptr);
|
|
913
724
|
return takeObject(ret);
|
|
914
725
|
}
|
|
726
|
+
/**
|
|
727
|
+
* Returns the column names of this [`Table`] in "natural" order (the
|
|
728
|
+
* ordering implied by the input format).
|
|
729
|
+
*
|
|
730
|
+
* # JavaScript Examples
|
|
731
|
+
*
|
|
732
|
+
* ```javascript
|
|
733
|
+
* const columns = await table.columns();
|
|
734
|
+
* ```
|
|
735
|
+
* @returns {Promise<any>}
|
|
736
|
+
*/
|
|
737
|
+
columns() {
|
|
738
|
+
const ret = wasm.table_columns(this.__wbg_ptr);
|
|
739
|
+
return takeObject(ret);
|
|
740
|
+
}
|
|
915
741
|
/**
|
|
916
742
|
* Delete this [`Table`] and cleans up associated resources.
|
|
917
743
|
*
|
|
@@ -947,51 +773,43 @@ var Table = class _Table {
|
|
|
947
773
|
return takeObject(ret);
|
|
948
774
|
}
|
|
949
775
|
/**
|
|
950
|
-
*
|
|
951
|
-
* @returns {Promise<
|
|
776
|
+
* Get a copy of the [`Client`] this [`Table`] came from.
|
|
777
|
+
* @returns {Promise<Client>}
|
|
952
778
|
*/
|
|
953
|
-
|
|
954
|
-
const ret = wasm.
|
|
779
|
+
get_client() {
|
|
780
|
+
const ret = wasm.table_get_client(this.__wbg_ptr);
|
|
955
781
|
return takeObject(ret);
|
|
956
782
|
}
|
|
957
783
|
/**
|
|
958
|
-
* Returns
|
|
959
|
-
*
|
|
960
|
-
* The mapping of a [`Table`]'s column names to data types is referred to
|
|
961
|
-
* as a [`Schema`]. Each column has a unique name and a data type, one
|
|
962
|
-
* of:
|
|
784
|
+
* Returns the name of the index column for the table.
|
|
963
785
|
*
|
|
964
|
-
*
|
|
965
|
-
* - `"date"` - A timesonze-agnostic date type (month/day/year)
|
|
966
|
-
* - `"datetime"` - A millisecond-precision datetime type in the UTC
|
|
967
|
-
* timezone
|
|
968
|
-
* - `"float"` - A 64 bit float
|
|
969
|
-
* - `"integer"` - A signed 32 bit integer (the integer type supported by
|
|
970
|
-
* JavaScript)
|
|
971
|
-
* - `"string"` - A [`String`] data type (encoded internally as a
|
|
972
|
-
* _dictionary_)
|
|
786
|
+
* # JavaScript Examples
|
|
973
787
|
*
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
*
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
788
|
+
* ```javascript
|
|
789
|
+
* const table = await client.table("x,y\n1,2\n3,4", { index: "x" });
|
|
790
|
+
* const index = table.get_index(); // "x"
|
|
791
|
+
* ```
|
|
792
|
+
* @returns {Promise<string>}
|
|
793
|
+
*/
|
|
794
|
+
get_index() {
|
|
795
|
+
const ret = wasm.table_get_index(this.__wbg_ptr);
|
|
796
|
+
return takeObject(ret);
|
|
981
797
|
}
|
|
982
798
|
/**
|
|
983
|
-
* Returns the
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
* # JavaScript Examples
|
|
987
|
-
*
|
|
988
|
-
* ```javascript
|
|
989
|
-
* const columns = await table.columns();
|
|
990
|
-
* ```
|
|
991
|
-
* @returns {Promise<any>}
|
|
799
|
+
* Returns the user-specified row limit for this table.
|
|
800
|
+
* @returns {Promise<number | undefined>}
|
|
992
801
|
*/
|
|
993
|
-
|
|
994
|
-
const ret = wasm.
|
|
802
|
+
get_limit() {
|
|
803
|
+
const ret = wasm.table_get_limit(this.__wbg_ptr);
|
|
804
|
+
return takeObject(ret);
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Returns the user-specified name for this table, or the auto-generated
|
|
808
|
+
* name if a name was not specified when the table was created.
|
|
809
|
+
* @returns {Promise<string>}
|
|
810
|
+
*/
|
|
811
|
+
get_name() {
|
|
812
|
+
const ret = wasm.table_get_name(this.__wbg_ptr);
|
|
995
813
|
return takeObject(ret);
|
|
996
814
|
}
|
|
997
815
|
/**
|
|
@@ -1017,16 +835,6 @@ var Table = class _Table {
|
|
|
1017
835
|
const ret = wasm.table_on_delete(this.__wbg_ptr, addHeapObject(on_delete));
|
|
1018
836
|
return takeObject(ret);
|
|
1019
837
|
}
|
|
1020
|
-
/**
|
|
1021
|
-
* Removes a listener with a given ID, as returned by a previous call to
|
|
1022
|
-
* [`Table::on_delete`].
|
|
1023
|
-
* @param {number} callback_id
|
|
1024
|
-
* @returns {Promise<any>}
|
|
1025
|
-
*/
|
|
1026
|
-
remove_delete(callback_id) {
|
|
1027
|
-
const ret = wasm.table_remove_delete(this.__wbg_ptr, callback_id);
|
|
1028
|
-
return takeObject(ret);
|
|
1029
|
-
}
|
|
1030
838
|
/**
|
|
1031
839
|
* Removes rows from this [`Table`] with the `index` column values
|
|
1032
840
|
* supplied.
|
|
@@ -1049,6 +857,16 @@ var Table = class _Table {
|
|
|
1049
857
|
const ret = wasm.table_remove(this.__wbg_ptr, addHeapObject(value), isLikeNone(options) ? 0 : addHeapObject(options));
|
|
1050
858
|
return takeObject(ret);
|
|
1051
859
|
}
|
|
860
|
+
/**
|
|
861
|
+
* Removes a listener with a given ID, as returned by a previous call to
|
|
862
|
+
* [`Table::on_delete`].
|
|
863
|
+
* @param {number} callback_id
|
|
864
|
+
* @returns {Promise<any>}
|
|
865
|
+
*/
|
|
866
|
+
remove_delete(callback_id) {
|
|
867
|
+
const ret = wasm.table_remove_delete(this.__wbg_ptr, callback_id);
|
|
868
|
+
return takeObject(ret);
|
|
869
|
+
}
|
|
1052
870
|
/**
|
|
1053
871
|
* Replace all rows in this [`Table`] with the input data, coerced to this
|
|
1054
872
|
* [`Table`]'s existing [`perspective_client::Schema`], notifying any
|
|
@@ -1074,6 +892,39 @@ var Table = class _Table {
|
|
|
1074
892
|
const ret = wasm.table_replace(this.__wbg_ptr, addHeapObject(input), isLikeNone(options) ? 0 : addHeapObject(options));
|
|
1075
893
|
return takeObject(ret);
|
|
1076
894
|
}
|
|
895
|
+
/**
|
|
896
|
+
* Returns a table's [`Schema`], a mapping of column names to column types.
|
|
897
|
+
*
|
|
898
|
+
* The mapping of a [`Table`]'s column names to data types is referred to
|
|
899
|
+
* as a [`Schema`]. Each column has a unique name and a data type, one
|
|
900
|
+
* of:
|
|
901
|
+
*
|
|
902
|
+
* - `"boolean"` - A boolean type
|
|
903
|
+
* - `"date"` - A timesonze-agnostic date type (month/day/year)
|
|
904
|
+
* - `"datetime"` - A millisecond-precision datetime type in the UTC
|
|
905
|
+
* timezone
|
|
906
|
+
* - `"float"` - A 64 bit float
|
|
907
|
+
* - `"integer"` - A signed 32 bit integer (the integer type supported by
|
|
908
|
+
* JavaScript)
|
|
909
|
+
* - `"string"` - A [`String`] data type (encoded internally as a
|
|
910
|
+
* _dictionary_)
|
|
911
|
+
*
|
|
912
|
+
* Note that all [`Table`] columns are _nullable_, regardless of the data
|
|
913
|
+
* type.
|
|
914
|
+
* @returns {Record<string, ColumnType>}
|
|
915
|
+
*/
|
|
916
|
+
schema() {
|
|
917
|
+
const ret = wasm.table_schema(this.__wbg_ptr);
|
|
918
|
+
return takeObject(ret);
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Returns the number of rows in a [`Table`].
|
|
922
|
+
* @returns {Promise<number>}
|
|
923
|
+
*/
|
|
924
|
+
size() {
|
|
925
|
+
const ret = wasm.table_size(this.__wbg_ptr);
|
|
926
|
+
return takeObject(ret);
|
|
927
|
+
}
|
|
1077
928
|
/**
|
|
1078
929
|
* Updates the rows of this table and any derived [`View`] instances.
|
|
1079
930
|
*
|
|
@@ -1104,6 +955,15 @@ var Table = class _Table {
|
|
|
1104
955
|
const ret = wasm.table_update(this.__wbg_ptr, addHeapObject(input), isLikeNone(options) ? 0 : addHeapObject(options));
|
|
1105
956
|
return takeObject(ret);
|
|
1106
957
|
}
|
|
958
|
+
/**
|
|
959
|
+
* Validates the given expressions.
|
|
960
|
+
* @param {any} exprs
|
|
961
|
+
* @returns {Promise<any>}
|
|
962
|
+
*/
|
|
963
|
+
validate_expressions(exprs) {
|
|
964
|
+
const ret = wasm.table_validate_expressions(this.__wbg_ptr, addHeapObject(exprs));
|
|
965
|
+
return takeObject(ret);
|
|
966
|
+
}
|
|
1107
967
|
/**
|
|
1108
968
|
* Create a new [`View`] from this table with a specified
|
|
1109
969
|
* [`ViewConfigUpdate`].
|
|
@@ -1127,20 +987,8 @@ var Table = class _Table {
|
|
|
1127
987
|
const ret = wasm.table_view(this.__wbg_ptr, isLikeNone(config) ? 0 : addHeapObject(config));
|
|
1128
988
|
return takeObject(ret);
|
|
1129
989
|
}
|
|
1130
|
-
/**
|
|
1131
|
-
* Validates the given expressions.
|
|
1132
|
-
* @param {any} exprs
|
|
1133
|
-
* @returns {Promise<any>}
|
|
1134
|
-
*/
|
|
1135
|
-
validate_expressions(exprs) {
|
|
1136
|
-
const ret = wasm.table_validate_expressions(this.__wbg_ptr, addHeapObject(exprs));
|
|
1137
|
-
return takeObject(ret);
|
|
1138
|
-
}
|
|
1139
990
|
};
|
|
1140
991
|
if (Symbol.dispose) Table.prototype[Symbol.dispose] = Table.prototype.free;
|
|
1141
|
-
var ViewFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
1142
|
-
}, unregister: () => {
|
|
1143
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_view_free(ptr >>> 0, 1));
|
|
1144
992
|
var View = class _View {
|
|
1145
993
|
static __wrap(ptr) {
|
|
1146
994
|
ptr = ptr >>> 0;
|
|
@@ -1172,6 +1020,15 @@ var View = class _View {
|
|
|
1172
1020
|
const ret = wasm.view___get_model(this.__wbg_ptr);
|
|
1173
1021
|
return _View.__wrap(ret);
|
|
1174
1022
|
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Collapses the `group_by` row at `row_index`.
|
|
1025
|
+
* @param {number} row_index
|
|
1026
|
+
* @returns {Promise<number>}
|
|
1027
|
+
*/
|
|
1028
|
+
collapse(row_index) {
|
|
1029
|
+
const ret = wasm.view_collapse(this.__wbg_ptr, row_index);
|
|
1030
|
+
return takeObject(ret);
|
|
1031
|
+
}
|
|
1175
1032
|
/**
|
|
1176
1033
|
* Returns an array of strings containing the column paths of the [`View`]
|
|
1177
1034
|
* without any of the source columns.
|
|
@@ -1219,6 +1076,15 @@ var View = class _View {
|
|
|
1219
1076
|
const ret = wasm.view_dimensions(this.__wbg_ptr);
|
|
1220
1077
|
return takeObject(ret);
|
|
1221
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Expand the `group_by` row at `row_index`.
|
|
1081
|
+
* @param {number} row_index
|
|
1082
|
+
* @returns {Promise<number>}
|
|
1083
|
+
*/
|
|
1084
|
+
expand(row_index) {
|
|
1085
|
+
const ret = wasm.view_expand(this.__wbg_ptr, row_index);
|
|
1086
|
+
return takeObject(ret);
|
|
1087
|
+
}
|
|
1222
1088
|
/**
|
|
1223
1089
|
* The expression schema of this [`View`], which contains only the
|
|
1224
1090
|
* expressions created on this [`View`]. See [`View::schema`] for
|
|
@@ -1253,6 +1119,20 @@ var View = class _View {
|
|
|
1253
1119
|
const ret = wasm.view_get_min_max(this.__wbg_ptr, ptr0, len0);
|
|
1254
1120
|
return takeObject(ret);
|
|
1255
1121
|
}
|
|
1122
|
+
/**
|
|
1123
|
+
* The number of aggregated columns in this [`View`]. This is affected by
|
|
1124
|
+
* the "split_by" configuration parameter supplied to this view's
|
|
1125
|
+
* contructor.
|
|
1126
|
+
*
|
|
1127
|
+
* # Returns
|
|
1128
|
+
*
|
|
1129
|
+
* The number of aggregated columns.
|
|
1130
|
+
* @returns {Promise<number>}
|
|
1131
|
+
*/
|
|
1132
|
+
num_columns() {
|
|
1133
|
+
const ret = wasm.view_num_columns(this.__wbg_ptr);
|
|
1134
|
+
return takeObject(ret);
|
|
1135
|
+
}
|
|
1256
1136
|
/**
|
|
1257
1137
|
* The number of aggregated rows in this [`View`]. This is affected by the
|
|
1258
1138
|
* "group_by" configuration parameter supplied to this view's contructor.
|
|
@@ -1267,85 +1147,13 @@ var View = class _View {
|
|
|
1267
1147
|
return takeObject(ret);
|
|
1268
1148
|
}
|
|
1269
1149
|
/**
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1273
|
-
* [`Table::schema`]; it may have different column names due to
|
|
1274
|
-
* `expressions` or `columns` configs, or it maye have _different
|
|
1275
|
-
* column types_ due to the application og `group_by` and `aggregates`
|
|
1276
|
-
* config. You can think of [`Table::schema`] as the _input_ schema and
|
|
1277
|
-
* [`View::schema`] as the _output_ schema of a Perspective pipeline.
|
|
1150
|
+
* Register a callback with this [`View`]. Whenever the [`View`] is
|
|
1151
|
+
* deleted, this callback will be invoked.
|
|
1152
|
+
* @param {Function} on_delete
|
|
1278
1153
|
* @returns {Promise<any>}
|
|
1279
1154
|
*/
|
|
1280
|
-
|
|
1281
|
-
const ret = wasm.
|
|
1282
|
-
return takeObject(ret);
|
|
1283
|
-
}
|
|
1284
|
-
/**
|
|
1285
|
-
* Serializes a [`View`] to the Apache Arrow data format.
|
|
1286
|
-
* @param {ViewWindow | null} [window]
|
|
1287
|
-
* @returns {Promise<ArrayBuffer>}
|
|
1288
|
-
*/
|
|
1289
|
-
to_arrow(window2) {
|
|
1290
|
-
const ret = wasm.view_to_arrow(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1291
|
-
return takeObject(ret);
|
|
1292
|
-
}
|
|
1293
|
-
/**
|
|
1294
|
-
* Serializes this [`View`] to a string of JSON data. Useful if you want to
|
|
1295
|
-
* save additional round trip serialize/deserialize cycles.
|
|
1296
|
-
* @param {ViewWindow | null} [window]
|
|
1297
|
-
* @returns {Promise<string>}
|
|
1298
|
-
*/
|
|
1299
|
-
to_columns_string(window2) {
|
|
1300
|
-
const ret = wasm.view_to_columns_string(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1301
|
-
return takeObject(ret);
|
|
1302
|
-
}
|
|
1303
|
-
/**
|
|
1304
|
-
* Serializes this [`View`] to JavaScript objects in a column-oriented
|
|
1305
|
-
* format.
|
|
1306
|
-
* @param {ViewWindow | null} [window]
|
|
1307
|
-
* @returns {Promise<object>}
|
|
1308
|
-
*/
|
|
1309
|
-
to_columns(window2) {
|
|
1310
|
-
const ret = wasm.view_to_columns(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1311
|
-
return takeObject(ret);
|
|
1312
|
-
}
|
|
1313
|
-
/**
|
|
1314
|
-
* Render this `View` as a JSON string.
|
|
1315
|
-
* @param {ViewWindow | null} [window]
|
|
1316
|
-
* @returns {Promise<string>}
|
|
1317
|
-
*/
|
|
1318
|
-
to_json_string(window2) {
|
|
1319
|
-
const ret = wasm.view_to_json_string(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1320
|
-
return takeObject(ret);
|
|
1321
|
-
}
|
|
1322
|
-
/**
|
|
1323
|
-
* Serializes this [`View`] to JavaScript objects in a row-oriented
|
|
1324
|
-
* format.
|
|
1325
|
-
* @param {ViewWindow | null} [window]
|
|
1326
|
-
* @returns {Promise<Array<any>>}
|
|
1327
|
-
*/
|
|
1328
|
-
to_json(window2) {
|
|
1329
|
-
const ret = wasm.view_to_json(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1330
|
-
return takeObject(ret);
|
|
1331
|
-
}
|
|
1332
|
-
/**
|
|
1333
|
-
* Renders this [`View`] as an [NDJSON](https://github.com/ndjson/ndjson-spec)
|
|
1334
|
-
* formatted [`String`].
|
|
1335
|
-
* @param {ViewWindow | null} [window]
|
|
1336
|
-
* @returns {Promise<string>}
|
|
1337
|
-
*/
|
|
1338
|
-
to_ndjson(window2) {
|
|
1339
|
-
const ret = wasm.view_to_ndjson(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1340
|
-
return takeObject(ret);
|
|
1341
|
-
}
|
|
1342
|
-
/**
|
|
1343
|
-
* Serializes this [`View`] to CSV data in a standard format.
|
|
1344
|
-
* @param {ViewWindow | null} [window]
|
|
1345
|
-
* @returns {Promise<string>}
|
|
1346
|
-
*/
|
|
1347
|
-
to_csv(window2) {
|
|
1348
|
-
const ret = wasm.view_to_csv(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1155
|
+
on_delete(on_delete) {
|
|
1156
|
+
const ret = wasm.view_on_delete(this.__wbg_ptr, addHeapObject(on_delete));
|
|
1349
1157
|
return takeObject(ret);
|
|
1350
1158
|
}
|
|
1351
1159
|
/**
|
|
@@ -1384,6 +1192,15 @@ var View = class _View {
|
|
|
1384
1192
|
const ret = wasm.view_on_update(this.__wbg_ptr, addHeapObject(on_update_js), isLikeNone(options) ? 0 : addHeapObject(options));
|
|
1385
1193
|
return takeObject(ret);
|
|
1386
1194
|
}
|
|
1195
|
+
/**
|
|
1196
|
+
* Unregister a previously registered [`View::on_delete`] callback.
|
|
1197
|
+
* @param {number} callback_id
|
|
1198
|
+
* @returns {Promise<any>}
|
|
1199
|
+
*/
|
|
1200
|
+
remove_delete(callback_id) {
|
|
1201
|
+
const ret = wasm.view_remove_delete(this.__wbg_ptr, callback_id);
|
|
1202
|
+
return takeObject(ret);
|
|
1203
|
+
}
|
|
1387
1204
|
/**
|
|
1388
1205
|
* Unregister a previously registered update callback with this [`View`].
|
|
1389
1206
|
*
|
|
@@ -1399,75 +1216,1152 @@ var View = class _View {
|
|
|
1399
1216
|
return takeObject(ret);
|
|
1400
1217
|
}
|
|
1401
1218
|
/**
|
|
1402
|
-
*
|
|
1403
|
-
*
|
|
1404
|
-
*
|
|
1219
|
+
* The schema of this [`View`].
|
|
1220
|
+
*
|
|
1221
|
+
* The [`View`] schema differs from the `schema` returned by
|
|
1222
|
+
* [`Table::schema`]; it may have different column names due to
|
|
1223
|
+
* `expressions` or `columns` configs, or it maye have _different
|
|
1224
|
+
* column types_ due to the application og `group_by` and `aggregates`
|
|
1225
|
+
* config. You can think of [`Table::schema`] as the _input_ schema and
|
|
1226
|
+
* [`View::schema`] as the _output_ schema of a Perspective pipeline.
|
|
1405
1227
|
* @returns {Promise<any>}
|
|
1406
1228
|
*/
|
|
1407
|
-
|
|
1408
|
-
const ret = wasm.
|
|
1229
|
+
schema() {
|
|
1230
|
+
const ret = wasm.view_schema(this.__wbg_ptr);
|
|
1409
1231
|
return takeObject(ret);
|
|
1410
1232
|
}
|
|
1411
1233
|
/**
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1416
|
-
* # Returns
|
|
1417
|
-
*
|
|
1418
|
-
* The number of aggregated columns.
|
|
1419
|
-
* @returns {Promise<number>}
|
|
1234
|
+
* Set expansion `depth` of the `group_by` tree.
|
|
1235
|
+
* @param {number} depth
|
|
1236
|
+
* @returns {Promise<void>}
|
|
1420
1237
|
*/
|
|
1421
|
-
|
|
1422
|
-
const ret = wasm.
|
|
1238
|
+
set_depth(depth) {
|
|
1239
|
+
const ret = wasm.view_set_depth(this.__wbg_ptr, depth);
|
|
1423
1240
|
return takeObject(ret);
|
|
1424
1241
|
}
|
|
1425
1242
|
/**
|
|
1426
|
-
*
|
|
1427
|
-
* @param {
|
|
1243
|
+
* Serializes a [`View`] to the Apache Arrow data format.
|
|
1244
|
+
* @param {ViewWindow | null} [window]
|
|
1245
|
+
* @returns {Promise<ArrayBuffer>}
|
|
1246
|
+
*/
|
|
1247
|
+
to_arrow(window2) {
|
|
1248
|
+
const ret = wasm.view_to_arrow(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1249
|
+
return takeObject(ret);
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Serializes this [`View`] to JavaScript objects in a column-oriented
|
|
1253
|
+
* format.
|
|
1254
|
+
* @param {ViewWindow | null} [window]
|
|
1255
|
+
* @returns {Promise<object>}
|
|
1256
|
+
*/
|
|
1257
|
+
to_columns(window2) {
|
|
1258
|
+
const ret = wasm.view_to_columns(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1259
|
+
return takeObject(ret);
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Serializes this [`View`] to a string of JSON data. Useful if you want to
|
|
1263
|
+
* save additional round trip serialize/deserialize cycles.
|
|
1264
|
+
* @param {ViewWindow | null} [window]
|
|
1265
|
+
* @returns {Promise<string>}
|
|
1266
|
+
*/
|
|
1267
|
+
to_columns_string(window2) {
|
|
1268
|
+
const ret = wasm.view_to_columns_string(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1269
|
+
return takeObject(ret);
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Serializes this [`View`] to CSV data in a standard format.
|
|
1273
|
+
* @param {ViewWindow | null} [window]
|
|
1274
|
+
* @returns {Promise<string>}
|
|
1275
|
+
*/
|
|
1276
|
+
to_csv(window2) {
|
|
1277
|
+
const ret = wasm.view_to_csv(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1278
|
+
return takeObject(ret);
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Serializes this [`View`] to JavaScript objects in a row-oriented
|
|
1282
|
+
* format.
|
|
1283
|
+
* @param {ViewWindow | null} [window]
|
|
1284
|
+
* @returns {Promise<Array<any>>}
|
|
1285
|
+
*/
|
|
1286
|
+
to_json(window2) {
|
|
1287
|
+
const ret = wasm.view_to_json(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1288
|
+
return takeObject(ret);
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Render this `View` as a JSON string.
|
|
1292
|
+
* @param {ViewWindow | null} [window]
|
|
1293
|
+
* @returns {Promise<string>}
|
|
1294
|
+
*/
|
|
1295
|
+
to_json_string(window2) {
|
|
1296
|
+
const ret = wasm.view_to_json_string(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1297
|
+
return takeObject(ret);
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* Renders this [`View`] as an [NDJSON](https://github.com/ndjson/ndjson-spec)
|
|
1301
|
+
* formatted [`String`].
|
|
1302
|
+
* @param {ViewWindow | null} [window]
|
|
1303
|
+
* @returns {Promise<string>}
|
|
1304
|
+
*/
|
|
1305
|
+
to_ndjson(window2) {
|
|
1306
|
+
const ret = wasm.view_to_ndjson(this.__wbg_ptr, isLikeNone(window2) ? 0 : addHeapObject(window2));
|
|
1307
|
+
return takeObject(ret);
|
|
1308
|
+
}
|
|
1309
|
+
};
|
|
1310
|
+
if (Symbol.dispose) View.prototype[Symbol.dispose] = View.prototype.free;
|
|
1311
|
+
var VirtualDataSlice = class _VirtualDataSlice {
|
|
1312
|
+
static __wrap(ptr) {
|
|
1313
|
+
ptr = ptr >>> 0;
|
|
1314
|
+
const obj = Object.create(_VirtualDataSlice.prototype);
|
|
1315
|
+
obj.__wbg_ptr = ptr;
|
|
1316
|
+
VirtualDataSliceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1317
|
+
return obj;
|
|
1318
|
+
}
|
|
1319
|
+
__destroy_into_raw() {
|
|
1320
|
+
const ptr = this.__wbg_ptr;
|
|
1321
|
+
this.__wbg_ptr = 0;
|
|
1322
|
+
VirtualDataSliceFinalization.unregister(this);
|
|
1323
|
+
return ptr;
|
|
1324
|
+
}
|
|
1325
|
+
free() {
|
|
1326
|
+
const ptr = this.__destroy_into_raw();
|
|
1327
|
+
wasm.__wbg_virtualdataslice_free(ptr, 0);
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* @param {ViewConfigUpdate} config
|
|
1331
|
+
*/
|
|
1332
|
+
constructor(config) {
|
|
1333
|
+
const ret = wasm.virtualdataslice_new(addHeapObject(config));
|
|
1334
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1335
|
+
VirtualDataSliceFinalization.register(this, this.__wbg_ptr, this);
|
|
1336
|
+
return this;
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* @param {string} name
|
|
1340
|
+
* @param {number} index
|
|
1341
|
+
* @param {any} val
|
|
1342
|
+
* @param {number | null} [group_by_index]
|
|
1343
|
+
*/
|
|
1344
|
+
setBooleanCol(name, index, val, group_by_index) {
|
|
1345
|
+
try {
|
|
1346
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1347
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1348
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1349
|
+
wasm.virtualdataslice_setBooleanCol(retptr, this.__wbg_ptr, ptr0, len0, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
1350
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1351
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1352
|
+
if (r1) {
|
|
1353
|
+
throw takeObject(r0);
|
|
1354
|
+
}
|
|
1355
|
+
} finally {
|
|
1356
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* @param {string} dtype
|
|
1361
|
+
* @param {string} name
|
|
1362
|
+
* @param {number} index
|
|
1363
|
+
* @param {any} val
|
|
1364
|
+
* @param {number | null} [group_by_index]
|
|
1365
|
+
*/
|
|
1366
|
+
setCol(dtype, name, index, val, group_by_index) {
|
|
1367
|
+
try {
|
|
1368
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1369
|
+
const ptr0 = passStringToWasm0(dtype, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1370
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1371
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1372
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1373
|
+
wasm.virtualdataslice_setCol(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
1374
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1375
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1376
|
+
if (r1) {
|
|
1377
|
+
throw takeObject(r0);
|
|
1378
|
+
}
|
|
1379
|
+
} finally {
|
|
1380
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* @param {string} name
|
|
1385
|
+
* @param {number} index
|
|
1386
|
+
* @param {any} val
|
|
1387
|
+
* @param {number | null} [group_by_index]
|
|
1388
|
+
*/
|
|
1389
|
+
setDatetimeCol(name, index, val, group_by_index) {
|
|
1390
|
+
try {
|
|
1391
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1392
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1393
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1394
|
+
wasm.virtualdataslice_setDatetimeCol(retptr, this.__wbg_ptr, ptr0, len0, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
1395
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1396
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1397
|
+
if (r1) {
|
|
1398
|
+
throw takeObject(r0);
|
|
1399
|
+
}
|
|
1400
|
+
} finally {
|
|
1401
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* @param {string} name
|
|
1406
|
+
* @param {number} index
|
|
1407
|
+
* @param {any} val
|
|
1408
|
+
* @param {number | null} [group_by_index]
|
|
1409
|
+
*/
|
|
1410
|
+
setFloatCol(name, index, val, group_by_index) {
|
|
1411
|
+
try {
|
|
1412
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1413
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1414
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1415
|
+
wasm.virtualdataslice_setFloatCol(retptr, this.__wbg_ptr, ptr0, len0, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
1416
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1417
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1418
|
+
if (r1) {
|
|
1419
|
+
throw takeObject(r0);
|
|
1420
|
+
}
|
|
1421
|
+
} finally {
|
|
1422
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
/**
|
|
1426
|
+
* @param {string} name
|
|
1427
|
+
* @param {number} index
|
|
1428
|
+
* @param {any} val
|
|
1429
|
+
* @param {number | null} [group_by_index]
|
|
1430
|
+
*/
|
|
1431
|
+
setIntegerCol(name, index, val, group_by_index) {
|
|
1432
|
+
try {
|
|
1433
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1434
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1435
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1436
|
+
wasm.virtualdataslice_setIntegerCol(retptr, this.__wbg_ptr, ptr0, len0, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
1437
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1438
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1439
|
+
if (r1) {
|
|
1440
|
+
throw takeObject(r0);
|
|
1441
|
+
}
|
|
1442
|
+
} finally {
|
|
1443
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* @param {string} name
|
|
1448
|
+
* @param {number} index
|
|
1449
|
+
* @param {any} val
|
|
1450
|
+
* @param {number | null} [group_by_index]
|
|
1451
|
+
*/
|
|
1452
|
+
setStringCol(name, index, val, group_by_index) {
|
|
1453
|
+
try {
|
|
1454
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1455
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1456
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1457
|
+
wasm.virtualdataslice_setStringCol(retptr, this.__wbg_ptr, ptr0, len0, index, addHeapObject(val), isLikeNone(group_by_index) ? 4294967297 : group_by_index >>> 0);
|
|
1458
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1459
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1460
|
+
if (r1) {
|
|
1461
|
+
throw takeObject(r0);
|
|
1462
|
+
}
|
|
1463
|
+
} finally {
|
|
1464
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
if (Symbol.dispose) VirtualDataSlice.prototype[Symbol.dispose] = VirtualDataSlice.prototype.free;
|
|
1469
|
+
var VirtualServer = class {
|
|
1470
|
+
__destroy_into_raw() {
|
|
1471
|
+
const ptr = this.__wbg_ptr;
|
|
1472
|
+
this.__wbg_ptr = 0;
|
|
1473
|
+
VirtualServerFinalization.unregister(this);
|
|
1474
|
+
return ptr;
|
|
1475
|
+
}
|
|
1476
|
+
free() {
|
|
1477
|
+
const ptr = this.__destroy_into_raw();
|
|
1478
|
+
wasm.__wbg_virtualserver_free(ptr, 0);
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* @param {Uint8Array} bytes
|
|
1428
1482
|
* @returns {Promise<any>}
|
|
1429
1483
|
*/
|
|
1430
|
-
|
|
1431
|
-
const
|
|
1484
|
+
handleRequest(bytes) {
|
|
1485
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
1486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1487
|
+
const ret = wasm.virtualserver_handleRequest(this.__wbg_ptr, ptr0, len0);
|
|
1432
1488
|
return takeObject(ret);
|
|
1433
1489
|
}
|
|
1434
|
-
/**
|
|
1435
|
-
*
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1490
|
+
/**
|
|
1491
|
+
* @param {object} handler
|
|
1492
|
+
*/
|
|
1493
|
+
constructor(handler) {
|
|
1494
|
+
try {
|
|
1495
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1496
|
+
wasm.virtualserver_new(retptr, addHeapObject(handler));
|
|
1497
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1498
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1499
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1500
|
+
if (r2) {
|
|
1501
|
+
throw takeObject(r1);
|
|
1502
|
+
}
|
|
1503
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
1504
|
+
VirtualServerFinalization.register(this, this.__wbg_ptr, this);
|
|
1505
|
+
return this;
|
|
1506
|
+
} finally {
|
|
1507
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
};
|
|
1511
|
+
if (Symbol.dispose) VirtualServer.prototype[Symbol.dispose] = VirtualServer.prototype.free;
|
|
1512
|
+
function init() {
|
|
1513
|
+
wasm.init();
|
|
1514
|
+
}
|
|
1515
|
+
function __wbg_get_imports() {
|
|
1516
|
+
const import0 = {
|
|
1517
|
+
__proto__: null,
|
|
1518
|
+
__wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
|
|
1519
|
+
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1520
|
+
const ret = Error(v0);
|
|
1521
|
+
return addHeapObject(ret);
|
|
1522
|
+
},
|
|
1523
|
+
__wbg_Number_04624de7d0e8332d: function(arg0) {
|
|
1524
|
+
const ret = Number(getObject(arg0));
|
|
1525
|
+
return ret;
|
|
1526
|
+
},
|
|
1527
|
+
__wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
|
|
1528
|
+
const ret = String(getObject(arg1));
|
|
1529
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1530
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1531
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1532
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1533
|
+
},
|
|
1534
|
+
__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(arg0, arg1) {
|
|
1535
|
+
const v = getObject(arg1);
|
|
1536
|
+
const ret = typeof v === "bigint" ? v : void 0;
|
|
1537
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1538
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1539
|
+
},
|
|
1540
|
+
__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
|
|
1541
|
+
const v = getObject(arg0);
|
|
1542
|
+
const ret = typeof v === "boolean" ? v : void 0;
|
|
1543
|
+
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
1544
|
+
},
|
|
1545
|
+
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
|
|
1546
|
+
const ret = debugString(getObject(arg1));
|
|
1547
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1548
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1549
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1550
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1551
|
+
},
|
|
1552
|
+
__wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
|
|
1553
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
1554
|
+
return ret;
|
|
1555
|
+
},
|
|
1556
|
+
__wbg___wbindgen_is_bigint_31b12575b56f32fc: function(arg0) {
|
|
1557
|
+
const ret = typeof getObject(arg0) === "bigint";
|
|
1558
|
+
return ret;
|
|
1559
|
+
},
|
|
1560
|
+
__wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
|
|
1561
|
+
const ret = typeof getObject(arg0) === "function";
|
|
1562
|
+
return ret;
|
|
1563
|
+
},
|
|
1564
|
+
__wbg___wbindgen_is_null_ac34f5003991759a: function(arg0) {
|
|
1565
|
+
const ret = getObject(arg0) === null;
|
|
1566
|
+
return ret;
|
|
1567
|
+
},
|
|
1568
|
+
__wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
|
|
1569
|
+
const val = getObject(arg0);
|
|
1570
|
+
const ret = typeof val === "object" && val !== null;
|
|
1571
|
+
return ret;
|
|
1572
|
+
},
|
|
1573
|
+
__wbg___wbindgen_is_string_cd444516edc5b180: function(arg0) {
|
|
1574
|
+
const ret = typeof getObject(arg0) === "string";
|
|
1575
|
+
return ret;
|
|
1576
|
+
},
|
|
1577
|
+
__wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
|
|
1578
|
+
const ret = getObject(arg0) === void 0;
|
|
1579
|
+
return ret;
|
|
1580
|
+
},
|
|
1581
|
+
__wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
|
|
1582
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
1583
|
+
return ret;
|
|
1584
|
+
},
|
|
1585
|
+
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
|
|
1586
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
1587
|
+
return ret;
|
|
1588
|
+
},
|
|
1589
|
+
__wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
|
|
1590
|
+
const obj = getObject(arg1);
|
|
1591
|
+
const ret = typeof obj === "number" ? obj : void 0;
|
|
1592
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1593
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1594
|
+
},
|
|
1595
|
+
__wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
|
|
1596
|
+
const obj = getObject(arg1);
|
|
1597
|
+
const ret = typeof obj === "string" ? obj : void 0;
|
|
1598
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1599
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1600
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1601
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1602
|
+
},
|
|
1603
|
+
__wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
|
|
1604
|
+
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1605
|
+
throw new Error(v0);
|
|
1606
|
+
},
|
|
1607
|
+
__wbg__wbg_cb_unref_d9b87ff7982e3b21: function(arg0) {
|
|
1608
|
+
getObject(arg0)._wbg_cb_unref();
|
|
1609
|
+
},
|
|
1610
|
+
__wbg_apply_ada2ee1a60ac7b3c: function() {
|
|
1611
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1612
|
+
const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
|
|
1613
|
+
return addHeapObject(ret);
|
|
1614
|
+
}, arguments);
|
|
1615
|
+
},
|
|
1616
|
+
__wbg_at_dfc235641cc0e40c: function(arg0, arg1) {
|
|
1617
|
+
const ret = getObject(arg0).at(arg1);
|
|
1618
|
+
return addHeapObject(ret);
|
|
1619
|
+
},
|
|
1620
|
+
__wbg_buffer_26d0910f3a5bc899: function(arg0) {
|
|
1621
|
+
const ret = getObject(arg0).buffer;
|
|
1622
|
+
return addHeapObject(ret);
|
|
1623
|
+
},
|
|
1624
|
+
__wbg_call_389efe28435a9388: function() {
|
|
1625
|
+
return handleError(function(arg0, arg1) {
|
|
1626
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
1627
|
+
return addHeapObject(ret);
|
|
1628
|
+
}, arguments);
|
|
1629
|
+
},
|
|
1630
|
+
__wbg_call_4708e0c13bdc8e95: function() {
|
|
1631
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1632
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1633
|
+
return addHeapObject(ret);
|
|
1634
|
+
}, arguments);
|
|
1635
|
+
},
|
|
1636
|
+
__wbg_call_812d25f1510c13c8: function() {
|
|
1637
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1638
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1639
|
+
return addHeapObject(ret);
|
|
1640
|
+
}, arguments);
|
|
1641
|
+
},
|
|
1642
|
+
__wbg_client_new: function(arg0) {
|
|
1643
|
+
const ret = Client.__wrap(arg0);
|
|
1644
|
+
return addHeapObject(ret);
|
|
1645
|
+
},
|
|
1646
|
+
__wbg_debug_46a93995fc6f8820: function(arg0, arg1, arg2, arg3) {
|
|
1647
|
+
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1648
|
+
},
|
|
1649
|
+
__wbg_debug_a4099fa12db6cd61: function(arg0) {
|
|
1650
|
+
console.debug(getObject(arg0));
|
|
1651
|
+
},
|
|
1652
|
+
__wbg_done_57b39ecd9addfe81: function(arg0) {
|
|
1653
|
+
const ret = getObject(arg0).done;
|
|
1654
|
+
return ret;
|
|
1655
|
+
},
|
|
1656
|
+
__wbg_entries_58c7934c745daac7: function(arg0) {
|
|
1657
|
+
const ret = Object.entries(getObject(arg0));
|
|
1658
|
+
return addHeapObject(ret);
|
|
1659
|
+
},
|
|
1660
|
+
__wbg_error_794d0ffc9d00d5c3: function(arg0, arg1, arg2, arg3) {
|
|
1661
|
+
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1662
|
+
},
|
|
1663
|
+
__wbg_error_9a7fe3f932034cde: function(arg0) {
|
|
1664
|
+
console.error(getObject(arg0));
|
|
1665
|
+
},
|
|
1666
|
+
__wbg_error_f852e41c69b0bd84: function(arg0, arg1) {
|
|
1667
|
+
console.error(getObject(arg0), getObject(arg1));
|
|
1668
|
+
},
|
|
1669
|
+
__wbg_from_bddd64e7d5ff6941: function(arg0) {
|
|
1670
|
+
const ret = Array.from(getObject(arg0));
|
|
1671
|
+
return addHeapObject(ret);
|
|
1672
|
+
},
|
|
1673
|
+
__wbg_getEntriesByName_02488cff0bc7581c: function(arg0, arg1, arg2, arg3, arg4) {
|
|
1674
|
+
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1675
|
+
var v1 = getCachedStringFromWasm0(arg3, arg4);
|
|
1676
|
+
const ret = getObject(arg0).getEntriesByName(v0, v1);
|
|
1677
|
+
return addHeapObject(ret);
|
|
1678
|
+
},
|
|
1679
|
+
__wbg_getRandomValues_1c61fac11405ffdc: function() {
|
|
1680
|
+
return handleError(function(arg0, arg1) {
|
|
1681
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1682
|
+
}, arguments);
|
|
1683
|
+
},
|
|
1684
|
+
__wbg_getTime_1e3cd1391c5c3995: function(arg0) {
|
|
1685
|
+
const ret = getObject(arg0).getTime();
|
|
1686
|
+
return ret;
|
|
1687
|
+
},
|
|
1688
|
+
__wbg_get_76e04509d1922a04: function(arg0, arg1, arg2) {
|
|
1689
|
+
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1690
|
+
const ret = getObject(arg0)[v0];
|
|
1691
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1692
|
+
},
|
|
1693
|
+
__wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
|
|
1694
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1695
|
+
return addHeapObject(ret);
|
|
1696
|
+
},
|
|
1697
|
+
__wbg_get_b3ed3ad4be2bc8ac: function() {
|
|
1698
|
+
return handleError(function(arg0, arg1) {
|
|
1699
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1700
|
+
return addHeapObject(ret);
|
|
1701
|
+
}, arguments);
|
|
1702
|
+
},
|
|
1703
|
+
__wbg_get_with_ref_key_1dc361bd10053bfe: function(arg0, arg1) {
|
|
1704
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
1705
|
+
return addHeapObject(ret);
|
|
1706
|
+
},
|
|
1707
|
+
__wbg_has_d4e53238966c12b6: function() {
|
|
1708
|
+
return handleError(function(arg0, arg1) {
|
|
1709
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1710
|
+
return ret;
|
|
1711
|
+
}, arguments);
|
|
1712
|
+
},
|
|
1713
|
+
__wbg_info_148d043840582012: function(arg0) {
|
|
1714
|
+
console.info(getObject(arg0));
|
|
1715
|
+
},
|
|
1716
|
+
__wbg_info_9e602cf10c5c690b: function(arg0, arg1, arg2, arg3) {
|
|
1717
|
+
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1718
|
+
},
|
|
1719
|
+
__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
|
|
1720
|
+
let result;
|
|
1721
|
+
try {
|
|
1722
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1723
|
+
} catch (_) {
|
|
1724
|
+
result = false;
|
|
1725
|
+
}
|
|
1726
|
+
const ret = result;
|
|
1727
|
+
return ret;
|
|
1728
|
+
},
|
|
1729
|
+
__wbg_instanceof_Array_d9eac779cd191cbc: function(arg0) {
|
|
1730
|
+
let result;
|
|
1731
|
+
try {
|
|
1732
|
+
result = getObject(arg0) instanceof Array;
|
|
1733
|
+
} catch (_) {
|
|
1734
|
+
result = false;
|
|
1735
|
+
}
|
|
1736
|
+
const ret = result;
|
|
1737
|
+
return ret;
|
|
1738
|
+
},
|
|
1739
|
+
__wbg_instanceof_Date_1b9f15b87f10aa4c: function(arg0) {
|
|
1740
|
+
let result;
|
|
1741
|
+
try {
|
|
1742
|
+
result = getObject(arg0) instanceof Date;
|
|
1743
|
+
} catch (_) {
|
|
1744
|
+
result = false;
|
|
1745
|
+
}
|
|
1746
|
+
const ret = result;
|
|
1747
|
+
return ret;
|
|
1748
|
+
},
|
|
1749
|
+
__wbg_instanceof_Error_8573fe0b0b480f46: function(arg0) {
|
|
1750
|
+
let result;
|
|
1751
|
+
try {
|
|
1752
|
+
result = getObject(arg0) instanceof Error;
|
|
1753
|
+
} catch (_) {
|
|
1754
|
+
result = false;
|
|
1755
|
+
}
|
|
1756
|
+
const ret = result;
|
|
1757
|
+
return ret;
|
|
1758
|
+
},
|
|
1759
|
+
__wbg_instanceof_Map_53af74335dec57f4: function(arg0) {
|
|
1760
|
+
let result;
|
|
1761
|
+
try {
|
|
1762
|
+
result = getObject(arg0) instanceof Map;
|
|
1763
|
+
} catch (_) {
|
|
1764
|
+
result = false;
|
|
1765
|
+
}
|
|
1766
|
+
const ret = result;
|
|
1767
|
+
return ret;
|
|
1768
|
+
},
|
|
1769
|
+
__wbg_instanceof_Object_1c6af87502b733ed: function(arg0) {
|
|
1770
|
+
let result;
|
|
1771
|
+
try {
|
|
1772
|
+
result = getObject(arg0) instanceof Object;
|
|
1773
|
+
} catch (_) {
|
|
1774
|
+
result = false;
|
|
1775
|
+
}
|
|
1776
|
+
const ret = result;
|
|
1777
|
+
return ret;
|
|
1778
|
+
},
|
|
1779
|
+
__wbg_instanceof_Promise_0094681e3519d6ec: function(arg0) {
|
|
1780
|
+
let result;
|
|
1781
|
+
try {
|
|
1782
|
+
result = getObject(arg0) instanceof Promise;
|
|
1783
|
+
} catch (_) {
|
|
1784
|
+
result = false;
|
|
1785
|
+
}
|
|
1786
|
+
const ret = result;
|
|
1787
|
+
return ret;
|
|
1788
|
+
},
|
|
1789
|
+
__wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
|
|
1790
|
+
let result;
|
|
1791
|
+
try {
|
|
1792
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
1793
|
+
} catch (_) {
|
|
1794
|
+
result = false;
|
|
1795
|
+
}
|
|
1796
|
+
const ret = result;
|
|
1797
|
+
return ret;
|
|
1798
|
+
},
|
|
1799
|
+
__wbg_instanceof_Window_ed49b2db8df90359: function(arg0) {
|
|
1800
|
+
let result;
|
|
1801
|
+
try {
|
|
1802
|
+
result = getObject(arg0) instanceof Window;
|
|
1803
|
+
} catch (_) {
|
|
1804
|
+
result = false;
|
|
1805
|
+
}
|
|
1806
|
+
const ret = result;
|
|
1807
|
+
return ret;
|
|
1808
|
+
},
|
|
1809
|
+
__wbg_isArray_d314bb98fcf08331: function(arg0) {
|
|
1810
|
+
const ret = Array.isArray(getObject(arg0));
|
|
1811
|
+
return ret;
|
|
1812
|
+
},
|
|
1813
|
+
__wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
|
|
1814
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1815
|
+
return ret;
|
|
1816
|
+
},
|
|
1817
|
+
__wbg_iterator_6ff6560ca1568e55: function() {
|
|
1818
|
+
const ret = Symbol.iterator;
|
|
1819
|
+
return addHeapObject(ret);
|
|
1820
|
+
},
|
|
1821
|
+
__wbg_keys_b50a709a76add04e: function(arg0) {
|
|
1822
|
+
const ret = Object.keys(getObject(arg0));
|
|
1823
|
+
return addHeapObject(ret);
|
|
1824
|
+
},
|
|
1825
|
+
__wbg_length_32ed9a279acd054c: function(arg0) {
|
|
1826
|
+
const ret = getObject(arg0).length;
|
|
1827
|
+
return ret;
|
|
1828
|
+
},
|
|
1829
|
+
__wbg_length_35a7bace40f36eac: function(arg0) {
|
|
1830
|
+
const ret = getObject(arg0).length;
|
|
1831
|
+
return ret;
|
|
1832
|
+
},
|
|
1833
|
+
__wbg_mark_3b530a64b09ba08a: function() {
|
|
1834
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1835
|
+
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1836
|
+
getObject(arg0).mark(v0);
|
|
1837
|
+
}, arguments);
|
|
1838
|
+
},
|
|
1839
|
+
__wbg_measure_288b48c082eae0fe: function() {
|
|
1840
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1841
|
+
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1842
|
+
var v1 = getCachedStringFromWasm0(arg3, arg4);
|
|
1843
|
+
getObject(arg0).measure(v0, v1);
|
|
1844
|
+
}, arguments);
|
|
1845
|
+
},
|
|
1846
|
+
__wbg_message_9ddc4b9a62a7c379: function(arg0) {
|
|
1847
|
+
const ret = getObject(arg0).message;
|
|
1848
|
+
return addHeapObject(ret);
|
|
1849
|
+
},
|
|
1850
|
+
__wbg_new_361308b2356cecd0: function() {
|
|
1851
|
+
const ret = new Object();
|
|
1852
|
+
return addHeapObject(ret);
|
|
1853
|
+
},
|
|
1854
|
+
__wbg_new_3eb36ae241fe6f44: function() {
|
|
1855
|
+
const ret = new Array();
|
|
1856
|
+
return addHeapObject(ret);
|
|
1857
|
+
},
|
|
1858
|
+
__wbg_new_72b49615380db768: function(arg0, arg1) {
|
|
1859
|
+
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1860
|
+
const ret = new Error(v0);
|
|
1861
|
+
return addHeapObject(ret);
|
|
1862
|
+
},
|
|
1863
|
+
__wbg_new_b5d9e2fb389fef91: function(arg0, arg1) {
|
|
1864
|
+
try {
|
|
1865
|
+
var state0 = { a: arg0, b: arg1 };
|
|
1866
|
+
var cb0 = (arg02, arg12) => {
|
|
1867
|
+
const a = state0.a;
|
|
1868
|
+
state0.a = 0;
|
|
1869
|
+
try {
|
|
1870
|
+
return __wasm_bindgen_func_elem_5384(a, state0.b, arg02, arg12);
|
|
1871
|
+
} finally {
|
|
1872
|
+
state0.a = a;
|
|
1873
|
+
}
|
|
1874
|
+
};
|
|
1875
|
+
const ret = new Promise(cb0);
|
|
1876
|
+
return addHeapObject(ret);
|
|
1877
|
+
} finally {
|
|
1878
|
+
state0.a = state0.b = 0;
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
__wbg_new_dca287b076112a51: function() {
|
|
1882
|
+
const ret = /* @__PURE__ */ new Map();
|
|
1883
|
+
return addHeapObject(ret);
|
|
1884
|
+
},
|
|
1885
|
+
__wbg_new_dd2b680c8bf6ae29: function(arg0) {
|
|
1886
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1887
|
+
return addHeapObject(ret);
|
|
1888
|
+
},
|
|
1889
|
+
__wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
|
|
1890
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1891
|
+
return addHeapObject(ret);
|
|
1892
|
+
},
|
|
1893
|
+
__wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
|
|
1894
|
+
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1895
|
+
const ret = new Function(v0);
|
|
1896
|
+
return addHeapObject(ret);
|
|
1897
|
+
},
|
|
1898
|
+
__wbg_next_3482f54c49e8af19: function() {
|
|
1899
|
+
return handleError(function(arg0) {
|
|
1900
|
+
const ret = getObject(arg0).next();
|
|
1901
|
+
return addHeapObject(ret);
|
|
1902
|
+
}, arguments);
|
|
1903
|
+
},
|
|
1904
|
+
__wbg_next_418f80d8f5303233: function(arg0) {
|
|
1905
|
+
const ret = getObject(arg0).next;
|
|
1906
|
+
return addHeapObject(ret);
|
|
1907
|
+
},
|
|
1908
|
+
__wbg_now_ebffdf7e580f210d: function(arg0) {
|
|
1909
|
+
const ret = getObject(arg0).now();
|
|
1910
|
+
return ret;
|
|
1911
|
+
},
|
|
1912
|
+
__wbg_parse_708461a1feddfb38: function() {
|
|
1913
|
+
return handleError(function(arg0, arg1) {
|
|
1914
|
+
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1915
|
+
const ret = JSON.parse(v0);
|
|
1916
|
+
return addHeapObject(ret);
|
|
1917
|
+
}, arguments);
|
|
1918
|
+
},
|
|
1919
|
+
__wbg_performance_06f12ba62483475d: function(arg0) {
|
|
1920
|
+
const ret = getObject(arg0).performance;
|
|
1921
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1922
|
+
},
|
|
1923
|
+
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
|
|
1924
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1925
|
+
},
|
|
1926
|
+
__wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
|
|
1927
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1928
|
+
return ret;
|
|
1929
|
+
},
|
|
1930
|
+
__wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
|
|
1931
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
1932
|
+
return addHeapObject(ret);
|
|
1933
|
+
},
|
|
1934
|
+
__wbg_queueMicrotask_5bb536982f78a56f: function(arg0) {
|
|
1935
|
+
queueMicrotask(getObject(arg0));
|
|
1936
|
+
},
|
|
1937
|
+
__wbg_reject_a2176de7f1212be5: function(arg0) {
|
|
1938
|
+
const ret = Promise.reject(getObject(arg0));
|
|
1939
|
+
return addHeapObject(ret);
|
|
1940
|
+
},
|
|
1941
|
+
__wbg_resolve_002c4b7d9d8f6b64: function(arg0) {
|
|
1942
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1943
|
+
return addHeapObject(ret);
|
|
1944
|
+
},
|
|
1945
|
+
__wbg_set_1eb0999cf5d27fc8: function(arg0, arg1, arg2) {
|
|
1946
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1947
|
+
return addHeapObject(ret);
|
|
1948
|
+
},
|
|
1949
|
+
__wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
|
|
1950
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1951
|
+
},
|
|
1952
|
+
__wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
|
|
1953
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1954
|
+
},
|
|
1955
|
+
__wbg_startTime_248495bfbcb427d3: function(arg0) {
|
|
1956
|
+
const ret = getObject(arg0).startTime;
|
|
1957
|
+
return ret;
|
|
1958
|
+
},
|
|
1959
|
+
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
1960
|
+
const ret = typeof global === "undefined" ? null : global;
|
|
1961
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1962
|
+
},
|
|
1963
|
+
__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
|
|
1964
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
1965
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1966
|
+
},
|
|
1967
|
+
__wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
|
|
1968
|
+
const ret = typeof self === "undefined" ? null : self;
|
|
1969
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1970
|
+
},
|
|
1971
|
+
__wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
|
|
1972
|
+
const ret = typeof window === "undefined" ? null : window;
|
|
1973
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1974
|
+
},
|
|
1975
|
+
__wbg_stringify_8d1cc6ff383e8bae: function() {
|
|
1976
|
+
return handleError(function(arg0) {
|
|
1977
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
1978
|
+
return addHeapObject(ret);
|
|
1979
|
+
}, arguments);
|
|
1980
|
+
},
|
|
1981
|
+
__wbg_table_new: function(arg0) {
|
|
1982
|
+
const ret = Table.__wrap(arg0);
|
|
1983
|
+
return addHeapObject(ret);
|
|
1984
|
+
},
|
|
1985
|
+
__wbg_then_0d9fe2c7b1857d32: function(arg0, arg1, arg2) {
|
|
1986
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1987
|
+
return addHeapObject(ret);
|
|
1988
|
+
},
|
|
1989
|
+
__wbg_then_b9e7b3b5f1a9e1b5: function(arg0, arg1) {
|
|
1990
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
1991
|
+
return addHeapObject(ret);
|
|
1992
|
+
},
|
|
1993
|
+
__wbg_toString_964ff7fe6eca8362: function(arg0) {
|
|
1994
|
+
const ret = getObject(arg0).toString();
|
|
1995
|
+
return addHeapObject(ret);
|
|
1996
|
+
},
|
|
1997
|
+
__wbg_trace_9007714a6fbee374: function(arg0) {
|
|
1998
|
+
console.trace(getObject(arg0));
|
|
1999
|
+
},
|
|
2000
|
+
__wbg_trace_bd16b570941b54fb: function(arg0, arg1, arg2, arg3) {
|
|
2001
|
+
console.trace(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
2002
|
+
},
|
|
2003
|
+
__wbg_value_0546255b415e96c1: function(arg0) {
|
|
2004
|
+
const ret = getObject(arg0).value;
|
|
2005
|
+
return addHeapObject(ret);
|
|
2006
|
+
},
|
|
2007
|
+
__wbg_values_5da93bc719d272cf: function(arg0) {
|
|
2008
|
+
const ret = Object.values(getObject(arg0));
|
|
2009
|
+
return addHeapObject(ret);
|
|
2010
|
+
},
|
|
2011
|
+
__wbg_view_new: function(arg0) {
|
|
2012
|
+
const ret = View.__wrap(arg0);
|
|
2013
|
+
return addHeapObject(ret);
|
|
2014
|
+
},
|
|
2015
|
+
__wbg_view_unwrap: function(arg0) {
|
|
2016
|
+
const ret = View.__unwrap(getObject(arg0));
|
|
2017
|
+
return ret;
|
|
2018
|
+
},
|
|
2019
|
+
__wbg_virtualdataslice_new: function(arg0) {
|
|
2020
|
+
const ret = VirtualDataSlice.__wrap(arg0);
|
|
2021
|
+
return addHeapObject(ret);
|
|
2022
|
+
},
|
|
2023
|
+
__wbg_warn_a40b971467b219c7: function(arg0, arg1, arg2, arg3) {
|
|
2024
|
+
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
2025
|
+
},
|
|
2026
|
+
__wbg_warn_f7ae1b2e66ccb930: function(arg0) {
|
|
2027
|
+
console.warn(getObject(arg0));
|
|
2028
|
+
},
|
|
2029
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2030
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1421, __wasm_bindgen_func_elem_1668);
|
|
2031
|
+
return addHeapObject(ret);
|
|
2032
|
+
},
|
|
2033
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2034
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3793, __wasm_bindgen_func_elem_3795);
|
|
2035
|
+
return addHeapObject(ret);
|
|
2036
|
+
},
|
|
2037
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
2038
|
+
const ret = arg0;
|
|
2039
|
+
return addHeapObject(ret);
|
|
2040
|
+
},
|
|
2041
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
2042
|
+
const ret = arg0;
|
|
2043
|
+
return addHeapObject(ret);
|
|
2044
|
+
},
|
|
2045
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
2046
|
+
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
2047
|
+
const ret = v0;
|
|
2048
|
+
return addHeapObject(ret);
|
|
2049
|
+
},
|
|
2050
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
2051
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2052
|
+
return addHeapObject(ret);
|
|
2053
|
+
},
|
|
2054
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
2055
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2056
|
+
return addHeapObject(ret);
|
|
2057
|
+
},
|
|
2058
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
2059
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
2060
|
+
wasm.__wbindgen_export4(arg0, arg1 * 4, 4);
|
|
2061
|
+
const ret = v0;
|
|
2062
|
+
return addHeapObject(ret);
|
|
2063
|
+
},
|
|
2064
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
2065
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
2066
|
+
wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
|
|
2067
|
+
const ret = v0;
|
|
2068
|
+
return addHeapObject(ret);
|
|
2069
|
+
},
|
|
2070
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
2071
|
+
const ret = getObject(arg0);
|
|
2072
|
+
return addHeapObject(ret);
|
|
2073
|
+
},
|
|
2074
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
2075
|
+
takeObject(arg0);
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2078
|
+
return {
|
|
2079
|
+
__proto__: null,
|
|
2080
|
+
"./perspective-js.wasm_bg.js": import0
|
|
2081
|
+
};
|
|
2082
|
+
}
|
|
2083
|
+
function __wasm_bindgen_func_elem_1668(arg0, arg1) {
|
|
2084
|
+
const ret = wasm.__wasm_bindgen_func_elem_1668(arg0, arg1);
|
|
2085
|
+
return takeObject(ret);
|
|
2086
|
+
}
|
|
2087
|
+
function __wasm_bindgen_func_elem_3795(arg0, arg1, arg2) {
|
|
2088
|
+
wasm.__wasm_bindgen_func_elem_3795(arg0, arg1, addHeapObject(arg2));
|
|
2089
|
+
}
|
|
2090
|
+
function __wasm_bindgen_func_elem_5384(arg0, arg1, arg2, arg3) {
|
|
2091
|
+
wasm.__wasm_bindgen_func_elem_5384(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2092
|
+
}
|
|
2093
|
+
var ClientFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2094
|
+
}, unregister: () => {
|
|
2095
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_client_free(ptr >>> 0, 1));
|
|
2096
|
+
var GenericSQLVirtualServerModelFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2097
|
+
}, unregister: () => {
|
|
2098
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_genericsqlvirtualservermodel_free(ptr >>> 0, 1));
|
|
2099
|
+
var ProxySessionFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2100
|
+
}, unregister: () => {
|
|
2101
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_proxysession_free(ptr >>> 0, 1));
|
|
2102
|
+
var TableFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2103
|
+
}, unregister: () => {
|
|
2104
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_table_free(ptr >>> 0, 1));
|
|
2105
|
+
var ViewFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2106
|
+
}, unregister: () => {
|
|
2107
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_view_free(ptr >>> 0, 1));
|
|
2108
|
+
var VirtualDataSliceFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2109
|
+
}, unregister: () => {
|
|
2110
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_virtualdataslice_free(ptr >>> 0, 1));
|
|
2111
|
+
var VirtualServerFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2112
|
+
}, unregister: () => {
|
|
2113
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_virtualserver_free(ptr >>> 0, 1));
|
|
2114
|
+
function addHeapObject(obj) {
|
|
2115
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
2116
|
+
const idx = heap_next;
|
|
2117
|
+
heap_next = heap[idx];
|
|
2118
|
+
heap[idx] = obj;
|
|
2119
|
+
return idx;
|
|
2120
|
+
}
|
|
2121
|
+
function _assertClass(instance, klass) {
|
|
2122
|
+
if (!(instance instanceof klass)) {
|
|
2123
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
function addBorrowedObject(obj) {
|
|
2127
|
+
if (stack_pointer == 1) throw new Error("out of js stack");
|
|
2128
|
+
heap[--stack_pointer] = obj;
|
|
2129
|
+
return stack_pointer;
|
|
2130
|
+
}
|
|
2131
|
+
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2132
|
+
}, unregister: () => {
|
|
2133
|
+
} } : new FinalizationRegistry((state) => state.dtor(state.a, state.b));
|
|
2134
|
+
function debugString(val) {
|
|
2135
|
+
const type = typeof val;
|
|
2136
|
+
if (type == "number" || type == "boolean" || val == null) {
|
|
2137
|
+
return `${val}`;
|
|
2138
|
+
}
|
|
2139
|
+
if (type == "string") {
|
|
2140
|
+
return `"${val}"`;
|
|
2141
|
+
}
|
|
2142
|
+
if (type == "symbol") {
|
|
2143
|
+
const description = val.description;
|
|
2144
|
+
if (description == null) {
|
|
2145
|
+
return "Symbol";
|
|
2146
|
+
} else {
|
|
2147
|
+
return `Symbol(${description})`;
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
if (type == "function") {
|
|
2151
|
+
const name = val.name;
|
|
2152
|
+
if (typeof name == "string" && name.length > 0) {
|
|
2153
|
+
return `Function(${name})`;
|
|
2154
|
+
} else {
|
|
2155
|
+
return "Function";
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
if (Array.isArray(val)) {
|
|
2159
|
+
const length = val.length;
|
|
2160
|
+
let debug = "[";
|
|
2161
|
+
if (length > 0) {
|
|
2162
|
+
debug += debugString(val[0]);
|
|
2163
|
+
}
|
|
2164
|
+
for (let i = 1; i < length; i++) {
|
|
2165
|
+
debug += ", " + debugString(val[i]);
|
|
2166
|
+
}
|
|
2167
|
+
debug += "]";
|
|
2168
|
+
return debug;
|
|
2169
|
+
}
|
|
2170
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
2171
|
+
let className;
|
|
2172
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
2173
|
+
className = builtInMatches[1];
|
|
2174
|
+
} else {
|
|
2175
|
+
return toString.call(val);
|
|
2176
|
+
}
|
|
2177
|
+
if (className == "Object") {
|
|
2178
|
+
try {
|
|
2179
|
+
return "Object(" + JSON.stringify(val) + ")";
|
|
2180
|
+
} catch (_) {
|
|
2181
|
+
return "Object";
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
if (val instanceof Error) {
|
|
2185
|
+
return `${val.name}: ${val.message}
|
|
2186
|
+
${val.stack}`;
|
|
2187
|
+
}
|
|
2188
|
+
return className;
|
|
2189
|
+
}
|
|
2190
|
+
function dropObject(idx) {
|
|
2191
|
+
if (idx < 132) return;
|
|
2192
|
+
heap[idx] = heap_next;
|
|
2193
|
+
heap_next = idx;
|
|
2194
|
+
}
|
|
2195
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
2196
|
+
ptr = ptr >>> 0;
|
|
2197
|
+
const mem = getDataViewMemory0();
|
|
2198
|
+
const result = [];
|
|
2199
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
2200
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
2201
|
+
}
|
|
2202
|
+
return result;
|
|
2203
|
+
}
|
|
2204
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
2205
|
+
ptr = ptr >>> 0;
|
|
2206
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
2207
|
+
}
|
|
2208
|
+
function getCachedStringFromWasm0(ptr, len) {
|
|
2209
|
+
if (ptr === 0) {
|
|
2210
|
+
return getObject(len);
|
|
2211
|
+
} else {
|
|
2212
|
+
return getStringFromWasm0(ptr, len);
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
var cachedDataViewMemory0 = null;
|
|
2216
|
+
function getDataViewMemory0() {
|
|
2217
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
2218
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
2219
|
+
}
|
|
2220
|
+
return cachedDataViewMemory0;
|
|
2221
|
+
}
|
|
2222
|
+
function getStringFromWasm0(ptr, len) {
|
|
2223
|
+
ptr = ptr >>> 0;
|
|
2224
|
+
return decodeText(ptr, len);
|
|
2225
|
+
}
|
|
2226
|
+
var cachedUint8ArrayMemory0 = null;
|
|
2227
|
+
function getUint8ArrayMemory0() {
|
|
2228
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2229
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2230
|
+
}
|
|
2231
|
+
return cachedUint8ArrayMemory0;
|
|
2232
|
+
}
|
|
2233
|
+
function getObject(idx) {
|
|
2234
|
+
return heap[idx];
|
|
2235
|
+
}
|
|
2236
|
+
function handleError(f, args) {
|
|
2237
|
+
try {
|
|
2238
|
+
return f.apply(this, args);
|
|
2239
|
+
} catch (e) {
|
|
2240
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
var heap = new Array(128).fill(void 0);
|
|
2244
|
+
heap.push(void 0, null, true, false);
|
|
2245
|
+
var heap_next = heap.length;
|
|
2246
|
+
function isLikeNone(x) {
|
|
2247
|
+
return x === void 0 || x === null;
|
|
2248
|
+
}
|
|
2249
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
2250
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
2251
|
+
const real = (...args) => {
|
|
2252
|
+
state.cnt++;
|
|
2253
|
+
try {
|
|
2254
|
+
return f(state.a, state.b, ...args);
|
|
2255
|
+
} finally {
|
|
2256
|
+
real._wbg_cb_unref();
|
|
2257
|
+
}
|
|
2258
|
+
};
|
|
2259
|
+
real._wbg_cb_unref = () => {
|
|
2260
|
+
if (--state.cnt === 0) {
|
|
2261
|
+
state.dtor(state.a, state.b);
|
|
2262
|
+
state.a = 0;
|
|
2263
|
+
CLOSURE_DTORS.unregister(state);
|
|
2264
|
+
}
|
|
2265
|
+
};
|
|
2266
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2267
|
+
return real;
|
|
2268
|
+
}
|
|
2269
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
2270
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
2271
|
+
const real = (...args) => {
|
|
2272
|
+
state.cnt++;
|
|
2273
|
+
const a = state.a;
|
|
2274
|
+
state.a = 0;
|
|
2275
|
+
try {
|
|
2276
|
+
return f(a, state.b, ...args);
|
|
2277
|
+
} finally {
|
|
2278
|
+
state.a = a;
|
|
2279
|
+
real._wbg_cb_unref();
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
real._wbg_cb_unref = () => {
|
|
2283
|
+
if (--state.cnt === 0) {
|
|
2284
|
+
state.dtor(state.a, state.b);
|
|
2285
|
+
state.a = 0;
|
|
2286
|
+
CLOSURE_DTORS.unregister(state);
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2290
|
+
return real;
|
|
2291
|
+
}
|
|
2292
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
2293
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
2294
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
2295
|
+
WASM_VECTOR_LEN = arg.length;
|
|
2296
|
+
return ptr;
|
|
2297
|
+
}
|
|
2298
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2299
|
+
if (realloc === void 0) {
|
|
2300
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2301
|
+
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
2302
|
+
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
2303
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2304
|
+
return ptr2;
|
|
2305
|
+
}
|
|
2306
|
+
let len = arg.length;
|
|
2307
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2308
|
+
const mem = getUint8ArrayMemory0();
|
|
2309
|
+
let offset = 0;
|
|
2310
|
+
for (; offset < len; offset++) {
|
|
2311
|
+
const code = arg.charCodeAt(offset);
|
|
2312
|
+
if (code > 127) break;
|
|
2313
|
+
mem[ptr + offset] = code;
|
|
1442
2314
|
}
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
const ret =
|
|
1450
|
-
|
|
2315
|
+
if (offset !== len) {
|
|
2316
|
+
if (offset !== 0) {
|
|
2317
|
+
arg = arg.slice(offset);
|
|
2318
|
+
}
|
|
2319
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2320
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2321
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2322
|
+
offset += ret.written;
|
|
2323
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1451
2324
|
}
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
2325
|
+
WASM_VECTOR_LEN = offset;
|
|
2326
|
+
return ptr;
|
|
2327
|
+
}
|
|
2328
|
+
var stack_pointer = 128;
|
|
2329
|
+
function takeObject(idx) {
|
|
2330
|
+
const ret = getObject(idx);
|
|
2331
|
+
dropObject(idx);
|
|
2332
|
+
return ret;
|
|
2333
|
+
}
|
|
2334
|
+
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
2335
|
+
cachedTextDecoder.decode();
|
|
2336
|
+
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2337
|
+
var numBytesDecoded = 0;
|
|
2338
|
+
function decodeText(ptr, len) {
|
|
2339
|
+
numBytesDecoded += len;
|
|
2340
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2341
|
+
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
2342
|
+
cachedTextDecoder.decode();
|
|
2343
|
+
numBytesDecoded = len;
|
|
1460
2344
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
var
|
|
2345
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2346
|
+
}
|
|
2347
|
+
var cachedTextEncoder = new TextEncoder();
|
|
2348
|
+
var WASM_VECTOR_LEN = 0;
|
|
2349
|
+
var wasmModule;
|
|
2350
|
+
var wasm;
|
|
2351
|
+
function __wbg_finalize_init(instance, module) {
|
|
2352
|
+
wasm = instance.exports;
|
|
2353
|
+
wasmModule = module;
|
|
2354
|
+
cachedDataViewMemory0 = null;
|
|
2355
|
+
cachedUint8ArrayMemory0 = null;
|
|
2356
|
+
return wasm;
|
|
2357
|
+
}
|
|
1464
2358
|
async function __wbg_load(module, imports) {
|
|
1465
2359
|
if (typeof Response === "function" && module instanceof Response) {
|
|
1466
2360
|
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
1467
2361
|
try {
|
|
1468
2362
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1469
2363
|
} catch (e) {
|
|
1470
|
-
const validResponse = module.ok &&
|
|
2364
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1471
2365
|
if (validResponse && module.headers.get("Content-Type") !== "application/wasm") {
|
|
1472
2366
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1473
2367
|
} else {
|
|
@@ -1485,581 +2379,19 @@ async function __wbg_load(module, imports) {
|
|
|
1485
2379
|
return instance;
|
|
1486
2380
|
}
|
|
1487
2381
|
}
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
const ret = Error(v0);
|
|
1495
|
-
return addHeapObject(ret);
|
|
1496
|
-
};
|
|
1497
|
-
imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
|
|
1498
|
-
const ret = Number(getObject(arg0));
|
|
1499
|
-
return ret;
|
|
1500
|
-
};
|
|
1501
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1502
|
-
const ret = String(getObject(arg1));
|
|
1503
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1504
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1505
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1506
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1507
|
-
};
|
|
1508
|
-
imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
|
|
1509
|
-
const v = getObject(arg1);
|
|
1510
|
-
const ret = typeof v === "bigint" ? v : void 0;
|
|
1511
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1512
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1513
|
-
};
|
|
1514
|
-
imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
|
|
1515
|
-
const v = getObject(arg0);
|
|
1516
|
-
const ret = typeof v === "boolean" ? v : void 0;
|
|
1517
|
-
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
1518
|
-
};
|
|
1519
|
-
imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
1520
|
-
const ret = debugString(getObject(arg1));
|
|
1521
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1522
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1523
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1524
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1525
|
-
};
|
|
1526
|
-
imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
|
|
1527
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
1528
|
-
return ret;
|
|
1529
|
-
};
|
|
1530
|
-
imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
|
|
1531
|
-
const ret = typeof getObject(arg0) === "bigint";
|
|
1532
|
-
return ret;
|
|
1533
|
-
};
|
|
1534
|
-
imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
1535
|
-
const ret = typeof getObject(arg0) === "function";
|
|
1536
|
-
return ret;
|
|
1537
|
-
};
|
|
1538
|
-
imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
|
|
1539
|
-
const ret = getObject(arg0) === null;
|
|
1540
|
-
return ret;
|
|
1541
|
-
};
|
|
1542
|
-
imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
|
|
1543
|
-
const val = getObject(arg0);
|
|
1544
|
-
const ret = typeof val === "object" && val !== null;
|
|
1545
|
-
return ret;
|
|
1546
|
-
};
|
|
1547
|
-
imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
|
|
1548
|
-
const ret = typeof getObject(arg0) === "string";
|
|
1549
|
-
return ret;
|
|
1550
|
-
};
|
|
1551
|
-
imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
1552
|
-
const ret = getObject(arg0) === void 0;
|
|
1553
|
-
return ret;
|
|
1554
|
-
};
|
|
1555
|
-
imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
|
|
1556
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
1557
|
-
return ret;
|
|
1558
|
-
};
|
|
1559
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
|
|
1560
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
1561
|
-
return ret;
|
|
1562
|
-
};
|
|
1563
|
-
imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
1564
|
-
const obj = getObject(arg1);
|
|
1565
|
-
const ret = typeof obj === "number" ? obj : void 0;
|
|
1566
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1567
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1568
|
-
};
|
|
1569
|
-
imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
|
|
1570
|
-
const obj = getObject(arg1);
|
|
1571
|
-
const ret = typeof obj === "string" ? obj : void 0;
|
|
1572
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1573
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1574
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1575
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1576
|
-
};
|
|
1577
|
-
imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
1578
|
-
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1579
|
-
throw new Error(v0);
|
|
1580
|
-
};
|
|
1581
|
-
imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
|
|
1582
|
-
getObject(arg0)._wbg_cb_unref();
|
|
1583
|
-
};
|
|
1584
|
-
imports.wbg.__wbg_apply_04097a755e1e4a1e = function() {
|
|
1585
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1586
|
-
const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
|
|
1587
|
-
return addHeapObject(ret);
|
|
1588
|
-
}, arguments);
|
|
1589
|
-
};
|
|
1590
|
-
imports.wbg.__wbg_at_a848c0ce365c6832 = function(arg0, arg1) {
|
|
1591
|
-
const ret = getObject(arg0).at(arg1);
|
|
1592
|
-
return addHeapObject(ret);
|
|
1593
|
-
};
|
|
1594
|
-
imports.wbg.__wbg_buffer_ccc4520b36d3ccf4 = function(arg0) {
|
|
1595
|
-
const ret = getObject(arg0).buffer;
|
|
1596
|
-
return addHeapObject(ret);
|
|
1597
|
-
};
|
|
1598
|
-
imports.wbg.__wbg_call_525440f72fbfc0ea = function() {
|
|
1599
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1600
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1601
|
-
return addHeapObject(ret);
|
|
1602
|
-
}, arguments);
|
|
1603
|
-
};
|
|
1604
|
-
imports.wbg.__wbg_call_e45d2cf9fc925fcf = function() {
|
|
1605
|
-
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1606
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1607
|
-
return addHeapObject(ret);
|
|
1608
|
-
}, arguments);
|
|
1609
|
-
};
|
|
1610
|
-
imports.wbg.__wbg_call_e762c39fa8ea36bf = function() {
|
|
1611
|
-
return handleError(function(arg0, arg1) {
|
|
1612
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
1613
|
-
return addHeapObject(ret);
|
|
1614
|
-
}, arguments);
|
|
1615
|
-
};
|
|
1616
|
-
imports.wbg.__wbg_client_new = function(arg0) {
|
|
1617
|
-
const ret = Client.__wrap(arg0);
|
|
1618
|
-
return addHeapObject(ret);
|
|
1619
|
-
};
|
|
1620
|
-
imports.wbg.__wbg_debug_e55e1461940eb14d = function(arg0, arg1, arg2, arg3) {
|
|
1621
|
-
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1622
|
-
};
|
|
1623
|
-
imports.wbg.__wbg_debug_f4b0c59db649db48 = function(arg0) {
|
|
1624
|
-
console.debug(getObject(arg0));
|
|
1625
|
-
};
|
|
1626
|
-
imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
1627
|
-
const ret = getObject(arg0).done;
|
|
1628
|
-
return ret;
|
|
1629
|
-
};
|
|
1630
|
-
imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
|
|
1631
|
-
const ret = Object.entries(getObject(arg0));
|
|
1632
|
-
return addHeapObject(ret);
|
|
1633
|
-
};
|
|
1634
|
-
imports.wbg.__wbg_error_6f1d0762f6c8ae2f = function(arg0, arg1) {
|
|
1635
|
-
console.error(getObject(arg0), getObject(arg1));
|
|
1636
|
-
};
|
|
1637
|
-
imports.wbg.__wbg_error_a7f8fbb0523dae15 = function(arg0) {
|
|
1638
|
-
console.error(getObject(arg0));
|
|
1639
|
-
};
|
|
1640
|
-
imports.wbg.__wbg_error_d8b22cf4e59a6791 = function(arg0, arg1, arg2, arg3) {
|
|
1641
|
-
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1642
|
-
};
|
|
1643
|
-
imports.wbg.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
|
|
1644
|
-
const ret = Array.from(getObject(arg0));
|
|
1645
|
-
return addHeapObject(ret);
|
|
1646
|
-
};
|
|
1647
|
-
imports.wbg.__wbg_getEntriesByName_b49d266abfb2e9af = function(arg0, arg1, arg2, arg3, arg4) {
|
|
1648
|
-
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1649
|
-
var v1 = getCachedStringFromWasm0(arg3, arg4);
|
|
1650
|
-
const ret = getObject(arg0).getEntriesByName(v0, v1);
|
|
1651
|
-
return addHeapObject(ret);
|
|
1652
|
-
};
|
|
1653
|
-
imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() {
|
|
1654
|
-
return handleError(function(arg0, arg1) {
|
|
1655
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1656
|
-
}, arguments);
|
|
1657
|
-
};
|
|
1658
|
-
imports.wbg.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
|
|
1659
|
-
const ret = getObject(arg0).getTime();
|
|
1660
|
-
return ret;
|
|
1661
|
-
};
|
|
1662
|
-
imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
1663
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1664
|
-
return addHeapObject(ret);
|
|
1665
|
-
};
|
|
1666
|
-
imports.wbg.__wbg_get_a499fc4db8c05b3b = function(arg0, arg1, arg2) {
|
|
1667
|
-
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1668
|
-
const ret = getObject(arg0)[v0];
|
|
1669
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1670
|
-
};
|
|
1671
|
-
imports.wbg.__wbg_get_efcb449f58ec27c2 = function() {
|
|
1672
|
-
return handleError(function(arg0, arg1) {
|
|
1673
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1674
|
-
return addHeapObject(ret);
|
|
1675
|
-
}, arguments);
|
|
1676
|
-
};
|
|
1677
|
-
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
1678
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
1679
|
-
return addHeapObject(ret);
|
|
1680
|
-
};
|
|
1681
|
-
imports.wbg.__wbg_has_787fafc980c3ccdb = function() {
|
|
1682
|
-
return handleError(function(arg0, arg1) {
|
|
1683
|
-
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1684
|
-
return ret;
|
|
1685
|
-
}, arguments);
|
|
1686
|
-
};
|
|
1687
|
-
imports.wbg.__wbg_info_68cd5b51ef7e5137 = function(arg0, arg1, arg2, arg3) {
|
|
1688
|
-
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1689
|
-
};
|
|
1690
|
-
imports.wbg.__wbg_info_e674a11f4f50cc0c = function(arg0) {
|
|
1691
|
-
console.info(getObject(arg0));
|
|
1692
|
-
};
|
|
1693
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
1694
|
-
let result;
|
|
1695
|
-
try {
|
|
1696
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1697
|
-
} catch (_) {
|
|
1698
|
-
result = false;
|
|
1699
|
-
}
|
|
1700
|
-
const ret = result;
|
|
1701
|
-
return ret;
|
|
1702
|
-
};
|
|
1703
|
-
imports.wbg.__wbg_instanceof_Array_fca44e0f4a7f6240 = function(arg0) {
|
|
1704
|
-
let result;
|
|
1705
|
-
try {
|
|
1706
|
-
result = getObject(arg0) instanceof Array;
|
|
1707
|
-
} catch (_) {
|
|
1708
|
-
result = false;
|
|
1709
|
-
}
|
|
1710
|
-
const ret = result;
|
|
1711
|
-
return ret;
|
|
1712
|
-
};
|
|
1713
|
-
imports.wbg.__wbg_instanceof_Date_79a0f671f36947f2 = function(arg0) {
|
|
1714
|
-
let result;
|
|
1715
|
-
try {
|
|
1716
|
-
result = getObject(arg0) instanceof Date;
|
|
1717
|
-
} catch (_) {
|
|
1718
|
-
result = false;
|
|
1719
|
-
}
|
|
1720
|
-
const ret = result;
|
|
1721
|
-
return ret;
|
|
1722
|
-
};
|
|
1723
|
-
imports.wbg.__wbg_instanceof_Error_a944ec10920129e2 = function(arg0) {
|
|
1724
|
-
let result;
|
|
1725
|
-
try {
|
|
1726
|
-
result = getObject(arg0) instanceof Error;
|
|
1727
|
-
} catch (_) {
|
|
1728
|
-
result = false;
|
|
1729
|
-
}
|
|
1730
|
-
const ret = result;
|
|
1731
|
-
return ret;
|
|
1732
|
-
};
|
|
1733
|
-
imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
|
|
1734
|
-
let result;
|
|
1735
|
-
try {
|
|
1736
|
-
result = getObject(arg0) instanceof Map;
|
|
1737
|
-
} catch (_) {
|
|
1738
|
-
result = false;
|
|
1739
|
-
}
|
|
1740
|
-
const ret = result;
|
|
1741
|
-
return ret;
|
|
1742
|
-
};
|
|
1743
|
-
imports.wbg.__wbg_instanceof_Object_10bb762262230c68 = function(arg0) {
|
|
1744
|
-
let result;
|
|
1745
|
-
try {
|
|
1746
|
-
result = getObject(arg0) instanceof Object;
|
|
1747
|
-
} catch (_) {
|
|
1748
|
-
result = false;
|
|
1749
|
-
}
|
|
1750
|
-
const ret = result;
|
|
1751
|
-
return ret;
|
|
1752
|
-
};
|
|
1753
|
-
imports.wbg.__wbg_instanceof_Promise_001fdd42afa1b7ef = function(arg0) {
|
|
1754
|
-
let result;
|
|
1755
|
-
try {
|
|
1756
|
-
result = getObject(arg0) instanceof Promise;
|
|
1757
|
-
} catch (_) {
|
|
1758
|
-
result = false;
|
|
1759
|
-
}
|
|
1760
|
-
const ret = result;
|
|
1761
|
-
return ret;
|
|
1762
|
-
};
|
|
1763
|
-
imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
1764
|
-
let result;
|
|
1765
|
-
try {
|
|
1766
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
1767
|
-
} catch (_) {
|
|
1768
|
-
result = false;
|
|
1769
|
-
}
|
|
1770
|
-
const ret = result;
|
|
1771
|
-
return ret;
|
|
1772
|
-
};
|
|
1773
|
-
imports.wbg.__wbg_instanceof_Window_4846dbb3de56c84c = function(arg0) {
|
|
1774
|
-
let result;
|
|
1775
|
-
try {
|
|
1776
|
-
result = getObject(arg0) instanceof Window;
|
|
1777
|
-
} catch (_) {
|
|
1778
|
-
result = false;
|
|
1779
|
-
}
|
|
1780
|
-
const ret = result;
|
|
1781
|
-
return ret;
|
|
1782
|
-
};
|
|
1783
|
-
imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
|
|
1784
|
-
const ret = Array.isArray(getObject(arg0));
|
|
1785
|
-
return ret;
|
|
1786
|
-
};
|
|
1787
|
-
imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
|
|
1788
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1789
|
-
return ret;
|
|
1790
|
-
};
|
|
1791
|
-
imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
|
|
1792
|
-
const ret = Symbol.iterator;
|
|
1793
|
-
return addHeapObject(ret);
|
|
1794
|
-
};
|
|
1795
|
-
imports.wbg.__wbg_jsvirtualdataslice_new = function(arg0) {
|
|
1796
|
-
const ret = JsVirtualDataSlice.__wrap(arg0);
|
|
1797
|
-
return addHeapObject(ret);
|
|
1798
|
-
};
|
|
1799
|
-
imports.wbg.__wbg_keys_b4d27b02ad14f4be = function(arg0) {
|
|
1800
|
-
const ret = Object.keys(getObject(arg0));
|
|
1801
|
-
return addHeapObject(ret);
|
|
1802
|
-
};
|
|
1803
|
-
imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
|
|
1804
|
-
const ret = getObject(arg0).length;
|
|
1805
|
-
return ret;
|
|
1806
|
-
};
|
|
1807
|
-
imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
1808
|
-
const ret = getObject(arg0).length;
|
|
1809
|
-
return ret;
|
|
1810
|
-
};
|
|
1811
|
-
imports.wbg.__wbg_mark_4411b340bdf62a5f = function() {
|
|
1812
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1813
|
-
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1814
|
-
getObject(arg0).mark(v0);
|
|
1815
|
-
}, arguments);
|
|
1816
|
-
};
|
|
1817
|
-
imports.wbg.__wbg_measure_ef89c90a92de6f43 = function() {
|
|
1818
|
-
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1819
|
-
var v0 = getCachedStringFromWasm0(arg1, arg2);
|
|
1820
|
-
var v1 = getCachedStringFromWasm0(arg3, arg4);
|
|
1821
|
-
getObject(arg0).measure(v0, v1);
|
|
1822
|
-
}, arguments);
|
|
1823
|
-
};
|
|
1824
|
-
imports.wbg.__wbg_message_1ee258909d7264fd = function(arg0) {
|
|
1825
|
-
const ret = getObject(arg0).message;
|
|
1826
|
-
return addHeapObject(ret);
|
|
1827
|
-
};
|
|
1828
|
-
imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
|
|
1829
|
-
const ret = new Object();
|
|
1830
|
-
return addHeapObject(ret);
|
|
1831
|
-
};
|
|
1832
|
-
imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
|
|
1833
|
-
try {
|
|
1834
|
-
var state0 = { a: arg0, b: arg1 };
|
|
1835
|
-
var cb0 = (arg02, arg12) => {
|
|
1836
|
-
const a = state0.a;
|
|
1837
|
-
state0.a = 0;
|
|
1838
|
-
try {
|
|
1839
|
-
return __wasm_bindgen_func_elem_5070(a, state0.b, arg02, arg12);
|
|
1840
|
-
} finally {
|
|
1841
|
-
state0.a = a;
|
|
1842
|
-
}
|
|
1843
|
-
};
|
|
1844
|
-
const ret = new Promise(cb0);
|
|
1845
|
-
return addHeapObject(ret);
|
|
1846
|
-
} finally {
|
|
1847
|
-
state0.a = state0.b = 0;
|
|
2382
|
+
function expectedResponseType(type) {
|
|
2383
|
+
switch (type) {
|
|
2384
|
+
case "basic":
|
|
2385
|
+
case "cors":
|
|
2386
|
+
case "default":
|
|
2387
|
+
return true;
|
|
1848
2388
|
}
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1852
|
-
return addHeapObject(ret);
|
|
1853
|
-
};
|
|
1854
|
-
imports.wbg.__wbg_new_68651c719dcda04e = function() {
|
|
1855
|
-
const ret = /* @__PURE__ */ new Map();
|
|
1856
|
-
return addHeapObject(ret);
|
|
1857
|
-
};
|
|
1858
|
-
imports.wbg.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
|
|
1859
|
-
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1860
|
-
const ret = new Error(v0);
|
|
1861
|
-
return addHeapObject(ret);
|
|
1862
|
-
};
|
|
1863
|
-
imports.wbg.__wbg_new_e17d9f43105b08be = function() {
|
|
1864
|
-
const ret = new Array();
|
|
1865
|
-
return addHeapObject(ret);
|
|
1866
|
-
};
|
|
1867
|
-
imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
|
|
1868
|
-
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1869
|
-
return addHeapObject(ret);
|
|
1870
|
-
};
|
|
1871
|
-
imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
|
|
1872
|
-
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1873
|
-
const ret = new Function(v0);
|
|
1874
|
-
return addHeapObject(ret);
|
|
1875
|
-
};
|
|
1876
|
-
imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() {
|
|
1877
|
-
return handleError(function(arg0) {
|
|
1878
|
-
const ret = getObject(arg0).next();
|
|
1879
|
-
return addHeapObject(ret);
|
|
1880
|
-
}, arguments);
|
|
1881
|
-
};
|
|
1882
|
-
imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
|
|
1883
|
-
const ret = getObject(arg0).next;
|
|
1884
|
-
return addHeapObject(ret);
|
|
1885
|
-
};
|
|
1886
|
-
imports.wbg.__wbg_now_f5ba683d8ce2c571 = function(arg0) {
|
|
1887
|
-
const ret = getObject(arg0).now();
|
|
1888
|
-
return ret;
|
|
1889
|
-
};
|
|
1890
|
-
imports.wbg.__wbg_parse_2a704d6b78abb2b8 = function() {
|
|
1891
|
-
return handleError(function(arg0, arg1) {
|
|
1892
|
-
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
1893
|
-
const ret = JSON.parse(v0);
|
|
1894
|
-
return addHeapObject(ret);
|
|
1895
|
-
}, arguments);
|
|
1896
|
-
};
|
|
1897
|
-
imports.wbg.__wbg_performance_e8315b5ae987e93f = function(arg0) {
|
|
1898
|
-
const ret = getObject(arg0).performance;
|
|
1899
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1900
|
-
};
|
|
1901
|
-
imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
1902
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1903
|
-
};
|
|
1904
|
-
imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
|
|
1905
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
1906
|
-
return ret;
|
|
1907
|
-
};
|
|
1908
|
-
imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
|
|
1909
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
1910
|
-
return addHeapObject(ret);
|
|
1911
|
-
};
|
|
1912
|
-
imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
|
|
1913
|
-
queueMicrotask(getObject(arg0));
|
|
1914
|
-
};
|
|
1915
|
-
imports.wbg.__wbg_reject_9d4761245c015a33 = function(arg0) {
|
|
1916
|
-
const ret = Promise.reject(getObject(arg0));
|
|
1917
|
-
return addHeapObject(ret);
|
|
1918
|
-
};
|
|
1919
|
-
imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
|
|
1920
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
1921
|
-
return addHeapObject(ret);
|
|
1922
|
-
};
|
|
1923
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1924
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1925
|
-
};
|
|
1926
|
-
imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
|
|
1927
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1928
|
-
return addHeapObject(ret);
|
|
1929
|
-
};
|
|
1930
|
-
imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
|
|
1931
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1932
|
-
};
|
|
1933
|
-
imports.wbg.__wbg_startTime_539df5e9647037f7 = function(arg0) {
|
|
1934
|
-
const ret = getObject(arg0).startTime;
|
|
1935
|
-
return ret;
|
|
1936
|
-
};
|
|
1937
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
|
|
1938
|
-
const ret = typeof global === "undefined" ? null : global;
|
|
1939
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1940
|
-
};
|
|
1941
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
|
|
1942
|
-
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
1943
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1944
|
-
};
|
|
1945
|
-
imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
|
|
1946
|
-
const ret = typeof self === "undefined" ? null : self;
|
|
1947
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1948
|
-
};
|
|
1949
|
-
imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
|
|
1950
|
-
const ret = typeof window === "undefined" ? null : window;
|
|
1951
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1952
|
-
};
|
|
1953
|
-
imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function() {
|
|
1954
|
-
return handleError(function(arg0) {
|
|
1955
|
-
const ret = JSON.stringify(getObject(arg0));
|
|
1956
|
-
return addHeapObject(ret);
|
|
1957
|
-
}, arguments);
|
|
1958
|
-
};
|
|
1959
|
-
imports.wbg.__wbg_table_new = function(arg0) {
|
|
1960
|
-
const ret = Table.__wrap(arg0);
|
|
1961
|
-
return addHeapObject(ret);
|
|
1962
|
-
};
|
|
1963
|
-
imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
|
|
1964
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
1965
|
-
return addHeapObject(ret);
|
|
1966
|
-
};
|
|
1967
|
-
imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
|
|
1968
|
-
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1969
|
-
return addHeapObject(ret);
|
|
1970
|
-
};
|
|
1971
|
-
imports.wbg.__wbg_toString_7da7c8dbec78fcb8 = function(arg0) {
|
|
1972
|
-
const ret = getObject(arg0).toString();
|
|
1973
|
-
return addHeapObject(ret);
|
|
1974
|
-
};
|
|
1975
|
-
imports.wbg.__wbg_trace_8e50cd754f118df3 = function(arg0) {
|
|
1976
|
-
console.trace(getObject(arg0));
|
|
1977
|
-
};
|
|
1978
|
-
imports.wbg.__wbg_trace_cf9f10b8c61bd472 = function(arg0, arg1, arg2, arg3) {
|
|
1979
|
-
console.trace(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1980
|
-
};
|
|
1981
|
-
imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
|
|
1982
|
-
const ret = getObject(arg0).value;
|
|
1983
|
-
return addHeapObject(ret);
|
|
1984
|
-
};
|
|
1985
|
-
imports.wbg.__wbg_values_6f4c6a6a11564d83 = function(arg0) {
|
|
1986
|
-
const ret = Object.values(getObject(arg0));
|
|
1987
|
-
return addHeapObject(ret);
|
|
1988
|
-
};
|
|
1989
|
-
imports.wbg.__wbg_view_new = function(arg0) {
|
|
1990
|
-
const ret = View.__wrap(arg0);
|
|
1991
|
-
return addHeapObject(ret);
|
|
1992
|
-
};
|
|
1993
|
-
imports.wbg.__wbg_view_unwrap = function(arg0) {
|
|
1994
|
-
const ret = View.__unwrap(takeObject(arg0));
|
|
1995
|
-
return ret;
|
|
1996
|
-
};
|
|
1997
|
-
imports.wbg.__wbg_warn_1d74dddbe2fd1dbb = function(arg0) {
|
|
1998
|
-
console.warn(getObject(arg0));
|
|
1999
|
-
};
|
|
2000
|
-
imports.wbg.__wbg_warn_8f5b5437666d0885 = function(arg0, arg1, arg2, arg3) {
|
|
2001
|
-
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
2002
|
-
};
|
|
2003
|
-
imports.wbg.__wbindgen_cast_25a0a844437d0e92 = function(arg0, arg1) {
|
|
2004
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
2005
|
-
wasm.__wbindgen_export4(arg0, arg1 * 4, 4);
|
|
2006
|
-
const ret = v0;
|
|
2007
|
-
return addHeapObject(ret);
|
|
2008
|
-
};
|
|
2009
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
2010
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
2011
|
-
return addHeapObject(ret);
|
|
2012
|
-
};
|
|
2013
|
-
imports.wbg.__wbindgen_cast_58f1ec65de0445ab = function(arg0, arg1) {
|
|
2014
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3500, __wasm_bindgen_func_elem_3515);
|
|
2015
|
-
return addHeapObject(ret);
|
|
2016
|
-
};
|
|
2017
|
-
imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
|
|
2018
|
-
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
2019
|
-
wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
|
|
2020
|
-
const ret = v0;
|
|
2021
|
-
return addHeapObject(ret);
|
|
2022
|
-
};
|
|
2023
|
-
imports.wbg.__wbindgen_cast_7e9c58eeb11b0a6f = function(arg0, arg1) {
|
|
2024
|
-
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
|
2025
|
-
const ret = v0;
|
|
2026
|
-
return addHeapObject(ret);
|
|
2027
|
-
};
|
|
2028
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
2029
|
-
const ret = arg0;
|
|
2030
|
-
return addHeapObject(ret);
|
|
2031
|
-
};
|
|
2032
|
-
imports.wbg.__wbindgen_cast_b4f8efd6e03d7eb3 = function(arg0, arg1) {
|
|
2033
|
-
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_123, __wasm_bindgen_func_elem_553);
|
|
2034
|
-
return addHeapObject(ret);
|
|
2035
|
-
};
|
|
2036
|
-
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
2037
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2038
|
-
return addHeapObject(ret);
|
|
2039
|
-
};
|
|
2040
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
2041
|
-
const ret = arg0;
|
|
2042
|
-
return addHeapObject(ret);
|
|
2043
|
-
};
|
|
2044
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2045
|
-
const ret = getObject(arg0);
|
|
2046
|
-
return addHeapObject(ret);
|
|
2047
|
-
};
|
|
2048
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2049
|
-
takeObject(arg0);
|
|
2050
|
-
};
|
|
2051
|
-
return imports;
|
|
2052
|
-
}
|
|
2053
|
-
function __wbg_finalize_init(instance, module) {
|
|
2054
|
-
wasm = instance.exports;
|
|
2055
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
2056
|
-
cachedDataViewMemory0 = null;
|
|
2057
|
-
cachedUint8ArrayMemory0 = null;
|
|
2058
|
-
return wasm;
|
|
2389
|
+
return false;
|
|
2390
|
+
}
|
|
2059
2391
|
}
|
|
2060
2392
|
function initSync(module) {
|
|
2061
2393
|
if (wasm !== void 0) return wasm;
|
|
2062
|
-
if (
|
|
2394
|
+
if (module !== void 0) {
|
|
2063
2395
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
2064
2396
|
({ module } = module);
|
|
2065
2397
|
} else {
|
|
@@ -2075,7 +2407,7 @@ function initSync(module) {
|
|
|
2075
2407
|
}
|
|
2076
2408
|
async function __wbg_init(module_or_path) {
|
|
2077
2409
|
if (wasm !== void 0) return wasm;
|
|
2078
|
-
if (
|
|
2410
|
+
if (module_or_path !== void 0) {
|
|
2079
2411
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2080
2412
|
({ module_or_path } = module_or_path);
|
|
2081
2413
|
} else {
|
|
@@ -2089,7 +2421,6 @@ async function __wbg_init(module_or_path) {
|
|
|
2089
2421
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
2090
2422
|
return __wbg_finalize_init(instance, module);
|
|
2091
2423
|
}
|
|
2092
|
-
var perspective_js_default = __wbg_init;
|
|
2093
2424
|
|
|
2094
2425
|
// src/ts/wasm/decompress.ts
|
|
2095
2426
|
import { extract } from "pro_self_extracting_wasm";
|
|
@@ -2538,7 +2869,7 @@ function createMessageHandler(mod, handler) {
|
|
|
2538
2869
|
async function postMessage(port, msg) {
|
|
2539
2870
|
if (msg.data.cmd === "init") {
|
|
2540
2871
|
try {
|
|
2541
|
-
virtualServer = new mod.
|
|
2872
|
+
virtualServer = new mod.VirtualServer(handler);
|
|
2542
2873
|
if (msg.data.id !== void 0) {
|
|
2543
2874
|
port.postMessage({ id: msg.data.id });
|
|
2544
2875
|
} else {
|
|
@@ -2574,7 +2905,7 @@ if (!globalThis.crypto) {
|
|
|
2574
2905
|
globalThis.crypto = webcrypto;
|
|
2575
2906
|
}
|
|
2576
2907
|
var uncompressed_client_wasm = await fs.readFile(path.join(__dirname, "../../dist/wasm/perspective-js.wasm")).then((buffer) => load_wasm_stage_0(buffer.buffer));
|
|
2577
|
-
await
|
|
2908
|
+
await __wbg_init({ module_or_path: uncompressed_client_wasm });
|
|
2578
2909
|
var SYNC_MODULE = await fs.readFile(
|
|
2579
2910
|
resolve("@perspective-dev/server/dist/wasm/perspective-server.wasm")
|
|
2580
2911
|
).then((buffer) => load_wasm_stage_0(buffer.buffer)).then((buffer) => compile_perspective(buffer.buffer));
|
|
@@ -2778,10 +3109,16 @@ var perspective_node_default = {
|
|
|
2778
3109
|
remove_hosted_tables_update,
|
|
2779
3110
|
on_error,
|
|
2780
3111
|
system_info,
|
|
2781
|
-
WebSocketServer
|
|
3112
|
+
WebSocketServer,
|
|
3113
|
+
GenericSQLVirtualServerModel,
|
|
3114
|
+
VirtualDataSlice,
|
|
3115
|
+
VirtualServer
|
|
2782
3116
|
};
|
|
2783
3117
|
export {
|
|
3118
|
+
GenericSQLVirtualServerModel,
|
|
2784
3119
|
PerspectiveServer2 as PerspectiveServer,
|
|
3120
|
+
VirtualDataSlice,
|
|
3121
|
+
VirtualServer,
|
|
2785
3122
|
WebSocketServer,
|
|
2786
3123
|
createMessageHandler2 as createMessageHandler,
|
|
2787
3124
|
cwd_static_file_handler,
|
|
@@ -2794,6 +3131,7 @@ export {
|
|
|
2794
3131
|
remove_hosted_tables_update,
|
|
2795
3132
|
system_info,
|
|
2796
3133
|
table,
|
|
3134
|
+
perspective_js_exports as wasmModule,
|
|
2797
3135
|
websocket2 as websocket,
|
|
2798
3136
|
worker
|
|
2799
3137
|
};
|