@sheetxl/query 0.8.0-beta.21 → 0.8.0-beta.23

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/query - SheetXL - Workbook read surface and renderers (grep, reports) — capabilities declared once, adapted by any host surface - v0.8.0-beta.21
2
+ * @license @sheetxl/query - SheetXL - Workbook read surface and renderers (grep, reports) — capabilities declared once, adapted by any host surface - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
@@ -1110,13 +1110,13 @@ var Ct = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, wt = (e) => {
1110
1110
  let t = e.type ?? c.ColorStopType.Num, n = e.value, r = n == null || n === "" ? t : `${t} ${n}`, i = wt(e.color);
1111
1111
  return i ? `${r} ${i}` : r;
1112
1112
  }, Dt = (e) => {
1113
- let t = e.type;
1113
+ let t, n = e.type;
1114
1114
  if (e.type === c.ScaleType.DataBar) {
1115
- let n = wt(e.color);
1116
- n && (t += ` ${n}`);
1117
- } else e.type === c.ScaleType.IconSet && (e.iconSet && (t += ` ${e.iconSet}`), e.reverse && (t += " reversed"), e.icon?.length && (t += " custom icons"));
1118
- let n = (e.stops ?? []).map(Et).join(" → ");
1119
- return n ? `${t} · ${n}` : t;
1115
+ let r = wt(e.color);
1116
+ r && (n += ` ${r}`), e.solidFill && (n += " solid"), t = [e.minPoint ?? { type: c.ColorStopType.Min }, e.maxPoint ?? { type: c.ColorStopType.Max }];
1117
+ } else e.type === c.ScaleType.IconSet && (e.iconSet && (n += ` ${e.iconSet}`), e.reverse && (n += " reversed"), e.icon?.length && (n += " custom icons")), t = e.stops ?? [];
1118
+ let r = t.map(Et).join(" → ");
1119
+ return r ? `${n} · ${r}` : n;
1120
1120
  }, Ot = "(no rule)", kt = (e) => {
1121
1121
  let t = e.getScale(), n = [];
1122
1122
  if (t) n.push(Dt(t));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/query - SheetXL - Workbook read surface and renderers (grep, reports) — capabilities declared once, adapted by any host surface - v0.8.0-beta.21
2
+ * @license @sheetxl/query - SheetXL - Workbook read surface and renderers (grep, reports) — capabilities declared once, adapted by any host surface - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
@@ -118,78 +118,78 @@ var M = (e) => "object" == typeof e && null !== e && !n.isError(e) && "function"
118
118
  "shape",
119
119
  "chart",
120
120
  "name"
121
- ], L = (e, t) => e <= t + 3 ? e : t, W = 1e4, O = s.ErrorCheck, P = /* @__PURE__ */ new Map([
122
- [O.InconsistentFormula, "inconsistent formula"],
123
- [O.OmittedCells, "omits adjacent cells"],
124
- [O.NumberAsText, "number stored as text"],
125
- [O.EmptyCellReference, "refers to an empty cell"],
126
- [O.UnlockedFormula, "unlocked formula"],
127
- [O.HardcodeInRun, "typed value in a run of formulas"],
128
- [O.StyleBreak, "format break"],
129
- [O.StyleRole, "format is another role's"],
130
- [O.RepeatedReference, "counted twice"],
131
- [O.DegenerateCall, "aggregates nothing"],
132
- [O.SumIncludesSubtotal, "sum includes a subtotal"],
133
- [O.MisalignedReference, "adds a cell outside its block"],
134
- [O.ApproximateMatch, "approximate match"],
135
- [O.LookupShape, "lookup arrays misaligned"],
136
- [O.ExternalReference, "reads outside the workbook"],
137
- [O.ErrorConstant, "formula is only an error value"],
138
- [O.LinkLabelMismatch, "link label mismatch"],
139
- [O.KeyLabelMismatch, "lookup key is not the label"],
140
- [O.SignVsSiblings, "sign differs from sibling links"],
141
- [O.LiteralMatchesInput, "typed number equals an unread input"],
142
- [O.TwinBlockDivergence, "differs from its twin formulas"],
143
- [O.ScaleOutlier, "off the scale of its format"],
144
- [O.UnreferencedInput, "input nothing reads"],
145
- [O.RowGap, "gap in a labeled row"],
146
- [O.ConstantFrequency, "constant"]
121
+ ], L = (e, t) => e <= t + 3 ? e : t, W = 1e4, P = s.ErrorCheck, O = /* @__PURE__ */ new Map([
122
+ [P.InconsistentFormula, "inconsistent formula"],
123
+ [P.OmittedCells, "omits adjacent cells"],
124
+ [P.NumberAsText, "number stored as text"],
125
+ [P.EmptyCellReference, "refers to an empty cell"],
126
+ [P.UnlockedFormula, "unlocked formula"],
127
+ [P.HardcodeInRun, "typed value in a run of formulas"],
128
+ [P.StyleBreak, "format break"],
129
+ [P.StyleRole, "format is another role's"],
130
+ [P.RepeatedReference, "counted twice"],
131
+ [P.DegenerateCall, "aggregates nothing"],
132
+ [P.SumIncludesSubtotal, "sum includes a subtotal"],
133
+ [P.MisalignedReference, "adds a cell outside its block"],
134
+ [P.ApproximateMatch, "approximate match"],
135
+ [P.LookupShape, "lookup arrays misaligned"],
136
+ [P.ExternalReference, "reads outside the workbook"],
137
+ [P.ErrorConstant, "formula is only an error value"],
138
+ [P.LinkLabelMismatch, "link label mismatch"],
139
+ [P.KeyLabelMismatch, "lookup key is not the label"],
140
+ [P.SignVsSiblings, "sign differs from sibling links"],
141
+ [P.LiteralMatchesInput, "typed number equals an unread input"],
142
+ [P.TwinBlockDivergence, "differs from its twin formulas"],
143
+ [P.ScaleOutlier, "off the scale of its format"],
144
+ [P.UnreferencedInput, "input nothing reads"],
145
+ [P.RowGap, "gap in a labeled row"],
146
+ [P.ConstantFrequency, "constant"]
147
147
  ]);
148
148
  function D(e, t) {
149
- const n = t.getCoords(), o = e.evidence, r = (s = e.check, P.get(s) ?? s);
149
+ const n = t.getCoords(), o = e.evidence, r = (s = e.check, O.get(s) ?? s);
150
150
  var s;
151
151
  switch (e.check) {
152
- case O.InconsistentFormula: return `${r} · the cells ${V(o)} have ${J(String(o.expected ?? ""), n)}${B(o)}`;
153
- case O.HardcodeInRun: return `${r} · the cells ${V(o)} are formulas${B(o)}`;
154
- case O.StyleBreak: return `${o.layer} ${r} · ${o.actual} here, ${o.expected} ${V(o)}${B(o)}`;
155
- case O.StyleRole: return `${o.part} ${r} · ${o.actual} on a ${o.role}, ${o.majority} of the sheet's ${o.of} are ${o.expected}`;
156
- case O.OmittedCells: return `${r} · ${J(String(o.reference ?? ""), n)} stops before the number in ${J(String(o.omitted ?? ""), n)}`;
157
- case O.EmptyCellReference: return `${r} · reads ${J(String(o.reference ?? ""), n)}`;
158
- case O.RepeatedReference: {
152
+ case P.InconsistentFormula: return `${r} · the cells ${V(o)} have ${J(String(o.expected ?? ""), n)}${B(o)}`;
153
+ case P.HardcodeInRun: return `${r} · the cells ${V(o)} are formulas${B(o)}`;
154
+ case P.StyleBreak: return `${o.layer} ${r} · ${o.actual} here, ${o.expected} ${V(o)}${B(o)}`;
155
+ case P.StyleRole: return `${o.part} ${r} · ${o.actual} on a ${o.role}, ${o.majority} of the sheet's ${o.of} are ${o.expected}`;
156
+ case P.OmittedCells: return `${r} · ${J(String(o.reference ?? ""), n)} stops before the number in ${J(String(o.omitted ?? ""), n)}`;
157
+ case P.EmptyCellReference: return `${r} · reads ${J(String(o.reference ?? ""), n)}`;
158
+ case P.RepeatedReference: {
159
159
  const e = o.overlaps ? ` · inside ${J(String(o.overlaps), n)}` : "";
160
160
  return `${r} · ${J(String(o.reference ?? ""), n)}${e}`;
161
161
  }
162
- case O.DegenerateCall: return void 0 !== o.literals ? `${r} · ${o.function} of typed numbers ${o.literals}` : `${r} · ${o.function} of one cell, ${J(String(o.reference ?? ""), n)}`;
163
- case O.SumIncludesSubtotal: {
162
+ case P.DegenerateCall: return void 0 !== o.literals ? `${r} · ${o.function} of typed numbers ${o.literals}` : `${r} · ${o.function} of one cell, ${J(String(o.reference ?? ""), n)}`;
163
+ case P.SumIncludesSubtotal: {
164
164
  const e = void 0 !== o.ratio ? "ratio" : "subtotal";
165
165
  return `${r} · ${J(String(o.reference ?? ""), n)} holds the ${e} in ${J(String(o[e] ?? ""), n)}`;
166
166
  }
167
- case O.MisalignedReference: {
167
+ case P.MisalignedReference: {
168
168
  const e = void 0 !== o.landsAt && o.landsAt !== o.term ? ` in ${J(String(o.landsAt), n)}` : "";
169
169
  return `${r} · ${J(String(o.term ?? ""), n)}, ${H[String(o.targetRole)] ?? o.targetRole}${e}, beside the block ${J(String(o.block ?? ""), n)}`;
170
170
  }
171
- case O.ApproximateMatch: return `${r} · ${o.function} match type ${o.matchType}`;
172
- case O.LookupShape: return `${r} · reads ${J(String(o.array ?? ""), n)} at a position found in ${J(String(o.vector ?? ""), n)}`;
173
- case O.ExternalReference: return "udf" === o.kind ? `${r} · unknown function ${o.function}` : `${r} · ${"deleted" === o.kind ? "a deleted reference" : "another workbook"}, ${J(String(o.reference ?? ""), n)}`;
174
- case O.ErrorConstant: {
171
+ case P.ApproximateMatch: return `${r} · ${o.function} match type ${o.matchType}`;
172
+ case P.LookupShape: return `${r} · reads ${J(String(o.array ?? ""), n)} at a position found in ${J(String(o.vector ?? ""), n)}`;
173
+ case P.ExternalReference: return "udf" === o.kind ? `${r} · unknown function ${o.function}` : `${r} · ${"deleted" === o.kind ? "a deleted reference" : "another workbook"}, ${J(String(o.reference ?? ""), n)}`;
174
+ case P.ErrorConstant: {
175
175
  if (void 0 === o.dataTable) return `${r} · =${o.error}, a value with nothing computing it`;
176
176
  const e = J(String(o.dataTable), n).replace(/\$/g, ""), t = J(String(o.extent ?? ""), n).replace(/\$/g, "");
177
177
  return `${r} · =${o.error} inside ${t}, where the data table at ${e} spills less: the table's results were replaced by constants`;
178
178
  }
179
- case O.LinkLabelMismatch: return `${r} · row ${z(o.label, o.labelAt, n)} links to ${z(o.target, o.targetAt, n)}`;
180
- case O.KeyLabelMismatch: {
179
+ case P.LinkLabelMismatch: return `${r} · row ${z(o.label, o.labelAt, n)} links to ${z(o.target, o.targetAt, n)}`;
180
+ case P.KeyLabelMismatch: {
181
181
  const e = [void 0 !== o.rowLabel ? `row ${z(o.rowLabel, o.rowLabelAt, n)}` : null, void 0 !== o.columnLabel ? `column ${z(o.columnLabel, o.columnLabelAt, n)}` : null].filter(Boolean).join(", ");
182
182
  return `${r} · ${o.function} key ${JSON.stringify(String(o.key ?? ""))} in ${e}`;
183
183
  }
184
- case O.SignVsSiblings: {
184
+ case P.SignVsSiblings: {
185
185
  const e = "negative" === o.sign ? "positive" : "negative";
186
186
  return `${r} · ${o.sign} ${J(String(o.reference ?? ""), n)} where ${o.siblings} other links into that row are ${e}, as in ${J(String(o.siblingAt ?? ""), n)}`;
187
187
  }
188
- case O.LiteralMatchesInput: {
188
+ case P.LiteralMatchesInput: {
189
189
  const e = void 0 !== o.label ? ` ${z(o.label, o.labelAt, n)},` : "", t = Number(o.matches ?? 1) > 1 ? ` · typed in ${o.matches} places` : "";
190
190
  return `${r} · ${o.literal} is the input in ${J(String(o.inputAt ?? ""), n)},${e} which no formula reads${t}`;
191
191
  }
192
- case O.TwinBlockDivergence: {
192
+ case P.TwinBlockDivergence: {
193
193
  const e = J(String(o.twinAt ?? ""), n);
194
194
  if ("sign" === o.part) {
195
195
  const t = "negative" === o.sign ? "add" : "take away";
@@ -197,16 +197,16 @@ function D(e, t) {
197
197
  }
198
198
  return `${r} · ${o.literal} where ${o.twins} formulas of the same shape have ${o.expected}, as in ${e}`;
199
199
  }
200
- case O.ConstantFrequency: {
200
+ case P.ConstantFrequency: {
201
201
  const e = Number(o.uses ?? 1);
202
202
  return `${r} ${U(o)} · typed in ${e} place${1 === e ? "" : "s"}, of ${o.of} constants`;
203
203
  }
204
- case O.ScaleOutlier: return `${r} · ${o.times}× the typical ${o.format} on the sheet, ${o.typical} over ${o.of}`;
205
- case O.UnreferencedInput: {
204
+ case P.ScaleOutlier: return `${r} · ${o.times}× the typical ${o.format} on the sheet, ${o.typical} over ${o.of}`;
205
+ case P.UnreferencedInput: {
206
206
  const e = void 0 !== o.value ? `${o.value}` : `${o.cells} cells`;
207
207
  return `${r} · ${z(o.label, o.labelAt, n)} ${e}, read by no formula in the workbook`;
208
208
  }
209
- case O.RowGap: {
209
+ case P.RowGap: {
210
210
  const e = [void 0 !== o.above ? z(o.above, o.aboveAt, n) : null, void 0 !== o.below ? z(o.below, o.belowAt, n) : null].filter(Boolean), t = 2 === e.length ? `${e[0]} and ${e[1]} are filled` : 1 === e.length ? `${e[0]} is filled` : "its block is filled", s = void 0 !== o.header ? ` · the period ${z(o.header, o.headerAt, n)} no row of the block fills` : "", l = Number(o.of ?? 0), a = "row" === o.kind ? `nothing in its ${l} cell${1 === l ? "" : "s"}` : `${o.missing} of ${l} cells empty`, i = "own" === o.labelFont ? " · label font differs from its neighbors: a heading?" : "";
211
211
  return `${r} · row ${z(o.label, o.labelAt, n)}: ${a} where ${t}${s}${i}`;
212
212
  }
@@ -226,7 +226,7 @@ function B(e) {
226
226
  return Array.isArray(o) && o.length > 0 && t.push(`also changes: ${o.join(", ")}`), t.map((e) => ` · ${e}`).join("");
227
227
  }
228
228
  var z = (e, t, n) => `${JSON.stringify(String(e ?? ""))} (${J(String(t ?? ""), n)})`;
229
- var U = (e) => "string" === e.kind ? JSON.stringify(String(e.value ?? "")) : String(e.value ?? ""), _ = (e) => e.length > 0 && e.every((e) => e.check === O.ConstantFrequency);
229
+ var U = (e) => "string" === e.kind ? JSON.stringify(String(e.value ?? "")) : String(e.value ?? ""), _ = (e) => e.length > 0 && e.every((e) => e.check === P.ConstantFrequency);
230
230
  function J(e, t) {
231
231
  return e.replace(G, (e, n, o) => {
232
232
  const r = X(n, t.rowIndex, q), s = X(o, t.colIndex, K);
@@ -730,9 +730,9 @@ var Ae = l.Feature, Le = (e) => (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colS
730
730
  const o = Math.min(e.colEnd, t.colEnd) - Math.max(e.colStart, t.colStart) + 1;
731
731
  return o <= 0 ? 0 : n * o;
732
732
  };
733
- var Oe = (e) => e.toLocaleString("en-US"), Pe = (e, t) => {
734
- const n = `×${Oe(e.content)}`;
735
- return "times" === t || e.styled === e.content ? n : `${n} (+${Oe(e.styled - e.content)} blank)`;
733
+ var Pe = (e) => e.toLocaleString("en-US"), Oe = (e, t) => {
734
+ const n = `×${Pe(e.content)}`;
735
+ return "times" === t || e.styled === e.content ? n : `${n} (+${Pe(e.styled - e.content)} blank)`;
736
736
  }, De = (t) => {
737
737
  if (0 === t.length) return "";
738
738
  const n = e.rangeToString(t[0]);
@@ -745,7 +745,7 @@ function He(e, t) {
745
745
  if (0 === o.length) return "";
746
746
  const a = (e) => ((e, t) => {
747
747
  const n = De(e.blocks);
748
- return `${e.label === t?.hideLabel ? "" : `${e.label} `}${Pe(e, t?.countStyle ?? "cells")}${n ? ` ${n}` : ""}`;
748
+ return `${e.label === t?.hideLabel ? "" : `${e.label} `}${Oe(e, t?.countStyle ?? "cells")}${n ? ` ${n}` : ""}`;
749
749
  })(e, t);
750
750
  if (0 === l) return o.map(a).join(" · ");
751
751
  const i = o.reduce((e, t) => e + t.content, 0), c = i > 0 ? o[0].content / i : 0, u = [], g = o.length > n ? `${o.length} distinct${c < .5 ? ", no convention" : ""}; largest ` : "";
@@ -927,13 +927,13 @@ function et(e, t, n, o) {
927
927
  const n = Ve(t.filter((t) => ze(t.label) === e.label), { maxValues: 1 / 0 }).sorted, o = 1 === n.length;
928
928
  if (l.push([
929
929
  e.label,
930
- Pe(e, "cells"),
930
+ Oe(e, "cells"),
931
931
  De(e.blocks),
932
932
  o ? n[0].label : `${n.length} formats`
933
933
  ]), !o) {
934
934
  for (const e of n.slice(0, lt)) l.push([
935
935
  "",
936
- Pe(e, "cells"),
936
+ Oe(e, "cells"),
937
937
  De(e.blocks),
938
938
  e.label
939
939
  ]);
@@ -1063,7 +1063,7 @@ function ot(e, t) {
1063
1063
  var rt = 110;
1064
1064
  function st(e, t, n) {
1065
1065
  const { sorted: o, top: r, rare: s, more: l } = Ve(t, n), a = [...r, ...s].map((e) => [
1066
- Pe(e, "cells"),
1066
+ Oe(e, "cells"),
1067
1067
  De(e.blocks),
1068
1068
  e.label
1069
1069
  ]), i = [0, 1].map((e) => Math.max(...a.map((t) => t[e].length))), c = a.map((e) => ` ${e[0].padEnd(i[0])} ${e[1].padEnd(i[1])} ${e[2]}`);
@@ -1125,13 +1125,13 @@ var it = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, ct = (e) => {
1125
1125
  const t = e.type ?? i.ColorStopType.Num, n = e.value, o = null == n || "" === n ? t : `${t} ${n}`, r = ct(e.color);
1126
1126
  return r ? `${o} ${r}` : o;
1127
1127
  }, dt = (e) => {
1128
- let t = e.type;
1128
+ let t, n = e.type;
1129
1129
  if (e.type === i.ScaleType.DataBar) {
1130
- const n = ct(e.color);
1131
- n && (t += ` ${n}`);
1132
- } else e.type === i.ScaleType.IconSet && (e.iconSet && (t += ` ${e.iconSet}`), e.reverse && (t += " reversed"), e.icon?.length && (t += " custom icons"));
1133
- const n = (e.stops ?? []).map(gt).join(" → ");
1134
- return n ? `${t} · ${n}` : t;
1130
+ const o = ct(e.color);
1131
+ o && (n += ` ${o}`), e.solidFill && (n += " solid"), t = [e.minPoint ?? { type: i.ColorStopType.Min }, e.maxPoint ?? { type: i.ColorStopType.Max }];
1132
+ } else e.type === i.ScaleType.IconSet && (e.iconSet && (n += ` ${e.iconSet}`), e.reverse && (n += " reversed"), e.icon?.length && (n += " custom icons")), t = e.stops ?? [];
1133
+ const o = t.map(gt).join(" → ");
1134
+ return o ? `${n} · ${o}` : n;
1135
1135
  }, ht = "(no rule)", ft = (e) => {
1136
1136
  const t = e.getScale(), n = [];
1137
1137
  if (t) n.push(dt(t));
@@ -1163,7 +1163,7 @@ var it = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, ct = (e) => {
1163
1163
  }, wt = (t, n) => {
1164
1164
  if (t.isInvalid()) return "#REF!";
1165
1165
  const o = t.getWorksheet(), r = e.rangeToString(t.getCoords(), o.getEntireCoords()) ?? "#REF!";
1166
- return o === n ? r : `${Ot(o.getName())}!${r}`;
1166
+ return o === n ? r : `${Pt(o.getName())}!${r}`;
1167
1167
  }, yt = (e) => {
1168
1168
  const t = [];
1169
1169
  for (const n of [
@@ -1199,7 +1199,7 @@ function kt(e, t) {
1199
1199
  case bt.Anomalies: return (e) => {
1200
1200
  const t = e.getCell(), n = function(e, t) {
1201
1201
  let n = e.getAnomalies();
1202
- return !1 === t?.constants && (n = n.filter((e) => e.check !== O.ConstantFrequency)), 0 === n.length ? null : n.map((t) => D(t, e)).join("; ");
1202
+ return !1 === t?.constants && (n = n.filter((e) => e.check !== P.ConstantFrequency)), 0 === n.length ? null : n.map((t) => D(t, e)).join("; ");
1203
1203
  }(t, { constants: !1 });
1204
1204
  if (!n) return null;
1205
1205
  const o = t.getFormulaText() ?? xt(e);
@@ -1353,7 +1353,7 @@ function Lt(e) {
1353
1353
  }
1354
1354
  return n;
1355
1355
  }
1356
- var Wt = (e) => `${e.toString()}, ${e.getRowCount()}×${e.getColumnCount()}`, Ot = (t) => e.sheetNameToString(t) ?? "Untitled", Pt = (e) => `wb.getWorksheet(${JSON.stringify(e.getWorksheet().getName())})`, Dt = (e) => ((e) => {
1356
+ var Wt = (e) => `${e.toString()}, ${e.getRowCount()}×${e.getColumnCount()}`, Pt = (t) => e.sheetNameToString(t) ?? "Untitled", Ot = (e) => `wb.getWorksheet(${JSON.stringify(e.getWorksheet().getName())})`, Dt = (e) => ((e) => {
1357
1357
  if (!e.includes("$")) return e;
1358
1358
  let t = "", n = !1;
1359
1359
  for (const o of e) {
@@ -1364,10 +1364,10 @@ var Wt = (e) => `${e.toString()}, ${e.getRowCount()}×${e.getColumnCount()}`, Ot
1364
1364
  return t;
1365
1365
  })(e.getAddress()), Ht = (e) => {
1366
1366
  const t = Dt(e);
1367
- return t.includes("!") ? t : `${Ot(e.getWorksheet().getName())}!${t}`;
1367
+ return t.includes("!") ? t : `${Pt(e.getWorksheet().getName())}!${t}`;
1368
1368
  }, Vt = (e) => {
1369
1369
  const t = e.toString();
1370
- return `${t.includes("!") ? t : `${Ot(e.getWorksheet().getName())}!${t}`}, ${e.getRowCount()}×${e.getColumnCount()}`;
1370
+ return `${t.includes("!") ? t : `${Pt(e.getWorksheet().getName())}!${t}`}, ${e.getRowCount()}×${e.getColumnCount()}`;
1371
1371
  };
1372
1372
  function Bt(e, t) {
1373
1373
  const n = nt(t, [...t.getRegions(Mt.Formula)]), o = t.getStats({ onError: "ignore" }).getCount();
@@ -1428,7 +1428,7 @@ function _t(e, t, n) {
1428
1428
  n && (e.h2(`${At(r)} (${Xt(0, 0)})`), e.text(` ${"normal".padEnd(10)}${n}`), e.blank());
1429
1429
  continue;
1430
1430
  }
1431
- const g = !!n?.profile && r === Mt.Contentful, d = `${Pt(t)}.getRegions(${JSON.stringify(r)})`, h = `${d} lists all ${a.length}`, f = Qe(r) ? et(t.getWorksheet(), r, o, {
1431
+ const g = !!n?.profile && r === Mt.Contentful, d = `${Ot(t)}.getRegions(${JSON.stringify(r)})`, h = `${d} lists all ${a.length}`, f = Qe(r) ? et(t.getWorksheet(), r, o, {
1432
1432
  recovery: h,
1433
1433
  content: i()
1434
1434
  }) : null, m = r === Mt.Formula ? tt(a, { recovery: h }) : null, p = f ? `${Xt(a.length, f.cells)} · ${f.distinct} distinct` : m ? `${Xt(a.length, c)} · ${m.distinct} distinct` : Xt(a.length, c);
@@ -1473,14 +1473,14 @@ function Kt(e, t, n) {
1473
1473
  const n = t.places.slice(0, qt).join(", "), o = t.places.length > qt ? ` +${t.places.length - qt} more` : "";
1474
1474
  e.text(` ${t.text.padEnd(a)}${t.uses} use${1 === t.uses ? "" : "s"} · ${n}${o}`);
1475
1475
  }
1476
- l.length > Jt && e.text(` …and ${l.length - Jt} more · ${Pt(t)}.getAnomalies({ checks: ['constantFrequency'] }) lists every region`), e.blank();
1476
+ l.length > Jt && e.text(` …and ${l.length - Jt} more · ${Ot(t)}.getAnomalies({ checks: ['constantFrequency'] }) lists every region`), e.blank();
1477
1477
  }
1478
1478
  var Gt = (e) => [...e.getRegions([Mt.Contentful, Mt.Table])].filter((e) => e.getCell().isContentful()), Xt = (e, t) => `${t} cell${1 !== t ? "s" : ""} · ${e} region${1 !== e ? "s" : ""}`, Zt = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, Yt = (e) => e.isIFormula ? e : null, Qt = (e) => {
1479
1479
  const t = e.getScope();
1480
- return t ? `${Ot(t)}!${e.getName()}` : e.getName();
1480
+ return t ? `${Pt(t)}!${e.getName()}` : e.getName();
1481
1481
  }, en = (e) => {
1482
1482
  const t = e.getAddress();
1483
- return t.includes("!") ? t : `${Ot(e.getWorksheet().getName())}!${t}`;
1483
+ return t.includes("!") ? t : `${Pt(e.getWorksheet().getName())}!${t}`;
1484
1484
  };
1485
1485
  async function tn(e) {
1486
1486
  const t = Yt(e);
@@ -1716,7 +1716,7 @@ async function hn(e, t) {
1716
1716
  var fn = "#REF!", mn = (e) => {
1717
1717
  const t = e.getContent();
1718
1718
  return "chart" === t.getType() && "function" == typeof t.getSeries ? t : null;
1719
- }, pn = (t, n) => `${Ot(t.getName())}!${e.rangeToString(n) ?? ""}`, $n = (e, t) => e ? pn(e.getWorksheet(), e.getCoords()) : t, wn = (e) => e.replace(/\s*[\r\n]+\s*/g, " ⏎ ").trim(), yn = (e, t) => ({
1719
+ }, pn = (t, n) => `${Pt(t.getName())}!${e.rangeToString(n) ?? ""}`, $n = (e, t) => e ? pn(e.getWorksheet(), e.getCoords()) : t, wn = (e) => e.replace(/\s*[\r\n]+\s*/g, " ⏎ ").trim(), yn = (e, t) => ({
1720
1720
  colStart: Math.min(e.colStart, t.colStart),
1721
1721
  rowStart: Math.min(e.rowStart, t.rowStart),
1722
1722
  colEnd: Math.max(e.colEnd, t.colEnd),
@@ -1908,7 +1908,7 @@ var Tn = (e) => {
1908
1908
  }, Ln = (e) => {
1909
1909
  const t = e.geometry;
1910
1910
  return "string" == typeof t ? t : t ? "custom" : "rect";
1911
- }, Wn = (e, t) => `${e} ${t}${1 === e ? "" : "s"}`, On = (e, t) => {
1911
+ }, Wn = (e, t) => `${e} ${t}${1 === e ? "" : "s"}`, Pn = (e, t) => {
1912
1912
  switch (e.type) {
1913
1913
  case u.Type.None: return "none";
1914
1914
  case u.Type.Solid: return String(e.color ?? "solid");
@@ -1926,7 +1926,7 @@ var Tn = (e) => {
1926
1926
  }
1927
1927
  default: return String(e.type);
1928
1928
  }
1929
- }, Pn = (e, t) => {
1929
+ }, On = (e, t) => {
1930
1930
  if (null === e.style) return "none";
1931
1931
  const n = e.style?.[t] ?? S.defaultStyleRefs(e)[t];
1932
1932
  return !n || n.index <= 0 ? "none" : `theme style ${n.index}${n.color ? `, ${n.color}` : ""}`;
@@ -1964,12 +1964,12 @@ function Bn(e, t) {
1964
1964
  const t = [];
1965
1965
  return e.anchor && t.push(Hn[e.anchor] ?? e.anchor), e.anchorCenter && t.push("centered"), "none" === e.wrap && t.push("no wrap"), e.verticalOverflow !== $.Overflow.Visible && e.horizontalOverflow !== $.Overflow.Visible || t.push("text may overflow the shape"), "shape" === e.autoFit && t.push("shape grows to fit text"), "normal" === e.autoFit && t.push("text shrinks to fit" + (void 0 !== e.fontScale ? ` (${e.fontScale}%)` : "")), e.vertical && e.vertical !== $.WritingMode.Horizontal && t.push(`vertical (${e.vertical})`), e.columns && e.columns > 1 && t.push(`${e.columns} columns`), e.warp && t.push(`warped (${e.warp.preset})`), t.length ? t.join(" · ") : null;
1966
1966
  })(n.text?.body);
1967
- l && e.fact(`Text Layout: ${l}`), n.textLink && e.fact(`Text Link: ${n.textLink} — the text shows this cell's value`), e.fact(`Fill: ${n.fill ? On(n.fill, t) : Pn(n, "fill")}`), e.fact(`Line: ${((e, t) => {
1968
- const n = e.stroke, o = Pn(e, "stroke");
1967
+ l && e.fact(`Text Layout: ${l}`), n.textLink && e.fact(`Text Link: ${n.textLink} — the text shows this cell's value`), e.fact(`Fill: ${n.fill ? Pn(n.fill, t) : On(n, "fill")}`), e.fact(`Line: ${((e, t) => {
1968
+ const n = e.stroke, o = On(e, "stroke");
1969
1969
  if (!n) return o;
1970
1970
  if (n.fill?.type === u.Type.None) return "none";
1971
1971
  const r = [];
1972
- "number" == typeof n.width && r.push(`${n.width} pt`), r.push(n.fill ? On(n.fill, t) : `color from ${o}`), void 0 !== n.dash && n.dash !== p.DashStyle.Solid && r.push(`dash ${Array.isArray(n.dash) ? n.dash.join(" ") : n.dash}`), n.compound && n.compound !== p.Compound.Single && r.push(`compound ${n.compound}`);
1972
+ "number" == typeof n.width && r.push(`${n.width} pt`), r.push(n.fill ? Pn(n.fill, t) : `color from ${o}`), void 0 !== n.dash && n.dash !== p.DashStyle.Solid && r.push(`dash ${Array.isArray(n.dash) ? n.dash.join(" ") : n.dash}`), n.compound && n.compound !== p.Compound.Single && r.push(`compound ${n.compound}`);
1973
1973
  const s = Dn(n.headType, n.headWidth, n.headLength);
1974
1974
  s && r.push(`head ${s}`);
1975
1975
  const l = Dn(n.tailType, n.tailWidth, n.tailLength);
@@ -2017,7 +2017,7 @@ var zn = (e) => {
2017
2017
  };
2018
2018
  function qn(e, t) {
2019
2019
  const n = t.toJSON(), o = t.getMovable()?.getMovables()?.getItems() ?? [], r = t.getFill();
2020
- r && e.fact(`Fill: ${On(r, null)} — taken by members that use the group's fill`), n.effects && e.fact(`Effects: ${n.effects.length ? n.effects.map((e) => e.type).join(", ") : "none"}`), n.title && e.fact(`Title: ${n.title}`), n.hyperlink && e.fact(`Hyperlink: ${Vn(n.hyperlink)}`), n.hoverHyperlink && e.fact(`Hover Hyperlink: ${Vn(n.hoverHyperlink)}`);
2020
+ r && e.fact(`Fill: ${Pn(r, null)} — taken by members that use the group's fill`), n.effects && e.fact(`Effects: ${n.effects.length ? n.effects.map((e) => e.type).join(", ") : "none"}`), n.title && e.fact(`Title: ${n.title}`), n.hyperlink && e.fact(`Hyperlink: ${Vn(n.hyperlink)}`), n.hoverHyperlink && e.fact(`Hover Hyperlink: ${Vn(n.hoverHyperlink)}`);
2021
2021
  const s = Object.entries(n.locks ?? {}).filter(([, e]) => e).map(([e]) => e);
2022
2022
  s.length && e.fact(`Locks: ${s.join(", ")}`), e.fact(`Members: ${o.length}, in z-order`);
2023
2023
  const l = t.getMovable()?.getMovables();
@@ -2026,7 +2026,7 @@ function qn(e, t) {
2026
2026
  var Kn = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, Gn = (e) => e.replace(/[\r\n]+/g, " ").trim(), Xn = (t) => {
2027
2027
  const n = t.getRange();
2028
2028
  return e.rangeToString(n.getCoords()) ?? n.toString();
2029
- }, Zn = ({ movable: e, text: t }) => An(t, 300, ((e) => `${Pt(e.getRange())}.getRange(${JSON.stringify(Xn(e))}).getMovables()`)(e)), Yn = (e) => {
2029
+ }, Zn = ({ movable: e, text: t }) => An(t, 300, ((e) => `${Ot(e.getRange())}.getRange(${JSON.stringify(Xn(e))}).getMovables()`)(e)), Yn = (e) => {
2030
2030
  const t = e.getContent();
2031
2031
  return "function" == typeof t.getTextFrame ? t.getTextFrame()?.getText() ?? "" : null;
2032
2032
  };
@@ -2108,7 +2108,7 @@ function ao(e, t, n) {
2108
2108
  s && Jn(e, s, 0);
2109
2109
  }
2110
2110
  if (l.length < s.length) {
2111
- const o = `${Pt(n[0].getRange())}.getMovables().getItems({ type: ${JSON.stringify(t)} })`;
2111
+ const o = `${Ot(n[0].getRange())}.getMovables().getItems({ type: ${JSON.stringify(t)} })`;
2112
2112
  e.text(` …and ${s.length - l.length} more · ${o} reports every one in full`);
2113
2113
  }
2114
2114
  e.blank();
@@ -2152,7 +2152,7 @@ function go(e, t) {
2152
2152
  const h = e.getRotation();
2153
2153
  0 !== h && n.fact(`Rotation: ${h}°`);
2154
2154
  const f = e.getFlip(), m = [f.horizontal ? "horizontal" : null, f.vertical ? "vertical" : null].filter(Boolean);
2155
- return m.length && n.fact(`Flip: ${m.join(", ")}`), n.fact(`Z-Order: ${e.getZIndex()}`), n.blank(), n.text(`Sheet: ${Ot(r.getWorksheet().getName())}`), n.toLines().join("\n").trimEnd();
2155
+ return m.length && n.fact(`Flip: ${m.join(", ")}`), n.fact(`Z-Order: ${e.getZIndex()}`), n.blank(), n.text(`Sheet: ${Pt(r.getWorksheet().getName())}`), n.toLines().join("\n").trimEnd();
2156
2156
  }
2157
2157
  var ho = (e) => "visible" === e.getVisibility(), fo = (e, t, n) => {
2158
2158
  const o = e.getWorksheets().getItems({ visibility: "veryHidden" }), r = t?.trim();
@@ -2589,13 +2589,13 @@ var Fo = {
2589
2589
  "ICellStyle",
2590
2590
  "IScript.ScriptContext"
2591
2591
  ];
2592
- var Oo = (e) => e.slice(e.lastIndexOf(".") + 1);
2593
- function Po(e, t) {
2592
+ var Po = (e) => e.slice(e.lastIndexOf(".") + 1);
2593
+ function Oo(e, t) {
2594
2594
  if (e.types[t]) return t;
2595
2595
  const n = Object.keys(e.types), o = t.toLowerCase(), r = n.filter((e) => e.toLowerCase() === o);
2596
2596
  if (1 === r.length) return r[0];
2597
2597
  if (t.includes(".")) return null;
2598
- const s = n.filter((e) => Oo(e).toLowerCase() === o);
2598
+ const s = n.filter((e) => Po(e).toLowerCase() === o);
2599
2599
  return 1 === s.length ? s[0] : null;
2600
2600
  }
2601
2601
  function Do(e, t, n) {
@@ -2666,11 +2666,11 @@ function zo(e, t) {
2666
2666
  entryPoints: t
2667
2667
  };
2668
2668
  }
2669
- const o = Po(e, n);
2669
+ const o = Oo(e, n);
2670
2670
  if (o) return Vo(e, o);
2671
2671
  const r = n.lastIndexOf(".");
2672
2672
  if (r > 0) {
2673
- const t = n.slice(0, r), o = Po(e, t), s = n.slice(r + 1);
2673
+ const t = n.slice(0, r), o = Oo(e, t), s = n.slice(r + 1);
2674
2674
  if (o && s) {
2675
2675
  const t = s.toLowerCase(), n = Ho(e, o, (e) => e.name === s) ?? Ho(e, o, (e) => e.name.toLowerCase() === t);
2676
2676
  if (n) return {
@@ -2690,7 +2690,7 @@ function zo(e, t) {
2690
2690
  }))), l = Lo.filter((t) => t.match.test(o) && e.types[t.relies[0]]?.members?.some((e) => e.name === t.relies[1])).map((e) => e.hint), a = n ? [] : function(e, t, n) {
2691
2691
  const o = t.toLowerCase().replace(/s$/, ""), r = n.toLowerCase();
2692
2692
  return Object.keys(e.types).filter((t) => To(e.types[t])).map((e) => {
2693
- const n = Oo(e), r = Go(t, n), s = o.length >= 4 && n.toLowerCase().startsWith(o);
2693
+ const n = Po(e), r = Go(t, n), s = o.length >= 4 && n.toLowerCase().startsWith(o);
2694
2694
  return {
2695
2695
  key: e,
2696
2696
  score: r ?? (s ? 10 : null)
@@ -2732,13 +2732,13 @@ function zo(e, t) {
2732
2732
  return function(e, t) {
2733
2733
  const n = t.toLowerCase(), o = [], r = [];
2734
2734
  for (const [t, s] of Object.entries(e.types)) if (To(s)) {
2735
- Oo(t).toLowerCase().includes(n) && o.push(t);
2735
+ Po(t).toLowerCase().includes(n) && o.push(t);
2736
2736
  for (const e of Ao(s)) e.name.toLowerCase().includes(n) && r.push({
2737
2737
  key: t,
2738
2738
  member: e
2739
2739
  });
2740
2740
  }
2741
- const s = Bo(o, Oo, n), l = Bo(r, (e) => e.member.name, n);
2741
+ const s = Bo(o, Po, n), l = Bo(r, (e) => e.member.name, n);
2742
2742
  return {
2743
2743
  kind: "search",
2744
2744
  query: t,
@@ -2759,7 +2759,7 @@ function Jo(e, t) {
2759
2759
  try {
2760
2760
  r = !0 === t[s];
2761
2761
  } catch {}
2762
- const l = r ? Po(e, s.slice(2)) : null;
2762
+ const l = r ? Oo(e, s.slice(2)) : null;
2763
2763
  l && !n.includes(l) && n.push(l);
2764
2764
  }
2765
2765
  if (n.length <= 1) return n[0] ?? null;
@@ -2811,7 +2811,7 @@ function Go(e, t) {
2811
2811
  return r <= Math.max(2, Math.floor(.3 * n.length)) ? 1 + r : null;
2812
2812
  }
2813
2813
  function Xo(e, t) {
2814
- const n = /\s*Did you mean '([\w$]+)'\?/.exec(t), o = /on type '(?:SheetXL\.)?([A-Z][\w$]*(?:\.[A-Z][\w$]*)*)'/.exec(t)?.[1], r = n && o ? Po(e, o) : null;
2814
+ const n = /\s*Did you mean '([\w$]+)'\?/.exec(t), o = /on type '(?:SheetXL\.)?([A-Z][\w$]*(?:\.[A-Z][\w$]*)*)'/.exec(t)?.[1], r = n && o ? Oo(e, o) : null;
2815
2815
  if (!n || !r) return t;
2816
2816
  const s = Ho(e, r, (e) => e.name === n[1]);
2817
2817
  return !s || s.members.some(To) ? t : t.slice(0, n.index) + t.slice(n.index + n[0].length);
@@ -2827,7 +2827,7 @@ function Yo(e, t, n) {
2827
2827
  const [n, o] = t.relies;
2828
2828
  t.match.test(l) && e.types[n]?.members?.some((e) => e.name === o) && a.push(t.hint);
2829
2829
  }
2830
- const i = r ? Po(e, r[2]) : null;
2830
+ const i = r ? Oo(e, r[2]) : null;
2831
2831
  if (i) {
2832
2832
  const o = Ko(e, i), r = /Did you mean '([\w$]+)'/.exec(t)?.[1], s = o.map((e) => ({
2833
2833
  member: e,
@@ -2844,7 +2844,7 @@ function Yo(e, t, n) {
2844
2844
  const e = t.slice(0, 3).join(", "), n = t.length > 3 ? ` and ${t.length - 3} more` : "";
2845
2845
  return a.push(`'${l}' is a member of ${e}${n}, not of the object it was called on.`), a.join("\n");
2846
2846
  }
2847
- const n = Wo.map((t) => Po(e, t)).filter((e) => null !== e).flatMap((t) => Ko(e, t).map((e) => ({
2847
+ const n = Wo.map((t) => Oo(e, t)).filter((e) => null !== e).flatMap((t) => Ko(e, t).map((e) => ({
2848
2848
  owner: t,
2849
2849
  member: e,
2850
2850
  score: Go(l, e.name)
@@ -3084,7 +3084,7 @@ async function lr(e, t, n, o, r) {
3084
3084
  detail: r
3085
3085
  };
3086
3086
  }), b = y.filter((e) => !e.isName);
3087
- if (b.length > 0 && b.some((e) => e.sheet !== b[0].sheet)) for (const e of y) e.isName || (e.label = `${e.indent}${Ot(e.sheet)}!${e.label.slice(e.indent.length)}`);
3087
+ if (b.length > 0 && b.some((e) => e.sheet !== b[0].sheet)) for (const e of y) e.isName || (e.label = `${e.indent}${Pt(e.sheet)}!${e.label.slice(e.indent.length)}`);
3088
3088
  const S = [], x = Math.max(...y.map((e) => e.label.length));
3089
3089
  for (const e of y) S.push(` ${e.label.padEnd(x)} ${e.detail}`.trimEnd());
3090
3090
  u && S.push(" ↺ circular reference — the chain returns to a cell already on this branch");
@@ -3101,7 +3101,7 @@ async function lr(e, t, n, o, r) {
3101
3101
  const n = e.ranges.slice(0, dr).map((e) => {
3102
3102
  const { address: n, sheet: o } = $r(e);
3103
3103
  return [
3104
- null !== t && o !== t ? `${Ot(o)}!${n}` : n,
3104
+ null !== t && o !== t ? `${Pt(o)}!${n}` : n,
3105
3105
  e.isSingleCell() ? N(e.getCell(), v.Mode.Display)?.display ?? "" : `${e.getRowCount()}×${e.getColumnCount()}`,
3106
3106
  mr(e)
3107
3107
  ].filter(Boolean).join(" ");
@@ -3111,7 +3111,7 @@ async function lr(e, t, n, o, r) {
3111
3111
  }(i.outputs, u)}`), null !== u) {
3112
3112
  const t = [...i.sheets].filter(([e]) => e !== u);
3113
3113
  if (t.length > 0) {
3114
- const n = t.map(([e, t]) => `${Ot(e)} ${t} ${1 === t ? "cell" : "cells"}`);
3114
+ const n = t.map(([e, t]) => `${Pt(e)} ${t} ${1 === t ? "cell" : "cells"}`);
3115
3115
  e.text(` ${"sheets".padEnd(cr)}${n.join(" · ")}`);
3116
3116
  }
3117
3117
  }
@@ -3341,11 +3341,11 @@ var Rr = l.Feature, Nr = [
3341
3341
  } : { ...t };
3342
3342
  }
3343
3343
  return n ? e.rangeToString(n) ?? "" : "";
3344
- }, Or = (e, t) => `${e} ${t}${1 !== e ? "s" : ""}`;
3345
- function Pr(e) {
3344
+ }, Pr = (e, t) => `${e} ${t}${1 !== e ? "s" : ""}`;
3345
+ function Or(e) {
3346
3346
  const t = e.getProtection(), n = Mr(t);
3347
3347
  if (!n) return null;
3348
- const o = Ar(e), r = [o.length > 0 ? `${Or(Lr(o), "editable cell")} · ${Or(o.length, "region")}` : "no editable cells", n];
3348
+ const o = Ar(e), r = [o.length > 0 ? `${Pr(Lr(o), "editable cell")} · ${Pr(o.length, "region")}` : "no editable cells", n];
3349
3349
  return !1 === t.getProperties()?.showFormulas && r.push("formulas hidden"), {
3350
3350
  extent: Wr(o),
3351
3351
  detail: r.join(" · ")
@@ -3359,10 +3359,10 @@ function Dr(e, t) {
3359
3359
  e.text(`${r("allowed")}${Ir(n) ?? "none — only the editable cells take a write"}`), !1 === n.getProperties()?.showFormulas && e.text(`${r("formulas")}hidden — a cell reads as a value unless its style shows its formula`);
3360
3360
  const s = Ar(t);
3361
3361
  if (0 === s.length) return e.text(`${r("editable")}none — every cell refuses a write`), void e.blank();
3362
- e.text(`${r("editable")}${Or(Lr(s), "cell")} · ${Or(s.length, "region")}`), vt(e, s, {
3362
+ e.text(`${r("editable")}${Pr(Lr(s), "cell")} · ${Pr(s.length, "region")}`), vt(e, s, {
3363
3363
  maxRegions: 12,
3364
3364
  payload: kt(Rr.Unlock, null),
3365
- recovery: `${Pt(t.getEntireRange())}.getRegions("unlock") lists all ${s.length}`
3365
+ recovery: `${Ot(t.getEntireRange())}.getRegions("unlock") lists all ${s.length}`
3366
3366
  }), e.blank();
3367
3367
  }
3368
3368
  function Hr(e) {
@@ -3371,7 +3371,7 @@ function Hr(e) {
3371
3371
  if (0 === o) return "sheet locked — no cell here takes a write";
3372
3372
  if (o === n) return "sheet locked — every cell here is editable";
3373
3373
  const r = e.getWorksheet().getProtectedRanges().getItems({ address: e }).some((e) => !e.isUnlocked());
3374
- return `sheet locked — ${o} of ${Or(n, "cell")} editable (${Wr(t)})` + (r ? " · some behind a range password" : "");
3374
+ return `sheet locked — ${o} of ${Pr(n, "cell")} editable (${Wr(t)})` + (r ? " · some behind a range password" : "");
3375
3375
  }
3376
3376
  function Vr(e) {
3377
3377
  return e.getWorksheet().getProtection().isLocked() ? e.isEditAllowed() ? "true — unlocked on a protected sheet" : "false — the sheet is protected and this cell is locked" : null;
@@ -3405,7 +3405,7 @@ async function Jr(e, t) {
3405
3405
  const n = e.getWorksheet().getRange(e.getCoords());
3406
3406
  e = n.getCell();
3407
3407
  const o = new ie();
3408
- o.h1(`Cell — ${Ot(e.getWorksheet().getName())}!${e.getAddress()}`), o.blank();
3408
+ o.h1(`Cell — ${Pt(e.getWorksheet().getName())}!${e.getAddress()}`), o.blank();
3409
3409
  const r = !!e.getFormulaText(), l = e.getType();
3410
3410
  (function(e, t) {
3411
3411
  const n = N(t, v.Mode.Display), o = N(t, v.Mode.Value), r = t.getFormulaText(), s = e.toLines().length;
@@ -3780,7 +3780,7 @@ var rs = (e, t) => {
3780
3780
  const n = [e?.trim(), t?.trim()].filter(Boolean);
3781
3781
  return n.length > 0 ? n.join(" — ") : null;
3782
3782
  }, ss = "function", ls = "named", as = "tableReference", is = "tableColumn", cs = "externalReference", us = [["isReferenceOnly", "reference-only"], ["isVolatile", "volatile"]];
3783
- var gs = (e, t) => e ? ` (${Ot(e)}!${t})` : "";
3783
+ var gs = (e, t) => e ? ` (${Pt(e)}!${t})` : "";
3784
3784
  function ds(e, t, n, o) {
3785
3785
  if ("external" === e) return "another workbook — not resolvable from here";
3786
3786
  if (!n) return "";
@@ -3802,7 +3802,7 @@ function ds(e, t, n, o) {
3802
3802
  const e = n.getTables().getByName(t) ?? n.getWorkbook()?.getWorksheets().getItems().map((e) => e.getTables().getByName(t)).find(Boolean) ?? null;
3803
3803
  return e ? ((e, t) => {
3804
3804
  const n = e.getWorksheet(), o = e.toString();
3805
- return !n || t && n.getName() === t.getName() || o.includes("!") ? o : `${Ot(n.getName())}!${o}`;
3805
+ return !n || t && n.getName() === t.getName() || o.includes("!") ? o : `${Pt(n.getName())}!${o}`;
3806
3806
  })(e.getRange(), n) : "unknown — evaluates to #NAME?";
3807
3807
  }
3808
3808
  case "column": {
@@ -4098,11 +4098,11 @@ var Es = [
4098
4098
  }, Ws = (e) => {
4099
4099
  const t = e.getHeadersFooters(), n = t.getState(), o = d.HeaderFooterState, r = n === o.FirstAndDefault || n === o.FirstOddAndEven, s = n === o.OddAndEven || n === o.FirstOddAndEven, l = [];
4100
4100
  return r && l.push(["first page", t.getFirstPage()]), s ? (l.push(["odd pages", t.getOddPages()]), l.push(["even pages", t.getEvenPages()])) : l.push([r ? "other pages" : "every page", t.getDefaultForAllPages()]), l;
4101
- }, Os = (e, t, n) => {
4101
+ }, Ps = (e, t, n) => {
4102
4102
  const o = [];
4103
4103
  return e && o.push(`left ${JSON.stringify(e)}`), t && o.push(`center ${JSON.stringify(t)}`), n && o.push(`right ${JSON.stringify(n)}`), o.length > 0 ? o.join(" · ") : null;
4104
4104
  };
4105
- function Ps(e) {
4105
+ function Os(e) {
4106
4106
  const t = e.getPageLayout(), n = [];
4107
4107
  t.getOrientation() !== d.Orientation.Portrait && n.push(t.getOrientation());
4108
4108
  const o = Fs(t);
@@ -4140,9 +4140,9 @@ function Ds(e) {
4140
4140
  const c = e.getFirstPageNumber();
4141
4141
  "" !== c && t.fact(`First page number: ${c}`), e.getPrintOrder() !== d.PrintOrder.DownThenOver && t.fact(`Page order: ${e.getPrintOrder()}`), e.getPrintComments() !== d.PrintComments.NoComments && t.fact(`Notes: ${e.getPrintComments()}`), e.getPrintErrors() !== d.PrintErrorType.AsDisplayed && t.fact(`Errors print as: ${e.getPrintErrors()}`);
4142
4142
  const u = Ws(e).flatMap(([e, t]) => {
4143
- const n = [], o = Os(t.getLeftHeader(), t.getCenterHeader(), t.getRightHeader());
4143
+ const n = [], o = Ps(t.getLeftHeader(), t.getCenterHeader(), t.getRightHeader());
4144
4144
  o && n.push(`${e} header: ${o}`);
4145
- const r = Os(t.getLeftFooter(), t.getCenterFooter(), t.getRightFooter());
4145
+ const r = Ps(t.getLeftFooter(), t.getCenterFooter(), t.getRightFooter());
4146
4146
  return r && n.push(`${e} footer: ${r}`), n;
4147
4147
  });
4148
4148
  return u.length > 0 && (t.blank(), t.h2("Headers and Footers"), t.fact(u)), t.toLines().join("\n").trimEnd();
@@ -4215,8 +4215,8 @@ function Js(e, t) {
4215
4215
  });
4216
4216
  }
4217
4217
  const l = s.filter((e) => !e.isName), a = l.length > 0 && l.some((e) => e.sheet !== l[0].sheet), i = l.length > 0 ? l[0].sheet : e.getWorksheet()?.getName(), c = new ie(), u = s.length > 0 && !a && !!i;
4218
- if (c.h1(u ? `Ranges — ${Ot(i)} (${n})` : `Ranges (${n})`), 0 === s.length) return c.text("none"), c.toLines().join("\n").trimEnd();
4219
- const g = s.map((e) => a && !e.isName ? `${Ot(e.sheet)}!${e.address}` : e.address), d = Math.max(...g.map((e) => e.length));
4218
+ if (c.h1(u ? `Ranges — ${Pt(i)} (${n})` : `Ranges (${n})`), 0 === s.length) return c.text("none"), c.toLines().join("\n").trimEnd();
4219
+ const g = s.map((e) => a && !e.isName ? `${Pt(e.sheet)}!${e.address}` : e.address), d = Math.max(...g.map((e) => e.length));
4220
4220
  for (let e = 0; e < s.length; e++) c.text(` ${g[e].padEnd(d)} ${s[e].detail}`.trimEnd());
4221
4221
  return r < n && c.text(` …and ${n - r} more · loop the collection in code to see them all`), c.toLines().join("\n").trimEnd();
4222
4222
  }
@@ -4279,7 +4279,7 @@ var Zs = (e) => e.isDeleted() ? "" : e.getRange().toString(), Ys = (e) => {
4279
4279
  };
4280
4280
  async function Qs(e, t) {
4281
4281
  const n = new ie(), o = e.getSelectedRange(), r = e.getUsedRange();
4282
- n.h1(`Sheet — ${Ot(e.getName())}${function(e) {
4282
+ n.h1(`Sheet — ${Pt(e.getName())}${function(e) {
4283
4283
  const t = e.getWorkbook();
4284
4284
  let n = "";
4285
4285
  t && t.getSelectedWorksheet()?.getId() === e.getId() && (n += " (selected)");
@@ -4290,7 +4290,7 @@ async function Qs(e, t) {
4290
4290
  }(e)}`), n.text(`Used: ${r ? Wt(r) : "empty"}`), n.text(`Selection: ${Wt(o)}`);
4291
4291
  const s = un(e);
4292
4292
  s && n.text(`Outline: ${s}`);
4293
- const l = Ps(e);
4293
+ const l = Os(e);
4294
4294
  l && n.text(`Print: ${l}`), n.blank();
4295
4295
  const a = r ?? o;
4296
4296
  Bt(n, a), Ut(n, a), _t(n, a, {
@@ -4429,7 +4429,7 @@ async function ul(e, t) {
4429
4429
  t ? t.push(e) : u.set(e.formulaSignature, [e]);
4430
4430
  }
4431
4431
  for (const e of u.values()) if (!(e.length < 2)) for (const t of e) {
4432
- const n = e.filter((e) => e !== t).map((e) => Ot(e.sheet.getName()));
4432
+ const n = e.filter((e) => e !== t).map((e) => Pt(e.sheet.getName()));
4433
4433
  t.lines.push({
4434
4434
  label: "twin of",
4435
4435
  extent: n.join(", "),
@@ -4498,7 +4498,7 @@ function gl(e, t) {
4498
4498
  if (l.length > 0) {
4499
4499
  const e = function(e, t) {
4500
4500
  const n = nt(e, t);
4501
- return 0 === n.length ? null : n.map(([e, t]) => `${e} ×${Oe(t)}`).join(" · ");
4501
+ return 0 === n.length ? null : n.map(([e, t]) => `${e} ×${Pe(t)}`).join(" · ");
4502
4502
  }(n, a);
4503
4503
  r.push({
4504
4504
  label: "content",
@@ -4507,7 +4507,7 @@ function gl(e, t) {
4507
4507
  $l(o[il.Contentful] ?? 0, "cell"),
4508
4508
  $l(l.length, "block"),
4509
4509
  e,
4510
- `${Pt(n)} lists the blocks`
4510
+ `${Ot(n)} lists the blocks`
4511
4511
  ].filter(Boolean).join(" · ")
4512
4512
  });
4513
4513
  }
@@ -4544,7 +4544,7 @@ function gl(e, t) {
4544
4544
  }
4545
4545
  const c = (o[il.Anomalies] ?? 0) > 0 ? [...n.getRegions(il.Anomalies)].filter((e) => !_(e.getCell().getAnomalies())) : [];
4546
4546
  if (c.length > 0) {
4547
- const e = new Map([...P.keys()].map((e) => [e, 0]));
4547
+ const e = new Map([...O.keys()].map((e) => [e, 0]));
4548
4548
  let t = 0;
4549
4549
  for (const n of c) {
4550
4550
  const o = n.getRowCount() * n.getColumnCount();
@@ -4631,7 +4631,7 @@ function hl(e) {
4631
4631
  return t;
4632
4632
  }
4633
4633
  function fl(e) {
4634
- const t = Pr(e);
4634
+ const t = Or(e);
4635
4635
  return t ? [{
4636
4636
  label: "protected",
4637
4637
  extent: t.extent,
@@ -4666,12 +4666,12 @@ var $l = (e, t) => `${e} ${t}${1 !== e ? "s" : ""}`;
4666
4666
  function wl(e, t) {
4667
4667
  const n = e.getVisibility();
4668
4668
  let o = "";
4669
- return t && (o += " (selected)"), n === m.Visibility.Hidden ? o += " (hidden)" : n === m.Visibility.VeryHidden && (o += " (very hidden)"), e.getProtection().isLocked() && (o += " (protected)"), `${Ot(e.getName())}${o}`;
4669
+ return t && (o += " (selected)"), n === m.Visibility.Hidden ? o += " (hidden)" : n === m.Visibility.VeryHidden && (o += " (very hidden)"), e.getProtection().isLocked() && (o += " (protected)"), `${Pt(e.getName())}${o}`;
4670
4670
  }
4671
4671
  function yl(e, t) {
4672
4672
  const n = e.getKind(), o = n === m.Kind.Chart ? "chart sheet" : n === m.Kind.Macro ? "Excel 4.0 macro sheet" : "dialog sheet", r = e.getVisibility();
4673
4673
  let s = ` (${o})`;
4674
- return t && (s += " (selected)"), r === m.Visibility.Hidden ? s += " (hidden)" : r === m.Visibility.VeryHidden && (s += " (very hidden)"), `${Ot(e.getName())}${s}`;
4674
+ return t && (s += " (selected)"), r === m.Visibility.Hidden ? s += " (hidden)" : r === m.Visibility.VeryHidden && (s += " (very hidden)"), `${Pt(e.getName())}${s}`;
4675
4675
  }
4676
4676
  var bl = 6;
4677
4677
  function Sl(t, n, o, r, s) {
@@ -4702,7 +4702,7 @@ function Sl(t, n, o, r, s) {
4702
4702
  if (!e.counts?.[r]) continue;
4703
4703
  const t = e.sheet.getUsedRange();
4704
4704
  if (!t) continue;
4705
- const n = Ot(e.sheet.getName());
4705
+ const n = Pt(e.sheet.getName());
4706
4706
  for (const e of t.getRegions(r)) {
4707
4707
  if (l) {
4708
4708
  if (!l(e)) continue;
@@ -4743,7 +4743,7 @@ function Sl(t, n, o, r, s) {
4743
4743
  for (const { movable: t, detail: n } of m) {
4744
4744
  const o = t.getRange();
4745
4745
  c.push({
4746
- address: `${Ot(o.getWorksheet().getName())}!${e.rangeToString(o.getCoords()) ?? ""}`,
4746
+ address: `${Pt(o.getWorksheet().getName())}!${e.rangeToString(o.getCoords()) ?? ""}`,
4747
4747
  size: "chart",
4748
4748
  payload: `${t.getContent().getName?.() || "(unnamed)"} · ${n}`
4749
4749
  });
@@ -5021,9 +5021,9 @@ async function Wl(e, t, n) {
5021
5021
  const a = [], i = [];
5022
5022
  let c = 0;
5023
5023
  for (const [e, { data: t, style: n }] of l) {
5024
- const o = t ? Pl(t) : null;
5024
+ const o = t ? Ol(t) : null;
5025
5025
  o && i.push(o);
5026
- const l = Ol(e, t ?? null, o, n ?? null, r, s);
5026
+ const l = Pl(e, t ?? null, o, n ?? null, r, s);
5027
5027
  a.push(l.sheet), c += l.cleared;
5028
5028
  }
5029
5029
  const u = await async function(e) {
@@ -5062,9 +5062,9 @@ async function Wl(e, t, n) {
5062
5062
  touches: zl(i, u)
5063
5063
  };
5064
5064
  }
5065
- function Ol(e, t, n, o, r, s) {
5065
+ function Pl(e, t, n, o, r, s) {
5066
5066
  const l = o?.getRanges() ?? null, a = {
5067
- sheet: Ot(e.getName()),
5067
+ sheet: Pt(e.getName()),
5068
5068
  written: n ? Ht(n) : null,
5069
5069
  cells: 0,
5070
5070
  formulas: 0,
@@ -5129,7 +5129,7 @@ function Ol(e, t, n, o, r, s) {
5129
5129
  cleared: u
5130
5130
  };
5131
5131
  }
5132
- function Pl(e) {
5132
+ function Ol(e) {
5133
5133
  const t = e.getRanges(), n = e.getShifts();
5134
5134
  if (!t || 0 === n.length) return t;
5135
5135
  const o = e.getSheet(), r = [], s = [];
@@ -5176,7 +5176,7 @@ function Bl(e, t) {
5176
5176
  for (const e of o) {
5177
5177
  const t = e.getCounts([Ll.Contentful])[Ll.Contentful] ?? 0;
5178
5178
  r += t;
5179
- const o = Ot(e.getWorksheet().getName());
5179
+ const o = Pt(e.getWorksheet().getName());
5180
5180
  n.set(o, (n.get(o) ?? 0) + t);
5181
5181
  }
5182
5182
  const s = L(o.length, t);
@@ -5271,4 +5271,4 @@ async function Xl(e, t, n) {
5271
5271
  }
5272
5272
  }
5273
5273
  var Zl = [Fo], Yl = [or];
5274
- export { Wo as API_ENTRY_POINTS, v as CellEncoding, T as GREP_FIELDS, A as GREP_FIELDS_DEFAULT, F as GrepField, ie as MarkdownBuilder, ce as MarkdownFrameSection, Ml as NoRendererError, Yl as REFERENCES, jl as RENDERABLE_KINDS, Nl as RENDERERS, br as RENDER_OPTION_KEYS, It as REPORTED_FEATURES, Zl as TOOLS, Nt as anomalyRegionKey, qo as apiPointerFor, Yo as apiSuggestionsFor, or as apiTool, Jo as apiTypeOf, sr as appendDependencies, qn as appendGroupFacts, Jn as appendGroupMembers, Bt as appendKinds, bs as appendModules, lo as appendMovables, an as appendNames, vt as appendRegionList, _t as appendRegions, Ut as appendRoles, gn as appendRules, Bn as appendShapeFacts, hn as appendSheetObjects, Dr as appendSheetProtection, he as appendTables, ys as collectModules, Qn as collectShapeText, Gt as contentfulBlocks, je as countDates, oe as describeAlignment, pt as describeAllowedValues, Xn as describeAnchor, nr as describeApi, Q as describeBorder, te as describeBorderParts, Vr as describeCellProtection, Z as describeColor, ft as describeConditionalFormat, mt as describeDataValidation, Wl as describeDelta, Wt as describeExtent, Y as describeFill, re as describeFont, Mr as describeLock, to as describeMovableSummary, wr as describeNode, $r as describeNodeLabel, mr as describeNodeLabels, ne as describeNumberFormat, un as describeOutline, Ps as describePageLayout, Vt as describeQualifiedExtent, Qt as describeQualifiedName, Ht as describeQualifiedRanges, Hr as describeRangeProtection, Dt as describeRanges, ut as describeRuleStyle, $t as describeRules, dt as describeScale, Zn as describeShapeText, Pt as describeSheetCall, Ot as describeSheetName, xe as describeSums, ro as describeTypeHeading, Tr as describeWorkbookProtection, ye as detectTotals, N as encodeCell, R as encodeFormattedNumber, E as encodeNumber, j as encodeScalar, dn as findNames, vo as grep, Fo as grepTool, so as groupMovables, zn as groupOf, Hs as isPlainRecord, zo as lookupApi, Lt as parseFeatures, Sr as parseRenderOptions, Ne as profileKinds, pe as profileRegion, Br as protectionPointerFor, An as quoteShapeText, Xl as readRunDelta, Yn as readShapeText, kt as regionPayload, Ct as regionPayloads, tr as renderApi, Jr as renderCell, Zr as renderCellRange, ts as renderConditionalFormat, ns as renderCounts, os as renderDataValidation, Jl as renderDelta, hs as renderFormula, Io as renderGrep, Fl as renderMarkdown, xs as renderModule, ks as renderModules, io as renderMovable, vs as renderNames, Ds as renderPageLayout, Ur as renderProtectedRange, zr as renderProtection, Js as renderRanges, Vs as renderRecords, jt as renderRegions, Al as renderResult, co as renderShape, nl as renderStats, rl as renderStyle, fe as renderTable, sl as renderValues, ul as renderWorkbook, Qs as renderWorksheet, Il as resolveRenderer, Pr as summarizeSheetProtection, ge as tableOf, Xo as withoutHiddenSuggestion };
5274
+ export { Wo as API_ENTRY_POINTS, v as CellEncoding, T as GREP_FIELDS, A as GREP_FIELDS_DEFAULT, F as GrepField, ie as MarkdownBuilder, ce as MarkdownFrameSection, Ml as NoRendererError, Yl as REFERENCES, jl as RENDERABLE_KINDS, Nl as RENDERERS, br as RENDER_OPTION_KEYS, It as REPORTED_FEATURES, Zl as TOOLS, Nt as anomalyRegionKey, qo as apiPointerFor, Yo as apiSuggestionsFor, or as apiTool, Jo as apiTypeOf, sr as appendDependencies, qn as appendGroupFacts, Jn as appendGroupMembers, Bt as appendKinds, bs as appendModules, lo as appendMovables, an as appendNames, vt as appendRegionList, _t as appendRegions, Ut as appendRoles, gn as appendRules, Bn as appendShapeFacts, hn as appendSheetObjects, Dr as appendSheetProtection, he as appendTables, ys as collectModules, Qn as collectShapeText, Gt as contentfulBlocks, je as countDates, oe as describeAlignment, pt as describeAllowedValues, Xn as describeAnchor, nr as describeApi, Q as describeBorder, te as describeBorderParts, Vr as describeCellProtection, Z as describeColor, ft as describeConditionalFormat, mt as describeDataValidation, Wl as describeDelta, Wt as describeExtent, Y as describeFill, re as describeFont, Mr as describeLock, to as describeMovableSummary, wr as describeNode, $r as describeNodeLabel, mr as describeNodeLabels, ne as describeNumberFormat, un as describeOutline, Os as describePageLayout, Vt as describeQualifiedExtent, Qt as describeQualifiedName, Ht as describeQualifiedRanges, Hr as describeRangeProtection, Dt as describeRanges, ut as describeRuleStyle, $t as describeRules, dt as describeScale, Zn as describeShapeText, Ot as describeSheetCall, Pt as describeSheetName, xe as describeSums, ro as describeTypeHeading, Tr as describeWorkbookProtection, ye as detectTotals, N as encodeCell, R as encodeFormattedNumber, E as encodeNumber, j as encodeScalar, dn as findNames, vo as grep, Fo as grepTool, so as groupMovables, zn as groupOf, Hs as isPlainRecord, zo as lookupApi, Lt as parseFeatures, Sr as parseRenderOptions, Ne as profileKinds, pe as profileRegion, Br as protectionPointerFor, An as quoteShapeText, Xl as readRunDelta, Yn as readShapeText, kt as regionPayload, Ct as regionPayloads, tr as renderApi, Jr as renderCell, Zr as renderCellRange, ts as renderConditionalFormat, ns as renderCounts, os as renderDataValidation, Jl as renderDelta, hs as renderFormula, Io as renderGrep, Fl as renderMarkdown, xs as renderModule, ks as renderModules, io as renderMovable, vs as renderNames, Ds as renderPageLayout, Ur as renderProtectedRange, zr as renderProtection, Js as renderRanges, Vs as renderRecords, jt as renderRegions, Al as renderResult, co as renderShape, nl as renderStats, rl as renderStyle, fe as renderTable, sl as renderValues, ul as renderWorkbook, Qs as renderWorksheet, Il as resolveRenderer, Or as summarizeSheetProtection, ge as tableOf, Xo as withoutHiddenSuggestion };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/query",
3
3
  "description": "SheetXL - Workbook read surface and renderers (grep, reports) — capabilities declared once, adapted by any host surface",
4
- "version": "0.8.0-beta.21",
4
+ "version": "0.8.0-beta.23",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
7
7
  "exports": {
@@ -42,10 +42,10 @@
42
42
  "query"
43
43
  ],
44
44
  "dependencies": {
45
- "@sheetxl/primitives": "^0.8.0-beta.21",
46
- "@sheetxl/sdk": "^0.8.0-beta.21"
45
+ "@sheetxl/primitives": "^0.8.0-beta.23",
46
+ "@sheetxl/sdk": "^0.8.0-beta.23"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "^26.6.4"
49
+ "@types/node": "^26.6.6"
50
50
  }
51
51
  }