@docmentis/udoc-viewer 0.6.42 → 0.6.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/package.json +1 -1
- package/dist/src/UDocClient.js +1 -1
- package/dist/src/UDocViewer.d.ts +10 -3
- package/dist/src/UDocViewer.d.ts.map +1 -1
- package/dist/src/UDocViewer.js +7 -4
- package/dist/src/UDocViewer.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/ui/viewer/components/LeftPanel.d.ts.map +1 -1
- package/dist/src/ui/viewer/components/LeftPanel.js +16 -11
- package/dist/src/ui/viewer/components/LeftPanel.js.map +1 -1
- package/dist/src/ui/viewer/components/Toolbar.d.ts.map +1 -1
- package/dist/src/ui/viewer/components/Toolbar.js +3 -4
- package/dist/src/ui/viewer/components/Toolbar.js.map +1 -1
- package/dist/src/ui/viewer/state.d.ts +2 -0
- package/dist/src/ui/viewer/state.d.ts.map +1 -1
- package/dist/src/ui/viewer/state.js +11 -2
- package/dist/src/ui/viewer/state.js.map +1 -1
- package/dist/src/ui/viewer/styles-inline.d.ts +1 -1
- package/dist/src/ui/viewer/styles-inline.d.ts.map +1 -1
- package/dist/src/ui/viewer/styles-inline.js +2 -1
- package/dist/src/ui/viewer/styles-inline.js.map +1 -1
- package/dist/src/wasm/udoc.d.ts +898 -892
- package/dist/src/wasm/udoc.js +2014 -1958
- package/dist/src/wasm/udoc_bg.wasm +0 -0
- package/dist/src/wasm/udoc_bg.wasm.d.ts +4 -3
- package/dist/src/worker/worker-inline.js +1 -1
- package/dist/src/worker/worker.js +1963 -1905
- package/package.json +1 -1
|
@@ -1,253 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
3
|
// dist/src/wasm/udoc.js
|
|
4
|
-
var wasm;
|
|
5
|
-
function addHeapObject(obj) {
|
|
6
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
7
|
-
const idx = heap_next;
|
|
8
|
-
heap_next = heap[idx];
|
|
9
|
-
heap[idx] = obj;
|
|
10
|
-
return idx;
|
|
11
|
-
}
|
|
12
|
-
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
13
|
-
}, unregister: () => {
|
|
14
|
-
} } : new FinalizationRegistry((state) => state.dtor(state.a, state.b));
|
|
15
|
-
function debugString(val) {
|
|
16
|
-
const type = typeof val;
|
|
17
|
-
if (type == "number" || type == "boolean" || val == null) {
|
|
18
|
-
return `${val}`;
|
|
19
|
-
}
|
|
20
|
-
if (type == "string") {
|
|
21
|
-
return `"${val}"`;
|
|
22
|
-
}
|
|
23
|
-
if (type == "symbol") {
|
|
24
|
-
const description = val.description;
|
|
25
|
-
if (description == null) {
|
|
26
|
-
return "Symbol";
|
|
27
|
-
} else {
|
|
28
|
-
return `Symbol(${description})`;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if (type == "function") {
|
|
32
|
-
const name = val.name;
|
|
33
|
-
if (typeof name == "string" && name.length > 0) {
|
|
34
|
-
return `Function(${name})`;
|
|
35
|
-
} else {
|
|
36
|
-
return "Function";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
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
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
52
|
-
let className;
|
|
53
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
54
|
-
className = builtInMatches[1];
|
|
55
|
-
} else {
|
|
56
|
-
return toString.call(val);
|
|
57
|
-
}
|
|
58
|
-
if (className == "Object") {
|
|
59
|
-
try {
|
|
60
|
-
return "Object(" + JSON.stringify(val) + ")";
|
|
61
|
-
} catch (_) {
|
|
62
|
-
return "Object";
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (val instanceof Error) {
|
|
66
|
-
return `${val.name}: ${val.message}
|
|
67
|
-
${val.stack}`;
|
|
68
|
-
}
|
|
69
|
-
return className;
|
|
70
|
-
}
|
|
71
|
-
function dropObject(idx) {
|
|
72
|
-
if (idx < 132) return;
|
|
73
|
-
heap[idx] = heap_next;
|
|
74
|
-
heap_next = idx;
|
|
75
|
-
}
|
|
76
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
77
|
-
ptr = ptr >>> 0;
|
|
78
|
-
const mem = getDataViewMemory0();
|
|
79
|
-
const result = [];
|
|
80
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
81
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
86
|
-
ptr = ptr >>> 0;
|
|
87
|
-
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
88
|
-
}
|
|
89
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
90
|
-
ptr = ptr >>> 0;
|
|
91
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
92
|
-
}
|
|
93
|
-
var cachedDataViewMemory0 = null;
|
|
94
|
-
function getDataViewMemory0() {
|
|
95
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
96
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
97
|
-
}
|
|
98
|
-
return cachedDataViewMemory0;
|
|
99
|
-
}
|
|
100
|
-
function getStringFromWasm0(ptr, len) {
|
|
101
|
-
ptr = ptr >>> 0;
|
|
102
|
-
return decodeText(ptr, len);
|
|
103
|
-
}
|
|
104
|
-
var cachedUint32ArrayMemory0 = null;
|
|
105
|
-
function getUint32ArrayMemory0() {
|
|
106
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
107
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
108
|
-
}
|
|
109
|
-
return cachedUint32ArrayMemory0;
|
|
110
|
-
}
|
|
111
|
-
var cachedUint8ArrayMemory0 = null;
|
|
112
|
-
function getUint8ArrayMemory0() {
|
|
113
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
114
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
115
|
-
}
|
|
116
|
-
return cachedUint8ArrayMemory0;
|
|
117
|
-
}
|
|
118
|
-
function getObject(idx) {
|
|
119
|
-
return heap[idx];
|
|
120
|
-
}
|
|
121
|
-
function handleError(f, args) {
|
|
122
|
-
try {
|
|
123
|
-
return f.apply(this, args);
|
|
124
|
-
} catch (e) {
|
|
125
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
var heap = new Array(128).fill(void 0);
|
|
129
|
-
heap.push(void 0, null, true, false);
|
|
130
|
-
var heap_next = heap.length;
|
|
131
|
-
function isLikeNone(x) {
|
|
132
|
-
return x === void 0 || x === null;
|
|
133
|
-
}
|
|
134
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
135
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
136
|
-
const real = (...args) => {
|
|
137
|
-
state.cnt++;
|
|
138
|
-
const a = state.a;
|
|
139
|
-
state.a = 0;
|
|
140
|
-
try {
|
|
141
|
-
return f(a, state.b, ...args);
|
|
142
|
-
} finally {
|
|
143
|
-
state.a = a;
|
|
144
|
-
real._wbg_cb_unref();
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
real._wbg_cb_unref = () => {
|
|
148
|
-
if (--state.cnt === 0) {
|
|
149
|
-
state.dtor(state.a, state.b);
|
|
150
|
-
state.a = 0;
|
|
151
|
-
CLOSURE_DTORS.unregister(state);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
155
|
-
return real;
|
|
156
|
-
}
|
|
157
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
158
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
159
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
160
|
-
WASM_VECTOR_LEN = arg.length;
|
|
161
|
-
return ptr;
|
|
162
|
-
}
|
|
163
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
164
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
165
|
-
const mem = getDataViewMemory0();
|
|
166
|
-
for (let i = 0; i < array.length; i++) {
|
|
167
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
168
|
-
}
|
|
169
|
-
WASM_VECTOR_LEN = array.length;
|
|
170
|
-
return ptr;
|
|
171
|
-
}
|
|
172
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
173
|
-
if (realloc === void 0) {
|
|
174
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
175
|
-
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
176
|
-
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
177
|
-
WASM_VECTOR_LEN = buf.length;
|
|
178
|
-
return ptr2;
|
|
179
|
-
}
|
|
180
|
-
let len = arg.length;
|
|
181
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
182
|
-
const mem = getUint8ArrayMemory0();
|
|
183
|
-
let offset = 0;
|
|
184
|
-
for (; offset < len; offset++) {
|
|
185
|
-
const code = arg.charCodeAt(offset);
|
|
186
|
-
if (code > 127) break;
|
|
187
|
-
mem[ptr + offset] = code;
|
|
188
|
-
}
|
|
189
|
-
if (offset !== len) {
|
|
190
|
-
if (offset !== 0) {
|
|
191
|
-
arg = arg.slice(offset);
|
|
192
|
-
}
|
|
193
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
194
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
195
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
196
|
-
offset += ret.written;
|
|
197
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
198
|
-
}
|
|
199
|
-
WASM_VECTOR_LEN = offset;
|
|
200
|
-
return ptr;
|
|
201
|
-
}
|
|
202
|
-
function takeObject(idx) {
|
|
203
|
-
const ret = getObject(idx);
|
|
204
|
-
dropObject(idx);
|
|
205
|
-
return ret;
|
|
206
|
-
}
|
|
207
|
-
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
208
|
-
cachedTextDecoder.decode();
|
|
209
|
-
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
210
|
-
var numBytesDecoded = 0;
|
|
211
|
-
function decodeText(ptr, len) {
|
|
212
|
-
numBytesDecoded += len;
|
|
213
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
214
|
-
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
215
|
-
cachedTextDecoder.decode();
|
|
216
|
-
numBytesDecoded = len;
|
|
217
|
-
}
|
|
218
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
219
|
-
}
|
|
220
|
-
var cachedTextEncoder = new TextEncoder();
|
|
221
|
-
if (!("encodeInto" in cachedTextEncoder)) {
|
|
222
|
-
cachedTextEncoder.encodeInto = function(arg, view) {
|
|
223
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
224
|
-
view.set(buf);
|
|
225
|
-
return {
|
|
226
|
-
read: arg.length,
|
|
227
|
-
written: buf.length
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
var WASM_VECTOR_LEN = 0;
|
|
232
|
-
function __wasm_bindgen_func_elem_4195(arg0, arg1, arg2) {
|
|
233
|
-
wasm.__wasm_bindgen_func_elem_4195(arg0, arg1, addHeapObject(arg2));
|
|
234
|
-
}
|
|
235
|
-
function __wasm_bindgen_func_elem_22595(arg0, arg1, arg2, arg3) {
|
|
236
|
-
wasm.__wasm_bindgen_func_elem_22595(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
237
|
-
}
|
|
238
|
-
var __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
|
|
239
|
-
var __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
|
|
240
|
-
var __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
|
|
241
|
-
var __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
|
|
242
|
-
var __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
|
|
243
|
-
var __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
|
|
244
|
-
var __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
|
|
245
|
-
var __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "depth", "sint", "uint"];
|
|
246
|
-
var __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
|
|
247
|
-
var __wbindgen_enum_XmlHttpRequestResponseType = ["", "arraybuffer", "blob", "document", "json", "text"];
|
|
248
|
-
var WasmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
249
|
-
}, unregister: () => {
|
|
250
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_wasm_free(ptr >>> 0, 1));
|
|
251
4
|
var Wasm = class {
|
|
252
5
|
__destroy_into_raw() {
|
|
253
6
|
const ptr = this.__wbg_ptr;
|
|
@@ -260,179 +13,192 @@ ${val.stack}`;
|
|
|
260
13
|
wasm.__wbg_wasm_free(ptr, 0);
|
|
261
14
|
}
|
|
262
15
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* Supports various image formats: JPEG, PNG, GIF, BMP, TIFF, WebP, etc.
|
|
266
|
-
* Multi-page TIFF files will create a document with multiple pages.
|
|
267
|
-
*
|
|
268
|
-
* # Arguments
|
|
269
|
-
* * `bytes` - Raw image file data
|
|
16
|
+
* Get info for all pages in one call.
|
|
270
17
|
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* @param {
|
|
274
|
-
* @returns {
|
|
18
|
+
* Returns an array of `PageInfo` objects, one per page.
|
|
19
|
+
* More efficient than calling `page_info` for each page.
|
|
20
|
+
* @param {string} id
|
|
21
|
+
* @returns {JsPageInfo[]}
|
|
275
22
|
*/
|
|
276
|
-
|
|
277
|
-
let deferred3_0;
|
|
278
|
-
let deferred3_1;
|
|
23
|
+
all_page_info(id) {
|
|
279
24
|
try {
|
|
280
25
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
281
|
-
const ptr0 =
|
|
26
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
282
27
|
const len0 = WASM_VECTOR_LEN;
|
|
283
|
-
wasm.
|
|
28
|
+
wasm.wasm_all_page_info(retptr, this.__wbg_ptr, ptr0, len0);
|
|
284
29
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
285
30
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
286
31
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
287
32
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
288
|
-
var ptr2 = r0;
|
|
289
|
-
var len2 = r1;
|
|
290
33
|
if (r3) {
|
|
291
|
-
ptr2 = 0;
|
|
292
|
-
len2 = 0;
|
|
293
34
|
throw takeObject(r2);
|
|
294
35
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return
|
|
36
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
37
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
38
|
+
return v2;
|
|
298
39
|
} finally {
|
|
299
40
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
300
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
301
41
|
}
|
|
302
42
|
}
|
|
303
43
|
/**
|
|
304
|
-
*
|
|
44
|
+
* Authenticate with a password to unlock an encrypted document.
|
|
45
|
+
*
|
|
46
|
+
* # Arguments
|
|
47
|
+
* * `id` - Document ID
|
|
48
|
+
* * `password` - Password to try
|
|
49
|
+
*
|
|
50
|
+
* # Returns
|
|
51
|
+
* `true` if authentication succeeded, `false` if the password was incorrect.
|
|
305
52
|
* @param {string} id
|
|
306
|
-
* @
|
|
53
|
+
* @param {string} password
|
|
54
|
+
* @returns {boolean}
|
|
307
55
|
*/
|
|
308
|
-
|
|
56
|
+
authenticate(id, password) {
|
|
309
57
|
try {
|
|
310
58
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
311
59
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
312
60
|
const len0 = WASM_VECTOR_LEN;
|
|
313
|
-
|
|
61
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
62
|
+
const len1 = WASM_VECTOR_LEN;
|
|
63
|
+
wasm.wasm_authenticate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
314
64
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
315
65
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
316
66
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
317
67
|
if (r2) {
|
|
318
68
|
throw takeObject(r1);
|
|
319
69
|
}
|
|
320
|
-
return r0
|
|
70
|
+
return r0 !== 0;
|
|
321
71
|
} finally {
|
|
322
72
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
323
73
|
}
|
|
324
74
|
}
|
|
325
75
|
/**
|
|
326
|
-
*
|
|
76
|
+
* Disable telemetry reporting.
|
|
327
77
|
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
78
|
+
* Only takes effect if the current license includes the `no_telemetry`
|
|
79
|
+
* feature flag. Returns `true` if telemetry was disabled, `false` if the
|
|
80
|
+
* license does not permit it.
|
|
81
|
+
* @returns {boolean}
|
|
82
|
+
*/
|
|
83
|
+
disable_telemetry() {
|
|
84
|
+
const ret = wasm.wasm_disable_telemetry(this.__wbg_ptr);
|
|
85
|
+
return ret !== 0;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get the number of documents currently loaded.
|
|
89
|
+
* @returns {number}
|
|
90
|
+
*/
|
|
91
|
+
get document_count() {
|
|
92
|
+
const ret = wasm.wasm_document_count(this.__wbg_ptr);
|
|
93
|
+
return ret >>> 0;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get the format of a loaded document.
|
|
332
97
|
*
|
|
333
|
-
* Returns
|
|
98
|
+
* Returns one of: "pdf", "docx", "pptx", "xlsx", "image".
|
|
334
99
|
* @param {string} id
|
|
335
|
-
* @returns {
|
|
100
|
+
* @returns {string}
|
|
336
101
|
*/
|
|
337
|
-
|
|
102
|
+
document_format(id) {
|
|
103
|
+
let deferred3_0;
|
|
104
|
+
let deferred3_1;
|
|
338
105
|
try {
|
|
339
106
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
340
107
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
341
108
|
const len0 = WASM_VECTOR_LEN;
|
|
342
|
-
wasm.
|
|
109
|
+
wasm.wasm_document_format(retptr, this.__wbg_ptr, ptr0, len0);
|
|
343
110
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
344
111
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
345
112
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
346
113
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
114
|
+
var ptr2 = r0;
|
|
115
|
+
var len2 = r1;
|
|
347
116
|
if (r3) {
|
|
117
|
+
ptr2 = 0;
|
|
118
|
+
len2 = 0;
|
|
348
119
|
throw takeObject(r2);
|
|
349
120
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return
|
|
121
|
+
deferred3_0 = ptr2;
|
|
122
|
+
deferred3_1 = len2;
|
|
123
|
+
return getStringFromWasm0(ptr2, len2);
|
|
353
124
|
} finally {
|
|
354
125
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
126
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
355
127
|
}
|
|
356
128
|
}
|
|
357
129
|
/**
|
|
358
|
-
*
|
|
359
|
-
* @
|
|
360
|
-
* @returns {boolean}
|
|
130
|
+
* Get all document IDs.
|
|
131
|
+
* @returns {string[]}
|
|
361
132
|
*/
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
133
|
+
document_ids() {
|
|
134
|
+
try {
|
|
135
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
136
|
+
wasm.wasm_document_ids(retptr, this.__wbg_ptr);
|
|
137
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
138
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
139
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
140
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
141
|
+
return v1;
|
|
142
|
+
} finally {
|
|
143
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
144
|
+
}
|
|
367
145
|
}
|
|
368
146
|
/**
|
|
369
|
-
*
|
|
147
|
+
* Enable Google Fonts.
|
|
370
148
|
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
149
|
+
* When enabled, fonts that are not embedded in the document will be
|
|
150
|
+
* automatically fetched from Google Fonts during rendering. Google Fonts
|
|
151
|
+
* are resolved after any URL fonts registered via `registerFonts`.
|
|
374
152
|
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
153
|
+
* Call this before loading documents.
|
|
154
|
+
*
|
|
155
|
+
* # Example (JavaScript)
|
|
156
|
+
* ```js
|
|
157
|
+
* udoc.enableGoogleFonts();
|
|
158
|
+
* const docId = udoc.loadPptx(pptxBytes);
|
|
159
|
+
* const pixels = udoc.renderPageToRgba(docId, 0, 800, 600);
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
enableGoogleFonts() {
|
|
163
|
+
wasm.wasm_enableGoogleFonts(this.__wbg_ptr);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Get all annotations in the document, grouped by page index.
|
|
167
|
+
*
|
|
168
|
+
* Returns an object mapping page indices (as strings) to arrays of annotations.
|
|
378
169
|
* @param {string} id
|
|
379
|
-
* @returns {
|
|
170
|
+
* @returns {JsAnnotationsByPage}
|
|
380
171
|
*/
|
|
381
|
-
|
|
172
|
+
get_all_annotations(id) {
|
|
382
173
|
try {
|
|
383
174
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
384
175
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
385
176
|
const len0 = WASM_VECTOR_LEN;
|
|
386
|
-
wasm.
|
|
177
|
+
wasm.wasm_get_all_annotations(retptr, this.__wbg_ptr, ptr0, len0);
|
|
387
178
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
388
179
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
389
180
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
throw takeObject(r2);
|
|
181
|
+
if (r2) {
|
|
182
|
+
throw takeObject(r1);
|
|
393
183
|
}
|
|
394
|
-
|
|
395
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
396
|
-
return v2;
|
|
184
|
+
return takeObject(r0);
|
|
397
185
|
} finally {
|
|
398
186
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
399
187
|
}
|
|
400
188
|
}
|
|
401
189
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
* The original documents remain unchanged.
|
|
405
|
-
*
|
|
406
|
-
* # Arguments
|
|
407
|
-
* * `compositions` - Array of compositions. Each composition is an array of picks.
|
|
408
|
-
* Each pick is `{ doc: docIndex, pages: "0-2,4" }` where `docIndex` is the index
|
|
409
|
-
* in the `doc_ids` array and `pages` is a page range string (0-based).
|
|
410
|
-
* * `doc_ids` - Array of document IDs to use as sources (order matters for doc indices)
|
|
411
|
-
*
|
|
412
|
-
* # Example
|
|
413
|
-
* ```js
|
|
414
|
-
* // Create two documents: first has pages 0-2 from doc A, second has page 0 from A and 1 from B
|
|
415
|
-
* const newDocIds = udoc.pdf_compose(
|
|
416
|
-
* [
|
|
417
|
-
* [{ doc: 0, pages: "0-2" }],
|
|
418
|
-
* [{ doc: 0, pages: "0" }, { doc: 1, pages: "1" }]
|
|
419
|
-
* ],
|
|
420
|
-
* ["doc_0", "doc_1"]
|
|
421
|
-
* );
|
|
422
|
-
* ```
|
|
190
|
+
* Get the raw file bytes of a document.
|
|
423
191
|
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
* @
|
|
427
|
-
* @param {string[]} doc_ids
|
|
428
|
-
* @returns {string[]}
|
|
192
|
+
* Returns the original file data for the document.
|
|
193
|
+
* @param {string} id
|
|
194
|
+
* @returns {Uint8Array}
|
|
429
195
|
*/
|
|
430
|
-
|
|
196
|
+
get_bytes(id) {
|
|
431
197
|
try {
|
|
432
198
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
433
|
-
const ptr0 =
|
|
199
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
434
200
|
const len0 = WASM_VECTOR_LEN;
|
|
435
|
-
wasm.
|
|
201
|
+
wasm.wasm_get_bytes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
436
202
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
437
203
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
438
204
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -440,113 +206,114 @@ ${val.stack}`;
|
|
|
440
206
|
if (r3) {
|
|
441
207
|
throw takeObject(r2);
|
|
442
208
|
}
|
|
443
|
-
var v2 =
|
|
444
|
-
wasm.__wbindgen_export4(r0, r1 *
|
|
209
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
210
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
445
211
|
return v2;
|
|
446
212
|
} finally {
|
|
447
213
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
448
214
|
}
|
|
449
215
|
}
|
|
450
216
|
/**
|
|
451
|
-
*
|
|
217
|
+
* Get font usage information for a document.
|
|
452
218
|
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
219
|
+
* Returns an array of `FontUsageEntry` objects describing how each font
|
|
220
|
+
* spec in the document was resolved, including primary resolution and
|
|
221
|
+
* any glyph-fallback fonts used during text shaping.
|
|
455
222
|
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
* @param {string} license_key
|
|
459
|
-
* @returns {LicenseResult}
|
|
460
|
-
*/
|
|
461
|
-
set_license(license_key) {
|
|
462
|
-
const ptr0 = passStringToWasm0(license_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
463
|
-
const len0 = WASM_VECTOR_LEN;
|
|
464
|
-
const ret = wasm.wasm_set_license(this.__wbg_ptr, ptr0, len0);
|
|
465
|
-
return takeObject(ret);
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* Authenticate with a password to unlock an encrypted document.
|
|
223
|
+
* This information is populated during layout — call after rendering at
|
|
224
|
+
* least one page to get results.
|
|
469
225
|
*
|
|
470
226
|
* # Arguments
|
|
471
227
|
* * `id` - Document ID
|
|
472
|
-
* * `password` - Password to try
|
|
473
228
|
*
|
|
474
229
|
* # Returns
|
|
475
|
-
* `
|
|
230
|
+
* `FontUsageEntry[]` — see TypeScript types for shape.
|
|
476
231
|
* @param {string} id
|
|
477
|
-
* @
|
|
478
|
-
* @returns {boolean}
|
|
232
|
+
* @returns {JsFontUsageEntry[]}
|
|
479
233
|
*/
|
|
480
|
-
|
|
234
|
+
get_font_usage(id) {
|
|
481
235
|
try {
|
|
482
236
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
483
237
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
484
238
|
const len0 = WASM_VECTOR_LEN;
|
|
485
|
-
|
|
486
|
-
const len1 = WASM_VECTOR_LEN;
|
|
487
|
-
wasm.wasm_authenticate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
239
|
+
wasm.wasm_get_font_usage(retptr, this.__wbg_ptr, ptr0, len0);
|
|
488
240
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
489
241
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
490
242
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
491
|
-
|
|
492
|
-
|
|
243
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
244
|
+
if (r3) {
|
|
245
|
+
throw takeObject(r2);
|
|
493
246
|
}
|
|
494
|
-
|
|
247
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
248
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
249
|
+
return v2;
|
|
495
250
|
} finally {
|
|
496
251
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
497
252
|
}
|
|
498
253
|
}
|
|
499
254
|
/**
|
|
500
|
-
* Get
|
|
501
|
-
*
|
|
255
|
+
* Get the layout model for a specific page.
|
|
256
|
+
*
|
|
257
|
+
* Returns the hierarchical layout structure (frames, parcels, lines, runs,
|
|
258
|
+
* glyphs, tables, grids) without building the full display list. This is
|
|
259
|
+
* more efficient than `get_page_text` for text selection/search and
|
|
260
|
+
* preserves semantic structure (paragraphs, tables, etc.).
|
|
261
|
+
*
|
|
262
|
+
* All coordinates are in points (1/72 inch). The viewer should scale by
|
|
263
|
+
* `canvasWidth / layoutPage.width` to convert to pixels.
|
|
264
|
+
* @param {string} id
|
|
265
|
+
* @param {number} page_index
|
|
266
|
+
* @returns {JsLayoutPage}
|
|
502
267
|
*/
|
|
503
|
-
|
|
268
|
+
get_layout_page(id, page_index) {
|
|
504
269
|
try {
|
|
505
270
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
506
|
-
wasm.
|
|
271
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
272
|
+
const len0 = WASM_VECTOR_LEN;
|
|
273
|
+
wasm.wasm_get_layout_page(retptr, this.__wbg_ptr, ptr0, len0, page_index);
|
|
507
274
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
508
275
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
509
|
-
var
|
|
510
|
-
|
|
511
|
-
|
|
276
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
277
|
+
if (r2) {
|
|
278
|
+
throw takeObject(r1);
|
|
279
|
+
}
|
|
280
|
+
return takeObject(r0);
|
|
512
281
|
} finally {
|
|
513
282
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
514
283
|
}
|
|
515
284
|
}
|
|
516
285
|
/**
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
286
|
+
* Get a numeric limit from the current license.
|
|
287
|
+
*
|
|
288
|
+
* Returns the limit value if set in the license, otherwise returns the default.
|
|
289
|
+
* @param {string} limit_name
|
|
290
|
+
* @param {bigint} _default
|
|
291
|
+
* @returns {bigint}
|
|
520
292
|
*/
|
|
521
|
-
|
|
522
|
-
const ptr0 = passStringToWasm0(
|
|
293
|
+
get_limit(limit_name, _default) {
|
|
294
|
+
const ptr0 = passStringToWasm0(limit_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
523
295
|
const len0 = WASM_VECTOR_LEN;
|
|
524
|
-
const ret = wasm.
|
|
525
|
-
return ret
|
|
296
|
+
const ret = wasm.wasm_get_limit(this.__wbg_ptr, ptr0, len0, _default);
|
|
297
|
+
return BigInt.asUintN(64, ret);
|
|
526
298
|
}
|
|
527
299
|
/**
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
* Saves the document with full compression options enabled:
|
|
531
|
-
* - Compress stream data using FlateDecode
|
|
532
|
-
* - Pack objects into compressed object streams (PDF 1.5+)
|
|
533
|
-
* - Use compressed xref streams (PDF 1.5+)
|
|
534
|
-
* - Remove unreferenced objects
|
|
300
|
+
* Get the document outline (bookmarks/table of contents).
|
|
535
301
|
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
302
|
+
* Returns an array of outline items, where each item has:
|
|
303
|
+
* - `title`: Display text for the item
|
|
304
|
+
* - `destination`: Optional navigation destination with `pageIndex` and display parameters
|
|
305
|
+
* - `children`: Nested child items
|
|
538
306
|
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
* @
|
|
542
|
-
* @returns {Uint8Array}
|
|
307
|
+
* Returns an empty array if the document has no outline.
|
|
308
|
+
* @param {string} id
|
|
309
|
+
* @returns {JsOutlineItem[]}
|
|
543
310
|
*/
|
|
544
|
-
|
|
311
|
+
get_outline(id) {
|
|
545
312
|
try {
|
|
546
313
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
547
|
-
const ptr0 = passStringToWasm0(
|
|
314
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
548
315
|
const len0 = WASM_VECTOR_LEN;
|
|
549
|
-
wasm.
|
|
316
|
+
wasm.wasm_get_outline(retptr, this.__wbg_ptr, ptr0, len0);
|
|
550
317
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
551
318
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
552
319
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -554,27 +321,35 @@ ${val.stack}`;
|
|
|
554
321
|
if (r3) {
|
|
555
322
|
throw takeObject(r2);
|
|
556
323
|
}
|
|
557
|
-
var v2 =
|
|
558
|
-
wasm.__wbindgen_export4(r0, r1 *
|
|
324
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
325
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
559
326
|
return v2;
|
|
560
327
|
} finally {
|
|
561
328
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
562
329
|
}
|
|
563
330
|
}
|
|
564
331
|
/**
|
|
565
|
-
* Get
|
|
332
|
+
* Get annotations for a specific page.
|
|
566
333
|
*
|
|
567
|
-
* Returns an array of
|
|
568
|
-
*
|
|
334
|
+
* Returns an array of annotation objects for the given page.
|
|
335
|
+
* Uses per-page loading for efficiency (only loads the requested page).
|
|
336
|
+
*
|
|
337
|
+
* All geometry fields on the returned annotations (`bounds`, `quads`,
|
|
338
|
+
* `vertices`, `inkList`, `start`/`end`, …) are in the page's unrotated
|
|
339
|
+
* MediaBox coordinate space — origin top-left, PDF points, +y downward
|
|
340
|
+
* — regardless of the page's `/Rotate` value. The viewer applies
|
|
341
|
+
* rotation as a display transform on top. This matches the input space
|
|
342
|
+
* expected by `pdf_save_annotations`, so the round-trip is consistent.
|
|
569
343
|
* @param {string} id
|
|
570
|
-
* @
|
|
344
|
+
* @param {number} page_index
|
|
345
|
+
* @returns {JsAnnotation[]}
|
|
571
346
|
*/
|
|
572
|
-
|
|
347
|
+
get_page_annotations(id, page_index) {
|
|
573
348
|
try {
|
|
574
349
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
575
350
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
576
351
|
const len0 = WASM_VECTOR_LEN;
|
|
577
|
-
wasm.
|
|
352
|
+
wasm.wasm_get_page_annotations(retptr, this.__wbg_ptr, ptr0, len0, page_index);
|
|
578
353
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
579
354
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
580
355
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -590,37 +365,23 @@ ${val.stack}`;
|
|
|
590
365
|
}
|
|
591
366
|
}
|
|
592
367
|
/**
|
|
593
|
-
* Get
|
|
594
|
-
* @returns {number}
|
|
595
|
-
*/
|
|
596
|
-
get document_count() {
|
|
597
|
-
const ret = wasm.wasm_document_count(this.__wbg_ptr);
|
|
598
|
-
return ret >>> 0;
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* Get font usage information for a document.
|
|
602
|
-
*
|
|
603
|
-
* Returns an array of `FontUsageEntry` objects describing how each font
|
|
604
|
-
* spec in the document was resolved, including primary resolution and
|
|
605
|
-
* any glyph-fallback fonts used during text shaping.
|
|
606
|
-
*
|
|
607
|
-
* This information is populated during layout — call after rendering at
|
|
608
|
-
* least one page to get results.
|
|
368
|
+
* Get all visibility groups for a document.
|
|
609
369
|
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
370
|
+
* Returns an array of objects, each containing:
|
|
371
|
+
* - `id`: Unique identifier string
|
|
372
|
+
* - `name`: Display name for UI
|
|
373
|
+
* - `visible`: Whether the group is currently visible
|
|
612
374
|
*
|
|
613
|
-
*
|
|
614
|
-
* `FontUsageEntry[]` — see TypeScript types for shape.
|
|
375
|
+
* Returns an empty array for documents without visibility groups.
|
|
615
376
|
* @param {string} id
|
|
616
|
-
* @returns {
|
|
377
|
+
* @returns {JsVisibilityGroup[]}
|
|
617
378
|
*/
|
|
618
|
-
|
|
379
|
+
get_visibility_groups(id) {
|
|
619
380
|
try {
|
|
620
381
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
621
382
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
622
383
|
const len0 = WASM_VECTOR_LEN;
|
|
623
|
-
wasm.
|
|
384
|
+
wasm.wasm_get_visibility_groups(retptr, this.__wbg_ptr, ptr0, len0);
|
|
624
385
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
625
386
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
626
387
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -635,6 +396,49 @@ ${val.stack}`;
|
|
|
635
396
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
636
397
|
}
|
|
637
398
|
}
|
|
399
|
+
/**
|
|
400
|
+
* Check if a document with the given ID exists.
|
|
401
|
+
* @param {string} id
|
|
402
|
+
* @returns {boolean}
|
|
403
|
+
*/
|
|
404
|
+
has_document(id) {
|
|
405
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.wasm_has_document(this.__wbg_ptr, ptr0, len0);
|
|
408
|
+
return ret !== 0;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Check if a feature is enabled by the current license.
|
|
412
|
+
* @param {string} feature
|
|
413
|
+
* @returns {boolean}
|
|
414
|
+
*/
|
|
415
|
+
has_feature(feature) {
|
|
416
|
+
const ptr0 = passStringToWasm0(feature, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
417
|
+
const len0 = WASM_VECTOR_LEN;
|
|
418
|
+
const ret = wasm.wasm_has_feature(this.__wbg_ptr, ptr0, len0);
|
|
419
|
+
return ret !== 0;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Check whether the GPU render backend is available.
|
|
423
|
+
* @returns {boolean}
|
|
424
|
+
*/
|
|
425
|
+
has_gpu() {
|
|
426
|
+
const ret = wasm.wasm_has_gpu(this.__wbg_ptr);
|
|
427
|
+
return ret !== 0;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Initialize the GPU render backend (Vello + WebGPU).
|
|
431
|
+
*
|
|
432
|
+
* This is async because wgpu device initialization requires yielding
|
|
433
|
+
* to the browser event loop. Call this once after construction.
|
|
434
|
+
* Returns `true` if GPU initialization succeeded, `false` if no
|
|
435
|
+
* WebGPU adapter is available (the CPU backend remains usable).
|
|
436
|
+
* @returns {Promise<boolean>}
|
|
437
|
+
*/
|
|
438
|
+
init_gpu() {
|
|
439
|
+
const ret = wasm.wasm_init_gpu(this.__wbg_ptr);
|
|
440
|
+
return takeObject(ret);
|
|
441
|
+
}
|
|
638
442
|
/**
|
|
639
443
|
* Get current license status.
|
|
640
444
|
* @returns {LicenseResult}
|
|
@@ -644,122 +448,108 @@ ${val.stack}`;
|
|
|
644
448
|
return takeObject(ret);
|
|
645
449
|
}
|
|
646
450
|
/**
|
|
647
|
-
*
|
|
451
|
+
* Load a document by auto-detecting its format from the file contents.
|
|
648
452
|
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
453
|
+
* Inspects magic bytes to determine the format:
|
|
454
|
+
* - `%PDF` → PDF
|
|
455
|
+
* - `PK\x03\x04` (ZIP) → inspects ZIP entries for `word/` (DOCX), `ppt/` (PPTX), or `xl/` (XLSX)
|
|
456
|
+
* - Image magic bytes (JPEG, PNG, GIF, BMP, TIFF, WebP) → Image
|
|
457
|
+
*
|
|
458
|
+
* # Arguments
|
|
459
|
+
* * `bytes` - Raw file data
|
|
460
|
+
*
|
|
461
|
+
* # Returns
|
|
462
|
+
* A unique document ID that can be used to reference this document.
|
|
463
|
+
* @param {Uint8Array} bytes
|
|
464
|
+
* @returns {string}
|
|
653
465
|
*/
|
|
654
|
-
|
|
466
|
+
load(bytes) {
|
|
467
|
+
let deferred3_0;
|
|
468
|
+
let deferred3_1;
|
|
655
469
|
try {
|
|
656
470
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
657
|
-
const ptr0 =
|
|
471
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
658
472
|
const len0 = WASM_VECTOR_LEN;
|
|
659
|
-
wasm.
|
|
473
|
+
wasm.wasm_load(retptr, this.__wbg_ptr, ptr0, len0);
|
|
660
474
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
661
475
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
662
476
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
663
|
-
|
|
664
|
-
|
|
477
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
478
|
+
var ptr2 = r0;
|
|
479
|
+
var len2 = r1;
|
|
480
|
+
if (r3) {
|
|
481
|
+
ptr2 = 0;
|
|
482
|
+
len2 = 0;
|
|
483
|
+
throw takeObject(r2);
|
|
665
484
|
}
|
|
666
|
-
|
|
485
|
+
deferred3_0 = ptr2;
|
|
486
|
+
deferred3_1 = len2;
|
|
487
|
+
return getStringFromWasm0(ptr2, len2);
|
|
667
488
|
} finally {
|
|
668
489
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
490
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
669
491
|
}
|
|
670
492
|
}
|
|
671
493
|
/**
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
* Removes all filter encodings from streams, resulting in raw,
|
|
675
|
-
* uncompressed stream data. Useful for debugging or inspection.
|
|
494
|
+
* Load a DOCX document and return its ID.
|
|
676
495
|
*
|
|
677
496
|
* # Arguments
|
|
678
|
-
* * `
|
|
497
|
+
* * `bytes` - Raw DOCX file data
|
|
679
498
|
*
|
|
680
499
|
* # Returns
|
|
681
|
-
*
|
|
682
|
-
* @param {
|
|
683
|
-
* @returns {
|
|
500
|
+
* A unique document ID that can be used to reference this document.
|
|
501
|
+
* @param {Uint8Array} bytes
|
|
502
|
+
* @returns {string}
|
|
684
503
|
*/
|
|
685
|
-
|
|
504
|
+
load_docx(bytes) {
|
|
505
|
+
let deferred3_0;
|
|
506
|
+
let deferred3_1;
|
|
686
507
|
try {
|
|
687
508
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
688
|
-
const ptr0 =
|
|
509
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
689
510
|
const len0 = WASM_VECTOR_LEN;
|
|
690
|
-
wasm.
|
|
511
|
+
wasm.wasm_load_docx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
691
512
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
692
513
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
693
514
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
694
515
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
516
|
+
var ptr2 = r0;
|
|
517
|
+
var len2 = r1;
|
|
695
518
|
if (r3) {
|
|
519
|
+
ptr2 = 0;
|
|
520
|
+
len2 = 0;
|
|
696
521
|
throw takeObject(r2);
|
|
697
522
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
return
|
|
523
|
+
deferred3_0 = ptr2;
|
|
524
|
+
deferred3_1 = len2;
|
|
525
|
+
return getStringFromWasm0(ptr2, len2);
|
|
701
526
|
} finally {
|
|
702
527
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
528
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
703
529
|
}
|
|
704
530
|
}
|
|
705
531
|
/**
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
* The caller provides a list of all available fonts with their download
|
|
709
|
-
* URLs. During layout, when the engine needs a font, it is fetched from
|
|
710
|
-
* the URL, parsed, and cached for reuse.
|
|
532
|
+
* Load an image file and return its ID.
|
|
711
533
|
*
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
* resolved before Google Fonts.
|
|
534
|
+
* Supports various image formats: JPEG, PNG, GIF, BMP, TIFF, WebP, etc.
|
|
535
|
+
* Multi-page TIFF files will create a document with multiple pages.
|
|
715
536
|
*
|
|
716
537
|
* # Arguments
|
|
717
|
-
* * `
|
|
718
|
-
*
|
|
719
|
-
* # Example (JavaScript)
|
|
720
|
-
* ```js
|
|
721
|
-
* // Register available fonts before loading documents
|
|
722
|
-
* udoc.registerFonts([
|
|
723
|
-
* { typeface: "Roboto", bold: false, italic: false, url: "https://cdn.example.com/Roboto-Regular.woff2" },
|
|
724
|
-
* { typeface: "Roboto", bold: true, italic: false, url: "https://cdn.example.com/Roboto-Bold.woff2" },
|
|
725
|
-
* ]);
|
|
538
|
+
* * `bytes` - Raw image file data
|
|
726
539
|
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
|
-
*
|
|
731
|
-
* @param {JsFontRegistration[]} fonts
|
|
540
|
+
* # Returns
|
|
541
|
+
* A unique document ID that can be used to reference this document.
|
|
542
|
+
* @param {Uint8Array} bytes
|
|
543
|
+
* @returns {string}
|
|
732
544
|
*/
|
|
733
|
-
|
|
545
|
+
load_image(bytes) {
|
|
546
|
+
let deferred3_0;
|
|
547
|
+
let deferred3_1;
|
|
734
548
|
try {
|
|
735
549
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
736
|
-
const ptr0 =
|
|
550
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
737
551
|
const len0 = WASM_VECTOR_LEN;
|
|
738
|
-
wasm.
|
|
739
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
740
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
741
|
-
if (r1) {
|
|
742
|
-
throw takeObject(r0);
|
|
743
|
-
}
|
|
744
|
-
} finally {
|
|
745
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* Get the format of a loaded document.
|
|
750
|
-
*
|
|
751
|
-
* Returns one of: "pdf", "docx", "pptx", "xlsx", "image".
|
|
752
|
-
* @param {string} id
|
|
753
|
-
* @returns {string}
|
|
754
|
-
*/
|
|
755
|
-
document_format(id) {
|
|
756
|
-
let deferred3_0;
|
|
757
|
-
let deferred3_1;
|
|
758
|
-
try {
|
|
759
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
760
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
761
|
-
const len0 = WASM_VECTOR_LEN;
|
|
762
|
-
wasm.wasm_document_format(retptr, this.__wbg_ptr, ptr0, len0);
|
|
552
|
+
wasm.wasm_load_image(retptr, this.__wbg_ptr, ptr0, len0);
|
|
763
553
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
764
554
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
765
555
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -780,267 +570,230 @@ ${val.stack}`;
|
|
|
780
570
|
}
|
|
781
571
|
}
|
|
782
572
|
/**
|
|
783
|
-
*
|
|
573
|
+
* Load a PDF document and return its ID.
|
|
784
574
|
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
* more efficient than `get_page_text` for text selection/search and
|
|
788
|
-
* preserves semantic structure (paragraphs, tables, etc.).
|
|
575
|
+
* # Arguments
|
|
576
|
+
* * `bytes` - Raw PDF file data
|
|
789
577
|
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
* @param {
|
|
793
|
-
* @
|
|
794
|
-
* @returns {JsLayoutPage}
|
|
578
|
+
* # Returns
|
|
579
|
+
* A unique document ID that can be used to reference this document.
|
|
580
|
+
* @param {Uint8Array} bytes
|
|
581
|
+
* @returns {string}
|
|
795
582
|
*/
|
|
796
|
-
|
|
583
|
+
load_pdf(bytes) {
|
|
584
|
+
let deferred3_0;
|
|
585
|
+
let deferred3_1;
|
|
797
586
|
try {
|
|
798
587
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
799
|
-
const ptr0 =
|
|
588
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
800
589
|
const len0 = WASM_VECTOR_LEN;
|
|
801
|
-
wasm.
|
|
590
|
+
wasm.wasm_load_pdf(retptr, this.__wbg_ptr, ptr0, len0);
|
|
802
591
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
803
592
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
804
593
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
805
|
-
|
|
806
|
-
|
|
594
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
595
|
+
var ptr2 = r0;
|
|
596
|
+
var len2 = r1;
|
|
597
|
+
if (r3) {
|
|
598
|
+
ptr2 = 0;
|
|
599
|
+
len2 = 0;
|
|
600
|
+
throw takeObject(r2);
|
|
807
601
|
}
|
|
808
|
-
|
|
602
|
+
deferred3_0 = ptr2;
|
|
603
|
+
deferred3_1 = len2;
|
|
604
|
+
return getStringFromWasm0(ptr2, len2);
|
|
809
605
|
} finally {
|
|
810
606
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
607
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
811
608
|
}
|
|
812
609
|
}
|
|
813
610
|
/**
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
* Returns true if the document was removed, false if it didn't exist.
|
|
817
|
-
* @param {string} id
|
|
818
|
-
* @returns {boolean}
|
|
819
|
-
*/
|
|
820
|
-
remove_document(id) {
|
|
821
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
822
|
-
const len0 = WASM_VECTOR_LEN;
|
|
823
|
-
const ret = wasm.wasm_remove_document(this.__wbg_ptr, ptr0, len0);
|
|
824
|
-
return ret !== 0;
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Render a page using the GPU backend (Vello + WebGPU).
|
|
828
|
-
*
|
|
829
|
-
* Returns raw RGBA pixel data in premultiplied alpha format,
|
|
830
|
-
* identical to `render_page_to_rgba` but GPU-accelerated.
|
|
831
|
-
*
|
|
832
|
-
* # Errors
|
|
833
|
-
* Returns an error if the GPU backend is not initialized
|
|
834
|
-
* (call `init_gpu()` first), if the document is not found,
|
|
835
|
-
* or if rendering fails.
|
|
836
|
-
* @param {string} id
|
|
837
|
-
* @param {number} page_index
|
|
838
|
-
* @param {number} width
|
|
839
|
-
* @param {number} height
|
|
840
|
-
* @returns {Promise<Uint8Array>}
|
|
841
|
-
*/
|
|
842
|
-
render_page_gpu(id, page_index, width, height) {
|
|
843
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
844
|
-
const len0 = WASM_VECTOR_LEN;
|
|
845
|
-
const ret = wasm.wasm_render_page_gpu(this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
846
|
-
return takeObject(ret);
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* Set the anonymous distinct ID for telemetry tracking.
|
|
850
|
-
*
|
|
851
|
-
* Call this after `new()` once the ID has been read from localStorage
|
|
852
|
-
* (or generated). Must be called before loading documents so that
|
|
853
|
-
* telemetry events include the correct metadata.
|
|
854
|
-
*
|
|
855
|
-
* # Arguments
|
|
856
|
-
* * `distinct_id` - Anonymous UUID for per-user tracking (persisted in localStorage)
|
|
857
|
-
* @param {string} distinct_id
|
|
858
|
-
*/
|
|
859
|
-
setup_telemetry(distinct_id) {
|
|
860
|
-
const ptr0 = passStringToWasm0(distinct_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
861
|
-
const len0 = WASM_VECTOR_LEN;
|
|
862
|
-
wasm.wasm_setup_telemetry(this.__wbg_ptr, ptr0, len0);
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Disable telemetry reporting.
|
|
866
|
-
*
|
|
867
|
-
* Only takes effect if the current license includes the `no_telemetry`
|
|
868
|
-
* feature flag. Returns `true` if telemetry was disabled, `false` if the
|
|
869
|
-
* license does not permit it.
|
|
870
|
-
* @returns {boolean}
|
|
871
|
-
*/
|
|
872
|
-
disable_telemetry() {
|
|
873
|
-
const ret = wasm.wasm_disable_telemetry(this.__wbg_ptr);
|
|
874
|
-
return ret !== 0;
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* Extract all embedded fonts from a PDF document.
|
|
611
|
+
* Load a PPTX (PowerPoint) document and return its ID.
|
|
878
612
|
*
|
|
879
613
|
* # Arguments
|
|
880
|
-
* * `
|
|
614
|
+
* * `bytes` - Raw PPTX file data
|
|
881
615
|
*
|
|
882
616
|
* # Returns
|
|
883
|
-
*
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
* - `extension`: File extension (ttf, cff, t1, etc.)
|
|
887
|
-
* - `data`: Raw font data as Uint8Array
|
|
888
|
-
* @param {string} doc_id
|
|
889
|
-
* @returns {JsExtractedFont[]}
|
|
617
|
+
* A unique document ID that can be used to reference this document.
|
|
618
|
+
* @param {Uint8Array} bytes
|
|
619
|
+
* @returns {string}
|
|
890
620
|
*/
|
|
891
|
-
|
|
621
|
+
load_pptx(bytes) {
|
|
622
|
+
let deferred3_0;
|
|
623
|
+
let deferred3_1;
|
|
892
624
|
try {
|
|
893
625
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
894
|
-
const ptr0 =
|
|
626
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
895
627
|
const len0 = WASM_VECTOR_LEN;
|
|
896
|
-
wasm.
|
|
628
|
+
wasm.wasm_load_pptx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
897
629
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
898
630
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
899
631
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
900
632
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
633
|
+
var ptr2 = r0;
|
|
634
|
+
var len2 = r1;
|
|
901
635
|
if (r3) {
|
|
636
|
+
ptr2 = 0;
|
|
637
|
+
len2 = 0;
|
|
902
638
|
throw takeObject(r2);
|
|
903
639
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
return
|
|
640
|
+
deferred3_0 = ptr2;
|
|
641
|
+
deferred3_1 = len2;
|
|
642
|
+
return getStringFromWasm0(ptr2, len2);
|
|
907
643
|
} finally {
|
|
908
644
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
645
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
909
646
|
}
|
|
910
647
|
}
|
|
911
648
|
/**
|
|
912
|
-
*
|
|
649
|
+
* Load an XLSX document and return its ID.
|
|
913
650
|
*
|
|
914
651
|
* # Arguments
|
|
915
|
-
* * `
|
|
916
|
-
* * `convert_raw_to_png` - When true, converts raw pixel data to PNG format
|
|
652
|
+
* * `bytes` - Raw XLSX file data
|
|
917
653
|
*
|
|
918
654
|
* # Returns
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
* - `width`: Width in pixels
|
|
923
|
-
* - `height`: Height in pixels
|
|
924
|
-
* - `data`: Raw image data as Uint8Array
|
|
925
|
-
* @param {string} doc_id
|
|
926
|
-
* @param {boolean} convert_raw_to_png
|
|
927
|
-
* @returns {JsExtractedImage[]}
|
|
655
|
+
* A unique document ID that can be used to reference this document.
|
|
656
|
+
* @param {Uint8Array} bytes
|
|
657
|
+
* @returns {string}
|
|
928
658
|
*/
|
|
929
|
-
|
|
659
|
+
load_xlsx(bytes) {
|
|
660
|
+
let deferred3_0;
|
|
661
|
+
let deferred3_1;
|
|
930
662
|
try {
|
|
931
663
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
932
|
-
const ptr0 =
|
|
664
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
933
665
|
const len0 = WASM_VECTOR_LEN;
|
|
934
|
-
wasm.
|
|
666
|
+
wasm.wasm_load_xlsx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
935
667
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
936
668
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
937
669
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
938
670
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
671
|
+
var ptr2 = r0;
|
|
672
|
+
var len2 = r1;
|
|
939
673
|
if (r3) {
|
|
674
|
+
ptr2 = 0;
|
|
675
|
+
len2 = 0;
|
|
940
676
|
throw takeObject(r2);
|
|
941
677
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
return
|
|
678
|
+
deferred3_0 = ptr2;
|
|
679
|
+
deferred3_1 = len2;
|
|
680
|
+
return getStringFromWasm0(ptr2, len2);
|
|
945
681
|
} finally {
|
|
946
682
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
683
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
947
684
|
}
|
|
948
685
|
}
|
|
949
686
|
/**
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
* # Arguments
|
|
953
|
-
* * `id` - Document ID
|
|
954
|
-
* * `page_index` - Zero-based page index
|
|
955
|
-
* * `width` - Output width in pixels
|
|
956
|
-
* * `height` - Output height in pixels
|
|
687
|
+
* Check if a document requires a password to open.
|
|
957
688
|
*
|
|
958
|
-
*
|
|
959
|
-
*
|
|
689
|
+
* Returns `true` if the document is encrypted and requires authentication
|
|
690
|
+
* before pages can be loaded or rendered.
|
|
960
691
|
* @param {string} id
|
|
961
|
-
* @
|
|
962
|
-
* @param {number} width
|
|
963
|
-
* @param {number} height
|
|
964
|
-
* @returns {Uint8Array}
|
|
692
|
+
* @returns {boolean}
|
|
965
693
|
*/
|
|
966
|
-
|
|
694
|
+
needs_password(id) {
|
|
967
695
|
try {
|
|
968
696
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
969
697
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
970
698
|
const len0 = WASM_VECTOR_LEN;
|
|
971
|
-
wasm.
|
|
699
|
+
wasm.wasm_needs_password(retptr, this.__wbg_ptr, ptr0, len0);
|
|
972
700
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
973
701
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
974
702
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
throw takeObject(r2);
|
|
703
|
+
if (r2) {
|
|
704
|
+
throw takeObject(r1);
|
|
978
705
|
}
|
|
979
|
-
|
|
980
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
981
|
-
return v2;
|
|
706
|
+
return r0 !== 0;
|
|
982
707
|
} finally {
|
|
983
708
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
984
709
|
}
|
|
985
710
|
}
|
|
986
711
|
/**
|
|
987
|
-
*
|
|
712
|
+
* Create a new document viewer.
|
|
988
713
|
*
|
|
989
|
-
*
|
|
990
|
-
*
|
|
991
|
-
*
|
|
714
|
+
* # Arguments
|
|
715
|
+
* * `domain` - Hostname of the embedding page (e.g. from `window.location.hostname`)
|
|
716
|
+
* * `viewer_version` - SDK version string
|
|
717
|
+
* @param {string} domain
|
|
718
|
+
* @param {string} viewer_version
|
|
719
|
+
*/
|
|
720
|
+
constructor(domain, viewer_version) {
|
|
721
|
+
const ptr0 = passStringToWasm0(domain, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
722
|
+
const len0 = WASM_VECTOR_LEN;
|
|
723
|
+
const ptr1 = passStringToWasm0(viewer_version, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
724
|
+
const len1 = WASM_VECTOR_LEN;
|
|
725
|
+
const ret = wasm.wasm_new(ptr0, len0, ptr1, len1);
|
|
726
|
+
this.__wbg_ptr = ret;
|
|
727
|
+
WasmFinalization.register(this, this.__wbg_ptr, this);
|
|
728
|
+
return this;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Get the page count of a document.
|
|
992
732
|
* @param {string} id
|
|
993
|
-
* @returns {
|
|
733
|
+
* @returns {number}
|
|
994
734
|
*/
|
|
995
|
-
|
|
735
|
+
page_count(id) {
|
|
996
736
|
try {
|
|
997
737
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
998
738
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
999
739
|
const len0 = WASM_VECTOR_LEN;
|
|
1000
|
-
wasm.
|
|
740
|
+
wasm.wasm_page_count(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1001
741
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1002
742
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1003
743
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1004
744
|
if (r2) {
|
|
1005
745
|
throw takeObject(r1);
|
|
1006
746
|
}
|
|
1007
|
-
return
|
|
747
|
+
return r0 >>> 0;
|
|
1008
748
|
} finally {
|
|
1009
749
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1010
750
|
}
|
|
1011
751
|
}
|
|
1012
752
|
/**
|
|
1013
|
-
*
|
|
753
|
+
* Get the page groups for a document.
|
|
1014
754
|
*
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
* Call this before loading documents.
|
|
755
|
+
* Each group covers a contiguous range of global page indices with a
|
|
756
|
+
* shared stitching layout. Use this to build per-group canvases (e.g.,
|
|
757
|
+
* one panel per Excel sheet) and group-named sidebars.
|
|
1020
758
|
*
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
* ```
|
|
759
|
+
* - PDF/DOCX: one `linear` group covering all pages, no name.
|
|
760
|
+
* - PPTX: one `linear` group (per-section groups once sections are modeled).
|
|
761
|
+
* - XLSX: one `tiled` group per sheet with the sheet name and page-grid dimensions.
|
|
762
|
+
* @param {string} id
|
|
763
|
+
* @returns {JsPageGroup[]}
|
|
1027
764
|
*/
|
|
1028
|
-
|
|
1029
|
-
|
|
765
|
+
page_groups(id) {
|
|
766
|
+
try {
|
|
767
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
768
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
769
|
+
const len0 = WASM_VECTOR_LEN;
|
|
770
|
+
wasm.wasm_page_groups(retptr, this.__wbg_ptr, ptr0, len0);
|
|
771
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
772
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
773
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
774
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
775
|
+
if (r3) {
|
|
776
|
+
throw takeObject(r2);
|
|
777
|
+
}
|
|
778
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
779
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
780
|
+
return v2;
|
|
781
|
+
} finally {
|
|
782
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
783
|
+
}
|
|
1030
784
|
}
|
|
1031
785
|
/**
|
|
1032
|
-
* Get
|
|
1033
|
-
*
|
|
1034
|
-
* Returns an object mapping page indices (as strings) to arrays of annotations.
|
|
786
|
+
* Get info for a specific page.
|
|
1035
787
|
* @param {string} id
|
|
1036
|
-
* @
|
|
788
|
+
* @param {number} page_index
|
|
789
|
+
* @returns {JsPageInfo}
|
|
1037
790
|
*/
|
|
1038
|
-
|
|
791
|
+
page_info(id, page_index) {
|
|
1039
792
|
try {
|
|
1040
793
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1041
794
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1042
795
|
const len0 = WASM_VECTOR_LEN;
|
|
1043
|
-
wasm.
|
|
796
|
+
wasm.wasm_page_info(retptr, this.__wbg_ptr, ptr0, len0, page_index);
|
|
1044
797
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1045
798
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1046
799
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1053,31 +806,77 @@ ${val.stack}`;
|
|
|
1053
806
|
}
|
|
1054
807
|
}
|
|
1055
808
|
/**
|
|
1056
|
-
*
|
|
809
|
+
* Compose new PDF documents by cherry-picking pages from source documents.
|
|
1057
810
|
*
|
|
1058
|
-
* The
|
|
1059
|
-
* use with `ImageData` and canvas rendering.
|
|
811
|
+
* The original documents remain unchanged.
|
|
1060
812
|
*
|
|
1061
813
|
* # Arguments
|
|
1062
|
-
* * `
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1065
|
-
* * `
|
|
814
|
+
* * `compositions` - Array of compositions. Each composition is an array of picks.
|
|
815
|
+
* Each pick is `{ doc: docIndex, pages: "0-2,4" }` where `docIndex` is the index
|
|
816
|
+
* in the `doc_ids` array and `pages` is a page range string (0-based).
|
|
817
|
+
* * `doc_ids` - Array of document IDs to use as sources (order matters for doc indices)
|
|
818
|
+
*
|
|
819
|
+
* # Example
|
|
820
|
+
* ```js
|
|
821
|
+
* // Create two documents: first has pages 0-2 from doc A, second has page 0 from A and 1 from B
|
|
822
|
+
* const newDocIds = udoc.pdf_compose(
|
|
823
|
+
* [
|
|
824
|
+
* [{ doc: 0, pages: "0-2" }],
|
|
825
|
+
* [{ doc: 0, pages: "0" }, { doc: 1, pages: "1" }]
|
|
826
|
+
* ],
|
|
827
|
+
* ["doc_0", "doc_1"]
|
|
828
|
+
* );
|
|
829
|
+
* ```
|
|
1066
830
|
*
|
|
1067
831
|
* # Returns
|
|
1068
|
-
*
|
|
1069
|
-
* @param {
|
|
1070
|
-
* @param {
|
|
1071
|
-
* @
|
|
1072
|
-
|
|
832
|
+
* Array of IDs for the newly created documents (one per composition).
|
|
833
|
+
* @param {JsCompositions} compositions
|
|
834
|
+
* @param {string[]} doc_ids
|
|
835
|
+
* @returns {string[]}
|
|
836
|
+
*/
|
|
837
|
+
pdf_compose(compositions, doc_ids) {
|
|
838
|
+
try {
|
|
839
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
840
|
+
const ptr0 = passArrayJsValueToWasm0(doc_ids, wasm.__wbindgen_export);
|
|
841
|
+
const len0 = WASM_VECTOR_LEN;
|
|
842
|
+
wasm.wasm_pdf_compose(retptr, this.__wbg_ptr, addHeapObject(compositions), ptr0, len0);
|
|
843
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
844
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
845
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
846
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
847
|
+
if (r3) {
|
|
848
|
+
throw takeObject(r2);
|
|
849
|
+
}
|
|
850
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
851
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
852
|
+
return v2;
|
|
853
|
+
} finally {
|
|
854
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Compress a PDF document.
|
|
859
|
+
*
|
|
860
|
+
* Saves the document with full compression options enabled:
|
|
861
|
+
* - Compress stream data using FlateDecode
|
|
862
|
+
* - Pack objects into compressed object streams (PDF 1.5+)
|
|
863
|
+
* - Use compressed xref streams (PDF 1.5+)
|
|
864
|
+
* - Remove unreferenced objects
|
|
865
|
+
*
|
|
866
|
+
* # Arguments
|
|
867
|
+
* * `doc_id` - Document ID to compress
|
|
868
|
+
*
|
|
869
|
+
* # Returns
|
|
870
|
+
* Compressed PDF data as Uint8Array
|
|
871
|
+
* @param {string} doc_id
|
|
1073
872
|
* @returns {Uint8Array}
|
|
1074
873
|
*/
|
|
1075
|
-
|
|
874
|
+
pdf_compress(doc_id) {
|
|
1076
875
|
try {
|
|
1077
876
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1078
|
-
const ptr0 = passStringToWasm0(
|
|
877
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1079
878
|
const len0 = WASM_VECTOR_LEN;
|
|
1080
|
-
wasm.
|
|
879
|
+
wasm.wasm_pdf_compress(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1081
880
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1082
881
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1083
882
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1093,27 +892,98 @@ ${val.stack}`;
|
|
|
1093
892
|
}
|
|
1094
893
|
}
|
|
1095
894
|
/**
|
|
1096
|
-
*
|
|
895
|
+
* Decompress a PDF document.
|
|
1097
896
|
*
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
897
|
+
* Removes all filter encodings from streams, resulting in raw,
|
|
898
|
+
* uncompressed stream data. Useful for debugging or inspection.
|
|
1100
899
|
*
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
1105
|
-
*
|
|
1106
|
-
*
|
|
1107
|
-
* @
|
|
1108
|
-
* @param {number} page_index
|
|
1109
|
-
* @returns {JsAnnotation[]}
|
|
900
|
+
* # Arguments
|
|
901
|
+
* * `doc_id` - Document ID to decompress
|
|
902
|
+
*
|
|
903
|
+
* # Returns
|
|
904
|
+
* Decompressed PDF data as Uint8Array
|
|
905
|
+
* @param {string} doc_id
|
|
906
|
+
* @returns {Uint8Array}
|
|
1110
907
|
*/
|
|
1111
|
-
|
|
908
|
+
pdf_decompress(doc_id) {
|
|
1112
909
|
try {
|
|
1113
910
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1114
|
-
const ptr0 = passStringToWasm0(
|
|
911
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1115
912
|
const len0 = WASM_VECTOR_LEN;
|
|
1116
|
-
wasm.
|
|
913
|
+
wasm.wasm_pdf_decompress(retptr, this.__wbg_ptr, ptr0, len0);
|
|
914
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
915
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
916
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
917
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
918
|
+
if (r3) {
|
|
919
|
+
throw takeObject(r2);
|
|
920
|
+
}
|
|
921
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
922
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
923
|
+
return v2;
|
|
924
|
+
} finally {
|
|
925
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Extract all embedded fonts from a PDF document.
|
|
930
|
+
*
|
|
931
|
+
* # Arguments
|
|
932
|
+
* * `doc_id` - Document ID to extract fonts from
|
|
933
|
+
*
|
|
934
|
+
* # Returns
|
|
935
|
+
* Array of extracted font objects, each with:
|
|
936
|
+
* - `name`: Font name from the resource dictionary
|
|
937
|
+
* - `fontType`: Font type (Type1, TrueType, etc.)
|
|
938
|
+
* - `extension`: File extension (ttf, cff, t1, etc.)
|
|
939
|
+
* - `data`: Raw font data as Uint8Array
|
|
940
|
+
* @param {string} doc_id
|
|
941
|
+
* @returns {JsExtractedFont[]}
|
|
942
|
+
*/
|
|
943
|
+
pdf_extract_fonts(doc_id) {
|
|
944
|
+
try {
|
|
945
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
946
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
947
|
+
const len0 = WASM_VECTOR_LEN;
|
|
948
|
+
wasm.wasm_pdf_extract_fonts(retptr, this.__wbg_ptr, ptr0, len0);
|
|
949
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
950
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
951
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
952
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
953
|
+
if (r3) {
|
|
954
|
+
throw takeObject(r2);
|
|
955
|
+
}
|
|
956
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
957
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
958
|
+
return v2;
|
|
959
|
+
} finally {
|
|
960
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Extract all embedded images from a PDF document.
|
|
965
|
+
*
|
|
966
|
+
* # Arguments
|
|
967
|
+
* * `doc_id` - Document ID to extract images from
|
|
968
|
+
* * `convert_raw_to_png` - When true, converts raw pixel data to PNG format
|
|
969
|
+
*
|
|
970
|
+
* # Returns
|
|
971
|
+
* Array of extracted image objects, each with:
|
|
972
|
+
* - `name`: Image name from the resource dictionary
|
|
973
|
+
* - `format`: Image format (jpeg, png, jp2, etc.)
|
|
974
|
+
* - `width`: Width in pixels
|
|
975
|
+
* - `height`: Height in pixels
|
|
976
|
+
* - `data`: Raw image data as Uint8Array
|
|
977
|
+
* @param {string} doc_id
|
|
978
|
+
* @param {boolean} convert_raw_to_png
|
|
979
|
+
* @returns {JsExtractedImage[]}
|
|
980
|
+
*/
|
|
981
|
+
pdf_extract_images(doc_id, convert_raw_to_png) {
|
|
982
|
+
try {
|
|
983
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
984
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
985
|
+
const len0 = WASM_VECTOR_LEN;
|
|
986
|
+
wasm.wasm_pdf_extract_images(retptr, this.__wbg_ptr, ptr0, len0, convert_raw_to_png);
|
|
1117
987
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1118
988
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1119
989
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1231,204 +1101,146 @@ ${val.stack}`;
|
|
|
1231
1101
|
}
|
|
1232
1102
|
}
|
|
1233
1103
|
/**
|
|
1234
|
-
*
|
|
1104
|
+
* Register font URLs.
|
|
1235
1105
|
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1239
|
-
* - `visible`: Whether the group is currently visible
|
|
1106
|
+
* The caller provides a list of all available fonts with their download
|
|
1107
|
+
* URLs. During layout, when the engine needs a font, it is fetched from
|
|
1108
|
+
* the URL, parsed, and cached for reuse.
|
|
1240
1109
|
*
|
|
1241
|
-
*
|
|
1242
|
-
*
|
|
1243
|
-
*
|
|
1244
|
-
*/
|
|
1245
|
-
get_visibility_groups(id) {
|
|
1246
|
-
try {
|
|
1247
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1248
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1249
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1250
|
-
wasm.wasm_get_visibility_groups(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1251
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1252
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1253
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1254
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1255
|
-
if (r3) {
|
|
1256
|
-
throw takeObject(r2);
|
|
1257
|
-
}
|
|
1258
|
-
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1259
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1260
|
-
return v2;
|
|
1261
|
-
} finally {
|
|
1262
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
/**
|
|
1266
|
-
* Set the visibility of a specific visibility group.
|
|
1267
|
-
*
|
|
1268
|
-
* # Arguments
|
|
1269
|
-
* * `id` - Document ID
|
|
1270
|
-
* * `group_id` - Visibility group ID
|
|
1271
|
-
* * `visible` - Whether the group should be visible
|
|
1272
|
-
*
|
|
1273
|
-
* Returns `true` if the group was found and updated, `false` if not found.
|
|
1274
|
-
* @param {string} id
|
|
1275
|
-
* @param {string} group_id
|
|
1276
|
-
* @param {boolean} visible
|
|
1277
|
-
* @returns {boolean}
|
|
1278
|
-
*/
|
|
1279
|
-
set_visibility_group_visible(id, group_id, visible) {
|
|
1280
|
-
try {
|
|
1281
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1282
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1283
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1284
|
-
const ptr1 = passStringToWasm0(group_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1285
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1286
|
-
wasm.wasm_set_visibility_group_visible(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, visible);
|
|
1287
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1288
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1289
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1290
|
-
if (r2) {
|
|
1291
|
-
throw takeObject(r1);
|
|
1292
|
-
}
|
|
1293
|
-
return r0 !== 0;
|
|
1294
|
-
} finally {
|
|
1295
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
/**
|
|
1299
|
-
* Create a new document viewer.
|
|
1110
|
+
* Call this before loading documents. Registered fonts are automatically
|
|
1111
|
+
* applied to every document loaded afterward. URL fonts are always
|
|
1112
|
+
* resolved before Google Fonts.
|
|
1300
1113
|
*
|
|
1301
1114
|
* # Arguments
|
|
1302
|
-
* * `
|
|
1303
|
-
* * `viewer_version` - SDK version string
|
|
1304
|
-
* @param {string} domain
|
|
1305
|
-
* @param {string} viewer_version
|
|
1306
|
-
*/
|
|
1307
|
-
constructor(domain, viewer_version) {
|
|
1308
|
-
const ptr0 = passStringToWasm0(domain, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1309
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1310
|
-
const ptr1 = passStringToWasm0(viewer_version, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1311
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1312
|
-
const ret = wasm.wasm_new(ptr0, len0, ptr1, len1);
|
|
1313
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1314
|
-
WasmFinalization.register(this, this.__wbg_ptr, this);
|
|
1315
|
-
return this;
|
|
1316
|
-
}
|
|
1317
|
-
/**
|
|
1318
|
-
* Load a document by auto-detecting its format from the file contents.
|
|
1319
|
-
*
|
|
1320
|
-
* Inspects magic bytes to determine the format:
|
|
1321
|
-
* - `%PDF` → PDF
|
|
1322
|
-
* - `PK\x03\x04` (ZIP) → inspects ZIP entries for `word/` (DOCX), `ppt/` (PPTX), or `xl/` (XLSX)
|
|
1323
|
-
* - Image magic bytes (JPEG, PNG, GIF, BMP, TIFF, WebP) → Image
|
|
1115
|
+
* * `fonts` - Array of font entries: `[{ typeface: "Roboto", bold: false, italic: false, url: "https://..." }, ...]`
|
|
1324
1116
|
*
|
|
1325
|
-
* #
|
|
1326
|
-
*
|
|
1117
|
+
* # Example (JavaScript)
|
|
1118
|
+
* ```js
|
|
1119
|
+
* // Register available fonts before loading documents
|
|
1120
|
+
* udoc.registerFonts([
|
|
1121
|
+
* { typeface: "Roboto", bold: false, italic: false, url: "https://cdn.example.com/Roboto-Regular.woff2" },
|
|
1122
|
+
* { typeface: "Roboto", bold: true, italic: false, url: "https://cdn.example.com/Roboto-Bold.woff2" },
|
|
1123
|
+
* ]);
|
|
1327
1124
|
*
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1331
|
-
*
|
|
1125
|
+
* // Load and render - fonts are fetched on demand during layout
|
|
1126
|
+
* const docId = udoc.loadPptx(pptxBytes);
|
|
1127
|
+
* const pixels = udoc.renderPageToRgba(docId, 0, 800, 600);
|
|
1128
|
+
* ```
|
|
1129
|
+
* @param {JsFontRegistration[]} fonts
|
|
1332
1130
|
*/
|
|
1333
|
-
|
|
1334
|
-
let deferred3_0;
|
|
1335
|
-
let deferred3_1;
|
|
1131
|
+
registerFonts(fonts) {
|
|
1336
1132
|
try {
|
|
1337
1133
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1338
|
-
const ptr0 =
|
|
1134
|
+
const ptr0 = passArrayJsValueToWasm0(fonts, wasm.__wbindgen_export);
|
|
1339
1135
|
const len0 = WASM_VECTOR_LEN;
|
|
1340
|
-
wasm.
|
|
1136
|
+
wasm.wasm_registerFonts(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1341
1137
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1342
1138
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
var ptr2 = r0;
|
|
1346
|
-
var len2 = r1;
|
|
1347
|
-
if (r3) {
|
|
1348
|
-
ptr2 = 0;
|
|
1349
|
-
len2 = 0;
|
|
1350
|
-
throw takeObject(r2);
|
|
1139
|
+
if (r1) {
|
|
1140
|
+
throw takeObject(r0);
|
|
1351
1141
|
}
|
|
1352
|
-
deferred3_0 = ptr2;
|
|
1353
|
-
deferred3_1 = len2;
|
|
1354
|
-
return getStringFromWasm0(ptr2, len2);
|
|
1355
1142
|
} finally {
|
|
1356
1143
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1357
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1358
1144
|
}
|
|
1359
1145
|
}
|
|
1360
1146
|
/**
|
|
1361
|
-
*
|
|
1147
|
+
* Remove a document by ID.
|
|
1148
|
+
*
|
|
1149
|
+
* Returns true if the document was removed, false if it didn't exist.
|
|
1150
|
+
* @param {string} id
|
|
1362
1151
|
* @returns {boolean}
|
|
1363
1152
|
*/
|
|
1364
|
-
|
|
1365
|
-
const
|
|
1153
|
+
remove_document(id) {
|
|
1154
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1155
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1156
|
+
const ret = wasm.wasm_remove_document(this.__wbg_ptr, ptr0, len0);
|
|
1366
1157
|
return ret !== 0;
|
|
1367
1158
|
}
|
|
1368
1159
|
/**
|
|
1369
|
-
*
|
|
1160
|
+
* Render a page using the GPU backend (Vello + WebGPU).
|
|
1370
1161
|
*
|
|
1371
|
-
*
|
|
1372
|
-
* to
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1375
|
-
*
|
|
1162
|
+
* Returns raw RGBA pixel data in premultiplied alpha format,
|
|
1163
|
+
* identical to `render_page_to_rgba` but GPU-accelerated.
|
|
1164
|
+
*
|
|
1165
|
+
* # Errors
|
|
1166
|
+
* Returns an error if the GPU backend is not initialized
|
|
1167
|
+
* (call `init_gpu()` first), if the document is not found,
|
|
1168
|
+
* or if rendering fails.
|
|
1169
|
+
* @param {string} id
|
|
1170
|
+
* @param {number} page_index
|
|
1171
|
+
* @param {number} width
|
|
1172
|
+
* @param {number} height
|
|
1173
|
+
* @returns {Promise<Uint8Array>}
|
|
1376
1174
|
*/
|
|
1377
|
-
|
|
1378
|
-
const
|
|
1175
|
+
render_page_gpu(id, page_index, width, height) {
|
|
1176
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1177
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1178
|
+
const ret = wasm.wasm_render_page_gpu(this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
1379
1179
|
return takeObject(ret);
|
|
1380
1180
|
}
|
|
1381
1181
|
/**
|
|
1382
|
-
*
|
|
1182
|
+
* Render a page to PNG bytes.
|
|
1383
1183
|
*
|
|
1384
1184
|
* # Arguments
|
|
1385
|
-
* * `
|
|
1185
|
+
* * `id` - Document ID
|
|
1186
|
+
* * `page_index` - Zero-based page index
|
|
1187
|
+
* * `width` - Output width in pixels
|
|
1188
|
+
* * `height` - Output height in pixels
|
|
1386
1189
|
*
|
|
1387
1190
|
* # Returns
|
|
1388
|
-
*
|
|
1389
|
-
* @param {
|
|
1390
|
-
* @
|
|
1191
|
+
* PNG-encoded image data as a byte array.
|
|
1192
|
+
* @param {string} id
|
|
1193
|
+
* @param {number} page_index
|
|
1194
|
+
* @param {number} width
|
|
1195
|
+
* @param {number} height
|
|
1196
|
+
* @returns {Uint8Array}
|
|
1391
1197
|
*/
|
|
1392
|
-
|
|
1393
|
-
let deferred3_0;
|
|
1394
|
-
let deferred3_1;
|
|
1198
|
+
render_page_to_png(id, page_index, width, height) {
|
|
1395
1199
|
try {
|
|
1396
1200
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1397
|
-
const ptr0 =
|
|
1201
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1398
1202
|
const len0 = WASM_VECTOR_LEN;
|
|
1399
|
-
wasm.
|
|
1203
|
+
wasm.wasm_render_page_to_png(retptr, this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
1400
1204
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1401
1205
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1402
1206
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1403
1207
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1404
|
-
var ptr2 = r0;
|
|
1405
|
-
var len2 = r1;
|
|
1406
1208
|
if (r3) {
|
|
1407
|
-
ptr2 = 0;
|
|
1408
|
-
len2 = 0;
|
|
1409
1209
|
throw takeObject(r2);
|
|
1410
1210
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
return
|
|
1211
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1212
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1213
|
+
return v2;
|
|
1414
1214
|
} finally {
|
|
1415
1215
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1416
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1417
1216
|
}
|
|
1418
1217
|
}
|
|
1419
1218
|
/**
|
|
1420
|
-
*
|
|
1219
|
+
* Render a page to raw RGBA pixel data.
|
|
1421
1220
|
*
|
|
1422
|
-
*
|
|
1221
|
+
* The returned data is in premultiplied alpha format, suitable for
|
|
1222
|
+
* use with `ImageData` and canvas rendering.
|
|
1223
|
+
*
|
|
1224
|
+
* # Arguments
|
|
1225
|
+
* * `id` - Document ID
|
|
1226
|
+
* * `page_index` - Zero-based page index
|
|
1227
|
+
* * `width` - Output width in pixels
|
|
1228
|
+
* * `height` - Output height in pixels
|
|
1229
|
+
*
|
|
1230
|
+
* # Returns
|
|
1231
|
+
* Raw RGBA pixel data (width * height * 4 bytes).
|
|
1423
1232
|
* @param {string} id
|
|
1233
|
+
* @param {number} page_index
|
|
1234
|
+
* @param {number} width
|
|
1235
|
+
* @param {number} height
|
|
1424
1236
|
* @returns {Uint8Array}
|
|
1425
1237
|
*/
|
|
1426
|
-
|
|
1238
|
+
render_page_to_rgba(id, page_index, width, height) {
|
|
1427
1239
|
try {
|
|
1428
1240
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1429
1241
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1430
1242
|
const len0 = WASM_VECTOR_LEN;
|
|
1431
|
-
wasm.
|
|
1243
|
+
wasm.wasm_render_page_to_rgba(retptr, this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
1432
1244
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1433
1245
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1434
1246
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1444,145 +1256,86 @@ ${val.stack}`;
|
|
|
1444
1256
|
}
|
|
1445
1257
|
}
|
|
1446
1258
|
/**
|
|
1447
|
-
*
|
|
1259
|
+
* Set the license key.
|
|
1448
1260
|
*
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1261
|
+
* # Arguments
|
|
1262
|
+
* * `license_key` - The license key string
|
|
1263
|
+
*
|
|
1264
|
+
* # Returns
|
|
1265
|
+
* License validation result as JSON.
|
|
1266
|
+
* @param {string} license_key
|
|
1267
|
+
* @returns {LicenseResult}
|
|
1453
1268
|
*/
|
|
1454
|
-
|
|
1455
|
-
const ptr0 = passStringToWasm0(
|
|
1269
|
+
set_license(license_key) {
|
|
1270
|
+
const ptr0 = passStringToWasm0(license_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1456
1271
|
const len0 = WASM_VECTOR_LEN;
|
|
1457
|
-
const ret = wasm.
|
|
1458
|
-
return
|
|
1272
|
+
const ret = wasm.wasm_set_license(this.__wbg_ptr, ptr0, len0);
|
|
1273
|
+
return takeObject(ret);
|
|
1459
1274
|
}
|
|
1460
1275
|
/**
|
|
1461
|
-
*
|
|
1276
|
+
* Set the visibility of a specific visibility group.
|
|
1462
1277
|
*
|
|
1463
1278
|
* # Arguments
|
|
1464
|
-
* * `
|
|
1279
|
+
* * `id` - Document ID
|
|
1280
|
+
* * `group_id` - Visibility group ID
|
|
1281
|
+
* * `visible` - Whether the group should be visible
|
|
1465
1282
|
*
|
|
1466
|
-
*
|
|
1467
|
-
*
|
|
1468
|
-
* @param {
|
|
1469
|
-
* @
|
|
1283
|
+
* Returns `true` if the group was found and updated, `false` if not found.
|
|
1284
|
+
* @param {string} id
|
|
1285
|
+
* @param {string} group_id
|
|
1286
|
+
* @param {boolean} visible
|
|
1287
|
+
* @returns {boolean}
|
|
1470
1288
|
*/
|
|
1471
|
-
|
|
1472
|
-
let deferred3_0;
|
|
1473
|
-
let deferred3_1;
|
|
1289
|
+
set_visibility_group_visible(id, group_id, visible) {
|
|
1474
1290
|
try {
|
|
1475
1291
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1476
|
-
const ptr0 =
|
|
1292
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1477
1293
|
const len0 = WASM_VECTOR_LEN;
|
|
1478
|
-
|
|
1294
|
+
const ptr1 = passStringToWasm0(group_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1295
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1296
|
+
wasm.wasm_set_visibility_group_visible(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, visible);
|
|
1479
1297
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1480
1298
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1481
1299
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
var len2 = r1;
|
|
1485
|
-
if (r3) {
|
|
1486
|
-
ptr2 = 0;
|
|
1487
|
-
len2 = 0;
|
|
1488
|
-
throw takeObject(r2);
|
|
1300
|
+
if (r2) {
|
|
1301
|
+
throw takeObject(r1);
|
|
1489
1302
|
}
|
|
1490
|
-
|
|
1491
|
-
deferred3_1 = len2;
|
|
1492
|
-
return getStringFromWasm0(ptr2, len2);
|
|
1303
|
+
return r0 !== 0;
|
|
1493
1304
|
} finally {
|
|
1494
1305
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1495
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1496
1306
|
}
|
|
1497
1307
|
}
|
|
1498
1308
|
/**
|
|
1499
|
-
*
|
|
1309
|
+
* Set the anonymous distinct ID for telemetry tracking.
|
|
1500
1310
|
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1504
|
-
* # Returns
|
|
1505
|
-
* A unique document ID that can be used to reference this document.
|
|
1506
|
-
* @param {Uint8Array} bytes
|
|
1507
|
-
* @returns {string}
|
|
1508
|
-
*/
|
|
1509
|
-
load_pptx(bytes) {
|
|
1510
|
-
let deferred3_0;
|
|
1511
|
-
let deferred3_1;
|
|
1512
|
-
try {
|
|
1513
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1514
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
1515
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1516
|
-
wasm.wasm_load_pptx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1517
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1518
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1519
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1520
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1521
|
-
var ptr2 = r0;
|
|
1522
|
-
var len2 = r1;
|
|
1523
|
-
if (r3) {
|
|
1524
|
-
ptr2 = 0;
|
|
1525
|
-
len2 = 0;
|
|
1526
|
-
throw takeObject(r2);
|
|
1527
|
-
}
|
|
1528
|
-
deferred3_0 = ptr2;
|
|
1529
|
-
deferred3_1 = len2;
|
|
1530
|
-
return getStringFromWasm0(ptr2, len2);
|
|
1531
|
-
} finally {
|
|
1532
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1533
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
/**
|
|
1537
|
-
* Load an XLSX document and return its ID.
|
|
1311
|
+
* Call this after `new()` once the ID has been read from localStorage
|
|
1312
|
+
* (or generated). Must be called before loading documents so that
|
|
1313
|
+
* telemetry events include the correct metadata.
|
|
1538
1314
|
*
|
|
1539
1315
|
* # Arguments
|
|
1540
|
-
* * `
|
|
1541
|
-
*
|
|
1542
|
-
* # Returns
|
|
1543
|
-
* A unique document ID that can be used to reference this document.
|
|
1544
|
-
* @param {Uint8Array} bytes
|
|
1545
|
-
* @returns {string}
|
|
1316
|
+
* * `distinct_id` - Anonymous UUID for per-user tracking (persisted in localStorage)
|
|
1317
|
+
* @param {string} distinct_id
|
|
1546
1318
|
*/
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1552
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
1553
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1554
|
-
wasm.wasm_load_xlsx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1555
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1556
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1557
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1558
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1559
|
-
var ptr2 = r0;
|
|
1560
|
-
var len2 = r1;
|
|
1561
|
-
if (r3) {
|
|
1562
|
-
ptr2 = 0;
|
|
1563
|
-
len2 = 0;
|
|
1564
|
-
throw takeObject(r2);
|
|
1565
|
-
}
|
|
1566
|
-
deferred3_0 = ptr2;
|
|
1567
|
-
deferred3_1 = len2;
|
|
1568
|
-
return getStringFromWasm0(ptr2, len2);
|
|
1569
|
-
} finally {
|
|
1570
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1571
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1572
|
-
}
|
|
1319
|
+
setup_telemetry(distinct_id) {
|
|
1320
|
+
const ptr0 = passStringToWasm0(distinct_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1321
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1322
|
+
wasm.wasm_setup_telemetry(this.__wbg_ptr, ptr0, len0);
|
|
1573
1323
|
}
|
|
1574
1324
|
/**
|
|
1575
|
-
* Get
|
|
1325
|
+
* Get viewer preferences embedded in the document.
|
|
1326
|
+
*
|
|
1327
|
+
* Returns a `JsViewerPreferences` with optional fields:
|
|
1328
|
+
* - `layoutMode`: `"single-page"` | `"double-page-odd-right"` | `"double-page-odd-left"`
|
|
1329
|
+
* - `scrollMode`: `"spread"` | `"continuous"`
|
|
1576
1330
|
* @param {string} id
|
|
1577
|
-
* @
|
|
1578
|
-
* @returns {JsPageInfo}
|
|
1331
|
+
* @returns {JsViewerPreferences}
|
|
1579
1332
|
*/
|
|
1580
|
-
|
|
1333
|
+
viewer_preferences(id) {
|
|
1581
1334
|
try {
|
|
1582
1335
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1583
1336
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1584
1337
|
const len0 = WASM_VECTOR_LEN;
|
|
1585
|
-
wasm.
|
|
1338
|
+
wasm.wasm_viewer_preferences(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1586
1339
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1587
1340
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1588
1341
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1613,1007 +1366,1313 @@ ${val.stack}`;
|
|
|
1613
1366
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1614
1367
|
}
|
|
1615
1368
|
}
|
|
1616
|
-
var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
|
|
1617
|
-
async function __wbg_load(module2, imports) {
|
|
1618
|
-
if (typeof Response === "function" && module2 instanceof Response) {
|
|
1619
|
-
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
1620
|
-
try {
|
|
1621
|
-
return await WebAssembly.instantiateStreaming(module2, imports);
|
|
1622
|
-
} catch (e) {
|
|
1623
|
-
const validResponse = module2.ok && EXPECTED_RESPONSE_TYPES.has(module2.type);
|
|
1624
|
-
if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
|
|
1625
|
-
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);
|
|
1626
|
-
} else {
|
|
1627
|
-
throw e;
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
const bytes = await module2.arrayBuffer();
|
|
1632
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
1633
|
-
} else {
|
|
1634
|
-
const instance = await WebAssembly.instantiate(module2, imports);
|
|
1635
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
1636
|
-
return { instance, module: module2 };
|
|
1637
|
-
} else {
|
|
1638
|
-
return instance;
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
1369
|
function __wbg_get_imports() {
|
|
1643
|
-
const
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
return addHeapObject(ret);
|
|
1648
|
-
};
|
|
1649
|
-
imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
|
|
1650
|
-
const ret = Number(getObject(arg0));
|
|
1651
|
-
return ret;
|
|
1652
|
-
};
|
|
1653
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1654
|
-
const ret = String(getObject(arg1));
|
|
1655
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1656
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1657
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1658
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1659
|
-
};
|
|
1660
|
-
imports.wbg.__wbg_Window_a4c5a48392f234ba = function(arg0) {
|
|
1661
|
-
const ret = getObject(arg0).Window;
|
|
1662
|
-
return addHeapObject(ret);
|
|
1663
|
-
};
|
|
1664
|
-
imports.wbg.__wbg_WorkerGlobalScope_2b2b89e1ac952b50 = function(arg0) {
|
|
1665
|
-
const ret = getObject(arg0).WorkerGlobalScope;
|
|
1666
|
-
return addHeapObject(ret);
|
|
1667
|
-
};
|
|
1668
|
-
imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
|
|
1669
|
-
const v = getObject(arg1);
|
|
1670
|
-
const ret = typeof v === "bigint" ? v : void 0;
|
|
1671
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1672
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1673
|
-
};
|
|
1674
|
-
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
1675
|
-
const v = getObject(arg0);
|
|
1676
|
-
const ret = typeof v === "boolean" ? v : void 0;
|
|
1677
|
-
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
1678
|
-
};
|
|
1679
|
-
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
1680
|
-
const ret = debugString(getObject(arg1));
|
|
1681
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1682
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1683
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1684
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1685
|
-
};
|
|
1686
|
-
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
1687
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
1688
|
-
return ret;
|
|
1689
|
-
};
|
|
1690
|
-
imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
1691
|
-
const ret = typeof getObject(arg0) === "bigint";
|
|
1692
|
-
return ret;
|
|
1693
|
-
};
|
|
1694
|
-
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
1695
|
-
const ret = typeof getObject(arg0) === "function";
|
|
1696
|
-
return ret;
|
|
1697
|
-
};
|
|
1698
|
-
imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {
|
|
1699
|
-
const ret = getObject(arg0) === null;
|
|
1700
|
-
return ret;
|
|
1701
|
-
};
|
|
1702
|
-
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
1703
|
-
const val = getObject(arg0);
|
|
1704
|
-
const ret = typeof val === "object" && val !== null;
|
|
1705
|
-
return ret;
|
|
1706
|
-
};
|
|
1707
|
-
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
1708
|
-
const ret = typeof getObject(arg0) === "string";
|
|
1709
|
-
return ret;
|
|
1710
|
-
};
|
|
1711
|
-
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
1712
|
-
const ret = getObject(arg0) === void 0;
|
|
1713
|
-
return ret;
|
|
1714
|
-
};
|
|
1715
|
-
imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
1716
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
1717
|
-
return ret;
|
|
1718
|
-
};
|
|
1719
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
1720
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
1721
|
-
return ret;
|
|
1722
|
-
};
|
|
1723
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
1724
|
-
const obj = getObject(arg1);
|
|
1725
|
-
const ret = typeof obj === "number" ? obj : void 0;
|
|
1726
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1727
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1728
|
-
};
|
|
1729
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
1730
|
-
const obj = getObject(arg1);
|
|
1731
|
-
const ret = typeof obj === "string" ? obj : void 0;
|
|
1732
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1733
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1734
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1735
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1736
|
-
};
|
|
1737
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
1738
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1739
|
-
};
|
|
1740
|
-
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
1741
|
-
getObject(arg0)._wbg_cb_unref();
|
|
1742
|
-
};
|
|
1743
|
-
imports.wbg.__wbg_beginComputePass_304dccb30a4db2cc = function(arg0, arg1) {
|
|
1744
|
-
const ret = getObject(arg0).beginComputePass(getObject(arg1));
|
|
1745
|
-
return addHeapObject(ret);
|
|
1746
|
-
};
|
|
1747
|
-
imports.wbg.__wbg_buffer_6cb2fecb1f253d71 = function(arg0) {
|
|
1748
|
-
const ret = getObject(arg0).buffer;
|
|
1749
|
-
return addHeapObject(ret);
|
|
1750
|
-
};
|
|
1751
|
-
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() {
|
|
1752
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1753
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1370
|
+
const import0 = {
|
|
1371
|
+
__proto__: null,
|
|
1372
|
+
__wbg_Error_ef53bc310eb298a0: function(arg0, arg1) {
|
|
1373
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1754
1374
|
return addHeapObject(ret);
|
|
1755
|
-
},
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1375
|
+
},
|
|
1376
|
+
__wbg_Number_6b506e6536831eaa: function(arg0) {
|
|
1377
|
+
const ret = Number(getObject(arg0));
|
|
1378
|
+
return ret;
|
|
1379
|
+
},
|
|
1380
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
1381
|
+
const ret = String(getObject(arg1));
|
|
1382
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1383
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1384
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1385
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1386
|
+
},
|
|
1387
|
+
__wbg_Window_defb2c76b3875a73: function(arg0) {
|
|
1388
|
+
const ret = getObject(arg0).Window;
|
|
1760
1389
|
return addHeapObject(ret);
|
|
1761
|
-
},
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1765
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1390
|
+
},
|
|
1391
|
+
__wbg_WorkerGlobalScope_184e45d6565eb3f0: function(arg0) {
|
|
1392
|
+
const ret = getObject(arg0).WorkerGlobalScope;
|
|
1766
1393
|
return addHeapObject(ret);
|
|
1767
|
-
},
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
},
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
getObject(arg0)
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
},
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1394
|
+
},
|
|
1395
|
+
__wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d: function(arg0, arg1) {
|
|
1396
|
+
const v = getObject(arg1);
|
|
1397
|
+
const ret = typeof v === "bigint" ? v : void 0;
|
|
1398
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1399
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1400
|
+
},
|
|
1401
|
+
__wbg___wbindgen_boolean_get_1a45e2c38d4d41b9: function(arg0) {
|
|
1402
|
+
const v = getObject(arg0);
|
|
1403
|
+
const ret = typeof v === "boolean" ? v : void 0;
|
|
1404
|
+
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
1405
|
+
},
|
|
1406
|
+
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(arg0, arg1) {
|
|
1407
|
+
const ret = debugString(getObject(arg1));
|
|
1408
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1409
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1410
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1411
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1412
|
+
},
|
|
1413
|
+
__wbg___wbindgen_in_70a403a56e771704: function(arg0, arg1) {
|
|
1414
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
1415
|
+
return ret;
|
|
1416
|
+
},
|
|
1417
|
+
__wbg___wbindgen_is_bigint_6ffd6468a9bc44b9: function(arg0) {
|
|
1418
|
+
const ret = typeof getObject(arg0) === "bigint";
|
|
1419
|
+
return ret;
|
|
1420
|
+
},
|
|
1421
|
+
__wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
|
|
1422
|
+
const ret = typeof getObject(arg0) === "function";
|
|
1423
|
+
return ret;
|
|
1424
|
+
},
|
|
1425
|
+
__wbg___wbindgen_is_null_87c3bfe968c6a5ad: function(arg0) {
|
|
1426
|
+
const ret = getObject(arg0) === null;
|
|
1427
|
+
return ret;
|
|
1428
|
+
},
|
|
1429
|
+
__wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
|
|
1430
|
+
const val = getObject(arg0);
|
|
1431
|
+
const ret = typeof val === "object" && val !== null;
|
|
1432
|
+
return ret;
|
|
1433
|
+
},
|
|
1434
|
+
__wbg___wbindgen_is_string_c236cabd84a4d769: function(arg0) {
|
|
1435
|
+
const ret = typeof getObject(arg0) === "string";
|
|
1436
|
+
return ret;
|
|
1437
|
+
},
|
|
1438
|
+
__wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
|
|
1439
|
+
const ret = getObject(arg0) === void 0;
|
|
1440
|
+
return ret;
|
|
1441
|
+
},
|
|
1442
|
+
__wbg___wbindgen_jsval_eq_1068e624fa87f6ab: function(arg0, arg1) {
|
|
1443
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
1444
|
+
return ret;
|
|
1445
|
+
},
|
|
1446
|
+
__wbg___wbindgen_jsval_loose_eq_2c56564c75129511: function(arg0, arg1) {
|
|
1447
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
1448
|
+
return ret;
|
|
1449
|
+
},
|
|
1450
|
+
__wbg___wbindgen_number_get_9bb1761122181af2: function(arg0, arg1) {
|
|
1451
|
+
const obj = getObject(arg1);
|
|
1452
|
+
const ret = typeof obj === "number" ? obj : void 0;
|
|
1453
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1454
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1455
|
+
},
|
|
1456
|
+
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) {
|
|
1457
|
+
const obj = getObject(arg1);
|
|
1458
|
+
const ret = typeof obj === "string" ? obj : void 0;
|
|
1459
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1460
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1461
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1462
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1463
|
+
},
|
|
1464
|
+
__wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
|
|
1465
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1466
|
+
},
|
|
1467
|
+
__wbg__wbg_cb_unref_61db23ac97f16c31: function(arg0) {
|
|
1468
|
+
getObject(arg0)._wbg_cb_unref();
|
|
1469
|
+
},
|
|
1470
|
+
__wbg_beginComputePass_1fc169dd9fc89475: function(arg0, arg1) {
|
|
1471
|
+
const ret = getObject(arg0).beginComputePass(getObject(arg1));
|
|
1798
1472
|
return addHeapObject(ret);
|
|
1799
|
-
},
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
const ret = getObject(arg0).createBindGroup(getObject(arg1));
|
|
1803
|
-
return addHeapObject(ret);
|
|
1804
|
-
};
|
|
1805
|
-
imports.wbg.__wbg_createBuffer_76f7598789ecc3d7 = function() {
|
|
1806
|
-
return handleError(function(arg0, arg1) {
|
|
1807
|
-
const ret = getObject(arg0).createBuffer(getObject(arg1));
|
|
1473
|
+
},
|
|
1474
|
+
__wbg_buffer_d370c8cae5692933: function(arg0) {
|
|
1475
|
+
const ret = getObject(arg0).buffer;
|
|
1808
1476
|
return addHeapObject(ret);
|
|
1809
|
-
},
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1477
|
+
},
|
|
1478
|
+
__wbg_call_40e4174f169eaca7: function() {
|
|
1479
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1480
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1481
|
+
return addHeapObject(ret);
|
|
1482
|
+
}, arguments);
|
|
1483
|
+
},
|
|
1484
|
+
__wbg_call_8a89609d89f6608a: function() {
|
|
1485
|
+
return handleError(function(arg0, arg1) {
|
|
1486
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
1487
|
+
return addHeapObject(ret);
|
|
1488
|
+
}, arguments);
|
|
1489
|
+
},
|
|
1490
|
+
__wbg_call_9c758de292015997: function() {
|
|
1491
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1492
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1493
|
+
return addHeapObject(ret);
|
|
1494
|
+
}, arguments);
|
|
1495
|
+
},
|
|
1496
|
+
__wbg_clearBuffer_5c4f30438f07155a: function(arg0, arg1, arg2, arg3) {
|
|
1497
|
+
getObject(arg0).clearBuffer(getObject(arg1), arg2, arg3);
|
|
1498
|
+
},
|
|
1499
|
+
__wbg_clearBuffer_de7e8cd418b56c30: function(arg0, arg1, arg2) {
|
|
1500
|
+
getObject(arg0).clearBuffer(getObject(arg1), arg2);
|
|
1501
|
+
},
|
|
1502
|
+
__wbg_copyBufferToBuffer_55e9540007aef863: function() {
|
|
1503
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1504
|
+
getObject(arg0).copyBufferToBuffer(getObject(arg1), arg2, getObject(arg3), arg4);
|
|
1505
|
+
}, arguments);
|
|
1506
|
+
},
|
|
1507
|
+
__wbg_copyBufferToBuffer_7adcb79ef87447dc: function() {
|
|
1508
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1509
|
+
getObject(arg0).copyBufferToBuffer(getObject(arg1), arg2, getObject(arg3), arg4, arg5);
|
|
1510
|
+
}, arguments);
|
|
1511
|
+
},
|
|
1512
|
+
__wbg_copyTextureToBuffer_09ba100a04b1b001: function() {
|
|
1513
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1514
|
+
getObject(arg0).copyTextureToBuffer(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1515
|
+
}, arguments);
|
|
1516
|
+
},
|
|
1517
|
+
__wbg_copyTextureToTexture_66ab51b863dec546: function() {
|
|
1518
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1519
|
+
getObject(arg0).copyTextureToTexture(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1520
|
+
}, arguments);
|
|
1521
|
+
},
|
|
1522
|
+
__wbg_createBindGroupLayout_1dad97f44fda2929: function() {
|
|
1523
|
+
return handleError(function(arg0, arg1) {
|
|
1524
|
+
const ret = getObject(arg0).createBindGroupLayout(getObject(arg1));
|
|
1525
|
+
return addHeapObject(ret);
|
|
1526
|
+
}, arguments);
|
|
1527
|
+
},
|
|
1528
|
+
__wbg_createBindGroup_0ee0646375643dfb: function(arg0, arg1) {
|
|
1529
|
+
const ret = getObject(arg0).createBindGroup(getObject(arg1));
|
|
1830
1530
|
return addHeapObject(ret);
|
|
1831
|
-
},
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1531
|
+
},
|
|
1532
|
+
__wbg_createBuffer_474baee88e74f68a: function() {
|
|
1533
|
+
return handleError(function(arg0, arg1) {
|
|
1534
|
+
const ret = getObject(arg0).createBuffer(getObject(arg1));
|
|
1535
|
+
return addHeapObject(ret);
|
|
1536
|
+
}, arguments);
|
|
1537
|
+
},
|
|
1538
|
+
__wbg_createCommandEncoder_5229e112300218b4: function(arg0, arg1) {
|
|
1539
|
+
const ret = getObject(arg0).createCommandEncoder(getObject(arg1));
|
|
1836
1540
|
return addHeapObject(ret);
|
|
1837
|
-
},
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
const ret = getObject(arg0).crypto;
|
|
1841
|
-
return addHeapObject(ret);
|
|
1842
|
-
};
|
|
1843
|
-
imports.wbg.__wbg_debug_9d0c87ddda3dc485 = function(arg0) {
|
|
1844
|
-
console.debug(getObject(arg0));
|
|
1845
|
-
};
|
|
1846
|
-
imports.wbg.__wbg_dispatchWorkgroupsIndirect_6594fbc416b287d6 = function(arg0, arg1, arg2) {
|
|
1847
|
-
getObject(arg0).dispatchWorkgroupsIndirect(getObject(arg1), arg2);
|
|
1848
|
-
};
|
|
1849
|
-
imports.wbg.__wbg_dispatchWorkgroups_4e59e078119b5bab = function(arg0, arg1, arg2, arg3) {
|
|
1850
|
-
getObject(arg0).dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
|
|
1851
|
-
};
|
|
1852
|
-
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
1853
|
-
const ret = getObject(arg0).done;
|
|
1854
|
-
return ret;
|
|
1855
|
-
};
|
|
1856
|
-
imports.wbg.__wbg_end_ece2bf3a25678f12 = function(arg0) {
|
|
1857
|
-
getObject(arg0).end();
|
|
1858
|
-
};
|
|
1859
|
-
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
1860
|
-
const ret = Object.entries(getObject(arg0));
|
|
1861
|
-
return addHeapObject(ret);
|
|
1862
|
-
};
|
|
1863
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1864
|
-
let deferred0_0;
|
|
1865
|
-
let deferred0_1;
|
|
1866
|
-
try {
|
|
1867
|
-
deferred0_0 = arg0;
|
|
1868
|
-
deferred0_1 = arg1;
|
|
1869
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
1870
|
-
} finally {
|
|
1871
|
-
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1872
|
-
}
|
|
1873
|
-
};
|
|
1874
|
-
imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
|
|
1875
|
-
console.error(getObject(arg0));
|
|
1876
|
-
};
|
|
1877
|
-
imports.wbg.__wbg_fetch_cd0acd3c15ec5b5d = function(arg0) {
|
|
1878
|
-
const ret = fetch(getObject(arg0));
|
|
1879
|
-
return addHeapObject(ret);
|
|
1880
|
-
};
|
|
1881
|
-
imports.wbg.__wbg_finish_17a0b297901010d5 = function(arg0) {
|
|
1882
|
-
const ret = getObject(arg0).finish();
|
|
1883
|
-
return addHeapObject(ret);
|
|
1884
|
-
};
|
|
1885
|
-
imports.wbg.__wbg_finish_ab9e01a922269f3a = function(arg0, arg1) {
|
|
1886
|
-
const ret = getObject(arg0).finish(getObject(arg1));
|
|
1887
|
-
return addHeapObject(ret);
|
|
1888
|
-
};
|
|
1889
|
-
imports.wbg.__wbg_getDate_b8071ea9fc4f6838 = function(arg0) {
|
|
1890
|
-
const ret = getObject(arg0).getDate();
|
|
1891
|
-
return ret;
|
|
1892
|
-
};
|
|
1893
|
-
imports.wbg.__wbg_getFullYear_6ac412e8eee86879 = function(arg0) {
|
|
1894
|
-
const ret = getObject(arg0).getFullYear();
|
|
1895
|
-
return ret;
|
|
1896
|
-
};
|
|
1897
|
-
imports.wbg.__wbg_getHours_52eb417ad6e924e8 = function(arg0) {
|
|
1898
|
-
const ret = getObject(arg0).getHours();
|
|
1899
|
-
return ret;
|
|
1900
|
-
};
|
|
1901
|
-
imports.wbg.__wbg_getMappedRange_1229810ff58e27ce = function() {
|
|
1902
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1903
|
-
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
1541
|
+
},
|
|
1542
|
+
__wbg_createComputePipeline_1cd8bf7e02a1a06d: function(arg0, arg1) {
|
|
1543
|
+
const ret = getObject(arg0).createComputePipeline(getObject(arg1));
|
|
1904
1544
|
return addHeapObject(ret);
|
|
1905
|
-
},
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
const ret = getObject(arg0).getMinutes();
|
|
1909
|
-
return ret;
|
|
1910
|
-
};
|
|
1911
|
-
imports.wbg.__wbg_getMonth_48a392071f9e5017 = function(arg0) {
|
|
1912
|
-
const ret = getObject(arg0).getMonth();
|
|
1913
|
-
return ret;
|
|
1914
|
-
};
|
|
1915
|
-
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() {
|
|
1916
|
-
return handleError(function(arg0, arg1) {
|
|
1917
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1918
|
-
}, arguments);
|
|
1919
|
-
};
|
|
1920
|
-
imports.wbg.__wbg_getSeconds_d94762aec8103802 = function(arg0) {
|
|
1921
|
-
const ret = getObject(arg0).getSeconds();
|
|
1922
|
-
return ret;
|
|
1923
|
-
};
|
|
1924
|
-
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
1925
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1926
|
-
return addHeapObject(ret);
|
|
1927
|
-
};
|
|
1928
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() {
|
|
1929
|
-
return handleError(function(arg0, arg1) {
|
|
1930
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1545
|
+
},
|
|
1546
|
+
__wbg_createPipelineLayout_bf0deba7918ca157: function(arg0, arg1) {
|
|
1547
|
+
const ret = getObject(arg0).createPipelineLayout(getObject(arg1));
|
|
1931
1548
|
return addHeapObject(ret);
|
|
1932
|
-
},
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
1936
|
-
return addHeapObject(ret);
|
|
1937
|
-
};
|
|
1938
|
-
imports.wbg.__wbg_gpu_a6bce2913fb8f574 = function(arg0) {
|
|
1939
|
-
const ret = getObject(arg0).gpu;
|
|
1940
|
-
return addHeapObject(ret);
|
|
1941
|
-
};
|
|
1942
|
-
imports.wbg.__wbg_info_ce6bcc489c22f6f0 = function(arg0) {
|
|
1943
|
-
console.info(getObject(arg0));
|
|
1944
|
-
};
|
|
1945
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
1946
|
-
let result;
|
|
1947
|
-
try {
|
|
1948
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1949
|
-
} catch (_) {
|
|
1950
|
-
result = false;
|
|
1951
|
-
}
|
|
1952
|
-
const ret = result;
|
|
1953
|
-
return ret;
|
|
1954
|
-
};
|
|
1955
|
-
imports.wbg.__wbg_instanceof_GpuAdapter_fb230cdccb184887 = function(arg0) {
|
|
1956
|
-
let result;
|
|
1957
|
-
try {
|
|
1958
|
-
result = getObject(arg0) instanceof GPUAdapter;
|
|
1959
|
-
} catch (_) {
|
|
1960
|
-
result = false;
|
|
1961
|
-
}
|
|
1962
|
-
const ret = result;
|
|
1963
|
-
return ret;
|
|
1964
|
-
};
|
|
1965
|
-
imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
|
|
1966
|
-
let result;
|
|
1967
|
-
try {
|
|
1968
|
-
result = getObject(arg0) instanceof Map;
|
|
1969
|
-
} catch (_) {
|
|
1970
|
-
result = false;
|
|
1971
|
-
}
|
|
1972
|
-
const ret = result;
|
|
1973
|
-
return ret;
|
|
1974
|
-
};
|
|
1975
|
-
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
1976
|
-
let result;
|
|
1977
|
-
try {
|
|
1978
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
1979
|
-
} catch (_) {
|
|
1980
|
-
result = false;
|
|
1981
|
-
}
|
|
1982
|
-
const ret = result;
|
|
1983
|
-
return ret;
|
|
1984
|
-
};
|
|
1985
|
-
imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
1986
|
-
const ret = Array.isArray(getObject(arg0));
|
|
1987
|
-
return ret;
|
|
1988
|
-
};
|
|
1989
|
-
imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
1990
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1991
|
-
return ret;
|
|
1992
|
-
};
|
|
1993
|
-
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
1994
|
-
const ret = Symbol.iterator;
|
|
1995
|
-
return addHeapObject(ret);
|
|
1996
|
-
};
|
|
1997
|
-
imports.wbg.__wbg_label_cda985b32d44cee0 = function(arg0, arg1) {
|
|
1998
|
-
const ret = getObject(arg1).label;
|
|
1999
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2000
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2001
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2002
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2003
|
-
};
|
|
2004
|
-
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
2005
|
-
const ret = getObject(arg0).length;
|
|
2006
|
-
return ret;
|
|
2007
|
-
};
|
|
2008
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
2009
|
-
const ret = getObject(arg0).length;
|
|
2010
|
-
return ret;
|
|
2011
|
-
};
|
|
2012
|
-
imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
|
|
2013
|
-
console.log(getObject(arg0));
|
|
2014
|
-
};
|
|
2015
|
-
imports.wbg.__wbg_mapAsync_4a34082bad283ccf = function(arg0, arg1, arg2, arg3) {
|
|
2016
|
-
const ret = getObject(arg0).mapAsync(arg1 >>> 0, arg2, arg3);
|
|
2017
|
-
return addHeapObject(ret);
|
|
2018
|
-
};
|
|
2019
|
-
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
2020
|
-
const ret = getObject(arg0).msCrypto;
|
|
2021
|
-
return addHeapObject(ret);
|
|
2022
|
-
};
|
|
2023
|
-
imports.wbg.__wbg_navigator_11b7299bb7886507 = function(arg0) {
|
|
2024
|
-
const ret = getObject(arg0).navigator;
|
|
2025
|
-
return addHeapObject(ret);
|
|
2026
|
-
};
|
|
2027
|
-
imports.wbg.__wbg_navigator_b49edef831236138 = function(arg0) {
|
|
2028
|
-
const ret = getObject(arg0).navigator;
|
|
2029
|
-
return addHeapObject(ret);
|
|
2030
|
-
};
|
|
2031
|
-
imports.wbg.__wbg_new_0_23cedd11d9b40c9d = function() {
|
|
2032
|
-
const ret = /* @__PURE__ */ new Date();
|
|
2033
|
-
return addHeapObject(ret);
|
|
2034
|
-
};
|
|
2035
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
2036
|
-
const ret = new Object();
|
|
2037
|
-
return addHeapObject(ret);
|
|
2038
|
-
};
|
|
2039
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
2040
|
-
const ret = new Array();
|
|
2041
|
-
return addHeapObject(ret);
|
|
2042
|
-
};
|
|
2043
|
-
imports.wbg.__wbg_new_3c79b3bb1b32b7d3 = function() {
|
|
2044
|
-
return handleError(function() {
|
|
2045
|
-
const ret = new Headers();
|
|
1549
|
+
},
|
|
1550
|
+
__wbg_createShaderModule_744311a1dd685c14: function(arg0, arg1) {
|
|
1551
|
+
const ret = getObject(arg0).createShaderModule(getObject(arg1));
|
|
2046
1552
|
return addHeapObject(ret);
|
|
2047
|
-
},
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
1553
|
+
},
|
|
1554
|
+
__wbg_createTexture_f357c38256411287: function() {
|
|
1555
|
+
return handleError(function(arg0, arg1) {
|
|
1556
|
+
const ret = getObject(arg0).createTexture(getObject(arg1));
|
|
1557
|
+
return addHeapObject(ret);
|
|
1558
|
+
}, arguments);
|
|
1559
|
+
},
|
|
1560
|
+
__wbg_createView_e7a36ec95c4190f3: function() {
|
|
1561
|
+
return handleError(function(arg0, arg1) {
|
|
1562
|
+
const ret = getObject(arg0).createView(getObject(arg1));
|
|
1563
|
+
return addHeapObject(ret);
|
|
1564
|
+
}, arguments);
|
|
1565
|
+
},
|
|
1566
|
+
__wbg_crypto_48300657fced39f9: function(arg0) {
|
|
1567
|
+
const ret = getObject(arg0).crypto;
|
|
2052
1568
|
return addHeapObject(ret);
|
|
2053
|
-
},
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
state0.a = 0;
|
|
2073
|
-
try {
|
|
2074
|
-
return __wasm_bindgen_func_elem_22595(a, state0.b, arg02, arg12);
|
|
2075
|
-
} finally {
|
|
2076
|
-
state0.a = a;
|
|
2077
|
-
}
|
|
2078
|
-
};
|
|
2079
|
-
const ret = new Promise(cb0);
|
|
1569
|
+
},
|
|
1570
|
+
__wbg_debug_78b457f1effb3792: function(arg0) {
|
|
1571
|
+
console.debug(getObject(arg0));
|
|
1572
|
+
},
|
|
1573
|
+
__wbg_dispatchWorkgroupsIndirect_cdb624732570d2ab: function(arg0, arg1, arg2) {
|
|
1574
|
+
getObject(arg0).dispatchWorkgroupsIndirect(getObject(arg1), arg2);
|
|
1575
|
+
},
|
|
1576
|
+
__wbg_dispatchWorkgroups_727fa35f9c69d73c: function(arg0, arg1, arg2, arg3) {
|
|
1577
|
+
getObject(arg0).dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
|
|
1578
|
+
},
|
|
1579
|
+
__wbg_done_60cf307fcc680536: function(arg0) {
|
|
1580
|
+
const ret = getObject(arg0).done;
|
|
1581
|
+
return ret;
|
|
1582
|
+
},
|
|
1583
|
+
__wbg_end_2398df10208cf1ee: function(arg0) {
|
|
1584
|
+
getObject(arg0).end();
|
|
1585
|
+
},
|
|
1586
|
+
__wbg_entries_04b37a02507f1713: function(arg0) {
|
|
1587
|
+
const ret = Object.entries(getObject(arg0));
|
|
2080
1588
|
return addHeapObject(ret);
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
2099
|
-
return addHeapObject(ret);
|
|
2100
|
-
};
|
|
2101
|
-
imports.wbg.__wbg_new_with_str_and_init_c5748f76f5108934 = function() {
|
|
2102
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
2103
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1589
|
+
},
|
|
1590
|
+
__wbg_error_78ff5b3a29b770e0: function(arg0) {
|
|
1591
|
+
console.error(getObject(arg0));
|
|
1592
|
+
},
|
|
1593
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
1594
|
+
let deferred0_0;
|
|
1595
|
+
let deferred0_1;
|
|
1596
|
+
try {
|
|
1597
|
+
deferred0_0 = arg0;
|
|
1598
|
+
deferred0_1 = arg1;
|
|
1599
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1600
|
+
} finally {
|
|
1601
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
__wbg_fetch_38c2afdf0e494736: function(arg0) {
|
|
1605
|
+
const ret = fetch(getObject(arg0));
|
|
2104
1606
|
return addHeapObject(ret);
|
|
2105
|
-
},
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
const ret = getObject(arg0).next;
|
|
2109
|
-
return addHeapObject(ret);
|
|
2110
|
-
};
|
|
2111
|
-
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() {
|
|
2112
|
-
return handleError(function(arg0) {
|
|
2113
|
-
const ret = getObject(arg0).next();
|
|
1607
|
+
},
|
|
1608
|
+
__wbg_finish_7370ad1c0e62b448: function(arg0) {
|
|
1609
|
+
const ret = getObject(arg0).finish();
|
|
2114
1610
|
return addHeapObject(ret);
|
|
2115
|
-
},
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
const ret = getObject(arg0).node;
|
|
2119
|
-
return addHeapObject(ret);
|
|
2120
|
-
};
|
|
2121
|
-
imports.wbg.__wbg_now_69d776cd24f5215b = function() {
|
|
2122
|
-
const ret = Date.now();
|
|
2123
|
-
return ret;
|
|
2124
|
-
};
|
|
2125
|
-
imports.wbg.__wbg_open_bfb661c1c2740586 = function() {
|
|
2126
|
-
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2127
|
-
getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
|
|
2128
|
-
}, arguments);
|
|
2129
|
-
};
|
|
2130
|
-
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
2131
|
-
const ret = getObject(arg0).process;
|
|
2132
|
-
return addHeapObject(ret);
|
|
2133
|
-
};
|
|
2134
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
2135
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
2136
|
-
};
|
|
2137
|
-
imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
|
|
2138
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
2139
|
-
return ret;
|
|
2140
|
-
};
|
|
2141
|
-
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
2142
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
2143
|
-
return addHeapObject(ret);
|
|
2144
|
-
};
|
|
2145
|
-
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
2146
|
-
queueMicrotask(getObject(arg0));
|
|
2147
|
-
};
|
|
2148
|
-
imports.wbg.__wbg_queue_39d4f3bda761adef = function(arg0) {
|
|
2149
|
-
const ret = getObject(arg0).queue;
|
|
2150
|
-
return addHeapObject(ret);
|
|
2151
|
-
};
|
|
2152
|
-
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() {
|
|
2153
|
-
return handleError(function(arg0, arg1) {
|
|
2154
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
2155
|
-
}, arguments);
|
|
2156
|
-
};
|
|
2157
|
-
imports.wbg.__wbg_requestAdapter_55d15e6d14e8392c = function(arg0, arg1) {
|
|
2158
|
-
const ret = getObject(arg0).requestAdapter(getObject(arg1));
|
|
2159
|
-
return addHeapObject(ret);
|
|
2160
|
-
};
|
|
2161
|
-
imports.wbg.__wbg_requestDevice_66e864eaf1ffbb38 = function(arg0, arg1) {
|
|
2162
|
-
const ret = getObject(arg0).requestDevice(getObject(arg1));
|
|
2163
|
-
return addHeapObject(ret);
|
|
2164
|
-
};
|
|
2165
|
-
imports.wbg.__wbg_require_60cc747a6bc5215a = function() {
|
|
2166
|
-
return handleError(function() {
|
|
2167
|
-
const ret = module.require;
|
|
1611
|
+
},
|
|
1612
|
+
__wbg_finish_797b32d15bab2338: function(arg0, arg1) {
|
|
1613
|
+
const ret = getObject(arg0).finish(getObject(arg1));
|
|
2168
1614
|
return addHeapObject(ret);
|
|
2169
|
-
},
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
1615
|
+
},
|
|
1616
|
+
__wbg_getDate_3d2f964145b3449d: function(arg0) {
|
|
1617
|
+
const ret = getObject(arg0).getDate();
|
|
1618
|
+
return ret;
|
|
1619
|
+
},
|
|
1620
|
+
__wbg_getFullYear_8b1ba9a648a4de7f: function(arg0) {
|
|
1621
|
+
const ret = getObject(arg0).getFullYear();
|
|
1622
|
+
return ret;
|
|
1623
|
+
},
|
|
1624
|
+
__wbg_getHours_91ac680ae491b8ea: function(arg0) {
|
|
1625
|
+
const ret = getObject(arg0).getHours();
|
|
1626
|
+
return ret;
|
|
1627
|
+
},
|
|
1628
|
+
__wbg_getMappedRange_9f13d158ba3946fd: function() {
|
|
1629
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1630
|
+
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
1631
|
+
return addHeapObject(ret);
|
|
1632
|
+
}, arguments);
|
|
1633
|
+
},
|
|
1634
|
+
__wbg_getMinutes_c1c2573becc0c7b5: function(arg0) {
|
|
1635
|
+
const ret = getObject(arg0).getMinutes();
|
|
1636
|
+
return ret;
|
|
1637
|
+
},
|
|
1638
|
+
__wbg_getMonth_44bdf67c99f2ed79: function(arg0) {
|
|
1639
|
+
const ret = getObject(arg0).getMonth();
|
|
1640
|
+
return ret;
|
|
1641
|
+
},
|
|
1642
|
+
__wbg_getRandomValues_263d0aa5464054ee: function() {
|
|
1643
|
+
return handleError(function(arg0, arg1) {
|
|
1644
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1645
|
+
}, arguments);
|
|
1646
|
+
},
|
|
1647
|
+
__wbg_getSeconds_2716239745eecd0a: function(arg0) {
|
|
1648
|
+
const ret = getObject(arg0).getSeconds();
|
|
1649
|
+
return ret;
|
|
1650
|
+
},
|
|
1651
|
+
__wbg_get_1f8f054ddbaa7db2: function() {
|
|
1652
|
+
return handleError(function(arg0, arg1) {
|
|
1653
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1654
|
+
return addHeapObject(ret);
|
|
1655
|
+
}, arguments);
|
|
1656
|
+
},
|
|
1657
|
+
__wbg_get_2b48c7d0d006a781: function(arg0, arg1) {
|
|
1658
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1659
|
+
return addHeapObject(ret);
|
|
1660
|
+
},
|
|
1661
|
+
__wbg_get_de6a0f7d4d18a304: function() {
|
|
1662
|
+
return handleError(function(arg0, arg1) {
|
|
1663
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1664
|
+
return addHeapObject(ret);
|
|
1665
|
+
}, arguments);
|
|
1666
|
+
},
|
|
1667
|
+
__wbg_get_unchecked_33f6e5c9e2f2d6b2: function(arg0, arg1) {
|
|
1668
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1669
|
+
return addHeapObject(ret);
|
|
1670
|
+
},
|
|
1671
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1672
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
1673
|
+
return addHeapObject(ret);
|
|
1674
|
+
},
|
|
1675
|
+
__wbg_gpu_ac6dc8fb638a26c3: function(arg0) {
|
|
1676
|
+
const ret = getObject(arg0).gpu;
|
|
1677
|
+
return addHeapObject(ret);
|
|
1678
|
+
},
|
|
1679
|
+
__wbg_info_af7f45292ba9b0ea: function(arg0) {
|
|
1680
|
+
console.info(getObject(arg0));
|
|
1681
|
+
},
|
|
1682
|
+
__wbg_instanceof_ArrayBuffer_8f49811467741499: function(arg0) {
|
|
1683
|
+
let result;
|
|
1684
|
+
try {
|
|
1685
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1686
|
+
} catch (_) {
|
|
1687
|
+
result = false;
|
|
1688
|
+
}
|
|
1689
|
+
const ret = result;
|
|
1690
|
+
return ret;
|
|
1691
|
+
},
|
|
1692
|
+
__wbg_instanceof_GpuAdapter_fb230cdccb184887: function(arg0) {
|
|
1693
|
+
let result;
|
|
1694
|
+
try {
|
|
1695
|
+
result = getObject(arg0) instanceof GPUAdapter;
|
|
1696
|
+
} catch (_) {
|
|
1697
|
+
result = false;
|
|
1698
|
+
}
|
|
1699
|
+
const ret = result;
|
|
1700
|
+
return ret;
|
|
1701
|
+
},
|
|
1702
|
+
__wbg_instanceof_Map_9fc06d9a951bcee6: function(arg0) {
|
|
1703
|
+
let result;
|
|
1704
|
+
try {
|
|
1705
|
+
result = getObject(arg0) instanceof Map;
|
|
1706
|
+
} catch (_) {
|
|
1707
|
+
result = false;
|
|
1708
|
+
}
|
|
1709
|
+
const ret = result;
|
|
1710
|
+
return ret;
|
|
1711
|
+
},
|
|
1712
|
+
__wbg_instanceof_Uint8Array_86f30649f63ef9c2: function(arg0) {
|
|
1713
|
+
let result;
|
|
1714
|
+
try {
|
|
1715
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
1716
|
+
} catch (_) {
|
|
1717
|
+
result = false;
|
|
1718
|
+
}
|
|
1719
|
+
const ret = result;
|
|
1720
|
+
return ret;
|
|
1721
|
+
},
|
|
1722
|
+
__wbg_isArray_67c2c9c4313f4448: function(arg0) {
|
|
1723
|
+
const ret = Array.isArray(getObject(arg0));
|
|
1724
|
+
return ret;
|
|
1725
|
+
},
|
|
1726
|
+
__wbg_isSafeInteger_66acec27e09e99a7: function(arg0) {
|
|
1727
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1728
|
+
return ret;
|
|
1729
|
+
},
|
|
1730
|
+
__wbg_iterator_8732428d309e270e: function() {
|
|
1731
|
+
const ret = Symbol.iterator;
|
|
1732
|
+
return addHeapObject(ret);
|
|
1733
|
+
},
|
|
1734
|
+
__wbg_label_84abde6506fa15b7: function(arg0, arg1) {
|
|
1735
|
+
const ret = getObject(arg1).label;
|
|
1736
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1737
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2180
1738
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2181
1739
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2182
|
-
},
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
1740
|
+
},
|
|
1741
|
+
__wbg_length_4a591ecaa01354d9: function(arg0) {
|
|
1742
|
+
const ret = getObject(arg0).length;
|
|
1743
|
+
return ret;
|
|
1744
|
+
},
|
|
1745
|
+
__wbg_length_66f1a4b2e9026940: function(arg0) {
|
|
1746
|
+
const ret = getObject(arg0).length;
|
|
1747
|
+
return ret;
|
|
1748
|
+
},
|
|
1749
|
+
__wbg_log_cf2e968649f3384e: function(arg0) {
|
|
1750
|
+
console.log(getObject(arg0));
|
|
1751
|
+
},
|
|
1752
|
+
__wbg_mapAsync_3546b4b874e14738: function(arg0, arg1, arg2, arg3) {
|
|
1753
|
+
const ret = getObject(arg0).mapAsync(arg1 >>> 0, arg2, arg3);
|
|
2187
1754
|
return addHeapObject(ret);
|
|
2188
|
-
},
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
const ret =
|
|
1755
|
+
},
|
|
1756
|
+
__wbg_msCrypto_8c6d45a75ef1d3da: function(arg0) {
|
|
1757
|
+
const ret = getObject(arg0).msCrypto;
|
|
1758
|
+
return addHeapObject(ret);
|
|
1759
|
+
},
|
|
1760
|
+
__wbg_navigator_3833ecdbc19d2757: function(arg0) {
|
|
1761
|
+
const ret = getObject(arg0).navigator;
|
|
1762
|
+
return addHeapObject(ret);
|
|
1763
|
+
},
|
|
1764
|
+
__wbg_navigator_391291470f58c650: function(arg0) {
|
|
1765
|
+
const ret = getObject(arg0).navigator;
|
|
1766
|
+
return addHeapObject(ret);
|
|
1767
|
+
},
|
|
1768
|
+
__wbg_new_0_445c13a750296eb6: function() {
|
|
1769
|
+
const ret = /* @__PURE__ */ new Date();
|
|
1770
|
+
return addHeapObject(ret);
|
|
1771
|
+
},
|
|
1772
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
1773
|
+
const ret = new Error();
|
|
1774
|
+
return addHeapObject(ret);
|
|
1775
|
+
},
|
|
1776
|
+
__wbg_new_2ee370dca414d926: function() {
|
|
1777
|
+
return handleError(function() {
|
|
1778
|
+
const ret = new XMLHttpRequest();
|
|
1779
|
+
return addHeapObject(ret);
|
|
1780
|
+
}, arguments);
|
|
1781
|
+
},
|
|
1782
|
+
__wbg_new_578aeef4b6b94378: function(arg0) {
|
|
1783
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1784
|
+
return addHeapObject(ret);
|
|
1785
|
+
},
|
|
1786
|
+
__wbg_new_622fc80556be2e26: function() {
|
|
1787
|
+
const ret = /* @__PURE__ */ new Map();
|
|
1788
|
+
return addHeapObject(ret);
|
|
1789
|
+
},
|
|
1790
|
+
__wbg_new_b682b81e8eaaf027: function(arg0, arg1) {
|
|
1791
|
+
try {
|
|
1792
|
+
var state0 = { a: arg0, b: arg1 };
|
|
1793
|
+
var cb0 = (arg02, arg12) => {
|
|
1794
|
+
const a = state0.a;
|
|
1795
|
+
state0.a = 0;
|
|
1796
|
+
try {
|
|
1797
|
+
return __wasm_bindgen_func_elem_22734(a, state0.b, arg02, arg12);
|
|
1798
|
+
} finally {
|
|
1799
|
+
state0.a = a;
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
const ret = new Promise(cb0);
|
|
1803
|
+
return addHeapObject(ret);
|
|
1804
|
+
} finally {
|
|
1805
|
+
state0.a = 0;
|
|
1806
|
+
}
|
|
1807
|
+
},
|
|
1808
|
+
__wbg_new_ce1ab61c1c2b300d: function() {
|
|
1809
|
+
const ret = new Object();
|
|
1810
|
+
return addHeapObject(ret);
|
|
1811
|
+
},
|
|
1812
|
+
__wbg_new_d90091b82fdf5b91: function() {
|
|
1813
|
+
const ret = new Array();
|
|
1814
|
+
return addHeapObject(ret);
|
|
1815
|
+
},
|
|
1816
|
+
__wbg_new_e436d06bc8e77460: function() {
|
|
1817
|
+
return handleError(function() {
|
|
1818
|
+
const ret = new Headers();
|
|
1819
|
+
return addHeapObject(ret);
|
|
1820
|
+
}, arguments);
|
|
1821
|
+
},
|
|
1822
|
+
__wbg_new_from_slice_18fa1f71286d66b8: function(arg0, arg1) {
|
|
1823
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1824
|
+
return addHeapObject(ret);
|
|
1825
|
+
},
|
|
1826
|
+
__wbg_new_typed_bf31d18f92484486: function(arg0, arg1) {
|
|
1827
|
+
try {
|
|
1828
|
+
var state0 = { a: arg0, b: arg1 };
|
|
1829
|
+
var cb0 = (arg02, arg12) => {
|
|
1830
|
+
const a = state0.a;
|
|
1831
|
+
state0.a = 0;
|
|
1832
|
+
try {
|
|
1833
|
+
return __wasm_bindgen_func_elem_22734(a, state0.b, arg02, arg12);
|
|
1834
|
+
} finally {
|
|
1835
|
+
state0.a = a;
|
|
1836
|
+
}
|
|
1837
|
+
};
|
|
1838
|
+
const ret = new Promise(cb0);
|
|
1839
|
+
return addHeapObject(ret);
|
|
1840
|
+
} finally {
|
|
1841
|
+
state0.a = 0;
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
__wbg_new_with_byte_offset_and_length_d836f26d916dd9ad: function(arg0, arg1, arg2) {
|
|
1845
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
1846
|
+
return addHeapObject(ret);
|
|
1847
|
+
},
|
|
1848
|
+
__wbg_new_with_length_36a4998e27b014c5: function(arg0) {
|
|
1849
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1850
|
+
return addHeapObject(ret);
|
|
1851
|
+
},
|
|
1852
|
+
__wbg_new_with_str_and_init_bcd02b79a793d27f: function() {
|
|
1853
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1854
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1855
|
+
return addHeapObject(ret);
|
|
1856
|
+
}, arguments);
|
|
1857
|
+
},
|
|
1858
|
+
__wbg_next_9e03acdf51c4960d: function(arg0) {
|
|
1859
|
+
const ret = getObject(arg0).next;
|
|
1860
|
+
return addHeapObject(ret);
|
|
1861
|
+
},
|
|
1862
|
+
__wbg_next_eb8ca7351fa27906: function() {
|
|
1863
|
+
return handleError(function(arg0) {
|
|
1864
|
+
const ret = getObject(arg0).next();
|
|
1865
|
+
return addHeapObject(ret);
|
|
1866
|
+
}, arguments);
|
|
1867
|
+
},
|
|
1868
|
+
__wbg_node_95beb7570492fd97: function(arg0) {
|
|
1869
|
+
const ret = getObject(arg0).node;
|
|
1870
|
+
return addHeapObject(ret);
|
|
1871
|
+
},
|
|
1872
|
+
__wbg_now_190933fa139cc119: function() {
|
|
1873
|
+
const ret = Date.now();
|
|
2217
1874
|
return ret;
|
|
2218
|
-
},
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
getObject(arg0).baseArrayLayer = arg1 >>> 0;
|
|
2234
|
-
};
|
|
2235
|
-
imports.wbg.__wbg_set_base_mip_level_f90525112a282a1d = function(arg0, arg1) {
|
|
2236
|
-
getObject(arg0).baseMipLevel = arg1 >>> 0;
|
|
2237
|
-
};
|
|
2238
|
-
imports.wbg.__wbg_set_bc3a432bdcd60886 = function(arg0, arg1, arg2) {
|
|
2239
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
2240
|
-
};
|
|
2241
|
-
imports.wbg.__wbg_set_beginning_of_pass_write_index_1175eec9e005d722 = function(arg0, arg1) {
|
|
2242
|
-
getObject(arg0).beginningOfPassWriteIndex = arg1 >>> 0;
|
|
2243
|
-
};
|
|
2244
|
-
imports.wbg.__wbg_set_bind_group_layouts_54f980eb55071c87 = function(arg0, arg1) {
|
|
2245
|
-
getObject(arg0).bindGroupLayouts = getObject(arg1);
|
|
2246
|
-
};
|
|
2247
|
-
imports.wbg.__wbg_set_binding_1ddbf5eebabdc48c = function(arg0, arg1) {
|
|
2248
|
-
getObject(arg0).binding = arg1 >>> 0;
|
|
2249
|
-
};
|
|
2250
|
-
imports.wbg.__wbg_set_binding_5ea4d52c77434dfa = function(arg0, arg1) {
|
|
2251
|
-
getObject(arg0).binding = arg1 >>> 0;
|
|
2252
|
-
};
|
|
2253
|
-
imports.wbg.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {
|
|
2254
|
-
getObject(arg0).body = getObject(arg1);
|
|
2255
|
-
};
|
|
2256
|
-
imports.wbg.__wbg_set_buffer_2dac3e64a7099038 = function(arg0, arg1) {
|
|
2257
|
-
getObject(arg0).buffer = getObject(arg1);
|
|
2258
|
-
};
|
|
2259
|
-
imports.wbg.__wbg_set_buffer_489d923366e1f63a = function(arg0, arg1) {
|
|
2260
|
-
getObject(arg0).buffer = getObject(arg1);
|
|
2261
|
-
};
|
|
2262
|
-
imports.wbg.__wbg_set_buffer_a3a7f00fa797e1d1 = function(arg0, arg1) {
|
|
2263
|
-
getObject(arg0).buffer = getObject(arg1);
|
|
2264
|
-
};
|
|
2265
|
-
imports.wbg.__wbg_set_bytes_per_row_61fdc31fb1e978f4 = function(arg0, arg1) {
|
|
2266
|
-
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2267
|
-
};
|
|
2268
|
-
imports.wbg.__wbg_set_bytes_per_row_7eb4ea50ad336975 = function(arg0, arg1) {
|
|
2269
|
-
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2270
|
-
};
|
|
2271
|
-
imports.wbg.__wbg_set_code_e66de35c80aa100f = function(arg0, arg1, arg2) {
|
|
2272
|
-
getObject(arg0).code = getStringFromWasm0(arg1, arg2);
|
|
2273
|
-
};
|
|
2274
|
-
imports.wbg.__wbg_set_compute_7e84d836a17ec8dc = function(arg0, arg1) {
|
|
2275
|
-
getObject(arg0).compute = getObject(arg1);
|
|
2276
|
-
};
|
|
2277
|
-
imports.wbg.__wbg_set_depth_or_array_layers_57e35a31ded46b97 = function(arg0, arg1) {
|
|
2278
|
-
getObject(arg0).depthOrArrayLayers = arg1 >>> 0;
|
|
2279
|
-
};
|
|
2280
|
-
imports.wbg.__wbg_set_dimension_1e40af745768ac00 = function(arg0, arg1) {
|
|
2281
|
-
getObject(arg0).dimension = __wbindgen_enum_GpuTextureDimension[arg1];
|
|
2282
|
-
};
|
|
2283
|
-
imports.wbg.__wbg_set_dimension_8523a7df804e7839 = function(arg0, arg1) {
|
|
2284
|
-
getObject(arg0).dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2285
|
-
};
|
|
2286
|
-
imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
|
|
2287
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
2288
|
-
return addHeapObject(ret);
|
|
2289
|
-
};
|
|
2290
|
-
imports.wbg.__wbg_set_end_of_pass_write_index_c9e77fba223f5e64 = function(arg0, arg1) {
|
|
2291
|
-
getObject(arg0).endOfPassWriteIndex = arg1 >>> 0;
|
|
2292
|
-
};
|
|
2293
|
-
imports.wbg.__wbg_set_entries_5ebe60dce5e74a0b = function(arg0, arg1) {
|
|
2294
|
-
getObject(arg0).entries = getObject(arg1);
|
|
2295
|
-
};
|
|
2296
|
-
imports.wbg.__wbg_set_entries_9e330e1730f04662 = function(arg0, arg1) {
|
|
2297
|
-
getObject(arg0).entries = getObject(arg1);
|
|
2298
|
-
};
|
|
2299
|
-
imports.wbg.__wbg_set_entry_point_0dd252068a92e7b1 = function(arg0, arg1, arg2) {
|
|
2300
|
-
getObject(arg0).entryPoint = getStringFromWasm0(arg1, arg2);
|
|
2301
|
-
};
|
|
2302
|
-
imports.wbg.__wbg_set_external_texture_c45a65eda8f1c7e7 = function(arg0, arg1) {
|
|
2303
|
-
getObject(arg0).externalTexture = getObject(arg1);
|
|
2304
|
-
};
|
|
2305
|
-
imports.wbg.__wbg_set_format_071b082598e71ae2 = function(arg0, arg1) {
|
|
2306
|
-
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2307
|
-
};
|
|
2308
|
-
imports.wbg.__wbg_set_format_45c59d08eefdcb12 = function(arg0, arg1) {
|
|
2309
|
-
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2310
|
-
};
|
|
2311
|
-
imports.wbg.__wbg_set_format_726ed8f81a287fdc = function(arg0, arg1) {
|
|
2312
|
-
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2313
|
-
};
|
|
2314
|
-
imports.wbg.__wbg_set_has_dynamic_offset_dcbae080558be467 = function(arg0, arg1) {
|
|
2315
|
-
getObject(arg0).hasDynamicOffset = arg1 !== 0;
|
|
2316
|
-
};
|
|
2317
|
-
imports.wbg.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {
|
|
2318
|
-
getObject(arg0).headers = getObject(arg1);
|
|
2319
|
-
};
|
|
2320
|
-
imports.wbg.__wbg_set_height_28e79506f626af82 = function(arg0, arg1) {
|
|
2321
|
-
getObject(arg0).height = arg1 >>> 0;
|
|
2322
|
-
};
|
|
2323
|
-
imports.wbg.__wbg_set_label_03ef288b104476b5 = function(arg0, arg1, arg2) {
|
|
2324
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2325
|
-
};
|
|
2326
|
-
imports.wbg.__wbg_set_label_1183ccaccddf4c32 = function(arg0, arg1, arg2) {
|
|
2327
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2328
|
-
};
|
|
2329
|
-
imports.wbg.__wbg_set_label_3d8a20f328073061 = function(arg0, arg1, arg2) {
|
|
2330
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2331
|
-
};
|
|
2332
|
-
imports.wbg.__wbg_set_label_491466139034563c = function(arg0, arg1, arg2) {
|
|
2333
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2334
|
-
};
|
|
2335
|
-
imports.wbg.__wbg_set_label_53b47ffdebccf638 = function(arg0, arg1, arg2) {
|
|
2336
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2337
|
-
};
|
|
2338
|
-
imports.wbg.__wbg_set_label_7ffda3ed69c72b85 = function(arg0, arg1, arg2) {
|
|
2339
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2340
|
-
};
|
|
2341
|
-
imports.wbg.__wbg_set_label_828e6fe16c83ad61 = function(arg0, arg1, arg2) {
|
|
2342
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2343
|
-
};
|
|
2344
|
-
imports.wbg.__wbg_set_label_95bae3d54f33d3c6 = function(arg0, arg1, arg2) {
|
|
2345
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2346
|
-
};
|
|
2347
|
-
imports.wbg.__wbg_set_label_a1c8caea9f6c17d7 = function(arg0, arg1, arg2) {
|
|
2348
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2349
|
-
};
|
|
2350
|
-
imports.wbg.__wbg_set_label_a3e682ef8c10c947 = function(arg0, arg1, arg2) {
|
|
2351
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2352
|
-
};
|
|
2353
|
-
imports.wbg.__wbg_set_label_c880c612e67bf9d9 = function(arg0, arg1, arg2) {
|
|
2354
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2355
|
-
};
|
|
2356
|
-
imports.wbg.__wbg_set_label_eb73d9dd282c005a = function(arg0, arg1, arg2) {
|
|
2357
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2358
|
-
};
|
|
2359
|
-
imports.wbg.__wbg_set_layout_934f9127172b906e = function(arg0, arg1) {
|
|
2360
|
-
getObject(arg0).layout = getObject(arg1);
|
|
2361
|
-
};
|
|
2362
|
-
imports.wbg.__wbg_set_layout_a9aebce493b15bfb = function(arg0, arg1) {
|
|
2363
|
-
getObject(arg0).layout = getObject(arg1);
|
|
2364
|
-
};
|
|
2365
|
-
imports.wbg.__wbg_set_mapped_at_creation_37dd8bbd1a910924 = function(arg0, arg1) {
|
|
2366
|
-
getObject(arg0).mappedAtCreation = arg1 !== 0;
|
|
2367
|
-
};
|
|
2368
|
-
imports.wbg.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {
|
|
2369
|
-
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
2370
|
-
};
|
|
2371
|
-
imports.wbg.__wbg_set_min_binding_size_f7d3351b78c71fbc = function(arg0, arg1) {
|
|
2372
|
-
getObject(arg0).minBindingSize = arg1;
|
|
2373
|
-
};
|
|
2374
|
-
imports.wbg.__wbg_set_mip_level_4adfe9f0872d052d = function(arg0, arg1) {
|
|
2375
|
-
getObject(arg0).mipLevel = arg1 >>> 0;
|
|
2376
|
-
};
|
|
2377
|
-
imports.wbg.__wbg_set_mip_level_count_3368440f1c3c34b9 = function(arg0, arg1) {
|
|
2378
|
-
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2379
|
-
};
|
|
2380
|
-
imports.wbg.__wbg_set_mip_level_count_9de96fe0db85420d = function(arg0, arg1) {
|
|
2381
|
-
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2382
|
-
};
|
|
2383
|
-
imports.wbg.__wbg_set_module_0700e7e0b7b4f128 = function(arg0, arg1) {
|
|
2384
|
-
getObject(arg0).module = getObject(arg1);
|
|
2385
|
-
};
|
|
2386
|
-
imports.wbg.__wbg_set_multisampled_dc1cdd807d0170e1 = function(arg0, arg1) {
|
|
2387
|
-
getObject(arg0).multisampled = arg1 !== 0;
|
|
2388
|
-
};
|
|
2389
|
-
imports.wbg.__wbg_set_offset_49dfc93674b6347b = function(arg0, arg1) {
|
|
2390
|
-
getObject(arg0).offset = arg1;
|
|
2391
|
-
};
|
|
2392
|
-
imports.wbg.__wbg_set_offset_51eb43b37f1e9525 = function(arg0, arg1) {
|
|
2393
|
-
getObject(arg0).offset = arg1;
|
|
2394
|
-
};
|
|
2395
|
-
imports.wbg.__wbg_set_offset_a90a41961b1df9b4 = function(arg0, arg1) {
|
|
2396
|
-
getObject(arg0).offset = arg1;
|
|
2397
|
-
};
|
|
2398
|
-
imports.wbg.__wbg_set_origin_154a83d3703121d7 = function(arg0, arg1) {
|
|
2399
|
-
getObject(arg0).origin = getObject(arg1);
|
|
2400
|
-
};
|
|
2401
|
-
imports.wbg.__wbg_set_power_preference_229fffedb859fda8 = function(arg0, arg1) {
|
|
2402
|
-
getObject(arg0).powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
|
|
2403
|
-
};
|
|
2404
|
-
imports.wbg.__wbg_set_query_set_5d767886356c7b79 = function(arg0, arg1) {
|
|
2405
|
-
getObject(arg0).querySet = getObject(arg1);
|
|
2406
|
-
};
|
|
2407
|
-
imports.wbg.__wbg_set_required_features_8135f6ab89e06b58 = function(arg0, arg1) {
|
|
2408
|
-
getObject(arg0).requiredFeatures = getObject(arg1);
|
|
2409
|
-
};
|
|
2410
|
-
imports.wbg.__wbg_set_resource_97233a9ead07e4bc = function(arg0, arg1) {
|
|
2411
|
-
getObject(arg0).resource = getObject(arg1);
|
|
2412
|
-
};
|
|
2413
|
-
imports.wbg.__wbg_set_responseType_df7a5fa93f0dd4be = function(arg0, arg1) {
|
|
2414
|
-
getObject(arg0).responseType = __wbindgen_enum_XmlHttpRequestResponseType[arg1];
|
|
2415
|
-
};
|
|
2416
|
-
imports.wbg.__wbg_set_rows_per_image_b2e56467282d270a = function(arg0, arg1) {
|
|
2417
|
-
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2418
|
-
};
|
|
2419
|
-
imports.wbg.__wbg_set_rows_per_image_ca194ae8c040a0d0 = function(arg0, arg1) {
|
|
2420
|
-
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2421
|
-
};
|
|
2422
|
-
imports.wbg.__wbg_set_sample_count_df26d31cf04a57d8 = function(arg0, arg1) {
|
|
2423
|
-
getObject(arg0).sampleCount = arg1 >>> 0;
|
|
2424
|
-
};
|
|
2425
|
-
imports.wbg.__wbg_set_sample_type_5671a405c6474494 = function(arg0, arg1) {
|
|
2426
|
-
getObject(arg0).sampleType = __wbindgen_enum_GpuTextureSampleType[arg1];
|
|
2427
|
-
};
|
|
2428
|
-
imports.wbg.__wbg_set_sampler_43a3dd77c3b0a5ba = function(arg0, arg1) {
|
|
2429
|
-
getObject(arg0).sampler = getObject(arg1);
|
|
2430
|
-
};
|
|
2431
|
-
imports.wbg.__wbg_set_size_1a3d1e3a2e547ec1 = function(arg0, arg1) {
|
|
2432
|
-
getObject(arg0).size = getObject(arg1);
|
|
2433
|
-
};
|
|
2434
|
-
imports.wbg.__wbg_set_size_a45dd219534f95ed = function(arg0, arg1) {
|
|
2435
|
-
getObject(arg0).size = arg1;
|
|
2436
|
-
};
|
|
2437
|
-
imports.wbg.__wbg_set_size_e0576eacd9f11fed = function(arg0, arg1) {
|
|
2438
|
-
getObject(arg0).size = arg1;
|
|
2439
|
-
};
|
|
2440
|
-
imports.wbg.__wbg_set_storage_texture_4853479f6eb61a57 = function(arg0, arg1) {
|
|
2441
|
-
getObject(arg0).storageTexture = getObject(arg1);
|
|
2442
|
-
};
|
|
2443
|
-
imports.wbg.__wbg_set_texture_5f219a723eb7db43 = function(arg0, arg1) {
|
|
2444
|
-
getObject(arg0).texture = getObject(arg1);
|
|
2445
|
-
};
|
|
2446
|
-
imports.wbg.__wbg_set_texture_84c4ac5434a9ddb5 = function(arg0, arg1) {
|
|
2447
|
-
getObject(arg0).texture = getObject(arg1);
|
|
2448
|
-
};
|
|
2449
|
-
imports.wbg.__wbg_set_timestamp_writes_db44391e390948e2 = function(arg0, arg1) {
|
|
2450
|
-
getObject(arg0).timestampWrites = getObject(arg1);
|
|
2451
|
-
};
|
|
2452
|
-
imports.wbg.__wbg_set_type_0a9fcee42b714ba8 = function(arg0, arg1) {
|
|
2453
|
-
getObject(arg0).type = __wbindgen_enum_GpuBufferBindingType[arg1];
|
|
2454
|
-
};
|
|
2455
|
-
imports.wbg.__wbg_set_type_ba111b7f1813a222 = function(arg0, arg1) {
|
|
2456
|
-
getObject(arg0).type = __wbindgen_enum_GpuSamplerBindingType[arg1];
|
|
2457
|
-
};
|
|
2458
|
-
imports.wbg.__wbg_set_usage_0f3970011718ab12 = function(arg0, arg1) {
|
|
2459
|
-
getObject(arg0).usage = arg1 >>> 0;
|
|
2460
|
-
};
|
|
2461
|
-
imports.wbg.__wbg_set_usage_49bed7c9b47e7849 = function(arg0, arg1) {
|
|
2462
|
-
getObject(arg0).usage = arg1 >>> 0;
|
|
2463
|
-
};
|
|
2464
|
-
imports.wbg.__wbg_set_usage_8a5ac4564d826d9d = function(arg0, arg1) {
|
|
2465
|
-
getObject(arg0).usage = arg1 >>> 0;
|
|
2466
|
-
};
|
|
2467
|
-
imports.wbg.__wbg_set_view_dimension_2e3a58d96671f97a = function(arg0, arg1) {
|
|
2468
|
-
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2469
|
-
};
|
|
2470
|
-
imports.wbg.__wbg_set_view_dimension_88c1a47ce71f7839 = function(arg0, arg1) {
|
|
2471
|
-
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2472
|
-
};
|
|
2473
|
-
imports.wbg.__wbg_set_view_formats_dbd4d0d50ed403ff = function(arg0, arg1) {
|
|
2474
|
-
getObject(arg0).viewFormats = getObject(arg1);
|
|
2475
|
-
};
|
|
2476
|
-
imports.wbg.__wbg_set_visibility_f4f66940005e5c39 = function(arg0, arg1) {
|
|
2477
|
-
getObject(arg0).visibility = arg1 >>> 0;
|
|
2478
|
-
};
|
|
2479
|
-
imports.wbg.__wbg_set_width_64c5783b064042bc = function(arg0, arg1) {
|
|
2480
|
-
getObject(arg0).width = arg1 >>> 0;
|
|
2481
|
-
};
|
|
2482
|
-
imports.wbg.__wbg_set_x_d5236bf9391eb053 = function(arg0, arg1) {
|
|
2483
|
-
getObject(arg0).x = arg1 >>> 0;
|
|
2484
|
-
};
|
|
2485
|
-
imports.wbg.__wbg_set_y_413262ade3cc0d56 = function(arg0, arg1) {
|
|
2486
|
-
getObject(arg0).y = arg1 >>> 0;
|
|
2487
|
-
};
|
|
2488
|
-
imports.wbg.__wbg_set_z_a136ba9bd16085f0 = function(arg0, arg1) {
|
|
2489
|
-
getObject(arg0).z = arg1 >>> 0;
|
|
2490
|
-
};
|
|
2491
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
2492
|
-
const ret = getObject(arg1).stack;
|
|
2493
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2494
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2495
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2496
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2497
|
-
};
|
|
2498
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
2499
|
-
const ret = typeof global === "undefined" ? null : global;
|
|
2500
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2501
|
-
};
|
|
2502
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
2503
|
-
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
2504
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2505
|
-
};
|
|
2506
|
-
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
2507
|
-
const ret = typeof self === "undefined" ? null : self;
|
|
2508
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2509
|
-
};
|
|
2510
|
-
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
2511
|
-
const ret = typeof window === "undefined" ? null : window;
|
|
2512
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2513
|
-
};
|
|
2514
|
-
imports.wbg.__wbg_status_c547ab1614ba835e = function() {
|
|
2515
|
-
return handleError(function(arg0) {
|
|
2516
|
-
const ret = getObject(arg0).status;
|
|
1875
|
+
},
|
|
1876
|
+
__wbg_open_837bab9ccb9e06da: function() {
|
|
1877
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1878
|
+
getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
|
|
1879
|
+
}, arguments);
|
|
1880
|
+
},
|
|
1881
|
+
__wbg_process_b2fea42461d03994: function(arg0) {
|
|
1882
|
+
const ret = getObject(arg0).process;
|
|
1883
|
+
return addHeapObject(ret);
|
|
1884
|
+
},
|
|
1885
|
+
__wbg_prototypesetcall_3249fc62a0fafa30: function(arg0, arg1, arg2) {
|
|
1886
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1887
|
+
},
|
|
1888
|
+
__wbg_push_a6822215aa43e71c: function(arg0, arg1) {
|
|
1889
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
2517
1890
|
return ret;
|
|
2518
|
-
},
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
1891
|
+
},
|
|
1892
|
+
__wbg_queueMicrotask_35c611f4a14830b2: function(arg0) {
|
|
1893
|
+
queueMicrotask(getObject(arg0));
|
|
1894
|
+
},
|
|
1895
|
+
__wbg_queueMicrotask_404ed0a58e0b63cc: function(arg0) {
|
|
1896
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
1897
|
+
return addHeapObject(ret);
|
|
1898
|
+
},
|
|
1899
|
+
__wbg_queue_8cb065d04b06cb13: function(arg0) {
|
|
1900
|
+
const ret = getObject(arg0).queue;
|
|
1901
|
+
return addHeapObject(ret);
|
|
1902
|
+
},
|
|
1903
|
+
__wbg_randomFillSync_ca9f178fb14c88cb: function() {
|
|
1904
|
+
return handleError(function(arg0, arg1) {
|
|
1905
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1906
|
+
}, arguments);
|
|
1907
|
+
},
|
|
1908
|
+
__wbg_requestAdapter_4814cb479d2dcf15: function(arg0, arg1) {
|
|
1909
|
+
const ret = getObject(arg0).requestAdapter(getObject(arg1));
|
|
1910
|
+
return addHeapObject(ret);
|
|
1911
|
+
},
|
|
1912
|
+
__wbg_requestDevice_1b8f321791aa8b00: function(arg0, arg1) {
|
|
1913
|
+
const ret = getObject(arg0).requestDevice(getObject(arg1));
|
|
1914
|
+
return addHeapObject(ret);
|
|
1915
|
+
},
|
|
1916
|
+
__wbg_require_7a9419e39d796c95: function() {
|
|
1917
|
+
return handleError(function() {
|
|
1918
|
+
const ret = module.require;
|
|
1919
|
+
return addHeapObject(ret);
|
|
1920
|
+
}, arguments);
|
|
1921
|
+
},
|
|
1922
|
+
__wbg_resolve_25a7e548d5881dca: function(arg0) {
|
|
1923
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1924
|
+
return addHeapObject(ret);
|
|
1925
|
+
},
|
|
1926
|
+
__wbg_responseText_266ec252b6be1e56: function() {
|
|
1927
|
+
return handleError(function(arg0, arg1) {
|
|
1928
|
+
const ret = getObject(arg1).responseText;
|
|
1929
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1930
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1931
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1932
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1933
|
+
}, arguments);
|
|
1934
|
+
},
|
|
1935
|
+
__wbg_response_8ec82c168e320475: function() {
|
|
1936
|
+
return handleError(function(arg0) {
|
|
1937
|
+
const ret = getObject(arg0).response;
|
|
1938
|
+
return addHeapObject(ret);
|
|
1939
|
+
}, arguments);
|
|
1940
|
+
},
|
|
1941
|
+
__wbg_send_dce79f146638dfda: function() {
|
|
1942
|
+
return handleError(function(arg0) {
|
|
1943
|
+
getObject(arg0).send();
|
|
1944
|
+
}, arguments);
|
|
1945
|
+
},
|
|
1946
|
+
__wbg_setBindGroup_67bd9a0c57486387: function() {
|
|
1947
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1948
|
+
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2), getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
|
|
1949
|
+
}, arguments);
|
|
1950
|
+
},
|
|
1951
|
+
__wbg_setBindGroup_a2a4442ac2a0be99: function(arg0, arg1, arg2) {
|
|
1952
|
+
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2));
|
|
1953
|
+
},
|
|
1954
|
+
__wbg_setPipeline_50cfc53a5d0eb1d7: function(arg0, arg1) {
|
|
1955
|
+
getObject(arg0).setPipeline(getObject(arg1));
|
|
1956
|
+
},
|
|
1957
|
+
__wbg_set_25ef40a9aeff260d: function() {
|
|
1958
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1959
|
+
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1960
|
+
}, arguments);
|
|
1961
|
+
},
|
|
1962
|
+
__wbg_set_52b1e1eb5bed906a: function(arg0, arg1, arg2) {
|
|
1963
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1964
|
+
return addHeapObject(ret);
|
|
1965
|
+
},
|
|
1966
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1967
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1968
|
+
},
|
|
1969
|
+
__wbg_set_6e30c9374c26414c: function() {
|
|
1970
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1971
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1972
|
+
return ret;
|
|
1973
|
+
}, arguments);
|
|
1974
|
+
},
|
|
1975
|
+
__wbg_set_access_67a4b0ae1c0f32f5: function(arg0, arg1) {
|
|
1976
|
+
getObject(arg0).access = __wbindgen_enum_GpuStorageTextureAccess[arg1];
|
|
1977
|
+
},
|
|
1978
|
+
__wbg_set_array_layer_count_c2e975f5b62596bb: function(arg0, arg1) {
|
|
1979
|
+
getObject(arg0).arrayLayerCount = arg1 >>> 0;
|
|
1980
|
+
},
|
|
1981
|
+
__wbg_set_aspect_a453970e75d8e849: function(arg0, arg1) {
|
|
1982
|
+
getObject(arg0).aspect = __wbindgen_enum_GpuTextureAspect[arg1];
|
|
1983
|
+
},
|
|
1984
|
+
__wbg_set_base_array_layer_b67db9750fbc7053: function(arg0, arg1) {
|
|
1985
|
+
getObject(arg0).baseArrayLayer = arg1 >>> 0;
|
|
1986
|
+
},
|
|
1987
|
+
__wbg_set_base_mip_level_35f2fc3293e96083: function(arg0, arg1) {
|
|
1988
|
+
getObject(arg0).baseMipLevel = arg1 >>> 0;
|
|
1989
|
+
},
|
|
1990
|
+
__wbg_set_beginning_of_pass_write_index_ddfc55f615254cc1: function(arg0, arg1) {
|
|
1991
|
+
getObject(arg0).beginningOfPassWriteIndex = arg1 >>> 0;
|
|
1992
|
+
},
|
|
1993
|
+
__wbg_set_bind_group_layouts_436bd62a9b35e1ab: function(arg0, arg1) {
|
|
1994
|
+
getObject(arg0).bindGroupLayouts = getObject(arg1);
|
|
1995
|
+
},
|
|
1996
|
+
__wbg_set_binding_b575483e08d5ba4a: function(arg0, arg1) {
|
|
1997
|
+
getObject(arg0).binding = arg1 >>> 0;
|
|
1998
|
+
},
|
|
1999
|
+
__wbg_set_binding_c9feebb53a130ebe: function(arg0, arg1) {
|
|
2000
|
+
getObject(arg0).binding = arg1 >>> 0;
|
|
2001
|
+
},
|
|
2002
|
+
__wbg_set_body_36614c7e61546809: function(arg0, arg1) {
|
|
2003
|
+
getObject(arg0).body = getObject(arg1);
|
|
2004
|
+
},
|
|
2005
|
+
__wbg_set_buffer_468874ee2bc9df02: function(arg0, arg1) {
|
|
2006
|
+
getObject(arg0).buffer = getObject(arg1);
|
|
2007
|
+
},
|
|
2008
|
+
__wbg_set_buffer_6c45652fb024e808: function(arg0, arg1) {
|
|
2009
|
+
getObject(arg0).buffer = getObject(arg1);
|
|
2010
|
+
},
|
|
2011
|
+
__wbg_set_buffer_83041e80a2b2c1b9: function(arg0, arg1) {
|
|
2012
|
+
getObject(arg0).buffer = getObject(arg1);
|
|
2013
|
+
},
|
|
2014
|
+
__wbg_set_bytes_per_row_c127092e4fe9be22: function(arg0, arg1) {
|
|
2015
|
+
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2016
|
+
},
|
|
2017
|
+
__wbg_set_bytes_per_row_fecf7d0d8d5038d0: function(arg0, arg1) {
|
|
2018
|
+
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2019
|
+
},
|
|
2020
|
+
__wbg_set_c775d84916be79ea: function(arg0, arg1, arg2) {
|
|
2021
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
2022
|
+
},
|
|
2023
|
+
__wbg_set_code_0a82fa86cf58ca3b: function(arg0, arg1, arg2) {
|
|
2024
|
+
getObject(arg0).code = getStringFromWasm0(arg1, arg2);
|
|
2025
|
+
},
|
|
2026
|
+
__wbg_set_compute_dc74d722ba27aa5b: function(arg0, arg1) {
|
|
2027
|
+
getObject(arg0).compute = getObject(arg1);
|
|
2028
|
+
},
|
|
2029
|
+
__wbg_set_dca99999bba88a9a: function(arg0, arg1, arg2) {
|
|
2030
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2031
|
+
},
|
|
2032
|
+
__wbg_set_depth_or_array_layers_17284e1eac0007a1: function(arg0, arg1) {
|
|
2033
|
+
getObject(arg0).depthOrArrayLayers = arg1 >>> 0;
|
|
2034
|
+
},
|
|
2035
|
+
__wbg_set_dimension_3144c827eb67b110: function(arg0, arg1) {
|
|
2036
|
+
getObject(arg0).dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2037
|
+
},
|
|
2038
|
+
__wbg_set_dimension_9054f7ab0acbfd31: function(arg0, arg1) {
|
|
2039
|
+
getObject(arg0).dimension = __wbindgen_enum_GpuTextureDimension[arg1];
|
|
2040
|
+
},
|
|
2041
|
+
__wbg_set_end_of_pass_write_index_786588764311c9aa: function(arg0, arg1) {
|
|
2042
|
+
getObject(arg0).endOfPassWriteIndex = arg1 >>> 0;
|
|
2043
|
+
},
|
|
2044
|
+
__wbg_set_entries_247b5e665db79583: function(arg0, arg1) {
|
|
2045
|
+
getObject(arg0).entries = getObject(arg1);
|
|
2046
|
+
},
|
|
2047
|
+
__wbg_set_entries_bfbb6a7f04b96709: function(arg0, arg1) {
|
|
2048
|
+
getObject(arg0).entries = getObject(arg1);
|
|
2049
|
+
},
|
|
2050
|
+
__wbg_set_entry_point_3b13db51cfe0c5d6: function(arg0, arg1, arg2) {
|
|
2051
|
+
getObject(arg0).entryPoint = getStringFromWasm0(arg1, arg2);
|
|
2052
|
+
},
|
|
2053
|
+
__wbg_set_external_texture_a0db2eb13c76e01c: function(arg0, arg1) {
|
|
2054
|
+
getObject(arg0).externalTexture = getObject(arg1);
|
|
2055
|
+
},
|
|
2056
|
+
__wbg_set_format_237b3e4047d1be9a: function(arg0, arg1) {
|
|
2057
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2058
|
+
},
|
|
2059
|
+
__wbg_set_format_c9dcecebf9c1e619: function(arg0, arg1) {
|
|
2060
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2061
|
+
},
|
|
2062
|
+
__wbg_set_format_d9d3420c1a9d1c59: function(arg0, arg1) {
|
|
2063
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2064
|
+
},
|
|
2065
|
+
__wbg_set_has_dynamic_offset_0c8a607543be8069: function(arg0, arg1) {
|
|
2066
|
+
getObject(arg0).hasDynamicOffset = arg1 !== 0;
|
|
2067
|
+
},
|
|
2068
|
+
__wbg_set_headers_7c1e39ece7826bec: function(arg0, arg1) {
|
|
2069
|
+
getObject(arg0).headers = getObject(arg1);
|
|
2070
|
+
},
|
|
2071
|
+
__wbg_set_height_96611e96eee67c44: function(arg0, arg1) {
|
|
2072
|
+
getObject(arg0).height = arg1 >>> 0;
|
|
2073
|
+
},
|
|
2074
|
+
__wbg_set_label_01228663ea03b92f: function(arg0, arg1, arg2) {
|
|
2075
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2076
|
+
},
|
|
2077
|
+
__wbg_set_label_22e57f4c5b38215f: function(arg0, arg1, arg2) {
|
|
2078
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2079
|
+
},
|
|
2080
|
+
__wbg_set_label_382417d222111912: function(arg0, arg1, arg2) {
|
|
2081
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2082
|
+
},
|
|
2083
|
+
__wbg_set_label_4d049edb707ba31c: function(arg0, arg1, arg2) {
|
|
2084
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2085
|
+
},
|
|
2086
|
+
__wbg_set_label_66fc1d23dd10d4f5: function(arg0, arg1, arg2) {
|
|
2087
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2088
|
+
},
|
|
2089
|
+
__wbg_set_label_806446f85d68e201: function(arg0, arg1, arg2) {
|
|
2090
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2091
|
+
},
|
|
2092
|
+
__wbg_set_label_8354c6463558484f: function(arg0, arg1, arg2) {
|
|
2093
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2094
|
+
},
|
|
2095
|
+
__wbg_set_label_b3da7636c69f1a4c: function(arg0, arg1, arg2) {
|
|
2096
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2097
|
+
},
|
|
2098
|
+
__wbg_set_label_b7f797c13bc822c4: function(arg0, arg1, arg2) {
|
|
2099
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2100
|
+
},
|
|
2101
|
+
__wbg_set_label_e026aa2aea731594: function(arg0, arg1, arg2) {
|
|
2102
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2103
|
+
},
|
|
2104
|
+
__wbg_set_label_e6bc3b86ef6deeb8: function(arg0, arg1, arg2) {
|
|
2105
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2106
|
+
},
|
|
2107
|
+
__wbg_set_label_e7f76bba99d72971: function(arg0, arg1, arg2) {
|
|
2108
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2109
|
+
},
|
|
2110
|
+
__wbg_set_layout_44943c4c7d78f826: function(arg0, arg1) {
|
|
2111
|
+
getObject(arg0).layout = getObject(arg1);
|
|
2112
|
+
},
|
|
2113
|
+
__wbg_set_layout_726c6ae6f5919730: function(arg0, arg1) {
|
|
2114
|
+
getObject(arg0).layout = getObject(arg1);
|
|
2115
|
+
},
|
|
2116
|
+
__wbg_set_mapped_at_creation_12773dff1bb6ea0f: function(arg0, arg1) {
|
|
2117
|
+
getObject(arg0).mappedAtCreation = arg1 !== 0;
|
|
2118
|
+
},
|
|
2119
|
+
__wbg_set_method_7a6811dec7a4feff: function(arg0, arg1, arg2) {
|
|
2120
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
2121
|
+
},
|
|
2122
|
+
__wbg_set_min_binding_size_164df827e02821e1: function(arg0, arg1) {
|
|
2123
|
+
getObject(arg0).minBindingSize = arg1;
|
|
2124
|
+
},
|
|
2125
|
+
__wbg_set_mip_level_7f56c1c607dda5cf: function(arg0, arg1) {
|
|
2126
|
+
getObject(arg0).mipLevel = arg1 >>> 0;
|
|
2127
|
+
},
|
|
2128
|
+
__wbg_set_mip_level_count_3402f5315a423b69: function(arg0, arg1) {
|
|
2129
|
+
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2130
|
+
},
|
|
2131
|
+
__wbg_set_mip_level_count_ed029120a0ee12b8: function(arg0, arg1) {
|
|
2132
|
+
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2133
|
+
},
|
|
2134
|
+
__wbg_set_module_af2f871a0bed003c: function(arg0, arg1) {
|
|
2135
|
+
getObject(arg0).module = getObject(arg1);
|
|
2136
|
+
},
|
|
2137
|
+
__wbg_set_multisampled_e9d7bed0e68d1d6f: function(arg0, arg1) {
|
|
2138
|
+
getObject(arg0).multisampled = arg1 !== 0;
|
|
2139
|
+
},
|
|
2140
|
+
__wbg_set_offset_01c04218a4ccfa08: function(arg0, arg1) {
|
|
2141
|
+
getObject(arg0).offset = arg1;
|
|
2142
|
+
},
|
|
2143
|
+
__wbg_set_offset_bd11f79890456c6f: function(arg0, arg1) {
|
|
2144
|
+
getObject(arg0).offset = arg1;
|
|
2145
|
+
},
|
|
2146
|
+
__wbg_set_offset_f07a73165707eb4c: function(arg0, arg1) {
|
|
2147
|
+
getObject(arg0).offset = arg1;
|
|
2148
|
+
},
|
|
2149
|
+
__wbg_set_origin_6be40076fb0623f4: function(arg0, arg1) {
|
|
2150
|
+
getObject(arg0).origin = getObject(arg1);
|
|
2151
|
+
},
|
|
2152
|
+
__wbg_set_power_preference_0721cf46746c0c7d: function(arg0, arg1) {
|
|
2153
|
+
getObject(arg0).powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
|
|
2154
|
+
},
|
|
2155
|
+
__wbg_set_query_set_aadbb433c8390a5c: function(arg0, arg1) {
|
|
2156
|
+
getObject(arg0).querySet = getObject(arg1);
|
|
2157
|
+
},
|
|
2158
|
+
__wbg_set_required_features_5202fa8cd082e531: function(arg0, arg1) {
|
|
2159
|
+
getObject(arg0).requiredFeatures = getObject(arg1);
|
|
2160
|
+
},
|
|
2161
|
+
__wbg_set_resource_c73d0c2d815f7211: function(arg0, arg1) {
|
|
2162
|
+
getObject(arg0).resource = getObject(arg1);
|
|
2163
|
+
},
|
|
2164
|
+
__wbg_set_responseType_cfb49ea8269f8317: function(arg0, arg1) {
|
|
2165
|
+
getObject(arg0).responseType = __wbindgen_enum_XmlHttpRequestResponseType[arg1];
|
|
2166
|
+
},
|
|
2167
|
+
__wbg_set_rows_per_image_00c8e938dae40dae: function(arg0, arg1) {
|
|
2168
|
+
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2169
|
+
},
|
|
2170
|
+
__wbg_set_rows_per_image_e6e2c0c4a7e4fa8d: function(arg0, arg1) {
|
|
2171
|
+
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2172
|
+
},
|
|
2173
|
+
__wbg_set_sample_count_05dcc9952f4fa7ac: function(arg0, arg1) {
|
|
2174
|
+
getObject(arg0).sampleCount = arg1 >>> 0;
|
|
2175
|
+
},
|
|
2176
|
+
__wbg_set_sample_type_93886b8f9794f85c: function(arg0, arg1) {
|
|
2177
|
+
getObject(arg0).sampleType = __wbindgen_enum_GpuTextureSampleType[arg1];
|
|
2178
|
+
},
|
|
2179
|
+
__wbg_set_sampler_02989e99b27a50db: function(arg0, arg1) {
|
|
2180
|
+
getObject(arg0).sampler = getObject(arg1);
|
|
2181
|
+
},
|
|
2182
|
+
__wbg_set_size_b3e6b2bf58d62082: function(arg0, arg1) {
|
|
2183
|
+
getObject(arg0).size = getObject(arg1);
|
|
2184
|
+
},
|
|
2185
|
+
__wbg_set_size_c2a556d5571231f5: function(arg0, arg1) {
|
|
2186
|
+
getObject(arg0).size = arg1;
|
|
2187
|
+
},
|
|
2188
|
+
__wbg_set_size_f7b29f6cb1669c4d: function(arg0, arg1) {
|
|
2189
|
+
getObject(arg0).size = arg1;
|
|
2190
|
+
},
|
|
2191
|
+
__wbg_set_storage_texture_50af47fec531be02: function(arg0, arg1) {
|
|
2192
|
+
getObject(arg0).storageTexture = getObject(arg1);
|
|
2193
|
+
},
|
|
2194
|
+
__wbg_set_texture_884f2777c0fe1e91: function(arg0, arg1) {
|
|
2195
|
+
getObject(arg0).texture = getObject(arg1);
|
|
2196
|
+
},
|
|
2197
|
+
__wbg_set_texture_a1baf7da91d20351: function(arg0, arg1) {
|
|
2198
|
+
getObject(arg0).texture = getObject(arg1);
|
|
2199
|
+
},
|
|
2200
|
+
__wbg_set_timestamp_writes_7fa18118aa24ddc1: function(arg0, arg1) {
|
|
2201
|
+
getObject(arg0).timestampWrites = getObject(arg1);
|
|
2202
|
+
},
|
|
2203
|
+
__wbg_set_type_109702a7ec65b49d: function(arg0, arg1) {
|
|
2204
|
+
getObject(arg0).type = __wbindgen_enum_GpuSamplerBindingType[arg1];
|
|
2205
|
+
},
|
|
2206
|
+
__wbg_set_type_55112c374bcc5a9d: function(arg0, arg1) {
|
|
2207
|
+
getObject(arg0).type = __wbindgen_enum_GpuBufferBindingType[arg1];
|
|
2208
|
+
},
|
|
2209
|
+
__wbg_set_usage_ac04cadda4108c1a: function(arg0, arg1) {
|
|
2210
|
+
getObject(arg0).usage = arg1 >>> 0;
|
|
2211
|
+
},
|
|
2212
|
+
__wbg_set_usage_ad30cd3b0e0f4244: function(arg0, arg1) {
|
|
2213
|
+
getObject(arg0).usage = arg1 >>> 0;
|
|
2214
|
+
},
|
|
2215
|
+
__wbg_set_usage_cc34543608cf3335: function(arg0, arg1) {
|
|
2216
|
+
getObject(arg0).usage = arg1 >>> 0;
|
|
2217
|
+
},
|
|
2218
|
+
__wbg_set_view_dimension_50f3edb06107948f: function(arg0, arg1) {
|
|
2219
|
+
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2220
|
+
},
|
|
2221
|
+
__wbg_set_view_dimension_925bb358df1f2b9d: function(arg0, arg1) {
|
|
2222
|
+
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2223
|
+
},
|
|
2224
|
+
__wbg_set_view_formats_3d2a72ffb1f55a75: function(arg0, arg1) {
|
|
2225
|
+
getObject(arg0).viewFormats = getObject(arg1);
|
|
2226
|
+
},
|
|
2227
|
+
__wbg_set_visibility_bdebc70a7c0f236d: function(arg0, arg1) {
|
|
2228
|
+
getObject(arg0).visibility = arg1 >>> 0;
|
|
2229
|
+
},
|
|
2230
|
+
__wbg_set_width_40592253da7b2113: function(arg0, arg1) {
|
|
2231
|
+
getObject(arg0).width = arg1 >>> 0;
|
|
2232
|
+
},
|
|
2233
|
+
__wbg_set_x_3c1cb8191b848172: function(arg0, arg1) {
|
|
2234
|
+
getObject(arg0).x = arg1 >>> 0;
|
|
2235
|
+
},
|
|
2236
|
+
__wbg_set_y_9024331910317eff: function(arg0, arg1) {
|
|
2237
|
+
getObject(arg0).y = arg1 >>> 0;
|
|
2238
|
+
},
|
|
2239
|
+
__wbg_set_z_b6182f4c230116a7: function(arg0, arg1) {
|
|
2240
|
+
getObject(arg0).z = arg1 >>> 0;
|
|
2241
|
+
},
|
|
2242
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
2243
|
+
const ret = getObject(arg1).stack;
|
|
2244
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2245
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2246
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2247
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2248
|
+
},
|
|
2249
|
+
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
2250
|
+
const ret = typeof global === "undefined" ? null : global;
|
|
2251
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2252
|
+
},
|
|
2253
|
+
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
2254
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
2255
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2256
|
+
},
|
|
2257
|
+
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
2258
|
+
const ret = typeof self === "undefined" ? null : self;
|
|
2259
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2260
|
+
},
|
|
2261
|
+
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
2262
|
+
const ret = typeof window === "undefined" ? null : window;
|
|
2263
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2264
|
+
},
|
|
2265
|
+
__wbg_status_214edd0820ca76fc: function() {
|
|
2266
|
+
return handleError(function(arg0) {
|
|
2267
|
+
const ret = getObject(arg0).status;
|
|
2268
|
+
return ret;
|
|
2269
|
+
}, arguments);
|
|
2270
|
+
},
|
|
2271
|
+
__wbg_subarray_4aa221f6a4f5ab22: function(arg0, arg1, arg2) {
|
|
2272
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2273
|
+
return addHeapObject(ret);
|
|
2274
|
+
},
|
|
2275
|
+
__wbg_submit_fc5b9a1154201a58: function(arg0, arg1) {
|
|
2276
|
+
getObject(arg0).submit(getObject(arg1));
|
|
2277
|
+
},
|
|
2278
|
+
__wbg_then_18f476d590e58992: function(arg0, arg1, arg2) {
|
|
2279
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
2280
|
+
return addHeapObject(ret);
|
|
2281
|
+
},
|
|
2282
|
+
__wbg_then_529ea37d9bdbf95d: function(arg0, arg1, arg2) {
|
|
2283
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
2284
|
+
return addHeapObject(ret);
|
|
2285
|
+
},
|
|
2286
|
+
__wbg_then_ac7b025999b52837: function(arg0, arg1) {
|
|
2287
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
2288
|
+
return addHeapObject(ret);
|
|
2289
|
+
},
|
|
2290
|
+
__wbg_toISOString_d485be0388a74494: function(arg0) {
|
|
2291
|
+
const ret = getObject(arg0).toISOString();
|
|
2292
|
+
return addHeapObject(ret);
|
|
2293
|
+
},
|
|
2294
|
+
__wbg_value_f3625092ee4b37f4: function(arg0) {
|
|
2295
|
+
const ret = getObject(arg0).value;
|
|
2296
|
+
return addHeapObject(ret);
|
|
2297
|
+
},
|
|
2298
|
+
__wbg_versions_215a3ab1c9d5745a: function(arg0) {
|
|
2299
|
+
const ret = getObject(arg0).versions;
|
|
2300
|
+
return addHeapObject(ret);
|
|
2301
|
+
},
|
|
2302
|
+
__wbg_warn_410c3261e3c6d686: function(arg0) {
|
|
2303
|
+
console.warn(getObject(arg0));
|
|
2304
|
+
},
|
|
2305
|
+
__wbg_writeBuffer_7d54524c36f1c7e2: function() {
|
|
2306
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2307
|
+
getObject(arg0).writeBuffer(getObject(arg1), arg2, getObject(arg3), arg4, arg5);
|
|
2308
|
+
}, arguments);
|
|
2309
|
+
},
|
|
2310
|
+
__wbg_writeTexture_9d4c493be748d189: function() {
|
|
2311
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
2312
|
+
getObject(arg0).writeTexture(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
|
|
2313
|
+
}, arguments);
|
|
2314
|
+
},
|
|
2315
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2316
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_22721);
|
|
2317
|
+
return addHeapObject(ret);
|
|
2318
|
+
},
|
|
2319
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2320
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3565);
|
|
2321
|
+
return addHeapObject(ret);
|
|
2322
|
+
},
|
|
2323
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
2324
|
+
const ret = arg0;
|
|
2325
|
+
return addHeapObject(ret);
|
|
2326
|
+
},
|
|
2327
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
2328
|
+
const ret = arg0;
|
|
2329
|
+
return addHeapObject(ret);
|
|
2330
|
+
},
|
|
2331
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
2332
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2333
|
+
return addHeapObject(ret);
|
|
2334
|
+
},
|
|
2335
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
2336
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2337
|
+
return addHeapObject(ret);
|
|
2338
|
+
},
|
|
2339
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
2340
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2341
|
+
return addHeapObject(ret);
|
|
2342
|
+
},
|
|
2343
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
2344
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
2345
|
+
wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
|
|
2346
|
+
const ret = v0;
|
|
2347
|
+
return addHeapObject(ret);
|
|
2348
|
+
},
|
|
2349
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
2350
|
+
const ret = getObject(arg0);
|
|
2351
|
+
return addHeapObject(ret);
|
|
2352
|
+
},
|
|
2353
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
2354
|
+
takeObject(arg0);
|
|
2355
|
+
}
|
|
2581
2356
|
};
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2357
|
+
return {
|
|
2358
|
+
__proto__: null,
|
|
2359
|
+
"./udoc_bg.js": import0
|
|
2585
2360
|
};
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2361
|
+
}
|
|
2362
|
+
function __wasm_bindgen_func_elem_3565(arg0, arg1, arg2) {
|
|
2363
|
+
wasm.__wasm_bindgen_func_elem_3565(arg0, arg1, addHeapObject(arg2));
|
|
2364
|
+
}
|
|
2365
|
+
function __wasm_bindgen_func_elem_22721(arg0, arg1, arg2) {
|
|
2366
|
+
try {
|
|
2367
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2368
|
+
wasm.__wasm_bindgen_func_elem_22721(retptr, arg0, arg1, addHeapObject(arg2));
|
|
2369
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2370
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2371
|
+
if (r1) {
|
|
2372
|
+
throw takeObject(r0);
|
|
2373
|
+
}
|
|
2374
|
+
} finally {
|
|
2375
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
function __wasm_bindgen_func_elem_22734(arg0, arg1, arg2, arg3) {
|
|
2379
|
+
wasm.__wasm_bindgen_func_elem_22734(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2380
|
+
}
|
|
2381
|
+
var __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
|
|
2382
|
+
var __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
|
|
2383
|
+
var __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
|
|
2384
|
+
var __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
|
|
2385
|
+
var __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
|
|
2386
|
+
var __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
|
|
2387
|
+
var __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
|
|
2388
|
+
var __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "depth", "sint", "uint"];
|
|
2389
|
+
var __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
|
|
2390
|
+
var __wbindgen_enum_XmlHttpRequestResponseType = ["", "arraybuffer", "blob", "document", "json", "text"];
|
|
2391
|
+
var WasmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2392
|
+
}, unregister: () => {
|
|
2393
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_wasm_free(ptr, 1));
|
|
2394
|
+
function addHeapObject(obj) {
|
|
2395
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
2396
|
+
const idx = heap_next;
|
|
2397
|
+
heap_next = heap[idx];
|
|
2398
|
+
heap[idx] = obj;
|
|
2399
|
+
return idx;
|
|
2400
|
+
}
|
|
2401
|
+
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2402
|
+
}, unregister: () => {
|
|
2403
|
+
} } : new FinalizationRegistry((state) => wasm.__wbindgen_export5(state.a, state.b));
|
|
2404
|
+
function debugString(val) {
|
|
2405
|
+
const type = typeof val;
|
|
2406
|
+
if (type == "number" || type == "boolean" || val == null) {
|
|
2407
|
+
return `${val}`;
|
|
2408
|
+
}
|
|
2409
|
+
if (type == "string") {
|
|
2410
|
+
return `"${val}"`;
|
|
2411
|
+
}
|
|
2412
|
+
if (type == "symbol") {
|
|
2413
|
+
const description = val.description;
|
|
2414
|
+
if (description == null) {
|
|
2415
|
+
return "Symbol";
|
|
2416
|
+
} else {
|
|
2417
|
+
return `Symbol(${description})`;
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
if (type == "function") {
|
|
2421
|
+
const name = val.name;
|
|
2422
|
+
if (typeof name == "string" && name.length > 0) {
|
|
2423
|
+
return `Function(${name})`;
|
|
2424
|
+
} else {
|
|
2425
|
+
return "Function";
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
if (Array.isArray(val)) {
|
|
2429
|
+
const length = val.length;
|
|
2430
|
+
let debug = "[";
|
|
2431
|
+
if (length > 0) {
|
|
2432
|
+
debug += debugString(val[0]);
|
|
2433
|
+
}
|
|
2434
|
+
for (let i = 1; i < length; i++) {
|
|
2435
|
+
debug += ", " + debugString(val[i]);
|
|
2436
|
+
}
|
|
2437
|
+
debug += "]";
|
|
2438
|
+
return debug;
|
|
2439
|
+
}
|
|
2440
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
2441
|
+
let className;
|
|
2442
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
2443
|
+
className = builtInMatches[1];
|
|
2444
|
+
} else {
|
|
2445
|
+
return toString.call(val);
|
|
2446
|
+
}
|
|
2447
|
+
if (className == "Object") {
|
|
2448
|
+
try {
|
|
2449
|
+
return "Object(" + JSON.stringify(val) + ")";
|
|
2450
|
+
} catch (_) {
|
|
2451
|
+
return "Object";
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
if (val instanceof Error) {
|
|
2455
|
+
return `${val.name}: ${val.message}
|
|
2456
|
+
${val.stack}`;
|
|
2457
|
+
}
|
|
2458
|
+
return className;
|
|
2459
|
+
}
|
|
2460
|
+
function dropObject(idx) {
|
|
2461
|
+
if (idx < 1028) return;
|
|
2462
|
+
heap[idx] = heap_next;
|
|
2463
|
+
heap_next = idx;
|
|
2464
|
+
}
|
|
2465
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
2466
|
+
ptr = ptr >>> 0;
|
|
2467
|
+
const mem = getDataViewMemory0();
|
|
2468
|
+
const result = [];
|
|
2469
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
2470
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
2471
|
+
}
|
|
2472
|
+
return result;
|
|
2473
|
+
}
|
|
2474
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
2475
|
+
ptr = ptr >>> 0;
|
|
2476
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
2477
|
+
}
|
|
2478
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
2479
|
+
ptr = ptr >>> 0;
|
|
2480
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
2481
|
+
}
|
|
2482
|
+
var cachedDataViewMemory0 = null;
|
|
2483
|
+
function getDataViewMemory0() {
|
|
2484
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
2485
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
2486
|
+
}
|
|
2487
|
+
return cachedDataViewMemory0;
|
|
2488
|
+
}
|
|
2489
|
+
function getStringFromWasm0(ptr, len) {
|
|
2490
|
+
return decodeText(ptr >>> 0, len);
|
|
2491
|
+
}
|
|
2492
|
+
var cachedUint32ArrayMemory0 = null;
|
|
2493
|
+
function getUint32ArrayMemory0() {
|
|
2494
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
2495
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
2496
|
+
}
|
|
2497
|
+
return cachedUint32ArrayMemory0;
|
|
2498
|
+
}
|
|
2499
|
+
var cachedUint8ArrayMemory0 = null;
|
|
2500
|
+
function getUint8ArrayMemory0() {
|
|
2501
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2502
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2503
|
+
}
|
|
2504
|
+
return cachedUint8ArrayMemory0;
|
|
2505
|
+
}
|
|
2506
|
+
function getObject(idx) {
|
|
2507
|
+
return heap[idx];
|
|
2508
|
+
}
|
|
2509
|
+
function handleError(f, args) {
|
|
2510
|
+
try {
|
|
2511
|
+
return f.apply(this, args);
|
|
2512
|
+
} catch (e) {
|
|
2513
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
var heap = new Array(1024).fill(void 0);
|
|
2517
|
+
heap.push(void 0, null, true, false);
|
|
2518
|
+
var heap_next = heap.length;
|
|
2519
|
+
function isLikeNone(x) {
|
|
2520
|
+
return x === void 0 || x === null;
|
|
2521
|
+
}
|
|
2522
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
2523
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
2524
|
+
const real = (...args) => {
|
|
2525
|
+
state.cnt++;
|
|
2526
|
+
const a = state.a;
|
|
2527
|
+
state.a = 0;
|
|
2528
|
+
try {
|
|
2529
|
+
return f(a, state.b, ...args);
|
|
2530
|
+
} finally {
|
|
2531
|
+
state.a = a;
|
|
2532
|
+
real._wbg_cb_unref();
|
|
2533
|
+
}
|
|
2589
2534
|
};
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2535
|
+
real._wbg_cb_unref = () => {
|
|
2536
|
+
if (--state.cnt === 0) {
|
|
2537
|
+
wasm.__wbindgen_export5(state.a, state.b);
|
|
2538
|
+
state.a = 0;
|
|
2539
|
+
CLOSURE_DTORS.unregister(state);
|
|
2540
|
+
}
|
|
2593
2541
|
};
|
|
2594
|
-
|
|
2595
|
-
|
|
2542
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2543
|
+
return real;
|
|
2544
|
+
}
|
|
2545
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
2546
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
2547
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
2548
|
+
WASM_VECTOR_LEN = arg.length;
|
|
2549
|
+
return ptr;
|
|
2550
|
+
}
|
|
2551
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2552
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2553
|
+
const mem = getDataViewMemory0();
|
|
2554
|
+
for (let i = 0; i < array.length; i++) {
|
|
2555
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
2556
|
+
}
|
|
2557
|
+
WASM_VECTOR_LEN = array.length;
|
|
2558
|
+
return ptr;
|
|
2559
|
+
}
|
|
2560
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2561
|
+
if (realloc === void 0) {
|
|
2562
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2563
|
+
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
2564
|
+
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
2565
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2566
|
+
return ptr2;
|
|
2567
|
+
}
|
|
2568
|
+
let len = arg.length;
|
|
2569
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2570
|
+
const mem = getUint8ArrayMemory0();
|
|
2571
|
+
let offset = 0;
|
|
2572
|
+
for (; offset < len; offset++) {
|
|
2573
|
+
const code = arg.charCodeAt(offset);
|
|
2574
|
+
if (code > 127) break;
|
|
2575
|
+
mem[ptr + offset] = code;
|
|
2576
|
+
}
|
|
2577
|
+
if (offset !== len) {
|
|
2578
|
+
if (offset !== 0) {
|
|
2579
|
+
arg = arg.slice(offset);
|
|
2580
|
+
}
|
|
2581
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2582
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2583
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2584
|
+
offset += ret.written;
|
|
2585
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2586
|
+
}
|
|
2587
|
+
WASM_VECTOR_LEN = offset;
|
|
2588
|
+
return ptr;
|
|
2589
|
+
}
|
|
2590
|
+
function takeObject(idx) {
|
|
2591
|
+
const ret = getObject(idx);
|
|
2592
|
+
dropObject(idx);
|
|
2593
|
+
return ret;
|
|
2594
|
+
}
|
|
2595
|
+
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
2596
|
+
cachedTextDecoder.decode();
|
|
2597
|
+
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2598
|
+
var numBytesDecoded = 0;
|
|
2599
|
+
function decodeText(ptr, len) {
|
|
2600
|
+
numBytesDecoded += len;
|
|
2601
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2602
|
+
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
2603
|
+
cachedTextDecoder.decode();
|
|
2604
|
+
numBytesDecoded = len;
|
|
2605
|
+
}
|
|
2606
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2607
|
+
}
|
|
2608
|
+
var cachedTextEncoder = new TextEncoder();
|
|
2609
|
+
if (!("encodeInto" in cachedTextEncoder)) {
|
|
2610
|
+
cachedTextEncoder.encodeInto = function(arg, view) {
|
|
2611
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2612
|
+
view.set(buf);
|
|
2613
|
+
return {
|
|
2614
|
+
read: arg.length,
|
|
2615
|
+
written: buf.length
|
|
2616
|
+
};
|
|
2596
2617
|
};
|
|
2597
|
-
return imports;
|
|
2598
2618
|
}
|
|
2619
|
+
var WASM_VECTOR_LEN = 0;
|
|
2620
|
+
var wasmModule;
|
|
2621
|
+
var wasmInstance;
|
|
2622
|
+
var wasm;
|
|
2599
2623
|
function __wbg_finalize_init(instance, module2) {
|
|
2624
|
+
wasmInstance = instance;
|
|
2600
2625
|
wasm = instance.exports;
|
|
2601
|
-
|
|
2626
|
+
wasmModule = module2;
|
|
2602
2627
|
cachedDataViewMemory0 = null;
|
|
2603
2628
|
cachedUint32ArrayMemory0 = null;
|
|
2604
2629
|
cachedUint8ArrayMemory0 = null;
|
|
2605
2630
|
return wasm;
|
|
2606
2631
|
}
|
|
2632
|
+
async function __wbg_load(module2, imports) {
|
|
2633
|
+
if (typeof Response === "function" && module2 instanceof Response) {
|
|
2634
|
+
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
2635
|
+
try {
|
|
2636
|
+
return await WebAssembly.instantiateStreaming(module2, imports);
|
|
2637
|
+
} catch (e) {
|
|
2638
|
+
const validResponse = module2.ok && expectedResponseType(module2.type);
|
|
2639
|
+
if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
|
|
2640
|
+
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);
|
|
2641
|
+
} else {
|
|
2642
|
+
throw e;
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
const bytes = await module2.arrayBuffer();
|
|
2647
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
2648
|
+
} else {
|
|
2649
|
+
const instance = await WebAssembly.instantiate(module2, imports);
|
|
2650
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
2651
|
+
return { instance, module: module2 };
|
|
2652
|
+
} else {
|
|
2653
|
+
return instance;
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
function expectedResponseType(type) {
|
|
2657
|
+
switch (type) {
|
|
2658
|
+
case "basic":
|
|
2659
|
+
case "cors":
|
|
2660
|
+
case "default":
|
|
2661
|
+
return true;
|
|
2662
|
+
}
|
|
2663
|
+
return false;
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2607
2666
|
async function __wbg_init(module_or_path) {
|
|
2608
2667
|
if (wasm !== void 0) return wasm;
|
|
2609
|
-
if (
|
|
2668
|
+
if (module_or_path !== void 0) {
|
|
2610
2669
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2611
2670
|
({ module_or_path } = module_or_path);
|
|
2612
2671
|
} else {
|
|
2613
2672
|
console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
2614
2673
|
}
|
|
2615
2674
|
}
|
|
2616
|
-
if (
|
|
2675
|
+
if (module_or_path === void 0) {
|
|
2617
2676
|
module_or_path = new URL("udoc_bg.wasm", "about:blank");
|
|
2618
2677
|
}
|
|
2619
2678
|
const imports = __wbg_get_imports();
|
|
@@ -2623,7 +2682,6 @@ ${val.stack}`;
|
|
|
2623
2682
|
const { instance, module: module2 } = await __wbg_load(await module_or_path, imports);
|
|
2624
2683
|
return __wbg_finalize_init(instance, module2);
|
|
2625
2684
|
}
|
|
2626
|
-
var udoc_default = __wbg_init;
|
|
2627
2685
|
|
|
2628
2686
|
// dist/src/worker/worker.js
|
|
2629
2687
|
var wasm2 = null;
|
|
@@ -2652,7 +2710,7 @@ ${val.stack}`;
|
|
|
2652
2710
|
try {
|
|
2653
2711
|
switch (request.type) {
|
|
2654
2712
|
case "init": {
|
|
2655
|
-
const exports = await
|
|
2713
|
+
const exports = await __wbg_init(request.wasmUrl ? { module_or_path: request.wasmUrl } : void 0);
|
|
2656
2714
|
wasmMemory = exports.memory ?? null;
|
|
2657
2715
|
wasm2 = new Wasm(request.domain, request.viewerVersion);
|
|
2658
2716
|
if (request.gpu) {
|