@odoo/o-spreadsheet 18.4.22 → 18.4.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.
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.4.22
6
- * @date 2025-12-26T10:19:07.786Z
7
- * @hash 6ddac00
5
+ * @version 18.4.23
6
+ * @date 2026-01-07T16:21:07.502Z
7
+ * @hash a0135e8
8
8
  */
9
9
 
10
10
  'use strict';
@@ -47106,7 +47106,6 @@ class GridOverlay extends owl.Component {
47106
47106
  onGridMoved: Function,
47107
47107
  gridOverlayDimensions: String,
47108
47108
  slots: { type: Object, optional: true },
47109
- getGridSize: Function,
47110
47109
  };
47111
47110
  static components = {
47112
47111
  FiguresContainer,
@@ -47125,14 +47124,7 @@ class GridOverlay extends owl.Component {
47125
47124
  setup() {
47126
47125
  useCellHovered(this.env, this.gridOverlay);
47127
47126
  const resizeObserver = new ResizeObserver(() => {
47128
- const boundingRect = this.gridOverlayEl.getBoundingClientRect();
47129
- const { width, height } = this.props.getGridSize();
47130
- this.props.onGridResized({
47131
- x: boundingRect.left,
47132
- y: boundingRect.top,
47133
- height: height,
47134
- width: width,
47135
- });
47127
+ this.props.onGridResized();
47136
47128
  });
47137
47129
  owl.onMounted(() => {
47138
47130
  resizeObserver.observe(this.gridOverlayEl);
@@ -58068,7 +58060,8 @@ class Grid extends owl.Component {
58068
58060
  });
58069
58061
  return !(rect.width === 0 || rect.height === 0);
58070
58062
  }
58071
- onGridResized({ height, width }) {
58063
+ onGridResized() {
58064
+ const { height, width } = this.props.getGridSize();
58072
58065
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
58073
58066
  width: width - HEADER_WIDTH,
58074
58067
  height: height - HEADER_HEIGHT,
@@ -78174,10 +78167,8 @@ class SpreadsheetDashboard extends owl.Component {
78174
78167
  });
78175
78168
  }
78176
78169
  get gridContainer() {
78177
- const sheetId = this.env.model.getters.getActiveSheetId();
78178
- const { right } = this.env.model.getters.getSheetZone(sheetId);
78179
- const { end } = this.env.model.getters.getColDimensions(sheetId, right);
78180
- return cssPropertiesToCss({ "max-width": `${end}px` });
78170
+ const maxWidth = this.getMaxSheetWidth();
78171
+ return cssPropertiesToCss({ "max-width": `${maxWidth}px` });
78181
78172
  }
78182
78173
  get gridOverlayDimensions() {
78183
78174
  return cssPropertiesToCss({
@@ -78209,10 +78200,12 @@ class SpreadsheetDashboard extends owl.Component {
78209
78200
  onClosePopover() {
78210
78201
  this.cellPopovers.close();
78211
78202
  }
78212
- onGridResized({ height, width }) {
78203
+ onGridResized() {
78204
+ const { height, width } = this.props.getGridSize();
78205
+ const maxWidth = this.getMaxSheetWidth();
78213
78206
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
78214
- width: width,
78215
- height: height,
78207
+ width: Math.min(maxWidth, width),
78208
+ height,
78216
78209
  gridOffsetX: 0,
78217
78210
  gridOffsetY: 0,
78218
78211
  });
@@ -78230,6 +78223,11 @@ class SpreadsheetDashboard extends owl.Component {
78230
78223
  ...this.env.model.getters.getSheetViewDimensionWithHeaders(),
78231
78224
  };
78232
78225
  }
78226
+ getMaxSheetWidth() {
78227
+ const sheetId = this.env.model.getters.getActiveSheetId();
78228
+ const { right } = this.env.model.getters.getSheetZone(sheetId);
78229
+ return this.env.model.getters.getColDimensions(sheetId, right).end;
78230
+ }
78233
78231
  }
78234
78232
 
78235
78233
  css /* scss */ `
@@ -80470,22 +80468,20 @@ class Spreadsheet extends owl.Component {
80470
80468
  return this.env.model.getters.getVisibleGroupLayers(sheetId, "COL");
80471
80469
  }
80472
80470
  getGridSize() {
80473
- const topBarHeight = this.spreadsheetRef.el
80474
- ?.querySelector(".o-spreadsheet-topbar-wrapper")
80475
- ?.getBoundingClientRect().height || 0;
80476
- const bottomBarHeight = this.spreadsheetRef.el
80477
- ?.querySelector(".o-spreadsheet-bottombar-wrapper")
80478
- ?.getBoundingClientRect().height || 0;
80479
- const gridWidth = this.spreadsheetRef.el?.querySelector(".o-grid")?.getBoundingClientRect().width || 0;
80480
- const gridHeight = (this.spreadsheetRef.el?.getBoundingClientRect().height || 0) -
80481
- (this.spreadsheetRef.el?.querySelector(".o-column-groups")?.getBoundingClientRect().height ||
80482
- 0) -
80483
- topBarHeight -
80484
- bottomBarHeight;
80485
- return {
80486
- width: Math.max(gridWidth - SCROLLBAR_WIDTH, 0),
80487
- height: Math.max(gridHeight - SCROLLBAR_WIDTH, 0),
80488
- };
80471
+ const el = this.spreadsheetRef.el;
80472
+ if (!el) {
80473
+ return { width: 0, height: 0 };
80474
+ }
80475
+ const getHeight = (selector) => el.querySelector(selector)?.getBoundingClientRect().height || 0;
80476
+ const getWidth = (selector) => el.querySelector(selector)?.getBoundingClientRect().width || 0;
80477
+ const rect = el.getBoundingClientRect();
80478
+ const topBarHeight = getHeight(".o-spreadsheet-topbar-wrapper");
80479
+ const bottomBarHeight = getHeight(".o-spreadsheet-bottombar-wrapper");
80480
+ const colGroupHeight = getHeight(".o-column-groups");
80481
+ const gridWidth = getWidth(".o-grid");
80482
+ const width = Math.max(gridWidth - SCROLLBAR_WIDTH, 0);
80483
+ const height = Math.max(rect.height - topBarHeight - bottomBarHeight - colGroupHeight - SCROLLBAR_WIDTH, 0);
80484
+ return { width, height };
80489
80485
  }
80490
80486
  }
80491
80487
 
@@ -85018,6 +85014,6 @@ exports.tokenColors = tokenColors;
85018
85014
  exports.tokenize = tokenize;
85019
85015
 
85020
85016
 
85021
- __info__.version = "18.4.22";
85022
- __info__.date = "2025-12-26T10:19:07.786Z";
85023
- __info__.hash = "6ddac00";
85017
+ __info__.version = "18.4.23";
85018
+ __info__.date = "2026-01-07T16:21:07.502Z";
85019
+ __info__.hash = "a0135e8";
@@ -9825,13 +9825,9 @@ interface Props$F {
9825
9825
  onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
9826
9826
  onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: GridClickModifiers, ev: PointerEvent | MouseEvent) => void;
9827
9827
  onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
9828
- onGridResized: (dimension: Rect) => void;
9828
+ onGridResized: () => void;
9829
9829
  onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
9830
9830
  gridOverlayDimensions: string;
9831
- getGridSize: () => {
9832
- width: number;
9833
- height: number;
9834
- };
9835
9831
  }
9836
9832
  declare class GridOverlay extends Component<Props$F, SpreadsheetChildEnv> {
9837
9833
  static template: string;
@@ -9858,7 +9854,6 @@ declare class GridOverlay extends Component<Props$F, SpreadsheetChildEnv> {
9858
9854
  type: ObjectConstructor;
9859
9855
  optional: boolean;
9860
9856
  };
9861
- getGridSize: FunctionConstructor;
9862
9857
  };
9863
9858
  static components: {
9864
9859
  FiguresContainer: typeof FiguresContainer;
@@ -10398,7 +10393,7 @@ declare class Grid extends Component<Props$w, SpreadsheetChildEnv> {
10398
10393
  top: number;
10399
10394
  };
10400
10395
  get isAutofillVisible(): boolean;
10401
- onGridResized({ height, width }: DOMDimension): void;
10396
+ onGridResized(): void;
10402
10397
  private moveCanvas;
10403
10398
  private processSpaceKey;
10404
10399
  getClientPositionKey(client: Client): string;
@@ -11978,6 +11973,7 @@ declare class ClickableCellsStore extends SpreadsheetStore {
11978
11973
  }
11979
11974
 
11980
11975
  interface Props$4 {
11976
+ getGridSize: () => DOMDimension;
11981
11977
  }
11982
11978
  declare class SpreadsheetDashboard extends Component<Props$4, SpreadsheetChildEnv> {
11983
11979
  static template: string;
@@ -12010,9 +12006,10 @@ declare class SpreadsheetDashboard extends Component<Props$4, SpreadsheetChildEn
12010
12006
  getClickableCells(): ClickableCell[];
12011
12007
  selectClickableCell(ev: MouseEvent, clickableCell: ClickableCell): void;
12012
12008
  onClosePopover(): void;
12013
- onGridResized({ height, width }: DOMDimension): void;
12009
+ onGridResized(): void;
12014
12010
  private moveCanvas;
12015
12011
  private getGridRect;
12012
+ private getMaxSheetWidth;
12016
12013
  }
12017
12014
 
12018
12015
  interface Props$3 {
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.4.22
6
- * @date 2025-12-26T10:19:07.786Z
7
- * @hash 6ddac00
5
+ * @version 18.4.23
6
+ * @date 2026-01-07T16:21:07.502Z
7
+ * @hash a0135e8
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -47104,7 +47104,6 @@ class GridOverlay extends Component {
47104
47104
  onGridMoved: Function,
47105
47105
  gridOverlayDimensions: String,
47106
47106
  slots: { type: Object, optional: true },
47107
- getGridSize: Function,
47108
47107
  };
47109
47108
  static components = {
47110
47109
  FiguresContainer,
@@ -47123,14 +47122,7 @@ class GridOverlay extends Component {
47123
47122
  setup() {
47124
47123
  useCellHovered(this.env, this.gridOverlay);
47125
47124
  const resizeObserver = new ResizeObserver(() => {
47126
- const boundingRect = this.gridOverlayEl.getBoundingClientRect();
47127
- const { width, height } = this.props.getGridSize();
47128
- this.props.onGridResized({
47129
- x: boundingRect.left,
47130
- y: boundingRect.top,
47131
- height: height,
47132
- width: width,
47133
- });
47125
+ this.props.onGridResized();
47134
47126
  });
47135
47127
  onMounted(() => {
47136
47128
  resizeObserver.observe(this.gridOverlayEl);
@@ -58066,7 +58058,8 @@ class Grid extends Component {
58066
58058
  });
58067
58059
  return !(rect.width === 0 || rect.height === 0);
58068
58060
  }
58069
- onGridResized({ height, width }) {
58061
+ onGridResized() {
58062
+ const { height, width } = this.props.getGridSize();
58070
58063
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
58071
58064
  width: width - HEADER_WIDTH,
58072
58065
  height: height - HEADER_HEIGHT,
@@ -78172,10 +78165,8 @@ class SpreadsheetDashboard extends Component {
78172
78165
  });
78173
78166
  }
78174
78167
  get gridContainer() {
78175
- const sheetId = this.env.model.getters.getActiveSheetId();
78176
- const { right } = this.env.model.getters.getSheetZone(sheetId);
78177
- const { end } = this.env.model.getters.getColDimensions(sheetId, right);
78178
- return cssPropertiesToCss({ "max-width": `${end}px` });
78168
+ const maxWidth = this.getMaxSheetWidth();
78169
+ return cssPropertiesToCss({ "max-width": `${maxWidth}px` });
78179
78170
  }
78180
78171
  get gridOverlayDimensions() {
78181
78172
  return cssPropertiesToCss({
@@ -78207,10 +78198,12 @@ class SpreadsheetDashboard extends Component {
78207
78198
  onClosePopover() {
78208
78199
  this.cellPopovers.close();
78209
78200
  }
78210
- onGridResized({ height, width }) {
78201
+ onGridResized() {
78202
+ const { height, width } = this.props.getGridSize();
78203
+ const maxWidth = this.getMaxSheetWidth();
78211
78204
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
78212
- width: width,
78213
- height: height,
78205
+ width: Math.min(maxWidth, width),
78206
+ height,
78214
78207
  gridOffsetX: 0,
78215
78208
  gridOffsetY: 0,
78216
78209
  });
@@ -78228,6 +78221,11 @@ class SpreadsheetDashboard extends Component {
78228
78221
  ...this.env.model.getters.getSheetViewDimensionWithHeaders(),
78229
78222
  };
78230
78223
  }
78224
+ getMaxSheetWidth() {
78225
+ const sheetId = this.env.model.getters.getActiveSheetId();
78226
+ const { right } = this.env.model.getters.getSheetZone(sheetId);
78227
+ return this.env.model.getters.getColDimensions(sheetId, right).end;
78228
+ }
78231
78229
  }
78232
78230
 
78233
78231
  css /* scss */ `
@@ -80468,22 +80466,20 @@ class Spreadsheet extends Component {
80468
80466
  return this.env.model.getters.getVisibleGroupLayers(sheetId, "COL");
80469
80467
  }
80470
80468
  getGridSize() {
80471
- const topBarHeight = this.spreadsheetRef.el
80472
- ?.querySelector(".o-spreadsheet-topbar-wrapper")
80473
- ?.getBoundingClientRect().height || 0;
80474
- const bottomBarHeight = this.spreadsheetRef.el
80475
- ?.querySelector(".o-spreadsheet-bottombar-wrapper")
80476
- ?.getBoundingClientRect().height || 0;
80477
- const gridWidth = this.spreadsheetRef.el?.querySelector(".o-grid")?.getBoundingClientRect().width || 0;
80478
- const gridHeight = (this.spreadsheetRef.el?.getBoundingClientRect().height || 0) -
80479
- (this.spreadsheetRef.el?.querySelector(".o-column-groups")?.getBoundingClientRect().height ||
80480
- 0) -
80481
- topBarHeight -
80482
- bottomBarHeight;
80483
- return {
80484
- width: Math.max(gridWidth - SCROLLBAR_WIDTH, 0),
80485
- height: Math.max(gridHeight - SCROLLBAR_WIDTH, 0),
80486
- };
80469
+ const el = this.spreadsheetRef.el;
80470
+ if (!el) {
80471
+ return { width: 0, height: 0 };
80472
+ }
80473
+ const getHeight = (selector) => el.querySelector(selector)?.getBoundingClientRect().height || 0;
80474
+ const getWidth = (selector) => el.querySelector(selector)?.getBoundingClientRect().width || 0;
80475
+ const rect = el.getBoundingClientRect();
80476
+ const topBarHeight = getHeight(".o-spreadsheet-topbar-wrapper");
80477
+ const bottomBarHeight = getHeight(".o-spreadsheet-bottombar-wrapper");
80478
+ const colGroupHeight = getHeight(".o-column-groups");
80479
+ const gridWidth = getWidth(".o-grid");
80480
+ const width = Math.max(gridWidth - SCROLLBAR_WIDTH, 0);
80481
+ const height = Math.max(rect.height - topBarHeight - bottomBarHeight - colGroupHeight - SCROLLBAR_WIDTH, 0);
80482
+ return { width, height };
80487
80483
  }
80488
80484
  }
80489
80485
 
@@ -84968,6 +84964,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
84968
84964
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
84969
84965
 
84970
84966
 
84971
- __info__.version = "18.4.22";
84972
- __info__.date = "2025-12-26T10:19:07.786Z";
84973
- __info__.hash = "6ddac00";
84967
+ __info__.version = "18.4.23";
84968
+ __info__.date = "2026-01-07T16:21:07.502Z";
84969
+ __info__.hash = "a0135e8";
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.4.22
6
- * @date 2025-12-26T10:19:07.786Z
7
- * @hash 6ddac00
5
+ * @version 18.4.23
6
+ * @date 2026-01-07T16:21:07.502Z
7
+ * @hash a0135e8
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -47105,7 +47105,6 @@ stores.inject(MyMetaStore, storeInstance);
47105
47105
  onGridMoved: Function,
47106
47106
  gridOverlayDimensions: String,
47107
47107
  slots: { type: Object, optional: true },
47108
- getGridSize: Function,
47109
47108
  };
47110
47109
  static components = {
47111
47110
  FiguresContainer,
@@ -47124,14 +47123,7 @@ stores.inject(MyMetaStore, storeInstance);
47124
47123
  setup() {
47125
47124
  useCellHovered(this.env, this.gridOverlay);
47126
47125
  const resizeObserver = new ResizeObserver(() => {
47127
- const boundingRect = this.gridOverlayEl.getBoundingClientRect();
47128
- const { width, height } = this.props.getGridSize();
47129
- this.props.onGridResized({
47130
- x: boundingRect.left,
47131
- y: boundingRect.top,
47132
- height: height,
47133
- width: width,
47134
- });
47126
+ this.props.onGridResized();
47135
47127
  });
47136
47128
  owl.onMounted(() => {
47137
47129
  resizeObserver.observe(this.gridOverlayEl);
@@ -58067,7 +58059,8 @@ stores.inject(MyMetaStore, storeInstance);
58067
58059
  });
58068
58060
  return !(rect.width === 0 || rect.height === 0);
58069
58061
  }
58070
- onGridResized({ height, width }) {
58062
+ onGridResized() {
58063
+ const { height, width } = this.props.getGridSize();
58071
58064
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
58072
58065
  width: width - HEADER_WIDTH,
58073
58066
  height: height - HEADER_HEIGHT,
@@ -78173,10 +78166,8 @@ stores.inject(MyMetaStore, storeInstance);
78173
78166
  });
78174
78167
  }
78175
78168
  get gridContainer() {
78176
- const sheetId = this.env.model.getters.getActiveSheetId();
78177
- const { right } = this.env.model.getters.getSheetZone(sheetId);
78178
- const { end } = this.env.model.getters.getColDimensions(sheetId, right);
78179
- return cssPropertiesToCss({ "max-width": `${end}px` });
78169
+ const maxWidth = this.getMaxSheetWidth();
78170
+ return cssPropertiesToCss({ "max-width": `${maxWidth}px` });
78180
78171
  }
78181
78172
  get gridOverlayDimensions() {
78182
78173
  return cssPropertiesToCss({
@@ -78208,10 +78199,12 @@ stores.inject(MyMetaStore, storeInstance);
78208
78199
  onClosePopover() {
78209
78200
  this.cellPopovers.close();
78210
78201
  }
78211
- onGridResized({ height, width }) {
78202
+ onGridResized() {
78203
+ const { height, width } = this.props.getGridSize();
78204
+ const maxWidth = this.getMaxSheetWidth();
78212
78205
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
78213
- width: width,
78214
- height: height,
78206
+ width: Math.min(maxWidth, width),
78207
+ height,
78215
78208
  gridOffsetX: 0,
78216
78209
  gridOffsetY: 0,
78217
78210
  });
@@ -78229,6 +78222,11 @@ stores.inject(MyMetaStore, storeInstance);
78229
78222
  ...this.env.model.getters.getSheetViewDimensionWithHeaders(),
78230
78223
  };
78231
78224
  }
78225
+ getMaxSheetWidth() {
78226
+ const sheetId = this.env.model.getters.getActiveSheetId();
78227
+ const { right } = this.env.model.getters.getSheetZone(sheetId);
78228
+ return this.env.model.getters.getColDimensions(sheetId, right).end;
78229
+ }
78232
78230
  }
78233
78231
 
78234
78232
  css /* scss */ `
@@ -80469,22 +80467,20 @@ stores.inject(MyMetaStore, storeInstance);
80469
80467
  return this.env.model.getters.getVisibleGroupLayers(sheetId, "COL");
80470
80468
  }
80471
80469
  getGridSize() {
80472
- const topBarHeight = this.spreadsheetRef.el
80473
- ?.querySelector(".o-spreadsheet-topbar-wrapper")
80474
- ?.getBoundingClientRect().height || 0;
80475
- const bottomBarHeight = this.spreadsheetRef.el
80476
- ?.querySelector(".o-spreadsheet-bottombar-wrapper")
80477
- ?.getBoundingClientRect().height || 0;
80478
- const gridWidth = this.spreadsheetRef.el?.querySelector(".o-grid")?.getBoundingClientRect().width || 0;
80479
- const gridHeight = (this.spreadsheetRef.el?.getBoundingClientRect().height || 0) -
80480
- (this.spreadsheetRef.el?.querySelector(".o-column-groups")?.getBoundingClientRect().height ||
80481
- 0) -
80482
- topBarHeight -
80483
- bottomBarHeight;
80484
- return {
80485
- width: Math.max(gridWidth - SCROLLBAR_WIDTH, 0),
80486
- height: Math.max(gridHeight - SCROLLBAR_WIDTH, 0),
80487
- };
80470
+ const el = this.spreadsheetRef.el;
80471
+ if (!el) {
80472
+ return { width: 0, height: 0 };
80473
+ }
80474
+ const getHeight = (selector) => el.querySelector(selector)?.getBoundingClientRect().height || 0;
80475
+ const getWidth = (selector) => el.querySelector(selector)?.getBoundingClientRect().width || 0;
80476
+ const rect = el.getBoundingClientRect();
80477
+ const topBarHeight = getHeight(".o-spreadsheet-topbar-wrapper");
80478
+ const bottomBarHeight = getHeight(".o-spreadsheet-bottombar-wrapper");
80479
+ const colGroupHeight = getHeight(".o-column-groups");
80480
+ const gridWidth = getWidth(".o-grid");
80481
+ const width = Math.max(gridWidth - SCROLLBAR_WIDTH, 0);
80482
+ const height = Math.max(rect.height - topBarHeight - bottomBarHeight - colGroupHeight - SCROLLBAR_WIDTH, 0);
80483
+ return { width, height };
80488
80484
  }
80489
80485
  }
80490
80486
 
@@ -85017,9 +85013,9 @@ stores.inject(MyMetaStore, storeInstance);
85017
85013
  exports.tokenize = tokenize;
85018
85014
 
85019
85015
 
85020
- __info__.version = "18.4.22";
85021
- __info__.date = "2025-12-26T10:19:07.786Z";
85022
- __info__.hash = "6ddac00";
85016
+ __info__.version = "18.4.23";
85017
+ __info__.date = "2026-01-07T16:21:07.502Z";
85018
+ __info__.hash = "a0135e8";
85023
85019
 
85024
85020
 
85025
85021
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -900,7 +900,7 @@
900
900
  .o-paint-format-cursor {
901
901
  cursor: url("data:image/svg+xml,${encodeURIComponent('\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="16"><path d="M6.5.4c1.3-.8 2.9-.1 3.8 1.4l2.9 5.1c.2.4.9 1.6-.4 2.3l-1.6.9 1.8 3.1c.2.4.1 1-.2 1.2l-1.6 1c-.3.1-.9 0-1.1-.4l-1.8-3.1-1.6 1c-.6.4-1.7 0-2.2-.8L0 4.3"/><path fill="#fff" d="M9.1 2a1.4 1.1 60 0 0-1.7-.6L5.5 2.5l.9 1.6-1 .6-.9-1.6-.6.4 1.8 3.1-1.3.7-1.8-3.1-1 .6 3.8 6.6 6.8-3.98M3.9 8.8 10.82 5l.795 1.4-6.81 3.96"/></svg>\n')}"), auto;
902
902
  }
903
- `;class XP extends t.Component{static template="o-spreadsheet-GridOverlay";static props={onCellDoubleClicked:{type:Function,optional:!0},onCellClicked:{type:Function,optional:!0},onCellRightClicked:{type:Function,optional:!0},onGridResized:{type:Function,optional:!0},onGridMoved:Function,gridOverlayDimensions:String,slots:{type:Object,optional:!0},getGridSize:Function};static components={FiguresContainer:BP,GridAddRowsFooter:$P};static defaultProps={onCellDoubleClicked:()=>{},onCellClicked:()=>{},onCellRightClicked:()=>{},onGridResized:()=>{}};gridOverlay=t.useRef("gridOverlay");cellPopovers;paintFormatStore;hoveredIconStore;setup(){YP(this.env,this.gridOverlay);const e=new ResizeObserver((()=>{const e=this.gridOverlayEl.getBoundingClientRect(),{width:t,height:o}=this.props.getGridSize();this.props.onGridResized({x:e.left,y:e.top,height:o,width:t})}));t.onMounted((()=>{e.observe(this.gridOverlayEl)})),t.onWillUnmount((()=>{e.disconnect()})),this.cellPopovers=lh(Xx),this.paintFormatStore=lh(qP),this.hoveredIconStore=lh(jP)}get gridOverlayEl(){if(!this.gridOverlay.el)throw new Error("GridOverlay el is not defined.");return this.gridOverlay.el}get style(){return this.props.gridOverlayDimensions+xh({cursor:this.hoveredIconStore.hoveredIcon?"pointer":"default"})}get isPaintingFormat(){return this.paintFormatStore.isActive}onPointerMove(e){if(this.env.isMobile())return;const t=this.getInteractiveIconAtEvent(e),o=t?.type?{id:t.type,position:t.position}:void 0;mt(o,this.hoveredIconStore.hoveredIcon)||this.hoveredIconStore.setHoveredIcon(o)}onPointerDown(e){e.button>0||this.env.isMobile()||this.onCellClicked(e)}onClick(e){e.button>0||!this.env.isMobile()||this.onCellClicked(e)}onCellClicked(e){const t=this.cellPopovers.persistentCellPopover,[o,s]=this.getCartesianCoordinates(e),i=this.getInteractiveIconAtEvent(e);i&&this.env.model.selection.getBackToDefault(),this.props.onCellClicked(o,s,{expandZone:e.shiftKey,addZone:xy(e)},e),i?.onClick&&i.onClick(i.position,this.env),e.target===this.gridOverlay.el&&this.cellPopovers.isOpen&&mt(t,this.cellPopovers.persistentCellPopover)&&this.cellPopovers.close()}onDoubleClick(e){if(this.getInteractiveIconAtEvent(e))return;const[t,o]=this.getCartesianCoordinates(e);this.props.onCellDoubleClicked(t,o)}onContextMenu(e){const[t,o]=this.getCartesianCoordinates(e);this.props.onCellRightClicked(t,o,{x:e.clientX,y:e.clientY})}getCartesianCoordinates(e){const t=fy(this.gridOverlay),o=e.clientX-t.x,s=e.clientY-t.y;return[this.env.model.getters.getColIndex(o),this.env.model.getters.getRowIndex(s)]}getInteractiveIconAtEvent(e){const t=fy(this.gridOverlay),o=this.env.model.getters.getGridOffset(),s=e.clientX-t.x+o.x,i=e.clientY-t.y+o.y,[n,r]=this.getCartesianCoordinates(e),a=this.env.model.getters.getActiveSheetId();let l={col:n,row:r,sheetId:a};const c=this.env.model.getters.getMerge(l);c&&(l={col:c.left,row:c.top,sheetId:a});const h=this.env.model.getters.getCellIcons(l).find((e=>{const t=this.env.model.getters.getMerge(l)||Mr(l),o=this.env.model.getters.getRect(t);return function(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}(s,i,this.env.model.getters.getCellIconRect(e,o))}));return h?.onClick?h:void 0}}class KP extends t.Component{static template="o-spreadsheet-GridPopover";static props={onClosePopover:Function,onMouseWheel:Function,gridRect:Object};static components={Popover:Lx};cellPopovers;zIndex=Fe.GridPopover;setup(){this.cellPopovers=lh(Xx)}get cellPopover(){const e=this.cellPopovers.cellPopover;if(!e.isOpen)return{isOpen:!1};const t=e.anchorRect;return{...e,anchorRect:{...t,x:t.x+this.props.gridRect.x,y:t.y+this.props.gridRect.y}}}}class JP extends t.Component{static template="o-spreadsheet-UnhideRowHeaders";static props={headersGroups:Array,headerRange:Object,offset:{type:Number,optional:!0}};static defaultProps={offset:0};get sheetId(){return this.env.model.getters.getActiveSheetId()}getUnhidePreviousButtonStyle(e){const t=this.env.model.getters.getRect(Mr({col:0,row:e}));return xh({top:t.y+t.height-te-this.props.offset+"px","margin-right":"1px"})}getUnhideNextButtonStyle(e){return xh({top:this.env.model.getters.getRect(Mr({col:0,row:e})).y-te-this.props.offset+"px","margin-right":"1px"})}unhide(e){this.env.model.dispatch("UNHIDE_COLUMNS_ROWS",{sheetId:this.sheetId,dimension:"ROW",elements:e})}isVisible(e){return e>=this.props.headerRange.start&&e<=this.props.headerRange.end}}class QP extends t.Component{static template="o-spreadsheet-UnhideColumnHeaders";static props={headersGroups:Array,headerRange:Object,offset:{type:Number,optional:!0}};static defaultProps={offset:0};get sheetId(){return this.env.model.getters.getActiveSheetId()}getUnhidePreviousButtonStyle(e){const t=this.env.model.getters.getRect(Mr({col:e,row:0}));return xh({left:t.x+t.width-oe-this.props.offset+"px"})}getUnhideNextButtonStyle(e){return xh({left:this.env.model.getters.getRect(Mr({col:e,row:0})).x-oe-this.props.offset+"px"})}unhide(e){this.env.model.dispatch("UNHIDE_COLUMNS_ROWS",{sheetId:this.sheetId,dimension:"COL",elements:e})}isVisible(e){return e>=this.props.headerRange.start&&e<=this.props.headerRange.end}}class eM extends t.Component{static props={onOpenContextMenu:Function};composerFocusStore;PADDING=0;MAX_SIZE_MARGIN=0;MIN_ELEMENT_SIZE=0;lastSelectedElementIndex=null;state=t.useState({resizerIsActive:!1,isResizing:!1,isMoving:!1,isSelecting:!1,waitingForMove:!1,activeElement:0,draggerLinePosition:0,draggerShadowPosition:0,draggerShadowThickness:0,delta:0,base:0,position:"before"});dragNDropGrid=AP(this.env);setup(){this.composerFocusStore=lh(bh)}_computeHandleDisplay(e){const t=this._getEvOffset(e),o=this._getElementIndex(t);if(o<0)return;const s=this._getDimensionsInViewport(o);t-s.start<this.PADDING&&o!==this._getViewportOffset()?(this.state.resizerIsActive=!0,this.state.draggerLinePosition=s.start,this.state.activeElement=this._getPreviousVisibleElement(o)):s.end-t<this.PADDING?(this.state.resizerIsActive=!0,this.state.draggerLinePosition=s.end,this.state.activeElement=o):this.state.resizerIsActive=!1}_computeGrabDisplay(e){const t=this._getElementIndex(this._getEvOffset(e)),o=this._getActiveElements(),s=this._getSelectedZoneStart(),i=this._getSelectedZoneEnd();o.has(s)&&s<=t&&t<=i?this.state.waitingForMove=!0:this.state.waitingForMove=!1}onMouseMove(e){this.env.isMobile()||this.env.model.getters.isReadonly()||this.state.isResizing||this.state.isMoving||this.state.isSelecting||(this._computeHandleDisplay(e),this._computeGrabDisplay(e))}onMouseLeave(){this.state.resizerIsActive=this.state.isResizing,this.state.waitingForMove=!1}onDblClick(e){this._fitElementSize(this.state.activeElement),this.state.isResizing=!1,this._computeHandleDisplay(e),this._computeGrabDisplay(e)}onMouseDown(e){this.state.isResizing=!0,this.state.delta=0;const t=this._getClientPosition(e),o=this.state.draggerLinePosition,s=this._getElementSize(this.state.activeElement),i=o-s+this.MIN_ELEMENT_SIZE,n=this._getMaxSize();$E((e=>{this.state.delta=this._getClientPosition(e)-t,this.state.draggerLinePosition=o+this.state.delta,this.state.draggerLinePosition<i&&(this.state.draggerLinePosition=i,this.state.delta=this.MIN_ELEMENT_SIZE-s),this.state.draggerLinePosition>n&&(this.state.draggerLinePosition=n,this.state.delta=n-o)}),(e=>{this.state.isResizing=!1,0!==this.state.delta&&this._updateSize()}))}onClick(e){if(!this.env.isMobile())return;if(e.button>0)return;const t=this._getElementIndex(this._getEvOffset(e));this._selectElement(t,!1)}select(e){if(this.env.isMobile())return;if(e.button>0)return;const t=this._getElementIndex(this._getEvOffset(e));t<0||(this.env.model.getters.isReadonly()?this._selectElement(t,!1):this.state.waitingForMove?this.env.model.getters.isGridSelectionActive()?this.startMovement(e):this._selectElement(t,!1):("editing"===this.composerFocusStore.activeComposer.editionMode&&this.env.model.selection.getBackToDefault(),this.startSelection(e,t)))}startMovement(e){this.state.waitingForMove=!1,this.state.isMoving=!0;const t=this._getDimensionsInViewport(this._getSelectedZoneStart()),o=this._getDimensionsInViewport(this._getSelectedZoneEnd()),s=t.start;this.state.draggerLinePosition=s,this.state.base=this._getSelectedZoneStart(),this.state.draggerShadowPosition=s,this.state.draggerShadowThickness=o.end-t.start;this.dragNDropGrid.start(e,((e,o)=>{const s="COL"===this._getType()?e:o;if(s>=0){const e=this._getDimensionsInViewport(s);s<=this._getSelectedZoneStart()?(this.state.draggerLinePosition=e.start,this.state.draggerShadowPosition=e.start,this.state.base=s,this.state.position="before"):this._getSelectedZoneEnd()<s?(this.state.draggerLinePosition=e.end,this.state.draggerShadowPosition=e.end-this.state.draggerShadowThickness,this.state.base=s,this.state.position="after"):(this.state.draggerLinePosition=t.start,this.state.draggerShadowPosition=t.start,this.state.base=this._getSelectedZoneStart())}}),(()=>{this.state.isMoving=!1,this.state.base!==this._getSelectedZoneStart()&&this._moveElements(),this._computeGrabDisplay(e)}))}startSelection(e,t){if(this.env.isMobile())return;this.state.isSelecting=!0,e.shiftKey?this._increaseSelection(t):this._selectElement(t,xy(e)),this.lastSelectedElementIndex=t;this.dragNDropGrid.start(e,((e,t)=>{const o="COL"===this._getType()?e:t;o!==this.lastSelectedElementIndex&&-1!==o&&(this._increaseSelection(o),this.lastSelectedElementIndex=o)}),(()=>{this.state.isSelecting=!1,this.lastSelectedElementIndex=null,this._computeGrabDisplay(e)}))}onMouseUp(e){this.lastSelectedElementIndex=null}onContextMenu(e){e.preventDefault();const t=this._getElementIndex(this._getEvOffset(e));if(t<0)return;this._getActiveElements().has(t)||this._selectElement(t,!1);const o=this._getType();this.props.onOpenContextMenu(o,e.clientX,e.clientY)}}yh`
903
+ `;class XP extends t.Component{static template="o-spreadsheet-GridOverlay";static props={onCellDoubleClicked:{type:Function,optional:!0},onCellClicked:{type:Function,optional:!0},onCellRightClicked:{type:Function,optional:!0},onGridResized:{type:Function,optional:!0},onGridMoved:Function,gridOverlayDimensions:String,slots:{type:Object,optional:!0}};static components={FiguresContainer:BP,GridAddRowsFooter:$P};static defaultProps={onCellDoubleClicked:()=>{},onCellClicked:()=>{},onCellRightClicked:()=>{},onGridResized:()=>{}};gridOverlay=t.useRef("gridOverlay");cellPopovers;paintFormatStore;hoveredIconStore;setup(){YP(this.env,this.gridOverlay);const e=new ResizeObserver((()=>{this.props.onGridResized()}));t.onMounted((()=>{e.observe(this.gridOverlayEl)})),t.onWillUnmount((()=>{e.disconnect()})),this.cellPopovers=lh(Xx),this.paintFormatStore=lh(qP),this.hoveredIconStore=lh(jP)}get gridOverlayEl(){if(!this.gridOverlay.el)throw new Error("GridOverlay el is not defined.");return this.gridOverlay.el}get style(){return this.props.gridOverlayDimensions+xh({cursor:this.hoveredIconStore.hoveredIcon?"pointer":"default"})}get isPaintingFormat(){return this.paintFormatStore.isActive}onPointerMove(e){if(this.env.isMobile())return;const t=this.getInteractiveIconAtEvent(e),o=t?.type?{id:t.type,position:t.position}:void 0;mt(o,this.hoveredIconStore.hoveredIcon)||this.hoveredIconStore.setHoveredIcon(o)}onPointerDown(e){e.button>0||this.env.isMobile()||this.onCellClicked(e)}onClick(e){e.button>0||!this.env.isMobile()||this.onCellClicked(e)}onCellClicked(e){const t=this.cellPopovers.persistentCellPopover,[o,s]=this.getCartesianCoordinates(e),i=this.getInteractiveIconAtEvent(e);i&&this.env.model.selection.getBackToDefault(),this.props.onCellClicked(o,s,{expandZone:e.shiftKey,addZone:xy(e)},e),i?.onClick&&i.onClick(i.position,this.env),e.target===this.gridOverlay.el&&this.cellPopovers.isOpen&&mt(t,this.cellPopovers.persistentCellPopover)&&this.cellPopovers.close()}onDoubleClick(e){if(this.getInteractiveIconAtEvent(e))return;const[t,o]=this.getCartesianCoordinates(e);this.props.onCellDoubleClicked(t,o)}onContextMenu(e){const[t,o]=this.getCartesianCoordinates(e);this.props.onCellRightClicked(t,o,{x:e.clientX,y:e.clientY})}getCartesianCoordinates(e){const t=fy(this.gridOverlay),o=e.clientX-t.x,s=e.clientY-t.y;return[this.env.model.getters.getColIndex(o),this.env.model.getters.getRowIndex(s)]}getInteractiveIconAtEvent(e){const t=fy(this.gridOverlay),o=this.env.model.getters.getGridOffset(),s=e.clientX-t.x+o.x,i=e.clientY-t.y+o.y,[n,r]=this.getCartesianCoordinates(e),a=this.env.model.getters.getActiveSheetId();let l={col:n,row:r,sheetId:a};const c=this.env.model.getters.getMerge(l);c&&(l={col:c.left,row:c.top,sheetId:a});const h=this.env.model.getters.getCellIcons(l).find((e=>{const t=this.env.model.getters.getMerge(l)||Mr(l),o=this.env.model.getters.getRect(t);return function(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}(s,i,this.env.model.getters.getCellIconRect(e,o))}));return h?.onClick?h:void 0}}class KP extends t.Component{static template="o-spreadsheet-GridPopover";static props={onClosePopover:Function,onMouseWheel:Function,gridRect:Object};static components={Popover:Lx};cellPopovers;zIndex=Fe.GridPopover;setup(){this.cellPopovers=lh(Xx)}get cellPopover(){const e=this.cellPopovers.cellPopover;if(!e.isOpen)return{isOpen:!1};const t=e.anchorRect;return{...e,anchorRect:{...t,x:t.x+this.props.gridRect.x,y:t.y+this.props.gridRect.y}}}}class JP extends t.Component{static template="o-spreadsheet-UnhideRowHeaders";static props={headersGroups:Array,headerRange:Object,offset:{type:Number,optional:!0}};static defaultProps={offset:0};get sheetId(){return this.env.model.getters.getActiveSheetId()}getUnhidePreviousButtonStyle(e){const t=this.env.model.getters.getRect(Mr({col:0,row:e}));return xh({top:t.y+t.height-te-this.props.offset+"px","margin-right":"1px"})}getUnhideNextButtonStyle(e){return xh({top:this.env.model.getters.getRect(Mr({col:0,row:e})).y-te-this.props.offset+"px","margin-right":"1px"})}unhide(e){this.env.model.dispatch("UNHIDE_COLUMNS_ROWS",{sheetId:this.sheetId,dimension:"ROW",elements:e})}isVisible(e){return e>=this.props.headerRange.start&&e<=this.props.headerRange.end}}class QP extends t.Component{static template="o-spreadsheet-UnhideColumnHeaders";static props={headersGroups:Array,headerRange:Object,offset:{type:Number,optional:!0}};static defaultProps={offset:0};get sheetId(){return this.env.model.getters.getActiveSheetId()}getUnhidePreviousButtonStyle(e){const t=this.env.model.getters.getRect(Mr({col:e,row:0}));return xh({left:t.x+t.width-oe-this.props.offset+"px"})}getUnhideNextButtonStyle(e){return xh({left:this.env.model.getters.getRect(Mr({col:e,row:0})).x-oe-this.props.offset+"px"})}unhide(e){this.env.model.dispatch("UNHIDE_COLUMNS_ROWS",{sheetId:this.sheetId,dimension:"COL",elements:e})}isVisible(e){return e>=this.props.headerRange.start&&e<=this.props.headerRange.end}}class eM extends t.Component{static props={onOpenContextMenu:Function};composerFocusStore;PADDING=0;MAX_SIZE_MARGIN=0;MIN_ELEMENT_SIZE=0;lastSelectedElementIndex=null;state=t.useState({resizerIsActive:!1,isResizing:!1,isMoving:!1,isSelecting:!1,waitingForMove:!1,activeElement:0,draggerLinePosition:0,draggerShadowPosition:0,draggerShadowThickness:0,delta:0,base:0,position:"before"});dragNDropGrid=AP(this.env);setup(){this.composerFocusStore=lh(bh)}_computeHandleDisplay(e){const t=this._getEvOffset(e),o=this._getElementIndex(t);if(o<0)return;const s=this._getDimensionsInViewport(o);t-s.start<this.PADDING&&o!==this._getViewportOffset()?(this.state.resizerIsActive=!0,this.state.draggerLinePosition=s.start,this.state.activeElement=this._getPreviousVisibleElement(o)):s.end-t<this.PADDING?(this.state.resizerIsActive=!0,this.state.draggerLinePosition=s.end,this.state.activeElement=o):this.state.resizerIsActive=!1}_computeGrabDisplay(e){const t=this._getElementIndex(this._getEvOffset(e)),o=this._getActiveElements(),s=this._getSelectedZoneStart(),i=this._getSelectedZoneEnd();o.has(s)&&s<=t&&t<=i?this.state.waitingForMove=!0:this.state.waitingForMove=!1}onMouseMove(e){this.env.isMobile()||this.env.model.getters.isReadonly()||this.state.isResizing||this.state.isMoving||this.state.isSelecting||(this._computeHandleDisplay(e),this._computeGrabDisplay(e))}onMouseLeave(){this.state.resizerIsActive=this.state.isResizing,this.state.waitingForMove=!1}onDblClick(e){this._fitElementSize(this.state.activeElement),this.state.isResizing=!1,this._computeHandleDisplay(e),this._computeGrabDisplay(e)}onMouseDown(e){this.state.isResizing=!0,this.state.delta=0;const t=this._getClientPosition(e),o=this.state.draggerLinePosition,s=this._getElementSize(this.state.activeElement),i=o-s+this.MIN_ELEMENT_SIZE,n=this._getMaxSize();$E((e=>{this.state.delta=this._getClientPosition(e)-t,this.state.draggerLinePosition=o+this.state.delta,this.state.draggerLinePosition<i&&(this.state.draggerLinePosition=i,this.state.delta=this.MIN_ELEMENT_SIZE-s),this.state.draggerLinePosition>n&&(this.state.draggerLinePosition=n,this.state.delta=n-o)}),(e=>{this.state.isResizing=!1,0!==this.state.delta&&this._updateSize()}))}onClick(e){if(!this.env.isMobile())return;if(e.button>0)return;const t=this._getElementIndex(this._getEvOffset(e));this._selectElement(t,!1)}select(e){if(this.env.isMobile())return;if(e.button>0)return;const t=this._getElementIndex(this._getEvOffset(e));t<0||(this.env.model.getters.isReadonly()?this._selectElement(t,!1):this.state.waitingForMove?this.env.model.getters.isGridSelectionActive()?this.startMovement(e):this._selectElement(t,!1):("editing"===this.composerFocusStore.activeComposer.editionMode&&this.env.model.selection.getBackToDefault(),this.startSelection(e,t)))}startMovement(e){this.state.waitingForMove=!1,this.state.isMoving=!0;const t=this._getDimensionsInViewport(this._getSelectedZoneStart()),o=this._getDimensionsInViewport(this._getSelectedZoneEnd()),s=t.start;this.state.draggerLinePosition=s,this.state.base=this._getSelectedZoneStart(),this.state.draggerShadowPosition=s,this.state.draggerShadowThickness=o.end-t.start;this.dragNDropGrid.start(e,((e,o)=>{const s="COL"===this._getType()?e:o;if(s>=0){const e=this._getDimensionsInViewport(s);s<=this._getSelectedZoneStart()?(this.state.draggerLinePosition=e.start,this.state.draggerShadowPosition=e.start,this.state.base=s,this.state.position="before"):this._getSelectedZoneEnd()<s?(this.state.draggerLinePosition=e.end,this.state.draggerShadowPosition=e.end-this.state.draggerShadowThickness,this.state.base=s,this.state.position="after"):(this.state.draggerLinePosition=t.start,this.state.draggerShadowPosition=t.start,this.state.base=this._getSelectedZoneStart())}}),(()=>{this.state.isMoving=!1,this.state.base!==this._getSelectedZoneStart()&&this._moveElements(),this._computeGrabDisplay(e)}))}startSelection(e,t){if(this.env.isMobile())return;this.state.isSelecting=!0,e.shiftKey?this._increaseSelection(t):this._selectElement(t,xy(e)),this.lastSelectedElementIndex=t;this.dragNDropGrid.start(e,((e,t)=>{const o="COL"===this._getType()?e:t;o!==this.lastSelectedElementIndex&&-1!==o&&(this._increaseSelection(o),this.lastSelectedElementIndex=o)}),(()=>{this.state.isSelecting=!1,this.lastSelectedElementIndex=null,this._computeGrabDisplay(e)}))}onMouseUp(e){this.lastSelectedElementIndex=null}onContextMenu(e){e.preventDefault();const t=this._getElementIndex(this._getEvOffset(e));if(t<0)return;this._getActiveElements().has(t)||this._selectElement(t,!1);const o=this._getType();this.props.onOpenContextMenu(o,e.clientX,e.clientY)}}yh`
904
904
  .o-col-resizer {
905
905
  position: absolute;
906
906
  top: 0;
@@ -1825,7 +1825,7 @@
1825
1825
  border-right: ${3}px solid ${Pk};
1826
1826
  cursor: nwse-resize;
1827
1827
  }
1828
- `;class Mk extends t.Component{static template="o-spreadsheet-TableResizer";static props={table:Object};state=t.useState({highlightZone:void 0});dragNDropGrid=AP(this.env);setup(){hN(this)}get containerStyle(){const e=this.props.table.range.zone,t={...e,left:e.right,top:e.bottom},o=this.env.model.getters.getVisibleRect(t);return 0===o.height||0===o.width?xh({display:"none"}):xh({top:o.y+o.height-6+"px",left:o.x+o.width-6+"px"})}onMouseDown(e){const t=this.props.table.range.zone,o={col:t.left,row:t.top};document.body.style.cursor="nwse-resize";this.dragNDropGrid.start(e,((e,t,s)=>{this.state.highlightZone={left:o.col,top:o.row,right:Math.max(e,o.col),bottom:Math.max(t,o.row)}}),(()=>{document.body.style.cursor="";const e=this.state.highlightZone;if(!e)return;const t=this.props.table.range.sheetId;this.env.model.dispatch("RESIZE_TABLE",{sheetId:t,zone:this.props.table.range.zone,newTableRange:this.env.model.getters.getRangeDataFromZone(t,e)}),this.state.highlightZone=void 0}))}get highlights(){return this.state.highlightZone?[{range:this.env.model.getters.getRangeFromZone(this.props.table.range.sheetId,this.state.highlightZone),color:Pk,noFill:!0}]:[]}}const Nk={ROW:EP,COL:SP,CELL:aF,GROUP_HEADERS:IP,UNGROUP_HEADERS:xP};class kk extends t.Component{static template="o-spreadsheet-Grid";static props={exposeFocus:Function,getGridSize:Function};static components={GridComposer:kP,GridOverlay:XP,GridPopover:KP,HeadersOverlay:sM,MenuPopover:zx,Autofill:_P,ClientTag:FP,Highlight:hM,Popover:Lx,VerticalScrollBar:gM,HorizontalScrollBar:uM,TableResizer:Mk,Selection:pM};HEADER_HEIGHT=te;HEADER_WIDTH=oe;menuState;gridRef;highlightStore;cellPopovers;composerFocusStore;DOMFocusableElementStore;paintFormatStore;clientFocusStore;dragNDropGrid=AP(this.env);onMouseWheel;hoveredCell;sidePanel;setup(){this.highlightStore=lh(IE),this.menuState=t.useState({isOpen:!1,anchorRect:null,menuItems:[]}),this.gridRef=t.useRef("grid"),this.hoveredCell=lh(jx),this.composerFocusStore=lh(bh),this.DOMFocusableElementStore=lh(lE),this.sidePanel=lh(Fk),this.paintFormatStore=lh(qP),this.clientFocusStore=lh(TP),lh(RP),t.useChildSubEnv({getPopoverContainerRect:()=>this.getGridRect()}),t.useExternalListener(document.body,"cut",this.copy.bind(this,!0)),t.useExternalListener(document.body,"copy",this.copy.bind(this,!1)),t.useExternalListener(document.body,"paste",this.paste),t.onMounted((()=>this.focusDefaultElement())),this.props.exposeFocus((()=>this.focusDefaultElement())),nM("canvas",this.env.model,(()=>this.env.model.getters.getSheetViewDimensionWithHeaders())),this.onMouseWheel=aM(((e,t)=>{this.moveCanvas(e,t),this.hoveredCell.clear()})),this.cellPopovers=lh(Xx),t.useEffect(((e,t)=>{e||t||this.DOMFocusableElementStore.focus()}),(()=>[this.sidePanel.isMainPanelOpen,this.sidePanel.isSecondaryPanelOpen])),rM(this.gridRef,this.moveCanvas.bind(this),(()=>{const{scrollY:e}=this.env.model.getters.getActiveSheetScrollInfo();return e>0}),(()=>{const{maxOffsetY:e}=this.env.model.getters.getMaximumSheetOffset(),{scrollY:t}=this.env.model.getters.getActiveSheetScrollInfo();return t<e}))}get highlights(){return this.highlightStore.highlights}get gridOverlayDimensions(){return xh({top:"26px",left:"48px",height:"calc(100% - 41px)",width:"calc(100% - 63px)"})}onClosePopover(){this.cellPopovers.isOpen&&this.cellPopovers.close(),this.focusDefaultElement()}keyDownMapping={Enter:()=>{this.env.model.getters.getActiveCell().type===_s.empty?this.onComposerCellFocused():this.onComposerContentFocused()},Tab:()=>this.env.model.selection.moveAnchorCell("right",1),"Shift+Tab":()=>this.env.model.selection.moveAnchorCell("left",1),F2:()=>{this.env.model.getters.getActiveCell().type===_s.empty?this.onComposerCellFocused():this.onComposerContentFocused()},Delete:()=>{this.env.model.dispatch("DELETE_UNFILTERED_CONTENT",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()})},Backspace:()=>{this.env.model.dispatch("DELETE_UNFILTERED_CONTENT",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()})},Escape:()=>{this.cellPopovers.isOpen?this.cellPopovers.close():this.menuState.isOpen?this.closeMenu():this.paintFormatStore.isActive?this.paintFormatStore.cancel():this.env.model.dispatch("CLEAN_CLIPBOARD_HIGHLIGHT")},"Ctrl+A":()=>this.env.model.selection.loopSelection(),"Ctrl+Z":()=>this.env.model.dispatch("REQUEST_UNDO"),"Ctrl+Y":()=>this.env.model.dispatch("REQUEST_REDO"),F4:()=>this.env.model.dispatch("REQUEST_REDO"),"Ctrl+B":()=>this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{bold:!this.env.model.getters.getCurrentStyle().bold}}),"Ctrl+I":()=>this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{italic:!this.env.model.getters.getCurrentStyle().italic}}),"Ctrl+U":()=>this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{underline:!this.env.model.getters.getCurrentStyle().underline}}),"Ctrl+O":()=>UD(this.env),"Alt+=":()=>{const e=this.env.model.getters.getActiveSheetId(),t=this.env.model.getters.getSelectedZone(),{anchor:o}=this.env.model.getters.getSelection(),s=this.env.model.getters.getAutomaticSums(e,t,o.cell);if(this.env.model.getters.isSingleCellOrMerge(e,t)||this.env.model.getters.isEmpty(e,t)&&s.length<=1){const t=s[0]?.zone,o=t?this.env.model.getters.zoneToXC(e,s[0].zone):"",i=`=SUM(${o})`;this.onComposerCellFocused(i,{start:5,end:5+o.length})}else this.env.model.dispatch("SUM_SELECTION")},"Alt+Enter":()=>{const e=this.env.model.getters.getActiveCell();e.link&&Zo(e.link,this.env)},"Ctrl+Home":()=>{const e=this.env.model.getters.getActiveSheetId(),{col:t,row:o}=this.env.model.getters.getNextVisibleCellPosition({sheetId:e,col:0,row:0});this.env.model.selection.selectCell(t,o)},"Ctrl+End":()=>{const e=this.env.model.getters.getActiveSheetId(),t=this.env.model.getters.findVisibleHeader(e,"COL",this.env.model.getters.getNumberCols(e)-1,0),o=this.env.model.getters.findVisibleHeader(e,"ROW",this.env.model.getters.getNumberRows(e)-1,0);this.env.model.selection.selectCell(t,o)},"Shift+ ":()=>{const e=this.env.model.getters.getActiveSheetId(),t={...this.env.model.getters.getSelectedZone(),left:0,right:this.env.model.getters.getNumberCols(e)-1},o=this.env.model.getters.getActivePosition();this.env.model.selection.selectZone({cell:o,zone:t})},"Ctrl+ ":()=>{const e=this.env.model.getters.getActiveSheetId(),t={...this.env.model.getters.getSelectedZone(),top:0,bottom:this.env.model.getters.getNumberRows(e)-1},o=this.env.model.getters.getActivePosition();this.env.model.selection.selectZone({cell:o,zone:t})},"Ctrl+D":async()=>this.env.model.dispatch("COPY_PASTE_CELLS_ABOVE"),"Ctrl+R":async()=>this.env.model.dispatch("COPY_PASTE_CELLS_ON_LEFT"),"Ctrl+H":()=>this.sidePanel.open("FindAndReplace",{}),"Ctrl+F":()=>this.sidePanel.open("FindAndReplace",{}),"Ctrl+Shift+E":()=>this.setHorizontalAlign("center"),"Ctrl+Shift+L":()=>this.setHorizontalAlign("left"),"Ctrl+Shift+R":()=>this.setHorizontalAlign("right"),"Ctrl+Shift+V":()=>MD(this.env),"Ctrl+Shift+<":()=>this.clearFormatting(),"Ctrl+<":()=>this.clearFormatting(),"Ctrl+Shift+ ":()=>{this.env.model.selection.selectAll()},"Ctrl+Alt+=":()=>{const e=this.env.model.getters.getActiveCols(),t=this.env.model.getters.getActiveRows(),o=1===this.env.model.getters.getSelectedZones().length,s=e.size>0&&o,i=t.size>0&&o;s&&!i?LD(this.env):i&&!s&&VD(this.env)},"Ctrl+Alt+-":()=>{const e=[...this.env.model.getters.getActiveCols()],t=[...this.env.model.getters.getActiveRows()];e.length>0&&0===t.length?this.env.model.dispatch("REMOVE_COLUMNS_ROWS",{sheetId:this.env.model.getters.getActiveSheetId(),sheetName:this.env.model.getters.getActiveSheetName(),dimension:"COL",elements:e}):t.length>0&&0===e.length&&this.env.model.dispatch("REMOVE_COLUMNS_ROWS",{sheetId:this.env.model.getters.getActiveSheetId(),sheetName:this.env.model.getters.getActiveSheetName(),dimension:"ROW",elements:t})},"Shift+PageDown":()=>{this.env.model.dispatch("ACTIVATE_NEXT_SHEET")},"Shift+PageUp":()=>{this.env.model.dispatch("ACTIVATE_PREVIOUS_SHEET")},PageDown:()=>this.env.model.dispatch("SHIFT_VIEWPORT_DOWN"),PageUp:()=>this.env.model.dispatch("SHIFT_VIEWPORT_UP"),"Ctrl+K":()=>BD(this.env),"Alt+Shift+ArrowRight":()=>this.processHeaderGroupingKey("right"),"Alt+Shift+ArrowLeft":()=>this.processHeaderGroupingKey("left"),"Alt+Shift+ArrowUp":()=>this.processHeaderGroupingKey("up"),"Alt+Shift+ArrowDown":()=>this.processHeaderGroupingKey("down")};focusDefaultElement(){this.env.model.getters.getSelectedFigureId()||"inactive"!==this.composerFocusStore.activeComposer.editionMode||this.DOMFocusableElementStore.focus()}get gridEl(){if(!this.gridRef.el)throw new Error("Grid el is not defined.");return this.gridRef.el}getAutofillPosition(){const e=this.env.model.getters.getSelectedZone(),t=this.env.model.getters.getVisibleRect(e);return{left:t.x+t.width-4,top:t.y+t.height-4}}get isAutofillVisible(){const e=this.env.model.getters.getSelectedZone(),t=this.env.model.getters.getVisibleRect({left:e.right,right:e.right,top:e.bottom,bottom:e.bottom});return!(0===t.width||0===t.height)}onGridResized({height:e,width:t}){this.env.model.dispatch("RESIZE_SHEETVIEW",{width:t-oe,height:e-te,gridOffsetX:oe,gridOffsetY:te})}moveCanvas(e,t){const{scrollX:o,scrollY:s}=this.env.model.getters.getActiveSheetScrollInfo();this.env.model.dispatch("SET_VIEWPORT_OFFSET",{offsetX:o+e,offsetY:s+t})}processSpaceKey(e){this.env.model.getters.hasBooleanValidationInZones(this.env.model.getters.getSelectedZones())&&(e.preventDefault(),e.stopPropagation(),this.env.model.dispatch("TOGGLE_CHECKBOX",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()}))}getClientPositionKey(e){return`${e.id}-${e.position?.sheetId}-${e.position?.col}-${e.position?.row}`}isCellHovered(e,t){return this.hoveredCell.col===e&&this.hoveredCell.row===t}get focusedClients(){return this.clientFocusStore.focusedClients}getGridRect(){return{...fy(this.gridRef),...this.env.model.getters.getSheetViewDimensionWithHeaders()}}onCellClicked(e,t,o,s){if(s.preventDefault(),"editing"===this.composerFocusStore.activeComposer.editionMode&&this.composerFocusStore.activeComposer.stopEdition(),o.expandZone?this.env.model.selection.setAnchorCorner(e,t):o.addZone?this.env.model.selection.addCellToSelection(e,t):this.env.model.selection.selectCell(e,t),this.env.isMobile())return;let i=e,n=t;this.dragNDropGrid.start(s,((e,t,o)=>{o.preventDefault(),(e!==i&&-1!==e||t!==n&&-1!==t)&&(i=-1===e?i:e,n=-1===t?n:t,this.env.model.selection.setAnchorCorner(i,n))}),(()=>{this.paintFormatStore.isActive&&this.paintFormatStore.pasteFormat(this.env.model.getters.getSelectedZones())}))}onCellDoubleClicked(e,t){const o=this.env.model.getters.getActiveSheetId();({col:e,row:t}=this.env.model.getters.getMainCellPosition({sheetId:o,col:e,row:t}));this.env.model.getters.getEvaluatedCell({sheetId:o,col:e,row:t}).type===_s.empty?this.onComposerCellFocused():this.onComposerContentFocused()}processArrows(e){e.preventDefault(),e.stopPropagation(),this.cellPopovers.isOpen&&this.cellPopovers.close(),hE(e,this.env.model.selection),this.paintFormatStore.isActive&&this.paintFormatStore.pasteFormat(this.env.model.getters.getSelectedZones())}onKeydown(e){const t=wy(e),o=this.keyDownMapping[t];if(o)return e.preventDefault(),e.stopPropagation(),void o();" "!==t?e.key.startsWith("Arrow")&&this.processArrows(e):this.processSpaceKey(e)}onInputContextMenu(e){e.preventDefault();const t=this.env.model.getters.getSelectedZone(),{left:o,top:s}=t;let i="CELL";this.composerFocusStore.activeComposer.stopEdition(),this.env.model.getters.getActiveCols().has(o)?i="COL":this.env.model.getters.getActiveRows().has(s)&&(i="ROW");const{x:n,y:r,width:a}=this.env.model.getters.getVisibleRect(t),l=this.getGridRect();this.toggleContextMenu(i,l.x+n+a,l.y+r)}onCellRightClicked(e,t,{x:o,y:s}){const i=this.env.model.getters.getSelectedZones();let n="CELL";Er(e,t,i[i.length-1])?this.env.model.getters.getActiveCols().has(e)?n="COL":this.env.model.getters.getActiveRows().has(t)&&(n="ROW"):(this.env.model.selection.getBackToDefault(),this.env.model.selection.selectCell(e,t)),this.toggleContextMenu(n,o,s)}toggleContextMenu(e,t,o){this.cellPopovers.isOpen&&this.cellPopovers.close(),this.menuState.isOpen=!0,this.menuState.anchorRect={x:t,y:o,width:0,height:0},this.menuState.menuItems=Nk[e].getMenuItems()}async copy(e,t){if(!this.gridEl.contains(document.activeElement))return;if("inactive"!==this.composerFocusStore.activeComposer.editionMode)return;e?M_(this.env):this.env.model.dispatch("COPY");const o=await this.env.model.getters.getClipboardTextAndImageContent();await this.env.clipboard.write(o),t.preventDefault()}async paste(e){if(!this.gridEl.contains(document.activeElement))return;e.preventDefault();const t=e.clipboardData;if(!t)return;const o=[...t.files]?.find((e=>Ja.includes(e.type))),s={content:{[Os.PlainText]:t?.getData(Os.PlainText),[Os.Html]:t?.getData(Os.Html)}};o&&(s.content[o.type]=o);const i=this.env.model.getters.getSelectedZones(),n=this.env.model.getters.isCutOperation(),r=this.env.model.getters.getClipboardId(),a=tl(s.content),l=a.data?.clipboardId;r===l?DD(this.env,i):await _D(this.env,i,a),n&&await this.env.clipboard.write({[Os.PlainText]:""})}clearFormatting(){this.env.model.dispatch("CLEAR_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()})}setHorizontalAlign(e){this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{align:e}})}closeMenu(){this.menuState.isOpen=!1,this.focusDefaultElement()}processHeaderGroupingKey(e){if(1!==this.env.model.getters.getSelectedZones().length)return;const t=this.env.model.getters.getActiveRows().size>0,o=this.env.model.getters.getActiveCols().size>0;o&&t?this.processHeaderGroupingEventOnWholeSheet(e):o?this.processHeaderGroupingEventOnHeaders(e,"COL"):t?this.processHeaderGroupingEventOnHeaders(e,"ROW"):this.processHeaderGroupingEventOnGrid(e)}processHeaderGroupingEventOnHeaders(e,t){const o=this.env.model.getters.getActiveSheetId(),s=this.env.model.getters.getSelectedZone(),i="COL"===t?s.left:s.top,n="COL"===t?s.right:s.bottom;switch(e){case"right":this.env.model.dispatch("GROUP_HEADERS",{sheetId:o,dimension:t,start:i,end:n});break;case"left":this.env.model.dispatch("UNGROUP_HEADERS",{sheetId:o,dimension:t,start:i,end:n});break;case"down":this.env.model.dispatch("UNFOLD_HEADER_GROUPS_IN_ZONE",{sheetId:o,dimension:t,zone:s});break;case"up":this.env.model.dispatch("FOLD_HEADER_GROUPS_IN_ZONE",{sheetId:o,dimension:t,zone:s})}}processHeaderGroupingEventOnWholeSheet(e){const t=this.env.model.getters.getActiveSheetId();"up"===e?(this.env.model.dispatch("FOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"ROW"}),this.env.model.dispatch("FOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"COL"})):"down"===e&&(this.env.model.dispatch("UNFOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"ROW"}),this.env.model.dispatch("UNFOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"COL"}))}processHeaderGroupingEventOnGrid(e){const t=this.env.model.getters.getActiveSheetId(),o=this.env.model.getters.getSelectedZone();switch(e){case"down":this.env.model.dispatch("UNFOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"ROW",zone:o}),this.env.model.dispatch("UNFOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"COL",zone:o});break;case"up":this.env.model.dispatch("FOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"ROW",zone:o}),this.env.model.dispatch("FOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"COL",zone:o});break;case"right":{const{x:e,y:t,width:s}=this.env.model.getters.getVisibleRect(o),i=this.getGridRect();this.toggleContextMenu("GROUP_HEADERS",e+s+i.x,t+i.y);break}case"left":{if(!I_(this.env,"COL")&&!I_(this.env,"ROW"))return;const{x:e,y:t,width:s}=this.env.model.getters.getVisibleRect(o),i=this.getGridRect();this.toggleContextMenu("UNGROUP_HEADERS",e+s+i.x,t+i.y);break}}}onComposerCellFocused(e,t){this.composerFocusStore.focusActiveComposer({content:e,selection:t,focusMode:"cellFocus"})}onComposerContentFocused(){this.composerFocusStore.focusActiveComposer({focusMode:"contentFocus"})}get staticTables(){const e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getCoreTables(e).filter(T_)}get displaySelectionHandler(){return this.env.isMobile()&&"inactive"===this.composerFocusStore.activeComposer.editionMode}}const Vk=new n;Vk.add("SPREADSHEET",!1);class Lk extends t.Component{static template="o-spreadsheet-FullScreenChart";static props={};static components={ChartDashboardMenu:$x};fullScreenChartStore;ref=t.useRef("fullScreenChart");spreadsheetRect=Vx();figureRegistry=qx;setup(){this.fullScreenChartStore=lh(Px);const e=lh(Dh);let o;t.onWillUpdateProps((()=>{o!==this.figureUI?.id&&e.enableAnimationForChart(this.figureUI?.id+"-fullscreen"),o=this.figureUI?.id})),t.useEffect((e=>e?.focus()),(()=>[this.ref.el]))}get figureUI(){return this.fullScreenChartStore.fullScreenFigure}exitFullScreen(){this.figureUI&&this.fullScreenChartStore.toggleFullScreenChart(this.figureUI.id)}onKeyDown(e){"Escape"===e.key&&this.exitFullScreen()}get chartComponent(){if(!this.figureUI)return;const e=this.env.model.getters.getChartType(this.figureUI.id),t=rx.get(e);if(!t)throw new Error(`Component is not defined for type ${e}`);return t}}yh`
1828
+ `;class Mk extends t.Component{static template="o-spreadsheet-TableResizer";static props={table:Object};state=t.useState({highlightZone:void 0});dragNDropGrid=AP(this.env);setup(){hN(this)}get containerStyle(){const e=this.props.table.range.zone,t={...e,left:e.right,top:e.bottom},o=this.env.model.getters.getVisibleRect(t);return 0===o.height||0===o.width?xh({display:"none"}):xh({top:o.y+o.height-6+"px",left:o.x+o.width-6+"px"})}onMouseDown(e){const t=this.props.table.range.zone,o={col:t.left,row:t.top};document.body.style.cursor="nwse-resize";this.dragNDropGrid.start(e,((e,t,s)=>{this.state.highlightZone={left:o.col,top:o.row,right:Math.max(e,o.col),bottom:Math.max(t,o.row)}}),(()=>{document.body.style.cursor="";const e=this.state.highlightZone;if(!e)return;const t=this.props.table.range.sheetId;this.env.model.dispatch("RESIZE_TABLE",{sheetId:t,zone:this.props.table.range.zone,newTableRange:this.env.model.getters.getRangeDataFromZone(t,e)}),this.state.highlightZone=void 0}))}get highlights(){return this.state.highlightZone?[{range:this.env.model.getters.getRangeFromZone(this.props.table.range.sheetId,this.state.highlightZone),color:Pk,noFill:!0}]:[]}}const Nk={ROW:EP,COL:SP,CELL:aF,GROUP_HEADERS:IP,UNGROUP_HEADERS:xP};class kk extends t.Component{static template="o-spreadsheet-Grid";static props={exposeFocus:Function,getGridSize:Function};static components={GridComposer:kP,GridOverlay:XP,GridPopover:KP,HeadersOverlay:sM,MenuPopover:zx,Autofill:_P,ClientTag:FP,Highlight:hM,Popover:Lx,VerticalScrollBar:gM,HorizontalScrollBar:uM,TableResizer:Mk,Selection:pM};HEADER_HEIGHT=te;HEADER_WIDTH=oe;menuState;gridRef;highlightStore;cellPopovers;composerFocusStore;DOMFocusableElementStore;paintFormatStore;clientFocusStore;dragNDropGrid=AP(this.env);onMouseWheel;hoveredCell;sidePanel;setup(){this.highlightStore=lh(IE),this.menuState=t.useState({isOpen:!1,anchorRect:null,menuItems:[]}),this.gridRef=t.useRef("grid"),this.hoveredCell=lh(jx),this.composerFocusStore=lh(bh),this.DOMFocusableElementStore=lh(lE),this.sidePanel=lh(Fk),this.paintFormatStore=lh(qP),this.clientFocusStore=lh(TP),lh(RP),t.useChildSubEnv({getPopoverContainerRect:()=>this.getGridRect()}),t.useExternalListener(document.body,"cut",this.copy.bind(this,!0)),t.useExternalListener(document.body,"copy",this.copy.bind(this,!1)),t.useExternalListener(document.body,"paste",this.paste),t.onMounted((()=>this.focusDefaultElement())),this.props.exposeFocus((()=>this.focusDefaultElement())),nM("canvas",this.env.model,(()=>this.env.model.getters.getSheetViewDimensionWithHeaders())),this.onMouseWheel=aM(((e,t)=>{this.moveCanvas(e,t),this.hoveredCell.clear()})),this.cellPopovers=lh(Xx),t.useEffect(((e,t)=>{e||t||this.DOMFocusableElementStore.focus()}),(()=>[this.sidePanel.isMainPanelOpen,this.sidePanel.isSecondaryPanelOpen])),rM(this.gridRef,this.moveCanvas.bind(this),(()=>{const{scrollY:e}=this.env.model.getters.getActiveSheetScrollInfo();return e>0}),(()=>{const{maxOffsetY:e}=this.env.model.getters.getMaximumSheetOffset(),{scrollY:t}=this.env.model.getters.getActiveSheetScrollInfo();return t<e}))}get highlights(){return this.highlightStore.highlights}get gridOverlayDimensions(){return xh({top:"26px",left:"48px",height:"calc(100% - 41px)",width:"calc(100% - 63px)"})}onClosePopover(){this.cellPopovers.isOpen&&this.cellPopovers.close(),this.focusDefaultElement()}keyDownMapping={Enter:()=>{this.env.model.getters.getActiveCell().type===_s.empty?this.onComposerCellFocused():this.onComposerContentFocused()},Tab:()=>this.env.model.selection.moveAnchorCell("right",1),"Shift+Tab":()=>this.env.model.selection.moveAnchorCell("left",1),F2:()=>{this.env.model.getters.getActiveCell().type===_s.empty?this.onComposerCellFocused():this.onComposerContentFocused()},Delete:()=>{this.env.model.dispatch("DELETE_UNFILTERED_CONTENT",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()})},Backspace:()=>{this.env.model.dispatch("DELETE_UNFILTERED_CONTENT",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()})},Escape:()=>{this.cellPopovers.isOpen?this.cellPopovers.close():this.menuState.isOpen?this.closeMenu():this.paintFormatStore.isActive?this.paintFormatStore.cancel():this.env.model.dispatch("CLEAN_CLIPBOARD_HIGHLIGHT")},"Ctrl+A":()=>this.env.model.selection.loopSelection(),"Ctrl+Z":()=>this.env.model.dispatch("REQUEST_UNDO"),"Ctrl+Y":()=>this.env.model.dispatch("REQUEST_REDO"),F4:()=>this.env.model.dispatch("REQUEST_REDO"),"Ctrl+B":()=>this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{bold:!this.env.model.getters.getCurrentStyle().bold}}),"Ctrl+I":()=>this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{italic:!this.env.model.getters.getCurrentStyle().italic}}),"Ctrl+U":()=>this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{underline:!this.env.model.getters.getCurrentStyle().underline}}),"Ctrl+O":()=>UD(this.env),"Alt+=":()=>{const e=this.env.model.getters.getActiveSheetId(),t=this.env.model.getters.getSelectedZone(),{anchor:o}=this.env.model.getters.getSelection(),s=this.env.model.getters.getAutomaticSums(e,t,o.cell);if(this.env.model.getters.isSingleCellOrMerge(e,t)||this.env.model.getters.isEmpty(e,t)&&s.length<=1){const t=s[0]?.zone,o=t?this.env.model.getters.zoneToXC(e,s[0].zone):"",i=`=SUM(${o})`;this.onComposerCellFocused(i,{start:5,end:5+o.length})}else this.env.model.dispatch("SUM_SELECTION")},"Alt+Enter":()=>{const e=this.env.model.getters.getActiveCell();e.link&&Zo(e.link,this.env)},"Ctrl+Home":()=>{const e=this.env.model.getters.getActiveSheetId(),{col:t,row:o}=this.env.model.getters.getNextVisibleCellPosition({sheetId:e,col:0,row:0});this.env.model.selection.selectCell(t,o)},"Ctrl+End":()=>{const e=this.env.model.getters.getActiveSheetId(),t=this.env.model.getters.findVisibleHeader(e,"COL",this.env.model.getters.getNumberCols(e)-1,0),o=this.env.model.getters.findVisibleHeader(e,"ROW",this.env.model.getters.getNumberRows(e)-1,0);this.env.model.selection.selectCell(t,o)},"Shift+ ":()=>{const e=this.env.model.getters.getActiveSheetId(),t={...this.env.model.getters.getSelectedZone(),left:0,right:this.env.model.getters.getNumberCols(e)-1},o=this.env.model.getters.getActivePosition();this.env.model.selection.selectZone({cell:o,zone:t})},"Ctrl+ ":()=>{const e=this.env.model.getters.getActiveSheetId(),t={...this.env.model.getters.getSelectedZone(),top:0,bottom:this.env.model.getters.getNumberRows(e)-1},o=this.env.model.getters.getActivePosition();this.env.model.selection.selectZone({cell:o,zone:t})},"Ctrl+D":async()=>this.env.model.dispatch("COPY_PASTE_CELLS_ABOVE"),"Ctrl+R":async()=>this.env.model.dispatch("COPY_PASTE_CELLS_ON_LEFT"),"Ctrl+H":()=>this.sidePanel.open("FindAndReplace",{}),"Ctrl+F":()=>this.sidePanel.open("FindAndReplace",{}),"Ctrl+Shift+E":()=>this.setHorizontalAlign("center"),"Ctrl+Shift+L":()=>this.setHorizontalAlign("left"),"Ctrl+Shift+R":()=>this.setHorizontalAlign("right"),"Ctrl+Shift+V":()=>MD(this.env),"Ctrl+Shift+<":()=>this.clearFormatting(),"Ctrl+<":()=>this.clearFormatting(),"Ctrl+Shift+ ":()=>{this.env.model.selection.selectAll()},"Ctrl+Alt+=":()=>{const e=this.env.model.getters.getActiveCols(),t=this.env.model.getters.getActiveRows(),o=1===this.env.model.getters.getSelectedZones().length,s=e.size>0&&o,i=t.size>0&&o;s&&!i?LD(this.env):i&&!s&&VD(this.env)},"Ctrl+Alt+-":()=>{const e=[...this.env.model.getters.getActiveCols()],t=[...this.env.model.getters.getActiveRows()];e.length>0&&0===t.length?this.env.model.dispatch("REMOVE_COLUMNS_ROWS",{sheetId:this.env.model.getters.getActiveSheetId(),sheetName:this.env.model.getters.getActiveSheetName(),dimension:"COL",elements:e}):t.length>0&&0===e.length&&this.env.model.dispatch("REMOVE_COLUMNS_ROWS",{sheetId:this.env.model.getters.getActiveSheetId(),sheetName:this.env.model.getters.getActiveSheetName(),dimension:"ROW",elements:t})},"Shift+PageDown":()=>{this.env.model.dispatch("ACTIVATE_NEXT_SHEET")},"Shift+PageUp":()=>{this.env.model.dispatch("ACTIVATE_PREVIOUS_SHEET")},PageDown:()=>this.env.model.dispatch("SHIFT_VIEWPORT_DOWN"),PageUp:()=>this.env.model.dispatch("SHIFT_VIEWPORT_UP"),"Ctrl+K":()=>BD(this.env),"Alt+Shift+ArrowRight":()=>this.processHeaderGroupingKey("right"),"Alt+Shift+ArrowLeft":()=>this.processHeaderGroupingKey("left"),"Alt+Shift+ArrowUp":()=>this.processHeaderGroupingKey("up"),"Alt+Shift+ArrowDown":()=>this.processHeaderGroupingKey("down")};focusDefaultElement(){this.env.model.getters.getSelectedFigureId()||"inactive"!==this.composerFocusStore.activeComposer.editionMode||this.DOMFocusableElementStore.focus()}get gridEl(){if(!this.gridRef.el)throw new Error("Grid el is not defined.");return this.gridRef.el}getAutofillPosition(){const e=this.env.model.getters.getSelectedZone(),t=this.env.model.getters.getVisibleRect(e);return{left:t.x+t.width-4,top:t.y+t.height-4}}get isAutofillVisible(){const e=this.env.model.getters.getSelectedZone(),t=this.env.model.getters.getVisibleRect({left:e.right,right:e.right,top:e.bottom,bottom:e.bottom});return!(0===t.width||0===t.height)}onGridResized(){const{height:e,width:t}=this.props.getGridSize();this.env.model.dispatch("RESIZE_SHEETVIEW",{width:t-oe,height:e-te,gridOffsetX:oe,gridOffsetY:te})}moveCanvas(e,t){const{scrollX:o,scrollY:s}=this.env.model.getters.getActiveSheetScrollInfo();this.env.model.dispatch("SET_VIEWPORT_OFFSET",{offsetX:o+e,offsetY:s+t})}processSpaceKey(e){this.env.model.getters.hasBooleanValidationInZones(this.env.model.getters.getSelectedZones())&&(e.preventDefault(),e.stopPropagation(),this.env.model.dispatch("TOGGLE_CHECKBOX",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()}))}getClientPositionKey(e){return`${e.id}-${e.position?.sheetId}-${e.position?.col}-${e.position?.row}`}isCellHovered(e,t){return this.hoveredCell.col===e&&this.hoveredCell.row===t}get focusedClients(){return this.clientFocusStore.focusedClients}getGridRect(){return{...fy(this.gridRef),...this.env.model.getters.getSheetViewDimensionWithHeaders()}}onCellClicked(e,t,o,s){if(s.preventDefault(),"editing"===this.composerFocusStore.activeComposer.editionMode&&this.composerFocusStore.activeComposer.stopEdition(),o.expandZone?this.env.model.selection.setAnchorCorner(e,t):o.addZone?this.env.model.selection.addCellToSelection(e,t):this.env.model.selection.selectCell(e,t),this.env.isMobile())return;let i=e,n=t;this.dragNDropGrid.start(s,((e,t,o)=>{o.preventDefault(),(e!==i&&-1!==e||t!==n&&-1!==t)&&(i=-1===e?i:e,n=-1===t?n:t,this.env.model.selection.setAnchorCorner(i,n))}),(()=>{this.paintFormatStore.isActive&&this.paintFormatStore.pasteFormat(this.env.model.getters.getSelectedZones())}))}onCellDoubleClicked(e,t){const o=this.env.model.getters.getActiveSheetId();({col:e,row:t}=this.env.model.getters.getMainCellPosition({sheetId:o,col:e,row:t}));this.env.model.getters.getEvaluatedCell({sheetId:o,col:e,row:t}).type===_s.empty?this.onComposerCellFocused():this.onComposerContentFocused()}processArrows(e){e.preventDefault(),e.stopPropagation(),this.cellPopovers.isOpen&&this.cellPopovers.close(),hE(e,this.env.model.selection),this.paintFormatStore.isActive&&this.paintFormatStore.pasteFormat(this.env.model.getters.getSelectedZones())}onKeydown(e){const t=wy(e),o=this.keyDownMapping[t];if(o)return e.preventDefault(),e.stopPropagation(),void o();" "!==t?e.key.startsWith("Arrow")&&this.processArrows(e):this.processSpaceKey(e)}onInputContextMenu(e){e.preventDefault();const t=this.env.model.getters.getSelectedZone(),{left:o,top:s}=t;let i="CELL";this.composerFocusStore.activeComposer.stopEdition(),this.env.model.getters.getActiveCols().has(o)?i="COL":this.env.model.getters.getActiveRows().has(s)&&(i="ROW");const{x:n,y:r,width:a}=this.env.model.getters.getVisibleRect(t),l=this.getGridRect();this.toggleContextMenu(i,l.x+n+a,l.y+r)}onCellRightClicked(e,t,{x:o,y:s}){const i=this.env.model.getters.getSelectedZones();let n="CELL";Er(e,t,i[i.length-1])?this.env.model.getters.getActiveCols().has(e)?n="COL":this.env.model.getters.getActiveRows().has(t)&&(n="ROW"):(this.env.model.selection.getBackToDefault(),this.env.model.selection.selectCell(e,t)),this.toggleContextMenu(n,o,s)}toggleContextMenu(e,t,o){this.cellPopovers.isOpen&&this.cellPopovers.close(),this.menuState.isOpen=!0,this.menuState.anchorRect={x:t,y:o,width:0,height:0},this.menuState.menuItems=Nk[e].getMenuItems()}async copy(e,t){if(!this.gridEl.contains(document.activeElement))return;if("inactive"!==this.composerFocusStore.activeComposer.editionMode)return;e?M_(this.env):this.env.model.dispatch("COPY");const o=await this.env.model.getters.getClipboardTextAndImageContent();await this.env.clipboard.write(o),t.preventDefault()}async paste(e){if(!this.gridEl.contains(document.activeElement))return;e.preventDefault();const t=e.clipboardData;if(!t)return;const o=[...t.files]?.find((e=>Ja.includes(e.type))),s={content:{[Os.PlainText]:t?.getData(Os.PlainText),[Os.Html]:t?.getData(Os.Html)}};o&&(s.content[o.type]=o);const i=this.env.model.getters.getSelectedZones(),n=this.env.model.getters.isCutOperation(),r=this.env.model.getters.getClipboardId(),a=tl(s.content),l=a.data?.clipboardId;r===l?DD(this.env,i):await _D(this.env,i,a),n&&await this.env.clipboard.write({[Os.PlainText]:""})}clearFormatting(){this.env.model.dispatch("CLEAR_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones()})}setHorizontalAlign(e){this.env.model.dispatch("SET_FORMATTING",{sheetId:this.env.model.getters.getActiveSheetId(),target:this.env.model.getters.getSelectedZones(),style:{align:e}})}closeMenu(){this.menuState.isOpen=!1,this.focusDefaultElement()}processHeaderGroupingKey(e){if(1!==this.env.model.getters.getSelectedZones().length)return;const t=this.env.model.getters.getActiveRows().size>0,o=this.env.model.getters.getActiveCols().size>0;o&&t?this.processHeaderGroupingEventOnWholeSheet(e):o?this.processHeaderGroupingEventOnHeaders(e,"COL"):t?this.processHeaderGroupingEventOnHeaders(e,"ROW"):this.processHeaderGroupingEventOnGrid(e)}processHeaderGroupingEventOnHeaders(e,t){const o=this.env.model.getters.getActiveSheetId(),s=this.env.model.getters.getSelectedZone(),i="COL"===t?s.left:s.top,n="COL"===t?s.right:s.bottom;switch(e){case"right":this.env.model.dispatch("GROUP_HEADERS",{sheetId:o,dimension:t,start:i,end:n});break;case"left":this.env.model.dispatch("UNGROUP_HEADERS",{sheetId:o,dimension:t,start:i,end:n});break;case"down":this.env.model.dispatch("UNFOLD_HEADER_GROUPS_IN_ZONE",{sheetId:o,dimension:t,zone:s});break;case"up":this.env.model.dispatch("FOLD_HEADER_GROUPS_IN_ZONE",{sheetId:o,dimension:t,zone:s})}}processHeaderGroupingEventOnWholeSheet(e){const t=this.env.model.getters.getActiveSheetId();"up"===e?(this.env.model.dispatch("FOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"ROW"}),this.env.model.dispatch("FOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"COL"})):"down"===e&&(this.env.model.dispatch("UNFOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"ROW"}),this.env.model.dispatch("UNFOLD_ALL_HEADER_GROUPS",{sheetId:t,dimension:"COL"}))}processHeaderGroupingEventOnGrid(e){const t=this.env.model.getters.getActiveSheetId(),o=this.env.model.getters.getSelectedZone();switch(e){case"down":this.env.model.dispatch("UNFOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"ROW",zone:o}),this.env.model.dispatch("UNFOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"COL",zone:o});break;case"up":this.env.model.dispatch("FOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"ROW",zone:o}),this.env.model.dispatch("FOLD_HEADER_GROUPS_IN_ZONE",{sheetId:t,dimension:"COL",zone:o});break;case"right":{const{x:e,y:t,width:s}=this.env.model.getters.getVisibleRect(o),i=this.getGridRect();this.toggleContextMenu("GROUP_HEADERS",e+s+i.x,t+i.y);break}case"left":{if(!I_(this.env,"COL")&&!I_(this.env,"ROW"))return;const{x:e,y:t,width:s}=this.env.model.getters.getVisibleRect(o),i=this.getGridRect();this.toggleContextMenu("UNGROUP_HEADERS",e+s+i.x,t+i.y);break}}}onComposerCellFocused(e,t){this.composerFocusStore.focusActiveComposer({content:e,selection:t,focusMode:"cellFocus"})}onComposerContentFocused(){this.composerFocusStore.focusActiveComposer({focusMode:"contentFocus"})}get staticTables(){const e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getCoreTables(e).filter(T_)}get displaySelectionHandler(){return this.env.isMobile()&&"inactive"===this.composerFocusStore.activeComposer.editionMode}}const Vk=new n;Vk.add("SPREADSHEET",!1);class Lk extends t.Component{static template="o-spreadsheet-FullScreenChart";static props={};static components={ChartDashboardMenu:$x};fullScreenChartStore;ref=t.useRef("fullScreenChart");spreadsheetRect=Vx();figureRegistry=qx;setup(){this.fullScreenChartStore=lh(Px);const e=lh(Dh);let o;t.onWillUpdateProps((()=>{o!==this.figureUI?.id&&e.enableAnimationForChart(this.figureUI?.id+"-fullscreen"),o=this.figureUI?.id})),t.useEffect((e=>e?.focus()),(()=>[this.ref.el]))}get figureUI(){return this.fullScreenChartStore.fullScreenFigure}exitFullScreen(){this.figureUI&&this.fullScreenChartStore.toggleFullScreenChart(this.figureUI.id)}onKeyDown(e){"Escape"===e.key&&this.exitFullScreen()}get chartComponent(){if(!this.figureUI)return;const e=this.env.model.getters.getChartType(this.figureUI.id),t=rx.get(e);if(!t)throw new Error(`Component is not defined for type ${e}`);return t}}yh`
1829
1829
  .o_pivot_html_renderer {
1830
1830
  width: 100%;
1831
1831
  border-collapse: collapse;
@@ -2002,7 +2002,7 @@
2002
2002
  position: absolute;
2003
2003
  cursor: pointer;
2004
2004
  }
2005
- `;class JL extends t.Component{static template="o-spreadsheet-SpreadsheetDashboard";static props={getGridSize:Function};static components={GridOverlay:XP,GridPopover:KP,Popover:Lx,VerticalScrollBar:gM,HorizontalScrollBar:uM};cellPopovers;onMouseWheel;canvasPosition;hoveredCell;clickableCellsStore;gridRef;setup(){this.gridRef=t.useRef("grid"),this.hoveredCell=lh(jx),this.clickableCellsStore=lh(KL),t.useChildSubEnv({getPopoverContainerRect:()=>this.getGridRect()}),nM("canvas",this.env.model,(()=>this.env.model.getters.getSheetViewDimension())),this.onMouseWheel=aM(((e,t)=>{this.moveCanvas(e,t),this.hoveredCell.clear()})),this.cellPopovers=lh(Xx),rM(this.gridRef,this.moveCanvas.bind(this),(()=>{const{scrollY:e}=this.env.model.getters.getActiveSheetScrollInfo();return e>0}),(()=>{const{maxOffsetY:e}=this.env.model.getters.getMaximumSheetOffset(),{scrollY:t}=this.env.model.getters.getActiveSheetScrollInfo();return t<e}))}get gridContainer(){const e=this.env.model.getters.getActiveSheetId(),{right:t}=this.env.model.getters.getSheetZone(e),{end:o}=this.env.model.getters.getColDimensions(e,t);return xh({"max-width":`${o}px`})}get gridOverlayDimensions(){return xh({height:"100%",width:"100%"})}getCellClickableStyle(e){return xh({top:`${e.y}px`,left:`${e.x}px`,width:`${e.width}px`,height:`${e.height}px`})}getClickableCells(){return t.toRaw(this.clickableCellsStore.clickableCells)}selectClickableCell(e,t){const{position:o,action:s}=t;s(o,this.env,Ey(e))}onClosePopover(){this.cellPopovers.close()}onGridResized({height:e,width:t}){this.env.model.dispatch("RESIZE_SHEETVIEW",{width:t,height:e,gridOffsetX:0,gridOffsetY:0})}moveCanvas(e,t){const{scrollX:o,scrollY:s}=this.env.model.getters.getActiveSheetScrollInfo();this.env.model.dispatch("SET_VIEWPORT_OFFSET",{offsetX:o+e,offsetY:s+t})}getGridRect(){return{...fy(this.gridRef),...this.env.model.getters.getSheetViewDimensionWithHeaders()}}}yh`
2005
+ `;class JL extends t.Component{static template="o-spreadsheet-SpreadsheetDashboard";static props={getGridSize:Function};static components={GridOverlay:XP,GridPopover:KP,Popover:Lx,VerticalScrollBar:gM,HorizontalScrollBar:uM};cellPopovers;onMouseWheel;canvasPosition;hoveredCell;clickableCellsStore;gridRef;setup(){this.gridRef=t.useRef("grid"),this.hoveredCell=lh(jx),this.clickableCellsStore=lh(KL),t.useChildSubEnv({getPopoverContainerRect:()=>this.getGridRect()}),nM("canvas",this.env.model,(()=>this.env.model.getters.getSheetViewDimension())),this.onMouseWheel=aM(((e,t)=>{this.moveCanvas(e,t),this.hoveredCell.clear()})),this.cellPopovers=lh(Xx),rM(this.gridRef,this.moveCanvas.bind(this),(()=>{const{scrollY:e}=this.env.model.getters.getActiveSheetScrollInfo();return e>0}),(()=>{const{maxOffsetY:e}=this.env.model.getters.getMaximumSheetOffset(),{scrollY:t}=this.env.model.getters.getActiveSheetScrollInfo();return t<e}))}get gridContainer(){return xh({"max-width":`${this.getMaxSheetWidth()}px`})}get gridOverlayDimensions(){return xh({height:"100%",width:"100%"})}getCellClickableStyle(e){return xh({top:`${e.y}px`,left:`${e.x}px`,width:`${e.width}px`,height:`${e.height}px`})}getClickableCells(){return t.toRaw(this.clickableCellsStore.clickableCells)}selectClickableCell(e,t){const{position:o,action:s}=t;s(o,this.env,Ey(e))}onClosePopover(){this.cellPopovers.close()}onGridResized(){const{height:e,width:t}=this.props.getGridSize(),o=this.getMaxSheetWidth();this.env.model.dispatch("RESIZE_SHEETVIEW",{width:Math.min(o,t),height:e,gridOffsetX:0,gridOffsetY:0})}moveCanvas(e,t){const{scrollX:o,scrollY:s}=this.env.model.getters.getActiveSheetScrollInfo();this.env.model.dispatch("SET_VIEWPORT_OFFSET",{offsetX:o+e,offsetY:s+t})}getGridRect(){return{...fy(this.gridRef),...this.env.model.getters.getSheetViewDimensionWithHeaders()}}getMaxSheetWidth(){const e=this.env.model.getters.getActiveSheetId(),{right:t}=this.env.model.getters.getSheetZone(e);return this.env.model.getters.getColDimensions(e,t).end}}yh`
2006
2006
  .o-header-group {
2007
2007
  .o-header-group-header {
2008
2008
  z-index: ${Fe.HeaderGroupingButton};
@@ -2563,7 +2563,7 @@
2563
2563
  .o-spreadsheet-bottombar-wrapper {
2564
2564
  z-index: ${Fe.ScrollBar+1};
2565
2565
  }
2566
- `;class wH extends t.Component{static template="o-spreadsheet-Spreadsheet";static props={model:Object,notifyUser:{type:Function,optional:!0},raiseError:{type:Function,optional:!0},askConfirmation:{type:Function,optional:!0}};static components={TopBar:CH,Grid:kk,BottomBar:XL,SmallBottomBar:rH,SidePanels:iH,SpreadsheetDashboard:JL,HeaderGroupContainer:oH,FullScreenChart:Lk};sidePanel;spreadsheetRef=t.useRef("spreadsheet");spreadsheetRect=Vx();_focusGrid;isViewportTooSmall=!1;notificationStore;composerFocusStore;get model(){return this.props.model}getStyle(){const e={};this.env.isDashboard()?e["grid-template-rows"]="auto":e["grid-template-rows"]="min-content auto min-content";const t=this.sidePanel.mainPanel?`${this.sidePanel.totalPanelSize||_k}px`:"auto";return e["grid-template-columns"]=`auto ${t}`,xh(e)}setup(){if(!("isSmall"in this.env)){const e=function(){const e=Vx();return{get isSmall(){return e.width<768}}}();t.useSubEnv({get isSmall(){return e.isSmall}})}const e=ah();e.inject(gh,this.model);const o=this.env;e.get(Dk).setSmallThreshhold((()=>o.isSmall)),this.notificationStore=lh(xE),this.composerFocusStore=lh(bh),this.sidePanel=lh(Fk);const s=this.model.config.external.fileStore;t.useSubEnv({model:this.model,imageProvider:s?new zL(s):void 0,loadCurrencies:this.model.config.external.loadCurrencies,loadLocales:this.model.config.external.loadLocales,isDashboard:()=>this.model.getters.isDashboard(),openSidePanel:this.sidePanel.open.bind(this.sidePanel),replaceSidePanel:this.sidePanel.replace.bind(this.sidePanel),toggleSidePanel:this.sidePanel.toggle.bind(this.sidePanel),clipboard:this.env.clipboard||new yH(navigator.clipboard),startCellEdition:e=>this.composerFocusStore.focusActiveComposer({content:e}),notifyUser:e=>this.notificationStore.notifyUser(e),askConfirmation:(e,t,o)=>this.notificationStore.askConfirmation(e,t,o),raiseError:(e,t)=>this.notificationStore.raiseError(e,t),isMobile:Dy}),this.notificationStore.updateNotificationCallbacks({...this.props}),t.useEffect((()=>{!this.spreadsheetRef.el.contains(document.activeElement)&&document.activeElement?.contains(this.spreadsheetRef.el)&&this.focusGrid()})),t.useExternalListener(window,"resize",(()=>this.render(!0))),t.useExternalListener(document.body,"wheel",(()=>{})),this.bindModelEvents(),t.onWillUpdateProps((e=>{if(e.model!==this.props.model)throw new Error("Changing the props model is not supported at the moment.");e.notifyUser===this.props.notifyUser&&e.askConfirmation===this.props.askConfirmation&&e.raiseError===this.props.raiseError||this.notificationStore.updateNotificationCallbacks({...e})}));const i=function(e){let t=!1;return async(...o)=>{t||(t=!0,await Promise.resolve(),t=!1,e(...o))}}(this.render.bind(this,!0));t.onMounted((()=>{this.checkViewportSize(),e.on("store-updated",this,i),n.observe(this.spreadsheetRef.el)})),t.onWillUnmount((()=>{this.unbindModelEvents(),e.off("store-updated",this),n.disconnect(),Ah()})),t.onPatched((()=>{this.checkViewportSize()}));const n=new ResizeObserver((()=>{this.sidePanel.changeSpreadsheetWidth(this.spreadsheetRect.width)}))}bindModelEvents(){this.model.on("update",this,(()=>this.render(!0))),this.model.on("notify-ui",this,(e=>this.notificationStore.notifyUser(e))),this.model.on("raise-error-ui",this,(({text:e})=>this.notificationStore.raiseError(e)))}unbindModelEvents(){this.model.off("update",this),this.model.off("notify-ui",this),this.model.off("raise-error-ui",this)}checkViewportSize(){const{xRatio:e,yRatio:t}=this.env.model.getters.getFrozenSheetViewRatio(this.env.model.getters.getActiveSheetId());if(isFinite(e)&&isFinite(t))if(t>.85||e>.85){if(this.isViewportTooSmall)return;this.notificationStore.notifyUser({text:Ho("The current window is too small to display this sheet properly. Consider resizing your browser window or adjusting frozen rows and columns."),type:"warning",sticky:!1}),this.isViewportTooSmall=!0}else this.isViewportTooSmall=!1}focusGrid(){this._focusGrid&&this._focusGrid()}get gridHeight(){return this.env.model.getters.getSheetViewDimension().height}get gridContainerStyle(){const e=ce*this.rowLayers.length,t=ce*this.colLayers.length;return xh({"grid-template-columns":`${e?e+2:0}px auto`,"grid-template-rows":`${t?t+2:0}px auto`})}get rowLayers(){const e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getVisibleGroupLayers(e,"ROW")}get colLayers(){const e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getVisibleGroupLayers(e,"COL")}getGridSize(){const e=this.spreadsheetRef.el?.querySelector(".o-spreadsheet-topbar-wrapper")?.getBoundingClientRect().height||0,t=this.spreadsheetRef.el?.querySelector(".o-spreadsheet-bottombar-wrapper")?.getBoundingClientRect().height||0,o=this.spreadsheetRef.el?.querySelector(".o-grid")?.getBoundingClientRect().width||0,s=(this.spreadsheetRef.el?.getBoundingClientRect().height||0)-(this.spreadsheetRef.el?.querySelector(".o-column-groups")?.getBoundingClientRect().height||0)-e-t;return{width:Math.max(o-ne,0),height:Math.max(s-ne,0)}}}function IH(e){return ML.get(e.type)(e)}class xH{buildTransformation;operations;constructor(e,t=[]){this.buildTransformation=e,this.operations=t}getOperations(){return this.operations}getOperation(e){const t=this.operations.find((t=>t.id===e));if(!t)throw new Error(`Operation ${e} not found`);return t}getLastOperationId(){return this.operations[this.operations.length-1]?.id}getFirstOperationAmong(e,t){for(const o of this.operations){if(o.id===e)return e;if(o.id===t)return t}throw new Error(`Operation ${e} and ${t} not found`)}contains(e){return!!this.operations.find((t=>t.id===e))}prepend(e){const t=this.buildTransformation.with(e.data);this.operations=[e,...this.operations.map((e=>e.transformed(t)))]}insert(e,t){const o=this.buildTransformation.with(e.data),{before:s,operation:i,after:n}=this.locateOperation(t);this.operations=[...s,i,e,...n.map((e=>e.transformed(o)))]}append(e){this.operations.push(e)}appendBranch(e){this.operations=this.operations.concat(e.operations)}fork(e){const{after:t}=this.locateOperation(e);return new xH(this.buildTransformation,t)}transform(e){this.operations=this.operations.map((t=>t.transformed(e)))}cutBefore(e){this.operations=this.locateOperation(e).before}cutAfter(e){const{before:t,operation:o}=this.locateOperation(e);this.operations=t.concat([o])}locateOperation(e){const t=this.operations.findIndex((t=>t.id===e));if(-1===t)throw new Error(`Operation ${e} not found`);return{before:this.operations.slice(0,t),operation:this.operations[t],after:this.operations.slice(t+1)}}}class EH{id;data;constructor(e,t){this.id=e,this.data=t}transformed(e){return new RH(this.id,ut((()=>e(this.data))))}}class RH{id;lazyData;constructor(e,t){this.id=e,this.lazyData=t}get data(){return this.lazyData()}transformed(e){return new RH(this.id,this.lazyData.map(e))}}class TH{operations;constructor(e){this.operations=e}[Symbol.iterator](){return this.operations[Symbol.iterator]()}stopWith(e){return new TH(function*(e,t){for(const o of e)if(yield o,o.operation.id===t)return}(this.operations,e))}stopBefore(e){return new TH(function*(e,t){for(const o of e){if(o.operation.id===t)return;yield o}}(this.operations,e))}startAfter(e){return new TH(function*(e,t){let o=!0;for(const s of e)o||(yield s),s.operation.id===t&&(o=!1)}(this.operations,e))}}class AH{buildTransformation;branches;branchingOperationIds=new Map;constructor(e,t){this.buildTransformation=e,this.branches=[t]}getLastBranch(){return this.branches[this.branches.length-1]}execution(e){return new TH(Xe(this._execution(e),this._execution(e)))}revertedExecution(e){return new TH(Xe(this._revertedExecution(e),this._revertedExecution(e)))}insertOperationLast(e,t){const o=e.getLastOperationId()||this.previousBranch(e)?.getLastOperationId();e.append(t),o&&this.insertPrevious(e,t,o)}insertOperationAfter(e,t,o){e.insert(t,o),this.updateNextWith(e,t,o),this.insertPrevious(e,t,o)}undo(e,t){const o=this.buildTransformation.without(t.data),s=this.branchingOperationIds.get(e);this.branchingOperationIds.set(e,t.id);const i=e.fork(t.id);s&&this.branchingOperationIds.set(i,s),this.insertBranchAfter(e,i),this.transform(i,o)}redo(e){const t=this.nextBranch(e);if(!t)return;const o=this.nextBranch(t);this.removeBranchFromTree(t);const s=this.branchingOperationIds.get(t);s?this.branchingOperationIds.set(e,s):this.branchingOperationIds.delete(e),o&&this.rebaseUp(o)}drop(e){for(const t of this.branches)t.contains(e)&&t.cutBefore(e)}findOperation(e,t){for(const o of this.revertedExecution(e))if(o.operation.id===t)return o;throw new Error(`Operation ${t} not found`)}rebaseUp(e){const{previousBranch:t,branchingOperation:o}=this.findPreviousBranchingOperation(e);if(!t||!o)return;const s=this.buildTransformation.without(o.data),i=t.fork(o.id);this.branchingOperationIds.set(i,this.branchingOperationIds.get(e)),this.removeBranchFromTree(e),this.insertBranchAfter(t,i),i.transform(s);const n=this.nextBranch(i);n&&this.rebaseUp(n)}removeBranchFromTree(e){const t=this.branches.findIndex((t=>t===e));this.branches.splice(t,1)}insertBranchAfter(e,t){const o=this.branches.findIndex((t=>t===e));this.branches.splice(o+1,0,t)}updateNextWith(e,t,o){const s=this.branchingOperationIds.get(e),i=this.nextBranch(e);if(s&&i)if(e.getFirstOperationAmong(o,s)===s){const n=this.addToNextBranch(e,i,s,t,o);this.updateNextWith(i,n,o)}else{const e=this.buildTransformation.with(t.data);this.transform(i,e)}}addToNextBranch(e,t,o,s,i){let n=s;return i===o?(n=this.getTransformedOperation(e,o,s),t.prepend(n)):t.contains(i)?(n=this.getTransformedOperation(e,o,s),t.insert(n,i)):t.append(s),n}getTransformedOperation(e,t,o){const s=e.getOperation(t),i=this.buildTransformation.without(s.data);return o.transformed(i)}shouldExecute(e,t){return t.id!==this.branchingOperationIds.get(e)}transform(e,t){e.transform(t);const o=this.nextBranch(e);o&&this.transform(o,t)}insertPrevious(e,t,o){const{previousBranch:s,branchingOperation:i}=this.findPreviousBranchingOperation(e);if(!s||!i)return;const n=this.buildTransformation.with(i.data),r=e.fork(o);r.transform(n),s.cutAfter(o),s.appendBranch(r);const a=t.transformed(n);this.insertPrevious(s,a,o)}findPreviousBranchingOperation(e){const t=this.previousBranch(e);if(!t)return{previousBranch:void 0,branchingOperation:void 0};const o=this.branchingOperationIds.get(t);return o?{previousBranch:t,branchingOperation:t.getOperation(o)}:{previousBranch:void 0,branchingOperation:void 0}}nextBranch(e){const t=this.branches.findIndex((t=>t===e));if(-1!==t)return this.branches[t+1]}previousBranch(e){const t=this.branches.findIndex((t=>t===e));if(-1!==t)return this.branches[t-1]}*_revertedExecution(e){const t=this.branchingOperationIds.get(e);let o=!!t;const s=e.getOperations();for(let i=s.length-1;i>=0;i--){const n=s[i];n.id===t&&(o=!1),o||(yield{operation:n,branch:e,isCancelled:!this.shouldExecute(e,n)})}const i=this.previousBranch(e);yield*i?this._revertedExecution(i):[]}*_execution(e){for(const t of e.getOperations())if(yield{operation:t,branch:e,isCancelled:!this.shouldExecute(e,t)},t.id===this.branchingOperationIds.get(e)){const t=this.nextBranch(e);return void(yield*t?this._execution(t):[])}if(!this.branchingOperationIds.get(e)){const t=this.nextBranch(e);yield*t?this._execution(t):[]}}}class DH{HEAD_BRANCH;HEAD_OPERATION;tree;applyOperation;revertOperation;buildEmpty;buildTransformation;constructor(e){this.applyOperation=e.applyOperation,this.revertOperation=e.revertOperation,this.buildEmpty=e.buildEmpty,this.buildTransformation=e.buildTransformation,this.HEAD_BRANCH=new xH(this.buildTransformation),this.tree=new AH(this.buildTransformation,this.HEAD_BRANCH);const t=e.initialOperationId,o=new EH(t,this.buildEmpty(t));this.tree.insertOperationLast(this.HEAD_BRANCH,o),this.HEAD_OPERATION=o}get(e){return this.tree.findOperation(this.HEAD_BRANCH,e).operation.data}append(e,t){const o=new EH(e,t),s=this.tree.getLastBranch();this.tree.insertOperationLast(s,o),this.HEAD_BRANCH=s,this.HEAD_OPERATION=o}insert(e,t,o){const s=new EH(e,t);this.revertTo(o),this.tree.insertOperationAfter(this.HEAD_BRANCH,s,o),this.fastForward()}undo(e,t,o){const{branch:s,operation:i}=this.tree.findOperation(this.HEAD_BRANCH,e);this.revertBefore(e),this.tree.undo(s,i),this.fastForward(),this.insert(t,this.buildEmpty(t),o)}redo(e,t,o){const{branch:s}=this.tree.findOperation(this.HEAD_BRANCH,e);this.revertBefore(e),this.tree.redo(s),this.fastForward(),this.insert(t,this.buildEmpty(t),o)}rebase(e){const t=this.get(e),o=[...this.tree.execution(this.HEAD_BRANCH).startAfter(e)];this.revertBefore(e);const s=this.HEAD_OPERATION.id;this.tree.drop(e),this.insert(e,t,s);for(const{operation:e}of o)this.insert(e.id,e.data,this.HEAD_OPERATION.id)}revertBefore(e){const t=this.tree.revertedExecution(this.HEAD_BRANCH).stopWith(e);this.revert(t)}revertTo(e){const t=e?this.tree.revertedExecution(this.HEAD_BRANCH).stopBefore(e):this.tree.revertedExecution(this.HEAD_BRANCH);this.revert(t)}revert(e){for(const{next:t,operation:o,isCancelled:s}of e)s||this.revertOperation(o.data),t&&(this.HEAD_BRANCH=t.branch,this.HEAD_OPERATION=t.operation)}fastForward(){const e=this.HEAD_OPERATION?this.tree.execution(this.HEAD_BRANCH).startAfter(this.HEAD_OPERATION.id):this.tree.execution(this.HEAD_BRANCH);for(const{operation:t,branch:o,isCancelled:s}of e)s||this.applyOperation(t.data),this.HEAD_OPERATION=t,this.HEAD_BRANCH=o}}function _H(e){return new DH({initialOperationId:e.initialRevisionId,applyOperation:t=>{const o=t.commands.slice(),{changes:s}=e.recordChanges((()=>{for(const t of o)e.dispatch(t)}));t.setChanges(s)},revertOperation:e=>function(e){for(const t of e.slice().reverse())for(let e=t.changes.length-1;e>=0;e--){OH(t.changes[e])}}([e]),buildEmpty:e=>new aL(e,"empty",[]),buildTransformation:{with:e=>t=>new aL(t.id,t.clientId,nL(t.commands,e.commands),t.rootCommand,void 0,t.timestamp),without:e=>t=>new aL(t.id,t.clientId,nL(t.commands,e.commands.map(IH).flat()),t.rootCommand,void 0,t.timestamp)}})}function OH(e){const t=e.target,o=e.key,s=e.before;void 0===s?delete t[o]:t[o]=s}class FH{observers=new Map;defaultSubscription;mainSubscription;registerAsDefault(e,t){this.defaultSubscription={owner:e,callbacks:t},this.mainSubscription||(this.mainSubscription=this.defaultSubscription)}observe(e,t){this.observers.set(e,{owner:e,callbacks:t})}capture(e,t){if(this.observers.get(e))throw new Error("You are already subscribed forever");this.mainSubscription?.owner&&this.mainSubscription.owner!==e&&this.mainSubscription.callbacks.release?.(),this.mainSubscription={owner:e,callbacks:t}}release(e){this.mainSubscription?.owner!==e||this.observers.get(e)||(this.mainSubscription=this.defaultSubscription)}getBackToDefault(){this.mainSubscription!==this.defaultSubscription&&(this.mainSubscription?.callbacks.release?.(),this.mainSubscription=this.defaultSubscription)}isListening(e){return this.mainSubscription?.owner===e}send(e){this.mainSubscription?.callbacks.handleEvent(e),this.observers.forEach((t=>t.callbacks.handleEvent(e)))}}class PH{getters;stream;anchor;defaultAnchor;constructor(e){this.getters=e,this.stream=new FH,this.anchor={cell:{col:0,row:0},zone:Mr({col:0,row:0})},this.defaultAnchor=this.anchor}capture(e,t,o){this.stream.capture(e,o),this.anchor=t}registerAsDefault(e,t,o){this.checkAnchorZoneOrThrow(t),this.stream.registerAsDefault(e,o),this.defaultAnchor=t,this.capture(e,t,o)}resetDefaultAnchor(e,t){this.checkAnchorZoneOrThrow(t),this.stream.isListening(e)&&(this.anchor=t),this.defaultAnchor=t}resetAnchor(e,t){this.checkAnchorZoneOrThrow(t),this.stream.isListening(e)&&(this.anchor=t)}observe(e,t){this.stream.observe(e,t)}release(e){this.stream.isListening(e)&&(this.stream.release(e),this.anchor=this.defaultAnchor)}getBackToDefault(){this.stream.getBackToDefault()}modifyAnchor(e,t,o){const s=this.getters.getActiveSheetId();return e={...e,zone:this.getters.expandZone(s,e.zone)},this.processEvent({options:o,anchor:e,mode:t})}selectZone(e,t={scrollIntoView:!0}){return this.modifyAnchor(e,"overrideSelection",t)}selectCell(e,t){const o=Mr({col:e,row:t});return this.selectZone({zone:o,cell:{col:e,row:t}},{scrollIntoView:!0})}moveAnchorCell(e,t=1){if("end"!==t&&t<=0)return new Us("InvalidSelectionStep");const{col:o,row:s}=this.getNextAvailablePosition(e,t);return this.selectCell(o,s)}setAnchorCorner(e,t){const o=this.getters.getActiveSheetId(),{col:s,row:i}=this.anchor.cell,n={left:Math.min(s,e),top:Math.min(i,t),right:Math.max(s,e),bottom:Math.max(i,t)},r={zone:this.getters.expandZone(o,n),cell:{col:s,row:i}};return this.processEvent({mode:"updateAnchor",anchor:r,options:{scrollIntoView:!1}})}addCellToSelection(e,t){const o=this.getters.getActiveSheetId();({col:e,row:t}=this.getters.getMainCellPosition({sheetId:o,col:e,row:t}));const s=this.getters.expandZone(o,Mr({col:e,row:t}));return this.processEvent({options:{scrollIntoView:!0},anchor:{zone:s,cell:{col:e,row:t}},mode:"newAnchor"})}resizeAnchorZone(e,t=1){if("end"!==t&&t<=0)return new Us("InvalidSelectionStep");const o=this.getters.getActiveSheetId(),s=this.anchor,{col:i,row:n}=s.cell,{left:r,right:a,top:l,bottom:c}=s.zone,h=this.getStartingPosition(e),[d,u]=this.deltaToTarget(h,e,t);if(0===d&&0===u)return Us.Success;let g=s.zone;const p=e=>{e=Or(e);const{left:t,right:s,top:i,bottom:n}=this.getters.expandZone(o,e);return{left:Math.max(0,t),right:Math.min(this.getters.getNumberCols(o)-1,s),top:Math.max(0,i),bottom:Math.min(this.getters.getNumberRows(o)-1,n)}},{cell:m,zone:f}=this.getReferenceAnchor(),{col:v,row:b}=m;let S=0;for(;null!==g;){if(S++,d<0){const e=this.getNextAvailableCol(d,a-(S-1),b);g=f.right<=a-S?p({top:l,left:r,bottom:c,right:e}):null}if(d>0){const e=this.getNextAvailableCol(d,r+(S-1),b);g=r+S<=f.left?p({top:l,left:e,bottom:c,right:a}):null}if(u<0){const e=this.getNextAvailableRow(u,v,c-(S-1));g=f.bottom<=c-S?p({top:l,left:r,bottom:e,right:a}):null}if(u>0){const e=this.getNextAvailableRow(u,v,l+(S-1));g=l+S<=f.top?p({top:e,left:r,bottom:c,right:a}):null}if(g=g?Or(g):g,g&&!Ir(g,s.zone))return this.processEvent({options:{scrollIntoView:!0},mode:"updateAnchor",anchor:{zone:g,cell:{col:i,row:n}}})}g=p(yr({top:n,bottom:n,left:i,right:i},Or({top:this.getNextAvailableRow(u,v,l),left:this.getNextAvailableCol(d,r,b),bottom:this.getNextAvailableRow(u,v,c),right:this.getNextAvailableCol(d,a,b)})));const C={zone:g,cell:{col:i,row:n}};return this.processEvent({anchor:C,mode:"updateAnchor",options:{scrollIntoView:!0}})}selectColumn(e,t){const o=this.getters.getActiveSheetId(),s=this.getters.getNumberRows(o)-1;let i={left:e,right:e,top:0,bottom:s};const n=this.getters.findFirstVisibleColRowIndex(o,"ROW");let r,a;switch(t){case"overrideSelection":case"newAnchor":r=e,a=n;break;case"updateAnchor":({col:r,row:a}=this.anchor.cell),i=yr(i,{left:r,right:r,top:n,bottom:s})}return this.processEvent({options:{scrollIntoView:!1,unbounded:!0},anchor:{zone:i,cell:{col:r,row:a}},mode:t})}selectRow(e,t){const o=this.getters.getActiveSheetId(),s=this.getters.getNumberCols(o)-1;let i={top:e,bottom:e,left:0,right:s};const n=this.getters.findFirstVisibleColRowIndex(o,"COL");let r,a;switch(t){case"overrideSelection":case"newAnchor":r=n,a=e;break;case"updateAnchor":({col:r,row:a}=this.anchor.cell),i=yr(i,{left:n,right:s,top:a,bottom:a})}return this.processEvent({options:{scrollIntoView:!1,unbounded:!0},anchor:{zone:i,cell:{col:r,row:a}},mode:t})}loopSelection(){const e=this.getters.getActiveSheetId(),t=this.anchor;if(Ir(this.anchor.zone,this.getters.getSheetZone(e)))return this.modifyAnchor({...t,zone:Mr(t.cell)},"updateAnchor",{scrollIntoView:!1});const o=this.getters.getContiguousZone(e,t.zone);return mt(o,t.zone)?this.selectAll():this.modifyAnchor({...t,zone:o},"updateAnchor",{scrollIntoView:!1})}selectTableAroundSelection(){const e=this.getters.getActiveSheetId(),t=this.getters.getContiguousZone(e,this.anchor.zone);return this.modifyAnchor({...this.anchor,zone:t},"updateAnchor",{scrollIntoView:!1})}selectAll(){const e=this.getters.getActiveSheetId(),t={left:0,top:0,bottom:this.getters.getNumberRows(e)-1,right:this.getters.getNumberCols(e)-1};return this.processEvent({mode:"overrideSelection",anchor:{zone:t,cell:this.anchor.cell},options:{scrollIntoView:!1}})}isListening(e){return this.stream.isListening(e)}processEvent(e){const t={...e,previousAnchor:ze(this.anchor)},o=this.checkEventAnchorZone(t);return"Success"!==o?new Us(o):(this.anchor=t.anchor,this.stream.send(t),Us.Success)}checkEventAnchorZone(e){return this.checkAnchorZone(e.anchor)}checkAnchorZone(e){const{cell:t,zone:o}=e;if(!Er(t.col,t.row,o))return"InvalidAnchorZone";const{left:s,right:i,top:n,bottom:r}=o,a=this.getters.getActiveSheetId(),l=this.getters.findVisibleHeader(a,"COL",s,i);return void 0===this.getters.findVisibleHeader(a,"ROW",n,r)||void 0===l?"SelectionOutOfBound":"Success"}checkAnchorZoneOrThrow(e){if("InvalidAnchorZone"===this.checkAnchorZone(e))throw new Error("The provided anchor is invalid. The cell must be part of the zone.")}getNextAvailablePosition(e,t=1){const{col:o,row:s}=this.anchor.cell,i=this.deltaToTarget({col:o,row:s},e,t);return{col:this.getNextAvailableCol(i[0],o,s),row:this.getNextAvailableRow(i[1],o,s)}}getNextAvailableCol(e,t,o){const s=this.getters.getActiveSheetId(),i={col:t,row:o};return this.getNextAvailableHeader(e,"COL",t,i,(e=>this.getters.isInSameMerge(s,t,o,e,o)))}getNextAvailableRow(e,t,o){const s=this.getters.getActiveSheetId(),i={col:t,row:o};return this.getNextAvailableHeader(e,"ROW",o,i,(e=>this.getters.isInSameMerge(s,t,o,t,e)))}getNextAvailableHeader(e,t,o,s,i){const n=this.getters.getActiveSheetId();if(0===e)return o;const r=Math.sign(e);let a=o+e;for(;i(a);)a+=r;for(;this.getters.isHeaderHidden(n,t,a);)a+=r;return a<0||a>this.getters.getNumberHeaders(n,t)-1?this.getters.isHeaderHidden(n,t,o)?this.getNextAvailableHeader(-r,t,o,s,i):o:a}getReferenceAnchor(){const e=this.getters.getActiveSheetId(),t=this.anchor,{left:o,right:s,top:i,bottom:n}=t.zone,{col:r,row:a}=t.cell,l=this.getters.isColHidden(e,r)&&this.getters.findVisibleHeader(e,"COL",o,s)||r,c=this.getters.isRowHidden(e,a)&&this.getters.findVisibleHeader(e,"ROW",i,n)||a;return{cell:{col:l,row:c},zone:this.getters.expandZone(e,{left:l,right:l,top:c,bottom:c})}}deltaToTarget(e,t,o){switch(t){case"up":return"end"!==o?[0,-o]:[0,this.getEndOfCluster(e,"rows",-1)-e.row];case"down":return"end"!==o?[0,o]:[0,this.getEndOfCluster(e,"rows",1)-e.row];case"left":return"end"!==o?[-o,0]:[this.getEndOfCluster(e,"cols",-1)-e.col,0];case"right":return"end"!==o?[o,0]:[this.getEndOfCluster(e,"cols",1)-e.col,0]}}getStartingPosition(e){let{col:t,row:o}=this.getPosition();const s=this.anchor.zone;switch(e){case"down":case"up":o=o===s.top?s.bottom:s.top;break;case"left":case"right":t=t===s.right?s.left:s.right}return{col:t,row:o}}getEndOfCluster(e,t,o){const s=this.getters.getActiveSheetId();let i=e;const n=this.getNextCellPosition(e,t,o),r=this.isCellSkippableInCluster({...i,sheetId:s})||this.isCellSkippableInCluster({...n,sheetId:s})?"nextCluster":"endOfCluster";for(;;){const e=this.getNextCellPosition(i,t,o);if(i.col===e.col&&i.row===e.row)break;const n=this.isCellSkippableInCluster({...e,sheetId:s});if("endOfCluster"===r&&n)break;if("nextCluster"===r&&!n){i=e;break}i=e}return"cols"===t?i.col:i.row}getNextCellPosition(e,t,o){const s={...e};return s["cols"===t?"col":"row"]="cols"===t?this.getNextAvailableCol(o,s.col,s.row):this.getNextAvailableRow(o,s.col,s.row),{col:s.col,row:s.row}}getPosition(){return{...this.anchor.cell}}isCellSkippableInCluster(e){const t=this.getters.getMainCellPosition(e),o=this.getters.getEvaluatedCell(t);return o.type===_s.empty||o.type===_s.text&&""===o.value}}function MH(e){if("string"==typeof e)return{};if("number"==typeof e)return[];throw new Error("Cannot create new node")}class NH{changes;commands=[];recordChanges(e){return this.changes=[],this.commands=[],e(),{changes:this.changes,commands:this.commands}}addCommand(e){this.commands.push(e)}addChange(...e){const t=e.pop();let o=e[0];const s=e.at(-1),i=e.length-2;for(let t=1;t<=i;t++){const s=e[t];if(void 0===o[s]){const i=e[t+1];o[s]=MH(i)}o=o[s]}o[s]!==t&&(this.changes?.push({key:s,target:o,before:o[s]}),void 0===t?delete o[s]:o[s]=t)}}const kH=17781237,VH=17781238,LH=88853993,HH=88853994;function UH(e,t,o){const s=[["xmlns:r",zh],["xmlns:a",Vh],["xmlns:c",Lh]],i=BH({backgroundColor:e.data.backgroundColor,line:{color:"000000"}});let n=Rx``;if(e.data.title?.text){const t=_y(cC(e.data.backgroundColor)),o=e.data.title.fontSize??K;n=Rx`
2566
+ `;class wH extends t.Component{static template="o-spreadsheet-Spreadsheet";static props={model:Object,notifyUser:{type:Function,optional:!0},raiseError:{type:Function,optional:!0},askConfirmation:{type:Function,optional:!0}};static components={TopBar:CH,Grid:kk,BottomBar:XL,SmallBottomBar:rH,SidePanels:iH,SpreadsheetDashboard:JL,HeaderGroupContainer:oH,FullScreenChart:Lk};sidePanel;spreadsheetRef=t.useRef("spreadsheet");spreadsheetRect=Vx();_focusGrid;isViewportTooSmall=!1;notificationStore;composerFocusStore;get model(){return this.props.model}getStyle(){const e={};this.env.isDashboard()?e["grid-template-rows"]="auto":e["grid-template-rows"]="min-content auto min-content";const t=this.sidePanel.mainPanel?`${this.sidePanel.totalPanelSize||_k}px`:"auto";return e["grid-template-columns"]=`auto ${t}`,xh(e)}setup(){if(!("isSmall"in this.env)){const e=function(){const e=Vx();return{get isSmall(){return e.width<768}}}();t.useSubEnv({get isSmall(){return e.isSmall}})}const e=ah();e.inject(gh,this.model);const o=this.env;e.get(Dk).setSmallThreshhold((()=>o.isSmall)),this.notificationStore=lh(xE),this.composerFocusStore=lh(bh),this.sidePanel=lh(Fk);const s=this.model.config.external.fileStore;t.useSubEnv({model:this.model,imageProvider:s?new zL(s):void 0,loadCurrencies:this.model.config.external.loadCurrencies,loadLocales:this.model.config.external.loadLocales,isDashboard:()=>this.model.getters.isDashboard(),openSidePanel:this.sidePanel.open.bind(this.sidePanel),replaceSidePanel:this.sidePanel.replace.bind(this.sidePanel),toggleSidePanel:this.sidePanel.toggle.bind(this.sidePanel),clipboard:this.env.clipboard||new yH(navigator.clipboard),startCellEdition:e=>this.composerFocusStore.focusActiveComposer({content:e}),notifyUser:e=>this.notificationStore.notifyUser(e),askConfirmation:(e,t,o)=>this.notificationStore.askConfirmation(e,t,o),raiseError:(e,t)=>this.notificationStore.raiseError(e,t),isMobile:Dy}),this.notificationStore.updateNotificationCallbacks({...this.props}),t.useEffect((()=>{!this.spreadsheetRef.el.contains(document.activeElement)&&document.activeElement?.contains(this.spreadsheetRef.el)&&this.focusGrid()})),t.useExternalListener(window,"resize",(()=>this.render(!0))),t.useExternalListener(document.body,"wheel",(()=>{})),this.bindModelEvents(),t.onWillUpdateProps((e=>{if(e.model!==this.props.model)throw new Error("Changing the props model is not supported at the moment.");e.notifyUser===this.props.notifyUser&&e.askConfirmation===this.props.askConfirmation&&e.raiseError===this.props.raiseError||this.notificationStore.updateNotificationCallbacks({...e})}));const i=function(e){let t=!1;return async(...o)=>{t||(t=!0,await Promise.resolve(),t=!1,e(...o))}}(this.render.bind(this,!0));t.onMounted((()=>{this.checkViewportSize(),e.on("store-updated",this,i),n.observe(this.spreadsheetRef.el)})),t.onWillUnmount((()=>{this.unbindModelEvents(),e.off("store-updated",this),n.disconnect(),Ah()})),t.onPatched((()=>{this.checkViewportSize()}));const n=new ResizeObserver((()=>{this.sidePanel.changeSpreadsheetWidth(this.spreadsheetRect.width)}))}bindModelEvents(){this.model.on("update",this,(()=>this.render(!0))),this.model.on("notify-ui",this,(e=>this.notificationStore.notifyUser(e))),this.model.on("raise-error-ui",this,(({text:e})=>this.notificationStore.raiseError(e)))}unbindModelEvents(){this.model.off("update",this),this.model.off("notify-ui",this),this.model.off("raise-error-ui",this)}checkViewportSize(){const{xRatio:e,yRatio:t}=this.env.model.getters.getFrozenSheetViewRatio(this.env.model.getters.getActiveSheetId());if(isFinite(e)&&isFinite(t))if(t>.85||e>.85){if(this.isViewportTooSmall)return;this.notificationStore.notifyUser({text:Ho("The current window is too small to display this sheet properly. Consider resizing your browser window or adjusting frozen rows and columns."),type:"warning",sticky:!1}),this.isViewportTooSmall=!0}else this.isViewportTooSmall=!1}focusGrid(){this._focusGrid&&this._focusGrid()}get gridHeight(){return this.env.model.getters.getSheetViewDimension().height}get gridContainerStyle(){const e=ce*this.rowLayers.length,t=ce*this.colLayers.length;return xh({"grid-template-columns":`${e?e+2:0}px auto`,"grid-template-rows":`${t?t+2:0}px auto`})}get rowLayers(){const e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getVisibleGroupLayers(e,"ROW")}get colLayers(){const e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getVisibleGroupLayers(e,"COL")}getGridSize(){const e=this.spreadsheetRef.el;if(!e)return{width:0,height:0};const t=t=>e.querySelector(t)?.getBoundingClientRect().height||0,o=e.getBoundingClientRect(),s=t(".o-spreadsheet-topbar-wrapper"),i=t(".o-spreadsheet-bottombar-wrapper"),n=t(".o-column-groups"),r=(a=".o-grid",e.querySelector(a)?.getBoundingClientRect().width||0);var a;return{width:Math.max(r-ne,0),height:Math.max(o.height-s-i-n-ne,0)}}}function IH(e){return ML.get(e.type)(e)}class xH{buildTransformation;operations;constructor(e,t=[]){this.buildTransformation=e,this.operations=t}getOperations(){return this.operations}getOperation(e){const t=this.operations.find((t=>t.id===e));if(!t)throw new Error(`Operation ${e} not found`);return t}getLastOperationId(){return this.operations[this.operations.length-1]?.id}getFirstOperationAmong(e,t){for(const o of this.operations){if(o.id===e)return e;if(o.id===t)return t}throw new Error(`Operation ${e} and ${t} not found`)}contains(e){return!!this.operations.find((t=>t.id===e))}prepend(e){const t=this.buildTransformation.with(e.data);this.operations=[e,...this.operations.map((e=>e.transformed(t)))]}insert(e,t){const o=this.buildTransformation.with(e.data),{before:s,operation:i,after:n}=this.locateOperation(t);this.operations=[...s,i,e,...n.map((e=>e.transformed(o)))]}append(e){this.operations.push(e)}appendBranch(e){this.operations=this.operations.concat(e.operations)}fork(e){const{after:t}=this.locateOperation(e);return new xH(this.buildTransformation,t)}transform(e){this.operations=this.operations.map((t=>t.transformed(e)))}cutBefore(e){this.operations=this.locateOperation(e).before}cutAfter(e){const{before:t,operation:o}=this.locateOperation(e);this.operations=t.concat([o])}locateOperation(e){const t=this.operations.findIndex((t=>t.id===e));if(-1===t)throw new Error(`Operation ${e} not found`);return{before:this.operations.slice(0,t),operation:this.operations[t],after:this.operations.slice(t+1)}}}class EH{id;data;constructor(e,t){this.id=e,this.data=t}transformed(e){return new RH(this.id,ut((()=>e(this.data))))}}class RH{id;lazyData;constructor(e,t){this.id=e,this.lazyData=t}get data(){return this.lazyData()}transformed(e){return new RH(this.id,this.lazyData.map(e))}}class TH{operations;constructor(e){this.operations=e}[Symbol.iterator](){return this.operations[Symbol.iterator]()}stopWith(e){return new TH(function*(e,t){for(const o of e)if(yield o,o.operation.id===t)return}(this.operations,e))}stopBefore(e){return new TH(function*(e,t){for(const o of e){if(o.operation.id===t)return;yield o}}(this.operations,e))}startAfter(e){return new TH(function*(e,t){let o=!0;for(const s of e)o||(yield s),s.operation.id===t&&(o=!1)}(this.operations,e))}}class AH{buildTransformation;branches;branchingOperationIds=new Map;constructor(e,t){this.buildTransformation=e,this.branches=[t]}getLastBranch(){return this.branches[this.branches.length-1]}execution(e){return new TH(Xe(this._execution(e),this._execution(e)))}revertedExecution(e){return new TH(Xe(this._revertedExecution(e),this._revertedExecution(e)))}insertOperationLast(e,t){const o=e.getLastOperationId()||this.previousBranch(e)?.getLastOperationId();e.append(t),o&&this.insertPrevious(e,t,o)}insertOperationAfter(e,t,o){e.insert(t,o),this.updateNextWith(e,t,o),this.insertPrevious(e,t,o)}undo(e,t){const o=this.buildTransformation.without(t.data),s=this.branchingOperationIds.get(e);this.branchingOperationIds.set(e,t.id);const i=e.fork(t.id);s&&this.branchingOperationIds.set(i,s),this.insertBranchAfter(e,i),this.transform(i,o)}redo(e){const t=this.nextBranch(e);if(!t)return;const o=this.nextBranch(t);this.removeBranchFromTree(t);const s=this.branchingOperationIds.get(t);s?this.branchingOperationIds.set(e,s):this.branchingOperationIds.delete(e),o&&this.rebaseUp(o)}drop(e){for(const t of this.branches)t.contains(e)&&t.cutBefore(e)}findOperation(e,t){for(const o of this.revertedExecution(e))if(o.operation.id===t)return o;throw new Error(`Operation ${t} not found`)}rebaseUp(e){const{previousBranch:t,branchingOperation:o}=this.findPreviousBranchingOperation(e);if(!t||!o)return;const s=this.buildTransformation.without(o.data),i=t.fork(o.id);this.branchingOperationIds.set(i,this.branchingOperationIds.get(e)),this.removeBranchFromTree(e),this.insertBranchAfter(t,i),i.transform(s);const n=this.nextBranch(i);n&&this.rebaseUp(n)}removeBranchFromTree(e){const t=this.branches.findIndex((t=>t===e));this.branches.splice(t,1)}insertBranchAfter(e,t){const o=this.branches.findIndex((t=>t===e));this.branches.splice(o+1,0,t)}updateNextWith(e,t,o){const s=this.branchingOperationIds.get(e),i=this.nextBranch(e);if(s&&i)if(e.getFirstOperationAmong(o,s)===s){const n=this.addToNextBranch(e,i,s,t,o);this.updateNextWith(i,n,o)}else{const e=this.buildTransformation.with(t.data);this.transform(i,e)}}addToNextBranch(e,t,o,s,i){let n=s;return i===o?(n=this.getTransformedOperation(e,o,s),t.prepend(n)):t.contains(i)?(n=this.getTransformedOperation(e,o,s),t.insert(n,i)):t.append(s),n}getTransformedOperation(e,t,o){const s=e.getOperation(t),i=this.buildTransformation.without(s.data);return o.transformed(i)}shouldExecute(e,t){return t.id!==this.branchingOperationIds.get(e)}transform(e,t){e.transform(t);const o=this.nextBranch(e);o&&this.transform(o,t)}insertPrevious(e,t,o){const{previousBranch:s,branchingOperation:i}=this.findPreviousBranchingOperation(e);if(!s||!i)return;const n=this.buildTransformation.with(i.data),r=e.fork(o);r.transform(n),s.cutAfter(o),s.appendBranch(r);const a=t.transformed(n);this.insertPrevious(s,a,o)}findPreviousBranchingOperation(e){const t=this.previousBranch(e);if(!t)return{previousBranch:void 0,branchingOperation:void 0};const o=this.branchingOperationIds.get(t);return o?{previousBranch:t,branchingOperation:t.getOperation(o)}:{previousBranch:void 0,branchingOperation:void 0}}nextBranch(e){const t=this.branches.findIndex((t=>t===e));if(-1!==t)return this.branches[t+1]}previousBranch(e){const t=this.branches.findIndex((t=>t===e));if(-1!==t)return this.branches[t-1]}*_revertedExecution(e){const t=this.branchingOperationIds.get(e);let o=!!t;const s=e.getOperations();for(let i=s.length-1;i>=0;i--){const n=s[i];n.id===t&&(o=!1),o||(yield{operation:n,branch:e,isCancelled:!this.shouldExecute(e,n)})}const i=this.previousBranch(e);yield*i?this._revertedExecution(i):[]}*_execution(e){for(const t of e.getOperations())if(yield{operation:t,branch:e,isCancelled:!this.shouldExecute(e,t)},t.id===this.branchingOperationIds.get(e)){const t=this.nextBranch(e);return void(yield*t?this._execution(t):[])}if(!this.branchingOperationIds.get(e)){const t=this.nextBranch(e);yield*t?this._execution(t):[]}}}class DH{HEAD_BRANCH;HEAD_OPERATION;tree;applyOperation;revertOperation;buildEmpty;buildTransformation;constructor(e){this.applyOperation=e.applyOperation,this.revertOperation=e.revertOperation,this.buildEmpty=e.buildEmpty,this.buildTransformation=e.buildTransformation,this.HEAD_BRANCH=new xH(this.buildTransformation),this.tree=new AH(this.buildTransformation,this.HEAD_BRANCH);const t=e.initialOperationId,o=new EH(t,this.buildEmpty(t));this.tree.insertOperationLast(this.HEAD_BRANCH,o),this.HEAD_OPERATION=o}get(e){return this.tree.findOperation(this.HEAD_BRANCH,e).operation.data}append(e,t){const o=new EH(e,t),s=this.tree.getLastBranch();this.tree.insertOperationLast(s,o),this.HEAD_BRANCH=s,this.HEAD_OPERATION=o}insert(e,t,o){const s=new EH(e,t);this.revertTo(o),this.tree.insertOperationAfter(this.HEAD_BRANCH,s,o),this.fastForward()}undo(e,t,o){const{branch:s,operation:i}=this.tree.findOperation(this.HEAD_BRANCH,e);this.revertBefore(e),this.tree.undo(s,i),this.fastForward(),this.insert(t,this.buildEmpty(t),o)}redo(e,t,o){const{branch:s}=this.tree.findOperation(this.HEAD_BRANCH,e);this.revertBefore(e),this.tree.redo(s),this.fastForward(),this.insert(t,this.buildEmpty(t),o)}rebase(e){const t=this.get(e),o=[...this.tree.execution(this.HEAD_BRANCH).startAfter(e)];this.revertBefore(e);const s=this.HEAD_OPERATION.id;this.tree.drop(e),this.insert(e,t,s);for(const{operation:e}of o)this.insert(e.id,e.data,this.HEAD_OPERATION.id)}revertBefore(e){const t=this.tree.revertedExecution(this.HEAD_BRANCH).stopWith(e);this.revert(t)}revertTo(e){const t=e?this.tree.revertedExecution(this.HEAD_BRANCH).stopBefore(e):this.tree.revertedExecution(this.HEAD_BRANCH);this.revert(t)}revert(e){for(const{next:t,operation:o,isCancelled:s}of e)s||this.revertOperation(o.data),t&&(this.HEAD_BRANCH=t.branch,this.HEAD_OPERATION=t.operation)}fastForward(){const e=this.HEAD_OPERATION?this.tree.execution(this.HEAD_BRANCH).startAfter(this.HEAD_OPERATION.id):this.tree.execution(this.HEAD_BRANCH);for(const{operation:t,branch:o,isCancelled:s}of e)s||this.applyOperation(t.data),this.HEAD_OPERATION=t,this.HEAD_BRANCH=o}}function _H(e){return new DH({initialOperationId:e.initialRevisionId,applyOperation:t=>{const o=t.commands.slice(),{changes:s}=e.recordChanges((()=>{for(const t of o)e.dispatch(t)}));t.setChanges(s)},revertOperation:e=>function(e){for(const t of e.slice().reverse())for(let e=t.changes.length-1;e>=0;e--){OH(t.changes[e])}}([e]),buildEmpty:e=>new aL(e,"empty",[]),buildTransformation:{with:e=>t=>new aL(t.id,t.clientId,nL(t.commands,e.commands),t.rootCommand,void 0,t.timestamp),without:e=>t=>new aL(t.id,t.clientId,nL(t.commands,e.commands.map(IH).flat()),t.rootCommand,void 0,t.timestamp)}})}function OH(e){const t=e.target,o=e.key,s=e.before;void 0===s?delete t[o]:t[o]=s}class FH{observers=new Map;defaultSubscription;mainSubscription;registerAsDefault(e,t){this.defaultSubscription={owner:e,callbacks:t},this.mainSubscription||(this.mainSubscription=this.defaultSubscription)}observe(e,t){this.observers.set(e,{owner:e,callbacks:t})}capture(e,t){if(this.observers.get(e))throw new Error("You are already subscribed forever");this.mainSubscription?.owner&&this.mainSubscription.owner!==e&&this.mainSubscription.callbacks.release?.(),this.mainSubscription={owner:e,callbacks:t}}release(e){this.mainSubscription?.owner!==e||this.observers.get(e)||(this.mainSubscription=this.defaultSubscription)}getBackToDefault(){this.mainSubscription!==this.defaultSubscription&&(this.mainSubscription?.callbacks.release?.(),this.mainSubscription=this.defaultSubscription)}isListening(e){return this.mainSubscription?.owner===e}send(e){this.mainSubscription?.callbacks.handleEvent(e),this.observers.forEach((t=>t.callbacks.handleEvent(e)))}}class PH{getters;stream;anchor;defaultAnchor;constructor(e){this.getters=e,this.stream=new FH,this.anchor={cell:{col:0,row:0},zone:Mr({col:0,row:0})},this.defaultAnchor=this.anchor}capture(e,t,o){this.stream.capture(e,o),this.anchor=t}registerAsDefault(e,t,o){this.checkAnchorZoneOrThrow(t),this.stream.registerAsDefault(e,o),this.defaultAnchor=t,this.capture(e,t,o)}resetDefaultAnchor(e,t){this.checkAnchorZoneOrThrow(t),this.stream.isListening(e)&&(this.anchor=t),this.defaultAnchor=t}resetAnchor(e,t){this.checkAnchorZoneOrThrow(t),this.stream.isListening(e)&&(this.anchor=t)}observe(e,t){this.stream.observe(e,t)}release(e){this.stream.isListening(e)&&(this.stream.release(e),this.anchor=this.defaultAnchor)}getBackToDefault(){this.stream.getBackToDefault()}modifyAnchor(e,t,o){const s=this.getters.getActiveSheetId();return e={...e,zone:this.getters.expandZone(s,e.zone)},this.processEvent({options:o,anchor:e,mode:t})}selectZone(e,t={scrollIntoView:!0}){return this.modifyAnchor(e,"overrideSelection",t)}selectCell(e,t){const o=Mr({col:e,row:t});return this.selectZone({zone:o,cell:{col:e,row:t}},{scrollIntoView:!0})}moveAnchorCell(e,t=1){if("end"!==t&&t<=0)return new Us("InvalidSelectionStep");const{col:o,row:s}=this.getNextAvailablePosition(e,t);return this.selectCell(o,s)}setAnchorCorner(e,t){const o=this.getters.getActiveSheetId(),{col:s,row:i}=this.anchor.cell,n={left:Math.min(s,e),top:Math.min(i,t),right:Math.max(s,e),bottom:Math.max(i,t)},r={zone:this.getters.expandZone(o,n),cell:{col:s,row:i}};return this.processEvent({mode:"updateAnchor",anchor:r,options:{scrollIntoView:!1}})}addCellToSelection(e,t){const o=this.getters.getActiveSheetId();({col:e,row:t}=this.getters.getMainCellPosition({sheetId:o,col:e,row:t}));const s=this.getters.expandZone(o,Mr({col:e,row:t}));return this.processEvent({options:{scrollIntoView:!0},anchor:{zone:s,cell:{col:e,row:t}},mode:"newAnchor"})}resizeAnchorZone(e,t=1){if("end"!==t&&t<=0)return new Us("InvalidSelectionStep");const o=this.getters.getActiveSheetId(),s=this.anchor,{col:i,row:n}=s.cell,{left:r,right:a,top:l,bottom:c}=s.zone,h=this.getStartingPosition(e),[d,u]=this.deltaToTarget(h,e,t);if(0===d&&0===u)return Us.Success;let g=s.zone;const p=e=>{e=Or(e);const{left:t,right:s,top:i,bottom:n}=this.getters.expandZone(o,e);return{left:Math.max(0,t),right:Math.min(this.getters.getNumberCols(o)-1,s),top:Math.max(0,i),bottom:Math.min(this.getters.getNumberRows(o)-1,n)}},{cell:m,zone:f}=this.getReferenceAnchor(),{col:v,row:b}=m;let S=0;for(;null!==g;){if(S++,d<0){const e=this.getNextAvailableCol(d,a-(S-1),b);g=f.right<=a-S?p({top:l,left:r,bottom:c,right:e}):null}if(d>0){const e=this.getNextAvailableCol(d,r+(S-1),b);g=r+S<=f.left?p({top:l,left:e,bottom:c,right:a}):null}if(u<0){const e=this.getNextAvailableRow(u,v,c-(S-1));g=f.bottom<=c-S?p({top:l,left:r,bottom:e,right:a}):null}if(u>0){const e=this.getNextAvailableRow(u,v,l+(S-1));g=l+S<=f.top?p({top:e,left:r,bottom:c,right:a}):null}if(g=g?Or(g):g,g&&!Ir(g,s.zone))return this.processEvent({options:{scrollIntoView:!0},mode:"updateAnchor",anchor:{zone:g,cell:{col:i,row:n}}})}g=p(yr({top:n,bottom:n,left:i,right:i},Or({top:this.getNextAvailableRow(u,v,l),left:this.getNextAvailableCol(d,r,b),bottom:this.getNextAvailableRow(u,v,c),right:this.getNextAvailableCol(d,a,b)})));const C={zone:g,cell:{col:i,row:n}};return this.processEvent({anchor:C,mode:"updateAnchor",options:{scrollIntoView:!0}})}selectColumn(e,t){const o=this.getters.getActiveSheetId(),s=this.getters.getNumberRows(o)-1;let i={left:e,right:e,top:0,bottom:s};const n=this.getters.findFirstVisibleColRowIndex(o,"ROW");let r,a;switch(t){case"overrideSelection":case"newAnchor":r=e,a=n;break;case"updateAnchor":({col:r,row:a}=this.anchor.cell),i=yr(i,{left:r,right:r,top:n,bottom:s})}return this.processEvent({options:{scrollIntoView:!1,unbounded:!0},anchor:{zone:i,cell:{col:r,row:a}},mode:t})}selectRow(e,t){const o=this.getters.getActiveSheetId(),s=this.getters.getNumberCols(o)-1;let i={top:e,bottom:e,left:0,right:s};const n=this.getters.findFirstVisibleColRowIndex(o,"COL");let r,a;switch(t){case"overrideSelection":case"newAnchor":r=n,a=e;break;case"updateAnchor":({col:r,row:a}=this.anchor.cell),i=yr(i,{left:n,right:s,top:a,bottom:a})}return this.processEvent({options:{scrollIntoView:!1,unbounded:!0},anchor:{zone:i,cell:{col:r,row:a}},mode:t})}loopSelection(){const e=this.getters.getActiveSheetId(),t=this.anchor;if(Ir(this.anchor.zone,this.getters.getSheetZone(e)))return this.modifyAnchor({...t,zone:Mr(t.cell)},"updateAnchor",{scrollIntoView:!1});const o=this.getters.getContiguousZone(e,t.zone);return mt(o,t.zone)?this.selectAll():this.modifyAnchor({...t,zone:o},"updateAnchor",{scrollIntoView:!1})}selectTableAroundSelection(){const e=this.getters.getActiveSheetId(),t=this.getters.getContiguousZone(e,this.anchor.zone);return this.modifyAnchor({...this.anchor,zone:t},"updateAnchor",{scrollIntoView:!1})}selectAll(){const e=this.getters.getActiveSheetId(),t={left:0,top:0,bottom:this.getters.getNumberRows(e)-1,right:this.getters.getNumberCols(e)-1};return this.processEvent({mode:"overrideSelection",anchor:{zone:t,cell:this.anchor.cell},options:{scrollIntoView:!1}})}isListening(e){return this.stream.isListening(e)}processEvent(e){const t={...e,previousAnchor:ze(this.anchor)},o=this.checkEventAnchorZone(t);return"Success"!==o?new Us(o):(this.anchor=t.anchor,this.stream.send(t),Us.Success)}checkEventAnchorZone(e){return this.checkAnchorZone(e.anchor)}checkAnchorZone(e){const{cell:t,zone:o}=e;if(!Er(t.col,t.row,o))return"InvalidAnchorZone";const{left:s,right:i,top:n,bottom:r}=o,a=this.getters.getActiveSheetId(),l=this.getters.findVisibleHeader(a,"COL",s,i);return void 0===this.getters.findVisibleHeader(a,"ROW",n,r)||void 0===l?"SelectionOutOfBound":"Success"}checkAnchorZoneOrThrow(e){if("InvalidAnchorZone"===this.checkAnchorZone(e))throw new Error("The provided anchor is invalid. The cell must be part of the zone.")}getNextAvailablePosition(e,t=1){const{col:o,row:s}=this.anchor.cell,i=this.deltaToTarget({col:o,row:s},e,t);return{col:this.getNextAvailableCol(i[0],o,s),row:this.getNextAvailableRow(i[1],o,s)}}getNextAvailableCol(e,t,o){const s=this.getters.getActiveSheetId(),i={col:t,row:o};return this.getNextAvailableHeader(e,"COL",t,i,(e=>this.getters.isInSameMerge(s,t,o,e,o)))}getNextAvailableRow(e,t,o){const s=this.getters.getActiveSheetId(),i={col:t,row:o};return this.getNextAvailableHeader(e,"ROW",o,i,(e=>this.getters.isInSameMerge(s,t,o,t,e)))}getNextAvailableHeader(e,t,o,s,i){const n=this.getters.getActiveSheetId();if(0===e)return o;const r=Math.sign(e);let a=o+e;for(;i(a);)a+=r;for(;this.getters.isHeaderHidden(n,t,a);)a+=r;return a<0||a>this.getters.getNumberHeaders(n,t)-1?this.getters.isHeaderHidden(n,t,o)?this.getNextAvailableHeader(-r,t,o,s,i):o:a}getReferenceAnchor(){const e=this.getters.getActiveSheetId(),t=this.anchor,{left:o,right:s,top:i,bottom:n}=t.zone,{col:r,row:a}=t.cell,l=this.getters.isColHidden(e,r)&&this.getters.findVisibleHeader(e,"COL",o,s)||r,c=this.getters.isRowHidden(e,a)&&this.getters.findVisibleHeader(e,"ROW",i,n)||a;return{cell:{col:l,row:c},zone:this.getters.expandZone(e,{left:l,right:l,top:c,bottom:c})}}deltaToTarget(e,t,o){switch(t){case"up":return"end"!==o?[0,-o]:[0,this.getEndOfCluster(e,"rows",-1)-e.row];case"down":return"end"!==o?[0,o]:[0,this.getEndOfCluster(e,"rows",1)-e.row];case"left":return"end"!==o?[-o,0]:[this.getEndOfCluster(e,"cols",-1)-e.col,0];case"right":return"end"!==o?[o,0]:[this.getEndOfCluster(e,"cols",1)-e.col,0]}}getStartingPosition(e){let{col:t,row:o}=this.getPosition();const s=this.anchor.zone;switch(e){case"down":case"up":o=o===s.top?s.bottom:s.top;break;case"left":case"right":t=t===s.right?s.left:s.right}return{col:t,row:o}}getEndOfCluster(e,t,o){const s=this.getters.getActiveSheetId();let i=e;const n=this.getNextCellPosition(e,t,o),r=this.isCellSkippableInCluster({...i,sheetId:s})||this.isCellSkippableInCluster({...n,sheetId:s})?"nextCluster":"endOfCluster";for(;;){const e=this.getNextCellPosition(i,t,o);if(i.col===e.col&&i.row===e.row)break;const n=this.isCellSkippableInCluster({...e,sheetId:s});if("endOfCluster"===r&&n)break;if("nextCluster"===r&&!n){i=e;break}i=e}return"cols"===t?i.col:i.row}getNextCellPosition(e,t,o){const s={...e};return s["cols"===t?"col":"row"]="cols"===t?this.getNextAvailableCol(o,s.col,s.row):this.getNextAvailableRow(o,s.col,s.row),{col:s.col,row:s.row}}getPosition(){return{...this.anchor.cell}}isCellSkippableInCluster(e){const t=this.getters.getMainCellPosition(e),o=this.getters.getEvaluatedCell(t);return o.type===_s.empty||o.type===_s.text&&""===o.value}}function MH(e){if("string"==typeof e)return{};if("number"==typeof e)return[];throw new Error("Cannot create new node")}class NH{changes;commands=[];recordChanges(e){return this.changes=[],this.commands=[],e(),{changes:this.changes,commands:this.commands}}addCommand(e){this.commands.push(e)}addChange(...e){const t=e.pop();let o=e[0];const s=e.at(-1),i=e.length-2;for(let t=1;t<=i;t++){const s=e[t];if(void 0===o[s]){const i=e[t+1];o[s]=MH(i)}o=o[s]}o[s]!==t&&(this.changes?.push({key:s,target:o,before:o[s]}),void 0===t?delete o[s]:o[s]=t)}}const kH=17781237,VH=17781238,LH=88853993,HH=88853994;function UH(e,t,o){const s=[["xmlns:r",zh],["xmlns:a",Vh],["xmlns:c",Lh]],i=BH({backgroundColor:e.data.backgroundColor,line:{color:"000000"}});let n=Rx``;if(e.data.title?.text){const t=_y(cC(e.data.backgroundColor)),o=e.data.title.fontSize??K;n=Rx`
2567
2567
  <c:title>
2568
2568
  ${$H(e.data.title.text,t,o,e.data.title)}
2569
2569
  <c:overlay val="0" />
@@ -3322,4 +3322,4 @@
3322
3322
  <tableParts count="${e.tables.length}">
3323
3323
  ${Ex(a)}
3324
3324
  </tableParts>
3325
- `}var VU;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(VU||(VU={}));function LU(e,t={}){const o=ze(t);return o.type=e,o}const HU={},UU={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:te,HEADER_WIDTH:oe,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:se,DEFAULT_CELL_HEIGHT:ie,SCROLLBAR_WIDTH:ne},BU={autoCompleteProviders:yE,autofillModifiersRegistry:LV,autofillRulesRegistry:HV,cellMenuRegistry:aF,colMenuRegistry:SP,errorTypes:oi,linkMenuRegistry:xR,functionRegistry:AS,featurePluginRegistry:_L,iconsOnCellRegistry:FV,statefulUIPluginRegistry:OL,coreViewsPluginRegistry:FL,corePluginRegistry:DL,rowMenuRegistry:EP,sidePanelRegistry:Ak,figureRegistry:qx,chartSidePanelComponentRegistry:iN,chartComponentRegistry:rx,chartRegistry:nx,chartSubtypeRegistry:lx,topbarMenuRegistry:HL,topbarComponentRegistry:UL,clickableCellRegistry:PL,otRegistry:jV,inverseCommandRegistry:ML,urlRegistry:zo,cellPopoverRegistry:Yx,numberFormatMenuRegistry:kL,repeatLocalCommandTransformRegistry:wL,repeatCommandTransformRegistry:yL,clipboardHandlersRegistries:eh,pivotRegistry:hk,pivotTimeAdapterRegistry:vc,pivotSidePanelRegistry:pk,pivotNormalizationValueRegistry:jc,supportedPivotPositionalFormulaRegistry:Vk,pivotToFunctionValueRegistry:Yc,migrationStepRegistry:pD,chartJsExtensionRegistry:Eh},zU={arg:td,isEvaluationError:gi,toBoolean:Ei,toJsDate:Ri,toNumber:fi,toString:wi,toNormalizedPivotValue:Gc,toFunctionPivotValue:qc,toXC:Po,toZone:ur,toUnboundedZone:dr,toCartesian:Fo,numberToLetters:wo,lettersToNumber:Io,UuidGenerator:Ka,formatValue:In,createCurrencyFormat:Vn,ColorGenerator:fo,computeTextWidth:Va,createEmptyWorkbookData:ED,createEmptySheet:xD,createEmptyExcelSheet:RD,rgbaToHex:Yt,colorToRGBA:Xt,positionToZone:Mr,isDefined:lt,isMatrix:js,lazy:ut,genericRepeat:IL,createAction:i,createActions:o,transformRangeData:oh,deepEquals:mt,overlap:xr,union:yr,isInside:Er,deepCopy:ze,expandZoneOnInsertion:vr,reduceZoneOnDeletion:Cr,unquote:Ge,getMaxObjectId:kc,getFunctionsFromTokens:qS,getFirstPivotFunction:ZN,getNumberOfPivotFunctions:jN,parseDimension:Hc,isDateOrDatetimeField:Uc,makeFieldProposal:$N,insertTokenAfterArgSeparator:GN,insertTokenAfterLeftParenthesis:WN,mergeContiguousZones:Br,getPivotHighlights:AN,pivotTimeAdapter:bc,UNDO_REDO_PIVOT_COMMANDS:kV,createPivotFormula:$c,areDomainArgsFieldsValid:zc,splitReference:ra,sanitizeSheetName:qe,getUniqueText:Vt,isNumber:Rs,isDateTime:cs},$U={isMarkdownLink:et,parseMarkdownLink:st,markdownLink:ot,openLink:Zo,urlRepresentation:qo},GU={Checkbox:lR,Section:ZE,RoundColorPicker:jE,ChartDataSeries:mM,ChartErrorSection:fM,ChartLabelRange:vM,ChartTitle:EM,ChartPanel:aN,ChartFigure:Gx,ChartJsComponent:XC,Grid:kk,GridOverlay:XP,ScorecardChart:dy,LineConfigPanel:GM,BarConfigPanel:SM,PieChartDesignPanel:ZM,GenericChartConfigPanel:bM,ChartWithAxisDesignPanel:PM,LineChartDesignPanel:WM,GaugeChartConfigPanel:VM,GaugeChartDesignPanel:LM,ScorecardChartConfigPanel:YM,ScorecardChartDesignPanel:XM,GeoChartDesignPanel:zM,RadarChartDesignPanel:jM,WaterfallChartDesignPanel:sN,ComboChartDesignPanel:NM,FunnelChartDesignPanel:kM,ChartTypePicker:nN,FigureComponent:Zx,MenuPopover:zx,Popover:Lx,SelectionInput:oR,ValidationMessages:zP,AddDimensionButton:FN,PivotDimensionGranularity:kN,PivotDimensionOrder:VN,PivotDimension:NN,PivotLayoutConfigurator:UN,PivotHTMLRenderer:Hk,PivotDeferUpdate:DN,PivotTitleSection:BN,CogWheelMenu:MN,TextInput:PN,SidePanelCollapsible:eE,RadioSelection:TM,GeoChartRegionSelectSection:HM,ChartDashboardMenu:$x,FullScreenChart:Lk},WU={useDragAndDropListItems:YE,useHighlights:hN,useHighlightsOnHover:cN},qU={useStoreProvider:ah,DependencyContainer:ih,CellPopoverStore:Xx,ComposerFocusStore:bh,CellComposerStore:MP,FindAndReplaceStore:wN,HighlightStore:IE,DelayedHoveredCellStore:jx,HoveredTableStore:ZP,ModelStore:gh,NotificationStore:xE,RendererStore:mh,SelectionInputStore:tR,SpreadsheetStore:fh,useStore:lh,useLocalStore:ch,SidePanelStore:Fk,PivotSidePanelStore:uk,PivotMeasureDisplayPanelStore:RN,ClientFocusStore:TP,GridRenderer:iM};const ZU={DEFAULT_LOCALE:qs,HIGHLIGHT_COLOR:a,PIVOT_TABLE_CONFIG:Ve,ChartTerms:Ky},jU={...px,...RI};e.AbstractCellClipboardHandler=rl,e.AbstractChart=KC,e.AbstractFigureClipboardHandler=Qc,e.CellErrorType=ti,e.ClientDisconnectedError=lL,e.CorePlugin=Bk,e.CoreViewPlugin=jk,e.DispatchResult=Us,e.EvaluationError=si,e.LocalTransportService=BL,e.Model=class extends sh{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},s=[],i=new Ka,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),ko===Mo&&Vo===No&&(Vo=()=>!0),s=wD(e,s);const a=SD(e,n);this.state=new NH,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new Zk(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeData=this.range.getRangeData.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.adaptFormulaStringDependencies=this.range.adaptFormulaStringDependencies.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.selection=new PH(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(const e of DL.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(const e of FL.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(const e of OL.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(const e of _L.getAll()){const t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested||e["[Content_Types].xml"]&&!this.getters.isReadonly()){const e=performance.now();console.debug("Snapshot requested"),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug("Snapshot taken in",performance.now()-e,"ms")}t.markRaw(this),console.debug("Model created in",performance.now()-r,"ms"),console.debug("######")}joinSession(){this.session.join(this.config.client)}async leaveSession(){const e=this.getters.isReadonly()?void 0:ut((()=>this.exportData()));await this.session.leave(e)}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(const o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}for(const o of e.layers)this.renderers[o]||(this.renderers[o]=[]),this.renderers[o].push(t);return t}setupCoreViewPlugin(e){const t=new e(this.coreViewPluginConfig);for(const o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}return t}setupCorePlugin(e,t){const o=new e(this.corePluginConfig);for(const t of e.getters){if(!(t in o))throw new Error(`Invalid getter name: ${t} for plugin ${o.constructor}`);if(t in this.coreGetters)throw new Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=o[t].bind(o)}o.import(t),this.corePlugins.push(o),this.coreHandlers.push(o),this.handlers.push(o)}onRemoteRevisionReceived({commands:e}){for(const t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new cL(_H({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{this.checkDispatchAllowed(e).isSuccessful?(this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1):this.dispatchToHandlers(this.coreHandlers,{type:"UNDO",commands:[e]})}}),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-undone",this,(({commands:e})=>{this.dispatchFromCorePlugin("UNDO",{commands:e}),this.finalize()})),this.session.on("revision-redone",this,(({commands:e})=>{this.dispatchFromCorePlugin("REDO",{commands:e}),this.finalize()})),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.smallUuid(),name:Ho("Anonymous").toString()},o=e.transportService||new BL;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:o,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),raiseBlockingErrorUI:e=>this.trigger("raise-error-ui",{text:e}),customColors:e.customColors||[]}}setupExternalConfig(e){const t=e.loadLocales||(()=>Promise.resolve(Ws));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){const t=Hs(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new Us(t.flat()):Us.Success}checkDispatchAllowedCoreCommand(e){const t=this.corePlugins.map((t=>t.allowDispatch(e)));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map((t=>t.allowDispatch(e)))}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0,this.trigger("command-finalized")}canDispatch=(e,t)=>this.checkDispatchAllowed(LU(e,t));dispatch=(e,t)=>{const o=LU(e,t),s=this.status;if(this.getters.isReadonly()&&(i=o,!Vs.has(i.type)))return new Us("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new Us("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return this.trigger("update"),t;this.status=1;const{changes:s,commands:i}=this.state.recordChanges((()=>{const t=performance.now();Hs(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize();const s=performance.now()-t;s>5&&console.debug(e,s,"ms")}));this.session.save(o,i,s),this.status=0,this.trigger("update");break;case 1:if(Hs(o)){const e=this.checkDispatchAllowed(o);if(!e.isSuccessful)return e;this.state.addCommand(o)}this.dispatchToHandlers(this.handlers,o);break;case 3:throw new Error("Cannot dispatch commands in the finalize state");case 2:if(Hs(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return Us.Success};dispatchFromCorePlugin=(e,t)=>{const o=LU(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,Us.Success};dispatchToHandlers(e,t){const o=Hs(t);for(const s of e)!o&&s instanceof Bk||s.beforeHandle(t);for(const s of e)!o&&s instanceof Bk||s.handle(t);this.trigger("command-dispatched",t)}drawLayer(e,t){const o=this.renderers[t];if(o)for(const s of o)e.ctx.save(),s.drawLayer(e,t),e.ctx.restore()}exportData(){let e=ED();for(const t of this.handlers)t instanceof Bk&&t.export(e);return e.revisionId=this.session.getRevisionId()||Se,e=ze(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...ED(),sheets:[RD(bD,"Sheet1")]};for(const t of this.handlers)t instanceof Uk&&t.exportForExcel(e);return e=ze(e),NU(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=YN,e.Registry=n,e.Revision=aL,e.SPREADSHEET_DIMENSIONS=UU,e.Spreadsheet=wH,e.SpreadsheetPivotTable=JN,e.UIPlugin=qV,e.__info__=HU,e.addFunction=function e(t,o){return AS.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Xs[e])throw new Error(`Layer ${e} already exists`);Xs[e]=t},e.astToFormula=mv,e.chartHelpers=jU,e.compile=BS,e.compileTokens=zS,e.components=GU,e.constants=ZU,e.convertAstNodes=dv,e.coreTypes=Ls,e.findCellInNewZone=Pr,e.functionCache=US,e.helpers=zU,e.hooks=WU,e.invalidateCFEvaluationCommands=Ns,e.invalidateChartEvaluationCommands=Ps,e.invalidateDependenciesCommands=Ms,e.invalidateEvaluationCommands=Fs,e.iterateAstNodes=uv,e.links=$U,e.load=SD,e.parse=cv,e.parseTokens=hv,e.readonlyAllowedCommands=Vs,e.registries=BU,e.setDefaultSheetViewSize=function(e){Pe=e},e.setTranslationMethod=function(e,t=(()=>!0)){ko=e,Vo=t},e.stores=qU,e.tokenColors=AE,e.tokenize=cl,HU.version="18.4.22",HU.date="2025-12-26T10:19:07.786Z",HU.hash="6ddac00"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
3325
+ `}var VU;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(VU||(VU={}));function LU(e,t={}){const o=ze(t);return o.type=e,o}const HU={},UU={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:te,HEADER_WIDTH:oe,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:se,DEFAULT_CELL_HEIGHT:ie,SCROLLBAR_WIDTH:ne},BU={autoCompleteProviders:yE,autofillModifiersRegistry:LV,autofillRulesRegistry:HV,cellMenuRegistry:aF,colMenuRegistry:SP,errorTypes:oi,linkMenuRegistry:xR,functionRegistry:AS,featurePluginRegistry:_L,iconsOnCellRegistry:FV,statefulUIPluginRegistry:OL,coreViewsPluginRegistry:FL,corePluginRegistry:DL,rowMenuRegistry:EP,sidePanelRegistry:Ak,figureRegistry:qx,chartSidePanelComponentRegistry:iN,chartComponentRegistry:rx,chartRegistry:nx,chartSubtypeRegistry:lx,topbarMenuRegistry:HL,topbarComponentRegistry:UL,clickableCellRegistry:PL,otRegistry:jV,inverseCommandRegistry:ML,urlRegistry:zo,cellPopoverRegistry:Yx,numberFormatMenuRegistry:kL,repeatLocalCommandTransformRegistry:wL,repeatCommandTransformRegistry:yL,clipboardHandlersRegistries:eh,pivotRegistry:hk,pivotTimeAdapterRegistry:vc,pivotSidePanelRegistry:pk,pivotNormalizationValueRegistry:jc,supportedPivotPositionalFormulaRegistry:Vk,pivotToFunctionValueRegistry:Yc,migrationStepRegistry:pD,chartJsExtensionRegistry:Eh},zU={arg:td,isEvaluationError:gi,toBoolean:Ei,toJsDate:Ri,toNumber:fi,toString:wi,toNormalizedPivotValue:Gc,toFunctionPivotValue:qc,toXC:Po,toZone:ur,toUnboundedZone:dr,toCartesian:Fo,numberToLetters:wo,lettersToNumber:Io,UuidGenerator:Ka,formatValue:In,createCurrencyFormat:Vn,ColorGenerator:fo,computeTextWidth:Va,createEmptyWorkbookData:ED,createEmptySheet:xD,createEmptyExcelSheet:RD,rgbaToHex:Yt,colorToRGBA:Xt,positionToZone:Mr,isDefined:lt,isMatrix:js,lazy:ut,genericRepeat:IL,createAction:i,createActions:o,transformRangeData:oh,deepEquals:mt,overlap:xr,union:yr,isInside:Er,deepCopy:ze,expandZoneOnInsertion:vr,reduceZoneOnDeletion:Cr,unquote:Ge,getMaxObjectId:kc,getFunctionsFromTokens:qS,getFirstPivotFunction:ZN,getNumberOfPivotFunctions:jN,parseDimension:Hc,isDateOrDatetimeField:Uc,makeFieldProposal:$N,insertTokenAfterArgSeparator:GN,insertTokenAfterLeftParenthesis:WN,mergeContiguousZones:Br,getPivotHighlights:AN,pivotTimeAdapter:bc,UNDO_REDO_PIVOT_COMMANDS:kV,createPivotFormula:$c,areDomainArgsFieldsValid:zc,splitReference:ra,sanitizeSheetName:qe,getUniqueText:Vt,isNumber:Rs,isDateTime:cs},$U={isMarkdownLink:et,parseMarkdownLink:st,markdownLink:ot,openLink:Zo,urlRepresentation:qo},GU={Checkbox:lR,Section:ZE,RoundColorPicker:jE,ChartDataSeries:mM,ChartErrorSection:fM,ChartLabelRange:vM,ChartTitle:EM,ChartPanel:aN,ChartFigure:Gx,ChartJsComponent:XC,Grid:kk,GridOverlay:XP,ScorecardChart:dy,LineConfigPanel:GM,BarConfigPanel:SM,PieChartDesignPanel:ZM,GenericChartConfigPanel:bM,ChartWithAxisDesignPanel:PM,LineChartDesignPanel:WM,GaugeChartConfigPanel:VM,GaugeChartDesignPanel:LM,ScorecardChartConfigPanel:YM,ScorecardChartDesignPanel:XM,GeoChartDesignPanel:zM,RadarChartDesignPanel:jM,WaterfallChartDesignPanel:sN,ComboChartDesignPanel:NM,FunnelChartDesignPanel:kM,ChartTypePicker:nN,FigureComponent:Zx,MenuPopover:zx,Popover:Lx,SelectionInput:oR,ValidationMessages:zP,AddDimensionButton:FN,PivotDimensionGranularity:kN,PivotDimensionOrder:VN,PivotDimension:NN,PivotLayoutConfigurator:UN,PivotHTMLRenderer:Hk,PivotDeferUpdate:DN,PivotTitleSection:BN,CogWheelMenu:MN,TextInput:PN,SidePanelCollapsible:eE,RadioSelection:TM,GeoChartRegionSelectSection:HM,ChartDashboardMenu:$x,FullScreenChart:Lk},WU={useDragAndDropListItems:YE,useHighlights:hN,useHighlightsOnHover:cN},qU={useStoreProvider:ah,DependencyContainer:ih,CellPopoverStore:Xx,ComposerFocusStore:bh,CellComposerStore:MP,FindAndReplaceStore:wN,HighlightStore:IE,DelayedHoveredCellStore:jx,HoveredTableStore:ZP,ModelStore:gh,NotificationStore:xE,RendererStore:mh,SelectionInputStore:tR,SpreadsheetStore:fh,useStore:lh,useLocalStore:ch,SidePanelStore:Fk,PivotSidePanelStore:uk,PivotMeasureDisplayPanelStore:RN,ClientFocusStore:TP,GridRenderer:iM};const ZU={DEFAULT_LOCALE:qs,HIGHLIGHT_COLOR:a,PIVOT_TABLE_CONFIG:Ve,ChartTerms:Ky},jU={...px,...RI};e.AbstractCellClipboardHandler=rl,e.AbstractChart=KC,e.AbstractFigureClipboardHandler=Qc,e.CellErrorType=ti,e.ClientDisconnectedError=lL,e.CorePlugin=Bk,e.CoreViewPlugin=jk,e.DispatchResult=Us,e.EvaluationError=si,e.LocalTransportService=BL,e.Model=class extends sh{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},s=[],i=new Ka,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),ko===Mo&&Vo===No&&(Vo=()=>!0),s=wD(e,s);const a=SD(e,n);this.state=new NH,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new Zk(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeData=this.range.getRangeData.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.adaptFormulaStringDependencies=this.range.adaptFormulaStringDependencies.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.selection=new PH(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(const e of DL.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(const e of FL.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(const e of OL.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(const e of _L.getAll()){const t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested||e["[Content_Types].xml"]&&!this.getters.isReadonly()){const e=performance.now();console.debug("Snapshot requested"),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug("Snapshot taken in",performance.now()-e,"ms")}t.markRaw(this),console.debug("Model created in",performance.now()-r,"ms"),console.debug("######")}joinSession(){this.session.join(this.config.client)}async leaveSession(){const e=this.getters.isReadonly()?void 0:ut((()=>this.exportData()));await this.session.leave(e)}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(const o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}for(const o of e.layers)this.renderers[o]||(this.renderers[o]=[]),this.renderers[o].push(t);return t}setupCoreViewPlugin(e){const t=new e(this.coreViewPluginConfig);for(const o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}return t}setupCorePlugin(e,t){const o=new e(this.corePluginConfig);for(const t of e.getters){if(!(t in o))throw new Error(`Invalid getter name: ${t} for plugin ${o.constructor}`);if(t in this.coreGetters)throw new Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=o[t].bind(o)}o.import(t),this.corePlugins.push(o),this.coreHandlers.push(o),this.handlers.push(o)}onRemoteRevisionReceived({commands:e}){for(const t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new cL(_H({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{this.checkDispatchAllowed(e).isSuccessful?(this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1):this.dispatchToHandlers(this.coreHandlers,{type:"UNDO",commands:[e]})}}),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-undone",this,(({commands:e})=>{this.dispatchFromCorePlugin("UNDO",{commands:e}),this.finalize()})),this.session.on("revision-redone",this,(({commands:e})=>{this.dispatchFromCorePlugin("REDO",{commands:e}),this.finalize()})),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.smallUuid(),name:Ho("Anonymous").toString()},o=e.transportService||new BL;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:o,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),raiseBlockingErrorUI:e=>this.trigger("raise-error-ui",{text:e}),customColors:e.customColors||[]}}setupExternalConfig(e){const t=e.loadLocales||(()=>Promise.resolve(Ws));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){const t=Hs(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new Us(t.flat()):Us.Success}checkDispatchAllowedCoreCommand(e){const t=this.corePlugins.map((t=>t.allowDispatch(e)));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map((t=>t.allowDispatch(e)))}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0,this.trigger("command-finalized")}canDispatch=(e,t)=>this.checkDispatchAllowed(LU(e,t));dispatch=(e,t)=>{const o=LU(e,t),s=this.status;if(this.getters.isReadonly()&&(i=o,!Vs.has(i.type)))return new Us("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new Us("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return this.trigger("update"),t;this.status=1;const{changes:s,commands:i}=this.state.recordChanges((()=>{const t=performance.now();Hs(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize();const s=performance.now()-t;s>5&&console.debug(e,s,"ms")}));this.session.save(o,i,s),this.status=0,this.trigger("update");break;case 1:if(Hs(o)){const e=this.checkDispatchAllowed(o);if(!e.isSuccessful)return e;this.state.addCommand(o)}this.dispatchToHandlers(this.handlers,o);break;case 3:throw new Error("Cannot dispatch commands in the finalize state");case 2:if(Hs(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return Us.Success};dispatchFromCorePlugin=(e,t)=>{const o=LU(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,Us.Success};dispatchToHandlers(e,t){const o=Hs(t);for(const s of e)!o&&s instanceof Bk||s.beforeHandle(t);for(const s of e)!o&&s instanceof Bk||s.handle(t);this.trigger("command-dispatched",t)}drawLayer(e,t){const o=this.renderers[t];if(o)for(const s of o)e.ctx.save(),s.drawLayer(e,t),e.ctx.restore()}exportData(){let e=ED();for(const t of this.handlers)t instanceof Bk&&t.export(e);return e.revisionId=this.session.getRevisionId()||Se,e=ze(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...ED(),sheets:[RD(bD,"Sheet1")]};for(const t of this.handlers)t instanceof Uk&&t.exportForExcel(e);return e=ze(e),NU(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=YN,e.Registry=n,e.Revision=aL,e.SPREADSHEET_DIMENSIONS=UU,e.Spreadsheet=wH,e.SpreadsheetPivotTable=JN,e.UIPlugin=qV,e.__info__=HU,e.addFunction=function e(t,o){return AS.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Xs[e])throw new Error(`Layer ${e} already exists`);Xs[e]=t},e.astToFormula=mv,e.chartHelpers=jU,e.compile=BS,e.compileTokens=zS,e.components=GU,e.constants=ZU,e.convertAstNodes=dv,e.coreTypes=Ls,e.findCellInNewZone=Pr,e.functionCache=US,e.helpers=zU,e.hooks=WU,e.invalidateCFEvaluationCommands=Ns,e.invalidateChartEvaluationCommands=Ps,e.invalidateDependenciesCommands=Ms,e.invalidateEvaluationCommands=Fs,e.iterateAstNodes=uv,e.links=$U,e.load=SD,e.parse=cv,e.parseTokens=hv,e.readonlyAllowedCommands=Vs,e.registries=BU,e.setDefaultSheetViewSize=function(e){Pe=e},e.setTranslationMethod=function(e,t=(()=>!0)){ko=e,Vo=t},e.stores=qU,e.tokenColors=AE,e.tokenize=cl,HU.version="18.4.23",HU.date="2026-01-07T16:21:07.502Z",HU.hash="a0135e8"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
@@ -2,9 +2,9 @@
2
2
  /*
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.4.22
6
- * @date 2025-12-26T10:19:54.795Z
7
- * @hash 6ddac00
5
+ * @version 18.4.23
6
+ * @date 2026-01-07T16:22:01.801Z
7
+ * @hash a0135e8
8
8
  */
9
9
  /* Originates from src/components/top_bar/top_bar.scss */
10
10
  @media (max-width: 1200px) {
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 18.4.22
5
- @date 2025-12-26T10:19:54.046Z
6
- @hash 6ddac00
4
+ @version 18.4.23
5
+ @date 2026-01-07T16:22:00.962Z
6
+ @hash a0135e8
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -5728,7 +5728,6 @@
5728
5728
  onGridResized.bind="onGridResized"
5729
5729
  onGridMoved.bind="moveCanvas"
5730
5730
  gridOverlayDimensions="gridOverlayDimensions"
5731
- getGridSize="props.getGridSize"
5732
5731
  />
5733
5732
  <HeadersOverlay onOpenContextMenu="(type, x, y) => this.toggleContextMenu(type, x, y)"/>
5734
5733
  <GridComposer
@@ -6199,8 +6198,7 @@
6199
6198
  <GridOverlay
6200
6199
  onGridResized.bind="onGridResized"
6201
6200
  onGridMoved.bind="moveCanvas"
6202
- gridOverlayDimensions="gridOverlayDimensions"
6203
- getGridSize="props.getGridSize">
6201
+ gridOverlayDimensions="gridOverlayDimensions">
6204
6202
  <div
6205
6203
  t-foreach="getClickableCells()"
6206
6204
  t-as="clickableCell"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.4.22",
3
+ "version": "18.4.23",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",