@sheetxl/sdk 0.8.0-beta.12 → 0.8.0-beta.13
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/THIRD-PARTY-NOTICES.md +172 -0
- package/browser/esm/{DwwR3O2sEZApPSTF.mjs → -GEhXGMfNcWmHPby.mjs} +3 -3
- package/browser/esm/{DPhGQLNGmDZwODwJ.mjs → 9WXf_BTKjW1cQisZ.mjs} +94 -94
- package/browser/esm/{CRkYR-siY2C994KV.mjs → B2SgIPPBX0wjzuq8.mjs} +1 -1
- package/browser/esm/{CBYMTDzMf1Vh7pkw.mjs → BC2RwlNwCdRywkoD.mjs} +1 -1
- package/browser/esm/{-Jx-jNHmtIQQfLvK.mjs → BEqhm9xAUPiHUCFv.mjs} +1 -1
- package/browser/esm/BHgqi7KNrl7Vjr0W.mjs +348 -0
- package/browser/esm/{D64dM68B1pKYFzdP.mjs → BJKH0tDRx2FeSWvt.mjs} +2 -2
- package/browser/esm/{DobHLF6VjHr7Xi40.mjs → BTgWtqdQoh2cB6DL.mjs} +1 -1
- package/browser/esm/{CNdjyofiRu6CYOrr.mjs → BVshV1iY3bcUH9_E.mjs} +50 -48
- package/browser/esm/{qO-ujUrgq6H3TQix.mjs → BYQ63XU7JzB4_itX.mjs} +1 -1
- package/browser/esm/{C9u8FUewte5ugUjH.mjs → Bax5aOzQkbHKXW_X.mjs} +725 -716
- package/browser/esm/{Tah7cnFb_HNZdLtj.mjs → BiDGKhtzV6yIy66o.mjs} +3 -3
- package/browser/esm/BmYrWK5OmHRtgyqM.mjs +367 -0
- package/browser/esm/{DgrAuRD2qr2DvFeJ.mjs → BoAlHgjPQ6mxb_oO.mjs} +44 -44
- package/browser/esm/{CUzYuYTTGsChC_kZ.mjs → C0mjTq8lhrX3HiPa.mjs} +2052 -1583
- package/browser/esm/{w6Jea0TiclPrYZ2M.mjs → C5j0IdwtYkWlOftv.mjs} +509 -509
- package/browser/esm/{hCQJcmIzPDxDEv2q.mjs → CL84-iL2QeKlLzo5.mjs} +2 -2
- package/browser/esm/{2mIwPy2D2JUX-9wx.mjs → CLkBe-6n-pStQhnz.mjs} +2 -2
- package/browser/esm/{DZiivy0NmO1Vnyzk.mjs → CPzfhTPX2Y4dHX2p.mjs} +2 -2
- package/browser/esm/{fXWUMDhZ5yMSO629.mjs → CSJuIjYUOE387FIP.mjs} +1 -1
- package/browser/esm/{BIHrHjRGWVlJglcp.mjs → Cdw0mGuoV3IU2LhR.mjs} +2 -2
- package/browser/esm/{yuhcOYw6SHQ-RCm3.mjs → Ced5uyofOWHuL_Jy.mjs} +30 -30
- package/browser/esm/{B3wf5vZCsWfWsDbj.mjs → Ci_LJ4S_GvYX0STI.mjs} +1 -1
- package/browser/esm/{DK899HhWX1HINMC1.mjs → CwygVKP_RXmne5Ot.mjs} +25 -25
- package/browser/esm/{BdCJNawfifyPupCP.mjs → D-mfK0noQrM2jZLT.mjs} +1 -1
- package/browser/esm/{CwOPLXU3-9ZHGyOT.mjs → D9SH_8v3FYCnxOFK.mjs} +1 -1
- package/browser/esm/{D9xNz46kAfXMZzp4.mjs → DPD8fop6az9HZNiK.mjs} +2 -2
- package/browser/esm/{D2RZh0O9neOsyLAE.mjs → DW-MmlgMH87l-_cw.mjs} +69 -48
- package/browser/esm/{DwZCT7DZiiXoTweg.mjs → DctIlUsO78-OU2ht.mjs} +2 -2
- package/browser/esm/DdcKkVb4jM6Y_epY.mjs +184 -0
- package/browser/esm/{Cxjxk0ncRKx80I-w.mjs → DfKzE0IY0TjaEIxG.mjs} +1 -1
- package/browser/esm/{BnC4-27Igwb8oDf2.mjs → DkloMquaR1pbZCER.mjs} +44 -43
- package/browser/esm/{BudSIfXBAsTxvu-K.mjs → Dz86-De57bv2VYIi.mjs} +10111 -9269
- package/browser/esm/{BTFBedJMRWGvZyCE.mjs → HApSgmV2FXRRwQac.mjs} +1 -1
- package/browser/esm/{Bt8_m94tBdks209L.mjs → IbVAQU4YqtFqLwYk.mjs} +1 -1
- package/browser/esm/index.mjs +482 -440
- package/browser/esm/mHQ95RAfxHzcUN2r.mjs +18 -0
- package/browser/esm/{CdEO8CEee6lEhabA.mjs → pm00uZZu_H3gxHFx.mjs} +2 -2
- package/browser/esm/{Bg5Di9GLNAkbqQ1P.mjs → quEvwgrEuOb0h3q-.mjs} +1926 -1298
- package/browser/esm/{CndRBvVfQUJIYRRj.mjs → zZngLMg6mg6nnNGX.mjs} +50 -50
- package/licenses/dependencies.txt +71 -1
- package/node/esm/{C14-R6tifRh7pc0p.mjs → -K4Cek-bTUItkB_8.mjs} +1 -1
- package/node/esm/{D3ptRKzASqBut1DE.mjs → -b8yNV4v9qiq8EMY.mjs} +2 -2
- package/node/esm/{CBuEu5Jk-LfaDy-H.mjs → 1V-m67YHbxmg3xk2.mjs} +44 -44
- package/node/esm/{DhTya_mhmN53vskv.mjs → 4ROAfJC1mokmqubv.mjs} +1 -1
- package/node/esm/B89et7t3uRmtxk4v.mjs +115 -0
- package/node/esm/BKBkCBNGhMU0nQdY.mjs +372 -0
- package/node/esm/{Vocy-I9dKzZMr0Ct.mjs → BQ2XqExomMceAjfe.mjs} +10977 -10744
- package/node/esm/{Btw4148Ot8ifhNc1.mjs → Bfg7qjCXCwXbzW3K.mjs} +1 -1
- package/node/esm/{BNXLOEddJ6O9gYws.mjs → BtMeAB_dqJnOfzJM.mjs} +2 -2
- package/node/esm/{Q_S1g46ZOTrdhTae.mjs → Byc_bxU_MdjYtt0x.mjs} +1 -1
- package/node/esm/{Ci_zLYmCD7e-C79O.mjs → Bzrl292TNCK3Cpid.mjs} +1 -1
- package/node/esm/{DdoiuKg9BKubtF1V.mjs → C0P9zspoypRAj7yv.mjs} +1 -1
- package/node/esm/{C_aL7CGS1lrNn1Ng.mjs → C9gpMN3galHGZyoK.mjs} +1 -1
- package/node/esm/CKCG2peOkTq0gIIW.mjs +310 -0
- package/node/esm/{C99zzq8DImQXi4BQ.mjs → CWBS90g3Hz-kQDkY.mjs} +10 -10
- package/node/esm/{BskP3b8vUoIOGLY6.mjs → CoGSVnn-hNMtTEus.mjs} +2 -2
- package/node/esm/{DhS6yWjrrSNIJMsn.mjs → CzrLqStvrcPE2-hb.mjs} +234 -225
- package/node/esm/{CRt3vXe6YmXzqk3H.mjs → D16EdlZG1hX5WUUK.mjs} +102 -102
- package/node/esm/{DUTmDHbFbhLDT4F3.mjs → D1mDga2K5sjs8y07.mjs} +1 -1
- package/node/esm/{D4ROK9UwDpS6jO3Z.mjs → D2jtztjE6c23RKvZ.mjs} +1 -1
- package/node/esm/{icn2nX5Z8e_3mNAv.mjs → D9nRcWsYk3M82iD8.mjs} +1 -1
- package/node/esm/{CG-qBU5BAaVz7e-P.mjs → DALYzTxZ9Ur9C69Q.mjs} +1 -1
- package/node/esm/{DrCf6ITcBhVOFpRj.mjs → DF0nL7s01dp7n0Bx.mjs} +7 -7
- package/node/esm/{BL2iiEoqxDEV2Xrg.mjs → DO5ldLqhTvIfPXLW.mjs} +3348 -2610
- package/node/esm/DQz8J8ci7EJdqbuB.mjs +351 -0
- package/node/esm/{CiIymQN6aJCul62g.mjs → DR2OQTKqqyIkZnse.mjs} +9 -9
- package/node/esm/{eimUGjiIP-b8HiM6.mjs → DSTLPBgpsGW6qP9e.mjs} +52 -52
- package/node/esm/{DV5CU37aEbFbWFL0.mjs → DiXp7KSOZUSWXaZ5.mjs} +1 -1
- package/node/esm/{C_xf5Bz30VqiJjXn.mjs → DwvXHsycOQR219c7.mjs} +1 -1
- package/node/esm/{B-HUPAcqvK0eeeCz.mjs → Hc6B04OyVzHx2F5I.mjs} +38 -37
- package/node/esm/{lGJ42sHqg5if2bba.mjs → NkPNHsq2T3DXg76x.mjs} +458 -458
- package/node/esm/{-TA0MneBDKdGhsib.mjs → Nl_IIkO1jbk0s9i-.mjs} +3329 -2852
- package/node/esm/{DxazKtROyaI51dWl.mjs → OQT5lGqq8a4r5xNa.mjs} +1 -1
- package/node/esm/OTaaFGhF-k_iwobp.mjs +18 -0
- package/node/esm/{pYtP7wPyS96NQyXS.mjs → Z1elC_roIu7LhceZ.mjs} +25 -25
- package/node/esm/{CkRYLed8Mmn3giNg.mjs → e3F3OVXCxLJrSukW.mjs} +2 -2
- package/node/esm/index.mjs +584 -540
- package/node/esm/{D8hO07ToAibIuniw.mjs → suOBVUz-pca6ilJH.mjs} +138 -136
- package/package.json +8 -6
- package/resources/contents.json +108 -0
- package/resources/fonts/aptos-bold-italic.hinted.json +125 -0
- package/resources/fonts/aptos-bold-italic.metrics.json +221 -0
- package/resources/fonts/aptos-bold-italic.rows.json +8 -0
- package/resources/fonts/aptos-bold.hinted.json +125 -0
- package/resources/fonts/aptos-bold.metrics.json +221 -0
- package/resources/fonts/aptos-bold.rows.json +8 -0
- package/resources/fonts/aptos-display-bold-italic.hinted.json +125 -0
- package/resources/fonts/aptos-display-bold-italic.metrics.json +221 -0
- package/resources/fonts/aptos-display-bold-italic.rows.json +8 -0
- package/resources/fonts/aptos-display-bold.hinted.json +125 -0
- package/resources/fonts/aptos-display-bold.metrics.json +221 -0
- package/resources/fonts/aptos-display-bold.rows.json +8 -0
- package/resources/fonts/aptos-display-italic.hinted.json +124 -0
- package/resources/fonts/aptos-display-italic.metrics.json +221 -0
- package/resources/fonts/aptos-display-italic.rows.json +8 -0
- package/resources/fonts/aptos-display-regular.hinted.json +125 -0
- package/resources/fonts/aptos-display-regular.metrics.json +221 -0
- package/resources/fonts/aptos-display-regular.rows.json +8 -0
- package/resources/fonts/aptos-italic.hinted.json +125 -0
- package/resources/fonts/aptos-italic.metrics.json +221 -0
- package/resources/fonts/aptos-italic.rows.json +8 -0
- package/resources/fonts/aptos-narrow-bold-italic.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-bold-italic.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-bold-italic.rows.json +8 -0
- package/resources/fonts/aptos-narrow-bold.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-bold.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-bold.rows.json +8 -0
- package/resources/fonts/aptos-narrow-italic.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-italic.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-italic.rows.json +8 -0
- package/resources/fonts/aptos-narrow-regular.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-regular.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-regular.rows.json +8 -0
- package/resources/fonts/aptos-regular.hinted.json +125 -0
- package/resources/fonts/aptos-regular.metrics.json +221 -0
- package/resources/fonts/aptos-regular.rows.json +8 -0
- package/resources/fonts/arial-bold-italic.rows.json +0 -1
- package/resources/fonts/arial-bold.rows.json +0 -1
- package/resources/fonts/arial-italic.rows.json +0 -1
- package/resources/fonts/arial-regular.rows.json +0 -1
- package/resources/fonts/calibri-bold-italic.rows.json +0 -1
- package/resources/fonts/calibri-bold.rows.json +0 -1
- package/resources/fonts/calibri-italic.rows.json +0 -1
- package/resources/fonts/calibri-regular.rows.json +0 -1
- package/resources/fonts/cambria-bold-italic.rows.json +0 -1
- package/resources/fonts/cambria-bold.rows.json +0 -1
- package/resources/fonts/cambria-italic.rows.json +0 -1
- package/resources/fonts/cambria-regular.rows.json +0 -1
- package/resources/fonts/contents.json +240 -0
- package/resources/fonts/courier-new-bold-italic.rows.json +0 -1
- package/resources/fonts/courier-new-bold.rows.json +0 -1
- package/resources/fonts/courier-new-italic.rows.json +0 -1
- package/resources/fonts/courier-new-regular.rows.json +0 -1
- package/resources/fonts/times-new-roman-bold-italic.rows.json +0 -1
- package/resources/fonts/times-new-roman-bold.rows.json +0 -1
- package/resources/fonts/times-new-roman-italic.rows.json +0 -1
- package/resources/fonts/times-new-roman-regular.rows.json +0 -1
- package/resources/locales/de/model.msg.json +4 -0
- package/resources/locales/en/model.msg.json +4 -0
- package/types/scripting-api.json +9339 -9320
- package/types/scripting.d.ts +322 -200
- package/types/src/.generated/wasm/sdk.d.ts +5 -27
- package/types/src/address/AddressUtils.d.ts +8 -0
- package/types/src/address/_SheetNameQuoteChars.d.ts +3 -0
- package/types/src/anomalies/_FocusTable.d.ts +0 -6
- package/types/src/calculation/Calculation.d.ts +20 -95
- package/types/src/calculation/ExternalBookBindings.d.ts +0 -26
- package/types/src/calculation/NamedFormulaCollection.d.ts +6 -2
- package/types/src/calculation/TokenType.d.ts +0 -10
- package/types/src/calculation/_CloneBoundary.d.ts +0 -24
- package/types/src/calculation/_FormulaToolkit.d.ts +0 -5
- package/types/src/calculation/compiler/ASTTypes.d.ts +0 -13
- package/types/src/calculation/compiler/CompilerUtils.d.ts +0 -227
- package/types/src/calculation/compiler/FormulaLexer.d.ts +0 -8
- package/types/src/calculation/compiler/FormulaParser.d.ts +0 -61
- package/types/src/calculation/compiler/ParserUtils.d.ts +0 -24
- package/types/src/calculation/compiler/Types.d.ts +0 -52
- package/types/src/calculation/engine/CalcBackend.d.ts +15 -157
- package/types/src/calculation/engine/index.d.ts +0 -8
- package/types/src/calculation/executor/CalcExecutor.d.ts +13 -130
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +30 -11
- package/types/src/calculation/executor/CircularReference.d.ts +0 -17
- package/types/src/calculation/executor/_BlockOrder.d.ts +29 -0
- package/types/src/calculation/executor/_WhatIf.d.ts +0 -19
- package/types/src/calculation/formula/FormulaBlock.d.ts +0 -28
- package/types/src/calculation/formula/FormulaRecordView.d.ts +0 -15
- package/types/src/calculation/formula/IFormulaBlock.d.ts +0 -12
- package/types/src/calculation/formula/LambdaValue.d.ts +0 -15
- package/types/src/calculation/formula/TokenUtils.d.ts +1 -8
- package/types/src/calculation/grid/CalcGrid.d.ts +5 -59
- package/types/src/calculation/grid/CalcGridBackend.d.ts +8 -9
- package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -13
- package/types/src/calculation/grid/CalcGridUtils.d.ts +18 -22
- package/types/src/calculation/grid/ICalcGrid.d.ts +13 -98
- package/types/src/calculation/grid/_CalcRequest.d.ts +1 -29
- package/types/src/calculation/spatial/CircularEntry.d.ts +0 -10
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +52 -82
- package/types/src/calculation/spatial/SpillEntry.d.ts +10 -7
- package/types/src/calculation/state/CalcScope.d.ts +0 -9
- package/types/src/calculation/state/CalcState.d.ts +0 -12
- package/types/src/calculation/state/CalculationContext.d.ts +4 -37
- package/types/src/calculation/state/DeferredCalls.d.ts +11 -64
- package/types/src/calculation/state/IContextContainer.d.ts +4 -60
- package/types/src/calculation/state/_KeepBlanks.d.ts +5 -0
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +46 -33
- package/types/src/calculation/state/_WhatIfLayer.d.ts +0 -14
- package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +0 -42
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +0 -6
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +0 -12
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +0 -9
- package/types/src/calculation/toolkit/index.d.ts +0 -8
- package/types/src/cell/ICell.d.ts +14 -28
- package/types/src/cellRange/ICellRange.d.ts +22 -11
- package/types/src/chart/Chart.d.ts +0 -16
- package/types/src/chart/_ChartParts.d.ts +0 -39
- package/types/src/chart/_ChartSource.d.ts +0 -14
- package/types/src/chart/createChart.d.ts +1 -1
- package/types/src/chart/kinds/ChartKind.d.ts +4 -4
- package/types/src/chart/kinds/_Placeholder.d.ts +0 -1
- package/types/src/chart/layout/TextMeasurer.d.ts +0 -20
- package/types/src/chart/layout/_LayoutUtils.d.ts +0 -16
- package/types/src/chart/math/BoxStats.d.ts +0 -8
- package/types/src/chart/math/DateUnitCalcs.d.ts +0 -10
- package/types/src/chart/math/Histogram.d.ts +0 -17
- package/types/src/chart/math/OrdUnitCalcs.d.ts +0 -53
- package/types/src/chart/math/Treemap.d.ts +0 -15
- package/types/src/chart/math/Trendlines.d.ts +0 -8
- package/types/src/chart/math/UnitCalcs.d.ts +0 -22
- package/types/src/chart/model/_Edits.d.ts +0 -33
- package/types/src/chart/model/_Grouping.d.ts +0 -25
- package/types/src/chart/model/_Inference.d.ts +0 -18
- package/types/src/chart/model/_NewChart.d.ts +0 -41
- package/types/src/chart/model/_OfPie.d.ts +0 -7
- package/types/src/chart/resolve/_LegacyStyles.d.ts +0 -20
- package/types/src/chart/resolve/_Resolve.d.ts +0 -19
- package/types/src/chart/resolve/_ResolvedChart.d.ts +0 -6
- package/types/src/collections/_GridUtils.d.ts +0 -10
- package/types/src/comment/_NoteBox.d.ts +0 -15
- package/types/src/condition/AnchoredConditional.d.ts +1 -23
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +0 -49
- package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +0 -10
- package/types/src/condition/ICondition.d.ts +2 -2
- package/types/src/condition/_ConditionUtils.d.ts +0 -38
- package/types/src/externalBook/ExternalBookCollection.d.ts +0 -15
- package/types/src/externalBook/ExternalBookName.d.ts +2 -3
- package/types/src/externalBook/IExternalBook.d.ts +13 -14
- package/types/src/fetch/IFetcher.d.ts +2 -1
- package/types/src/fetch/_WorkbookFetch.d.ts +1 -1
- package/types/src/font/AdvanceTable.d.ts +16 -42
- package/types/src/font/IFont.d.ts +32 -9
- package/types/src/font/TableFileAdvanceBuilder.d.ts +6 -3
- package/types/src/font/_FontUtils.d.ts +0 -8
- package/types/src/font/_StandIns.d.ts +33 -0
- package/types/src/io/IWorkbookIO.d.ts +3 -3
- package/types/src/io/WorkbookOrigin.d.ts +2 -2
- package/types/src/license/LicenseManager.d.ts +2 -1
- package/types/src/license/_Utils.d.ts +4 -3
- package/types/src/license/details.d.ts +3 -1
- package/types/src/license/keys.d.ts +6 -0
- package/types/src/license/license-key.d.ts +15 -33
- package/types/src/license/token.d.ts +55 -0
- package/types/src/picture/IPicture.d.ts +45 -0
- package/types/src/picture/Picture.d.ts +12 -0
- package/types/src/pivot/PivotTable.d.ts +0 -7
- package/types/src/primitives/AsyncValue.d.ts +0 -12
- package/types/src/primitives/PrimitiveUtils.d.ts +1 -110
- package/types/src/primitives/Range.d.ts +0 -60
- package/types/src/primitives/ScalarCollation.d.ts +0 -106
- package/types/src/primitives/stats/AggregateStats.d.ts +0 -19
- package/types/src/print/PageLayout.d.ts +0 -6
- package/types/src/reference/ReferenceUtils.d.ts +4 -2
- package/types/src/richData/RichDataRegistry.d.ts +6 -0
- package/types/src/scripting/TypedFunction.d.ts +0 -109
- package/types/src/sheet/IWorksheet.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +0 -21
- package/types/src/sheet/SheetCell.d.ts +8 -2
- package/types/src/sheet/Worksheet.d.ts +7 -48
- package/types/src/sheet/_DelimitedText.d.ts +13 -0
- package/types/src/sheet/_IgnoredErrors.d.ts +0 -12
- package/types/src/sheet/_ScalarListFactory.d.ts +0 -19
- package/types/src/sheet/_SheetCoords.d.ts +0 -7
- package/types/src/sheet/_SheetFilterUtils.d.ts +0 -8
- package/types/src/sheet/_SheetStateReader.d.ts +0 -10
- package/types/src/sheet/_SheetStateTypes.d.ts +0 -3
- package/types/src/sheet/_SheetUtils.d.ts +1 -1
- package/types/src/sheet/style/_RowLine.d.ts +32 -0
- package/types/src/sheet/style/_StyleUtils.d.ts +6 -14
- package/types/src/sheetView/_SheetViewUtils.d.ts +0 -1
- package/types/src/slicer/_BuiltInSlicerStyles.d.ts +0 -5
- package/types/src/style/ICellStyle.d.ts +4 -0
- package/types/src/table/AnchoredTable.d.ts +0 -147
- package/types/src/text/TextFrame.d.ts +4 -1
- package/types/src/text/TextStacked.d.ts +0 -24
- package/types/src/text/TextWrapper.d.ts +3 -5
- package/types/src/text/_LineBox.d.ts +24 -0
- package/types/src/text/_TextUtils.d.ts +5 -2
- package/types/src/text/_TextWrapperFallback.d.ts +2 -1
- package/types/src/wasm/sdkWasm.d.ts +1 -1
- package/types/src/workbook/Workbook.d.ts +0 -10
- package/browser/esm/2WuhYrIpYmOR5H73.mjs +0 -698
- package/browser/esm/CTe2qfmIUEad6FJv.mjs +0 -199
- package/browser/esm/CfRqiPDg6RBTg1EN.mjs +0 -367
- package/browser/esm/DVroRnhi-5IDXNgM.mjs +0 -210
- package/node/esm/BSvOluusoDM4z_dx.mjs +0 -811
- package/node/esm/CPI58duc0j0a-HpJ.mjs +0 -115
- package/node/esm/DggQ23jKMpwhENfa.mjs +0 -372
- package/node/esm/Dn1M7YWi25DeeYUb.mjs +0 -210
- package/node/esm/ZXPFcsT2zrALCZux.mjs +0 -289
package/node/esm/index.mjs
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { a as e, l as t, o as s, t as r, u as i } from "./
|
|
8
|
-
import { $t as o, A as n, Ai as a, Ar as l,
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { BufferUtils as is, CommonUtils as os, CoordUtils as ns, DefaultLanguagePackService as as, ExpectedError as ls, InvalidPasswordError as hs, MimeType as cs, Notifier as us, NullNotAllowedError as ds, OutOfBoundsError as gs, PasswordRequiredError as ms, ProtectedError as _s, UndoManager as fs, messageKey as ps, t as ws } from "@sheetxl/utils";
|
|
7
|
+
import { a as e, l as t, o as s, t as r, u as i } from "./Bfg7qjCXCwXbzW3K.mjs";
|
|
8
|
+
import { $t as o, A as n, Ai as a, Ar as l, At as h, Bi as c, Br as u, Bt as d, C as g, Ci as m, Cr as _, D as f, Di as p, Dt as w, E as y, Ei as b, En as S, Et as k, F as C, Fi as v, Fr as I, Ft as N, Gr as O, Gt as R, Hr as x, Ht as E, I as L, Ii as A, Ir as V, It as T, Jr as P, Jt as F, Kr as W, L as B, Li as j, Lr as M, Lt as D, M as z, Mn as H, Mr as U, Ni as J, Nn as q, Nr as $, O as K, Oi as G, Ot as X, Pi as Y, Pn as Z, Pr as Q, Pt as ee, Qt as te, R as se, Ri as re, Rr as ie, S as oe, Si as ne, Sr as ae, T as le, Ti as he, Tn as ce, Tt as ue, Ur as de, Ut as ge, Vr as me, Vt as _e, Wr as fe, Wt as pe, Xt as we, Yr as ye, Yt as be, Zt as Se, _a as ke, a as Ce, ai as ve, b as Ie, ba as Ne, bi as Oe, ci as Re, cn as xe, da as Ee, di as Le, dn as Ae, en as Ve, fa as Te, fi as Pe, fn as Fe, ga as We, ha as Be, i as je, j as Me, ji as De, jr as ze, k as He, ki as Ue, kr as Je, kt as qe, la as $e, ln as Ke, ma as Ge, mn as Xe, na as Ye, nn as Ze, pa as Qe, pi as et, pn as tt, qr as st, qt as rt, r as it, ri as ot, rn as nt, sa as at, sn as lt, ti as ht, tn as ct, ua as ut, v as dt, va as gt, vi as mt, w as _t, wi as ft, wr as pt, wt, x as yt, xi as bt, y as St, ya as kt, yi as Ct, zi as vt, zr as It, zt as Nt } from "./BQ2XqExomMceAjfe.mjs";
|
|
9
|
+
import { A as Ot, B as Rt, H as xt, Jt as Et, K as Lt, O as At, R as Vt, Tt, U as Pt, V as Ft, W as Wt, Xt as Bt, Yt as jt, at as Mt, ct as Dt, dt as zt, ft as Ht, in as Ut, k as Jt, lt as qt, mt as $t, nn as Kt, pt as Gt, qt as Xt, rn as Yt, st as Zt, ut as Qt, wt as es, z as ts } from "./DO5ldLqhTvIfPXLW.mjs";
|
|
10
|
+
import { n as ss, t as rs } from "./DF0nL7s01dp7n0Bx.mjs";
|
|
11
|
+
import { FormulaError as is, ScalarType as os } from "@sheetxl/primitives";
|
|
12
|
+
import { BufferUtils as ns, CommonUtils as as, CoordUtils as ls, DefaultLanguagePackService as hs, ExpectedError as cs, ImageUtils as us, InvalidPasswordError as ds, MimeType as gs, Notifier as ms, NullNotAllowedError as _s, OutOfBoundsError as fs, PasswordRequiredError as ps, ProtectedError as ws, UndoManager as ys, messageKey as bs, t as Ss } from "@sheetxl/utils";
|
|
14
13
|
export * from "@sheetxl/primitives";
|
|
15
14
|
export * from "@sheetxl/utils";
|
|
16
|
-
var
|
|
15
|
+
var ks, Cs = class extends ys {
|
|
17
16
|
constructor(e, t = 50) {
|
|
18
17
|
super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
|
|
19
18
|
}
|
|
@@ -100,14 +99,14 @@ var ys, Ss = class extends fs {
|
|
|
100
99
|
return 0 === e.length && null !== this._repeatOperation && e.push(this._repeatOperation.description), Object.freeze(e);
|
|
101
100
|
}
|
|
102
101
|
getUndoEntries() {
|
|
103
|
-
return this._undoCommits().map(
|
|
102
|
+
return this._undoCommits().map(Is);
|
|
104
103
|
}
|
|
105
104
|
getRedoEntries() {
|
|
106
|
-
const e = this._redoCommits().map(
|
|
105
|
+
const e = this._redoCommits().map(Is);
|
|
107
106
|
return 0 === e.length && null !== this._repeatOperation && e.push({
|
|
108
107
|
description: this._repeatOperation.description,
|
|
109
108
|
author: null,
|
|
110
|
-
meta:
|
|
109
|
+
meta: vs
|
|
111
110
|
}), Object.freeze(e);
|
|
112
111
|
}
|
|
113
112
|
addUndoOperation() {
|
|
@@ -119,11 +118,11 @@ var ys, Ss = class extends fs {
|
|
|
119
118
|
close() {
|
|
120
119
|
this._removeListener?.();
|
|
121
120
|
}
|
|
122
|
-
},
|
|
121
|
+
}, vs = Object.freeze({}), Is = (e) => ({
|
|
123
122
|
description: e.getDescription(),
|
|
124
123
|
author: e.getAuthor(),
|
|
125
|
-
meta: e.getMeta() ??
|
|
126
|
-
}),
|
|
124
|
+
meta: e.getMeta() ?? vs
|
|
125
|
+
}), Ns = class {
|
|
127
126
|
constructor(t, s) {
|
|
128
127
|
this._dirty = !1, this._store = t, this._savedCommitId = t.getCurrentCommit()?.getId() ?? null, this._emitter = new e(this);
|
|
129
128
|
const r = this;
|
|
@@ -161,8 +160,8 @@ var ys, Ss = class extends fs {
|
|
|
161
160
|
this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
|
|
162
161
|
}
|
|
163
162
|
};
|
|
164
|
-
|
|
165
|
-
var
|
|
163
|
+
ks || (ks = {});
|
|
164
|
+
var Os, Rs = class t {
|
|
166
165
|
constructor(s, r = {}) {
|
|
167
166
|
this._password = null, this._emitter = new e(this), this._path = s ?? null, this._name = r.name ?? null, this._format = r.format ?? null, this._size = r.size ?? null, this._lastModified = r.lastModified ?? null, this._canWrite = r.canWrite ?? t._defaultCanWrite(this._path), this._encryption = r.encryption ?? null;
|
|
168
167
|
}
|
|
@@ -175,7 +174,7 @@ var vs, Is = class t {
|
|
|
175
174
|
getName() {
|
|
176
175
|
if (null !== this._name && void 0 !== this._name) return this._name;
|
|
177
176
|
const e = this._cleanPath();
|
|
178
|
-
return e &&
|
|
177
|
+
return e && We(e) || null;
|
|
179
178
|
}
|
|
180
179
|
getPath() {
|
|
181
180
|
return this._path;
|
|
@@ -186,7 +185,7 @@ var vs, Is = class t {
|
|
|
186
185
|
getExtension() {
|
|
187
186
|
const e = this._cleanPath();
|
|
188
187
|
if (!e) return null;
|
|
189
|
-
const t =
|
|
188
|
+
const t = ke(e);
|
|
190
189
|
return t ? t.toLowerCase() : null;
|
|
191
190
|
}
|
|
192
191
|
getEncryption() {
|
|
@@ -236,26 +235,26 @@ var vs, Is = class t {
|
|
|
236
235
|
];
|
|
237
236
|
return `${t} ${(s / Math.pow(1024, r)).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
|
|
238
237
|
}
|
|
239
|
-
},
|
|
238
|
+
}, xs = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new Set(), Ls = (e) => xs.get(e) ?? null, As = class t {
|
|
240
239
|
constructor(s) {
|
|
241
|
-
this._released = !1, t._assertFree(s), this._emitter = new e(this), this._origin = s,
|
|
240
|
+
this._released = !1, t._assertFree(s), this._emitter = new e(this), this._origin = s, xs.set(s, this), Es.add(this);
|
|
242
241
|
}
|
|
243
242
|
getOrigin() {
|
|
244
243
|
return this._origin;
|
|
245
244
|
}
|
|
246
245
|
setOrigin(e) {
|
|
247
|
-
e !== this._origin && (t._assertFree(e), this._released || (
|
|
246
|
+
e !== this._origin && (t._assertFree(e), this._released || (xs.delete(this._origin), xs.set(e, this)), this._origin = e, this._emitter.notify("onOriginChange"));
|
|
248
247
|
}
|
|
249
248
|
release() {
|
|
250
|
-
this._released || (this._released = !0,
|
|
249
|
+
this._released || (this._released = !0, xs.get(this._origin) === this && xs.delete(this._origin), Es.delete(this));
|
|
251
250
|
}
|
|
252
251
|
addListeners(e, t) {
|
|
253
252
|
return this._emitter.addListeners(e, t);
|
|
254
253
|
}
|
|
255
254
|
static _assertFree(e) {
|
|
256
|
-
if (
|
|
255
|
+
if (xs.has(e)) throw new Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
|
|
257
256
|
}
|
|
258
|
-
},
|
|
257
|
+
}, Vs = class {
|
|
259
258
|
constructor() {
|
|
260
259
|
this._defaultStringSourceType = "filepath";
|
|
261
260
|
}
|
|
@@ -275,10 +274,10 @@ var vs, Is = class t {
|
|
|
275
274
|
}
|
|
276
275
|
switch (n) {
|
|
277
276
|
case "file": {
|
|
278
|
-
const e = s, r = e?.name, n = r ? `${
|
|
277
|
+
const e = s, r = e?.name, n = r ? `${We(r)}` : "";
|
|
279
278
|
a = await e.arrayBuffer(), l = {
|
|
280
279
|
format: o,
|
|
281
|
-
ext:
|
|
280
|
+
ext: ke(r),
|
|
282
281
|
name: n,
|
|
283
282
|
absolutePath: r,
|
|
284
283
|
size: e.size,
|
|
@@ -302,7 +301,7 @@ var vs, Is = class t {
|
|
|
302
301
|
const [, t] = s.split(",");
|
|
303
302
|
e = t;
|
|
304
303
|
} else e = s;
|
|
305
|
-
a =
|
|
304
|
+
a = ns.base64ToArrayBuffer(e), l = {
|
|
306
305
|
format: o,
|
|
307
306
|
size: e.length
|
|
308
307
|
};
|
|
@@ -318,7 +317,7 @@ var vs, Is = class t {
|
|
|
318
317
|
e = i.input, t = i.init, r = i.timeout;
|
|
319
318
|
}
|
|
320
319
|
}
|
|
321
|
-
const i = r || 3e4, n = new AbortController(), h = setTimeout(() => n.abort(), i), c = "string" == typeof e ? e : e.toString(), u =
|
|
320
|
+
const i = r || 3e4, n = new AbortController(), h = setTimeout(() => n.abort(), i), c = "string" == typeof e ? e : e.toString(), u = ke(c);
|
|
322
321
|
try {
|
|
323
322
|
const s = await fetch(e, {
|
|
324
323
|
...t,
|
|
@@ -330,7 +329,7 @@ var vs, Is = class t {
|
|
|
330
329
|
a = r, l = {
|
|
331
330
|
format: o,
|
|
332
331
|
ext: u,
|
|
333
|
-
name:
|
|
332
|
+
name: We(c, !0),
|
|
334
333
|
absolutePath: c
|
|
335
334
|
};
|
|
336
335
|
} catch (e) {
|
|
@@ -373,7 +372,7 @@ var vs, Is = class t {
|
|
|
373
372
|
return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
|
|
374
373
|
}
|
|
375
374
|
findOpenPath(e, t) {
|
|
376
|
-
return Array.from(
|
|
375
|
+
return Array.from(Es, (e) => e.getOrigin()).find((s) => {
|
|
377
376
|
if (s === t || !s.canWrite()) return !1;
|
|
378
377
|
const r = s.getPath();
|
|
379
378
|
return !!r && this.isSamePath(r, e);
|
|
@@ -404,10 +403,10 @@ var vs, Is = class t {
|
|
|
404
403
|
}
|
|
405
404
|
if ("undefined" != typeof File && e instanceof File) return "file";
|
|
406
405
|
if ("undefined" != typeof Blob && e instanceof Blob) return "blob";
|
|
407
|
-
const t = e instanceof ArrayBuffer || "[object ArrayBuffer]" === Object.prototype.toString.call(e), s = ArrayBuffer.isView(e), r =
|
|
406
|
+
const t = e instanceof ArrayBuffer || "[object ArrayBuffer]" === Object.prototype.toString.call(e), s = ArrayBuffer.isView(e), r = ns.isNodeBuffer(e);
|
|
408
407
|
return t || s || r ? "buffer" : "undefined" != typeof ReadableStream && e instanceof ReadableStream || "[object ReadableStream]" === Object.prototype.toString.call(e) || e && "function" == typeof e.getReader && void 0 !== e.locked ? "stream" : null;
|
|
409
408
|
}
|
|
410
|
-
},
|
|
409
|
+
}, Ts = class extends Vs {
|
|
411
410
|
constructor(e, t) {
|
|
412
411
|
super();
|
|
413
412
|
}
|
|
@@ -447,8 +446,8 @@ var vs, Is = class t {
|
|
|
447
446
|
), r = e.origin.getPath(), i = !(!r || !e.origin.canWrite()), o = i ? r : e.origin.getName() ? e.suggestedName : null;
|
|
448
447
|
if (!o) throw new Error("No file name provided to write to.");
|
|
449
448
|
const n = s.resolve(o.replace(/\\/g, "/")), a = this.findOpenPath(n, e.workbook?.getOrigin?.());
|
|
450
|
-
if (a) throw new
|
|
451
|
-
const l = i ? e.origin : new
|
|
449
|
+
if (a) throw new cs(Ss("error.io.openElsewhere", { name: a.getName() ?? n }));
|
|
450
|
+
const l = i ? e.origin : new Rs(n, {
|
|
452
451
|
format: e.format.key,
|
|
453
452
|
canWrite: !0
|
|
454
453
|
}), h = await e.encode(e.format.key, l);
|
|
@@ -464,7 +463,7 @@ var vs, Is = class t {
|
|
|
464
463
|
} catch (e) {
|
|
465
464
|
throw new Error(`Failed to write file '${n}': ${e.message}`);
|
|
466
465
|
}
|
|
467
|
-
if (l instanceof
|
|
466
|
+
if (l instanceof Rs) {
|
|
468
467
|
const e = await t.stat(n).catch(() => null);
|
|
469
468
|
l.update({
|
|
470
469
|
size: c.byteLength,
|
|
@@ -474,13 +473,13 @@ var vs, Is = class t {
|
|
|
474
473
|
return l;
|
|
475
474
|
}
|
|
476
475
|
};
|
|
477
|
-
(
|
|
476
|
+
(Os || (Os = {})).SortOn = {
|
|
478
477
|
Value: "value",
|
|
479
478
|
FillColor: "fillColor",
|
|
480
479
|
FontColor: "fontColor",
|
|
481
480
|
Icon: "icon"
|
|
482
481
|
};
|
|
483
|
-
var
|
|
482
|
+
var Ps = {
|
|
484
483
|
TopLeft: "tl",
|
|
485
484
|
Top: "t",
|
|
486
485
|
TopRight: "tr",
|
|
@@ -490,53 +489,53 @@ var As = {
|
|
|
490
489
|
BottomLeft: "bl",
|
|
491
490
|
Bottom: "b",
|
|
492
491
|
BottomRight: "br"
|
|
493
|
-
},
|
|
494
|
-
[
|
|
495
|
-
[
|
|
496
|
-
[
|
|
497
|
-
[
|
|
498
|
-
[
|
|
499
|
-
[
|
|
500
|
-
[
|
|
501
|
-
[
|
|
502
|
-
[
|
|
503
|
-
[
|
|
504
|
-
[
|
|
505
|
-
[
|
|
506
|
-
[
|
|
507
|
-
[
|
|
508
|
-
[
|
|
509
|
-
[
|
|
510
|
-
[
|
|
511
|
-
[
|
|
512
|
-
[
|
|
513
|
-
[
|
|
514
|
-
[
|
|
515
|
-
},
|
|
516
|
-
function
|
|
517
|
-
const t =
|
|
492
|
+
}, Fs = Zt.BuiltInName, Ws = {
|
|
493
|
+
[Fs.Normal]: bs("style.builtin.normal"),
|
|
494
|
+
[Fs.Comma]: bs("style.builtin.comma"),
|
|
495
|
+
[Fs.Currency]: bs("style.builtin.currency"),
|
|
496
|
+
[Fs.Percent]: bs("style.builtin.percent"),
|
|
497
|
+
[Fs.Comma0]: bs("style.builtin.comma0"),
|
|
498
|
+
[Fs.Currency0]: bs("style.builtin.currency0"),
|
|
499
|
+
[Fs.Hyperlink]: bs("style.builtin.hyperlink"),
|
|
500
|
+
[Fs.FollowedHyperlink]: bs("style.builtin.followedHyperlink"),
|
|
501
|
+
[Fs.Note]: bs("style.builtin.note"),
|
|
502
|
+
[Fs.WarningText]: bs("style.builtin.warningText"),
|
|
503
|
+
[Fs.Title]: bs("style.builtin.title"),
|
|
504
|
+
[Fs.Input]: bs("style.builtin.input"),
|
|
505
|
+
[Fs.Output]: bs("style.builtin.output"),
|
|
506
|
+
[Fs.Calculation]: bs("style.builtin.calculation"),
|
|
507
|
+
[Fs.CheckCell]: bs("style.builtin.checkCell"),
|
|
508
|
+
[Fs.LinkedCell]: bs("style.builtin.linkedCell"),
|
|
509
|
+
[Fs.Total]: bs("style.builtin.total"),
|
|
510
|
+
[Fs.Good]: bs("style.builtin.good"),
|
|
511
|
+
[Fs.Bad]: bs("style.builtin.bad"),
|
|
512
|
+
[Fs.Neutral]: bs("style.builtin.neutral"),
|
|
513
|
+
[Fs.ExplanatoryText]: bs("style.builtin.explanatoryText")
|
|
514
|
+
}, Bs = bs("style.builtin.heading"), js = bs("style.builtin.accent"), Ms = bs("style.builtin.accentTint"), Ds = /^Heading ([1-4])$/, zs = /^Accent([1-6])$/, Hs = /^(20|40|60)% - Accent([1-6])$/;
|
|
515
|
+
function Us(e) {
|
|
516
|
+
const t = Ws[e];
|
|
518
517
|
if (t) return { key: t };
|
|
519
|
-
let s =
|
|
518
|
+
let s = Ds.exec(e);
|
|
520
519
|
return s ? {
|
|
521
|
-
key:
|
|
520
|
+
key: Bs,
|
|
522
521
|
params: { n: +s[1] }
|
|
523
|
-
} : (s =
|
|
524
|
-
key:
|
|
522
|
+
} : (s = zs.exec(e), s ? {
|
|
523
|
+
key: js,
|
|
525
524
|
params: { n: +s[1] }
|
|
526
|
-
} : (s =
|
|
527
|
-
key:
|
|
525
|
+
} : (s = Hs.exec(e), s ? {
|
|
526
|
+
key: Ms,
|
|
528
527
|
params: {
|
|
529
528
|
pct: +s[1],
|
|
530
529
|
n: +s[2]
|
|
531
530
|
}
|
|
532
531
|
} : null));
|
|
533
532
|
}
|
|
534
|
-
var
|
|
533
|
+
var Js, qs, $s, Ks, Gs = (e, t, s, r, i) => {
|
|
535
534
|
const o = JSON.parse(JSON.stringify(e.definition));
|
|
536
535
|
o.adjs || (o.adjs = []);
|
|
537
536
|
let n = "", a = 0, l = 0;
|
|
538
|
-
t > 0 ? (l = t, a = 100 - t, n =
|
|
539
|
-
const h = new
|
|
537
|
+
t > 0 ? (l = t, a = 100 - t, n = Ss("op.lighterPercent", { percent: t })) : t < 0 && (a = 100 + t, n = Ss("op.darkerPercent", { percent: -t })), a && o.adjs.push({ [Gt.AdjustmentType.LumMod]: a }), l && o.adjs.push({ [Gt.AdjustmentType.LumOff]: l });
|
|
538
|
+
const h = new zt({
|
|
540
539
|
val: o.val,
|
|
541
540
|
adjs: o.adjs
|
|
542
541
|
}, s), c = h.toString();
|
|
@@ -547,15 +546,15 @@ var zs, Hs, Us, Js, qs = (e, t, s, r, i) => {
|
|
|
547
546
|
definition: o
|
|
548
547
|
};
|
|
549
548
|
};
|
|
550
|
-
function
|
|
549
|
+
function Xs(e, t, s, r) {
|
|
551
550
|
let i = [];
|
|
552
551
|
for (let o = 0; o < e.length; o++) {
|
|
553
552
|
let n = [];
|
|
554
553
|
i.push(n);
|
|
555
554
|
const a = (i) => {
|
|
556
|
-
for (let a = 0; a < i.length; a++) n.push(
|
|
555
|
+
for (let a = 0; a < i.length; a++) n.push(Gs(e[o], i[a], t, s, r));
|
|
557
556
|
};
|
|
558
|
-
let l = new
|
|
557
|
+
let l = new zt({
|
|
559
558
|
val: e[o].definition.val,
|
|
560
559
|
adjs: e[o].definition.adjs
|
|
561
560
|
}, t).toHSLA().lum;
|
|
@@ -593,45 +592,45 @@ function $s(e, t, s, r) {
|
|
|
593
592
|
}
|
|
594
593
|
return i;
|
|
595
594
|
}
|
|
596
|
-
(
|
|
597
|
-
var
|
|
598
|
-
function
|
|
599
|
-
if (!
|
|
600
|
-
const e = import("./
|
|
595
|
+
(Js || (Js = {})).buildPalette = Xs, qs || (qs = {}), $s || ($s = {}), Ks || (Ks = {});
|
|
596
|
+
var Ys, Zs = null;
|
|
597
|
+
function Qs() {
|
|
598
|
+
if (!Zs) {
|
|
599
|
+
const e = import("./CWBS90g3Hz-kQDkY.mjs").then(({ initializeFunctions: e }) => {
|
|
601
600
|
const t = e(() => null);
|
|
602
601
|
return Object.freeze(Array.from(t.keys()));
|
|
603
602
|
});
|
|
604
603
|
e.catch(() => {
|
|
605
|
-
|
|
606
|
-
}),
|
|
604
|
+
Zs = null;
|
|
605
|
+
}), Zs = e;
|
|
607
606
|
}
|
|
608
|
-
return
|
|
607
|
+
return Zs;
|
|
609
608
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
609
|
+
function er(e) {
|
|
610
|
+
return Z.peek()?.readFormulaLiteral(e);
|
|
612
611
|
}
|
|
613
|
-
function
|
|
614
|
-
const s =
|
|
615
|
-
return s !== r ? s - r : e === t ? 0 : "number" == typeof e && "number" == typeof t ? e < t ? -1 : 1 : "string" == typeof e && "string" == typeof t ? e < t ? -1 : e > t ? 1 : 0 : "boolean" == typeof e ? e ? 1 : -1 :
|
|
612
|
+
function tr(e, t) {
|
|
613
|
+
const s = sr(e), r = sr(t);
|
|
614
|
+
return s !== r ? s - r : e === t ? 0 : "number" == typeof e && "number" == typeof t ? e < t ? -1 : 1 : "string" == typeof e && "string" == typeof t ? e < t ? -1 : e > t ? 1 : 0 : "boolean" == typeof e ? e ? 1 : -1 : is.isError(e) && is.isError(t) ? e.getCode() - t.getCode() : 0;
|
|
616
615
|
}
|
|
617
|
-
function
|
|
616
|
+
function sr(e) {
|
|
618
617
|
if (null === e) return 0;
|
|
619
618
|
switch (typeof e) {
|
|
620
619
|
case "number": return 1;
|
|
621
620
|
case "string": return 2;
|
|
622
621
|
case "boolean": return 3;
|
|
623
|
-
default: return
|
|
622
|
+
default: return is.isError(e) ? 4 : 5;
|
|
624
623
|
}
|
|
625
624
|
}
|
|
626
625
|
(function(e) {
|
|
627
626
|
function t(e) {
|
|
628
|
-
return
|
|
627
|
+
return Z.peek()?.getFunctionDeclaration(e) ?? null;
|
|
629
628
|
}
|
|
630
629
|
e.get = t, e.has = function(e) {
|
|
631
630
|
return null !== t(e);
|
|
632
631
|
};
|
|
633
|
-
})(
|
|
634
|
-
var
|
|
632
|
+
})(Ys || (Ys = {}));
|
|
633
|
+
var rr = class {
|
|
635
634
|
constructor(e) {
|
|
636
635
|
this._children = e;
|
|
637
636
|
}
|
|
@@ -679,19 +678,19 @@ var er = class {
|
|
|
679
678
|
const s = t[e].getSortedNumbers().getValues();
|
|
680
679
|
s.length > 0 && r.push(s);
|
|
681
680
|
}
|
|
682
|
-
e = new
|
|
681
|
+
e = new it(function(e) {
|
|
683
682
|
const t = e.length;
|
|
684
|
-
if (0 === t) return
|
|
683
|
+
if (0 === t) return ir;
|
|
685
684
|
if (1 === t) return e[0];
|
|
686
685
|
let s = e[0];
|
|
687
|
-
for (let r = 1; r < t; r++) s =
|
|
686
|
+
for (let r = 1; r < t; r++) s = or(s, e[r]);
|
|
688
687
|
return Object.freeze(s);
|
|
689
688
|
}(r)), this._sortedNumbers = e;
|
|
690
689
|
}
|
|
691
690
|
return e;
|
|
692
691
|
}
|
|
693
692
|
getRanked(e) {
|
|
694
|
-
return
|
|
693
|
+
return je(this._children, e, tr)[Symbol.iterator]();
|
|
695
694
|
}
|
|
696
695
|
getFrequencies(e) {
|
|
697
696
|
if (e) return this._mergeFrequencies(e);
|
|
@@ -699,7 +698,7 @@ var er = class {
|
|
|
699
698
|
return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
|
|
700
699
|
}
|
|
701
700
|
_mergeFrequencies(e) {
|
|
702
|
-
const t = e?.keyFn ??
|
|
701
|
+
const t = e?.keyFn ?? pt, s = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, o = i.length;
|
|
703
702
|
let n = 0, a = 0, l = !1;
|
|
704
703
|
for (let h = 0; h < o; h++) {
|
|
705
704
|
const o = i[h].getFrequencies(e);
|
|
@@ -714,22 +713,22 @@ var er = class {
|
|
|
714
713
|
}) : l = !0, u = c.next();
|
|
715
714
|
}
|
|
716
715
|
}
|
|
717
|
-
return
|
|
716
|
+
return _.fromGroups(r, t, e, tr, n, a, l);
|
|
718
717
|
}
|
|
719
718
|
getTypedCounts(e) {
|
|
720
719
|
let t = this._typedCounts;
|
|
721
720
|
if (!t) {
|
|
722
721
|
const e = {
|
|
723
|
-
[
|
|
724
|
-
[
|
|
725
|
-
[
|
|
726
|
-
[
|
|
727
|
-
[
|
|
728
|
-
[
|
|
722
|
+
[os.Number]: 0,
|
|
723
|
+
[os.String]: 0,
|
|
724
|
+
[os.Boolean]: 0,
|
|
725
|
+
[os.Error]: 0,
|
|
726
|
+
[os.RichData]: 0,
|
|
727
|
+
[os.Null]: 0
|
|
729
728
|
}, s = this._children, r = s.length;
|
|
730
729
|
for (let t = 0; t < r; t++) {
|
|
731
730
|
const r = s[t].getTypedCounts();
|
|
732
|
-
e[
|
|
731
|
+
e[os.Number] += r[os.Number] ?? 0, e[os.String] += r[os.String] ?? 0, e[os.Boolean] += r[os.Boolean] ?? 0, e[os.Error] += r[os.Error] ?? 0, e[os.RichData] += r[os.RichData] ?? 0, e[os.Null] += r[os.Null] ?? 0;
|
|
733
732
|
}
|
|
734
733
|
t = Object.freeze(e), this._typedCounts = t;
|
|
735
734
|
}
|
|
@@ -750,12 +749,12 @@ var er = class {
|
|
|
750
749
|
sum: 0,
|
|
751
750
|
sumSq: 0,
|
|
752
751
|
typed: {
|
|
753
|
-
[
|
|
754
|
-
[
|
|
755
|
-
[
|
|
756
|
-
[
|
|
757
|
-
[
|
|
758
|
-
[
|
|
752
|
+
[os.Number]: 0,
|
|
753
|
+
[os.String]: 0,
|
|
754
|
+
[os.Boolean]: 0,
|
|
755
|
+
[os.Error]: 0,
|
|
756
|
+
[os.RichData]: 0,
|
|
757
|
+
[os.Null]: 0
|
|
759
758
|
}
|
|
760
759
|
};
|
|
761
760
|
for (let i = 0; i < s; i++) {
|
|
@@ -764,10 +763,10 @@ var er = class {
|
|
|
764
763
|
const o = s.numericalCount;
|
|
765
764
|
o <= 0 || (r.numericalCount += o, r.sum += s.sum, r.sumSq += s.varP * o + s.sum * s.sum / o, (void 0 === r.min || s.min < r.min) && (r.min = s.min), (void 0 === r.max || s.max > r.max) && (r.max = s.max));
|
|
766
765
|
}
|
|
767
|
-
return
|
|
766
|
+
return Ce(r);
|
|
768
767
|
}
|
|
769
|
-
},
|
|
770
|
-
function
|
|
768
|
+
}, ir = Object.freeze([]);
|
|
769
|
+
function or(e, t) {
|
|
771
770
|
const s = e.length, r = t.length, i = new Array(s + r);
|
|
772
771
|
let o = 0, n = 0, a = 0;
|
|
773
772
|
for (; o < s && n < r;) i[a++] = e[o] <= t[n] ? e[o++] : t[n++];
|
|
@@ -775,26 +774,26 @@ function sr(e, t) {
|
|
|
775
774
|
for (; n < r;) i[a++] = t[n++];
|
|
776
775
|
return i;
|
|
777
776
|
}
|
|
778
|
-
var
|
|
777
|
+
var nr, ar = class {
|
|
779
778
|
constructor(e, t) {
|
|
780
779
|
this._source = null, this.cacheId = e, this.part = t;
|
|
781
780
|
}
|
|
782
781
|
_hold(e) {
|
|
783
782
|
const t = this.part?.xml;
|
|
784
783
|
if (!t || this._source) return;
|
|
785
|
-
const s =
|
|
784
|
+
const s = o(t, "worksheetSource", "ref"), r = o(t, "worksheetSource", "sheet");
|
|
786
785
|
if (!s || !r || s.includes("#REF!")) return;
|
|
787
786
|
const i = e(r);
|
|
788
787
|
if (!i) return;
|
|
789
|
-
const
|
|
788
|
+
const n = {
|
|
790
789
|
formula: null,
|
|
791
790
|
wired: null,
|
|
792
791
|
last: null
|
|
793
792
|
};
|
|
794
|
-
this._source =
|
|
795
|
-
|
|
793
|
+
this._source = n, i(`${Pe(r)}!${te(s)}`, (e) => {
|
|
794
|
+
n.formula = e.formula;
|
|
796
795
|
const t = e.formula.getExpression();
|
|
797
|
-
|
|
796
|
+
n.wired ??= t, e.formula.hasRefError() || (n.last = t);
|
|
798
797
|
});
|
|
799
798
|
}
|
|
800
799
|
getXML() {
|
|
@@ -802,18 +801,18 @@ var rr, ir = class {
|
|
|
802
801
|
if (!e || !t?.formula) return e;
|
|
803
802
|
const s = t.formula.hasRefError() ? t.last : t.formula.getExpression();
|
|
804
803
|
if (null === s || s === t.wired) return e;
|
|
805
|
-
const r =
|
|
806
|
-
return r ?
|
|
804
|
+
const r = f(s);
|
|
805
|
+
return r ? ct(ct(e, "worksheetSource", "ref", Ve(r.reference)), "worksheetSource", "sheet", r.sheet) : ct(e, "worksheetSource", "ref", Ve(s));
|
|
807
806
|
}
|
|
808
807
|
toJSON(e) {
|
|
809
|
-
const t = { cacheId: this.cacheId }, s =
|
|
808
|
+
const t = { cacheId: this.cacheId }, s = Ze.toJSON(this.part, e);
|
|
810
809
|
if (s) {
|
|
811
810
|
const e = this.getXML();
|
|
812
811
|
null !== e && (s.xml = e), t.part = s;
|
|
813
812
|
}
|
|
814
813
|
return t;
|
|
815
814
|
}
|
|
816
|
-
},
|
|
815
|
+
}, lr = class {
|
|
817
816
|
constructor(e, t) {
|
|
818
817
|
this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
|
|
819
818
|
}
|
|
@@ -847,7 +846,7 @@ var rr, ir = class {
|
|
|
847
846
|
get isIPerson() {
|
|
848
847
|
return !0;
|
|
849
848
|
}
|
|
850
|
-
},
|
|
849
|
+
}, hr = class extends Ne {
|
|
851
850
|
constructor(e) {
|
|
852
851
|
super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
|
|
853
852
|
}
|
|
@@ -868,10 +867,10 @@ var rr, ir = class {
|
|
|
868
867
|
const e = this._byDisplayName.get(r);
|
|
869
868
|
if (e) return e;
|
|
870
869
|
}
|
|
871
|
-
const i = new
|
|
870
|
+
const i = new lr({
|
|
872
871
|
...t,
|
|
873
872
|
displayName: r,
|
|
874
|
-
id: s ??
|
|
873
|
+
id: s ?? as.uuidV4().toUpperCase()
|
|
875
874
|
}, (e) => this._remove(e));
|
|
876
875
|
return this._byId.set(i.getId(), i), r && !this._byDisplayName.has(r) && this._byDisplayName.set(r, i), this._items = null, this._notifyCollectionChange(), i;
|
|
877
876
|
}
|
|
@@ -911,7 +910,7 @@ var rr, ir = class {
|
|
|
911
910
|
get isIPersonCollection() {
|
|
912
911
|
return !0;
|
|
913
912
|
}
|
|
914
|
-
},
|
|
913
|
+
}, cr = (e, t) => {
|
|
915
914
|
const s = [0];
|
|
916
915
|
for (let t = 0; t < e.length; t++) "\n" === e[t] && s.push(t + 1);
|
|
917
916
|
const r = t.map((e) => ` ${((e) => {
|
|
@@ -923,7 +922,7 @@ var rr, ir = class {
|
|
|
923
922
|
return `${t + 1}:${e - s[t] + 1}`;
|
|
924
923
|
})(e.start)} ${e.code}: ${e.message}`), i = t.length;
|
|
925
924
|
return `Script has ${i} compile error${1 === i ? "" : "s"}:\n${r.join("\n")}`;
|
|
926
|
-
},
|
|
925
|
+
}, ur = class {
|
|
927
926
|
constructor(t) {
|
|
928
927
|
this._options = t, this._emitter = new e(this), this._initState();
|
|
929
928
|
}
|
|
@@ -934,12 +933,12 @@ var rr, ir = class {
|
|
|
934
933
|
_builtInNames() {
|
|
935
934
|
try {
|
|
936
935
|
const e = this._options.getBuiltInFunctions?.();
|
|
937
|
-
if (!e) return
|
|
936
|
+
if (!e) return as.EmptyArray;
|
|
938
937
|
const t = [];
|
|
939
938
|
for (const s of e.getItems({ includeHidden: !0 })) s.isBuiltIn() && t.push(s.getName());
|
|
940
939
|
return t;
|
|
941
940
|
} catch {
|
|
942
|
-
return
|
|
941
|
+
return as.EmptyArray;
|
|
943
942
|
}
|
|
944
943
|
}
|
|
945
944
|
async createModule(e) {
|
|
@@ -948,13 +947,13 @@ var rr, ir = class {
|
|
|
948
947
|
minify: !0,
|
|
949
948
|
...e
|
|
950
949
|
});
|
|
951
|
-
return t.module ? await
|
|
950
|
+
return t.module ? await Ke(Fe.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
|
|
952
951
|
}
|
|
953
952
|
addModule(e, t, s) {
|
|
954
953
|
this._modules.add(e, t, s);
|
|
955
954
|
}
|
|
956
955
|
async addModuleFromJSON(e, t, s) {
|
|
957
|
-
const r = await
|
|
956
|
+
const r = await Ke(e, t);
|
|
958
957
|
return this.addModule(e, r, s), r;
|
|
959
958
|
}
|
|
960
959
|
executeMacro(e, t, s) {
|
|
@@ -970,7 +969,7 @@ var rr, ir = class {
|
|
|
970
969
|
}
|
|
971
970
|
async run(e, t) {
|
|
972
971
|
try {
|
|
973
|
-
const s = "string" == typeof e ? await this.createModule({ source: e }) : await
|
|
972
|
+
const s = "string" == typeof e ? await this.createModule({ source: e }) : await Ke(Fe.DEFAULT_MODULE, e), r = "string" == typeof e ? e : e?.source ?? "";
|
|
974
973
|
return await this._runModule(s, r, t);
|
|
975
974
|
} catch (e) {
|
|
976
975
|
return {
|
|
@@ -987,7 +986,7 @@ var rr, ir = class {
|
|
|
987
986
|
};
|
|
988
987
|
const i = e.getDiagnostics(), o = i.filter((e) => "error" === e.severity);
|
|
989
988
|
if (o.length > 0) {
|
|
990
|
-
const e = new Error(
|
|
989
|
+
const e = new Error(cr(t, o));
|
|
991
990
|
return e.diagnostics = o, {
|
|
992
991
|
ok: !1,
|
|
993
992
|
error: e,
|
|
@@ -1015,12 +1014,12 @@ var rr, ir = class {
|
|
|
1015
1014
|
}
|
|
1016
1015
|
_searchable(e) {
|
|
1017
1016
|
const t = this._modules;
|
|
1018
|
-
return t && 0 !== t.getCount() ? (e ? t.getItems({ name: e }) : t.getItems()).map((e) => e.getFunctions()) :
|
|
1017
|
+
return t && 0 !== t.getCount() ? (e ? t.getItems({ name: e }) : t.getItems()).map((e) => e.getFunctions()) : as.EmptyArray;
|
|
1019
1018
|
}
|
|
1020
1019
|
async searchFunctions(e) {
|
|
1021
1020
|
await this._emitter.notify("onBeforeSearch", { async: !0 });
|
|
1022
1021
|
const t = this._searchable(e?.moduleName);
|
|
1023
|
-
if (0 === t.length) return
|
|
1022
|
+
if (0 === t.length) return as.EmptyArray;
|
|
1024
1023
|
if (1 === t.length) return t[0].search(e);
|
|
1025
1024
|
const s = e?.limit, r = void 0 === s ? e : {
|
|
1026
1025
|
...e,
|
|
@@ -1038,9 +1037,9 @@ var rr, ir = class {
|
|
|
1038
1037
|
}
|
|
1039
1038
|
}
|
|
1040
1039
|
}
|
|
1041
|
-
if (!i || 0 === i.length) return
|
|
1040
|
+
if (!i || 0 === i.length) return as.EmptyArray;
|
|
1042
1041
|
const n = e?.text ? e.text.trim().toUpperCase() : null;
|
|
1043
|
-
return n ?
|
|
1042
|
+
return n ? Ae(i, n) : i.sort((e, t) => {
|
|
1044
1043
|
const s = e.getName().toUpperCase(), r = t.getName().toUpperCase();
|
|
1045
1044
|
return s < r ? -1 : s > r ? 1 : 0;
|
|
1046
1045
|
}), void 0 !== s && i.length > s ? i.slice(0, s) : i;
|
|
@@ -1067,7 +1066,7 @@ var rr, ir = class {
|
|
|
1067
1066
|
}), r = t.length;
|
|
1068
1067
|
for (let s = 0; s < r; s++) await t[s].execute(e);
|
|
1069
1068
|
} catch (e) {
|
|
1070
|
-
|
|
1069
|
+
ms.error("Error executing autoRun script:", e);
|
|
1071
1070
|
}
|
|
1072
1071
|
}
|
|
1073
1072
|
}
|
|
@@ -1079,13 +1078,13 @@ var rr, ir = class {
|
|
|
1079
1078
|
for (let i = 0; i < r.length; i++) {
|
|
1080
1079
|
const o = r[i], n = t[o];
|
|
1081
1080
|
try {
|
|
1082
|
-
s[o] = await
|
|
1081
|
+
s[o] = await Ke(o, n, !1, [], "workbook" === n?.scope ? e : null);
|
|
1083
1082
|
} catch (e) {
|
|
1084
|
-
|
|
1083
|
+
ms.error(`Could not load script '${o}'; it will be unavailable.`, e);
|
|
1085
1084
|
}
|
|
1086
1085
|
}
|
|
1087
1086
|
}
|
|
1088
|
-
const r = this, i = new
|
|
1087
|
+
const r = this, i = new ce({
|
|
1089
1088
|
transactions: this._options?.transactions,
|
|
1090
1089
|
initial: s,
|
|
1091
1090
|
isReadOnly: () => r.isReadOnly(),
|
|
@@ -1113,15 +1112,37 @@ var rr, ir = class {
|
|
|
1113
1112
|
get isIScript() {
|
|
1114
1113
|
return !0;
|
|
1115
1114
|
}
|
|
1116
|
-
},
|
|
1115
|
+
}, dr = /^([a-z][a-z0-9+.-]*):/i, gr = (e) => {
|
|
1117
1116
|
const t = e.toLowerCase();
|
|
1118
1117
|
return t.endsWith(":") ? t : t + ":";
|
|
1119
|
-
},
|
|
1118
|
+
}, mr = async (e, t) => {
|
|
1119
|
+
try {
|
|
1120
|
+
return await globalThis.fetch(e, t);
|
|
1121
|
+
} catch (s) {
|
|
1122
|
+
if (s instanceof TypeError && await (async (e, t) => {
|
|
1123
|
+
const s = globalThis.location;
|
|
1124
|
+
if (!s || t?.method && "GET" !== t.method.toUpperCase()) return !1;
|
|
1125
|
+
const r = new AbortController(), i = setTimeout(() => r.abort(), 5e3);
|
|
1126
|
+
try {
|
|
1127
|
+
return new URL(e, s.href).origin !== s.origin && (await globalThis.fetch(e, {
|
|
1128
|
+
mode: "no-cors",
|
|
1129
|
+
credentials: "omit",
|
|
1130
|
+
signal: r.signal
|
|
1131
|
+
}), !0);
|
|
1132
|
+
} catch {
|
|
1133
|
+
return !1;
|
|
1134
|
+
} finally {
|
|
1135
|
+
clearTimeout(i), r.abort();
|
|
1136
|
+
}
|
|
1137
|
+
})(e, t)) throw new is.Blocked("This site is restricted: it doesn't allow web apps to read its data, so the browser blocked the request for security.", { cause: s });
|
|
1138
|
+
throw s;
|
|
1139
|
+
}
|
|
1140
|
+
}, _r = class {
|
|
1120
1141
|
constructor() {
|
|
1121
|
-
this._handlers = /* @__PURE__ */ new Map([["http:",
|
|
1142
|
+
this._handlers = /* @__PURE__ */ new Map([["http:", mr], ["https:", mr]]);
|
|
1122
1143
|
}
|
|
1123
1144
|
fetch(e, t) {
|
|
1124
|
-
const s =
|
|
1145
|
+
const s = dr.exec(e)?.[1], r = this._handlers.get(s ? gr(s) : "https:");
|
|
1125
1146
|
if (!r) return Promise.reject(/* @__PURE__ */ new TypeError(`No fetcher serves '${s}:'.`));
|
|
1126
1147
|
try {
|
|
1127
1148
|
return r(e, t);
|
|
@@ -1130,7 +1151,7 @@ var rr, ir = class {
|
|
|
1130
1151
|
}
|
|
1131
1152
|
}
|
|
1132
1153
|
register(e, t) {
|
|
1133
|
-
const s =
|
|
1154
|
+
const s = gr(e), r = this._handlers.get(s);
|
|
1134
1155
|
return this._handlers.set(s, t), () => {
|
|
1135
1156
|
this._handlers.get(s) === t && (r ? this._handlers.set(s, r) : this._handlers.delete(s));
|
|
1136
1157
|
};
|
|
@@ -1138,17 +1159,17 @@ var rr, ir = class {
|
|
|
1138
1159
|
get isIFetcher() {
|
|
1139
1160
|
return !0;
|
|
1140
1161
|
}
|
|
1141
|
-
},
|
|
1162
|
+
}, fr = /* @__PURE__ */ new Set([
|
|
1142
1163
|
101,
|
|
1143
1164
|
103,
|
|
1144
1165
|
204,
|
|
1145
1166
|
205,
|
|
1146
1167
|
304
|
|
1147
|
-
]),
|
|
1168
|
+
]), pr = (e) => new Response(fr.has(e.status) ? null : e.body, {
|
|
1148
1169
|
status: e.status,
|
|
1149
1170
|
statusText: e.statusText,
|
|
1150
1171
|
headers: e.headers
|
|
1151
|
-
}),
|
|
1172
|
+
}), wr = class {
|
|
1152
1173
|
constructor(e, t) {
|
|
1153
1174
|
this._kept = /* @__PURE__ */ new Map(), this._cached = /* @__PURE__ */ new Map(), this._inFlight = /* @__PURE__ */ new Map(), this._resources = e, this._fetcher = t;
|
|
1154
1175
|
}
|
|
@@ -1160,19 +1181,19 @@ var rr, ir = class {
|
|
|
1160
1181
|
const s = this._kept.get(e) ?? this._findHeld(e);
|
|
1161
1182
|
if (s && !s.isClosed()) return this._fromKept(s);
|
|
1162
1183
|
const r = this._cached.get(e);
|
|
1163
|
-
if (r) return
|
|
1184
|
+
if (r) return pr(r);
|
|
1164
1185
|
let i = this._inFlight.get(e);
|
|
1165
1186
|
return i || (i = this._request(e, {
|
|
1166
1187
|
...t,
|
|
1167
1188
|
signal: void 0
|
|
1168
1189
|
}).finally(() => {
|
|
1169
1190
|
this._inFlight.delete(e);
|
|
1170
|
-
}), this._inFlight.set(e, i)),
|
|
1191
|
+
}), this._inFlight.set(e, i)), pr(await ((e, t) => t ? t.aborted ? Promise.reject(t.reason) : new Promise((s, r) => {
|
|
1171
1192
|
const i = () => r(t.reason);
|
|
1172
1193
|
t.addEventListener("abort", i, { once: !0 }), e.then(s, r).finally(() => t.removeEventListener("abort", i));
|
|
1173
1194
|
}) : e)(i, t?.signal));
|
|
1174
1195
|
}
|
|
1175
|
-
return
|
|
1196
|
+
return pr(await this._request(e, t));
|
|
1176
1197
|
}
|
|
1177
1198
|
adopt(e) {
|
|
1178
1199
|
for (const t of e) {
|
|
@@ -1190,7 +1211,7 @@ var rr, ir = class {
|
|
|
1190
1211
|
}
|
|
1191
1212
|
async _fromKept(e) {
|
|
1192
1213
|
const [t, s] = await Promise.all([e.toBuffer(), e.getType()]);
|
|
1193
|
-
return
|
|
1214
|
+
return pr({
|
|
1194
1215
|
status: 200,
|
|
1195
1216
|
statusText: "OK",
|
|
1196
1217
|
headers: s ? [["content-type", s.mime]] : [],
|
|
@@ -1198,7 +1219,7 @@ var rr, ir = class {
|
|
|
1198
1219
|
});
|
|
1199
1220
|
}
|
|
1200
1221
|
async _request(e, t) {
|
|
1201
|
-
const s = await this._fetcher.fetch(e, t), r =
|
|
1222
|
+
const s = await this._fetcher.fetch(e, t), r = fr.has(s.status) ? null : await s.arrayBuffer(), i = [];
|
|
1202
1223
|
s.headers.forEach((e, t) => {
|
|
1203
1224
|
i.push([t, e]);
|
|
1204
1225
|
});
|
|
@@ -1209,14 +1230,14 @@ var rr, ir = class {
|
|
|
1209
1230
|
body: r
|
|
1210
1231
|
};
|
|
1211
1232
|
if (s.ok && r && r.byteLength > 0) {
|
|
1212
|
-
const t = await new
|
|
1233
|
+
const t = await new I({ source: { buffer: r } }).getType();
|
|
1213
1234
|
t?.mime.startsWith("image/") ? (o.headers = i.filter(([e]) => "content-type" !== e.toLowerCase()), o.headers.push(["content-type", t.mime])) : this._cached.set(e, o);
|
|
1214
1235
|
}
|
|
1215
1236
|
return o;
|
|
1216
1237
|
}
|
|
1217
|
-
},
|
|
1238
|
+
}, yr = class {
|
|
1218
1239
|
constructor(e, t, s, r) {
|
|
1219
|
-
this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = s, this._topLeft = t ??
|
|
1240
|
+
this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = s, this._topLeft = t ?? ls.EmptyCell, this._sheet = new le({
|
|
1220
1241
|
runtime: e,
|
|
1221
1242
|
styles: this._styles,
|
|
1222
1243
|
calcOnLoad: "none",
|
|
@@ -1238,40 +1259,40 @@ var rr, ir = class {
|
|
|
1238
1259
|
e.includes(r) && delete i[r];
|
|
1239
1260
|
}
|
|
1240
1261
|
}
|
|
1241
|
-
const o =
|
|
1262
|
+
const o = Pt(i.fontFamily);
|
|
1242
1263
|
r.font = {}, o && (r.font.family = o.family, r.font.fallbacks = o.fallbacks, r.font.size = o.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
|
|
1243
|
-
const n =
|
|
1244
|
-
r.font.underline = n.underline, r.font.strike = n.strike ?
|
|
1264
|
+
const n = Rt(i.textDecoration);
|
|
1265
|
+
r.font.underline = n.underline, r.font.strike = n.strike ? Bt.StrikeStyle.Single : Bt.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = Ft(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = ts(i.textAlign)), i?.textAlign && !r.alignment.horizontal && "general" !== i?.textAlign && ("center-across" === i.textAlign ? r.alignment.horizontal = Ut.HorizontalAlignment.CenterContinuous : "fill" === i.textAlign ? r.alignment.horizontal = Ut.HorizontalAlignment.Fill : "121" === i.textAlign || "010" === i.textAlign ? (r.alignment.horizontal = Ut.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = "121" === i.textAlign) : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && ("super" === i.verticalAlign.toLowerCase() ? r.font.baseline = jt.Baseline.Superscript : "sub" === i.verticalAlign.toLowerCase() ? r.font.baseline = jt.Baseline.Subscript : r.alignment.vertical = xt(i.verticalAlign), r.alignment.vertical || ("121" === i.verticalAlign ? r.alignment.vertical = Ut.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = "no-wrap" === i.whiteSpace || "nowrap" === i.whiteSpace ? Ut.Overflow.Visible : Ut.Overflow.Wrap), "shrinktofit" === i.msoTextControl && (r.alignment.overflow = Ut.Overflow.Shrink);
|
|
1245
1266
|
let a = null;
|
|
1246
1267
|
if (i.background ? a = i.background : i.backgroundColor && (a = i.backgroundColor), a && (r.fill = { color: a }), i.msoPattern) {
|
|
1247
|
-
let e =
|
|
1248
|
-
e && (e.patternType ===
|
|
1268
|
+
let e = Lt(i.msoPattern);
|
|
1269
|
+
e && (e.patternType === Qt.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== Qt.BuiltInSheetPattern.None && (a && (e.background = a), r.fill = e));
|
|
1249
1270
|
}
|
|
1250
|
-
"vertical" === i.layoutFlow || "vertical-ideographic" === i.layoutFlow ? r.alignment.stacked = !0 : void 0 !== i.msoRotate && (r.alignment.rotation =
|
|
1271
|
+
"vertical" === i.layoutFlow || "vertical-ideographic" === i.layoutFlow ? r.alignment.stacked = !0 : void 0 !== i.msoRotate && (r.alignment.rotation = Vt(i.msoRotate));
|
|
1251
1272
|
const l = (e, t) => {
|
|
1252
1273
|
e && (r.borders || (r.borders = {}), r.borders[e] = t);
|
|
1253
1274
|
};
|
|
1254
1275
|
i.border && "none" !== i.border && (l("top", i.border), l("left", i.border), l("right", i.border), l("bottom", i.border)), i.borderTop && l("top", i.borderTop), i.borderLeft && l("left", i.borderLeft), i.borderRight && l("right", i.borderRight), i.borderBottom && l("bottom", i.borderBottom), i.msoDiagonalUp && l("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && l("diagonalDown", i.msoDiagonalDown);
|
|
1255
1276
|
let h = r.numberFormat;
|
|
1256
|
-
i.msoNumberFormat && (h =
|
|
1277
|
+
i.msoNumberFormat && (h = Mt(i.msoNumberFormat), h.includes("\\") ? h = null : "Fixed" === h ? h = $t.Styles.lookupStyle(r.numberFormat).formatType === $t.Type.Number ? null : $t.Type.Number : "Percent" === h && (h = $t.Styles.lookupStyle(r.numberFormat).formatType === $t.Type.Percentage ? null : $t.Type.Percentage)), h && (r.numberFormat = h), e.style = this._styles.normalize(r), s && 0 === Object.keys(e.style).length && delete e.style;
|
|
1257
1278
|
}
|
|
1258
1279
|
onCell(e, t, s, r, i) {
|
|
1259
1280
|
const o = r(i);
|
|
1260
1281
|
let n = { value: void 0 !== t ? t : s ?? "" };
|
|
1261
1282
|
if ("string" == typeof n.value && 0 === n.value.length && (n.value = void 0), o && this.applyCSSStyle(n, o), "string" == typeof n.value && /^#+$/.test(n.value)) {
|
|
1262
1283
|
const e = n.style?.numberFormat;
|
|
1263
|
-
e && (
|
|
1284
|
+
e && (es(e) || Tt(e)) && (n.value = is.BuiltIn.Num);
|
|
1264
1285
|
}
|
|
1265
1286
|
if ("TD" === i?.tagName.toUpperCase()) {
|
|
1266
1287
|
let e = n.style, t = e?.font ?? {};
|
|
1267
|
-
(i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike =
|
|
1288
|
+
(i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = Bt.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = jt.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = jt.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = Bt.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = Bt.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, n.style = e), e.font || (e.font = t));
|
|
1268
1289
|
const s = i.querySelectorAll("a");
|
|
1269
1290
|
if (s.length > 0) {
|
|
1270
1291
|
const e = s[0].getAttribute("href");
|
|
1271
1292
|
e && (n.hyperlink = e);
|
|
1272
1293
|
}
|
|
1273
1294
|
}
|
|
1274
|
-
if (!
|
|
1295
|
+
if (!ls.isSingleCell(e)) {
|
|
1275
1296
|
const t = {
|
|
1276
1297
|
rowStart: this._topLeft.rowIndex + e.rowStart,
|
|
1277
1298
|
colStart: this._topLeft.colIndex + e.colStart,
|
|
@@ -1282,7 +1303,7 @@ var rr, ir = class {
|
|
|
1282
1303
|
}
|
|
1283
1304
|
if (void 0 === n.value && !n.style && Object.keys(n).length <= 1) return;
|
|
1284
1305
|
const a = this._builder, l = this._topLeft;
|
|
1285
|
-
if (a.pushAt(l.rowIndex + e.rowStart, l.colIndex + e.colStart, n), !
|
|
1306
|
+
if (a.pushAt(l.rowIndex + e.rowStart, l.colIndex + e.colStart, n), !ls.isSingleCell(e) && o.msoIgnore) {
|
|
1286
1307
|
if (o.msoIgnore.includes("colspan")) {
|
|
1287
1308
|
const t = {};
|
|
1288
1309
|
o && this.applyCSSStyle(t, o);
|
|
@@ -1312,9 +1333,9 @@ var rr, ir = class {
|
|
|
1312
1333
|
if ("userset" !== i.msoHeightSource) return;
|
|
1313
1334
|
if (!r) return;
|
|
1314
1335
|
let o = r.getAttribute("height") ?? i.height, n = null;
|
|
1315
|
-
if (o && (n =
|
|
1336
|
+
if (o && (n = Wt(o, this._styles.getNormal().getFont().getSize(), "px")), null === n) for (let e = 0; e < r.cells.length; e++) {
|
|
1316
1337
|
const t = r.cells[e], i = t.getAttribute("height") ?? s(t).height;
|
|
1317
|
-
let o =
|
|
1338
|
+
let o = Wt(i, this._styles.getNormal().getFont().getSize(), "px");
|
|
1318
1339
|
null !== o && (n = Math.max(o, n ?? 0));
|
|
1319
1340
|
}
|
|
1320
1341
|
null !== n && this._rowsReading.push({
|
|
@@ -1322,7 +1343,7 @@ var rr, ir = class {
|
|
|
1322
1343
|
min: this._topLeft.rowIndex + e,
|
|
1323
1344
|
max: this._topLeft.rowIndex + e + t - 1
|
|
1324
1345
|
},
|
|
1325
|
-
update: { size: n *
|
|
1346
|
+
update: { size: n * Bt.getDeviceScale() }
|
|
1326
1347
|
});
|
|
1327
1348
|
}
|
|
1328
1349
|
onColumn(e, t, s, r) {
|
|
@@ -1330,12 +1351,12 @@ var rr, ir = class {
|
|
|
1330
1351
|
if ("userset" !== i.msoWidthSource) return;
|
|
1331
1352
|
if (!r) return;
|
|
1332
1353
|
let o = r.getAttribute("width") ?? i.width, n = null;
|
|
1333
|
-
o && (n =
|
|
1354
|
+
o && (n = Wt(o, this._styles.getNormal().getFont().getSize(), "px")), null !== n && this._colsReading.push({
|
|
1334
1355
|
address: {
|
|
1335
1356
|
min: this._topLeft.colIndex + e,
|
|
1336
1357
|
max: this._topLeft.colIndex + e + t - 1
|
|
1337
1358
|
},
|
|
1338
|
-
update: { size: n *
|
|
1359
|
+
update: { size: n * Bt.getDeviceScale() }
|
|
1339
1360
|
});
|
|
1340
1361
|
}
|
|
1341
1362
|
onDone() {
|
|
@@ -1346,9 +1367,9 @@ var rr, ir = class {
|
|
|
1346
1367
|
sheet() {
|
|
1347
1368
|
return this._sheet;
|
|
1348
1369
|
}
|
|
1349
|
-
},
|
|
1370
|
+
}, br = class {
|
|
1350
1371
|
constructor(e) {
|
|
1351
|
-
if (!e) throw new
|
|
1372
|
+
if (!e) throw new _s("snapshot is required.");
|
|
1352
1373
|
this._snapshot = e;
|
|
1353
1374
|
}
|
|
1354
1375
|
getItemType() {
|
|
@@ -1378,10 +1399,10 @@ var rr, ir = class {
|
|
|
1378
1399
|
get isClipboardItem() {
|
|
1379
1400
|
return !0;
|
|
1380
1401
|
}
|
|
1381
|
-
},
|
|
1402
|
+
}, Sr = class {
|
|
1382
1403
|
constructor(e, t, s, r, i) {
|
|
1383
|
-
if (this._parsed = void 0, this._runtime = e, !t) throw new
|
|
1384
|
-
this._topLeft = s ??
|
|
1404
|
+
if (this._parsed = void 0, this._runtime = e, !t) throw new _s("nativeItems are required.");
|
|
1405
|
+
this._topLeft = s ?? ls.EmptyCell, this._native = t, this._markOptions = Object.freeze(r ?? {}), this._styles = i;
|
|
1385
1406
|
}
|
|
1386
1407
|
getItemType() {
|
|
1387
1408
|
return "range";
|
|
@@ -1426,16 +1447,16 @@ var rr, ir = class {
|
|
|
1426
1447
|
async parse() {
|
|
1427
1448
|
let e, t = this._native?.text, s = this._native.html;
|
|
1428
1449
|
if (null === s && t && t.includes("<table")) try {
|
|
1429
|
-
const e = new DOMParser().parseFromString(t,
|
|
1430
|
-
if (r) throw new
|
|
1450
|
+
const e = new DOMParser().parseFromString(t, gs.Html), r = e.querySelector("parsererror");
|
|
1451
|
+
if (r) throw new cs("Unable to parse: " + r);
|
|
1431
1452
|
s = e, t = null;
|
|
1432
1453
|
} catch (e) {
|
|
1433
1454
|
console.warn("Discovered text as html table but could could not parse.");
|
|
1434
1455
|
}
|
|
1435
1456
|
try {
|
|
1436
|
-
const r = new
|
|
1457
|
+
const r = new yr(this._runtime, this._topLeft, this._styles, s ? "HTML" : "Text"), i = await Promise.resolve(t ? B(t) : [[]]);
|
|
1437
1458
|
let o;
|
|
1438
|
-
if (
|
|
1459
|
+
if (L(s, i, r) ? (e = r.sheet(), o = e.getUsedRange()) : s = null, o) {
|
|
1439
1460
|
const t = o.getSnapshot();
|
|
1440
1461
|
return this._parsed = {
|
|
1441
1462
|
prepare: (e, s) => t.prepare?.(e, s),
|
|
@@ -1449,24 +1470,25 @@ var rr, ir = class {
|
|
|
1449
1470
|
throw e;
|
|
1450
1471
|
}
|
|
1451
1472
|
if (!t && !s && this._native.image) {
|
|
1452
|
-
const e = await this._native.image.arrayBuffer();
|
|
1453
|
-
let
|
|
1473
|
+
const e = await this._native.image.arrayBuffer(), t = us.getPngStatedSize(e);
|
|
1474
|
+
let s = null;
|
|
1454
1475
|
return this._parsed = {
|
|
1455
|
-
async prepare(
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1458
|
-
sheet:
|
|
1459
|
-
options: await
|
|
1476
|
+
async prepare(r) {
|
|
1477
|
+
const i = r.getWorksheet();
|
|
1478
|
+
s = {
|
|
1479
|
+
sheet: i,
|
|
1480
|
+
options: await i.getMovables()._preparePicture({ source: { buffer: e } }, {
|
|
1460
1481
|
type: "picture",
|
|
1461
|
-
description:
|
|
1462
|
-
autoSelect: !0
|
|
1482
|
+
description: bs("op.copyImageFromClipboard"),
|
|
1483
|
+
autoSelect: !0,
|
|
1484
|
+
...t && { bounds: t }
|
|
1463
1485
|
})
|
|
1464
1486
|
};
|
|
1465
1487
|
},
|
|
1466
|
-
copyTo(e,
|
|
1488
|
+
copyTo(e, t) {
|
|
1467
1489
|
const r = e.getWorksheet();
|
|
1468
|
-
if (
|
|
1469
|
-
return r.getMovables()._insertNow(
|
|
1490
|
+
if (s?.sheet !== r) throw new Error("The image was not prepared for this sheet.");
|
|
1491
|
+
return r.getMovables()._insertNow(s.options), null;
|
|
1470
1492
|
},
|
|
1471
1493
|
getName: () => "Image"
|
|
1472
1494
|
}, !0;
|
|
@@ -1476,7 +1498,7 @@ var rr, ir = class {
|
|
|
1476
1498
|
get isClipboardItem() {
|
|
1477
1499
|
return !0;
|
|
1478
1500
|
}
|
|
1479
|
-
},
|
|
1501
|
+
}, kr = class {
|
|
1480
1502
|
constructor(t) {
|
|
1481
1503
|
this._closed = !1, this._kind = t.kind, this._id = t.id, this._part = t.part, this._styles = t.styles, this._tabColor = t.tabColor ? this._styles.parseColor(t.tabColor) : null, this._transactions = t.transactions, this._workbook = t.workbook ?? null, this._container = t.container, this._emitter = new e(this, this._transactions);
|
|
1482
1504
|
}
|
|
@@ -1493,11 +1515,11 @@ var rr, ir = class {
|
|
|
1493
1515
|
return this._assertOpen(), this._container.setName(e, t), this;
|
|
1494
1516
|
}
|
|
1495
1517
|
getVisibility() {
|
|
1496
|
-
return this._closed ?
|
|
1518
|
+
return this._closed ? mt.Visibility.VeryHidden : this._container.getVisibility();
|
|
1497
1519
|
}
|
|
1498
1520
|
setVisibility(e = !0, t) {
|
|
1499
1521
|
let s;
|
|
1500
|
-
return this._assertOpen(), s = !0 === e ?
|
|
1522
|
+
return this._assertOpen(), s = !0 === e ? mt.Visibility.Visible : !1 === e ? mt.Visibility.Hidden : e, this._container.setVisibility(s, t), this;
|
|
1501
1523
|
}
|
|
1502
1524
|
getIndex() {
|
|
1503
1525
|
return this._container.getIndex();
|
|
@@ -1519,12 +1541,12 @@ var rr, ir = class {
|
|
|
1519
1541
|
}
|
|
1520
1542
|
delete() {
|
|
1521
1543
|
if (this._closed) return;
|
|
1522
|
-
const e = this._transactions.beginCommit({ description:
|
|
1544
|
+
const e = this._transactions.beginCommit({ description: Ss("op.deleteSheet", { name: this.getName() }) });
|
|
1523
1545
|
try {
|
|
1524
1546
|
try {
|
|
1525
1547
|
this._notify("onBeforeDelete");
|
|
1526
1548
|
} catch (e) {
|
|
1527
|
-
throw e instanceof Error ? e : new
|
|
1549
|
+
throw e instanceof Error ? e : new cs(e?.message ?? Ss("error.sheet.modelDelete"));
|
|
1528
1550
|
}
|
|
1529
1551
|
this._notify("onDelete"), e.commit();
|
|
1530
1552
|
} catch (t) {
|
|
@@ -1550,7 +1572,7 @@ var rr, ir = class {
|
|
|
1550
1572
|
this._emitter.notify(e);
|
|
1551
1573
|
}
|
|
1552
1574
|
_assertOpen() {
|
|
1553
|
-
if (this._closed) throw new Error(
|
|
1575
|
+
if (this._closed) throw new Error(Ss("error.sheet.modelClosed"));
|
|
1554
1576
|
}
|
|
1555
1577
|
get [Symbol.toStringTag]() {
|
|
1556
1578
|
return "[OpaqueSheet]";
|
|
@@ -1565,12 +1587,12 @@ var rr, ir = class {
|
|
|
1565
1587
|
return !0;
|
|
1566
1588
|
}
|
|
1567
1589
|
};
|
|
1568
|
-
(
|
|
1590
|
+
(nr || (nr = {})).Visibility = {
|
|
1569
1591
|
Visible: "visible",
|
|
1570
1592
|
Hidden: "hidden",
|
|
1571
1593
|
VeryHidden: "veryHidden"
|
|
1572
1594
|
};
|
|
1573
|
-
var
|
|
1595
|
+
var Cr, vr = {
|
|
1574
1596
|
showFormulaBar: !0,
|
|
1575
1597
|
showTabs: !0,
|
|
1576
1598
|
tabRatio: 600,
|
|
@@ -1581,11 +1603,11 @@ var Sr, br = {
|
|
|
1581
1603
|
firstTab: 0,
|
|
1582
1604
|
windowBounds: null,
|
|
1583
1605
|
minimized: !1,
|
|
1584
|
-
visibility:
|
|
1606
|
+
visibility: nr.Visibility.Visible,
|
|
1585
1607
|
autoFilterDateGrouping: !0
|
|
1586
|
-
},
|
|
1608
|
+
}, Ir = class {
|
|
1587
1609
|
constructor(t) {
|
|
1588
|
-
this._id =
|
|
1610
|
+
this._id = as.uuidV4(), this._emitter = new e(this), this._state = { ...vr }, t?.json && this._fromJSON(t?.json);
|
|
1589
1611
|
}
|
|
1590
1612
|
getId() {
|
|
1591
1613
|
return this._id;
|
|
@@ -1674,7 +1696,7 @@ var Sr, br = {
|
|
|
1674
1696
|
const t = Object.keys(this._state), s = t.length;
|
|
1675
1697
|
for (let r = 0; r < s; r++) {
|
|
1676
1698
|
const s = t[r], i = this._state[s];
|
|
1677
|
-
null != i && i !==
|
|
1699
|
+
null != i && i !== vr[s] && (e[s] = i);
|
|
1678
1700
|
}
|
|
1679
1701
|
return 0 === Object.keys(e).length && (e = null), e;
|
|
1680
1702
|
}
|
|
@@ -1684,7 +1706,7 @@ var Sr, br = {
|
|
|
1684
1706
|
}
|
|
1685
1707
|
update(e, t = !0) {
|
|
1686
1708
|
this._state = {
|
|
1687
|
-
...
|
|
1709
|
+
...vr,
|
|
1688
1710
|
...this._state,
|
|
1689
1711
|
...e
|
|
1690
1712
|
}, t && this._emitter.notify("onViewChange");
|
|
@@ -1699,13 +1721,13 @@ var Sr, br = {
|
|
|
1699
1721
|
get isIWorkbookView() {
|
|
1700
1722
|
return !0;
|
|
1701
1723
|
}
|
|
1702
|
-
},
|
|
1724
|
+
}, Nr = Object.freeze({
|
|
1703
1725
|
structure: !1,
|
|
1704
1726
|
windows: !1,
|
|
1705
1727
|
revision: !0,
|
|
1706
1728
|
password: null,
|
|
1707
1729
|
revisionsPassword: null
|
|
1708
|
-
}),
|
|
1730
|
+
}), Or = class extends ie {
|
|
1709
1731
|
isWindowsAllowed() {
|
|
1710
1732
|
return this._isPropertyAllowed("windows");
|
|
1711
1733
|
}
|
|
@@ -1727,7 +1749,7 @@ var Sr, br = {
|
|
|
1727
1749
|
const s = Object.keys(t), r = s.length;
|
|
1728
1750
|
for (let i = 0; i < r; i++) {
|
|
1729
1751
|
const r = s[i], o = t[r];
|
|
1730
|
-
null != o && o !==
|
|
1752
|
+
null != o && o !== Nr[r] && (e[r] = o);
|
|
1731
1753
|
}
|
|
1732
1754
|
}
|
|
1733
1755
|
return super._toJSON(e);
|
|
@@ -1739,38 +1761,38 @@ var Sr, br = {
|
|
|
1739
1761
|
return !0;
|
|
1740
1762
|
}
|
|
1741
1763
|
};
|
|
1742
|
-
(
|
|
1764
|
+
(Cr || (Cr = {})).Type = {
|
|
1743
1765
|
Number: "number",
|
|
1744
1766
|
Boolean: "boolean",
|
|
1745
1767
|
Date: "date",
|
|
1746
1768
|
String: "string",
|
|
1747
1769
|
Float: "float"
|
|
1748
1770
|
};
|
|
1749
|
-
var
|
|
1771
|
+
var Rr = (e) => {
|
|
1750
1772
|
if ("string" == typeof e) return {
|
|
1751
|
-
type:
|
|
1773
|
+
type: Cr.Type.String,
|
|
1752
1774
|
value: e
|
|
1753
1775
|
};
|
|
1754
1776
|
if ("boolean" == typeof e) return {
|
|
1755
|
-
type:
|
|
1777
|
+
type: Cr.Type.Boolean,
|
|
1756
1778
|
value: e
|
|
1757
1779
|
};
|
|
1758
1780
|
if ("number" == typeof e) {
|
|
1759
1781
|
if (!Number.isFinite(e)) throw new Error("A custom property value must be a finite number.");
|
|
1760
1782
|
return {
|
|
1761
|
-
type: Number.isInteger(e) && e >= -2147483648 && e <= 2147483647 ?
|
|
1783
|
+
type: Number.isInteger(e) && e >= -2147483648 && e <= 2147483647 ? Cr.Type.Number : Cr.Type.Float,
|
|
1762
1784
|
value: e
|
|
1763
1785
|
};
|
|
1764
1786
|
}
|
|
1765
1787
|
if (e instanceof Date) {
|
|
1766
1788
|
if (isNaN(e.getTime())) throw new Error("A custom property value must be a valid date.");
|
|
1767
1789
|
return {
|
|
1768
|
-
type:
|
|
1790
|
+
type: Cr.Type.Date,
|
|
1769
1791
|
value: e.toISOString()
|
|
1770
1792
|
};
|
|
1771
1793
|
}
|
|
1772
1794
|
throw new Error("A custom property value must be a string, number, boolean or Date.");
|
|
1773
|
-
},
|
|
1795
|
+
}, xr = class {
|
|
1774
1796
|
constructor(e, t) {
|
|
1775
1797
|
this._json = e, this._owner = t;
|
|
1776
1798
|
}
|
|
@@ -1785,12 +1807,12 @@ var Ir = (e) => {
|
|
|
1785
1807
|
}
|
|
1786
1808
|
getValue() {
|
|
1787
1809
|
const { type: e, value: t } = this._json;
|
|
1788
|
-
return e ===
|
|
1810
|
+
return e === Cr.Type.Date ? new Date(t) : t;
|
|
1789
1811
|
}
|
|
1790
1812
|
setValue(e) {
|
|
1791
1813
|
this._owner._assertCustomEditable(this), this._json = {
|
|
1792
1814
|
...this._json,
|
|
1793
|
-
...
|
|
1815
|
+
...Rr(e)
|
|
1794
1816
|
};
|
|
1795
1817
|
}
|
|
1796
1818
|
delete() {
|
|
@@ -1799,7 +1821,7 @@ var Ir = (e) => {
|
|
|
1799
1821
|
toJSON() {
|
|
1800
1822
|
return { ...this._json };
|
|
1801
1823
|
}
|
|
1802
|
-
},
|
|
1824
|
+
}, Er = class {
|
|
1803
1825
|
constructor(e) {
|
|
1804
1826
|
this._json = {}, this._custom = [], this._assertOpen = e;
|
|
1805
1827
|
}
|
|
@@ -1889,9 +1911,9 @@ var Ir = (e) => {
|
|
|
1889
1911
|
if (this._assertOpen(), "string" != typeof e || "" === e) throw new Error("A custom property needs a name.");
|
|
1890
1912
|
const s = this.getCustomProperty(e);
|
|
1891
1913
|
if (s) return s.setValue(t), s;
|
|
1892
|
-
const r = new
|
|
1914
|
+
const r = new xr({
|
|
1893
1915
|
key: e,
|
|
1894
|
-
...
|
|
1916
|
+
...Rr(t)
|
|
1895
1917
|
}, this);
|
|
1896
1918
|
return this._custom.push(r), r;
|
|
1897
1919
|
}
|
|
@@ -1906,26 +1928,26 @@ var Ir = (e) => {
|
|
|
1906
1928
|
}
|
|
1907
1929
|
fromJSON(e) {
|
|
1908
1930
|
const { custom: t, ...s } = e ?? {};
|
|
1909
|
-
this._json = s, this._custom = (t ?? []).map((e) => new
|
|
1931
|
+
this._json = s, this._custom = (t ?? []).map((e) => new xr({ ...e }, this));
|
|
1910
1932
|
}
|
|
1911
1933
|
toJSON() {
|
|
1912
1934
|
const e = { ...this._json };
|
|
1913
1935
|
return this._custom.length > 0 && (e.custom = this._custom.map((e) => e.toJSON())), e;
|
|
1914
1936
|
}
|
|
1915
1937
|
};
|
|
1916
|
-
function
|
|
1917
|
-
return
|
|
1938
|
+
function Lr(e) {
|
|
1939
|
+
return Ss("error.workbook.invalidSheetKey", { key: e });
|
|
1918
1940
|
}
|
|
1919
|
-
function
|
|
1920
|
-
return
|
|
1941
|
+
function Ar(e) {
|
|
1942
|
+
return Ss("error.workbook.sheetNameNotFound", { sheetName: e });
|
|
1921
1943
|
}
|
|
1922
|
-
function
|
|
1923
|
-
return
|
|
1944
|
+
function Vr(e, t) {
|
|
1945
|
+
return Ss("chart" === t ? "error.workbook.sheetIsChart" : "macro" === t ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
|
|
1924
1946
|
}
|
|
1925
|
-
function
|
|
1926
|
-
return "chart" === t ?
|
|
1947
|
+
function Tr(e, t) {
|
|
1948
|
+
return "chart" === t ? Ss("error.workbook.selectedIsChart", { sheetName: e }) : "macro" === t ? Ss("error.workbook.selectedIsMacro", { sheetName: e }) : "dialog" === t ? Ss("error.workbook.selectedIsDialog", { sheetName: e }) : Ss("error.workbook.noWorksheet");
|
|
1927
1949
|
}
|
|
1928
|
-
var
|
|
1950
|
+
var Pr = class extends Ne {
|
|
1929
1951
|
constructor(e, t, s, r) {
|
|
1930
1952
|
super(), this._add = e, this._get = t, this._addListeners = s, this._getSelected = r;
|
|
1931
1953
|
}
|
|
@@ -1956,39 +1978,39 @@ var Ar = class extends St {
|
|
|
1956
1978
|
get isIWorksheetCollection() {
|
|
1957
1979
|
return !0;
|
|
1958
1980
|
}
|
|
1959
|
-
},
|
|
1960
|
-
function
|
|
1961
|
-
const t =
|
|
1981
|
+
}, Fr = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Wr = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
|
|
1982
|
+
function Br(e) {
|
|
1983
|
+
const t = Ss(bs("workbook.defaultSheetName"), { n: e + 1 });
|
|
1962
1984
|
return "workbook.defaultSheetName" === t ? `Sheet${e + 1}` : t;
|
|
1963
1985
|
}
|
|
1964
|
-
function
|
|
1986
|
+
function jr(e, t) {
|
|
1965
1987
|
return {
|
|
1966
|
-
...
|
|
1988
|
+
...oe,
|
|
1967
1989
|
getWorksheet: () => null,
|
|
1968
|
-
toString: () =>
|
|
1990
|
+
toString: () => ot(e, t)
|
|
1969
1991
|
};
|
|
1970
1992
|
}
|
|
1971
|
-
function
|
|
1972
|
-
if (!e) throw new Error(
|
|
1973
|
-
if (
|
|
1993
|
+
function Mr(e, t = !1) {
|
|
1994
|
+
if (!e) throw new Error(Ss("error.workbook.sheetNameBlank"));
|
|
1995
|
+
if (Fr.test(e)) {
|
|
1974
1996
|
if (!t) throw new Error(function(e) {
|
|
1975
|
-
return e ?
|
|
1997
|
+
return e ? Ss("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : Ss("error.workbook.sheetNameInvalidChars");
|
|
1976
1998
|
}(e));
|
|
1977
|
-
e = e.replace(
|
|
1999
|
+
e = e.replace(Fr, "");
|
|
1978
2000
|
}
|
|
1979
|
-
if (0 === e.length) throw new Error(
|
|
2001
|
+
if (0 === e.length) throw new Error(Ss("error.workbook.sheetNameBlank"));
|
|
1980
2002
|
const s = e.length;
|
|
1981
2003
|
if (s > 31) {
|
|
1982
|
-
if (!t) throw new Error(
|
|
2004
|
+
if (!t) throw new Error(Ss("error.workbook.sheetNameTooLong"));
|
|
1983
2005
|
e = e.substring(0, 31);
|
|
1984
2006
|
}
|
|
1985
2007
|
if ("'" === e.charAt(0) || "'" === e.charAt(s - 1)) {
|
|
1986
|
-
if (!t) throw new Error(
|
|
2008
|
+
if (!t) throw new Error(Ss("error.workbook.sheetNameQuotes"));
|
|
1987
2009
|
e = e.replace(/^'|'$/g, "");
|
|
1988
2010
|
}
|
|
1989
2011
|
return e;
|
|
1990
2012
|
}
|
|
1991
|
-
var
|
|
2013
|
+
var Dr, zr = "workbook.activeSheet", Hr = class e extends _t {
|
|
1992
2014
|
constructor(e, t, s, r) {
|
|
1993
2015
|
super(e, t, r), this._workbook = s;
|
|
1994
2016
|
}
|
|
@@ -1999,24 +2021,24 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
1999
2021
|
let r = this._options;
|
|
2000
2022
|
return s && (r = {
|
|
2001
2023
|
...this._options,
|
|
2002
|
-
getOptions:
|
|
2024
|
+
getOptions: yt(this._options?.getOptions, s)
|
|
2003
2025
|
}), new e(t, this._internal, this._workbook, r);
|
|
2004
2026
|
}
|
|
2005
2027
|
_createRange(e, t) {
|
|
2006
|
-
const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope,
|
|
2007
|
-
if (i && !i.sheet.isIWorksheet) throw new
|
|
2028
|
+
const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope, mt.Visibility.VeryHidden) : null;
|
|
2029
|
+
if (i && !i.sheet.isIWorksheet) throw new cs(Vr(i.name, i.sheet.getKind()));
|
|
2008
2030
|
if (!i) {
|
|
2009
2031
|
const e = r._anchorWorksheet();
|
|
2010
|
-
return delete s?.scope,
|
|
2011
|
-
scope:
|
|
2032
|
+
return delete s?.scope, jr(s, s ? {
|
|
2033
|
+
scope: ye,
|
|
2012
2034
|
...e.getEntireRange().getCoords()
|
|
2013
2035
|
} : null);
|
|
2014
2036
|
}
|
|
2015
2037
|
let o = this._options;
|
|
2016
2038
|
return t && (o = {
|
|
2017
2039
|
...this._options,
|
|
2018
|
-
getOptions:
|
|
2019
|
-
}), new
|
|
2040
|
+
getOptions: yt(this._options.getOptions, t)
|
|
2041
|
+
}), new Ur(e, Ie(i.sheet), this._workbook, o);
|
|
2020
2042
|
}
|
|
2021
2043
|
async select(e) {
|
|
2022
2044
|
const t = [];
|
|
@@ -2042,15 +2064,15 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2042
2064
|
}
|
|
2043
2065
|
getAddress(e) {
|
|
2044
2066
|
const t = this._internal.getSheet(), s = t.getEntireRange().getCoords();
|
|
2045
|
-
return
|
|
2067
|
+
return ht(this.getCoords(), {
|
|
2046
2068
|
...s,
|
|
2047
2069
|
scope: t.getName()
|
|
2048
|
-
},
|
|
2070
|
+
}, ot, Le, e);
|
|
2049
2071
|
}
|
|
2050
2072
|
toString() {
|
|
2051
2073
|
return this.getAddress();
|
|
2052
2074
|
}
|
|
2053
|
-
},
|
|
2075
|
+
}, Ur = class e extends N {
|
|
2054
2076
|
constructor(e, t, s, r) {
|
|
2055
2077
|
super(e, t, r), this._workbook = s;
|
|
2056
2078
|
}
|
|
@@ -2058,17 +2080,17 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2058
2080
|
let s = this._options;
|
|
2059
2081
|
return t && (s = {
|
|
2060
2082
|
...this._options,
|
|
2061
|
-
getOptions:
|
|
2062
|
-
}), new
|
|
2083
|
+
getOptions: yt(this._options?.getOptions, t)
|
|
2084
|
+
}), new Hr(e, this._internal, this._workbook, s);
|
|
2063
2085
|
}
|
|
2064
2086
|
_createRange(t, s) {
|
|
2065
2087
|
const r = this._internal;
|
|
2066
|
-
if (!t) return
|
|
2067
|
-
if (r.validateCoords(t), r.getSheet().isClosed()) return
|
|
2088
|
+
if (!t) return St(r.getSheet(), r.getSheet().getEntireCoords());
|
|
2089
|
+
if (r.validateCoords(t), r.getSheet().isClosed()) return St(null, r.getSheet().getEntireCoords(), t);
|
|
2068
2090
|
let i = this._options;
|
|
2069
2091
|
return s && (i = {
|
|
2070
2092
|
...this._options,
|
|
2071
|
-
getOptions:
|
|
2093
|
+
getOptions: yt(this._options?.getOptions, s)
|
|
2072
2094
|
}), new e(t, this._internal, this._workbook, i);
|
|
2073
2095
|
}
|
|
2074
2096
|
addListener(e, t) {
|
|
@@ -2081,7 +2103,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2081
2103
|
}
|
|
2082
2104
|
getAddress(e) {
|
|
2083
2105
|
const t = this._internal.getSheet(), s = t?.getEntireRange().getCoords() ?? null;
|
|
2084
|
-
return
|
|
2106
|
+
return ot(this.getCoords(), {
|
|
2085
2107
|
...s,
|
|
2086
2108
|
scope: t.getName()
|
|
2087
2109
|
});
|
|
@@ -2089,13 +2111,13 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2089
2111
|
toString() {
|
|
2090
2112
|
return this.getAddress();
|
|
2091
2113
|
}
|
|
2092
|
-
},
|
|
2114
|
+
}, Jr = (e) => !!e && "object" == typeof e && "function" == typeof e.getOrigin, qr = class {
|
|
2093
2115
|
constructor(t) {
|
|
2094
|
-
this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new
|
|
2116
|
+
this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new Se(() => {
|
|
2095
2117
|
const e = [];
|
|
2096
2118
|
for (const t of this.getWorksheets()) e.push(...t.getPivotTables());
|
|
2097
2119
|
return e;
|
|
2098
|
-
}), this._people = new
|
|
2120
|
+
}), this._people = new hr(), this._commentCollection = new d(null, (e, t, s) => {
|
|
2099
2121
|
const r = [];
|
|
2100
2122
|
for (const i of this.getWorksheets()) r.push(...i.getComments().getItems(e ? {
|
|
2101
2123
|
address: e,
|
|
@@ -2108,25 +2130,25 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2108
2130
|
return r;
|
|
2109
2131
|
}, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
|
|
2110
2132
|
e.onCollectionChange(this._commentCollection);
|
|
2111
|
-
} : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new
|
|
2112
|
-
if (this._closed) throw new Error(
|
|
2133
|
+
} : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new Er(() => {
|
|
2134
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2113
2135
|
}), this._locale = null, this._localeOverrides = null, this._startModules = /* @__PURE__ */ new WeakSet();
|
|
2114
2136
|
const s = "string" == typeof t ? { origin: t } : { ...t }, r = s.origin;
|
|
2115
|
-
this._ownOriginProvider = !
|
|
2137
|
+
this._ownOriginProvider = !Jr(r), this._originProvider = Jr(r) ? r : new As("string" == typeof r ? new Rs(null, { name: r }) : r ?? new Rs(null)), delete s.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
|
|
2116
2138
|
const o = s.json;
|
|
2117
|
-
delete s.json, this._transactions = s.transactions ?? new i(), this._id = this._transactions.create(), this._ownTransactions = !s.transactions, this._emitter = new e(this, this._transactions), this._runtime = s.runtime ?? new
|
|
2139
|
+
delete s.json, this._transactions = s.transactions ?? new i(), this._id = this._transactions.create(), this._ownTransactions = !s.transactions, this._emitter = new e(this, this._transactions), this._runtime = s.runtime ?? new $e("Workbook Runtime", {
|
|
2118
2140
|
isDate1904: () => this._isDate1904,
|
|
2119
2141
|
getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
|
|
2120
|
-
getLocale: () => this._locale ??
|
|
2142
|
+
getLocale: () => this._locale ?? Ee() ?? ut(),
|
|
2121
2143
|
getLocaleOverrides: () => this._localeOverrides
|
|
2122
|
-
}), this._listenerLanguage =
|
|
2144
|
+
}), this._listenerLanguage = hs.addChangeListener(() => {
|
|
2123
2145
|
this._closed || this._notifyAllChange();
|
|
2124
2146
|
});
|
|
2125
|
-
const n = this, a = this._beginCommit({ description:
|
|
2147
|
+
const n = this, a = this._beginCommit({ description: bs(o ? "op.openWorkbook" : "op.newWorkbook") });
|
|
2126
2148
|
try {
|
|
2127
|
-
this._strings = s.strings ?? new
|
|
2149
|
+
this._strings = s.strings ?? new $(), this._ownStrings = !s.strings, this._richValues = s.richData ?? new rt(), this._resources = s.resources ?? new Q(), this._ownResources = !s.resources, this._fetch = new wr(this._resources, s.fetcher ?? new _r()), this._createSheetName = s.createSheetNameCallback ?? Br;
|
|
2128
2150
|
let e = s.createWorksheetCallback;
|
|
2129
|
-
e || (e = (e) => new
|
|
2151
|
+
e || (e = (e) => new le(e)), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, s, r, i, o, a, l) => {
|
|
2130
2152
|
let h = null;
|
|
2131
2153
|
const c = {
|
|
2132
2154
|
runtime: n._runtime,
|
|
@@ -2147,7 +2169,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2147
2169
|
h = e, n._addSheetRef({
|
|
2148
2170
|
name: s,
|
|
2149
2171
|
id: t,
|
|
2150
|
-
visibility: r ??
|
|
2172
|
+
visibility: r ?? mt.Visibility.Visible,
|
|
2151
2173
|
sheetId: o,
|
|
2152
2174
|
sheet: e
|
|
2153
2175
|
}, i);
|
|
@@ -2164,7 +2186,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2164
2186
|
},
|
|
2165
2187
|
getVisibility: () => {
|
|
2166
2188
|
const e = n._getSheetRef(h);
|
|
2167
|
-
return e ? e.visibility :
|
|
2189
|
+
return e ? e.visibility : mt.Visibility.Visible;
|
|
2168
2190
|
},
|
|
2169
2191
|
setVisibility: (e, t) => {
|
|
2170
2192
|
n._setSheetVisibility(h, e, t);
|
|
@@ -2175,10 +2197,10 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2175
2197
|
duplicate: () => n._duplicateSheet(h),
|
|
2176
2198
|
getIndex: () => {
|
|
2177
2199
|
const e = n._getSheetRef(h);
|
|
2178
|
-
return e ? n._getOffsetForId(e.id, n._getSheetRefs(
|
|
2200
|
+
return e ? n._getOffsetForId(e.id, n._getSheetRefs(mt.Visibility.VeryHidden)) : i;
|
|
2179
2201
|
},
|
|
2180
2202
|
setIndex: (e, t) => {
|
|
2181
|
-
const s = n._getSheetRef(h,
|
|
2203
|
+
const s = n._getSheetRef(h, mt.Visibility.VeryHidden);
|
|
2182
2204
|
return !!s && (n._moveSheet(s, e, t), !0);
|
|
2183
2205
|
},
|
|
2184
2206
|
setIndexCallback: (e) => {
|
|
@@ -2188,16 +2210,16 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2188
2210
|
}
|
|
2189
2211
|
};
|
|
2190
2212
|
return a && (c.json = a), void 0 !== l && (c.uid = () => l), h = e(c, s, i, r), h;
|
|
2191
|
-
}, this._namedTableSource = new
|
|
2192
|
-
getSheets: () => n._sheets ? n.getWorksheets().getItems() :
|
|
2213
|
+
}, this._namedTableSource = new ze({
|
|
2214
|
+
getSheets: () => n._sheets ? n.getWorksheets().getItems() : as.EmptyArray,
|
|
2193
2215
|
addSheetsListener: (e, t) => n.addListeners({ onSheetsChange: e }, t)
|
|
2194
|
-
}), this._names = s.names ?? new
|
|
2216
|
+
}), this._names = s.names ?? new nt({
|
|
2195
2217
|
addressToRanges: (e) => n.getRanges(e),
|
|
2196
2218
|
getCurrentScope: () => n.getSelectedWorksheet()?.getName() ?? null,
|
|
2197
2219
|
isReadOnly: () => (n._options.readonly ?? !1) || n._isStructureProtected(),
|
|
2198
2220
|
transactions: n._transactions,
|
|
2199
|
-
getSources: () => n._calculation ? [n._calculation.getNamedFormulas(), n._namedTableSource] :
|
|
2200
|
-
}), this._ownNames = !s.names, this._calculation = s.calculation ?? new
|
|
2221
|
+
getSources: () => n._calculation ? [n._calculation.getNamedFormulas(), n._namedTableSource] : as.EmptyArray
|
|
2222
|
+
}), this._ownNames = !s.names, this._calculation = s.calculation ?? new K({
|
|
2201
2223
|
runtime: n._runtime,
|
|
2202
2224
|
functions: s.functions,
|
|
2203
2225
|
json: o?.calc,
|
|
@@ -2216,19 +2238,19 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2216
2238
|
getSheetIndex: (e) => {
|
|
2217
2239
|
if (void 0 === e) {
|
|
2218
2240
|
const e = n.getSelectedSheet();
|
|
2219
|
-
return e ? this._getSheetRefs(
|
|
2241
|
+
return e ? this._getSheetRefs(mt.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
|
|
2220
2242
|
}
|
|
2221
|
-
const t = this._getSheetRefs(
|
|
2243
|
+
const t = this._getSheetRefs(mt.Visibility.VeryHidden);
|
|
2222
2244
|
e = e.toLowerCase();
|
|
2223
2245
|
const s = t.length;
|
|
2224
2246
|
for (let r = 0; r < s; r++) if (t[r].name.toLowerCase() === e) return r;
|
|
2225
2247
|
try {
|
|
2226
|
-
|
|
2227
|
-
const t = this._names.getItems(
|
|
2248
|
+
$r.address = e;
|
|
2249
|
+
const t = this._names.getItems($r);
|
|
2228
2250
|
if (!t || 0 === t.length) return -1;
|
|
2229
2251
|
let s = (t[0].getRanges?.()?.getCoords()?.[0])?.scope;
|
|
2230
2252
|
if (!s) return -1;
|
|
2231
|
-
const r = this._getSheetRefs(
|
|
2253
|
+
const r = this._getSheetRefs(mt.Visibility.VeryHidden);
|
|
2232
2254
|
s = s.toLowerCase();
|
|
2233
2255
|
const i = r.length;
|
|
2234
2256
|
for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === s) return e;
|
|
@@ -2237,7 +2259,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2237
2259
|
}
|
|
2238
2260
|
return -1;
|
|
2239
2261
|
},
|
|
2240
|
-
getSheetCount: () => n._getSheetRefs(
|
|
2262
|
+
getSheetCount: () => n._getSheetRefs(mt.Visibility.VeryHidden).length,
|
|
2241
2263
|
externalBooks: o?.externalBooks,
|
|
2242
2264
|
externalBookResolver: s.externalBookResolver,
|
|
2243
2265
|
namedCollection: n._names,
|
|
@@ -2246,13 +2268,34 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2246
2268
|
return n._resources;
|
|
2247
2269
|
},
|
|
2248
2270
|
fetch: (e, t) => n._fetch.fetch(e, t),
|
|
2271
|
+
parseText: (e, t) => (async (e, t, s) => {
|
|
2272
|
+
const r = await import("papaparse"), i = (r.default ?? r).parse(t, {
|
|
2273
|
+
delimiter: s?.delimiter ?? ",",
|
|
2274
|
+
skipEmptyLines: !1
|
|
2275
|
+
}).data;
|
|
2276
|
+
let o = i.length;
|
|
2277
|
+
const n = i[o - 1];
|
|
2278
|
+
n && 1 === n.length && "" === n[0] && o--;
|
|
2279
|
+
let a = 0;
|
|
2280
|
+
for (let e = 0; e < o; e++) i[e].length > a && (a = i[e].length);
|
|
2281
|
+
const l = new Array(o);
|
|
2282
|
+
for (let t = 0; t < o; t++) {
|
|
2283
|
+
const s = i[t], r = new Array(a);
|
|
2284
|
+
for (let t = 0; t < a; t++) {
|
|
2285
|
+
const i = s[t];
|
|
2286
|
+
r[t] = void 0 === i || "" === i ? null : dt(e, i).value;
|
|
2287
|
+
}
|
|
2288
|
+
l[t] = r;
|
|
2289
|
+
}
|
|
2290
|
+
return l;
|
|
2291
|
+
})(n._runtime, e, t),
|
|
2249
2292
|
startFunctions: () => n._startFunctions(),
|
|
2250
2293
|
transactions: n._transactions,
|
|
2251
2294
|
names: o?.names
|
|
2252
2295
|
}), this._ownCalculation = !s.calculation, this._scripts = this._createScripts(o?.modules), this._ownNames = !s.names, this._options = Object.freeze({ ...s });
|
|
2253
|
-
const t = o?.sheets?.length ? o.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" +
|
|
2296
|
+
const t = o?.sheets?.length ? o.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" + as.uuidV4()), i = (e) => {
|
|
2254
2297
|
const t = o?.sheets?.[e]?.kind;
|
|
2255
|
-
return !!t && t !==
|
|
2298
|
+
return !!t && t !== mt.Kind.Worksheet;
|
|
2256
2299
|
};
|
|
2257
2300
|
this._calculation._setSheets(t.map((e, t) => i(t) ? [
|
|
2258
2301
|
r[t],
|
|
@@ -2263,16 +2306,16 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2263
2306
|
let h = !1;
|
|
2264
2307
|
const c = (async () => {
|
|
2265
2308
|
try {
|
|
2266
|
-
if (this._ownCalculation && "none" !== l && ("full" === l || "auto" === l && !0 === o?.calc?.fullCalcOnLoad ? await this._calculation.
|
|
2309
|
+
if (this._ownCalculation && "none" !== l && ("full" === l || "auto" === l && !0 === o?.calc?.fullCalcOnLoad ? await this._calculation._calculateForLoad() : await this._calculation.start(), this._closed)) return;
|
|
2267
2310
|
await this._scripts.start();
|
|
2268
2311
|
} finally {
|
|
2269
2312
|
h = !0, this._starting = null;
|
|
2270
2313
|
}
|
|
2271
2314
|
})();
|
|
2272
|
-
h || (this._starting = c), this._starting?.catch(() => {}), o ? this._fromJSON(o, r) : (this._initState(), this._addSheet(!1, t[0], null, r[0])), this._sheets = new
|
|
2315
|
+
h || (this._starting = c), this._starting?.catch(() => {}), o ? this._fromJSON(o, r) : (this._initState(), this._addSheet(!1, t[0], null, r[0])), this._sheets = new Pr((e) => n._addSheetOptions(e), (e, t) => {
|
|
2273
2316
|
if (e) {
|
|
2274
2317
|
const s = this._getSheetRef(e, t);
|
|
2275
|
-
return s &&
|
|
2318
|
+
return s && Kr(s) ? [s.sheet] : as.EmptyArray;
|
|
2276
2319
|
}
|
|
2277
2320
|
return this._getWorksheets(t);
|
|
2278
2321
|
}, (e, t) => {
|
|
@@ -2295,13 +2338,13 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2295
2338
|
let e = this._getSheetRefs();
|
|
2296
2339
|
for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
|
|
2297
2340
|
const t = this._options;
|
|
2298
|
-
this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new
|
|
2341
|
+
this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new st().getDefaultTheme(), this._styles = t?.styles ?? new It(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new Ir()), this._listenerProtection?.(), this._protection = new Or(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
|
|
2299
2342
|
s._emitter.notify("onProtectionChange");
|
|
2300
2343
|
} });
|
|
2301
2344
|
const s = this;
|
|
2302
2345
|
this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
|
|
2303
2346
|
async onAfterStateChange(e, t, r, i, o) {
|
|
2304
|
-
const n = s._view, a = o?.[
|
|
2347
|
+
const n = s._view, a = o?.[zr], l = r ? a?.before : a?.after, h = a?.viewId === n.getId() && null != l, c = h ? l : n.getActiveSheetId(), u = h && t.getId() === s._lastTransactionUUID ? s._getSheetRef({ id: c }) : null;
|
|
2305
2348
|
u ? await u.sheet.select() : s._resyncActiveSheet(c, e), s._lastTransactionUUID = t.getId(), (r || i) && s._emitter.notify("onSheetsChange"), s._emitter.notify("onSelectedSheetChange"), s._emitter.notify("onViewChange");
|
|
2306
2349
|
},
|
|
2307
2350
|
onRestoreOrRevert() {
|
|
@@ -2356,8 +2399,8 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2356
2399
|
return this._view;
|
|
2357
2400
|
}
|
|
2358
2401
|
setView(e) {
|
|
2359
|
-
if (this._closed) throw new Error(
|
|
2360
|
-
if (!e) throw new
|
|
2402
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2403
|
+
if (!e) throw new cs(Ss("error.sheet.emptyView"));
|
|
2361
2404
|
this._listenerWorkbookView?.();
|
|
2362
2405
|
const t = this;
|
|
2363
2406
|
let s = -1;
|
|
@@ -2370,7 +2413,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2370
2413
|
return this._runtime;
|
|
2371
2414
|
}
|
|
2372
2415
|
setDate1904(e) {
|
|
2373
|
-
if (this._closed) throw new Error(
|
|
2416
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2374
2417
|
return this._isDate1904 === e || (this._isDate1904 = e, this._emitter.notify("onRegionalChange")), this;
|
|
2375
2418
|
}
|
|
2376
2419
|
getLocale() {
|
|
@@ -2380,11 +2423,11 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2380
2423
|
return this._locale;
|
|
2381
2424
|
}
|
|
2382
2425
|
setLocale(e) {
|
|
2383
|
-
if (this._closed) throw new Error(
|
|
2426
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2384
2427
|
if (e) try {
|
|
2385
2428
|
new Intl.Locale(e);
|
|
2386
2429
|
} catch {
|
|
2387
|
-
throw new Error(
|
|
2430
|
+
throw new Error(Ss("error.workbook.invalidLocale", { locale: e }));
|
|
2388
2431
|
}
|
|
2389
2432
|
return this._locale === e || (this._locale = e, this._emitter.notify("onRegionalChange")), this;
|
|
2390
2433
|
}
|
|
@@ -2392,7 +2435,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2392
2435
|
return this._localeOverrides;
|
|
2393
2436
|
}
|
|
2394
2437
|
setLocaleOverrides(e) {
|
|
2395
|
-
if (this._closed) throw new Error(
|
|
2438
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2396
2439
|
const t = e && Object.keys(e).length > 0 ? e : null;
|
|
2397
2440
|
return this._localeOverrides = t, this._emitter.notify("onRegionalChange"), this;
|
|
2398
2441
|
}
|
|
@@ -2412,10 +2455,10 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2412
2455
|
return this._transactions;
|
|
2413
2456
|
}
|
|
2414
2457
|
getChanges(e) {
|
|
2415
|
-
const t = this._transactions, [s, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], o = this.getWorksheets().getItems({ visibility:
|
|
2458
|
+
const t = this._transactions, [s, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], o = this.getWorksheets().getItems({ visibility: mt.Visibility.VeryHidden });
|
|
2416
2459
|
for (let e = 0; e < o.length; e++) {
|
|
2417
2460
|
const t = o[e];
|
|
2418
|
-
t instanceof
|
|
2461
|
+
t instanceof le && i.push(...t._changeEventsOf(s, r ?? null));
|
|
2419
2462
|
}
|
|
2420
2463
|
return i;
|
|
2421
2464
|
}
|
|
@@ -2429,7 +2472,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2429
2472
|
return this._updateLinks;
|
|
2430
2473
|
}
|
|
2431
2474
|
setUpdateLinks(e) {
|
|
2432
|
-
if (this._closed) throw new Error(
|
|
2475
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2433
2476
|
return this._updateLinks = e, this;
|
|
2434
2477
|
}
|
|
2435
2478
|
getPivotTables() {
|
|
@@ -2445,8 +2488,8 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2445
2488
|
return this._theme;
|
|
2446
2489
|
}
|
|
2447
2490
|
setTheme(e) {
|
|
2448
|
-
if (this._closed) throw new Error(
|
|
2449
|
-
if (!e) throw new
|
|
2491
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2492
|
+
if (!e) throw new cs(Ss("error.workbook.notSetValue"));
|
|
2450
2493
|
const t = this._theme;
|
|
2451
2494
|
return this._theme = e, this.getStyles().setTheme(e), this._emitter.notify("onThemeChange"), t;
|
|
2452
2495
|
}
|
|
@@ -2459,7 +2502,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2459
2502
|
}
|
|
2460
2503
|
getSelectedWorksheet() {
|
|
2461
2504
|
const e = this._getSheetRef(this.getSelectedSheetIndex());
|
|
2462
|
-
return e &&
|
|
2505
|
+
return e && Kr(e) ? e.sheet : null;
|
|
2463
2506
|
}
|
|
2464
2507
|
getActiveSheet() {
|
|
2465
2508
|
return this.getSelectedWorksheet();
|
|
@@ -2468,30 +2511,30 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2468
2511
|
return this.getSelectedWorksheet();
|
|
2469
2512
|
}
|
|
2470
2513
|
getSheets(e) {
|
|
2471
|
-
const t = this._getSheetRefs(e?.visibility ??
|
|
2514
|
+
const t = this._getSheetRefs(e?.visibility ?? mt.Visibility.Visible), s = new Array(t.length);
|
|
2472
2515
|
for (let e = 0; e < t.length; e++) s[e] = t[e].sheet;
|
|
2473
2516
|
return s;
|
|
2474
2517
|
}
|
|
2475
2518
|
getSheet(e) {
|
|
2476
2519
|
if (void 0 === e) return this.getSelectedSheet();
|
|
2477
|
-
if (!e) throw new Error(
|
|
2520
|
+
if (!e) throw new Error(Ss("error.workbook.sheetNameNotProvided"));
|
|
2478
2521
|
const t = this._getSheetRef(e);
|
|
2479
|
-
if (!t) throw new
|
|
2522
|
+
if (!t) throw new fs(Ar(e));
|
|
2480
2523
|
return t.sheet;
|
|
2481
2524
|
}
|
|
2482
|
-
getWorksheet(e, t =
|
|
2525
|
+
getWorksheet(e, t = mt.Visibility.Visible) {
|
|
2483
2526
|
if ("number" == typeof e) return this.getWorksheetAt(e, t);
|
|
2484
2527
|
if (void 0 === e) return this._requireSelectedWorksheet();
|
|
2485
|
-
if (!e) throw new Error(
|
|
2528
|
+
if (!e) throw new Error(Ss("error.workbook.sheetNameNotProvided"));
|
|
2486
2529
|
const s = this._getSheetRef(e, t);
|
|
2487
|
-
if (!s) throw new
|
|
2488
|
-
if (!
|
|
2530
|
+
if (!s) throw new fs(Ar(e));
|
|
2531
|
+
if (!Kr(s)) throw new fs(Vr(s.name, s.sheet.getKind()));
|
|
2489
2532
|
return s.sheet;
|
|
2490
2533
|
}
|
|
2491
|
-
getWorksheetAt(e, t =
|
|
2534
|
+
getWorksheetAt(e, t = mt.Visibility.Visible) {
|
|
2492
2535
|
const s = this._getWorksheets(t)[e];
|
|
2493
|
-
if (!s) throw new
|
|
2494
|
-
return
|
|
2536
|
+
if (!s) throw new fs(function(e) {
|
|
2537
|
+
return Ss("error.workbook.sheetIndexNotFound", { index: e });
|
|
2495
2538
|
}(e));
|
|
2496
2539
|
return s;
|
|
2497
2540
|
}
|
|
@@ -2499,10 +2542,10 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2499
2542
|
const e = this.getSelectedWorksheet();
|
|
2500
2543
|
if (e) return e;
|
|
2501
2544
|
const t = this.getSelectedSheet();
|
|
2502
|
-
throw new
|
|
2545
|
+
throw new cs(Tr(t?.getName() ?? "", t?.getKind() ?? mt.Kind.Worksheet));
|
|
2503
2546
|
}
|
|
2504
2547
|
_anchorWorksheet() {
|
|
2505
|
-
return this.getSelectedWorksheet() || (this._getWorksheets(
|
|
2548
|
+
return this.getSelectedWorksheet() || (this._getWorksheets(mt.Visibility.VeryHidden)[0] ?? null);
|
|
2506
2549
|
}
|
|
2507
2550
|
getWorksheets() {
|
|
2508
2551
|
return this._sheets;
|
|
@@ -2510,35 +2553,35 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2510
2553
|
addWorksheet(e) {
|
|
2511
2554
|
return this.getWorksheets().add(e);
|
|
2512
2555
|
}
|
|
2513
|
-
_getWorksheets(e =
|
|
2556
|
+
_getWorksheets(e = mt.Visibility.Visible) {
|
|
2514
2557
|
const t = this._getSheetRefs(e), s = [], r = t.length;
|
|
2515
2558
|
for (let e = 0; e < r; e++) {
|
|
2516
2559
|
const r = t[e];
|
|
2517
|
-
|
|
2560
|
+
Kr(r) && s.push(r.sheet);
|
|
2518
2561
|
}
|
|
2519
2562
|
return s;
|
|
2520
2563
|
}
|
|
2521
|
-
_getSheetRefs(e =
|
|
2564
|
+
_getSheetRefs(e = mt.Visibility.Visible) {
|
|
2522
2565
|
const t = this._getState();
|
|
2523
|
-
return t ? e ===
|
|
2566
|
+
return t ? e === mt.Visibility.Visible ? t.sheetRefsVisible : e === mt.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === mt.Visibility.VeryHidden ? t.sheetRefsAll : as.EmptyArray : [];
|
|
2524
2567
|
}
|
|
2525
|
-
_getSheetRef(e, t =
|
|
2568
|
+
_getSheetRef(e, t = mt.Visibility.Visible) {
|
|
2526
2569
|
let s = null;
|
|
2527
2570
|
return "number" == typeof e ? this._getSheetRefs(t)[e] : ("string" == typeof e ? s = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : !0 === e?.isISheet ? s = this._getState().refsByInstance.get(e) : void 0 !== e?.id && (s = this._getState().refsById.get(e.id)), s);
|
|
2528
2571
|
}
|
|
2529
2572
|
_validateNewSheetName(e, t = !0) {
|
|
2530
2573
|
if (null == e) return e;
|
|
2531
|
-
if (
|
|
2574
|
+
if (Mr(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new cs(Ss("error.workbook.nameTaken"));
|
|
2532
2575
|
return e.substring(0, 31);
|
|
2533
2576
|
}
|
|
2534
2577
|
findValidSheetName(e) {
|
|
2535
|
-
e && (e =
|
|
2578
|
+
e && (e = Mr(e, !0));
|
|
2536
2579
|
try {
|
|
2537
2580
|
return function(e, t) {
|
|
2538
2581
|
try {
|
|
2539
2582
|
if (t(e)) return e;
|
|
2540
2583
|
} catch (e) {}
|
|
2541
|
-
let s, r, i =
|
|
2584
|
+
let s, r, i = Wr.exec(e);
|
|
2542
2585
|
for (null !== i ? (s = e.substring(0, i.index), r = parseFloat(i[1])) : (s = e + " ", r = 1); r < 256;) {
|
|
2543
2586
|
r++;
|
|
2544
2587
|
const e = "(" + r + ")", i = s.substring(0, 31 - e.length) + e;
|
|
@@ -2553,25 +2596,25 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2553
2596
|
}
|
|
2554
2597
|
}
|
|
2555
2598
|
isValidSheetNameCharacter(e) {
|
|
2556
|
-
return !
|
|
2599
|
+
return !Fr.test(e);
|
|
2557
2600
|
}
|
|
2558
2601
|
_isStructureProtected() {
|
|
2559
2602
|
return !this._initializing && !this.getProtection().isStructureAllowed();
|
|
2560
2603
|
}
|
|
2561
2604
|
_addSheetOptions(e) {
|
|
2562
|
-
if (this._closed) throw new Error(
|
|
2563
|
-
if (!this.getProtection().isStructureAllowed()) throw new
|
|
2605
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2606
|
+
if (!this.getProtection().isStructureAllowed()) throw new ws(Ss("error.workbook.protection"));
|
|
2564
2607
|
let t, s = null;
|
|
2565
2608
|
t = "string" == typeof e ? { name: e } : "number" == typeof e ? { index: e } : e, t = {
|
|
2566
2609
|
...t,
|
|
2567
|
-
description: t?.description ??
|
|
2610
|
+
description: t?.description ?? bs("op.addSheet")
|
|
2568
2611
|
};
|
|
2569
2612
|
const r = this.beginCommit(t);
|
|
2570
2613
|
try {
|
|
2571
2614
|
const e = t?.autoSelect ?? !1;
|
|
2572
2615
|
s = this._addSheet(!0, t.name, t.index ?? null);
|
|
2573
2616
|
const i = this.getView().getActiveSheetId();
|
|
2574
|
-
if (e && this._recordActiveSheet(r, i, this._getSheetRef(s).id), r.commit({ description:
|
|
2617
|
+
if (e && this._recordActiveSheet(r, i, this._getSheetRef(s).id), r.commit({ description: Ss("op.addSheetNamed", { name: s.getName() }) }), !1 !== e) {
|
|
2575
2618
|
const t = "boolean" == typeof e ? void 0 : e;
|
|
2576
2619
|
s.select(t);
|
|
2577
2620
|
}
|
|
@@ -2583,8 +2626,8 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2583
2626
|
_nextSheetName(e = null) {
|
|
2584
2627
|
let t = e ? e.toLowerCase() : null;
|
|
2585
2628
|
const s = this._getState(), r = s.sheetsByLowerCaseName;
|
|
2586
|
-
if (e && r.has(t)) throw new
|
|
2587
|
-
return
|
|
2629
|
+
if (e && r.has(t)) throw new cs(function(e) {
|
|
2630
|
+
return Ss("error.workbook.nameDuplicate", { sheetName: e });
|
|
2588
2631
|
}(e));
|
|
2589
2632
|
t = (e = this._validateNewSheetName(e)) ? e.toLowerCase() : null;
|
|
2590
2633
|
let i = s.lastId + 1;
|
|
@@ -2596,16 +2639,16 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2596
2639
|
}
|
|
2597
2640
|
_addSheet(e, t = null, s = null, r) {
|
|
2598
2641
|
t = this._nextSheetName(t);
|
|
2599
|
-
const i = this._getState(), o = this._createSheet(i.lastId, t,
|
|
2600
|
-
if (!o) throw new
|
|
2642
|
+
const i = this._getState(), o = this._createSheet(i.lastId, t, mt.Visibility.Visible, s, void 0, null, r);
|
|
2643
|
+
if (!o) throw new cs(Ss("error.workbook.sheetNameBlank"));
|
|
2601
2644
|
return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), o;
|
|
2602
2645
|
}
|
|
2603
2646
|
_createOpaqueSheet(e, t, s, r, i, o, n, a, l) {
|
|
2604
2647
|
const h = this;
|
|
2605
2648
|
let c = null;
|
|
2606
|
-
return c = new
|
|
2649
|
+
return c = new kr({
|
|
2607
2650
|
kind: o,
|
|
2608
|
-
id: l ?? t + "-" +
|
|
2651
|
+
id: l ?? t + "-" + as.uuidV4(),
|
|
2609
2652
|
part: n,
|
|
2610
2653
|
tabColor: a,
|
|
2611
2654
|
styles: this._styles,
|
|
@@ -2616,25 +2659,25 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2616
2659
|
setName: (e, t) => {
|
|
2617
2660
|
h._setSheetName(c, e, t);
|
|
2618
2661
|
},
|
|
2619
|
-
getVisibility: () => h._getSheetRef(c,
|
|
2662
|
+
getVisibility: () => h._getSheetRef(c, mt.Visibility.VeryHidden)?.visibility ?? mt.Visibility.Visible,
|
|
2620
2663
|
setVisibility: (e, t) => {
|
|
2621
2664
|
h._setSheetVisibility(c, e, t);
|
|
2622
2665
|
},
|
|
2623
2666
|
getIndex: () => {
|
|
2624
|
-
const e = h._getSheetRef(c,
|
|
2625
|
-
return e ? h._getOffsetForId(e.id, h._getSheetRefs(
|
|
2667
|
+
const e = h._getSheetRef(c, mt.Visibility.VeryHidden);
|
|
2668
|
+
return e ? h._getOffsetForId(e.id, h._getSheetRefs(mt.Visibility.VeryHidden)) : -1;
|
|
2626
2669
|
},
|
|
2627
2670
|
setIndex: (e, t) => {
|
|
2628
|
-
const s = h._getSheetRef(c,
|
|
2671
|
+
const s = h._getSheetRef(c, mt.Visibility.VeryHidden);
|
|
2629
2672
|
s && h._moveSheet(s, e, t);
|
|
2630
2673
|
},
|
|
2631
2674
|
requestSelect: () => h._requestSelect(c),
|
|
2632
|
-
isAttached: () => !!h._getSheetRef(c,
|
|
2675
|
+
isAttached: () => !!h._getSheetRef(c, mt.Visibility.VeryHidden)
|
|
2633
2676
|
}
|
|
2634
2677
|
}), this._sheetOnNameChange.set(e, () => c._notify("onNameChange")), this._sheetOnVisibilityChange.set(e, () => c._notify("onVisibilityChange")), this._sheetOnIndexChange.set(e, () => c._notify("onIndexChange")), this._addSheetRef({
|
|
2635
2678
|
name: t,
|
|
2636
2679
|
id: e,
|
|
2637
|
-
visibility: s ??
|
|
2680
|
+
visibility: s ?? mt.Visibility.Visible,
|
|
2638
2681
|
sheetId: i,
|
|
2639
2682
|
sheet: c
|
|
2640
2683
|
}, r), c;
|
|
@@ -2647,10 +2690,10 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2647
2690
|
}), this.getSelectedSheet() === e;
|
|
2648
2691
|
}
|
|
2649
2692
|
_updateSheetRefStates(e) {
|
|
2650
|
-
if (this._closed) throw new Error(
|
|
2651
|
-
if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new
|
|
2693
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2694
|
+
if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new ws(Ss("error.workbook.protection"));
|
|
2652
2695
|
const t = e, s = [], r = [], i = t.length;
|
|
2653
|
-
for (let e = 0; e < i; e++) t[e].visibility ===
|
|
2696
|
+
for (let e = 0; e < i; e++) t[e].visibility === mt.Visibility.Visible ? (s.push(t[e]), r.push(t[e])) : t[e].visibility === mt.Visibility.Hidden && r.push(t[e]);
|
|
2654
2697
|
this._updateState({
|
|
2655
2698
|
sheetRefsAll: t,
|
|
2656
2699
|
sheetRefsVisible: s,
|
|
@@ -2660,7 +2703,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2660
2703
|
_tellSheets() {
|
|
2661
2704
|
if (this._isLoadingSheets) return;
|
|
2662
2705
|
const e = this._getState().sheetRefsAll;
|
|
2663
|
-
this._calculation._setSheets(e.map((e) =>
|
|
2706
|
+
this._calculation._setSheets(e.map((e) => Kr(e) ? [e.sheet.getId(), e.name] : [
|
|
2664
2707
|
e.sheet.getId(),
|
|
2665
2708
|
e.name,
|
|
2666
2709
|
!0
|
|
@@ -2692,9 +2735,9 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2692
2735
|
g._validateDeleteSheet(e);
|
|
2693
2736
|
},
|
|
2694
2737
|
onDelete(e) {
|
|
2695
|
-
let t = g._getSheetRef(e,
|
|
2738
|
+
let t = g._getSheetRef(e, mt.Visibility.VeryHidden);
|
|
2696
2739
|
if (!t) return;
|
|
2697
|
-
const s = g._beginCommit({ description:
|
|
2740
|
+
const s = g._beginCommit({ description: Ss("op.deleteSheet", { name: t.name }) });
|
|
2698
2741
|
try {
|
|
2699
2742
|
const r = g._getState(), i = r.sheetRefsAll, o = g._getOffsetForId(t.id, i);
|
|
2700
2743
|
let a = [...i];
|
|
@@ -2725,7 +2768,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2725
2768
|
throw s.rollback(), e;
|
|
2726
2769
|
}
|
|
2727
2770
|
}
|
|
2728
|
-
}, { transactional: !0 }), r =
|
|
2771
|
+
}, { transactional: !0 }), r = Kr(e) ? e.sheet.addListeners({ onSelectionChange: (e) => {
|
|
2729
2772
|
g.getView().getActiveSheetId() === g._getSheetRef(e)?.id && g._emitter.notify("onSelectionChange", {
|
|
2730
2773
|
source: g,
|
|
2731
2774
|
params: e
|
|
@@ -2749,7 +2792,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2749
2792
|
}
|
|
2750
2793
|
_recordActiveSheet(e, t, s) {
|
|
2751
2794
|
const r = this.getView().getId();
|
|
2752
|
-
e.setIntent(
|
|
2795
|
+
e.setIntent(zr, (e) => ({
|
|
2753
2796
|
viewId: r,
|
|
2754
2797
|
before: e?.before ?? t,
|
|
2755
2798
|
after: s
|
|
@@ -2781,27 +2824,27 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2781
2824
|
let s = this._view.getActiveSheetId();
|
|
2782
2825
|
null == s && (this._view.setActiveSheetId(t), s = t);
|
|
2783
2826
|
let r = e.refsById.get(s);
|
|
2784
|
-
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility ===
|
|
2827
|
+
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility === mt.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(s, e.sheetRefsVisible));
|
|
2785
2828
|
}
|
|
2786
2829
|
_validateDeleteSheet(e) {
|
|
2787
|
-
if (this._closed) throw new Error(
|
|
2788
|
-
if (!this.getProtection().isStructureAllowed()) throw new
|
|
2830
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2831
|
+
if (!this.getProtection().isStructureAllowed()) throw new ws(Ss("error.workbook.protection"));
|
|
2789
2832
|
let t = this._getSheetRef(e);
|
|
2790
|
-
if (!t) throw new
|
|
2791
|
-
return
|
|
2833
|
+
if (!t) throw new cs(function(e) {
|
|
2834
|
+
return Ss("error.workbook.deleteKey", { key: e });
|
|
2792
2835
|
}(e));
|
|
2793
2836
|
const s = this._getState().sheetRefsVisible;
|
|
2794
|
-
if (1 === s.length && s[0].id === t.id) throw new
|
|
2837
|
+
if (1 === s.length && s[0].id === t.id) throw new cs(Ss("error.workbook.sheetOne"));
|
|
2795
2838
|
}
|
|
2796
2839
|
_getOffsetForId(e, t) {
|
|
2797
2840
|
const s = t.length;
|
|
2798
2841
|
for (let r = 0; r < s; r++) if (t[r].id === e) return r;
|
|
2799
|
-
throw new
|
|
2842
|
+
throw new cs(Ss("error.workbook.noVisibleRefs"));
|
|
2800
2843
|
}
|
|
2801
2844
|
find(e) {
|
|
2802
|
-
if (this._closed) throw new Error(
|
|
2845
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2803
2846
|
const t = this._getWorksheets();
|
|
2804
|
-
if (0 === t.length) return { next: () =>
|
|
2847
|
+
if (0 === t.length) return { next: () => at };
|
|
2805
2848
|
if (1 === t.length) return t[0].find(e);
|
|
2806
2849
|
"string" == typeof e && (e = { text: e });
|
|
2807
2850
|
const s = !e?.reverse;
|
|
@@ -2820,7 +2863,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2820
2863
|
rowIndex: t[0].rowStart
|
|
2821
2864
|
};
|
|
2822
2865
|
}
|
|
2823
|
-
const d =
|
|
2866
|
+
const d = ls.createCellComparator(e?.axis, e?.reverse);
|
|
2824
2867
|
delete (e = { ...e }).from;
|
|
2825
2868
|
const g = () => {
|
|
2826
2869
|
if (!u && c.done && (a && o === i ? u = !0 : s ? (o++, o > t.length - 1 && (o = 0, a = !0)) : (o--, o < 0 && (o = t.length - 1, a = !0)), r && a && (u = !0), u || l || !a || o !== i || (u = !0), !u)) {
|
|
@@ -2830,7 +2873,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2830
2873
|
}
|
|
2831
2874
|
if (!u && a && o === i && (c.done || !l || !c.done && d(c.value.getCoords(), l) >= 0) && (u = !0), u) {
|
|
2832
2875
|
const e = c;
|
|
2833
|
-
return c =
|
|
2876
|
+
return c = at, e;
|
|
2834
2877
|
}
|
|
2835
2878
|
const g = c;
|
|
2836
2879
|
return c = h.next(), g;
|
|
@@ -2845,8 +2888,8 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2845
2888
|
let r = 0, i = null;
|
|
2846
2889
|
const o = "function" == typeof t, n = s?.maxCount ?? Number.MAX_SAFE_INTEGER, a = !s?.maxCount;
|
|
2847
2890
|
let l = "";
|
|
2848
|
-
const h = "string" == typeof t ?
|
|
2849
|
-
let c = s?.description ??
|
|
2891
|
+
const h = "string" == typeof t ? Be(t) : null;
|
|
2892
|
+
let c = s?.description ?? bs("op.replace");
|
|
2850
2893
|
const u = this._transactions.beginCommit({ description: c });
|
|
2851
2894
|
try {
|
|
2852
2895
|
let c = null, d = null, g = e.next();
|
|
@@ -2859,10 +2902,10 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2859
2902
|
const l = o ? t(n) : t;
|
|
2860
2903
|
void 0 !== l && l !== n && (d.push(n, l), r++, i = n), g = e.next();
|
|
2861
2904
|
}
|
|
2862
|
-
d?.apply(), 1 === r && 1 === n && i && (l = i.getAddress()), 0 === r ? u.rollback() : u.commit({ description: s?.description ?? (a ? null !== h ?
|
|
2905
|
+
d?.apply(), 1 === r && 1 === n && i && (l = i.getAddress()), 0 === r ? u.rollback() : u.commit({ description: s?.description ?? (a ? null !== h ? Ss("op.replaceAllWith", { value: h }) : bs("op.replaceAll") : l ? null !== h ? Ss("op.replaceAtWith", {
|
|
2863
2906
|
address: l,
|
|
2864
2907
|
value: h
|
|
2865
|
-
}) :
|
|
2908
|
+
}) : Ss("op.replaceAt", { address: l }) : null !== h ? Ss("op.replaceWith", { value: h }) : bs("op.replace")) });
|
|
2866
2909
|
} catch (e) {
|
|
2867
2910
|
throw u.rollback(), e;
|
|
2868
2911
|
}
|
|
@@ -2883,36 +2926,36 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2883
2926
|
const s = this._getSheetRefs(), r = s.length;
|
|
2884
2927
|
for (let i = 0; i < r; i++) {
|
|
2885
2928
|
const o = s[(e + i) % r];
|
|
2886
|
-
if (!
|
|
2929
|
+
if (!Kr(o)) continue;
|
|
2887
2930
|
const n = t.indexOf(o.sheet);
|
|
2888
2931
|
if (-1 !== n) return n;
|
|
2889
2932
|
}
|
|
2890
2933
|
return 0;
|
|
2891
2934
|
}
|
|
2892
2935
|
getNextSheet(e) {
|
|
2893
|
-
if (this._closed) throw new Error(
|
|
2936
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2894
2937
|
const t = this._getSheetRefs();
|
|
2895
2938
|
return t[this._nextSheetIndex(e, t)]?.sheet ?? null;
|
|
2896
2939
|
}
|
|
2897
2940
|
getPreviousSheet(e) {
|
|
2898
|
-
if (this._closed) throw new Error(
|
|
2941
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2899
2942
|
const t = this._getSheetRefs();
|
|
2900
2943
|
return t[this._prevSheetIndex(e, t)]?.sheet ?? null;
|
|
2901
2944
|
}
|
|
2902
2945
|
async _duplicateSheet(e) {
|
|
2903
|
-
if (this._closed) throw new Error(
|
|
2904
|
-
if (!this.getProtection().isStructureAllowed()) throw new
|
|
2946
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
2947
|
+
if (!this.getProtection().isStructureAllowed()) throw new ws(Ss("error.workbook.protection"));
|
|
2905
2948
|
const t = this._getSheetRefs(), s = this.getSelectedSheetIndex();
|
|
2906
2949
|
let r = null;
|
|
2907
2950
|
if (e) {
|
|
2908
|
-
if (r = this._getSheetRef(e), !r) throw new
|
|
2951
|
+
if (r = this._getSheetRef(e), !r) throw new cs(Lr(r));
|
|
2909
2952
|
} else r = t[s];
|
|
2910
2953
|
if (!r) return null;
|
|
2911
|
-
if (!
|
|
2954
|
+
if (!Kr(r)) throw new cs((i = r.name, Ss("error.workbook.sheetNotDuplicable", { sheetName: i })));
|
|
2912
2955
|
var i;
|
|
2913
2956
|
const o = r.sheet, n = this._strings.beginPersist(), a = this.getResources().beginPersist(), l = this.getStyles().beginPersist(), h = this._richValues.beginPersist();
|
|
2914
2957
|
let c = null;
|
|
2915
|
-
const u = this.beginCommit(
|
|
2958
|
+
const u = this.beginCommit(Ss("op.duplicateNamed", { name: o.getName() }));
|
|
2916
2959
|
try {
|
|
2917
2960
|
const e = this._getState().refsByInstance.get(o), r = await o.toJSON(), i = t.length + 1, n = this.findValidSheetName(e.name), a = this._createSheet(i, n, e.visibility, s, void 0, r);
|
|
2918
2961
|
this._tellSheets(), this._emitter.notify("onSheetsChange"), c = a, u.commit();
|
|
@@ -2924,76 +2967,77 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
2924
2967
|
return c;
|
|
2925
2968
|
}
|
|
2926
2969
|
_createRange(e, t) {
|
|
2927
|
-
const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope,
|
|
2928
|
-
if (r && !
|
|
2970
|
+
const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope, mt.Visibility.VeryHidden) : null;
|
|
2971
|
+
if (r && !Kr(r)) throw new cs(Vr(r.name, r.sheet.getKind()));
|
|
2929
2972
|
if (!r) {
|
|
2930
2973
|
const e = this._anchorWorksheet();
|
|
2931
|
-
return e ? (delete s?.scope,
|
|
2932
|
-
scope:
|
|
2974
|
+
return e ? (delete s?.scope, jr(s, s ? {
|
|
2975
|
+
scope: ye,
|
|
2933
2976
|
...e.getEntireRange().getCoords()
|
|
2934
|
-
} : null)) : void console.warn(
|
|
2977
|
+
} : null)) : void console.warn(Ss("error.workbook.noVisibleRefs"));
|
|
2935
2978
|
}
|
|
2936
2979
|
const i = r.sheet;
|
|
2937
2980
|
let o = null;
|
|
2938
|
-
return t && (o = { getOptions: t }), new
|
|
2981
|
+
return t && (o = { getOptions: t }), new Ur(e, Ie(i), this, o);
|
|
2939
2982
|
}
|
|
2940
2983
|
_createRanges(e, t) {
|
|
2941
2984
|
const s = this._anchorWorksheet();
|
|
2942
|
-
if (!s) throw new
|
|
2985
|
+
if (!s) throw new cs(Tr("", mt.Kind.Worksheet));
|
|
2943
2986
|
let r = null;
|
|
2944
|
-
return t && (r = { getOptions: t }), new
|
|
2987
|
+
return t && (r = { getOptions: t }), new Hr(e, Ie(s), this, r);
|
|
2945
2988
|
}
|
|
2946
2989
|
getRange(e, t) {
|
|
2947
2990
|
if (void 0 === e) return this.getSelectedRange(t);
|
|
2991
|
+
"number" == typeof e && (e = ve(arguments), t = void 0);
|
|
2948
2992
|
try {
|
|
2949
2993
|
const s = this._rangesAddressToCoords(e);
|
|
2950
|
-
if (1 !== s.length) throw new
|
|
2994
|
+
if (1 !== s.length) throw new cs(Ss("error.address.singleRangeOnlyAlt"));
|
|
2951
2995
|
return this._createRange(s[0], t);
|
|
2952
2996
|
} catch (t) {
|
|
2953
|
-
if (t instanceof
|
|
2954
|
-
throw new
|
|
2997
|
+
if (t instanceof fs) throw new fs(t.message);
|
|
2998
|
+
throw new cs(t.message ?? M(e));
|
|
2955
2999
|
}
|
|
2956
3000
|
}
|
|
2957
3001
|
getCell(e) {
|
|
2958
3002
|
if (void 0 === e) return this.getSelectedCell();
|
|
2959
3003
|
const t = this.getRange(e);
|
|
2960
|
-
if (t.size > 1) throw new
|
|
3004
|
+
if (t.size > 1) throw new cs(Ss("error.address.singleCellOnly"));
|
|
2961
3005
|
return t.getCell();
|
|
2962
3006
|
}
|
|
2963
3007
|
getRanges(e, t) {
|
|
2964
3008
|
const s = this._rangesAddressToCoords(e);
|
|
2965
|
-
if (0 === s.length) throw new
|
|
3009
|
+
if (0 === s.length) throw new cs(M(e));
|
|
2966
3010
|
return this._createRanges(s, t);
|
|
2967
3011
|
}
|
|
2968
3012
|
_createGraphRanges(e, t) {
|
|
2969
3013
|
const s = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
|
|
2970
3014
|
for (let e = 0; e < t.length; e++) {
|
|
2971
|
-
const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName,
|
|
2972
|
-
n && s.push(new
|
|
3015
|
+
const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName, mt.Visibility.VeryHidden) : null, n = o && Kr(o) ? o.sheet : this._anchorWorksheet();
|
|
3016
|
+
n && s.push(new ee(i, r, Ie(n), null));
|
|
2973
3017
|
}
|
|
2974
3018
|
for (let t = 0; t < e.length; t++) s.push(e[t]);
|
|
2975
3019
|
const i = this._anchorWorksheet();
|
|
2976
|
-
return 0 !== s.length && i ? new
|
|
3020
|
+
return 0 !== s.length && i ? new Hr(s, Ie(i), this, null) : null;
|
|
2977
3021
|
}
|
|
2978
3022
|
getAnomalies(e) {
|
|
2979
|
-
if (this._closed) throw new Error(
|
|
2980
|
-
const t =
|
|
2981
|
-
const t =
|
|
3023
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3024
|
+
const t = D(e), s = this._getWorksheets(mt.Visibility.VeryHidden).map((e) => {
|
|
3025
|
+
const t = Ie(e);
|
|
2982
3026
|
return {
|
|
2983
3027
|
bounds: t.getSheet().getEntireCoords(),
|
|
2984
3028
|
internal: t,
|
|
2985
3029
|
qualified: !0
|
|
2986
3030
|
};
|
|
2987
3031
|
});
|
|
2988
|
-
return new
|
|
3032
|
+
return new T(s, () => (this.getSelectedWorksheet() ?? this._getWorksheets(mt.Visibility.VeryHidden)[0]).getEntireRange(), t);
|
|
2989
3033
|
}
|
|
2990
3034
|
getStats(e) {
|
|
2991
|
-
if (this._closed) throw new Error(
|
|
2992
|
-
const t = this._getWorksheets(
|
|
3035
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3036
|
+
const t = this._getWorksheets(mt.Visibility.VeryHidden), s = t.length;
|
|
2993
3037
|
if (1 === s) return t[0].getStats(e);
|
|
2994
3038
|
const r = new Array(s);
|
|
2995
3039
|
for (let i = 0; i < s; i++) r[i] = t[i].getStats(e);
|
|
2996
|
-
return new
|
|
3040
|
+
return new rr(r);
|
|
2997
3041
|
}
|
|
2998
3042
|
_activeRangeCoords() {
|
|
2999
3043
|
const e = this._requireSelectedWorksheet(), t = e.getSelection().getRanges().getCoords(), s = e.getName(), r = t.length, i = new Array(r);
|
|
@@ -3018,8 +3062,8 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3018
3062
|
getSelectedCell() {
|
|
3019
3063
|
return this._requireSelectedWorksheet().getSelectedCell();
|
|
3020
3064
|
}
|
|
3021
|
-
_rangesAddressToCoords(e, t = !0, s =
|
|
3022
|
-
if (!e) throw new
|
|
3065
|
+
_rangesAddressToCoords(e, t = !0, s = mt.Visibility.Hidden) {
|
|
3066
|
+
if (!e) throw new cs(Ss("error.address.noAddress"));
|
|
3023
3067
|
const r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, o = r?.getName();
|
|
3024
3068
|
if (o && (i.scope = o), "string" == typeof e) {
|
|
3025
3069
|
const t = e.trim().toLowerCase();
|
|
@@ -3028,30 +3072,30 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3028
3072
|
"r" === t ? r.rowStart = r.rowEnd = s.rowIndex : r.colStart = r.colEnd = s.colIndex, e = r;
|
|
3029
3073
|
}
|
|
3030
3074
|
}
|
|
3031
|
-
const
|
|
3075
|
+
const n = this, a = Re(e, i, et, (e) => {
|
|
3032
3076
|
if (!t) return null;
|
|
3033
3077
|
if ("string" == typeof e) {
|
|
3034
|
-
const t =
|
|
3035
|
-
getTable: (e) => n
|
|
3078
|
+
const t = z(e, {
|
|
3079
|
+
getTable: (e) => Me(n.getNames().getByName(e)),
|
|
3036
3080
|
getAnchor: () => r ? {
|
|
3037
3081
|
sheet: r,
|
|
3038
3082
|
coords: r.getSelectedCell().getCoords()
|
|
3039
3083
|
} : null
|
|
3040
3084
|
});
|
|
3041
3085
|
if (t) return [t];
|
|
3042
|
-
const s =
|
|
3086
|
+
const s = n.getNames().getByName(e)?.getRanges?.();
|
|
3043
3087
|
if (s) return s.getCoords();
|
|
3044
3088
|
}
|
|
3045
|
-
throw new
|
|
3046
|
-
}),
|
|
3047
|
-
for (let e = 0; e <
|
|
3048
|
-
return
|
|
3089
|
+
throw new cs(`Invalid sheet reference '${e}'.`);
|
|
3090
|
+
}), l = a.length;
|
|
3091
|
+
for (let e = 0; e < l; e++) this._validateCoords(a[e], s);
|
|
3092
|
+
return a;
|
|
3049
3093
|
}
|
|
3050
|
-
_validateCoords(e, t =
|
|
3094
|
+
_validateCoords(e, t = mt.Visibility.Visible, s = Ss("error.sheet.oobRange")) {
|
|
3051
3095
|
if (null === e) return;
|
|
3052
3096
|
const r = this.getWorksheet(e.scope ?? void 0, t).getEntireRange().getCoords();
|
|
3053
|
-
if (!
|
|
3054
|
-
if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new
|
|
3097
|
+
if (!ls.isRangeWithinRange(e, r)) throw new fs(s);
|
|
3098
|
+
if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new cs(Ss("error.address.invalidRangeInverted"));
|
|
3055
3099
|
}
|
|
3056
3100
|
_updateSheetRef(e, t) {
|
|
3057
3101
|
const s = this._getState();
|
|
@@ -3073,18 +3117,18 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3073
3117
|
}), this._tellSheets(), t;
|
|
3074
3118
|
}
|
|
3075
3119
|
_setSheetName(e, t, s) {
|
|
3076
|
-
if (this._closed) throw new Error(
|
|
3077
|
-
if (!this.getProtection().isStructureAllowed()) throw new
|
|
3120
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3121
|
+
if (!this.getProtection().isStructureAllowed()) throw new ws(Ss("error.workbook.protection"));
|
|
3078
3122
|
const r = this._getSheetRef(e);
|
|
3079
|
-
if (!r) throw new
|
|
3123
|
+
if (!r) throw new cs(Lr(e));
|
|
3080
3124
|
if (t === r.name) return r.sheet;
|
|
3081
|
-
if (null == (t = this._validateNewSheetName(t))) throw new
|
|
3125
|
+
if (null == (t = this._validateNewSheetName(t))) throw new cs(Ss("error.workbook.sheetNameNotProvided"));
|
|
3082
3126
|
const i = Object.freeze({
|
|
3083
3127
|
...r,
|
|
3084
3128
|
name: t
|
|
3085
3129
|
});
|
|
3086
3130
|
let o = null;
|
|
3087
|
-
const n = this.beginCommit(
|
|
3131
|
+
const n = this.beginCommit(bs("op.renameSheet"));
|
|
3088
3132
|
try {
|
|
3089
3133
|
const e = this._updateSheetRef(r, i);
|
|
3090
3134
|
this._adjustSheetNamesIfRequired(), this._sheetOnNameChange.forEach((e, t) => {
|
|
@@ -3095,24 +3139,24 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3095
3139
|
}
|
|
3096
3140
|
return o;
|
|
3097
3141
|
}
|
|
3098
|
-
_setSheetVisibility(e, t =
|
|
3099
|
-
if (this._closed) throw new Error(
|
|
3100
|
-
if (!this.getProtection().isStructureAllowed()) throw new
|
|
3101
|
-
const r = this._getSheetRef(e,
|
|
3142
|
+
_setSheetVisibility(e, t = mt.Visibility.Visible, s) {
|
|
3143
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3144
|
+
if (!this.getProtection().isStructureAllowed()) throw new ws(Ss("error.workbook.protection"));
|
|
3145
|
+
const r = this._getSheetRef(e, mt.Visibility.VeryHidden);
|
|
3102
3146
|
if (!r) return null;
|
|
3103
3147
|
if (t === r.visibility) return;
|
|
3104
3148
|
let i = null, o = "";
|
|
3105
|
-
t ===
|
|
3149
|
+
t === mt.Visibility.Visible ? o = bs("op.unhideSheet") : t === mt.Visibility.Hidden ? o = bs("op.hideSheet") : t === mt.Visibility.VeryHidden && (o = bs("op.veryHideSheet"));
|
|
3106
3150
|
const n = this.beginCommit(o);
|
|
3107
3151
|
try {
|
|
3108
3152
|
const e = this._getState().sheetRefsVisible;
|
|
3109
|
-
if (t !==
|
|
3153
|
+
if (t !== mt.Visibility.Visible && 1 === e.length && e[0].id === r.id) throw new cs(Ss("error.workbook.sheetOne"));
|
|
3110
3154
|
const o = {
|
|
3111
3155
|
...r,
|
|
3112
3156
|
visibility: t
|
|
3113
3157
|
};
|
|
3114
3158
|
let a = -1;
|
|
3115
|
-
t !==
|
|
3159
|
+
t !== mt.Visibility.Visible && (a = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, o).sheet, t !== mt.Visibility.Visible && this._adjustRemoveSelectionIfRequired(a, r.id), this._adjustSheetNamesIfRequired(), n.commit(s);
|
|
3116
3160
|
} catch (e) {
|
|
3117
3161
|
throw n.rollback(), e;
|
|
3118
3162
|
}
|
|
@@ -3121,13 +3165,13 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3121
3165
|
}), this._emitter.notify("onSheetsChange"), i;
|
|
3122
3166
|
}
|
|
3123
3167
|
_moveSheet(e, t, s) {
|
|
3124
|
-
if (this._closed) throw new Error(
|
|
3125
|
-
if (!this.getProtection().isStructureAllowed()) throw new
|
|
3168
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3169
|
+
if (!this.getProtection().isStructureAllowed()) throw new ws(Ss("error.workbook.protection"));
|
|
3126
3170
|
let r = null;
|
|
3127
|
-
const i = this.beginCommit(
|
|
3171
|
+
const i = this.beginCommit(Ss("op.moveSheetNamed", { name: e.name }));
|
|
3128
3172
|
try {
|
|
3129
3173
|
const o = this._getState(), n = o.sheetRefsVisible;
|
|
3130
|
-
if (t < 0 || t > n.length - 1) throw new
|
|
3174
|
+
if (t < 0 || t > n.length - 1) throw new cs(`Invalid to index: ${t}`);
|
|
3131
3175
|
const a = this.getView().getActiveSheetId(), l = o.sheetRefsAll, h = this._getOffsetForId(e.id, l), c = this._getOffsetForId(n[t].id, l);
|
|
3132
3176
|
if (h === c) return;
|
|
3133
3177
|
const u = l[h];
|
|
@@ -3141,11 +3185,11 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3141
3185
|
return r;
|
|
3142
3186
|
}
|
|
3143
3187
|
_setSelectedSheet(e) {
|
|
3144
|
-
if (this._closed) throw new Error(
|
|
3188
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3145
3189
|
const t = this._getSheetRef(e);
|
|
3146
|
-
if (!t) throw new
|
|
3190
|
+
if (!t) throw new cs(Lr(e));
|
|
3147
3191
|
let s = null;
|
|
3148
|
-
return t.visibility !==
|
|
3192
|
+
return t.visibility !== mt.Visibility.Visible && this._setSheetVisibility(t, mt.Visibility.Visible), this._view.setActiveSheetId(t.id), s = t.sheet, s;
|
|
3149
3193
|
}
|
|
3150
3194
|
getProtection() {
|
|
3151
3195
|
return this._protection;
|
|
@@ -3163,7 +3207,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3163
3207
|
return this._calculation;
|
|
3164
3208
|
}
|
|
3165
3209
|
getFonts() {
|
|
3166
|
-
return
|
|
3210
|
+
return J.getShared();
|
|
3167
3211
|
}
|
|
3168
3212
|
createFormula(e, t, s) {
|
|
3169
3213
|
return this.getCalculation().createFormula(e, t, s);
|
|
@@ -3230,14 +3274,14 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3230
3274
|
const e = this._pivotCaches;
|
|
3231
3275
|
if (0 === e.length) return;
|
|
3232
3276
|
const t = (e) => {
|
|
3233
|
-
const t = this._getSheetRef(e), s = t &&
|
|
3277
|
+
const t = this._getSheetRef(e), s = t && Kr(t) ? t.sheet : null;
|
|
3234
3278
|
return s ? s._contentAddWatch(() => null) : null;
|
|
3235
3279
|
};
|
|
3236
3280
|
for (let s = 0; s < e.length; s++) e[s]._hold(t);
|
|
3237
3281
|
}
|
|
3238
3282
|
_fromJSON(e, t) {
|
|
3239
|
-
if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new
|
|
3240
|
-
e.theme && (this._theme = new
|
|
3283
|
+
if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new cs(Ss("error.workbook.sheetOne"));
|
|
3284
|
+
e.theme && (this._theme = new W(e.theme), this._styles.setTheme(this._theme));
|
|
3241
3285
|
const s = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist(), o = this._richValues.beginPersist();
|
|
3242
3286
|
try {
|
|
3243
3287
|
s.fromJSON(e.strings), r.fromJSON(e.resources), this._fetch.adopt(this._resources.getItems()), i.fromJSON(e.styles), o.fromJSON(e.richData, {
|
|
@@ -3250,7 +3294,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3250
3294
|
const e = r.fromResourceId.bind(r);
|
|
3251
3295
|
for (let t = 0; t < a.length; t++) {
|
|
3252
3296
|
const s = a[t];
|
|
3253
|
-
s && "number" == typeof s.cacheId && n.push(new
|
|
3297
|
+
s && "number" == typeof s.cacheId && n.push(new ar(s.cacheId, Ze.fromJSON(s.part, e)));
|
|
3254
3298
|
}
|
|
3255
3299
|
}
|
|
3256
3300
|
this._pivotCaches = n, this._people.fromJSON(e.people);
|
|
@@ -3260,22 +3304,22 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3260
3304
|
let u = null, d = null;
|
|
3261
3305
|
this._isLoadingSheets = !0;
|
|
3262
3306
|
for (let e = 0; e < h; e++) {
|
|
3263
|
-
const s = l[e], i = s.visibility ||
|
|
3264
|
-
d = o, i ===
|
|
3307
|
+
const s = l[e], i = s.visibility || mt.Visibility.Visible, o = e;
|
|
3308
|
+
d = o, i === mt.Visibility.Visible ? null === u && (u = o) : null !== c && c === o && (c = null);
|
|
3265
3309
|
try {
|
|
3266
|
-
const n = s.kind ??
|
|
3267
|
-
if (n !==
|
|
3268
|
-
const a = s.sheet, l =
|
|
3269
|
-
if (!l) throw new
|
|
3310
|
+
const n = s.kind ?? mt.Kind.Worksheet;
|
|
3311
|
+
if (n !== mt.Kind.Worksheet) {
|
|
3312
|
+
const a = s.sheet, l = Ze.fromJSON(a?.part, r.fromResourceId.bind(r));
|
|
3313
|
+
if (!l) throw new cs(Ss("error.workbook.sheetPartMissing", { sheetName: s.name }));
|
|
3270
3314
|
this._createOpaqueSheet(o, s.name, i, e, s.sheetId, n, l, a?.tabColor ?? null, t?.[e]);
|
|
3271
3315
|
} else this._createSheet(o, s.name, i, e, s.sheetId, s.sheet, t?.[e]);
|
|
3272
3316
|
} catch (e) {
|
|
3273
3317
|
throw this._isLoadingSheets = !1, e;
|
|
3274
3318
|
}
|
|
3275
3319
|
}
|
|
3276
|
-
this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: d }), e.view.activeSheetId = c ?? u, this.setView(new
|
|
3320
|
+
this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: d }), e.view.activeSheetId = c ?? u, this.setView(new Ir({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
|
|
3277
3321
|
const g = this;
|
|
3278
|
-
this._protection = new
|
|
3322
|
+
this._protection = new Or(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
|
|
3279
3323
|
g._emitter.notify("onProtectionChange", { source: e });
|
|
3280
3324
|
} }), this._emitter.notify("onLoad");
|
|
3281
3325
|
} finally {
|
|
@@ -3284,7 +3328,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3284
3328
|
}
|
|
3285
3329
|
async _startFunctions() {
|
|
3286
3330
|
const e = this._scripts;
|
|
3287
|
-
if (!e) return
|
|
3331
|
+
if (!e) return as.EmptyArray;
|
|
3288
3332
|
await e._load();
|
|
3289
3333
|
const t = [];
|
|
3290
3334
|
for (const s of e.getModules().getItems()) this._startModules.add(s), t.push(...s.getFunctions().getItems({
|
|
@@ -3295,14 +3339,14 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3295
3339
|
}
|
|
3296
3340
|
_createScripts(e) {
|
|
3297
3341
|
const t = this;
|
|
3298
|
-
return new
|
|
3342
|
+
return new ur({
|
|
3299
3343
|
transactions: this._transactions,
|
|
3300
3344
|
json: e,
|
|
3301
3345
|
workbook: t,
|
|
3302
3346
|
getBuiltInFunctions: () => t._calculation?.getFunctions(),
|
|
3303
3347
|
onAdd: (e, s) => {
|
|
3304
3348
|
const r = t._calculation;
|
|
3305
|
-
r.getStatus() !==
|
|
3349
|
+
r.getStatus() !== ae.Status.Off && r.start().then(async () => {
|
|
3306
3350
|
if (t._startModules.has(s)) return;
|
|
3307
3351
|
const e = s.getFunctions().getItems({
|
|
3308
3352
|
type: "formula",
|
|
@@ -3313,7 +3357,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3313
3357
|
try {
|
|
3314
3358
|
await this._calculation.getFunctions().add(s);
|
|
3315
3359
|
} catch (e) {
|
|
3316
|
-
|
|
3360
|
+
ms.error(e?.message ?? String(e), e);
|
|
3317
3361
|
}
|
|
3318
3362
|
}
|
|
3319
3363
|
}).catch(() => {});
|
|
@@ -3322,10 +3366,10 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3322
3366
|
});
|
|
3323
3367
|
}
|
|
3324
3368
|
async toJSON(e) {
|
|
3325
|
-
if (this._closed) throw new Error(
|
|
3369
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3326
3370
|
await Promise.resolve(this._starting);
|
|
3327
3371
|
const t = this.getCalculation();
|
|
3328
|
-
t.getStatus() !==
|
|
3372
|
+
t.getStatus() !== ae.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
|
|
3329
3373
|
const s = { sheets: [] }, r = e?.ignoreStyles ?? !1;
|
|
3330
3374
|
if (!r) {
|
|
3331
3375
|
const e = this._theme.toJSON();
|
|
@@ -3347,19 +3391,19 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3347
3391
|
const o = g[r], n = r + 1;
|
|
3348
3392
|
let a;
|
|
3349
3393
|
const h = m.get(o.id);
|
|
3350
|
-
if (
|
|
3394
|
+
if (Kr(o)) a = {
|
|
3351
3395
|
name: o.name,
|
|
3352
3396
|
sheet: await o.sheet.toJSON(e)
|
|
3353
3397
|
};
|
|
3354
3398
|
else {
|
|
3355
|
-
const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part:
|
|
3399
|
+
const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part: Ze.toJSON(e._getPart(), t) }, r = e.getTabColor();
|
|
3356
3400
|
r && (s.tabColor = r.toString()), a = {
|
|
3357
3401
|
name: o.name,
|
|
3358
3402
|
kind: e.getKind(),
|
|
3359
3403
|
sheet: s
|
|
3360
3404
|
};
|
|
3361
3405
|
}
|
|
3362
|
-
void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility ===
|
|
3406
|
+
void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility === mt.Visibility.Visible ? null === u && (u = n) : a.visibility = o.visibility, o.id === t && (i = n), s.sheets.push(a);
|
|
3363
3407
|
}
|
|
3364
3408
|
if (!r) {
|
|
3365
3409
|
const e = h.toJSON();
|
|
@@ -3377,14 +3421,14 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3377
3421
|
const e = c.toKindsJSON();
|
|
3378
3422
|
e.length > 0 && (s.richTypes = e);
|
|
3379
3423
|
}
|
|
3380
|
-
const
|
|
3381
|
-
|
|
3382
|
-
const
|
|
3383
|
-
if (
|
|
3424
|
+
const b = this._calculation.getExternalBooks().toJSON();
|
|
3425
|
+
b && (s.externalBooks = b);
|
|
3426
|
+
const S = this._pivotCaches;
|
|
3427
|
+
if (S.length > 0) {
|
|
3384
3428
|
const e = l ? l.toResourceId.bind(l) : () => null, t = /* @__PURE__ */ new Set();
|
|
3385
3429
|
for (const e of this.getPivotTables()) t.add(e.getCacheId());
|
|
3386
3430
|
const r = [];
|
|
3387
|
-
for (let s = 0; s <
|
|
3431
|
+
for (let s = 0; s < S.length; s++) t.has(S[s].cacheId) && r.push(S[s].toJSON(e));
|
|
3388
3432
|
r.length > 0 && (s.pivotCaches = r);
|
|
3389
3433
|
}
|
|
3390
3434
|
const k = this._people.toJSON();
|
|
@@ -3417,16 +3461,16 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3417
3461
|
} catch (e) {
|
|
3418
3462
|
console.warn("error on close", e);
|
|
3419
3463
|
}
|
|
3420
|
-
this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof
|
|
3464
|
+
this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof As && this._originProvider.release(), this._closed = !0;
|
|
3421
3465
|
}
|
|
3422
3466
|
beginCommit(e) {
|
|
3423
|
-
if (this._closed) throw new Error(
|
|
3467
|
+
if (this._closed) throw new Error(Ss("error.workbook.modelClosed"));
|
|
3424
3468
|
return this._beginCommit("string" == typeof e ? { description: e } : e);
|
|
3425
3469
|
}
|
|
3426
3470
|
doBatch(e, t) {
|
|
3427
3471
|
const r = this;
|
|
3428
3472
|
t = "string" == typeof t ? { description: t } : {
|
|
3429
|
-
description:
|
|
3473
|
+
description: bs("op.updateWorkbook"),
|
|
3430
3474
|
...t
|
|
3431
3475
|
};
|
|
3432
3476
|
const i = s.bind(this._transactions, this, e);
|
|
@@ -3446,7 +3490,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3446
3490
|
_getState() {
|
|
3447
3491
|
return this._transactions.getState(this._id);
|
|
3448
3492
|
}
|
|
3449
|
-
_updateState(e, t =
|
|
3493
|
+
_updateState(e, t = bs("op.updateWorkbook"), s) {
|
|
3450
3494
|
if (!e) return;
|
|
3451
3495
|
const r = this._beginCommit(t);
|
|
3452
3496
|
try {
|
|
@@ -3467,7 +3511,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3467
3511
|
get isIWorkbook() {
|
|
3468
3512
|
return !0;
|
|
3469
3513
|
}
|
|
3470
|
-
},
|
|
3514
|
+
}, $r = { address: null }, Kr = (e) => e.sheet.getKind() === mt.Kind.Worksheet, Gr = class {
|
|
3471
3515
|
constructor() {
|
|
3472
3516
|
this._readFormats = [], this._writeFormats = [], this._encryptions = [];
|
|
3473
3517
|
}
|
|
@@ -3544,9 +3588,9 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3544
3588
|
return !0;
|
|
3545
3589
|
});
|
|
3546
3590
|
}
|
|
3547
|
-
},
|
|
3591
|
+
}, Xr = /* @__PURE__ */ new WeakMap(), Yr = (e) => !!e && "object" == typeof e && "function" == typeof e.getPath && "function" == typeof e.canWrite, Zr = class {
|
|
3548
3592
|
constructor() {
|
|
3549
|
-
this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new e(this), this._registry = new
|
|
3593
|
+
this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new e(this), this._registry = new Gr(), this._defaultStore = new Ts(() => this.getWriteFormats(), () => this.getReadFormats());
|
|
3550
3594
|
}
|
|
3551
3595
|
getBackingStore() {
|
|
3552
3596
|
return this._backingStore ?? this._defaultStore;
|
|
@@ -3581,15 +3625,15 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3581
3625
|
return this._registry.getWriteFormats(e);
|
|
3582
3626
|
}
|
|
3583
3627
|
getOrigin(e) {
|
|
3584
|
-
return new
|
|
3628
|
+
return new Rs(e);
|
|
3585
3629
|
}
|
|
3586
3630
|
async read(e) {
|
|
3587
3631
|
let t = null;
|
|
3588
3632
|
if ("string" == typeof e) e = { source: e };
|
|
3589
|
-
else if (
|
|
3633
|
+
else if (Yr(e)) {
|
|
3590
3634
|
const s = e.getPath();
|
|
3591
3635
|
if (!s) throw new Error("Cannot read from an unbound origin (no path).");
|
|
3592
|
-
|
|
3636
|
+
Ls(e) ? e = {
|
|
3593
3637
|
source: s,
|
|
3594
3638
|
asCopy: !0
|
|
3595
3639
|
} : (t = e, e = { source: s });
|
|
@@ -3608,21 +3652,21 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3608
3652
|
search: i,
|
|
3609
3653
|
ext: o
|
|
3610
3654
|
}))[0];
|
|
3611
|
-
if (!n) throw new
|
|
3655
|
+
if (!n) throw new cs(Ss("error.io.readFormatUnavailable", { format: i ?? o }));
|
|
3612
3656
|
const a = s?.typedCreateWorkbookOptions, l = a ? Object.keys(a).find((e) => e.toLowerCase() === n.key.toLowerCase()) : void 0;
|
|
3613
3657
|
let h = {
|
|
3614
3658
|
...s,
|
|
3615
3659
|
...void 0 !== l ? a[l] : void 0
|
|
3616
3660
|
};
|
|
3617
3661
|
delete h.typedCreateWorkbookOptions, delete h.source, delete h.asCopy;
|
|
3618
|
-
const c = r ?? new
|
|
3662
|
+
const c = r ?? new Rs(t.absolutePath ?? null, {
|
|
3619
3663
|
name: t.name ?? null,
|
|
3620
3664
|
format: n.key,
|
|
3621
3665
|
size: t.size ?? null,
|
|
3622
3666
|
lastModified: t.lastModified ?? null,
|
|
3623
3667
|
canWrite: t.canWrite ?? !1
|
|
3624
3668
|
});
|
|
3625
|
-
r instanceof
|
|
3669
|
+
r instanceof Rs && r.update({
|
|
3626
3670
|
format: n.key,
|
|
3627
3671
|
size: t.size ?? null,
|
|
3628
3672
|
lastModified: t.lastModified ?? null
|
|
@@ -3656,7 +3700,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3656
3700
|
}
|
|
3657
3701
|
async _decrypt(e, t, s) {
|
|
3658
3702
|
const r = await this._registry.detectEncryption(e);
|
|
3659
|
-
if (t instanceof
|
|
3703
|
+
if (t instanceof Rs && t.update({ encryption: r ? r.key : null }), !r) return {
|
|
3660
3704
|
bytes: e,
|
|
3661
3705
|
password: null
|
|
3662
3706
|
};
|
|
@@ -3665,7 +3709,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3665
3709
|
try {
|
|
3666
3710
|
return i = await r.decode(e, t), !0;
|
|
3667
3711
|
} catch (e) {
|
|
3668
|
-
if (!(e instanceof
|
|
3712
|
+
if (!(e instanceof ds)) throw e;
|
|
3669
3713
|
return !1;
|
|
3670
3714
|
}
|
|
3671
3715
|
};
|
|
@@ -3675,7 +3719,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3675
3719
|
};
|
|
3676
3720
|
if (!s?.onPassword) {
|
|
3677
3721
|
const e = t.getName();
|
|
3678
|
-
throw new
|
|
3722
|
+
throw new ps(e ? Ss("error.io.passwordRequired", { name: e }) : Ss("error.io.passwordRequiredUnnamed"));
|
|
3679
3723
|
}
|
|
3680
3724
|
const n = await Promise.resolve(s.onPassword({
|
|
3681
3725
|
origin: t,
|
|
@@ -3691,16 +3735,16 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3691
3735
|
bytes: i,
|
|
3692
3736
|
password: n
|
|
3693
3737
|
};
|
|
3694
|
-
throw new
|
|
3738
|
+
throw new ds(Ss("error.io.passwordIncorrect"));
|
|
3695
3739
|
}
|
|
3696
3740
|
async writeArrayBuffer(e, t) {
|
|
3697
3741
|
if (!t?.format) throw new Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
|
|
3698
3742
|
const s = (await this._registry.getWriteFormats({ search: t.format }))[0];
|
|
3699
|
-
if (!s) throw new
|
|
3743
|
+
if (!s) throw new cs(Ss("error.io.writeFormatUnavailable", { format: t.format }));
|
|
3700
3744
|
return this._writeArrayBuffer(e, s, t);
|
|
3701
3745
|
}
|
|
3702
3746
|
async write(e, t, s) {
|
|
3703
|
-
return "string" == typeof t ||
|
|
3747
|
+
return "string" == typeof t || Yr(t) ? this._write(e, t, !1, s) : this._write(e, e?.getOrigin?.(), !0, t ?? s);
|
|
3704
3748
|
}
|
|
3705
3749
|
async writeAs(e, t, s) {
|
|
3706
3750
|
if (!t) throw new Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
|
|
@@ -3712,13 +3756,13 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3712
3756
|
let i = "string" == typeof t ? this.getOrigin(t) : t;
|
|
3713
3757
|
const o = i.getFormat();
|
|
3714
3758
|
let n;
|
|
3715
|
-
if ((r?.format || o) && (n = (await this._registry.getWriteFormats({ search: r?.format ?? o ?? void 0 }))[0]), n || i.getPath() && i.canWrite() && i.getExtension() || (n = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !n) throw new
|
|
3759
|
+
if ((r?.format || o) && (n = (await this._registry.getWriteFormats({ search: r?.format ?? o ?? void 0 }))[0]), n || i.getPath() && i.canWrite() && i.getExtension() || (n = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !n) throw new cs(Ss("error.io.writeFormatUnresolved"));
|
|
3716
3760
|
const a = i.getExtension();
|
|
3717
3761
|
if (r?.format && a && i.getPath() && i.canWrite() && !n.exts.includes(a)) {
|
|
3718
3762
|
const e = (await this._registry.getWriteFormats({ ext: a }))[0];
|
|
3719
3763
|
if (e && e.key !== n.key) {
|
|
3720
3764
|
const e = i.getPath().split(/[/\\]/).pop();
|
|
3721
|
-
throw new
|
|
3765
|
+
throw new cs(Ss("error.io.writeFormatMismatch", {
|
|
3722
3766
|
format: r.format,
|
|
3723
3767
|
file: e
|
|
3724
3768
|
}));
|
|
@@ -3726,21 +3770,21 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3726
3770
|
}
|
|
3727
3771
|
if ("string" == typeof t) {
|
|
3728
3772
|
const e = i.getPath();
|
|
3729
|
-
i = new
|
|
3773
|
+
i = new Rs(ke(e) ? e : `${e}.${n.exts[0]}`, { format: n.key });
|
|
3730
3774
|
}
|
|
3731
|
-
const l = i.getEncryption(), h = e.getOrigin?.(), c = (i instanceof
|
|
3775
|
+
const l = i.getEncryption(), h = e.getOrigin?.(), c = (i instanceof Rs ? i.getPassword() : null) ?? (h instanceof Rs ? h.getPassword() : null), u = i.isEncrypted() || (h?.isEncrypted() ?? !1), d = void 0 !== r?.password ? r.password : c ?? (u ? void 0 : null);
|
|
3732
3776
|
let g = null;
|
|
3733
3777
|
if (void 0 === d) {
|
|
3734
3778
|
if (u) {
|
|
3735
3779
|
const e = i.getName();
|
|
3736
|
-
throw new
|
|
3780
|
+
throw new ps(e ? Ss("error.io.passwordRequiredSave", { name: e }) : Ss("error.io.passwordRequiredSaveUnnamed"));
|
|
3737
3781
|
}
|
|
3738
|
-
} else if (null !== d && (g = await this._registry.getEncryption(l), !g)) throw new
|
|
3739
|
-
const m = `${i.getName() ??
|
|
3782
|
+
} else if (null !== d && (g = await this._registry.getEncryption(l), !g)) throw new cs(Ss("error.io.encryptionUnavailable"));
|
|
3783
|
+
const m = `${i.getName() ?? Ss("workbook.defaultName")}.${n.exts[0]}`, _ = r?.progress, f = !i.getPath() || !i.canWrite() || !!r?.prompt;
|
|
3740
3784
|
let p = !1;
|
|
3741
3785
|
const w = this;
|
|
3742
|
-
let y = null,
|
|
3743
|
-
const
|
|
3786
|
+
let y = null, b = [];
|
|
3787
|
+
const S = {
|
|
3744
3788
|
workbook: e,
|
|
3745
3789
|
format: n,
|
|
3746
3790
|
origin: i,
|
|
@@ -3765,7 +3809,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3765
3809
|
}))(_, h), u = await w._writeArrayBuffer(e, l, {
|
|
3766
3810
|
...r,
|
|
3767
3811
|
progress: c
|
|
3768
|
-
}), m =
|
|
3812
|
+
}), m = Xr.get(a);
|
|
3769
3813
|
if (h.some((e) => !m?.has(e.message)) && r?.onWarnings) {
|
|
3770
3814
|
const t = await Promise.resolve(r.onWarnings({
|
|
3771
3815
|
workbook: e,
|
|
@@ -3776,20 +3820,20 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3776
3820
|
}));
|
|
3777
3821
|
if (!f && !1 === t) return null;
|
|
3778
3822
|
}
|
|
3779
|
-
return
|
|
3823
|
+
return b = h, g ? g.encode(u, d) : u;
|
|
3780
3824
|
}
|
|
3781
3825
|
};
|
|
3782
3826
|
let k = null;
|
|
3783
3827
|
try {
|
|
3784
3828
|
const t = this.getBackingStore();
|
|
3785
3829
|
if (!t.write) throw new Error("The active backing store is read-only (no write implementation).");
|
|
3786
|
-
if (k = await t.write(
|
|
3787
|
-
if (void 0 !== d && k instanceof
|
|
3788
|
-
const e =
|
|
3789
|
-
for (const t of
|
|
3790
|
-
|
|
3830
|
+
if (k = await t.write(S), k) {
|
|
3831
|
+
if (void 0 !== d && k instanceof Rs && (k.setPassword(d), k.update({ encryption: g ? g.key : null })), b.length) {
|
|
3832
|
+
const e = Xr.get(k) ?? /* @__PURE__ */ new Set();
|
|
3833
|
+
for (const t of b) e.add(t.message);
|
|
3834
|
+
Xr.set(k, e);
|
|
3791
3835
|
}
|
|
3792
|
-
s && k !== e.getOrigin() &&
|
|
3836
|
+
s && k !== e.getOrigin() && Ls(e.getOrigin())?.setOrigin(k);
|
|
3793
3837
|
const t = y ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
|
|
3794
3838
|
this._emitter.notify("onWrite", {
|
|
3795
3839
|
params: {
|
|
@@ -3804,13 +3848,13 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3804
3848
|
_?.onComplete && await Promise.resolve(_.onComplete(k));
|
|
3805
3849
|
} catch (e) {
|
|
3806
3850
|
const t = e instanceof Error ? e : new Error(String(e));
|
|
3807
|
-
if (_?.onError && await Promise.resolve(_.onError(t)), _?.onComplete && await Promise.resolve(_.onComplete(null)), t instanceof
|
|
3808
|
-
throw new Error(
|
|
3851
|
+
if (_?.onError && await Promise.resolve(_.onError(t)), _?.onComplete && await Promise.resolve(_.onComplete(null)), t instanceof cs) throw t;
|
|
3852
|
+
throw new Error(Ss("error.io.writeFailed", { reason: t.message }), { cause: e });
|
|
3809
3853
|
}
|
|
3810
3854
|
return k;
|
|
3811
3855
|
}
|
|
3812
3856
|
_stripExtension(e) {
|
|
3813
|
-
const t =
|
|
3857
|
+
const t = ke(e);
|
|
3814
3858
|
return t ? e.slice(0, e.length - t.length - 1) : e;
|
|
3815
3859
|
}
|
|
3816
3860
|
_baseName(e) {
|
|
@@ -3830,25 +3874,25 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3830
3874
|
async _readArrayBuffer(e, t, s) {
|
|
3831
3875
|
if (!e) throw new Error("ArrayBuffer must be specified.");
|
|
3832
3876
|
if (!t) throw new Error("format must be specified.");
|
|
3833
|
-
if (0 === e.byteLength) return new
|
|
3877
|
+
if (0 === e.byteLength) return new qr(s?.createWorkbookOptions);
|
|
3834
3878
|
const r = t.handler;
|
|
3835
3879
|
if (!r) throw new Error(`Unable to resolve a read handler for '${t.key}'.`);
|
|
3836
3880
|
let i;
|
|
3837
3881
|
try {
|
|
3838
3882
|
i = await r(e, s);
|
|
3839
3883
|
} catch (e) {
|
|
3840
|
-
if (e instanceof
|
|
3841
|
-
throw new
|
|
3884
|
+
if (e instanceof cs) throw e;
|
|
3885
|
+
throw new cs(Ss("error.io.readFailed", {
|
|
3842
3886
|
format: t.description ?? t.key,
|
|
3843
3887
|
reason: e?.message ?? String(e)
|
|
3844
3888
|
}), { cause: e });
|
|
3845
3889
|
}
|
|
3846
|
-
return await
|
|
3890
|
+
return await lt(), i;
|
|
3847
3891
|
}
|
|
3848
3892
|
get isIWorkbookIO() {
|
|
3849
3893
|
return !0;
|
|
3850
3894
|
}
|
|
3851
|
-
},
|
|
3895
|
+
}, Qr = new Zr(), ei = class {
|
|
3852
3896
|
constructor() {
|
|
3853
3897
|
this._buffer = null, this._formatKey = null;
|
|
3854
3898
|
}
|
|
@@ -3862,7 +3906,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3862
3906
|
async read(e) {
|
|
3863
3907
|
return this._buffer ? e.decode(this._buffer, { format: this._formatKey ?? void 0 }) : null;
|
|
3864
3908
|
}
|
|
3865
|
-
},
|
|
3909
|
+
}, ti = "locales", si = "fonts", ri = {
|
|
3866
3910
|
suffix: ".msg.json",
|
|
3867
3911
|
async extract(e) {
|
|
3868
3912
|
const t = e.relPath.split("/");
|
|
@@ -3872,7 +3916,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3872
3916
|
} : null;
|
|
3873
3917
|
},
|
|
3874
3918
|
place: (e, t) => t ? `${t}/${e}` : null
|
|
3875
|
-
},
|
|
3919
|
+
}, ii = [
|
|
3876
3920
|
".woff2",
|
|
3877
3921
|
".woff",
|
|
3878
3922
|
".ttf",
|
|
@@ -3882,7 +3926,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3882
3926
|
].map((e) => ({
|
|
3883
3927
|
suffix: e,
|
|
3884
3928
|
place: (e, t) => t ? `${t}/${e}` : e
|
|
3885
|
-
})),
|
|
3929
|
+
})), oi = {
|
|
3886
3930
|
suffix: ".metrics.json",
|
|
3887
3931
|
async extract(e) {
|
|
3888
3932
|
const t = await e.readJson();
|
|
@@ -3893,13 +3937,13 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3893
3937
|
} : null;
|
|
3894
3938
|
},
|
|
3895
3939
|
place: (e, t) => t ? `${t}/${e}` : e
|
|
3896
|
-
},
|
|
3897
|
-
kind:
|
|
3898
|
-
files: [
|
|
3940
|
+
}, ni = [{
|
|
3941
|
+
kind: ti,
|
|
3942
|
+
files: [ri]
|
|
3899
3943
|
}, {
|
|
3900
|
-
kind:
|
|
3944
|
+
kind: si,
|
|
3901
3945
|
files: [
|
|
3902
|
-
|
|
3946
|
+
oi,
|
|
3903
3947
|
{
|
|
3904
3948
|
suffix: ".hinted.json",
|
|
3905
3949
|
async extract(e) {
|
|
@@ -3911,7 +3955,7 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3911
3955
|
hinted: !0
|
|
3912
3956
|
} : null;
|
|
3913
3957
|
},
|
|
3914
|
-
place:
|
|
3958
|
+
place: oi.place
|
|
3915
3959
|
},
|
|
3916
3960
|
{
|
|
3917
3961
|
suffix: ".rows.json",
|
|
@@ -3924,40 +3968,40 @@ var Br, jr = "workbook.activeSheet", Mr = class e extends u {
|
|
|
3924
3968
|
rows: !0
|
|
3925
3969
|
} : null;
|
|
3926
3970
|
},
|
|
3927
|
-
place:
|
|
3971
|
+
place: oi.place
|
|
3928
3972
|
},
|
|
3929
|
-
...
|
|
3973
|
+
...ii
|
|
3930
3974
|
]
|
|
3931
3975
|
}];
|
|
3932
|
-
async function
|
|
3933
|
-
const { Chart: s } = await import("./
|
|
3976
|
+
async function ai(e, t) {
|
|
3977
|
+
const { Chart: s } = await import("./suOBVUz-pca6ilJH.mjs");
|
|
3934
3978
|
return new s({
|
|
3935
3979
|
json: e,
|
|
3936
3980
|
getStyles: t?.getStyles
|
|
3937
3981
|
});
|
|
3938
3982
|
}
|
|
3939
|
-
|
|
3940
|
-
var
|
|
3941
|
-
function
|
|
3942
|
-
if (!
|
|
3943
|
-
const e = import("./
|
|
3983
|
+
Dr || (Dr = {});
|
|
3984
|
+
var li = null;
|
|
3985
|
+
function hi() {
|
|
3986
|
+
if (!li) {
|
|
3987
|
+
const e = import("./C9gpMN3galHGZyoK.mjs").then((e) => e.loadScriptingDeclarations());
|
|
3944
3988
|
e.catch(() => {
|
|
3945
|
-
|
|
3946
|
-
}),
|
|
3989
|
+
li = null;
|
|
3990
|
+
}), li = e;
|
|
3947
3991
|
}
|
|
3948
|
-
return
|
|
3992
|
+
return li;
|
|
3949
3993
|
}
|
|
3950
|
-
var
|
|
3951
|
-
function
|
|
3952
|
-
if (!
|
|
3953
|
-
const e = import("./
|
|
3994
|
+
var ci, ui, di, gi = null;
|
|
3995
|
+
function mi() {
|
|
3996
|
+
if (!gi) {
|
|
3997
|
+
const e = import("./C9gpMN3galHGZyoK.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
|
|
3954
3998
|
e.catch(() => {
|
|
3955
|
-
|
|
3956
|
-
}),
|
|
3999
|
+
gi = null;
|
|
4000
|
+
}), gi = e;
|
|
3957
4001
|
}
|
|
3958
|
-
return
|
|
4002
|
+
return gi;
|
|
3959
4003
|
}
|
|
3960
|
-
|
|
4004
|
+
ci || (ci = {}), (ui || (ui = {})).Type = {
|
|
3961
4005
|
Button: "button",
|
|
3962
4006
|
CheckBox: "checkBox",
|
|
3963
4007
|
OptionButton: "optionButton",
|
|
@@ -3970,12 +4014,12 @@ ai || (ai = {}), (li || (li = {})).Type = {
|
|
|
3970
4014
|
EditBox: "editBox",
|
|
3971
4015
|
Dialog: "dialog",
|
|
3972
4016
|
Unknown: "formControl"
|
|
3973
|
-
}, (
|
|
4017
|
+
}, (di || (di = {})).DropStyle = {
|
|
3974
4018
|
Combo: "combo",
|
|
3975
4019
|
ComboEdit: "comboEdit",
|
|
3976
4020
|
Simple: "simple"
|
|
3977
4021
|
};
|
|
3978
|
-
var
|
|
4022
|
+
var _i = class extends S {
|
|
3979
4023
|
constructor(e) {
|
|
3980
4024
|
super(e);
|
|
3981
4025
|
}
|
|
@@ -3988,8 +4032,8 @@ var di = class extends le {
|
|
|
3988
4032
|
colEnd: (e?.size?.width ?? 5) - 1,
|
|
3989
4033
|
rowEnd: (e?.size?.height ?? 5) - 1
|
|
3990
4034
|
},
|
|
3991
|
-
getRanges: (e) => new
|
|
4035
|
+
getRanges: (e) => new g(null)
|
|
3992
4036
|
}, super._initializeOptions(e);
|
|
3993
4037
|
}
|
|
3994
|
-
},
|
|
3995
|
-
export {
|
|
4038
|
+
}, fi = "0.8.0-beta.13", pi = "2026-11-04T00:26:27.964Z";
|
|
4039
|
+
export { Ne as AbstractCollection, r as AbstractMovableContent, R as AddressUtils, ei as ArrayBackingStore, C as AutoFill, pi as BUILD_DATE, _e as CellControlRegistry, he as CellImage, b as CellImageKind, n as ChartElementSelection, rs as ChartKinds, E as CheckboxKind, zt as Color, H as Condition, Ct as DateUtils, Zr as DefaultWorkbookIO, wt as EXTERNAL_LINK_PATH_REL_TYPE, Sr as ExternalRangeClipboardItem, si as FONTS_KIND, _r as Fetcher, Et as FontUtils, q as FormulaText, Ys as FunctionDeclarations, se as GeomUtils, p as Hyperlink, G as HyperlinkKind, U as IAnchored, Xt as IBorders, ae as ICalculation, we as ICell, Ks as ICellHeaderRange, l as ICellRange, $s as ICellRanges, Zt as ICellStyle, Gt as IColor, Je as ICondition, pe as IConditionalFormat, Cr as ICustomProperty, ge as IDataValidation, di as IDropDown, Dt as IEffect, Qt as IFill, Bt as IFont, J as IFontCollection, jt as IFontStyle, ui as IFormControl, Ot as IGeometry, ci as IMovable, He as IPageLayout, Dr as IPicture, qs as IResource, De as IRichDataKind, Fe as IScript, Jt as IShape, mt as ISheet, u as ISlicerStyle, Os as ISort, qt as IStroke, O as ITable, fe as ITableStyle, gt as IText, Ut as ITextFrame, Js as ITheme, P as IThemeCollection, ks as IWorkbookIO, nr as IWorkbookView, Nt as IWorksheetView, ti as LOCALES_KIND, V as LicenseManager, xe as MovableContentRegistry, de as NamedStyleCollection, $t as NumberFormat, ss as PaintUtils, hr as PersonCollection, br as RangeClipboardItem, Ps as RectAlignment, kt as Registry, I as Resource, Q as ResourceCollection, m as RichArray, ft as RichArrayKind, rt as RichDataCollection, bt as RichDataRegistry, ne as RichRecord, Ue as RichText, a as RichTextKind, ni as SHEETXL_RESOURCE_KINDS, Ht as SYSTEM_COLOR_CSS_PREFIX, At as ShapeStyleUtils, Y as SimpleFontFace, me as SlicerStyleCollection, Oe as Sort, $ as StringCollection, It as StyleCollection, _i as Table, x as TableStyleCollection, Qe as TextRotation, Te as TextStacked, Ge as TextUtils, W as Theme, st as ThemeCollection, t as TransactionConflictError, Ns as TransactionSaveStateManager, i as TransactionStore, Cs as TransactionUndoManager, Ye as Tuple, fi as VERSION, qr as Workbook, Qr as WorkbookIO, Rs as WorkbookOrigin, Ir as WorkbookView, le as Worksheet, Us as builtInStyleNameDisplay, y as createCellRangeCounts, ai as createChart, ue as externalBookClosedName, k as externalBookFileName, w as externalBookLocation, X as externalBookOpenName, F as findLabel, Qs as getBuiltInFunctionNames, A as getLanguagePack, Kt as getLocaleProfile, tt as getScriptRuntime, mi as getScriptingApi, hi as getScriptingDeclarations, j as localizeBoolean, re as localizeErrorLabel, Yt as makeLocaleProfile, be as normalizeLabel, vt as parseBooleanLocal, c as parseErrorLocal, qe as parseExternalScope, er as parseFormulaLiteral, v as registerSdkLocales, h as sourceEntryFromPath, Xe as withScriptRuntime };
|