@senlinz/import-export-wasm 0.1.0-beta.9 → 0.1.1

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.
@@ -1,855 +1,2007 @@
1
- let wasm;
2
-
3
- const heap = new Array(128).fill(undefined);
4
-
5
- heap.push(undefined, null, true, false);
6
-
7
- function getObject(idx) { return heap[idx]; }
8
-
9
- let heap_next = heap.length;
10
-
11
- function dropObject(idx) {
12
- if (idx < 132) return;
13
- heap[idx] = heap_next;
14
- heap_next = idx;
15
- }
16
-
17
- function takeObject(idx) {
18
- const ret = getObject(idx);
19
- dropObject(idx);
20
- return ret;
21
- }
22
-
23
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
24
-
25
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
26
-
27
- let cachedUint8ArrayMemory0 = null;
28
-
29
- function getUint8ArrayMemory0() {
30
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
31
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
32
- }
33
- return cachedUint8ArrayMemory0;
34
- }
35
-
36
- function getStringFromWasm0(ptr, len) {
37
- ptr = ptr >>> 0;
38
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
39
- }
40
-
41
- function addHeapObject(obj) {
42
- if (heap_next === heap.length) heap.push(heap.length + 1);
43
- const idx = heap_next;
44
- heap_next = heap[idx];
45
-
46
- heap[idx] = obj;
47
- return idx;
48
- }
49
-
50
- let WASM_VECTOR_LEN = 0;
51
-
52
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
53
-
54
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
55
- ? function (arg, view) {
56
- return cachedTextEncoder.encodeInto(arg, view);
57
- }
58
- : function (arg, view) {
59
- const buf = cachedTextEncoder.encode(arg);
60
- view.set(buf);
61
- return {
62
- read: arg.length,
63
- written: buf.length
64
- };
65
- });
66
-
67
- function passStringToWasm0(arg, malloc, realloc) {
68
-
69
- if (realloc === undefined) {
70
- const buf = cachedTextEncoder.encode(arg);
71
- const ptr = malloc(buf.length, 1) >>> 0;
72
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
73
- WASM_VECTOR_LEN = buf.length;
74
- return ptr;
75
- }
76
-
77
- let len = arg.length;
78
- let ptr = malloc(len, 1) >>> 0;
79
-
80
- const mem = getUint8ArrayMemory0();
81
-
82
- let offset = 0;
83
-
84
- for (; offset < len; offset++) {
85
- const code = arg.charCodeAt(offset);
86
- if (code > 0x7F) break;
87
- mem[ptr + offset] = code;
88
- }
89
-
90
- if (offset !== len) {
91
- if (offset !== 0) {
92
- arg = arg.slice(offset);
93
- }
94
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
95
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
96
- const ret = encodeString(arg, view);
97
-
98
- offset += ret.written;
99
- ptr = realloc(ptr, len, offset, 1) >>> 0;
100
- }
101
-
102
- WASM_VECTOR_LEN = offset;
103
- return ptr;
104
- }
105
-
106
- function isLikeNone(x) {
107
- return x === undefined || x === null;
108
- }
109
-
110
- let cachedDataViewMemory0 = null;
111
-
112
- function getDataViewMemory0() {
113
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
114
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
115
- }
116
- return cachedDataViewMemory0;
117
- }
118
-
119
- function getArrayJsValueFromWasm0(ptr, len) {
120
- ptr = ptr >>> 0;
121
- const mem = getDataViewMemory0();
122
- const result = [];
123
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
124
- result.push(takeObject(mem.getUint32(i, true)));
125
- }
126
- return result;
127
- }
128
-
129
- function passArrayJsValueToWasm0(array, malloc) {
130
- const ptr = malloc(array.length * 4, 4) >>> 0;
131
- const mem = getDataViewMemory0();
132
- for (let i = 0; i < array.length; i++) {
133
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
134
- }
135
- WASM_VECTOR_LEN = array.length;
136
- return ptr;
137
- }
138
-
139
- function _assertClass(instance, klass) {
140
- if (!(instance instanceof klass)) {
141
- throw new Error(`expected instance of ${klass.name}`);
142
- }
143
- return instance.ptr;
144
- }
145
-
146
- function getArrayU8FromWasm0(ptr, len) {
147
- ptr = ptr >>> 0;
148
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
149
- }
150
- /**
151
- * @param {ExcelInfo} info
152
- * @returns {Uint8Array}
153
- */
154
- export function createTemplate(info) {
155
- try {
156
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
157
- _assertClass(info, ExcelInfo);
158
- var ptr0 = info.__destroy_into_raw();
159
- wasm.createTemplate(retptr, ptr0);
160
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
161
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
162
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
163
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
164
- if (r3) {
165
- throw takeObject(r2);
166
- }
167
- var v2 = getArrayU8FromWasm0(r0, r1).slice();
168
- wasm.__wbindgen_free(r0, r1 * 1, 1);
169
- return v2;
170
- } finally {
171
- wasm.__wbindgen_add_to_stack_pointer(16);
172
- }
173
- }
174
-
175
- function passArray8ToWasm0(arg, malloc) {
176
- const ptr = malloc(arg.length * 1, 1) >>> 0;
177
- getUint8ArrayMemory0().set(arg, ptr / 1);
178
- WASM_VECTOR_LEN = arg.length;
179
- return ptr;
180
- }
181
- /**
182
- * @param {ExcelInfo} info
183
- * @param {Uint8Array} excel_bytes
184
- * @returns {ExcelData}
185
- */
186
- export function importData(info, excel_bytes) {
187
- try {
188
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
189
- _assertClass(info, ExcelInfo);
190
- var ptr0 = info.__destroy_into_raw();
191
- const ptr1 = passArray8ToWasm0(excel_bytes, wasm.__wbindgen_malloc);
192
- const len1 = WASM_VECTOR_LEN;
193
- wasm.importData(retptr, ptr0, ptr1, len1);
194
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
195
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
196
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
197
- if (r2) {
198
- throw takeObject(r1);
199
- }
200
- return ExcelData.__wrap(r0);
201
- } finally {
202
- wasm.__wbindgen_add_to_stack_pointer(16);
203
- }
204
- }
205
-
206
- /**
207
- * @param {ExcelInfo} info
208
- * @param {ExcelData} data
209
- * @returns {Uint8Array}
210
- */
211
- export function exportData(info, data) {
212
- try {
213
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
214
- _assertClass(info, ExcelInfo);
215
- var ptr0 = info.__destroy_into_raw();
216
- _assertClass(data, ExcelData);
217
- var ptr1 = data.__destroy_into_raw();
218
- wasm.exportData(retptr, ptr0, ptr1);
219
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
220
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
221
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
222
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
223
- if (r3) {
224
- throw takeObject(r2);
225
- }
226
- var v3 = getArrayU8FromWasm0(r0, r1).slice();
227
- wasm.__wbindgen_free(r0, r1 * 1, 1);
228
- return v3;
229
- } finally {
230
- wasm.__wbindgen_add_to_stack_pointer(16);
231
- }
232
- }
233
-
234
- export const ExcelDataType = Object.freeze({ Text:0,"0":"Text",Number:1,"1":"Number", });
235
-
236
- const ExcelColumnDataFinalization = (typeof FinalizationRegistry === 'undefined')
237
- ? { register: () => {}, unregister: () => {} }
238
- : new FinalizationRegistry(ptr => wasm.__wbg_excelcolumndata_free(ptr >>> 0, 1));
239
-
240
- export class ExcelColumnData {
1
+ /* @ts-self-types="./imexport_wasm.d.ts" */
241
2
 
3
+ export class DynamicExcelData {
242
4
  static __wrap(ptr) {
243
5
  ptr = ptr >>> 0;
244
- const obj = Object.create(ExcelColumnData.prototype);
6
+ const obj = Object.create(DynamicExcelData.prototype);
245
7
  obj.__wbg_ptr = ptr;
246
- ExcelColumnDataFinalization.register(obj, obj.__wbg_ptr, obj);
8
+ DynamicExcelDataFinalization.register(obj, obj.__wbg_ptr, obj);
247
9
  return obj;
248
10
  }
249
-
250
- static __unwrap(jsValue) {
251
- if (!(jsValue instanceof ExcelColumnData)) {
252
- return 0;
253
- }
254
- return jsValue.__destroy_into_raw();
255
- }
256
-
257
11
  __destroy_into_raw() {
258
12
  const ptr = this.__wbg_ptr;
259
13
  this.__wbg_ptr = 0;
260
- ExcelColumnDataFinalization.unregister(this);
14
+ DynamicExcelDataFinalization.unregister(this);
261
15
  return ptr;
262
16
  }
263
-
264
17
  free() {
265
18
  const ptr = this.__destroy_into_raw();
266
- wasm.__wbg_excelcolumndata_free(ptr, 0);
19
+ wasm.__wbg_dynamicexceldata_free(ptr, 0);
267
20
  }
268
21
  /**
269
- * @returns {string}
22
+ * @param {string} sheet_name
23
+ * @param {string[]} headers
24
+ * @param {ExcelRowData[]} rows
270
25
  */
271
- get key() {
272
- let deferred1_0;
273
- let deferred1_1;
274
- try {
275
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
276
- wasm.__wbg_get_excelcolumndata_key(retptr, this.__wbg_ptr);
277
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
278
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
279
- deferred1_0 = r0;
280
- deferred1_1 = r1;
281
- return getStringFromWasm0(r0, r1);
282
- } finally {
283
- wasm.__wbindgen_add_to_stack_pointer(16);
284
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
285
- }
26
+ constructor(sheet_name, headers, rows) {
27
+ const ptr0 = passStringToWasm0(sheet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
28
+ const len0 = WASM_VECTOR_LEN;
29
+ const ptr1 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
30
+ const len1 = WASM_VECTOR_LEN;
31
+ const ptr2 = passArrayJsValueToWasm0(rows, wasm.__wbindgen_malloc);
32
+ const len2 = WASM_VECTOR_LEN;
33
+ const ret = wasm.dynamicexceldata_new(ptr0, len0, ptr1, len1, ptr2, len2);
34
+ this.__wbg_ptr = ret >>> 0;
35
+ DynamicExcelDataFinalization.register(this, this.__wbg_ptr, this);
36
+ return this;
286
37
  }
287
38
  /**
288
- * @param {string} arg0
39
+ * @returns {string[]}
289
40
  */
290
- set key(arg0) {
291
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
292
- const len0 = WASM_VECTOR_LEN;
293
- wasm.__wbg_set_excelcolumndata_key(this.__wbg_ptr, ptr0, len0);
41
+ get headers() {
42
+ const ret = wasm.__wbg_get_dynamicexceldata_headers(this.__wbg_ptr);
43
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
44
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
45
+ return v1;
46
+ }
47
+ /**
48
+ * @returns {ExcelRowData[]}
49
+ */
50
+ get rows() {
51
+ const ret = wasm.__wbg_get_dynamicexceldata_rows(this.__wbg_ptr);
52
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
53
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
54
+ return v1;
294
55
  }
295
56
  /**
296
57
  * @returns {string}
297
58
  */
298
- get value() {
59
+ get sheet_name() {
299
60
  let deferred1_0;
300
61
  let deferred1_1;
301
62
  try {
302
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
303
- wasm.__wbg_get_excelcolumndata_value(retptr, this.__wbg_ptr);
304
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
305
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
306
- deferred1_0 = r0;
307
- deferred1_1 = r1;
308
- return getStringFromWasm0(r0, r1);
63
+ const ret = wasm.__wbg_get_dynamicexceldata_sheet_name(this.__wbg_ptr);
64
+ deferred1_0 = ret[0];
65
+ deferred1_1 = ret[1];
66
+ return getStringFromWasm0(ret[0], ret[1]);
309
67
  } finally {
310
- wasm.__wbindgen_add_to_stack_pointer(16);
311
68
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
312
69
  }
313
70
  }
314
71
  /**
315
- * @param {string} arg0
72
+ * @param {string[]} arg0
316
73
  */
317
- set value(arg0) {
318
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
74
+ set headers(arg0) {
75
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
319
76
  const len0 = WASM_VECTOR_LEN;
320
- wasm.__wbg_set_excelcolumndata_value(this.__wbg_ptr, ptr0, len0);
77
+ wasm.__wbg_set_dynamicexceldata_headers(this.__wbg_ptr, ptr0, len0);
321
78
  }
322
79
  /**
323
- * @param {string} key
324
- * @param {string} value
80
+ * @param {ExcelRowData[]} arg0
325
81
  */
326
- constructor(key, value) {
327
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
82
+ set rows(arg0) {
83
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
328
84
  const len0 = WASM_VECTOR_LEN;
329
- const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
330
- const len1 = WASM_VECTOR_LEN;
331
- const ret = wasm.excelcolumndata_new(ptr0, len0, ptr1, len1);
332
- this.__wbg_ptr = ret >>> 0;
333
- ExcelColumnDataFinalization.register(this, this.__wbg_ptr, this);
334
- return this;
85
+ wasm.__wbg_set_dynamicexceldata_rows(this.__wbg_ptr, ptr0, len0);
86
+ }
87
+ /**
88
+ * @param {string} arg0
89
+ */
90
+ set sheet_name(arg0) {
91
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
92
+ const len0 = WASM_VECTOR_LEN;
93
+ wasm.__wbg_set_dynamicexceldata_sheet_name(this.__wbg_ptr, ptr0, len0);
335
94
  }
336
95
  }
96
+ if (Symbol.dispose) DynamicExcelData.prototype[Symbol.dispose] = DynamicExcelData.prototype.free;
337
97
 
338
- const ExcelColumnInfoFinalization = (typeof FinalizationRegistry === 'undefined')
339
- ? { register: () => {}, unregister: () => {} }
340
- : new FinalizationRegistry(ptr => wasm.__wbg_excelcolumninfo_free(ptr >>> 0, 1));
341
-
342
- export class ExcelColumnInfo {
343
-
98
+ export class ExcelCellFormat {
344
99
  static __wrap(ptr) {
345
100
  ptr = ptr >>> 0;
346
- const obj = Object.create(ExcelColumnInfo.prototype);
101
+ const obj = Object.create(ExcelCellFormat.prototype);
347
102
  obj.__wbg_ptr = ptr;
348
- ExcelColumnInfoFinalization.register(obj, obj.__wbg_ptr, obj);
103
+ ExcelCellFormatFinalization.register(obj, obj.__wbg_ptr, obj);
349
104
  return obj;
350
105
  }
351
-
352
106
  static __unwrap(jsValue) {
353
- if (!(jsValue instanceof ExcelColumnInfo)) {
107
+ if (!(jsValue instanceof ExcelCellFormat)) {
354
108
  return 0;
355
109
  }
356
110
  return jsValue.__destroy_into_raw();
357
111
  }
358
-
359
112
  __destroy_into_raw() {
360
113
  const ptr = this.__wbg_ptr;
361
114
  this.__wbg_ptr = 0;
362
- ExcelColumnInfoFinalization.unregister(this);
115
+ ExcelCellFormatFinalization.unregister(this);
363
116
  return ptr;
364
117
  }
365
-
366
118
  free() {
367
119
  const ptr = this.__destroy_into_raw();
368
- wasm.__wbg_excelcolumninfo_free(ptr, 0);
120
+ wasm.__wbg_excelcellformat_free(ptr, 0);
121
+ }
122
+ constructor() {
123
+ const ret = wasm.excelcellformat_new();
124
+ this.__wbg_ptr = ret >>> 0;
125
+ ExcelCellFormatFinalization.register(this, this.__wbg_ptr, this);
126
+ return this;
127
+ }
128
+ /**
129
+ * @param {string} align
130
+ * @returns {ExcelCellFormat}
131
+ */
132
+ withAlign(align) {
133
+ const ptr = this.__destroy_into_raw();
134
+ const ptr0 = passStringToWasm0(align, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
135
+ const len0 = WASM_VECTOR_LEN;
136
+ const ret = wasm.excelcellformat_withAlign(ptr, ptr0, len0);
137
+ return ExcelCellFormat.__wrap(ret);
138
+ }
139
+ /**
140
+ * @param {string} align_vertical
141
+ * @returns {ExcelCellFormat}
142
+ */
143
+ withAlignVertical(align_vertical) {
144
+ const ptr = this.__destroy_into_raw();
145
+ const ptr0 = passStringToWasm0(align_vertical, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
146
+ const len0 = WASM_VECTOR_LEN;
147
+ const ret = wasm.excelcellformat_withAlignVertical(ptr, ptr0, len0);
148
+ return ExcelCellFormat.__wrap(ret);
149
+ }
150
+ /**
151
+ * @param {string} background_color
152
+ * @returns {ExcelCellFormat}
153
+ */
154
+ withBackgroundColor(background_color) {
155
+ const ptr = this.__destroy_into_raw();
156
+ const ptr0 = passStringToWasm0(background_color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
157
+ const len0 = WASM_VECTOR_LEN;
158
+ const ret = wasm.excelcellformat_withBackgroundColor(ptr, ptr0, len0);
159
+ return ExcelCellFormat.__wrap(ret);
160
+ }
161
+ /**
162
+ * @param {boolean} bold
163
+ * @returns {ExcelCellFormat}
164
+ */
165
+ withBold(bold) {
166
+ const ptr = this.__destroy_into_raw();
167
+ const ret = wasm.excelcellformat_withBold(ptr, bold);
168
+ return ExcelCellFormat.__wrap(ret);
169
+ }
170
+ /**
171
+ * @param {string} border_color
172
+ * @returns {ExcelCellFormat}
173
+ */
174
+ withBorderColor(border_color) {
175
+ const ptr = this.__destroy_into_raw();
176
+ const ptr0 = passStringToWasm0(border_color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
177
+ const len0 = WASM_VECTOR_LEN;
178
+ const ret = wasm.excelcellformat_withBorderColor(ptr, ptr0, len0);
179
+ return ExcelCellFormat.__wrap(ret);
180
+ }
181
+ /**
182
+ * @param {string} color
183
+ * @returns {ExcelCellFormat}
184
+ */
185
+ withColor(color) {
186
+ const ptr = this.__destroy_into_raw();
187
+ const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
188
+ const len0 = WASM_VECTOR_LEN;
189
+ const ret = wasm.excelcellformat_withColor(ptr, ptr0, len0);
190
+ return ExcelCellFormat.__wrap(ret);
191
+ }
192
+ /**
193
+ * @param {string} date_format
194
+ * @returns {ExcelCellFormat}
195
+ */
196
+ withDateFormat(date_format) {
197
+ const ptr = this.__destroy_into_raw();
198
+ const ptr0 = passStringToWasm0(date_format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
199
+ const len0 = WASM_VECTOR_LEN;
200
+ const ret = wasm.excelcellformat_withDateFormat(ptr, ptr0, len0);
201
+ return ExcelCellFormat.__wrap(ret);
202
+ }
203
+ /**
204
+ * @param {number} font_size
205
+ * @returns {ExcelCellFormat}
206
+ */
207
+ withFontSize(font_size) {
208
+ const ptr = this.__destroy_into_raw();
209
+ const ret = wasm.excelcellformat_withFontSize(ptr, font_size);
210
+ return ExcelCellFormat.__wrap(ret);
211
+ }
212
+ /**
213
+ * @param {boolean} italic
214
+ * @returns {ExcelCellFormat}
215
+ */
216
+ withItalic(italic) {
217
+ const ptr = this.__destroy_into_raw();
218
+ const ret = wasm.excelcellformat_withItalic(ptr, italic);
219
+ return ExcelCellFormat.__wrap(ret);
220
+ }
221
+ /**
222
+ * @param {string} rule
223
+ * @returns {ExcelCellFormat}
224
+ */
225
+ withRule(rule) {
226
+ const ptr = this.__destroy_into_raw();
227
+ const ptr0 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
228
+ const len0 = WASM_VECTOR_LEN;
229
+ const ret = wasm.excelcellformat_withRule(ptr, ptr0, len0);
230
+ return ExcelCellFormat.__wrap(ret);
231
+ }
232
+ /**
233
+ * @param {boolean} strikethrough
234
+ * @returns {ExcelCellFormat}
235
+ */
236
+ withStrikethrough(strikethrough) {
237
+ const ptr = this.__destroy_into_raw();
238
+ const ret = wasm.excelcellformat_withStrikethrough(ptr, strikethrough);
239
+ return ExcelCellFormat.__wrap(ret);
240
+ }
241
+ /**
242
+ * @param {boolean} underline
243
+ * @returns {ExcelCellFormat}
244
+ */
245
+ withUnderline(underline) {
246
+ const ptr = this.__destroy_into_raw();
247
+ const ret = wasm.excelcellformat_withUnderline(ptr, underline);
248
+ return ExcelCellFormat.__wrap(ret);
249
+ }
250
+ /**
251
+ * @param {string} value
252
+ * @returns {ExcelCellFormat}
253
+ */
254
+ withValue(value) {
255
+ const ptr = this.__destroy_into_raw();
256
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
+ const len0 = WASM_VECTOR_LEN;
258
+ const ret = wasm.excelcellformat_withValue(ptr, ptr0, len0);
259
+ return ExcelCellFormat.__wrap(ret);
260
+ }
261
+ /**
262
+ * @returns {string}
263
+ */
264
+ get align_vertical() {
265
+ let deferred1_0;
266
+ let deferred1_1;
267
+ try {
268
+ const ret = wasm.__wbg_get_excelcellformat_align_vertical(this.__wbg_ptr);
269
+ deferred1_0 = ret[0];
270
+ deferred1_1 = ret[1];
271
+ return getStringFromWasm0(ret[0], ret[1]);
272
+ } finally {
273
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
274
+ }
275
+ }
276
+ /**
277
+ * @returns {string}
278
+ */
279
+ get align() {
280
+ let deferred1_0;
281
+ let deferred1_1;
282
+ try {
283
+ const ret = wasm.__wbg_get_excelcellformat_align(this.__wbg_ptr);
284
+ deferred1_0 = ret[0];
285
+ deferred1_1 = ret[1];
286
+ return getStringFromWasm0(ret[0], ret[1]);
287
+ } finally {
288
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
289
+ }
290
+ }
291
+ /**
292
+ * @returns {string}
293
+ */
294
+ get background_color() {
295
+ let deferred1_0;
296
+ let deferred1_1;
297
+ try {
298
+ const ret = wasm.__wbg_get_excelcellformat_background_color(this.__wbg_ptr);
299
+ deferred1_0 = ret[0];
300
+ deferred1_1 = ret[1];
301
+ return getStringFromWasm0(ret[0], ret[1]);
302
+ } finally {
303
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
304
+ }
305
+ }
306
+ /**
307
+ * @returns {boolean}
308
+ */
309
+ get bold() {
310
+ const ret = wasm.__wbg_get_excelcellformat_bold(this.__wbg_ptr);
311
+ return ret !== 0;
312
+ }
313
+ /**
314
+ * @returns {string | undefined}
315
+ */
316
+ get border_color() {
317
+ const ret = wasm.__wbg_get_excelcellformat_border_color(this.__wbg_ptr);
318
+ let v1;
319
+ if (ret[0] !== 0) {
320
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
321
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
322
+ }
323
+ return v1;
324
+ }
325
+ /**
326
+ * @returns {string}
327
+ */
328
+ get color() {
329
+ let deferred1_0;
330
+ let deferred1_1;
331
+ try {
332
+ const ret = wasm.__wbg_get_excelcellformat_color(this.__wbg_ptr);
333
+ deferred1_0 = ret[0];
334
+ deferred1_1 = ret[1];
335
+ return getStringFromWasm0(ret[0], ret[1]);
336
+ } finally {
337
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
338
+ }
339
+ }
340
+ /**
341
+ * @returns {string | undefined}
342
+ */
343
+ get date_format() {
344
+ const ret = wasm.__wbg_get_excelcellformat_date_format(this.__wbg_ptr);
345
+ let v1;
346
+ if (ret[0] !== 0) {
347
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
348
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
349
+ }
350
+ return v1;
351
+ }
352
+ /**
353
+ * @returns {number}
354
+ */
355
+ get font_size() {
356
+ const ret = wasm.__wbg_get_excelcellformat_font_size(this.__wbg_ptr);
357
+ return ret;
358
+ }
359
+ /**
360
+ * @returns {boolean}
361
+ */
362
+ get italic() {
363
+ const ret = wasm.__wbg_get_excelcellformat_italic(this.__wbg_ptr);
364
+ return ret !== 0;
365
+ }
366
+ /**
367
+ * @returns {string}
368
+ */
369
+ get rule() {
370
+ let deferred1_0;
371
+ let deferred1_1;
372
+ try {
373
+ const ret = wasm.__wbg_get_excelcellformat_rule(this.__wbg_ptr);
374
+ deferred1_0 = ret[0];
375
+ deferred1_1 = ret[1];
376
+ return getStringFromWasm0(ret[0], ret[1]);
377
+ } finally {
378
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
379
+ }
380
+ }
381
+ /**
382
+ * @returns {boolean}
383
+ */
384
+ get strikethrough() {
385
+ const ret = wasm.__wbg_get_excelcellformat_strikethrough(this.__wbg_ptr);
386
+ return ret !== 0;
387
+ }
388
+ /**
389
+ * @returns {boolean}
390
+ */
391
+ get underline() {
392
+ const ret = wasm.__wbg_get_excelcellformat_underline(this.__wbg_ptr);
393
+ return ret !== 0;
394
+ }
395
+ /**
396
+ * @returns {string}
397
+ */
398
+ get value() {
399
+ let deferred1_0;
400
+ let deferred1_1;
401
+ try {
402
+ const ret = wasm.__wbg_get_excelcellformat_value(this.__wbg_ptr);
403
+ deferred1_0 = ret[0];
404
+ deferred1_1 = ret[1];
405
+ return getStringFromWasm0(ret[0], ret[1]);
406
+ } finally {
407
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
408
+ }
409
+ }
410
+ /**
411
+ * @param {string} arg0
412
+ */
413
+ set align_vertical(arg0) {
414
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
415
+ const len0 = WASM_VECTOR_LEN;
416
+ wasm.__wbg_set_excelcellformat_align_vertical(this.__wbg_ptr, ptr0, len0);
417
+ }
418
+ /**
419
+ * @param {string} arg0
420
+ */
421
+ set align(arg0) {
422
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
423
+ const len0 = WASM_VECTOR_LEN;
424
+ wasm.__wbg_set_excelcellformat_align(this.__wbg_ptr, ptr0, len0);
425
+ }
426
+ /**
427
+ * @param {string} arg0
428
+ */
429
+ set background_color(arg0) {
430
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
431
+ const len0 = WASM_VECTOR_LEN;
432
+ wasm.__wbg_set_excelcellformat_background_color(this.__wbg_ptr, ptr0, len0);
433
+ }
434
+ /**
435
+ * @param {boolean} arg0
436
+ */
437
+ set bold(arg0) {
438
+ wasm.__wbg_set_excelcellformat_bold(this.__wbg_ptr, arg0);
439
+ }
440
+ /**
441
+ * @param {string | null} [arg0]
442
+ */
443
+ set border_color(arg0) {
444
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
445
+ var len0 = WASM_VECTOR_LEN;
446
+ wasm.__wbg_set_excelcellformat_border_color(this.__wbg_ptr, ptr0, len0);
447
+ }
448
+ /**
449
+ * @param {string} arg0
450
+ */
451
+ set color(arg0) {
452
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
453
+ const len0 = WASM_VECTOR_LEN;
454
+ wasm.__wbg_set_excelcellformat_color(this.__wbg_ptr, ptr0, len0);
455
+ }
456
+ /**
457
+ * @param {string | null} [arg0]
458
+ */
459
+ set date_format(arg0) {
460
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
461
+ var len0 = WASM_VECTOR_LEN;
462
+ wasm.__wbg_set_excelcellformat_date_format(this.__wbg_ptr, ptr0, len0);
463
+ }
464
+ /**
465
+ * @param {number} arg0
466
+ */
467
+ set font_size(arg0) {
468
+ wasm.__wbg_set_excelcellformat_font_size(this.__wbg_ptr, arg0);
469
+ }
470
+ /**
471
+ * @param {boolean} arg0
472
+ */
473
+ set italic(arg0) {
474
+ wasm.__wbg_set_excelcellformat_italic(this.__wbg_ptr, arg0);
475
+ }
476
+ /**
477
+ * @param {string} arg0
478
+ */
479
+ set rule(arg0) {
480
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
481
+ const len0 = WASM_VECTOR_LEN;
482
+ wasm.__wbg_set_excelcellformat_rule(this.__wbg_ptr, ptr0, len0);
483
+ }
484
+ /**
485
+ * @param {boolean} arg0
486
+ */
487
+ set strikethrough(arg0) {
488
+ wasm.__wbg_set_excelcellformat_strikethrough(this.__wbg_ptr, arg0);
489
+ }
490
+ /**
491
+ * @param {boolean} arg0
492
+ */
493
+ set underline(arg0) {
494
+ wasm.__wbg_set_excelcellformat_underline(this.__wbg_ptr, arg0);
495
+ }
496
+ /**
497
+ * @param {string} arg0
498
+ */
499
+ set value(arg0) {
500
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
501
+ const len0 = WASM_VECTOR_LEN;
502
+ wasm.__wbg_set_excelcellformat_value(this.__wbg_ptr, ptr0, len0);
503
+ }
504
+ }
505
+ if (Symbol.dispose) ExcelCellFormat.prototype[Symbol.dispose] = ExcelCellFormat.prototype.free;
506
+
507
+ export class ExcelColumnData {
508
+ static __wrap(ptr) {
509
+ ptr = ptr >>> 0;
510
+ const obj = Object.create(ExcelColumnData.prototype);
511
+ obj.__wbg_ptr = ptr;
512
+ ExcelColumnDataFinalization.register(obj, obj.__wbg_ptr, obj);
513
+ return obj;
514
+ }
515
+ static __unwrap(jsValue) {
516
+ if (!(jsValue instanceof ExcelColumnData)) {
517
+ return 0;
518
+ }
519
+ return jsValue.__destroy_into_raw();
520
+ }
521
+ __destroy_into_raw() {
522
+ const ptr = this.__wbg_ptr;
523
+ this.__wbg_ptr = 0;
524
+ ExcelColumnDataFinalization.unregister(this);
525
+ return ptr;
526
+ }
527
+ free() {
528
+ const ptr = this.__destroy_into_raw();
529
+ wasm.__wbg_excelcolumndata_free(ptr, 0);
530
+ }
531
+ /**
532
+ * @param {string} key
533
+ * @param {string} value
534
+ */
535
+ constructor(key, value) {
536
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
537
+ const len0 = WASM_VECTOR_LEN;
538
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
539
+ const len1 = WASM_VECTOR_LEN;
540
+ const ret = wasm.excelcolumndata_bind_new(ptr0, len0, ptr1, len1);
541
+ this.__wbg_ptr = ret >>> 0;
542
+ ExcelColumnDataFinalization.register(this, this.__wbg_ptr, this);
543
+ return this;
544
+ }
545
+ /**
546
+ * @param {string} group_name
547
+ * @param {string} value
548
+ * @param {ExcelRowData[]} children
549
+ * @returns {ExcelColumnData}
550
+ */
551
+ static newGroup(group_name, value, children) {
552
+ const ptr0 = passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
553
+ const len0 = WASM_VECTOR_LEN;
554
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
555
+ const len1 = WASM_VECTOR_LEN;
556
+ const ptr2 = passArrayJsValueToWasm0(children, wasm.__wbindgen_malloc);
557
+ const len2 = WASM_VECTOR_LEN;
558
+ const ret = wasm.excelcolumndata_newGroup(ptr0, len0, ptr1, len1, ptr2, len2);
559
+ return ExcelColumnData.__wrap(ret);
560
+ }
561
+ /**
562
+ * @param {string} group_name
563
+ * @param {ExcelRowData[]} children
564
+ * @returns {ExcelColumnData}
565
+ */
566
+ static newRootGroup(group_name, children) {
567
+ const ptr0 = passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
568
+ const len0 = WASM_VECTOR_LEN;
569
+ const ptr1 = passArrayJsValueToWasm0(children, wasm.__wbindgen_malloc);
570
+ const len1 = WASM_VECTOR_LEN;
571
+ const ret = wasm.excelcolumndata_newRootGroup(ptr0, len0, ptr1, len1);
572
+ return ExcelColumnData.__wrap(ret);
573
+ }
574
+ /**
575
+ * @param {ExcelRowData[]} children
576
+ * @returns {ExcelColumnData}
577
+ */
578
+ withChildren(children) {
579
+ const ptr = this.__destroy_into_raw();
580
+ const ptr0 = passArrayJsValueToWasm0(children, wasm.__wbindgen_malloc);
581
+ const len0 = WASM_VECTOR_LEN;
582
+ const ret = wasm.excelcolumndata_withChildren(ptr, ptr0, len0);
583
+ return ExcelColumnData.__wrap(ret);
584
+ }
585
+ /**
586
+ * @returns {ExcelRowData[]}
587
+ */
588
+ get children() {
589
+ const ret = wasm.__wbg_get_excelcolumndata_children(this.__wbg_ptr);
590
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
591
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
592
+ return v1;
593
+ }
594
+ /**
595
+ * @returns {string}
596
+ */
597
+ get key() {
598
+ let deferred1_0;
599
+ let deferred1_1;
600
+ try {
601
+ const ret = wasm.__wbg_get_excelcolumndata_key(this.__wbg_ptr);
602
+ deferred1_0 = ret[0];
603
+ deferred1_1 = ret[1];
604
+ return getStringFromWasm0(ret[0], ret[1]);
605
+ } finally {
606
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
607
+ }
608
+ }
609
+ /**
610
+ * @returns {string}
611
+ */
612
+ get value() {
613
+ let deferred1_0;
614
+ let deferred1_1;
615
+ try {
616
+ const ret = wasm.__wbg_get_excelcolumndata_value(this.__wbg_ptr);
617
+ deferred1_0 = ret[0];
618
+ deferred1_1 = ret[1];
619
+ return getStringFromWasm0(ret[0], ret[1]);
620
+ } finally {
621
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
622
+ }
623
+ }
624
+ /**
625
+ * @param {ExcelRowData[]} arg0
626
+ */
627
+ set children(arg0) {
628
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
629
+ const len0 = WASM_VECTOR_LEN;
630
+ wasm.__wbg_set_excelcolumndata_children(this.__wbg_ptr, ptr0, len0);
631
+ }
632
+ /**
633
+ * @param {string} arg0
634
+ */
635
+ set key(arg0) {
636
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
637
+ const len0 = WASM_VECTOR_LEN;
638
+ wasm.__wbg_set_excelcolumndata_key(this.__wbg_ptr, ptr0, len0);
639
+ }
640
+ /**
641
+ * @param {string} arg0
642
+ */
643
+ set value(arg0) {
644
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
645
+ const len0 = WASM_VECTOR_LEN;
646
+ wasm.__wbg_set_excelcolumndata_value(this.__wbg_ptr, ptr0, len0);
647
+ }
648
+ }
649
+ if (Symbol.dispose) ExcelColumnData.prototype[Symbol.dispose] = ExcelColumnData.prototype.free;
650
+
651
+ export class ExcelColumnInfo {
652
+ static __wrap(ptr) {
653
+ ptr = ptr >>> 0;
654
+ const obj = Object.create(ExcelColumnInfo.prototype);
655
+ obj.__wbg_ptr = ptr;
656
+ ExcelColumnInfoFinalization.register(obj, obj.__wbg_ptr, obj);
657
+ return obj;
658
+ }
659
+ static __unwrap(jsValue) {
660
+ if (!(jsValue instanceof ExcelColumnInfo)) {
661
+ return 0;
662
+ }
663
+ return jsValue.__destroy_into_raw();
664
+ }
665
+ __destroy_into_raw() {
666
+ const ptr = this.__wbg_ptr;
667
+ this.__wbg_ptr = 0;
668
+ ExcelColumnInfoFinalization.unregister(this);
669
+ return ptr;
670
+ }
671
+ free() {
672
+ const ptr = this.__destroy_into_raw();
673
+ wasm.__wbg_excelcolumninfo_free(ptr, 0);
674
+ }
675
+ /**
676
+ * @param {string} key
677
+ * @param {string} name
678
+ */
679
+ constructor(key, name) {
680
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
681
+ const len0 = WASM_VECTOR_LEN;
682
+ const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
683
+ const len1 = WASM_VECTOR_LEN;
684
+ const ret = wasm.excelcolumninfo_bind_new(ptr0, len0, ptr1, len1);
685
+ this.__wbg_ptr = ret >>> 0;
686
+ ExcelColumnInfoFinalization.register(this, this.__wbg_ptr, this);
687
+ return this;
688
+ }
689
+ /**
690
+ * @param {string[]} allowed_values
691
+ * @returns {ExcelColumnInfo}
692
+ */
693
+ withAllowedValues(allowed_values) {
694
+ const ptr = this.__destroy_into_raw();
695
+ const ptr0 = passArrayJsValueToWasm0(allowed_values, wasm.__wbindgen_malloc);
696
+ const len0 = WASM_VECTOR_LEN;
697
+ const ret = wasm.excelcolumninfo_withAllowedValues(ptr, ptr0, len0);
698
+ return ExcelColumnInfo.__wrap(ret);
699
+ }
700
+ /**
701
+ * @param {string} group
702
+ * @returns {ExcelColumnInfo}
703
+ */
704
+ withDataGroup(group) {
705
+ const ptr = this.__destroy_into_raw();
706
+ const ptr0 = passStringToWasm0(group, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
707
+ const len0 = WASM_VECTOR_LEN;
708
+ const ret = wasm.excelcolumninfo_withDataGroup(ptr, ptr0, len0);
709
+ return ExcelColumnInfo.__wrap(ret);
710
+ }
711
+ /**
712
+ * @param {string} group_parent
713
+ * @returns {ExcelColumnInfo}
714
+ */
715
+ withDataGroupParent(group_parent) {
716
+ const ptr = this.__destroy_into_raw();
717
+ const ptr0 = passStringToWasm0(group_parent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
718
+ const len0 = WASM_VECTOR_LEN;
719
+ const ret = wasm.excelcolumninfo_withDataGroupParent(ptr, ptr0, len0);
720
+ return ExcelColumnInfo.__wrap(ret);
721
+ }
722
+ /**
723
+ * @param {string} data_type
724
+ * @returns {ExcelColumnInfo}
725
+ */
726
+ withDataType(data_type) {
727
+ const ptr = this.__destroy_into_raw();
728
+ const ptr0 = passStringToWasm0(data_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
729
+ const len0 = WASM_VECTOR_LEN;
730
+ const ret = wasm.excelcolumninfo_withDataType(ptr, ptr0, len0);
731
+ return ExcelColumnInfo.__wrap(ret);
732
+ }
733
+ /**
734
+ * @param {ExcelCellFormat} format
735
+ * @returns {ExcelColumnInfo}
736
+ */
737
+ withFormat(format) {
738
+ const ptr = this.__destroy_into_raw();
739
+ _assertClass(format, ExcelCellFormat);
740
+ var ptr0 = format.__destroy_into_raw();
741
+ const ret = wasm.excelcolumninfo_withFormat(ptr, ptr0);
742
+ return ExcelColumnInfo.__wrap(ret);
743
+ }
744
+ /**
745
+ * @param {string} note
746
+ * @returns {ExcelColumnInfo}
747
+ */
748
+ withNote(note) {
749
+ const ptr = this.__destroy_into_raw();
750
+ const ptr0 = passStringToWasm0(note, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
751
+ const len0 = WASM_VECTOR_LEN;
752
+ const ret = wasm.excelcolumninfo_withNote(ptr, ptr0, len0);
753
+ return ExcelColumnInfo.__wrap(ret);
754
+ }
755
+ /**
756
+ * @param {string} parent
757
+ * @returns {ExcelColumnInfo}
758
+ */
759
+ withParent(parent) {
760
+ const ptr = this.__destroy_into_raw();
761
+ const ptr0 = passStringToWasm0(parent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
762
+ const len0 = WASM_VECTOR_LEN;
763
+ const ret = wasm.excelcolumninfo_withParent(ptr, ptr0, len0);
764
+ return ExcelColumnInfo.__wrap(ret);
765
+ }
766
+ /**
767
+ * @param {ExcelCellFormat[]} value_format
768
+ * @returns {ExcelColumnInfo}
769
+ */
770
+ withValueFormat(value_format) {
771
+ const ptr = this.__destroy_into_raw();
772
+ const ptr0 = passArrayJsValueToWasm0(value_format, wasm.__wbindgen_malloc);
773
+ const len0 = WASM_VECTOR_LEN;
774
+ const ret = wasm.excelcolumninfo_withValueFormat(ptr, ptr0, len0);
775
+ return ExcelColumnInfo.__wrap(ret);
776
+ }
777
+ /**
778
+ * @param {number} width
779
+ * @returns {ExcelColumnInfo}
780
+ */
781
+ withWidth(width) {
782
+ const ptr = this.__destroy_into_raw();
783
+ const ret = wasm.excelcolumninfo_withWidth(ptr, width);
784
+ return ExcelColumnInfo.__wrap(ret);
785
+ }
786
+ /**
787
+ * @returns {string[]}
788
+ */
789
+ get allowed_values() {
790
+ const ret = wasm.__wbg_get_excelcolumninfo_allowed_values(this.__wbg_ptr);
791
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
792
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
793
+ return v1;
794
+ }
795
+ /**
796
+ * @returns {string}
797
+ */
798
+ get data_group_parent() {
799
+ let deferred1_0;
800
+ let deferred1_1;
801
+ try {
802
+ const ret = wasm.__wbg_get_excelcolumninfo_data_group_parent(this.__wbg_ptr);
803
+ deferred1_0 = ret[0];
804
+ deferred1_1 = ret[1];
805
+ return getStringFromWasm0(ret[0], ret[1]);
806
+ } finally {
807
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
808
+ }
809
+ }
810
+ /**
811
+ * @returns {string}
812
+ */
813
+ get data_group() {
814
+ let deferred1_0;
815
+ let deferred1_1;
816
+ try {
817
+ const ret = wasm.__wbg_get_excelcolumninfo_data_group(this.__wbg_ptr);
818
+ deferred1_0 = ret[0];
819
+ deferred1_1 = ret[1];
820
+ return getStringFromWasm0(ret[0], ret[1]);
821
+ } finally {
822
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
823
+ }
824
+ }
825
+ /**
826
+ * @returns {string}
827
+ */
828
+ get data_type() {
829
+ let deferred1_0;
830
+ let deferred1_1;
831
+ try {
832
+ const ret = wasm.__wbg_get_excelcolumninfo_data_type(this.__wbg_ptr);
833
+ deferred1_0 = ret[0];
834
+ deferred1_1 = ret[1];
835
+ return getStringFromWasm0(ret[0], ret[1]);
836
+ } finally {
837
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
838
+ }
839
+ }
840
+ /**
841
+ * @returns {ExcelCellFormat | undefined}
842
+ */
843
+ get format() {
844
+ const ret = wasm.__wbg_get_excelcolumninfo_format(this.__wbg_ptr);
845
+ return ret === 0 ? undefined : ExcelCellFormat.__wrap(ret);
846
+ }
847
+ /**
848
+ * @returns {string}
849
+ */
850
+ get key() {
851
+ let deferred1_0;
852
+ let deferred1_1;
853
+ try {
854
+ const ret = wasm.__wbg_get_excelcolumninfo_key(this.__wbg_ptr);
855
+ deferred1_0 = ret[0];
856
+ deferred1_1 = ret[1];
857
+ return getStringFromWasm0(ret[0], ret[1]);
858
+ } finally {
859
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
860
+ }
861
+ }
862
+ /**
863
+ * @returns {string}
864
+ */
865
+ get name() {
866
+ let deferred1_0;
867
+ let deferred1_1;
868
+ try {
869
+ const ret = wasm.__wbg_get_excelcolumninfo_name(this.__wbg_ptr);
870
+ deferred1_0 = ret[0];
871
+ deferred1_1 = ret[1];
872
+ return getStringFromWasm0(ret[0], ret[1]);
873
+ } finally {
874
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
875
+ }
876
+ }
877
+ /**
878
+ * @returns {string | undefined}
879
+ */
880
+ get note() {
881
+ const ret = wasm.__wbg_get_excelcolumninfo_note(this.__wbg_ptr);
882
+ let v1;
883
+ if (ret[0] !== 0) {
884
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
885
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
886
+ }
887
+ return v1;
888
+ }
889
+ /**
890
+ * @returns {string}
891
+ */
892
+ get parent() {
893
+ let deferred1_0;
894
+ let deferred1_1;
895
+ try {
896
+ const ret = wasm.__wbg_get_excelcolumninfo_parent(this.__wbg_ptr);
897
+ deferred1_0 = ret[0];
898
+ deferred1_1 = ret[1];
899
+ return getStringFromWasm0(ret[0], ret[1]);
900
+ } finally {
901
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
902
+ }
903
+ }
904
+ /**
905
+ * @returns {ExcelCellFormat[]}
906
+ */
907
+ get value_format() {
908
+ const ret = wasm.__wbg_get_excelcolumninfo_value_format(this.__wbg_ptr);
909
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
910
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
911
+ return v1;
912
+ }
913
+ /**
914
+ * @returns {number}
915
+ */
916
+ get width() {
917
+ const ret = wasm.__wbg_get_excelcolumninfo_width(this.__wbg_ptr);
918
+ return ret;
919
+ }
920
+ /**
921
+ * @param {string[]} arg0
922
+ */
923
+ set allowed_values(arg0) {
924
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
925
+ const len0 = WASM_VECTOR_LEN;
926
+ wasm.__wbg_set_excelcolumninfo_allowed_values(this.__wbg_ptr, ptr0, len0);
927
+ }
928
+ /**
929
+ * @param {string} arg0
930
+ */
931
+ set data_group_parent(arg0) {
932
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
933
+ const len0 = WASM_VECTOR_LEN;
934
+ wasm.__wbg_set_excelcolumninfo_data_group_parent(this.__wbg_ptr, ptr0, len0);
935
+ }
936
+ /**
937
+ * @param {string} arg0
938
+ */
939
+ set data_group(arg0) {
940
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
941
+ const len0 = WASM_VECTOR_LEN;
942
+ wasm.__wbg_set_excelcolumninfo_data_group(this.__wbg_ptr, ptr0, len0);
943
+ }
944
+ /**
945
+ * @param {string} arg0
946
+ */
947
+ set data_type(arg0) {
948
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
949
+ const len0 = WASM_VECTOR_LEN;
950
+ wasm.__wbg_set_excelcolumninfo_data_type(this.__wbg_ptr, ptr0, len0);
951
+ }
952
+ /**
953
+ * @param {ExcelCellFormat | null} [arg0]
954
+ */
955
+ set format(arg0) {
956
+ let ptr0 = 0;
957
+ if (!isLikeNone(arg0)) {
958
+ _assertClass(arg0, ExcelCellFormat);
959
+ ptr0 = arg0.__destroy_into_raw();
960
+ }
961
+ wasm.__wbg_set_excelcolumninfo_format(this.__wbg_ptr, ptr0);
962
+ }
963
+ /**
964
+ * @param {string} arg0
965
+ */
966
+ set key(arg0) {
967
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
968
+ const len0 = WASM_VECTOR_LEN;
969
+ wasm.__wbg_set_excelcolumninfo_key(this.__wbg_ptr, ptr0, len0);
970
+ }
971
+ /**
972
+ * @param {string} arg0
973
+ */
974
+ set name(arg0) {
975
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
976
+ const len0 = WASM_VECTOR_LEN;
977
+ wasm.__wbg_set_excelcolumninfo_name(this.__wbg_ptr, ptr0, len0);
978
+ }
979
+ /**
980
+ * @param {string | null} [arg0]
981
+ */
982
+ set note(arg0) {
983
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
984
+ var len0 = WASM_VECTOR_LEN;
985
+ wasm.__wbg_set_excelcolumninfo_note(this.__wbg_ptr, ptr0, len0);
986
+ }
987
+ /**
988
+ * @param {string} arg0
989
+ */
990
+ set parent(arg0) {
991
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
992
+ const len0 = WASM_VECTOR_LEN;
993
+ wasm.__wbg_set_excelcolumninfo_parent(this.__wbg_ptr, ptr0, len0);
994
+ }
995
+ /**
996
+ * @param {ExcelCellFormat[]} arg0
997
+ */
998
+ set value_format(arg0) {
999
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1000
+ const len0 = WASM_VECTOR_LEN;
1001
+ wasm.__wbg_set_excelcolumninfo_value_format(this.__wbg_ptr, ptr0, len0);
1002
+ }
1003
+ /**
1004
+ * @param {number} arg0
1005
+ */
1006
+ set width(arg0) {
1007
+ wasm.__wbg_set_excelcolumninfo_width(this.__wbg_ptr, arg0);
1008
+ }
1009
+ }
1010
+ if (Symbol.dispose) ExcelColumnInfo.prototype[Symbol.dispose] = ExcelColumnInfo.prototype.free;
1011
+
1012
+ export class ExcelData {
1013
+ static __wrap(ptr) {
1014
+ ptr = ptr >>> 0;
1015
+ const obj = Object.create(ExcelData.prototype);
1016
+ obj.__wbg_ptr = ptr;
1017
+ ExcelDataFinalization.register(obj, obj.__wbg_ptr, obj);
1018
+ return obj;
1019
+ }
1020
+ __destroy_into_raw() {
1021
+ const ptr = this.__wbg_ptr;
1022
+ this.__wbg_ptr = 0;
1023
+ ExcelDataFinalization.unregister(this);
1024
+ return ptr;
1025
+ }
1026
+ free() {
1027
+ const ptr = this.__destroy_into_raw();
1028
+ wasm.__wbg_exceldata_free(ptr, 0);
1029
+ }
1030
+ /**
1031
+ * @param {ExcelRowData[]} rows
1032
+ */
1033
+ constructor(rows) {
1034
+ const ptr0 = passArrayJsValueToWasm0(rows, wasm.__wbindgen_malloc);
1035
+ const len0 = WASM_VECTOR_LEN;
1036
+ const ret = wasm.exceldata_new(ptr0, len0);
1037
+ this.__wbg_ptr = ret >>> 0;
1038
+ ExcelDataFinalization.register(this, this.__wbg_ptr, this);
1039
+ return this;
1040
+ }
1041
+ /**
1042
+ * @returns {ExcelRowData[]}
1043
+ */
1044
+ get rows() {
1045
+ const ret = wasm.__wbg_get_exceldata_rows(this.__wbg_ptr);
1046
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
1047
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1048
+ return v1;
1049
+ }
1050
+ /**
1051
+ * @param {ExcelRowData[]} arg0
1052
+ */
1053
+ set rows(arg0) {
1054
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1055
+ const len0 = WASM_VECTOR_LEN;
1056
+ wasm.__wbg_set_exceldata_rows(this.__wbg_ptr, ptr0, len0);
1057
+ }
1058
+ }
1059
+ if (Symbol.dispose) ExcelData.prototype[Symbol.dispose] = ExcelData.prototype.free;
1060
+
1061
+ export class ExcelInfo {
1062
+ static __wrap(ptr) {
1063
+ ptr = ptr >>> 0;
1064
+ const obj = Object.create(ExcelInfo.prototype);
1065
+ obj.__wbg_ptr = ptr;
1066
+ ExcelInfoFinalization.register(obj, obj.__wbg_ptr, obj);
1067
+ return obj;
1068
+ }
1069
+ __destroy_into_raw() {
1070
+ const ptr = this.__wbg_ptr;
1071
+ this.__wbg_ptr = 0;
1072
+ ExcelInfoFinalization.unregister(this);
1073
+ return ptr;
1074
+ }
1075
+ free() {
1076
+ const ptr = this.__destroy_into_raw();
1077
+ wasm.__wbg_excelinfo_free(ptr, 0);
1078
+ }
1079
+ /**
1080
+ * @param {string} name
1081
+ * @param {string} sheet_name
1082
+ * @param {ExcelColumnInfo[]} columns
1083
+ * @param {string} author
1084
+ * @param {string} create_time
1085
+ */
1086
+ constructor(name, sheet_name, columns, author, create_time) {
1087
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1088
+ const len0 = WASM_VECTOR_LEN;
1089
+ const ptr1 = passStringToWasm0(sheet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1090
+ const len1 = WASM_VECTOR_LEN;
1091
+ const ptr2 = passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
1092
+ const len2 = WASM_VECTOR_LEN;
1093
+ const ptr3 = passStringToWasm0(author, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1094
+ const len3 = WASM_VECTOR_LEN;
1095
+ const ptr4 = passStringToWasm0(create_time, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1096
+ const len4 = WASM_VECTOR_LEN;
1097
+ const ret = wasm.excelinfo_bind_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
1098
+ this.__wbg_ptr = ret >>> 0;
1099
+ ExcelInfoFinalization.register(this, this.__wbg_ptr, this);
1100
+ return this;
1101
+ }
1102
+ /**
1103
+ * @param {number} row_height
1104
+ * @returns {ExcelInfo}
1105
+ */
1106
+ withDefaultRowHeight(row_height) {
1107
+ const ptr = this.__destroy_into_raw();
1108
+ const ret = wasm.excelinfo_withDefaultRowHeight(ptr, row_height);
1109
+ return ExcelInfo.__wrap(ret);
1110
+ }
1111
+ /**
1112
+ * @param {number} row_height
1113
+ * @returns {ExcelInfo}
1114
+ */
1115
+ withHeaderRowHeight(row_height) {
1116
+ const ptr = this.__destroy_into_raw();
1117
+ const ret = wasm.excelinfo_withHeaderRowHeight(ptr, row_height);
1118
+ return ExcelInfo.__wrap(ret);
1119
+ }
1120
+ /**
1121
+ * @param {Function} fetcher
1122
+ * @returns {ExcelInfo}
1123
+ */
1124
+ withImageFetcher(fetcher) {
1125
+ const ptr = this.__destroy_into_raw();
1126
+ const ret = wasm.excelinfo_withImageFetcher(ptr, fetcher);
1127
+ return ExcelInfo.__wrap(ret);
1128
+ }
1129
+ /**
1130
+ * @param {boolean} is_header_freeze
1131
+ * @returns {ExcelInfo}
1132
+ */
1133
+ withIsHeaderFreeze(is_header_freeze) {
1134
+ const ptr = this.__destroy_into_raw();
1135
+ const ret = wasm.excelinfo_withIsHeaderFreeze(ptr, is_header_freeze);
1136
+ return ExcelInfo.__wrap(ret);
1137
+ }
1138
+ /**
1139
+ * @param {number} dx
1140
+ * @param {number} dy
1141
+ * @returns {ExcelInfo}
1142
+ */
1143
+ withOffset(dx, dy) {
1144
+ const ptr = this.__destroy_into_raw();
1145
+ const ret = wasm.excelinfo_withOffset(ptr, dx, dy);
1146
+ return ExcelInfo.__wrap(ret);
1147
+ }
1148
+ /**
1149
+ * @param {Function} callback
1150
+ * @returns {ExcelInfo}
1151
+ */
1152
+ withProgressCallback(callback) {
1153
+ const ptr = this.__destroy_into_raw();
1154
+ const ret = wasm.excelinfo_withProgressCallback(ptr, callback);
1155
+ return ExcelInfo.__wrap(ret);
1156
+ }
1157
+ /**
1158
+ * @param {string} title
1159
+ * @returns {ExcelInfo}
1160
+ */
1161
+ withTitle(title) {
1162
+ const ptr = this.__destroy_into_raw();
1163
+ const ptr0 = passStringToWasm0(title, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1164
+ const len0 = WASM_VECTOR_LEN;
1165
+ const ret = wasm.excelinfo_withTitle(ptr, ptr0, len0);
1166
+ return ExcelInfo.__wrap(ret);
1167
+ }
1168
+ /**
1169
+ * @param {ExcelCellFormat} title_format
1170
+ * @returns {ExcelInfo}
1171
+ */
1172
+ withTitleFormat(title_format) {
1173
+ const ptr = this.__destroy_into_raw();
1174
+ _assertClass(title_format, ExcelCellFormat);
1175
+ var ptr0 = title_format.__destroy_into_raw();
1176
+ const ret = wasm.excelinfo_withTitleFormat(ptr, ptr0);
1177
+ return ExcelInfo.__wrap(ret);
1178
+ }
1179
+ /**
1180
+ * @param {number} title_height
1181
+ * @returns {ExcelInfo}
1182
+ */
1183
+ withTitleHeight(title_height) {
1184
+ const ptr = this.__destroy_into_raw();
1185
+ const ret = wasm.excelinfo_withTitleHeight(ptr, title_height);
1186
+ return ExcelInfo.__wrap(ret);
1187
+ }
1188
+ /**
1189
+ * @returns {string}
1190
+ */
1191
+ get author() {
1192
+ let deferred1_0;
1193
+ let deferred1_1;
1194
+ try {
1195
+ const ret = wasm.__wbg_get_excelinfo_author(this.__wbg_ptr);
1196
+ deferred1_0 = ret[0];
1197
+ deferred1_1 = ret[1];
1198
+ return getStringFromWasm0(ret[0], ret[1]);
1199
+ } finally {
1200
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1201
+ }
1202
+ }
1203
+ /**
1204
+ * @returns {ExcelColumnInfo[]}
1205
+ */
1206
+ get columns() {
1207
+ const ret = wasm.__wbg_get_excelinfo_columns(this.__wbg_ptr);
1208
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
1209
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1210
+ return v1;
1211
+ }
1212
+ /**
1213
+ * @returns {string}
1214
+ */
1215
+ get create_time() {
1216
+ let deferred1_0;
1217
+ let deferred1_1;
1218
+ try {
1219
+ const ret = wasm.__wbg_get_excelinfo_create_time(this.__wbg_ptr);
1220
+ deferred1_0 = ret[0];
1221
+ deferred1_1 = ret[1];
1222
+ return getStringFromWasm0(ret[0], ret[1]);
1223
+ } finally {
1224
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1225
+ }
1226
+ }
1227
+ /**
1228
+ * @returns {number | undefined}
1229
+ */
1230
+ get default_row_height() {
1231
+ const ret = wasm.__wbg_get_excelinfo_default_row_height(this.__wbg_ptr);
1232
+ return ret[0] === 0 ? undefined : ret[1];
1233
+ }
1234
+ /**
1235
+ * @returns {number}
1236
+ */
1237
+ get dx() {
1238
+ const ret = wasm.__wbg_get_excelinfo_dx(this.__wbg_ptr);
1239
+ return ret;
1240
+ }
1241
+ /**
1242
+ * @returns {number}
1243
+ */
1244
+ get dy() {
1245
+ const ret = wasm.__wbg_get_excelinfo_dy(this.__wbg_ptr);
1246
+ return ret >>> 0;
1247
+ }
1248
+ /**
1249
+ * @returns {number | undefined}
1250
+ */
1251
+ get header_row_height() {
1252
+ const ret = wasm.__wbg_get_excelinfo_header_row_height(this.__wbg_ptr);
1253
+ return ret[0] === 0 ? undefined : ret[1];
1254
+ }
1255
+ /**
1256
+ * @returns {boolean}
1257
+ */
1258
+ get is_header_freeze() {
1259
+ const ret = wasm.__wbg_get_excelinfo_is_header_freeze(this.__wbg_ptr);
1260
+ return ret !== 0;
369
1261
  }
370
1262
  /**
371
1263
  * @returns {string}
372
1264
  */
373
- get key() {
1265
+ get name() {
374
1266
  let deferred1_0;
375
1267
  let deferred1_1;
376
1268
  try {
377
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
378
- wasm.__wbg_get_excelcolumninfo_key(retptr, this.__wbg_ptr);
379
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
380
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
381
- deferred1_0 = r0;
382
- deferred1_1 = r1;
383
- return getStringFromWasm0(r0, r1);
1269
+ const ret = wasm.__wbg_get_excelinfo_name(this.__wbg_ptr);
1270
+ deferred1_0 = ret[0];
1271
+ deferred1_1 = ret[1];
1272
+ return getStringFromWasm0(ret[0], ret[1]);
384
1273
  } finally {
385
- wasm.__wbindgen_add_to_stack_pointer(16);
386
1274
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
387
1275
  }
388
1276
  }
389
- /**
390
- * @param {string} arg0
391
- */
392
- set key(arg0) {
393
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
394
- const len0 = WASM_VECTOR_LEN;
395
- wasm.__wbg_set_excelcolumninfo_key(this.__wbg_ptr, ptr0, len0);
396
- }
397
1277
  /**
398
1278
  * @returns {string}
399
1279
  */
400
- get name() {
1280
+ get sheet_name() {
401
1281
  let deferred1_0;
402
1282
  let deferred1_1;
403
1283
  try {
404
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
405
- wasm.__wbg_get_excelcolumninfo_name(retptr, this.__wbg_ptr);
406
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
407
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
408
- deferred1_0 = r0;
409
- deferred1_1 = r1;
410
- return getStringFromWasm0(r0, r1);
1284
+ const ret = wasm.__wbg_get_excelinfo_sheet_name(this.__wbg_ptr);
1285
+ deferred1_0 = ret[0];
1286
+ deferred1_1 = ret[1];
1287
+ return getStringFromWasm0(ret[0], ret[1]);
411
1288
  } finally {
412
- wasm.__wbindgen_add_to_stack_pointer(16);
413
1289
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
414
1290
  }
415
1291
  }
416
1292
  /**
417
- * @param {string} arg0
1293
+ * @returns {ExcelCellFormat | undefined}
418
1294
  */
419
- set name(arg0) {
420
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
421
- const len0 = WASM_VECTOR_LEN;
422
- wasm.__wbg_set_excelcolumninfo_name(this.__wbg_ptr, ptr0, len0);
1295
+ get title_format() {
1296
+ const ret = wasm.__wbg_get_excelinfo_title_format(this.__wbg_ptr);
1297
+ return ret === 0 ? undefined : ExcelCellFormat.__wrap(ret);
423
1298
  }
424
1299
  /**
425
1300
  * @returns {number | undefined}
426
1301
  */
427
- get width() {
428
- try {
429
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
430
- wasm.__wbg_get_excelcolumninfo_width(retptr, this.__wbg_ptr);
431
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
432
- var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
433
- return r0 === 0 ? undefined : r2;
434
- } finally {
435
- wasm.__wbindgen_add_to_stack_pointer(16);
1302
+ get title_height() {
1303
+ const ret = wasm.__wbg_get_excelinfo_title_height(this.__wbg_ptr);
1304
+ return ret[0] === 0 ? undefined : ret[1];
1305
+ }
1306
+ /**
1307
+ * @returns {string | undefined}
1308
+ */
1309
+ get title() {
1310
+ const ret = wasm.__wbg_get_excelinfo_title(this.__wbg_ptr);
1311
+ let v1;
1312
+ if (ret[0] !== 0) {
1313
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1314
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
436
1315
  }
1316
+ return v1;
437
1317
  }
438
1318
  /**
439
- * @param {number | undefined} [arg0]
1319
+ * @param {string} arg0
440
1320
  */
441
- set width(arg0) {
442
- wasm.__wbg_set_excelcolumninfo_width(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
1321
+ set author(arg0) {
1322
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1323
+ const len0 = WASM_VECTOR_LEN;
1324
+ wasm.__wbg_set_excelinfo_author(this.__wbg_ptr, ptr0, len0);
443
1325
  }
444
1326
  /**
445
- * @returns {string | undefined}
1327
+ * @param {ExcelColumnInfo[]} arg0
446
1328
  */
447
- get note() {
448
- try {
449
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
450
- wasm.__wbg_get_excelcolumninfo_note(retptr, this.__wbg_ptr);
451
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
452
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
453
- let v1;
454
- if (r0 !== 0) {
455
- v1 = getStringFromWasm0(r0, r1).slice();
456
- wasm.__wbindgen_free(r0, r1 * 1, 1);
457
- }
458
- return v1;
459
- } finally {
460
- wasm.__wbindgen_add_to_stack_pointer(16);
461
- }
1329
+ set columns(arg0) {
1330
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1331
+ const len0 = WASM_VECTOR_LEN;
1332
+ wasm.__wbg_set_excelinfo_columns(this.__wbg_ptr, ptr0, len0);
462
1333
  }
463
1334
  /**
464
- * @param {string | undefined} [arg0]
1335
+ * @param {string} arg0
465
1336
  */
466
- set note(arg0) {
467
- var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
468
- var len0 = WASM_VECTOR_LEN;
469
- wasm.__wbg_set_excelcolumninfo_note(this.__wbg_ptr, ptr0, len0);
1337
+ set create_time(arg0) {
1338
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1339
+ const len0 = WASM_VECTOR_LEN;
1340
+ wasm.__wbg_set_excelinfo_create_time(this.__wbg_ptr, ptr0, len0);
470
1341
  }
471
1342
  /**
472
- * @returns {ExcelDataType}
1343
+ * @param {number | null} [arg0]
473
1344
  */
474
- get data_type() {
475
- const ret = wasm.__wbg_get_excelcolumninfo_data_type(this.__wbg_ptr);
476
- return ret;
1345
+ set default_row_height(arg0) {
1346
+ wasm.__wbg_set_excelinfo_default_row_height(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
477
1347
  }
478
1348
  /**
479
- * @param {ExcelDataType} arg0
1349
+ * @param {number} arg0
480
1350
  */
481
- set data_type(arg0) {
482
- wasm.__wbg_set_excelcolumninfo_data_type(this.__wbg_ptr, arg0);
1351
+ set dx(arg0) {
1352
+ wasm.__wbg_set_excelinfo_dx(this.__wbg_ptr, arg0);
483
1353
  }
484
1354
  /**
485
- * @returns {(string)[] | undefined}
1355
+ * @param {number} arg0
486
1356
  */
487
- get allowed_values() {
488
- try {
489
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
490
- wasm.__wbg_get_excelcolumninfo_allowed_values(retptr, this.__wbg_ptr);
491
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
492
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
493
- let v1;
494
- if (r0 !== 0) {
495
- v1 = getArrayJsValueFromWasm0(r0, r1).slice();
496
- wasm.__wbindgen_free(r0, r1 * 4, 4);
497
- }
498
- return v1;
499
- } finally {
500
- wasm.__wbindgen_add_to_stack_pointer(16);
501
- }
1357
+ set dy(arg0) {
1358
+ wasm.__wbg_set_excelinfo_dy(this.__wbg_ptr, arg0);
502
1359
  }
503
1360
  /**
504
- * @param {(string)[] | undefined} [arg0]
1361
+ * @param {number | null} [arg0]
505
1362
  */
506
- set allowed_values(arg0) {
507
- var ptr0 = isLikeNone(arg0) ? 0 : passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
508
- var len0 = WASM_VECTOR_LEN;
509
- wasm.__wbg_set_excelcolumninfo_allowed_values(this.__wbg_ptr, ptr0, len0);
1363
+ set header_row_height(arg0) {
1364
+ wasm.__wbg_set_excelinfo_header_row_height(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
510
1365
  }
511
1366
  /**
512
- * @param {string} key
513
- * @param {string} name
514
- * @param {number | undefined} [width]
1367
+ * @param {boolean} arg0
515
1368
  */
516
- constructor(key, name, width) {
517
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1369
+ set is_header_freeze(arg0) {
1370
+ wasm.__wbg_set_excelinfo_is_header_freeze(this.__wbg_ptr, arg0);
1371
+ }
1372
+ /**
1373
+ * @param {string} arg0
1374
+ */
1375
+ set name(arg0) {
1376
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
518
1377
  const len0 = WASM_VECTOR_LEN;
519
- const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
520
- const len1 = WASM_VECTOR_LEN;
521
- const ret = wasm.excelcolumninfo_new(ptr0, len0, ptr1, len1, !isLikeNone(width), isLikeNone(width) ? 0 : width);
522
- this.__wbg_ptr = ret >>> 0;
523
- ExcelColumnInfoFinalization.register(this, this.__wbg_ptr, this);
524
- return this;
1378
+ wasm.__wbg_set_excelinfo_name(this.__wbg_ptr, ptr0, len0);
525
1379
  }
526
1380
  /**
527
- * @param {string} note
1381
+ * @param {string} arg0
528
1382
  */
529
- setNote(note) {
530
- const ptr0 = passStringToWasm0(note, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1383
+ set sheet_name(arg0) {
1384
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
531
1385
  const len0 = WASM_VECTOR_LEN;
532
- wasm.excelcolumninfo_setNote(this.__wbg_ptr, ptr0, len0);
1386
+ wasm.__wbg_set_excelinfo_sheet_name(this.__wbg_ptr, ptr0, len0);
533
1387
  }
534
1388
  /**
535
- * @param {ExcelDataType} data_type
1389
+ * @param {ExcelCellFormat | null} [arg0]
536
1390
  */
537
- setDataType(data_type) {
538
- wasm.excelcolumninfo_setDataType(this.__wbg_ptr, data_type);
1391
+ set title_format(arg0) {
1392
+ let ptr0 = 0;
1393
+ if (!isLikeNone(arg0)) {
1394
+ _assertClass(arg0, ExcelCellFormat);
1395
+ ptr0 = arg0.__destroy_into_raw();
1396
+ }
1397
+ wasm.__wbg_set_excelinfo_title_format(this.__wbg_ptr, ptr0);
539
1398
  }
540
1399
  /**
541
- * @param {(string)[]} allowed_values
1400
+ * @param {number | null} [arg0]
542
1401
  */
543
- setAllowedValues(allowed_values) {
544
- const ptr0 = passArrayJsValueToWasm0(allowed_values, wasm.__wbindgen_malloc);
545
- const len0 = WASM_VECTOR_LEN;
546
- wasm.excelcolumninfo_setAllowedValues(this.__wbg_ptr, ptr0, len0);
1402
+ set title_height(arg0) {
1403
+ wasm.__wbg_set_excelinfo_title_height(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
1404
+ }
1405
+ /**
1406
+ * @param {string | null} [arg0]
1407
+ */
1408
+ set title(arg0) {
1409
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1410
+ var len0 = WASM_VECTOR_LEN;
1411
+ wasm.__wbg_set_excelinfo_title(this.__wbg_ptr, ptr0, len0);
547
1412
  }
548
1413
  }
1414
+ if (Symbol.dispose) ExcelInfo.prototype[Symbol.dispose] = ExcelInfo.prototype.free;
549
1415
 
550
- const ExcelDataFinalization = (typeof FinalizationRegistry === 'undefined')
551
- ? { register: () => {}, unregister: () => {} }
552
- : new FinalizationRegistry(ptr => wasm.__wbg_exceldata_free(ptr >>> 0, 1));
553
-
554
- export class ExcelData {
555
-
1416
+ export class ExcelRowData {
556
1417
  static __wrap(ptr) {
557
1418
  ptr = ptr >>> 0;
558
- const obj = Object.create(ExcelData.prototype);
1419
+ const obj = Object.create(ExcelRowData.prototype);
559
1420
  obj.__wbg_ptr = ptr;
560
- ExcelDataFinalization.register(obj, obj.__wbg_ptr, obj);
1421
+ ExcelRowDataFinalization.register(obj, obj.__wbg_ptr, obj);
561
1422
  return obj;
562
1423
  }
563
-
1424
+ static __unwrap(jsValue) {
1425
+ if (!(jsValue instanceof ExcelRowData)) {
1426
+ return 0;
1427
+ }
1428
+ return jsValue.__destroy_into_raw();
1429
+ }
564
1430
  __destroy_into_raw() {
565
1431
  const ptr = this.__wbg_ptr;
566
1432
  this.__wbg_ptr = 0;
567
- ExcelDataFinalization.unregister(this);
1433
+ ExcelRowDataFinalization.unregister(this);
568
1434
  return ptr;
569
1435
  }
570
-
571
1436
  free() {
572
1437
  const ptr = this.__destroy_into_raw();
573
- wasm.__wbg_exceldata_free(ptr, 0);
1438
+ wasm.__wbg_excelrowdata_free(ptr, 0);
574
1439
  }
575
1440
  /**
576
- * @returns {(ExcelRowData)[]}
1441
+ * @param {ExcelColumnData[]} columns
577
1442
  */
578
- get rows() {
579
- try {
580
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
581
- wasm.__wbg_get_exceldata_rows(retptr, this.__wbg_ptr);
582
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
583
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
584
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
585
- wasm.__wbindgen_free(r0, r1 * 4, 4);
586
- return v1;
587
- } finally {
588
- wasm.__wbindgen_add_to_stack_pointer(16);
589
- }
1443
+ constructor(columns) {
1444
+ const ptr0 = passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
1445
+ const len0 = WASM_VECTOR_LEN;
1446
+ const ret = wasm.excelrowdata_new(ptr0, len0);
1447
+ this.__wbg_ptr = ret >>> 0;
1448
+ ExcelRowDataFinalization.register(this, this.__wbg_ptr, this);
1449
+ return this;
590
1450
  }
591
1451
  /**
592
- * @param {(ExcelRowData)[]} arg0
1452
+ * @returns {ExcelColumnData[]}
593
1453
  */
594
- set rows(arg0) {
595
- const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
596
- const len0 = WASM_VECTOR_LEN;
597
- wasm.__wbg_set_exceldata_rows(this.__wbg_ptr, ptr0, len0);
1454
+ get columns() {
1455
+ const ret = wasm.__wbg_get_excelrowdata_columns(this.__wbg_ptr);
1456
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
1457
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1458
+ return v1;
598
1459
  }
599
1460
  /**
600
- * @param {(ExcelRowData)[]} rows
1461
+ * @param {ExcelColumnData[]} arg0
601
1462
  */
602
- constructor(rows) {
603
- const ptr0 = passArrayJsValueToWasm0(rows, wasm.__wbindgen_malloc);
1463
+ set columns(arg0) {
1464
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
604
1465
  const len0 = WASM_VECTOR_LEN;
605
- const ret = wasm.exceldata_new(ptr0, len0);
606
- this.__wbg_ptr = ret >>> 0;
607
- ExcelDataFinalization.register(this, this.__wbg_ptr, this);
608
- return this;
1466
+ wasm.__wbg_set_excelrowdata_columns(this.__wbg_ptr, ptr0, len0);
1467
+ }
1468
+ }
1469
+ if (Symbol.dispose) ExcelRowData.prototype[Symbol.dispose] = ExcelRowData.prototype.free;
1470
+
1471
+ /**
1472
+ * @param {ExcelInfo} info
1473
+ * @returns {Uint8Array}
1474
+ */
1475
+ export function createTemplate(info) {
1476
+ _assertClass(info, ExcelInfo);
1477
+ var ptr0 = info.__destroy_into_raw();
1478
+ const ret = wasm.createTemplate(ptr0);
1479
+ if (ret[3]) {
1480
+ throw takeFromExternrefTable0(ret[2]);
1481
+ }
1482
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
1483
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1484
+ return v2;
1485
+ }
1486
+
1487
+ /**
1488
+ * @param {ExcelInfo} info
1489
+ * @param {ExcelData} data
1490
+ * @returns {Promise<any>}
1491
+ */
1492
+ export function exportData(info, data) {
1493
+ _assertClass(info, ExcelInfo);
1494
+ var ptr0 = info.__destroy_into_raw();
1495
+ _assertClass(data, ExcelData);
1496
+ var ptr1 = data.__destroy_into_raw();
1497
+ const ret = wasm.exportData(ptr0, ptr1);
1498
+ return ret;
1499
+ }
1500
+
1501
+ /**
1502
+ * @param {ExcelInfo} info
1503
+ * @param {Uint8Array} excel_bytes
1504
+ * @returns {ExcelData}
1505
+ */
1506
+ export function importData(info, excel_bytes) {
1507
+ _assertClass(info, ExcelInfo);
1508
+ var ptr0 = info.__destroy_into_raw();
1509
+ const ptr1 = passArray8ToWasm0(excel_bytes, wasm.__wbindgen_malloc);
1510
+ const len1 = WASM_VECTOR_LEN;
1511
+ const ret = wasm.importData(ptr0, ptr1, len1);
1512
+ if (ret[2]) {
1513
+ throw takeFromExternrefTable0(ret[1]);
1514
+ }
1515
+ return ExcelData.__wrap(ret[0]);
1516
+ }
1517
+
1518
+ /**
1519
+ * @param {string | null | undefined} sheet_name
1520
+ * @param {number | null | undefined} header_row
1521
+ * @param {Uint8Array} excel_bytes
1522
+ * @returns {DynamicExcelData}
1523
+ */
1524
+ export function importDynamicData(sheet_name, header_row, excel_bytes) {
1525
+ var ptr0 = isLikeNone(sheet_name) ? 0 : passStringToWasm0(sheet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1526
+ var len0 = WASM_VECTOR_LEN;
1527
+ const ptr1 = passArray8ToWasm0(excel_bytes, wasm.__wbindgen_malloc);
1528
+ const len1 = WASM_VECTOR_LEN;
1529
+ const ret = wasm.importDynamicData(ptr0, len0, isLikeNone(header_row) ? 0x100000001 : (header_row) >>> 0, ptr1, len1);
1530
+ if (ret[2]) {
1531
+ throw takeFromExternrefTable0(ret[1]);
1532
+ }
1533
+ return DynamicExcelData.__wrap(ret[0]);
1534
+ }
1535
+
1536
+ function __wbg_get_imports() {
1537
+ const import0 = {
1538
+ __proto__: null,
1539
+ __wbg_Error_7c536b7a8123d334: function(arg0, arg1) {
1540
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1541
+ return ret;
1542
+ },
1543
+ __wbg___wbindgen_debug_string_8baecc377ad92880: function(arg0, arg1) {
1544
+ const ret = debugString(arg1);
1545
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1546
+ const len1 = WASM_VECTOR_LEN;
1547
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1548
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1549
+ },
1550
+ __wbg___wbindgen_is_function_d4c2480b46f29e33: function(arg0) {
1551
+ const ret = typeof(arg0) === 'function';
1552
+ return ret;
1553
+ },
1554
+ __wbg___wbindgen_is_object_e04e3a51a90cde43: function(arg0) {
1555
+ const val = arg0;
1556
+ const ret = typeof(val) === 'object' && val !== null;
1557
+ return ret;
1558
+ },
1559
+ __wbg___wbindgen_is_undefined_5957b329897cc39c: function(arg0) {
1560
+ const ret = arg0 === undefined;
1561
+ return ret;
1562
+ },
1563
+ __wbg___wbindgen_string_get_ae6081df8158aa73: function(arg0, arg1) {
1564
+ const obj = arg1;
1565
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1566
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1567
+ var len1 = WASM_VECTOR_LEN;
1568
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1569
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1570
+ },
1571
+ __wbg___wbindgen_throw_bd5a70920abf0236: function(arg0, arg1) {
1572
+ throw new Error(getStringFromWasm0(arg0, arg1));
1573
+ },
1574
+ __wbg__wbg_cb_unref_207c541c2d58dfb3: function(arg0) {
1575
+ arg0._wbg_cb_unref();
1576
+ },
1577
+ __wbg_call_1aea13500fe8ff6c: function() { return handleError(function (arg0, arg1, arg2) {
1578
+ const ret = arg0.call(arg1, arg2);
1579
+ return ret;
1580
+ }, arguments); },
1581
+ __wbg_excelcellformat_new: function(arg0) {
1582
+ const ret = ExcelCellFormat.__wrap(arg0);
1583
+ return ret;
1584
+ },
1585
+ __wbg_excelcellformat_unwrap: function(arg0) {
1586
+ const ret = ExcelCellFormat.__unwrap(arg0);
1587
+ return ret;
1588
+ },
1589
+ __wbg_excelcolumndata_new: function(arg0) {
1590
+ const ret = ExcelColumnData.__wrap(arg0);
1591
+ return ret;
1592
+ },
1593
+ __wbg_excelcolumndata_unwrap: function(arg0) {
1594
+ const ret = ExcelColumnData.__unwrap(arg0);
1595
+ return ret;
1596
+ },
1597
+ __wbg_excelcolumninfo_new: function(arg0) {
1598
+ const ret = ExcelColumnInfo.__wrap(arg0);
1599
+ return ret;
1600
+ },
1601
+ __wbg_excelcolumninfo_unwrap: function(arg0) {
1602
+ const ret = ExcelColumnInfo.__unwrap(arg0);
1603
+ return ret;
1604
+ },
1605
+ __wbg_excelrowdata_new: function(arg0) {
1606
+ const ret = ExcelRowData.__wrap(arg0);
1607
+ return ret;
1608
+ },
1609
+ __wbg_excelrowdata_unwrap: function(arg0) {
1610
+ const ret = ExcelRowData.__unwrap(arg0);
1611
+ return ret;
1612
+ },
1613
+ __wbg_length_090b6aa6235450ba: function(arg0) {
1614
+ const ret = arg0.length;
1615
+ return ret;
1616
+ },
1617
+ __wbg_new_4774b8d4db1224e4: function(arg0) {
1618
+ const ret = new Uint8Array(arg0);
1619
+ return ret;
1620
+ },
1621
+ __wbg_new_from_slice_2733a138cec5cdcf: function(arg0, arg1) {
1622
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1623
+ return ret;
1624
+ },
1625
+ __wbg_new_typed_5101eada2c6754de: function(arg0, arg1) {
1626
+ try {
1627
+ var state0 = {a: arg0, b: arg1};
1628
+ var cb0 = (arg0, arg1) => {
1629
+ const a = state0.a;
1630
+ state0.a = 0;
1631
+ try {
1632
+ return wasm_bindgen__convert__closures_____invoke__h1f6390709e7a2f81(a, state0.b, arg0, arg1);
1633
+ } finally {
1634
+ state0.a = a;
1635
+ }
1636
+ };
1637
+ const ret = new Promise(cb0);
1638
+ return ret;
1639
+ } finally {
1640
+ state0.a = 0;
1641
+ }
1642
+ },
1643
+ __wbg_now_cd850b0a28a6e656: function() {
1644
+ const ret = Date.now();
1645
+ return ret;
1646
+ },
1647
+ __wbg_prototypesetcall_7dca54d31cb9d2dc: function(arg0, arg1, arg2) {
1648
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1649
+ },
1650
+ __wbg_queueMicrotask_1f50b4bdf2c98605: function(arg0) {
1651
+ queueMicrotask(arg0);
1652
+ },
1653
+ __wbg_queueMicrotask_805204511f79bee8: function(arg0) {
1654
+ const ret = arg0.queueMicrotask;
1655
+ return ret;
1656
+ },
1657
+ __wbg_resolve_bb4df27803d377b2: function(arg0) {
1658
+ const ret = Promise.resolve(arg0);
1659
+ return ret;
1660
+ },
1661
+ __wbg_static_accessor_GLOBAL_44bef9fa6011e260: function() {
1662
+ const ret = typeof global === 'undefined' ? null : global;
1663
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1664
+ },
1665
+ __wbg_static_accessor_GLOBAL_THIS_13002645baf43d84: function() {
1666
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1667
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1668
+ },
1669
+ __wbg_static_accessor_SELF_91d0abd4d035416c: function() {
1670
+ const ret = typeof self === 'undefined' ? null : self;
1671
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1672
+ },
1673
+ __wbg_static_accessor_WINDOW_513f857c65724fc7: function() {
1674
+ const ret = typeof window === 'undefined' ? null : window;
1675
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1676
+ },
1677
+ __wbg_then_d9ebfadd74ddfbb2: function(arg0, arg1) {
1678
+ const ret = arg0.then(arg1);
1679
+ return ret;
1680
+ },
1681
+ __wbg_then_f6dedb0d880db23a: function(arg0, arg1, arg2) {
1682
+ const ret = arg0.then(arg1, arg2);
1683
+ return ret;
1684
+ },
1685
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1686
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 366, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1687
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__ha7d74a6bd6ac009d);
1688
+ return ret;
1689
+ },
1690
+ __wbindgen_cast_0000000000000002: function(arg0) {
1691
+ // Cast intrinsic for `F64 -> Externref`.
1692
+ const ret = arg0;
1693
+ return ret;
1694
+ },
1695
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1696
+ // Cast intrinsic for `Ref(String) -> Externref`.
1697
+ const ret = getStringFromWasm0(arg0, arg1);
1698
+ return ret;
1699
+ },
1700
+ __wbindgen_init_externref_table: function() {
1701
+ const table = wasm.__wbindgen_externrefs;
1702
+ const offset = table.grow(4);
1703
+ table.set(0, undefined);
1704
+ table.set(offset + 0, undefined);
1705
+ table.set(offset + 1, null);
1706
+ table.set(offset + 2, true);
1707
+ table.set(offset + 3, false);
1708
+ },
1709
+ };
1710
+ return {
1711
+ __proto__: null,
1712
+ "./imexport_wasm_bg.js": import0,
1713
+ };
1714
+ }
1715
+
1716
+ function wasm_bindgen__convert__closures_____invoke__ha7d74a6bd6ac009d(arg0, arg1, arg2) {
1717
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__ha7d74a6bd6ac009d(arg0, arg1, arg2);
1718
+ if (ret[1]) {
1719
+ throw takeFromExternrefTable0(ret[0]);
609
1720
  }
610
1721
  }
611
1722
 
1723
+ function wasm_bindgen__convert__closures_____invoke__h1f6390709e7a2f81(arg0, arg1, arg2, arg3) {
1724
+ wasm.wasm_bindgen__convert__closures_____invoke__h1f6390709e7a2f81(arg0, arg1, arg2, arg3);
1725
+ }
1726
+
1727
+ const DynamicExcelDataFinalization = (typeof FinalizationRegistry === 'undefined')
1728
+ ? { register: () => {}, unregister: () => {} }
1729
+ : new FinalizationRegistry(ptr => wasm.__wbg_dynamicexceldata_free(ptr >>> 0, 1));
1730
+ const ExcelCellFormatFinalization = (typeof FinalizationRegistry === 'undefined')
1731
+ ? { register: () => {}, unregister: () => {} }
1732
+ : new FinalizationRegistry(ptr => wasm.__wbg_excelcellformat_free(ptr >>> 0, 1));
1733
+ const ExcelColumnDataFinalization = (typeof FinalizationRegistry === 'undefined')
1734
+ ? { register: () => {}, unregister: () => {} }
1735
+ : new FinalizationRegistry(ptr => wasm.__wbg_excelcolumndata_free(ptr >>> 0, 1));
1736
+ const ExcelColumnInfoFinalization = (typeof FinalizationRegistry === 'undefined')
1737
+ ? { register: () => {}, unregister: () => {} }
1738
+ : new FinalizationRegistry(ptr => wasm.__wbg_excelcolumninfo_free(ptr >>> 0, 1));
1739
+ const ExcelDataFinalization = (typeof FinalizationRegistry === 'undefined')
1740
+ ? { register: () => {}, unregister: () => {} }
1741
+ : new FinalizationRegistry(ptr => wasm.__wbg_exceldata_free(ptr >>> 0, 1));
612
1742
  const ExcelInfoFinalization = (typeof FinalizationRegistry === 'undefined')
613
1743
  ? { register: () => {}, unregister: () => {} }
614
1744
  : new FinalizationRegistry(ptr => wasm.__wbg_excelinfo_free(ptr >>> 0, 1));
1745
+ const ExcelRowDataFinalization = (typeof FinalizationRegistry === 'undefined')
1746
+ ? { register: () => {}, unregister: () => {} }
1747
+ : new FinalizationRegistry(ptr => wasm.__wbg_excelrowdata_free(ptr >>> 0, 1));
615
1748
 
616
- export class ExcelInfo {
617
-
618
- __destroy_into_raw() {
619
- const ptr = this.__wbg_ptr;
620
- this.__wbg_ptr = 0;
621
- ExcelInfoFinalization.unregister(this);
622
- return ptr;
623
- }
1749
+ function addToExternrefTable0(obj) {
1750
+ const idx = wasm.__externref_table_alloc();
1751
+ wasm.__wbindgen_externrefs.set(idx, obj);
1752
+ return idx;
1753
+ }
624
1754
 
625
- free() {
626
- const ptr = this.__destroy_into_raw();
627
- wasm.__wbg_excelinfo_free(ptr, 0);
628
- }
629
- /**
630
- * @returns {string}
631
- */
632
- get name() {
633
- let deferred1_0;
634
- let deferred1_1;
635
- try {
636
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
637
- wasm.__wbg_get_excelinfo_name(retptr, this.__wbg_ptr);
638
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
639
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
640
- deferred1_0 = r0;
641
- deferred1_1 = r1;
642
- return getStringFromWasm0(r0, r1);
643
- } finally {
644
- wasm.__wbindgen_add_to_stack_pointer(16);
645
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
646
- }
647
- }
648
- /**
649
- * @param {string} arg0
650
- */
651
- set name(arg0) {
652
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
653
- const len0 = WASM_VECTOR_LEN;
654
- wasm.__wbg_set_excelinfo_name(this.__wbg_ptr, ptr0, len0);
655
- }
656
- /**
657
- * @returns {string}
658
- */
659
- get sheet_name() {
660
- let deferred1_0;
661
- let deferred1_1;
662
- try {
663
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
664
- wasm.__wbg_get_excelinfo_sheet_name(retptr, this.__wbg_ptr);
665
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
666
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
667
- deferred1_0 = r0;
668
- deferred1_1 = r1;
669
- return getStringFromWasm0(r0, r1);
670
- } finally {
671
- wasm.__wbindgen_add_to_stack_pointer(16);
672
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
673
- }
674
- }
675
- /**
676
- * @param {string} arg0
677
- */
678
- set sheet_name(arg0) {
679
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
680
- const len0 = WASM_VECTOR_LEN;
681
- wasm.__wbg_set_excelinfo_sheet_name(this.__wbg_ptr, ptr0, len0);
1755
+ function _assertClass(instance, klass) {
1756
+ if (!(instance instanceof klass)) {
1757
+ throw new Error(`expected instance of ${klass.name}`);
682
1758
  }
683
- /**
684
- * @returns {(ExcelColumnInfo)[]}
685
- */
686
- get columns() {
687
- try {
688
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
689
- wasm.__wbg_get_excelinfo_columns(retptr, this.__wbg_ptr);
690
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
691
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
692
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
693
- wasm.__wbindgen_free(r0, r1 * 4, 4);
694
- return v1;
695
- } finally {
696
- wasm.__wbindgen_add_to_stack_pointer(16);
697
- }
1759
+ }
1760
+
1761
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1762
+ ? { register: () => {}, unregister: () => {} }
1763
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
1764
+
1765
+ function debugString(val) {
1766
+ // primitive types
1767
+ const type = typeof val;
1768
+ if (type == 'number' || type == 'boolean' || val == null) {
1769
+ return `${val}`;
698
1770
  }
699
- /**
700
- * @param {(ExcelColumnInfo)[]} arg0
701
- */
702
- set columns(arg0) {
703
- const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
704
- const len0 = WASM_VECTOR_LEN;
705
- wasm.__wbg_set_excelinfo_columns(this.__wbg_ptr, ptr0, len0);
1771
+ if (type == 'string') {
1772
+ return `"${val}"`;
706
1773
  }
707
- /**
708
- * @returns {string}
709
- */
710
- get author() {
711
- let deferred1_0;
712
- let deferred1_1;
713
- try {
714
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
715
- wasm.__wbg_get_excelinfo_author(retptr, this.__wbg_ptr);
716
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
717
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
718
- deferred1_0 = r0;
719
- deferred1_1 = r1;
720
- return getStringFromWasm0(r0, r1);
721
- } finally {
722
- wasm.__wbindgen_add_to_stack_pointer(16);
723
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1774
+ if (type == 'symbol') {
1775
+ const description = val.description;
1776
+ if (description == null) {
1777
+ return 'Symbol';
1778
+ } else {
1779
+ return `Symbol(${description})`;
724
1780
  }
725
1781
  }
726
- /**
727
- * @param {string} arg0
728
- */
729
- set author(arg0) {
730
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
731
- const len0 = WASM_VECTOR_LEN;
732
- wasm.__wbg_set_excelinfo_author(this.__wbg_ptr, ptr0, len0);
1782
+ if (type == 'function') {
1783
+ const name = val.name;
1784
+ if (typeof name == 'string' && name.length > 0) {
1785
+ return `Function(${name})`;
1786
+ } else {
1787
+ return 'Function';
1788
+ }
733
1789
  }
734
- /**
735
- * @returns {string}
736
- */
737
- get create_time() {
738
- let deferred1_0;
739
- let deferred1_1;
1790
+ // objects
1791
+ if (Array.isArray(val)) {
1792
+ const length = val.length;
1793
+ let debug = '[';
1794
+ if (length > 0) {
1795
+ debug += debugString(val[0]);
1796
+ }
1797
+ for(let i = 1; i < length; i++) {
1798
+ debug += ', ' + debugString(val[i]);
1799
+ }
1800
+ debug += ']';
1801
+ return debug;
1802
+ }
1803
+ // Test for built-in
1804
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1805
+ let className;
1806
+ if (builtInMatches && builtInMatches.length > 1) {
1807
+ className = builtInMatches[1];
1808
+ } else {
1809
+ // Failed to match the standard '[object ClassName]'
1810
+ return toString.call(val);
1811
+ }
1812
+ if (className == 'Object') {
1813
+ // we're a user defined class or Object
1814
+ // JSON.stringify avoids problems with cycles, and is generally much
1815
+ // easier than looping through ownProperties of `val`.
740
1816
  try {
741
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
742
- wasm.__wbg_get_excelinfo_create_time(retptr, this.__wbg_ptr);
743
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
744
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
745
- deferred1_0 = r0;
746
- deferred1_1 = r1;
747
- return getStringFromWasm0(r0, r1);
748
- } finally {
749
- wasm.__wbindgen_add_to_stack_pointer(16);
750
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1817
+ return 'Object(' + JSON.stringify(val) + ')';
1818
+ } catch (_) {
1819
+ return 'Object';
751
1820
  }
752
1821
  }
753
- /**
754
- * @param {string} arg0
755
- */
756
- set create_time(arg0) {
757
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
758
- const len0 = WASM_VECTOR_LEN;
759
- wasm.__wbg_set_excelinfo_create_time(this.__wbg_ptr, ptr0, len0);
1822
+ // errors
1823
+ if (val instanceof Error) {
1824
+ return `${val.name}: ${val.message}\n${val.stack}`;
760
1825
  }
761
- /**
762
- * @param {string} name
763
- * @param {string} sheet_name
764
- * @param {(ExcelColumnInfo)[]} columns
765
- * @param {string} author
766
- * @param {string} create_time
767
- */
768
- constructor(name, sheet_name, columns, author, create_time) {
769
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
770
- const len0 = WASM_VECTOR_LEN;
771
- const ptr1 = passStringToWasm0(sheet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
772
- const len1 = WASM_VECTOR_LEN;
773
- const ptr2 = passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
774
- const len2 = WASM_VECTOR_LEN;
775
- const ptr3 = passStringToWasm0(author, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
776
- const len3 = WASM_VECTOR_LEN;
777
- const ptr4 = passStringToWasm0(create_time, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
778
- const len4 = WASM_VECTOR_LEN;
779
- const ret = wasm.excelinfo_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
780
- this.__wbg_ptr = ret >>> 0;
781
- ExcelInfoFinalization.register(this, this.__wbg_ptr, this);
782
- return this;
1826
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1827
+ return className;
1828
+ }
1829
+
1830
+ function getArrayJsValueFromWasm0(ptr, len) {
1831
+ ptr = ptr >>> 0;
1832
+ const mem = getDataViewMemory0();
1833
+ const result = [];
1834
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
1835
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
783
1836
  }
1837
+ wasm.__externref_drop_slice(ptr, len);
1838
+ return result;
784
1839
  }
785
1840
 
786
- const ExcelRowDataFinalization = (typeof FinalizationRegistry === 'undefined')
787
- ? { register: () => {}, unregister: () => {} }
788
- : new FinalizationRegistry(ptr => wasm.__wbg_excelrowdata_free(ptr >>> 0, 1));
1841
+ function getArrayU8FromWasm0(ptr, len) {
1842
+ ptr = ptr >>> 0;
1843
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1844
+ }
789
1845
 
790
- export class ExcelRowData {
1846
+ let cachedDataViewMemory0 = null;
1847
+ function getDataViewMemory0() {
1848
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1849
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1850
+ }
1851
+ return cachedDataViewMemory0;
1852
+ }
791
1853
 
792
- static __wrap(ptr) {
793
- ptr = ptr >>> 0;
794
- const obj = Object.create(ExcelRowData.prototype);
795
- obj.__wbg_ptr = ptr;
796
- ExcelRowDataFinalization.register(obj, obj.__wbg_ptr, obj);
797
- return obj;
1854
+ function getStringFromWasm0(ptr, len) {
1855
+ ptr = ptr >>> 0;
1856
+ return decodeText(ptr, len);
1857
+ }
1858
+
1859
+ let cachedUint8ArrayMemory0 = null;
1860
+ function getUint8ArrayMemory0() {
1861
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1862
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
798
1863
  }
1864
+ return cachedUint8ArrayMemory0;
1865
+ }
799
1866
 
800
- static __unwrap(jsValue) {
801
- if (!(jsValue instanceof ExcelRowData)) {
802
- return 0;
1867
+ function handleError(f, args) {
1868
+ try {
1869
+ return f.apply(this, args);
1870
+ } catch (e) {
1871
+ const idx = addToExternrefTable0(e);
1872
+ wasm.__wbindgen_exn_store(idx);
1873
+ }
1874
+ }
1875
+
1876
+ function isLikeNone(x) {
1877
+ return x === undefined || x === null;
1878
+ }
1879
+
1880
+ function makeMutClosure(arg0, arg1, f) {
1881
+ const state = { a: arg0, b: arg1, cnt: 1 };
1882
+ const real = (...args) => {
1883
+
1884
+ // First up with a closure we increment the internal reference
1885
+ // count. This ensures that the Rust closure environment won't
1886
+ // be deallocated while we're invoking it.
1887
+ state.cnt++;
1888
+ const a = state.a;
1889
+ state.a = 0;
1890
+ try {
1891
+ return f(a, state.b, ...args);
1892
+ } finally {
1893
+ state.a = a;
1894
+ real._wbg_cb_unref();
803
1895
  }
804
- return jsValue.__destroy_into_raw();
1896
+ };
1897
+ real._wbg_cb_unref = () => {
1898
+ if (--state.cnt === 0) {
1899
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1900
+ state.a = 0;
1901
+ CLOSURE_DTORS.unregister(state);
1902
+ }
1903
+ };
1904
+ CLOSURE_DTORS.register(real, state, state);
1905
+ return real;
1906
+ }
1907
+
1908
+ function passArray8ToWasm0(arg, malloc) {
1909
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
1910
+ getUint8ArrayMemory0().set(arg, ptr / 1);
1911
+ WASM_VECTOR_LEN = arg.length;
1912
+ return ptr;
1913
+ }
1914
+
1915
+ function passArrayJsValueToWasm0(array, malloc) {
1916
+ const ptr = malloc(array.length * 4, 4) >>> 0;
1917
+ for (let i = 0; i < array.length; i++) {
1918
+ const add = addToExternrefTable0(array[i]);
1919
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
805
1920
  }
1921
+ WASM_VECTOR_LEN = array.length;
1922
+ return ptr;
1923
+ }
806
1924
 
807
- __destroy_into_raw() {
808
- const ptr = this.__wbg_ptr;
809
- this.__wbg_ptr = 0;
810
- ExcelRowDataFinalization.unregister(this);
1925
+ function passStringToWasm0(arg, malloc, realloc) {
1926
+ if (realloc === undefined) {
1927
+ const buf = cachedTextEncoder.encode(arg);
1928
+ const ptr = malloc(buf.length, 1) >>> 0;
1929
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1930
+ WASM_VECTOR_LEN = buf.length;
811
1931
  return ptr;
812
1932
  }
813
1933
 
814
- free() {
815
- const ptr = this.__destroy_into_raw();
816
- wasm.__wbg_excelrowdata_free(ptr, 0);
1934
+ let len = arg.length;
1935
+ let ptr = malloc(len, 1) >>> 0;
1936
+
1937
+ const mem = getUint8ArrayMemory0();
1938
+
1939
+ let offset = 0;
1940
+
1941
+ for (; offset < len; offset++) {
1942
+ const code = arg.charCodeAt(offset);
1943
+ if (code > 0x7F) break;
1944
+ mem[ptr + offset] = code;
817
1945
  }
818
- /**
819
- * @returns {(ExcelColumnData)[]}
820
- */
821
- get columns() {
822
- try {
823
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
824
- wasm.__wbg_get_excelrowdata_columns(retptr, this.__wbg_ptr);
825
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
826
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
827
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
828
- wasm.__wbindgen_free(r0, r1 * 4, 4);
829
- return v1;
830
- } finally {
831
- wasm.__wbindgen_add_to_stack_pointer(16);
1946
+ if (offset !== len) {
1947
+ if (offset !== 0) {
1948
+ arg = arg.slice(offset);
832
1949
  }
1950
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1951
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1952
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1953
+
1954
+ offset += ret.written;
1955
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
833
1956
  }
834
- /**
835
- * @param {(ExcelColumnData)[]} arg0
836
- */
837
- set columns(arg0) {
838
- const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
839
- const len0 = WASM_VECTOR_LEN;
840
- wasm.__wbg_set_excelrowdata_columns(this.__wbg_ptr, ptr0, len0);
841
- }
842
- /**
843
- * @param {(ExcelColumnData)[]} columns
844
- */
845
- constructor(columns) {
846
- const ptr0 = passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
847
- const len0 = WASM_VECTOR_LEN;
848
- const ret = wasm.excelrowdata_new(ptr0, len0);
849
- this.__wbg_ptr = ret >>> 0;
850
- ExcelRowDataFinalization.register(this, this.__wbg_ptr, this);
851
- return this;
1957
+
1958
+ WASM_VECTOR_LEN = offset;
1959
+ return ptr;
1960
+ }
1961
+
1962
+ function takeFromExternrefTable0(idx) {
1963
+ const value = wasm.__wbindgen_externrefs.get(idx);
1964
+ wasm.__externref_table_dealloc(idx);
1965
+ return value;
1966
+ }
1967
+
1968
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1969
+ cachedTextDecoder.decode();
1970
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1971
+ let numBytesDecoded = 0;
1972
+ function decodeText(ptr, len) {
1973
+ numBytesDecoded += len;
1974
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1975
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1976
+ cachedTextDecoder.decode();
1977
+ numBytesDecoded = len;
852
1978
  }
1979
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1980
+ }
1981
+
1982
+ const cachedTextEncoder = new TextEncoder();
1983
+
1984
+ if (!('encodeInto' in cachedTextEncoder)) {
1985
+ cachedTextEncoder.encodeInto = function (arg, view) {
1986
+ const buf = cachedTextEncoder.encode(arg);
1987
+ view.set(buf);
1988
+ return {
1989
+ read: arg.length,
1990
+ written: buf.length
1991
+ };
1992
+ };
1993
+ }
1994
+
1995
+ let WASM_VECTOR_LEN = 0;
1996
+
1997
+ let wasmModule, wasm;
1998
+ function __wbg_finalize_init(instance, module) {
1999
+ wasm = instance.exports;
2000
+ wasmModule = module;
2001
+ cachedDataViewMemory0 = null;
2002
+ cachedUint8ArrayMemory0 = null;
2003
+ wasm.__wbindgen_start();
2004
+ return wasm;
853
2005
  }
854
2006
 
855
2007
  async function __wbg_load(module, imports) {
@@ -857,105 +2009,41 @@ async function __wbg_load(module, imports) {
857
2009
  if (typeof WebAssembly.instantiateStreaming === 'function') {
858
2010
  try {
859
2011
  return await WebAssembly.instantiateStreaming(module, imports);
860
-
861
2012
  } catch (e) {
862
- if (module.headers.get('Content-Type') != 'application/wasm') {
2013
+ const validResponse = module.ok && expectedResponseType(module.type);
2014
+
2015
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
863
2016
  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);
864
2017
 
865
- } else {
866
- throw e;
867
- }
2018
+ } else { throw e; }
868
2019
  }
869
2020
  }
870
2021
 
871
2022
  const bytes = await module.arrayBuffer();
872
2023
  return await WebAssembly.instantiate(bytes, imports);
873
-
874
2024
  } else {
875
2025
  const instance = await WebAssembly.instantiate(module, imports);
876
2026
 
877
2027
  if (instance instanceof WebAssembly.Instance) {
878
2028
  return { instance, module };
879
-
880
2029
  } else {
881
2030
  return instance;
882
2031
  }
883
2032
  }
884
- }
885
-
886
- function __wbg_get_imports() {
887
- const imports = {};
888
- imports.wbg = {};
889
- imports.wbg.__wbg_excelcolumninfo_new = function(arg0) {
890
- const ret = ExcelColumnInfo.__wrap(arg0);
891
- return addHeapObject(ret);
892
- };
893
- imports.wbg.__wbg_excelcolumndata_new = function(arg0) {
894
- const ret = ExcelColumnData.__wrap(arg0);
895
- return addHeapObject(ret);
896
- };
897
- imports.wbg.__wbg_excelrowdata_new = function(arg0) {
898
- const ret = ExcelRowData.__wrap(arg0);
899
- return addHeapObject(ret);
900
- };
901
- imports.wbg.__wbg_excelcolumndata_unwrap = function(arg0) {
902
- const ret = ExcelColumnData.__unwrap(takeObject(arg0));
903
- return ret;
904
- };
905
- imports.wbg.__wbg_excelrowdata_unwrap = function(arg0) {
906
- const ret = ExcelRowData.__unwrap(takeObject(arg0));
907
- return ret;
908
- };
909
- imports.wbg.__wbg_excelcolumninfo_unwrap = function(arg0) {
910
- const ret = ExcelColumnInfo.__unwrap(takeObject(arg0));
911
- return ret;
912
- };
913
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
914
- takeObject(arg0);
915
- };
916
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
917
- const ret = getStringFromWasm0(arg0, arg1);
918
- return addHeapObject(ret);
919
- };
920
- imports.wbg.__wbg_now_70af4fe37a792251 = function() {
921
- const ret = Date.now();
922
- return ret;
923
- };
924
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
925
- const obj = getObject(arg1);
926
- const ret = typeof(obj) === 'string' ? obj : undefined;
927
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
928
- var len1 = WASM_VECTOR_LEN;
929
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
930
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
931
- };
932
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
933
- throw new Error(getStringFromWasm0(arg0, arg1));
934
- };
935
-
936
- return imports;
937
- }
938
-
939
- function __wbg_init_memory(imports, memory) {
940
-
941
- }
942
-
943
- function __wbg_finalize_init(instance, module) {
944
- wasm = instance.exports;
945
- __wbg_init.__wbindgen_wasm_module = module;
946
- cachedDataViewMemory0 = null;
947
- cachedUint8ArrayMemory0 = null;
948
-
949
-
950
2033
 
951
- return wasm;
2034
+ function expectedResponseType(type) {
2035
+ switch (type) {
2036
+ case 'basic': case 'cors': case 'default': return true;
2037
+ }
2038
+ return false;
2039
+ }
952
2040
  }
953
2041
 
954
2042
  function initSync(module) {
955
2043
  if (wasm !== undefined) return wasm;
956
2044
 
957
2045
 
958
- if (typeof module !== 'undefined') {
2046
+ if (module !== undefined) {
959
2047
  if (Object.getPrototypeOf(module) === Object.prototype) {
960
2048
  ({module} = module)
961
2049
  } else {
@@ -964,15 +2052,10 @@ function initSync(module) {
964
2052
  }
965
2053
 
966
2054
  const imports = __wbg_get_imports();
967
-
968
- __wbg_init_memory(imports);
969
-
970
2055
  if (!(module instanceof WebAssembly.Module)) {
971
2056
  module = new WebAssembly.Module(module);
972
2057
  }
973
-
974
2058
  const instance = new WebAssembly.Instance(module, imports);
975
-
976
2059
  return __wbg_finalize_init(instance, module);
977
2060
  }
978
2061
 
@@ -980,7 +2063,7 @@ async function __wbg_init(module_or_path) {
980
2063
  if (wasm !== undefined) return wasm;
981
2064
 
982
2065
 
983
- if (typeof module_or_path !== 'undefined') {
2066
+ if (module_or_path !== undefined) {
984
2067
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
985
2068
  ({module_or_path} = module_or_path)
986
2069
  } else {
@@ -988,7 +2071,7 @@ async function __wbg_init(module_or_path) {
988
2071
  }
989
2072
  }
990
2073
 
991
- if (typeof module_or_path === 'undefined') {
2074
+ if (module_or_path === undefined) {
992
2075
  module_or_path = new URL('imexport_wasm_bg.wasm', import.meta.url);
993
2076
  }
994
2077
  const imports = __wbg_get_imports();
@@ -997,12 +2080,9 @@ async function __wbg_init(module_or_path) {
997
2080
  module_or_path = fetch(module_or_path);
998
2081
  }
999
2082
 
1000
- __wbg_init_memory(imports);
1001
-
1002
2083
  const { instance, module } = await __wbg_load(await module_or_path, imports);
1003
2084
 
1004
2085
  return __wbg_finalize_init(instance, module);
1005
2086
  }
1006
2087
 
1007
- export { initSync };
1008
- export default __wbg_init;
2088
+ export { initSync, __wbg_init as default };