read-excel-file 9.3.3 → 9.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +32 -2
- package/browser/index.cjs +3 -0
- package/browser/index.d.ts +16 -0
- package/browser/index.js +4 -1
- package/bundle/read-excel-file.min.js +1 -1
- package/bundle/read-excel-file.min.js.map +1 -1
- package/commonjs/export/convertInputToNodeStream.js +0 -12
- package/commonjs/export/convertInputToNodeStream.js.map +1 -1
- package/commonjs/export/parseSheet.js +14 -7
- package/commonjs/export/parseSheet.js.map +1 -1
- package/commonjs/export/readSheetBrowser.js +3 -6
- package/commonjs/export/readSheetBrowser.js.map +1 -1
- package/commonjs/export/readSheetNode.js +3 -6
- package/commonjs/export/readSheetNode.js.map +1 -1
- package/commonjs/export/readSheetUniversal.js +2 -2
- package/commonjs/export/readSheetUniversal.js.map +1 -1
- package/commonjs/export/readSheetWebWorker.js +5 -5
- package/commonjs/export/readSheetWebWorker.js.map +1 -1
- package/commonjs/export/readXlsxFileBrowser.js +3 -6
- package/commonjs/export/readXlsxFileBrowser.js.map +1 -1
- package/commonjs/export/readXlsxFileNode.js +3 -6
- package/commonjs/export/readXlsxFileNode.js.map +1 -1
- package/commonjs/export/readXlsxFileUniversal.js +2 -2
- package/commonjs/export/readXlsxFileUniversal.js.map +1 -1
- package/commonjs/export/readXlsxFileWebWorker.js +5 -5
- package/commonjs/export/readXlsxFileWebWorker.js.map +1 -1
- package/commonjs/export/unpackXlsxFileBrowser.js +15 -4
- package/commonjs/export/unpackXlsxFileBrowser.js.map +1 -1
- package/commonjs/export/unpackXlsxFileBrowser.test.js.map +1 -0
- package/commonjs/export/unpackXlsxFileNode.js +32 -5
- package/commonjs/export/unpackXlsxFileNode.js.map +1 -1
- package/commonjs/export/unpackXlsxFileNode.test.js.map +1 -0
- package/commonjs/export/unpackXlsxFileUniversal.js +14 -3
- package/commonjs/export/unpackXlsxFileUniversal.js.map +1 -1
- package/commonjs/export/unpackXlsxFileUniversal.test.js.map +1 -0
- package/commonjs/parseSheetData/parseSheetData.js +9 -6
- package/commonjs/parseSheetData/parseSheetData.js.map +1 -1
- package/commonjs/saxen/parser.js +1 -1
- package/commonjs/saxen/parser.js.map +1 -1
- package/commonjs/utility/convertValuesFromUint8ArraysToStrings.js +100 -0
- package/commonjs/utility/convertValuesFromUint8ArraysToStrings.js.map +1 -0
- package/commonjs/xlsx/InvalidSpreadsheetError.js +55 -0
- package/commonjs/xlsx/InvalidSpreadsheetError.js.map +1 -0
- package/commonjs/xlsx/SheetNotFoundError.js +55 -0
- package/commonjs/xlsx/SheetNotFoundError.js.map +1 -0
- package/commonjs/xlsx/file/InputValidationStream.js +101 -0
- package/commonjs/xlsx/file/InputValidationStream.js.map +1 -0
- package/commonjs/xlsx/file/InputValidationStream.test.js.map +1 -0
- package/commonjs/xlsx/file/InvalidInputError.js +105 -0
- package/commonjs/xlsx/file/InvalidInputError.js.map +1 -0
- package/commonjs/xlsx/file/createFileTypeDetector.js +70 -0
- package/commonjs/xlsx/file/createFileTypeDetector.js.map +1 -0
- package/commonjs/xlsx/file/createFileTypeDetector.test.js.map +1 -0
- package/commonjs/xlsx/file/validateLeadingBytes.js +47 -0
- package/commonjs/xlsx/file/validateLeadingBytes.js.map +1 -0
- package/commonjs/xlsx/file/validateLeadingBytes.test.js.map +1 -0
- package/commonjs/xlsx/isDateFormat.js +32 -27
- package/commonjs/xlsx/isDateFormat.js.map +1 -1
- package/commonjs/xlsx/isDateFormatStyle.js +19 -21
- package/commonjs/xlsx/isDateFormatStyle.js.map +1 -1
- package/commonjs/xlsx/parseCell.js +252 -115
- package/commonjs/xlsx/parseCell.js.map +1 -1
- package/commonjs/xlsx/parseCellAddress.js +22 -18
- package/commonjs/xlsx/parseCellAddress.js.map +1 -1
- package/commonjs/xlsx/parseExcelDate.js +4 -124
- package/commonjs/xlsx/parseExcelDate.js.map +1 -1
- package/commonjs/xlsx/parseExcelDate.test.js.map +1 -1
- package/commonjs/xlsx/parseExcelTimestamp.js +139 -0
- package/commonjs/xlsx/parseExcelTimestamp.js.map +1 -0
- package/commonjs/xlsx/parseFilePaths.js +48 -47
- package/commonjs/xlsx/parseFilePaths.js.map +1 -1
- package/commonjs/xlsx/parseSharedStrings.js +91 -36
- package/commonjs/xlsx/parseSharedStrings.js.map +1 -1
- package/commonjs/xlsx/parseSheet.js +527 -69
- package/commonjs/xlsx/parseSheet.js.map +1 -1
- package/commonjs/xlsx/parseSpreadsheetContents.js +154 -83
- package/commonjs/xlsx/parseSpreadsheetContents.js.map +1 -1
- package/commonjs/xlsx/parseSpreadsheetInfo.js +60 -59
- package/commonjs/xlsx/parseSpreadsheetInfo.js.map +1 -1
- package/commonjs/xlsx/parseStyles.js +75 -75
- package/commonjs/xlsx/parseStyles.js.map +1 -1
- package/commonjs/xml/parseXml.js +112 -0
- package/commonjs/xml/parseXml.js.map +1 -0
- package/commonjs/xml/parseXml.test.js.map +1 -0
- package/commonjs/xml/parseXmlStream.js.map +1 -1
- package/commonjs/xml/parseXmlStream.sax.js +69 -28
- package/commonjs/xml/parseXmlStream.sax.js.map +1 -1
- package/commonjs/xml/parseXmlStream.saxen.js +66 -40
- package/commonjs/xml/parseXmlStream.saxen.js.map +1 -1
- package/commonjs/zip/UnzipError.js +55 -0
- package/commonjs/zip/UnzipError.js.map +1 -0
- package/commonjs/zip/unzipFromArrayBuffer.js +21 -1
- package/commonjs/zip/unzipFromArrayBuffer.js.map +1 -1
- package/commonjs/zip/unzipFromArrayBuffer.test.js.map +1 -0
- package/commonjs/zip/unzipFromStream.fflate.js +43 -35
- package/commonjs/zip/unzipFromStream.fflate.js.map +1 -1
- package/commonjs/zip/unzipFromStream.js +188 -6
- package/commonjs/zip/unzipFromStream.js.map +1 -1
- package/commonjs/zip/unzipFromStream.unzipper.js +19 -34
- package/commonjs/zip/unzipFromStream.unzipper.js.map +1 -1
- package/modules/export/convertInputToNodeStream.js +0 -12
- package/modules/export/convertInputToNodeStream.js.map +1 -1
- package/modules/export/parseSheet.js +13 -6
- package/modules/export/parseSheet.js.map +1 -1
- package/modules/export/readSheetBrowser.js +3 -5
- package/modules/export/readSheetBrowser.js.map +1 -1
- package/modules/export/readSheetNode.js +3 -5
- package/modules/export/readSheetNode.js.map +1 -1
- package/modules/export/readSheetUniversal.js +2 -2
- package/modules/export/readSheetUniversal.js.map +1 -1
- package/modules/export/readSheetWebWorker.js +7 -8
- package/modules/export/readSheetWebWorker.js.map +1 -1
- package/modules/export/readXlsxFileBrowser.js +3 -5
- package/modules/export/readXlsxFileBrowser.js.map +1 -1
- package/modules/export/readXlsxFileNode.js +3 -5
- package/modules/export/readXlsxFileNode.js.map +1 -1
- package/modules/export/readXlsxFileUniversal.js +2 -2
- package/modules/export/readXlsxFileUniversal.js.map +1 -1
- package/modules/export/readXlsxFileWebWorker.js +7 -8
- package/modules/export/readXlsxFileWebWorker.js.map +1 -1
- package/modules/export/unpackXlsxFileBrowser.js +15 -4
- package/modules/export/unpackXlsxFileBrowser.js.map +1 -1
- package/modules/export/unpackXlsxFileBrowser.test.js.map +1 -0
- package/modules/export/unpackXlsxFileNode.js +32 -5
- package/modules/export/unpackXlsxFileNode.js.map +1 -1
- package/modules/export/unpackXlsxFileNode.test.js.map +1 -0
- package/modules/export/unpackXlsxFileUniversal.js +14 -3
- package/modules/export/unpackXlsxFileUniversal.js.map +1 -1
- package/modules/export/unpackXlsxFileUniversal.test.js.map +1 -0
- package/modules/parseSheetData/parseSheetData.js +9 -6
- package/modules/parseSheetData/parseSheetData.js.map +1 -1
- package/modules/saxen/parser.js +1 -1
- package/modules/saxen/parser.js.map +1 -1
- package/modules/utility/convertValuesFromUint8ArraysToStrings.js +92 -0
- package/modules/utility/convertValuesFromUint8ArraysToStrings.js.map +1 -0
- package/modules/xlsx/InvalidSpreadsheetError.js +50 -0
- package/modules/xlsx/InvalidSpreadsheetError.js.map +1 -0
- package/modules/xlsx/SheetNotFoundError.js +50 -0
- package/modules/xlsx/SheetNotFoundError.js.map +1 -0
- package/modules/xlsx/file/InputValidationStream.js +96 -0
- package/modules/xlsx/file/InputValidationStream.js.map +1 -0
- package/modules/xlsx/file/InputValidationStream.test.js.map +1 -0
- package/modules/xlsx/file/InvalidInputError.js +100 -0
- package/modules/xlsx/file/InvalidInputError.js.map +1 -0
- package/modules/xlsx/file/createFileTypeDetector.js +63 -0
- package/modules/xlsx/file/createFileTypeDetector.js.map +1 -0
- package/modules/xlsx/file/createFileTypeDetector.test.js.map +1 -0
- package/modules/xlsx/file/validateLeadingBytes.js +37 -0
- package/modules/xlsx/file/validateLeadingBytes.js.map +1 -0
- package/modules/xlsx/file/validateLeadingBytes.test.js.map +1 -0
- package/modules/xlsx/isDateFormat.js +31 -27
- package/modules/xlsx/isDateFormat.js.map +1 -1
- package/modules/xlsx/isDateFormatStyle.js +18 -21
- package/modules/xlsx/isDateFormatStyle.js.map +1 -1
- package/modules/xlsx/parseCell.js +251 -111
- package/modules/xlsx/parseCell.js.map +1 -1
- package/modules/xlsx/parseCellAddress.js +21 -18
- package/modules/xlsx/parseCellAddress.js.map +1 -1
- package/modules/xlsx/parseExcelDate.js +4 -124
- package/modules/xlsx/parseExcelDate.js.map +1 -1
- package/modules/xlsx/parseExcelDate.test.js.map +1 -1
- package/modules/xlsx/parseExcelTimestamp.js +133 -0
- package/modules/xlsx/parseExcelTimestamp.js.map +1 -0
- package/modules/xlsx/parseFilePaths.js +48 -47
- package/modules/xlsx/parseFilePaths.js.map +1 -1
- package/modules/xlsx/parseSharedStrings.js +91 -37
- package/modules/xlsx/parseSharedStrings.js.map +1 -1
- package/modules/xlsx/parseSheet.js +526 -68
- package/modules/xlsx/parseSheet.js.map +1 -1
- package/modules/xlsx/parseSpreadsheetContents.js +153 -81
- package/modules/xlsx/parseSpreadsheetContents.js.map +1 -1
- package/modules/xlsx/parseSpreadsheetInfo.js +60 -59
- package/modules/xlsx/parseSpreadsheetInfo.js.map +1 -1
- package/modules/xlsx/parseStyles.js +75 -75
- package/modules/xlsx/parseStyles.js.map +1 -1
- package/modules/xml/parseXml.js +106 -0
- package/modules/xml/parseXml.js.map +1 -0
- package/modules/xml/parseXml.test.js.map +1 -0
- package/modules/xml/parseXmlStream.js +2 -0
- package/modules/xml/parseXmlStream.js.map +1 -1
- package/modules/xml/parseXmlStream.sax.js +69 -28
- package/modules/xml/parseXmlStream.sax.js.map +1 -1
- package/modules/xml/parseXmlStream.saxen.js +67 -40
- package/modules/xml/parseXmlStream.saxen.js.map +1 -1
- package/modules/zip/UnzipError.js +49 -0
- package/modules/zip/UnzipError.js.map +1 -0
- package/modules/zip/unzipFromArrayBuffer.js +21 -1
- package/modules/zip/unzipFromArrayBuffer.js.map +1 -1
- package/modules/zip/unzipFromArrayBuffer.test.js.map +1 -0
- package/modules/zip/unzipFromStream.fflate.js +41 -35
- package/modules/zip/unzipFromStream.fflate.js.map +1 -1
- package/modules/zip/unzipFromStream.js +124 -1
- package/modules/zip/unzipFromStream.js.map +1 -1
- package/modules/zip/unzipFromStream.unzipper.js +19 -35
- package/modules/zip/unzipFromStream.unzipper.js.map +1 -1
- package/node/index.cjs +3 -0
- package/node/index.d.ts +16 -0
- package/node/index.js +3 -0
- package/package.json +5 -3
- package/types/InvalidInputError.d.ts +16 -0
- package/types/InvalidSpreadsheetError.d.ts +4 -0
- package/types/SheetNotFoundError.d.ts +4 -0
- package/universal/index.cjs +3 -0
- package/universal/index.d.ts +16 -0
- package/universal/index.js +3 -0
- package/web-worker/index.cjs +3 -0
- package/web-worker/index.d.ts +16 -0
- package/web-worker/index.js +3 -0
- package/commonjs/export/convertValuesFromUint8ArraysToStrings.js +0 -23
- package/commonjs/export/convertValuesFromUint8ArraysToStrings.js.map +0 -1
- package/commonjs/xlsx/convertCellsToData2dArray.js +0 -84
- package/commonjs/xlsx/convertCellsToData2dArray.js.map +0 -1
- package/commonjs/xlsx/dropEmptyColumns.js +0 -40
- package/commonjs/xlsx/dropEmptyColumns.js.map +0 -1
- package/commonjs/xlsx/dropEmptyColumns.test.js.map +0 -1
- package/commonjs/xlsx/dropEmptyRows.js +0 -43
- package/commonjs/xlsx/dropEmptyRows.js.map +0 -1
- package/commonjs/xlsx/dropEmptyRows.test.js.map +0 -1
- package/commonjs/xlsx/parseCellValue.js +0 -186
- package/commonjs/xlsx/parseCellValue.js.map +0 -1
- package/commonjs/xlsx/parseNumber.js +0 -20
- package/commonjs/xlsx/parseNumber.js.map +0 -1
- package/commonjs/xlsx/parseSharedString.js +0 -64
- package/commonjs/xlsx/parseSharedString.js.map +0 -1
- package/commonjs/xlsx/parseSheetData.js +0 -68
- package/commonjs/xlsx/parseSheetData.js.map +0 -1
- package/commonjs/xlsx/reconstructSheetDimensionsFromSheetCells.js +0 -29
- package/commonjs/xlsx/reconstructSheetDimensionsFromSheetCells.js.map +0 -1
- package/commonjs/xml/parseXmlStream.saxen.code.js +0 -953
- package/commonjs/xml/parseXmlStream.saxen.code.js.map +0 -1
- package/commonjs/xml/parseXmlStream.test.js.map +0 -1
- package/modules/export/convertValuesFromUint8ArraysToStrings.js +0 -17
- package/modules/export/convertValuesFromUint8ArraysToStrings.js.map +0 -1
- package/modules/xlsx/convertCellsToData2dArray.js +0 -77
- package/modules/xlsx/convertCellsToData2dArray.js.map +0 -1
- package/modules/xlsx/dropEmptyColumns.js +0 -34
- package/modules/xlsx/dropEmptyColumns.js.map +0 -1
- package/modules/xlsx/dropEmptyColumns.test.js.map +0 -1
- package/modules/xlsx/dropEmptyRows.js +0 -37
- package/modules/xlsx/dropEmptyRows.js.map +0 -1
- package/modules/xlsx/dropEmptyRows.test.js.map +0 -1
- package/modules/xlsx/parseCellValue.js +0 -180
- package/modules/xlsx/parseCellValue.js.map +0 -1
- package/modules/xlsx/parseNumber.js +0 -14
- package/modules/xlsx/parseNumber.js.map +0 -1
- package/modules/xlsx/parseSharedString.js +0 -55
- package/modules/xlsx/parseSharedString.js.map +0 -1
- package/modules/xlsx/parseSheetData.js +0 -55
- package/modules/xlsx/parseSheetData.js.map +0 -1
- package/modules/xlsx/reconstructSheetDimensionsFromSheetCells.js +0 -23
- package/modules/xlsx/reconstructSheetDimensionsFromSheetCells.js.map +0 -1
- package/modules/xml/parseXmlStream.saxen.code.js +0 -947
- package/modules/xml/parseXmlStream.saxen.code.js.map +0 -1
- package/modules/xml/parseXmlStream.test.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
9.3.5 / 28.07.2026
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* Merged a [feature](https://gitlab.com/catamphetamine/read-excel-file/-/merge_requests/11) by [Etienne Prothon](https://github.com/EtienneProthon). If adds a new exported error class called `InvalidInputError`. See the "Errors" section of the README for more details.
|
|
5
|
+
|
|
6
|
+
* Added two additional error classes: `InvalidSpreadsheetError` and `SheetNotFoundError`.
|
|
7
|
+
|
|
8
|
+
* Addressed a [concern](https://gitlab.com/catamphetamine/read-excel-file/-/work_items/118) expressed by [Olivier Beaulieu](https://github.com/olivierb24) about the `.xlsx` parser being too strict and not forgiving. The `sheet.xml` file parser has been slightly refactored to be less strict about `<v>` or `<is><t>` elements not being present.
|
|
9
|
+
|
|
1
10
|
9.3.3 / 20.07.2026
|
|
2
11
|
==================
|
|
3
12
|
|
package/README.md
CHANGED
|
@@ -385,7 +385,32 @@ readExcelFile(file, {
|
|
|
385
385
|
|
|
386
386
|
## Formulas
|
|
387
387
|
|
|
388
|
-
|
|
388
|
+
When reading cells that use formulas to calculate their value, it expects such values to already be pre-computed, which is always the case when the file is created in a spreadsheet editor application. However, when the file is generated programmatically by a custom script, it might skip pre-computing such values, which is allowed by the specification. Such cells will be interpreted as empty ones. <!-- Such cells with throw an error. -->
|
|
389
|
+
|
|
390
|
+
## Errors
|
|
391
|
+
|
|
392
|
+
### `InvalidInputError`
|
|
393
|
+
|
|
394
|
+
Sometimes people confuse `.xlsx` files with legacy binary `.xls` ones. The difference might be tricky to spot, so this package explicitly throws an `InvalidInputError` in such (and some other) cases.
|
|
395
|
+
|
|
396
|
+
* `name: "InvalidInputError"`
|
|
397
|
+
* `code: string`
|
|
398
|
+
* `"XLS_FILE_NOT_SUPPORTED"` — The input is a legacy binary `.xls` file (OLE2 Compound File Binary format), which is not supported. Such files should be re-saved in `.xlsx` format in order to be readable by this package.
|
|
399
|
+
* `"FILE_NOT_SUPPORTED"` — The input is neither `.xlsx` nor `.xls` file.
|
|
400
|
+
* `"INVALID_ZIP"` — The input seems to be an `.xlsx` file, and an `.xlsx` file must be a valid ZIP archive, which it isn't.
|
|
401
|
+
* `"NO_DATA"` — The input is empty.
|
|
402
|
+
|
|
403
|
+
### `InvalidSpreadsheetError`
|
|
404
|
+
|
|
405
|
+
It might throw a `InvalidSpreadsheetError` if there's something wrong with the `.xlsx` file contents while attempting to parse it.
|
|
406
|
+
|
|
407
|
+
* `name: "InvalidSpreadsheetError"`
|
|
408
|
+
|
|
409
|
+
### `SheetNotFoundError`
|
|
410
|
+
|
|
411
|
+
`SheetNotFoundError` will be thrown if a specified sheet doesn't exist.
|
|
412
|
+
|
|
413
|
+
* `name: "SheetNotFoundError"`
|
|
389
414
|
|
|
390
415
|
## Performance
|
|
391
416
|
|
|
@@ -785,7 +810,7 @@ An `.xlsx` file is just a `.zip` archive with an `.xslx` file extension. This pa
|
|
|
785
810
|
To include this library directly via a `<script/>` tag on a page, one can use any npm CDN service, e.g. [unpkg.com](https://unpkg.com) or [jsdelivr.com](https://jsdelivr.com)
|
|
786
811
|
|
|
787
812
|
```html
|
|
788
|
-
<script src="https://unpkg.com/read-excel-file@
|
|
813
|
+
<script src="https://unpkg.com/read-excel-file@9.x/bundle/read-excel-file.min.js"></script>
|
|
789
814
|
|
|
790
815
|
<script>
|
|
791
816
|
var input = document.getElementById('input')
|
|
@@ -818,6 +843,11 @@ Finally, one could go even further with the "streaming" approach and output not
|
|
|
818
843
|
* [`unzipper-esm`](https://www.npmjs.com/package/unzipper-esm) — Unzips `.zip` archives in Node.js using `stream` API.
|
|
819
844
|
* [`saxen`](https://www.npmjs.com/package/saxen) — Parses XML in a streaming fashion.
|
|
820
845
|
|
|
846
|
+
## Contributors
|
|
847
|
+
|
|
848
|
+
* [Stian Jensen](https://github.com/stianjensen) — Use `fflate` unzipper on server side ([1](https://github.com/catamphetamine/read-excel-file/pull/122), [2](https://github.com/catamphetamine/read-excel-file/pull/123))
|
|
849
|
+
* [Etienne Prothon](https://github.com/EtienneProthon) — Reject non `.xlsx` files, including the legacy binary `.xls` files ([1](https://gitlab.com/catamphetamine/read-excel-file/-/merge_requests/11)). Fix parsing of "encoded" characters ([1](https://gitlab.com/catamphetamine/read-excel-file/-/merge_requests/10)).
|
|
850
|
+
|
|
821
851
|
## GitHub
|
|
822
852
|
|
|
823
853
|
On March 9th, 2020, GitHub, Inc. silently [banned](https://medium.com/@catamphetamine/how-github-blocked-me-and-all-my-libraries-c32c61f061d3) my account (erasing all my repos, issues and comments, even in my employer's private repos) without any notice or explanation. Because of that, all source codes had to be promptly moved to GitLab. The [GitHub repo](https://github.com/catamphetamine/read-excel-file) is now only used as a backup (you can star the repo there too), and the primary repo is now the [GitLab one](https://gitlab.com/catamphetamine/read-excel-file). Issues can be reported in any repo.
|
package/browser/index.cjs
CHANGED
|
@@ -2,6 +2,9 @@ exports = module.exports = require('../commonjs/export/readXlsxFileBrowser.js').
|
|
|
2
2
|
exports['default'] = require('../commonjs/export/readXlsxFileBrowser.js').default
|
|
3
3
|
|
|
4
4
|
exports.readSheet = require('../commonjs/export/readSheetBrowser.js').default
|
|
5
|
+
exports.InvalidInputError = require('../commonjs/xlsx/file/InvalidInputError.js').default
|
|
6
|
+
exports.InvalidSpreadsheetError = require('../commonjs/xlsx/InvalidSpreadsheetError.js').default
|
|
7
|
+
exports.SheetNotFoundError = require('../commonjs/xlsx/SheetNotFoundError.js').default
|
|
5
8
|
|
|
6
9
|
// `parseSheetData()`
|
|
7
10
|
exports.parseSheetData = require('../commonjs/parseSheetData/parseSheetData.js').default
|
package/browser/index.d.ts
CHANGED
|
@@ -70,6 +70,22 @@ export type {
|
|
|
70
70
|
Schema
|
|
71
71
|
} from '../types/parseSheetData/parseSheetDataSchema.d.js'
|
|
72
72
|
|
|
73
|
+
export {
|
|
74
|
+
InvalidInputError
|
|
75
|
+
} from '../types/InvalidInputError.d.js'
|
|
76
|
+
|
|
77
|
+
export type {
|
|
78
|
+
InvalidInputErrorCode
|
|
79
|
+
} from '../types/InvalidInputError.d.js'
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
InvalidSpreadsheetError
|
|
83
|
+
} from '../types/InvalidSpreadsheetError.d.js'
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
SheetNotFoundError
|
|
87
|
+
} from '../types/SheetNotFoundError.d.js'
|
|
88
|
+
|
|
73
89
|
export default function readXlsxFile<ParsedNumber = number>(
|
|
74
90
|
input: Input,
|
|
75
91
|
options?: Options<ParsedNumber>
|
package/browser/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { default as default } from '../modules/export/readXlsxFileBrowser.js'
|
|
2
2
|
export { default as readSheet } from '../modules/export/readSheetBrowser.js'
|
|
3
|
+
export { default as InvalidInputError } from '../modules/xlsx/file/InvalidInputError.js'
|
|
4
|
+
export { default as InvalidSpreadsheetError } from '../modules/xlsx/InvalidSpreadsheetError.js'
|
|
5
|
+
export { default as SheetNotFoundError } from '../modules/xlsx/SheetNotFoundError.js'
|
|
3
6
|
|
|
4
7
|
// `parseSheetData()`
|
|
5
8
|
export { default as parseSheetData } from '../modules/parseSheetData/parseSheetData.js'
|
|
6
9
|
export { default as Integer } from '../modules/parseSheetData/types/additional/Integer.js'
|
|
7
10
|
export { default as Email } from '../modules/parseSheetData/types/additional/Email.js'
|
|
8
|
-
export { default as URL } from '../modules/parseSheetData/types/additional/URL.js'
|
|
11
|
+
export { default as URL } from '../modules/parseSheetData/types/additional/URL.js'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).readXlsxFile=e()}(this,(function(){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},r(e)}function e(e){var t=String.fromCharCode,n=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,i={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function a(r,e,o,a){return a?n.call(i,a)?i[a]:"&"+a+";":t(e||parseInt(o,16))}function u(r){return r.length>3&&-1!==r.indexOf("&")?r.replace(o,a):r}Object.keys(i).forEach((function(r){i[r.toUpperCase()]=i[r]}));var f="non-whitespace outside of root node";function l(r){return new Error(r)}function s(r){return{get:r,enumerable:!0}}function c(r){var e,t={};for(e in r)t[e]=r[e];return t}var d=Symbol("nameCache");function m(r){return r+"$uri"}function b(){return{line:0,column:0}}function h(r){throw r}return function e(t){if(!this)return new e(t);var n,o,i,a,p,y,v,g,w,S,O,x,A=t&&t.proxy,j=h,k=b,I=!1,E=!1,P="",T=!1,C=!1,N=null,D=!1;function F(r){r instanceof Error||(r=l(r)),N=r,j(r,k)}function M(r){p&&(r instanceof Error||(r=l(r)),p(r,k))}function U(){w=C?[]:null,S=C?function(r){var e,t,n={};for(e in r)n[t=r[e]]=t,n[m(t)]=e;return n}(x):null,O=[],k=b,D=!1,N=null,E=!1,P=""}function X(r){var e,t,l,b,h,p,j,I,P,N,U,X=arguments.length>1&&void 0!==arguments[1]&&arguments[1],$=null,q=null,L=0,R=!1,_=!1,z=0,B=0,W="",G=0;function H(r,e){var t=r.indexOf(":");if(-1===t)return r;var n=S[r.substring(0,t)];return n?e===n?r.substr(t+1):n+r.substr(t):(M("missing namespace for prefix <"+r.substring(0,t)+">"),null)}function J(){if(null!==U)return U;var r,e,t,n,o,i,a,f,l,s,d=C&&S.xmlns,b=C&&T?[]:null,h=G,p=W,y=p.length,v={},g=new Set;r:for(;h<y;h++)if(f=!1,!(32===(l=p.charCodeAt(h))||l<14&&l>8)){for((l<65||l>122||l>90&&l<97)&&95!==l&&58!==l&&(M("illegal first char attribute name"),f=!0),s=h+1;s<y;s++)if(!((l=p.charCodeAt(s))>96&&l<123||l>64&&l<91||l>47&&l<59||46===l||45===l||95===l)){if(32===l||l<14&&l>8){M("missing attribute value"),h=s;continue r}if(61===l)break;M("illegal attribute name char"),f=!0}if("xmlns:xmlns"===(a=p.substring(h,s))&&(M("illegal declaration of xmlns"),f=!0),34===(l=p.charCodeAt(s+1)))-1===(s=p.indexOf('"',h=s+2))&&-1!==(s=p.indexOf("'",h))&&(M("attribute value quote missmatch"),f=!0);else if(39===l)-1===(s=p.indexOf("'",h=s+2))&&-1!==(s=p.indexOf('"',h))&&(M("attribute value quote missmatch"),f=!0);else for(M("missing attribute value quotes"),f=!0,s+=1;s<y&&!(32===(l=p.charCodeAt(s+1))||l<14&&l>8);s++);for(-1===s&&(M("missing closing quotes"),s=y,f=!0),f||(o=p.substring(h,s)),h=s;s+1<y&&!(32===(l=p.charCodeAt(s+1))||l<14&&l>8);s++)h===s&&(M("illegal character after attribute end"),f=!0);if(h=s+1,!f)if(g.has(a))M("attribute <"+a+"> already defined");else if(g.add(a),C)if(T){if(null!==(n="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(r=u(o),e=m(n),!(i=x[r])){if("xmlns"===n||e in S&&S[e]!==r)do{i="ns"+L++}while(void 0!==S[i]);else i=n;x[r]=i}S[n]!==i&&(t||(S=c(S),t=!0),S[n]=i,"xmlns"===n&&(S[m(i)]=r,d=i),S[e]=r),v[a]=o;continue}b.push(a,o)}else null!==(a=H(a,d))&&(v[a]=o);else v[a]=o}if(T)for(h=0,y=b.length;h<y;h++)a=H(b[h++],d),o=b[h],null!==a&&(v[a]=o);return U=v}for(k=function(){for(var e,t,n=/(\r\n|\r|\n)/g,o=0,i=0,a=0,u=B;z>=a&&(e=n.exec(r))&&!((u=e[0].length+e.index)>z);)o+=1,a=u;return-1==z?(i=u,t=r.substring(B)):0===B?t=r.substring(B,z):(i=z-a,t=-1==B?r.substring(z):r.substring(z,B+1)),{data:t,line:o,column:i}},A&&(N=Object.create({},{name:s((function(){return I})),originalName:s((function(){return P})),attrs:s(J),ns:s((function(){return S}))}));-1!==B;){if(-1===(z=60===r.charCodeAt(B)?B:r.indexOf("<",B)))return X?r.substring(B):O.length?F("unexpected end of file"):E?void(B<r.length&&r.substring(B).trim()&&M(f)):F("missing start tag");if(E||(E=!0),B!==z)if(O.length){if(n&&(n(r.substring(B,z),u,k),D))return}else if(r.substring(B,z).trim()&&(M(f),D))return;if(33===(h=r.charCodeAt(z+1))){if(91===(b=r.charCodeAt(z+2))&&"CDATA["===r.substr(z+3,6)){if(-1===(B=r.indexOf("]]>",z)))return X?r.substring(z):F("unclosed cdata");if(a&&(a(r.substring(z+9,B),k),D))return;B+=3;continue}if(45===b&&45===r.charCodeAt(z+3)){if(-1===(B=r.indexOf("--\x3e",z)))return X?r.substring(z):F("unclosed comment");if(y&&(y(r.substring(z+4,B),u,k),D))return;B+=3;continue}}if(63!==h){for(t=z+1;;t++){if(p=r.charCodeAt(t),isNaN(p))return X?r.substring(z):(B=-1,F("unclosed tag"));if(34===p)t=-1!==(b=r.indexOf('"',t+1))?b:t;else if(39===p)t=-1!==(b=r.indexOf("'",t+1))?b:t;else if(62===p){B=t;break}}if(33!==h){if(U={},47===h){if(R=!1,_=!0,!O.length)return F("missing open tag");if(t=I=O.pop(),b=z+2+t.length,r.substring(z+2,b)!==t)return F("closing tag mismatch");for(;b<B;b++)if(!(32===(h=r.charCodeAt(b))||h>8&&h<14))return F("close tag")}else{if(47===r.charCodeAt(B-1)?(t=I=r.substring(z+1,B-1),R=!0,_=!0):(t=I=r.substring(z+1,B),R=!0,_=!1),!(h>96&&h<123||h>64&&h<91||95===h||58===h))return F("illegal first char nodeName");for(b=1,l=t.length;b<l;b++)if(!((h=t.charCodeAt(b))>96&&h<123||h>64&&h<91||h>47&&h<59||45===h||95===h||46==h)){if(32===h||h<14&&h>8){I=t.substring(0,b),U=null;break}return F("invalid nodeName")}_||O.push(I)}if(C){e=S,R&&(_||w.push(e),null===U&&(T=-1!==t.indexOf("xmlns",b))&&(G=b,W=t,J(),T=!1)),P=I,q!==S&&(void 0===($=S[d])&&($=S[d]={}),q=S);var K=$[I];if(void 0!==K)I=K;else{if(-1!==(h=I.indexOf(":"))){if(!(j=S[I.substring(0,h)]))return F("missing namespace on <"+P+">");I=I.substr(h+1)}else j=S.xmlns;j&&(I=j+":"+I),$[P]=I}}if(R&&(G=b,W=t,o&&(A?o(N,u,_,k):o(I,J,u,_,k),D)))return;if(_){if(i&&(i(A?N:I,u,R,k),D))return;C&&(S=R?e:w.pop())}B+=1}else{if(g&&(g(r.substring(z,B+1),u,k),D))return;B+=1}}else{if(-1===(B=r.indexOf("?>",z)))return X?r.substring(z):F("unclosed question");if(v&&(v(r.substring(z,B+2),k),D))return;B+=2}}}this.on=function(r,e){if("function"!=typeof e)throw l("required args <name, cb>");switch(r){case"openTag":o=e;break;case"text":n=e;break;case"closeTag":i=e;break;case"error":j=e;break;case"warn":p=e;break;case"cdata":a=e;break;case"attention":g=e;break;case"question":v=e;break;case"comment":y=e;break;default:throw l("unsupported event: "+r)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!==r(e))throw l("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return C=!0,x=n,this},this.parse=function(r){if("string"!=typeof r)throw l("required args <xml=string>");if(I)throw l("parse during stream; call end() first");return U(),X(r),k=b,D=!1,N},this.write=function(r){if("string"!=typeof r)throw l("required args <xml=string>");return I||(U(),I=!0),N||(P=X(P+r,!0)||""),this},this.end=function(){return I||U(),I=!1,N||X(P),P="",k=b,D=!1,N},this.stop=function(){D=!0}}(e)}function t(r,t){var n=t.createInitialState,o=t.onOpenTag,i=t.onCloseTag,a=t.onText,u=/.+:/;function f(r){return r.replace(u,"")}return new Promise((function(t,u){var l=!1,s=n(),c=new e({proxy:!0});c.ns(),c.on("error",(function(r){l||(l=!0,u(r))})),c.on("text",(function(r,e){a&&a(e(r),s)})),c.on("openTag",(function(r,e,t,n){if(o){var i=r.attrs;for(var a in i)i[a]=e(i[a]);o(f(r.originalName),i,s)}})),c.on("closeTag",(function(r){if(i){var e=f(r.originalName);i(e,s)}})),c.parse(r),l||t(s)}))}var n={},o=Uint8Array,i=Uint16Array,a=Int32Array,u=new o([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),f=new o([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new o([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(r,e){for(var t=new i(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];var o=new a(t[30]);for(n=1;n<30;++n)for(var u=t[n];u<t[n+1];++u)o[u]=u-t[n]<<5|n;return{b:t,r:o}},c=s(u,2),d=c.b,m=c.r;d[28]=258,m[258]=28;for(var b=s(f,0).b,h=new i(32768),p=0;p<32768;++p){var y=(43690&p)>>1|(21845&p)<<1;y=(61680&(y=(52428&y)>>2|(13107&y)<<2))>>4|(3855&y)<<4,h[p]=((65280&y)>>8|(255&y)<<8)>>1}var v=function(r,e,t){for(var n=r.length,o=0,a=new i(e);o<n;++o)r[o]&&++a[r[o]-1];var u,f=new i(e);for(o=1;o<e;++o)f[o]=f[o-1]+a[o-1]<<1;if(t){u=new i(1<<e);var l=15-e;for(o=0;o<n;++o)if(r[o])for(var s=o<<4|r[o],c=e-r[o],d=f[r[o]-1]++<<c,m=d|(1<<c)-1;d<=m;++d)u[h[d]>>l]=s}else for(u=new i(n),o=0;o<n;++o)r[o]&&(u[o]=h[f[r[o]-1]++]>>15-r[o]);return u},g=new o(288);for(p=0;p<144;++p)g[p]=8;for(p=144;p<256;++p)g[p]=9;for(p=256;p<280;++p)g[p]=7;for(p=280;p<288;++p)g[p]=8;var w=new o(32);for(p=0;p<32;++p)w[p]=5;var S=v(g,9,1),O=v(w,5,1),x=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},A=function(r,e,t){var n=e/8|0;return(r[n]|r[n+1]<<8)>>(7&e)&t},j=function(r,e){var t=e/8|0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>(7&e)},k=function(r){return(r+7)/8|0},I=function(r,e,t){return(null==e||e<0)&&(e=0),(null==t||t>r.length)&&(t=r.length),new o(r.subarray(e,t))},E=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(r,e,t){var n=new Error(e||E[r]);if(n.code=r,Error.captureStackTrace&&Error.captureStackTrace(n,P),!t)throw n;return n},T=function(r,e,t,n){var i=r.length,a=n?n.length:0;if(!i||e.f&&!e.l)return t||new o(0);var s=!t,c=s||2!=e.i,m=e.i;s&&(t=new o(3*i));var h=function(r){var e=t.length;if(r>e){var n=new o(Math.max(2*e,r));n.set(t),t=n}},p=e.f||0,y=e.p||0,g=e.b||0,w=e.l,E=e.d,T=e.m,C=e.n,N=8*i;do{if(!w){p=A(r,y,1);var D=A(r,y+1,3);if(y+=3,!D){var F=r[(W=k(y)+4)-4]|r[W-3]<<8,M=W+F;if(M>i){m&&P(0);break}c&&h(g+F),t.set(r.subarray(W,M),g),e.b=g+=F,e.p=y=8*M,e.f=p;continue}if(1==D)w=S,E=O,T=9,C=5;else if(2==D){var U=A(r,y,31)+257,X=A(r,y+10,15)+4,$=U+A(r,y+5,31)+1;y+=14;for(var q=new o($),L=new o(19),R=0;R<X;++R)L[l[R]]=A(r,y+3*R,7);y+=3*X;var _=x(L),z=(1<<_)-1,B=v(L,_,1);for(R=0;R<$;){var W,G=B[A(r,y,z)];if(y+=15&G,(W=G>>4)<16)q[R++]=W;else{var H=0,J=0;for(16==W?(J=3+A(r,y,3),y+=2,H=q[R-1]):17==W?(J=3+A(r,y,7),y+=3):18==W&&(J=11+A(r,y,127),y+=7);J--;)q[R++]=H}}var K=q.subarray(0,U),V=q.subarray(U);T=x(K),C=x(V),w=v(K,T,1),E=v(V,C,1)}else P(1);if(y>N){m&&P(0);break}}c&&h(g+131072);for(var Q=(1<<T)-1,Y=(1<<C)-1,Z=y;;Z=y){var rr=(H=w[j(r,y)&Q])>>4;if((y+=15&H)>N){m&&P(0);break}if(H||P(2),rr<256)t[g++]=rr;else{if(256==rr){Z=y,w=null;break}var er=rr-254;if(rr>264){var tr=u[R=rr-257];er=A(r,y,(1<<tr)-1)+d[R],y+=tr}var nr=E[j(r,y)&Y],or=nr>>4;nr||P(3),y+=15&nr;V=b[or];if(or>3){tr=f[or];V+=j(r,y)&(1<<tr)-1,y+=tr}if(y>N){m&&P(0);break}c&&h(g+131072);var ir=g+er;if(g<V){var ar=a-V,ur=Math.min(V,ir);for(ar+g<0&&P(3);g<ur;++g)t[g]=n[ar+g]}for(;g<ir;++g)t[g]=t[g-V]}}e.l=w,e.p=Z,e.b=g,e.f=p,w&&(p=1,e.m=T,e.d=E,e.n=C)}while(!p);return g!=t.length&&s?I(t,0,g):t.subarray(0,g)},C=new o(0),N=function(r,e,t){for(var n=r(),o=r.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var u=n[a],f=i[a];if("function"==typeof u){e+=";"+f+"=";var l=u.toString();if(u.prototype)if(-1!=l.indexOf("[native code]")){var s=l.indexOf(" ",8)+1;e+=l.slice(s,l.indexOf("(",s))}else for(var c in e+=l,u.prototype)e+=";"+f+".prototype."+c+"="+u.prototype[c].toString();else e+=l}else t[f]=u}return e},D=[],F=function(r,e,t,o){if(!D[t]){for(var i="",a={},u=r.length-1,f=0;f<u;++f)i=N(r[f],i,a);D[t]={c:N(r[u],i,a),e:a}}var l=function(r,e){var t={};for(var n in r)t[n]=r[n];for(var n in e)t[n]=e[n];return t}({},D[t].e);return function(r,e,t,o,i){var a=new Worker(n[e]||(n[e]=URL.createObjectURL(new Blob([r+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(r){var e=r.data,t=e.$e$;if(t){var n=new Error(t[0]);n.code=t[1],n.stack=t[2],i(n,null)}else i(null,e)},a.postMessage(t,o),a}(D[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",t,l,function(r){var e=[];for(var t in r)r[t].buffer&&e.push((r[t]=new r[t].constructor(r[t])).buffer);return e}(l),o)},M=function(){return[o,i,a,u,f,l,d,b,S,O,h,E,v,x,A,j,k,I,P,T,_,U,X]},U=function(r){return postMessage(r,[r.buffer])},X=function(r){return r&&{out:r.size&&new o(r.size),dictionary:r.dictionary}},$=function(r,e,t,n,o,i){var a=F(t,n,o,(function(r,e){a.terminate(),i(r,e)}));return a.postMessage([r,e],e.consume?[r.buffer]:[]),function(){a.terminate()}},q=function(r,e){return r[e]|r[e+1]<<8},L=function(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0},R=function(r,e){return L(r,e)+4294967296*L(r,e+4)};function _(r,e){return T(r,{i:2},e&&e.out,e&&e.dictionary)}var z="undefined"!=typeof TextDecoder&&new TextDecoder;try{z.decode(C,{stream:!0}),1}catch(r){}var B=function(r){for(var e="",t=0;;){var n=r[t++],o=(n>127)+(n>223)+(n>239);if(t+o>r.length)return{s:e,r:I(r,t-1)};o?3==o?(n=((15&n)<<18|(63&r[t++])<<12|(63&r[t++])<<6|63&r[t++])-65536,e+=String.fromCharCode(55296|n>>10,56320|1023&n)):e+=1&o?String.fromCharCode((31&n)<<6|63&r[t++]):String.fromCharCode((15&n)<<12|(63&r[t++])<<6|63&r[t++]):e+=String.fromCharCode(n)}};function W(r,e){if(e){for(var t="",n=0;n<r.length;n+=16384)t+=String.fromCharCode.apply(null,r.subarray(n,n+16384));return t}if(z)return z.decode(r);var o=B(r),i=o.s;return(t=o.r).length&&P(8),i}var G,H=function(r,e){return e+30+q(r,e+26)+q(r,e+28)},J=function(r,e,t){var n=q(r,e+28),o=q(r,e+30),i=W(r.subarray(e+46,e+46+n),!(2048&q(r,e+8))),a=e+46+n,u=K(r,a,o,t,L(r,e+20),L(r,e+24),L(r,e+42)),f=u[0],l=u[1],s=u[2];return[q(r,e+10),f,l,i,a+o+q(r,e+32),s]},K=function(r,e,t,n,o,i,a){var u=4294967295==o,f=4294967295==i,l=4294967295==a,s=e+t;if(n&&u+f+l){for(;e+4<s;e+=4+q(r,e+2))if(1==q(r,e))return[u?R(r,e+4+8*f):o,f?R(r,e+4):i,l?R(r,e+4+8*(f+u)):a,1];n<2&&P(13)}return[o,i,a,0]},V="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(r){r()};function Q(r,e,t){t||(t=e,e={}),"function"!=typeof t&&P(7);var n=[],i=function(){for(var r=0;r<n.length;++r)n[r]()},a={},u=function(r,e){V((function(){t(r,e)}))};V((function(){u=t}));for(var f=r.length-22;101010256!=L(r,f);--f)if(!f||r.length-f>65558)return u(P(13,0,1),null),i;var l=q(r,f+8);if(l){var s=l,c=L(r,f+16),d=117853008==L(r,f-20);if(d){var m=L(r,f-12);(d=101075792==L(r,m))&&(s=l=L(r,m+32),c=L(r,m+48))}for(var b=e&&e.filter,h=function(e){var t=J(r,c,d),f=t[0],s=t[1],m=t[2],h=t[3],p=t[4],y=t[5],v=H(r,y);c=p;var g=function(r,e){r?(i(),u(r,null)):(e&&(a[h]=e),--l||u(null,a))};if(!b||b({name:h,size:s,originalSize:m,compression:f}))if(f)if(8==f){var w=r.subarray(v,v+s);if(m<524288||s>.8*m)try{g(null,_(w,{out:new o(m)}))}catch(r){g(r,null)}else n.push(function(r,e,t){return t||(t=e,e={}),"function"!=typeof t&&P(7),$(r,e,[M],(function(r){return U(_(r.data[0],X(r.data[1])))}),1,t)}(w,{size:m},g))}else g(P(14,"unknown compression type "+f,1),null);else g(null,I(r,v,v+s));else g(null,null)},p=0;p<s;++p)h()}else u(null,{});return i}function Y(r,e){return function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.filter,n=arguments.length>2?arguments[2]:void 0;return n(new Uint8Array(r),{filter:function(r){return!t||t({path:r.name})}})}(r,e,Z,!0)}function Z(r){return new Promise((function(e,t){Q(r,(function(r,n){r?t(r):e(n)}))}))}function rr(r){var e=Date.now();("undefined"!=typeof global?Boolean(global.READ_EXCEL_FILE_CHECKPOINTS):"undefined"!=typeof window&&Boolean(window.READ_EXCEL_FILE_CHECKPOINTS))&&(G&&console.log(" -",e-G,"ms"),console.log("*",r)),G=e}function er(r){rr("convert files to strings");for(var e={},t=0,n=Object.keys(r);t<n.length;t++){var o=n[t];e[o]=W(r[o])}return e}function tr(r){var e=r.path;return e.endsWith(".xml")||e.endsWith(".xml.rels")}function nr(r){return G=void 0,rr("unpack files"),r instanceof File||r instanceof Blob?r.arrayBuffer().then(or):Promise.resolve(r).then(or)}function or(r){return Y(r,{filter:tr}).then(er)}function ir(r,e){return e(r,{createInitialState:ar,onOpenTag:ur}).then((function(r){return{epoch1904:!!r.workbookPr&&r.workbookPr.epoch1904,sheets:r.sheets}}))}function ar(){return{workbookPr:void 0,sheets:[]}}function ur(r,e,t){"workbookPr"===r?t.workbookPr||(t.workbookPr={epoch1904:"1"===e.date1904}):"sheet"===r&&e.name&&t.sheets.push({id:Number(e.sheetId),name:e.name,relationId:e["r:id"]})}function fr(r,e){return e(r,{createInitialState:lr,onOpenTag:sr}).then((function(r){return r}))}function lr(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function sr(r,e,t){"Relationship"===r&&function(r,e,t,n){switch(t){case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles":r.styles=cr(n);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings":r.sharedStrings=cr(n);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet":r.sheets[e]=cr(n)}}(t,e.Id,e.Type,e.Target)}function cr(r){return"/"===r[0]?r.slice(1):"xl/"+r}function dr(r){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},dr(r)}var mr=["xfId"];function br(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function hr(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?br(Object(t),!0).forEach((function(e){pr(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):br(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function pr(r,e,t){return(e=function(r){var e=function(r,e){if("object"!==dr(r)||null===r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!==dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===dr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function yr(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t,n,o={},i=Object.keys(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||(o[t]=r[t]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function vr(r,e){return e(r,{createInitialState:gr,onOpenTag:wr,onCloseTag:Sr}).then((function(r){return r.styles.map((function(e){if(e.xfId){var t=e.xfId,n=yr(e,mr);return hr(hr({},r.baseStyles[t]),n)}return e}))}))}function gr(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function wr(r,e,t){if("numFmt"===r)t.numberFormats[e.numFmtId]={id:Number(e.numFmtId),template:e.formatCode};else if("cellStyleXfs"===r)t.cellStyleXfs=!0;else if("cellXfs"===r)t.cellXfs=!0;else if("xf"===r)if(t.cellStyleXfs)t.baseStyles.push(Or(e));else if(t.cellXfs){var n=Or(e,t.numberFormats);e.xfId&&(n.xfId=Number(e.xfId)),t.styles.push(n)}}function Sr(r,e){"cellStyleXfs"===r?e.cellStyleXfs=!1:"cellXfs"===r&&(e.cellXfs=!1)}function Or(r,e){var t={},n=r.numFmtId;return n&&(e&&e[n]?t.numberFormat=e[n]:t.numberFormat={id:Number(n)}),t}function xr(r,e){return e(r,{createInitialState:Ar,onOpenTag:jr,onCloseTag:kr,onText:Ir}).then((function(r){return r.strings}))}function Ar(){return{si:void 0,strings:[]}}function jr(r,e,t){"si"===r?t.si={t:!1,r:!1,rPh:!1,string:""}:t.si&&function(r,e,t){"t"===r?t.t=!0:"r"===r?t.r=!0:"rPh"===r&&(t.rPh=!0)}(r,0,t.si)}function kr(r,e){"si"===r?(e.strings.push(e.si.string),e.si=void 0):e.si&&function(r,e){"t"===r?e.t=!1:"r"===r?e.r=!1:"rPh"===r&&(e.rPh=!1)}(r,e.si)}function Ir(r,e){e.si&&function(r,e){e.rPh||e.t&&(e.r?e.string+=r:e.string=r)}(r,e.si)}var Er=17,Pr=1,Tr=1,Cr=864e5,Nr=365;function Dr(r){var e=Number(r);if(isNaN(e))throw new Error("Couldn't parse number: ".concat(r));return e}function Fr(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return Mr(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Mr(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Mr(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var Ur=/^\[\$-[^\]]+\]/,Xr=/;@$/,$r={};function qr(r){if(r in $r)return $r[r];var e=function(r){r=r.toLowerCase(),r=r.replace(Ur,""),r=r.replace(Xr,"");var e=r.split(/\W+/);if(e.length<0)return!1;for(var t,n=Fr(e);!(t=n()).done;){var o=t.value;if(Lr.indexOf(o)<0)return!1}return!0}(r);return $r[r]=e,e}var Lr=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];var Rr=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],_r=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],zr=[14,15,16,17,18,19,20,21,22,45,46,47].concat(Rr).concat(_r.filter((function(r){return Rr.indexOf(r)<0}))).concat([71,72,73,74,75,76,77,78,79,80,81].filter((function(r){return Rr.indexOf(r)<0})).filter((function(r){return _r.indexOf(r)<0})));function Br(r,e,t){var n=t.inlineString,o=t.styleId,i=t.styles,a=t.sharedStrings,u=t.epoch1904,f=t.options;switch(e||(e="n"),e){case"str":r=Wr(r,f);break;case"inlineStr":if(void 0===(r=n))throw new Error('Couldn\'t read "inline string" cell value');r=Wr(r,f);break;case"s":var l=Number(r);if(isNaN(l))throw new Error('Invalid "shared" string index: '.concat(r));if(l>=a.length)throw new Error('An out-of-bounds "shared" string index: '.concat(r));r=Wr(r=a[l],f);break;case"b":if("1"===r)r=!0;else{if("0"!==r)throw new Error('Unsupported "boolean" cell value: '.concat(r));r=!1}break;case"z":r=void 0;break;case"e":r=function(r){switch(r){case 0:return"#NULL!";case 7:return"#DIV/0!";case 15:return"#VALUE!";case 23:return"#REF!";case 29:return"#NAME?";case 36:return"#NUM!";case 42:return"#N/A";case 43:return"#GETTING_DATA";default:return"#ERROR_".concat(r)}}(r);break;case"d":if(void 0===r)break;var s=new Date(r);if(isNaN(s.valueOf()))throw new Error('Unsupported "date" cell value: '.concat(r));r=s;break;case"n":if(void 0===r)break;r=o&&function(r,e,t){if(void 0!==r){var n=e[r];if(!n)throw new Error("Cell style not found: ".concat(r));if(!n.numberFormat)return!1;if(zr.indexOf(n.numberFormat.id)>=0||t.dateFormat&&n.numberFormat.template===t.dateFormat||!1!==t.smartDateParser&&n.numberFormat.template&&qr(n.numberFormat.template))return!0}}(o,i,f)?function(r,e){e&&e.epoch1904&&(r+=4*Nr+Pr+Tr);var t=Pr+Tr+70*Nr+Er;return new Date(Math.floor((r-t)*Cr))}(r=Dr(r),{epoch1904:u}):(f.parseNumber||Dr)(r);break;default:throw new TypeError("Cell type not supported: ".concat(e))}return void 0===r&&(r=null),r}function Wr(r,e){return!1!==e.trim&&(r=r.trim()),""===r&&(r=void 0),r}function Gr(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,a,u=[],f=!0,l=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;f=!1}else for(;!(f=(n=i.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(r){l=!0,o=r}finally{try{if(!f&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return Hr(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Hr(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hr(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Jr(r){var e=Gr(r.split(/(\d+)/),2),t=e[0],n=e[1];return[Number(n),Vr(t.trim())]}var Kr=["","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Vr(r){for(var e=0,t=0;t<r.length;)e*=26,e+=Kr.indexOf(r[t]),t++;return e}function Qr(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,a,u=[],f=!0,l=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;f=!1}else for(;!(f=(n=i.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(r){l=!0,o=r}finally{try{if(!f&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return Yr(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Yr(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Zr(r,e,t,n,o){return r.cells.map((function(r){return function(r,e,t,n,o,i,a){var u=Qr(Jr(r.r),2);return{row:u[0],column:u[1],value:Br(e,r.t,{inlineString:t,styleId:r.s?Number(r.s):void 0,styles:o,sharedStrings:n,epoch1904:i,options:a})}}(r.attributes,r.value,r.inlineString,e,t,n,o)}))}function re(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return ee(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ee(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ee(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function te(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return ne(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ne(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ne(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function oe(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,a,u=[],f=!0,l=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;f=!1}else for(;!(f=(n=i.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(r){l=!0,o=r}finally{try{if(!f&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,e)||ie(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(r,e){if(r){if("string"==typeof r)return ae(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ae(r,e):void 0}}function ae(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function ue(r,e){if(0===r.length)return[];var t=oe(e,2);t[0];for(var n=t[1],o=n.column,i=n.row,a=new Array(i),u=0;u<i;){a[u]=new Array(o);for(var f=0;f<o;)a[u][f]=null,f++;u++}for(var l,s=function(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=ie(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(l=s()).done;){var c=l.value,d=c.row-1,m=c.column-1;m<o&&d<i&&(a[d][m]=c.value)}return a=function(r){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.rowIndexSourceMap,n=e.accessor,o=void 0===n?function(r){return r}:n,i=e.onlyTrimAtTheEnd,a=r.length-1;a>=0;){for(var u,f=!0,l=re(r[a]);!(u=l()).done;)if(null!==o(u.value)){f=!1;break}if(f)r.splice(a,1),t&&t.splice(a,1);else if(i)break;a--}return r}(function(r){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.accessor,n=void 0===t?function(r){return r}:t,o=e.onlyTrimAtTheEnd,i=r[0].length-1;i>=0;){for(var a,u=!0,f=te(r);!(a=f()).done;)if(null!==n(a.value[i])){u=!1;break}if(u)for(var l=0;l<r.length;)r[l].splice(i,1),l++;else if(o)break;i--}return r}(a,{onlyTrimAtTheEnd:!0}),{onlyTrimAtTheEnd:!0}),a}function fe(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,a,u=[],f=!0,l=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;f=!1}else for(;!(f=(n=i.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(r){l=!0,o=r}finally{try{if(!f&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return le(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return le(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function se(r,e,t){var n=t.sharedStrings,o=t.styles,i=t.epoch1904,a=t.options,u=function(r){var e=Zr(r.sheetData,n,o,i,a),t=r.dimension?function(r){var e=r.split(":").map(Jr).map((function(r){var e=fe(r,2);return{row:e[0],column:e[1]}}));1===e.length&&(e=[e[0],e[0]]);return e}(r.dimension):function(r){var e=function(r,e){return r-e},t=r.map((function(r){return r.row})).sort(e),n=r.map((function(r){return r.column})).sort(e),o=t[0],i=t[t.length-1];return[{row:o,column:n[0]},{row:i,column:n[n.length-1]}]}(e);return ue(e,t)};return e(r,{createInitialState:ce,onOpenTag:de,onCloseTag:me,onText:be}).then((function(r){return u(r)}))}function ce(){return{dimension:void 0,sheetData:void 0}}function de(r,e,t){"dimension"===r?t.dimension=e.ref:"sheetData"===r?t.sheetData={c:void 0,cells:[]}:t.sheetData&&function(r,e,t){"c"===r?(t.c={v:!1,is:!1,t:!1,r:!1,rPh:!1,value:void 0,inlineString:void 0,attributes:void 0},t.c.attributes=e):t.c&&function(r,e,t){"v"===r?t.v=!0:"is"===r?(t.is=!0,t.inlineString=""):"t"===r?t.t=!0:"r"===r?t.r=!0:"rPh"===r&&(t.rPh=!0)}(r,0,t.c)}(r,e,t.sheetData)}function me(r,e){e.sheetData&&function(r,e){"c"===r?(e.cells.push({attributes:e.c.attributes,value:e.c.value,inlineString:e.c.inlineString}),e.c=void 0):e.c&&function(r,e){"v"===r?e.v=!1:"is"===r?e.is=!1:"t"===r?e.t=!1:"r"===r?e.r=!1:"rPh"===r&&(e.rPh=!1)}(r,e.c)}(r,e.sheetData)}function be(r,e){e.sheetData&&function(r,e){e.c&&function(r,e){e.v?e.value=r:e.is&&(e.rPh||e.t&&(e.r?e.inlineString+=r:e.inlineString=r))}(r,e.c)}(r,e.sheetData)}function he(r){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},he(r)}function pe(r){return"object"===he(r)&&"function"==typeof r.then}var ye=["parseNumber"];function ve(r){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ve(r)}function ge(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,e){if(!r)return;if("string"==typeof r)return we(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return we(r,e)}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function we(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Se(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t,n,o={},i=Object.keys(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||(o[t]=r[t]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function Oe(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function xe(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(t),!0).forEach((function(e){Ae(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Oe(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function Ae(r,e,t){return(e=function(r){var e=function(r,e){if("object"!==ve(r)||null===r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!==ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===ve(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function je(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return rr("parse spreadsheet info and file paths"),Ce(Ee(),e,r).then((function(n){var o=n.spreadsheetInfo,i=n.filePaths;return rr('parse "shared strings" and "styles"'),Ce(Pe(i),e,r).then((function(n){var a=n.sharedStrings,u=n.styles,f=t.sheets?t.sheets.map((function(r){return ke(r,o.sheets)})):o.sheets.map((function(r){return r.relationId}));return rr("parse sheet".concat(1===f.length?"":"s"," data")),Ce(Te(i,f,{sharedStrings:a,styles:u,epoch1904:o.epoch1904,options:t}),e,r).then((function(r){return rr("end"),f.map((function(e){return{sheet:Ie(e,o.sheets),data:r[e]}}))}))}))}))}function ke(r,e){if("string"==typeof r){for(var t,n=ge(e);!(t=n()).done;){var o=t.value;if(o.name===r)return o.relationId}throw new Error('Sheet "'.concat(r,'" not found. Available sheets: ').concat(e.map((function(r){var e=r.name;return'"'.concat(e,'"')})).join(", ")))}if(r<=e.length)return e[r-1].relationId;throw new Error("Sheet number out of bounds: ".concat(r,". Available sheets count: ").concat(e.length))}function Ie(r,e){for(var t,n=ge(e);!(t=n()).done;){var o=t.value;if(o.relationId===r)return o.name}throw new Error("Sheet relation ID not found: ".concat(r))}function Ee(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:fr},"xl/workbook.xml":{name:"spreadsheetInfo",parse:ir}}}function Pe(r){var e;return Ae(e={},r.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:xr,fallback:[]}),Ae(e,r.styles||"xl/styles.xml",{name:"styles",parse:vr,fallback:{}}),e}function Te(r,e,t){return Object.keys(r.sheets).filter((function(r){return e.includes(r)})).reduce((function(e,n){return xe(xe({},e),{},Ae({},r.sheets[n],{name:n,parse:function(r,e){return se(r,e,t)}}))}),{})}function Ce(r,e,t){for(var n,o,i={},a=0,u=Object.keys(r);a<u.length;a++)n=void 0,o=void 0,n=u[a],o=r[n],i[o.name]=void 0===e[n]?void 0===o.fallback?function(){throw new Error('"'.concat(n,'" file not found inside the `.xlsx` file'))}():o.fallback:o.parse(e[n],t);for(var f=[],l=function(){var r=c[s];pe(i[r])&&f.push(i[r].then((function(e){i[r]=e})))},s=0,c=Object.keys(i);s<c.length;s++)l();return f.length>0?Promise.all(f).then((function(){return i})):i}return function(r,e){return nr(r).then((function(r){return function(r,e,t,n){if(n&&n.parseNumber||(n=xe(xe({},n),{},{parseNumber:Dr})),!r)return je(e,t,n);var o=n,i=o.parseNumber,a=Se(o,ye),u=r((function(r){var t=xe(xe({},r.optionsJson),{},{parseNumber:i});return je(e,r.contents,t)}));return u.addDependencies((function(){return[e,i,je,ke,Ie,Ee,Pe,Te,Ce,rr,G,pe]})),u.callOnce({optionsJson:a,contents:t})}(undefined,t,r,e)}))}}));
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).readXlsxFile=r()}(this,(function(){"use strict";function t(t){const e={},n={},o=t(),i=t.toString(),u=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(",");let a=0;for(;a<o.length;){let t=u[a],i=o[a];"function"==typeof i?e[t]=r(i,t):n[t]=i,a++}return{functions:e,variables:n}}function r(t,r){const e=t.toString();if(t.prototype){if(-1!=e.indexOf("[native code]")){const t=e.indexOf(" ",8)+1,r=e.indexOf("(",t);return e.slice(t,r)}{let n=e;for(const e in t.prototype)n+=";"+r+".prototype."+e+"="+t.prototype[e].toString();return n}}return e}function e(r,e,i,u,a,f){let c,s=!1;return{start:(l,p)=>{if(s)throw new Error("Was started");s=!0;const b=a(),y=b&&b._,d=y||function(r,e){const[i,u]=function(r){let e={},n={};for(const o of r){const{functions:r,variables:i}=t(o);e=Object.assign(Object.assign({},e),r),n=Object.assign(Object.assign({},n),i)}const o=Object.keys(e).map((t=>t+"="+e[t])).join(";");return[o,n]}(e),a=i+";"+n+r.toString()+o;return[a,u]}(e,l);y||f({_:d});const[v,m]=d;c=r(v,(()=>{const t=a();if(t)return t.other}),(t=>{f(Object.assign(Object.assign({},a()),{other:t}))}),i,u),m&&c.ingest(m,p)},stop:()=>{c.stop()},ingest:(t,r)=>{c.ingest(t,r)}}}const n="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",o=")(postMessage)}";const i={};function u(t,r){let n,o;return function(t,r,n,o,u,a){let f,c,s=!1,l=!1,p=[],b=()=>[],y=()=>[];const d=t=>i[t],v=(t,r)=>{i[t]=r},m=()=>{if(s)throw new Error("Was started")},h=()=>{if(l)throw new Error("Was stopped")},g=()=>{if(f)throw new Error("Has alias")},w=t=>{if("function"!=typeof t)throw new TypeError("Argument must be a function")};let O,S;if("string"==typeof r){if(f=r,c=d(f),!c||!c.$)throw new Error("Not found");O=c.$[0],p=c.$[1],b=c.$[2],y=c.$[3],c.$[4]}else O=r;w(O);const j=t=>{h(),m(),w(t),p.push(t)},x=()=>{h(),m(),j((()=>[O,y,o])),s=!0,S.start(p,void 0)},P=()=>{l=!0,S.stop()},E=Object.assign({inputLatency:void 0,outputLatency:void 0,addDependencies(t){g(),j(t)},inputTransferList:t=>{h(),m(),g(),w(t),b=t},outputTransferList:t=>{h(),m(),g(),w(t),y=t},alias(t){h(),m(),g(),f=t,v(f,{$:[O,p,b,y]})},start:x,stop:P},n(x,P,s,l,(t=>{S.ingest([Date.now(),t],b(...t))}),(()=>{if(!s)throw new Error("Not started")}),m,h));return S=e(t,(t=>{let r=0,e=0;const n=o(O,(n=>{t([r,e,Date.now(),n],y(n))}));return([t,o])=>(r=t,e=Date.now(),n(o))}),(t=>{l||u(t)}),(([t,r,e,n])=>{l||(E.inputLatency=r-t,E.outputLatency=Date.now()-e,a(n))}),(()=>{if(f){const t=d(f);if(t)return t.other}}),(t=>{f&&v(f,Object.assign(Object.assign({},d(f)),{other:t}))})),E}(t,r,((t,r,e,i,u,a,f,c)=>({call(...t){if(c(),a(),n||o)throw new Error("Previous call not finished");return new Promise(((r,e)=>{n=r,o=e,u(t)}))},callOnce(...e){return t(),this.call(...e).finally(r)}})),((t,r)=>e=>{const n=t(...e);var o;null!==(o=n)&&"object"==typeof o&&"function"==typeof o.then?n.then(r):r(n)}),(t=>{if(!o)throw new Error("`reject` callback not found");o(t),n=void 0,o=void 0}),(t=>{if(!n)throw new Error("`resolve` callback not found");n(t),n=void 0,o=void 0}))}function a(t,r,e,n,o){let i=r();i||(i=function(t){return URL.createObjectURL(new Blob([t+";"+c],{type:"text/javascript"}))}(t),e(i));const u=new Worker(i);return u.onmessage=t=>{const r=t.data,e=r?r[f]:void 0;if(e){const[t,r,o,i]=e,a=new Error(r);a.name=t,a.code=o,a.stack=i,n(a),u.terminate()}else o(r)},{stop:u.terminate.bind(u),ingest:u.postMessage.bind(u)}}const f="$error$",c='self.onmessage = function(event) {onMessage(event.data)};var postMessage = self.postMessage;addEventListener("error",function(event) {var error = event.error;postMessage({'+f+':[error.name,error.message,error.code,error.stack]})});addEventListener("unhandledrejection",function(event) {event.preventDefault();var error = event.reason instanceof Error ? event.reason : new Error(event.reason);postMessage({'+f+":[error.name,error.message,error.code,error.stack]})})";function s(t){return u(a,t)}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function p(t){var r=String.fromCharCode,e=Object.prototype.hasOwnProperty,n=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,o={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function i(t,n,i,u){return u?e.call(o,u)?o[u]:"&"+u+";":r(n||parseInt(i,16))}function u(t){return t.length>3&&-1!==t.indexOf("&")?t.replace(n,i):t}Object.keys(o).forEach((function(t){o[t.toUpperCase()]=o[t]}));var a="non-whitespace outside of root node";function f(t){return new Error(t)}function c(t){return{get:t,enumerable:!0}}function s(t){var r,e={};for(r in t)e[r]=t[r];return e}var p=Symbol("nameCache");function b(t){return t+"$uri"}function y(){return{line:0,column:0}}function d(t){throw t}return new function t(r){if(!this)return new t(r);var e,n,o,i,v,m,h,g,w,O,S,j,x=r&&r.proxy,P=d,E=y,I=!1,A=!1,k="",N=!1,T=!1,_=null,D=!1;function C(t){t instanceof Error||(t=f(t)),_=t,P(t,E)}function L(t){v&&(t instanceof Error||(t=f(t)),v(t,E))}function R(){w=T?[]:null,O=T?function(t){var r,e,n={};for(r in t)n[e=t[r]]=e,n[b(e)]=r;return n}(j):null,S=[],E=y,D=!1,_=null,A=!1,k=""}function M(t){var r,f,l,y,d,v,P,I,k,_,R,M=arguments.length>1&&void 0!==arguments[1]&&arguments[1],F=null,U=null,V=0,$=!1,X=!1,B=0,q=0,W="",z=0;function G(t,r){var e=t.indexOf(":");if(-1===e)return t;var n=O[t.substring(0,e)];return n?r===n?t.substr(e+1):n+t.substr(e):(L("missing namespace for prefix <"+t.substring(0,e)+">"),null)}function H(){if(null!==R)return R;var t,r,e,n,o,i,a,f,c,l,p=T&&O.xmlns,y=T&&N?[]:null,d=z,v=W,m=v.length,h={},g=new Set;t:for(;d<m;d++)if(f=!1,!(32===(c=v.charCodeAt(d))||c<14&&c>8)){for((c<65||c>122||c>90&&c<97)&&95!==c&&58!==c&&(L("illegal first char attribute name"),f=!0),l=d+1;l<m;l++)if(!((c=v.charCodeAt(l))>96&&c<123||c>64&&c<91||c>47&&c<59||46===c||45===c||95===c)){if(32===c||c<14&&c>8){L("missing attribute value"),d=l;continue t}if(61===c)break;L("illegal attribute name char"),f=!0}if("xmlns:xmlns"===(a=v.substring(d,l))&&(L("illegal declaration of xmlns"),f=!0),34===(c=v.charCodeAt(l+1)))-1===(l=v.indexOf('"',d=l+2))&&-1!==(l=v.indexOf("'",d))&&(L("attribute value quote missmatch"),f=!0);else if(39===c)-1===(l=v.indexOf("'",d=l+2))&&-1!==(l=v.indexOf('"',d))&&(L("attribute value quote missmatch"),f=!0);else for(L("missing attribute value quotes"),f=!0,l+=1;l<m&&!(32===(c=v.charCodeAt(l+1))||c<14&&c>8);l++);for(-1===l&&(L("missing closing quotes"),l=m,f=!0),f||(o=v.substring(d,l)),d=l;l+1<m&&!(32===(c=v.charCodeAt(l+1))||c<14&&c>8);l++)d===l&&(L("illegal character after attribute end"),f=!0);if(d=l+1,!f)if(g.has(a))L("attribute <"+a+"> already defined");else if(g.add(a),T)if(N){if(null!==(n="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(t=u(o),r=b(n),!(i=j[t])){if("xmlns"===n||r in O&&O[r]!==t)do{i="ns"+V++}while(void 0!==O[i]);else i=n;j[t]=i}O[n]!==i&&(e||(O=s(O),e=!0),O[n]=i,"xmlns"===n&&(O[b(i)]=t,p=i),O[r]=t),h[a]=o;continue}y.push(a,o)}else null!==(a=G(a,p))&&(h[a]=o);else h[a]=o}if(N)for(d=0,m=y.length;d<m;d++)a=G(y[d++],p),o=y[d],null!==a&&(h[a]=o);return R=h}for(E=function(){for(var r,e,n=/(\r\n|\r|\n)/g,o=0,i=0,u=0,a=q;B>=u&&(r=n.exec(t))&&!((a=r[0].length+r.index)>B);)o+=1,u=a;return-1==B?(i=a,e=t.substring(q)):0===q?e=t.substring(q,B):(i=B-u,e=-1==q?t.substring(B):t.substring(B,q+1)),{data:e,line:o,column:i}},x&&(_=Object.create({},{name:c((function(){return I})),originalName:c((function(){return k})),attrs:c(H),ns:c((function(){return O}))}));-1!==q;){if(-1===(B=60===t.charCodeAt(q)?q:t.indexOf("<",q)))return M?t.substring(q):S.length?C("unexpected end of file"):A?void(q<t.length&&t.substring(q).trim()&&L(a)):C("missing start tag");if(A||(A=!0),q!==B)if(S.length){if(e&&(e(t.substring(q,B),u,E),D))return}else if(t.substring(q,B).trim()&&(L(a),D))return;if(33===(d=t.charCodeAt(B+1))){if(91===(y=t.charCodeAt(B+2))&&"CDATA["===t.substr(B+3,6)){if(-1===(q=t.indexOf("]]>",B)))return M?t.substring(B):C("unclosed cdata");if(i&&(i(t.substring(B+9,q),E),D))return;q+=3;continue}if(45===y&&45===t.charCodeAt(B+3)){if(-1===(q=t.indexOf("--\x3e",B)))return M?t.substring(B):C("unclosed comment");if(m&&(m(t.substring(B+4,q),u,E),D))return;q+=3;continue}}if(63!==d){for(f=B+1;;f++){if(v=t.charCodeAt(f),isNaN(v))return M?t.substring(B):(q=-1,C("unclosed tag"));if(34===v)f=-1!==(y=t.indexOf('"',f+1))?y:f;else if(39===v)f=-1!==(y=t.indexOf("'",f+1))?y:f;else if(62===v){q=f;break}}if(33!==d){if(R={},47===d){if($=!1,X=!0,!S.length)return C("missing open tag");if(f=I=S.pop(),y=B+2+f.length,t.substring(B+2,y)!==f)return C("closing tag mismatch");for(;y<q;y++)if(!(32===(d=t.charCodeAt(y))||d>8&&d<14))return C("close tag")}else{if(47===t.charCodeAt(q-1)?(f=I=t.substring(B+1,q-1),$=!0,X=!0):(f=I=t.substring(B+1,q),$=!0,X=!1),!(d>96&&d<123||d>64&&d<91||95===d||58===d))return C("illegal first char nodeName");for(y=1,l=f.length;y<l;y++)if(!((d=f.charCodeAt(y))>96&&d<123||d>64&&d<91||d>47&&d<59||45===d||95===d||46==d)){if(32===d||d<14&&d>8){I=f.substring(0,y),R=null;break}return C("invalid nodeName")}X||S.push(I)}if(T){r=O,$&&(X||w.push(r),null===R&&(N=-1!==f.indexOf("xmlns",y))&&(z=y,W=f,H(),N=!1)),k=I,U!==O&&(void 0===(F=O[p])&&(F=O[p]={}),U=O);var K=F[I];if(void 0!==K)I=K;else{if(-1!==(d=I.indexOf(":"))){if(!(P=O[I.substring(0,d)]))return C("missing namespace on <"+k+">");I=I.substr(d+1)}else P=O.xmlns;P&&(I=P+":"+I),F[k]=I}}if($&&(z=y,W=f,n&&(x?n(_,u,X,E):n(I,H,u,X,E),D)))return;if(X){if(o&&(o(x?_:I,u,$,E),D))return;T&&(O=$?r:w.pop())}q+=1}else{if(g&&(g(t.substring(B,q+1),u,E),D))return;q+=1}}else{if(-1===(q=t.indexOf("?>",B)))return M?t.substring(B):C("unclosed question");if(h&&(h(t.substring(B,q+2),E),D))return;q+=2}}}this.on=function(t,r){if("function"!=typeof r)throw f("required args <name, cb>");switch(t){case"openTag":n=r;break;case"text":e=r;break;case"closeTag":o=r;break;case"error":P=r;break;case"warn":v=r;break;case"cdata":i=r;break;case"attention":g=r;break;case"question":h=r;break;case"comment":m=r;break;default:throw f("unsupported event: "+t)}return this},this.ns=function(t){if(void 0===t&&(t={}),"object"!==l(t))throw f("required args <nsMap={}>");var r,e={};for(r in t)e[r]=t[r];return T=!0,j=e,this},this.parse=function(t){if("string"!=typeof t)throw f("required args <xml=string>");if(I)throw f("parse during stream; call end() first");return R(),M(t),E=y,D=!1,_},this.write=function(t){if("string"!=typeof t)throw f("required args <xml=string>");return I||(R(),I=!0),_||(k=M(k+t,!0)||""),this},this.end=function(){return I||R(),I=!1,_||M(k),k="",E=y,D=!1,_},this.stop=function(){D=!0}}(t)}var b=/.+:/;function y(t){return t.replace(b,"")}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function v(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,i=function(t,r){if("object"!==d(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===d(i)?i:String(i)),n)}var o,i}function m(t){var r=w();return function(){var e,n=S(t);if(r){var o=S(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return function(t,r){if(r&&("object"===d(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,e)}}function h(t){var r="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return g(t,arguments,S(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,t)},h(t)}function g(t,r,e){return g=w()?Reflect.construct.bind():function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Function.bind.apply(t,n));return e&&O(o,e.prototype),o},g.apply(null,arguments)}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function O(t,r){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},O(t,r)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}var j=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&O(t,r)}(i,t);var r,e,n,o=m(i);function i(t){var r;return function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t)).name="InvalidSpreadsheetError",r}return r=i,e&&v(r.prototype,e),n&&v(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(h(Error));function x(t,r,e,n,o,i){var u=function(t,r,e,n){var o,i=!1,u=function(){if(i)throw new Error("Errored")},a=new p({proxy:!0});return a.ns(),{promise:new Promise((function(u,f){o=u,a.on("error",(function(t){throw i=!0,t})),a.on("text",(function(r,e){n&&n(e(r),t)})),a.on("openTag",(function(e,n,o,i){if(r){var u=e.attrs;for(var a in u)u[a]=n(u[a]);r(y(e.originalName),u,t)}})),a.on("closeTag",(function(r){if(e){var n=y(r.originalName);e(n,t)}}))})),write:function(t){u(),a.write(t)},end:function(){u(),a.end(),o()}}}(r,e,n,o);return i?function(t,r,e,n){var o=7,i=65536,u=function(){var n=Date.now();if(r.length>i){t.write(r.slice(0,i)),e&&e(!1),r=r.slice(i);var u=Date.now()-n;return u<.5*o?i*=2:u>o&&(i/=2),!0}return t.write(r),t.end(),e&&e(!0),!1};!function t(){u()&&(n?"undefined"!=typeof setImmediate?setImmediate(t):setTimeout(t,0):t())}()}(u,t,i):(u.write(t),u.end()),u.promise.then((function(t){return t}),(function(t){var r=new j(t.message);throw r.stack=t.stack,r.cause=t,r}))}var P={},E=Uint8Array,I=Uint16Array,A=Int32Array,k=new E([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),N=new E([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),T=new E([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_=function(t,r){for(var e=new I(31),n=0;n<31;++n)e[n]=r+=1<<t[n-1];var o=new A(e[30]);for(n=1;n<30;++n)for(var i=e[n];i<e[n+1];++i)o[i]=i-e[n]<<5|n;return{b:e,r:o}},D=_(k,2),C=D.b,L=D.r;C[28]=258,L[258]=28;for(var R=_(N,0).b,M=new I(32768),F=0;F<32768;++F){var U=(43690&F)>>1|(21845&F)<<1;U=(61680&(U=(52428&U)>>2|(13107&U)<<2))>>4|(3855&U)<<4,M[F]=((65280&U)>>8|(255&U)<<8)>>1}var V=function(t,r,e){for(var n=t.length,o=0,i=new I(r);o<n;++o)t[o]&&++i[t[o]-1];var u,a=new I(r);for(o=1;o<r;++o)a[o]=a[o-1]+i[o-1]<<1;if(e){u=new I(1<<r);var f=15-r;for(o=0;o<n;++o)if(t[o])for(var c=o<<4|t[o],s=r-t[o],l=a[t[o]-1]++<<s,p=l|(1<<s)-1;l<=p;++l)u[M[l]>>f]=c}else for(u=new I(n),o=0;o<n;++o)t[o]&&(u[o]=M[a[t[o]-1]++]>>15-t[o]);return u},$=new E(288);for(F=0;F<144;++F)$[F]=8;for(F=144;F<256;++F)$[F]=9;for(F=256;F<280;++F)$[F]=7;for(F=280;F<288;++F)$[F]=8;var X=new E(32);for(F=0;F<32;++F)X[F]=5;var B=V($,9,1),q=V(X,5,1),W=function(t){for(var r=t[0],e=1;e<t.length;++e)t[e]>r&&(r=t[e]);return r},z=function(t,r,e){var n=r/8|0;return(t[n]|t[n+1]<<8)>>(7&r)&e},G=function(t,r){var e=r/8|0;return(t[e]|t[e+1]<<8|t[e+2]<<16)>>(7&r)},H=function(t){return(t+7)/8|0},K=function(t,r,e){return(null==r||r<0)&&(r=0),(null==e||e>t.length)&&(e=t.length),new E(t.subarray(r,e))},Y=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Z=function(t,r,e){var n=new Error(r||Y[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,Z),!e)throw n;return n},J=function(t,r,e,n){var o=t.length,i=n?n.length:0;if(!o||r.f&&!r.l)return e||new E(0);var u=!e,a=u||2!=r.i,f=r.i;u&&(e=new E(3*o));var c=function(t){var r=e.length;if(t>r){var n=new E(Math.max(2*r,t));n.set(e),e=n}},s=r.f||0,l=r.p||0,p=r.b||0,b=r.l,y=r.d,d=r.m,v=r.n,m=8*o;do{if(!b){s=z(t,l,1);var h=z(t,l+1,3);if(l+=3,!h){var g=t[(L=H(l)+4)-4]|t[L-3]<<8,w=L+g;if(w>o){f&&Z(0);break}a&&c(p+g),e.set(t.subarray(L,w),p),r.b=p+=g,r.p=l=8*w,r.f=s;continue}if(1==h)b=B,y=q,d=9,v=5;else if(2==h){var O=z(t,l,31)+257,S=z(t,l+10,15)+4,j=O+z(t,l+5,31)+1;l+=14;for(var x=new E(j),P=new E(19),I=0;I<S;++I)P[T[I]]=z(t,l+3*I,7);l+=3*S;var A=W(P),_=(1<<A)-1,D=V(P,A,1);for(I=0;I<j;){var L,M=D[z(t,l,_)];if(l+=15&M,(L=M>>4)<16)x[I++]=L;else{var F=0,U=0;for(16==L?(U=3+z(t,l,3),l+=2,F=x[I-1]):17==L?(U=3+z(t,l,7),l+=3):18==L&&(U=11+z(t,l,127),l+=7);U--;)x[I++]=F}}var $=x.subarray(0,O),X=x.subarray(O);d=W($),v=W(X),b=V($,d,1),y=V(X,v,1)}else Z(1);if(l>m){f&&Z(0);break}}a&&c(p+131072);for(var Y=(1<<d)-1,J=(1<<v)-1,Q=l;;Q=l){var tt=(F=b[G(t,l)&Y])>>4;if((l+=15&F)>m){f&&Z(0);break}if(F||Z(2),tt<256)e[p++]=tt;else{if(256==tt){Q=l,b=null;break}var rt=tt-254;if(tt>264){var et=k[I=tt-257];rt=z(t,l,(1<<et)-1)+C[I],l+=et}var nt=y[G(t,l)&J],ot=nt>>4;nt||Z(3),l+=15&nt;X=R[ot];if(ot>3){et=N[ot];X+=G(t,l)&(1<<et)-1,l+=et}if(l>m){f&&Z(0);break}a&&c(p+131072);var it=p+rt;if(p<X){var ut=i-X,at=Math.min(X,it);for(ut+p<0&&Z(3);p<at;++p)e[p]=n[ut+p]}for(;p<it;++p)e[p]=e[p-X]}}r.l=b,r.p=Q,r.b=p,r.f=s,b&&(s=1,r.m=d,r.d=y,r.n=v)}while(!s);return p!=e.length&&u?K(e,0,p):e.subarray(0,p)},Q=new E(0),tt=function(t,r,e){for(var n=t(),o=t.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),u=0;u<n.length;++u){var a=n[u],f=i[u];if("function"==typeof a){r+=";"+f+"=";var c=a.toString();if(a.prototype)if(-1!=c.indexOf("[native code]")){var s=c.indexOf(" ",8)+1;r+=c.slice(s,c.indexOf("(",s))}else for(var l in r+=c,a.prototype)r+=";"+f+".prototype."+l+"="+a.prototype[l].toString();else r+=c}else e[f]=a}return r},rt=[],et=function(t,r,e,n){if(!rt[e]){for(var o="",i={},u=t.length-1,a=0;a<u;++a)o=tt(t[a],o,i);rt[e]={c:tt(t[u],o,i),e:i}}var f=function(t,r){var e={};for(var n in t)e[n]=t[n];for(var n in r)e[n]=r[n];return e}({},rt[e].e);return function(t,r,e,n,o){var i=new Worker(P[r]||(P[r]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(t){var r=t.data,e=r.$e$;if(e){var n=new Error(e[0]);n.code=e[1],n.stack=e[2],o(n,null)}else o(null,r)},i.postMessage(e,n),i}(rt[e].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",e,f,function(t){var r=[];for(var e in t)t[e].buffer&&r.push((t[e]=new t[e].constructor(t[e])).buffer);return r}(f),n)},nt=function(){return[E,I,A,k,N,T,C,R,B,q,M,Y,V,W,z,G,H,K,Z,J,st,ot,it]},ot=function(t){return postMessage(t,[t.buffer])},it=function(t){return t&&{out:t.size&&new E(t.size),dictionary:t.dictionary}},ut=function(t,r,e,n,o,i){var u=et(e,n,o,(function(t,r){u.terminate(),i(t,r)}));return u.postMessage([t,r],r.consume?[t.buffer]:[]),function(){u.terminate()}},at=function(t,r){return t[r]|t[r+1]<<8},ft=function(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0},ct=function(t,r){return ft(t,r)+4294967296*ft(t,r+4)};function st(t,r){return J(t,{i:2},r&&r.out,r&&r.dictionary)}var lt="undefined"!=typeof TextDecoder&&new TextDecoder;try{lt.decode(Q,{stream:!0}),1}catch(t){}var pt=function(t){for(var r="",e=0;;){var n=t[e++],o=(n>127)+(n>223)+(n>239);if(e+o>t.length)return{s:r,r:K(t,e-1)};o?3==o?(n=((15&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n)):r+=1&o?String.fromCharCode((31&n)<<6|63&t[e++]):String.fromCharCode((15&n)<<12|(63&t[e++])<<6|63&t[e++]):r+=String.fromCharCode(n)}};function bt(t,r){if(r){for(var e="",n=0;n<t.length;n+=16384)e+=String.fromCharCode.apply(null,t.subarray(n,n+16384));return e}if(lt)return lt.decode(t);var o=pt(t),i=o.s;return(e=o.r).length&&Z(8),i}var yt=function(t,r){return r+30+at(t,r+26)+at(t,r+28)},dt=function(t,r,e){var n=at(t,r+28),o=at(t,r+30),i=bt(t.subarray(r+46,r+46+n),!(2048&at(t,r+8))),u=r+46+n,a=vt(t,u,o,e,ft(t,r+20),ft(t,r+24),ft(t,r+42)),f=a[0],c=a[1],s=a[2];return[at(t,r+10),f,c,i,u+o+at(t,r+32),s]},vt=function(t,r,e,n,o,i,u){var a=4294967295==o,f=4294967295==i,c=4294967295==u,s=r+e;if(n&&a+f+c){for(;r+4<s;r+=4+at(t,r+2))if(1==at(t,r))return[a?ct(t,r+4+8*f):o,f?ct(t,r+4):i,c?ct(t,r+4+8*(f+a)):u,1];n<2&&Z(13)}return[o,i,u,0]},mt="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()};function ht(t,r,e){e||(e=r,r={}),"function"!=typeof e&&Z(7);var n=[],o=function(){for(var t=0;t<n.length;++t)n[t]()},i={},u=function(t,r){mt((function(){e(t,r)}))};mt((function(){u=e}));for(var a=t.length-22;101010256!=ft(t,a);--a)if(!a||t.length-a>65558)return u(Z(13,0,1),null),o;var f=at(t,a+8);if(f){var c=f,s=ft(t,a+16),l=117853008==ft(t,a-20);if(l){var p=ft(t,a-12);(l=101075792==ft(t,p))&&(c=f=ft(t,p+32),s=ft(t,p+48))}for(var b=r&&r.filter,y=function(r){var e=dt(t,s,l),a=e[0],c=e[1],p=e[2],y=e[3],d=e[4],v=e[5],m=yt(t,v);s=d;var h=function(t,r){t?(o(),u(t,null)):(r&&(i[y]=r),--f||u(null,i))};if(!b||b({name:y,size:c,originalSize:p,compression:a}))if(a)if(8==a){var g=t.subarray(m,m+c);if(p<524288||c>.8*p)try{h(null,st(g,{out:new E(p)}))}catch(t){h(t,null)}else n.push(function(t,r,e){return e||(e=r,r={}),"function"!=typeof e&&Z(7),ut(t,r,[nt],(function(t){return ot(st(t.data[0],it(t.data[1])))}),1,e)}(g,{size:p},h))}else h(Z(14,"unknown compression type "+a,1),null);else h(null,K(t,m,m+c));else h(null,null)},d=0;d<c;++d)y()}else u(null,{});return o}function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function wt(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,i=function(t,r){if("object"!==gt(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===gt(i)?i:String(i)),n)}var o,i}function Ot(t){var r=xt();return function(){var e,n=Et(t);if(r){var o=Et(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return function(t,r){if(r&&("object"===gt(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,e)}}function St(t){var r="function"==typeof Map?new Map:void 0;return St=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return jt(t,arguments,Et(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Pt(n,t)},St(t)}function jt(t,r,e){return jt=xt()?Reflect.construct.bind():function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Function.bind.apply(t,n));return e&&Pt(o,e.prototype),o},jt.apply(null,arguments)}function xt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Pt(t,r){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Pt(t,r)}function Et(t){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Et(t)}var It=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&Pt(t,r)}(i,t);var r,e,n,o=Ot(i);function i(){return function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return r=i,e&&wt(r.prototype,e),n&&wt(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(St(Error));function At(t){var r=new It(t.message);return t.stack&&(r.stack=t.stack),Error.captureStackTrace&&Error.captureStackTrace(r,At),r.cause=t,r}function kt(t,r){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.filter,n=arguments.length>2?arguments[2]:void 0;return n(new Uint8Array(t),{filter:function(t){return!e||e({path:t.name})}}).then((function(t){return t}),(function(t){throw function(t){return"number"==typeof t.code}(t)?At(t):t}))}(t,r,Nt,!0)}function Nt(t){return new Promise((function(r,e){ht(t,(function(t,n){t?e(t):r(n)}))}))}function Tt(t){return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(t)}function _t(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,i=function(t,r){if("object"!==Tt(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===Tt(i)?i:String(i)),n)}var o,i}function Dt(t){var r=Rt();return function(){var e,n=Ft(t);if(r){var o=Ft(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return function(t,r){if(r&&("object"===Tt(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,e)}}function Ct(t){var r="function"==typeof Map?new Map:void 0;return Ct=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return Lt(t,arguments,Ft(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Mt(n,t)},Ct(t)}function Lt(t,r,e){return Lt=Rt()?Reflect.construct.bind():function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Function.bind.apply(t,n));return e&&Mt(o,e.prototype),o},Lt.apply(null,arguments)}function Rt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Mt(t,r){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Mt(t,r)}function Ft(t){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ft(t)}var Ut={XLS_FILE_NOT_SUPPORTED:"You passed a legacy `.xls` file. Only `.xlsx` files are supported",FILE_NOT_SUPPORTED:"Doesn't look like an `.xlsx` file",INVALID_ZIP:"Couldn't unzip `.xlsx` file contents",NO_DATA:"No data"},Vt=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&Mt(t,r)}(i,t);var r,e,n,o=Dt(i);function i(t,r){var e;return function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,Ut[t]||t)).code=t,e.name="InvalidInputError",e.cause=r,e}return r=i,e&&_t(r.prototype,e),n&&_t(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(Ct(Error));function $t(t){var r=t.path;return r.endsWith(".xml")||r.endsWith(".xml.rels")}var Xt=[80,75],Bt=[208,207,17,224],qt=[Xt,Bt];qt.indexOf(Xt);var Wt,zt=qt.indexOf(Bt);function Gt(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,r){if(!t)return;if("string"==typeof t)return Ht(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Ht(t,r)}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ht(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function Kt(t){for(var r,e=function(){var t,r=function(t){for(var r=[],e=0;e<t.length;)r.push(e),e++;return r}(qt),e=0;return function(n){var o;return isNaN(t)&&(1===(r=r.filter((function(t){if(n===qt[t][e])return qt[t].length===e+1&&(o=t),!0}))).length?t=o:0===r.length&&(t=-1)),e++,t}}(),n=Gt(t);!(r=n()).done;){if(Yt(r.value,e))return}!function(t){throw new Vt(0===t?"NO_DATA":"FILE_NOT_SUPPORTED")}(t.length)}function Yt(t,r){var e=r(t);if(void 0!==e){if(e===zt)throw new Vt("XLS_FILE_NOT_SUPPORTED");if(e<0)throw new Vt("FILE_NOT_SUPPORTED");return!0}}function Zt(t){var r=Date.now();("undefined"!=typeof global?Boolean(global.READ_EXCEL_FILE_CHECKPOINTS):"undefined"!=typeof window&&Boolean(window.READ_EXCEL_FILE_CHECKPOINTS))&&(Wt&&console.log(" -",r-Wt,"ms"),console.log("*",t)),Wt=r}function Jt(t){return Wt=void 0,Zt("unpack files"),t instanceof File||t instanceof Blob?t.arrayBuffer().then(Qt):Promise.resolve(t).then(Qt)}function Qt(t){return Kt(new Uint8Array(t)),kt(t,{filter:$t}).then((function(t){return t}),(function(t){throw t instanceof It?new Vt("INVALID_ZIP",t.cause):t}))}function tr(t,r){var e={workbookPr:void 0,sheets:[]};return r(t,e,(function(t,r,e){"workbookPr"===t?e.workbookPr||(e.workbookPr={epoch1904:"1"===r.date1904}):"sheet"===t&&r.name&&e.sheets.push({id:Number(r.sheetId),name:r.name,relationId:r["r:id"]})}),null,null).then((function(){return function(t){return{epoch1904:!!t.workbookPr&&t.workbookPr.epoch1904,sheets:t.sheets}}(e)}))}function rr(t,r){var e={sheets:{},sharedStrings:void 0,styles:void 0};return r(t,e,(function(t,r,e){"Relationship"===t&&function(t,r,e,o){switch(e){case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles":t.styles=n(o);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings":t.sharedStrings=n(o);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet":t.sheets[r]=n(o)}}(e,r.Id,r.Type,r.Target)}),null,null).then((function(){return e}));function n(t){return"/"===t[0]?t.slice(1):"xl/"+t}}function er(t){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(t)}var nr=["xfId"];function or(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function ir(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?or(Object(e),!0).forEach((function(r){ur(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):or(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function ur(t,r,e){return(r=function(t){var r=function(t,r){if("object"!==er(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===er(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function ar(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||(o[e]=t[e]);return o}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function fr(t,r){var e={numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1};return r(t,e,(function(t,r,e){if("numFmt"===t)e.numberFormats[r.numFmtId]={id:Number(r.numFmtId),template:r.formatCode};else if("cellStyleXfs"===t)e.cellStyleXfs=!0;else if("cellXfs"===t)e.cellXfs=!0;else if("xf"===t)if(e.cellStyleXfs)e.baseStyles.push(n(r));else if(e.cellXfs){var o=n(r,e.numberFormats);r.xfId&&(o.xfId=Number(r.xfId)),e.styles.push(o)}}),(function(t,r){"cellStyleXfs"===t?r.cellStyleXfs=!1:"cellXfs"===t&&(r.cellXfs=!1)}),null).then((function(){return function(t){return t.styles.map((function(r){if(r.xfId){var e=r.xfId,n=ar(r,nr);return ir(ir({},t.baseStyles[e]),n)}return r}))}(e)}));function n(t,r){var e={},n=t.numFmtId;return n&&(r&&r[n]?e.numberFormat=r[n]:e.numberFormat={id:Number(n)}),e}}function cr(t,r){var e={si:void 0,strings:[]};return r(t,e,(function(t,r,e){"si"===t?e.si={t:!1,r:!1,rPh:!1,string:""}:e.si&&function(t,r,e){"t"===t?e.t=!0:"r"===t?e.r=!0:"rPh"===t&&(e.rPh=!0)}(t,0,e.si)}),(function(t,r){"si"===t?(r.strings.push(r.si.string),r.si=void 0):r.si&&function(t,r){"t"===t?r.t=!1:"r"===t?r.r=!1:"rPh"===t&&(r.rPh=!1)}(t,r.si)}),(function(t,r){r.si&&function(t,r){r.rPh||r.t&&(r.r?r.string+=t:r.string=t)}(t,r.si)})).then((function(){return function(t){return t.strings}(e)}))}function sr(t,r){r&&(t+=1462);return Math.floor(864e5*(t-25569))}var lr=/^\[\$-[^\]]+\]/,pr=/;@$/,br={};var yr=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function dr(t,r,e){return!!t.numberFormat&&!!(hr.indexOf(t.numberFormat.id)>=0||r&&t.numberFormat.template===r||e&&t.numberFormat.template&&function(t){if(t in br)return br[t];var r=(t=(t=(t=t.toLowerCase()).replace(lr,"")).replace(pr,"")).split(/\W+/),e=0!==r.length&&r.every((function(t){return yr.indexOf(t)>=0}));return br[t]=e,e}(t.numberFormat.template))}var vr=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],mr=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],hr=[14,15,16,17,18,19,20,21,22,45,46,47].concat(vr).concat(mr.filter((function(t){return vr.indexOf(t)<0}))).concat([71,72,73,74,75,76,77,78,79,80,81].filter((function(t){return vr.indexOf(t)<0})).filter((function(t){return mr.indexOf(t)<0})));function gr(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,u,a=[],f=!0,c=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;f=!1}else for(;!(f=(n=i.call(e)).done)&&(a.push(n.value),a.length!==r);f=!0);}catch(t){c=!0,o=t}finally{try{if(!f&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return wr(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return wr(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wr(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var Or=[null,null];function Sr(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,u,a=[],f=!0,c=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;f=!1}else for(;!(f=(n=i.call(e)).done)&&(a.push(n.value),a.length!==r);f=!0);}catch(t){c=!0,o=t}finally{try{if(!f&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return jr(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return jr(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jr(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function xr(t){for(var r=Sr(t.split(/(\d+)/),2),e=r[0],n=r[1],o=0,i=0;i<e.length;)o*=26,o+=Pr.indexOf(e[i]),i++;var u=o;return[Number(n),u]}var Pr=["","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Er(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,u,a=[],f=!0,c=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;f=!1}else for(;!(f=(n=i.call(e)).done)&&(a.push(n.value),a.length!==r);f=!0);}catch(t){c=!0,o=t}finally{try{if(!f&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(t,r)||Ir(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ir(t,r){if(t){if("string"==typeof t)return Ar(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ar(t,r):void 0}}function Ar(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var kr=null;function Nr(t,r,e){var n,o=e.sharedStrings,i=e.styles,u=e.epoch1904,a=e.options,f=[o,i,u,a.dateFormat,!1!==a.smartDateParser,a.parseNumber],c=[],s=[],l={dimension:void 0,sheetData:void 0};return r(t,l,(function(t,r,e){"dimension"===t?e.dimension=function(t){var r=t.split(":").map(xr);1===r.length&&(r=[r[0],r[0]]);return r}(r.ref):"sheetData"===t?e.sheetData={c:void 0,rows:[],row:void 0,rowNumber:void 0,rowIndexShift:0,cursor:[0,0],rowCount:0,columnCount:0,dataRowCount:0,dataColumnCount:0,errors:[]}:e.sheetData&&function(t,r,e){"row"===t?(r.r&&(e.rowNumber=Number(r.r)),e.row=[]):"c"===t?(e.c={v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0},e.c.attributes=r):e.c&&function(t,r,e){"v"===t?e.v=!0:"is"===t?(e.is=!0,e.inlineString=""):"t"===t?e.t=!0:"r"===t?e.r=!0:"rPh"===t&&(e.rPh=!0)}(t,0,e.c)}(t,r,e.sheetData)}),(function(t,r){r.sheetData&&function(t,r){if("row"===t){if(r.rowNumber){var e=r.rowIndexShift+r.rows.length;if(r.rowNumber<=e)throw new j("Out-of-place <row/> number ".concat(r.rowNumber," follows <row/> number ").concat(e));for(;r.rowNumber>r.rowIndexShift+r.rows.length+1;)r.rows.push([])}r.rows.push(r.row),r.row.length>0&&(r.dataRowCount=r.rowNumber),r.rowNumber>r.rowCount&&(r.rowCount=r.rowNumber),r.row=void 0,r.rowNumber=void 0}else if("c"===t){var o=function(t){var r=t.attributes,e=t.inlineString,n=t.vText,o=Er(xr(r.r),2),i=o[0],u=o[1],c=function(t,r,e,n,o,i){var u=function(t,r,e,n,o){var i=function(t,r,e,n,o){var i=gr(o,6),u=i[0],a=i[1],f=i[2],c=i[3],s=i[4],l=i[5];switch(t||"n"){case"str":return void 0===e?"VALUE_MISSING":e?["s",e]:Or;case"inlineStr":return void 0===n?"VALUE_MISSING":["s",n];case"s":if(!e)return"VALUE_MISSING";var p=Number(e);return isNaN(p)||void 0===u[p]?"VALUE_INVALID":["s",u[p]];case"b":return e?"1"===e?["b",!0]:"0"===e?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return e?["e",e]:"VALUE_MISSING";case"d":if(!e)return Or;var b=new Date(e);return isNaN(b.valueOf())?"VALUE_INVALID":["d",b.getTime()];case"n":if(!e)return Or;if(r){var y=Number(r);if(isNaN(y)||void 0===a[y])return"FORMAT_INVALID";if(dr(a[y],c,s)){var d=Number(e);return isNaN(d)?"VALUE_INVALID":["d",sr(d,f)]}}if(l)return["n",e];var v=Number(e);return isNaN(v)?"VALUE_INVALID":["n",v];default:return"TYPE_INVALID"}}(t,r,e,n,o);if("VALUE_MISSING"===i)switch(t||"n"){case"str":case"inlineStr":case"s":case"b":return Or}if("e"===t)return Or;return i}(t,r,e,n,o);if(Array.isArray(u)&&"s"===u[0]&&(i&&(u[1]=u[1].trim()),""===u[1]))return Or;return u}(r.t,r.s,n,e,f,!1!==a.trim);if("string"==typeof c)return{row:i,column:u,error:c};return{row:i,column:u,value:b(c[1],c[0])}}(r.c);if(o.row<r.cursor[0]||o.row===r.cursor[0]&&o.column<=r.cursor[1])throw new j("Out-of-place <c/> at row ".concat(o.row," col ").concat(o.column," follows <c/> at row ").concat(r.cursor[0]," col ").concat(r.cursor[1]));if(r.cursor[0]=o.row,r.cursor[1]=o.column,r.rowNumber||(r.rowNumber=o.row),o.error)n&&p(o),r.errors.push(o);else if(o.value!==kr){for(;o.column>r.row.length+1;)r.row.push(kr);r.row.push(o.value),o.column>r.dataColumnCount&&(r.dataColumnCount=o.column)}o.column>r.columnCount&&(r.columnCount=o.column),r.c=void 0}else r.c&&function(t,r){"v"===t?(r.v=!1,r.vText||(r.vText="")):"is"===t?r.is=!1:"t"===t?r.t=!1:"r"===t?r.r=!1:"rPh"===t&&(r.rPh=!1)}(t,r.c)}(t,r.sheetData)}),(function(t,r){r.sheetData&&function(t,r){r.c&&function(t,r){r.v?r.vText=t:r.is&&(r.rPh||r.t&&(r.r?r.inlineString+=t:r.inlineString=t))}(t,r.c)}(t,r.sheetData)}),(function(t){var r=function(t){return t.sheetData.rows}(l),e=function(t){return t.sheetData.errors}(l);if(t)c=c.concat(r),(s=s.concat(e)).length>0&&p(s[0]);else if(r.length>1){var n=r.slice(0,-1);c=c.concat(n),s=s.concat(e),function(t,r){t.sheetData.rowIndexShift+=t.sheetData.rows.length-r.length,t.sheetData.rows=r}(l,r.slice(-1)),function(t,r){t.sheetData.errors=r}(l,[])}})).then((function(){var t=l.sheetData,r=t.rowCount,e=t.columnCount,n=t.dataRowCount,o=t.dataColumnCount;if(n<r&&(c=c.slice(0,n)),o<e)for(var i=0;i<c.length;)c[i].length>o&&(c[i]=c[i].slice(0,o)),i++;for(var u,a=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=Ir(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(c);!(u=a()).done;)for(var f=u.value;f.length<o;)f.push(kr);return c}));function p(t){var r=t.row,e=t.column,n=t.error;throw new j("<c/> at row ".concat(r,", col ").concat(e,": ").concat(n))}function b(t,r){return"n"===r?a.parseNumber?a.parseNumber(t):t:"d"===r?new Date(t):t}}function Tr(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):bt(t)}function _r(t){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_r(t)}function Dr(t){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(t)}function Cr(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,i=function(t,r){if("object"!==Dr(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==Dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===Dr(i)?i:String(i)),n)}var o,i}function Lr(t){var r=Fr();return function(){var e,n=Vr(t);if(r){var o=Vr(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return function(t,r){if(r&&("object"===Dr(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,e)}}function Rr(t){var r="function"==typeof Map?new Map:void 0;return Rr=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return Mr(t,arguments,Vr(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ur(n,t)},Rr(t)}function Mr(t,r,e){return Mr=Fr()?Reflect.construct.bind():function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Function.bind.apply(t,n));return e&&Ur(o,e.prototype),o},Mr.apply(null,arguments)}function Fr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Ur(t,r){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Ur(t,r)}function Vr(t){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vr(t)}var $r=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&Ur(t,r)}(i,t);var r,e,n,o=Lr(i);function i(t){var r;return function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t)).name="SheetNotFoundError",r}return r=i,e&&Cr(r.prototype,e),n&&Cr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(Rr(Error));function Xr(t){return Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xr(t)}function Br(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,r){if(!t)return;if("string"==typeof t)return qr(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return qr(t,r)}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function qr(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function Wr(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function zr(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?Wr(Object(e),!0).forEach((function(r){Gr(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Wr(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function Gr(t,r,e){return(r=function(t){var r=function(t,r){if("object"!==Xr(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==Xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===Xr(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var Hr=!1;function Kr(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=function(t){Zt("convert files to strings");for(var r={},e=0,n=Object.keys(t);e<n.length;e++){var o=n[e];r[o]=Tr(t[o])}return r}(r);return Zt("parse spreadsheet info and file paths"),Zr({"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:rr},"xl/workbook.xml":{name:"spreadsheetInfo",parse:tr}},n,t).then((function(r){var o=r.spreadsheetInfo,i=r.filePaths;return Zt('parse "shared strings" and "styles"'),Zr(function(t){var r;return Gr(r={},t.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:cr,fallback:[]}),Gr(r,t.styles||"xl/styles.xml",{name:"styles",parse:fr,fallback:{}}),r}(i),n,t).then((function(r){var u=r.sharedStrings,a=r.styles,f=e.sheets?e.sheets.map((function(t){return function(t,r){if("string"==typeof t){for(var e,n=Br(r);!(e=n()).done;){var o=e.value;if(o.name===t)return o.relationId}throw new $r('Sheet "'.concat(t,'" not found. Available sheets: ').concat(r.map((function(t){var r=t.name;return'"'.concat(r,'"')})).join(", ")))}if(t<=r.length)return r[t-1].relationId;throw new $r("Sheet number out of bounds: ".concat(t,". Available sheets count: ").concat(r.length))}(t,o.sheets)})):o.sheets.map((function(t){return t.relationId}));return Zt("parse sheet".concat(1===f.length?"":"s"," data")),Zr(function(t,r,e){return Object.keys(t.sheets).filter((function(t){return r.includes(t)})).reduce((function(r,n){return zr(zr({},r),{},Gr({},t.sheets[n],{name:n,parse:function(t,r){return Nr(t,r,e)}}))}),{})}(i,f,{sharedStrings:u,styles:a,epoch1904:o.epoch1904,options:e}),n,t).then((function(t){return Zt("end"),f.map((function(r){return{sheet:Yr(r,o.sheets),data:t[r]}}))}))}))}))}function Yr(t,r){for(var e,n=Br(r);!(e=n()).done;){var o=e.value;if(o.relationId===t)return o.name}throw new Error("Sheet relation ID not found: ".concat(t))}function Zr(t,r,e){for(var n,o,i={},u=0,a=Object.keys(t);u<a.length;u++)n=void 0,o=void 0,n=a[u],o=t[n],i[o.name]=void 0===r[n]?void 0===o.fallback?function(){throw new j('"'.concat(n,'" file not found inside the `.xlsx` file'))}():o.fallback:o.parse(r[n],e);for(var f=[],c=function(){var t,r=l[s];"object"===_r(t=i[r])&&"function"==typeof t.then&&f.push(i[r].then((function(t){i[r]=t})))},s=0,l=Object.keys(i);s<l.length;s++)c();return f.length>0?Promise.all(f).then((function(){return i})):i}return function(t,r){return Jt(t).then((function(t){return function(t,r,e,n){if(n&&n.parseNumber||(n=zr(zr({},n),{},{parseNumber:null})),!t||!Hr)return Kr(r,e,n)}(s,x,t,r)}))}}));
|
|
2
2
|
//# sourceMappingURL=read-excel-file.min.js.map
|