@mescius/spread-sheets-reportsheet-addon
Version:
SpreadJS ReportSheet Plugin
12 lines • 368 kB
JavaScript
/*!
*
* SpreadJS Library 18.1.4
*
* Copyright(c) MESCIUS inc. All rights reserved.
*
* Licensed under the SpreadJS Commercial License.
* us.sales@mescius.com
* https://developer.mescius.com/spreadjs
*
*/
!function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("@mescius/spread-sheets")):"function"==typeof define&&define.amd?define(["@mescius/spread-sheets"],t):"object"==typeof exports?exports.Spread=t(require("@mescius/spread-sheets")):t(GC)}(function(r){function i(t){var n,n,n=o[t];return void 0!==n||(n=o[t]={exports:{}},e[t].call(n.exports,n,n.exports,i)),n.exports}var e,o,t;e={"./dist/plugins/report/base/sheet-tab-base.js":function(t,n,i){"use strict";var o,r;function e(){}Object.defineProperty(n,"__esModule",{value:!0}),n.SheetTabBase=void 0,o=i("./dist/plugins/report/utils/utils.js"),e.prototype.name=function(t){var n=this.Mf;return n.name.apply(n,arguments),n.name()},e.prototype.getParent=function(){return this.Mf&&this.Mf.getParent()},e.prototype.visible=function(t){var n=this.Mf;return n.visible.apply(n,arguments)},e.prototype.e1e=function(){return this.Mf.options.sheetTabColor},e.prototype.hg=function(t){this.Mf.hg(t)},e.prototype.L0=function(t,n){var i;this.Mf.L0(t,n),t&&(this.E3(),this.UMi)&&this.UMi.detach()},e.prototype.Zg=function(t){this.Mf.Zg(t)},e.prototype.pM=function(t){this.Mf.pM(t)},e.prototype.b2=function(t,n){return this.Mf&&this.Mf.b2(t,n)},e.prototype.ow=function(){this.Mf.ow()},e.prototype.aw=function(){this.Mf.aw()},e.prototype.tw=function(){this.Mf.tw()},e.prototype.Wb=function(t,n){this.Mf.Wb(t,n)},e.prototype.Kb=function(t){this.Mf.Kb(t)},e.prototype.Fb=function(t,n){this.Mf.Fb(t,n)},e.prototype.onHorizontalDockScroll=function(t,n){this.Mf.onHorizontalDockScroll(t,n)},e.prototype.Gb=function(t){this.Mf.Gb(t)},e.prototype.WC=function(t,n,i){this.Mf.WC(t,n,i)},e.prototype.$C=function(t){this.Mf.$C(t)},e.prototype.QC=function(t,n,i){this.Mf.QC(t,n,i)},e.prototype.Cg=function(){this.Mf.Cg()},e.prototype.suspendPaint=function(){this.Mf.suspendPaint()},e.prototype.resumePaint=function(){var t=this.Mf.getDataSource();this.Mf.resumePaint()},e.prototype.isPaintSuspended=function(){return this.Mf.isPaintSuspended()},e.prototype.v3=function(t){var n,i,r,e,n=this.rM;if(n)for(i=0,r=n;i<r.length;i++)e=r[i],t.bind(e.type,e.data,e.fn)},e.prototype.bind=function(t,n,i){this.D3(t,n,i)},e.prototype.unbind=function(t,n){this._3(t,n)},e.prototype.unbindAll=function(){this.E3()},e.prototype.D3=function(t,n,i){this.rM||(this.rM=[]),this.Mf.D3(t,n,i),this.rM.push({type:t,data:n,fn:i})},e.prototype._3=function(t,n){this.Mf._3(t,n),this.nwr(t,n)},e.prototype.nwr=function(t,n){var i,r,e,i=this.rM;if(i)for(r=i.length-1;0<=r;r--)(e=i[r]).type!==t&&!(0,o.k3)(e.type,t)||void 0!==n&&e.fn===n||i.splice(r,1)},e.prototype.E3=function(){this.rM=[],this.Mf.E3()},e.prototype.parameter=function(t){return 0!==arguments.length&&(this.o1e=t),this.o1e},e.prototype.suspendEvent=function(){this.Mf.suspendEvent()},e.prototype.resumeEvent=function(){this.Mf.resumeEvent()},e.prototype.isEventSuspended=function(){return this.Mf.isEventSuspended()},e.prototype.bC=function(){this.Mf.bC()},e.prototype.ki=function(t,n,i){this.Mf.ki(t,n,i)},e.prototype.isEditing=function(){return this.Mf.isEditing()},e.prototype.ol=function(t,n,i,r){return this.Mf.ol(t,n,i,r)},e.prototype.currentTheme=function(t){var n=this.Mf;return n.currentTheme.apply(n,arguments)},e.prototype.FM=function(){this.Mf.FM()},e.prototype.uw=function(){return this.Mf.uw()},e.prototype.ot=function(){return this.Mf.ot()},e.prototype.hitTest=function(t,n,i,r){return this.Mf.hitTest(t,n,i,r)},e.prototype.toJSON=function(t){},e.prototype.fromJSON=function(t,n,i,r,e){},n.SheetTabBase=e},"./dist/plugins/report/calc-model/calc-model.js":function(t,n,i){"use strict";var h,r,l,e,o,u;function s(t,n,i,r){this.Anr=!1;var e=this;e.oji=n,e.uji=i,e.POt=r,e.nir(n,t),e.c5()}Object.defineProperty(n,"__esModule",{value:!0}),n.CalcModel=void 0,h=i("CalcEngine"),r=i("./dist/plugins/report/helpers/smart-cache.js"),l=i("./dist/plugins/report/utils/utils.js"),e=i("./dist/plugins/report/calc-model/helpers/hierarchical-cell-indexing-helper.js"),o=i("SheetsCalc"),s.prototype.nir=function(t,n){var i=this,r;i.POt.setReportContext(t,i,new e.HierarchicalCellIndexingHelper(i,t,n))},s.prototype.cji=function(){return this.POt.hierarchicalCellIndexingHelper},s.prototype.fji=function(){this.c5(),this.Anr=!0},s.prototype.hji=function(){this.Anr=!1},s.prototype.ltr=function(t){var n,t,n=this,t=(0,o.formulaToExpression)(n.POt.Mf.reportSheet.templateSheet,t);return this.vtr(n.POt.Mf.reportSheet,t),(0,o.expressionToFormula)(n.POt.Mf,t)},s.prototype.vtr=function(t,n){var i,r,e;if(8===n.type)this.ptr(t,n);else{if(n.arguments)for(i=0,r=n.arguments;i<r.length;i++)e=r[i],this.vtr(t,e);n.value&&this.vtr(t,n.value),n.value2&&this.vtr(t,n.value2)}},s.prototype.ptr=function(t,n){var i,r,e,o,t,i=t.parameter();if(i){for(o in e=n.value+"",i)i.hasOwnProperty(o)&&o.toUpperCase()===e.toUpperCase()&&(r=i[o]);void 0!==r&&("string"==(t=typeof r)?n.type=3:"boolean"==t?n.type=4:"number"==t?n.type=2:r instanceof Date&&(r=r.toString(),n.type=3),n.value=r)}},s.prototype.aji=function(t){var n,i,r,e,o,u,s,c,f,n=this,i=(0,l.lji)(t);if(!(0,l.ht)(i)){if(i=n.ltr(i),r=t.row,e=t.col,n.vji.get(r,e)||n.dji.get(r,e))return n.pji.get(r,e);if((u=n.W5i)[r]){if(u[r][e])return h.Errors.Value}else u[r]=[];return i.startsWith("{")&&i.endsWith("}")?o=t.value:(u[r][e]=!0,s=n.uji,f=(c=n.POt).getBaseRowCol(),c.setContext({row:r,col:e}),o=s.evaluate(c,i,0,0),u[r][e]=!1,this.POt.hierarchicalCellIndexingHelper.resetOffsetContent(),c.setContext(f)),n.pji.set(r,e,o),n.dji.set(r,e,!0),t.group.value=o,t.value=o,t.group.defaultFormula&&(t.group.defaultFormula=void 0),o}},s.prototype.wji=function(t,n,i){var r,e,o,r=this,e=r.uji,o=r.POt;return o.setContext({row:t,col:n}),i=r.ltr(i),e.evaluate(o,i,0,0)},s.prototype.Sl=function(t,n){return this.pji.get(t,n)},s.prototype.gji=function(t,n,i){this.vji.set(t,n,!0),this.pji.set(t,n,i),this.POt.hierarchicalCellIndexingHelper.resetRankCache(),this.reCalcCellsFrom(t,n)},s.prototype.Mji=function(t,n,i){var r,e,o;this.Anr&&(e=(r=this).jji,o={row:n,col:i},t.forEach(function(t){var n=t.row,t=t.col;(0,l.ht)(e[n])&&(e[n]=[]),(0,l.ht)(e[n][t])?e[n][t]=[o]:e[n][t].push(o)}))},s.prototype.Fnr=function(t,i){var r;this.Anr&&(r=this.jji,t.forEach(function(t){var n=t.row,t=t.col;(0,l.ht)(r[n])&&(r[n]=[]),(0,l.ht)(r[n][t])?r[n][t]=[i]:r[n][t].push(i)}))},s.prototype.brr=function(t,n){var i=[];return this.Orr(t,n,i),i},s.prototype.eG=function(){var t=this;t.pji=l.KEYWORD_UNDEFINED,t.uji=l.KEYWORD_UNDEFINED,t.POt.destroy(),t.POt=l.KEYWORD_UNDEFINED,t.dji=l.KEYWORD_UNDEFINED,t.jji=l.KEYWORD_UNDEFINED,t.vji=l.KEYWORD_UNDEFINED,t.W5i=l.KEYWORD_UNDEFINED},s.prototype.c5=function(){var t=this;t.pji=new r.SmartCache,t.dji=new r.SmartCache,t.vji=new r.SmartCache,t.POt.hierarchicalCellIndexingHelper.reset(),t.jji=[],t.W5i=[]},s.prototype.Orr=function(t,n,r,e){var i,o,u,i,s;void 0===e&&(e={}),i="".concat(t,"-").concat(n),!e[i]&&(e[i]=!0,i=(u=(o=this).jji)[t]&&u[t][n])&&(s=function(t){var n,t,i,n=t.row,t=t.col,i=o.oji.getCell(n,t);r.includes(i)||r.push(i),e["".concat(n,"-").concat(t)]||(0,l.ht)(u[n])||(0,l.ht)(u[n][t])||o.Orr(n,t,r,e)},i.forEach(function(t){Array.isArray(t)?t.forEach(function(t){s(t)}):s(t)}))},s.prototype.reCalcCellsFrom=function(t,n){var i,r,i=this,r=[];i.dji.reset(),i.Orr(t,n,r),r.forEach(function(t){i.aji(t)})},n.CalcModel=s},"./dist/plugins/report/calc-model/calc-source.js":function(t,n,i){"use strict";var r,e,S,y,R,o,L,P,x,u,s,c;function f(t,n,i){var n=c.call(this,t,n,i)||this;return n.Mf=t,n}function _(t,n,i){var r,e,o,u;if(t.arguments&&t.arguments.some(function(t){return t===n||8===t.type&&i.getCustomName(t.value)===n})||t.value===n||t.value2===n)return t.functionName;if(t.arguments)for(r=0,e=t.arguments;r<e.length;r++)if(u=_(o=e[r],n,i))return u;return t.value&&(u=_(t.value,n,i))||t.value2&&(u=_(t.value2,n,i))?u:void 0}r=this&&this.__extends||(s=function(t,n){return(s=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),e=this&&this.__spreadArray||function(t,n,i){if(i||2===arguments.length)for(var r=0,e=n.length,o;r<e;r++)!o&&r in n||((o=o||Array.prototype.slice.call(n,0,r))[r]=n[r]);return t.concat(o||Array.prototype.slice.call(n))},Object.defineProperty(n,"__esModule",{value:!0}),n.ReportCalcSource=void 0,S=i("CalcEngine"),y=i("./dist/plugins/report/utils/utils.js"),R=i("Core"),o=i("SheetsCalc"),L=i("./dist/plugins/report/data-model/helpers/merge-range-utils.js"),x=e(["ROW","ROWS","COLUMN","COLUMNS","INDEX","SUMIF","SUMIFS","SCATTERSPARKLINE","BOXPLOTSPARKLINE","MONTHSPARKLINE","YEARSPARKLINE","HISTOGRAMSPARKLINE","RANGEBLOCKSPARKLINE"],P=["R.INDEX","R.RANK","R.R","R.A","R.V","R.PROPORTION","R.CUMULATIVE","R.YOY","R.MOM"],!0),c=o.SheetSource,r(f,c),f.prototype.setReportContext=function(t,n,i){this.Cji=t,this.mji=n,this.hierarchicalCellIndexingHelper=i},f.prototype.getResolver=function(){return this.resolvers},f.prototype.evaluateReference=function(t,n,i){return this.Crr(t,n,i)},f.prototype.Crr=function(t,n,i,r){var e,o,u,s,c,f,h,l,a,v,d,p,M,w,I,g,C,o,w,i,e,o,N,j,D,A,E,b,T,O,m;if(void 0===r&&(r=!1),o=(e=this).DJ,u=e.Cji,s=e.mji,c=isNaN(n.row)?0:n.row,f=isNaN(n.column)?0:n.column,d=t.getRange&&t.getRange(c,f),0===c&&0===f||!t.rowRelative&&!t.columnRelative?(h=d.row,l=d.col):(p=null==u?void 0:u.getCell(c,f))&&(h=p.cellNode.templateCell.row,l=p.cellNode.templateCell.col),a=d.rowCount,v=d.colCount,M=t.source||n.source,w=n.WK,g=o?(I=o.row,o.col):(I=n.row,n.column),o=w&&t instanceof S.ReferenceExpression?_(w,t,n.source)||w.functionName:"",x.includes(o)){if(i||n.arrayFormulaMode)return w=void 0,t.endSource&&(w=n.getSheetRangeReference({source:t.source,endSource:t.endSource,row:d.row,col:d.col,rowCount:d.rowCount,colCount:d.colCount})),!((w=n.getReference(M,d))instanceof S.CalcReference)||(C=e.WCi(w,I,g),this.Nrr(C),P.includes(o))?w:C.length?(i=!(0,L.pCi)(C[0]),n.getReference(M,(0,L.dCi)(C,i)[0])):n.getReference(M,new R.Range(0,0,0,0));if(1<a||1<v){if(e=c>=d.row&&c<d.row+a,o=f>=d.col&&f<d.col+v,e&&o)h=c,l=f;else{if(!e&&!o)return S.Errors.Value;if(e&&1===v)h=c;else{if(!o||1!==a)return S.Errors.Value;l=f}}n.WK&&n.WK.ensureSingle&&(t.$9t=!0)}else if(-1===d.row&&-1===a){if(1!==v)return S.Errors.Value;h=c}else if(-1===d.col&&-1===v){if(1!==a)return S.Errors.Value;l=f}if(h===I&&l===g)return null;if((C=null==u?void 0:u.getCells(h,l,I,g))&&C.length&&this.Nrr(C),r)return;for(N=[],j=0,D=C;j<D.length;j++)p=D[j],A=(0,y.lji)(p)?s.aji(p):p.value,Array.isArray(A)?A.forEach(function(t){N.push(t)}):N.push(A);return new S.TwoDimensionalCalcArray([N])}if(d){if(E=[],u)for(b=0;b<a;b++)for(T=0;T<v;T++)if(C=u.getCells(h+b,l+T,I,g))for(this.Nrr(C),O=0,m=C;O<m.length;O++)p=m[O],A=(0,y.lji)(p)?s.aji(p):p.value,r||(Array.isArray(A)?A.forEach(function(t){E.push(t)}):E.push(A));return r?void 0:new S.TwoDimensionalCalcArray([E])}return S.Errors.Reference},f.prototype.getSheet=function(){return this.Mf},f.prototype.getBaseRowCol=function(){var t=this.DJ;if(t)return{row:t.row,col:t.col}},f.prototype.getValue=function(t,n){var i,r,i,i=this.Cji,r=this.mji,i=null==i?void 0:i.getCell(t,n);if(i)return(0,y.lji)(i)?r.aji(i):i.value},f.prototype.getCustomFunction=function(t){return this.Mf?this.Mf.Jbt(t):null},f.prototype.op=function(){return this.getCalcService()},f.prototype.setContext=function(t){this.DJ=t},f.prototype.destroy=function(){this.mji=y.KEYWORD_UNDEFINED,this.DJ=y.KEYWORD_UNDEFINED,this.resolvers=y.KEYWORD_UNDEFINED,this.Cji=y.KEYWORD_UNDEFINED},f.prototype.updateBranchPrecedents=function(t,n,i){var r,e,o,u,r=this;if(1===t.type)r.Crr(t,n,i,!0);else{if(t.arguments)for(e=0,o=t.arguments;e<o.length;e++)1===(u=o[e]).type?r.Crr(u,n,i,!0):r.updateBranchPrecedents(u,n,i);t.value&&r.updateBranchPrecedents(t.value,n,i),t.value2&&r.updateBranchPrecedents(t.value2,n,i)}},f.prototype.Nrr=function(t){var n,i,r,e,o,i;this.DJ&&(r=(i=(n=this).DJ).row,e=i.col,o=i.formula,i=i.triggerUpdatePrecedents,n.mji.Mji(t,r,e),i)&&R.Worksheet.et(n.getSheet(),"updatePrecedents",{row:r,col:e,cells:t,formula:o})},f.prototype.WCi=function(t,n,i){var r,e,o,u,s,c,f,h,r=t.getRow(),e=t.getColumn(),o=r+t.getRowCount()-1,u=e+t.getColumnCount()-1,s=this.Mf.reportSheet.templateSheet,c=this.Cji,f=[];if(c)for(;r<=o;r++){for(;e<=u;e++)(h=s.getSpan(r,e))&&(h.row!==r||h.col!==e)||c.getCells(r,e,n,i).forEach(function(t){f.push(t)});e=t.getColumn()}return f},n.ReportCalcSource=f},"./dist/plugins/report/calc-model/helpers/hierarchical-cell-indexing-helper.js":function(t,n,i){"use strict";var m,S,i,y,l,r,i;function R(){return m.Functions.CALC_PRECISION||14}function e(t,n,i){this.Vnr={},this.Cji=n,this.mCi=i,this.mji=t,this.g_i={},this.gir={}}Object.defineProperty(n,"__esModule",{value:!0}),n.HierarchicalCellIndexingHelper=void 0,m=i("CalcEngine"),S=i("./dist/plugins/report/utils/utils.js"),i=i("Common"),y=i.Common.st.E8,(i=l=l||{})[i.noJuxtaposition=0]="noJuxtaposition",i[i.nonSkippingNumber=1]="nonSkippingNumber",i[i.skipNumber=2]="skipNumber",e.prototype.getYearOverYear=function(t,n,i,r){for(var e,o,u,s,c,n,f,h,l,a,v,d,p,M,h,w,I,g,C,N,j,D,e,A,E,b,T,O,h,w,s,I,e=this,o=e.Cji,u=e.mji,s=e.gir,c=n.getRow(),n=n.getColumn(),f=o.getCells(c,n,t.row,t.col)[0],h=i||r,l=o.getCells(h.getRow(),h.getColumn(),f.row,f.col)[0],a=e.Tnr({row:c,col:n},{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()},{row:f.row,col:f.col}),v=-1,p=0,M=a.length;p<M;p++)if((d=a[p]).row===f.row&&d.col===f.col){v=p;break}if(v<0)return m.Errors.Reference;for(h=l.cellNode.templateCell,w=e.mCi.tfr(h.row,h.col),s[I=this.Mir(t,{row:c,col:n},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()})]||(s[I]=e.Tnr({row:h.row,col:h.col},w.upParent,w.leftParent,{row:l.row,col:l.col})),C=-1,j=0,D=(g=s[I]).length;j<D;j++){if((N=g[j]).row===l.row&&N.col===l.col){N=g[j-1],C=j-1;break}if(N.row>l.row&&N.col>l.col)break}if(C<0)return 0;if(e=o.getCells(c,n,N.row,N.col),i&&r){for(A=[],E=o.getCells(r.getRow(),r.getColumn(),f.row,f.col)[0],b=0,T=e;b<T.length;b++)O=T[b],(0,S.Enr)(O.group,E.group)&&A.push(O);e=A}return(h=e[v])&&(u.Mji([h],t.row,t.col),void 0!==h.value&&u.Anr||(h.value=(0,S.lji)(h)?u.aji(h):h.value||null)),w=+f.value,s=h&&+h.value,isNaN(w)&&(w=0),isNaN(s)&&(s=0),I="number"==typeof(I=(0,S.calculationValue)(w,s,1))?y(I,R()):I},e.prototype.getMonthOverMonth=function(t,n,i,r){var e,o,u,s,c,n,f,o,h,l,a,v,d,e,c,n,e=this,o=e.Cji,u=e.mji,s=e.gir,c=n.getRow(),n=n.getColumn(),f=o.getCells(c,n,t.row,t.col)[0],o=this.Mir(t,{row:c,col:n},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()});for(s[o]||(s[o]=e.Tnr({row:c,col:n},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()},{row:f.row,col:f.col})),a=-1,v=0,d=(h=s[o]).length;v<d;v++){if((l=h[v]).row===f.row&&l.col===f.col){a=v-1;break}if(l.row>f.row&&l.col>f.col)break}return(l=(0,S.ht)(a)?null:h[a])&&(u.Mji([l],t.row,t.col),void 0!==l.value&&u.Anr||(l.value=(0,S.lji)(l)?u.aji(l):l.value||null)),e=+f.value,c=l&&+l.value,isNaN(e)&&(e=0),isNaN(c)&&(c=0),a<0?0:"number"==typeof(n=(0,S.calculationValue)(e,c,1))?y(n,R()):n},e.prototype.Mir=function(t,n,i,r){var e,o,u,u,n,i,e,o=this.Cji,u=o.getCell(t.row,t.col).cellNode.templateCell,u="".concat(u.row,"_").concat(u.col,"_").concat(n.row,"_").concat(n.col,"_");return i&&(u=(n=o.getCells(i.row,i.col,t.row,t.col)[0])?"".concat(u).concat(n.row,"_").concat(n.col,"_"):u),u=r?(i=o.getCells(r.row,r.col,t.row,t.col)[0])?"".concat(u).concat(i.row,"_").concat(i.col,"_"):u:u},e.prototype.getCumulative=function(t,n,i,r){var e,o,u,s,c,n,f,o,h,l,a,v,d,p,M,w,e=this,o=e.Cji,u=e.mji,s=e.gir,c=n.getRow(),n=n.getColumn(),f=o.getCells(c,n,t.row,t.col)[0],o=this.Mir(t,{row:c,col:n},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()});for(s[o]||(s[o]=e.Tnr({row:c,col:n},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()},t)),a=-1,d=[],M=p=v=0,w=(h=s[o]).length;M<w;M++){if((l=h[M]).row===f.row&&l.col===f.col){a=M-1;break}if(l.row>f.row&&l.col>f.col)break;void 0!==l.value&&u.Anr||(l.value=(0,S.lji)(l)?u.aji(l):l.value||null),p=+l.value,isNaN(p)&&(p=0),d.push(l),v+=p}return(l=(0,S.ht)(a)?null:h[a])&&u.Mji(d,t.row,t.col),p=+f.value,isNaN(p)&&(p=0),(0,S.calculationValue)(p,l&&v,0)},e.prototype.getProportion=function(t,n,i,r){var e,o,u,s,c,n,o,f,t,c,h,l,a,e=this,o=e.Cji,u=e.mji,s=e.gir,c=n.getRow(),n=n.getColumn(),o=o.getCells(c,n,t.row,t.col)[0],f=o&&+o.value;for(isNaN(f)&&(f=0),s[t=this.Mir(t,{row:c,col:n},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()})]||(s[t]=e.Tnr({row:c,col:n},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()},{row:o.row,col:o.col})),h=0,l=c=s[t];h<l.length;h++)void 0===(a=l[h]).value&&(a.value=(0,S.lji)(a)?u.aji(a):a.value||null);return e.Snr(f,c)},e.prototype.Tnr=function(t,n,i,r){var e,o,u,s,c,f,h,l,a,s,n,e,o=this.Cji,u=[];if(n&&i){for(s=o.getCells(n.row,n.col,r.row,r.col)[0],c=o.getCells(i.row,i.col,r.row,r.col)[0],h=0,l=f=o.getCells(t.row,t.col,s.row,s.col);h<l.length;h++)a=l[h],(0,S.Enr)(a.group,c.group)&&u.push(a);(0,S.atr)(u,"V"===s.cellNode.templateCell.expansionDirection)}else n||i?(n=o.getCells((s=n||i).row,s.col,r.row,r.col)[0],u=o.getCells(t.row,t.col,n.row,n.col),(0,S.atr)(u,"V"===n.cellNode.templateCell.expansionDirection)):(u=o.getCells(t.row,t.col),(0,S.atr)(u,!0));return u},e.prototype.getIndex=function(t,n,i){var r,e,o,u,s,o,c,f,h,r=this,e=this,o=e.Cji,u=e.mji,s=o.getCells(n.getRow(),n.getColumn(),t.row,t.col)[0],o=i?{row:i.getRow(),col:i.getColumn()}:null;return u.Mji([s],t.row,t.col),void 0!==s.value&&u.Anr||(s.value=(0,S.lji)(s)?u.aji(s):s.value||null),c=o?"-".concat(o.row,"-").concat(o.col):"",void 0===(f=this.Vnr["".concat(s.row,"-").concat(s.col,"-").concat(c)])&&(h=e.M_i(t,{row:n.getRow(),col:n.getColumn()},o)).forEach(function(t,n){r.Vnr["".concat(t.row,"-").concat(t.col,"-").concat(c)]=n+1,t===s&&(f=n+1)}),f},e.prototype.getRank=function(t,n,i,r,e){var o,u,s,c,i,n,i,f,h,h,h,f,n,h;return void 0===e&&(e=1),s=(u=(o=this).Cji).getCells(n.getRow(),n.getColumn(),t.row,t.col)[0],c=o.j_i(t,n,i),i=i instanceof m.CalcReference?{row:i.getRow(),col:i.getColumn()}:i,i=(n=o.M_i(t,{row:n.getRow(),col:n.getColumn()},i)).length,(f=o.g_i[c])?(h=o.Cji.getCell(t.row,t.col).cellNode.templateCell,h="".concat(c,"_").concat(h.row,"_").concat(h.col),o.g_i[h]||(o.g_i[h]=f,o.Ynr(n,t))):(h=[].concat(n),o.C_i(c,h,t),o.Ynr(h,t)),(0,S.ht)(s.value)?null:(f=o.g_i[c])&&f[s.row]&&f[s.row][s.col]?(n=f[s.row][s.col],h=r?i-n.index+1:n.index,e===l.noJuxtaposition?h-=r?n.afterEmptyCellCount:n.beforeEmptyCellCount:e===l.skipNumber?h-=r?n.currentAfterEmptyCellCount:n.currentBeforeEmptyCellCount:r||(h=h+n.currentAfterEmptyCellCount-n.sameValueCount+n.currentAfterEmptyCellCount),h):void 0},e.prototype.coordinateExecute=function(t,n,i,r){var e,o,e,u,s,c,f,i,r,f,i,h,l,a,v,d,p,M,w,I,f,g,C,N,j,D,i,h,c;if("string"==typeof i&&"CURRENTPAGE"===i.toUpperCase())return e=this.Cji.getCellsInPage(n.getRow(),n.getColumn(),t.row,t.col),this.N_i(e,t);if(e=(o=this).Cji,u=o.m_i,s=o.mji,c=o.Cji,o.resetOffsetContent(),i||r)return(f=e.getCells(n.getRow(),n.getColumn(),t.row,t.col)[0])?(i=o.Tnr({row:n.getRow(),col:n.getColumn()},i&&{row:i.getRow(),col:i.getColumn()},r&&{row:r.getRow(),col:r.getColumn()},{row:f.row,col:f.col}),o.N_i(i,t)):m.Errors.Null;if(!u||!u.length)return o.N_i(e.getCells(n.getRow(),n.getColumn()),t);for(r=u[0].parent,f=e.getCells(r.row,r.col,t.row,t.col)[0],(i=o.mCi.tfr(f.cellNode.templateCell.row,f.cellNode.templateCell.col)).leftParent&&i.upParent?h=(a="H"===f.cellNode.templateCell.expansionDirection)?i.upParent:i.leftParent:(i.leftParent||i.upParent)&&(h=i.leftParent||i.upParent),h&&(l=e.getCells(h.row,h.col,t.row,t.col)[0]),v=[],d=[],p=0,M=u.length;p<M&&(w=u[p],!l||o.b_i(w.parent,{row:l.cellNode.templateCell.row,col:l.cellNode.templateCell.col})||(v.push(l),l=null),l=o.getCell(t,l,w));p++);if(0<v.length&&l){for(v.push(l),f=v[0],g=v[1],N=0,j=C=c.getCells(n.getRow(),n.getColumn(),f.row,f.col);N<j.length;N++)D=j[N],(0,S.Enr)(D.group,g.group)&&d.push(D);I=o.O_i(d,{row:n.getRow(),col:n.getColumn()},v,t)}else l&&(i=e.getCell(t.row,t.col),h=o.b_i({row:i.cellNode.templateCell.row,col:i.cellNode.templateCell.col},r),I=o.getCell(t,l,{parent:{row:n.getRow(),col:n.getColumn()},offset:0,isAbsolute:!1},!h));return I?I instanceof Array?o.N_i(I,t):(s.Mji([I],t.row,t.col),void 0!==(c=o.mCi.getValue(I.row,I.col))&&s.Anr?c:(0,S.lji)(I)?s.aji(I):I.value||null):null},e.prototype.getCell=function(t,n,i,r){var e,o,u,s,i,c,f,h,e,l,a,v,e=this,o=e.Cji,u=i.parent,s=i.isAbsolute,i=i.offset,c=n?{row:n.cellNode.templateCell.row,col:n.cellNode.templateCell.col}:null,f=e.M_i(t,u,c),h=o.getCells(u.row,u.col,t.row,t.col)[0],e=o.getCells(u.row,u.col,n&&n.row,n&&n.col);if(!h||r)return e;for(l=void 0,a=0,v=f.length;a<v;a++)if(f[a]===h){l=a;break}if(s){if(!i)return null;l=0<i?i-1:e.length+i}else l+=i;return e[l]},e.prototype.N_i=function(t,n){for(var i,r,e,o,u,s,i=this.mji,r=[],o=0,u=t;o<u.length;o++)s=u[o],void 0!==(e=this.mCi.getValue(s.row,s.col))&&i.Anr||(e=(0,S.lji)(s)?i.aji(s):s.value||null),Array.isArray(e)?e.forEach(function(t){r.push(t)}):r.push(e);return i.Mji(t,n.row,n.col),new m.TwoDimensionalCalcArray([r])},e.prototype.O_i=function(t,n,i,r){var e,o,u,s,i,e,r,c,f,h,e=this,o=e.Cji,u=o.getCell(r.row,r.col),s=i[0],i=i[1];if(!e.b_i({row:u.cellNode.templateCell.row,col:u.cellNode.templateCell.col},s)&&!e.b_i({row:u.cellNode.templateCell.row,col:u.cellNode.templateCell.col},i))return t;for(e=o.getCells(n.row,n.col,r.row,r.col)[0],r=o.getCells(s.cellNode.templateCell.row,s.cellNode.templateCell.col,e.row,e.col)[0],c=o.getCells(i.cellNode.templateCell.row,i.cellNode.templateCell.col,e.row,e.col)[0],f=o.getCells(n.row,n.col,r.row,r.col),h=0;h<f.length;h++)if((0,S.Enr)(u.group,c.group))return t[h]},e.prototype.b_i=function(t,n){var i,r,i=this,r=i.mCi.tfr(t.row,t.col);return r.leftParent?r.leftParent.row===n.row&&r.leftParent.col===n.col||i.b_i(t,r.leftParent):!!r.upParent&&(r.upParent.row===n.row&&r.upParent.col===n.col||i.b_i(t,r.upParent))},e.prototype.coordinateOffset=function(t,n,i){var r,e,r=this;r.m_i=r.m_i||[],(e=r.m_i).push({parent:{row:t.getRow(),col:t.getColumn()},offset:n,isAbsolute:i})},e.prototype.reset=function(){this.Hnr(),this.resetRankCache(),this.resetOffsetContent(),this.gir={}},e.prototype.resetRankCache=function(){this.g_i={}},e.prototype.resetOffsetContent=function(){this.m_i=void 0},e.prototype.Hnr=function(){this.Vnr={}},e.prototype.C_i=function(t,n,i){for(var r,e,o,u,s,c,f,h,l,a,v,d,p,M,w,r=this,e=r.g_i,o=r.mji,u=e[t]=[],c=0,f=n;c<f.length;c++)h=f[c],o.Mji([h],i.row,i.col),h.value=(0,S.lji)(h)?o.aji(h):h.value||null;for((n=n.filter(function(t){return!(0,S.ht)(t.value)})).sort(function(t,n){return t.value>n.value?1:-1}),a=n.length,p=d=v=l=0;v<a;v++)u[(s=n[v]).row]||(u[s.row]=[]),v&&s.value===n[v-1].value?(d++,p++,l++):p=l=0,u[s.row][s.col]={index:v+1,sameValueCount:l,beforeEmptyCellCount:d,currentBeforeEmptyCellCount:p};for(v=a-1,w=M=0;-1<v;v--)s=n[v],v<a-1&&s.value===n[v+1].value?(M++,w++,l++):w=l=0,u[s.row][s.col].afterEmptyCellCount=M,u[s.row][s.col].currentAfterEmptyCellCount=w,u[s.row][s.col].sameValueCount+=l},e.prototype.Ynr=function(t,n){var i,n,n,i=this,n=i.Cji.getCell(n.row,n.col),n=i.Cji.getCells(n.cellNode.templateCell.row,n.cellNode.templateCell.col).map(function(t){return{row:t.row,col:t.col}});i.mji.Fnr(t,n)},e.prototype.j_i=function(t,n,i){var r,e,t,o,e,r,e=this.Cji,t=e.getCells(n.getRow(),n.getColumn(),t.row,t.col)[0],o="";return i instanceof m.CalcReference&&(e=e.getCells(i.getRow(),i.getColumn(),t.row,t.col)[0],o=S.CONNECTOR+e.row+S.CONNECTOR+e.col),n.getRow()+S.CONNECTOR+n.getColumn()+o},e.prototype.M_i=function(t,n,i){var r,e,o,u,i,r,e=this.Cji,o=e.getCells(n.row,n.col,t.row,t.col)[0],u=[];return u=i?(i=e.getCells(i.row,i.col,t.row,t.col)[0],e.getCells(o.cellNode.templateCell.row,o.cellNode.templateCell.col,i.row,i.col)):e.getCells(n.row,n.col)},e.prototype.Snr=function(t,n){for(var i,r,e,o,u,n,i=0,e=0,o=n;e<o.length;e++)r=+(u=o[e]).value,isNaN(r)&&(i+=0),i+=r;return n="number"==typeof(n=(0,S.calculationValue)(t,i,1))?y(n,R()):n},n.HierarchicalCellIndexingHelper=e},"./dist/plugins/report/calc-model/supported-functions.js":function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.reportSupportFunctionNames=void 0,n.reportSupportFunctionNames=["SUM","EOMONTH","ISBLANK","NORMINV","COUNT","ISOWEEKNUM","ISERR","PEARSON","AVERAGE","NETWORKDAYS","ISERROR","PERCENTILE.EXC","CHAR","NETWORKDAYS.INTL","ISEVEN","PERCENTILE.INC","DATE","TIMEVALUE","ISFORMULA","PERCENTRANK.EXC","MAX","WEEKNUM","ISLOGICAL","PERCENTRANK.INC","MIN","WORKDAY","ISNA","PERMUT","TIME","WORKDAY.INTL","ISNONTEXT","PERMUTATIONA","ABS","YEARFRAC","ISNUMBER","PHI","CEILING","BESSELI","ISODD","POISSON.DIST","COMBIN","BESSELJ","ISTEXT","PROB","EVEN","BESSELK","N","QUARTILE.EXC","EXP","BESSELY","NA","QUARTILE.INC","FACT","BIN2DEC","RANK.AVG","FLOOR","BIN2HEX","RANK.EQ","INT","BIN2OCT","FALSE","RSQ","LN","BITAND","IFERROR","SKEW","LOG","BITLSHIFT","IFNA","SKEW.P","LOG10","BITOR","IFS","SLOPE","MOD","BITRSHIFT","NOT","SMALL","PI","BITXOR","TRUE","STANDARDIZE","POWER","COMPLEX","XOR","STDEV.P","PRODUCT","CONVERT","ADDRESS","STDEV.S","RAND","DEC2BIN","COLUMN","STDEVA","RANDBETWEEN","DEC2HEX","COLUMNS","STDEVPA","ROUND","DEC2OCT","STEYX","ROUNDDOWN","DELTA","HYPERLINK","T.DIST","ROUNDUP","ERF","ROWS","T.DIST.2T","SIGN","ERF.PRECISE","ACOT","T.DIST.RT","ODD","ERFC","ACOTH","T.INV","SQRT","ERFC.PRECISE","ARABIC","T.INV.2T","SUMSQ","GESTEP","BASE","T.TEST","TRUNC","HEX2BIN","CEILING.MATH","TRIMMEAN","SIN","HEX2DEC","CEILING.PRECISE","VAR.P","COS","HEX2OCT","COMBINA","VAR.S","TAN","IMABS","COT","VARA","SINH","IMAGINARY","COTH","VARPA","COSH","IMARGUMENT","CSC","WEIBULL.DIST","TANH","IMCONJUGATE","CSCH","Z.TEST","ASIN","IMCOS","DECIMAL","ASC","ACOS","IMCOSH","FACTDOUBLE","BAHTTEXT","ATAN","IMCOT","FLOOR.MATH","CLEAN","ATAN2","IMCSC","FLOOR.PRECISE","CONCAT","ASINH","IMCSCH","GCD","DBCS","ACOSH","IMDIV","ISO.CEILING","DOLLAR","ATANH","IMEXP","LCM","FINDB","DEGREES","IMLN","MROUND","FIXED","RADIANS","IMLOG10","MULTINOMIAL","JIS","CODE","IMLOG2","QUOTIENT","LEFTB","CONCATENATE","IMPOWER","ROMAN","LENB","EXACT","IMPRODUCT","SEC","MIDB","FIND","IMREAL","SECH","REPLACEB","LEFT","IMSEC","SERIESSUM","REPT","LEN","IMSECH","SQRTPI","RIGHTB","LOWER","IMSIN","SUMIF","SEARCH","MID","IMSINH","SUMIFS","SEARCHB","PROPER","IMSQRT","SUMPRODUCT","T","REPLACE","IMSUB","SUMX2MY2","TEXT","RIGHT","IMSUM","SUMX2PY2","TEXTJOIN","SUBSTITUTE","IMTAN","SUMXMY2","UNICHAR","TRIM","OCT2BIN","AVEDEV","UNICODE","UPPER","OCT2DEC","AVERAGEA","ENCODEURL","DATEDIF","OCT2HEX","AVERAGEIF","DAY","ACCRINT","AVERAGEIFS","EURO","DAYS360","ACCRINTM","BETA.DIST","EUROCONVERT","HOUR","AMORDEGRC","BETA.INV","ISOMITTED","MINUTE","AMORLINC","BINOM.DIST","LAMBDA","MONTH","COUPDAYBS","BINOM.DIST.RANGE","OBJECT","NOW","COUPDAYS","BINOM.INV","PROPERTY","SECOND","COUPDAYSNC","CHISQ.DIST","TODAY","COUPNCD","CHISQ.DIST.RT","REDUCE","WEEKDAY","COUPNUM","CHISQ.INV","SCAN","YEAR","COUPPCD","CHISQ.INV.RT","CHITEST","AND","CUMIPMT","CHISQ.TEST","MEDIAN","IF","CUMPRINC","CONFIDENCE.NORM","RANGEBLOCKSPARKLINE","OR","DB","CONFIDENCE.T","RANK","SWITCH","DDB","COUNTA","HBARSPARKLINE","ROW","DISC","COUNTBLANK","VBARSPARKLINE","VALUE","DOLLARDE","COUNTIF","VARISPARKLINE","CORREL","DOLLARFR","COUNTIFS","PIESPARKLINE","BETADIST","DURATION","COVARIANCE.P","AREASPARKLINE","BETAINV","EFFECT","COVARIANCE.S","SCATTERSPARKLINE","BINOMDIST","FV","DEVSQ","LINESPARKLINE","CHIDIST","FVSCHEDULE","EXPON.DIST","COLUMNSPARKLINE","CONFIDENCE","INTRATE","F.DIST","WINLOSSSPARKLINE","COVAR","IPMT","F.DIST.RT","BULLETSPARKLINE","CRITBINOM","IRR","F.INV","SPREADSPARKLINE","EXPONDIST","ISPMT","F.INV.RT","STACKEDSPARKLINE","FDIST","MDURATION","F.TEST","BOXPLOTSPARKLINE","FTEST","MIRR","FINV","CASCADESPARKLINE","GAMMADIST","NOMINAL","FISHER","PARETOSPARKLINE","GAMMAINV","NPER","FISHERINV","MONTHSPARKLINE","HYPGEOMDIST","NPV","FORECAST","YEARSPARKLINE","MODE","ODDFPRICE","GAMMA","GAUGEKPISPARKLINE","NEGBINOMDIST","ODDFYIELD","GAMMA.DIST","HISTOGRAMSPARKLINE","NORM.INV","ODDLPRICE","GAMMA.INV","STDEV","NORMDIST","ODDLYIELD","GAMMALN","BC_QRCODE","NORMSDIST","PDURATION","GAMMALN.PRECISE","BC_EAN13","NORMSINV","PMT","GAUSS","BC_EAN8","PERCENTILE","PPMT","GEOMEAN","BC_CODABAR","PERCENTRANK","PRICE","GROWTH","BC_CODE39","POISSON","PRICEDISC","HARMEAN","BC_CODE93","QUARTILE","PRICEMAT","HYPGEOM.DIST","BC_CODE128","STDEVP","PV","INTERCEPT","BC_GS1_128","TDIST","RATE","KURT","BC_CODE49","TINV","RECEIVED","LARGE","BC_PDF417","TTEST","RRI","LOGNORM.DIST","BC_DATAMATRIX","VAR","SLN","LOGNORM.INV","LET","VARP","SYD","MAXA","IMAGE","WEIBULL","TBILLEQ","MAXIFS","TEXTBEFORE","ZTEST","TBILLPRICE","MINA","TEXTAFTER","CHIINV","TBILLYIELD","MINIFS","TEXTSPLIT","CHIDIST","VDB","MODE.MULT","LOGINV","XIRR","MODE.SNGL","LOGNORMDIST","XNPV","NEGBINOM.DIST","DATEPART","YIELD","NORM.DIST","SJS.UUID","DATEVALUE","YIELDDISC","NORM.S.DIST","SJS.ENDWITH","DAYS","YIELDMAT","NORM.S.INV","SJS.STARTWITH","EDATE","ERROR.TYPE","REGEXEXTRACT","REGEXTEST","REGEXREPLACE","R.R","R.A","R.V","R.INDEX","R.RANK","R.CURRENTPAGE","R.PAGESCOUNT","R.PROPORTION","R.CUMULATIVE","R.MOM","R.YOY"]},"./dist/plugins/report/commands/add-record.js":function(t,n,i){"use strict";var r,s,c,f,i,e,o,u,h;function l(t,n){return h.call(this,t,n)||this}function a(t){var n="reportSheetAddRecord";s.Commands[n]={canUndo:!1,execute:function(t,n,i){return e(t,o,n,i)}},t.register(n,s.Commands[n])}r=this&&this.__extends||(u=function(t,n){return(u=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}u(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerAddRecordCommand=void 0,s=i("Core"),c=i("./dist/plugins/report/events/index.js"),f=i("./dist/plugins/report/worksheet/report-worksheet.js"),i=s.Commands.ActionBase,e=s.Commands.zA,r(l,h=i),l.prototype.execute=function(){var n,i,t,r,e,o,u;this.Mf&&this.Mf instanceof f.ReportWorksheet&&this.tT&&(n=this.Mf,i=n.reportSheet,t=this.tT,r=t.activeRow,e=t.activeCol,o=(0,c.Nji)(function(){n.reportSheet.addRecordAt(r,e)}),u={type:"insert",sheet:i,sheetName:i.name(),row:r,col:e,cancel:!1,oldValue:i.getValue(r,e),newValue:void 0},setTimeout(function(){var t;n.ki(s.Events.ReportSheetDataChanging,u),u.cancel||(o.addRecordSingleUseAction(),t={type:"insert",sheet:i,sheetName:i.name(),row:i.reportWorksheet.getActiveRowIndex(),col:i.reportWorksheet.getActiveColumnIndex()},n.ki(s.Events.ReportSheetDataChanged,t))}))},o=l,n.registerAddRecordCommand=a},"./dist/plugins/report/commands/chart-preview-visible.js":function(t,n,i){"use strict";var r,s,c,i,e,o,u,f;function h(t,n){return f.call(this,t,n)||this}function l(t){var n="ReportChartPreviewVisible";c.Commands[n]={canUndo:!0,execute:function(t,n,i){return e(t,o,n,i)}},t.register(n,c.Commands[n])}r=this&&this.__extends||(u=function(t,n){return(u=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}u(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var n,i,r,e,i=1,r=arguments.length;i<r;i++)for(e in n=arguments[i])Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t}).apply(this,arguments)},Object.defineProperty(n,"__esModule",{value:!0}),n.registerChartPreviewVisibleCommand=void 0,c=i("Core"),i=c.Commands.ActionBase,e=c.Commands.zA,r(h,f=i),h.prototype.execute=function(){var t,n,i,r,e,o,n,u,t=this,n=t.tT,i=!1;if(t.canExecute()){r=t.Mf,e=n.row,o=n.col,n=n.visible,c.Commands.startTransaction(this.Mf.getParent(),this.tT),t.X5(r,!0);try{(u=s({},r.getTemplateCell(e,o))).chartPreviewVisible=n,r.setTemplateCell(e,o,u),i=!0}finally{t.q5(r,!0),c.Commands.endTransaction(this.Mf.getParent(),this.tT)}}return i},h.prototype.undo=function(){var t,n,i,r,e,t=this,n=t.Mf,i=!1;if(t.canUndo()){t.X5(n,!0);try{r=c.Commands.TI(n.name()),e=t.tT[r],n.Ut.undo(e),i=!0}finally{t.q5(n,!0)}}return i},o=h,n.registerChartPreviewVisibleCommand=l},"./dist/plugins/report/commands/collapse-all.js":function(t,n,i){"use strict";var r,e,i,o,u,s,c;function f(t,n){return c.call(this,t,n)||this}function h(t){var n="reportSheetCollapseAll";e.Commands[n]={canUndo:!1,execute:function(t,n,i){return o(t,u,n,i)}},t.register(n,e.Commands[n])}r=this&&this.__extends||(s=function(t,n){return(s=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerCollapseAllCommand=void 0,e=i("Core"),i=e.Commands.ActionBase,o=e.Commands.zA,r(f,c=i),f.prototype.execute=function(){var h,t;this.canExecute()&&((h=this.Mf).suspendPaint(),((t=this.tT.selections)||[]).forEach(function(t){for(var n,i,r,e,o,u,s,c,f,n=t.row,i=t.rowCount,r=t.col,e,o=n+i-1,u=r+t.colCount-1,s=n;s<=o;s++)for(c=r;c<=u;c++)(f=h.getSpan(s,c))&&(f.row!==s||f.col!==c)||h.Oji(s,c,"Collapsed",!0,!0)}),h.invalidateLayout(),h.gP(),h.resumePaint())},u=f,n.registerCollapseAllCommand=h},"./dist/plugins/report/commands/delete-record.js":function(t,n,i){"use strict";var r,s,c,f,i,e,o,u,h;function l(t,n){return h.call(this,t,n)||this}function a(t){var n="reportSheetDeleteRecord";s.Commands[n]={canUndo:!1,execute:function(t,n,i){return e(t,o,n,i)}},t.register(n,s.Commands[n])}r=this&&this.__extends||(u=function(t,n){return(u=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}u(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerDeleteRecordCommand=void 0,s=i("Core"),c=i("./dist/plugins/report/events/index.js"),f=i("./dist/plugins/report/worksheet/report-worksheet.js"),i=s.Commands.ActionBase,e=s.Commands.zA,r(l,h=i),l.prototype.execute=function(){var n,i,t,r,e,o,u;this.Mf&&this.Mf instanceof f.ReportWorksheet&&this.tT&&(n=this.Mf,i=n.reportSheet,t=this.tT,r=t.activeRow,e=t.activeCol,o=(0,c.bji)(function(){n.reportSheet.deleteRecordAt(r,e)}),u={type:"delete",sheet:i,sheetName:i.name(),row:r,col:e,cancel:!1,oldValue:i.getValue(r,e),newValue:void 0},setTimeout(function(){var t;n.ki(s.Events.ReportSheetDataChanging,u),u.cancel||(o.deleteRecordSingleUseAction(),t={type:"delete",sheet:i,sheetName:i.name(),row:r,col:e},n.ki(s.Events.ReportSheetDataChanged,t))}))},o=l,n.registerDeleteRecordCommand=a},"./dist/plugins/report/commands/expand-all.js":function(t,n,i){"use strict";var r,e,i,o,u,s,c;function f(t,n){return c.call(this,t,n)||this}function h(t){var n="reportSheetExpandAll";e.Commands[n]={canUndo:!1,execute:function(t,n,i){return o(t,u,n,i)}},t.register(n,e.Commands[n])}r=this&&this.__extends||(s=function(t,n){return(s=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerExpandAllCommand=void 0,e=i("Core"),i=e.Commands.ActionBase,o=e.Commands.zA,r(f,c=i),f.prototype.execute=function(){var h,t;this.canExecute()&&((h=this.Mf).suspendPaint(),((t=this.tT.selections)||[]).forEach(function(t){for(var n,i,r,e,o,u,s,c,f,n=t.row,i=t.rowCount,r=t.col,e,o=n+i-1,u=r+t.colCount-1,s=n;s<=o;s++)for(c=r;c<=u;c++)(f=h.getSpan(s,c))&&(f.row!==s||f.col!==c)||h.Oji(s,c,"Expanded",!0,!0)}),h.invalidateLayout(),h.gP(),h.resumePaint())},u=f,n.registerExpandAllCommand=h},"./dist/plugins/report/commands/index.js":function(t,n,i){"use strict";var r,e,o,u,s,c,f,h,l;function a(t){(0,r.registerAddRecordCommand)(t),(0,o.registerDeleteRecordCommand)(t),(0,f.registerResetRecordCommand)(t),(0,l.registerSubmitCommand)(t),(0,c.registerCollapseCommand)(t),(0,s.registerRegenerateReportCommand)(t),(0,e.registerCollapseAllCommand)(t),(0,u.registerExpandAllCommand)(t),(0,h.registerChartPreviewVisibleCommand)(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.registerCommands=void 0,r=i("./dist/plugins/report/commands/add-record.js"),e=i("./dist/plugins/report/commands/collapse-all.js"),o=i("./dist/plugins/report/commands/delete-record.js"),u=i("./dist/plugins/report/commands/expand-all.js"),s=i("./dist/plugins/report/commands/regenerate-report.js"),c=i("./dist/plugins/report/commands/report-collapse.js"),f=i("./dist/plugins/report/commands/reset-current-cell.js"),h=i("./dist/plugins/report/commands/chart-preview-visible.js"),l=i("./dist/plugins/report/commands/submit.js"),n.registerCommands=a},"./dist/plugins/report/commands/regenerate-report.js":function(t,n,i){"use strict";var r,e,o,i,u,s,c,f;function h(t,n){return f.call(this,t,n)||this}function l(t){var n="reportSheetRegenerateReport";e.Commands[n]={canUndo:!1,execute:function(t,n,i){return u(t,s,n,i)}},t.register(n,e.Commands[n])}r=this&&this.__extends||(c=function(t,n){return(c=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}c(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerRegenerateReportCommand=void 0,e=i("Core"),o=i("./dist/plugins/report/worksheet/report-worksheet.js"),i=e.Commands.ActionBase,u=e.Commands.zA,r(h,f=i),h.prototype.execute=function(){var t;this.Mf&&this.Mf instanceof o.ReportWorksheet&&this.tT&&this.Mf.reportSheet.regenerateReport()},s=h,n.registerRegenerateReportCommand=l},"./dist/plugins/report/commands/report-collapse.js":function(t,n,i){"use strict";var r,e,i,o,u,s,c;function f(t,n){return c.call(this,t,n)||this}function h(t){var n="ReportCollapseButtonToggle";e.Commands[n]={canUndo:!1,execute:function(t,n,i){return o(t,u,n,i)}},t.register(n,e.Commands[n])}r=this&&this.__extends||(s=function(t,n){return(s=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerCollapseCommand=void 0,e=i("Core"),i=e.Commands.ActionBase,o=e.Commands.zA,r(f,c=i),f.prototype.execute=function(){var t,n,i,t,r,n,t=this,n=t.tT,i=!1;return t.canExecute()&&(t=t.Mf,r=n.row,n=n.col,t.Oji(r,n)),i=!0},u=f,n.registerCollapseCommand=h},"./dist/plugins/report/commands/reset-current-cell.js":function(t,n,i){"use strict";var r,e,o,u,i,s,c,f,h;function l(t,n){return h.call(this,t,n)||this}function a(t){var n="reportSheetResetCellValue";e.Commands[n]={canUndo:!1,execute:function(t,n,i){return s(t,c,n,i)}},t.register(n,e.Commands[n])}r=this&&this.__extends||(f=function(t,n){return(f=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}f(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerResetRecordCommand=void 0,e=i("Core"),o=i("./dist/plugins/report/events/index.js"),u=i("./dist/plugins/report/worksheet/report-worksheet.js"),i=e.Commands.ActionBase,s=e.Commands.zA,r(l,h=i),l.prototype.execute=function(){var f,t,n,i,r;this.Mf&&this.Mf instanceof u.ReportWorksheet&&this.tT&&(f=this.Mf,t=this.tT.selections,n=(0,o.J5i)(t,function(){Array.isArray(t)&&(f.reportSheet.suspendPaint(),t.forEach(function(t){for(var n,i,r,e,o,u,s,c,n=t.row,i=t.col,r,e,o=n+t.rowCount-1,u=i+t.colCount-1,s=n;s<=o;s++)for(c=i;c<=u;c++)f.reportSheet.t4i.K5i(s,c,!0)}),f.reportSheet.resumePaint())}),i=n.name,r=n.event,setTimeout(function(){f.ki(i,r),r.canceled||r.resetCellValueSingleUseAction()}))},c=l,n.registerResetRecordCommand=a},"./dist/plugins/report/commands/submit.js":function(t,n,i){"use strict";var r,e,o,i,u,s,c,f;function h(t,n){return f.call(this,t,n)||this}function l(t){var n="reportSheetSubmit";e.Commands[n]={canUndo:!1,execute:function(t,n,i){return u(t,s,n,i)}},t.register(n,e.Commands[n])}r=this&&this.__extends||(c=function(t,n){return(c=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}c(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(n,"__esModule",{value:!0}),n.registerSubmitCommand=void 0,e=i("Core"),o=i("./dist/plugins/report/worksheet/report-worksheet.js"),i=e.Commands.ActionBase,u=e.Commands.zA,r(h,f=i),h.prototype.execute=function(){var t;this.Mf&&this.Mf instanceof o.ReportWorksheet&&this.tT&&this.Mf.reportSheet.Xcr(!0)},s=h,n.registerSubmitCommand=l},"./dist/plugins/report/convertors/helpers/shape-generator.js":function(t,n,r){"use strict";var o,s,l,a,e,i;function u(){this.Ivr={}}o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var n,i,r,e,i=1,r=arguments.length;i<r;i++)for(e in n=arguments[i])Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t}).apply(this,arguments)},Object.defineProperty(n,"__esModule",{value:!0}),n.ShapeGenerator=void 0,s=r("Core"),l=r("Sparkline"),a=r("./dist/plugins/report/worksheet/report-worksheet.js"),e=r("./dist/plugins/report/utils/utils.js"),u.prototype.generate=function(t,n,i){this.Ivr={},this.Cvr(t,n,i)},u.prototype.Cvr=function(t,n,i){for(var r,e,o,u,s,c,f,h,r=[],e=t instanceof a.ReportWorksheet?t.reportDataModel.lOi():null,o=e?e.rowCount-1:t.getRowCount()-1,u=e?e.colCount-1:t.getColumnCount()-1,s=0;s<=o;s++)for(c=0;c<=u;c++)(f=t.getValue(s,c))&&f instanceof l.SparklineExValue&&f.value&&(f.value.imageBase64Data||f.value.url||f.value.isBarcode)&&((h=t.getSpan(s,c))&&(h.row!==s||h.col!==c)||(r.push(this.Nvr({row:s,col:c,endRow:h?h.row+h.rowCount-1:s,endCol:h?h.col+h.colCount-1:c,sheet:n,value:f})),n.setValue(s,c,"")));i&&0<r.length&&i.push(Promise.all(r))},u.prototype.Nvr=function(p){var M=this;return new Promise(function(c){var t,f,h,l,n,a,v,d,n,i,n,t,f=p.value.value.imageBase64Data,h=0,l=0,n=p.value.value,a=n.url,v=n.isBarcode,d=document.createElement("img");d.crossOrigin="anonymous",d.onload=function(){var t,n,i,r,e,t,o,u,s,o,n;f||(f=M.jvr(d),M.Ivr[a]=f),f&&(n=(t=v?{width:d.width,height:d.height,rowOffset:l,colOffset:h,crop:null}:M._vr(p,d)).width,i=t.height,r=t.rowOffset,e=t.colOffset,t=t.crop,o=p.sheet,u=p.row,s=p.col,(o=o.shapes.addPictureShape(M.Avr(),f,0,0,n,i)).startRow(u),o.startColumn(s),o.x(o.x()+e),o.y(o.y()+r),t)&&((n=o.pictureFormat()||{}).crop=t,o.pictureFormat(n)),c(!0)},d.onerror=function(){c(!0)},d.onabort=function(){c(!0)},v&&(i=(n=M.Tvr(p)).width,n=n.height,t=null==(t=r("Barcode"))?void 0:t.generatePaintBarcodeViewModel(i,n,p.value.value))&&(f=t.dataUrl,h=t.plotRect.plotX,l=t.plotRect.plotY),d.src=f||M.Ivr[a]||a})},u.prototype.jvr=function(t){var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight,n.getContext("2d").drawImage(t,0,0);try{return n.toDataURL()}catch(t){return""}},u.prototype.Avr=function(){return"pic-".concat(Math.ceil(1e9*Math.random()).toString())},u.prototype._vr=function(t,n){var i,r,i,n,i=this.Tvr(t),r=this.Dvr(n,i,t.value),i=this.Svr(t,r,i),n=this.Bvr(r,n,t);return o(o(o({},r),i),{crop:n})},u.prototype.Svr=function(t,n,i){var t,r,e,t=this.Rvr(t),r=1,e=1;return t.v===s.VerticalAlign.center?r=(i.height-n.height)/2:t.v===s.VerticalAlign.bottom&&(r=i.height-n.height),t.h===s.HorizontalAlign.center?e=(i.width-n.width)/2:t.h===s.HorizontalAlign.right&&(e=i.width-n.width),{rowOffset:Math.max(r,1),colOffset:Math.max(e,1)}},u.prototype.Dvr=function(t,n,i){var i,n,r,e;return 1===i.value.drawType?o({},n):2===i.value.drawType?{width:t.width,height:t.height}:3===i.value.drawType?{width:Math.min(i.value.width,n.width-2),height:Math.min(i.value.height,n.height-2)}:(i=n.width-2,n=n.height-2,(r=t.width*(n/t.height))<=i?{width:r,height:n}:{width:i,height:e=t.height*(i/t.width)})},u.prototype.Bvr=function(t,n,i){var r,e,r,o,u,o,s,c,f,h,f,h,r=i.value.value,e=r.width,r=r.height;return 3===i.value.value.drawType&&(e>t.width||r>t.height)?this.kvr(i.value)?(u=(o=i.value.value).clipX,o=o.clipY,s=Math.min(i.value.value.clipWidth,n.width-u),c=Math.min(i.value.value.clipHeight,n.width-o),f=Math.max((e-t.width)*(s/e),0),h=Math.max((r-t.height)*(c/r),0),{left:(u+(f=this.zvr(i,f,h)).left)/n.width,top:(o+f.top)/n.height,right:(n.width-u-s+f.right)/n.width,bottom:(n.height-o-c+f.bottom)/n.height}):{left:(h=this.zvr(i,e-t.width,r-t.height)).left/e,top:h.top/r,right:h.right/e,bottom:h.bottom/r}:null},u.prototype.kvr=function(t){var t=t.value,n=t.clipX,i=t.clipY,r=t.clipWidth,t=t.clipHeight;return!((0,e.ht)(n)||(0,e.ht)(i)||(0,e.ht)(r)||(0,e.ht)(t))},u.prototype.zvr=function(t,n,i){var r,e,o,u,t,r=0,e=0,o=0,u=0,t=this.Rvr(t);return t.h===s.HorizontalAlign.center?o=r=n/2:t.h===s.HorizontalAlign.right?r=n:o=n,t.v===s.VerticalAlign.center?u=e=i/2:t.v===s.VerticalAlign.bottom?e=i:u=i,{left:r,top:e,right:o,bottom:u}},u.prototype.Rvr=function(t){var n,i,n,i,r,n,i,t,r,r=t.sheet,n=t.row,i=t.col,t=t.value,r=r.getActualStyle(n,i);return{v:null!=(n=t.value.vAlign)?n:null!=(i=null==r?void 0:r.vAlign)?i:s.VerticalAlign.top,h:null!=(n=t.value.hAlign)?n:null!=(i=null==r?void 0:r.hAlign)?i:s.HorizontalAlign.left}},u.prototype.Tvr=function(t){for(var n,i,r,e,o,u,s,c,f,n=t.row,i=t.col,r=t.endRow,e=t.endCol,o=t.sheet,u=0,s=0,c=n;c<=r;c++)s+=+o.getRowHeight(c);for(f=i;f<=e;f++)u+=+o.getColumnWidth(f);return{width:u,height:s}},n.ShapeGenerator=u},"./dist/plugins/report/convertors/report-json-convertor.js":function(t,n,i){"use strict";var a,v,c,r,d,e;function o(t){this.yji=!1,this.Iji=t,this.workSheetConvertor=new r.WorkSheetConvertor(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.ReportJSONConvertor=void 0,a=i("Core"),v=i("./dist/plugins/report/print/print-sheet.js"),c=i("./dist/plugins/report/utils/utils.js"),r=i("./dist/plugins/report/convertors/worksheet-convertor.js"),d=i("Print"),o.prototype.Np=function(t){var n,i,r,e,o,u,s,c,f,h,u,s,n,l,u,n=this,i=n.Iji,r=n.workSheetConvertor,e={},o=i.options.dirtyStyle,u=(t=t||{}).gp,s="PaginatedPreview"===i.renderMode(),c="Preview"===i.renderMode(),f=t.convertReportSheetToWorksheet;if(u){if(s){if(i.options.printAllPages)return this.yji?(this._ji?this.Dji():this._ji=n.Aji(t,i.name()),this._ji):n.Aji(t,i.name());u=i.templateSheet.printInfo(),s=new d.PrintInfo,n=i.Mf.Pie,s.fromJSON(u.toJSON()),s.fitPagesTall(1),s.fitPagesWide(1),s.sheet(i.Mf),i.Mf.Pie=s,h=i.Mf.toJSON(t),i.Mf.Pie=n}if(c)return(u=(l=r.Tji(t)).printInfo())&&(u.showRowHeader(1),u.showColumnHeader(1)),new v.PrintSheet(l).toJSON(t)}return h=t.cb===a.FileType.excel&&i.Pvr?i.Pvr.toJSON(t):f?(c?l=r.Tji(t):i.Mf).toJSON(t):h||i.templateSheet.toJSON(t),e.template=h,e.reportName=t.newWorkSheetName||i.name(),e.name=t.newWorkSheetName||i.name(),e.sheetType=i._gi,e.renderMode=i.options.renderMode,e.printAllPages=i.options.printAllPages,o&&(e.dirtyStyle=o.toJSON()),e.parameter=i.o1e,e.parameterUI=i.Sji,e},o.prototype.wh=function(t,n,i){var r,e,o,u,s,c,f,r,r=this,e=r.Iji,o=r.workSheetConvertor,s=e.options.dirtyStyle,c=n.styleManager;return i&&i.gp&&"PaginatedPreview"===e.renderMode()&&e.options.printAllPages?r.Aji(i,e.name()):(i&&(i.gp||i.fileType===a.OpenSaveFileType.excel)?((u=(e.Pvr||("Preview"===e.options.renderMode?f=o.Tji(i):e.Mf)).wh(t,n,i)).lossless||(u.lossless={}),u.lossless.reportLossless={}):(e.templateSheet!==e.Mf&&e.templateSheet.b2(e.b2(),!1),(u=e.templateSheet.wh(t,n,i)).lossless||(u.lossless={}),u.lossless.reportLossless={reportName:e.name()}),u.lossless.sheetType=e._gi,(r=u.lossless.r