UNPKG

@mescius/spread-sheets-reportsheet-addon

Version:

SpreadJS ReportSheet Plugin

12 lines 404 kB
/*! * * SpreadJS Library 19.1.0 * * Copyright(c) MESCIUS inc. All rights reserved. * * Licensed under the SpreadJS Commercial License. * us.sales@mescius.com * https://developer.mescius.com/spreadjs * */ !function(n){"object"==typeof module&&"object"==typeof module.exports?module.exports=n(require("@mescius/spread-sheets")):"function"==typeof define&&define.amd?define(["@mescius/spread-sheets"],n):"object"==typeof exports?exports.Spread=n(require("@mescius/spread-sheets")):n(GC)}((function(n){!function(){var t,i={101:function(n,t,i){"use strict";var r,o,u,e,c;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationHelper=void 0,r=i(1376),o=i(5907),u=i(9163),e=i(8096),c=function(){function n(n,t,i,r){this.b8=n,this.Mf=t,this.Cji=i,this.mCi=r}return n.prototype.copyValidation=function(){try{var n=this,t=n.Mf;t.b8.fromJSON(n.b8.toJSON(),null,t),n.updateValidation(),t.b8.C8()}catch(n){}},n.prototype.updateValidation=function(){var n,t,i,r=this,o=r.Mf,u=o.b8,e=u.YB,c=Object.keys(e);for(n=0,t=c;n<t.length;n++)i=t[n],r.updateValidatorRange(e[i])},n.prototype.updateValidatorRange=function(n){var t,i,c,f,s,l,h,a,v,d,M,w,I=this,C=n.smt(),N=I.Cji,g=I.b8.eJ,A=new e.SmartCache,E=new r.Range(0,0,g.getRowCount(),g.getColumnCount()),D=[];for(a=0,v=C;a<v.length;a++)if(h=(d=v[a]).getIntersect(E,g.getRowCount(),g.getColumnCount())){for(i=h.row,c=h.col,f=i+h.rowCount-1,s=c+h.colCount-1,l=[];i<=f;i++){for(;c<=s;c++)M=void 0,A.get(i,c)||(!(M=g.getSpan(i,c))||M.row===i&&M.col===c)&&(I.V5i(M,i,c,A),N.getAllCells(i,c).forEach((function(n){l.push(n)})));c=h.col}w=!(0,o.pCi)(l[0]),(0,u.atr)(l,w),(0,u.pushArrayTo)((0,o.dCi)(l,!(0,o.pCi)(l[0])),D)}n._S=D,null===(t=n.condition())||void 0===t||t.ranges(D)},n.prototype.V5i=function(n,t,i,r){if(n)for(var o=n.row,u=o+n.rowCount-1,e=n.col,c=e+n.colCount-1;o<=u;o++){for(;e<=c;e++)r.set(o,e,!0);e=n.col}else r.set(t,i,!0)},n.prototype.getInvalidCells=function(){var n,t,i,r,o,u,e,c=this,f=c.Mf,s=f.b8.p6t(),l=[];if(s&&s.length>0)for(t=0,i=s;t<i.length;t++)if((n=(r=i[t]).smt())&&n.length>0)for(o=0,u=n;o<u.length;o++)e=u[o],c.KCi(e,r,l);return l},n.prototype.KCi=function(n,t,i){for(var r=this,o=r.Mf,u=n.row,e=n.col,c=n.rowCount,f=n.colCount,s=u+c,l=e+f,h=r.mCi;u<s;u++){for(;e<l;e++)t.isValid(o,u,e,h.Bji(u,e))||i.push([u,e]);e=n.col}},n}(),t.ValidationHelper=c},201:function(n,t,i){"use strict";var r,o,u,e,c=this&&this.vJr||(f=function(n,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},f(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=n}f(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),f;function s(n){var t="reportSheetExpandAll";r.Commands[t]={canUndo:!1,execute:function(n,t,i){return u(n,e,t,i)}},n.register(t,r.Commands[t])}Object.defineProperty(t,"__esModule",{value:!0}),t.registerExpandAllCommand=void 0,o=(r=i(1376)).Commands.ActionBase,u=r.Commands.zA,e=function(n){function t(t,i){return n.call(this,t,i)||this}return c(t,n),t.prototype.execute=function(){var n,t;this.canExecute()&&((n=this.Mf).suspendPaint(),((t=this.tT.selections)||[]).forEach((function(t){var i,r,o,u=t.row,e=t.rowCount,c=t.col,f=t.colCount,s=u+e-1,l=c+f-1;for(i=u;i<=s;i++)for(r=c;r<=l;r++)(!(o=n.getSpan(i,r))||o.row===i&&o.col===r)&&n.Oji(i,r,"Expanded",!0,!0)})),n.invalidateLayout(),n.gP(),n.resumePaint())},t}(o),t.registerExpandAllCommand=s},344:function(n,t,i){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateInfo=void 0,r=i(1376),o=function(){function n(n){this.COi(n)}return n.prototype.COi=function(n){this.mOi=n},n.prototype.ML=function(n,t){return this.mOi.getActualStyle(n,t,r.SheetArea.viewport,!0)},n.prototype.F5t=function(n){return+this.mOi.getColumnWidth(n)},n.prototype.L5t=function(n){return+this.mOi.getRowHeight(n)},n.prototype.NOi=function(){return this.mOi.conditionalFormats},n.prototype.getCellStates=function(){return this.mOi.cellStates},n.prototype.getValidations=function(){return this.mOi.b8},n.prototype.lfi=function(){return this.mOi.shapes.all()},n.prototype.zfr=function(){return this.mOi.dataCharts.all()},n.prototype.Vfr=function(n){return this.mOi.dataCharts.get(n)},n.prototype.D7=function(n,t){return this.mOi.getSpan(n,t)},n.prototype.rnr=function(){return this.mOi.getRowCount()},n.prototype.enr=function(){return this.mOi.getColumnCount()},n.prototype.e2t=function(){return this.mOi.getCustomNames()},n.prototype.anr=function(n){return this.mOi.getCustomName(n)},n.prototype.Knr=function(n){return this.mOi.shapes.zIndex(n)},n.prototype.qnr=function(){return this.mOi.getPaginationSetting()},n}(),t.TemplateInfo=o},347:function(n,t,i){"use strict";var r,o,u,e,c,f,s,l,h,a,v,d,M,w,I,C,N=this&&this.vJr||(A=function(n,t){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},A(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=n}A(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),g=this&&this.mJr||function(){return g=Object.assign||function(n){var t,i,r,o;for(i=1,r=arguments.length;i<r;i++)for(o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},g.apply(this,arguments)},A;Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateSheet=void 0,r=i(1376),o=i(7019),u=i(9633),e=i(9163),c=i(4165),f=i(9834),s=i(5165),l=i(961),h=i(2964),a=i(4578),v=i(3775),d=i(1258),M=i(6156),w=i(5065),I=".template-sheet",C=function(n){function t(i,u){var f,v=n.call(this,i)||this;return v.isReportTemplateSheet=!0,v.E4i=0,v.z4i=!0,v.pwr=[],v.d4i={},v.canClone=!0,v.getBindingPath=function(t,i,r){return n.prototype.getBindingPath.call(v,t,i,r)},v.Dzr=function(n,t){var i={success:!1,value:void 0},r=v.$go(n,t);return r&&"7"===r.typeName&&(i.value=v.getText(n,t),i.success=!0),i},v.enqueueBuildExpansionInfoCacheMessage=function(){var n=v;n.E4i&&window.clearTimeout(n.E4i),n.E4i=window.setTimeout((function(){n.xT||(n.Ytr(),n.repaint(),n.E4i=0,v.Ttr.nfo())}))},v.getRowPageBreak=function(n){return v.P4i.AOi(n,!0)},v.getColumnPageBreak=function(n){return v.P4i.AOi(n,!1)},v.d5i=function(n,t){3===t.sheetArea&&-1!==["addRows","deleteRows"].indexOf(t.propertyName)&&(v.updateAllAliasInfo(),v.k4i&&(0,e.v5i)(v.k4i,t),v.ctr&&(0,e.utr)(v.ctr,t))},v.p5i=function(n,t){3===t.sheetArea&&-1!==["addColumns","deleteColumns"].indexOf(t.propertyName)&&(v.Ttr.jnr(),v.k4i&&(0,e.l5i)(v.k4i,t),v.ctr&&(0,e.otr)(v.ctr,t))},v.qfr=function(n,t){var i=t.sheet,r=t.shape;i===v&&v.thr(r)},t.prototype.r1cf=function(n){if(n)return;let t=this.getRowCount(),i;return"A"+ ++this.getCell(3,0).row},v.nhr=function(n,t){var i=t.sheet,r=t.shape,o=t.propertyName,u=t.oldValue;i===v&&v.ihr(r,o,u)},v.k5i=function(n,t){var i,r,o,u,e,c,f,s,l,h=t.sheet,a=t.type,d=t.range,M=t.isAdd,w=t.isClear;if("span"===a&&h===v)if(M)for(i=d.row,r=d.col,e=i+(o=d.rowCount),c=r+(u=d.colCount),f=i;f<e;f++)for(s=r;s<c;s++)!(l=v.getBindingPath(f,s))||f===i&&s===r?f===i&&s===r&&v.P4i._Oi(i,r,l,null,!0):(l.paginateBeforeRow=!1,l.paginateAfterRow=!1,l.paginateBeforeColumn=!1,l.paginateAfterColumn=!1,v.P4i._Oi(i,r,l),v.setBindingPath(f,s,l));else w&&v.P4i.IOi()},v.GOi=function(){v.Ytr(),v.L4i.GOi(),v.P4i.IOi(),v.Ttr.jnr()},v.Mao=function(){var n,t=v.Pji;return!!(null==t?void 0:t.options.showHiddenRowCol)},v.jao=function(n,t){var i,r;return v.Ut.Q_(t).getVisible(n)},v.$t=function(n,t,i,o){if(i===r.SheetArea.viewport||(0,e.ht)(i)){var u,c=void 0;if(v.getTemplateCell(n,t))return(c=v.$f()).getText(null,{sheet:v,row:n,col:t})}return v.getValue(n,t,i,o)},v.MAe=function(n,t,i,r,o){var u,c=v,f=c.getActualStyle(n,t,i,r,o),s=c.getTemplateCell(n,t),l=(0,e.getTemplateIcon)(c,s,f);return l&&((0,e.Iir)(n,t,c,s,f)&&(f.textIndent=f.textIndent||1),f.decoration?f.decoration.icons||(f.decoration.icons=[]):f.decoration={icons:[]},f.decoration.icons=f.decoration.icons.filter((function(n){return!n.isReport})),f.decoration.icons.push(l)),(null==(u=f.cellButtons)?void 0:u.length)&&(f.cellButtons=u.filter((function(n){return"ReportCollapseButtonToggle"!==n.command}))),s&&s.showCollapseButton&&"None"!==s.spillDirection&&(0,e.XTi)(f,!1),f},v.Wao=function(n,t,i,o,u){var e,c,f,s,l,h,a,d,M=v,w=M.Pji,I=M.Il(n,t,i,o,u);return!(null==w?void 0:w.options.hiddenRowColStyle)||i!==r.SheetArea.rowHeader&&i!==r.SheetArea.colHeader?I:(null===(e=null==w?void 0:w.options)||void 0===e?void 0:e.showHiddenRowCol)&&(s=n,l=!0,i!==r.SheetArea.rowHeader&&(s=t,l=!1),!1===(null==(a=(h=M.Ut.Q_(l,i)).infos[s])?void 0:a.visible)&&(d=null===(f=(c=w.options.hiddenRowColStyle).clone)||void 0===f?void 0:f.call(c)))?(d.v5(M.hl),d.h5(I),d):I},v.printInfo=function(t){var i=t?n.prototype.printInfo.call(v,t):n.prototype.printInfo.call(v);return!t&&i instanceof w.PrintInfo&&1!==i.zoomFactor()&&(1===i.fitPagesTall()||1===i.fitPagesWide())&&(i.fitPagesTall(-1),i.fitPagesWide(-1)),i},v.toJSON=function(t){var i,o=n.prototype.toJSON.call(v,t);return(0,a.Vtr)(o),v.HOi(o,!0),o.templateSetting={paginationSetting:v.k4i,layoutSetting:v.ctr,dataEntrySetting:v.R4i,templateOptions:v.templateOptions,containers:v.pwr.map((function(n){return{ranges:n.ranges.map((function(n){return n.toJSON()})),options:g({},n.options)}}))},(i=v.templateRange())&&Object.keys(i).length>0&&(o.templateSetting.templateRange=(0,d.mfo)(i)),o.type=r.WorksheetType.reportTemplateSheet,o},v.wh=function(t,i,o){var u,e=n.prototype.wh.call(v,t,i,o);return e&&((0,a.Htr)(e),v.HOi(e,!1),e.lossless||(e.lossless={}),e.lossless.templateLossless={paginationSetting:v.k4i,layoutSetting:v.ctr,dataEntrySetting:v.R4i,templateOptions:v.templateOptions,containers:v.pwr.map((function(n){return{ranges:n.ranges.map((function(n){return n.toJSON()})),options:g({},n.options)}}))},(u=v.templateRange())&&Object.keys(u).length>0&&(e.lossless.templateLossless.templateRange=(0,d.mfo)(u)),e.lossless.type=r.WorksheetType.reportTemplateSheet),e},v.fromJSON=function(t,i,o,u,e){(0,a.Wtr)(t);try{n.prototype.fromJSON.call(v,t,i,o,u,e)}catch(n){}var c=t.templateSetting;c&&(v.k4i=c.paginationSetting,v.ctr=c.layoutSetting,v.R4i=c.dataEntrySetting,v.templateOptions=c.templateOptions||{},v.pwr=(c.containers||[]).map((function(n){return{ranges:n.ranges.map((function(n){return new r.Range(n.row,n.col,n.rowCount,n.colCount)})),options:g({},n.options)}})),c.templateRange&&(v.d4i=(0,d.Ofo)(c.templateRange))),v.Rfo(),v.GOi()},v.yh=function(t,i,o,u){var e,c,f;(0,a.Qtr)(t);try{n.prototype.yh.call(v,t,i,o,u)}catch(n){}(c=null===(e=null==t?void 0:t.lossless)||void 0===e?void 0:e.templateLossless)&&(v.k4i=c.paginationSetting,v.ctr=c.layoutSetting,v.R4i=c.dataEntrySetting,v.templateOptions=c.templateOptions||{},v.pwr=(c.containers||[]).map((function(n){return{ranges:n.ranges.map((function(n){return new r.Range(n.row,n.col,n.rowCount,n.colCount)})),options:g({},n.options)}})),(f=c.templateRange)&&(v.d4i=(0,d.Ofo)(f))),v.Rfo(),v.GOi()},v.destroy=function(){var t,i,r;v.unbindEvents(),n.prototype.destroy.call(v),null===(t=v.P4i)||void 0===t||t.eG(),null===(i=v.nnr)||void 0===i||i.eG(),null===(r=v.L4i)||void 0===r||r.eG(),v.R4i=void 0,v.k4i=void 0,v.nnr=void 0,v.L4i=void 0,v.P4i=void 0,v.B4i=void 0,v.Ttr=void 0,v.templateOptions=void 0},(f=v).Pji=u,f.Tir=!0,f.nnr=new o.CellNodeInfoHelper(f),f.L4i=new c.CellReferenceHelper(f),f.P4i=new s.BreakLineHelper(f),f.B4i=new l.TemplateTooltipHelper(f),f.Ttr=new h.AliasHelper(f),f.templateOptions={},f.Rfo(),f.getCalcService().allowDynamicArray=!0,f.U4i(),f.bindEvents(),v}return N(t,n),t.prototype.Rfo=function(){this.options.showFormulas=!0},t.prototype.getAllParameters=function(){var n,t;return null!==(t=null===(n=this.Pji)||void 0===n?void 0:n.getAllParameters())&&void 0!==t?t:[]},t.prototype.fMr=function(){var n;null===(n=this.dataCharts)||void 0===n||n.all().forEach((function(n){var t,i,r,o,u=n.getChartConfig(),e=null===(r=null===(i=null===(t=null==u?void 0:u.plots)||void 0===t?void 0:t[0])||void 0===i?void 0:i.encodings)||void 0===r?void 0:r.filter;e&&(o=function(n){var t,i,r;if(n.valueIsParameter)return!0;if(n.conditions)for(t=0,i=n.conditions;t<i.length;t++)if(r=i[t],o(r))return!0;return!1},o(e)&&n.setChartConfig(u))}))},t.prototype.getTemplateCell=function(n,t){return this.getBindingPath(n,t)},t.prototype.setTemplateCell=function(n,t,i){this.setTemplateCellInternal(n,t,i)},t.prototype.setTemplateCellInternal=function(n,t,i,r){var o,u;this.Ntr(n,t,i,r),(0,a.nMo)(n,t,i,null!==(u=null===(o=this.dataCharts)||void 0===o?void 0:o.all())&&void 0!==u?u:[]),this.setBindingPath(n,t,i)},t.prototype.getDataEntrySetting=function(){return this.R4i},t.prototype.setDataEntrySetting=function(n){this.L4i.UOi(n),this.R4i=n},t.prototype.getPaginationSetting=function(){return this.k4i},t.prototype.setPaginationSetting=function(n){(0,e._4i)(n)&&(this.k4i=n)},t.prototype.getLayoutSetting=function(){return this.ctr},t.prototype.setLayoutSetting=function(n){(0,e.str)(n,this)&&(this.ctr=n)},t.prototype.Ntr=function(n,t,i,r){(0,a.hMr)(this,n,t,i),r?this.Ttr.Euo(n,t,i):(this.L4i.ZOi(n,t,i),this.dnr(n,t,i)),this._Oi(n,t,i)},t.prototype.dnr=function(n,t,i){this.Ttr.dnr(n,t,i)},t.prototype.getCellAlias=function(n,t){var i,r,o,u=this.getTemplateCell(n,t);if(u)return!(i=u.alias)&&u.binding&&(o=(r=u.binding.trim()).split("["),i=r.substring(o[0].length+1,r.length-1)),i},t.prototype.cMr=function(){return this.L4i},t.prototype.getAllCellAlias=function(){return this.Ttr._nr()},t.prototype.getActualText=function(n,t){return this.$f().getText(n,t)},t.prototype.showToolTip=function(n){return arguments.length>0&&(this.z4i=!!n),!!this.z4i},t.prototype.getCellTipContent=function(n,t){return this.B4i.RTi(n,t)},t.prototype.Ytr=function(){this.nnr.Ytr()},t.prototype.$tr=function(){return this.nnr.$tr()},t.prototype.fwr=function(){var n=this,t=this.getActiveRowIndex(),i=this.getActiveColumnIndex(),o=this.pwr.filter((function(n){var o,u,e,c,f=n.ranges;if(1===f.length?o=f[0]:3===f.length&&(u=f[0],e=f[1],c=f[2],o=new r.Range(u.row,e.col,u.rowCount+c.rowCount,e.colCount+c.colCount)),o&&o.intersect(t,i,1,1))return!0}))[0];return this.pwr.map((function(u){var e,c=u.ranges,f=new r.Range(c[1].row,c[1].col,c[1].rowCount,c[1].colCount+c[2].colCount);return{ranges:c,rangeRects:c.map((function(t){return n.getRangeRect(1,1,t)})),range:f,rangeRect:n.getRangeRect(1,1,f),backColor:n.getActualStyle(t,i).backColor||(null===(e=n.parent)||void 0===e?void 0:e.options.backColor)||"white",isActive:u===o,viewportRangeRect:n.getRangeRect(1,1,n.Dfo(f))}}))},t.prototype.Dfo=function(n){var t=this.getViewportTopRow(1),i=this.getViewportLeftColumn(1);return new r.Range(Math.max(t,n.row),Math.max(i,n.col),n.rowCount-Math.max(t,n.row)+n.row,n.colCount-Math.max(i,n.col)+n.col)},t.prototype.Efo=function(){return(0,M.Efo)(this)},t.prototype.bindEvents=function(){var n=this;n.bind(r.Events.ActiveCellChanged+I,(function(t,i){n.nnr.Ktr(i.row,i.col),n.repaint()})),[r.Events.CellChanged,r.Events.WorksheetDataChanged,r.Events.RowChanged,r.Events.ColumnChanged,r.Events.RowHeightChanged,r.Events.ColumnWidthChanged,r.Events.DragFillBlockCompleted,r.Events.DragMerged,r.Events.PasteEnd,r.Events.ClipboardPasted,r.Events.ValueChanged,r.Events.RangeChanged,r.Events.ShapeChanged,r.Events.ShapeRemoved].forEach((function(t){n.bind("".concat(t).concat(I),n.enqueueBuildExpansionInfoCacheMessage)})),n.bind("".concat(r.Events.RowChanged).concat(I,"-ns"),n.d5i),n.bind("".concat(r.Events.ColumnChanged).concat(I,"-ns"),n.p5i),n.bind("".concat(r.Events.ShapeRemoved).concat(I,"-ns"),n.qfr),n.bind("".concat(r.Events.ShapeChanged).concat(I,"-ns"),n.nhr),n.bind("".concat(r.Events.WorksheetDataChanged).concat(I,"-ns"),n.k5i)},t.prototype.unbindEvents=function(){var n=this;n._3(I),n._3("".concat(I,"-ns"))},t.prototype.buildBreadLineCache=function(){this.P4i.IOi();var n=this.getParent();n&&(n.needUpdatePrintCache=!0,this.ki(r.Events.ReportPaginationSettingChanged))},t.prototype.updateAllAliasInfo=function(){this.Ttr.jnr()},t.prototype._Oi=function(n,t,i){var r,o=this.getSpan(n,t);o&&(o.row!==n||o.col!==t)&&i?(i.paginateAfterColumn=!1,i.paginateAfterRow=!1,i.paginateBeforeColumn=!1,i.paginateBeforeRow=!1):this.P4i._Oi(n,t,i)},t.prototype.U4i=function(){var n,t=this.$f();(0,u.a4i)(t),this.dataCharts&&((n=this.dataCharts).Bje?n.paintBlankChart=a.rhr:n.paintBlankChart=a.ehr)},t.prototype.thr=function(n){var t,i,r,o,u,e;if((null==v?void 0:v.DataChart)&&n&&n instanceof v.DataChart)for(t=n.name(),i=this.getRowCount(),r=this.getColumnCount(),o=0;o<i;o++)for(u=0;u<r;u++)(e=this.getBindingPath(o,u))&&e.dataChartName===t&&this.setBindingPath(o,u,null)},t.prototype.ihr=function(n,t,i){var r,o,u,e,c,f;if((null==v?void 0:v.DataChart)&&n&&n instanceof v.DataChart&&"name"===t)for(r=n.name(),o=this.getRowCount(),u=this.getColumnCount(),e=0;e<o;e++)for(c=0;c<u;c++)(f=this.getBindingPath(e,c))&&f.dataChartName===i&&(f.dataChartName=r,this.setBindingPath(e,c,f))},t.prototype.HOi=function(n,t){if(t)return this.L4i.ftr(n),void this.Ttr.ftr(n);this.L4i.htr(n),this.Ttr.htr(n)},t.prototype.KI=function(t,i,r,o,u,e,c,f,s,l){var h,a,v,d,M,w,I;for(this.suspendPaint(),a=t,v=t+r-1;a<=v;a++)for(d=i,M=i+o-1;d<=M;d++)(w=null===(h=this.getStyle(a,d))||void 0===h?void 0:h.clone())&&w._autoFormatter&&(delete w._autoFormatter,w.toJSON()||this.setStyle(a,d,void 0));return I=n.prototype.KI.call(this,t,i,r,o,u,e,c,f,s,l),this.resumePaint(),I},t.prototype.internalUpdateSettingsToReferNewTable=function(n,t){var i=n.toUpperCase();(0,a.xir)(this,i,t),(0,a._ir)(this,i,t),(0,a.tzr)(this,i,t),(0,d.bfo)(this,i,t)},t.prototype.internalUpdateSettingsToReferNewColumn=function(n,t,i){var r=n.toUpperCase(),o=t.toUpperCase();(0,a.Bir)(this,r,o,i),(0,a.Gir)(this,r,o,i)},t.prototype.onCustomNameFormulaChanged=function(n,t){var i,r,o=this,u=o.L4i;t&&u.zso(t),n.length>0&&(r=(i=this.templateRange())?Object.keys(i).map((function(n){var t;return null===(t=i[n])||void 0===t?void 0:t.range})).filter((function(n){return n})):[],this.L4i._6(n,r)),this.Ttr.nfo()},t.prototype.fetchAllTablesAsync=function(n,t){var i,r,o,u;return void 0===t&&(t=!1),i=this.A4i(n),r=n.dataManager(),o=Object.keys(r.tables),u=function(n){return r.tables[o.find((function(t){return t.toUpperCase()===n}))]},Promise.all(i.map((function(n){var i=u(n);return!i||!t&&i.isFetched()?Promise.resolve():i.fetch(t).catch((function(){}))})))},t.prototype.A4i=function(n){var t,i,r,o,u,c,s,l,h,a,v={},d=(0,f.v4i)(this);if(d)for(t=d.row,i=d.col,u=t+(r=d.rowCount),c=i+(o=d.colCount);t<u;t++){for(;i<c;i++)s=this.getTemplateCell(t,i),(0,e.ht)(s)||"string"==typeof s||((l=(0,f.BTi)(s))&&!(0,e.ht)(l.tableName)&&(v[l.tableName.toUpperCase()]=!0),h=s.filter&&s.filter.condition,this.x4i(h,v));i=d.col}return(a=this.dataCharts)&&a.all().forEach((function(t){var i,r,o=t.getChartConfig&&(null===(i=t.getChartConfig())||void 0===i?void 0:i.tableName);o&&(r=t.LPr(o,n)).forEach((function(n){v[n.toUpperCase()]=!0}))})),Object.keys(v)},t.prototype.x4i=function(n,t){var i,r,o,u,e,c;if(n){if(n.dataColumn&&(t[n.dataColumn.tableName.toUpperCase()]=!0),n.and)for(i=0,r=n.and;i<r.length;i++)o=r[i],this.x4i(o,t);if(n.or)for(u=0,e=n.or;u<e.length;u++)c=e[u],this.x4i(c,t)}},t.prototype.getText=function(n,t,i){var r,o,u=this,c=u.getTemplateCell(n,t);return(0,e.ht)(i)&&(i=3),c?u.$t(n,t,i):(r=u.t0(n,t,i),(0,e.ht)(r)?(o=u.getValue(n,t,i),u.vL(n,t,o,i,!0)):r)},t.prototype.isActualProtected=function(){return!1},t.prototype.getActualUsedRange=function(){var n=this,t=n.Ut,i=t.getLastNonNullCol(3,!0),o=t.getLastNonNullRow(3,!0);return o=(0,e.ht)(o)?0:o+1,i=(0,e.ht)(i)?0:i+1,(0,f.b4i)(n,new r.Range(0,0,o,i))},t.prototype.containers=function(n){if(n){this.Ut.vwr();var t=this.getRowCount(),i=this.getColumnCount();n.forEach((function(n){var r=n.ranges;r[0].colCount=Math.min(r[0].colCount,i-r[0].col),r[2].colCount=Math.min(r[2].colCount,i-r[2].col),r[1].rowCount=Math.min(r[1].rowCount,t-r[1].row),r[2].rowCount=Math.min(r[2].rowCount,t-r[2].row)})),this.pwr=n,this.Ut.vwr(!0)}return this.pwr.map((function(n){return{ranges:n.ranges.map((function(n){return new r.Range(n.row,n.col,n.rowCount,n.colCount)})),options:g({},n.options)}}))},t.prototype.wwr=function(n,t){var i,o,u,e=[],c=this.pwr;if(c.length)for(this.Ut.vwr(),o=c.length-1;o>=0;o--)i=c[o],u=new r.Range(i.ranges[1].row,i.ranges[1].col,i.ranges[1].rowCount,i.ranges[1].colCount+i.ranges[2].colCount),n.containsRange(u)&&(t&&c.splice(o,1),e.push(i));return e},t.prototype.Mwr=function(n,t,i,o,u,e){var c,f,s,l,h,a,v,d,M,w;if(null==n?void 0:n.length){for(v=function(v,M){var w,I,C=n[v],N=void 0;N=e?C:{ranges:C.ranges.map((function(n){return new r.Range(n.row,n.col,n.rowCount,n.colCount)})),options:g({},C.options)},w=o-t,I=u-i,N.ranges[0].row+=w,N.ranges[0].col+=I,N.ranges[1].row+=w,N.ranges[1].col+=I,N.ranges[2].row+=w,N.ranges[2].col+=I,(null===(s=null===(f=null===(c=N.options)||void 0===c?void 0:c.totals)||void 0===f?void 0:f.rows)||void 0===s?void 0:s.length)&&(N.options.totals=g(g({},N.options.totals),{rows:N.options.totals.rows.map((function(n){return n+w}))})),(null===(a=null===(h=null===(l=N.options)||void 0===l?void 0:l.totals)||void 0===h?void 0:h.columns)||void 0===a?void 0:a.length)&&(N.options.totals=g(g({},N.options.totals),{columns:N.options.totals.columns.map((function(n){return n+I}))})),d.pwr.push(N)},d=this,M=0,w=n.length;M<w;M++)v(M,w);this.Ut.vwr(!0)}},t.prototype.Mzr=function(){return!0},t.prototype.templateRange=function(n){return arguments.length&&(this.Ut.Afo(),(0,d.Nfo)(this,n),this.d4i=n,this.Ut.Afo(!0),this.ki(r.Events.ReportSheetTemplateRangeChanged,{range:n},!0)),(0,r.RF)(this.d4i,!0)},t.prototype.rebuildTemplateRangeCells=function(n){(0,d.Tfo)(this,n||this.d4i)},t.prototype.hfo=function(n,t){return(0,d.hfo)(this,n,t)},t.prototype.dfo=function(n,t,i,r,o,u,e){(0,d.dfo)(this,n,t,i,r,o,u,e)},t}(r.Worksheet),t.TemplateSheet=C},901:function(n,t,i){"use strict";var r,o,u,e,c,f,s=this&&this.vJr||(l=function(n,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},l(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=n}l(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),l;function h(n){var t="reportSheetResetCellValue";r.Commands[t]={canUndo:!1,execute:function(n,t,i){return c(n,f,t,i)}},n.register(t,r.Commands[t])}Object.defineProperty(t,"__esModule",{value:!0}),t.registerResetRecordCommand=void 0,r=i(1376),o=i(1316),u=i(5724),e=r.Commands.ActionBase,c=r.Commands.zA,f=function(n){function t(t,i){return n.call(this,t,i)||this}return s(t,n),t.prototype.execute=function(){var n,t,i,r,e;this.Mf&&this.Mf instanceof u.ReportWorksheet&&this.tT&&(n=this.Mf,t=this.tT.selections,i=(0,o.J5i)(t,(function(){Array.isArray(t)&&(n.reportSheet.suspendPaint(),t.forEach((function(t){var i,r,o=t.row,u=t.col,e=t.rowCount,c=t.colCount,f=o+e-1,s=u+c-1;for(i=o;i<=f;i++)for(r=u;r<=s;r++)n.reportSheet.t4i.K5i(i,r,!0)})),n.reportSheet.resumePaint())})),r=i.name,e=i.event,setTimeout((function(){n.ki(r,e),e.canceled||e.resetCellValueSingleUseAction()})))},t}(e),t.registerResetRecordCommand=h},961:function(n,t,i){"use strict";var r,o,u,e,c,f,s;Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateTooltipHelper=void 0,r=i(7234),o=i(1376),u=i(5022),e=i(9834),c=u.rm.getResource.bind(u.rm),f=r.Common.zf,s=function(){function n(n){this.dV=n}return n.prototype.RTi=function(n,t){var i,r,o,u,s,l=this.dV,h=l.getTemplateCell(n,t),a=[];if(h){switch(i=(0,e.BTi)(h),r="",h.type){case"List":r=c().listCellType;break;case"Group":r=c().groupCellType;break;case"Summary":r=c().summaryCellType}if("Summary"===h.type){switch(o="",h.aggregate){case"Sum":o=c().summarySumTip;break;case"Avg":o=c().summaryAvgTip;break;case"Max":o=c().summaryMaxTip;break;case"Min":o=c().summaryMinTip;break;case"Count":o=c().summaryCountTip;break;case"None":o=c().summaryNoneTip}r+=o}"Chart"!==h.type&&"Static"!==h.type&&a.push(c().toolTipCellType+r),i&&(i.tableName&&a.push(c().toolTipTableName+i.tableName),i.columnName&&a.push(c().toolTipColumnName+i.columnName))}if((u=l.getFormula(n,t))&&a.push(c().toolTipFormula+u),a.length>0){for(s=0;s<a.length;s++)a[s]=f.j0(a[s]);return a.join("\r\n")}},n}(),t.TemplateTooltipHelper=s,o.GC$.extend(o.Workbook.prototype,{rpwm:function(n,t,i){return i?[c().wmk1,0]:-1===n?i?[c().wmk1,0]:[c().wmk2,1]:void 0}}),o.GC$.extend(o.Worksheet.prototype,{rpwm:function(n,t,i){return i?[c().wmk1,0]:-1===n?i?[c().wmk1,0]:[c().wmk2,1]:void 0}})},1258:function(n,t,i){"use strict";var r,o,u,e,c,f,s=this&&this.mJr||function(){return s=Object.assign||function(n){var t,i,r,o;for(i=1,r=arguments.length;i<r;i++)for(o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},s.apply(this,arguments)};function l(n,t,i,r){var u=(0,o.formulaToExpression)(n,t,0,0);return u.offset(i,r),(0,o.expressionToFormula)(n,u,0,0)}function h(n,t,i){var r,o,u,e,c=n.templateRange(),f=null===(r=c.detail)||void 0===r?void 0:r.children;if(f)for(u=0;u<f.length;u++)if(null===(o=(e=f[u]).range)||void 0===o?void 0:o.contains(t,i))return e;if(Object.keys(c).some((function(n){var r,o;return null===(o=null===(r=c[n])||void 0===r?void 0:r.range)||void 0===o?void 0:o.contains(t,i)})))return c.detail}function a(n,t,i){var r=h(n,t,i);return null==r?void 0:r.context}function v(n,t,i){var r=h(n,t,i);return null==r?void 0:r.bindingTable}function d(n,t,i){var r,o=n.templateRange();return i&&o?(r=[],Object.keys(o).forEach((function(n){o[n]&&t.containsRange(o[n].range)&&r.push(n)})),n.Ut.Afo(),r):[]}function M(n,t,i,o,u,e,c,f){var h,a,v,d,M,w,I,C,N,g,A,E,b,T,O,S,p,j,y,R,m=u-i,L=e-o,P=n.templateRange();if(t.length)t.forEach((function(t){var i,r,o=P[t];o&&(o.range.row+=m,o.range.col+=L,o.context&&(o.context=l(n,o.context,m,L)),(i=o.children)&&i.forEach((function(t){t.range.row+=m,t.range.col+=L,t.context&&(t.context=l(n,t.context,m,L))})),(r=o.groups)&&r.forEach((function(n){n&&(n.row+=m,n.col+=L)})))}));else{if(!(N=Object.keys(P).some((function(n){return P[n].range.intersect(i,o,c,f)||P[n].range.intersect(u,e,c,f)}))))return;if(g=new r.Range(i,o,c,f),A=new r.Range(u,e,c,f),E=null===(a=null===(h=P.detail)||void 0===h?void 0:h.children)||void 0===a?void 0:a.findIndex((function(n,t){var i=0===t?P.detail.range:P.detail.children[t-1].range;return g.containsRange(n.range)&&i.containsRange(g)&&(null==i?void 0:i.containsRange(A))})),b=null===(d=null===(v=P.detail)||void 0===v?void 0:v.groups)||void 0===d?void 0:d.some((function(n){return!!n})),T=null===(w=null===(M=P.detail)||void 0===M?void 0:M.groups)||void 0===w?void 0:w.map((function(n){return n&&g.containsRange(n)&&P.detail.range.containsRange(g)&&P.detail.range.containsRange(A)?n:void 0})),O=null===(C=null===(I=P.detail)||void 0===I?void 0:I.groups)||void 0===C?void 0:C.map((function(n){return n&&n.intersect(g.row,g.col,g.rowCount,g.colCount)})),E>=0)P.detail.children.forEach((function(t,i){i>=E&&(t.range.row+=m,t.range.col+=L,t.context&&(t.context=l(n,t.context,m,L)))}));else if(b&&(null==T?void 0:T.every((function(n,t){return!!n==!!(null==O?void 0:O[t])}))))T.forEach((function(n){n&&(n.row+=m,n.col+=L)}));else if(!(S=Object.keys(P).some((function(n){var t;return P[n].range.containsRange(A)})))){for(n.suspendPaint(),p=0;p<A.rowCount;p++)for(j=0;j<A.colCount;j++)(y=n.getTemplateCell(A.row+p,A.col+j))&&(delete(R=s({},y)).context,n.setTemplateCell(A.row+p,A.col+j,R));n.resumePaint()}}n.suspendPaint(),D(n,P),n.templateRange(P),n.rebuildTemplateRangeCells(P),n.resumePaint(),n.Ut.Afo(!0)}function w(n,t){var i;return n&&c(n)&&(null===(i=null==n?void 0:n.binding)||void 0===i?void 0:i.split("[")[0])===t}function I(n,i){var r;return n&&((0,t.Ifo)(n)&&(null===(r=n.binding)||void 0===r?void 0:r.split("[")[0])===i||"Chart"===n.type)}function C(n,t){var i,r,u;if(t)return 1===(u=(0,o.formulaToRanges)(n,t,0,0)).length&&1===(null===(r=null===(i=u[0])||void 0===i?void 0:i.ranges)||void 0===r?void 0:r.length)?u[0].ranges[0]:void 0}function N(n,t,i,o){var u,e,f,s;for(e=0;e<t.rowCount;e++)for(f=0;f<t.colCount;f++)if(s=n.getTemplateCell(t.row+e,t.col+f),!(null==i?void 0:i.contains(t.row+e,t.col+f))&&c(s)&&(null==s?void 0:s.binding)&&(null===(u=s.binding)||void 0===u?void 0:u.split("[")[0])===o)return(0,r.rangeToFormula)(new r.Range(t.row+e,t.col+f,1,1),0,0,15);return""}function g(n,t,i,r){var o,u,e,c,f,s,l,h,a,v,d,M,w,I,C,g,A,E,D=t[i];if(!D)return"";if(void 0===r){if(!(w=D.range))return"";if(I=null===(o=D.groups)||void 0===o?void 0:o.some((function(n){return!!n})),I)for(C=0;C<(null===(u=D.groups)||void 0===u?void 0:u.length);C++)if((g=null===(e=D.groups)||void 0===e?void 0:e[C])&&(A=N(n,g,void 0,null===(c=t[i])||void 0===c?void 0:c.bindingTable)))return A;return N(n,w,E=null===(s=null===(f=D.children)||void 0===f?void 0:f[0])||void 0===s?void 0:s.range,null===(l=t[i])||void 0===l?void 0:l.bindingTable)}return(h=D.children)&&r<h.length&&(a=h[r],v=r+1<h.length?h[r+1]:void 0,null==a?void 0:a.range)?N(n,d=a.range,M=null==v?void 0:v.range,a.bindingTable):""}function A(n,t){var i=t.detail,r=i.groups;return null==r?void 0:r.some((function(t){var i,r,o;if(!t)return!1;for(i=0;i<t.rowCount;i++)for(r=0;r<t.colCount;r++)if((o=n.getTemplateCell(t.row+i,t.col+r))&&c(o))return!0;return!1}))}function E(n,t,i,r,o){var u,e,c,f,l,h;if(t)for(e=0;e<t.rowCount;e++)for(c=0;c<t.colCount;c++)f=n.getTemplateCell(t.row+e,t.col+c),!(null==i?void 0:i.contains(t.row+e,t.col+c))&&f&&("Chart"===(null==f?void 0:f.type)||r&&(null===(u=null==f?void 0:f.binding)||void 0===u?void 0:u.split("[")[0])===r?(l=s({},f),h=!1,f.context&&(delete l.context,h=!0),o||"Group"!==(null==l?void 0:l.type)||(l.type="List",h=!0),h&&n.setTemplateCell(t.row+e,t.col+c,l)):n.setTemplateCell(t.row+e,t.col+c,void 0))}function D(n,t){var i,r,o,u,e,c,f,s,l,h,a,v,d,M,I,N,E=t.detail;if((null==E?void 0:E.range)&&(s=C(n,E.context),l=null===(i=E.groups)||void 0===i?void 0:i.some((function(n){return!!n})),h=null===(r=E.groups)||void 0===r?void 0:r.some((function(n){return s&&(null==n?void 0:n.containsRange(s))})),(!s||!w(n.getTemplateCell(s.row,s.col),E.bindingTable)||!E.range.containsRange(s)||(null===(e=null===(u=null===(o=E.children)||void 0===o?void 0:o[0])||void 0===u?void 0:u.range)||void 0===e?void 0:e.containsRange(s))||l&&!h&&A(n,t))&&((a=g(n,t,"detail"))?E.context=a:delete E.context),v=E.children))for(d=0;d<v.length;d++)(I=C(n,(M=v[d]).context))&&w(n.getTemplateCell(I.row,I.col),M.bindingTable)&&(!M.range||M.range.containsRange(I)&&!(null===(f=null===(c=v[d+1])||void 0===c?void 0:c.range)||void 0===f?void 0:f.containsRange(I)))||((N=g(n,t,"detail",d))?M.context=N:delete M.context)}function b(n,t){var i=t.detail,r,o;[t.header,t.footer].forEach((function(t){var r,o,u,e,c=null==t?void 0:t.range;if(c)if(i.context)for(r=0;r<c.rowCount;r++)for(o=0;o<c.colCount;o++)e=(u=n.getTemplateCell(c.row+r,c.col+o))&&s({},u),I(u,i.bindingTable)?e.context={vertical:i.context}:e={type:"Static",context:{vertical:i.context}},"Group"===e.type&&(e.type="List"),n.setTemplateCell(c.row+r,c.col+o,e);else E(n,c,void 0,i.bindingTable)}))}function T(n,t,i){var r,o,u,e,c,f,l,h=t.detail,a=h.children,v=h.groups;if(h.context)for(u=h.context,e=h.range,c=null===(r=null==a?void 0:a[0])||void 0===r?void 0:r.range,f=function(t){var r,o=function(r){var o,f,l=null==c?void 0:c.contains(e.row+t,e.col+r),a=null==i?void 0:i.contains(e.row+t,e.col+r),d=null==v?void 0:v.some((function(n){return null==n?void 0:n.contains(e.row+t,e.col+r)})),M=n.getTemplateCell(e.row+t,e.col+r),w=M&&s({},M);if(a&&!d&&"Group"===(null==M?void 0:M.type)&&(w.type="List",n.setTemplateCell(e.row+t,e.col+r,w)),l||a||d)return a&&w.context&&(delete w.context,n.setTemplateCell(e.row+t,e.col+r,w)),"continue";I(f=(o=n.getTemplateCell(e.row+t,e.col+r))&&s({},o),h.bindingTable)?"Group"===f.type&&(f.type="List"):f={type:"Static"},f.context={vertical:u},n.setTemplateCell(e.row+t,e.col+r,f)};for(r=0;r<e.colCount;r++)o(r)},l=0;l<e.rowCount;l++)f(l);else E(n,h.range,null===(o=null==a?void 0:a[0])||void 0===o?void 0:o.range,h.bindingTable)}function O(n,t){var i,r,o,u,e,c,f,l,h,a,v,d,M,w,N,g,A=t.detail;if(A.children)for(o=A.children,u=0;u<o.length;u++)if((e=o[u]).context){if(c=e.range,f=null===(i=null==o?void 0:o[u+1])||void 0===i?void 0:i.range,l=C(n,e.context),h=0===u?A.context:o[u-1].context,!c)continue;for(a=0;a<c.rowCount;a++)for(v=0;v<c.colCount;v++)(null==f?void 0:f.contains(c.row+a,c.col+v))||((null==l?void 0:l.contains(c.row+a,c.col+v))?(M=(d=n.getTemplateCell(c.row+a,c.col+v))&&s({},d))&&("Group"===d.type&&(M.type="List"),h?M.context={vertical:h}:delete M.context,n.setTemplateCell(c.row+a,c.col+v,M)):(I(N=(w=n.getTemplateCell(c.row+a,c.col+v))&&s({},w),e.bindingTable)?"Group"===N.type&&(N.type="List"):N={type:"Static"},N.context={vertical:e.context},n.setTemplateCell(c.row+a,c.col+v,N)))}else{if(g=e.range,f=null===(r=null==o?void 0:o[u+1])||void 0===r?void 0:r.range,!g)continue;E(n,g,f,e.bindingTable)}}function S(n,t,i){var r,o,u,e,c,f,l=t.detail,h=l.groups;if(h)if(l.context){for(r=0;r<h.length;r++)if(o=h[r])for(u=0;u<o.rowCount;u++)for(e=0;e<o.colCount;e++)f=(c=n.getTemplateCell(o.row+u,o.col+e))&&s({},c),(null==i?void 0:i.contains(o.row+u,o.col+e))?(f.type="Group",delete f.context,n.setTemplateCell(o.row+u,o.col+e,f)):(I(f,l.bindingTable)?(f.context={vertical:l.context},"List"===f.type&&(f.type="Group")):f={type:"Static",context:{vertical:l.context}},n.setTemplateCell(o.row+u,o.col+e,f))}else h.forEach((function(t){E(n,t,void 0,l.bindingTable,!0)}))}function p(n,t){var i,r=t.detail;(null==r?void 0:r.range)&&(i=C(n,r.context),b(n,t),T(n,t,i),O(n,t),S(n,t,i),n.Ytr())}function j(n,t,i,r,o,u){var e,c,f,s,l,h,a,v=n.templateRange();if(v)switch(e=[],t){case"addColumns":c=function(n){var t,i;n&&(t=n.range||n)&&(i=t.col+t.colCount-1,t.col>=r?t.col+=u:i>=r&&(t.colCount+=u))},Object.keys(v).forEach((function(n){var t,i,r=v[n];r&&(c(r),(t=r.children)&&t.forEach((function(n){c(n)})),(i=r.groups)&&i.forEach((function(n){c(n)})))})),n.templateRange(v),n.rebuildTemplateRangeCells();break;case"deleteColumns":f=r+u-1,s=function(n){var t,i;if(n&&(t=n.range||n)){if(i=t.col+t.colCount-1,t.col>=r&&i<=f)return!0;t.col>f?t.col-=u:t.col<r&&i>=f?t.colCount=t.colCount-u:t.col>=r?(t.col=r,t.colCount=i-f):t.col<r&&i<f&&(t.colCount=r-t.col)}},Object.keys(v).forEach((function(n){var t,i,r,o,u=v[n];if(u){if(u.range&&(t=s(u.range)))return void e.push(n);(i=u.children)&&(r=[],i.forEach((function(n){if(n.range){var t;if(s(n.range))return;r.push(n)}})),u.children=r),(o=u.groups)&&o.forEach((function(n,t){var i;n&&(s(n)&&(o[t]=void 0))}))}})),-1!==e.findIndex((function(n){return"detail"===n}))?v={}:e.forEach((function(n){delete v[n]})),n.templateRange(v),n.rebuildTemplateRangeCells();break;case"addRows":l=function(n){var t,r;n&&(t=n.range||n)&&(r=t.row+t.rowCount-1,t.row>=i?t.row+=o:r>=i&&(t.rowCount+=o))},Object.keys(v).forEach((function(n){var t,i,r=v[n];r&&(l(r),(t=r.children)&&t.forEach((function(n){l(n)})),(i=r.groups)&&i.forEach((function(n){l(n)})))})),n.templateRange(v),n.rebuildTemplateRangeCells();break;case"deleteRows":h=i+o-1,a=function(n){var t,r;if(n&&(t=n.range||n)){if(r=t.row+t.rowCount-1,t.row>=i&&r<=h)return!0;t.row>h?t.row-=o:t.row<i&&r>=h?t.rowCount=t.rowCount-o:t.row>=i?(t.row=i,t.rowCount=r-h):t.row<i&&r<h&&r>=i&&(t.rowCount=i-t.row)}},Object.keys(v).forEach((function(n){var t,i,r,o,u=v[n];if(u){if(u.range&&(t=a(u.range)))return void e.push(n);(i=u.children)&&(r=[],i.forEach((function(n){if(n.range){var t;if(a(n.range))return;r.push(n)}})),u.children=r),(o=u.groups)&&o.forEach((function(n,t){var i;n&&(a(n)&&(o[t]=void 0))}))}})),-1!==e.findIndex((function(n){return"detail"===n}))?v={}:e.forEach((function(n){delete v[n]})),n.templateRange(v),n.rebuildTemplateRangeCells()}}function y(n,t){var i,r,o,u,e,c,f,s,l,h,a=n.templateRange(),v=a.detail;if(v){if(o=v.children)for(u=o.length-1;u>=0;u--){if((c=(e=o[u]).range.getIntersect(t))&&!t.equals(c))return;if(null===(i=e.range)||void 0===i?void 0:i.containsRange(t))return{key:"detail",level:u}}for(f=Object.keys(a),s=0;s<f.length;s++){if((c=null==(h=null===(r=a[l=f[s]])||void 0===r?void 0:r.range)?void 0:h.getIntersect(t))&&!t.equals(c))return;if(null==h?void 0:h.containsRange(t))return{key:l}}}}function R(n,t,i){var r,o,u=n.templateRange();(null==u?void 0:u.detail)&&(o=!1,(null===(r=u.detail.bindingTable)||void 0===r?void 0:r.toUpperCase())===t&&(u.detail.bindingTable=i,o=!0),u.detail.children&&u.detail.children.forEach((function(n){var r;(null===(r=n.bindingTable)||void 0===r?void 0:r.toUpperCase())===t&&(n.bindingTable=i,o=!0)})),o&&n.templateRange(u))}Object.defineProperty(t,"__esModule",{value:!0}),t.bfo=t.gfo=t.Mfo=t.Tfo=t.Nfo=t.Ifo=t.Ofo=t.mfo=t.dfo=t.hfo=t.Cfo=t.Sfo=t.yfo=void 0,r=i(1376),o=i(3789),t.yfo=l,t.Sfo=a,t.Cfo=v,t.hfo=d,t.dfo=M,u=function(n){var t={};return Object.keys(n).forEach((function(i){var o,u,e=(0,r.RF)(n[i]),c=s(s({},e),{range:null===(o=e.range)||void 0===o?void 0:o.toJSON()});"detail"===i?(e.children&&(c.children=e.children.map((function(n){var t;return s(s({},n),{range:null===(t=n.range)||void 0===t?void 0:t.toJSON()})}))),e.groups&&(c.groups=e.groups.map((function(n){return null==n?void 0:n.toJSON()})))):c.range=null===(u=e.range)||void 0===u?void 0:u.toJSON(),t[i]=c})),t},t.mfo=u,e=function(n){var t=n;return Object.keys(t).forEach((function(n){var i,o,u=t[n];u.range&&(u.range=new r.Range(u.range.row,u.range.col,u.range.rowCount,u.range.colCount)),"detail"===n&&(u.children=null===(i=u.children)||void 0===i?void 0:i.map((function(n){return n&&s(s({},n),{range:new r.Range(n.range.row,n.range.col,n.range.rowCount,n.range.colCount)})})),u.groups=null===(o=u.groups)||void 0===o?void 0:o.map((function(n){return n&&new r.Range(n.row,n.col,n.rowCount,n.colCount)})))})),t},t.Ofo=e,c=function(n){return"List"===(null==n?void 0:n.type)||"Group"===(null==n?void 0:n.type)},f=function(n){return c(n)||"Summary"===(null==n?void 0:n.type)},t.Ifo=f,t.Nfo=D,t.Tfo=p,t.Mfo=j,t.gfo=y,t.bfo=R},1267:function(n,t,i){"use strict";var r,o,u,e;Object.defineProperty(t,"__esModule",{value:!0}),t.CellStatesHelper=void 0,r=i(1376),o=i(9163),u=i(5907),e=function(){function n(n,t,i){this.cCi=n,this.Mf=t,this.Cji=i}return n.prototype.fCi=function(){try{var n=this,t=n.Mf;t.cellStates.reset(t),t.cellStates.fromJSON(n.cCi.toJSON()),n.hCi()}catch(n){}},n.prototype.hCi=function(){var n,t,i,u,e,c=this,f=c.Cji,s=c.Mf,l=s.cellStates,h=l.all();for(i=0,u=h;i<u.length;i++)e=u[i],t||e.state!==r.CellStatesType.dirty||(t=!0),l.remove(e.range,e.state),n=(0,o.JS)(f.getReportRange(),e.range),(0,o.ht)(n)||c.aCi(e,c.lCi(n));t||c.vCi()},n.prototype.lCi=function(n){for(var t,i,r=this,e=r.Cji,c=r.cCi.Mf,f=[],s=[],l=n.row,h=n.col,a=l+n.rowCount-1,v=h+n.colCount-1;l<=a;l++){for(;h<=v;h++)(!(t=c.getSpan(l,h))||t.row===l&&t.col===h)&&e.getAllCells(l,h).forEach((function(n){s.push(n)}));h=n.col}return i=!(0,u.pCi)(s[0]),(0,o.atr)(s,i),(0,u.dCi)(s,i).forEach((function(n){f.push(n)})),f},n.prototype.aCi=function(n,t){var i,r,o,u=this,e=u.Mf,c=e.cellStates;for(i=0,r=t;i<r.length;i++)o=r[i],c.add(o,n.state,n.style)},n.prototype.vCi=function(){var n=this,t=n.Mf,i=t.cellStates;n.Mf.reportSheet.options.dirtyStyle&&i.add(t.Gji(),r.CellStatesType.dirty,n.Mf.reportSheet.options.dirtyStyle)},n}(),t.CellStatesHelper=e},1316:function(n,t,i){"use strict";var r=this&&this.hJr||(Object.create?function(n,t,i,r){void 0===r&&(r=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(n,r,o)}:function(n,t,i,r){void 0===r&&(r=i),n[r]=t[i]}),o=this&&this.dJr||function(n,t){for(var i in n)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||r(t,n,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(9457),t),o(i(2711),t),o(i(9084),t)},1376:function(t){"use strict";t.exports=n.Spread.Sheets},1499:function(n,t){var i,r,o;!function(){"use strict";var n={8346:function(n,t){var i,r=this&&this.mJr||function(){return r=Object.assign||function(n){var t,i,r,o;for(i=1,r=arguments.length;i<r;i++)for(o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SmartCache=void 0,i=function(){function n(n,t,i,r){this.reset(n,t,i,r)}return n.prototype.get=function(n,t){var i=n-this.Dyt;if(this.cE[i])return this.cE[i][t-this._yt]},n.prototype.set=function(n,t,i){var r=n-this.Dyt;this.cE[r]||(this.Tx>0?this.cE[r]=new Array(this.Tx):this.cE[r]=[]),n>this.Z5.rowEnd&&(this.Z5.rowEnd=n),t>this.Z5.colEnd&&(this.Z5.colEnd=t),this.cE[r][t-this._yt]=i},n.prototype.getRange=function(){return r({},this.Z5)},n.prototype.getRangeRowEnd=function(){return this.Z5.rowEnd},n.prototype.reset=function(n,t,i,r){this.cE=i>0?new Array(i-n+1):[],this.Tx=r-t,this.Dyt=n,this._yt=t,this.Z5={row:n,col:t,rowEnd:i,colEnd:r}},n}(),t.SmartCache=i},7789:function(n,t){var i=this&&this.yJr||function(n,t,i){if(i||2===arguments.length)for(var r,o=0,u=t.length;o<u;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return n.concat(r||Array.prototype.slice.call(t))};function r(n){for(var t=-1,i=1,r="A".charCodeAt(0)-1,o=n.length-1;o>=0;o--)t+=(n.charCodeAt(o)-r)*i,i*=26;return t}function o(n,t,r){void 0===r&&(r=[]);var u=i(i([],r,!0),[n],!1);n.children.length>0?n.children.forEach((function(n){return o(n,t,u)})):t.push(u)}Object.defineProperty(t,"__esModule",{value:!0}),t.H4i=t.Q1e=t.cellNameReg=t.kOi=void 0,t.kOi=function(n){n=(n||"").replace("=","").trim().toUpperCase();var i=t.cellNameReg.exec(n);return i?{row:parseInt(i[2],10)-1,col:r(i[1])}:null},t.cellNameReg=/^([A-Z]+)([0-9]+)$/,t.Q1e=function(n){var t=[];return o(n,t),t},t.H4i=function n(t,i){i(t)||t.children.forEach((function(t){return n(t,i)}))}},3607:function(n,t,i){var r,o,u=this&&this.hJr||(Object.create?function(n,t,i,r){void 0===r&&(r=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(n,r,o)}:function(n,t,i,r){void 0===r&&(r=i),n[r]=t[i]}),e=this&&this.dJr||function(n,t){for(var i in n)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||u(t,n,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.ParentChildTreeGenerator=t.ReportEngine=void 0,r=i(6401),Object.defineProperty(t,"ReportEngine",{enumerable:!0,get:function(){return r.ReportEngine}}),o=i(9034),Object.defineProperty(t,"ParentChildTreeGenerator",{enumerable:!0,get:function(){return o.ParentChildTreeGenerator}}),e(i(1129),t),e(i(6546),t),e(i(7770),t),e(i(9876),t),e(i(4869),t),e(i(6807),t),e(i(1422),t)},7770:function(n,t){Object.defineProperty(t,"__esModule",{value:!0})},4869:function(n,t){Object.defineProperty(t,"__esModule",{value:!0})},6807:function(n,t){Object.defineProperty(t,"__esModule",{value:!0})},9876:function(n,t){Object.defineProperty(t,"__esModule",{value:!0})},1129:function(n,t){Object.defineProperty(t,"__esModule",{value:!0})},6546:function(n,t){Object.defineProperty(t,"__esModule",{value:!0})},1422:function(n,t){Object.defineProperty(t,"__esModule",{value:!0})},9089:function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CellNodeFinder=void 0;var r=i(8346),o=i(7789),u=i(391),e=function(){function n(n,t){var i,o,u,e,c,f;void 0===t&&(t=null),this.s_i=n,this.Z4i=t,this.d4i=null!==this.Z4i?this.Z4i.getTemplateRange():this.s_i.getRange(),u=(o=this.d4i).row,e=o.col,c=o.rowEnd,f=o.colEnd,this.V4i=new r.SmartCache(u,e,c,f),this.k4i=null===(i=this.Z4i)||void 0===i?void 0:i.getTemplatePaginationSetting()}return n.prototype.Q4i=function(n){var t,i,r,e,c;if((0,u.Y4i)(n.templateCell.leftParent)){if((t=this.V4i.get(n.templateCell.row,n.templateCell.col))&&void 0!==t.leftParent)return t.leftParent;for(i=[],r=n.templateCell.col-1;r>=this.d4i.col;r--)if(e=this.W4i(n.templateCell.row,r)){if((0,u.F4i)(e.templateCell.leftParent)&&(r=-1),this.J4i(e))return this.K4i(i,e,"left"),e;(0,u.Y4i)(e.templateCell.leftParent)&&(0,u.e5t)(e)&&e.templateCell.col===r&&i.push({row:n.templateCell.row,col:r})}this.K4i(i,null,"left")}else if(!(0,u.F4i)(n.templateCell.leftParent)&&(c=(0,o.kOi)(n.templateCell.leftParent))&&(e=this.W4i(c.row,c.col,this.X4i(c.row,c.col)))&&e!==n)return e;return null},n.prototype.$4i=function(n){var t,i,r,e,c;if((0,u.Y4i)(n.templateCell.upParent)){if((t=this.V4i.get(n.templateCell.row,n.templateCell.col))&&void 0!==t.upParent)return t.upParent;for(i=[],r=n.templateCell.row-1;r>=this.d4i.row;r--)if(e=this.W4i(r,n.templateCell.col)){if((0,u.F4i)(e.templateCell.upParent)&&(r=-1),this.q4i(e))return this.K4i(i,e,"up"),e;(0,u.Y4i)(e.templateCell.upParent)&&(0,u.e5t)(e)&&e.templateCell.row===r&&i.push({row:r,col:n.templateCell.col})}this.K4i(i,null,"up")}else if(!(0,u.F4i)(n.templateCell.upParent)&&(c=(0,o.kOi)(n.templateCell.upParent))&&(e=this.W4i(c.row,c.col,this.X4i(c.row,c.col)))&&e!==n)return e;return null},n.prototype.W4i=function(n,t,i){var r=this.s_i.get(n,t);return r||(r=this.tSi(n,t,i),this.nSi(r)),r},n.prototype.nSi=function(n){var t,i,r,o;if(n)for(t=n.templateCell.rowEnd,i=n.templateCell.colEnd,r=n.templateCell.row;r<=t;r++)for(o=n.templateCell.col;o<=i;o++)this.s_i.set(r,o,n)},n.prototype.tSi=function(n,t,i){var r,o,u,e,c,f,s,l=this.Z4i.getTemplateCell(n,t);if(!l){if(!i)return null;l={row:n,col:t,rowEnd:n,colEnd:t,value:void 0,formula:void 0,isEmpty:!0,isRowHeightChanged:!1,isColWidthChanged:!1,leftParent:"Default",upParent:"Default",expansionDirection:"No",filter:null,hExpansible:!0,vExpansible:!0}}return r=!1,o=!1,this.k4i&&(e=(u=this.k4i).titleRows,c=u.endRows,f=u.titleCols,s=u.endCols,r=e&&l.row>=e[0]&&l.row<=e[e.length-1]||c&&l.row>=c[0]&&l.row<=c[c.length-1],o=f&&l.col>=f[0]&&l.col<=f[f.length-1]||s&&l.col>=s[0]&&l.col<=s[s.length-1]),{templateCell:l,treeRange:{row:l.row,col:l.col,rowEnd:l.rowEnd,colEnd:l.colEnd},children:[],leftParent:null,upParent:null,data:{groups:[]},indexOfLeftParentChildren:-1,indexOfUpParentChildren:-1,isInTitleRowOrEndRow:r,isInTitleColOrEndCol:o}},n.prototype.J4i=function(n){var t=n.templateCell;return"V"===t.expansionDirection&&(t.dataColumn||t.formula)&&(!t.dataSetting||"Summary"!==t.dataSetting.type)},n.prototype.q4i=function(n){var t=n.templateCell;return"H"===t.expansionDirection&&(t.dataColumn||t.formula)&&(!t.dataSetting||"Summary"!==t.dataSetting.type)},n.prototype.X4i=function(n,t){return n>=this.d4i.row&&n<=this.d4i.rowEnd&&t>=this.d4i.col&&t<=this.d4i.colEnd},n.prototype.K4i=function(n,t,i){var r=this;n.forEach((function(n){var o=n.row,u=n.col,e=r.V4i.get(o,u);e||(e={},r.V4i.set(o,u,e)),"left"===i?e.leftParent=t:e.upParent=t}))},n}();t.CellNodeFinder=e},9034:function(n,t,i){var r,o,u,e,c,f=this&&this.yJr||function(n,t,i){if(i||2===arguments.length)for(var r,o=0,u=t.length;o<u;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return n.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ParentChildTreeGenerator=void 0,r=i(8346),o=i(7789),u=i(9089),e=i(391),c=function(){function n(n){this.Z4i=n}return n.prototype.process=function(n){var t,i,r,o,u,c,f;if(void 0===n&&(n=!1),performance.now(),!this.Z4i)return null;if(this.d4i=this.Z4i.getTemplateRange(),!this.d4i)return null;for(this.iSi(),this.rSi(),t=this.eSi(),i=this.d4i.rowEnd;i>=this.d4i.row;i--)for(r=this.d4i.colEnd;r>=this.d4i.col;r--)(o=this.oSi.W4i(i,r))&&o.templateCell.row===i&&o.templateCell.col===r&&(this.uSi(t,o),this.sSi(o),(0,e.e5t)(o))&&(c=(u=this.cSi(o)).leftParent,f=u.upParent,(c||f)&&this.fSi(c,f,o)?(this.hSi(c,t),this.hSi(f,t),c&&f&&t.crossCells.unshift(o)):this.aSi(t,o));return this.lSi(t),n||(0,e.fir)(t),this.Cnr(t),this.dSi(t),this.pSi(),performance.now(),t},n.prototype.iSi=function(){var n=this.d4i,t=n.row,i=n.col,o=n.rowEnd,e=n.colEnd;this.s_i=new r.SmartCache(t,i,o,e),this.xnr=new r.SmartCache(t,i,o,e),this.oSi=new u.CellNodeFinder(this.s_i,this.Z4i),this.wSi=[],this.gSi=[],this.MSi=[],this.jSi=[]},n.prototype.eSi=function(){return{verticalExpansionTrees:[],horizontalExpansionTrees:[],crossCells:[],cellNodeCache:this.s_i,templateResolver:this.Z4i,colOffsetClearCache:this.wSi,rowOffsetClearCache:this.gSi,paginateBeforeRowCache:{},paginateAfterRowCache:{},paginateBeforeColumnCache:{},paginateAfterColumnCache:{},canNotBreakCells:[]}},n.prototype.rSi=function(){var n,t,i,r,o,u;for(n=this.d4i.row;n<=this.d4i.rowEnd;n++)for(t=this.d4i.col;t<=this.d4i.colEnd;t++)(i=this.oSi.W4i(n,t))&&i.templateCell.row===n&&i.templateCell.col===t&&(0,e.e5t)(i)&&((0,e.CSi)(i.templateCell.leftParent)||(0,e.CSi)(i.templateCell.upParent))&&(o=(r=this.cSi(i)).leftParent,u=r.upParent,(o||u)&&this.fSi(o,u,i))},n.prototype.cSi=function(n){var t=this.oSi.Q4i(n),i=this.oSi.$4i(n);return t&&i&&t===i&&((0,e.Y4i)(n.templateCell.upParent)?i=null:t=null),{leftParent:t,upParent:i}},n.prototype.aSi=function(n,t){"V"===t.templateCell.expansionDirection?n.verticalExpansionTrees.unshift(this.mSi(t)):"H"===t.templateCell.expansionDirection?n.horizontalExpansionTrees.unshift(this.mSi(t)):t.templateCell.dataColumn&&n.verticalExpansionTrees.unshift(this.mSi(t))},n.prototype.lSi=function(n){var t=this;n.verticalExpansionTrees.forEach((function(n){var i,r,u,e,c,f=n.root,s=f.treeRange,l=s.row,h=s.col,a=s.rowEnd,v=s.colEnd;for(t.xnr.reset(l,h,a,v),i=(0,o.Q1e)(f).sort((function(n,t){return t.length-n.length})),r=i[0].length,u=[],e=function(n){i.forEach((function(i){i[n]&&!u.includes(i[n])&&t.NSi(i[n])}))},c=r-2;c>=0;c--)e(c)})),n.horizontalExpansionTrees.forEach((function(n){var i,r,u,e,c,f=n.root,s=f.treeRange,l=s.row,h=s.col,a=s.rowEnd,v=s.colEnd;for(t.xnr.reset(l,h,a,v),i=(0,o.Q1e)(f).sort((function(n,t){return t.length-n.length})),r=i[0].length,u=[],e=function(n){i.forEach((function(i){i[n]&&!u.i