belobog-stellar-grid 1.0.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/LICENSE_APACHE +176 -0
- package/LICENSE_MIT +25 -0
- package/README.md +413 -0
- package/belobog_stellar_grid.d.ts +126 -0
- package/belobog_stellar_grid.js +690 -0
- package/belobog_stellar_grid_bg.wasm +0 -0
- package/package.json +33 -0
|
@@ -0,0 +1,690 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
|
|
3
|
+
function addToExternrefTable0(obj) {
|
|
4
|
+
const idx = wasm.__externref_table_alloc();
|
|
5
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
6
|
+
return idx;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
10
|
+
? { register: () => {}, unregister: () => {} }
|
|
11
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
12
|
+
|
|
13
|
+
function debugString(val) {
|
|
14
|
+
// primitive types
|
|
15
|
+
const type = typeof val;
|
|
16
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
17
|
+
return `${val}`;
|
|
18
|
+
}
|
|
19
|
+
if (type == 'string') {
|
|
20
|
+
return `"${val}"`;
|
|
21
|
+
}
|
|
22
|
+
if (type == 'symbol') {
|
|
23
|
+
const description = val.description;
|
|
24
|
+
if (description == null) {
|
|
25
|
+
return 'Symbol';
|
|
26
|
+
} else {
|
|
27
|
+
return `Symbol(${description})`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (type == 'function') {
|
|
31
|
+
const name = val.name;
|
|
32
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
33
|
+
return `Function(${name})`;
|
|
34
|
+
} else {
|
|
35
|
+
return 'Function';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// objects
|
|
39
|
+
if (Array.isArray(val)) {
|
|
40
|
+
const length = val.length;
|
|
41
|
+
let debug = '[';
|
|
42
|
+
if (length > 0) {
|
|
43
|
+
debug += debugString(val[0]);
|
|
44
|
+
}
|
|
45
|
+
for(let i = 1; i < length; i++) {
|
|
46
|
+
debug += ', ' + debugString(val[i]);
|
|
47
|
+
}
|
|
48
|
+
debug += ']';
|
|
49
|
+
return debug;
|
|
50
|
+
}
|
|
51
|
+
// Test for built-in
|
|
52
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
53
|
+
let className;
|
|
54
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
55
|
+
className = builtInMatches[1];
|
|
56
|
+
} else {
|
|
57
|
+
// Failed to match the standard '[object ClassName]'
|
|
58
|
+
return toString.call(val);
|
|
59
|
+
}
|
|
60
|
+
if (className == 'Object') {
|
|
61
|
+
// we're a user defined class or Object
|
|
62
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
63
|
+
// easier than looping through ownProperties of `val`.
|
|
64
|
+
try {
|
|
65
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
66
|
+
} catch (_) {
|
|
67
|
+
return 'Object';
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// errors
|
|
71
|
+
if (val instanceof Error) {
|
|
72
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
73
|
+
}
|
|
74
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
75
|
+
return className;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
79
|
+
ptr = ptr >>> 0;
|
|
80
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let cachedDataViewMemory0 = null;
|
|
84
|
+
function getDataViewMemory0() {
|
|
85
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
86
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
87
|
+
}
|
|
88
|
+
return cachedDataViewMemory0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function getStringFromWasm0(ptr, len) {
|
|
92
|
+
ptr = ptr >>> 0;
|
|
93
|
+
return decodeText(ptr, len);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
let cachedUint8ArrayMemory0 = null;
|
|
97
|
+
function getUint8ArrayMemory0() {
|
|
98
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
99
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
100
|
+
}
|
|
101
|
+
return cachedUint8ArrayMemory0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function handleError(f, args) {
|
|
105
|
+
try {
|
|
106
|
+
return f.apply(this, args);
|
|
107
|
+
} catch (e) {
|
|
108
|
+
const idx = addToExternrefTable0(e);
|
|
109
|
+
wasm.__wbindgen_exn_store(idx);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function isLikeNone(x) {
|
|
114
|
+
return x === undefined || x === null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
118
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
119
|
+
const real = (...args) => {
|
|
120
|
+
|
|
121
|
+
// First up with a closure we increment the internal reference
|
|
122
|
+
// count. This ensures that the Rust closure environment won't
|
|
123
|
+
// be deallocated while we're invoking it.
|
|
124
|
+
state.cnt++;
|
|
125
|
+
const a = state.a;
|
|
126
|
+
state.a = 0;
|
|
127
|
+
try {
|
|
128
|
+
return f(a, state.b, ...args);
|
|
129
|
+
} finally {
|
|
130
|
+
state.a = a;
|
|
131
|
+
real._wbg_cb_unref();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
real._wbg_cb_unref = () => {
|
|
135
|
+
if (--state.cnt === 0) {
|
|
136
|
+
state.dtor(state.a, state.b);
|
|
137
|
+
state.a = 0;
|
|
138
|
+
CLOSURE_DTORS.unregister(state);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
142
|
+
return real;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
146
|
+
if (realloc === undefined) {
|
|
147
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
148
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
149
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
150
|
+
WASM_VECTOR_LEN = buf.length;
|
|
151
|
+
return ptr;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
let len = arg.length;
|
|
155
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
156
|
+
|
|
157
|
+
const mem = getUint8ArrayMemory0();
|
|
158
|
+
|
|
159
|
+
let offset = 0;
|
|
160
|
+
|
|
161
|
+
for (; offset < len; offset++) {
|
|
162
|
+
const code = arg.charCodeAt(offset);
|
|
163
|
+
if (code > 0x7F) break;
|
|
164
|
+
mem[ptr + offset] = code;
|
|
165
|
+
}
|
|
166
|
+
if (offset !== len) {
|
|
167
|
+
if (offset !== 0) {
|
|
168
|
+
arg = arg.slice(offset);
|
|
169
|
+
}
|
|
170
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
171
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
172
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
173
|
+
|
|
174
|
+
offset += ret.written;
|
|
175
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
WASM_VECTOR_LEN = offset;
|
|
179
|
+
return ptr;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function takeFromExternrefTable0(idx) {
|
|
183
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
184
|
+
wasm.__externref_table_dealloc(idx);
|
|
185
|
+
return value;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
189
|
+
cachedTextDecoder.decode();
|
|
190
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
191
|
+
let numBytesDecoded = 0;
|
|
192
|
+
function decodeText(ptr, len) {
|
|
193
|
+
numBytesDecoded += len;
|
|
194
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
195
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
196
|
+
cachedTextDecoder.decode();
|
|
197
|
+
numBytesDecoded = len;
|
|
198
|
+
}
|
|
199
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const cachedTextEncoder = new TextEncoder();
|
|
203
|
+
|
|
204
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
205
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
206
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
207
|
+
view.set(buf);
|
|
208
|
+
return {
|
|
209
|
+
read: arg.length,
|
|
210
|
+
written: buf.length
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
let WASM_VECTOR_LEN = 0;
|
|
216
|
+
|
|
217
|
+
function wasm_bindgen__convert__closures_____invoke__hd548f8095fd5fd71(arg0, arg1, arg2) {
|
|
218
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hd548f8095fd5fd71(arg0, arg1, arg2);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function wasm_bindgen__convert__closures_____invoke__h27f1beedb8b1e394(arg0, arg1, arg2, arg3) {
|
|
222
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h27f1beedb8b1e394(arg0, arg1, arg2, arg3);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* 导出格式枚举
|
|
227
|
+
* @enum {0 | 1}
|
|
228
|
+
*/
|
|
229
|
+
export const ExportFormat = Object.freeze({
|
|
230
|
+
/**
|
|
231
|
+
* CSV 格式(默认)
|
|
232
|
+
*/
|
|
233
|
+
Csv: 0, "0": "Csv",
|
|
234
|
+
/**
|
|
235
|
+
* Excel XLSX 格式
|
|
236
|
+
*/
|
|
237
|
+
Xlsx: 1, "1": "Xlsx",
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* 统一的表格导出函数(带进度回调)
|
|
242
|
+
*
|
|
243
|
+
* 支持导出为 CSV 或 Excel 格式,通过 format 参数控制,支持进度回调
|
|
244
|
+
*
|
|
245
|
+
* # 参数
|
|
246
|
+
* * `table_id` - 要导出的 HTML 表格元素的 ID
|
|
247
|
+
* * `filename` - 可选的导出文件名(不包含扩展名时会自动添加)
|
|
248
|
+
* * `format` - 导出格式(Csv 或 Xlsx),默认为 Csv
|
|
249
|
+
* * `progress_callback` - 可选的进度回调函数,接收 0-100 的进度值
|
|
250
|
+
*
|
|
251
|
+
* # 返回值
|
|
252
|
+
* * `Ok(())` - 导出成功
|
|
253
|
+
* * `Err(JsValue)` - 导出失败,包含错误信息
|
|
254
|
+
*
|
|
255
|
+
* # 示例
|
|
256
|
+
* ```javascript
|
|
257
|
+
* import init, { export_table, ExportFormat } from './pkg/excel_exporter.js';
|
|
258
|
+
* await init();
|
|
259
|
+
*
|
|
260
|
+
* // 导出为 CSV(默认,无进度回调)
|
|
261
|
+
* export_table('my-table');
|
|
262
|
+
* export_table('my-table', '数据.csv');
|
|
263
|
+
*
|
|
264
|
+
* // 导出为 CSV(带进度回调)
|
|
265
|
+
* export_table('my-table', '数据', ExportFormat.Csv, (progress) => {
|
|
266
|
+
* console.log(`进度: ${progress.toFixed(1)}%`);
|
|
267
|
+
* });
|
|
268
|
+
*
|
|
269
|
+
* // 导出为 Excel(带进度回调)
|
|
270
|
+
* export_table('my-table', '报表', ExportFormat.Xlsx, (progress) => {
|
|
271
|
+
* document.getElementById('progress').style.width = `${progress}%`;
|
|
272
|
+
* });
|
|
273
|
+
* ```
|
|
274
|
+
* @param {string} table_id
|
|
275
|
+
* @param {string | null} [filename]
|
|
276
|
+
* @param {ExportFormat | null} [format]
|
|
277
|
+
* @param {Function | null} [progress_callback]
|
|
278
|
+
*/
|
|
279
|
+
export function export_table(table_id, filename, format, progress_callback) {
|
|
280
|
+
const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
|
+
const len0 = WASM_VECTOR_LEN;
|
|
282
|
+
var ptr1 = isLikeNone(filename) ? 0 : passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
283
|
+
var len1 = WASM_VECTOR_LEN;
|
|
284
|
+
const ret = wasm.export_table(ptr0, len0, ptr1, len1, isLikeNone(format) ? 2 : format, isLikeNone(progress_callback) ? 0 : addToExternrefTable0(progress_callback));
|
|
285
|
+
if (ret[1]) {
|
|
286
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* 分批异步导出 HTML 表格到 CSV 文件
|
|
292
|
+
*
|
|
293
|
+
* 这个函数将表格数据分批处理,在批次之间让出控制权给浏览器事件循环,
|
|
294
|
+
* 从而避免在处理大量数据时阻塞主线程导致页面卡死。
|
|
295
|
+
*
|
|
296
|
+
* # 参数
|
|
297
|
+
* * `table_id` - 要导出的 HTML 表格元素的 ID
|
|
298
|
+
* * `tbody_id` - 可选的数据表格体 ID(用于分离表头和数据)
|
|
299
|
+
* * `filename` - 可选的导出文件名(可选,默认为 "table_export.csv")
|
|
300
|
+
* * `batch_size` - 每批处理的行数(默认 1000)
|
|
301
|
+
* * `progress_callback` - 进度回调函数,接收进度百分比 (0-100)
|
|
302
|
+
*
|
|
303
|
+
* # 返回值
|
|
304
|
+
* * `Promise<void>` - 异步操作的 Promise
|
|
305
|
+
*
|
|
306
|
+
* # 示例
|
|
307
|
+
* ```javascript
|
|
308
|
+
* import { export_table_to_csv_batch } from './pkg/excel_exporter.js';
|
|
309
|
+
*
|
|
310
|
+
* await export_table_to_csv_batch(
|
|
311
|
+
* 'my-table',
|
|
312
|
+
* 'my-tbody', // 可选的 tbody ID
|
|
313
|
+
* 'data.csv',
|
|
314
|
+
* 1000, // 每批 1000 行
|
|
315
|
+
* (progress) => {
|
|
316
|
+
* console.log(`进度: ${progress}%`);
|
|
317
|
+
* }
|
|
318
|
+
* );
|
|
319
|
+
* ```
|
|
320
|
+
* @param {string} table_id
|
|
321
|
+
* @param {string | null} [tbody_id]
|
|
322
|
+
* @param {string | null} [filename]
|
|
323
|
+
* @param {number | null} [batch_size]
|
|
324
|
+
* @param {Function | null} [progress_callback]
|
|
325
|
+
* @returns {Promise<any>}
|
|
326
|
+
*/
|
|
327
|
+
export function export_table_to_csv_batch(table_id, tbody_id, filename, batch_size, progress_callback) {
|
|
328
|
+
const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
329
|
+
const len0 = WASM_VECTOR_LEN;
|
|
330
|
+
var ptr1 = isLikeNone(tbody_id) ? 0 : passStringToWasm0(tbody_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
331
|
+
var len1 = WASM_VECTOR_LEN;
|
|
332
|
+
var ptr2 = isLikeNone(filename) ? 0 : passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
333
|
+
var len2 = WASM_VECTOR_LEN;
|
|
334
|
+
const ret = wasm.export_table_to_csv_batch(ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(batch_size) ? 0x100000001 : (batch_size) >>> 0, isLikeNone(progress_callback) ? 0 : addToExternrefTable0(progress_callback));
|
|
335
|
+
return ret;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
339
|
+
|
|
340
|
+
async function __wbg_load(module, imports) {
|
|
341
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
342
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
343
|
+
try {
|
|
344
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
345
|
+
} catch (e) {
|
|
346
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
347
|
+
|
|
348
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
349
|
+
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);
|
|
350
|
+
|
|
351
|
+
} else {
|
|
352
|
+
throw e;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const bytes = await module.arrayBuffer();
|
|
358
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
359
|
+
} else {
|
|
360
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
361
|
+
|
|
362
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
363
|
+
return { instance, module };
|
|
364
|
+
} else {
|
|
365
|
+
return instance;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function __wbg_get_imports() {
|
|
371
|
+
const imports = {};
|
|
372
|
+
imports.wbg = {};
|
|
373
|
+
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
374
|
+
const ret = debugString(arg1);
|
|
375
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
376
|
+
const len1 = WASM_VECTOR_LEN;
|
|
377
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
378
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
379
|
+
};
|
|
380
|
+
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
381
|
+
const ret = typeof(arg0) === 'function';
|
|
382
|
+
return ret;
|
|
383
|
+
};
|
|
384
|
+
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
385
|
+
const ret = arg0 === undefined;
|
|
386
|
+
return ret;
|
|
387
|
+
};
|
|
388
|
+
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
389
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
390
|
+
};
|
|
391
|
+
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
392
|
+
arg0._wbg_cb_unref();
|
|
393
|
+
};
|
|
394
|
+
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
395
|
+
const ret = arg0.call(arg1, arg2);
|
|
396
|
+
return ret;
|
|
397
|
+
}, arguments) };
|
|
398
|
+
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
399
|
+
const ret = arg0.call(arg1);
|
|
400
|
+
return ret;
|
|
401
|
+
}, arguments) };
|
|
402
|
+
imports.wbg.__wbg_cells_545c799983014137 = function(arg0) {
|
|
403
|
+
const ret = arg0.cells;
|
|
404
|
+
return ret;
|
|
405
|
+
};
|
|
406
|
+
imports.wbg.__wbg_click_3a8e35c38329dd3a = function(arg0) {
|
|
407
|
+
arg0.click();
|
|
408
|
+
};
|
|
409
|
+
imports.wbg.__wbg_createElement_da4ed2b219560fc6 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
410
|
+
const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
|
|
411
|
+
return ret;
|
|
412
|
+
}, arguments) };
|
|
413
|
+
imports.wbg.__wbg_createObjectURL_7d9f7f8f41373850 = function() { return handleError(function (arg0, arg1) {
|
|
414
|
+
const ret = URL.createObjectURL(arg1);
|
|
415
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
416
|
+
const len1 = WASM_VECTOR_LEN;
|
|
417
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
418
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
419
|
+
}, arguments) };
|
|
420
|
+
imports.wbg.__wbg_document_5b745e82ba551ca5 = function(arg0) {
|
|
421
|
+
const ret = arg0.document;
|
|
422
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
423
|
+
};
|
|
424
|
+
imports.wbg.__wbg_getElementById_e05488d2143c2b21 = function(arg0, arg1, arg2) {
|
|
425
|
+
const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2));
|
|
426
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
427
|
+
};
|
|
428
|
+
imports.wbg.__wbg_get_with_index_02edcfc1dc5cd213 = function(arg0, arg1) {
|
|
429
|
+
const ret = arg0[arg1 >>> 0];
|
|
430
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
431
|
+
};
|
|
432
|
+
imports.wbg.__wbg_innerText_f0031d4a341b201e = function(arg0, arg1) {
|
|
433
|
+
const ret = arg1.innerText;
|
|
434
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
435
|
+
const len1 = WASM_VECTOR_LEN;
|
|
436
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
437
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
438
|
+
};
|
|
439
|
+
imports.wbg.__wbg_instanceof_HtmlAnchorElement_2ac07b5cf25eac0c = function(arg0) {
|
|
440
|
+
let result;
|
|
441
|
+
try {
|
|
442
|
+
result = arg0 instanceof HTMLAnchorElement;
|
|
443
|
+
} catch (_) {
|
|
444
|
+
result = false;
|
|
445
|
+
}
|
|
446
|
+
const ret = result;
|
|
447
|
+
return ret;
|
|
448
|
+
};
|
|
449
|
+
imports.wbg.__wbg_instanceof_HtmlTableCellElement_75e96f69f361508a = function(arg0) {
|
|
450
|
+
let result;
|
|
451
|
+
try {
|
|
452
|
+
result = arg0 instanceof HTMLTableCellElement;
|
|
453
|
+
} catch (_) {
|
|
454
|
+
result = false;
|
|
455
|
+
}
|
|
456
|
+
const ret = result;
|
|
457
|
+
return ret;
|
|
458
|
+
};
|
|
459
|
+
imports.wbg.__wbg_instanceof_HtmlTableElement_25f7ed83ddf67808 = function(arg0) {
|
|
460
|
+
let result;
|
|
461
|
+
try {
|
|
462
|
+
result = arg0 instanceof HTMLTableElement;
|
|
463
|
+
} catch (_) {
|
|
464
|
+
result = false;
|
|
465
|
+
}
|
|
466
|
+
const ret = result;
|
|
467
|
+
return ret;
|
|
468
|
+
};
|
|
469
|
+
imports.wbg.__wbg_instanceof_HtmlTableRowElement_616c98709e3ec634 = function(arg0) {
|
|
470
|
+
let result;
|
|
471
|
+
try {
|
|
472
|
+
result = arg0 instanceof HTMLTableRowElement;
|
|
473
|
+
} catch (_) {
|
|
474
|
+
result = false;
|
|
475
|
+
}
|
|
476
|
+
const ret = result;
|
|
477
|
+
return ret;
|
|
478
|
+
};
|
|
479
|
+
imports.wbg.__wbg_instanceof_HtmlTableSectionElement_e3071b60d4dbdcd0 = function(arg0) {
|
|
480
|
+
let result;
|
|
481
|
+
try {
|
|
482
|
+
result = arg0 instanceof HTMLTableSectionElement;
|
|
483
|
+
} catch (_) {
|
|
484
|
+
result = false;
|
|
485
|
+
}
|
|
486
|
+
const ret = result;
|
|
487
|
+
return ret;
|
|
488
|
+
};
|
|
489
|
+
imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
|
|
490
|
+
let result;
|
|
491
|
+
try {
|
|
492
|
+
result = arg0 instanceof Window;
|
|
493
|
+
} catch (_) {
|
|
494
|
+
result = false;
|
|
495
|
+
}
|
|
496
|
+
const ret = result;
|
|
497
|
+
return ret;
|
|
498
|
+
};
|
|
499
|
+
imports.wbg.__wbg_length_149bfa5fd618b65f = function(arg0) {
|
|
500
|
+
const ret = arg0.length;
|
|
501
|
+
return ret;
|
|
502
|
+
};
|
|
503
|
+
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
504
|
+
const ret = new Object();
|
|
505
|
+
return ret;
|
|
506
|
+
};
|
|
507
|
+
imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
508
|
+
try {
|
|
509
|
+
var state0 = {a: arg0, b: arg1};
|
|
510
|
+
var cb0 = (arg0, arg1) => {
|
|
511
|
+
const a = state0.a;
|
|
512
|
+
state0.a = 0;
|
|
513
|
+
try {
|
|
514
|
+
return wasm_bindgen__convert__closures_____invoke__h27f1beedb8b1e394(a, state0.b, arg0, arg1);
|
|
515
|
+
} finally {
|
|
516
|
+
state0.a = a;
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
const ret = new Promise(cb0);
|
|
520
|
+
return ret;
|
|
521
|
+
} finally {
|
|
522
|
+
state0.a = state0.b = 0;
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
|
|
526
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
527
|
+
return ret;
|
|
528
|
+
};
|
|
529
|
+
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
530
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
531
|
+
return ret;
|
|
532
|
+
};
|
|
533
|
+
imports.wbg.__wbg_new_with_u8_array_sequence_and_options_d4def9ec0588c7ec = function() { return handleError(function (arg0, arg1) {
|
|
534
|
+
const ret = new Blob(arg0, arg1);
|
|
535
|
+
return ret;
|
|
536
|
+
}, arguments) };
|
|
537
|
+
imports.wbg.__wbg_now_69d776cd24f5215b = function() {
|
|
538
|
+
const ret = Date.now();
|
|
539
|
+
return ret;
|
|
540
|
+
};
|
|
541
|
+
imports.wbg.__wbg_of_6505a0eb509da02e = function(arg0) {
|
|
542
|
+
const ret = Array.of(arg0);
|
|
543
|
+
return ret;
|
|
544
|
+
};
|
|
545
|
+
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
546
|
+
const ret = arg0.queueMicrotask;
|
|
547
|
+
return ret;
|
|
548
|
+
};
|
|
549
|
+
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
550
|
+
queueMicrotask(arg0);
|
|
551
|
+
};
|
|
552
|
+
imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
553
|
+
const ret = Promise.resolve(arg0);
|
|
554
|
+
return ret;
|
|
555
|
+
};
|
|
556
|
+
imports.wbg.__wbg_revokeObjectURL_88db3468842ff09e = function() { return handleError(function (arg0, arg1) {
|
|
557
|
+
URL.revokeObjectURL(getStringFromWasm0(arg0, arg1));
|
|
558
|
+
}, arguments) };
|
|
559
|
+
imports.wbg.__wbg_rows_33a123c88e38a6a7 = function(arg0) {
|
|
560
|
+
const ret = arg0.rows;
|
|
561
|
+
return ret;
|
|
562
|
+
};
|
|
563
|
+
imports.wbg.__wbg_rows_744ac6d4cb0ec6fa = function(arg0) {
|
|
564
|
+
const ret = arg0.rows;
|
|
565
|
+
return ret;
|
|
566
|
+
};
|
|
567
|
+
imports.wbg.__wbg_setTimeout_06477c23d31efef1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
568
|
+
const ret = arg0.setTimeout(arg1, arg2);
|
|
569
|
+
return ret;
|
|
570
|
+
}, arguments) };
|
|
571
|
+
imports.wbg.__wbg_set_download_8403fd66b94b25a2 = function(arg0, arg1, arg2) {
|
|
572
|
+
arg0.download = getStringFromWasm0(arg1, arg2);
|
|
573
|
+
};
|
|
574
|
+
imports.wbg.__wbg_set_href_25c4bcdcbfb4459b = function(arg0, arg1, arg2) {
|
|
575
|
+
arg0.href = getStringFromWasm0(arg1, arg2);
|
|
576
|
+
};
|
|
577
|
+
imports.wbg.__wbg_set_type_7ce650670a34c68f = function(arg0, arg1, arg2) {
|
|
578
|
+
arg0.type = getStringFromWasm0(arg1, arg2);
|
|
579
|
+
};
|
|
580
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
581
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
582
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
583
|
+
};
|
|
584
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
585
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
586
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
587
|
+
};
|
|
588
|
+
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
589
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
590
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
591
|
+
};
|
|
592
|
+
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
593
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
594
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
595
|
+
};
|
|
596
|
+
imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
597
|
+
const ret = arg0.then(arg1, arg2);
|
|
598
|
+
return ret;
|
|
599
|
+
};
|
|
600
|
+
imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
601
|
+
const ret = arg0.then(arg1);
|
|
602
|
+
return ret;
|
|
603
|
+
};
|
|
604
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
605
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
606
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
607
|
+
return ret;
|
|
608
|
+
};
|
|
609
|
+
imports.wbg.__wbindgen_cast_47ef039842436c85 = function(arg0, arg1) {
|
|
610
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 738, function: Function { arguments: [Externref], shim_idx: 739, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
611
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd85ddfaf9b76fe33, wasm_bindgen__convert__closures_____invoke__hd548f8095fd5fd71);
|
|
612
|
+
return ret;
|
|
613
|
+
};
|
|
614
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
615
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
616
|
+
const ret = arg0;
|
|
617
|
+
return ret;
|
|
618
|
+
};
|
|
619
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
620
|
+
const table = wasm.__wbindgen_externrefs;
|
|
621
|
+
const offset = table.grow(4);
|
|
622
|
+
table.set(0, undefined);
|
|
623
|
+
table.set(offset + 0, undefined);
|
|
624
|
+
table.set(offset + 1, null);
|
|
625
|
+
table.set(offset + 2, true);
|
|
626
|
+
table.set(offset + 3, false);
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
return imports;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function __wbg_finalize_init(instance, module) {
|
|
633
|
+
wasm = instance.exports;
|
|
634
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
635
|
+
cachedDataViewMemory0 = null;
|
|
636
|
+
cachedUint8ArrayMemory0 = null;
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
wasm.__wbindgen_start();
|
|
640
|
+
return wasm;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
function initSync(module) {
|
|
644
|
+
if (wasm !== undefined) return wasm;
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
if (typeof module !== 'undefined') {
|
|
648
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
649
|
+
({module} = module)
|
|
650
|
+
} else {
|
|
651
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
const imports = __wbg_get_imports();
|
|
656
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
657
|
+
module = new WebAssembly.Module(module);
|
|
658
|
+
}
|
|
659
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
660
|
+
return __wbg_finalize_init(instance, module);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
async function __wbg_init(module_or_path) {
|
|
664
|
+
if (wasm !== undefined) return wasm;
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
if (typeof module_or_path !== 'undefined') {
|
|
668
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
669
|
+
({module_or_path} = module_or_path)
|
|
670
|
+
} else {
|
|
671
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
if (typeof module_or_path === 'undefined') {
|
|
676
|
+
module_or_path = new URL('belobog_stellar_grid_bg.wasm', import.meta.url);
|
|
677
|
+
}
|
|
678
|
+
const imports = __wbg_get_imports();
|
|
679
|
+
|
|
680
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
681
|
+
module_or_path = fetch(module_or_path);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
685
|
+
|
|
686
|
+
return __wbg_finalize_init(instance, module);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
export { initSync };
|
|
690
|
+
export default __wbg_init;
|
|
Binary file
|