@odoo/o-spreadsheet 16.2.28 → 16.2.29

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.
@@ -2020,27 +2020,30 @@ function detectFormat(content) {
2020
2020
  }
2021
2021
  function createLargeNumberFormat(format, magnitude, postFix) {
2022
2022
  const internalFormat = parseFormat(format || "#,##0");
2023
- const largeNumberFormat = internalFormat
2024
- .map((formatPart) => {
2025
- if (formatPart.type === "NUMBER") {
2026
- return [
2027
- {
2028
- ...formatPart,
2029
- format: {
2030
- ...formatPart.format,
2031
- magnitude,
2032
- decimalPart: undefined,
2033
- },
2034
- },
2035
- {
2036
- type: "STRING",
2037
- format: postFix,
2038
- },
2039
- ];
2023
+ const largeNumberFormat = [];
2024
+ for (let i = 0; i < internalFormat.length; i++) {
2025
+ const formatPart = internalFormat[i];
2026
+ if (formatPart.type !== "NUMBER") {
2027
+ largeNumberFormat.push(formatPart);
2028
+ continue;
2040
2029
  }
2041
- return formatPart;
2042
- })
2043
- .flat();
2030
+ largeNumberFormat.push({
2031
+ ...formatPart,
2032
+ format: {
2033
+ ...formatPart.format,
2034
+ magnitude,
2035
+ decimalPart: undefined,
2036
+ },
2037
+ });
2038
+ largeNumberFormat.push({
2039
+ type: "STRING",
2040
+ format: postFix,
2041
+ });
2042
+ const nextFormatPart = internalFormat[i + 1];
2043
+ if ((nextFormatPart === null || nextFormatPart === void 0 ? void 0 : nextFormatPart.type) === "STRING" && ["k", "m", "b"].includes(nextFormatPart.format)) {
2044
+ i++;
2045
+ }
2046
+ }
2044
2047
  return convertInternalFormatToFormat(largeNumberFormat);
2045
2048
  }
2046
2049
  function changeDecimalPlaces(format, step) {
@@ -4311,64 +4314,65 @@ var CommandResult;
4311
4314
  CommandResult[CommandResult["InvalidFigureId"] = 28] = "InvalidFigureId";
4312
4315
  CommandResult[CommandResult["InputAlreadyFocused"] = 29] = "InputAlreadyFocused";
4313
4316
  CommandResult[CommandResult["MaximumRangesReached"] = 30] = "MaximumRangesReached";
4314
- CommandResult[CommandResult["InvalidChartDefinition"] = 31] = "InvalidChartDefinition";
4315
- CommandResult[CommandResult["InvalidDataSet"] = 32] = "InvalidDataSet";
4316
- CommandResult[CommandResult["InvalidLabelRange"] = 33] = "InvalidLabelRange";
4317
- CommandResult[CommandResult["InvalidScorecardKeyValue"] = 34] = "InvalidScorecardKeyValue";
4318
- CommandResult[CommandResult["InvalidScorecardBaseline"] = 35] = "InvalidScorecardBaseline";
4319
- CommandResult[CommandResult["InvalidGaugeDataRange"] = 36] = "InvalidGaugeDataRange";
4320
- CommandResult[CommandResult["EmptyGaugeRangeMin"] = 37] = "EmptyGaugeRangeMin";
4321
- CommandResult[CommandResult["GaugeRangeMinNaN"] = 38] = "GaugeRangeMinNaN";
4322
- CommandResult[CommandResult["EmptyGaugeRangeMax"] = 39] = "EmptyGaugeRangeMax";
4323
- CommandResult[CommandResult["GaugeRangeMaxNaN"] = 40] = "GaugeRangeMaxNaN";
4324
- CommandResult[CommandResult["GaugeRangeMinBiggerThanRangeMax"] = 41] = "GaugeRangeMinBiggerThanRangeMax";
4325
- CommandResult[CommandResult["GaugeLowerInflectionPointNaN"] = 42] = "GaugeLowerInflectionPointNaN";
4326
- CommandResult[CommandResult["GaugeUpperInflectionPointNaN"] = 43] = "GaugeUpperInflectionPointNaN";
4327
- CommandResult[CommandResult["GaugeLowerBiggerThanUpper"] = 44] = "GaugeLowerBiggerThanUpper";
4328
- CommandResult[CommandResult["InvalidAutofillSelection"] = 45] = "InvalidAutofillSelection";
4329
- CommandResult[CommandResult["WrongComposerSelection"] = 46] = "WrongComposerSelection";
4330
- CommandResult[CommandResult["MinBiggerThanMax"] = 47] = "MinBiggerThanMax";
4331
- CommandResult[CommandResult["LowerBiggerThanUpper"] = 48] = "LowerBiggerThanUpper";
4332
- CommandResult[CommandResult["MidBiggerThanMax"] = 49] = "MidBiggerThanMax";
4333
- CommandResult[CommandResult["MinBiggerThanMid"] = 50] = "MinBiggerThanMid";
4334
- CommandResult[CommandResult["FirstArgMissing"] = 51] = "FirstArgMissing";
4335
- CommandResult[CommandResult["SecondArgMissing"] = 52] = "SecondArgMissing";
4336
- CommandResult[CommandResult["MinNaN"] = 53] = "MinNaN";
4337
- CommandResult[CommandResult["MidNaN"] = 54] = "MidNaN";
4338
- CommandResult[CommandResult["MaxNaN"] = 55] = "MaxNaN";
4339
- CommandResult[CommandResult["ValueUpperInflectionNaN"] = 56] = "ValueUpperInflectionNaN";
4340
- CommandResult[CommandResult["ValueLowerInflectionNaN"] = 57] = "ValueLowerInflectionNaN";
4341
- CommandResult[CommandResult["MinInvalidFormula"] = 58] = "MinInvalidFormula";
4342
- CommandResult[CommandResult["MidInvalidFormula"] = 59] = "MidInvalidFormula";
4343
- CommandResult[CommandResult["MaxInvalidFormula"] = 60] = "MaxInvalidFormula";
4344
- CommandResult[CommandResult["ValueUpperInvalidFormula"] = 61] = "ValueUpperInvalidFormula";
4345
- CommandResult[CommandResult["ValueLowerInvalidFormula"] = 62] = "ValueLowerInvalidFormula";
4346
- CommandResult[CommandResult["InvalidSortZone"] = 63] = "InvalidSortZone";
4347
- CommandResult[CommandResult["WaitingSessionConfirmation"] = 64] = "WaitingSessionConfirmation";
4348
- CommandResult[CommandResult["MergeOverlap"] = 65] = "MergeOverlap";
4349
- CommandResult[CommandResult["TooManyHiddenElements"] = 66] = "TooManyHiddenElements";
4350
- CommandResult[CommandResult["Readonly"] = 67] = "Readonly";
4351
- CommandResult[CommandResult["InvalidViewportSize"] = 68] = "InvalidViewportSize";
4352
- CommandResult[CommandResult["InvalidScrollingDirection"] = 69] = "InvalidScrollingDirection";
4353
- CommandResult[CommandResult["FigureDoesNotExist"] = 70] = "FigureDoesNotExist";
4354
- CommandResult[CommandResult["InvalidConditionalFormatId"] = 71] = "InvalidConditionalFormatId";
4355
- CommandResult[CommandResult["InvalidCellPopover"] = 72] = "InvalidCellPopover";
4356
- CommandResult[CommandResult["EmptyTarget"] = 73] = "EmptyTarget";
4357
- CommandResult[CommandResult["InvalidFreezeQuantity"] = 74] = "InvalidFreezeQuantity";
4358
- CommandResult[CommandResult["FrozenPaneOverlap"] = 75] = "FrozenPaneOverlap";
4359
- CommandResult[CommandResult["ValuesNotChanged"] = 76] = "ValuesNotChanged";
4360
- CommandResult[CommandResult["InvalidFilterZone"] = 77] = "InvalidFilterZone";
4361
- CommandResult[CommandResult["FilterOverlap"] = 78] = "FilterOverlap";
4362
- CommandResult[CommandResult["FilterNotFound"] = 79] = "FilterNotFound";
4363
- CommandResult[CommandResult["MergeInFilter"] = 80] = "MergeInFilter";
4364
- CommandResult[CommandResult["NonContinuousTargets"] = 81] = "NonContinuousTargets";
4365
- CommandResult[CommandResult["DuplicatedFigureId"] = 82] = "DuplicatedFigureId";
4366
- CommandResult[CommandResult["InvalidSelectionStep"] = 83] = "InvalidSelectionStep";
4367
- CommandResult[CommandResult["DuplicatedChartId"] = 84] = "DuplicatedChartId";
4368
- CommandResult[CommandResult["ChartDoesNotExist"] = 85] = "ChartDoesNotExist";
4369
- CommandResult[CommandResult["InvalidHeaderIndex"] = 86] = "InvalidHeaderIndex";
4370
- CommandResult[CommandResult["InvalidQuantity"] = 87] = "InvalidQuantity";
4371
- CommandResult[CommandResult["NoChanges"] = 88] = "NoChanges";
4317
+ CommandResult[CommandResult["InvalidInputId"] = 31] = "InvalidInputId";
4318
+ CommandResult[CommandResult["InvalidChartDefinition"] = 32] = "InvalidChartDefinition";
4319
+ CommandResult[CommandResult["InvalidDataSet"] = 33] = "InvalidDataSet";
4320
+ CommandResult[CommandResult["InvalidLabelRange"] = 34] = "InvalidLabelRange";
4321
+ CommandResult[CommandResult["InvalidScorecardKeyValue"] = 35] = "InvalidScorecardKeyValue";
4322
+ CommandResult[CommandResult["InvalidScorecardBaseline"] = 36] = "InvalidScorecardBaseline";
4323
+ CommandResult[CommandResult["InvalidGaugeDataRange"] = 37] = "InvalidGaugeDataRange";
4324
+ CommandResult[CommandResult["EmptyGaugeRangeMin"] = 38] = "EmptyGaugeRangeMin";
4325
+ CommandResult[CommandResult["GaugeRangeMinNaN"] = 39] = "GaugeRangeMinNaN";
4326
+ CommandResult[CommandResult["EmptyGaugeRangeMax"] = 40] = "EmptyGaugeRangeMax";
4327
+ CommandResult[CommandResult["GaugeRangeMaxNaN"] = 41] = "GaugeRangeMaxNaN";
4328
+ CommandResult[CommandResult["GaugeRangeMinBiggerThanRangeMax"] = 42] = "GaugeRangeMinBiggerThanRangeMax";
4329
+ CommandResult[CommandResult["GaugeLowerInflectionPointNaN"] = 43] = "GaugeLowerInflectionPointNaN";
4330
+ CommandResult[CommandResult["GaugeUpperInflectionPointNaN"] = 44] = "GaugeUpperInflectionPointNaN";
4331
+ CommandResult[CommandResult["GaugeLowerBiggerThanUpper"] = 45] = "GaugeLowerBiggerThanUpper";
4332
+ CommandResult[CommandResult["InvalidAutofillSelection"] = 46] = "InvalidAutofillSelection";
4333
+ CommandResult[CommandResult["WrongComposerSelection"] = 47] = "WrongComposerSelection";
4334
+ CommandResult[CommandResult["MinBiggerThanMax"] = 48] = "MinBiggerThanMax";
4335
+ CommandResult[CommandResult["LowerBiggerThanUpper"] = 49] = "LowerBiggerThanUpper";
4336
+ CommandResult[CommandResult["MidBiggerThanMax"] = 50] = "MidBiggerThanMax";
4337
+ CommandResult[CommandResult["MinBiggerThanMid"] = 51] = "MinBiggerThanMid";
4338
+ CommandResult[CommandResult["FirstArgMissing"] = 52] = "FirstArgMissing";
4339
+ CommandResult[CommandResult["SecondArgMissing"] = 53] = "SecondArgMissing";
4340
+ CommandResult[CommandResult["MinNaN"] = 54] = "MinNaN";
4341
+ CommandResult[CommandResult["MidNaN"] = 55] = "MidNaN";
4342
+ CommandResult[CommandResult["MaxNaN"] = 56] = "MaxNaN";
4343
+ CommandResult[CommandResult["ValueUpperInflectionNaN"] = 57] = "ValueUpperInflectionNaN";
4344
+ CommandResult[CommandResult["ValueLowerInflectionNaN"] = 58] = "ValueLowerInflectionNaN";
4345
+ CommandResult[CommandResult["MinInvalidFormula"] = 59] = "MinInvalidFormula";
4346
+ CommandResult[CommandResult["MidInvalidFormula"] = 60] = "MidInvalidFormula";
4347
+ CommandResult[CommandResult["MaxInvalidFormula"] = 61] = "MaxInvalidFormula";
4348
+ CommandResult[CommandResult["ValueUpperInvalidFormula"] = 62] = "ValueUpperInvalidFormula";
4349
+ CommandResult[CommandResult["ValueLowerInvalidFormula"] = 63] = "ValueLowerInvalidFormula";
4350
+ CommandResult[CommandResult["InvalidSortZone"] = 64] = "InvalidSortZone";
4351
+ CommandResult[CommandResult["WaitingSessionConfirmation"] = 65] = "WaitingSessionConfirmation";
4352
+ CommandResult[CommandResult["MergeOverlap"] = 66] = "MergeOverlap";
4353
+ CommandResult[CommandResult["TooManyHiddenElements"] = 67] = "TooManyHiddenElements";
4354
+ CommandResult[CommandResult["Readonly"] = 68] = "Readonly";
4355
+ CommandResult[CommandResult["InvalidViewportSize"] = 69] = "InvalidViewportSize";
4356
+ CommandResult[CommandResult["InvalidScrollingDirection"] = 70] = "InvalidScrollingDirection";
4357
+ CommandResult[CommandResult["FigureDoesNotExist"] = 71] = "FigureDoesNotExist";
4358
+ CommandResult[CommandResult["InvalidConditionalFormatId"] = 72] = "InvalidConditionalFormatId";
4359
+ CommandResult[CommandResult["InvalidCellPopover"] = 73] = "InvalidCellPopover";
4360
+ CommandResult[CommandResult["EmptyTarget"] = 74] = "EmptyTarget";
4361
+ CommandResult[CommandResult["InvalidFreezeQuantity"] = 75] = "InvalidFreezeQuantity";
4362
+ CommandResult[CommandResult["FrozenPaneOverlap"] = 76] = "FrozenPaneOverlap";
4363
+ CommandResult[CommandResult["ValuesNotChanged"] = 77] = "ValuesNotChanged";
4364
+ CommandResult[CommandResult["InvalidFilterZone"] = 78] = "InvalidFilterZone";
4365
+ CommandResult[CommandResult["FilterOverlap"] = 79] = "FilterOverlap";
4366
+ CommandResult[CommandResult["FilterNotFound"] = 80] = "FilterNotFound";
4367
+ CommandResult[CommandResult["MergeInFilter"] = 81] = "MergeInFilter";
4368
+ CommandResult[CommandResult["NonContinuousTargets"] = 82] = "NonContinuousTargets";
4369
+ CommandResult[CommandResult["DuplicatedFigureId"] = 83] = "DuplicatedFigureId";
4370
+ CommandResult[CommandResult["InvalidSelectionStep"] = 84] = "InvalidSelectionStep";
4371
+ CommandResult[CommandResult["DuplicatedChartId"] = 85] = "DuplicatedChartId";
4372
+ CommandResult[CommandResult["ChartDoesNotExist"] = 86] = "ChartDoesNotExist";
4373
+ CommandResult[CommandResult["InvalidHeaderIndex"] = 87] = "InvalidHeaderIndex";
4374
+ CommandResult[CommandResult["InvalidQuantity"] = 88] = "InvalidQuantity";
4375
+ CommandResult[CommandResult["NoChanges"] = 89] = "NoChanges";
4372
4376
  })(CommandResult || (CommandResult = {}));
4373
4377
 
4374
4378
  function isMatrix(x) {
@@ -6394,11 +6398,11 @@ function checkDataset(definition) {
6394
6398
  if (definition.dataSets) {
6395
6399
  const invalidRanges = definition.dataSets.find((range) => !rangeReference.test(range)) !== undefined;
6396
6400
  if (invalidRanges) {
6397
- return 32 /* CommandResult.InvalidDataSet */;
6401
+ return 33 /* CommandResult.InvalidDataSet */;
6398
6402
  }
6399
6403
  const zones = definition.dataSets.map(toUnboundedZone);
6400
6404
  if (zones.some((zone) => zone.top !== zone.bottom && isFullRow(zone))) {
6401
- return 32 /* CommandResult.InvalidDataSet */;
6405
+ return 33 /* CommandResult.InvalidDataSet */;
6402
6406
  }
6403
6407
  }
6404
6408
  return 0 /* CommandResult.Success */;
@@ -6407,7 +6411,7 @@ function checkLabelRange(definition) {
6407
6411
  if (definition.labelRange) {
6408
6412
  const invalidLabels = !rangeReference.test(definition.labelRange || "");
6409
6413
  if (invalidLabels) {
6410
- return 33 /* CommandResult.InvalidLabelRange */;
6414
+ return 34 /* CommandResult.InvalidLabelRange */;
6411
6415
  }
6412
6416
  }
6413
6417
  return 0 /* CommandResult.Success */;
@@ -6480,22 +6484,22 @@ function getChartPositionAtCenterOfViewport(getters, chartSize) {
6480
6484
  const CfTerms = {
6481
6485
  Errors: {
6482
6486
  [25 /* CommandResult.InvalidRange */]: _lt("The range is invalid"),
6483
- [51 /* CommandResult.FirstArgMissing */]: _lt("The argument is missing. Please provide a value"),
6484
- [52 /* CommandResult.SecondArgMissing */]: _lt("The second argument is missing. Please provide a value"),
6485
- [53 /* CommandResult.MinNaN */]: _lt("The minpoint must be a number"),
6486
- [54 /* CommandResult.MidNaN */]: _lt("The midpoint must be a number"),
6487
- [55 /* CommandResult.MaxNaN */]: _lt("The maxpoint must be a number"),
6488
- [56 /* CommandResult.ValueUpperInflectionNaN */]: _lt("The first value must be a number"),
6489
- [57 /* CommandResult.ValueLowerInflectionNaN */]: _lt("The second value must be a number"),
6490
- [47 /* CommandResult.MinBiggerThanMax */]: _lt("Minimum must be smaller then Maximum"),
6491
- [50 /* CommandResult.MinBiggerThanMid */]: _lt("Minimum must be smaller then Midpoint"),
6492
- [49 /* CommandResult.MidBiggerThanMax */]: _lt("Midpoint must be smaller then Maximum"),
6493
- [48 /* CommandResult.LowerBiggerThanUpper */]: _lt("Lower inflection point must be smaller than upper inflection point"),
6494
- [58 /* CommandResult.MinInvalidFormula */]: _lt("Invalid Minpoint formula"),
6495
- [60 /* CommandResult.MaxInvalidFormula */]: _lt("Invalid Maxpoint formula"),
6496
- [59 /* CommandResult.MidInvalidFormula */]: _lt("Invalid Midpoint formula"),
6497
- [61 /* CommandResult.ValueUpperInvalidFormula */]: _lt("Invalid upper inflection point formula"),
6498
- [62 /* CommandResult.ValueLowerInvalidFormula */]: _lt("Invalid lower inflection point formula"),
6487
+ [52 /* CommandResult.FirstArgMissing */]: _lt("The argument is missing. Please provide a value"),
6488
+ [53 /* CommandResult.SecondArgMissing */]: _lt("The second argument is missing. Please provide a value"),
6489
+ [54 /* CommandResult.MinNaN */]: _lt("The minpoint must be a number"),
6490
+ [55 /* CommandResult.MidNaN */]: _lt("The midpoint must be a number"),
6491
+ [56 /* CommandResult.MaxNaN */]: _lt("The maxpoint must be a number"),
6492
+ [57 /* CommandResult.ValueUpperInflectionNaN */]: _lt("The first value must be a number"),
6493
+ [58 /* CommandResult.ValueLowerInflectionNaN */]: _lt("The second value must be a number"),
6494
+ [48 /* CommandResult.MinBiggerThanMax */]: _lt("Minimum must be smaller then Maximum"),
6495
+ [51 /* CommandResult.MinBiggerThanMid */]: _lt("Minimum must be smaller then Midpoint"),
6496
+ [50 /* CommandResult.MidBiggerThanMax */]: _lt("Midpoint must be smaller then Maximum"),
6497
+ [49 /* CommandResult.LowerBiggerThanUpper */]: _lt("Lower inflection point must be smaller than upper inflection point"),
6498
+ [59 /* CommandResult.MinInvalidFormula */]: _lt("Invalid Minpoint formula"),
6499
+ [61 /* CommandResult.MaxInvalidFormula */]: _lt("Invalid Maxpoint formula"),
6500
+ [60 /* CommandResult.MidInvalidFormula */]: _lt("Invalid Midpoint formula"),
6501
+ [62 /* CommandResult.ValueUpperInvalidFormula */]: _lt("Invalid upper inflection point formula"),
6502
+ [63 /* CommandResult.ValueLowerInvalidFormula */]: _lt("Invalid lower inflection point formula"),
6499
6503
  [24 /* CommandResult.EmptyRange */]: _lt("A range needs to be defined"),
6500
6504
  Unexpected: _lt("The rule is invalid for an unknown reason"),
6501
6505
  },
@@ -6523,20 +6527,20 @@ const ChartTerms = {
6523
6527
  Errors: {
6524
6528
  Unexpected: _lt("The chart definition is invalid for an unknown reason"),
6525
6529
  // BASIC CHART ERRORS (LINE | BAR | PIE)
6526
- [32 /* CommandResult.InvalidDataSet */]: _lt("The dataset is invalid"),
6527
- [33 /* CommandResult.InvalidLabelRange */]: _lt("Labels are invalid"),
6530
+ [33 /* CommandResult.InvalidDataSet */]: _lt("The dataset is invalid"),
6531
+ [34 /* CommandResult.InvalidLabelRange */]: _lt("Labels are invalid"),
6528
6532
  // SCORECARD CHART ERRORS
6529
- [34 /* CommandResult.InvalidScorecardKeyValue */]: _lt("The key value is invalid"),
6530
- [35 /* CommandResult.InvalidScorecardBaseline */]: _lt("The baseline value is invalid"),
6533
+ [35 /* CommandResult.InvalidScorecardKeyValue */]: _lt("The key value is invalid"),
6534
+ [36 /* CommandResult.InvalidScorecardBaseline */]: _lt("The baseline value is invalid"),
6531
6535
  // GAUGE CHART ERRORS
6532
- [36 /* CommandResult.InvalidGaugeDataRange */]: _lt("The data range is invalid"),
6533
- [37 /* CommandResult.EmptyGaugeRangeMin */]: _lt("A minimum range limit value is needed"),
6534
- [38 /* CommandResult.GaugeRangeMinNaN */]: _lt("The minimum range limit value must be a number"),
6535
- [39 /* CommandResult.EmptyGaugeRangeMax */]: _lt("A maximum range limit value is needed"),
6536
- [40 /* CommandResult.GaugeRangeMaxNaN */]: _lt("The maximum range limit value must be a number"),
6537
- [41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */]: _lt("Minimum range limit must be smaller than maximum range limit"),
6538
- [42 /* CommandResult.GaugeLowerInflectionPointNaN */]: _lt("The lower inflection point value must be a number"),
6539
- [43 /* CommandResult.GaugeUpperInflectionPointNaN */]: _lt("The upper inflection point value must be a number"),
6536
+ [37 /* CommandResult.InvalidGaugeDataRange */]: _lt("The data range is invalid"),
6537
+ [38 /* CommandResult.EmptyGaugeRangeMin */]: _lt("A minimum range limit value is needed"),
6538
+ [39 /* CommandResult.GaugeRangeMinNaN */]: _lt("The minimum range limit value must be a number"),
6539
+ [40 /* CommandResult.EmptyGaugeRangeMax */]: _lt("A maximum range limit value is needed"),
6540
+ [41 /* CommandResult.GaugeRangeMaxNaN */]: _lt("The maximum range limit value must be a number"),
6541
+ [42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */]: _lt("Minimum range limit must be smaller than maximum range limit"),
6542
+ [43 /* CommandResult.GaugeLowerInflectionPointNaN */]: _lt("The lower inflection point value must be a number"),
6543
+ [44 /* CommandResult.GaugeUpperInflectionPointNaN */]: _lt("The upper inflection point value must be a number"),
6540
6544
  },
6541
6545
  };
6542
6546
  const NumberFormatTerms = {
@@ -6942,7 +6946,7 @@ function createBarChartRuntime(chart, getters) {
6942
6946
 
6943
6947
  function isDataRangeValid(definition) {
6944
6948
  return definition.dataRange && !rangeReference.test(definition.dataRange)
6945
- ? 36 /* CommandResult.InvalidGaugeDataRange */
6949
+ ? 37 /* CommandResult.InvalidGaugeDataRange */
6946
6950
  : 0 /* CommandResult.Success */;
6947
6951
  }
6948
6952
  function checkRangeLimits(check, batchValidations) {
@@ -6974,7 +6978,7 @@ function checkInflectionPointsValue(check, batchValidations) {
6974
6978
  function checkRangeMinBiggerThanRangeMax(definition) {
6975
6979
  if (definition.sectionRule) {
6976
6980
  if (Number(definition.sectionRule.rangeMin) >= Number(definition.sectionRule.rangeMax)) {
6977
- return 41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */;
6981
+ return 42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */;
6978
6982
  }
6979
6983
  }
6980
6984
  return 0 /* CommandResult.Success */;
@@ -6983,9 +6987,9 @@ function checkEmpty(value, valueName) {
6983
6987
  if (value === "") {
6984
6988
  switch (valueName) {
6985
6989
  case "rangeMin":
6986
- return 37 /* CommandResult.EmptyGaugeRangeMin */;
6990
+ return 38 /* CommandResult.EmptyGaugeRangeMin */;
6987
6991
  case "rangeMax":
6988
- return 39 /* CommandResult.EmptyGaugeRangeMax */;
6992
+ return 40 /* CommandResult.EmptyGaugeRangeMax */;
6989
6993
  }
6990
6994
  }
6991
6995
  return 0 /* CommandResult.Success */;
@@ -6994,13 +6998,13 @@ function checkNaN(value, valueName) {
6994
6998
  if (isNaN(value)) {
6995
6999
  switch (valueName) {
6996
7000
  case "rangeMin":
6997
- return 38 /* CommandResult.GaugeRangeMinNaN */;
7001
+ return 39 /* CommandResult.GaugeRangeMinNaN */;
6998
7002
  case "rangeMax":
6999
- return 40 /* CommandResult.GaugeRangeMaxNaN */;
7003
+ return 41 /* CommandResult.GaugeRangeMaxNaN */;
7000
7004
  case "lowerInflectionPointValue":
7001
- return 42 /* CommandResult.GaugeLowerInflectionPointNaN */;
7005
+ return 43 /* CommandResult.GaugeLowerInflectionPointNaN */;
7002
7006
  case "upperInflectionPointValue":
7003
- return 43 /* CommandResult.GaugeUpperInflectionPointNaN */;
7007
+ return 44 /* CommandResult.GaugeUpperInflectionPointNaN */;
7004
7008
  }
7005
7009
  }
7006
7010
  return 0 /* CommandResult.Success */;
@@ -7758,12 +7762,12 @@ function createPieChartRuntime(chart, getters) {
7758
7762
 
7759
7763
  function checkKeyValue(definition) {
7760
7764
  return definition.keyValue && !rangeReference.test(definition.keyValue)
7761
- ? 34 /* CommandResult.InvalidScorecardKeyValue */
7765
+ ? 35 /* CommandResult.InvalidScorecardKeyValue */
7762
7766
  : 0 /* CommandResult.Success */;
7763
7767
  }
7764
7768
  function checkBaseline(definition) {
7765
7769
  return definition.baseline && !rangeReference.test(definition.baseline)
7766
- ? 35 /* CommandResult.InvalidScorecardBaseline */
7770
+ ? 36 /* CommandResult.InvalidScorecardBaseline */
7767
7771
  : 0 /* CommandResult.Success */;
7768
7772
  }
7769
7773
  class ScorecardChart extends AbstractChart {
@@ -8493,7 +8497,7 @@ function interactiveSortSelection(env, sheetId, anchor, zone, sortDirection) {
8493
8497
  });
8494
8498
  }
8495
8499
  }
8496
- if (result.isCancelledBecause(63 /* CommandResult.InvalidSortZone */)) {
8500
+ if (result.isCancelledBecause(64 /* CommandResult.InvalidSortZone */)) {
8497
8501
  const { col, row } = anchor;
8498
8502
  env.model.selection.selectZone({ cell: { col, row }, zone });
8499
8503
  env.raiseError(_lt("Cannot sort. To sort, select only cells or only merges that have the same size."));
@@ -8516,13 +8520,13 @@ const AddFilterInteractiveContent = {
8516
8520
  };
8517
8521
  function interactiveAddFilter(env, sheetId, target) {
8518
8522
  const result = env.model.dispatch("CREATE_FILTER_TABLE", { target, sheetId });
8519
- if (result.isCancelledBecause(78 /* CommandResult.FilterOverlap */)) {
8523
+ if (result.isCancelledBecause(79 /* CommandResult.FilterOverlap */)) {
8520
8524
  env.raiseError(AddFilterInteractiveContent.filterOverlap);
8521
8525
  }
8522
- else if (result.isCancelledBecause(80 /* CommandResult.MergeInFilter */)) {
8526
+ else if (result.isCancelledBecause(81 /* CommandResult.MergeInFilter */)) {
8523
8527
  env.raiseError(AddFilterInteractiveContent.mergeInFilter);
8524
8528
  }
8525
- else if (result.isCancelledBecause(81 /* CommandResult.NonContinuousTargets */)) {
8529
+ else if (result.isCancelledBecause(82 /* CommandResult.NonContinuousTargets */)) {
8526
8530
  env.raiseError(AddFilterInteractiveContent.nonContinuousTargets);
8527
8531
  }
8528
8532
  }
@@ -8544,7 +8548,7 @@ function handlePasteResult(env, result) {
8544
8548
  else if (result.reasons.includes(22 /* CommandResult.WrongFigurePasteOption */)) {
8545
8549
  env.raiseError(PasteInteractiveContent.wrongFigurePasteOption);
8546
8550
  }
8547
- else if (result.reasons.includes(75 /* CommandResult.FrozenPaneOverlap */)) {
8551
+ else if (result.reasons.includes(76 /* CommandResult.FrozenPaneOverlap */)) {
8548
8552
  env.raiseError(PasteInteractiveContent.frozenPaneOverlap);
8549
8553
  }
8550
8554
  }
@@ -16221,7 +16225,7 @@ function interactiveFreezeColumnsRows(env, dimension, base) {
16221
16225
  const sheetId = env.model.getters.getActiveSheetId();
16222
16226
  const cmd = dimension === "COL" ? "FREEZE_COLUMNS" : "FREEZE_ROWS";
16223
16227
  const result = env.model.dispatch(cmd, { sheetId, quantity: base });
16224
- if (result.isCancelledBecause(65 /* CommandResult.MergeOverlap */)) {
16228
+ if (result.isCancelledBecause(66 /* CommandResult.MergeOverlap */)) {
16225
16229
  env.raiseError(MergeErrorMessage);
16226
16230
  }
16227
16231
  }
@@ -17017,11 +17021,11 @@ class LineBarPieConfigPanel extends Component {
17017
17021
  }
17018
17022
  get isDatasetInvalid() {
17019
17023
  var _a;
17020
- return !!((_a = this.state.datasetDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(32 /* CommandResult.InvalidDataSet */));
17024
+ return !!((_a = this.state.datasetDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(33 /* CommandResult.InvalidDataSet */));
17021
17025
  }
17022
17026
  get isLabelInvalid() {
17023
17027
  var _a;
17024
- return !!((_a = this.state.labelsDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(33 /* CommandResult.InvalidLabelRange */));
17028
+ return !!((_a = this.state.labelsDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(34 /* CommandResult.InvalidLabelRange */));
17025
17029
  }
17026
17030
  onUpdateDataSetsHaveTitle(ev) {
17027
17031
  this.props.updateChart(this.props.figureId, {
@@ -17459,7 +17463,7 @@ class GaugeChartConfigPanel extends Component {
17459
17463
  }
17460
17464
  get isDataRangeInvalid() {
17461
17465
  var _a;
17462
- return !!((_a = this.state.dataRangeDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(36 /* CommandResult.InvalidGaugeDataRange */));
17466
+ return !!((_a = this.state.dataRangeDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(37 /* CommandResult.InvalidGaugeDataRange */));
17463
17467
  }
17464
17468
  onDataRangeChanged(ranges) {
17465
17469
  this.dataRange = ranges[0];
@@ -17538,28 +17542,28 @@ class GaugeChartDesignPanel extends Component {
17538
17542
  }
17539
17543
  isRangeMinInvalid() {
17540
17544
  var _a, _b, _c;
17541
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(37 /* CommandResult.EmptyGaugeRangeMin */)) ||
17542
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(38 /* CommandResult.GaugeRangeMinNaN */)) ||
17543
- ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
17545
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(38 /* CommandResult.EmptyGaugeRangeMin */)) ||
17546
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(39 /* CommandResult.GaugeRangeMinNaN */)) ||
17547
+ ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
17544
17548
  }
17545
17549
  isRangeMaxInvalid() {
17546
17550
  var _a, _b, _c;
17547
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(39 /* CommandResult.EmptyGaugeRangeMax */)) ||
17548
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(40 /* CommandResult.GaugeRangeMaxNaN */)) ||
17549
- ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
17551
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(40 /* CommandResult.EmptyGaugeRangeMax */)) ||
17552
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(41 /* CommandResult.GaugeRangeMaxNaN */)) ||
17553
+ ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
17550
17554
  }
17551
17555
  // ---------------------------------------------------------------------------
17552
17556
  // COLOR_SECTION_TEMPLATE
17553
17557
  // ---------------------------------------------------------------------------
17554
17558
  get isLowerInflectionPointInvalid() {
17555
17559
  var _a, _b;
17556
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(42 /* CommandResult.GaugeLowerInflectionPointNaN */)) ||
17557
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(44 /* CommandResult.GaugeLowerBiggerThanUpper */)));
17560
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(43 /* CommandResult.GaugeLowerInflectionPointNaN */)) ||
17561
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(45 /* CommandResult.GaugeLowerBiggerThanUpper */)));
17558
17562
  }
17559
17563
  get isUpperInflectionPointInvalid() {
17560
17564
  var _a, _b;
17561
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(43 /* CommandResult.GaugeUpperInflectionPointNaN */)) ||
17562
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(44 /* CommandResult.GaugeLowerBiggerThanUpper */)));
17565
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(44 /* CommandResult.GaugeUpperInflectionPointNaN */)) ||
17566
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(45 /* CommandResult.GaugeLowerBiggerThanUpper */)));
17563
17567
  }
17564
17568
  updateInflectionPointValue(attr, ev) {
17565
17569
  const sectionRule = deepCopy(this.props.definition.sectionRule);
@@ -17672,11 +17676,11 @@ class ScorecardChartConfigPanel extends Component {
17672
17676
  }
17673
17677
  get isKeyValueInvalid() {
17674
17678
  var _a;
17675
- return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(34 /* CommandResult.InvalidScorecardKeyValue */));
17679
+ return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(35 /* CommandResult.InvalidScorecardKeyValue */));
17676
17680
  }
17677
17681
  get isBaselineInvalid() {
17678
17682
  var _a;
17679
- return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(35 /* CommandResult.InvalidScorecardBaseline */));
17683
+ return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(36 /* CommandResult.InvalidScorecardBaseline */));
17680
17684
  }
17681
17685
  onKeyValueRangeChanged(ranges) {
17682
17686
  this.keyValue = ranges[0];
@@ -18530,11 +18534,11 @@ class ConditionalFormattingPanel extends Component {
18530
18534
  ****************************************************************************/
18531
18535
  get isValue1Invalid() {
18532
18536
  var _a;
18533
- return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(51 /* CommandResult.FirstArgMissing */));
18537
+ return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(52 /* CommandResult.FirstArgMissing */));
18534
18538
  }
18535
18539
  get isValue2Invalid() {
18536
18540
  var _a;
18537
- return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(52 /* CommandResult.SecondArgMissing */));
18541
+ return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(53 /* CommandResult.SecondArgMissing */));
18538
18542
  }
18539
18543
  toggleStyle(tool) {
18540
18544
  const style = this.state.rules.cellIs.style;
@@ -18551,17 +18555,17 @@ class ConditionalFormattingPanel extends Component {
18551
18555
  isValueInvalid(threshold) {
18552
18556
  switch (threshold) {
18553
18557
  case "minimum":
18554
- return (this.state.errors.includes(58 /* CommandResult.MinInvalidFormula */) ||
18555
- this.state.errors.includes(50 /* CommandResult.MinBiggerThanMid */) ||
18556
- this.state.errors.includes(47 /* CommandResult.MinBiggerThanMax */) ||
18557
- this.state.errors.includes(53 /* CommandResult.MinNaN */));
18558
+ return (this.state.errors.includes(59 /* CommandResult.MinInvalidFormula */) ||
18559
+ this.state.errors.includes(51 /* CommandResult.MinBiggerThanMid */) ||
18560
+ this.state.errors.includes(48 /* CommandResult.MinBiggerThanMax */) ||
18561
+ this.state.errors.includes(54 /* CommandResult.MinNaN */));
18558
18562
  case "midpoint":
18559
- return (this.state.errors.includes(59 /* CommandResult.MidInvalidFormula */) ||
18560
- this.state.errors.includes(54 /* CommandResult.MidNaN */) ||
18561
- this.state.errors.includes(49 /* CommandResult.MidBiggerThanMax */));
18563
+ return (this.state.errors.includes(60 /* CommandResult.MidInvalidFormula */) ||
18564
+ this.state.errors.includes(55 /* CommandResult.MidNaN */) ||
18565
+ this.state.errors.includes(50 /* CommandResult.MidBiggerThanMax */));
18562
18566
  case "maximum":
18563
- return (this.state.errors.includes(60 /* CommandResult.MaxInvalidFormula */) ||
18564
- this.state.errors.includes(55 /* CommandResult.MaxNaN */));
18567
+ return (this.state.errors.includes(61 /* CommandResult.MaxInvalidFormula */) ||
18568
+ this.state.errors.includes(56 /* CommandResult.MaxNaN */));
18565
18569
  default:
18566
18570
  return false;
18567
18571
  }
@@ -18610,13 +18614,13 @@ class ConditionalFormattingPanel extends Component {
18610
18614
  isInflectionPointInvalid(inflectionPoint) {
18611
18615
  switch (inflectionPoint) {
18612
18616
  case "lowerInflectionPoint":
18613
- return (this.state.errors.includes(57 /* CommandResult.ValueLowerInflectionNaN */) ||
18614
- this.state.errors.includes(62 /* CommandResult.ValueLowerInvalidFormula */) ||
18615
- this.state.errors.includes(48 /* CommandResult.LowerBiggerThanUpper */));
18617
+ return (this.state.errors.includes(58 /* CommandResult.ValueLowerInflectionNaN */) ||
18618
+ this.state.errors.includes(63 /* CommandResult.ValueLowerInvalidFormula */) ||
18619
+ this.state.errors.includes(49 /* CommandResult.LowerBiggerThanUpper */));
18616
18620
  case "upperInflectionPoint":
18617
- return (this.state.errors.includes(56 /* CommandResult.ValueUpperInflectionNaN */) ||
18618
- this.state.errors.includes(61 /* CommandResult.ValueUpperInvalidFormula */) ||
18619
- this.state.errors.includes(48 /* CommandResult.LowerBiggerThanUpper */));
18621
+ return (this.state.errors.includes(57 /* CommandResult.ValueUpperInflectionNaN */) ||
18622
+ this.state.errors.includes(62 /* CommandResult.ValueUpperInvalidFormula */) ||
18623
+ this.state.errors.includes(49 /* CommandResult.LowerBiggerThanUpper */));
18620
18624
  default:
18621
18625
  return true;
18622
18626
  }
@@ -28013,7 +28017,7 @@ class BordersPlugin extends CorePlugin {
28013
28017
  const currentBorder = this.getCellBorder(cmd);
28014
28018
  const areAllNewBordersUndefined = !((_a = cmd.border) === null || _a === void 0 ? void 0 : _a.bottom) && !((_b = cmd.border) === null || _b === void 0 ? void 0 : _b.left) && !((_c = cmd.border) === null || _c === void 0 ? void 0 : _c.right) && !((_d = cmd.border) === null || _d === void 0 ? void 0 : _d.top);
28015
28019
  if ((!currentBorder && areAllNewBordersUndefined) || deepEquals(currentBorder, cmd.border)) {
28016
- return 88 /* CommandResult.NoChanges */;
28020
+ return 89 /* CommandResult.NoChanges */;
28017
28021
  }
28018
28022
  return 0 /* CommandResult.Success */;
28019
28023
  }
@@ -28531,9 +28535,9 @@ class CellPlugin extends CorePlugin {
28531
28535
  checkUselessClearCell(cmd) {
28532
28536
  const cell = this.getters.getCell(cmd);
28533
28537
  if (!cell)
28534
- return 88 /* CommandResult.NoChanges */;
28538
+ return 89 /* CommandResult.NoChanges */;
28535
28539
  if (!cell.content && !cell.style && !cell.format) {
28536
- return 88 /* CommandResult.NoChanges */;
28540
+ return 89 /* CommandResult.NoChanges */;
28537
28541
  }
28538
28542
  return 0 /* CommandResult.Success */;
28539
28543
  }
@@ -28742,13 +28746,13 @@ class ChartPlugin extends CorePlugin {
28742
28746
  }
28743
28747
  checkChartDuplicate(cmd) {
28744
28748
  return this.getters.getFigureSheetId(cmd.id)
28745
- ? 84 /* CommandResult.DuplicatedChartId */
28749
+ ? 85 /* CommandResult.DuplicatedChartId */
28746
28750
  : 0 /* CommandResult.Success */;
28747
28751
  }
28748
28752
  checkChartExists(cmd) {
28749
28753
  return this.getters.getFigureSheetId(cmd.id)
28750
28754
  ? 0 /* CommandResult.Success */
28751
- : 85 /* CommandResult.ChartDoesNotExist */;
28755
+ : 86 /* CommandResult.ChartDoesNotExist */;
28752
28756
  }
28753
28757
  }
28754
28758
  ChartPlugin.getters = [
@@ -28950,10 +28954,10 @@ class ConditionalFormatPlugin extends CorePlugin {
28950
28954
  return 27 /* CommandResult.InvalidSheetId */;
28951
28955
  const ruleIndex = this.cfRules[sheetId].findIndex((cf) => cf.id === cfId);
28952
28956
  if (ruleIndex === -1)
28953
- return 71 /* CommandResult.InvalidConditionalFormatId */;
28957
+ return 72 /* CommandResult.InvalidConditionalFormatId */;
28954
28958
  const cfIndex2 = direction === "up" ? ruleIndex - 1 : ruleIndex + 1;
28955
28959
  if (cfIndex2 < 0 || cfIndex2 >= this.cfRules[sheetId].length) {
28956
- return 71 /* CommandResult.InvalidConditionalFormatId */;
28960
+ return 72 /* CommandResult.InvalidConditionalFormatId */;
28957
28961
  }
28958
28962
  return 0 /* CommandResult.Success */;
28959
28963
  }
@@ -28994,10 +28998,10 @@ class ConditionalFormatPlugin extends CorePlugin {
28994
28998
  const errors = [];
28995
28999
  const isEmpty = (value) => value === undefined || value === "";
28996
29000
  if (expectedNumber >= 1 && isEmpty(rule.values[0])) {
28997
- errors.push(51 /* CommandResult.FirstArgMissing */);
29001
+ errors.push(52 /* CommandResult.FirstArgMissing */);
28998
29002
  }
28999
29003
  if (expectedNumber >= 2 && isEmpty(rule.values[1])) {
29000
- errors.push(52 /* CommandResult.SecondArgMissing */);
29004
+ errors.push(53 /* CommandResult.SecondArgMissing */);
29001
29005
  }
29002
29006
  return errors.length ? errors : 0 /* CommandResult.Success */;
29003
29007
  }
@@ -29009,15 +29013,15 @@ class ConditionalFormatPlugin extends CorePlugin {
29009
29013
  (threshold.value === "" || isNaN(threshold.value))) {
29010
29014
  switch (thresholdName) {
29011
29015
  case "min":
29012
- return 53 /* CommandResult.MinNaN */;
29016
+ return 54 /* CommandResult.MinNaN */;
29013
29017
  case "max":
29014
- return 55 /* CommandResult.MaxNaN */;
29018
+ return 56 /* CommandResult.MaxNaN */;
29015
29019
  case "mid":
29016
- return 54 /* CommandResult.MidNaN */;
29020
+ return 55 /* CommandResult.MidNaN */;
29017
29021
  case "upperInflectionPoint":
29018
- return 56 /* CommandResult.ValueUpperInflectionNaN */;
29022
+ return 57 /* CommandResult.ValueUpperInflectionNaN */;
29019
29023
  case "lowerInflectionPoint":
29020
- return 57 /* CommandResult.ValueLowerInflectionNaN */;
29024
+ return 58 /* CommandResult.ValueLowerInflectionNaN */;
29021
29025
  }
29022
29026
  }
29023
29027
  return 0 /* CommandResult.Success */;
@@ -29031,15 +29035,15 @@ class ConditionalFormatPlugin extends CorePlugin {
29031
29035
  catch (error) {
29032
29036
  switch (thresholdName) {
29033
29037
  case "min":
29034
- return 58 /* CommandResult.MinInvalidFormula */;
29038
+ return 59 /* CommandResult.MinInvalidFormula */;
29035
29039
  case "max":
29036
- return 60 /* CommandResult.MaxInvalidFormula */;
29040
+ return 61 /* CommandResult.MaxInvalidFormula */;
29037
29041
  case "mid":
29038
- return 59 /* CommandResult.MidInvalidFormula */;
29042
+ return 60 /* CommandResult.MidInvalidFormula */;
29039
29043
  case "upperInflectionPoint":
29040
- return 61 /* CommandResult.ValueUpperInvalidFormula */;
29044
+ return 62 /* CommandResult.ValueUpperInvalidFormula */;
29041
29045
  case "lowerInflectionPoint":
29042
- return 62 /* CommandResult.ValueLowerInvalidFormula */;
29046
+ return 63 /* CommandResult.ValueLowerInvalidFormula */;
29043
29047
  }
29044
29048
  }
29045
29049
  return 0 /* CommandResult.Success */;
@@ -29056,7 +29060,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29056
29060
  if (["number", "percentage", "percentile"].includes(rule.lowerInflectionPoint.type) &&
29057
29061
  rule.lowerInflectionPoint.type === rule.upperInflectionPoint.type &&
29058
29062
  Number(minValue) > Number(maxValue)) {
29059
- return 48 /* CommandResult.LowerBiggerThanUpper */;
29063
+ return 49 /* CommandResult.LowerBiggerThanUpper */;
29060
29064
  }
29061
29065
  return 0 /* CommandResult.Success */;
29062
29066
  }
@@ -29066,7 +29070,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29066
29070
  if (["number", "percentage", "percentile"].includes(rule.minimum.type) &&
29067
29071
  rule.minimum.type === rule.maximum.type &&
29068
29072
  stringToNumber(minValue) >= stringToNumber(maxValue)) {
29069
- return 47 /* CommandResult.MinBiggerThanMax */;
29073
+ return 48 /* CommandResult.MinBiggerThanMax */;
29070
29074
  }
29071
29075
  return 0 /* CommandResult.Success */;
29072
29076
  }
@@ -29078,7 +29082,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29078
29082
  ["number", "percentage", "percentile"].includes(rule.midpoint.type) &&
29079
29083
  rule.midpoint.type === rule.maximum.type &&
29080
29084
  stringToNumber(midValue) >= stringToNumber(maxValue)) {
29081
- return 49 /* CommandResult.MidBiggerThanMax */;
29085
+ return 50 /* CommandResult.MidBiggerThanMax */;
29082
29086
  }
29083
29087
  return 0 /* CommandResult.Success */;
29084
29088
  }
@@ -29090,7 +29094,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29090
29094
  ["number", "percentage", "percentile"].includes(rule.midpoint.type) &&
29091
29095
  rule.minimum.type === rule.midpoint.type &&
29092
29096
  stringToNumber(minValue) >= stringToNumber(midValue)) {
29093
- return 50 /* CommandResult.MinBiggerThanMid */;
29097
+ return 51 /* CommandResult.MinBiggerThanMid */;
29094
29098
  }
29095
29099
  return 0 /* CommandResult.Success */;
29096
29100
  }
@@ -29191,13 +29195,13 @@ class FigurePlugin extends CorePlugin {
29191
29195
  checkFigureExists(sheetId, figureId) {
29192
29196
  var _a;
29193
29197
  if (((_a = this.figures[sheetId]) === null || _a === void 0 ? void 0 : _a[figureId]) === undefined) {
29194
- return 70 /* CommandResult.FigureDoesNotExist */;
29198
+ return 71 /* CommandResult.FigureDoesNotExist */;
29195
29199
  }
29196
29200
  return 0 /* CommandResult.Success */;
29197
29201
  }
29198
29202
  checkFigureDuplicate(figureId) {
29199
29203
  if (Object.values(this.figures).find((sheet) => sheet === null || sheet === void 0 ? void 0 : sheet[figureId])) {
29200
- return 82 /* CommandResult.DuplicatedFigureId */;
29204
+ return 83 /* CommandResult.DuplicatedFigureId */;
29201
29205
  }
29202
29206
  return 0 /* CommandResult.Success */;
29203
29207
  }
@@ -29299,12 +29303,12 @@ class FiltersPlugin extends CorePlugin {
29299
29303
  switch (cmd.type) {
29300
29304
  case "CREATE_FILTER_TABLE":
29301
29305
  if (!areZonesContinuous(...cmd.target)) {
29302
- return 81 /* CommandResult.NonContinuousTargets */;
29306
+ return 82 /* CommandResult.NonContinuousTargets */;
29303
29307
  }
29304
29308
  const zone = union(...cmd.target);
29305
29309
  const checkFilterOverlap = () => {
29306
29310
  if (this.getFilterTables(cmd.sheetId).some((filter) => overlap(filter.zone, zone))) {
29307
- return 78 /* CommandResult.FilterOverlap */;
29311
+ return 79 /* CommandResult.FilterOverlap */;
29308
29312
  }
29309
29313
  return 0 /* CommandResult.Success */;
29310
29314
  };
@@ -29312,7 +29316,7 @@ class FiltersPlugin extends CorePlugin {
29312
29316
  const mergesInTarget = this.getters.getMergesInZone(cmd.sheetId, zone);
29313
29317
  for (let merge of mergesInTarget) {
29314
29318
  if (overlap(zone, merge)) {
29315
- return 80 /* CommandResult.MergeInFilter */;
29319
+ return 81 /* CommandResult.MergeInFilter */;
29316
29320
  }
29317
29321
  }
29318
29322
  return 0 /* CommandResult.Success */;
@@ -29322,7 +29326,7 @@ class FiltersPlugin extends CorePlugin {
29322
29326
  for (let merge of cmd.target) {
29323
29327
  for (let filterTable of this.getFilterTables(cmd.sheetId)) {
29324
29328
  if (overlap(filterTable.zone, merge)) {
29325
- return 80 /* CommandResult.MergeInFilter */;
29329
+ return 81 /* CommandResult.MergeInFilter */;
29326
29330
  }
29327
29331
  }
29328
29332
  }
@@ -29822,10 +29826,10 @@ class HeaderVisibilityPlugin extends CorePlugin {
29822
29826
  : this.getters.getNumberRows(cmd.sheetId);
29823
29827
  const hiddenElements = new Set((hiddenGroup || []).flat().concat(cmd.elements));
29824
29828
  if (hiddenElements.size >= elements) {
29825
- return 66 /* CommandResult.TooManyHiddenElements */;
29829
+ return 67 /* CommandResult.TooManyHiddenElements */;
29826
29830
  }
29827
29831
  else if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
29828
- return 86 /* CommandResult.InvalidHeaderIndex */;
29832
+ return 87 /* CommandResult.InvalidHeaderIndex */;
29829
29833
  }
29830
29834
  else {
29831
29835
  return 0 /* CommandResult.Success */;
@@ -30369,7 +30373,7 @@ class MergePlugin extends CorePlugin {
30369
30373
  for (const zone of target) {
30370
30374
  for (const zone2 of target) {
30371
30375
  if (zone !== zone2 && overlap(zone, zone2)) {
30372
- return 65 /* CommandResult.MergeOverlap */;
30376
+ return 66 /* CommandResult.MergeOverlap */;
30373
30377
  }
30374
30378
  }
30375
30379
  }
@@ -30383,7 +30387,7 @@ class MergePlugin extends CorePlugin {
30383
30387
  for (const zone of target) {
30384
30388
  if ((zone.left < xSplit && zone.right >= xSplit) ||
30385
30389
  (zone.top < ySplit && zone.bottom >= ySplit)) {
30386
- return 75 /* CommandResult.FrozenPaneOverlap */;
30390
+ return 76 /* CommandResult.FrozenPaneOverlap */;
30387
30391
  }
30388
30392
  }
30389
30393
  return 0 /* CommandResult.Success */;
@@ -30915,9 +30919,10 @@ class RangeAdapter {
30915
30919
  * Get a Xc string that represent a part of a range
30916
30920
  */
30917
30921
  getRangePartString(range, part) {
30918
- const colFixed = range.parts && range.parts[part].colFixed ? "$" : "";
30922
+ var _a, _b;
30923
+ const colFixed = range.parts && ((_a = range.parts[part]) === null || _a === void 0 ? void 0 : _a.colFixed) ? "$" : "";
30919
30924
  const col = part === 0 ? numberToLetters(range.zone.left) : numberToLetters(range.zone.right);
30920
- const rowFixed = range.parts && range.parts[part].rowFixed ? "$" : "";
30925
+ const rowFixed = range.parts && ((_b = range.parts[part]) === null || _b === void 0 ? void 0 : _b.rowFixed) ? "$" : "";
30921
30926
  const row = part === 0 ? String(range.zone.top + 1) : String(range.zone.bottom + 1);
30922
30927
  let str = "";
30923
30928
  if (range.isFullCol) {
@@ -31007,10 +31012,10 @@ class SheetPlugin extends CorePlugin {
31007
31012
  ? this.getNumberCols(cmd.sheetId)
31008
31013
  : this.getNumberRows(cmd.sheetId);
31009
31014
  if (cmd.base < 0 || cmd.base >= elements) {
31010
- return 86 /* CommandResult.InvalidHeaderIndex */;
31015
+ return 87 /* CommandResult.InvalidHeaderIndex */;
31011
31016
  }
31012
31017
  else if (cmd.quantity <= 0) {
31013
- return 87 /* CommandResult.InvalidQuantity */;
31018
+ return 88 /* CommandResult.InvalidQuantity */;
31014
31019
  }
31015
31020
  return 0 /* CommandResult.Success */;
31016
31021
  case "REMOVE_COLUMNS_ROWS": {
@@ -31018,7 +31023,7 @@ class SheetPlugin extends CorePlugin {
31018
31023
  ? this.getNumberCols(cmd.sheetId)
31019
31024
  : this.getNumberRows(cmd.sheetId);
31020
31025
  if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
31021
- return 86 /* CommandResult.InvalidHeaderIndex */;
31026
+ return 87 /* CommandResult.InvalidHeaderIndex */;
31022
31027
  }
31023
31028
  else if (this.checkElementsIncludeAllNonFrozenHeaders(cmd.sheetId, cmd.dimension, cmd.elements)) {
31024
31029
  return 8 /* CommandResult.NotEnoughElements */;
@@ -31458,18 +31463,18 @@ class SheetPlugin extends CorePlugin {
31458
31463
  checkRowFreezeQuantity(cmd) {
31459
31464
  return cmd.quantity >= 1 && cmd.quantity < this.getNumberRows(cmd.sheetId)
31460
31465
  ? 0 /* CommandResult.Success */
31461
- : 74 /* CommandResult.InvalidFreezeQuantity */;
31466
+ : 75 /* CommandResult.InvalidFreezeQuantity */;
31462
31467
  }
31463
31468
  checkColFreezeQuantity(cmd) {
31464
31469
  return cmd.quantity >= 1 && cmd.quantity < this.getNumberCols(cmd.sheetId)
31465
31470
  ? 0 /* CommandResult.Success */
31466
- : 74 /* CommandResult.InvalidFreezeQuantity */;
31471
+ : 75 /* CommandResult.InvalidFreezeQuantity */;
31467
31472
  }
31468
31473
  checkRowFreezeOverlapMerge(cmd) {
31469
31474
  const merges = this.getters.getMerges(cmd.sheetId);
31470
31475
  for (let merge of merges) {
31471
31476
  if (merge.top < cmd.quantity && cmd.quantity <= merge.bottom) {
31472
- return 65 /* CommandResult.MergeOverlap */;
31477
+ return 66 /* CommandResult.MergeOverlap */;
31473
31478
  }
31474
31479
  }
31475
31480
  return 0 /* CommandResult.Success */;
@@ -31478,7 +31483,7 @@ class SheetPlugin extends CorePlugin {
31478
31483
  const merges = this.getters.getMerges(cmd.sheetId);
31479
31484
  for (let merge of merges) {
31480
31485
  if (merge.left < cmd.quantity && cmd.quantity <= merge.right) {
31481
- return 65 /* CommandResult.MergeOverlap */;
31486
+ return 66 /* CommandResult.MergeOverlap */;
31482
31487
  }
31483
31488
  }
31484
31489
  return 0 /* CommandResult.Success */;
@@ -32242,10 +32247,8 @@ class EvaluationPlugin extends UIPlugin {
32242
32247
  * that are actually present in the grid.
32243
32248
  */
32244
32249
  function range(range) {
32250
+ assertRangeValid(range);
32245
32251
  const sheetId = range.sheetId;
32246
- if (!isZoneValid(range.zone)) {
32247
- throw new InvalidReferenceError();
32248
- }
32249
32252
  // Performance issue: Avoid fetching data on positions that are out of the spreadsheet
32250
32253
  // e.g. A1:ZZZ9999 in a sheet with 10 cols and 10 rows should ignore everything past J10 and return a 10x10 array
32251
32254
  const sheetZone = getters.getSheetZone(sheetId);
@@ -32280,23 +32283,26 @@ class EvaluationPlugin extends UIPlugin {
32280
32283
  * The `compute` of the formula's function must process it completely
32281
32284
  */
32282
32285
  function refFn(range, isMeta, functionName, paramNumber) {
32286
+ assertRangeValid(range);
32283
32287
  if (isMeta) {
32284
32288
  // Use zoneToXc of zone instead of getRangeString to avoid sending unbounded ranges
32285
32289
  return { value: zoneToXc(range.zone) };
32286
32290
  }
32287
- if (!isZoneValid(range.zone)) {
32288
- throw new InvalidReferenceError();
32289
- }
32290
32291
  // if the formula definition could have accepted a range, we would pass through the _range function and not here
32291
32292
  if (range.zone.bottom !== range.zone.top || range.zone.left !== range.zone.right) {
32292
32293
  throw new Error(paramNumber
32293
32294
  ? _lt("Function %s expects the parameter %s to be a single value or a single cell reference, not a range.", functionName.toString(), paramNumber.toString())
32294
32295
  : _lt("Function %s expects its parameters to be single values or single cell references, not ranges.", functionName.toString()));
32295
32296
  }
32297
+ return readCell(range);
32298
+ }
32299
+ function assertRangeValid(range) {
32300
+ if (!isZoneValid(range.zone)) {
32301
+ throw new InvalidReferenceError();
32302
+ }
32296
32303
  if (range.invalidSheetName) {
32297
32304
  throw new Error(_lt("Invalid sheet name: %s", range.invalidSheetName));
32298
32305
  }
32299
- return readCell(range);
32300
32306
  }
32301
32307
  return [refFn, range, evalContext];
32302
32308
  }
@@ -32796,7 +32802,7 @@ class FilterEvaluationPlugin extends UIPlugin {
32796
32802
  switch (cmd.type) {
32797
32803
  case "UPDATE_FILTER":
32798
32804
  if (!this.getters.getFilterId(cmd)) {
32799
- return 79 /* CommandResult.FilterNotFound */;
32805
+ return 80 /* CommandResult.FilterNotFound */;
32800
32806
  }
32801
32807
  break;
32802
32808
  }
@@ -33743,7 +33749,7 @@ class SheetViewPlugin extends UIPlugin {
33743
33749
  }
33744
33750
  checkPositiveDimension(cmd) {
33745
33751
  if (cmd.width < 0 || cmd.height < 0) {
33746
- return 68 /* CommandResult.InvalidViewportSize */;
33752
+ return 69 /* CommandResult.InvalidViewportSize */;
33747
33753
  }
33748
33754
  return 0 /* CommandResult.Success */;
33749
33755
  }
@@ -33753,7 +33759,7 @@ class SheetViewPlugin extends UIPlugin {
33753
33759
  cmd.gridOffsetY === this.gridOffsetY &&
33754
33760
  cmd.width === width &&
33755
33761
  cmd.height === height) {
33756
- return 76 /* CommandResult.ValuesNotChanged */;
33762
+ return 77 /* CommandResult.ValuesNotChanged */;
33757
33763
  }
33758
33764
  return 0 /* CommandResult.Success */;
33759
33765
  }
@@ -33761,7 +33767,7 @@ class SheetViewPlugin extends UIPlugin {
33761
33767
  const pane = this.getMainInternalViewport(this.getters.getActiveSheetId());
33762
33768
  if ((!pane.canScrollHorizontally && offsetX > 0) ||
33763
33769
  (!pane.canScrollVertically && offsetY > 0)) {
33764
- return 69 /* CommandResult.InvalidScrollingDirection */;
33770
+ return 70 /* CommandResult.InvalidScrollingDirection */;
33765
33771
  }
33766
33772
  return 0 /* CommandResult.Success */;
33767
33773
  }
@@ -34017,7 +34023,7 @@ class AutofillPlugin extends UIPlugin {
34017
34023
  if (this.lastCellSelected.col !== undefined && this.lastCellSelected.row !== undefined) {
34018
34024
  return 0 /* CommandResult.Success */;
34019
34025
  }
34020
- return 45 /* CommandResult.InvalidAutofillSelection */;
34026
+ return 46 /* CommandResult.InvalidAutofillSelection */;
34021
34027
  case "AUTOFILL_AUTO":
34022
34028
  const zone = this.getters.getSelectedZone();
34023
34029
  return zone.top === zone.bottom
@@ -34619,7 +34625,7 @@ class CellPopoverPlugin extends UIPlugin {
34619
34625
  cellPopoverRegistry.get(cmd.popoverType);
34620
34626
  }
34621
34627
  catch (error) {
34622
- return 72 /* CommandResult.InvalidCellPopover */;
34628
+ return 73 /* CommandResult.InvalidCellPopover */;
34623
34629
  }
34624
34630
  return 0 /* CommandResult.Success */;
34625
34631
  default:
@@ -35822,21 +35828,6 @@ class SelectionInputPlugin extends UIPlugin {
35822
35828
  // ---------------------------------------------------------------------------
35823
35829
  // Command Handling
35824
35830
  // ---------------------------------------------------------------------------
35825
- allowDispatch(cmd) {
35826
- switch (cmd.type) {
35827
- case "ADD_EMPTY_RANGE":
35828
- if (this.inputHasSingleRange && this.ranges.length === 1) {
35829
- return 30 /* CommandResult.MaximumRangesReached */;
35830
- }
35831
- break;
35832
- case "CHANGE_RANGE":
35833
- if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
35834
- return 30 /* CommandResult.MaximumRangesReached */;
35835
- }
35836
- break;
35837
- }
35838
- return 0 /* CommandResult.Success */;
35839
- }
35840
35831
  handleEvent(event) {
35841
35832
  const xc = zoneToXc(event.anchor.zone);
35842
35833
  const inputSheetId = this.activeSheet;
@@ -36047,6 +36038,15 @@ class SelectionInputsManagerPlugin extends UIPlugin {
36047
36038
  // ---------------------------------------------------------------------------
36048
36039
  allowDispatch(cmd) {
36049
36040
  var _a, _b;
36041
+ switch (cmd.type) {
36042
+ case "FOCUS_RANGE":
36043
+ case "CHANGE_RANGE":
36044
+ case "ADD_EMPTY_RANGE":
36045
+ case "REMOVE_RANGE":
36046
+ if (!this.inputs[cmd.id]) {
36047
+ return 31 /* CommandResult.InvalidInputId */;
36048
+ }
36049
+ }
36050
36050
  switch (cmd.type) {
36051
36051
  case "FOCUS_RANGE":
36052
36052
  const index = (_a = this.currentInput) === null || _a === void 0 ? void 0 : _a.getIndex(cmd.rangeId);
@@ -36054,9 +36054,19 @@ class SelectionInputsManagerPlugin extends UIPlugin {
36054
36054
  return 29 /* CommandResult.InputAlreadyFocused */;
36055
36055
  }
36056
36056
  break;
36057
- }
36058
- if (this.currentInput) {
36059
- return this.currentInput.allowDispatch(cmd);
36057
+ case "ADD_EMPTY_RANGE":
36058
+ const input = this.inputs[cmd.id];
36059
+ if (input.inputHasSingleRange && input.ranges.length === 1) {
36060
+ return 30 /* CommandResult.MaximumRangesReached */;
36061
+ }
36062
+ break;
36063
+ case "CHANGE_RANGE": {
36064
+ const input = this.inputs[cmd.id];
36065
+ if (input.inputHasSingleRange && cmd.value.split(",").length > 1) {
36066
+ return 30 /* CommandResult.MaximumRangesReached */;
36067
+ }
36068
+ break;
36069
+ }
36060
36070
  }
36061
36071
  return 0 /* CommandResult.Success */;
36062
36072
  }
@@ -37036,7 +37046,7 @@ class SortPlugin extends UIPlugin {
37036
37046
  /*Test the presence of single cells*/
37037
37047
  const singleCells = positions(zone).some(({ col, row }) => !this.getters.isInMerge({ sheetId, col, row }));
37038
37048
  if (singleCells) {
37039
- return 63 /* CommandResult.InvalidSortZone */;
37049
+ return 64 /* CommandResult.InvalidSortZone */;
37040
37050
  }
37041
37051
  return 0 /* CommandResult.Success */;
37042
37052
  }
@@ -37055,7 +37065,7 @@ class SortPlugin extends UIPlugin {
37055
37065
  ];
37056
37066
  return widthCurrent === widthFirst && heightCurrent === heightFirst;
37057
37067
  })) {
37058
- return 63 /* CommandResult.InvalidSortZone */;
37068
+ return 64 /* CommandResult.InvalidSortZone */;
37059
37069
  }
37060
37070
  return 0 /* CommandResult.Success */;
37061
37071
  }
@@ -37695,7 +37705,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
37695
37705
  for (const zone of this.getPasteZones(target)) {
37696
37706
  if ((zone.left < xSplit && zone.right >= xSplit) ||
37697
37707
  (zone.top < ySplit && zone.bottom >= ySplit)) {
37698
- return 75 /* CommandResult.FrozenPaneOverlap */;
37708
+ return 76 /* CommandResult.FrozenPaneOverlap */;
37699
37709
  }
37700
37710
  }
37701
37711
  return 0 /* CommandResult.Success */;
@@ -38083,7 +38093,7 @@ class ClipboardFigureState {
38083
38093
  }
38084
38094
  isPasteAllowed(target, option) {
38085
38095
  if (target.length === 0) {
38086
- return 73 /* CommandResult.EmptyTarget */;
38096
+ return 74 /* CommandResult.EmptyTarget */;
38087
38097
  }
38088
38098
  if ((option === null || option === void 0 ? void 0 : option.pasteOption) !== undefined) {
38089
38099
  return 22 /* CommandResult.WrongFigurePasteOption */;
@@ -38800,7 +38810,7 @@ class EditionPlugin extends UIPlugin {
38800
38810
  validateSelection(length, start, end) {
38801
38811
  return start >= 0 && start <= length && end >= 0 && end <= length
38802
38812
  ? 0 /* CommandResult.Success */
38803
- : 46 /* CommandResult.WrongComposerSelection */;
38813
+ : 47 /* CommandResult.WrongComposerSelection */;
38804
38814
  }
38805
38815
  onColumnsRemoved(cmd) {
38806
38816
  if (cmd.elements.includes(this.col) && this.mode !== "inactive") {
@@ -39112,9 +39122,10 @@ class EditionPlugin extends UIPlugin {
39112
39122
  */
39113
39123
  getReferencedRanges() {
39114
39124
  const editionSheetId = this.getters.getEditionSheet();
39115
- return this.currentTokens
39125
+ const referenceRanges = this.currentTokens
39116
39126
  .filter((token) => token.type === "REFERENCE")
39117
39127
  .map((token) => this.getters.getRangeFromSheetXC(editionSheetId, token.value));
39128
+ return referenceRanges.filter((range) => !range.invalidSheetName && !range.invalidXc);
39118
39129
  }
39119
39130
  /**
39120
39131
  * Function used to determine when composer selection can start.
@@ -39717,7 +39728,7 @@ class GridSelectionPlugin extends UIPlugin {
39717
39728
  const headers = [cmd.base, ...cmd.elements];
39718
39729
  const maxHeaderValue = isCol ? this.getters.getNumberCols(id) : this.getters.getNumberRows(id);
39719
39730
  if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
39720
- return 86 /* CommandResult.InvalidHeaderIndex */;
39731
+ return 87 /* CommandResult.InvalidHeaderIndex */;
39721
39732
  }
39722
39733
  return 0 /* CommandResult.Success */;
39723
39734
  }
@@ -41092,7 +41103,7 @@ const AddMergeInteractiveContent = {
41092
41103
  };
41093
41104
  function interactiveAddMerge(env, sheetId, target) {
41094
41105
  const result = env.model.dispatch("ADD_MERGE", { sheetId, target });
41095
- if (result.isCancelledBecause(80 /* CommandResult.MergeInFilter */)) {
41106
+ if (result.isCancelledBecause(81 /* CommandResult.MergeInFilter */)) {
41096
41107
  env.raiseError(AddMergeInteractiveContent.MergeInFilter);
41097
41108
  }
41098
41109
  else if (result.isCancelledBecause(3 /* CommandResult.MergeIsDestructive */)) {
@@ -43086,7 +43097,7 @@ class SelectionStreamProcessorImpl {
43086
43097
  */
43087
43098
  moveAnchorCell(direction, step = 1) {
43088
43099
  if (step !== "end" && step <= 0) {
43089
- return new DispatchResult(83 /* CommandResult.InvalidSelectionStep */);
43100
+ return new DispatchResult(84 /* CommandResult.InvalidSelectionStep */);
43090
43101
  }
43091
43102
  const { col, row } = this.getNextAvailablePosition(direction, step);
43092
43103
  return this.selectCell(col, row);
@@ -43132,7 +43143,7 @@ class SelectionStreamProcessorImpl {
43132
43143
  */
43133
43144
  resizeAnchorZone(direction, step = 1) {
43134
43145
  if (step !== "end" && step <= 0) {
43135
- return new DispatchResult(83 /* CommandResult.InvalidSelectionStep */);
43146
+ return new DispatchResult(84 /* CommandResult.InvalidSelectionStep */);
43136
43147
  }
43137
43148
  const sheetId = this.getters.getActiveSheetId();
43138
43149
  const anchor = this.anchor;
@@ -45170,10 +45181,10 @@ class Model extends EventBus {
45170
45181
  const command = { ...payload, type };
45171
45182
  let status = this.status;
45172
45183
  if (this.getters.isReadonly() && !canExecuteInReadonly(command)) {
45173
- return new DispatchResult(67 /* CommandResult.Readonly */);
45184
+ return new DispatchResult(68 /* CommandResult.Readonly */);
45174
45185
  }
45175
45186
  if (!this.session.canApplyOptimisticUpdate()) {
45176
- return new DispatchResult(64 /* CommandResult.WaitingSessionConfirmation */);
45187
+ return new DispatchResult(65 /* CommandResult.WaitingSessionConfirmation */);
45177
45188
  }
45178
45189
  switch (status) {
45179
45190
  case 0 /* Status.Ready */:
@@ -45632,6 +45643,6 @@ function addFunction(functionName, functionDescription) {
45632
45643
  export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
45633
45644
 
45634
45645
 
45635
- __info__.version = '16.2.28';
45636
- __info__.date = '2024-01-17T10:24:07.951Z';
45637
- __info__.hash = '16cee48';
45646
+ __info__.version = '16.2.29';
45647
+ __info__.date = '2024-01-29T13:49:36.240Z';
45648
+ __info__.hash = '27b2ec1';