@odoo/o-spreadsheet 19.1.18 → 19.1.19

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 19.1.18
6
- * @date 2026-05-11T13:46:49.289Z
7
- * @hash a849339
5
+ * @version 19.1.19
6
+ * @date 2026-05-12T12:20:42.167Z
7
+ * @hash aea4a8c
8
8
  */
9
9
 
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -79184,6 +79184,6 @@ exports.stores = stores;
79184
79184
  exports.tokenColors = tokenColors;
79185
79185
  exports.tokenize = tokenize;
79186
79186
 
79187
- __info__.version = "19.1.18";
79188
- __info__.date = "2026-05-11T13:46:49.289Z";
79189
- __info__.hash = "a849339";
79187
+ __info__.version = "19.1.19";
79188
+ __info__.date = "2026-05-12T12:20:42.167Z";
79189
+ __info__.hash = "aea4a8c";
@@ -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 19.1.18
6
- * @date 2026-05-11T13:46:51.071Z
7
- * @hash a849339
5
+ * @version 19.1.19
6
+ * @date 2026-05-12T12:20:43.807Z
7
+ * @hash aea4a8c
8
8
  */
9
9
  :root {
10
10
  --os-gray-100: light-dark(#f9fafb, #1b1d26);
@@ -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 19.1.18
6
- * @date 2026-05-11T13:46:49.289Z
7
- * @hash a849339
5
+ * @version 19.1.19
6
+ * @date 2026-05-12T12:20:42.167Z
7
+ * @hash aea4a8c
8
8
  */
9
9
 
10
10
  import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, whenReady, xml } from "@odoo/owl";
@@ -78946,6 +78946,6 @@ const chartHelpers = {
78946
78946
  //#endregion
78947
78947
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
78948
78948
 
78949
- __info__.version = "19.1.18";
78950
- __info__.date = "2026-05-11T13:46:49.289Z";
78951
- __info__.hash = "a849339";
78949
+ __info__.version = "19.1.19";
78950
+ __info__.date = "2026-05-12T12:20:42.167Z";
78951
+ __info__.hash = "aea4a8c";
@@ -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 19.1.18
6
- * @date 2026-05-11T13:46:49.289Z
7
- * @hash a849339
5
+ * @version 19.1.19
6
+ * @date 2026-05-12T12:20:42.167Z
7
+ * @hash aea4a8c
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -79001,8 +79001,8 @@ exports.stores = stores;
79001
79001
  exports.tokenColors = tokenColors;
79002
79002
  exports.tokenize = tokenize;
79003
79003
 
79004
- __info__.version = "19.1.18";
79005
- __info__.date = "2026-05-11T13:46:49.289Z";
79006
- __info__.hash = "a849339";
79004
+ __info__.version = "19.1.19";
79005
+ __info__.date = "2026-05-12T12:20:42.167Z";
79006
+ __info__.hash = "aea4a8c";
79007
79007
 
79008
79008
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -932,4 +932,4 @@ You can download it directly instead.`,5),sticky:!1,type:`warning`});return}r=aw
932
932
  <Relationships xmlns="${ou.Relationships}">
933
933
  <Relationship ${Z(e)} />
934
934
  </Relationships>
935
- `),`_rels/.rels`)}function XX(e){let t={},n=[];for(let r of e.sheets){let e=r.name.slice(0,31);e=zt(e,n,{compute:(e,t)=>e.slice(0,31-String(t).length)+t}),n.push(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${Ge(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function ZX(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>On(un(e.range)).numberOfRows>1);return e}var QX=class extends er{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},t={},n=[],r=new Gl,i=!1){let a=performance.now();console.debug(`##### Model creation #####`),super(),la(),n=hP(e,n);let o=sP(e,i);this.state=new fY,this.uuidGenerator=r,this.config=this.setupConfig(t),this.session=this.setupSession(o.revisionId),this.coreGetters={},this.range=new lY(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.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new dY(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(let e of uq.getAll())this.setupCorePlugin(e,o);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(n);for(let e of pq.getAll()){let t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of fq.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of dq.getAll()){let 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(),t.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}console.debug(`Model created in`,performance.now()-a,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:mt(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCoreViewPlugin(e){let t=new e(this.coreViewPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new MK(oY({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1}}),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){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:k(`Anonymous`).toString()},n=e.transportService||new dJ,r=e.mode===`readonly`||e.mode===`dashboard`;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:r?new QJ(n):n,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){let t=e.loadLocales||(()=>Promise.resolve(uo));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,custom:this.config.custom,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){let t=Hs(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new Ws(t.flat()):Ws.Success}checkDispatchAllowedCoreCommand(e){let 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(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed($X(e,t));dispatch=(e,t)=>{let n=$X(e,t),r=this.status;if(this.getters.isReadonly()&&!Us(n))return new Ws(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new Ws(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();Hs(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(Hs(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(Hs(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return Ws.Success};dispatchFromCorePlugin=(e,t)=>{let n=$X(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,Ws.Success};dispatchToHandlers(e,t){let n=Hs(t);for(let r of e)!n&&r instanceof dW||r.beforeHandle(t);for(let r of e)!n&&r instanceof dW||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=SP();for(let t of this.handlers)t instanceof dW&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=b(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}async exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=wP();for(let t of this.handlers)t instanceof sb&&await t.exportForExcel(e);return e=b(e),VX(e)}};function $X(e,t={}){let n=b(t);return n.type=e,n}function eZ(e){return!WV.includes(e.horizontalGroupBy)||!WV.includes(e.verticalGroupBy)?`InvalidChartDefinition`:`Success`}var tZ=class e extends Af{dataSets;labelRange;background;type=`calendar`;showValues;colorScale;axesDesign;horizontalGroupBy;verticalGroupBy;legendPosition;missingValueColor;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.showValues=e.showValues,this.colorScale=e.colorScale,this.axesDesign=e.axesDesign,this.horizontalGroupBy=e.horizontalGroupBy,this.verticalGroupBy=e.verticalGroupBy,this.legendPosition=e.legendPosition,this.missingValueColor=e.missingValueColor}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld,eZ)}static getDefinitionFromContextCreation(e){let t=`left`;return e.legendPosition===`right`&&(t=`right`),{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,title:e.title||{text:``},type:`calendar`,labelRange:e.auxiliaryRange||void 0,showValues:e.showValues,axesDesign:e.axesDesign,legendPosition:t,horizontalGroupBy:`day_of_week`,verticalGroupBy:`month_number`}}getContextCreation(){let e=[{dataRange:this.getters.getRangeString(this.dataSets[0].dataRange,this.sheetId)}];return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=e.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,n||this.sheetId)}));return{type:`calendar`,background:this.background,dataSets:r,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,showValues:this.showValues,colorScale:this.colorScale,axesDesign:this.axesDesign,horizontalGroupBy:this.horizontalGroupBy,verticalGroupBy:this.verticalGroupBy,legendPosition:this.legendPosition,missingValueColor:this.missingValueColor}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function nZ(e,t){let n=e.getDefinition(),r=Hh(n,e.dataSets,e.labelRange,t),{labels:i,datasets:a}=Zd(n,r);return{chartJsConfig:{type:`calendar`,data:{labels:i,datasets:a},options:{...Vp,indexAxis:`x`,layout:Eg(n,r),scales:Pd(n,a),plugins:{title:Gg(n,t),legend:{display:!1},tooltip:Xg(n,r),chartShowValuesPlugin:Bg(n,r),chartColorScalePlugin:Fd(n,r)},chartBackground:n.background||`#FFFFFF`}},background:e.background||`#FFFFFF`}}var rZ=class e extends Af{dataSets;labelRange;background;legendPosition;aggregated;dataSetsHaveTitle;dataSetDesign;axesDesign;type=`combo`;showValues;hideDataMarkers;zoomable;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.axesDesign=e.axesDesign,this.showValues=e.showValues,this.hideDataMarkers=e.hideDataMarkers,this.zoomable=e.zoomable}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId),type:this.dataSetDesign?.[t]?.type??(t?`line`:`bar`)});return{type:`combo`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,aggregated:this.aggregated,axesDesign:this.axesDesign,showValues:this.showValues,hideDataMarkers:this.hideDataMarkers,zoomable:this.zoomable,humanize:this.humanize}}getDefinitionForExcel(){let{dataSets:e,labelRange:t}=this.getCommonDataSetAttributesForExcel(this.labelRange,this.dataSets,ud(this.labelRange,this.dataSets[0],this.dataSetsHaveTitle)),n=this.getDefinition();return{...n,backgroundColor:V(this.background||`#FFFFFF`),fontColor:V(od(this.background)),dataSets:e,labelRange:t,verticalAxis:fd(n)}}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}static getDefinitionFromContextCreation(e){let t=(e.range??[]).map((e,t)=>({...e,type:t?`line`:`bar`}));return{background:e.background,dataSets:t,dataSetsHaveTitle:e.dataSetsHaveTitle??!1,aggregated:e.aggregated,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},labelRange:e.auxiliaryRange||void 0,type:`combo`,axesDesign:e.axesDesign,showValues:e.showValues,hideDataMarkers:e.hideDataMarkers,zoomable:e.zoomable,humanize:e.humanize}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}};function iZ(e,t){let n=e.getDefinition(),r=zh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`bar`,data:{labels:r.labels,datasets:nf(n,r)},options:{...Vp,layout:Tg(n,r),scales:Nd(n,r),plugins:{title:Gg(n,t),legend:Mg(n,r),tooltip:Yg(n,r),chartShowValuesPlugin:zg(n,r)}}},background:e.background||`#FFFFFF`}}var aZ=class e extends Af{dataSets;labelRange;background;legendPosition;aggregated;type=`funnel`;dataSetsHaveTitle;dataSetDesign;axesDesign;horizontal=!0;showValues;funnelColors;cumulative;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.axesDesign=e.axesDesign,this.showValues=e.showValues,this.horizontal=!0,this.funnelColors=e.funnelColors,this.cumulative=e.cumulative}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,aggregated:e.aggregated??!1,legendPosition:`none`,title:e.title||{text:``},type:`funnel`,labelRange:e.auxiliaryRange||void 0,showValues:e.showValues,axesDesign:e.axesDesign,funnelColors:e.funnelColors,horizontal:!0,cumulative:e.cumulative,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`funnel`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,aggregated:this.aggregated,horizontal:this.horizontal,axesDesign:this.axesDesign,showValues:this.showValues,funnelColors:this.funnelColors,cumulative:this.cumulative,humanize:this.humanize}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function oZ(e,t){let n=e.getDefinition(),r=Jh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`funnel`,data:{labels:r.labels,datasets:of(n,r)},options:{...Vp,indexAxis:`y`,layout:Tg(n,r),scales:Hd(n,r),plugins:{title:Gg(n,t),legend:{display:!1},tooltip:r_(n,r),chartShowValuesPlugin:zg(n,r)}}},background:e.background||`#FFFFFF`}}var sZ=class e extends Af{dataSets;labelRange;background;legendPosition;type=`geo`;dataSetsHaveTitle;dataSetDesign;colorScale;missingValueColor;region;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.colorScale=e.colorScale,this.missingValueColor=e.missingValueColor,this.region=e.region}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`geo`,labelRange:e.auxiliaryRange||void 0,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`geo`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,colorScale:this.colorScale,missingValueColor:this.missingValueColor,region:this.region,humanize:this.humanize}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function cZ(e,t){let n=e.getDefinition(),r=qh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`choropleth`,data:{datasets:af(n,r)},options:{...Vp,layout:Tg(n,r),scales:Vd(n,r),plugins:{title:Gg(n,t),tooltip:n_(n,r),legend:{display:!1}}}},background:e.background||`#FFFFFF`}}var lZ=class e extends Af{dataSets;labelRange;background;legendPosition;aggregated;type=`pyramid`;dataSetsHaveTitle;dataSetDesign;axesDesign;horizontal=!0;stacked=!0;showValues;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.axesDesign=e.axesDesign,this.showValues=e.showValues}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,aggregated:e.aggregated??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`pyramid`,labelRange:e.auxiliaryRange||void 0,axesDesign:e.axesDesign,horizontal:!0,stacked:!0,showValues:e.showValues,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`pyramid`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,aggregated:this.aggregated,axesDesign:this.axesDesign,horizontal:!0,stacked:!0,showValues:this.showValues,humanize:this.humanize}}getDefinitionForExcel(e){let{dataSets:t,labelRange:n}=this.getCommonDataSetAttributesForExcel(this.labelRange,this.dataSets,ud(this.labelRange,this.dataSets[0],this.dataSetsHaveTitle)),r=this.getDefinition(),{dataSetsValues:i}=Uh(r,this.dataSets,this.labelRange,e),a=Math.max(...i.map(e=>Math.max(...e.data.map(Math.abs))));return{...r,horizontal:!0,backgroundColor:V(this.background||`#FFFFFF`),fontColor:V(od(this.background)),dataSets:t,labelRange:n,verticalAxis:fd(r),maxValue:a}}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function uZ(e,t){let n=e.getDefinition(),r=Uh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`bar`,data:{labels:r.labels,datasets:Xd(n,r)},options:{...Vp,indexAxis:`y`,layout:Tg(n,r),scales:zd(n,r),plugins:{title:Gg(n,t),legend:Og(n,r),tooltip:e_(n,r),chartShowValuesPlugin:Hg(n,r)}}},background:e.background||`#FFFFFF`}}var dZ=class e extends Af{dataSets;labelRange;background;legendPosition;stacked;aggregated;type=`radar`;dataSetsHaveTitle;dataSetDesign;fillArea;showValues;hideDataMarkers;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.stacked=e.stacked,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.fillArea=e.fillArea,this.showValues=e.showValues,this.hideDataMarkers=e.hideDataMarkers}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,stacked:e.stacked??!1,aggregated:e.aggregated??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`radar`,labelRange:e.auxiliaryRange||void 0,fillArea:e.fillArea??!1,showValues:e.showValues??!1,hideDataMarkers:e.hideDataMarkers,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`radar`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,stacked:this.stacked,aggregated:this.aggregated,fillArea:this.fillArea,showValues:this.showValues,hideDataMarkers:this.hideDataMarkers,humanize:this.humanize}}getDefinitionForExcel(){let{dataSets:e,labelRange:t}=this.getCommonDataSetAttributesForExcel(this.labelRange,this.dataSets,ud(this.labelRange,this.dataSets[0],this.dataSetsHaveTitle));return{...this.getDefinition(),backgroundColor:V(this.background||`#FFFFFF`),fontColor:V(od(this.background)),dataSets:e,labelRange:t}}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function fZ(e,t){let n=e.getDefinition(),r=Kh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`radar`,data:{labels:r.labels,datasets:rf(n,r)},options:{...Vp,layout:Tg(n,r),scales:Bd(n,r),plugins:{title:Gg(n,t),legend:Pg(n,r),tooltip:t_(n,r),chartShowValuesPlugin:zg(n,r)}}},background:e.background||`#FFFFFF`}}var pZ=class e extends Af{dataSets;labelRange;background;legendPosition;type=`sunburst`;dataSetsHaveTitle;showValues;showLabels;valuesDesign;groupColors;pieHolePercentage;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.showValues=e.showValues,this.showLabels=e.showLabels,this.valuesDesign=e.valuesDesign,this.groupColors=e.groupColors,this.pieHolePercentage=e.pieHolePercentage}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){let t=[];return e.hierarchicalRanges?.length?t.push(...e.hierarchicalRanges):e.auxiliaryRange&&t.push({...e.range?.[0],dataRange:e.auxiliaryRange}),{background:e.background,dataSets:t,dataSetsHaveTitle:e.dataSetsHaveTitle??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`sunburst`,labelRange:e.range?.[0]?.dataRange,showValues:e.showValues,showLabels:e.showLabels,valuesDesign:e.valuesDesign,groupColors:e.groupColors,humanize:e.humanize}}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getContextCreation(){let e=this.dataSets.at(-1)?.dataRange;return{...this,range:this.labelRange?[{dataRange:this.getters.getRangeString(this.labelRange,this.sheetId)}]:[],auxiliaryRange:e?this.getters.getRangeString(e,this.sheetId):void 0,hierarchicalRanges:this.dataSets.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,this.sheetId)}))}}getDefinitionWithSpecificDataSets(e,t,n){return{type:`sunburst`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:e.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,n||this.sheetId)})),legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,showValues:this.showValues,showLabels:this.showLabels,valuesDesign:this.valuesDesign,groupColors:this.groupColors,pieHolePercentage:this.pieHolePercentage,humanize:this.humanize}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function mZ(e,t){let n=e.getDefinition(),r=Yh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`doughnut`,data:{datasets:cf(n,r)},options:{cutout:e.pieHolePercentage===void 0?`25%`:`${e.pieHolePercentage}%`,...Vp,layout:Tg(n,r),plugins:{title:Gg(n,t),legend:Fg(n,r),tooltip:i_(n,r),sunburstLabelsPlugin:Vg(n,r),sunburstHoverPlugin:{enabled:!0}}}},background:e.background||`#FFFFFF`}}var hZ=class e extends Af{static defaults={background:oe,legendPosition:`top`,dataSetsHaveTitle:!1,showHeaders:!0,headersColor:`#000000`};dataSets;labelRange;background;legendPosition;type=`treemap`;dataSetsHaveTitle;showHeaders;headerDesign;showValues;showLabels;valuesDesign;coloringOptions;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.showHeaders=e.showHeaders,this.headerDesign=e.headerDesign,this.showValues=e.showValues,this.showLabels=e.showLabels,this.valuesDesign=e.valuesDesign,this.coloringOptions=e.coloringOptions}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){let t=[];return e.hierarchicalRanges?.length?t.push(...e.hierarchicalRanges):e.auxiliaryRange&&t.push({...e.range?.[0],dataRange:e.auxiliaryRange}),{background:e.background,dataSets:t,dataSetsHaveTitle:e.dataSetsHaveTitle??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`treemap`,labelRange:e.range?.[0]?.dataRange,showValues:e.showValues,showHeaders:e.showHeaders,headerDesign:e.headerDesign,showLabels:e.showLabels,valuesDesign:e.valuesDesign,coloringOptions:e.treemapColoringOptions,humanize:e.humanize}}getContextCreation(){let e=this.dataSets.at(-1)?.dataRange;return{...this,range:this.labelRange?[{dataRange:this.getters.getRangeString(this.labelRange,this.sheetId)}]:[],auxiliaryRange:e?this.getters.getRangeString(e,this.sheetId):void 0,hierarchicalRanges:this.dataSets.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,this.sheetId)}))}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=e.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,n||this.sheetId)}));return{type:`treemap`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,showValues:this.showValues,showHeaders:this.showHeaders,headerDesign:this.headerDesign,showLabels:this.showLabels,valuesDesign:this.valuesDesign,coloringOptions:this.coloringOptions,humanize:this.humanize}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function gZ(e,t){let n=e.getDefinition(),r=Yh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`treemap`,data:{labels:r.labels,datasets:pf(n,r)},options:{...Vp,layout:Tg(n,r),plugins:{title:Gg(n,t),legend:{display:!1},tooltip:a_(n,r)}}},background:e.background||`#FFFFFF`}}f_.add(`bar`,{match:e=>e===`bar`,createChart:(e,t,n)=>new u_(e,t,n),getChartRuntime:d_,validateChartDefinition:u_.validateChartDefinition,transformDefinition:u_.transformDefinition,getChartDefinitionFromContextCreation:u_.getDefinitionFromContextCreation,sequence:10}),f_.add(`combo`,{match:e=>e===`combo`,createChart:(e,t,n)=>new rZ(e,t,n),getChartRuntime:iZ,validateChartDefinition:rZ.validateChartDefinition,transformDefinition:rZ.transformDefinition,getChartDefinitionFromContextCreation:rZ.getDefinitionFromContextCreation,sequence:15}),f_.add(`line`,{match:e=>e===`line`,createChart:(e,t,n)=>new k_(e,t,n),getChartRuntime:A_,validateChartDefinition:k_.validateChartDefinition,transformDefinition:k_.transformDefinition,getChartDefinitionFromContextCreation:k_.getDefinitionFromContextCreation,sequence:20}),f_.add(`pie`,{match:e=>e===`pie`,createChart:(e,t,n)=>new j_(e,t,n),getChartRuntime:M_,validateChartDefinition:j_.validateChartDefinition,transformDefinition:j_.transformDefinition,getChartDefinitionFromContextCreation:j_.getDefinitionFromContextCreation,sequence:30}),f_.add(`scorecard`,{match:e=>e===`scorecard`,createChart:(e,t,n)=>new Bf(e,t,n),getChartRuntime:Hf,validateChartDefinition:Bf.validateChartDefinition,transformDefinition:Bf.transformDefinition,getChartDefinitionFromContextCreation:Bf.getDefinitionFromContextCreation,sequence:40}),f_.add(`gauge`,{match:e=>e===`gauge`,createChart:(e,t,n)=>new C_(e,t,n),getChartRuntime:w_,validateChartDefinition:C_.validateChartDefinition,transformDefinition:C_.transformDefinition,getChartDefinitionFromContextCreation:C_.getDefinitionFromContextCreation,sequence:50}),f_.add(`scatter`,{match:e=>e===`scatter`,createChart:(e,t,n)=>new lH(e,t,n),getChartRuntime:uH,validateChartDefinition:lH.validateChartDefinition,transformDefinition:lH.transformDefinition,getChartDefinitionFromContextCreation:lH.getDefinitionFromContextCreation,sequence:60}),f_.add(`waterfall`,{match:e=>e===`waterfall`,createChart:(e,t,n)=>new N_(e,t,n),getChartRuntime:P_,validateChartDefinition:N_.validateChartDefinition,transformDefinition:N_.transformDefinition,getChartDefinitionFromContextCreation:N_.getDefinitionFromContextCreation,sequence:70}),f_.add(`pyramid`,{match:e=>e===`pyramid`,createChart:(e,t,n)=>new lZ(e,t,n),getChartRuntime:uZ,validateChartDefinition:lZ.validateChartDefinition,transformDefinition:lZ.transformDefinition,getChartDefinitionFromContextCreation:lZ.getDefinitionFromContextCreation,sequence:80,dataSeriesLimit:2}),f_.add(`radar`,{match:e=>e===`radar`,createChart:(e,t,n)=>new dZ(e,t,n),getChartRuntime:fZ,validateChartDefinition:dZ.validateChartDefinition,transformDefinition:dZ.transformDefinition,getChartDefinitionFromContextCreation:dZ.getDefinitionFromContextCreation,sequence:80}),f_.add(`geo`,{match:e=>e===`geo`,createChart:(e,t,n)=>new sZ(e,t,n),getChartRuntime:cZ,validateChartDefinition:sZ.validateChartDefinition,transformDefinition:sZ.transformDefinition,getChartDefinitionFromContextCreation:sZ.getDefinitionFromContextCreation,sequence:90,dataSeriesLimit:1}),f_.add(`funnel`,{match:e=>e===`funnel`,createChart:(e,t,n)=>new aZ(e,t,n),getChartRuntime:oZ,validateChartDefinition:aZ.validateChartDefinition,transformDefinition:aZ.transformDefinition,getChartDefinitionFromContextCreation:aZ.getDefinitionFromContextCreation,sequence:100,dataSeriesLimit:1}),f_.add(`sunburst`,{match:e=>e===`sunburst`,createChart:(e,t,n)=>new pZ(e,t,n),getChartRuntime:mZ,validateChartDefinition:pZ.validateChartDefinition,transformDefinition:pZ.transformDefinition,getChartDefinitionFromContextCreation:pZ.getDefinitionFromContextCreation,sequence:30}),f_.add(`treemap`,{match:e=>e===`treemap`,createChart:(e,t,n)=>new hZ(e,t,n),getChartRuntime:gZ,validateChartDefinition:hZ.validateChartDefinition,transformDefinition:hZ.transformDefinition,getChartDefinitionFromContextCreation:hZ.getDefinitionFromContextCreation,sequence:100}),f_.add(`calendar`,{match:e=>e===`calendar`,createChart:(e,t,n)=>new tZ(e,t,n),getChartRuntime:(e,t)=>nZ(e,t),validateChartDefinition:tZ.validateChartDefinition,transformDefinition:tZ.transformDefinition,getChartDefinitionFromContextCreation:tZ.getDefinitionFromContextCreation,sequence:110,dataSeriesLimit:1}),K_.add(`line`,{matcher:e=>e.type===`line`&&!e.stacked&&!e.fillArea,displayName:k(`Line`),chartType:`line`,chartSubtype:`line`,subtypeDefinition:{stacked:!1,fillArea:!1},category:`line`,preview:`o-spreadsheet-ChartPreview.LINE_CHART`}).add(`stacked_line`,{matcher:e=>e.type===`line`&&!e.fillArea&&!!e.stacked,displayName:k(`Stacked Line`),chartType:`line`,chartSubtype:`stacked_line`,subtypeDefinition:{stacked:!0,fillArea:!1},category:`line`,preview:`o-spreadsheet-ChartPreview.STACKED_LINE_CHART`}).add(`area`,{matcher:e=>e.type===`line`&&!e.stacked&&!!e.fillArea,displayName:k(`Area`),chartType:`line`,chartSubtype:`area`,subtypeDefinition:{stacked:!1,fillArea:!0},category:`area`,preview:`o-spreadsheet-ChartPreview.AREA_CHART`}).add(`stacked_area`,{matcher:e=>e.type===`line`&&e.stacked&&!!e.fillArea,displayName:k(`Stacked Area`),chartType:`line`,chartSubtype:`stacked_area`,subtypeDefinition:{stacked:!0,fillArea:!0},category:`area`,preview:`o-spreadsheet-ChartPreview.STACKED_AREA_CHART`}).add(`scatter`,{displayName:k(`Scatter`),chartType:`scatter`,chartSubtype:`scatter`,category:`misc`,preview:`o-spreadsheet-ChartPreview.SCATTER_CHART`}).add(`column`,{matcher:e=>e.type===`bar`&&!e.stacked&&!e.horizontal,displayName:k(`Column`),chartType:`bar`,chartSubtype:`column`,subtypeDefinition:{stacked:!1,horizontal:!1},category:`column`,preview:`o-spreadsheet-ChartPreview.COLUMN_CHART`}).add(`stacked_column`,{matcher:e=>e.type===`bar`&&e.stacked&&!e.horizontal,displayName:k(`Stacked Column`),chartType:`bar`,chartSubtype:`stacked_column`,subtypeDefinition:{stacked:!0,horizontal:!1},category:`column`,preview:`o-spreadsheet-ChartPreview.STACKED_COLUMN_CHART`}).add(`bar`,{matcher:e=>e.type===`bar`&&!e.stacked&&!!e.horizontal,displayName:k(`Bar`),chartType:`bar`,chartSubtype:`bar`,subtypeDefinition:{horizontal:!0,stacked:!1},category:`bar`,preview:`o-spreadsheet-ChartPreview.BAR_CHART`}).add(`stacked_bar`,{matcher:e=>e.type===`bar`&&e.stacked&&!!e.horizontal,displayName:k(`Stacked Bar`),chartType:`bar`,chartSubtype:`stacked_bar`,subtypeDefinition:{horizontal:!0,stacked:!0},category:`bar`,preview:`o-spreadsheet-ChartPreview.STACKED_BAR_CHART`}).add(`combo`,{displayName:k(`Combo`),chartSubtype:`combo`,chartType:`combo`,category:`line`,preview:`o-spreadsheet-ChartPreview.COMBO_CHART`}).add(`pie`,{matcher:e=>e.type===`pie`&&!e.isDoughnut,displayName:k(`Pie`),chartSubtype:`pie`,chartType:`pie`,subtypeDefinition:{isDoughnut:!1},category:`pie`,preview:`o-spreadsheet-ChartPreview.PIE_CHART`}).add(`doughnut`,{matcher:e=>e.type===`pie`&&!!e.isDoughnut,displayName:k(`Doughnut`),chartSubtype:`doughnut`,chartType:`pie`,subtypeDefinition:{isDoughnut:!0},category:`pie`,preview:`o-spreadsheet-ChartPreview.DOUGHNUT_CHART`}).add(`gauge`,{displayName:k(`Gauge`),chartSubtype:`gauge`,chartType:`gauge`,category:`misc`,preview:`o-spreadsheet-ChartPreview.GAUGE_CHART`}).add(`scorecard`,{displayName:k(`Scorecard`),chartSubtype:`scorecard`,chartType:`scorecard`,category:`misc`,preview:`o-spreadsheet-ChartPreview.SCORECARD_CHART`}).add(`waterfall`,{displayName:k(`Waterfall`),chartSubtype:`waterfall`,chartType:`waterfall`,category:`misc`,preview:`o-spreadsheet-ChartPreview.WATERFALL_CHART`}).add(`pyramid`,{displayName:k(`Population Pyramid`),chartSubtype:`pyramid`,chartType:`pyramid`,category:`misc`,preview:`o-spreadsheet-ChartPreview.POPULATION_PYRAMID_CHART`}).add(`radar`,{matcher:e=>e.type===`radar`&&!e.fillArea,displayName:k(`Radar`),chartSubtype:`radar`,chartType:`radar`,subtypeDefinition:{fillArea:!1},category:`misc`,preview:`o-spreadsheet-ChartPreview.RADAR_CHART`}).add(`filled_radar`,{matcher:e=>e.type===`radar`&&!!e.fillArea,displayName:k(`Filled Radar`),chartType:`radar`,chartSubtype:`filled_radar`,subtypeDefinition:{fillArea:!0},category:`misc`,preview:`o-spreadsheet-ChartPreview.FILLED_RADAR_CHART`}).add(`geo`,{displayName:k(`Geo Chart`),chartSubtype:`geo`,chartType:`geo`,category:`misc`,preview:`o-spreadsheet-ChartPreview.GEO_CHART`}).add(`funnel`,{displayName:k(`Funnel`),chartSubtype:`funnel`,chartType:`funnel`,category:`misc`,preview:`o-spreadsheet-ChartPreview.FUNNEL_CHART`}).add(`sunburst`,{matcher:e=>e.type===`sunburst`,displayName:k(`Sunburst`),chartSubtype:`sunburst`,chartType:`sunburst`,category:`hierarchical`,preview:`o-spreadsheet-ChartPreview.SUNBURST_CHART`}).add(`treemap`,{matcher:e=>e.type===`treemap`,displayName:k(`Tree Map`),chartType:`treemap`,chartSubtype:`treemap`,category:`hierarchical`,preview:`o-spreadsheet-ChartPreview.TREE_MAP_CHART`}).add(`calendar`,{displayName:k(`Calendar`),chartSubtype:`calendar`,chartType:`calendar`,category:`misc`,preview:`o-spreadsheet-ChartPreview.CALENDAR_CHART`});var _Z=class extends DG{queuedBordersToAdd={};copy(e){let t=e.sheetId;if(e.zones.length===0)return;let{rowsIndexes:n,columnsIndexes:r}=e,i=[];for(let e of n){let n=[];for(let i of r){let r={col:i,row:e,sheetId:t};n.push(this.getters.getCellBorder(r))}i.push(n)}return{borders:i}}paste(e,t,n){let r=e.sheetId;if(n.pasteOption===`asValue`)return;let i=e.zones;if(!n.isCutOperation)this.pasteFromCopy(r,i,t.borders);else{let{left:e,top:n}=i[0];this.pasteZone(r,e,n,t.borders)}this.executeQueuedChanges(r)}pasteZone(e,t,n,r){for(let[i,a]of r.entries())for(let[r,o]of a.entries()){let a={col:t+r,row:n+i,sheetId:e};this.pasteBorder(o,a)}}pasteBorder(e,t){let n={...this.getters.getCellBorder(t),...e},r=JSON.stringify(n);this.queuedBordersToAdd[r]||(this.queuedBordersToAdd[r]=[]),this.queuedBordersToAdd[r].push(E(t))}executeQueuedChanges(e){for(let t in this.queuedBordersToAdd){let n=this.queuedBordersToAdd[t],r=JSON.parse(t),i=Qt(n,[]);this.dispatch(`SET_BORDERS_ON_TARGET`,{sheetId:e,target:i,border:r})}this.queuedBordersToAdd={}}},vZ=class extends EG{copy(e){}},yZ=class extends vZ{copy(e){let t=e.sheetId,n=this.getters.getFigure(t,e.figureId);if(!n)throw Error(`No figure for the given id: ${e.figureId}`);if(n.tag!==`carousel`)return;let r={...n},i=this.getters.getCarousel(e.figureId),a={};for(let e of i.items)if(e.type===`chart`){let n=this.getters.getChart(e.chartId);if(!n)throw Error(`No chart for the given id: ${e.chartId}`);a[e.chartId]=n.copyInSheetId(t)}return{figureId:e.figureId,copiedFigure:r,copiedCarousel:i,copiedCharts:a,copiedSheetId:t}}getPasteTarget(e){return{zones:[],figureId:new Gl().smallUuid(),sheetId:e}}paste(e,t,n){if(!e.figureId)return;let{zones:r,figureId:i}=e,a=e.sheetId,{width:o,height:s}=t.copiedFigure,c=this.getters.getMaxAnchorOffset(a,s,o),{left:l,top:u}=r[0],d={x:0,y:0};l>c.col&&(l=c.col,d.x=c.offset.x),u>c.row&&(u=c.row,d.y=c.offset.y),this.dispatch(`CREATE_CAROUSEL`,{figureId:i,sheetId:a,definition:{items:[]},col:l,row:u,offset:d,size:{height:s,width:o}});let f=new Gl,p=b(t.copiedCarousel.items);for(let e of p){if(e.type!==`chart`)continue;let n=t.copiedCharts[e.chartId],r=f.smallUuid(),o=n.copyInSheetId(a).getDefinition();this.dispatch(`CREATE_CHART`,{figureId:i,chartId:r,sheetId:a,definition:o}),e.chartId=r}this.dispatch(`UPDATE_CAROUSEL`,{sheetId:a,figureId:i,definition:{...t.copiedCarousel,items:p}}),n.isCutOperation&&this.dispatch(`DELETE_FIGURE`,{sheetId:t.copiedSheetId,figureId:t.copiedFigure.id}),this.dispatch(`SELECT_FIGURE`,{figureId:i})}isPasteAllowed(e,t,n,r){return t.length===0?`EmptyTarget`:r?.pasteOption===void 0?`Success`:`WrongFigurePasteOption`}},bZ=class extends vZ{copy(e){let t=e.sheetId,n=this.getters.getFigure(t,e.figureId);if(!n)throw Error(`No figure for the given id: ${e.figureId}`);if(n.tag!==`chart`)return;let r={...n},i=this.getters.getChartFromFigureId(e.figureId);if(!i)throw Error(`No chart for the given id: ${e.figureId}`);let a=i.copyInSheetId(t);return{figureId:e.figureId,copiedFigure:r,copiedChart:a}}getPasteTarget(e,t,n,r){return{zones:[],figureId:new Gl().smallUuid(),sheetId:e}}paste(e,t,n){if(!e.figureId)return;let{zones:r,figureId:i}=e,a=e.sheetId,{width:o,height:s}=t.copiedFigure,c=t.copiedChart.copyInSheetId(a),l=this.getters.getMaxAnchorOffset(a,s,o),{left:u,top:d}=r[0],f={x:0,y:0};u>l.col&&(u=l.col,f.x=l.offset.x),d>l.row&&(d=l.row,f.y=l.offset.y),this.dispatch(`CREATE_CHART`,{figureId:i,chartId:new Gl().smallUuid(),sheetId:a,definition:c.getDefinition(),col:u,row:d,offset:f,size:{height:s,width:o}}),n.isCutOperation&&this.dispatch(`DELETE_FIGURE`,{sheetId:t.copiedChart.sheetId,figureId:t.copiedFigure.id}),this.dispatch(`SELECT_FIGURE`,{figureId:i})}isPasteAllowed(e,t,n,r){return t.length===0?`EmptyTarget`:r?.pasteOption===void 0?`Success`:`WrongFigurePasteOption`}},xZ=class extends DG{uuidGenerator=new Gl;queuedChanges={};copy(e){if(!e.zones.length)return;let{rowsIndexes:t,columnsIndexes:n}=e,r=e.sheetId,i=[];for(let e of t){let t=[];for(let i of n){let n=Array.from(this.getters.getRulesByCell(r,i,e));t.push({position:{col:i,row:e,sheetId:r},rules:n})}i.push(t)}return{cfRules:i}}paste(e,t,n){if(this.queuedChanges={},n.pasteOption===`asValue`)return;let r=e.zones,i=e.sheetId;n.isCutOperation?this.pasteFromCut(i,r,t):this.pasteFromCopy(i,r,t.cfRules,n),this.executeQueuedChanges()}pasteFromCut(e,t,n){let r=t[0];this.pasteZone(e,r.left,r.top,n.cfRules,{isCutOperation:!0})}pasteZone(e,t,n,r,i){for(let[a,o]of r.entries())for(let[r,s]of o.entries()){let o={col:t+r,row:n+a,sheetId:e};this.pasteCf(s,o,i?.isCutOperation)}}pasteCf(e,t,n){if(e?.rules&&e.rules.length>0){let r=E(e.position),i=E(t);for(let a of e.rules){let o=[];if(n&&o.push(r),e.position.sheetId===t.sheetId)this.adaptCFRules(e.position.sheetId,a,[i],o);else{this.adaptCFRules(e.position.sheetId,a,[],o);let n=this.getCFToCopyTo(t.sheetId,a);this.adaptCFRules(t.sheetId,n,[i],[])}}}}adaptCFRules(e,t,n,r){this.queuedChanges[e]||(this.queuedChanges[e]=[]);let i=this.queuedChanges[e].find(e=>e.cf.id===t.id);i?(i.toAdd.push(...n),i.toRemove.push(...r)):this.queuedChanges[e].push({toAdd:n,toRemove:r,cf:t})}executeQueuedChanges(){for(let e in this.queuedChanges)for(let{toAdd:t,toRemove:n,cf:r}of this.queuedChanges[e]){let i=this.getters.getAdaptedCfRanges(e,r,t,n);if(i){if(i.length===0){this.dispatch(`REMOVE_CONDITIONAL_FORMAT`,{id:r.id,sheetId:e});continue}this.dispatch(`ADD_CONDITIONAL_FORMAT`,{cf:{id:r.id,rule:r.rule,stopIfTrue:r.stopIfTrue},ranges:i,sheetId:e})}}}getCFToCopyTo(e,t){let n=this.getters.getConditionalFormats(e).find(e=>e.stopIfTrue===t.stopIfTrue&&w(e.rule,t.rule)),r=this.queuedChanges[e];return!n&&r&&(n=r.find(e=>e.cf.stopIfTrue===t.stopIfTrue&&w(e.cf.rule,t.rule))?.cf),n||{...t,id:this.uuidGenerator.smallUuid(),ranges:[]}}},SZ=class extends DG{uuidGenerator=new Gl;queuedChanges={};copy(e){let{rowsIndexes:t,columnsIndexes:n}=e,r=e.sheetId,i=[];for(let e of t){let t=[];for(let i of n){let n={sheetId:r,col:i,row:e},a=this.getters.getValidationRuleForCell(n);t.push({position:n,rule:a})}i.push(t)}return{dvRules:i}}paste(e,t,n){if(this.queuedChanges={},n.pasteOption)return;let r=e.zones,i=e.sheetId;n.isCutOperation?this.pasteFromCut(i,r,t):this.pasteFromCopy(i,r,t.dvRules),this.executeQueuedChanges()}pasteFromCut(e,t,n){let r=t[0];this.pasteZone(e,r.left,r.top,n.dvRules,{isCutOperation:!0})}pasteZone(e,t,n,r,i){for(let[a,o]of r.entries())for(let[r,s]of o.entries()){let o={col:t+r,row:n+a,sheetId:e};this.pasteDataValidation(s,o,i?.isCutOperation)}}pasteDataValidation(e,t,n){if(e){let r=E(t),i=E(e.position),a=e.rule;if(!a){let e=this.getters.getValidationRuleForCell(t);e&&this.adaptDataValidationRule(t.sheetId,e,[],[r]);return}let o=[];if(n&&o.push(i),e.position.sheetId===t.sheetId){let n=this.getDataValidationRuleToCopyTo(t.sheetId,a,!1);this.adaptDataValidationRule(e.position.sheetId,n,[r],o)}else{let n=this.getters.getValidationRuleForCell(e.position);n&&this.adaptDataValidationRule(e.position.sheetId,n,[],o);let i=this.getDataValidationRuleToCopyTo(t.sheetId,a);this.adaptDataValidationRule(t.sheetId,i,[r],[])}}}getDataValidationRuleToCopyTo(e,t,n=!0){let r=this.getters.getDataValidationRules(e).find(e=>w(t.criterion,e.criterion)&&t.isBlocking===e.isBlocking),i=this.queuedChanges[e];return!r&&i&&(r=i.find(e=>w(t.criterion,e.rule.criterion)&&t.isBlocking===e.rule.isBlocking)?.rule),r||{...t,id:n?this.uuidGenerator.smallUuid():t.id,ranges:[]}}adaptDataValidationRule(e,t,n,r){this.queuedChanges[e]||(this.queuedChanges[e]=[]);let i=this.queuedChanges[e].find(e=>e.rule.id===t.id);i?(i.toAdd.push(...n),i.toRemove.push(...r)):this.queuedChanges[e].push({toAdd:n,toRemove:r,rule:t})}executeQueuedChanges(){for(let e in this.queuedChanges)for(let{toAdd:t,toRemove:n,rule:r}of this.queuedChanges[e]){let i=Qt([...Qt(r.ranges.map(e=>e.zone),n),...t],[]);if(i.length===0){this.dispatch(`REMOVE_DATA_VALIDATION_RULE`,{sheetId:e,id:r.id});continue}this.dispatch(`ADD_DATA_VALIDATION_RULE`,{rule:{id:r.id,criterion:r.criterion,isBlocking:r.isBlocking},ranges:i.map(t=>this.getters.getRangeDataFromZone(e,t)),sheetId:e})}}},CZ=class extends vZ{copy(e){let t=e.sheetId,n=this.getters.getFigure(t,e.figureId);if(!n)throw Error(`No figure for the given id: ${e.figureId}`);let r={...n};if(n.tag!==`image`)return;let i=b(this.getters.getImage(e.figureId));return{figureId:e.figureId,copiedFigure:r,copiedImage:i,sheetId:t}}getPasteTarget(e,t,n,r){return{sheetId:e,zones:[],figureId:new Gl().smallUuid()}}paste(e,t,n){if(!e.figureId)return;let{zones:r,figureId:i}=e,a=this.getters.getActiveSheetId(),{width:o,height:s}=t.copiedFigure,c=b(t.copiedImage),l=this.getters.getMaxAnchorOffset(a,s,o),{left:u,top:d}=r[0],f={x:0,y:0};u>l.col&&(u=l.col,f.x=l.offset.x),d>l.row&&(d=l.row,f.y=l.offset.y),this.dispatch(`CREATE_IMAGE`,{figureId:i,sheetId:a,col:u,row:d,offset:f,size:{height:s,width:o},definition:c}),n.isCutOperation&&this.dispatch(`DELETE_FIGURE`,{sheetId:t.sheetId,figureId:t.copiedFigure.id}),this.dispatch(`SELECT_FIGURE`,{figureId:i})}isPasteAllowed(e,t,n,r){return t.length===0?`EmptyTarget`:r?.pasteOption===void 0?`Success`:`WrongFigurePasteOption`}},wZ=class extends DG{copy(e){let t=this.getters.getActiveSheetId(),{rowsIndexes:n,columnsIndexes:r}=e,i=[];for(let e of n){let n=[];for(let i of r){let r={col:i,row:e,sheetId:t};n.push(this.getters.getMerge(r))}i.push(n)}return{merges:i,sheetId:t}}paste(e,t,n){if(n.isCutOperation){let e=t.merges.flat().filter(C);this.dispatch(`REMOVE_MERGE`,{sheetId:t.sheetId,target:e})}this.pasteFromCopy(e.sheetId,e.zones,t.merges,n)}pasteZone(e,t,n,r){for(let[i,a]of r.entries())for(let[r,o]of a.entries()){let a={col:t+r,row:n+i,sheetId:e};this.pasteMerge(o,a)}}pasteMerge(e,t){if(!e||this.getters.isInMerge(t))return;let{sheetId:n,col:r,row:i}=t;this.dispatch(`ADD_MERGE`,{sheetId:n,force:!0,target:[{left:r,top:i,right:r+e.right-e.left,bottom:i+e.bottom-e.top}]})}},TZ=class extends DG{copy(e){return{zones:e.clippedZones,sheetId:e.sheetId}}paste(e,t,n){if(n.isCutOperation){let n=e.zones[0];this.dispatch(`MOVE_RANGES`,{target:t.zones,sheetId:t.sheetId,sheetName:this.getters.getSheetName(t.sheetId),targetSheetId:e.sheetId,col:n.left,row:n.top})}}},EZ=class extends DG{isPasteAllowed(e,t,n,r){if(!(`cells`in n))return`Success`;let{xSplit:i,ySplit:a}=this.getters.getPaneDivisions(e);return Un(rA(t,n.cells),i,a)?`FrozenPaneOverlap`:`Success`}},DZ=class extends DG{copy(e){let t=e.sheetId;if(e.zones.length===0)return;let n=[],r=0;for(let i of Ze(e.columnsIndexes)){let a=0;for(let o of Ze(e.rowsIndexes)){let e={left:i[0],right:i[i.length-1],top:o[0],bottom:o[o.length-1]};n.push(...this.getters.getZoneStyles(t,e).map(t=>({zone:{left:t.zone.left-e.left+r,right:t.zone.right&&t.zone.right-e.left+r,top:t.zone.top-e.top+a,bottom:t.zone.bottom&&t.zone.bottom-e.top+a},style:t.style}))),a+=o.length}r+=i.length}return{styles:n,width:e.columnsIndexes.length,height:e.rowsIndexes.length}}paste(e,t,n){let r=e.sheetId;if(n.pasteOption===`asValue`)return;let i=e.zones;if(n.isCutOperation){let{left:e,top:n}=i[0];this.pasteStyleZone(r,e,n,t.styles)}else for(let e of i)for(let n of nA(e,t.width,t.height))this.pasteStyleZone(r,n.left,n.top,t.styles)}pasteStyleZone(e,t,n,r){for(let i of r){let r={left:i.zone.left+t,right:i.zone.right&&i.zone.right+t||i.zone.left+t,top:i.zone.top+n,bottom:i.zone.bottom&&i.zone.bottom+n||i.zone.top+n};this.dispatch(`SET_FORMATTING`,{sheetId:e,target:[r],style:i.style})}}},OZ=class extends DG{copy(e,t,n=`copyPaste`){let r=e.sheetId,{rowsIndexes:i,columnsIndexes:a,zones:o}=e,s=new Set,c=[];for(let e of i){let l=[];c.push(l);for(let c of a){let a={col:c,row:e,sheetId:r},u=this.getters.getTable(a);if(!u){l.push({});continue}let d=this.getters.getCoreTable(a),f=d?.range.zone,p;if(!s.has(u.id)&&d&&f&&o.some(e=>Dn(f,e))){s.add(u.id);let{numberOfRows:e}=On(f);for(let n=f.top;n<=f.bottom;n++)!t&&!i.includes(n)&&e--;let n=d.range,r=this.getters.extendRange(d.range,`ROW`,n.zone.top+e-1-n.zone.bottom);p={range:this.getters.getRangeData(r),config:d.config,type:d.type}}n!==`shiftCells`&&l.push({table:p,style:this.getTableStyleToCopy(a),isWholeTableCopied:s.has(u.id)})}}return{tableCells:c,sheetId:e.sheetId}}getTableStyleToCopy(e){let t=this.getters.getCellTableStyle(e),n=this.getters.getCellStyle(e),r=this.getters.getCellTableBorder(e),i=this.getters.getCellBorder(e);return{style:{...t,...bt(n)},border:{...r,...bt(i)}}}paste(e,t,n){let r=e.zones,i=e.sheetId;n.isCutOperation?this.pasteFromCut(i,r,t,n):this.pasteFromCopy(i,r,t.tableCells,n)}pasteFromCut(e,t,n,r){for(let e of n.tableCells)for(let t of e)t.table&&this.dispatch(`REMOVE_TABLE`,{sheetId:n.sheetId,target:[this.getters.getRangeFromRangeData(t.table.range).zone]});let i=t[0];this.pasteZone(e,i.left,i.top,n.tableCells,r)}pasteZone(e,t,n,r,i){for(let a=0;a<r.length;a++){let o=r[a];for(let r=0;r<o.length;r++){let s=o[r];if(!s)continue;let c={col:t+r,row:n+a,sheetId:e};this.pasteTableCell(e,s,c,i)}}if(r.length===1)for(let i=0;i<r[0].length;i++)this.dispatch(`AUTOFILL_TABLE_COLUMN`,{col:t+i,row:n,sheetId:e})}pasteTableCell(e,t,n,r){if(t.table&&!r?.pasteOption){let{range:r}=t.table,i=On(this.getters.getRangeFromRangeData(r).zone),a={left:n.col,top:n.row,right:n.col+i.numberOfCols-1,bottom:n.row+i.numberOfRows-1};this.dispatch(`CREATE_TABLE`,{sheetId:n.sheetId,ranges:[this.getters.getRangeDataFromZone(e,a)],config:t.table.config,tableType:t.table.type})}this.getters.getCoreTable(n)||r?.pasteOption===`asValue`||(!r?.pasteOption&&!t.isWholeTableCopied||r?.pasteOption===`onlyFormat`)&&(t.style?.style&&this.dispatch(`UPDATE_CELL`,{...n,style:t.style.style}),t.style?.border&&this.dispatch(`SET_BORDER`,{...n,border:t.style.border}))}};BB.figureHandlers.add(`chart`,bZ).add(`image`,CZ).add(`carousel`,yZ),BB.cellHandlers.add(`dataValidation`,SZ).add(`cell`,OG).add(`sheet`,EZ).add(`merge`,wZ).add(`border`,_Z).add(`table`,OZ).add(`conditionalFormat`,xZ).add(`references`,TZ).add(`style`,DZ);let kZ={},AZ={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},jZ={autoCompleteProviders:ak,autofillModifiersRegistry:AG,autofillRulesRegistry:jG,cellMenuRegistry:SR,colMenuRegistry:Bz,errorTypes:da,linkMenuRegistry:Qk,functionRegistry:yO,featurePluginRegistry:dq,iconsOnCellRegistry:lG,statefulUIPluginRegistry:fq,coreViewsPluginRegistry:pq,corePluginRegistry:uq,rowMenuRegistry:qz,sidePanelRegistry:tW,figureRegistry:Mv,chartSidePanelComponentRegistry:xH,chartComponentRegistry:sv,chartRegistry:f_,chartSubtypeRegistry:K_,topbarMenuRegistry:Wq,topbarComponentRegistry:uJ,clickableCellRegistry:bq,otRegistry:XG,inverseCommandRegistry:Cq,urlRegistry:Js,cellPopoverRegistry:Fv,numberFormatMenuRegistry:zq,repeatLocalCommandTransformRegistry:VK,repeatCommandTransformRegistry:BK,clipboardHandlersRegistries:BB,pivotRegistry:ZL,pivotTimeAdapterRegistry:Um,pivotSidePanelRegistry:FU,pivotNormalizationValueRegistry:xh,supportedPivotPositionalFormulaRegistry:sW,pivotToFunctionValueRegistry:Sh,migrationStepRegistry:nP,chartJsExtensionRegistry:ql},MZ={arg:G,isEvaluationError:M,toBoolean:F,toJsDate:I,toNumber:N,toString:P,toNormalizedPivotValue:_h,toFunctionPivotValue:yh,toXC:T,toZone:un,toUnboundedZone:ln,toCartesian:Zt,numberToLetters:Ht,lettersToNumber:Ut,UuidGenerator:Gl,formatValue:z,createCurrencyFormat:ls,ColorGenerator:ei,computeTextWidth:Dl,createEmptyWorkbookData:SP,createEmptySheet:xP,createEmptyExcelSheet:CP,rgbaToHex:jr,colorToRGBA:Mr,positionToZone:E,isDefined:C,isMatrix:xa,lazy:mt,genericRepeat:lJ,createAction:h,createActions:p,transformRangeData:$n,deepEquals:w,overlap:wn,union:bn,isInside:En,deepCopy:b,expandZoneOnInsertion:gn,reduceZoneOnDeletion:yn,unquote:Je,getMaxObjectId:lh,getFunctionsFromTokens:CU,getFirstPivotFunction:EU,getNumberOfPivotFunctions:DU,parseDimension:fh,isDateOrDatetimeField:ph,makeFieldProposal:OU,insertTokenAfterArgSeparator:AU,insertTokenAfterLeftParenthesis:jU,mergeContiguousZones:Xn,getPivotHighlights:GH,pivotTimeAdapter:Wm,UNDO_REDO_PIVOT_COMMANDS:CG,createPivotFormula:gh,areDomainArgsFieldsValid:hh,splitReference:Pc,sanitizeSheetName:Xe,getUniqueText:zt,isNumber:$i,isDateTime:xi,createCustomFields:Oh,schemeToColorScale:Mm,isDateTimeFormat:ns,jsDateToNumber:Fi,numberToJsDate:Ni,DateTime:O,parseFormat:Eo,isFormula:Bt},NZ={isMarkdownLink:nt,parseMarkdownLink:at,markdownLink:it,openLink:$s,urlRepresentation:Qs},PZ={Checkbox:Fk,Section:q,RoundColorPicker:bk,ChartDataSeries:TV,ChartErrorSection:EV,ChartLabelRange:DV,ChartTitle:jV,ChartPanel:TH,ChartFigure:Av,ChartJsComponent:kf,ClickableCellSortIcon:cW,ZoomableChartJsComponent:$_,Grid:oW,GridOverlay:KB,ScorecardChart:Cp,GaugeChartComponent:av,LineConfigPanel:iH,BarConfigPanel:kV,PieChartDesignPanel:sH,GenericChartConfigPanel:OV,ChartWithAxisDesignPanel:VV,GenericZoomableChartDesignPanel:HV,LineChartDesignPanel:aH,GaugeChartConfigPanel:QV,GaugeChartDesignPanel:$V,ScorecardChartConfigPanel:fH,ScorecardChartDesignPanel:pH,GeoChartDesignPanel:nH,RadarChartDesignPanel:cH,WaterfallChartDesignPanel:bH,ComboChartDesignPanel:YV,FunnelChartDesignPanel:ZV,SunburstChartDesignPanel:mH,TreeMapChartDesignPanel:yH,ChartTypePicker:CH,FigureComponent:Nv,MenuPopover:Dv,Popover:Cv,SelectionInput:kk,ValidationMessages:IB,AddDimensionButton:XH,PivotDimensionGranularity:QH,PivotDimensionOrder:$H,PivotDimension:ZH,PivotLayoutConfigurator:yU,PivotHTMLRenderer:uW,PivotDeferUpdate:qH,PivotTitleSection:bU,CogWheelMenu:SV,TextInput:gV,SidePanelCollapsible:Vv,RadioSelection:NV,GeoChartRegionSelectSection:eH,ChartDashboardMenu:Ov,FullScreenFigure:lW,NumberInput:LV,TopBar:JJ,Composer:PO},FZ={useDragAndDropListItems:Sk,useHighlights:OH,useHighlightsOnHover:DH},IZ={useStoreProvider:ar,DependencyContainer:tr,CellPopoverStore:Bk,ComposerFocusStore:_r,CellComposerStore:CB,FindAndReplaceStore:LH,HighlightStore:sk,DelayedHoveredCellStore:Pv,HoveredTableStore:UB,ModelStore:ur,NotificationStore:ck,RendererStore:mr,SelectionInputStore:Ok,SpreadsheetStore:hr,useStore:D,useLocalStore:or,SidePanelStore:rW,PivotSidePanelStore:NU,PivotMeasureDisplayPanelStore:UH,ClientFocusStore:Yz,GridRenderer:eV};function LZ(e,t){return yO.add(e,t),{addFunction:(e,t)=>LZ(e,t)}}let RZ={DEFAULT_LOCALE:R,HIGHLIGHT_COLOR:ee,PIVOT_TABLE_CONFIG:Le,ChartTerms:Yp,FIGURE_ID_SPLITTER:`??`,GRID_ICON_EDGE_LENGTH:17,GRID_ICON_MARGIN:2},zZ={...F_,...l_};e.AbstractCellClipboardHandler=DG,e.AbstractChart=Af,e.AbstractFigureClipboardHandler=vZ,e.CellErrorType=A,e.ClientDisconnectedError=jK,e.CommandResult=Ks,e.CorePlugin=dW,e.CoreViewPlugin=LW,e.DEFAULT_LOCALE=R,e.DEFAULT_LOCALES=uo,e.DispatchResult=Ws,e.EvaluationError=j,e.LocalTransportService=dJ,e.Model=QX,e.PivotRuntimeDefinition=LL,e.Registry=B,e.Revision=AK,e.SPREADSHEET_DIMENSIONS=AZ,e.Spreadsheet=ZJ,e.SpreadsheetPivotTable=zL,e.UIPlugin=cb,e.__info__=kZ,e.addFunction=LZ,e.addRenderingLayer=pr,e.astToFormula=yB,e.categories=bO,e.chartHelpers=zZ,e.components=PZ,e.constants=RZ,e.convertAstNodes=JO,e.coreTypes=Vs,e.createAutocompleteArgumentsProvider=mq,e.findCellInNewZone=Ln,e.functionCache=cU,e.getCaretDownSvg=ZA,e.getCaretUpSvg=QA,e.helpers=MZ,e.hooks=FZ,e.invalidateCFEvaluationCommands=Ls,e.invalidateChartEvaluationCommands=Fs,e.invalidateDependenciesCommands=Is,e.invalidateEvaluationCommands=Ps,e.iterateAstNodes=YO,e.links=NZ,e.load=sP,e.parse=KO,e.parseTokens=qO,e.readonlyAllowedCommands=Bs,e.registries=jZ,e.setDefaultSheetViewSize=Fe,e.setTranslationMethod=ca,e.stores=IZ,e.tokenColors=He,e.tokenize=bu,kZ.version=`19.1.18`,kZ.date=`2026-05-11T13:46:49.289Z`,kZ.hash=`a849339`})(this.o_spreadsheet=this.o_spreadsheet||{},owl);
935
+ `),`_rels/.rels`)}function XX(e){let t={},n=[];for(let r of e.sheets){let e=r.name.slice(0,31);e=zt(e,n,{compute:(e,t)=>e.slice(0,31-String(t).length)+t}),n.push(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${Ge(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function ZX(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>On(un(e.range)).numberOfRows>1);return e}var QX=class extends er{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},t={},n=[],r=new Gl,i=!1){let a=performance.now();console.debug(`##### Model creation #####`),super(),la(),n=hP(e,n);let o=sP(e,i);this.state=new fY,this.uuidGenerator=r,this.config=this.setupConfig(t),this.session=this.setupSession(o.revisionId),this.coreGetters={},this.range=new lY(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.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new dY(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(let e of uq.getAll())this.setupCorePlugin(e,o);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(n);for(let e of pq.getAll()){let t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of fq.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of dq.getAll()){let 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(),t.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}console.debug(`Model created in`,performance.now()-a,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:mt(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCoreViewPlugin(e){let t=new e(this.coreViewPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new MK(oY({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1}}),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){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:k(`Anonymous`).toString()},n=e.transportService||new dJ,r=e.mode===`readonly`||e.mode===`dashboard`;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:r?new QJ(n):n,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){let t=e.loadLocales||(()=>Promise.resolve(uo));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,custom:this.config.custom,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){let t=Hs(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new Ws(t.flat()):Ws.Success}checkDispatchAllowedCoreCommand(e){let 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(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed($X(e,t));dispatch=(e,t)=>{let n=$X(e,t),r=this.status;if(this.getters.isReadonly()&&!Us(n))return new Ws(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new Ws(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();Hs(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(Hs(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(Hs(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return Ws.Success};dispatchFromCorePlugin=(e,t)=>{let n=$X(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,Ws.Success};dispatchToHandlers(e,t){let n=Hs(t);for(let r of e)!n&&r instanceof dW||r.beforeHandle(t);for(let r of e)!n&&r instanceof dW||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=SP();for(let t of this.handlers)t instanceof dW&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=b(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}async exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=wP();for(let t of this.handlers)t instanceof sb&&await t.exportForExcel(e);return e=b(e),VX(e)}};function $X(e,t={}){let n=b(t);return n.type=e,n}function eZ(e){return!WV.includes(e.horizontalGroupBy)||!WV.includes(e.verticalGroupBy)?`InvalidChartDefinition`:`Success`}var tZ=class e extends Af{dataSets;labelRange;background;type=`calendar`;showValues;colorScale;axesDesign;horizontalGroupBy;verticalGroupBy;legendPosition;missingValueColor;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.showValues=e.showValues,this.colorScale=e.colorScale,this.axesDesign=e.axesDesign,this.horizontalGroupBy=e.horizontalGroupBy,this.verticalGroupBy=e.verticalGroupBy,this.legendPosition=e.legendPosition,this.missingValueColor=e.missingValueColor}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld,eZ)}static getDefinitionFromContextCreation(e){let t=`left`;return e.legendPosition===`right`&&(t=`right`),{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,title:e.title||{text:``},type:`calendar`,labelRange:e.auxiliaryRange||void 0,showValues:e.showValues,axesDesign:e.axesDesign,legendPosition:t,horizontalGroupBy:`day_of_week`,verticalGroupBy:`month_number`}}getContextCreation(){let e=[{dataRange:this.getters.getRangeString(this.dataSets[0].dataRange,this.sheetId)}];return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=e.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,n||this.sheetId)}));return{type:`calendar`,background:this.background,dataSets:r,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,showValues:this.showValues,colorScale:this.colorScale,axesDesign:this.axesDesign,horizontalGroupBy:this.horizontalGroupBy,verticalGroupBy:this.verticalGroupBy,legendPosition:this.legendPosition,missingValueColor:this.missingValueColor}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function nZ(e,t){let n=e.getDefinition(),r=Hh(n,e.dataSets,e.labelRange,t),{labels:i,datasets:a}=Zd(n,r);return{chartJsConfig:{type:`calendar`,data:{labels:i,datasets:a},options:{...Vp,indexAxis:`x`,layout:Eg(n,r),scales:Pd(n,a),plugins:{title:Gg(n,t),legend:{display:!1},tooltip:Xg(n,r),chartShowValuesPlugin:Bg(n,r),chartColorScalePlugin:Fd(n,r)},chartBackground:n.background||`#FFFFFF`}},background:e.background||`#FFFFFF`}}var rZ=class e extends Af{dataSets;labelRange;background;legendPosition;aggregated;dataSetsHaveTitle;dataSetDesign;axesDesign;type=`combo`;showValues;hideDataMarkers;zoomable;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.axesDesign=e.axesDesign,this.showValues=e.showValues,this.hideDataMarkers=e.hideDataMarkers,this.zoomable=e.zoomable}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId),type:this.dataSetDesign?.[t]?.type??(t?`line`:`bar`)});return{type:`combo`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,aggregated:this.aggregated,axesDesign:this.axesDesign,showValues:this.showValues,hideDataMarkers:this.hideDataMarkers,zoomable:this.zoomable,humanize:this.humanize}}getDefinitionForExcel(){let{dataSets:e,labelRange:t}=this.getCommonDataSetAttributesForExcel(this.labelRange,this.dataSets,ud(this.labelRange,this.dataSets[0],this.dataSetsHaveTitle)),n=this.getDefinition();return{...n,backgroundColor:V(this.background||`#FFFFFF`),fontColor:V(od(this.background)),dataSets:e,labelRange:t,verticalAxis:fd(n)}}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}static getDefinitionFromContextCreation(e){let t=(e.range??[]).map((e,t)=>({...e,type:t?`line`:`bar`}));return{background:e.background,dataSets:t,dataSetsHaveTitle:e.dataSetsHaveTitle??!1,aggregated:e.aggregated,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},labelRange:e.auxiliaryRange||void 0,type:`combo`,axesDesign:e.axesDesign,showValues:e.showValues,hideDataMarkers:e.hideDataMarkers,zoomable:e.zoomable,humanize:e.humanize}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}};function iZ(e,t){let n=e.getDefinition(),r=zh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`bar`,data:{labels:r.labels,datasets:nf(n,r)},options:{...Vp,layout:Tg(n,r),scales:Nd(n,r),plugins:{title:Gg(n,t),legend:Mg(n,r),tooltip:Yg(n,r),chartShowValuesPlugin:zg(n,r)}}},background:e.background||`#FFFFFF`}}var aZ=class e extends Af{dataSets;labelRange;background;legendPosition;aggregated;type=`funnel`;dataSetsHaveTitle;dataSetDesign;axesDesign;horizontal=!0;showValues;funnelColors;cumulative;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.axesDesign=e.axesDesign,this.showValues=e.showValues,this.horizontal=!0,this.funnelColors=e.funnelColors,this.cumulative=e.cumulative}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,aggregated:e.aggregated??!1,legendPosition:`none`,title:e.title||{text:``},type:`funnel`,labelRange:e.auxiliaryRange||void 0,showValues:e.showValues,axesDesign:e.axesDesign,funnelColors:e.funnelColors,horizontal:!0,cumulative:e.cumulative,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`funnel`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,aggregated:this.aggregated,horizontal:this.horizontal,axesDesign:this.axesDesign,showValues:this.showValues,funnelColors:this.funnelColors,cumulative:this.cumulative,humanize:this.humanize}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function oZ(e,t){let n=e.getDefinition(),r=Jh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`funnel`,data:{labels:r.labels,datasets:of(n,r)},options:{...Vp,indexAxis:`y`,layout:Tg(n,r),scales:Hd(n,r),plugins:{title:Gg(n,t),legend:{display:!1},tooltip:r_(n,r),chartShowValuesPlugin:zg(n,r)}}},background:e.background||`#FFFFFF`}}var sZ=class e extends Af{dataSets;labelRange;background;legendPosition;type=`geo`;dataSetsHaveTitle;dataSetDesign;colorScale;missingValueColor;region;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.colorScale=e.colorScale,this.missingValueColor=e.missingValueColor,this.region=e.region}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`geo`,labelRange:e.auxiliaryRange||void 0,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`geo`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,colorScale:this.colorScale,missingValueColor:this.missingValueColor,region:this.region,humanize:this.humanize}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function cZ(e,t){let n=e.getDefinition(),r=qh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`choropleth`,data:{datasets:af(n,r)},options:{...Vp,layout:Tg(n,r),scales:Vd(n,r),plugins:{title:Gg(n,t),tooltip:n_(n,r),legend:{display:!1}}}},background:e.background||`#FFFFFF`}}var lZ=class e extends Af{dataSets;labelRange;background;legendPosition;aggregated;type=`pyramid`;dataSetsHaveTitle;dataSetDesign;axesDesign;horizontal=!0;stacked=!0;showValues;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.axesDesign=e.axesDesign,this.showValues=e.showValues}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,aggregated:e.aggregated??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`pyramid`,labelRange:e.auxiliaryRange||void 0,axesDesign:e.axesDesign,horizontal:!0,stacked:!0,showValues:e.showValues,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`pyramid`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,aggregated:this.aggregated,axesDesign:this.axesDesign,horizontal:!0,stacked:!0,showValues:this.showValues,humanize:this.humanize}}getDefinitionForExcel(e){let{dataSets:t,labelRange:n}=this.getCommonDataSetAttributesForExcel(this.labelRange,this.dataSets,ud(this.labelRange,this.dataSets[0],this.dataSetsHaveTitle)),r=this.getDefinition(),{dataSetsValues:i}=Uh(r,this.dataSets,this.labelRange,e),a=Math.max(...i.map(e=>Math.max(...e.data.map(Math.abs))));return{...r,horizontal:!0,backgroundColor:V(this.background||`#FFFFFF`),fontColor:V(od(this.background)),dataSets:t,labelRange:n,verticalAxis:fd(r),maxValue:a}}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function uZ(e,t){let n=e.getDefinition(),r=Uh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`bar`,data:{labels:r.labels,datasets:Xd(n,r)},options:{...Vp,indexAxis:`y`,layout:Tg(n,r),scales:zd(n,r),plugins:{title:Gg(n,t),legend:Og(n,r),tooltip:e_(n,r),chartShowValuesPlugin:Hg(n,r)}}},background:e.background||`#FFFFFF`}}var dZ=class e extends Af{dataSets;labelRange;background;legendPosition;stacked;aggregated;type=`radar`;dataSetsHaveTitle;dataSetDesign;fillArea;showValues;hideDataMarkers;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.stacked=e.stacked,this.aggregated=e.aggregated,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.dataSetDesign=e.dataSets,this.fillArea=e.fillArea,this.showValues=e.showValues,this.hideDataMarkers=e.hideDataMarkers}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){return{background:e.background,dataSets:e.range??[],dataSetsHaveTitle:e.dataSetsHaveTitle??!1,stacked:e.stacked??!1,aggregated:e.aggregated??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`radar`,labelRange:e.auxiliaryRange||void 0,fillArea:e.fillArea??!1,showValues:e.showValues??!1,hideDataMarkers:e.hideDataMarkers,humanize:e.humanize}}getContextCreation(){let e=[];for(let[t,n]of this.dataSets.entries())e.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(n.dataRange,this.sheetId)});return{...this,range:e,auxiliaryRange:this.labelRange?this.getters.getRangeString(this.labelRange,this.sheetId):void 0}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=[];for(let[t,i]of e.entries())r.push({...this.dataSetDesign?.[t],dataRange:this.getters.getRangeString(i.dataRange,n||this.sheetId)});return{type:`radar`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,stacked:this.stacked,aggregated:this.aggregated,fillArea:this.fillArea,showValues:this.showValues,hideDataMarkers:this.hideDataMarkers,humanize:this.humanize}}getDefinitionForExcel(){let{dataSets:e,labelRange:t}=this.getCommonDataSetAttributesForExcel(this.labelRange,this.dataSets,ud(this.labelRange,this.dataSets[0],this.dataSetsHaveTitle));return{...this.getDefinition(),backgroundColor:V(this.background||`#FFFFFF`),fontColor:V(od(this.background)),dataSets:e,labelRange:t}}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function fZ(e,t){let n=e.getDefinition(),r=Kh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`radar`,data:{labels:r.labels,datasets:rf(n,r)},options:{...Vp,layout:Tg(n,r),scales:Bd(n,r),plugins:{title:Gg(n,t),legend:Pg(n,r),tooltip:t_(n,r),chartShowValuesPlugin:zg(n,r)}}},background:e.background||`#FFFFFF`}}var pZ=class e extends Af{dataSets;labelRange;background;legendPosition;type=`sunburst`;dataSetsHaveTitle;showValues;showLabels;valuesDesign;groupColors;pieHolePercentage;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.showValues=e.showValues,this.showLabels=e.showLabels,this.valuesDesign=e.valuesDesign,this.groupColors=e.groupColors,this.pieHolePercentage=e.pieHolePercentage}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){let t=[];return e.hierarchicalRanges?.length?t.push(...e.hierarchicalRanges):e.auxiliaryRange&&t.push({...e.range?.[0],dataRange:e.auxiliaryRange}),{background:e.background,dataSets:t,dataSetsHaveTitle:e.dataSetsHaveTitle??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`sunburst`,labelRange:e.range?.[0]?.dataRange,showValues:e.showValues,showLabels:e.showLabels,valuesDesign:e.valuesDesign,groupColors:e.groupColors,humanize:e.humanize}}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getContextCreation(){let e=this.dataSets.at(-1)?.dataRange;return{...this,range:this.labelRange?[{dataRange:this.getters.getRangeString(this.labelRange,this.sheetId)}]:[],auxiliaryRange:e?this.getters.getRangeString(e,this.sheetId):void 0,hierarchicalRanges:this.dataSets.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,this.sheetId)}))}}getDefinitionWithSpecificDataSets(e,t,n){return{type:`sunburst`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:e.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,n||this.sheetId)})),legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,showValues:this.showValues,showLabels:this.showLabels,valuesDesign:this.valuesDesign,groupColors:this.groupColors,pieHolePercentage:this.pieHolePercentage,humanize:this.humanize}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function mZ(e,t){let n=e.getDefinition(),r=Yh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`doughnut`,data:{datasets:cf(n,r)},options:{cutout:e.pieHolePercentage===void 0?`25%`:`${e.pieHolePercentage}%`,...Vp,layout:Tg(n,r),plugins:{title:Gg(n,t),legend:Fg(n,r),tooltip:i_(n,r),sunburstLabelsPlugin:Vg(n,r),sunburstHoverPlugin:{enabled:!0}}}},background:e.background||`#FFFFFF`}}var hZ=class e extends Af{static defaults={background:oe,legendPosition:`top`,dataSetsHaveTitle:!1,showHeaders:!0,headersColor:`#000000`};dataSets;labelRange;background;legendPosition;type=`treemap`;dataSetsHaveTitle;showHeaders;headerDesign;showValues;showLabels;valuesDesign;coloringOptions;constructor(e,t,n){super(e,t,n),this.dataSets=td(n,e.dataSets,t,e.dataSetsHaveTitle),this.labelRange=Zc(n,t,e.labelRange),this.background=e.background,this.legendPosition=e.legendPosition,this.dataSetsHaveTitle=e.dataSetsHaveTitle,this.showHeaders=e.showHeaders,this.headerDesign=e.headerDesign,this.showValues=e.showValues,this.showLabels=e.showLabels,this.valuesDesign=e.valuesDesign,this.coloringOptions=e.coloringOptions}static transformDefinition(e,t,n){return ad(e,t,n)}static validateChartDefinition(e,t){return e.checkValidations(t,cd,ld)}static getDefinitionFromContextCreation(e){let t=[];return e.hierarchicalRanges?.length?t.push(...e.hierarchicalRanges):e.auxiliaryRange&&t.push({...e.range?.[0],dataRange:e.auxiliaryRange}),{background:e.background,dataSets:t,dataSetsHaveTitle:e.dataSetsHaveTitle??!1,legendPosition:e.legendPosition??`top`,title:e.title||{text:``},type:`treemap`,labelRange:e.range?.[0]?.dataRange,showValues:e.showValues,showHeaders:e.showHeaders,headerDesign:e.headerDesign,showLabels:e.showLabels,valuesDesign:e.valuesDesign,coloringOptions:e.treemapColoringOptions,humanize:e.humanize}}getContextCreation(){let e=this.dataSets.at(-1)?.dataRange;return{...this,range:this.labelRange?[{dataRange:this.getters.getRangeString(this.labelRange,this.sheetId)}]:[],auxiliaryRange:e?this.getters.getRangeString(e,this.sheetId):void 0,hierarchicalRanges:this.dataSets.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,this.sheetId)}))}}duplicateInDuplicatedSheet(t){let n=Qu(this.sheetId,t,this.dataSets),r=$u(this.sheetId,t,this.labelRange);return new e(this.getDefinitionWithSpecificDataSets(n,r,t),t,this.getters)}copyInSheetId(t){return new e(this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange,t),t,this.getters)}getDefinition(){return this.getDefinitionWithSpecificDataSets(this.dataSets,this.labelRange)}getDefinitionWithSpecificDataSets(e,t,n){let r=e.map(e=>({dataRange:this.getters.getRangeString(e.dataRange,n||this.sheetId)}));return{type:`treemap`,dataSetsHaveTitle:e.length?!!e[0].labelCell:!1,background:this.background,dataSets:r,legendPosition:this.legendPosition,labelRange:t?this.getters.getRangeString(t,n||this.sheetId):void 0,title:this.title,showValues:this.showValues,showHeaders:this.showHeaders,headerDesign:this.headerDesign,showLabels:this.showLabels,valuesDesign:this.valuesDesign,coloringOptions:this.coloringOptions,humanize:this.humanize}}getDefinitionForExcel(){}updateRanges({applyChange:t}){let{dataSets:n,labelRange:r,isStale:i}=Zu(this.getters,t,this.dataSets,this.labelRange);return i?new e(this.getDefinitionWithSpecificDataSets(n,r),this.sheetId,this.getters):this}};function gZ(e,t){let n=e.getDefinition(),r=Yh(n,e.dataSets,e.labelRange,t);return{chartJsConfig:{type:`treemap`,data:{labels:r.labels,datasets:pf(n,r)},options:{...Vp,layout:Tg(n,r),plugins:{title:Gg(n,t),legend:{display:!1},tooltip:a_(n,r)}}},background:e.background||`#FFFFFF`}}f_.add(`bar`,{match:e=>e===`bar`,createChart:(e,t,n)=>new u_(e,t,n),getChartRuntime:d_,validateChartDefinition:u_.validateChartDefinition,transformDefinition:u_.transformDefinition,getChartDefinitionFromContextCreation:u_.getDefinitionFromContextCreation,sequence:10}),f_.add(`combo`,{match:e=>e===`combo`,createChart:(e,t,n)=>new rZ(e,t,n),getChartRuntime:iZ,validateChartDefinition:rZ.validateChartDefinition,transformDefinition:rZ.transformDefinition,getChartDefinitionFromContextCreation:rZ.getDefinitionFromContextCreation,sequence:15}),f_.add(`line`,{match:e=>e===`line`,createChart:(e,t,n)=>new k_(e,t,n),getChartRuntime:A_,validateChartDefinition:k_.validateChartDefinition,transformDefinition:k_.transformDefinition,getChartDefinitionFromContextCreation:k_.getDefinitionFromContextCreation,sequence:20}),f_.add(`pie`,{match:e=>e===`pie`,createChart:(e,t,n)=>new j_(e,t,n),getChartRuntime:M_,validateChartDefinition:j_.validateChartDefinition,transformDefinition:j_.transformDefinition,getChartDefinitionFromContextCreation:j_.getDefinitionFromContextCreation,sequence:30}),f_.add(`scorecard`,{match:e=>e===`scorecard`,createChart:(e,t,n)=>new Bf(e,t,n),getChartRuntime:Hf,validateChartDefinition:Bf.validateChartDefinition,transformDefinition:Bf.transformDefinition,getChartDefinitionFromContextCreation:Bf.getDefinitionFromContextCreation,sequence:40}),f_.add(`gauge`,{match:e=>e===`gauge`,createChart:(e,t,n)=>new C_(e,t,n),getChartRuntime:w_,validateChartDefinition:C_.validateChartDefinition,transformDefinition:C_.transformDefinition,getChartDefinitionFromContextCreation:C_.getDefinitionFromContextCreation,sequence:50}),f_.add(`scatter`,{match:e=>e===`scatter`,createChart:(e,t,n)=>new lH(e,t,n),getChartRuntime:uH,validateChartDefinition:lH.validateChartDefinition,transformDefinition:lH.transformDefinition,getChartDefinitionFromContextCreation:lH.getDefinitionFromContextCreation,sequence:60}),f_.add(`waterfall`,{match:e=>e===`waterfall`,createChart:(e,t,n)=>new N_(e,t,n),getChartRuntime:P_,validateChartDefinition:N_.validateChartDefinition,transformDefinition:N_.transformDefinition,getChartDefinitionFromContextCreation:N_.getDefinitionFromContextCreation,sequence:70}),f_.add(`pyramid`,{match:e=>e===`pyramid`,createChart:(e,t,n)=>new lZ(e,t,n),getChartRuntime:uZ,validateChartDefinition:lZ.validateChartDefinition,transformDefinition:lZ.transformDefinition,getChartDefinitionFromContextCreation:lZ.getDefinitionFromContextCreation,sequence:80,dataSeriesLimit:2}),f_.add(`radar`,{match:e=>e===`radar`,createChart:(e,t,n)=>new dZ(e,t,n),getChartRuntime:fZ,validateChartDefinition:dZ.validateChartDefinition,transformDefinition:dZ.transformDefinition,getChartDefinitionFromContextCreation:dZ.getDefinitionFromContextCreation,sequence:80}),f_.add(`geo`,{match:e=>e===`geo`,createChart:(e,t,n)=>new sZ(e,t,n),getChartRuntime:cZ,validateChartDefinition:sZ.validateChartDefinition,transformDefinition:sZ.transformDefinition,getChartDefinitionFromContextCreation:sZ.getDefinitionFromContextCreation,sequence:90,dataSeriesLimit:1}),f_.add(`funnel`,{match:e=>e===`funnel`,createChart:(e,t,n)=>new aZ(e,t,n),getChartRuntime:oZ,validateChartDefinition:aZ.validateChartDefinition,transformDefinition:aZ.transformDefinition,getChartDefinitionFromContextCreation:aZ.getDefinitionFromContextCreation,sequence:100,dataSeriesLimit:1}),f_.add(`sunburst`,{match:e=>e===`sunburst`,createChart:(e,t,n)=>new pZ(e,t,n),getChartRuntime:mZ,validateChartDefinition:pZ.validateChartDefinition,transformDefinition:pZ.transformDefinition,getChartDefinitionFromContextCreation:pZ.getDefinitionFromContextCreation,sequence:30}),f_.add(`treemap`,{match:e=>e===`treemap`,createChart:(e,t,n)=>new hZ(e,t,n),getChartRuntime:gZ,validateChartDefinition:hZ.validateChartDefinition,transformDefinition:hZ.transformDefinition,getChartDefinitionFromContextCreation:hZ.getDefinitionFromContextCreation,sequence:100}),f_.add(`calendar`,{match:e=>e===`calendar`,createChart:(e,t,n)=>new tZ(e,t,n),getChartRuntime:(e,t)=>nZ(e,t),validateChartDefinition:tZ.validateChartDefinition,transformDefinition:tZ.transformDefinition,getChartDefinitionFromContextCreation:tZ.getDefinitionFromContextCreation,sequence:110,dataSeriesLimit:1}),K_.add(`line`,{matcher:e=>e.type===`line`&&!e.stacked&&!e.fillArea,displayName:k(`Line`),chartType:`line`,chartSubtype:`line`,subtypeDefinition:{stacked:!1,fillArea:!1},category:`line`,preview:`o-spreadsheet-ChartPreview.LINE_CHART`}).add(`stacked_line`,{matcher:e=>e.type===`line`&&!e.fillArea&&!!e.stacked,displayName:k(`Stacked Line`),chartType:`line`,chartSubtype:`stacked_line`,subtypeDefinition:{stacked:!0,fillArea:!1},category:`line`,preview:`o-spreadsheet-ChartPreview.STACKED_LINE_CHART`}).add(`area`,{matcher:e=>e.type===`line`&&!e.stacked&&!!e.fillArea,displayName:k(`Area`),chartType:`line`,chartSubtype:`area`,subtypeDefinition:{stacked:!1,fillArea:!0},category:`area`,preview:`o-spreadsheet-ChartPreview.AREA_CHART`}).add(`stacked_area`,{matcher:e=>e.type===`line`&&e.stacked&&!!e.fillArea,displayName:k(`Stacked Area`),chartType:`line`,chartSubtype:`stacked_area`,subtypeDefinition:{stacked:!0,fillArea:!0},category:`area`,preview:`o-spreadsheet-ChartPreview.STACKED_AREA_CHART`}).add(`scatter`,{displayName:k(`Scatter`),chartType:`scatter`,chartSubtype:`scatter`,category:`misc`,preview:`o-spreadsheet-ChartPreview.SCATTER_CHART`}).add(`column`,{matcher:e=>e.type===`bar`&&!e.stacked&&!e.horizontal,displayName:k(`Column`),chartType:`bar`,chartSubtype:`column`,subtypeDefinition:{stacked:!1,horizontal:!1},category:`column`,preview:`o-spreadsheet-ChartPreview.COLUMN_CHART`}).add(`stacked_column`,{matcher:e=>e.type===`bar`&&e.stacked&&!e.horizontal,displayName:k(`Stacked Column`),chartType:`bar`,chartSubtype:`stacked_column`,subtypeDefinition:{stacked:!0,horizontal:!1},category:`column`,preview:`o-spreadsheet-ChartPreview.STACKED_COLUMN_CHART`}).add(`bar`,{matcher:e=>e.type===`bar`&&!e.stacked&&!!e.horizontal,displayName:k(`Bar`),chartType:`bar`,chartSubtype:`bar`,subtypeDefinition:{horizontal:!0,stacked:!1},category:`bar`,preview:`o-spreadsheet-ChartPreview.BAR_CHART`}).add(`stacked_bar`,{matcher:e=>e.type===`bar`&&e.stacked&&!!e.horizontal,displayName:k(`Stacked Bar`),chartType:`bar`,chartSubtype:`stacked_bar`,subtypeDefinition:{horizontal:!0,stacked:!0},category:`bar`,preview:`o-spreadsheet-ChartPreview.STACKED_BAR_CHART`}).add(`combo`,{displayName:k(`Combo`),chartSubtype:`combo`,chartType:`combo`,category:`line`,preview:`o-spreadsheet-ChartPreview.COMBO_CHART`}).add(`pie`,{matcher:e=>e.type===`pie`&&!e.isDoughnut,displayName:k(`Pie`),chartSubtype:`pie`,chartType:`pie`,subtypeDefinition:{isDoughnut:!1},category:`pie`,preview:`o-spreadsheet-ChartPreview.PIE_CHART`}).add(`doughnut`,{matcher:e=>e.type===`pie`&&!!e.isDoughnut,displayName:k(`Doughnut`),chartSubtype:`doughnut`,chartType:`pie`,subtypeDefinition:{isDoughnut:!0},category:`pie`,preview:`o-spreadsheet-ChartPreview.DOUGHNUT_CHART`}).add(`gauge`,{displayName:k(`Gauge`),chartSubtype:`gauge`,chartType:`gauge`,category:`misc`,preview:`o-spreadsheet-ChartPreview.GAUGE_CHART`}).add(`scorecard`,{displayName:k(`Scorecard`),chartSubtype:`scorecard`,chartType:`scorecard`,category:`misc`,preview:`o-spreadsheet-ChartPreview.SCORECARD_CHART`}).add(`waterfall`,{displayName:k(`Waterfall`),chartSubtype:`waterfall`,chartType:`waterfall`,category:`misc`,preview:`o-spreadsheet-ChartPreview.WATERFALL_CHART`}).add(`pyramid`,{displayName:k(`Population Pyramid`),chartSubtype:`pyramid`,chartType:`pyramid`,category:`misc`,preview:`o-spreadsheet-ChartPreview.POPULATION_PYRAMID_CHART`}).add(`radar`,{matcher:e=>e.type===`radar`&&!e.fillArea,displayName:k(`Radar`),chartSubtype:`radar`,chartType:`radar`,subtypeDefinition:{fillArea:!1},category:`misc`,preview:`o-spreadsheet-ChartPreview.RADAR_CHART`}).add(`filled_radar`,{matcher:e=>e.type===`radar`&&!!e.fillArea,displayName:k(`Filled Radar`),chartType:`radar`,chartSubtype:`filled_radar`,subtypeDefinition:{fillArea:!0},category:`misc`,preview:`o-spreadsheet-ChartPreview.FILLED_RADAR_CHART`}).add(`geo`,{displayName:k(`Geo Chart`),chartSubtype:`geo`,chartType:`geo`,category:`misc`,preview:`o-spreadsheet-ChartPreview.GEO_CHART`}).add(`funnel`,{displayName:k(`Funnel`),chartSubtype:`funnel`,chartType:`funnel`,category:`misc`,preview:`o-spreadsheet-ChartPreview.FUNNEL_CHART`}).add(`sunburst`,{matcher:e=>e.type===`sunburst`,displayName:k(`Sunburst`),chartSubtype:`sunburst`,chartType:`sunburst`,category:`hierarchical`,preview:`o-spreadsheet-ChartPreview.SUNBURST_CHART`}).add(`treemap`,{matcher:e=>e.type===`treemap`,displayName:k(`Tree Map`),chartType:`treemap`,chartSubtype:`treemap`,category:`hierarchical`,preview:`o-spreadsheet-ChartPreview.TREE_MAP_CHART`}).add(`calendar`,{displayName:k(`Calendar`),chartSubtype:`calendar`,chartType:`calendar`,category:`misc`,preview:`o-spreadsheet-ChartPreview.CALENDAR_CHART`});var _Z=class extends DG{queuedBordersToAdd={};copy(e){let t=e.sheetId;if(e.zones.length===0)return;let{rowsIndexes:n,columnsIndexes:r}=e,i=[];for(let e of n){let n=[];for(let i of r){let r={col:i,row:e,sheetId:t};n.push(this.getters.getCellBorder(r))}i.push(n)}return{borders:i}}paste(e,t,n){let r=e.sheetId;if(n.pasteOption===`asValue`)return;let i=e.zones;if(!n.isCutOperation)this.pasteFromCopy(r,i,t.borders);else{let{left:e,top:n}=i[0];this.pasteZone(r,e,n,t.borders)}this.executeQueuedChanges(r)}pasteZone(e,t,n,r){for(let[i,a]of r.entries())for(let[r,o]of a.entries()){let a={col:t+r,row:n+i,sheetId:e};this.pasteBorder(o,a)}}pasteBorder(e,t){let n={...this.getters.getCellBorder(t),...e},r=JSON.stringify(n);this.queuedBordersToAdd[r]||(this.queuedBordersToAdd[r]=[]),this.queuedBordersToAdd[r].push(E(t))}executeQueuedChanges(e){for(let t in this.queuedBordersToAdd){let n=this.queuedBordersToAdd[t],r=JSON.parse(t),i=Qt(n,[]);this.dispatch(`SET_BORDERS_ON_TARGET`,{sheetId:e,target:i,border:r})}this.queuedBordersToAdd={}}},vZ=class extends EG{copy(e){}},yZ=class extends vZ{copy(e){let t=e.sheetId,n=this.getters.getFigure(t,e.figureId);if(!n)throw Error(`No figure for the given id: ${e.figureId}`);if(n.tag!==`carousel`)return;let r={...n},i=this.getters.getCarousel(e.figureId),a={};for(let e of i.items)if(e.type===`chart`){let n=this.getters.getChart(e.chartId);if(!n)throw Error(`No chart for the given id: ${e.chartId}`);a[e.chartId]=n.copyInSheetId(t)}return{figureId:e.figureId,copiedFigure:r,copiedCarousel:i,copiedCharts:a,copiedSheetId:t}}getPasteTarget(e){return{zones:[],figureId:new Gl().smallUuid(),sheetId:e}}paste(e,t,n){if(!e.figureId)return;let{zones:r,figureId:i}=e,a=e.sheetId,{width:o,height:s}=t.copiedFigure,c=this.getters.getMaxAnchorOffset(a,s,o),{left:l,top:u}=r[0],d={x:0,y:0};l>c.col&&(l=c.col,d.x=c.offset.x),u>c.row&&(u=c.row,d.y=c.offset.y),this.dispatch(`CREATE_CAROUSEL`,{figureId:i,sheetId:a,definition:{items:[]},col:l,row:u,offset:d,size:{height:s,width:o}});let f=new Gl,p=b(t.copiedCarousel.items);for(let e of p){if(e.type!==`chart`)continue;let n=t.copiedCharts[e.chartId],r=f.smallUuid(),o=n.copyInSheetId(a).getDefinition();this.dispatch(`CREATE_CHART`,{figureId:i,chartId:r,sheetId:a,definition:o}),e.chartId=r}this.dispatch(`UPDATE_CAROUSEL`,{sheetId:a,figureId:i,definition:{...t.copiedCarousel,items:p}}),n.isCutOperation&&this.dispatch(`DELETE_FIGURE`,{sheetId:t.copiedSheetId,figureId:t.copiedFigure.id}),this.dispatch(`SELECT_FIGURE`,{figureId:i})}isPasteAllowed(e,t,n,r){return t.length===0?`EmptyTarget`:r?.pasteOption===void 0?`Success`:`WrongFigurePasteOption`}},bZ=class extends vZ{copy(e){let t=e.sheetId,n=this.getters.getFigure(t,e.figureId);if(!n)throw Error(`No figure for the given id: ${e.figureId}`);if(n.tag!==`chart`)return;let r={...n},i=this.getters.getChartFromFigureId(e.figureId);if(!i)throw Error(`No chart for the given id: ${e.figureId}`);let a=i.copyInSheetId(t);return{figureId:e.figureId,copiedFigure:r,copiedChart:a}}getPasteTarget(e,t,n,r){return{zones:[],figureId:new Gl().smallUuid(),sheetId:e}}paste(e,t,n){if(!e.figureId)return;let{zones:r,figureId:i}=e,a=e.sheetId,{width:o,height:s}=t.copiedFigure,c=t.copiedChart.copyInSheetId(a),l=this.getters.getMaxAnchorOffset(a,s,o),{left:u,top:d}=r[0],f={x:0,y:0};u>l.col&&(u=l.col,f.x=l.offset.x),d>l.row&&(d=l.row,f.y=l.offset.y),this.dispatch(`CREATE_CHART`,{figureId:i,chartId:new Gl().smallUuid(),sheetId:a,definition:c.getDefinition(),col:u,row:d,offset:f,size:{height:s,width:o}}),n.isCutOperation&&this.dispatch(`DELETE_FIGURE`,{sheetId:t.copiedChart.sheetId,figureId:t.copiedFigure.id}),this.dispatch(`SELECT_FIGURE`,{figureId:i})}isPasteAllowed(e,t,n,r){return t.length===0?`EmptyTarget`:r?.pasteOption===void 0?`Success`:`WrongFigurePasteOption`}},xZ=class extends DG{uuidGenerator=new Gl;queuedChanges={};copy(e){if(!e.zones.length)return;let{rowsIndexes:t,columnsIndexes:n}=e,r=e.sheetId,i=[];for(let e of t){let t=[];for(let i of n){let n=Array.from(this.getters.getRulesByCell(r,i,e));t.push({position:{col:i,row:e,sheetId:r},rules:n})}i.push(t)}return{cfRules:i}}paste(e,t,n){if(this.queuedChanges={},n.pasteOption===`asValue`)return;let r=e.zones,i=e.sheetId;n.isCutOperation?this.pasteFromCut(i,r,t):this.pasteFromCopy(i,r,t.cfRules,n),this.executeQueuedChanges()}pasteFromCut(e,t,n){let r=t[0];this.pasteZone(e,r.left,r.top,n.cfRules,{isCutOperation:!0})}pasteZone(e,t,n,r,i){for(let[a,o]of r.entries())for(let[r,s]of o.entries()){let o={col:t+r,row:n+a,sheetId:e};this.pasteCf(s,o,i?.isCutOperation)}}pasteCf(e,t,n){if(e?.rules&&e.rules.length>0){let r=E(e.position),i=E(t);for(let a of e.rules){let o=[];if(n&&o.push(r),e.position.sheetId===t.sheetId)this.adaptCFRules(e.position.sheetId,a,[i],o);else{this.adaptCFRules(e.position.sheetId,a,[],o);let n=this.getCFToCopyTo(t.sheetId,a);this.adaptCFRules(t.sheetId,n,[i],[])}}}}adaptCFRules(e,t,n,r){this.queuedChanges[e]||(this.queuedChanges[e]=[]);let i=this.queuedChanges[e].find(e=>e.cf.id===t.id);i?(i.toAdd.push(...n),i.toRemove.push(...r)):this.queuedChanges[e].push({toAdd:n,toRemove:r,cf:t})}executeQueuedChanges(){for(let e in this.queuedChanges)for(let{toAdd:t,toRemove:n,cf:r}of this.queuedChanges[e]){let i=this.getters.getAdaptedCfRanges(e,r,t,n);if(i){if(i.length===0){this.dispatch(`REMOVE_CONDITIONAL_FORMAT`,{id:r.id,sheetId:e});continue}this.dispatch(`ADD_CONDITIONAL_FORMAT`,{cf:{id:r.id,rule:r.rule,stopIfTrue:r.stopIfTrue},ranges:i,sheetId:e})}}}getCFToCopyTo(e,t){let n=this.getters.getConditionalFormats(e).find(e=>e.stopIfTrue===t.stopIfTrue&&w(e.rule,t.rule)),r=this.queuedChanges[e];return!n&&r&&(n=r.find(e=>e.cf.stopIfTrue===t.stopIfTrue&&w(e.cf.rule,t.rule))?.cf),n||{...t,id:this.uuidGenerator.smallUuid(),ranges:[]}}},SZ=class extends DG{uuidGenerator=new Gl;queuedChanges={};copy(e){let{rowsIndexes:t,columnsIndexes:n}=e,r=e.sheetId,i=[];for(let e of t){let t=[];for(let i of n){let n={sheetId:r,col:i,row:e},a=this.getters.getValidationRuleForCell(n);t.push({position:n,rule:a})}i.push(t)}return{dvRules:i}}paste(e,t,n){if(this.queuedChanges={},n.pasteOption)return;let r=e.zones,i=e.sheetId;n.isCutOperation?this.pasteFromCut(i,r,t):this.pasteFromCopy(i,r,t.dvRules),this.executeQueuedChanges()}pasteFromCut(e,t,n){let r=t[0];this.pasteZone(e,r.left,r.top,n.dvRules,{isCutOperation:!0})}pasteZone(e,t,n,r,i){for(let[a,o]of r.entries())for(let[r,s]of o.entries()){let o={col:t+r,row:n+a,sheetId:e};this.pasteDataValidation(s,o,i?.isCutOperation)}}pasteDataValidation(e,t,n){if(e){let r=E(t),i=E(e.position),a=e.rule;if(!a){let e=this.getters.getValidationRuleForCell(t);e&&this.adaptDataValidationRule(t.sheetId,e,[],[r]);return}let o=[];if(n&&o.push(i),e.position.sheetId===t.sheetId){let n=this.getDataValidationRuleToCopyTo(t.sheetId,a,!1);this.adaptDataValidationRule(e.position.sheetId,n,[r],o)}else{let n=this.getters.getValidationRuleForCell(e.position);n&&this.adaptDataValidationRule(e.position.sheetId,n,[],o);let i=this.getDataValidationRuleToCopyTo(t.sheetId,a);this.adaptDataValidationRule(t.sheetId,i,[r],[])}}}getDataValidationRuleToCopyTo(e,t,n=!0){let r=this.getters.getDataValidationRules(e).find(e=>w(t.criterion,e.criterion)&&t.isBlocking===e.isBlocking),i=this.queuedChanges[e];return!r&&i&&(r=i.find(e=>w(t.criterion,e.rule.criterion)&&t.isBlocking===e.rule.isBlocking)?.rule),r||{...t,id:n?this.uuidGenerator.smallUuid():t.id,ranges:[]}}adaptDataValidationRule(e,t,n,r){this.queuedChanges[e]||(this.queuedChanges[e]=[]);let i=this.queuedChanges[e].find(e=>e.rule.id===t.id);i?(i.toAdd.push(...n),i.toRemove.push(...r)):this.queuedChanges[e].push({toAdd:n,toRemove:r,rule:t})}executeQueuedChanges(){for(let e in this.queuedChanges)for(let{toAdd:t,toRemove:n,rule:r}of this.queuedChanges[e]){let i=Qt([...Qt(r.ranges.map(e=>e.zone),n),...t],[]);if(i.length===0){this.dispatch(`REMOVE_DATA_VALIDATION_RULE`,{sheetId:e,id:r.id});continue}this.dispatch(`ADD_DATA_VALIDATION_RULE`,{rule:{id:r.id,criterion:r.criterion,isBlocking:r.isBlocking},ranges:i.map(t=>this.getters.getRangeDataFromZone(e,t)),sheetId:e})}}},CZ=class extends vZ{copy(e){let t=e.sheetId,n=this.getters.getFigure(t,e.figureId);if(!n)throw Error(`No figure for the given id: ${e.figureId}`);let r={...n};if(n.tag!==`image`)return;let i=b(this.getters.getImage(e.figureId));return{figureId:e.figureId,copiedFigure:r,copiedImage:i,sheetId:t}}getPasteTarget(e,t,n,r){return{sheetId:e,zones:[],figureId:new Gl().smallUuid()}}paste(e,t,n){if(!e.figureId)return;let{zones:r,figureId:i}=e,a=this.getters.getActiveSheetId(),{width:o,height:s}=t.copiedFigure,c=b(t.copiedImage),l=this.getters.getMaxAnchorOffset(a,s,o),{left:u,top:d}=r[0],f={x:0,y:0};u>l.col&&(u=l.col,f.x=l.offset.x),d>l.row&&(d=l.row,f.y=l.offset.y),this.dispatch(`CREATE_IMAGE`,{figureId:i,sheetId:a,col:u,row:d,offset:f,size:{height:s,width:o},definition:c}),n.isCutOperation&&this.dispatch(`DELETE_FIGURE`,{sheetId:t.sheetId,figureId:t.copiedFigure.id}),this.dispatch(`SELECT_FIGURE`,{figureId:i})}isPasteAllowed(e,t,n,r){return t.length===0?`EmptyTarget`:r?.pasteOption===void 0?`Success`:`WrongFigurePasteOption`}},wZ=class extends DG{copy(e){let t=this.getters.getActiveSheetId(),{rowsIndexes:n,columnsIndexes:r}=e,i=[];for(let e of n){let n=[];for(let i of r){let r={col:i,row:e,sheetId:t};n.push(this.getters.getMerge(r))}i.push(n)}return{merges:i,sheetId:t}}paste(e,t,n){if(n.isCutOperation){let e=t.merges.flat().filter(C);this.dispatch(`REMOVE_MERGE`,{sheetId:t.sheetId,target:e})}this.pasteFromCopy(e.sheetId,e.zones,t.merges,n)}pasteZone(e,t,n,r){for(let[i,a]of r.entries())for(let[r,o]of a.entries()){let a={col:t+r,row:n+i,sheetId:e};this.pasteMerge(o,a)}}pasteMerge(e,t){if(!e||this.getters.isInMerge(t))return;let{sheetId:n,col:r,row:i}=t;this.dispatch(`ADD_MERGE`,{sheetId:n,force:!0,target:[{left:r,top:i,right:r+e.right-e.left,bottom:i+e.bottom-e.top}]})}},TZ=class extends DG{copy(e){return{zones:e.clippedZones,sheetId:e.sheetId}}paste(e,t,n){if(n.isCutOperation){let n=e.zones[0];this.dispatch(`MOVE_RANGES`,{target:t.zones,sheetId:t.sheetId,sheetName:this.getters.getSheetName(t.sheetId),targetSheetId:e.sheetId,col:n.left,row:n.top})}}},EZ=class extends DG{isPasteAllowed(e,t,n,r){if(!(`cells`in n))return`Success`;let{xSplit:i,ySplit:a}=this.getters.getPaneDivisions(e);return Un(rA(t,n.cells),i,a)?`FrozenPaneOverlap`:`Success`}},DZ=class extends DG{copy(e){let t=e.sheetId;if(e.zones.length===0)return;let n=[],r=0;for(let i of Ze(e.columnsIndexes)){let a=0;for(let o of Ze(e.rowsIndexes)){let e={left:i[0],right:i[i.length-1],top:o[0],bottom:o[o.length-1]};n.push(...this.getters.getZoneStyles(t,e).map(t=>({zone:{left:t.zone.left-e.left+r,right:t.zone.right&&t.zone.right-e.left+r,top:t.zone.top-e.top+a,bottom:t.zone.bottom&&t.zone.bottom-e.top+a},style:t.style}))),a+=o.length}r+=i.length}return{styles:n,width:e.columnsIndexes.length,height:e.rowsIndexes.length}}paste(e,t,n){let r=e.sheetId;if(n.pasteOption===`asValue`)return;let i=e.zones;if(n.isCutOperation){let{left:e,top:n}=i[0];this.pasteStyleZone(r,e,n,t.styles)}else for(let e of i)for(let n of nA(e,t.width,t.height))this.pasteStyleZone(r,n.left,n.top,t.styles)}pasteStyleZone(e,t,n,r){for(let i of r){let r={left:i.zone.left+t,right:i.zone.right&&i.zone.right+t||i.zone.left+t,top:i.zone.top+n,bottom:i.zone.bottom&&i.zone.bottom+n||i.zone.top+n};this.dispatch(`SET_FORMATTING`,{sheetId:e,target:[r],style:i.style})}}},OZ=class extends DG{copy(e,t,n=`copyPaste`){let r=e.sheetId,{rowsIndexes:i,columnsIndexes:a,zones:o}=e,s=new Set,c=[];for(let e of i){let l=[];c.push(l);for(let c of a){let a={col:c,row:e,sheetId:r},u=this.getters.getTable(a);if(!u){l.push({});continue}let d=this.getters.getCoreTable(a),f=d?.range.zone,p;if(!s.has(u.id)&&d&&f&&o.some(e=>Dn(f,e))){s.add(u.id);let{numberOfRows:e}=On(f);for(let n=f.top;n<=f.bottom;n++)!t&&!i.includes(n)&&e--;let n=d.range,r=this.getters.extendRange(d.range,`ROW`,n.zone.top+e-1-n.zone.bottom);p={range:this.getters.getRangeData(r),config:d.config,type:d.type}}n!==`shiftCells`&&l.push({table:p,style:this.getTableStyleToCopy(a),isWholeTableCopied:s.has(u.id)})}}return{tableCells:c,sheetId:e.sheetId}}getTableStyleToCopy(e){let t=this.getters.getCellTableStyle(e),n=this.getters.getCellStyle(e),r=this.getters.getCellTableBorder(e),i=this.getters.getCellBorder(e);return{style:{...t,...bt(n)},border:{...r,...bt(i)}}}paste(e,t,n){let r=e.zones,i=e.sheetId;n.isCutOperation?this.pasteFromCut(i,r,t,n):this.pasteFromCopy(i,r,t.tableCells,n)}pasteFromCut(e,t,n,r){for(let e of n.tableCells)for(let t of e)t.table&&this.dispatch(`REMOVE_TABLE`,{sheetId:n.sheetId,target:[this.getters.getRangeFromRangeData(t.table.range).zone]});let i=t[0];this.pasteZone(e,i.left,i.top,n.tableCells,r)}pasteZone(e,t,n,r,i){for(let a=0;a<r.length;a++){let o=r[a];for(let r=0;r<o.length;r++){let s=o[r];if(!s)continue;let c={col:t+r,row:n+a,sheetId:e};this.pasteTableCell(e,s,c,i)}}if(r.length===1)for(let i=0;i<r[0].length;i++)this.dispatch(`AUTOFILL_TABLE_COLUMN`,{col:t+i,row:n,sheetId:e})}pasteTableCell(e,t,n,r){if(t.table&&!r?.pasteOption){let{range:r}=t.table,i=On(this.getters.getRangeFromRangeData(r).zone),a={left:n.col,top:n.row,right:n.col+i.numberOfCols-1,bottom:n.row+i.numberOfRows-1};this.dispatch(`CREATE_TABLE`,{sheetId:n.sheetId,ranges:[this.getters.getRangeDataFromZone(e,a)],config:t.table.config,tableType:t.table.type})}this.getters.getCoreTable(n)||r?.pasteOption===`asValue`||(!r?.pasteOption&&!t.isWholeTableCopied||r?.pasteOption===`onlyFormat`)&&(t.style?.style&&this.dispatch(`UPDATE_CELL`,{...n,style:t.style.style}),t.style?.border&&this.dispatch(`SET_BORDER`,{...n,border:t.style.border}))}};BB.figureHandlers.add(`chart`,bZ).add(`image`,CZ).add(`carousel`,yZ),BB.cellHandlers.add(`dataValidation`,SZ).add(`cell`,OG).add(`sheet`,EZ).add(`merge`,wZ).add(`border`,_Z).add(`table`,OZ).add(`conditionalFormat`,xZ).add(`references`,TZ).add(`style`,DZ);let kZ={},AZ={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},jZ={autoCompleteProviders:ak,autofillModifiersRegistry:AG,autofillRulesRegistry:jG,cellMenuRegistry:SR,colMenuRegistry:Bz,errorTypes:da,linkMenuRegistry:Qk,functionRegistry:yO,featurePluginRegistry:dq,iconsOnCellRegistry:lG,statefulUIPluginRegistry:fq,coreViewsPluginRegistry:pq,corePluginRegistry:uq,rowMenuRegistry:qz,sidePanelRegistry:tW,figureRegistry:Mv,chartSidePanelComponentRegistry:xH,chartComponentRegistry:sv,chartRegistry:f_,chartSubtypeRegistry:K_,topbarMenuRegistry:Wq,topbarComponentRegistry:uJ,clickableCellRegistry:bq,otRegistry:XG,inverseCommandRegistry:Cq,urlRegistry:Js,cellPopoverRegistry:Fv,numberFormatMenuRegistry:zq,repeatLocalCommandTransformRegistry:VK,repeatCommandTransformRegistry:BK,clipboardHandlersRegistries:BB,pivotRegistry:ZL,pivotTimeAdapterRegistry:Um,pivotSidePanelRegistry:FU,pivotNormalizationValueRegistry:xh,supportedPivotPositionalFormulaRegistry:sW,pivotToFunctionValueRegistry:Sh,migrationStepRegistry:nP,chartJsExtensionRegistry:ql},MZ={arg:G,isEvaluationError:M,toBoolean:F,toJsDate:I,toNumber:N,toString:P,toNormalizedPivotValue:_h,toFunctionPivotValue:yh,toXC:T,toZone:un,toUnboundedZone:ln,toCartesian:Zt,numberToLetters:Ht,lettersToNumber:Ut,UuidGenerator:Gl,formatValue:z,createCurrencyFormat:ls,ColorGenerator:ei,computeTextWidth:Dl,createEmptyWorkbookData:SP,createEmptySheet:xP,createEmptyExcelSheet:CP,rgbaToHex:jr,colorToRGBA:Mr,positionToZone:E,isDefined:C,isMatrix:xa,lazy:mt,genericRepeat:lJ,createAction:h,createActions:p,transformRangeData:$n,deepEquals:w,overlap:wn,union:bn,isInside:En,deepCopy:b,expandZoneOnInsertion:gn,reduceZoneOnDeletion:yn,unquote:Je,getMaxObjectId:lh,getFunctionsFromTokens:CU,getFirstPivotFunction:EU,getNumberOfPivotFunctions:DU,parseDimension:fh,isDateOrDatetimeField:ph,makeFieldProposal:OU,insertTokenAfterArgSeparator:AU,insertTokenAfterLeftParenthesis:jU,mergeContiguousZones:Xn,getPivotHighlights:GH,pivotTimeAdapter:Wm,UNDO_REDO_PIVOT_COMMANDS:CG,createPivotFormula:gh,areDomainArgsFieldsValid:hh,splitReference:Pc,sanitizeSheetName:Xe,getUniqueText:zt,isNumber:$i,isDateTime:xi,createCustomFields:Oh,schemeToColorScale:Mm,isDateTimeFormat:ns,jsDateToNumber:Fi,numberToJsDate:Ni,DateTime:O,parseFormat:Eo,isFormula:Bt},NZ={isMarkdownLink:nt,parseMarkdownLink:at,markdownLink:it,openLink:$s,urlRepresentation:Qs},PZ={Checkbox:Fk,Section:q,RoundColorPicker:bk,ChartDataSeries:TV,ChartErrorSection:EV,ChartLabelRange:DV,ChartTitle:jV,ChartPanel:TH,ChartFigure:Av,ChartJsComponent:kf,ClickableCellSortIcon:cW,ZoomableChartJsComponent:$_,Grid:oW,GridOverlay:KB,ScorecardChart:Cp,GaugeChartComponent:av,LineConfigPanel:iH,BarConfigPanel:kV,PieChartDesignPanel:sH,GenericChartConfigPanel:OV,ChartWithAxisDesignPanel:VV,GenericZoomableChartDesignPanel:HV,LineChartDesignPanel:aH,GaugeChartConfigPanel:QV,GaugeChartDesignPanel:$V,ScorecardChartConfigPanel:fH,ScorecardChartDesignPanel:pH,GeoChartDesignPanel:nH,RadarChartDesignPanel:cH,WaterfallChartDesignPanel:bH,ComboChartDesignPanel:YV,FunnelChartDesignPanel:ZV,SunburstChartDesignPanel:mH,TreeMapChartDesignPanel:yH,ChartTypePicker:CH,FigureComponent:Nv,MenuPopover:Dv,Popover:Cv,SelectionInput:kk,ValidationMessages:IB,AddDimensionButton:XH,PivotDimensionGranularity:QH,PivotDimensionOrder:$H,PivotDimension:ZH,PivotLayoutConfigurator:yU,PivotHTMLRenderer:uW,PivotDeferUpdate:qH,PivotTitleSection:bU,CogWheelMenu:SV,TextInput:gV,SidePanelCollapsible:Vv,RadioSelection:NV,GeoChartRegionSelectSection:eH,ChartDashboardMenu:Ov,FullScreenFigure:lW,NumberInput:LV,TopBar:JJ,Composer:PO},FZ={useDragAndDropListItems:Sk,useHighlights:OH,useHighlightsOnHover:DH},IZ={useStoreProvider:ar,DependencyContainer:tr,CellPopoverStore:Bk,ComposerFocusStore:_r,CellComposerStore:CB,FindAndReplaceStore:LH,HighlightStore:sk,DelayedHoveredCellStore:Pv,HoveredTableStore:UB,ModelStore:ur,NotificationStore:ck,RendererStore:mr,SelectionInputStore:Ok,SpreadsheetStore:hr,useStore:D,useLocalStore:or,SidePanelStore:rW,PivotSidePanelStore:NU,PivotMeasureDisplayPanelStore:UH,ClientFocusStore:Yz,GridRenderer:eV};function LZ(e,t){return yO.add(e,t),{addFunction:(e,t)=>LZ(e,t)}}let RZ={DEFAULT_LOCALE:R,HIGHLIGHT_COLOR:ee,PIVOT_TABLE_CONFIG:Le,ChartTerms:Yp,FIGURE_ID_SPLITTER:`??`,GRID_ICON_EDGE_LENGTH:17,GRID_ICON_MARGIN:2},zZ={...F_,...l_};e.AbstractCellClipboardHandler=DG,e.AbstractChart=Af,e.AbstractFigureClipboardHandler=vZ,e.CellErrorType=A,e.ClientDisconnectedError=jK,e.CommandResult=Ks,e.CorePlugin=dW,e.CoreViewPlugin=LW,e.DEFAULT_LOCALE=R,e.DEFAULT_LOCALES=uo,e.DispatchResult=Ws,e.EvaluationError=j,e.LocalTransportService=dJ,e.Model=QX,e.PivotRuntimeDefinition=LL,e.Registry=B,e.Revision=AK,e.SPREADSHEET_DIMENSIONS=AZ,e.Spreadsheet=ZJ,e.SpreadsheetPivotTable=zL,e.UIPlugin=cb,e.__info__=kZ,e.addFunction=LZ,e.addRenderingLayer=pr,e.astToFormula=yB,e.categories=bO,e.chartHelpers=zZ,e.components=PZ,e.constants=RZ,e.convertAstNodes=JO,e.coreTypes=Vs,e.createAutocompleteArgumentsProvider=mq,e.findCellInNewZone=Ln,e.functionCache=cU,e.getCaretDownSvg=ZA,e.getCaretUpSvg=QA,e.helpers=MZ,e.hooks=FZ,e.invalidateCFEvaluationCommands=Ls,e.invalidateChartEvaluationCommands=Fs,e.invalidateDependenciesCommands=Is,e.invalidateEvaluationCommands=Ps,e.iterateAstNodes=YO,e.links=NZ,e.load=sP,e.parse=KO,e.parseTokens=qO,e.readonlyAllowedCommands=Bs,e.registries=jZ,e.setDefaultSheetViewSize=Fe,e.setTranslationMethod=ca,e.stores=IZ,e.tokenColors=He,e.tokenize=bu,kZ.version=`19.1.19`,kZ.date=`2026-05-12T12:20:42.167Z`,kZ.hash=`aea4a8c`})(this.o_spreadsheet=this.o_spreadsheet||{},owl);
@@ -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 19.1.18
5
- @date 2026-05-11T13:46:50.248Z
6
- @hash a849339
4
+ @version 19.1.19
5
+ @date 2026-05-12T12:20:43.054Z
6
+ @hash aea4a8c
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.1.18",
3
+ "version": "19.1.19",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -17,7 +17,7 @@
17
17
  "node": ">=22.0.0"
18
18
  },
19
19
  "scripts": {
20
- "postinstall": "husky install",
20
+ "prepare": "husky install",
21
21
  "prettier": "prettier . --write",
22
22
  "check-formatting": "prettier . --check && eslint",
23
23
  "lint": "eslint --fix",
@@ -92,7 +92,7 @@
92
92
  "jszip": "^3.6.0",
93
93
  "lint-staged": "^12.1.2",
94
94
  "live-server": "^1.2.1",
95
- "luxon": "^3.7.2",
95
+ "luxon": "3.7.2",
96
96
  "minimist": "^1.2.8",
97
97
  "mockdate": "^3.0.2",
98
98
  "node-watch": "^0.7.3",
@@ -141,7 +141,7 @@
141
141
  },
142
142
  "dependencies": {
143
143
  "@odoo/owl": "2.8.3",
144
- "bootstrap": "^5.3.3",
144
+ "bootstrap": "5.3.3",
145
145
  "font-awesome": "^4.7.0",
146
146
  "rbush": "^3.0.1"
147
147
  },