@pixerate/editor 0.47.0 → 0.48.0

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.
Files changed (76) hide show
  1. package/dist/agent/index.cjs +246 -29
  2. package/dist/agent/index.cjs.map +1 -1
  3. package/dist/agent/index.d.cts +18 -6
  4. package/dist/agent/index.d.ts +18 -6
  5. package/dist/agent/index.js +226 -9
  6. package/dist/agent/index.js.map +1 -1
  7. package/dist/{builtins-xs7rK6ys.d.cts → builtins-1kqwLUnb.d.cts} +1 -1
  8. package/dist/{builtins-D2nMtw2W.d.ts → builtins-BKYlHH1s.d.ts} +1 -1
  9. package/dist/chart/index.cjs +214 -3541
  10. package/dist/chart/index.cjs.map +1 -1
  11. package/dist/chart/index.d.cts +4 -494
  12. package/dist/chart/index.d.ts +4 -494
  13. package/dist/chart/index.js +135 -3462
  14. package/dist/chart/index.js.map +1 -1
  15. package/dist/{chunk-5VXI5GED.js → chunk-2CJ3LPYQ.js} +3 -3
  16. package/dist/{chunk-ZFBBVGCI.js → chunk-EKYHKQPG.js} +243 -243
  17. package/dist/{chunk-ZFBBVGCI.js.map → chunk-EKYHKQPG.js.map} +1 -1
  18. package/dist/chunk-HXUL3LS7.js +113 -0
  19. package/dist/chunk-HXUL3LS7.js.map +1 -0
  20. package/dist/{chunk-REAGGLXS.js → chunk-JQ3BB3E6.js} +2 -2
  21. package/dist/chunk-LTUM52X6.js +4074 -0
  22. package/dist/chunk-LTUM52X6.js.map +1 -0
  23. package/dist/{chunk-J3R2OWOE.cjs → chunk-MUCYWI6W.cjs} +608 -15
  24. package/dist/chunk-MUCYWI6W.cjs.map +1 -0
  25. package/dist/chunk-PIMCHMZE.cjs +521 -0
  26. package/dist/chunk-PIMCHMZE.cjs.map +1 -0
  27. package/dist/{chunk-TK2XZK6Z.js → chunk-PKBWLEL7.js} +594 -1
  28. package/dist/chunk-PKBWLEL7.js.map +1 -0
  29. package/dist/chunk-PRSJJZBS.cjs +4074 -0
  30. package/dist/chunk-PRSJJZBS.cjs.map +1 -0
  31. package/dist/chunk-U6IZKC7B.cjs +113 -0
  32. package/dist/chunk-U6IZKC7B.cjs.map +1 -0
  33. package/dist/{chunk-SQC26VQV.cjs → chunk-UN33YOXW.cjs} +191 -191
  34. package/dist/{chunk-SQC26VQV.cjs.map → chunk-UN33YOXW.cjs.map} +1 -1
  35. package/dist/{chunk-PQFAHT5O.js → chunk-VKPEPWKZ.js} +27 -94
  36. package/dist/chunk-VKPEPWKZ.js.map +1 -0
  37. package/dist/{chunk-H4PICYNL.cjs → chunk-WXEHCVJQ.cjs} +113 -180
  38. package/dist/chunk-WXEHCVJQ.cjs.map +1 -0
  39. package/dist/{chunk-LYGEEDNR.cjs → chunk-XP5IUZUO.cjs} +242 -242
  40. package/dist/chunk-XP5IUZUO.cjs.map +1 -0
  41. package/dist/{chunk-C3NWJE3K.js → chunk-XUUD43OV.js} +11 -672
  42. package/dist/chunk-XUUD43OV.js.map +1 -0
  43. package/dist/{chunk-BBRK6MOI.cjs → chunk-YU4WQE5M.cjs} +100 -100
  44. package/dist/{chunk-BBRK6MOI.cjs.map → chunk-YU4WQE5M.cjs.map} +1 -1
  45. package/dist/commands/index.d.cts +1 -1
  46. package/dist/commands/index.d.ts +1 -1
  47. package/dist/controller-ChjCCMLl.d.cts +822 -0
  48. package/dist/controller-DtbEo3om.d.ts +822 -0
  49. package/dist/extensions/index.cjs +32 -4
  50. package/dist/extensions/index.cjs.map +1 -1
  51. package/dist/extensions/index.d.cts +4 -2
  52. package/dist/extensions/index.d.ts +4 -2
  53. package/dist/extensions/index.js +31 -3
  54. package/dist/{index-QrqMmZ75.d.cts → index-DoHqT1mq.d.cts} +203 -7
  55. package/dist/{index-CSUCQYAH.d.ts → index-YLZ0fKqE.d.ts} +203 -7
  56. package/dist/index.cjs +37 -12
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.d.cts +9 -7
  59. package/dist/index.d.ts +9 -7
  60. package/dist/index.js +31 -6
  61. package/dist/index.js.map +1 -1
  62. package/dist/spreadsheet/index.cjs +4 -4
  63. package/dist/spreadsheet/index.js +3 -3
  64. package/package.json +1 -1
  65. package/dist/chunk-C3NWJE3K.js.map +0 -1
  66. package/dist/chunk-H4PICYNL.cjs.map +0 -1
  67. package/dist/chunk-J3R2OWOE.cjs.map +0 -1
  68. package/dist/chunk-LYGEEDNR.cjs.map +0 -1
  69. package/dist/chunk-NEOO6QJD.cjs +0 -1182
  70. package/dist/chunk-NEOO6QJD.cjs.map +0 -1
  71. package/dist/chunk-PQFAHT5O.js.map +0 -1
  72. package/dist/chunk-TK2XZK6Z.js.map +0 -1
  73. package/dist/types-BVqWm3d1.d.cts +0 -320
  74. package/dist/types-BVqWm3d1.d.ts +0 -320
  75. /package/dist/{chunk-5VXI5GED.js.map → chunk-2CJ3LPYQ.js.map} +0 -0
  76. /package/dist/{chunk-REAGGLXS.js.map → chunk-JQ3BB3E6.js.map} +0 -0
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkSQC26VQVcjs = require('./chunk-SQC26VQV.cjs');
12
+ var _chunkUN33YOXWcjs = require('./chunk-UN33YOXW.cjs');
13
13
 
14
14
 
15
15
 
@@ -27,7 +27,7 @@ var _chunkSQC26VQVcjs = require('./chunk-SQC26VQV.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkLYGEEDNRcjs = require('./chunk-LYGEEDNR.cjs');
30
+ var _chunkXP5IUZUOcjs = require('./chunk-XP5IUZUO.cjs');
31
31
 
32
32
 
33
33
 
@@ -74,22 +74,22 @@ function extractCellDependencies(node) {
74
74
  deps.push({ col: curr.col, row: curr.row, ...sheet });
75
75
  } else if (curr.type === "SpillRef") {
76
76
  deps.push({ col: curr.col, row: curr.row, ...sheet });
77
- } else if (curr.type === "Range" && curr.endRow >= _chunkSQC26VQVcjs.WHOLE_COLUMN_END_ROW) {
78
- const startC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, curr.startCol);
79
- const endC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, curr.endCol);
77
+ } else if (curr.type === "Range" && curr.endRow >= _chunkUN33YOXWcjs.WHOLE_COLUMN_END_ROW) {
78
+ const startC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, curr.startCol);
79
+ const endC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, curr.endCol);
80
80
  for (let c = Math.min(startC, endC); c <= Math.max(startC, endC); c++) {
81
- deps.push({ col: _chunkLYGEEDNRcjs.indexToColName.call(void 0, c), row: 0, ...sheet });
81
+ deps.push({ col: _chunkXP5IUZUOcjs.indexToColName.call(void 0, c), row: 0, ...sheet });
82
82
  }
83
83
  } else if (curr.type === "Range") {
84
- const startC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, curr.startCol);
85
- const endC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, curr.endCol);
84
+ const startC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, curr.startCol);
85
+ const endC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, curr.endCol);
86
86
  const minC = Math.min(startC, endC);
87
87
  const maxC = Math.max(startC, endC);
88
88
  const minR = Math.min(curr.startRow, curr.endRow);
89
89
  const maxR = Math.max(curr.startRow, curr.endRow);
90
90
  for (let c = minC; c <= maxC; c++) {
91
91
  for (let r = minR; r <= maxR; r++) {
92
- deps.push({ col: _chunkLYGEEDNRcjs.indexToColName.call(void 0, c), row: r, ...sheet });
92
+ deps.push({ col: _chunkXP5IUZUOcjs.indexToColName.call(void 0, c), row: r, ...sheet });
93
93
  }
94
94
  }
95
95
  } else if (curr.type === "BinaryOp") {
@@ -119,15 +119,15 @@ function extractReferenceDependencies(node) {
119
119
  deps.push({ kind: "cell", col: curr.col.toUpperCase(), row: curr.row, ...sheet });
120
120
  break;
121
121
  case "Range": {
122
- const startC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, curr.startCol);
123
- const endC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, curr.endCol);
124
- const whole = curr.endRow >= _chunkSQC26VQVcjs.WHOLE_COLUMN_END_ROW;
122
+ const startC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, curr.startCol);
123
+ const endC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, curr.endCol);
124
+ const whole = curr.endRow >= _chunkUN33YOXWcjs.WHOLE_COLUMN_END_ROW;
125
125
  deps.push({
126
126
  kind: "range",
127
- startCol: _chunkLYGEEDNRcjs.indexToColName.call(void 0, Math.min(startC, endC)),
128
- endCol: _chunkLYGEEDNRcjs.indexToColName.call(void 0, Math.max(startC, endC)),
127
+ startCol: _chunkXP5IUZUOcjs.indexToColName.call(void 0, Math.min(startC, endC)),
128
+ endCol: _chunkXP5IUZUOcjs.indexToColName.call(void 0, Math.max(startC, endC)),
129
129
  startRow: whole ? 1 : Math.min(curr.startRow, curr.endRow),
130
- endRow: whole ? _chunkSQC26VQVcjs.WHOLE_COLUMN_END_ROW : Math.max(curr.startRow, curr.endRow),
130
+ endRow: whole ? _chunkUN33YOXWcjs.WHOLE_COLUMN_END_ROW : Math.max(curr.startRow, curr.endRow),
131
131
  ...sheet
132
132
  });
133
133
  break;
@@ -253,19 +253,19 @@ function parseKey(key) {
253
253
  const sheet = bang < 0 ? "" : key.slice(0, bang);
254
254
  const ref = bang < 0 ? key : key.slice(bang + 1);
255
255
  let m = CELL_KEY.exec(ref);
256
- if (m) return { kind: "cell", sheet, col: _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, m[1]), row: Number(m[2]) };
256
+ if (m) return { kind: "cell", sheet, col: _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, m[1]), row: Number(m[2]) };
257
257
  m = RANGE_KEY.exec(ref);
258
258
  if (m) {
259
- const ca = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, m[1]);
260
- const cb = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, m[3]);
259
+ const ca = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, m[1]);
260
+ const cb = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, m[3]);
261
261
  const ra = Number(m[2]);
262
262
  const rb = Number(m[4]);
263
263
  return { kind: "range", sheet, c0: Math.min(ca, cb), c1: Math.max(ca, cb), r0: Math.min(ra, rb), r1: Math.max(ra, rb) };
264
264
  }
265
265
  m = COLUMN_KEY.exec(ref);
266
266
  if (m) {
267
- const c = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, m[1]);
268
- return { kind: "range", sheet, c0: c, c1: c, r0: 1, r1: _chunkSQC26VQVcjs.WHOLE_COLUMN_END_ROW };
267
+ const c = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, m[1]);
268
+ return { kind: "range", sheet, c0: c, c1: c, r0: 1, r1: _chunkUN33YOXWcjs.WHOLE_COLUMN_END_ROW };
269
269
  }
270
270
  return { kind: "opaque" };
271
271
  }
@@ -352,7 +352,7 @@ var DependencyGraph = (_class2 = class {constructor() { _class2.prototype.__init
352
352
  node.ranges.push({ key: dep, sheet: parsed.sheet, c0: parsed.c0, c1: parsed.c1, r0: parsed.r0, r1: parsed.r1 });
353
353
  continue;
354
354
  }
355
- const cell = parsed.kind === "range" ? `${parsed.sheet === "" ? "" : `${parsed.sheet}!`}${_chunkLYGEEDNRcjs.indexToColName.call(void 0, parsed.c0)}${parsed.r0}` : dep;
355
+ const cell = parsed.kind === "range" ? `${parsed.sheet === "" ? "" : `${parsed.sheet}!`}${_chunkXP5IUZUOcjs.indexToColName.call(void 0, parsed.c0)}${parsed.r0}` : dep;
356
356
  node.cells.add(cell);
357
357
  }
358
358
  if (node.cells.size === 0 && node.ranges.length === 0) {
@@ -403,7 +403,7 @@ var DependencyGraph = (_class2 = class {constructor() { _class2.prototype.__init
403
403
  }
404
404
  let ast;
405
405
  try {
406
- ast = _chunkSQC26VQVcjs.parseFormula.call(void 0, formulaStr);
406
+ ast = _chunkUN33YOXWcjs.parseFormula.call(void 0, formulaStr);
407
407
  } catch (e2) {
408
408
  this.setCellDependencies(key, []);
409
409
  return;
@@ -411,7 +411,7 @@ var DependencyGraph = (_class2 = class {constructor() { _class2.prototype.__init
411
411
  const keys = [];
412
412
  for (const dep of extractReferenceDependencies(ast)) {
413
413
  keys.push(
414
- dep.kind === "cell" ? `${dep.col}${dep.row}` : dep.endRow >= _chunkSQC26VQVcjs.WHOLE_COLUMN_END_ROW && dep.startCol === dep.endCol ? columnDependencyKey(dep.startCol) : rangeDependencyKey(dep.startCol, dep.startRow, dep.endCol, dep.endRow)
414
+ dep.kind === "cell" ? `${dep.col}${dep.row}` : dep.endRow >= _chunkUN33YOXWcjs.WHOLE_COLUMN_END_ROW && dep.startCol === dep.endCol ? columnDependencyKey(dep.startCol) : rangeDependencyKey(dep.startCol, dep.startRow, dep.endCol, dep.endRow)
415
415
  );
416
416
  }
417
417
  this.setCellDependencies(key, keys);
@@ -720,19 +720,19 @@ function parsePart(text) {
720
720
  if (cell) {
721
721
  return {
722
722
  colAbs: cell[1],
723
- col: _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, cell[2]),
723
+ col: _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, cell[2]),
724
724
  rowAbs: cell[3],
725
725
  row: parseInt(cell[4], 10) - 1
726
726
  };
727
727
  }
728
728
  const column = COLUMN_PART.exec(text);
729
729
  if (column) {
730
- return { colAbs: column[1], col: _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, column[2]), rowAbs: "", row: null };
730
+ return { colAbs: column[1], col: _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, column[2]), rowAbs: "", row: null };
731
731
  }
732
732
  return null;
733
733
  }
734
734
  function formatPart(part) {
735
- const col = `${part.colAbs}${_chunkLYGEEDNRcjs.indexToColName.call(void 0, part.col)}`;
735
+ const col = `${part.colAbs}${_chunkXP5IUZUOcjs.indexToColName.call(void 0, part.col)}`;
736
736
  return part.row === null ? col : `${col}${part.rowAbs}${part.row + 1}`;
737
737
  }
738
738
  function shiftCoordinate(value, change) {
@@ -782,7 +782,7 @@ function mapFormulaReferences(formula, rewrite) {
782
782
  if (!formula.startsWith("=")) return formula;
783
783
  let tokens;
784
784
  try {
785
- tokens = _chunkSQC26VQVcjs.tokenizeFormula.call(void 0, formula);
785
+ tokens = _chunkUN33YOXWcjs.tokenizeFormula.call(void 0, formula);
786
786
  } catch (e3) {
787
787
  return formula;
788
788
  }
@@ -911,7 +911,7 @@ function formatSheetPrefix(sheet, sheetEnd) {
911
911
  function tokensOf(formula) {
912
912
  if (!formula.startsWith("=")) return null;
913
913
  try {
914
- return _chunkSQC26VQVcjs.tokenizeFormula.call(void 0, formula);
914
+ return _chunkUN33YOXWcjs.tokenizeFormula.call(void 0, formula);
915
915
  } catch (e4) {
916
916
  return null;
917
917
  }
@@ -1041,7 +1041,7 @@ function innermostCall(stack) {
1041
1041
  }
1042
1042
  var toSuggestion = (def) => ({
1043
1043
  name: def.name,
1044
- signature: _chunkSQC26VQVcjs.getFormulaSignature.call(void 0, def),
1044
+ signature: _chunkUN33YOXWcjs.getFormulaSignature.call(void 0, def),
1045
1045
  description: def.description,
1046
1046
  category: def.category
1047
1047
  });
@@ -1060,21 +1060,21 @@ function getFormulaHints(input, caret = input.length, options = {}) {
1060
1060
  }));
1061
1061
  suggestions = [
1062
1062
  ...names,
1063
- ..._chunkSQC26VQVcjs.searchFormulaFunctions.call(void 0, query, { limit: void 0 }).filter((def) => def.name.startsWith(query) && !names.some((n) => n.name.toUpperCase() === def.name)).map(toSuggestion)
1063
+ ..._chunkUN33YOXWcjs.searchFormulaFunctions.call(void 0, query, { limit: void 0 }).filter((def) => def.name.startsWith(query) && !names.some((n) => n.name.toUpperCase() === def.name)).map(toSuggestion)
1064
1064
  ].slice(0, _nullishCoalesce(options.limit, () => ( 8)));
1065
1065
  const followedByParen = input.slice(context.prefix.end).trimStart().startsWith("(");
1066
1066
  if (followedByParen || suggestions.length === 1 && suggestions[0].name.toUpperCase() === query) suggestions = [];
1067
1067
  }
1068
1068
  let activeCall = null;
1069
1069
  if (context.call) {
1070
- const def = _chunkSQC26VQVcjs.getFormulaFunction.call(void 0, context.call.name);
1070
+ const def = _chunkUN33YOXWcjs.getFormulaFunction.call(void 0, context.call.name);
1071
1071
  if (def) {
1072
- const specIndex = _chunkSQC26VQVcjs.getFormulaArgumentSpecIndex.call(void 0, def, context.call.argIndex);
1072
+ const specIndex = _chunkUN33YOXWcjs.getFormulaArgumentSpecIndex.call(void 0, def, context.call.argIndex);
1073
1073
  activeCall = {
1074
1074
  name: def.name,
1075
- signature: _chunkSQC26VQVcjs.getFormulaSignature.call(void 0, def),
1075
+ signature: _chunkUN33YOXWcjs.getFormulaSignature.call(void 0, def),
1076
1076
  description: def.description,
1077
- parts: _chunkSQC26VQVcjs.getFormulaSignatureParts.call(void 0, def, context.call.argIndex),
1077
+ parts: _chunkUN33YOXWcjs.getFormulaSignatureParts.call(void 0, def, context.call.argIndex),
1078
1078
  argIndex: context.call.argIndex,
1079
1079
  argument: specIndex >= 0 ? def.args[specIndex] : null
1080
1080
  };
@@ -1122,7 +1122,7 @@ function numberFormatForCellFormat(format) {
1122
1122
  }
1123
1123
  }
1124
1124
  function cellFormatForNumberFormat(code) {
1125
- switch (_chunkLYGEEDNRcjs.NumberFormat.parseCached(code).kind()) {
1125
+ switch (_chunkXP5IUZUOcjs.NumberFormat.parseCached(code).kind()) {
1126
1126
  case "number":
1127
1127
  case "fraction":
1128
1128
  case "scientific":
@@ -1141,7 +1141,7 @@ function cellFormatForNumberFormat(code) {
1141
1141
  return void 0;
1142
1142
  }
1143
1143
  }
1144
- var isGeneralNumberFormat = (code) => code === void 0 || _chunkLYGEEDNRcjs.NumberFormat.parseCached(code).isGeneral();
1144
+ var isGeneralNumberFormat = (code) => code === void 0 || _chunkXP5IUZUOcjs.NumberFormat.parseCached(code).isGeneral();
1145
1145
 
1146
1146
  // src/spreadsheet/formula/format.ts
1147
1147
  function formatCellForDisplay(cell) {
@@ -1149,16 +1149,16 @@ function formatCellForDisplay(cell) {
1149
1149
  if (cell.error) return { text: cell.error, numeric: false };
1150
1150
  const { value } = cell;
1151
1151
  const code = _nullishCoalesce(cell.numberFormat, () => ( (typeof value === "number" ? numberFormatForCellFormat(cell.format) : void 0)));
1152
- if (code !== void 0 && !isGeneralNumberFormat(code) && !_chunkLYGEEDNRcjs.isBlank.call(void 0, value) && typeof value !== "boolean") {
1153
- return _chunkLYGEEDNRcjs.NumberFormat.parseCached(code).format(value);
1152
+ if (code !== void 0 && !isGeneralNumberFormat(code) && !_chunkXP5IUZUOcjs.isBlank.call(void 0, value) && typeof value !== "boolean") {
1153
+ return _chunkXP5IUZUOcjs.NumberFormat.parseCached(code).format(value);
1154
1154
  }
1155
- return { text: _chunkLYGEEDNRcjs.toText.call(void 0, value), numeric: typeof value === "number" };
1155
+ return { text: _chunkXP5IUZUOcjs.toText.call(void 0, value), numeric: typeof value === "number" };
1156
1156
  }
1157
1157
  function formatCellDisplay(cell) {
1158
1158
  return formatCellForDisplay(cell).text;
1159
1159
  }
1160
1160
  function formatValueWithCode(value, format) {
1161
- const result = _chunkLYGEEDNRcjs.formatTextFunction.call(void 0, value, format);
1161
+ const result = _chunkXP5IUZUOcjs.formatTextFunction.call(void 0, value, format);
1162
1162
  return "text" in result ? result.text : null;
1163
1163
  }
1164
1164
 
@@ -1336,28 +1336,28 @@ function compareCellValues(a, b, direction = "asc") {
1336
1336
  const bBlank = isBlankValue(b);
1337
1337
  if (aBlank || bBlank) return aBlank === bBlank ? 0 : aBlank ? 1 : -1;
1338
1338
  let result;
1339
- if (isPlainText(a) && isPlainText(b) && !(_chunkLYGEEDNRcjs.parseIsoDate.call(void 0, a) && _chunkLYGEEDNRcjs.parseIsoDate.call(void 0, b))) {
1339
+ if (isPlainText(a) && isPlainText(b) && !(_chunkXP5IUZUOcjs.parseIsoDate.call(void 0, a) && _chunkXP5IUZUOcjs.parseIsoDate.call(void 0, b))) {
1340
1340
  result = compareText(a, b);
1341
1341
  } else {
1342
- result = _chunkLYGEEDNRcjs.sortCompareValues.call(void 0, a, b);
1342
+ result = _chunkXP5IUZUOcjs.sortCompareValues.call(void 0, a, b);
1343
1343
  }
1344
1344
  if (result === 0) return 0;
1345
1345
  return direction === "desc" ? -Math.sign(result) : Math.sign(result);
1346
1346
  }
1347
- var isPlainText = (value) => typeof value === "string" && !_chunkLYGEEDNRcjs.isFormulaError.call(void 0, value);
1347
+ var isPlainText = (value) => typeof value === "string" && !_chunkXP5IUZUOcjs.isFormulaError.call(void 0, value);
1348
1348
  function filterValue(value) {
1349
- if (isBlankValue(value) || _chunkLYGEEDNRcjs.isFormulaError.call(void 0, value)) return null;
1349
+ if (isBlankValue(value) || _chunkXP5IUZUOcjs.isFormulaError.call(void 0, value)) return null;
1350
1350
  if (typeof value === "number") return Number.isFinite(value) ? { value, kind: "number" } : null;
1351
1351
  if (typeof value === "boolean") return { value, kind: "boolean" };
1352
- const num = _chunkLYGEEDNRcjs.numericValue.call(void 0, value);
1352
+ const num = _chunkXP5IUZUOcjs.numericValue.call(void 0, value);
1353
1353
  if (num !== null) return { value: num, kind: "number" };
1354
1354
  const text = String(value);
1355
- return { value: text, kind: _chunkLYGEEDNRcjs.parseIsoDate.call(void 0, text) ? "number" : "text" };
1355
+ return { value: text, kind: _chunkXP5IUZUOcjs.parseIsoDate.call(void 0, text) ? "number" : "text" };
1356
1356
  }
1357
1357
  function filterOperand(operand) {
1358
1358
  if (typeof operand !== "string") return filterValue(operand);
1359
1359
  if (operand.trim() === "") return null;
1360
- const parsed = _chunkLYGEEDNRcjs.parseCellInput.call(void 0, operand.trim());
1360
+ const parsed = _chunkXP5IUZUOcjs.parseCellInput.call(void 0, operand.trim());
1361
1361
  if (parsed.type === "number" || parsed.type === "date" || parsed.type === "boolean") return filterValue(parsed.value);
1362
1362
  return { value: operand, kind: "text" };
1363
1363
  }
@@ -1365,7 +1365,7 @@ function compareForFilter(value, operand) {
1365
1365
  const a = filterValue(value);
1366
1366
  const b = filterOperand(operand);
1367
1367
  if (!a || !b || a.kind !== b.kind) return null;
1368
- return _chunkLYGEEDNRcjs.compareValues.call(void 0, a.value, b.value);
1368
+ return _chunkXP5IUZUOcjs.compareValues.call(void 0, a.value, b.value);
1369
1369
  }
1370
1370
  function looselyEquals(value, operand) {
1371
1371
  const c = compareForFilter(value, operand);
@@ -1444,7 +1444,7 @@ function classifyFillValue(raw) {
1444
1444
  if (raw.trim() === "") return { kind: "blank" };
1445
1445
  const num = toNumber(raw);
1446
1446
  if (num !== null) return { kind: "number", value: num };
1447
- const typed = _chunkLYGEEDNRcjs.parseCellInput.call(void 0, raw);
1447
+ const typed = _chunkXP5IUZUOcjs.parseCellInput.call(void 0, raw);
1448
1448
  const date = ISO_DATE_PATTERN.exec(typed.type === "date" ? String(typed.value) : raw.trim());
1449
1449
  if (date) {
1450
1450
  const [year, month, day] = [Number(date[1]), Number(date[2]), Number(date[3])];
@@ -1782,8 +1782,8 @@ function forEachRangeCell(ranges, rowCount, colCount, fn) {
1782
1782
  function formatRuleRanges(ranges) {
1783
1783
  return ranges.map((range) => {
1784
1784
  const r = normalizeRange(range);
1785
- const start = `${_chunkLYGEEDNRcjs.indexToColName.call(void 0, r.startCol)}${r.startRow + 1}`;
1786
- const end = `${_chunkLYGEEDNRcjs.indexToColName.call(void 0, r.endCol)}${r.endRow + 1}`;
1785
+ const start = `${_chunkXP5IUZUOcjs.indexToColName.call(void 0, r.startCol)}${r.startRow + 1}`;
1786
+ const end = `${_chunkXP5IUZUOcjs.indexToColName.call(void 0, r.endCol)}${r.endRow + 1}`;
1787
1787
  return start === end ? start : `${start}:${end}`;
1788
1788
  }).join(", ");
1789
1789
  }
@@ -1796,9 +1796,9 @@ function parseRuleRanges(text) {
1796
1796
  const m = A1_RANGE.exec(part);
1797
1797
  if (!m) return null;
1798
1798
  const startRow = Number(m[2]) - 1;
1799
- const startCol = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, m[1]);
1799
+ const startCol = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, m[1]);
1800
1800
  const endRow = m[4] ? Number(m[4]) - 1 : startRow;
1801
- const endCol = m[3] ? _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, m[3]) : startCol;
1801
+ const endCol = m[3] ? _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, m[3]) : startCol;
1802
1802
  if (startRow < 0 || endRow < 0 || startCol < 0 || endCol < 0) return null;
1803
1803
  out.push(normalizeRange({ startRow, startCol, endRow, endCol }));
1804
1804
  }
@@ -2027,7 +2027,7 @@ function conditionalFormatNumber(value) {
2027
2027
  if (typeof value !== "string" || value.length < 8 || value.length > 19) return null;
2028
2028
  const m = ISO_DATE.exec(value);
2029
2029
  if (!m) return null;
2030
- const serial = _chunkLYGEEDNRcjs.serialFromYmd.call(void 0, Number(m[1]), Number(m[2]), Number(m[3]));
2030
+ const serial = _chunkXP5IUZUOcjs.serialFromYmd.call(void 0, Number(m[1]), Number(m[2]), Number(m[3]));
2031
2031
  if (serial === null) return null;
2032
2032
  const time = m[4] ? (Number(m[4]) * 3600 + Number(m[5]) * 60 + Number(_nullishCoalesce(m[6], () => ( 0)))) / 86400 : 0;
2033
2033
  return serial + time;
@@ -2035,7 +2035,7 @@ function conditionalFormatNumber(value) {
2035
2035
  function valueText(value) {
2036
2036
  if (isBlank2(value)) return "";
2037
2037
  if (typeof value === "boolean") return value ? "TRUE" : "FALSE";
2038
- if (typeof value === "number") return _chunkLYGEEDNRcjs.numberToText.call(void 0, value);
2038
+ if (typeof value === "number") return _chunkXP5IUZUOcjs.numberToText.call(void 0, value);
2039
2039
  return String(value);
2040
2040
  }
2041
2041
  function firstValue(value) {
@@ -2249,7 +2249,7 @@ var ConditionalFormatEngine = (_class4 = class {
2249
2249
  operand(text, rule, row, col) {
2250
2250
  if (text === void 0) return "";
2251
2251
  if (isFormulaText2(text)) return this.evalFormula(text, rule, row, col);
2252
- return _chunkLYGEEDNRcjs.parseCellInput.call(void 0, text).value;
2252
+ return _chunkXP5IUZUOcjs.parseCellInput.call(void 0, text).value;
2253
2253
  }
2254
2254
  /** Combines every rule that applies to (row, col). */
2255
2255
  computeLook(rules, row, col) {
@@ -2281,7 +2281,7 @@ var ConditionalFormatEngine = (_class4 = class {
2281
2281
  * scale fill, bar or icon on `out`, or null.
2282
2282
  */
2283
2283
  matchRule(rule, v, row, col, out) {
2284
- const error = _chunkLYGEEDNRcjs.isFormulaError.call(void 0, v);
2284
+ const error = _chunkXP5IUZUOcjs.isFormulaError.call(void 0, v);
2285
2285
  switch (rule.type) {
2286
2286
  case "cellIs": {
2287
2287
  if (error) return null;
@@ -2289,18 +2289,18 @@ var ConditionalFormatEngine = (_class4 = class {
2289
2289
  let ok;
2290
2290
  if (rule.operator === "between" || rule.operator === "notBetween") {
2291
2291
  const b = this.operand(rule.value2, rule, row, col);
2292
- const [lo, hi] = _chunkLYGEEDNRcjs.compareValues.call(void 0, a, b) > 0 ? [b, a] : [a, b];
2293
- const inside = _chunkLYGEEDNRcjs.compareValues.call(void 0, v, lo) >= 0 && _chunkLYGEEDNRcjs.compareValues.call(void 0, v, hi) <= 0;
2292
+ const [lo, hi] = _chunkXP5IUZUOcjs.compareValues.call(void 0, a, b) > 0 ? [b, a] : [a, b];
2293
+ const inside = _chunkXP5IUZUOcjs.compareValues.call(void 0, v, lo) >= 0 && _chunkXP5IUZUOcjs.compareValues.call(void 0, v, hi) <= 0;
2294
2294
  ok = rule.operator === "between" ? inside : !inside;
2295
2295
  } else {
2296
- if (_chunkLYGEEDNRcjs.isFormulaError.call(void 0, a)) return null;
2297
- const cmp = _chunkLYGEEDNRcjs.compareValues.call(void 0, v, a);
2296
+ if (_chunkXP5IUZUOcjs.isFormulaError.call(void 0, a)) return null;
2297
+ const cmp = _chunkXP5IUZUOcjs.compareValues.call(void 0, v, a);
2298
2298
  ok = rule.operator === "equal" ? cmp === 0 : rule.operator === "notEqual" ? cmp !== 0 : rule.operator === "greaterThan" ? cmp > 0 : rule.operator === "lessThan" ? cmp < 0 : rule.operator === "greaterThanOrEqual" ? cmp >= 0 : cmp <= 0;
2299
2299
  }
2300
2300
  return ok ? rule.style : null;
2301
2301
  }
2302
2302
  case "expression": {
2303
- const result = _chunkLYGEEDNRcjs.toBoolean.call(void 0, this.evalFormula(rule.formula, rule, row, col));
2303
+ const result = _chunkXP5IUZUOcjs.toBoolean.call(void 0, this.evalFormula(rule.formula, rule, row, col));
2304
2304
  return result === true ? rule.style : null;
2305
2305
  }
2306
2306
  case "containsText":
@@ -2404,10 +2404,10 @@ var ConditionalFormatEngine = (_class4 = class {
2404
2404
  }
2405
2405
  }, _class4);
2406
2406
  function matchesTimePeriod(period, d, today) {
2407
- const t = _chunkLYGEEDNRcjs.serialFromYmd.call(void 0, today.getFullYear(), today.getMonth() + 1, today.getDate());
2407
+ const t = _chunkXP5IUZUOcjs.serialFromYmd.call(void 0, today.getFullYear(), today.getMonth() + 1, today.getDate());
2408
2408
  if (t === null) return false;
2409
2409
  const weekStart = t - today.getDay();
2410
- const date = _chunkLYGEEDNRcjs.serialToDate.call(void 0, d);
2410
+ const date = _chunkXP5IUZUOcjs.serialToDate.call(void 0, d);
2411
2411
  const monthOffset = (k) => {
2412
2412
  if (!date) return false;
2413
2413
  const m = today.getMonth() + k;
@@ -2710,7 +2710,7 @@ var isBlank3 = (v) => v === "" || v === null || v === void 0;
2710
2710
  function valueText2(value) {
2711
2711
  if (isBlank3(value)) return "";
2712
2712
  if (typeof value === "boolean") return value ? "TRUE" : "FALSE";
2713
- if (typeof value === "number") return _chunkLYGEEDNRcjs.numberToText.call(void 0, value);
2713
+ if (typeof value === "number") return _chunkXP5IUZUOcjs.numberToText.call(void 0, value);
2714
2714
  return String(value);
2715
2715
  }
2716
2716
  function findDataValidation(rules, row, col) {
@@ -2735,7 +2735,7 @@ function getValidationListValues(sheet, rule) {
2735
2735
  const result = evaluate(sheet, rule, f, anchor.row, anchor.col);
2736
2736
  const values = Array.isArray(result) ? result : [result];
2737
2737
  const out = [];
2738
- for (const v of values) if (!isBlank3(v) && !_chunkLYGEEDNRcjs.isFormulaError.call(void 0, v)) out.push(valueText2(v));
2738
+ for (const v of values) if (!isBlank3(v) && !_chunkXP5IUZUOcjs.isFormulaError.call(void 0, v)) out.push(valueText2(v));
2739
2739
  return out;
2740
2740
  }
2741
2741
  const unquoted = f.length >= 2 && f.startsWith('"') && f.endsWith('"') ? f.slice(1, -1) : f;
@@ -2764,7 +2764,7 @@ function compareOp(op, n, a, b) {
2764
2764
  }
2765
2765
  function bound(sheet, rule, text, row, col, entered) {
2766
2766
  if (text === void 0 || text.trim() === "") return null;
2767
- const value = text.trim().startsWith("=") ? first(evaluate(sheet, rule, text, row, col, entered)) : _chunkLYGEEDNRcjs.parseCellInput.call(void 0, text.trim()).value;
2767
+ const value = text.trim().startsWith("=") ? first(evaluate(sheet, rule, text, row, col, entered)) : _chunkXP5IUZUOcjs.parseCellInput.call(void 0, text.trim()).value;
2768
2768
  return conditionalFormatNumber(value);
2769
2769
  }
2770
2770
  function satisfies(sheet, rule, row, col, value, text, entered) {
@@ -2775,18 +2775,18 @@ function satisfies(sheet, rule, row, col, value, text, entered) {
2775
2775
  case "list": {
2776
2776
  const typed = text.trim().toLowerCase();
2777
2777
  return getValidationListValues(sheet, rule).some(
2778
- (item) => item.toLowerCase() === typed || _chunkLYGEEDNRcjs.compareValues.call(void 0, _chunkLYGEEDNRcjs.parseCellInput.call(void 0, item).value, value) === 0
2778
+ (item) => item.toLowerCase() === typed || _chunkXP5IUZUOcjs.compareValues.call(void 0, _chunkXP5IUZUOcjs.parseCellInput.call(void 0, item).value, value) === 0
2779
2779
  );
2780
2780
  }
2781
2781
  case "custom":
2782
- return _chunkLYGEEDNRcjs.toBoolean.call(void 0, first(evaluate(sheet, rule, _nullishCoalesce(rule.formula1, () => ( "")), row, col, entered))) === true;
2782
+ return _chunkXP5IUZUOcjs.toBoolean.call(void 0, first(evaluate(sheet, rule, _nullishCoalesce(rule.formula1, () => ( "")), row, col, entered))) === true;
2783
2783
  case "textLength":
2784
2784
  return compareOp(op, Array.from(text).length, bound(sheet, rule, rule.formula1, row, col, entered), bound(sheet, rule, rule.formula2, row, col, entered));
2785
2785
  case "whole":
2786
2786
  case "decimal":
2787
2787
  case "date":
2788
2788
  case "time": {
2789
- if (_chunkLYGEEDNRcjs.isFormulaError.call(void 0, value)) return false;
2789
+ if (_chunkXP5IUZUOcjs.isFormulaError.call(void 0, value)) return false;
2790
2790
  let n = conditionalFormatNumber(value);
2791
2791
  if (n === null) return false;
2792
2792
  if (rule.type === "whole" && !Number.isInteger(n)) return false;
@@ -2815,7 +2815,7 @@ function validateCellInput(sheet, rules, row, col, input) {
2815
2815
  value = first(sheet.evaluateFormula ? safeEval(sheet, input, row, col) : "#NAME?");
2816
2816
  text = valueText2(value);
2817
2817
  } else {
2818
- value = _chunkLYGEEDNRcjs.parseCellInput.call(void 0, input).value;
2818
+ value = _chunkXP5IUZUOcjs.parseCellInput.call(void 0, input).value;
2819
2819
  if (input.startsWith("'")) text = input.slice(1);
2820
2820
  }
2821
2821
  const entered = { row, col, value };
@@ -3189,7 +3189,7 @@ var SpreadsheetController = (_class6 = class {
3189
3189
  if (options.dataSources) {
3190
3190
  options.dataSources.forEach((ds) => this.binder.register(ds));
3191
3191
  }
3192
- this.evaluator = new (0, _chunkSQC26VQVcjs.FormulaEvaluator)({
3192
+ this.evaluator = new (0, _chunkUN33YOXWcjs.FormulaEvaluator)({
3193
3193
  resolveCell: (colStr, rowNum, sheet) => this.onSheet(sheet, () => this.resolveCellByCoord(colStr, rowNum)),
3194
3194
  resolveRange: (sCol, sRow, eCol, eRow, sheet, options2) => this.onSheet(sheet, () => this.resolveRangeByCoords(sCol, sRow, eCol, eRow, options2)),
3195
3195
  resolveProperty: (prop) => this.resolveCurrentRowProperty(prop),
@@ -3433,7 +3433,7 @@ var SpreadsheetController = (_class6 = class {
3433
3433
  * number) when `format` is unset or `text` (the default of new columns).
3434
3434
  */
3435
3435
  typedCell(raw, format, col, existing) {
3436
- const parsed = _chunkLYGEEDNRcjs.parseCellInput.call(void 0, raw);
3436
+ const parsed = _chunkXP5IUZUOcjs.parseCellInput.call(void 0, raw);
3437
3437
  const fixed = this.fixedNumberFormat(col, existing);
3438
3438
  const numberFormat = _nullishCoalesce(fixed, () => ( parsed.numberFormat));
3439
3439
  return {
@@ -3467,7 +3467,7 @@ var SpreadsheetController = (_class6 = class {
3467
3467
  if (raw.startsWith("=")) return raw;
3468
3468
  const type = _optionalChain([this, 'access', _127 => _127.binder, 'access', _128 => _128.getDataSource, 'call', _129 => _129(dataSourceId), 'optionalAccess', _130 => _130.getFields, 'call', _131 => _131(), 'access', _132 => _132.find, 'call', _133 => _133((f) => f.key === field), 'optionalAccess', _134 => _134.type]);
3469
3469
  if (type !== "number" && type !== "boolean" && type !== "date") return raw;
3470
- const parsed = _chunkLYGEEDNRcjs.parseCellInput.call(void 0, raw);
3470
+ const parsed = _chunkXP5IUZUOcjs.parseCellInput.call(void 0, raw);
3471
3471
  if (type === "number" && parsed.type === "number") return parsed.value;
3472
3472
  if (type === "boolean" && parsed.type === "boolean") return parsed.value;
3473
3473
  if (type === "date" && parsed.type === "date") return parsed.value;
@@ -3496,7 +3496,7 @@ var SpreadsheetController = (_class6 = class {
3496
3496
  r.index = idx;
3497
3497
  });
3498
3498
  this.document.columns.forEach((c, idx) => {
3499
- c.key = _chunkLYGEEDNRcjs.indexToColName.call(void 0, idx);
3499
+ c.key = _chunkXP5IUZUOcjs.indexToColName.call(void 0, idx);
3500
3500
  });
3501
3501
  }
3502
3502
  getColumn(colIdOrKey) {
@@ -3525,7 +3525,7 @@ var SpreadsheetController = (_class6 = class {
3525
3525
  /** The column whose key is `key` (`A`, `B`, …): keys follow column positions. */
3526
3526
  columnByKey(key) {
3527
3527
  const upper = key.toUpperCase();
3528
- const col = this.document.columns[_chunkLYGEEDNRcjs.colNameToIndex.call(void 0, upper)];
3528
+ const col = this.document.columns[_chunkXP5IUZUOcjs.colNameToIndex.call(void 0, upper)];
3529
3529
  if (col && col.key.toUpperCase() === upper) return col;
3530
3530
  return this.document.columns.find((c) => c.key.toUpperCase() === upper);
3531
3531
  }
@@ -3682,7 +3682,7 @@ var SpreadsheetController = (_class6 = class {
3682
3682
  parseCached(formula) {
3683
3683
  let ast = this.astCache.get(formula);
3684
3684
  if (!ast) {
3685
- ast = _chunkSQC26VQVcjs.parseFormula.call(void 0, formula);
3685
+ ast = _chunkUN33YOXWcjs.parseFormula.call(void 0, formula);
3686
3686
  if (this.astCache.size >= AST_CACHE_SIZE) this.astCache.clear();
3687
3687
  this.astCache.set(formula, ast);
3688
3688
  }
@@ -3715,7 +3715,7 @@ var SpreadsheetController = (_class6 = class {
3715
3715
  }
3716
3716
  for (const used of extractNameDependencies(ast)) {
3717
3717
  if (used.call) {
3718
- const fn = _chunkSQC26VQVcjs.getFormulaFunction.call(void 0, used.name);
3718
+ const fn = _chunkUN33YOXWcjs.getFormulaFunction.call(void 0, used.name);
3719
3719
  if (fn) {
3720
3720
  if (fn.volatile) volatile.found = true;
3721
3721
  continue;
@@ -3731,7 +3731,7 @@ var SpreadsheetController = (_class6 = class {
3731
3731
  if (seenNames.has(seenKey)) continue;
3732
3732
  seenNames.add(seenKey);
3733
3733
  try {
3734
- this.collectDependencies(_chunkSQC26VQVcjs.parseFormula.call(void 0, def.refersTo), nameHome, out, seenNames, volatile);
3734
+ this.collectDependencies(_chunkUN33YOXWcjs.parseFormula.call(void 0, def.refersTo), nameHome, out, seenNames, volatile);
3735
3735
  } catch (e11) {
3736
3736
  }
3737
3737
  }
@@ -3838,7 +3838,7 @@ var SpreadsheetController = (_class6 = class {
3838
3838
  }
3839
3839
  if (onActive) this.markValueChanged(located.key);
3840
3840
  const spilled = hadSpill || this.spills.has(located.key) || (_nullishCoalesce(_optionalChain([this, 'access', _158 => _158.spillChanges, 'optionalAccess', _159 => _159.size]), () => ( 0))) !== spillChanges;
3841
- this.invalidateRangeCache(located.rt.doc.id, spilled ? null : _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, located.key.replace(/\d+$/, "")));
3841
+ this.invalidateRangeCache(located.rt.doc.id, spilled ? null : _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, located.key.replace(/\d+$/, "")));
3842
3842
  });
3843
3843
  }
3844
3844
  } finally {
@@ -3940,7 +3940,7 @@ var SpreadsheetController = (_class6 = class {
3940
3940
  placeSpill(anchor, row, col, array) {
3941
3941
  const { rows, cols } = array;
3942
3942
  const area = { startRow: row, startCol: col, endRow: row + rows - 1, endCol: col + cols - 1 };
3943
- const label = `${_chunkLYGEEDNRcjs.indexToColName.call(void 0, area.startCol)}${area.startRow + 1}:${_chunkLYGEEDNRcjs.indexToColName.call(void 0, area.endCol)}${area.endRow + 1}`;
3943
+ const label = `${_chunkXP5IUZUOcjs.indexToColName.call(void 0, area.startCol)}${area.startRow + 1}:${_chunkXP5IUZUOcjs.indexToColName.call(void 0, area.endCol)}${area.endRow + 1}`;
3944
3944
  let reason = null;
3945
3945
  const blockers = [];
3946
3946
  if (area.endRow >= this.document.rows.length || area.endCol >= this.document.columns.length) {
@@ -3989,9 +3989,9 @@ var SpreadsheetController = (_class6 = class {
3989
3989
  spillAnchor: anchor,
3990
3990
  ...this.fixedNumberFormatFields(column, _optionalChain([this, 'access', _164 => _164.document, 'access', _165 => _165.cells, 'access', _166 => _166[rowObj.id], 'optionalAccess', _167 => _167[column.id]]))
3991
3991
  };
3992
- if (_chunkLYGEEDNRcjs.isFormulaError.call(void 0, value)) {
3992
+ if (_chunkXP5IUZUOcjs.isFormulaError.call(void 0, value)) {
3993
3993
  display.error = value;
3994
- display.errorMessage = _chunkSQC26VQVcjs.describeFormulaError.call(void 0, value);
3994
+ display.errorMessage = _chunkUN33YOXWcjs.describeFormulaError.call(void 0, value);
3995
3995
  }
3996
3996
  this.spillCells.set(spillCellId(rowObj.id, column.id), display);
3997
3997
  if (this.spilledBy.get(key) !== anchor) {
@@ -4033,7 +4033,7 @@ var SpreadsheetController = (_class6 = class {
4033
4033
  const record = this.spills.get(`${colStr}${rowNum}`.toUpperCase());
4034
4034
  if (record) return { rows: record.rows, cols: record.cols, values: record.values };
4035
4035
  const value = this.resolveCellByCoord(colStr, rowNum);
4036
- return _chunkLYGEEDNRcjs.isFormulaError.call(void 0, value) ? value : "#REF!";
4036
+ return _chunkXP5IUZUOcjs.isFormulaError.call(void 0, value) ? value : "#REF!";
4037
4037
  }
4038
4038
  toSpill(record) {
4039
4039
  const row = this.document.rows[record.row];
@@ -4056,7 +4056,7 @@ var SpreadsheetController = (_class6 = class {
4056
4056
  */
4057
4057
  getSpillAt(row, col) {
4058
4058
  if (this.spills.size === 0) return null;
4059
- const key = `${_chunkLYGEEDNRcjs.indexToColName.call(void 0, col)}${row + 1}`;
4059
+ const key = `${_chunkXP5IUZUOcjs.indexToColName.call(void 0, col)}${row + 1}`;
4060
4060
  const record = _nullishCoalesce(this.spills.get(key), () => ( this.spills.get(_nullishCoalesce(this.spilledBy.get(key), () => ( "")))));
4061
4061
  return record ? this.toSpill(record) : null;
4062
4062
  }
@@ -4091,12 +4091,12 @@ var SpreadsheetController = (_class6 = class {
4091
4091
  * a sparse column costs one lookup per row and no array slot.
4092
4092
  */
4093
4093
  resolveRangeByCoords(sCol, sRow, eCol, eRow, options) {
4094
- const startC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, sCol);
4095
- const endC = _chunkLYGEEDNRcjs.colNameToIndex.call(void 0, eCol);
4094
+ const startC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, sCol);
4095
+ const endC = _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, eCol);
4096
4096
  const minC = Math.min(startC, endC);
4097
4097
  const maxC = Math.max(startC, endC);
4098
4098
  const minR = Math.min(sRow, eRow);
4099
- const maxR = Math.min(Math.max(sRow, eRow), _chunkSQC26VQVcjs.WHOLE_COLUMN_END_ROW, this.document.rows.length);
4099
+ const maxR = Math.min(Math.max(sRow, eRow), _chunkUN33YOXWcjs.WHOLE_COLUMN_END_ROW, this.document.rows.length);
4100
4100
  const skipBlanks = _optionalChain([options, 'optionalAccess', _177 => _177.skipBlanks]) === true;
4101
4101
  const cacheable = this.rangeCache !== null && !this.valueOverride && (maxC - minC + 1) * (maxR - minR + 1) >= RANGE_CACHE_MIN_CELLS;
4102
4102
  const cacheKey = cacheable ? `${this.document.id}|${minC}|${maxC}|${minR}|${maxR}|${skipBlanks ? 1 : 0}` : "";
@@ -4109,7 +4109,7 @@ var SpreadsheetController = (_class6 = class {
4109
4109
  const spills = this.spillCells.size > 0 ? this.spillCells : null;
4110
4110
  const results = [];
4111
4111
  for (let c = minC; c <= maxC; c++) {
4112
- const col = this.columnByKey(_chunkLYGEEDNRcjs.indexToColName.call(void 0, c));
4112
+ const col = this.columnByKey(_chunkXP5IUZUOcjs.indexToColName.call(void 0, c));
4113
4113
  if (!col) continue;
4114
4114
  const plain = col.type !== "bound" && col.type !== "formula";
4115
4115
  const colId = col.id;
@@ -4305,8 +4305,8 @@ var SpreadsheetController = (_class6 = class {
4305
4305
  const newId = _optionalChain([config, 'optionalAccess', _206 => _206.id]) || this.generateId("col");
4306
4306
  const newCol = {
4307
4307
  id: newId,
4308
- key: _chunkLYGEEDNRcjs.indexToColName.call(void 0, index),
4309
- title: _optionalChain([config, 'optionalAccess', _207 => _207.title]) || _chunkLYGEEDNRcjs.indexToColName.call(void 0, index),
4308
+ key: _chunkXP5IUZUOcjs.indexToColName.call(void 0, index),
4309
+ title: _optionalChain([config, 'optionalAccess', _207 => _207.title]) || _chunkXP5IUZUOcjs.indexToColName.call(void 0, index),
4310
4310
  width: _optionalChain([config, 'optionalAccess', _208 => _208.width]) || 130,
4311
4311
  type: _optionalChain([config, 'optionalAccess', _209 => _209.type]) || "freeform",
4312
4312
  binding: _optionalChain([config, 'optionalAccess', _210 => _210.binding]),
@@ -4465,7 +4465,7 @@ var SpreadsheetController = (_class6 = class {
4465
4465
  this.document.rows.push({ id: this.generateId("row"), index, height: 32, type: "freeform" });
4466
4466
  }
4467
4467
  while (colIndex >= this.document.columns.length) {
4468
- const key = _chunkLYGEEDNRcjs.indexToColName.call(void 0, this.document.columns.length);
4468
+ const key = _chunkXP5IUZUOcjs.indexToColName.call(void 0, this.document.columns.length);
4469
4469
  this.document.columns.push({
4470
4470
  id: this.generateId("col"),
4471
4471
  key,
@@ -4916,7 +4916,7 @@ var SpreadsheetController = (_class6 = class {
4916
4916
  /** The column's format, or the one typed input chose (typed cells only). */
4917
4917
  implicitNumberFormat(cell, col, row) {
4918
4918
  const typed = cell.raw !== "" && !cell.raw.startsWith("=") && !(col.type === "bound" && col.binding && row.recordId);
4919
- return _nullishCoalesce(this.fixedNumberFormat(col, void 0), () => ( (typed ? _chunkLYGEEDNRcjs.parseCellInput.call(void 0, cell.raw).numberFormat : void 0)));
4919
+ return _nullishCoalesce(this.fixedNumberFormat(col, void 0), () => ( (typed ? _chunkXP5IUZUOcjs.parseCellInput.call(void 0, cell.raw).numberFormat : void 0)));
4920
4920
  }
4921
4921
  /** A copy of `cell` with `numberFormat` set, or removed when undefined. */
4922
4922
  withNumberFormat(cell, numberFormat) {
@@ -5259,8 +5259,8 @@ var SpreadsheetController = (_class6 = class {
5259
5259
  const doc = {
5260
5260
  columns: Array.from({ length: 4 }, (_, i) => ({
5261
5261
  id: `col_${String.fromCharCode(97 + i)}`,
5262
- key: _chunkLYGEEDNRcjs.indexToColName.call(void 0, i),
5263
- title: _chunkLYGEEDNRcjs.indexToColName.call(void 0, i),
5262
+ key: _chunkXP5IUZUOcjs.indexToColName.call(void 0, i),
5263
+ title: _chunkXP5IUZUOcjs.indexToColName.call(void 0, i),
5264
5264
  width: 120,
5265
5265
  type: "freeform"
5266
5266
  })),
@@ -5433,7 +5433,7 @@ var SpreadsheetController = (_class6 = class {
5433
5433
  if (invalid2) throw new Error(invalid2);
5434
5434
  const formula = refersTo.trim().startsWith("=") ? refersTo.trim() : `=${refersTo.trim()}`;
5435
5435
  try {
5436
- _chunkSQC26VQVcjs.parseFormula.call(void 0, formula);
5436
+ _chunkUN33YOXWcjs.parseFormula.call(void 0, formula);
5437
5437
  } catch (err) {
5438
5438
  throw new Error(`There's a problem with this formula: ${_nullishCoalesce(_optionalChain([err, 'optionalAccess', _312 => _312.message]), () => ( formula))}`);
5439
5439
  }
@@ -5705,7 +5705,7 @@ var SpreadsheetController = (_class6 = class {
5705
5705
  evaluateFormulaAt(formula, row, col, entered) {
5706
5706
  const saved = { rowIndex: this.evaluatingRowIndex, cell: this.evaluatingCell, override: this.valueOverride };
5707
5707
  this.evaluatingRowIndex = row;
5708
- this.evaluatingCell = { col: _nullishCoalesce(_optionalChain([this, 'access', _343 => _343.document, 'access', _344 => _344.columns, 'access', _345 => _345[col], 'optionalAccess', _346 => _346.key]), () => ( _chunkLYGEEDNRcjs.indexToColName.call(void 0, col))), row: row + 1 };
5708
+ this.evaluatingCell = { col: _nullishCoalesce(_optionalChain([this, 'access', _343 => _343.document, 'access', _344 => _344.columns, 'access', _345 => _345[col], 'optionalAccess', _346 => _346.key]), () => ( _chunkXP5IUZUOcjs.indexToColName.call(void 0, col))), row: row + 1 };
5709
5709
  this.valueOverride = _nullishCoalesce(entered, () => ( null));
5710
5710
  try {
5711
5711
  const result = this.evaluator.evaluateWithDiagnostics(formula.startsWith("=") ? formula : `=${formula}`);
@@ -6043,7 +6043,7 @@ function getSpreadsheetMenuItems(controller, cell) {
6043
6043
  const row = doc.rows[cell.row];
6044
6044
  if (!column || !row) return [];
6045
6045
  const selection = controller.selectedRange && rangeContains(controller.selectedRange, cell.row, cell.col) ? normalizeRange(controller.selectedRange) : { startRow: cell.row, startCol: cell.col, endRow: cell.row, endCol: cell.col };
6046
- const colName = _chunkLYGEEDNRcjs.indexToColName.call(void 0, cell.col);
6046
+ const colName = _chunkXP5IUZUOcjs.indexToColName.call(void 0, cell.col);
6047
6047
  const cellData = controller.getCell(row.id, column.id);
6048
6048
  const value = cellData.value;
6049
6049
  const table = _nullishCoalesce(doc.table, () => ( {}));
@@ -6480,7 +6480,7 @@ function getNameManagerRows(controller) {
6480
6480
  value = "[LAMBDA]";
6481
6481
  } else {
6482
6482
  const result = controller.evaluateFormula(`=${n.name}`, n.sheetId ? { sheet: n.sheetId } : {});
6483
- value = result.array ? `{${result.array.rows}\xD7${result.array.cols} array}` : _chunkLYGEEDNRcjs.isFormulaError.call(void 0, result.value) ? String(result.value) : formatCellDisplay({ value: result.value });
6483
+ value = result.array ? `{${result.array.rows}\xD7${result.array.cols} array}` : _chunkXP5IUZUOcjs.isFormulaError.call(void 0, result.value) ? String(result.value) : formatCellDisplay({ value: result.value });
6484
6484
  }
6485
6485
  return {
6486
6486
  name: n.name,
@@ -6803,4 +6803,4 @@ function sameSpreadsheetViewWindow(a, b) {
6803
6803
 
6804
6804
 
6805
6805
  exports.extractNameDependencies = extractNameDependencies; exports.columnDependencyKey = columnDependencyKey; exports.extractCellDependencies = extractCellDependencies; exports.extractReferenceDependencies = extractReferenceDependencies; exports.rangeDependencyKey = rangeDependencyKey; exports.IntervalIndex = IntervalIndex; exports.DependencyGraph = DependencyGraph; exports.shiftFormulaReferences = shiftFormulaReferences; exports.mapFormulaReferences = mapFormulaReferences; exports.offsetFormulaReferences = offsetFormulaReferences; exports.remapFormulaReferences = remapFormulaReferences; exports.transposeFormulaReferences = transposeFormulaReferences; exports.sheetNameNeedsQuotes = sheetNameNeedsQuotes; exports.quoteSheetName = quoteSheetName; exports.formatSheetPrefix = formatSheetPrefix; exports.renameSheetInFormula = renameSheetInFormula; exports.deleteSheetInFormula = deleteSheetInFormula; exports.renameNameInFormula = renameNameInFormula; exports.formulaIdentifiers = formulaIdentifiers; exports.getFormulaCaretContext = getFormulaCaretContext; exports.getFormulaHints = getFormulaHints; exports.applyFormulaSuggestion = applyFormulaSuggestion; exports.NUMBER_FORMAT_PRESETS = NUMBER_FORMAT_PRESETS; exports.numberFormatForCellFormat = numberFormatForCellFormat; exports.cellFormatForNumberFormat = cellFormatForNumberFormat; exports.isGeneralNumberFormat = isGeneralNumberFormat; exports.formatCellForDisplay = formatCellForDisplay; exports.formatCellDisplay = formatCellDisplay; exports.formatValueWithCode = formatValueWithCode; exports.DataSourceBinder = DataSourceBinder; exports.MAX_SHEET_NAME_LENGTH = MAX_SHEET_NAME_LENGTH; exports.MAX_DEFINED_NAME_LENGTH = MAX_DEFINED_NAME_LENGTH; exports.validateSheetName = validateSheetName; exports.nextSheetName = nextSheetName; exports.copySheetName = copySheetName; exports.validateDefinedName = validateDefinedName; exports.isLambdaDefinition = isLambdaDefinition; exports.normalizeRange = normalizeRange; exports.rangeContains = rangeContains; exports.rangesIntersect = rangesIntersect; exports.rangeContainsRange = rangeContainsRange; exports.isSingleCellRange = isSingleCellRange; exports.isBlankValue = isBlankValue; exports.toNumber = toNumber; exports.compareCellValues = compareCellValues; exports.matchesFilterRule = matchesFilterRule; exports.aggregateValues = aggregateValues; exports.roundFloat = roundFloat; exports.fillSeries = fillSeries; exports.computeFillTarget = computeFillTarget; exports.getFillDirection = getFillDirection; exports.SPREADSHEET_CLIPBOARD_MIME = SPREADSHEET_CLIPBOARD_MIME; exports.serializeHtmlTable = serializeHtmlTable; exports.parseHtmlTable = parseHtmlTable; exports.createSpreadsheetClipboardData = createSpreadsheetClipboardData; exports.readSpreadsheetClipboard = readSpreadsheetClipboard; exports.rebaseClipboardRows = rebaseClipboardRows; exports.adjustRangeForStructuralChange = adjustRangeForStructuralChange; exports.adjustRangesForStructuralChange = adjustRangesForStructuralChange; exports.subtractRange = subtractRange; exports.subtractRangeFromRanges = subtractRangeFromRanges; exports.rangesContain = rangesContain; exports.ruleAnchor = ruleAnchor; exports.ruleFormulaAt = ruleFormulaAt; exports.shiftRuleFormula = shiftRuleFormula; exports.forEachRangeCell = forEachRangeCell; exports.formatRuleRanges = formatRuleRanges; exports.parseRuleRanges = parseRuleRanges; exports.mergeRuleRanges = mergeRuleRanges; exports.sortRuleRanges = sortRuleRanges; exports.transposeRuleRanges = transposeRuleRanges; exports.reanchorRuleFormula = reanchorRuleFormula; exports.transposeRuleFormula = transposeRuleFormula; exports.mapConditionalFormatFormulas = mapConditionalFormatFormulas; exports.mapDataValidationFormulas = mapDataValidationFormulas; exports.sortRules = sortRules; exports.transposeRules = transposeRules; exports.CONDITIONAL_FORMAT_ICON_SETS = CONDITIONAL_FORMAT_ICON_SETS; exports.conditionalFormatIconCount = conditionalFormatIconCount; exports.getConditionalFormatIcon = getConditionalFormatIcon; exports.conditionalFormatNumber = conditionalFormatNumber; exports.blendConditionalFormatColors = blendConditionalFormatColors; exports.defaultIconThresholds = defaultIconThresholds; exports.EMPTY_CONDITIONAL_FORMAT_OVERLAY = EMPTY_CONDITIONAL_FORMAT_OVERLAY; exports.ConditionalFormatEngine = ConditionalFormatEngine; exports.matchesTimePeriod = matchesTimePeriod; exports.evaluateConditionalFormats = evaluateConditionalFormats; exports.describeConditionalFormat = describeConditionalFormat; exports.describeDataValidation = describeDataValidation; exports.CONDITIONAL_FORMAT_STYLE_PRESETS = CONDITIONAL_FORMAT_STYLE_PRESETS; exports.DEFAULT_CONDITIONAL_FORMAT_STYLE = DEFAULT_CONDITIONAL_FORMAT_STYLE; exports.CONDITIONAL_FORMAT_PRESETS = CONDITIONAL_FORMAT_PRESETS; exports.CONDITIONAL_FORMAT_TIME_PERIODS = CONDITIONAL_FORMAT_TIME_PERIODS; exports.createConditionalFormatRule = createConditionalFormatRule; exports.DATA_VALIDATION_TYPE_OPTIONS = DATA_VALIDATION_TYPE_OPTIONS; exports.DATA_VALIDATION_OPERATOR_OPTIONS = DATA_VALIDATION_OPERATOR_OPTIONS; exports.DATA_VALIDATION_ERROR_STYLE_OPTIONS = DATA_VALIDATION_ERROR_STYLE_OPTIONS; exports.conditionalFormatContrastColor = conditionalFormatContrastColor; exports.getConditionalFormatCss = getConditionalFormatCss; exports.getDataBarCss = getDataBarCss; exports.conditionalFormatStyleString = conditionalFormatStyleString; exports.DEFAULT_DATA_VALIDATION_MESSAGE = DEFAULT_DATA_VALIDATION_MESSAGE; exports.DEFAULT_DATA_VALIDATION_TITLE = DEFAULT_DATA_VALIDATION_TITLE; exports.findDataValidation = findDataValidation; exports.getValidationListValues = getValidationListValues; exports.validateCellInput = validateCellInput; exports.findInvalidCells = findInvalidCells; exports.DEFAULT_ROW_HEIGHT = DEFAULT_ROW_HEIGHT; exports.DEFAULT_COLUMN_WIDTH = DEFAULT_COLUMN_WIDTH; exports.getTableSections = getTableSections; exports.getRowSection = getRowSection; exports.rowPassesFilters = rowPassesFilters; exports.computeRowGroups = computeRowGroups; exports.buildSpreadsheetView = buildSpreadsheetView; exports.SpreadsheetController = SpreadsheetController; exports.runSpreadsheetMenuItem = runSpreadsheetMenuItem; exports.clampMenuPosition = clampMenuPosition; exports.getSpreadsheetMenuItems = getSpreadsheetMenuItems; exports.SPREADSHEET_TABLE_ACTIONS = SPREADSHEET_TABLE_ACTIONS; exports.bindSpreadsheetTableActions = bindSpreadsheetTableActions; exports.csvImportAdapter = csvImportAdapter; exports.tsvImportAdapter = tsvImportAdapter; exports.SPREADSHEET_IMPORT_ADAPTERS = SPREADSHEET_IMPORT_ADAPTERS; exports.registerSpreadsheetImportAdapters = registerSpreadsheetImportAdapters; exports.importFileIntoSpreadsheet = importFileIntoSpreadsheet; exports.getSheetTabMenuItems = getSheetTabMenuItems; exports.sheetDropIndex = sheetDropIndex; exports.getNameManagerRows = getNameManagerRows; exports.SPREADSHEET_COLUMN_HEADER_HEIGHT = SPREADSHEET_COLUMN_HEADER_HEIGHT; exports.SPREADSHEET_ROW_HEADER_WIDTH = SPREADSHEET_ROW_HEADER_WIDTH; exports.SPREADSHEET_GROUP_ROW_HEIGHT = SPREADSHEET_GROUP_ROW_HEIGHT; exports.SPREADSHEET_VIRTUAL_ROW_THRESHOLD = SPREADSHEET_VIRTUAL_ROW_THRESHOLD; exports.SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD = SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD; exports.SPREADSHEET_DEFAULT_VIEWPORT = SPREADSHEET_DEFAULT_VIEWPORT; exports.measureSpreadsheetView = measureSpreadsheetView; exports.shouldVirtualizeSpreadsheet = shouldVirtualizeSpreadsheet; exports.fullSpreadsheetViewWindow = fullSpreadsheetViewWindow; exports.getSpreadsheetViewWindow = getSpreadsheetViewWindow; exports.getSpreadsheetScrollToCell = getSpreadsheetScrollToCell; exports.sameSpreadsheetViewWindow = sameSpreadsheetViewWindow;
6806
- //# sourceMappingURL=chunk-BBRK6MOI.cjs.map
6806
+ //# sourceMappingURL=chunk-YU4WQE5M.cjs.map