@sheetxl/sdk 0.8.0-beta.12 → 0.8.0-beta.14
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/{CBYMTDzMf1Vh7pkw.mjs → 3t4S9eda2I6jFad0.mjs} +1 -1
- package/browser/esm/{Bg5Di9GLNAkbqQ1P.mjs → AXlD9K1gCwPU4gCO.mjs} +1926 -1298
- package/browser/esm/{w6Jea0TiclPrYZ2M.mjs → B1aH_qa-czVyEVHd.mjs} +509 -509
- package/browser/esm/{DZiivy0NmO1Vnyzk.mjs → BEDfJP2tcuRy2Y2E.mjs} +2 -2
- package/browser/esm/{BdCJNawfifyPupCP.mjs → BLYl-afJe_3std8i.mjs} +1 -1
- package/browser/esm/{D2RZh0O9neOsyLAE.mjs → BPPMKyMn65i1a1mE.mjs} +69 -48
- package/browser/esm/{yuhcOYw6SHQ-RCm3.mjs → BSXQAXwZdJKYTO4P.mjs} +30 -30
- package/browser/esm/{-Jx-jNHmtIQQfLvK.mjs → BVqIknGhQCLUB_7Q.mjs} +1 -1
- package/browser/esm/{fXWUMDhZ5yMSO629.mjs → BWoz4kQdA5KKJfl6.mjs} +1 -1
- package/browser/esm/{DwwR3O2sEZApPSTF.mjs → Bdcd3QOzsc0aVMjN.mjs} +3 -3
- package/browser/esm/{2mIwPy2D2JUX-9wx.mjs → BpwULQPKbb4R9Jew.mjs} +2 -2
- package/browser/esm/{CwOPLXU3-9ZHGyOT.mjs → C7hpfT-sX2lyLS-D.mjs} +1 -1
- package/browser/esm/{BIHrHjRGWVlJglcp.mjs → CImFKFaYToUH-bSE.mjs} +2 -2
- package/browser/esm/{BTFBedJMRWGvZyCE.mjs → CM_X1zZYzEUPaNJL.mjs} +1 -1
- package/browser/esm/CPIWV3Enlh_BF2TY.mjs +19 -0
- package/browser/esm/{CndRBvVfQUJIYRRj.mjs → ChYgQL-8qIDFmX31.mjs} +50 -50
- package/browser/esm/{BudSIfXBAsTxvu-K.mjs → CtC__ALh4I8PKIln.mjs} +10071 -9246
- package/browser/esm/{qO-ujUrgq6H3TQix.mjs → Cy8uYCggktF83278.mjs} +1 -1
- package/browser/esm/D2NFcBM4xsv0JJ1q.mjs +184 -0
- package/browser/esm/{D9xNz46kAfXMZzp4.mjs → D39XcmtPXVtMN4yF.mjs} +2 -2
- package/browser/esm/{CdEO8CEee6lEhabA.mjs → DBvu0tdSf-5vol4e.mjs} +2 -2
- package/browser/esm/{Tah7cnFb_HNZdLtj.mjs → DIfAk63CvaOZ3QKi.mjs} +3 -3
- package/browser/esm/{B3wf5vZCsWfWsDbj.mjs → D_XMi4_5iO2rkET5.mjs} +1 -1
- package/browser/esm/{DgrAuRD2qr2DvFeJ.mjs → Dh84MDs-OhdCPCIg.mjs} +44 -44
- package/browser/esm/{DPhGQLNGmDZwODwJ.mjs → Dhw5XEJYFrkYjdU2.mjs} +94 -94
- package/browser/esm/{Cxjxk0ncRKx80I-w.mjs → DiXeQjc0WJGLSVEo.mjs} +1 -1
- package/browser/esm/DnR0xY7_iE3TmMcg.mjs +348 -0
- package/browser/esm/{DK899HhWX1HINMC1.mjs → DnqwX3-2NfGBaXXl.mjs} +25 -25
- package/browser/esm/{D64dM68B1pKYFzdP.mjs → DonQz2Tc3k9lNT8E.mjs} +2 -2
- package/browser/esm/{Bt8_m94tBdks209L.mjs → DvvqmUQ9Z0NFm1-4.mjs} +1 -1
- package/browser/esm/{BnC4-27Igwb8oDf2.mjs → Ln4gsmhqH1LyoANj.mjs} +44 -43
- package/browser/esm/{CUzYuYTTGsChC_kZ.mjs → MuNBN02MyZ558c_K.mjs} +2052 -1583
- package/browser/esm/{CRkYR-siY2C994KV.mjs → SwLp-iElwDjfcJtv.mjs} +1 -1
- package/browser/esm/{C9u8FUewte5ugUjH.mjs → UMQTbO0zNmBpzW1V.mjs} +725 -716
- package/browser/esm/aRXqxIzjuSLwawMh.mjs +18 -0
- package/browser/esm/index.mjs +482 -440
- package/browser/esm/{hCQJcmIzPDxDEv2q.mjs → oSCy1X5CJ1iYtGDp.mjs} +2 -2
- package/browser/esm/{DobHLF6VjHr7Xi40.mjs → qCqzZW74-fhaIG2V.mjs} +1 -1
- package/browser/esm/{CNdjyofiRu6CYOrr.mjs → r_EZapMBdyS4gUd-.mjs} +50 -48
- package/browser/esm/yuF8SbWfjBfrxcq5.mjs +367 -0
- package/licenses/dependencies.txt +71 -1
- package/node/esm/99miMotf3dOuG5Jk.mjs +372 -0
- package/node/esm/{-TA0MneBDKdGhsib.mjs → B3hBxzqJ2_hUylNr.mjs} +3329 -2852
- package/node/esm/{BNXLOEddJ6O9gYws.mjs → B5VmOC0jO9Zbh9Mq.mjs} +2 -2
- package/node/esm/{DhS6yWjrrSNIJMsn.mjs → B6jhx5pHPs2W5GE7.mjs} +234 -225
- package/node/esm/{DUTmDHbFbhLDT4F3.mjs → BCjHRVU8tC5lYypg.mjs} +1 -1
- package/node/esm/BEBt5fo__rvT2q_u.mjs +310 -0
- package/node/esm/{icn2nX5Z8e_3mNAv.mjs → BELc5aQ_pFPgbiso.mjs} +1 -1
- package/node/esm/{DrCf6ITcBhVOFpRj.mjs → BEdxa3I4VOiCsvy7.mjs} +7 -7
- package/node/esm/{D3ptRKzASqBut1DE.mjs → BLPrFp_jKGYgWPX1.mjs} +2 -2
- package/node/esm/{BskP3b8vUoIOGLY6.mjs → BSVttk12GXNfKZ9k.mjs} +2 -2
- package/node/esm/{D4ROK9UwDpS6jO3Z.mjs → BXg-D8Rc_iyB8p7X.mjs} +1 -1
- package/node/esm/{DV5CU37aEbFbWFL0.mjs → BfEdeOg4iYXaYTlh.mjs} +1 -1
- package/node/esm/BuyAYLI4s33-vmgG.mjs +18 -0
- package/node/esm/{C_xf5Bz30VqiJjXn.mjs → C-5JLSNof0FhkuFd.mjs} +1 -1
- package/node/esm/{eimUGjiIP-b8HiM6.mjs → C3S4hF1vn0NyJPPd.mjs} +52 -52
- package/node/esm/{BL2iiEoqxDEV2Xrg.mjs → CI8UIWR01z9QDlzH.mjs} +3348 -2610
- package/node/esm/{pYtP7wPyS96NQyXS.mjs → CPsGyt3vnOdLTShj.mjs} +25 -25
- package/node/esm/{CG-qBU5BAaVz7e-P.mjs → Ccocd9DTvOnlOE9D.mjs} +1 -1
- package/node/esm/{C14-R6tifRh7pc0p.mjs → CdSTmD2ZvG9NesNR.mjs} +1 -1
- package/node/esm/{Q_S1g46ZOTrdhTae.mjs → Crn6dnSQQRCQAnQ-.mjs} +1 -1
- package/node/esm/{DdoiuKg9BKubtF1V.mjs → Cyeq1rDslIqF1LKz.mjs} +1 -1
- package/node/esm/{Ci_zLYmCD7e-C79O.mjs → D30rC6AWaGGf3CaC.mjs} +1 -1
- package/node/esm/D4Y1WJgjiFEgbWrW.mjs +115 -0
- package/node/esm/{Vocy-I9dKzZMr0Ct.mjs → DLdXl0O0TXuyqLU4.mjs} +10898 -10685
- package/node/esm/{D8hO07ToAibIuniw.mjs → DbPUG2DcQ3T_QhcJ.mjs} +138 -136
- package/node/esm/{lGJ42sHqg5if2bba.mjs → DeFE8QfuCeGw-mvd.mjs} +458 -458
- package/node/esm/{CiIymQN6aJCul62g.mjs → DiCMnYA2bttmrX3q.mjs} +9 -9
- package/node/esm/{DhTya_mhmN53vskv.mjs → Dlk2ZYExFgQ0xE2H.mjs} +1 -1
- package/node/esm/{Btw4148Ot8ifhNc1.mjs → I-FZojIFWluC6X-j.mjs} +1 -1
- package/node/esm/{C99zzq8DImQXi4BQ.mjs → Lj98EH6coGdKUzuS.mjs} +10 -10
- package/node/esm/{B-HUPAcqvK0eeeCz.mjs → NA-8urR7T1NCwrgD.mjs} +38 -37
- package/node/esm/{DxazKtROyaI51dWl.mjs → YpOpRyciqQLIY1-G.mjs} +1 -1
- package/node/esm/{CkRYLed8Mmn3giNg.mjs → b3XnssSr9lmvAC2N.mjs} +2 -2
- package/node/esm/clgEkmEwfB28nkz2.mjs +351 -0
- package/node/esm/index.mjs +584 -540
- package/node/esm/{CRt3vXe6YmXzqk3H.mjs → pF2vCOTmrxPAB41Q.mjs} +102 -102
- package/node/esm/{CBuEu5Jk-LfaDy-H.mjs → uLrulyR7IXq0SF4j.mjs} +44 -44
- package/node/esm/{C_aL7CGS1lrNn1Ng.mjs → xRGObcoaGDnAZFnj.mjs} +1 -1
- package/package.json +10 -7
- 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/scripting/enumManifest.browser.d.ts +7 -2
- 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/browser/esm/DwZCT7DZiiXoTweg.mjs +0 -14
- 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
|
@@ -1,15 +1,15 @@
|
|
|
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.14
|
|
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 { $n as e, Bn as t,
|
|
7
|
+
import { $n as e, Bn as t, Fn as s, Gn as r, Jn as i, Kn as n, Ln as o, Qn as a, Un as h, Vn as l, Wn as u, Xn as c, Yn as p, Zn as g, _r as m, ar as O, er as _, fr as E, gr as L, ir as A, mr as f, nr as C, or as T, pr as N, qn as U, rr as S, sr as d, tr as x, xr as R, zn as I } from "./DLdXl0O0TXuyqLU4.mjs";
|
|
8
8
|
import { FormulaError as M } from "@sheetxl/primitives";
|
|
9
9
|
import { EOF as P, EmbeddedActionsParser as b, Lexer as v, createToken as k, defaultParserErrorProvider as w } from "chevrotain";
|
|
10
10
|
var y = class e {
|
|
11
11
|
static shared(t) {
|
|
12
|
-
const s = t?.locale ??
|
|
12
|
+
const s = t?.locale ?? m, r = t?.maxColumn ?? D, i = t?.maxRow ?? G;
|
|
13
13
|
let n = $.get(s);
|
|
14
14
|
n || (n = /* @__PURE__ */ new Map(), $.set(s, n));
|
|
15
15
|
const o = `${r}:${i}`;
|
|
@@ -21,7 +21,7 @@ var y = class e {
|
|
|
21
21
|
}), n.set(o, a)), a;
|
|
22
22
|
}
|
|
23
23
|
constructor(e) {
|
|
24
|
-
const t = e?.maxColumn ?? D, s = e?.maxRow ?? G, r = e?.locale ??
|
|
24
|
+
const t = e?.maxColumn ?? D, s = e?.maxRow ?? G, r = e?.locale ?? m;
|
|
25
25
|
this._locale = r, this._maxColumn = t, this._maxRow = s;
|
|
26
26
|
const { separatorFunction: i, separatorColumn: n, separatorRow: o, separatorDecimal: a } = r.separators;
|
|
27
27
|
if (n === o) throw new Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${n}')`);
|
|
@@ -37,7 +37,7 @@ var y = class e {
|
|
|
37
37
|
pattern: /[a-zA-Z_\u007F-\uFFFF]+[a-zA-Z0-9_.\u007F-\uFFFF]*(?=\()/
|
|
38
38
|
}), c = k({
|
|
39
39
|
name: "TableReference",
|
|
40
|
-
pattern: { exec:
|
|
40
|
+
pattern: { exec: N },
|
|
41
41
|
line_breaks: !1,
|
|
42
42
|
start_chars_hint: B
|
|
43
43
|
}), p = k({
|
|
@@ -46,7 +46,7 @@ var y = class e {
|
|
|
46
46
|
line_breaks: !1,
|
|
47
47
|
start_chars_hint: [91],
|
|
48
48
|
longer_alt: [c, l]
|
|
49
|
-
}), g = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""),
|
|
49
|
+
}), g = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""), O = (e) => e.replace(/[A-Za-z]/g, (e) => `[${e.toUpperCase()}${e.toLowerCase()}]`), _ = k({
|
|
50
50
|
name: "LiteralError",
|
|
51
51
|
pattern: new RegExp(g(r.errorLiterals) + [
|
|
52
52
|
"#PARSE!",
|
|
@@ -65,24 +65,24 @@ var y = class e {
|
|
|
65
65
|
"#BUSY!",
|
|
66
66
|
"#PYTHON!",
|
|
67
67
|
"#TIMEOUT!"
|
|
68
|
-
].map(
|
|
69
|
-
}), _ = k({
|
|
70
|
-
name: "RefError",
|
|
71
|
-
pattern: new RegExp(g(r.errorRefs) + ["#REF!", "#NAME\\?"].map(m).join("|"))
|
|
68
|
+
].map(O).join("|"))
|
|
72
69
|
}), L = k({
|
|
70
|
+
name: "RefError",
|
|
71
|
+
pattern: new RegExp(g(r.errorRefs) + ["#REF!", "#NAME\\?"].map(O).join("|"))
|
|
72
|
+
}), A = k({
|
|
73
73
|
name: "SingleQuotedString",
|
|
74
74
|
pattern: /'(''|[^'])*'/
|
|
75
|
-
}),
|
|
75
|
+
}), f = k({
|
|
76
76
|
name: "SheetQuoted",
|
|
77
77
|
pattern: /'(?:''|[^'])*?'!/
|
|
78
|
-
}),
|
|
78
|
+
}), C = k({
|
|
79
79
|
name: "Sheet",
|
|
80
80
|
pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
|
|
81
|
-
}),
|
|
81
|
+
}), T = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, U = k({
|
|
82
82
|
name: "NamedToken",
|
|
83
83
|
pattern: { exec: (e, t) => {
|
|
84
|
-
|
|
85
|
-
const s =
|
|
84
|
+
T.lastIndex = t;
|
|
85
|
+
const s = T.exec(e);
|
|
86
86
|
if (!s) return null;
|
|
87
87
|
let r = s[0];
|
|
88
88
|
const i = r.indexOf(".:");
|
|
@@ -185,7 +185,7 @@ var y = class e {
|
|
|
185
185
|
}), le = k({
|
|
186
186
|
name: "ArrayAnchorOp",
|
|
187
187
|
pattern: /#/,
|
|
188
|
-
longer_alt: [
|
|
188
|
+
longer_alt: [_, L]
|
|
189
189
|
}), ue = k({
|
|
190
190
|
name: "GtOp",
|
|
191
191
|
pattern: />/
|
|
@@ -198,14 +198,14 @@ var y = class e {
|
|
|
198
198
|
}), ge = [
|
|
199
199
|
h,
|
|
200
200
|
l,
|
|
201
|
+
f,
|
|
202
|
+
A,
|
|
201
203
|
C,
|
|
202
|
-
L,
|
|
203
|
-
T,
|
|
204
204
|
u,
|
|
205
205
|
c,
|
|
206
206
|
p,
|
|
207
|
-
O,
|
|
208
207
|
_,
|
|
208
|
+
L,
|
|
209
209
|
y,
|
|
210
210
|
...n !== i ? [$] : [],
|
|
211
211
|
Y,
|
|
@@ -355,28 +355,28 @@ function V(e) {
|
|
|
355
355
|
return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
356
356
|
}
|
|
357
357
|
var j = class {
|
|
358
|
-
constructor(e =
|
|
358
|
+
constructor(e = m) {
|
|
359
359
|
const t = function(e) {
|
|
360
|
-
const t = [...
|
|
360
|
+
const t = [...s];
|
|
361
361
|
if (e) for (const s of Object.values(e)) {
|
|
362
362
|
const e = s?.trim();
|
|
363
363
|
e && !t.some((t) => t.toLowerCase() === e.toLowerCase()) && t.push(e);
|
|
364
364
|
}
|
|
365
365
|
return t.sort((e, t) => t.length - e.length), t.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
366
|
-
}(e.specifiers),
|
|
366
|
+
}(e.specifiers), r = k({
|
|
367
367
|
name: "WhiteSpace",
|
|
368
368
|
pattern: /\s+/,
|
|
369
369
|
group: v.SKIPPED
|
|
370
|
-
}),
|
|
370
|
+
}), i = k({
|
|
371
371
|
name: "TableSpecifier",
|
|
372
372
|
pattern: new RegExp(`\\[#(?:${t})\\]`, "i")
|
|
373
|
-
}),
|
|
374
|
-
s,
|
|
373
|
+
}), n = [
|
|
375
374
|
r,
|
|
375
|
+
i,
|
|
376
376
|
k({
|
|
377
377
|
name: "BracketedColumn",
|
|
378
378
|
pattern: /\[(?:'['#[\]]|'(?!['#[\]])|[^'[\]])*\]/,
|
|
379
|
-
longer_alt: [
|
|
379
|
+
longer_alt: [i]
|
|
380
380
|
}),
|
|
381
381
|
k({
|
|
382
382
|
name: "BareSpecifier",
|
|
@@ -391,11 +391,11 @@ var j = class {
|
|
|
391
391
|
pattern: new RegExp(e.separators.separatorFunction.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
|
|
392
392
|
})
|
|
393
393
|
];
|
|
394
|
-
this._lexer = new v(
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}), this._vocabulary =
|
|
394
|
+
this._lexer = new v(n, { ensureOptimizations: !0 });
|
|
395
|
+
const o = {};
|
|
396
|
+
n.forEach((e) => {
|
|
397
|
+
o[e.name] = e;
|
|
398
|
+
}), this._vocabulary = o;
|
|
399
399
|
}
|
|
400
400
|
getVocabulary() {
|
|
401
401
|
return this._vocabulary;
|
|
@@ -404,7 +404,7 @@ var j = class {
|
|
|
404
404
|
return this._lexer.tokenize(e);
|
|
405
405
|
}
|
|
406
406
|
}, Q = class extends b {
|
|
407
|
-
constructor(e =
|
|
407
|
+
constructor(e = m) {
|
|
408
408
|
const t = new j(e), s = t.getVocabulary();
|
|
409
409
|
super(s, {
|
|
410
410
|
nodeLocationTracking: "none",
|
|
@@ -412,83 +412,83 @@ var j = class {
|
|
|
412
412
|
skipValidations: !0,
|
|
413
413
|
recoveryEnabled: !1
|
|
414
414
|
}), this._lexer = t;
|
|
415
|
-
const { TableSpecifier: r, BracketedColumn: i, BareSpecifier: n, ColumnSep:
|
|
416
|
-
|
|
417
|
-
const e = [], t =
|
|
418
|
-
return
|
|
415
|
+
const { TableSpecifier: r, BracketedColumn: i, BareSpecifier: n, ColumnSep: o, ListSep: a } = s, h = this;
|
|
416
|
+
h.RULE("ruleContent", () => {
|
|
417
|
+
const e = [], t = h.SUBRULE(h.ruleItem);
|
|
418
|
+
return h.ACTION(() => {
|
|
419
419
|
t && e.push(t);
|
|
420
|
-
}),
|
|
421
|
-
|
|
422
|
-
const t =
|
|
423
|
-
|
|
420
|
+
}), h.MANY(() => {
|
|
421
|
+
h.CONSUME(a), h.OPTION(() => {
|
|
422
|
+
const t = h.SUBRULE2(h.ruleItem);
|
|
423
|
+
h.ACTION(() => {
|
|
424
424
|
t && e.push(t);
|
|
425
425
|
});
|
|
426
426
|
});
|
|
427
427
|
}), e;
|
|
428
|
-
}),
|
|
429
|
-
const t =
|
|
430
|
-
return
|
|
431
|
-
const s =
|
|
428
|
+
}), h.RULE("ruleItem", () => h.OR([{ ALT: () => h.SUBRULE(h.ruleSpecifier) }, { ALT: () => h.SUBRULE(h.ruleColumnOrRange) }])), h.RULE("ruleSpecifier", () => h.OR([{ ALT: () => {
|
|
429
|
+
const t = h.CONSUME(r);
|
|
430
|
+
return h.ACTION(() => {
|
|
431
|
+
const s = d(t.image, e);
|
|
432
432
|
return s.image = t.image, s;
|
|
433
433
|
});
|
|
434
434
|
} }, { ALT: () => {
|
|
435
|
-
const t =
|
|
436
|
-
return
|
|
437
|
-
const s =
|
|
435
|
+
const t = h.CONSUME(n);
|
|
436
|
+
return h.ACTION(() => {
|
|
437
|
+
const s = d(t.image, e);
|
|
438
438
|
return s.image = t.image, s;
|
|
439
439
|
});
|
|
440
|
-
} }])),
|
|
441
|
-
const e =
|
|
440
|
+
} }])), h.RULE("ruleColumnOrRange", () => {
|
|
441
|
+
const e = h.CONSUME(i);
|
|
442
442
|
let t, s;
|
|
443
|
-
return
|
|
444
|
-
t =
|
|
445
|
-
}),
|
|
446
|
-
const r =
|
|
443
|
+
return h.OPTION(() => {
|
|
444
|
+
t = h.CONSUME(o), s = h.CONSUME2(i);
|
|
445
|
+
}), h.ACTION(() => {
|
|
446
|
+
const r = O(e.image);
|
|
447
447
|
if (r.image = e.image, !s) return r;
|
|
448
|
-
const i =
|
|
448
|
+
const i = O(s.image);
|
|
449
449
|
i.image = s.image;
|
|
450
|
-
const n =
|
|
450
|
+
const n = U(":", r, i, !0);
|
|
451
451
|
return n.image = t?.image ?? ":", n;
|
|
452
452
|
});
|
|
453
|
-
}),
|
|
453
|
+
}), h.performSelfAnalysis();
|
|
454
454
|
}
|
|
455
455
|
_parseInner(e) {
|
|
456
456
|
const t = this._lexer.tokenize(e);
|
|
457
457
|
return t.errors.length > 0 || 0 === t.tokens.length ? [] : (this.input = t.tokens, this.reset(), this.ruleContent() ?? []);
|
|
458
458
|
}
|
|
459
|
-
_parseContent(
|
|
459
|
+
_parseContent(e) {
|
|
460
|
+
if (!e) return [];
|
|
461
|
+
const t = e.trim();
|
|
460
462
|
if (!t) return [];
|
|
461
|
-
const s = t
|
|
462
|
-
if (
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
const t = e("@", null, !0);
|
|
468
|
-
return t.image = "@", [t];
|
|
463
|
+
const s = t[0];
|
|
464
|
+
if ("@" === s) {
|
|
465
|
+
const e = t.slice(1).trim();
|
|
466
|
+
if (!e) {
|
|
467
|
+
const e = _("@", null, !0);
|
|
468
|
+
return e.image = "@", [e];
|
|
469
469
|
}
|
|
470
|
-
if ("[" ===
|
|
471
|
-
const
|
|
472
|
-
if (1 ===
|
|
473
|
-
const
|
|
474
|
-
return
|
|
470
|
+
if ("[" === e.charAt(0)) {
|
|
471
|
+
const t = this._parseInner(e);
|
|
472
|
+
if (1 === t.length && "infix" === t[0].type) {
|
|
473
|
+
const e = _("@", t[0], !0);
|
|
474
|
+
return e.image = "@", [e];
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
return
|
|
477
|
+
const s = O(e);
|
|
478
|
+
s.image = e;
|
|
479
|
+
const r = _("@", s, !0);
|
|
480
|
+
return r.image = "@", [r];
|
|
481
481
|
}
|
|
482
|
-
if ("[" !==
|
|
483
|
-
const
|
|
484
|
-
return
|
|
482
|
+
if ("[" !== s && "#" !== s) {
|
|
483
|
+
const t = O(e);
|
|
484
|
+
return t.image = e, [t];
|
|
485
485
|
}
|
|
486
|
-
return this._parseInner(
|
|
486
|
+
return this._parseInner(t);
|
|
487
487
|
}
|
|
488
488
|
parse(e, t, s) {
|
|
489
489
|
this.reset();
|
|
490
490
|
const r = () => ({
|
|
491
|
-
root:
|
|
491
|
+
root: T("", []),
|
|
492
492
|
errors: []
|
|
493
493
|
});
|
|
494
494
|
if (!s) return r();
|
|
@@ -501,7 +501,7 @@ var j = class {
|
|
|
501
501
|
if (-1 === n) return r();
|
|
502
502
|
const o = s.slice(0, n), a = s.slice(n + 1, -1), h = this._parseContent(a);
|
|
503
503
|
return {
|
|
504
|
-
root:
|
|
504
|
+
root: T(o, h),
|
|
505
505
|
errors: this.errors.length > 0 ? [...this.errors] : []
|
|
506
506
|
};
|
|
507
507
|
}
|
|
@@ -516,7 +516,7 @@ var j = class {
|
|
|
516
516
|
":."
|
|
517
517
|
]), K = (e) => {
|
|
518
518
|
if (!e) return null;
|
|
519
|
-
if (e.type ===
|
|
519
|
+
if (e.type === R.Cell) {
|
|
520
520
|
const t = e.value;
|
|
521
521
|
return t.rowIndex === Number.MIN_SAFE_INTEGER ? "col" : t.colIndex === Number.MIN_SAFE_INTEGER ? "row" : null;
|
|
522
522
|
}
|
|
@@ -546,130 +546,136 @@ var te = {
|
|
|
546
546
|
return e.expected === P && t ? `Unexpected '${t}'` : w.buildMismatchTokenMessage(e);
|
|
547
547
|
}
|
|
548
548
|
}, se = class extends b {
|
|
549
|
-
constructor(
|
|
550
|
-
const
|
|
549
|
+
constructor(s) {
|
|
550
|
+
const m = s?.lexer ?? y.shared(s?.lexerOptions), O = m.getVocabulary();
|
|
551
551
|
super(O, {
|
|
552
552
|
skipValidations: !0,
|
|
553
553
|
recoveryEnabled: !0,
|
|
554
|
-
...
|
|
554
|
+
...s,
|
|
555
555
|
nodeLocationTracking: "full",
|
|
556
556
|
errorMessageProvider: te,
|
|
557
557
|
maxLookahead: 1
|
|
558
558
|
}), this._ruleInfixOp = this.RULE("ruleInfixOp", () => {
|
|
559
|
-
const { PlusOp: e, MinOp: t, MulOp: s, DivOp: r, ExOp:
|
|
560
|
-
return
|
|
561
|
-
const
|
|
559
|
+
const { PlusOp: e, MinOp: t, MulOp: s, DivOp: r, ExOp: i, ConcatOp: n, GtOp: a, EqOp: h, LtOp: l, NeqOp: u, GteOp: c, LteOp: p } = this._vocab, g = [];
|
|
560
|
+
return g.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
|
|
561
|
+
const o = this.OR(this._c1 || (this._c1 = [
|
|
562
562
|
{ ALT: () => this.CONSUME(e).image },
|
|
563
563
|
{ ALT: () => this.CONSUME(t).image },
|
|
564
564
|
{ ALT: () => this.CONSUME(s).image },
|
|
565
565
|
{ ALT: () => this.CONSUME(r).image },
|
|
566
|
+
{ ALT: () => this.CONSUME(i).image },
|
|
566
567
|
{ ALT: () => this.CONSUME(n).image },
|
|
567
568
|
{ ALT: () => this.CONSUME(a).image },
|
|
568
569
|
{ ALT: () => this.CONSUME(h).image },
|
|
569
570
|
{ ALT: () => this.CONSUME(l).image },
|
|
570
571
|
{ ALT: () => this.CONSUME(u).image },
|
|
571
572
|
{ ALT: () => this.CONSUME(c).image },
|
|
572
|
-
{ ALT: () => this.CONSUME(p).image }
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
value: i,
|
|
573
|
+
{ ALT: () => this.CONSUME(p).image }
|
|
574
|
+
])), m = {
|
|
575
|
+
value: o,
|
|
576
576
|
index: this.getLexerPosition(),
|
|
577
|
-
isRange:
|
|
577
|
+
isRange: f.includes(o)
|
|
578
578
|
}, O = this.SUBRULE2(this._rulePostfixOp);
|
|
579
|
-
|
|
580
|
-
op:
|
|
579
|
+
g.push({
|
|
580
|
+
op: m,
|
|
581
581
|
node: O
|
|
582
582
|
});
|
|
583
583
|
}), this.ACTION(() => {
|
|
584
|
-
let e =
|
|
585
|
-
const t =
|
|
584
|
+
let e = g.length - 1;
|
|
585
|
+
const t = o.length;
|
|
586
586
|
for (let s = 0; e > 0 && s < t; s++) {
|
|
587
|
-
const t =
|
|
587
|
+
const t = o[s];
|
|
588
588
|
let r = 1;
|
|
589
|
-
for (; r <
|
|
590
|
-
const s =
|
|
589
|
+
for (; r < g.length;) {
|
|
590
|
+
const s = g[r].op;
|
|
591
591
|
if (t.includes(s.value)) {
|
|
592
|
-
const t =
|
|
593
|
-
let n =
|
|
594
|
-
n = this._tag(n, s.index),
|
|
592
|
+
const t = g[r - 1].node, i = g[r].node;
|
|
593
|
+
let n = U(s.value, t, i, s.isRange);
|
|
594
|
+
n = this._tag(n, s.index), g[r - 1].node = n, g.splice(r, 1), e--;
|
|
595
595
|
} else r++;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
}),
|
|
598
|
+
}), g[0].node;
|
|
599
599
|
}), this._rulePlusMinusOp = this.RULE("rulePlusMinusOp", () => {
|
|
600
600
|
const { PlusOp: e, MinOp: t } = this._vocab;
|
|
601
601
|
return this.OR([{ ALT: () => this.CONSUME(e) }, { ALT: () => this.CONSUME(t) }]);
|
|
602
602
|
}), this._rulePostfixOp = this.RULE("rulePostfixOp", () => {
|
|
603
|
-
const { PercentOp:
|
|
604
|
-
let
|
|
605
|
-
const
|
|
603
|
+
const { PercentOp: t } = this._vocab;
|
|
604
|
+
let s = this.SUBRULE(this._rulePrefixOp);
|
|
605
|
+
const r = [];
|
|
606
606
|
return this.MANY(() => {
|
|
607
|
-
const
|
|
607
|
+
const e = this.CONSUME(t).image;
|
|
608
608
|
this.ACTION(() => {
|
|
609
|
-
|
|
609
|
+
r.push([e, this.getLexerPosition()]);
|
|
610
610
|
});
|
|
611
611
|
}), this.ACTION(() => {
|
|
612
|
-
const
|
|
613
|
-
if (0 !==
|
|
614
|
-
const
|
|
615
|
-
|
|
612
|
+
const t = r.length;
|
|
613
|
+
if (0 !== t) for (let i = 0; i < t; i++) {
|
|
614
|
+
const t = r[i], n = t[0], o = t[1], a = f.includes(n);
|
|
615
|
+
s = e(n, s, a), s = this._tag(s, o);
|
|
616
616
|
}
|
|
617
|
-
}),
|
|
617
|
+
}), s;
|
|
618
618
|
}), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
|
|
619
|
-
const { PlusOp:
|
|
619
|
+
const { PlusOp: e, MinOp: t, ImplicitIntersectOp: s } = this._vocab, r = [];
|
|
620
620
|
this.MANY(() => {
|
|
621
|
-
const
|
|
621
|
+
const i = this.OR([
|
|
622
|
+
{ ALT: () => this.CONSUME(e).image },
|
|
622
623
|
{ ALT: () => this.CONSUME(t).image },
|
|
623
|
-
{ ALT: () => this.CONSUME(s).image }
|
|
624
|
-
{ ALT: () => this.CONSUME(r).image }
|
|
624
|
+
{ ALT: () => this.CONSUME(s).image }
|
|
625
625
|
]);
|
|
626
626
|
this.ACTION(() => {
|
|
627
|
-
|
|
627
|
+
r.push([i, this.getLexerPosition()]);
|
|
628
628
|
});
|
|
629
629
|
});
|
|
630
|
-
let
|
|
630
|
+
let i = this.SUBRULE(this._ruleRangeOp);
|
|
631
631
|
return this.ACTION(() => {
|
|
632
|
-
const
|
|
633
|
-
if (0 !==
|
|
634
|
-
const
|
|
635
|
-
|
|
632
|
+
const e = r.length;
|
|
633
|
+
if (0 !== e) for (let t = e - 1; t >= 0; t--) {
|
|
634
|
+
const e = r[t], s = e[0], n = e[1], o = f.includes(s);
|
|
635
|
+
i = _(s, i, o), i = this._tag(i, n);
|
|
636
636
|
}
|
|
637
|
-
}),
|
|
637
|
+
}), i;
|
|
638
638
|
}), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
|
|
639
|
-
const { RangeOp:
|
|
640
|
-
return
|
|
641
|
-
this.CONSUME(
|
|
639
|
+
const { RangeOp: t, RangeTrimFullOp: s, RangeTrimLeadingOp: r, RangeTrimTrailingOp: i, ArrayAnchorOp: n } = this._vocab, o = [];
|
|
640
|
+
return o.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
|
|
641
|
+
this.CONSUME(n), o.push({ anchor: this.getLexerPosition() });
|
|
642
642
|
}), this.MANY(() => {
|
|
643
|
-
const
|
|
643
|
+
const e = {
|
|
644
644
|
value: this.OR(this._c2 || (this._c2 = [
|
|
645
|
-
{ ALT: () => this.CONSUME(e).image },
|
|
646
645
|
{ ALT: () => this.CONSUME(t).image },
|
|
647
646
|
{ ALT: () => this.CONSUME(s).image },
|
|
648
|
-
{ ALT: () => this.CONSUME(r).image }
|
|
647
|
+
{ ALT: () => this.CONSUME(r).image },
|
|
648
|
+
{ ALT: () => this.CONSUME(i).image }
|
|
649
649
|
])),
|
|
650
650
|
index: this.getLexerPosition()
|
|
651
651
|
}, a = this.SUBRULE2(this._ruleCallOp);
|
|
652
|
-
|
|
653
|
-
op:
|
|
652
|
+
o.push({
|
|
653
|
+
op: e,
|
|
654
654
|
node: a
|
|
655
655
|
}), this.MANY3(() => {
|
|
656
|
-
this.CONSUME2(
|
|
656
|
+
this.CONSUME2(n), o.push({ anchor: this.getLexerPosition() });
|
|
657
657
|
});
|
|
658
658
|
}), this.ACTION(() => {
|
|
659
|
-
for (let e = 1; e <
|
|
660
|
-
const t =
|
|
661
|
-
if (
|
|
662
|
-
|
|
659
|
+
for (let e = 1; e + 1 < o.length; e++) {
|
|
660
|
+
const t = o[e], s = o[e + 1];
|
|
661
|
+
if (":" !== t.op?.value || ":" !== s.op?.value) continue;
|
|
662
|
+
const r = K(t.node);
|
|
663
|
+
r && K(s.node) === r && K(o[e - 1].node) !== r && (t.node = this._tag(U(":", t.node, s.node, !0), s.op.index), o.splice(e + 1, 1));
|
|
664
|
+
}
|
|
665
|
+
for (let t = 1; t < o.length; t++) {
|
|
666
|
+
const s = o[t];
|
|
667
|
+
if (void 0 !== s.anchor) {
|
|
668
|
+
o[0].node = this._tag(e("#", o[0].node, !0), s.anchor);
|
|
663
669
|
continue;
|
|
664
670
|
}
|
|
665
|
-
const
|
|
666
|
-
let
|
|
667
|
-
|
|
671
|
+
const r = s.op;
|
|
672
|
+
let i = U(r.value, o[0].node, s.node, !0);
|
|
673
|
+
i = this._tag(i, r.index), o[0].node = i;
|
|
668
674
|
}
|
|
669
|
-
}),
|
|
675
|
+
}), o[0].node;
|
|
670
676
|
}), this._ruleCallOp = this.RULE("ruleCallOp", () => {
|
|
671
|
-
const { OpenParen: e, CloseParen:
|
|
672
|
-
let
|
|
677
|
+
const { OpenParen: e, CloseParen: t } = this._vocab;
|
|
678
|
+
let s = this.SUBRULE(this._ruleFormula);
|
|
673
679
|
return this.MANY({
|
|
674
680
|
GATE: () => {
|
|
675
681
|
const t = this.LA(0), s = this.LA(1);
|
|
@@ -677,12 +683,12 @@ var te = {
|
|
|
677
683
|
},
|
|
678
684
|
DEF: () => {
|
|
679
685
|
this.CONSUME(e);
|
|
680
|
-
const
|
|
686
|
+
const r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), n = s, o = this.ACTION(() => this._tag(l(n, i), r)), a = this.OPTION(() => this.CONSUME(t));
|
|
681
687
|
this.ACTION(() => {
|
|
682
|
-
|
|
688
|
+
a || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()), s = o;
|
|
683
689
|
});
|
|
684
690
|
}
|
|
685
|
-
}),
|
|
691
|
+
}), s;
|
|
686
692
|
}), this._ruleIntersectOp = this.RULE("ruleIntersectOp", () => {
|
|
687
693
|
const e = [this.SUBRULE(this._ruleInfixOp)];
|
|
688
694
|
return this.MANY(() => {
|
|
@@ -699,14 +705,14 @@ var te = {
|
|
|
699
705
|
for (; e.length > 1;) {
|
|
700
706
|
let t = e.length - 1;
|
|
701
707
|
for (let s = 0; s < t; s++) {
|
|
702
|
-
const r = e[s], i = e[s + 1], n =
|
|
703
|
-
|
|
704
|
-
const
|
|
705
|
-
if (void 0 !==
|
|
706
|
-
const e = this.input[
|
|
708
|
+
const r = e[s], i = e[s + 1], n = U(" ", r, i, !0), o = this._tokenMap.get(r);
|
|
709
|
+
o && delete o.tokenIndexClose;
|
|
710
|
+
const a = this._tokenMap.get(i), h = a?.tokenIndex;
|
|
711
|
+
if (void 0 !== h) {
|
|
712
|
+
const e = this.input[h], t = this.input[h - 1]?.endOffset ?? -1, s = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
|
|
707
713
|
s.length > 0 && (n.wsBefore = s);
|
|
708
714
|
}
|
|
709
|
-
|
|
715
|
+
a && delete a.tokenIndex, s + 1 < t && a && delete a.tokenIndexClose, e.splice(s, 2, n), s--, t--;
|
|
710
716
|
}
|
|
711
717
|
}
|
|
712
718
|
}), e[0];
|
|
@@ -729,16 +735,16 @@ var te = {
|
|
|
729
735
|
}), t;
|
|
730
736
|
}), this._ruleParen = this.RULE("ruleParen", () => {
|
|
731
737
|
const { OpenParen: e, CloseParen: t } = this._vocab;
|
|
732
|
-
return this._processParen(
|
|
738
|
+
return this._processParen(R.Paren, e, t);
|
|
733
739
|
}), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
|
|
734
740
|
const { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: s, RowSeparator: r } = this._vocab;
|
|
735
|
-
let
|
|
741
|
+
let n = c();
|
|
736
742
|
this.CONSUME(e);
|
|
737
|
-
const
|
|
738
|
-
let
|
|
739
|
-
const
|
|
743
|
+
const o = this.getLexerPosition();
|
|
744
|
+
let a = this.ACTION(() => this._tag(i(n), o));
|
|
745
|
+
const h = this.SUBRULE(this._ruleLiteralForArray);
|
|
740
746
|
this.ACTION(() => {
|
|
741
|
-
|
|
747
|
+
n.value.push(h);
|
|
742
748
|
}), this.MANY(() => {
|
|
743
749
|
let e = !1;
|
|
744
750
|
this.OR([{ ALT: () => {
|
|
@@ -746,66 +752,66 @@ var te = {
|
|
|
746
752
|
} }, { ALT: () => this.CONSUME(r) }]);
|
|
747
753
|
const t = this.SUBRULE2(this._ruleLiteralForArray);
|
|
748
754
|
this.ACTION(() => {
|
|
749
|
-
e || (
|
|
755
|
+
e || (n = c(), a.value.push(n)), n.value.push(t);
|
|
750
756
|
});
|
|
751
757
|
});
|
|
752
|
-
const
|
|
753
|
-
return
|
|
758
|
+
const l = this.OPTION(() => this.CONSUME(t));
|
|
759
|
+
return a = this.ACTION(() => (l || this._reportError(a, "Missing closing parenthesis '}'", o), this._tagClose(a, this.getLexerPosition()))), a;
|
|
754
760
|
}), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
|
|
755
|
-
const { StringToken: e, BooleanToken:
|
|
761
|
+
const { StringToken: e, BooleanToken: s, LiteralError: r, RefError: i } = this._vocab;
|
|
756
762
|
return this.OR([
|
|
757
763
|
{ ALT: () => {
|
|
758
|
-
const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(
|
|
759
|
-
return this.ACTION(() => e ?
|
|
764
|
+
const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(a(t.image, this._locale), this.getLexerPosition()));
|
|
765
|
+
return this.ACTION(() => e ? x(e.image, s) : s);
|
|
760
766
|
} },
|
|
761
767
|
{ ALT: () => {
|
|
762
768
|
const t = this.CONSUME(e);
|
|
763
|
-
return this.ACTION(() => this._tag(
|
|
764
|
-
} },
|
|
765
|
-
{ ALT: () => {
|
|
766
|
-
const e = this.CONSUME(t);
|
|
767
|
-
return this.ACTION(() => this._tag(I(e.image, this._locale), this.getLexerPosition()));
|
|
769
|
+
return this.ACTION(() => this._tag(A(t.image), this.getLexerPosition()));
|
|
768
770
|
} },
|
|
769
771
|
{ ALT: () => {
|
|
770
772
|
const e = this.CONSUME(s);
|
|
771
|
-
return this.ACTION(() => this._tag(
|
|
773
|
+
return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
|
|
772
774
|
} },
|
|
773
775
|
{ ALT: () => {
|
|
774
776
|
const e = this.CONSUME(r);
|
|
775
|
-
return this.ACTION(() => this._tag(
|
|
777
|
+
return this.ACTION(() => this._tag(p(e.image, this._locale), this.getLexerPosition()));
|
|
778
|
+
} },
|
|
779
|
+
{ ALT: () => {
|
|
780
|
+
const e = this.CONSUME(i);
|
|
781
|
+
return this.ACTION(() => this._tag(C(e.image, this._locale), this.getLexerPosition()));
|
|
776
782
|
} }
|
|
777
783
|
]);
|
|
778
784
|
}), this._ruleLiteral = this.RULE("ruleLiteral", () => {
|
|
779
|
-
const { StringToken: e, BooleanToken:
|
|
785
|
+
const { StringToken: e, BooleanToken: s, LiteralError: r, RefError: i } = this._vocab;
|
|
780
786
|
return this.OR([
|
|
781
787
|
{ ALT: () => {
|
|
782
788
|
const e = this.SUBRULE(this._ruleNumber);
|
|
783
|
-
return this.ACTION(() => this._tag(
|
|
789
|
+
return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
|
|
784
790
|
} },
|
|
785
791
|
{ ALT: () => {
|
|
786
792
|
const t = this.CONSUME(e);
|
|
787
|
-
return this.ACTION(() => this._tag(
|
|
788
|
-
} },
|
|
789
|
-
{ ALT: () => {
|
|
790
|
-
const e = this.CONSUME(t);
|
|
791
|
-
return this.ACTION(() => this._tag(I(e.image, this._locale), this.getLexerPosition()));
|
|
793
|
+
return this.ACTION(() => this._tag(A(t.image), this.getLexerPosition()));
|
|
792
794
|
} },
|
|
793
795
|
{ ALT: () => {
|
|
794
796
|
const e = this.CONSUME(s);
|
|
795
|
-
return this.ACTION(() => this._tag(
|
|
797
|
+
return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
|
|
796
798
|
} },
|
|
797
799
|
{ ALT: () => {
|
|
798
800
|
const e = this.CONSUME(r);
|
|
799
|
-
return this.ACTION(() => this._tag(
|
|
801
|
+
return this.ACTION(() => this._tag(p(e.image, this._locale), this.getLexerPosition()));
|
|
802
|
+
} },
|
|
803
|
+
{ ALT: () => {
|
|
804
|
+
const e = this.CONSUME(i);
|
|
805
|
+
return this.ACTION(() => this._tag(C(e.image, this._locale), this.getLexerPosition()));
|
|
800
806
|
} }
|
|
801
807
|
]);
|
|
802
808
|
}), this._ruleFunction = this.RULE("ruleFunction", () => {
|
|
803
|
-
const { FunctionToken: e, OpenParen: t, CloseParen:
|
|
809
|
+
const { FunctionToken: e, OpenParen: t, CloseParen: s } = this._vocab, r = this.CONSUME(e).image, i = this.getLexerPosition();
|
|
804
810
|
this.CONSUME(t);
|
|
805
811
|
const o = this.SUBRULE(this._ruleFunctionArguments);
|
|
806
|
-
let a = this.ACTION(() => this._tag(
|
|
807
|
-
const h = this.OPTION(() => this.CONSUME(
|
|
808
|
-
return a = this.ACTION(() => (h || this._reportError(a, "Missing closing parenthesis ')'",
|
|
812
|
+
let a = this.ACTION(() => this._tag(n(r, o), i));
|
|
813
|
+
const h = this.OPTION(() => this.CONSUME(s));
|
|
814
|
+
return a = this.ACTION(() => (h || this._reportError(a, "Missing closing parenthesis ')'", i), this._tagClose(a, this.getLexerPosition()))), a;
|
|
809
815
|
}), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
|
|
810
816
|
const { ArgSeparator: e, CloseParen: t } = this._vocab, s = [];
|
|
811
817
|
return this.OPTION({
|
|
@@ -814,11 +820,11 @@ var te = {
|
|
|
814
820
|
let t;
|
|
815
821
|
this.OPTION2(() => {
|
|
816
822
|
t = this.SUBRULE(this._ruleIntersectOp);
|
|
817
|
-
}), t = this.ACTION(() => t ?? this._tagClose(
|
|
823
|
+
}), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), s.push(t), this.MANY(() => {
|
|
818
824
|
let t;
|
|
819
825
|
this.CONSUME(e), this.OPTION3(() => {
|
|
820
826
|
t = this.SUBRULE2(this._ruleIntersectOp);
|
|
821
|
-
}), t = this.ACTION(() => t ?? this._tagClose(
|
|
827
|
+
}), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), s.push(t);
|
|
822
828
|
});
|
|
823
829
|
}
|
|
824
830
|
}), s;
|
|
@@ -837,62 +843,62 @@ var te = {
|
|
|
837
843
|
return this._tag(e.root, s);
|
|
838
844
|
});
|
|
839
845
|
}), this._ruleReference = this.RULE("ruleReference", () => {
|
|
840
|
-
const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp:
|
|
841
|
-
let
|
|
846
|
+
const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp: r, PlusOp: i, MinOp: n, ArgSeparator: o, Cell: a, NamedToken: l, SingleQuotedString: c, Column: p, AbsRow: m, DigitToken: O, RefError: _ } = this._vocab;
|
|
847
|
+
let E, L;
|
|
842
848
|
this.OPTION2({
|
|
843
849
|
GATE: () => {
|
|
844
|
-
for (let
|
|
845
|
-
const h = this.LA(
|
|
850
|
+
for (let a = 1; a < 6; a++) {
|
|
851
|
+
const h = this.LA(a);
|
|
846
852
|
if (h.tokenType === e || h.tokenType === t) return !0;
|
|
847
|
-
if ("" === h.image || ")" === h.image || h.tokenType === s || h.tokenType ===
|
|
853
|
+
if ("" === h.image || ")" === h.image || h.tokenType === s || h.tokenType === r || h.tokenType === i || h.tokenType === n || h.tokenType === o) break;
|
|
848
854
|
}
|
|
849
855
|
return !1;
|
|
850
856
|
},
|
|
851
857
|
DEF: () => {
|
|
852
|
-
|
|
858
|
+
L = this.getLexerPosition() + 1, E = this.SUBRULE(this._rulePrefixSheetName);
|
|
853
859
|
}
|
|
854
860
|
});
|
|
855
861
|
let A = this.OR([
|
|
856
862
|
{ ALT: () => {
|
|
857
|
-
const e = this.CONSUME(
|
|
858
|
-
return this.ACTION(() => this._tag(
|
|
863
|
+
const e = this.CONSUME(a), t = this.getLexerPosition();
|
|
864
|
+
return this.ACTION(() => this._tag(h(e.image, this.rowIndex, this.colIndex), t));
|
|
859
865
|
} },
|
|
860
866
|
{ ALT: () => {
|
|
861
867
|
const e = this.OR2([{ ALT: () => this.CONSUME(l) }, { ALT: () => this.CONSUME(c) }]);
|
|
862
|
-
return this.ACTION(() => this._tag(
|
|
868
|
+
return this.ACTION(() => this._tag(g(e.image), this.getLexerPosition()));
|
|
863
869
|
} },
|
|
864
870
|
{ ALT: () => this.SUBRULE(this._ruleBracketedString) },
|
|
865
871
|
{ ALT: () => this.SUBRULE(this._ruleFunction) },
|
|
866
872
|
{ ALT: () => {
|
|
867
|
-
const e = this.CONSUME(
|
|
873
|
+
const e = this.CONSUME(p);
|
|
868
874
|
return this.ACTION(() => this._tag(u(e.image, this.colIndex), this.getLexerPosition()));
|
|
869
875
|
} },
|
|
870
876
|
{ ALT: () => {
|
|
871
877
|
const e = this.CONSUME(m);
|
|
872
|
-
return this.ACTION(() => this._tag(
|
|
878
|
+
return this.ACTION(() => this._tag(S(e.image, this.rowIndex), this.getLexerPosition()));
|
|
873
879
|
} },
|
|
874
880
|
{ ALT: () => {
|
|
875
881
|
const e = this.CONSUME(O);
|
|
876
|
-
return this.ACTION(() => this._tag(
|
|
882
|
+
return this.ACTION(() => this._tag(S(e.image, this.rowIndex), this.getLexerPosition()));
|
|
877
883
|
} },
|
|
878
884
|
{ ALT: () => {
|
|
879
|
-
const e = this.CONSUME(
|
|
880
|
-
return this.ACTION(() => this._tag(
|
|
885
|
+
const e = this.CONSUME(_);
|
|
886
|
+
return this.ACTION(() => this._tag(C(e.image, this._locale), this.getLexerPosition()));
|
|
881
887
|
} }
|
|
882
888
|
]);
|
|
883
889
|
return this.ACTION(() => {
|
|
884
|
-
if (
|
|
885
|
-
if ("" ===
|
|
890
|
+
if (E && A) {
|
|
891
|
+
if ("" === E.name) return void this._reportError(A, `'${E.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
|
|
886
892
|
let e = A;
|
|
887
|
-
if (A.type ===
|
|
888
|
-
e.value.scope =
|
|
893
|
+
if (A.type === R.Postfix && A.inputs?.[0] && (e = A.inputs[0]), e.type === R.Cell || e.type === R.Named || e.type === R.Row || e.type === R.TableColumn || e.type === R.Error) {
|
|
894
|
+
e.value.scope = E.name, e.value.scopeImage = E.image;
|
|
889
895
|
const t = this._tokenMap.get(e);
|
|
890
|
-
t && void 0 !==
|
|
896
|
+
t && void 0 !== L && (t.tokenIndex = L);
|
|
891
897
|
}
|
|
892
898
|
}
|
|
893
899
|
}), A;
|
|
894
900
|
}), this._rulePrefixSheetName = this.RULE("rulePrefixSheetName", () => {
|
|
895
|
-
const { SheetQuoted: e, BracketedString: t, NamedToken: s,
|
|
901
|
+
const { SheetQuoted: e, BracketedString: t, NamedToken: s, Column: r, RangeOp: i, Sheet: n } = this._vocab;
|
|
896
902
|
return this.OR([{ ALT: () => {
|
|
897
903
|
const t = this.CONSUME(e).image;
|
|
898
904
|
return {
|
|
@@ -904,15 +910,18 @@ var te = {
|
|
|
904
910
|
this.OPTION(() => {
|
|
905
911
|
e += this.CONSUME(t).image;
|
|
906
912
|
}), this.OPTION2({
|
|
907
|
-
GATE: () => this.LA(2).tokenType ===
|
|
913
|
+
GATE: () => this.LA(2).tokenType === i,
|
|
908
914
|
DEF: () => {
|
|
909
|
-
e += this.
|
|
915
|
+
e += this.OR2([{ ALT: () => this.CONSUME(s).image }, {
|
|
916
|
+
GATE: () => 36 !== this.LA(1).image.charCodeAt(0),
|
|
917
|
+
ALT: () => this.CONSUME(r).image
|
|
918
|
+
}]), this.CONSUME(i), e += ":";
|
|
910
919
|
}
|
|
911
920
|
});
|
|
912
|
-
const
|
|
921
|
+
const o = this.CONSUME(n).image;
|
|
913
922
|
return {
|
|
914
|
-
name: e +
|
|
915
|
-
image: e +
|
|
923
|
+
name: e + o.slice(0, -1),
|
|
924
|
+
image: e + o
|
|
916
925
|
};
|
|
917
926
|
} }]);
|
|
918
927
|
}), this._ruleNumber = this.RULE("ruleNumber", () => {
|
|
@@ -927,12 +936,12 @@ var te = {
|
|
|
927
936
|
return this.MANY(() => {
|
|
928
937
|
this.CONSUME(e), s.push(this.SUBRULE2(this._ruleIntersectOp));
|
|
929
938
|
}), this.ACTION(() => 0 === s.length ? t : {
|
|
930
|
-
type:
|
|
939
|
+
type: R.List,
|
|
931
940
|
value: ",",
|
|
932
941
|
inputs: [t, ...s],
|
|
933
942
|
isReference: !0
|
|
934
943
|
});
|
|
935
|
-
}), this._lexer =
|
|
944
|
+
}), this._lexer = m, this._locale = m.getLocale(), this._vocab = O, this._srParser = s?.srParser ?? new Q(this._locale), this.performSelfAnalysis();
|
|
936
945
|
}
|
|
937
946
|
getLexer() {
|
|
938
947
|
return this._lexer;
|
|
@@ -942,26 +951,26 @@ var te = {
|
|
|
942
951
|
let i;
|
|
943
952
|
if (!r) return {
|
|
944
953
|
root: {
|
|
945
|
-
type:
|
|
954
|
+
type: R.Unparsed,
|
|
946
955
|
value: s
|
|
947
956
|
},
|
|
948
957
|
errors: []
|
|
949
958
|
};
|
|
950
959
|
const n = r.tokens;
|
|
951
960
|
if (0 === n.length) throw new M.Parse(J);
|
|
952
|
-
return this.input = n, this._inputText = s, this._inputTextLength = s.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i =
|
|
953
|
-
const r = t.type, i = s?.isReference ? s.value : void 0, n = "string" == typeof i && Z.has(i), o = "string" == typeof i && q.has(i), a = n ? s.inputs : void 0, h = a ? a[0] === t ? a[1] : a[0] : void 0,
|
|
954
|
-
if (n && r !==
|
|
955
|
-
const s =
|
|
956
|
-
return
|
|
961
|
+
return this.input = n, this._inputText = s, this._inputTextLength = s.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = L(i, (t, s) => {
|
|
962
|
+
const r = t.type, i = s?.isReference ? s.value : void 0, n = "string" == typeof i && Z.has(i), o = "string" == typeof i && q.has(i), a = n ? s.inputs : void 0, h = a ? a[0] === t ? a[1] : a[0] : void 0, l = this._lexer.getMaxRow();
|
|
963
|
+
if (n && r !== R.Cell && Number.isInteger(t.value)) {
|
|
964
|
+
const s = S(t.image, e);
|
|
965
|
+
return I(s, t), "row" !== K(h) ? this._reportError(s, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`) : H(t.image, l) || this._reportError(s, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), s;
|
|
957
966
|
}
|
|
958
|
-
if (o && r ===
|
|
959
|
-
if (r ===
|
|
967
|
+
if (o && r === R.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
|
|
968
|
+
if (r === R.Cell) {
|
|
960
969
|
const e = t.value, s = e.colIndex === Number.MIN_SAFE_INTEGER, r = e.rowIndex === Number.MIN_SAFE_INTEGER;
|
|
961
|
-
if ((s || r) && K(h) === (s ? "row" : "col")) return s && !H(t.image,
|
|
970
|
+
if ((s || r) && K(h) === (s ? "row" : "col")) return s && !H(t.image, l) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), t;
|
|
962
971
|
if (s || r || e.colIndex >= 16384) {
|
|
963
|
-
const n =
|
|
964
|
-
|
|
972
|
+
const n = g(t.image);
|
|
973
|
+
I(n, t);
|
|
965
974
|
const a = e.scope;
|
|
966
975
|
return a && (n.value.scope = a, n.value.scopeImage = e.scopeImage), s ? this._reportError(n, `'${t.image}' is not a valid reference — a row needs a column (use ${t.image}:${t.image} for the whole row)`) : r && t.image.includes("$") ? this._reportError(n, `'${t.image}' is not a valid reference — a whole column can only pair with another column (as in ${t.image}:${t.image})`) : o && this._reportError(n, `'${t.image}' is a name — '${i}' needs a cell or range on both sides`), n;
|
|
967
976
|
}
|
|
@@ -1024,7 +1033,7 @@ var te = {
|
|
|
1024
1033
|
_bindAllWhitespace(e) {
|
|
1025
1034
|
if (e) {
|
|
1026
1035
|
if (this._bindNodeWhitespace(e), e.inputs) for (const t of e.inputs) t && this._bindAllWhitespace(t);
|
|
1027
|
-
if (e.type ===
|
|
1036
|
+
if (e.type === R.Array && Array.isArray(e.value)) {
|
|
1028
1037
|
for (const t of e.value) if (t && Array.isArray(t.value)) for (const e of t.value) e && this._bindAllWhitespace(e);
|
|
1029
1038
|
}
|
|
1030
1039
|
}
|