@sheetxl/sdk 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +11 -11
- package/README.md +28 -28
- package/browser/cjs/{BNu5tnv0HWnD0a-Y.cjs → 0nFsHy_LaGE8kh9D.cjs} +1 -1
- package/browser/cjs/{BWR8dikecERz-mPC.cjs → 2Rc7POsa0vpTfv4X.cjs} +1 -1
- package/browser/cjs/{0xmZmxJjOmmjIHmP.cjs → 3oqzu5_FD_K98t13.cjs} +2 -2
- package/browser/cjs/{NqwHbjXIQBBbSRXi.cjs → 9VJ0wqm8qT3Wov8v.cjs} +1 -1
- package/browser/cjs/{1fozUmjGg-EipZ-I.cjs → B5cDByTVCALLypp4.cjs} +4 -4
- package/browser/cjs/{BfiTBtFhUyNvcKLX.cjs → BA-sPwXKxyIz_J97.cjs} +1 -1
- package/browser/cjs/{CMA5t29CKdOzWCXY.cjs → BFt_wgK-JfSltEJj.cjs} +1 -1
- package/browser/cjs/{CCCRql04-bLPGjcj.cjs → BYQhJnA816-XxA6e.cjs} +2 -2
- package/browser/cjs/{D5UzXJK_3v6LMnmV.cjs → BpqWsIczfibZbHHc.cjs} +1 -1
- package/browser/cjs/{SjaaMyCi5dtgGGmL.cjs → BqgysXPw7gT7qMa6.cjs} +1 -1
- package/browser/cjs/{DqSxMnyKewiS8fBV.cjs → Bs_qUHybsz34wXoL.cjs} +1 -1
- package/browser/cjs/{BajpEaGKY8b2Svfu.cjs → BvieXa1Zc6WcUIRF.cjs} +1 -1
- package/browser/cjs/{IIq_ZeY4xw5jUCtS.cjs → Bw9z2cwe6w5IglCD.cjs} +1 -1
- package/browser/cjs/{3WQbj91IFfDAC0gN.cjs → BxcA8_8O6d_A4p95.cjs} +1 -1
- package/browser/cjs/{D_isdSejjd3cTHd9.cjs → C-YMz4iIUDMUHlj7.cjs} +1 -1
- package/browser/cjs/{BfGrLu3pwOGhQy_P.cjs → C-jpBfi1DXsq3xO2.cjs} +4 -4
- package/browser/cjs/{BY8kFpbTK9YmTthu.cjs → CR4Dyb0A6dcNCeTe.cjs} +3 -3
- package/browser/cjs/{By6PgbWbM1A7W6oi.cjs → CTirBjXvoadWKQBH.cjs} +1 -1
- package/browser/cjs/{3LIyo_LBPz4W3RmJ.cjs → Cduxle-KIyHhO0T8.cjs} +2 -2
- package/browser/cjs/{Lnci5f-BVgdm0alm.cjs → CndMV6nXnbqIQVrG.cjs} +1 -1
- package/browser/cjs/{DbDwN_TXoWUjF5TN.cjs → CoePQ-t5fi26TRBB.cjs} +1 -1
- package/browser/cjs/{DlgyITQ1YrxN5V6a.cjs → CyjGvSr2y8pIrCYI.cjs} +1 -1
- package/browser/cjs/{C2Kdm1dpMOQIX9fp.cjs → D8Vj9-np7x6u8S-6.cjs} +1 -1
- package/browser/cjs/{bGJeSH7RAhruwQiT.cjs → D9uNZOX7CbCGUwg7.cjs} +1 -1
- package/browser/cjs/{C-ausUhunWAualf3.cjs → DMOQ-Ccw7I7O7CWo.cjs} +1 -1
- package/browser/cjs/{YC_0gl0kTs_z8yNW.cjs → DPcn9c9W2k51cneD.cjs} +1 -1
- package/browser/cjs/{DezMujeboAuMduSK.cjs → DWSlWqcdVJXLrTxJ.cjs} +1 -1
- package/browser/cjs/{DkG3pV-kF_aJRBWX.cjs → DYtHonqDTIvQkjYj.cjs} +1 -1
- package/browser/cjs/{DoCioWdhrAULs2yd.cjs → DfJQEhVcHZKNplrJ.cjs} +2 -2
- package/browser/cjs/{242NkDzjjiWIfC7x.cjs → DyKGtzV-Q3950opi.cjs} +1 -1
- package/browser/cjs/{exZ3j01gpRsWnm9t.cjs → bgD_36TMmmQ7NPf8.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BJSgti3yu3jgoZBX.cjs → jGn5ADQS86BdM9Og.cjs} +1 -1
- package/browser/cjs/{5D6Cs9GidLGWb2c8.cjs → np6lMYUA2cAFzrUV.cjs} +9 -9
- package/browser/esm/{BX64GbFehCDkWggk.mjs → 62nzj1BiJvagSpxl.mjs} +1 -1
- package/{node/esm/Djq_sjDkyyHjk3wr.mjs → browser/esm/B4ituOqzq7nwHwCL.mjs} +1 -1
- package/browser/esm/{i3Uz3s7bb7ATzN9e.mjs → B7Q8LNdw4tARaP-y.mjs} +1 -1
- package/browser/esm/{B4npvpWOwSo8cfNR.mjs → BYSDp5vVuNSDZQCT.mjs} +1 -1
- package/browser/esm/{HS4onOMFxlYr1580.mjs → BaCEFX-FZ6GKJMQt.mjs} +1 -1
- package/{node/esm/CZLWcD5IioLpdBiZ.mjs → browser/esm/BuARJe5GS6EWOqNF.mjs} +1 -1
- package/browser/esm/{CxBB1R9hBAwhpG9i.mjs → BxJbquhlOzuv5jAG.mjs} +2 -2
- package/browser/esm/{DmQ-xCfZi9LH_El_.mjs → CDzGuBL-ysWRX-5T.mjs} +2 -2
- package/browser/esm/{BsSZI4PHsrQmcDPU.mjs → CFcBXCUHYh2n-Cf-.mjs} +1 -1
- package/browser/esm/{C2sFUfXffeShugL0.mjs → CUppQW5RiJ-9FMMg.mjs} +1 -1
- package/browser/esm/{Dlmqk-ACruvVvAqh.mjs → CbbScewO168cqAxo.mjs} +4 -4
- package/{node/esm/TPKd00FP_u2U6C49.mjs → browser/esm/CgOsTkNadY13dPLs.mjs} +1 -1
- package/browser/esm/{DuUswXm1yKQj22VO.mjs → CsoUp7eY1Vntzzjk.mjs} +1 -1
- package/browser/esm/{BXj6VLcvFADDe_qT.mjs → D3Kgs6cppXUdjkZW.mjs} +1 -1
- package/browser/esm/{Dm_UkJgVCA2_KVXj.mjs → D4YjSqdSSBo9eo5k.mjs} +1 -1
- package/{node/esm/Ca5hzGQtiO3NG2vI.mjs → browser/esm/DCY0Q9qCgDct3qgl.mjs} +1 -1
- package/browser/esm/{BfGWWDwbDdeUcJQC.mjs → DPctzVx7g2Rl6EgE.mjs} +1 -1
- package/browser/esm/{Dsaf7PD7qZsZhfJz.mjs → D_l4WGRWPKREFuRE.mjs} +1 -1
- package/browser/esm/{DLCYUalcNoz2wKdr.mjs → DoYSU7c-aBMjzMN8.mjs} +1 -1
- package/browser/esm/{vUYp4Jh31vLXAwUz.mjs → DtKtQ0LfnuPq0RRf.mjs} +1 -1
- package/browser/esm/{C2P0SXTA2Kbr1ZPX.mjs → DvJ9u1XKxU1JYkR_.mjs} +4 -4
- package/{node/esm/CFUPa-kvZ75I8_pF.mjs → browser/esm/DvoN1NfvYQNNWeA4.mjs} +1 -1
- package/browser/esm/{BcypK4JKXPJ-sCCP.mjs → MG38RVM3XDOilhRG.mjs} +1 -1
- package/browser/esm/{DOuxwS0XX9_yeiWM.mjs → MPfgIPWWY33bYOAo.mjs} +1 -1
- package/browser/esm/{CmltvNLgW0xUWuZW.mjs → N5U3PHENo7CJqAov.mjs} +1 -1
- package/browser/esm/{k986x8R6gj-EhlYv.mjs → V2CBWmozskT3iOTz.mjs} +1 -1
- package/browser/esm/{8kDnrf47IJS8Z5HU.mjs → WQB3QJ_RblmAjs_R.mjs} +150 -149
- package/{node/esm/CkgLXVYEawknlNu2.mjs → browser/esm/XCKizXW9QxAkQHrp.mjs} +1 -1
- package/browser/esm/{BnzRty-9U5hKl20h.mjs → YH1sgtW7fJqTyOwc.mjs} +2 -2
- package/{node/esm/BUvxk1iACfKNeSYd.mjs → browser/esm/YagDeC09jNvfORzf.mjs} +1 -1
- package/browser/esm/{CMukby167vn8QL-R.mjs → hGaf70QOp0sl7Mpo.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{krpxpx2ReIhrUQqk.mjs → oahricgVdSV0a2Lx.mjs} +2 -2
- package/browser/esm/{DOEuoyqTO66GEqBW.mjs → wJs8CBIgf04JIHOU.mjs} +3 -3
- package/licenses/dependencies.txt +33 -33
- package/node/esm/{DfG4jCDsh1uyjLV3.mjs → 1YbWEO0qBzEbd7Fc.mjs} +1 -1
- package/node/esm/{BX64GbFehCDkWggk.mjs → 62nzj1BiJvagSpxl.mjs} +1 -1
- package/{browser/esm/Djq_sjDkyyHjk3wr.mjs → node/esm/B4ituOqzq7nwHwCL.mjs} +1 -1
- package/node/esm/{i3Uz3s7bb7ATzN9e.mjs → B7Q8LNdw4tARaP-y.mjs} +1 -1
- package/node/esm/{BHk9xNB04ZhQ319c.mjs → BFfFXg_wrjU1zYLe.mjs} +2 -2
- package/node/esm/{BUfTNDCevr4f9sN6.mjs → BI2fMXU8ZhNXl07B.mjs} +1 -1
- package/node/esm/{B4npvpWOwSo8cfNR.mjs → BYSDp5vVuNSDZQCT.mjs} +1 -1
- package/node/esm/{xoDUhs5wl4hlF48c.mjs → BjWrqgGLw5m9YaD3.mjs} +1 -1
- package/{browser/esm/CZLWcD5IioLpdBiZ.mjs → node/esm/BuARJe5GS6EWOqNF.mjs} +1 -1
- package/node/esm/{CmLF8RQSHdTJePeZ.mjs → BwYTfUiNOzHRzq1B.mjs} +1 -1
- package/node/esm/{DhS4tP__Bz7w1SVJ.mjs → Cb2wOJsxXHwcO8eG.mjs} +4 -4
- package/{browser/esm/TPKd00FP_u2U6C49.mjs → node/esm/CgOsTkNadY13dPLs.mjs} +1 -1
- package/node/esm/{B1JX3uyy3Nhm5_j2.mjs → CgiHbe-0EPRUftQB.mjs} +1 -1
- package/node/esm/{TBOoV3GxYFgBIrbV.mjs → D0t-Ya6FXC4awknl.mjs} +1 -1
- package/{browser/esm/Ca5hzGQtiO3NG2vI.mjs → node/esm/DCY0Q9qCgDct3qgl.mjs} +1 -1
- package/node/esm/{CA99SbGNZzpTHLKo.mjs → DH8zEPF_3200OFF6.mjs} +2 -2
- package/node/esm/{BfGWWDwbDdeUcJQC.mjs → DPctzVx7g2Rl6EgE.mjs} +1 -1
- package/node/esm/{D9pCyBeIVg1LR9sy.mjs → DWaY2fml4pnA_KBI.mjs} +3 -3
- package/node/esm/{Dsaf7PD7qZsZhfJz.mjs → D_l4WGRWPKREFuRE.mjs} +1 -1
- package/node/esm/{DNMOmjeba5Nf3iw6.mjs → DdTt6BBZqaMH_FHu.mjs} +1 -1
- package/node/esm/{BYaFypfhgLKAu_cx.mjs → DjBPocEIBRosvo_I.mjs} +2 -2
- package/node/esm/{C9NErSQtZcZqp7FU.mjs → DjW05sB9ns0MJPVk.mjs} +1 -1
- package/node/esm/{DLCYUalcNoz2wKdr.mjs → DoYSU7c-aBMjzMN8.mjs} +1 -1
- package/node/esm/{C4EOeZ1D3X5VPHXh.mjs → Dv1GD-8kALftf21Q.mjs} +1 -1
- package/{browser/esm/CFUPa-kvZ75I8_pF.mjs → node/esm/DvoN1NfvYQNNWeA4.mjs} +1 -1
- package/node/esm/{B9LTwhz__4B5gtLl.mjs → Dx6tve6tpeLEndt2.mjs} +1 -1
- package/node/esm/{BcypK4JKXPJ-sCCP.mjs → MG38RVM3XDOilhRG.mjs} +1 -1
- package/node/esm/{DOuxwS0XX9_yeiWM.mjs → MPfgIPWWY33bYOAo.mjs} +1 -1
- package/node/esm/{CmltvNLgW0xUWuZW.mjs → N5U3PHENo7CJqAov.mjs} +1 -1
- package/{browser/esm/CkgLXVYEawknlNu2.mjs → node/esm/XCKizXW9QxAkQHrp.mjs} +1 -1
- package/{browser/esm/BUvxk1iACfKNeSYd.mjs → node/esm/YagDeC09jNvfORzf.mjs} +1 -1
- package/node/esm/index.mjs +9 -8
- package/package.json +4 -4
package/LICENSE.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# Repository Licensing
|
|
2
|
-
|
|
3
|
-
SheetXL contains a mix of open-source and commercially licensed packages. Each package is individually licensed and contains its own license file.
|
|
4
|
-
|
|
5
|
-
For the specific terms and conditions applicable to a package, please see the `LICENSE.md` file located in that package's root directory.
|
|
6
|
-
|
|
7
|
-
Generally, packages intended for public distribution (such as CLIs, adapters, and vanilla wrappers) are licensed under the MIT license. All other core packages are proprietary and require a commercial license for use.
|
|
8
|
-
|
|
9
|
-
For more details on commercial licensing, please visit our website:
|
|
10
|
-
|
|
11
|
-
https://www.sheetxl.com/licensing-pricing
|
|
1
|
+
# Repository Licensing
|
|
2
|
+
|
|
3
|
+
SheetXL contains a mix of open-source and commercially licensed packages. Each package is individually licensed and contains its own license file.
|
|
4
|
+
|
|
5
|
+
For the specific terms and conditions applicable to a package, please see the `LICENSE.md` file located in that package's root directory.
|
|
6
|
+
|
|
7
|
+
Generally, packages intended for public distribution (such as CLIs, adapters, and vanilla wrappers) are licensed under the MIT license. All other core packages are proprietary and require a commercial license for use.
|
|
8
|
+
|
|
9
|
+
For more details on commercial licensing, please visit our website:
|
|
10
|
+
|
|
11
|
+
https://www.sheetxl.com/licensing-pricing
|
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# SDK
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
A vectorized, columnar, scriptable, embeddable spreadsheet.
|
|
6
|
-
|
|
7
|
-
A high-performance, embeddable spreadsheet engine designed for building data-driven applications and integrating
|
|
8
|
-
spreadsheet functionality into existing systems. It handles even extremely large and sparse datasets,
|
|
9
|
-
while providing a powerful calculation engine and a flexible API. As part of the
|
|
10
|
-
[SheetXL](https://www.sheetxl.com) eco system, it seamlessly integrates with ready-to-use UI components and data
|
|
11
|
-
import/export tools.
|
|
12
|
-
|
|
13
|
-
Learn more about [SheetXL](https://www.sheetxl.com).
|
|
14
|
-
|
|
15
|
-
| Feature | Excel API (JS/Python) | Google Sheets API | pandas | DuckDB | Jupyter Notebooks | NumPy | Sigma Computing | SheetXL 🚀 |
|
|
16
|
-
|-----------------------------|----------------------|-------------------|--------|--------|------------------|-------|----------------|------------|
|
|
17
|
-
| **Spreadsheet-Like?** | ✅ Yes | ✅ Yes | ❌ No UI (table-based) | ❌ No UI | ❌ No real spreadsheet UI | ❌ No UI, array-based | ❌ No true spreadsheet UI | ✅ Yes (Excel-like UI) |
|
|
18
|
-
| **Vectorized Operations?** | ❌ Mostly scalar | ❌ Mostly scalar | ✅ Fully vectorized | ✅ Columnar, vectorized | ✅ Can use pandas/NumPy | ✅ Fully vectorized | ❌ SQL-based (not vectorized) | ✅ Fully vectorized, columnar |
|
|
19
|
-
| **Embeddable?** | ❌ Not easily embeddable | ✅ Web-based | ❌ Not embeddable | ✅ Can be embedded | ❌ Not embeddable | ❌ Not a spreadsheet | ✅ Cloud-based | ✅ Fully embeddable |
|
|
20
|
-
| **Data Science Capabilities?** | ⚠️ Limited (Python only) | ❌ No real data science | ✅ Strong data science | ✅ SQL-based analytics | ✅ Python data science | ✅ Scientific computing | ✅ BI analytics | ✅ Python & JS scripting |
|
|
21
|
-
|
|
22
|
-
## Advantages
|
|
23
|
-
|
|
24
|
-
1. The “Handoff Tax” → IT departments rewrite spreadsheets into web apps, but they lack true spreadsheet functionality. SheetXL removes this tax.
|
|
25
|
-
2. Excel’s API is scalar → Most spreadsheet APIs are slow because they weren’t built for large-scale, vectorized calculations.
|
|
26
|
-
3. BI tools don’t let you “program” the UI → Sigma, Looker, Tableau work for dashboards, but aren’t true programmable spreadsheets.
|
|
27
|
-
4. NumPy is fast, but has no spreadsheet UI → SheetXL gives NumPy performance inside a familiar spreadsheet.
|
|
28
|
-
5. Embeddability is a game-changer → Unlike Excel/Google Sheets, SheetXL is built for web apps, with seamless integration.
|
|
1
|
+
# SDK
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
A vectorized, columnar, scriptable, embeddable spreadsheet.
|
|
6
|
+
|
|
7
|
+
A high-performance, embeddable spreadsheet engine designed for building data-driven applications and integrating
|
|
8
|
+
spreadsheet functionality into existing systems. It handles even extremely large and sparse datasets,
|
|
9
|
+
while providing a powerful calculation engine and a flexible API. As part of the
|
|
10
|
+
[SheetXL](https://www.sheetxl.com) eco system, it seamlessly integrates with ready-to-use UI components and data
|
|
11
|
+
import/export tools.
|
|
12
|
+
|
|
13
|
+
Learn more about [SheetXL](https://www.sheetxl.com).
|
|
14
|
+
|
|
15
|
+
| Feature | Excel API (JS/Python) | Google Sheets API | pandas | DuckDB | Jupyter Notebooks | NumPy | Sigma Computing | SheetXL 🚀 |
|
|
16
|
+
|-----------------------------|----------------------|-------------------|--------|--------|------------------|-------|----------------|------------|
|
|
17
|
+
| **Spreadsheet-Like?** | ✅ Yes | ✅ Yes | ❌ No UI (table-based) | ❌ No UI | ❌ No real spreadsheet UI | ❌ No UI, array-based | ❌ No true spreadsheet UI | ✅ Yes (Excel-like UI) |
|
|
18
|
+
| **Vectorized Operations?** | ❌ Mostly scalar | ❌ Mostly scalar | ✅ Fully vectorized | ✅ Columnar, vectorized | ✅ Can use pandas/NumPy | ✅ Fully vectorized | ❌ SQL-based (not vectorized) | ✅ Fully vectorized, columnar |
|
|
19
|
+
| **Embeddable?** | ❌ Not easily embeddable | ✅ Web-based | ❌ Not embeddable | ✅ Can be embedded | ❌ Not embeddable | ❌ Not a spreadsheet | ✅ Cloud-based | ✅ Fully embeddable |
|
|
20
|
+
| **Data Science Capabilities?** | ⚠️ Limited (Python only) | ❌ No real data science | ✅ Strong data science | ✅ SQL-based analytics | ✅ Python data science | ✅ Scientific computing | ✅ BI analytics | ✅ Python & JS scripting |
|
|
21
|
+
|
|
22
|
+
## Advantages
|
|
23
|
+
|
|
24
|
+
1. The “Handoff Tax” → IT departments rewrite spreadsheets into web apps, but they lack true spreadsheet functionality. SheetXL removes this tax.
|
|
25
|
+
2. Excel’s API is scalar → Most spreadsheet APIs are slow because they weren’t built for large-scale, vectorized calculations.
|
|
26
|
+
3. BI tools don’t let you “program” the UI → Sigma, Looker, Tableau work for dashboards, but aren’t true programmable spreadsheets.
|
|
27
|
+
4. NumPy is fast, but has no spreadsheet UI → SheetXL gives NumPy performance inside a familiar spreadsheet.
|
|
28
|
+
5. Embeddability is a game-changer → Unlike Excel/Google Sheets, SheetXL is built for web apps, with seamless integration.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";var c=Object.create;var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var p=(e,r,t,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of s(r))!y.call(e,i)&&i!==t&&n(e,i,{get:()=>r[i],enumerable:!(l=a(r,i))||l.enumerable});return e};var g=(e,r,t)=>(t=e!=null?c(u(e)):{},p(r||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e));/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/const yt=require("./
|
|
6
|
+
*/const yt=require("./np6lMYUA2cAFzrUV.cjs");function kt(Y,H){for(var k=0;k<H.length;k++){const P=H[k];if(typeof P!="string"&&!Array.isArray(P)){for(const N in P)if(N!=="default"&&!(N in Y)){const Q=Object.getOwnPropertyDescriptor(P,N);Q&&Object.defineProperty(Y,N,Q.get?Q:{enumerable:!0,get:()=>P[N]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}var ct,pt={exports:{}},gt=(ct||(ct=1,pt.exports=function Y(){var H,k=typeof self<"u"?self:typeof window<"u"?window:k!==void 0?k:{},P=!k.document&&!!k.postMessage,N=k.IS_PAPA_WORKER||!1,Q={},mt=0,o={};function B(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let c=this._config.newline;c||(r=this._config.quoteChar||'"',c=this._handle.guessLineEndings(e,r)),e=[...e.split(c).slice(n)].join(c)}this.isFirstChunk&&_(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,N)k.postMessage({results:r,workerId:o.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):N&&this._config.error&&k.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),B.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=J(this._chunkLoaded,this),e.onerror=J(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(c){this._chunkError(c.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(i=>(i=i.getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),B.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=J(this._chunkLoaded,this),e.onerror=J(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,c=(this._config.chunkSize&&(c=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,c)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:c}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;B.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){B.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){B.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){B.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=J(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(c){this._streamError(c)}},this),this._streamError=J(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=J(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=J(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,c=Math.pow(2,53),R=-c,I=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,z=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,p=this,E=0,a=0,F=!1,u=!1,g=[],s={data:[],errors:[],meta:{}};function O(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function C(){if(s&&n&&(M("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(l){return!O(l)})),T()){let l=function(S,L){_(t.transformHeader)&&(S=t.transformHeader(S,L)),g.push(S)};if(s)if(Array.isArray(s.data[0])){for(var h=0;T()&&h<s.data.length;h++)s.data[h].forEach(l);s.data.splice(0,1)}else s.data.forEach(l)}function d(l,S){for(var L=t.header?{}:[],b=0;b<l.length;b++){var y=b,m=l[b];m=((U,f)=>(v=>(t.dynamicTypingFunction&&t.dynamicTyping[v]===void 0&&(t.dynamicTyping[v]=t.dynamicTypingFunction(v)),(t.dynamicTyping[v]||t.dynamicTyping)===!0))(U)?f==="true"||f==="TRUE"||f!=="false"&&f!=="FALSE"&&((v=>{if(I.test(v)&&(v=parseFloat(v),R<v&&v<c))return 1})(f)?parseFloat(f):z.test(f)?new Date(f):f===""?null:f):f)(y=t.header?b>=g.length?"__parsed_extra":g[b]:y,m=t.transform?t.transform(m,y):m),y==="__parsed_extra"?(L[y]=L[y]||[],L[y].push(m)):L[y]=m}return t.header&&(b>g.length?M("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+b,a+S):b<g.length&&M("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+b,a+S)),L}var w;s&&(t.header||t.dynamicTyping||t.transform)&&(w=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(d),w=s.data.length):s.data=d(s.data,0),t.header&&s.meta&&(s.meta.fields=g),a+=w)}function T(){return t.header&&g.length===0}function M(h,d,w,l){h={type:h,code:d,message:w},l!==void 0&&(h.row=l),s.errors.push(h)}_(t.step)&&(r=t.step,t.step=function(h){s=h,T()?C():(C(),s.data.length!==0&&(E+=h.data.length,t.preview&&E>t.preview?i.abort():(s.data=s.data[0],r(s,p))))}),this.parse=function(h,d,w){var l=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,l)),n=!1,t.delimiter?_(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((l=((S,L,b,y,m)=>{var U,f,v,$;m=m||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var Z=0;Z<m.length;Z++){for(var K,tt=m[Z],A=0,D=0,x=0,j=(v=void 0,new st({comments:y,delimiter:tt,newline:L,preview:10}).parse(S)),W=0;W<j.data.length;W++)b&&O(j.data[W])?x++:(D+=K=j.data[W].length,v===void 0?v=K:0<K&&(A+=Math.abs(K-v),v=K));0<j.data.length&&(D/=j.data.length-x),(f===void 0||A<=f)&&($===void 0||$<D)&&1.99<D&&(f=A,U=tt,$=D)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=l.bestDelimiter:(n=!0,t.delimiter=o.DefaultDelimiter),s.meta.delimiter=t.delimiter),l=at(t),t.preview&&t.header&&l.preview++,e=h,i=new st(l),s=i.parse(e,d,w),C(),F?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return F},this.pause=function(){F=!0,i.abort(),e=_(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){p.streamer._halted?(F=!1,p.streamer.parseChunk(e,!0)):setTimeout(p.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,_(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,d){h=h.substring(0,1048576),d=new RegExp(V(d)+"([^]*?)"+V(d),"gm");var w=(h=h.replace(d,"")).split("\r");if(h=1<(d=h.split(`
|
|
7
7
|
`)).length&&d[0].length<w[0].length,w.length===1||h)return`
|
|
8
8
|
`;for(var l=0,S=0;S<w.length;S++)w[S][0]===`
|
|
9
9
|
`&&l++;return l>=w.length/2?`\r
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./BYQhJnA816-XxA6e.cjs");var se,J,r;(J=se||(se={})).Orientation={Column:"column",Row:"row"},J.Orientations={...J.Orientation,Both:"both"},J.Direction={Up:"up",Down:"down",Left:"left",Right:"right"},(e=>{e.Code={Parse:0,Null:1,Div0:2,Value:3,Ref:4,Name:5,Num:6,NA:7,GettingData:8,Spill:9,Connect:10,Blocked:11,Unknown:12,Field:13,Calc:14,Busy:16,Python:19,Timeout:20},e.Label={Parse:"#PARSE!",Null:"#NULL!",Div0:"#DIV/0!",Value:"#VALUE!",Ref:"#REF!",Name:"#NAME?",Num:"#NUM!",NA:"#N/A",GettingData:"#GETTING_DATA",Spill:"#SPILL!",Connect:"#CONNECT!",Blocked:"#BLOCKED!",Unknown:"#UNKNOWN!",Field:"#FIELD!",Calc:"#CALC!",Busy:"#BUSY!",Python:"#PYTHON!",Timeout:"#TIMEOUT!"};class a extends Error{constructor(n,i,S,q){super(S,q),this._label=i,this._code=n,this.details=q}static{this.code=e.Code.Unknown}get isFormulaError(){return!0}getLabel(){return this._label}getCode(){return this._code}equals(n){return!!n&&(this._code===n._code||this._code===n.code)}get[Symbol.toStringTag](){return"[FormulaError]"}toString(){return this.message||this._label}}e.Known=a;class k extends a{constructor(n,i){super(e.Code.Parse,e.Label.Parse,n,i)}static{this.code=e.Code.Parse}getDetails(){const n=this.details;return{line:n?.line??1,column:n?.column??1,offset:n?.offset??0,length:n?.length??0}}}e.Parse=k;class x extends a{constructor(n,i){super(e.Code.Null,e.Label.Null,n,i)}static{this.code=e.Code.Null}}e.Null=x;class j extends a{constructor(n,i){super(e.Code.Div0,e.Label.Div0,n,i)}static{this.code=e.Code.Div0}}e.Div0=j;class X extends a{constructor(n,i){super(e.Code.Value,e.Label.Value,n,i)}static{this.code=e.Code.Value}}e.Value=X;class s extends a{constructor(n,i){super(e.Code.Ref,e.Label.Ref,n,i)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,i){super(e.Code.Name,e.Label.Name,n,i)}static{this.code=e.Code.Name}}e.Name=K;class M extends a{constructor(n,i){super(e.Code.Num,e.Label.Num,n,i)}static{this.code=e.Code.Num}}e.Num=M;class U extends a{constructor(n,i){super(e.Code.NA,e.Label.NA,n,i)}static{this.code=e.Code.NA}}e.NA=U;class Y extends a{constructor(n,i){super(e.Code.GettingData,e.Label.GettingData,n,i)}static{this.code=e.Code.GettingData}}e.GettingData=Y;class z extends a{constructor(n,i){super(e.Code.Spill,e.Label.Spill,n,i)}static{this.code=e.Code.Spill}}e.Spill=z;class O extends a{constructor(n,i){super(e.Code.Connect,e.Label.Connect,n,i)}static{this.code=e.Code.Connect}}e.Connect=O;class G extends a{constructor(n,i){super(e.Code.Blocked,e.Label.Blocked,n,i)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,i){super(e.Code.Unknown,e.Label.Unknown,n,i)}static{this.code=e.Code.Unknown}}e.Unknown=_;class F extends a{constructor(n,i){super(e.Code.Field,e.Label.Field,n,i)}static{this.code=e.Code.Field}}e.Field=F;class Q extends a{constructor(n,i){super(e.Code.Calc,e.Label.Calc,n,i)}static{this.code=e.Code.Calc}}e.Calc=Q;class I extends a{constructor(n,i){super(e.Code.Busy,e.Label.Busy,n,i)}static{this.code=e.Code.Busy}}e.Busy=I;class P extends a{constructor(n,i){super(e.Code.Python,e.Label.Python,n,i)}static{this.code=e.Code.Python}}e.Python=P;class Z extends a{constructor(n,i){super(e.Code.Timeout,e.Label.Timeout,n,i)}static{this.code=e.Code.Timeout}}e.Timeout=Z})(r||(r={}));const f={};f[r.Code.Parse]=r.Parse,f[r.Code.Null]=r.Null,f[r.Code.Div0]=r.Div0,f[r.Code.Value]=r.Value,f[r.Code.Ref]=r.Ref,f[r.Code.Name]=r.Name,f[r.Code.Num]=r.Num,f[r.Code.NA]=r.NA,f[r.Code.GettingData]=r.GettingData,f[r.Code.Spill]=r.Spill,f[r.Code.Connect]=r.Connect,f[r.Code.Blocked]=r.Blocked,f[r.Code.Unknown]=r.Unknown,f[r.Code.Field]=r.Field,f[r.Code.Calc]=r.Calc,f[r.Code.Busy]=r.Busy,f[r.Code.Python]=r.Python,f[r.Code.Timeout]=r.Timeout;const ce=new Map,ie=new Map,de=new Map,ue=new Map,le=Object.keys(f);for(let e=0;e<le.length;e++){const a=le[e],k=f[a];de.set(r.Label[a],k),ue.set(r.Code[a],k);const x=new k;ce.set(x.getLabel(),x),ie.set(x.getCode(),x)}const ge=ie.get(r.Code.Unknown);var p;(p=r||(r={})).BuiltIn={Parse:new p.Parse,Null:new p.Null,Div0:new p.Div0,Value:new p.Value,Ref:new p.Ref,Name:new p.Name,Num:new p.Num,NA:new p.NA,GettingData:new p.GettingData,Spill:new p.Spill,Connect:new p.Connect,Blocked:new p.Blocked,Unknown:new p.Unknown,Field:new p.Field,Calc:new p.Calc,Busy:new p.Busy,Python:new p.Python,Timeout:new p.Timeout},p.getBuiltInByLabel=e=>ce.get(e),p.newTypedError=(e,a,k)=>{let x;return x=typeof e=="string"?de.get(e):ue.get(e),x||(x=p.Unknown),new x(a,k)},p.getBuiltInById=e=>ie.get(e)||ge;let A=null,H=null;const we={compilerOptions:{target:"esnext"}},Ce=async()=>`
|
|
7
7
|
interface FirstTest {
|
|
8
8
|
isTrue?: boolean;
|
|
9
9
|
}
|
|
10
|
-
`,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ne=(e,a)=>{Array.from(a.keys()).forEach(k=>{const x=a.get(k);a.set(`${e}.${k}`,x)})},xe=new Map([["Scalar","*"],["FormulaError.Known","e"],["Date","Date"],["JSON","JSON"]]),be=new Map([]),oe="SheetXL";ne(oe,pe),ne(oe,me),ne(oe,be);const Te=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let W=null;async function ke(){if(W)return W;try{return await(await Promise.resolve().then(()=>require("./
|
|
10
|
+
`,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ne=(e,a)=>{Array.from(a.keys()).forEach(k=>{const x=a.get(k);a.set(`${e}.${k}`,x)})},xe=new Map([["Scalar","*"],["FormulaError.Known","e"],["Date","Date"],["JSON","JSON"]]),be=new Map([]),oe="SheetXL";ne(oe,pe),ne(oe,me),ne(oe,be);const Te=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let W=null;async function ke(){if(W)return W;try{return await(await Promise.resolve().then(()=>require("./0nFsHy_LaGE8kh9D.cjs"))).initialize()}catch(e){throw W=null,e}finally{W=null}}exports.compileModule=async function(e){const a=e?.source??null;if(!a)return null;const k=(e.disableBundle||e.declarationsOnly)??!1,x=[Ce(),ke()],j=await Promise.all(x),X=j[0],s=j[1];let K="",M=null;const U=[],Y={allowJs:!0,declaration:!1,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1,isolatedModules:!0,preserveConstEnums:!1,module:99,noResolve:!0,emitDeclarationOnly:!1,target:s.ScriptTarget.ES2020},z="script",O=`${z}.ts`,G="lib.d.ts",_="global.d.ts",F={[O]:a,[G]:`
|
|
11
11
|
/**
|
|
12
12
|
* Represents the completion of an asynchronous operation
|
|
13
13
|
*/
|
|
@@ -21,7 +21,7 @@ interface Promise<T> {
|
|
|
21
21
|
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
22
22
|
}
|
|
23
23
|
`,[_]:X},Q={getSourceFile:(t,d,E,l)=>s.createSourceFile(t,F[t],s.ScriptTarget.Latest,!0),fileExists:t=>F[t]!==void 0,readFile:t=>F[t],writeFile:(t,d)=>{F[t]=d},getCurrentDirectory:()=>"./",getCanonicalFileName:t=>t,useCaseSensitiveFileNames:()=>!0,getDefaultLibFileName:t=>G,getNewLine:()=>`
|
|
24
|
-
`},I=s.createProgram([O,_],Y,Q),P=I.getTypeChecker(),Z=I.getSourceFile(O),y=I.emit();y.diagnostics.length>0&&console.warn(y.diagnostics),K=F[`${z}.js`];const n=(t,d,E,l)=>{if(t){if(t.kind===s.SyntaxKind.NumberKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.StringKeyword)d.scalar="s";else if(t.kind===s.SyntaxKind.BooleanKeyword)d.scalar="b";else if(t.kind===s.SyntaxKind.UndefinedKeyword||t.kind===s.SyntaxKind.NullKeyword||t.kind===s.SyntaxKind.VoidKeyword){if(l)return void S(t,new Error(`'undefined' is not a valid type for input: '${t?.parent?.name?.escapedText}'.`));d.scalar="z"}else if(t.kind===s.SyntaxKind.BigIntKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.AnyKeyword)d.scalar="z";else if(t.kind===s.SyntaxKind.ArrayType){const c=t.elementType;if(!c)return void S(t,new Error(`'Array' must be typed: '${t?.parent?.name?.escapedText}'.`));d.arrayDepth=(d.arrayDepth??0)+1,n(c,d,E,l)}else if(t.kind!==s.SyntaxKind.TupleType&&t.kind===s.SyntaxKind.TypeReference){const c=t.typeName?.getText?.()??null,N=pe.get(c);let T=!1;N&&(d.range=N,T=!0);const L=xe.get(c);if(L&&(d.scalar=L),L!==void 0&&(T=!0),l){const g=me.get(c);if(g)return g}else{const g=Te.get(c);if(g){const m={...d,...g()};let o=0;if(m.async&&o++,m.stream&&o++,o>1)return void S(t,new Error(`'${c}' cannot have multiple modifiers: '${t?.parent?.name?.escapedText}'.`));d=m,T=!0}}if(!T)return void S("node",new Error(`'${c}' is not a valid type: '${t?.parent?.name?.escapedText}'.`));const b=t.typeArguments;if(b){if(b.length!==1)return void S(t,new Error(`'${c}' must be typed with exactly 1 type: '${t?.parent?.name?.escapedText}'.`));n(b[0],d,E,l)}}}else S(t,new Error(`Type is not defined for '${d?.name??"return"}'.`))},i=[],S=(t,d)=>{i.push(d)};if(s.forEachChild(Z,t=>{if(E=t,(s.getCombinedModifierFlags(E)&s.ModifierFlags.Export)!==0&&s.isFunctionDeclaration(t)){const l={},c={parameters:{}},N=t?.name?.getText();try{l.name=N;const T=P.getSymbolAtLocation(t.name).getDocumentationComment(P);if(T&&T.length>0&&T[0].text){let m=T[0].text;m=m.replace(/[\r\n]+/g,"\\n").trim(),c.summary=m}const L={};n(t.type,L,l,!1),l.returnType=L;const b={};d=t,(s.getCombinedModifierFlags(d)&s.ModifierFlags.Default)!==0&&(b.default=!0,M=N),Object.keys(b).length>0&&(l.behavior=b),l.parameters=[];const g=new Map;for(let m=0;m<t.parameters.length;m++){const o=t.parameters[m],h={};h.name=o.name?.getText();const $=n(o.type,h,l,!0);if($){if(l.parameters.length!==0){const B=t?.parent,C=B?.name?.getText();return void S(t,new Error(`'${l.name}' contexts must be the first parameter: '${C}'.`))}l.context=$;continue}let v;if((o.initializer!==void 0&&o.initializer!==null||o.questionToken!==void 0&&o.questionToken!==null)&&(h.optional=!0,o.initializer))try{v=o.initializer.kind===s.SyntaxKind.StringLiteral?o.initializer.text:o.initializer.kind===s.SyntaxKind.NumericLiteral?parseFloat(o.initializer.text):o.initializer.kind===s.SyntaxKind.TrueKeyword||o.initializer.kind===s.SyntaxKind.FalseKeyword?o.initializer.kind===s.SyntaxKind.TrueKeyword:o.initializer.kind===s.SyntaxKind.NullKeyword?null:o.initializer.kind===s.SyntaxKind.ObjectLiteralExpression||o.initializer.kind===s.SyntaxKind.ArrayLiteralExpression?o.initializer.getText():o.initializer.getText?.()}catch(B){console.warn(`Couldn't extract default value for parameter '${h.name}'`,B)}o.dotDotDotToken&&(h.rest=!0),l.parameters.push(h);const w={description:""};c.parameters[h.name]=w;const u=P.getSymbolAtLocation(o.name).getDocumentationComment(P);u&&u.length>0&&u[0].text&&(w.description=u[0].text),v!==void 0&&(w.defaultValue=v),g.set(h.name,h)}if(t.jsDoc&&t.jsDoc.length>0){const m=t.jsDoc;for(let o=0;o<m.length;o++){const h=m[o]?.tags;if(h)for(let $=0;$<h.length;$++){const v=h[$];let w=v?.tagName?.text;if(!w)continue;w=w.toLowerCase();let u=v.comment;const B=w==="hidden";if((typeof u=="string"||B)&&(typeof u=="string"&&(u=u.replace(/[\r\n]+/g,"\\n").trim()),B||!u||(u=u.split(/\\n/)[0],u&&u.length!==0))){if(u&&typeof u=="string"){const C=/\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;let D,R=u,V=[];for(;(D=C.exec(u))!==null;){const[ee,te,ye,ae]=D,fe=[ye.trim()];ae&&fe.push(ae.trim())}u=R,V.length>0&&w==="see"&&(c.links||(c.links=[]),c.links.push(...V))}if(w==="name"){const C=u;C!==N&&(c.name=C)}else if(w!=="description"){if(w==="summary"){const C=u;C&&(c.summary=C)}else if(w==="param"){const C=v.name?.text,D=g.get(C);if(!D){i.push(new Error(`Parameter '${C}' not found in function '${N}'.`));continue}if(v.typeExpression&&v.typeExpression.type)try{const R=v.typeExpression.type;if(R.kind===s.SyntaxKind.UnionType){const V=[];D.enums=V,R.types.forEach(ee=>{if(ee.kind===s.SyntaxKind.LiteralType){const te=ee.literal.text;te&&V.push(te)}})}}catch(R){console.warn("Error parsing JSDoc type expression:",R)}}else if(w==="returns"||w==="return")l.returnType.description=u;else if(w==="category")c.category=u;else if(w==="hidden"){let C=!0;const D=u?.toLowerCase();D==="false"?C=!1:D!=="true"&&(C=u),C!==!1&&(c.hidden=C??!0)}}}}}}Object.keys(l.returnType).length===0&&delete l.returnType,U.push([l,c])}catch(T){S(t,new Error(`'${N}': ${T.message}`))}}var d,E}),i.length>0)throw console.warn(i),new Error("There were compilation errors.",{cause:i});if(U.length===0)throw new Error("No exported functions.");const q=`${he.$t.uuidV4()}-script`;try{k||i.length!==0||(K=await async function(t,d,E="/script.js",l="__SHEETXL"){try{const c=await async function(){if(A)return A;if(H){if(await H,!A)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return A}let g,m;H=new Promise((o,h)=>{g=o,m=h});try{const{initialize:o}=await Promise.resolve().then(()=>require("./
|
|
24
|
+
`},I=s.createProgram([O,_],Y,Q),P=I.getTypeChecker(),Z=I.getSourceFile(O),y=I.emit();y.diagnostics.length>0&&console.warn(y.diagnostics),K=F[`${z}.js`];const n=(t,d,E,l)=>{if(t){if(t.kind===s.SyntaxKind.NumberKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.StringKeyword)d.scalar="s";else if(t.kind===s.SyntaxKind.BooleanKeyword)d.scalar="b";else if(t.kind===s.SyntaxKind.UndefinedKeyword||t.kind===s.SyntaxKind.NullKeyword||t.kind===s.SyntaxKind.VoidKeyword){if(l)return void S(t,new Error(`'undefined' is not a valid type for input: '${t?.parent?.name?.escapedText}'.`));d.scalar="z"}else if(t.kind===s.SyntaxKind.BigIntKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.AnyKeyword)d.scalar="z";else if(t.kind===s.SyntaxKind.ArrayType){const c=t.elementType;if(!c)return void S(t,new Error(`'Array' must be typed: '${t?.parent?.name?.escapedText}'.`));d.arrayDepth=(d.arrayDepth??0)+1,n(c,d,E,l)}else if(t.kind!==s.SyntaxKind.TupleType&&t.kind===s.SyntaxKind.TypeReference){const c=t.typeName?.getText?.()??null,N=pe.get(c);let T=!1;N&&(d.range=N,T=!0);const L=xe.get(c);if(L&&(d.scalar=L),L!==void 0&&(T=!0),l){const g=me.get(c);if(g)return g}else{const g=Te.get(c);if(g){const m={...d,...g()};let o=0;if(m.async&&o++,m.stream&&o++,o>1)return void S(t,new Error(`'${c}' cannot have multiple modifiers: '${t?.parent?.name?.escapedText}'.`));d=m,T=!0}}if(!T)return void S("node",new Error(`'${c}' is not a valid type: '${t?.parent?.name?.escapedText}'.`));const b=t.typeArguments;if(b){if(b.length!==1)return void S(t,new Error(`'${c}' must be typed with exactly 1 type: '${t?.parent?.name?.escapedText}'.`));n(b[0],d,E,l)}}}else S(t,new Error(`Type is not defined for '${d?.name??"return"}'.`))},i=[],S=(t,d)=>{i.push(d)};if(s.forEachChild(Z,t=>{if(E=t,(s.getCombinedModifierFlags(E)&s.ModifierFlags.Export)!==0&&s.isFunctionDeclaration(t)){const l={},c={parameters:{}},N=t?.name?.getText();try{l.name=N;const T=P.getSymbolAtLocation(t.name).getDocumentationComment(P);if(T&&T.length>0&&T[0].text){let m=T[0].text;m=m.replace(/[\r\n]+/g,"\\n").trim(),c.summary=m}const L={};n(t.type,L,l,!1),l.returnType=L;const b={};d=t,(s.getCombinedModifierFlags(d)&s.ModifierFlags.Default)!==0&&(b.default=!0,M=N),Object.keys(b).length>0&&(l.behavior=b),l.parameters=[];const g=new Map;for(let m=0;m<t.parameters.length;m++){const o=t.parameters[m],h={};h.name=o.name?.getText();const $=n(o.type,h,l,!0);if($){if(l.parameters.length!==0){const B=t?.parent,C=B?.name?.getText();return void S(t,new Error(`'${l.name}' contexts must be the first parameter: '${C}'.`))}l.context=$;continue}let v;if((o.initializer!==void 0&&o.initializer!==null||o.questionToken!==void 0&&o.questionToken!==null)&&(h.optional=!0,o.initializer))try{v=o.initializer.kind===s.SyntaxKind.StringLiteral?o.initializer.text:o.initializer.kind===s.SyntaxKind.NumericLiteral?parseFloat(o.initializer.text):o.initializer.kind===s.SyntaxKind.TrueKeyword||o.initializer.kind===s.SyntaxKind.FalseKeyword?o.initializer.kind===s.SyntaxKind.TrueKeyword:o.initializer.kind===s.SyntaxKind.NullKeyword?null:o.initializer.kind===s.SyntaxKind.ObjectLiteralExpression||o.initializer.kind===s.SyntaxKind.ArrayLiteralExpression?o.initializer.getText():o.initializer.getText?.()}catch(B){console.warn(`Couldn't extract default value for parameter '${h.name}'`,B)}o.dotDotDotToken&&(h.rest=!0),l.parameters.push(h);const w={description:""};c.parameters[h.name]=w;const u=P.getSymbolAtLocation(o.name).getDocumentationComment(P);u&&u.length>0&&u[0].text&&(w.description=u[0].text),v!==void 0&&(w.defaultValue=v),g.set(h.name,h)}if(t.jsDoc&&t.jsDoc.length>0){const m=t.jsDoc;for(let o=0;o<m.length;o++){const h=m[o]?.tags;if(h)for(let $=0;$<h.length;$++){const v=h[$];let w=v?.tagName?.text;if(!w)continue;w=w.toLowerCase();let u=v.comment;const B=w==="hidden";if((typeof u=="string"||B)&&(typeof u=="string"&&(u=u.replace(/[\r\n]+/g,"\\n").trim()),B||!u||(u=u.split(/\\n/)[0],u&&u.length!==0))){if(u&&typeof u=="string"){const C=/\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;let D,R=u,V=[];for(;(D=C.exec(u))!==null;){const[ee,te,ye,ae]=D,fe=[ye.trim()];ae&&fe.push(ae.trim())}u=R,V.length>0&&w==="see"&&(c.links||(c.links=[]),c.links.push(...V))}if(w==="name"){const C=u;C!==N&&(c.name=C)}else if(w!=="description"){if(w==="summary"){const C=u;C&&(c.summary=C)}else if(w==="param"){const C=v.name?.text,D=g.get(C);if(!D){i.push(new Error(`Parameter '${C}' not found in function '${N}'.`));continue}if(v.typeExpression&&v.typeExpression.type)try{const R=v.typeExpression.type;if(R.kind===s.SyntaxKind.UnionType){const V=[];D.enums=V,R.types.forEach(ee=>{if(ee.kind===s.SyntaxKind.LiteralType){const te=ee.literal.text;te&&V.push(te)}})}}catch(R){console.warn("Error parsing JSDoc type expression:",R)}}else if(w==="returns"||w==="return")l.returnType.description=u;else if(w==="category")c.category=u;else if(w==="hidden"){let C=!0;const D=u?.toLowerCase();D==="false"?C=!1:D!=="true"&&(C=u),C!==!1&&(c.hidden=C??!0)}}}}}}Object.keys(l.returnType).length===0&&delete l.returnType,U.push([l,c])}catch(T){S(t,new Error(`'${N}': ${T.message}`))}}var d,E}),i.length>0)throw console.warn(i),new Error("There were compilation errors.",{cause:i});if(U.length===0)throw new Error("No exported functions.");const q=`${he.$t.uuidV4()}-script`;try{k||i.length!==0||(K=await async function(t,d,E="/script.js",l="__SHEETXL"){try{const c=await async function(){if(A)return A;if(H){if(await H,!A)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return A}let g,m;H=new Promise((o,h)=>{g=o,m=h});try{const{initialize:o}=await Promise.resolve().then(()=>require("./D8Vj9-np7x6u8S-6.cjs"));return A=await o(),g(),A}catch(o){throw console.error("Failed to import or initialize esbuild:",o),H=null,m(o),o}}(),N="@sheetxl/primitives",T=`
|
|
25
25
|
export const FormulaContext = globalThis.${l}?.FormulaContext;
|
|
26
26
|
export const ScalarType = globalThis.${l}?.ScalarType;
|
|
27
27
|
export const Observable = globalThis.${l}?.Observable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -10,4 +10,4 @@ Please use Chrome or Edge if external copy and paste is required.`,k=`You do not
|
|
|
10
10
|
All copy and paste operations will be limited to the browser tab.`,jt={Safari:`The Safari browser does not support advanced copy and paste.
|
|
11
11
|
Copy and paste will be limited to within the browser tab.
|
|
12
12
|
|
|
13
|
-
Please use Chrome or Edge if external copy and paste is required.`,Perms:k,PermsWrite:T()===y.Safari?ut:k,PermsRead:T()===y.Safari?ut:k},N=async()=>new Promise(e=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{await N(),o&&a.length===0&&(a.push(new ClipboardItem({[v]:new Blob([o],{type:v})})),a.push(new ClipboardItem({[h]:new Blob([ft(o)],{type:h})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=_t(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${Ot+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!e?.source)return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./
|
|
13
|
+
Please use Chrome or Edge if external copy and paste is required.`,Perms:k,PermsWrite:T()===y.Safari?ut:k,PermsRead:T()===y.Safari?ut:k},N=async()=>new Promise(e=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{await N(),o&&a.length===0&&(a.push(new ClipboardItem({[v]:new Blob([o],{type:v})})),a.push(new ClipboardItem({[h]:new Blob([ft(o)],{type:h})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=_t(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${Ot+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!e?.source)return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./Cduxle-KIyHhO0T8.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}}),Gt=Object.freeze(Object.defineProperty({__proto__:null,ScriptingUtils:Vt},Symbol.toStringTag,{value:"Module"}));exports.$t=xt,exports.index=Gt;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.3
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let c=class{constructor(e){this._worker=null,this._nextId=1,this._pendingRequests=new Map,this._workerFactory=e}start(){if(typeof Worker>"u")throw new Error("Web Workers are not supported in this environment.");return this._worker||(this._worker=this._workerFactory(),this._worker.onmessage=e=>{const{id:n,result:t,error:r}=e.data,o=this._pendingRequests.get(n);if(o)if(this._pendingRequests.delete(n),r){const i=new Error(r.message);i.stack=r.stack,r.cause&&(i.cause=r.cause),o.reject(i)}else o.resolve(t)},this._worker.onerror=e=>{console.error("Worker error:",e),this._pendingRequests.forEach(n=>{n.reject(new Error(`Worker failed: ${e.message}`))}),this._pendingRequests.clear(),this._worker=null}),Promise.resolve()}execute(e){if(!this._worker)throw new Error("Worker is not initialized. Call start() first.");const n=this._nextId++;return new Promise((t,r)=>{this._pendingRequests.set(n,{resolve:t,reject:r}),this._worker.postMessage({id:n,params:e})})}terminate(){this._worker&&(this._worker.terminate(),this._worker=null)}};class u{constructor(n){this._onExecute=n}execute(n){return this._onExecute(n)}start(){return Promise.resolve()}terminate(){}}const s=`/**
|
|
7
|
-
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.
|
|
7
|
+
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.3
|
|
8
8
|
*
|
|
9
9
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
10
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -223,7 +223,7 @@ var v;
|
|
|
223
223
|
return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
|
|
224
224
|
}, v.getBuiltInById = (e) => Te.get(e) || Et;
|
|
225
225
|
/**
|
|
226
|
-
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.
|
|
226
|
+
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.3
|
|
227
227
|
*
|
|
228
228
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
229
229
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1498,4 +1498,4 @@ var or = /* @__PURE__ */ Object.freeze({
|
|
|
1498
1498
|
__proto__: null,
|
|
1499
1499
|
initialize: nr
|
|
1500
1500
|
});
|
|
1501
|
-
`,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./
|
|
1501
|
+
`,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./B5cDByTVCALLypp4.cjs")),n=new u(t=>e(t));return await n.start(),n};exports.createCompilerWorker=async function(){if(typeof process<"u"&&process.versions?.node&&typeof Worker>"u")return await l();if(typeof Worker<"u"){const e=new c(()=>new d);try{return await e.start(),e}catch(n){console.error("Failed to start TypescriptCompiler worker reverting to fallback:",n)}}return await l()};
|