@grapecity-software/spread-sheets-fill 18.1.4 → 18.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* SpreadJS Library 18.1
|
|
3
|
+
* SpreadJS Library 18.2.1
|
|
4
4
|
*
|
|
5
5
|
* Copyright(c) GrapeCity Software inc. All rights reserved.
|
|
6
6
|
*
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
* https://www.grapecity.com.cn/developer/spreadjs
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
!function(t){var n;"object"==typeof module&&"object"==typeof module.exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),module.exports=t(n)):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-common","@grapecity-software/spread-calc-engine","@grapecity-software/spread-sheets-core","@grapecity-software/spread-sheets-calc-engine"],t):"object"==typeof exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),exports.Spread=t(n)):t(GC)}(function(n){!function(){"use strict";var i,r,t;function e(t){var n,n,n=r[t];return void 0!==n||(n=r[t]={exports:{}},i[t].call(n.exports,n,n.exports,e)),n.exports}i={"./dist/plugins/fill/drag-fill.js":function(F,t,n){var i,c,x,h,t,r,e,I,s,O,A,S,v,n,k,E,r,l,b,u,V,H,N,P,d,o,a,f,g,t,p,w,m,j,R,T,M,y,L,W,B;function $(t,n,i,r,e,o,u,s,a,l,f){var c=n?x.Events.DragDropBlock:x.Events.DragDropBlockCompleted,i={sheet:t,sheetName:t.name(),fromRow:i,fromCol:r,toRow:e,toCol:o,rowCount:u,colCount:s,copy:a,insert:l,copyOption:f};return n&&(i.cancel=!1),t.ki(c,i),i}function z(t,n,i,r){return t&&n&&n.containsRange(t)&&(!O(i)&&(1===i&&t.row===n.row&&(0,I.getRowCount)(t)===(0,I.getRowCount)(n)||0===i&&t.col===n.col&&(0,I.getColCount)(t)===(0,I.getColCount)(n))||!(O(r)||(2!==r&&3!==r||t.col!==n.col||(0,I.getColCount)(t)!==(0,I.getColCount)(n))&&(0!==r&&1!==r||t.row!==n.row||(0,I.getRowCount)(t)!==(0,I.getRowCount)(n))))}function _(t,n){var i,r,e,o,u,s,a,l,f,c,a,i=L.call(this)||this,r=i,e=n[P],o=0===e,u=o||1===e,s=n[H],a=n[V],l=a.row,f=a.col,c=(0,I.getRowCount)(a),a=(0,I.getColCount)(a);return r.Mf=t,4===(r.Ftt=n)[N]?r.Ptt=new x.Commands.JI(t,{ranges:[n[H]]}):r.Gtt=u?v(l,o?s.col:f,c,a+(0,I.getColCount)(s)):v(2===e?s.row:l,f,c+(0,I.getRowCount)(s),a),r.Utt=u?1:0,i}function C(t,n){var i,r,i=W.call(this)||this,r=i;return r.Mf=t,r.Htt=n,r.ztt=n[V],r.Vtt=n[H],r.Ytt=n[N],r.Ztt=n[P],i}function q(t,n,i,r,e,o){var u,r,e,n,u=t.getSelections();t.IA(),t.n4(n,i,r,e,!0),r=t.getSelections(),e=0<n?n:t.N9(),n=0<i?i:t.k9(),t.O6(e,n,t.R9,t.B9),t.jA(u),t.parent&&o._oldPosition&&t.parent.changeSelectionInCommandExecuting(o,null,null,r)}function U(t){var n;t.parent.repaint()}function D(t,n){var i,n,i=this;return(i=B.call(this,t,n)||this).MU=null!=(n=n.option)?n:t.lF,i}i=this&&this.__extends||(y=function(t,n){return(y=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}y(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),c=n("Common"),x=n("Core"),h=n("./dist/plugins/fill/fill.js"),t=n("./dist/plugins/fill/fill.ns.js"),r=n("CalcEngine"),e=n("Touch"),I=n("./dist/plugins/fill/utils.js"),s=!!r,O=c.Common.lt.ht,A=null,S=void 0,v=x.Ec,n=x.GC$,k=Math.max,E=Math.floor,r=x.Commands.ActionBase,l=x.Commands.CI,b=x.Commands.SI,u=x.CopyToOptions.all,V="startRange",H="fillRange",N="autoFillType",P="fillDirection",d="cancel",o="fill",a="dragDrop",f=n.isEmptyObject,g="onLayoutChanged",t=new c.Common.ResourceManager(t.SR,"Fill"),p=t.getResource.bind(t),w="gc-drag-header-mask",m="gc-drag-header-indicator",n.extend(x.Worksheet.prototype,j={fillAuto:function(t,n,i){if(!n)throw new Error(p().Exp_RangeIsNull);var r=this,e=i.fillType,o=i.series,u=i.direction,s=i.step,a=i.stop,l=new h.Wtt(r),f=i.Qtt;if(z(t,n,u?A:o,u)){r.suspendPaint(),t&&(r.rt.Ktt=t);try{4===e?l.Jtt(n,o,!1,i.withTag,i.withoutStyle,f):0===e?l.Xtt(n,u):1===e||2===e?l.qtt(1===e,n,o,s,a):3===e&&l.$tt(n,o,3,s,O(a)?A:c.Common.ct.o0(a),i.unit)}finally{r.resumePaint()}}},tBe:function(){var t,t;return(null==(t=null==(t=null==this?void 0:this.parent)?void 0:t.options)?void 0:t.dragHeaderMaskBackColor)||x.I.fl(w).backgroundColor},nBe:function(){var t,t;return(null==(t=null==(t=null==this?void 0:this.parent)?void 0:t.options)?void 0:t.dragHeaderIndicatorColor)||x.I.fl(m).borderTopColor}}),x.Worksheet.ch(o,{init:function(){this.tnt=new h.nnt(this)},setHost:function(t){var t;t&&((t=this.Qy())[o]||t.register(o,x.Commands[o]),t[a]||t.register(a,x.Commands[a]),this.D3(x.Events.TopRowChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.RRe()}),this.D3(x.Events.LeftColumnChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.RRe()}),this.D3(x.Events.ViewZoomed+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(x.Events.EditStarted+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(x.Events.FloatingObjectSelectionChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(x.Events.ShapeSelectionChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}))},dispose:function(t){var t;!1!==t.clearCache&&(t=this).tnt&&(t.tnt.L0(),t.tnt=A),this._3(x.Events.TopRowChanged+"."+o),this._3(x.Events.LeftColumnChanged+"."+o),this._3(x.Events.ViewZoomed+"."+o),this._3(x.Events.EditStarted+"."+o),this._3(x.Events.FloatingObjectSelectionChanged+"."+o),this._3(x.Events.ShapeSelectionChanged+"."+o)},preProcessKeyDown:function(t){var n=this.R_;n&&n.close()},preProcessMouseDown:function(t){var n=this.R_;n&&n.close()},preProcessContextMenu:function(t){var n=this.R_;n&&n.close()}}),x.Workbook.ch(o,{onCultureChanged:function(){p()}}),x.Hv.ch(o,{preProcessMouseDown:function(t){var n,n,n=(0,x.jf)(this.Vv),n=n&&n.R_;n&&n.close()}}),x.Of.touch&&e.TouchEventHandler.ch(o,{preProcessManipulationStarted:function(t){var n=this.Mf.R_;n&&n.close()},preProcessTapped:function(t){var n=this.Mf.R_;n&&n.close()},preProcessDoubleTapped:function(t){var n=this.Mf.R_;n&&n.close()}}),window.gcGlobal.wf.push(function(t,n){var n;n&&!x.util.jBe(n,t)||null!=(n=t.R_)&&n.close()}),i(_,L=r),_.prototype.canExecute=function(){var t=this,n=t.Mf,t=t.Ftt,i=t[V],r=t[H];return!(!n.PT(r.row,r.col,(0,I.getRowCount)(r),(0,I.getColCount)(r),{isIgnoreFilterOutRow:!0,sheetArea:x.SheetArea.viewport})||4!==t[N]&&r.intersect(i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i)))},_.prototype.execute=function(){var t,n,i,r,e,o,o,t=this;if(t.canExecute()){i=(n=t.Ftt)[H],e=(r=t.Mf).parent.i4(),x.Commands.II(e),t.X5(r,!0);try{s&&r.suspendCalcService(),o=r.getSelections(),r.isDirtySuspended()||(t.ent=new l(r,n[H],u)),4===n[N]?t.int(r):t.rnt(r),r.EA(o,r.getSelections())&&r.jA(o)}finally{t.q5(r,!0),s&&r.resumeCalcService(!1),x.Commands.xI(e,n),r.Q1i&&r.Q1i(i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i)),o=[],r.isDirtySuspended()||(t.ont=new l(r,i,u),t.ont.yI(t.ent.bI()),o=t.ont.MI()),b(r,i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i),o,1)}}},_.prototype.int=function(t){var n,i,r,i,n,e,o,e,o,n,n=this;n.Ptt.execute(t),r=(i=n.Ftt)[V],i=i[H],n=0===n.Utt,o=(0,I.getRowCount)(r),e=(0,I.getColCount)(r),o=n?k(1,o-(0,I.getRowCount)(i)):o,n=n?e:k(1,e-(0,I.getColCount)(i)),r.equals(i)||(e=v(r.row,r.col,o,n),t.O6(k(t.N9(),e.row),k(t.k9(),e.col),t.R9,t.B9),t.IA(),t.n4(e.row,e.col,(0,I.getRowCount)(e),(0,I.getColCount)(e)))},_.prototype.rnt=function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,r,T,M,n=this,i=n.Mf,r=n.Ftt,e=r[V],o=r[H],u=r[N],s=n.Gtt,f={fillType:4,series:n.Utt,withTag:!0,withoutStyle:!(i.lF&x.CopyToOptions.style)},c=i.tables,h=!1,v=new x.Range(s.row,s.col,s.rowCount,s.colCount);if(c)try{p=0===(d=r[P]),w=3===d,(g=2===d)&&(m=e.rowCount,y=0===c.AB(e.row,e.col,m,e.colCount).length)&&(h=!0,v.rowCount-=m),p&&(_=e.colCount,y=0===c.AB(e.row,e.col,e.rowCount,_).length)&&(h=!0,v.colCount-=_),w&&(_=e.colCount,1===(C=c.AB(e.row,e.col,e.rowCount,_)).length)&&(F=(D=C[0]).dataRange(),D.showFooter())&&o.row+o.rowCount-1>=D.footerIndex()&&(o.rowCount=F.rowCount-(o.row-F.row),s.rowCount=F.rowCount-(s.row-F.row)),b=[],j=[],c.yx(A,v,S,S,S,b,{applyDragFillAfterTableExpand:h,backupTableResizedArgs:j,needCheckProtectionWhenSheetProtected:!0}),0<b.length&&(f.Qtt=b),n.eke=j}catch(t){return i.jT(6,t.message),void i.resumePaint()}if(1===u){if(i.fillAuto(e,s,f),i.lF&x.CopyToOptions.style&&i.Ut.eE(e.row,e.col,e.rowCount,e.colCount))for(a=0;a<o.rowCount;a++)for(l=0;l<o.colCount;l++)(R=i.vI(e.row+E(a%e.rowCount),e.col+E(l%e.colCount)))&&R.clone&&(R=R.clone()),i.CL(o.row+a,o.col+l,R)}else 0===u?(r=i.lF&~x.CopyToOptions.comment,n.ant(e,o,r)):2===u?n.ant(e,o,4320):3===u&&((T=!(1!==(0,I.getRowCount)(e)||1!==(0,I.getColCount)(e)||-1===e.row&&-1!==e.col||-1===e.col&&-1!==e.row))?n.ant(e,o,M=4251):(f.withoutStyle=!0,i.fillAuto(e,s,f)));i.O6(k(t.N9(),s.row),k(t.k9(),s.col),t.R9,t.B9),t.IA&&t.IA(),i.n4(s.row,s.col,(0,I.getRowCount)(s),(0,I.getColCount)(s))},_.prototype.ant=function(t,n,i){var r,e,t,n,o,u,s,a,l,f,c,h,t,v,d,g,n,p,t,w,r,r,m,y,_,r=this,e=r.Mf,t=e.JS(t),n=e.JS(n),o=t.row,u=t.col,s=(0,I.getRowCount)(t),a=(0,I.getColCount)(t),l=n.row,f=n.col,c=(0,I.getRowCount)(n),h=(0,I.getColCount)(n),t=r.Ftt[P],v=3===t,d=1===t,g=E(c/s),n=c%s,p=E(h/a),t=h%a;if(e.HB=!0,_=function(t,n){return e.isActualProtected()&&e.getCell(t,n).hidden()},0===r.Utt){for(w=0;w<g;w++)m=v?l+w*s:l+c-(w+1)*s,_(o,u)&&(i&=~x.CopyToOptions.formula),e.vT(o,u,m,f,s,a,i,!0,!0);0!=n&&(m=v?l+s*g:l+c-g*s-n,_(r=v?o:o+(g+1)*s-c,u)&&(i&=~x.CopyToOptions.formula),e.vT(r,u,m,f,n,a,i,!0,!0))}else{for(w=0;w<p;w++)y=d?f+w*a:f+h-(w+1)*a,_(o,u)&&(i&=~x.CopyToOptions.formula),e.Y1r=y-u,e.vT(o,u,l,y,s,a,i,!0,!0),delete e.Y1r;0!=t&&(y=d?f+a*p:f+h-p*a-t,_(o,r=d?u:u+(p+1)*a-h)&&(i&=~x.CopyToOptions.formula),e.vT(o,r,l,y,s,t,i,!0,!0))}delete e.HB,e.recalcRange(l,f,c,h)},_.prototype.undo=function(){var t,n,i,r,e,o,u,t=this,n=t.Mf,i=!1;if(t.canUndo()){t.X5(n,!0);try{s&&n.suspendCalcService(),r=n.getSelections(),e=t.Ftt,o=n.R_,u=e[H],i=4===e[N]?t.unt(n):t.snt(n),!n.cnt&&o&&o.close(),b(n,u.row,u.col,(0,I.getRowCount)(u),(0,I.getColCount)(u),t.ont?t.ont.MI():[],1,S,!0),n.EA(r,n.getSelections())&&n.jA(r)}finally{t.q5(n,!0),s&&n.resumeCalcService(!1)}}return i},_.prototype.unt=function(t){var n,i,r,i,e,n=this,i=n.Ftt[V],r=i.row,i=i.col,e=x.Commands.TI(t.name());return t.Ut.undo(n.Ftt[e]),t.O6(k(t.N9(),r),k(t.k9(),i),t.R9,t.B9),!0},_.prototype.snt=function(t){var n,i,r,e,r,o,n,i=this.Ftt,r=i[V],e=r.row,r=r.col;s&&t.suspendCalcService();try{o=x.Commands.TI(t.name()),t.Ut.undo(i[o]),t.O6(k(t.N9(),e),k(t.k9(),r),t.R9,t.B9)}finally{s&&t.resumeCalcService(!1)}return t.invalidateLayout(),!0},R=_,i(C,W=r),C.prototype.execute=function(){var t,n,i,r,e,o,u,s,a,l,f,t=this,n=!1;if(t.canExecute()){r=(i=t.Mf).parent,e=t.Vtt,o=t.Htt,u=i.parent.i4(),x.Commands.II(u),t.XI(),t.X5(i,!0),i.QI=!0;try{s=i.getSelections(),a=void 0,l=i.rt,(f={sheet:i,sheetName:i.name(),cancel:!1})[H]=e,f[N]=t.Ytt,f[P]=t.Ztt,i.ki(x.Events.DragFillBlock,f),l.fnt=f[N],l.lnt=f[d],f[d]||(t.hnt(f),i.ki(x.Events.DragFillBlockCompleted,f)),n=!0,a=i.getSelections(),i.EA(s,a)&&i.jA(s),r&&o._oldPosition&&r.changeSelectionInCommandExecuting(o,null,null,a)}finally{t.dnt(i,e),t.q5(i,!0),i.QI=!1,x.Commands.xI(u,t.Htt)}}return n},C.prototype.hnt=function(t){var n,i,r,e,o,r,e,n=this,i=n.Mf,r=i.rt,e=n.Vtt,o=n.Ytt;r.fnt=o,r.lnt||((r={})[V]=n.ztt,r[H]=e,r[N]=5===t[N]?o:t[N],r[P]=n.Ztt,e=new R(i,r),i.suspendEvent(),e.execute(),i.resumeEvent(),n.Htt.vnt=e)},C.prototype.XI=function(){var t=this;t.Mf.isDirtySuspended()||(t.ent=new l(t.Mf,t.Vtt,u))},C.prototype.undo=function(){var t,n,i,r,e,o,u,s,a,n=this;if(n.canUndo()){i=n.Mf,r=n.Vtt,e=i.parent,o=n.Htt,n.XI(),n.X5(i,!0);try{u=i.getSelections(),i.suspendEvent(),i.Nj=!0,s=i.parent.i4(),x.Commands.NI(s,o),i.Nj=!1,i.resumeEvent(),a=o[V],i.EA(u,[a])&&i.jA(u),e&&o._oldPosition&&e.changeSelectionInCommandExecuting(o,null,null,[a]),(0,x.handleRestoredTableResizedArgs)(null==(t=o.vnt)?void 0:t.eke)}finally{n.dnt(i,r,!0),n.q5(i,!0)}}return!0},C.prototype.dnt=function(t,n,i){var r,e,o,r=this,e=[];t.isDirtySuspended()||((o=new l(t,n,u)).yI(r.ent.bI()),e=o.MI());try{b(t,n.row,n.col,(0,I.getRowCount)(n),(0,I.getColCount)(n),e,1,S,i)}catch(t){}},T=C,i(D,B=r),D.prototype.Spn=function(){return this.MU},D.prototype.PBe=function(t){this.MU=t},D.prototype.canExecute=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,l,v,d,g,p,l,t=this,n=t.Mf,i=t.tT,r=i.fromRow,e=i.fromColumn,o=(0,I.getRowCount)(i),u=i.columnCount,s=i.toRow,a=i.toColumn,l=!i.copy,f,c;if(n.tables&&n.tables.mx(n,{row:r,col:e,rowCount:o,colCount:u},n,{row:s,col:a,rowCount:o,colCount:u},l))return!1;if(!n.zT(r,e,o,u,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(!i.insert&&!n.zT(s,a,o,u,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(i.cmd===x.RangeChangedAction[0]&&n.tables&&(h=!1,0<(l=n.tables.AB(r,e,o,u)).length)){for(d=(v=l[0].range()).row;d<v.row+v.rowCount;d++)if(n.isRowFilterOut(d)){h=!0;break}return!(h&&v.contains(i.mouseTargetRow,i.mouseTargetCol,1,1))}return l=t.mnt(g=0<=s&&a<0&&0<=r&&e<0&&0<o&&u<0,p=s<0&&0<=a&&r<0&&0<=e&&o<0&&0<u),n.PT(s,a,o,u,{isAllowDragInsert:l,sheetArea:x.SheetArea.viewport})&&n.PT(r,e,o,u,{isAllowDragInsert:l,sheetArea:x.SheetArea.viewport})},D.prototype.mnt=function(t,n){var i,r,i,r,e,i,e,i,i=this,r=i.tT,i=i.Mf,r=r.insert,e=i.isActualProtected(),i=i.options.protectionOptions;return!(!e||f(i)||(e=i.allowDragInsertRows,i=i.allowDragInsertColumns,!r)||!(e&&t||i&&n))},D.prototype.execute=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,k,t=this,n=!1;if(t.canExecute()){if(i=t.Mf,r=t.tT,e=i.parent.i4(),o=r.fromRow,u=r.fromColumn,s=r.toRow,a=r.toColumn,l=r.columnCount,f=r.insert,c=r.copy,h=r.rowCount,x.Commands.II(e),(v=$(i,!0,o,u,s,a,h,l,c,f,i.lF)).cancel)return void x.Commands.xI(e,r);t.XI(),p=g=d=void 0,w=h,m=l,(y=i.o5())&&(w+=i.lT(s,h,!0),m+=i.lT(a,l)),t.X5(i,!0),i.QI=!0,_=void 0;try{this.PBe(v.copyOption);try{C=[],_={shiftCells:r.insert&&r.shiftCells===x.InsertShiftCell.down,isCopy:r.copy,isFirst:!0},i.tables&&i.tables.yx(i,new x.Range(s,a,w,m),new x.Range(o,u,h,l),A,A,A,{shiftInfo:_,backupTableResizedArgs:C}),r.Kh.eke=C}catch(t){return i.jT(6,t.message),void i.resumePaint()}r.insert?0<=u&&o<0?(d=u,p=l,D=g=a,this.Jcr(i,d,g,p)&&(i.WBe(g,p,S,{ignoreExpand:!0}),r.copy?i.copyTo(-1,g<=d?d+p:d,-1,g,-1,p,this.Spn()):(i.moveTo(-1,g<=d?d+p:d,-1,g,-1,p,this.Spn(),void 0,i.getRowCount()<1),i.deleteColumns(g<=d?d+p:d,p),d<g&&(D=g-p)),q(i,-1,D,(0,I.getSheetRowCount)(i),p,r))):0<=o&&u<0?(d=o,p=h,F=g=s,this.Kcr(i,d,g,p)&&(i.ffe(g,p,S,{ignoreExpand:!0}),r.copy?i.copyTo(g<=d?d+p:d,-1,g,-1,p,-1,this.Spn()):(i.moveTo(g<=d?d+p:d,-1,g,-1,p,-1,this.Spn(),void 0,i.getColumnCount()<1),i.deleteRows(g<=d?d+p:d,p),d<g&&(F=g-p)),q(i,F,-1,p,(0,I.getSheetColumnCount)(i),r))):0<=o&&0<=u&&(b=r.shiftCells,j=new x.Range(s,a,1,1),R=[new x.Range(o,u,h,l)],O(b)||(T={cmd:"clipboardPaste",sheetName:i.name(),clipboardHtml:"",clipboardImage:"",clipboardText:"",fromRanges:R,fromSheet:i,isCutting:!r.copy,pasteOption:0,pastedRanges:[new x.Range(s,a,h,l)],_acCell:j,_dataRange:R,_shiftCells:b,_fromDragFill:!0,_ignoreTableFooterShiftIndex:_&&_.ignoreFooterShiftIndex},i.Qy().execute(T),M=i.getSelections()[0],b===x.InsertShiftCell.down&&o<s&&!r.copy&&u===a?i.setSelection(M.row-h,M.col,M.rowCount,M.colCount):b===x.InsertShiftCell.right&&u<a&&!r.copy&&o===s&&i.setSelection(M.row,M.col-l,M.rowCount,M.colCount))):(r.copy?i.copyTo(o,u,s,a,h,l,this.Spn()):i.moveTo(o,u,s,a,h,l,this.Spn()),i&&(q(i,s,a,w,m,r),k=r.Kh,r.copy||i.isDirtySuspended()||(k.wx=t.gnt(i,k.qI,o,u,h,l)),i.isDirtySuspended()||(k.Mx=t.gnt(i,k.$I,s,a,h,l)))),n=!0}finally{i.rt.q6={},t.q5(i,!0),i.QI=!1,$(i,!1,o,u,s,a,h,l,c,f,this.Spn()),x.Commands.xI(e,r)}U(i)}return n},D.prototype.gnt=function(t,n,i,r,e,o){var u,s,u=new l(t,v(i,r,e,o),this.Spn()),s=t.tables&&t.tables.WI&&t.tables.WI(i,r,e,o);return s&&0<s.length&&(this.tT.tableNamesObj={r:i,c:r,rc:e,cc:o,tableNames:s}),u.yI(n.bI()),b(t,i,r,e,o,u.MI(),0,s),u},D.prototype.XI=function(){var t,n,t,i,r,e,o,u,s,a,o,u,r,e,t=this,n=t.Mf,t=t.tT,i=t.Kh;i=i||(t.Kh={}),s=(r=t.fromRow)<0?0:r,a=(e=t.fromColumn)<0?0:e,o=(o=t.toRow)<0?0:o,u=(u=t.toColumn)<0?0:u,r=r<0?(0,I.getSheetRowCount)(n):(0,I.getRowCount)(t),e=e<0?(0,I.getSheetColumnCount)(n):t.columnCount,t.insert||n.isDirtySuspended()||(t.copy||(i.qI=new l(n,v(s,a,r,e),this.Spn())),i.$I=new l(n,v(o,u,r,e),this.Spn())),i.pnt=n.R9,i.bnt=n.B9,i.ynt=n.ui,i.wnt=n.ci},D.prototype.undo=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,t=this;if(t.canUndo()){if(n=t.Mf,r=(i=t.tT).fromRow,e=i.fromColumn,o=i.toRow,u=i.toColumn,s=(0,I.getRowCount)(i),a=i.columnCount,!n.zT(r,e,s,a,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(!i.insert&&!n.zT(o,u,s,a,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;f=i.Kh,t.X5(n,!(l=void 0)),c=n.parent.i4(),x.Commands.NI(c,i);try{i.insert?0<=e&&0<=r||(0<=e?(l=a,n&&q(n,-1,e,(0,I.getSheetRowCount)(n),l,i)):0<=r&&(l=s,n)&&q(n,r,-1,l,(0,I.getSheetColumnCount)(n),i)):(d=r<0?0:r,g=e<0?0:e,p=o<0?0:o,w=u<0?0:u,m=r<0?(0,I.getSheetRowCount)(n):s,y=e<0?(0,I.getSheetColumnCount)(n):a,n&&(q(n,r,e,s,a,i),_=i.tableNamesObj,C=[],D=[],_&&(_.r===p&&_.c===w&&_.rc===m&&_.cc===y?D=_.tableNames:C=_.tableNames),b(n,p,w,m,y,f.Mx?f.Mx.MI():[],0,C,!0),b(n,d,g,m,y,f.wx?f.wx.MI():[],0,D,!0))),n&&(-1!==f.ynt&&-1!==f.wnt&&((F=n.getSelections()[0]).contains(f.ynt,f.wnt)?n.XA(f.ynt,f.wnt):n.XA(F.row,F.col)),-2!==f.pnt&&-2!==f.bnt&&-1!==f.ynt&&-1!==f.wnt&&n.showCell(f.ynt,f.wnt,3,3),(0,x.handleRestoredTableResizedArgs)(f.eke))}finally{t.q5(n,!0)}U(n)}return!0},D.prototype.Jcr=function(t,n,i,r){var i={changeType:"addingColumns",col:i,colCount:r,canAdd:!0,onlyCheck:!0,sheetArea:x.SheetArea.viewport};return x.Worksheet.et(t,g,i),!!i.canAdd&&(i={changeType:"deletingColumns",col:n,colCount:r,canDelete:!0,onlyCheck:!0,sheetArea:x.SheetArea.viewport},x.Worksheet.et(t,g,i),i.canDelete)},D.prototype.Kcr=function(t,n,i,r){var i={changeType:"addingRows",row:i,rowCount:r,canAdd:!0,onlyCheck:!0,sheetArea:x.SheetArea.viewport};return x.Worksheet.et(t,g,i),!!i.canAdd&&(i={changeType:"deletingRows",row:n,rowCount:r,canDelete:!0,onlyCheck:!0,sheetArea:x.SheetArea.viewport},x.Worksheet.et(t,g,i),i.canDelete)},M=D,x.Commands[o]={canUndo:!0,execute:function(t,n,i){return x.Commands.zA(t,T,n,i)}},x.Commands[a]={canUndo:!0,execute:function(t,n,i){return x.Commands.zA(t,M,n,i)}}},"./dist/plugins/fill/drag-header-to-move/event.js":function(t,n,i){var n,w,f,a,i,m,r,e;function y(t,n){var i,r,i=t.getColumnCount();if(0!==n.col||n.colCount!==i){for(r=0;r<n.col;r++)if(t.getColumnVisible(r))return;for(r=n.col+n.colCount;r<i;r++)if(t.getColumnVisible(r))return}return 1}function _(t){var t;return t&&(null==(t=t.NMi)?void 0:t._gi)!==w.SheetType.ganttSheet}Object.defineProperty(n,"__esModule",{value:!0}),n=i("Common"),w=i("Core"),f=i("./dist/plugins/fill/utils.js"),a=n.Common.zf,i=w.GC$,m=null,r=5,i.extend(w.nk.prototype,e={QRe:function(t,n,i){var r,r,r,e,o,u,s,r,u,r,a,l,f,c,h,v,d,g,p,r=this;if(!r.a_&&(1===t.hitTestType||2===t.hitTestType)&&_(e=r.Mf)&&(o=null==(r=null==(r=e.parent)?void 0:r.options)?void 0:r.allowDragHeaderToMove)&&(0,w.needPaintSelection)(e)&&(u=e.getSelections())&&1===u.length)if(s=u[0],u=(r=e.options).colHeaderVisible,r=r.rowHeaderVisible,(o&w.AllowDragHeaderToMove.column)===w.AllowDragHeaderToMove.column&&1===t.hitTestType&&s.row<0&&0<=s.col&&u&&t.row>=e.getFreeAreaRowCount(1)){if(y(e,s))return m;if(a=s.col+s.colCount,t.col<s.col||t.col>=a)return m;for(l=e.Yy(t.colViewportIndex,1),f=s.col;f<a;f++)if((c=null==l?void 0:l.findCol(f))&&(h=c.width,c.x<=n)&&n<=c.x+h)return{action:"dragHeader",dragColumn:!0,selectRange:s}}else if((o&w.AllowDragHeaderToMove.row)===w.AllowDragHeaderToMove.row&&2===t.hitTestType&&0<=s.row&&s.col<0&&r&&t.col>=e.getFreeAreaRowCount(2)){if(s.rowCount===e.getRowCount())return m;for(v=e._y(t.rowViewportIndex,2),d=s.row+s.rowCount,g=s.row;g<d;g++)if((p=null==v?void 0:v.findRow(g))&&p.y<=i&&i<=p.y+p.height)return{action:"dragHeader",dragColumn:!1,selectRange:s}}return m},VRe:function(t){var n,i,r,r,e,e,o,e,o,i,r,n=this;n.eBe||t&&t.dragHeaderToMoveInfo&&1===(r=(i=n.Mf).Ut.getSelections()).length&&(n.rb=!0,n.eBe=!0,n.cw(t),r=r[0],e=i.Fi(),e=i.options.rightToLeft?new w.Rect(e.Hy,e.T6,e.b6+e.F6,e.Ay+e.Iy):new w.Rect(e.b6,e.T6,e.Hy+e.zy,e.Ay+e.Iy),o=i.getRangeRect((0,f.getRowViewportIndex)(t),(0,f.getColViewportIndex)(t),r),t.dragHeaderToMoveInfo.dragColumn?o.height=(0,f.getHeight)(e):(i.options.rightToLeft&&(o.x=e.x),o.width=(0,f.getWidth)(e)),t.dragHeaderToMoveInfo.selectionRect=o,(e=n.q6).x=o.x,e.y=o.y,e.width=o.width-1,e.height=o.height-1,e.row=r.row,e.col=r.col,e.rowCount=(0,f.getRowCount)(r),e.colCount=(0,f.getColCount)(r),o=i.JS(r),i=t.row,r=t.col,(i=i<o.row?o.row:i)>=o.row+(0,f.getRowCount)(o)&&(i=o.row+(0,f.getRowCount)(o)-1),(r=r<o.col?o.col:r)>=o.col+(0,f.getColCount)(o)&&(r=o.col+(0,f.getColCount)(o)-1),e.hitRow=i,e.hitCol=r,e.rowOffset=i-o.row,e.colOffset=r-o.col,n.Rk={e9:(0,f.getRowViewportIndex)(t),r9:(0,f.getColViewportIndex)(t),Bk:(0,f.getHitTestType)(t)},n.Ok())},YRe:function(){var t,n,i,i,r,e,o,u,o,e,s,e,u,s,t=this,n=t.Mf;t.eBe&&t.rb&&(i=t.WRe(),t.q6.hitTarget=t.fk,t.q6.x=i.x,t.q6.y=i.y,t.q6.width=i.width,t.q6.height=i.height,i=t.fk.x,r=t.fk.y,u=(o=(e=(0,f.getSheetVPortBoundary)(n)).minPoint).x,o=o.y,s=(e=e.maxPoint).x,e=e.y,t.fk.x<=u?t.fk.x=u+1:t.fk.x>=s&&(t.fk.x=s-1),t.fk.y<=o?t.fk.y=o+1:t.fk.y>=e&&(t.fk.y=e-1),u=(0,f.getHitColumnIndex)(n,t.fk.x),s=(0,f.getHitRowIndex)(n,t.fk.y),t.KRe(s,u),t.fk.x=i,t.fk.y=r,t.a9())},ZRe:function(){var t,n,i,t=this,n=t.Mf;t.eBe=!1,t.i_=!0,t.zk=!0,t.t_=!1,i=n.sw,(0,f.fixHitTestInfo)(i),t.kD&&t.kD(),t.rb=!1,t.ab=!1,t.Rk=m,n.Uet=m,n.JRe=m,n.Pet=m,t.cw&&t.cw(n.sw)},KRe:function(t,n){var t,i,r,e,n,t,o,t,u,s,r,i=this;i.eBe&&(r=i.Mf,(e=i.q6).hitRow=t,e.hitCol=n,n=null!=(t=i.Int)?t:r.JS(e),i.xnt=n,t=r.Dn.XRe(),i.Int=n,o=r.parent)&&o.options.showDragDropTip&&(t?(t=r.Uet.x+r.Uet.width+5,u=r.Uet.y+r.Uet.height+5,s=r.sw,r=r.U5(),s.dragHeaderToMoveInfo.dragColumn?e.col>r.col?n.col=e.col-r.colCount:n.col=e.col:e.row>r.row?n.row=e.row-r.rowCount:n.row=e.row,o.Tw(a.j0(i.Nnt(n)),t,u)):o.iy())},WRe:function(){var t,n,i,t,r,n,e,o,e,n,u,n,s,a,l,s,t=this,n=t.Mf,i=n.sw,t=t.fk,r=i.dragHeaderToMoveInfo.selectionRect.clone(),n=(0,f.getSheetVPortBoundary)(n),e=n.minPoint,o=e.x,e=e.y,n=n.maxPoint,u=n.x,n=n.y;return i.dragHeaderToMoveInfo.dragColumn?(s=i.x-r.x,r.x=t.x-s,r.x<o?r.x=o:u<(a=(0,f.getEndX)(r))&&(r.x=u-r.width),n<(l=(0,f.getEndY)(r))&&(r.height=n-r.y)):(s=i.y-r.y,r.y=t.y-s,r.y<e?r.y=e:n<(l=(0,f.getEndY)(r))&&(r.y=n-r.height),u<(a=(0,f.getEndX)(r))&&(r.width=u-r.x)),r}})},"./dist/plugins/fill/drag-header-to-move/index.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-header-to-move/event.js"),i("./dist/plugins/fill/drag-header-to-move/render.js")},"./dist/plugins/fill/drag-header-to-move/render.js":function(t,n,i){var p,w,n,r,e;Object.defineProperty(n,"__esModule",{value:!0}),p=i("Core"),w=i("./dist/plugins/fill/utils.js"),n=p.GC$,r="black",n.extend(p.g7.prototype,e={qRe:function(t,n,i){t.save(),t.fillStyle=i||r,t.fillRect(n.x,n.y,n.width,n.height),t.restore()},$Re:function(o,u){var t,s,n,a,l,f,c,h,v,d,g,n,n,n,t=this,s=t.Mf,n=s.rt,a=s.sw,l=n.q6,f=l.hitTarget;if(l&&f)return c=l.hitCol,h=l.hitRow,v=s.nBe(),d=(0,w.getLineStyle)(s),g=8,o.save(),(n=(0,w.mergeRect)(s.Pet,s.JRe))&&(n=new p.Rect(n.x-g,n.y-g,(0,w.getWidth)(n)+2*g,(0,w.getHeight)(n)+2*g),t.O1(n,u),t.E1(s.U5(),u)),r(),n=i(),o.beginPath(),o.restore(),n;function i(){var t,n,i,r,e,e,t,e,r,t=s.Yy(0).findCol(c)||s.Yy(1).findCol(c)||s.Yy(2).findCol(c),n=s._y(0).findRow(h)||s._y(1).findRow(h)||s._y(2).findRow(h),i=!1;return a.dragHeaderToMoveInfo.dragColumn?t&&(r=t.x,e=(0,w.getWidth)(t),l.col=c,f.x>r+e/2&&(r=t.x+(0,w.getWidth)(t),l.col++),l.col<a.dragHeaderToMoveInfo.selectRange.col||l.col>a.dragHeaderToMoveInfo.selectRange.col+a.dragHeaderToMoveInfo.selectRange.colCount)&&(s.Uet=new p.Rect(r,l.y,0,(0,w.getHeight)(l)),o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),e=u.y+1,(0,w.paintDragLine)(o,r-g,e,r+g,e,v,d),(0,w.paintDragLine)(o,r,l.y,r,l.y+(0,w.getHeight)(l),v,d),(0,w.paintDragLine)(o,r-g,l.y+(0,w.getHeight)(l),r+g,l.y+(0,w.getHeight)(l),v,d),i=!0):n&&(t=n.y,e=(0,w.getHeight)(n),l.row=h,f.y>t+e/2&&(t=n.y+(0,w.getHeight)(n),l.row++),l.row<a.dragHeaderToMoveInfo.selectRange.row||l.row>a.dragHeaderToMoveInfo.selectRange.row+a.dragHeaderToMoveInfo.selectRange.rowCount)&&(s.Uet=new p.Rect(l.x,t,(0,w.getWidth)(l),0),o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),r=u.x+1,(0,w.paintDragLine)(o,r,t-g,r,t+g,v,d),(0,w.paintDragLine)(o,l.x,t,l.x+(0,w.getWidth)(l),t,v,d),(0,w.paintDragLine)(o,l.x+(0,w.getWidth)(l),t-g,l.x+(0,w.getWidth)(l),t+g,v,d),i=!0),i}function r(){o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),t.qRe(o,l,s.tBe())}},XRe:function(){var t,n,i,r,i,r,e,r,t,t=this,n=t.Mf,i=n.sw,r=n.rt.xnt;if(i&&i.dragHeaderToMoveInfo&&r)return i=t.J(),r=n.Fi(),e=n.rt.q6,r=n.options.rightToLeft?new p.Rect(r.Hy,r.T6,r.b6+r.F6,r.Ay+r.Iy):new p.Rect(r.b6,r.T6,r.Hy+r.zy,r.Ay+r.Iy),t=t.$Re(i,r),n.JRe=n.Uet,n.Pet=new p.Rect(e.x,e.y,(0,w.getWidth)(e),(0,w.getHeight)(e)),t}})},"./dist/plugins/fill/fill-event.js":function(t,n,i){var p,m,g,r,w,e,y,_,C,v,D,c,F,b,d,j,R,o,u,h,T,M,i,k,s,e;Object.defineProperty(n,"__esModule",{value:!0}),n.FillAction=void 0,p=i("Common"),m=i("Core"),g=i("SheetsCalc"),r=i("./dist/plugins/fill/fill-ui.js"),w=i("./dist/plugins/fill/fill.js"),e=i("./dist/plugins/fill/fill.ns.js"),y=i("CalcEngine"),_=i("./dist/plugins/fill/utils.js"),C=!!y,v=m.GC$,D=m.Ec,c=p.Common.lt.ht,F=null,b=void 0,d=Math.min,j=Math.abs,R=Math.max,o=5,u=3,h="drag",T="corner",M=p.Common.zf,i=new p.Common.ResourceManager(e.SR,"Fill"),k=i.getResource.bind(i),(e=s=n.FillAction||(n.FillAction={}))[e.smartMenuCopyCells=1]="smartMenuCopyCells",e[e.smartMenuFillSeries=2]="smartMenuFillSeries",e[e.smartMenuFillFormattingOnly=4]="smartMenuFillFormattingOnly",e[e.smartMenuFillWithoutFormatting=8]="smartMenuFillWithoutFormatting",e[e.all=1023]="all",v.extend(m.nk.prototype,{bk:function(t){var n,i,r,e,e,o,u,u,o,e,u,i,n=this;n.zk||(i=n.Mf,r=F,1===(e=i.Ut.getSelections()).length?r=e[0]:e.length<1&&(r=i.Ut.getSpan(i.ui,i.ci)),r&&(n.zk=!0,n.rb=!0,n.Mnt=r,(e=i.tables&&i.tables.find(r.row,r.col))&&(o=n.Cnt=!0,u=e.range(),o=!(e.showHeader()&&r.row===u.row||e.showFooter()&&r.row===u.row+u.rowCount-1||r.col!==u.col||r.colCount!==u.colCount)&&o)&&(n.Snt=!0,n.e_=!0,n.Tnt=e.name()),u=i.getRangeRect((0,_.getRowViewportIndex)(t),(0,_.getColViewportIndex)(t),r),(o=n.q6).x=u.x,o.y=u.y,o.width=u.width-1,o.height=u.height-1,o.row=r.row,o.col=r.col,o.rowCount=(0,_.getRowCount)(r),o.colCount=(0,_.getColCount)(r),e=i.JS(r),u=t.row,i=t.col,(u=u<e.row?e.row:u)>=e.row+(0,_.getRowCount)(e)&&(u=e.row+(0,_.getRowCount)(e)-1),(i=i<e.col?e.col:i)>=e.col+(0,_.getColCount)(e)&&(i=e.col+(0,_.getColCount)(e)-1),o.hitRow=u,o.hitCol=i,o.rowOffset=u-e.row,o.colOffset=i-e.col,n.Rk={e9:(0,_.getRowViewportIndex)(t),r9:(0,_.getColViewportIndex)(t),Bk:(0,_.getHitTestType)(t)},n.Ok()))},Vk:function(){var t,n,i,r,e,o,u,r,i,s,a,t=this;t.Rk&&t.rb&&t.zk&&t.Mnt&&(n=t.fk,i=t.q6,e=(r=t.Mf.getCellRect(i.hitRow,i.hitCol)).width/2,o=r.x+e,u=r.height/2,r=r.y+u,i.hitTarget={x:n.x,y:n.y},i=t.Q9(),s=t.K9(),a=!1,(j(o-n.x)>5+e||j(r-n.y)>5+u)&&(a=!0),0<=i&&0<=s&&a&&t.Ant(i,s),t.a9())},Ant:function(t,n){var i,r,e,o,u,s,a,l,f,c,h,c,u,f,l,c,u,t,n,o,i=this;i.zk&&i.Mnt&&(r=i.Mf,e=i.q6,o=r.o5(),u=r.U5(),s=(0,_.getSheetRowCount)(r),a=(0,_.getSheetColumnCount)(r),l=d(a-(0,_.getColCount)(e),n-e.colOffset),f=d(s-(0,_.getRowCount)(e),t-e.rowOffset),o&&(c=r.ox(n,e.colOffset+1),f-=h=r.ox(t,e.rowOffset+1,!0),0===r.getColumnWidth(l-=c)&&(l=r.r6(l)),0===r.getRowHeight(f))&&(f=r.nI(f)),-1===u.row&&-1!==u.col?(e.row=-1,e.col=R(0,l)):-1!==u.row&&-1===u.col?(e.row=R(0,f),e.col=-1):(e.row=e.row<0?-1:R(0,f),e.col=e.col<0?-1:R(0,l)),i.Snt&&(u=(c=r.tables&&r.tables.find(t,n))&&c.range(),!c||c.name()!==i.Tnt||t===u.row||c.showFooter()&&t===u.row+u.rowCount?i.e_=!1:i.e_=!0,i.e_?(e.col=u.col,i.i_=!i.isPressShiftKey):i.i_=i.isPressShiftKey),e.hitRow=t,e.hitCol=n,f=r.JS(e),o&&(l=r.lT(f.row,f.rowCount,!0),c=r.lT(f.col,f.colCount),f.rowCount+=l,f.colCount+=c,f.rowCount=d(s,f.rowCount),f.colCount=d(a,f.colCount),f.row+f.rowCount>s||f.col+f.colCount>a)||(u=i.Int)&&f.row===u.row&&f.col===u.col&&(0,_.getRowCount)(f)===(0,_.getRowCount)(u)&&(0,_.getColCount)(f)===(0,_.getColCount)(u)&&f.row>r.N9()&&f.col>r.k9()&&f.row+(0,_.getRowCount)(f)-1<r.P6()&&f.col+(0,_.getColCount)(f)-1<r.G6()||(i.xnt=f,r.Dn.o_(),i.Int=f,(t=r.parent)&&t.options.showDragDropTip&&(n=e.x+e.width+5,o=e.y+e.height+5,t.Tw(M.j0(i.Nnt(f)),n,o))))},Nnt:function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d;return t&&C?(i=(n=this.Mf).U5(),r=(0,_.getRowCount)(i),e=(0,_.getColCount)(i),o=n.getActiveRowIndex(),u=n.getActiveColumnIndex(),s=void 0,a=n.o5(),o=o<0?0:o,u=u<0?0:u,s=1===r&&1===e?y.knt(F,F,t.row-o,t.col-u,!0,!0):(h=c=f=l=void 0,d=v=0,-1===i.row&&0<=i.col?(l=c=g.BAND_INDEX_CONST,f=t.col-u,h=t.col-u+e-1,d=e):-1===i.col&&0<=i.row?(f=h=g.BAND_INDEX_CONST,l=t.row-o,c=t.row-o+r-1,v=r):0<=i.row&&0<=i.col&&(l=t.row-o,c=t.row-o+r-1,f=t.col-u,h=t.col-u+e-1,v=r,d=e),a&&(c+=n.lT(t.row,v,!0),h+=n.lT(t.col,d)),y.lJ(F,F,l,f,c,h,!0,!0,!0,!0,o,u)),n.op().unparse(n.Uw(),s,o,u)):b},kD:function(t){var n,i,r,e,o,u,u,s,a,l,f,c,h,v,u,d,g,p,p,w,p,w,w,p,w,n=this,i=!1,r="",e=!1,o=n.Mf;n.Rk=F,n.l9(),u=o.U5(),s=n.q6.row,a=n.q6.col,l=n.q6.hitRow,f=n.q6.hitCol,n.i_&&u.contains(l,f)||(u=u&&(0<(0,_.getRowCount)(u)||0<(0,_.getColCount)(u))?{r:u.row,c:u.col,rc:(0,_.getRowCount)(u),cc:(0,_.getColCount)(u)}:{r:o.ui,c:o.ci,rc:1,cc:1},!0===n.zk&&!0===n.rb&&(c=u.r,h=u.c,v=u.rc,u=u.cc,d=o.options.protectionOptions,g=o.lF,n.shiftCells=null,n.i_&&(n.shiftCells=n.Dnt?m.InsertShiftCell.right:m.InsertShiftCell.down),p={fromRow:c,fromColumn:h,rowCount:v,columnCount:u,toRow:s,toColumn:a,isDragInsert:n.i_,isDragCopy:n.t_},o.ki(m.Events.BeforeDragDrop,p),(r=p.invalidMessage)&&0!==r.length?i=!0:!n.i_||-1!==c&&-1!==h?s===c&&a===h||(p=o.GT(c,h,v,u),w=o.GT(s,a,v,u),!p&&!w||(w=!1,w=!(p||n.shiftCells!==m.InsertShiftCell.right&&n.shiftCells!==m.InsertShiftCell.down)||w)||(i=!0,r=k().Exp_ChangeMergedCell),i||C&&(o.KT(c,h,v,u)||o.KT(s,a,v,u))&&(i=!0,r=k().Exp_ChangePartOfArray),!i&&!n.t_&&(p=(p=(p=o.isActualProtected())||(0,m.isAnyCellProtectedInDataRange)(o,new m.Range(c,h,v,u)))&&o.dA(D(c,h,v,u),!1,m.SheetArea.viewport),w=(w=(w=o.isActualProtected())||(0,m.isAnyCellProtectedInDataRange)(o,new m.Range(s,a,v,u)))&&o.dA(D(s,a,v,u),!1,m.SheetArea.viewport),p||w)&&(i=!0,r=o.FT()),i)||(n.i_&&(n.Dnt?a=n.q6.hitCol:s=n.q6.hitRow),e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:c,fromColumn:h,toRow:s,toColumn:a,rowCount:v,columnCount:u,copy:n.t_,insert:n.i_,shiftCells:n.shiftCells,option:g,mouseTargetRow:l,mouseTargetCol:f})):0<=h?(n.t_&&(a<=h||h+u<=a)||!n.t_&&(a<h||h+u<a))&&((o.GT(-1,h,-1,u)||o.GT(-1,a,-1,0))&&(i=!0,r=k().Exp_ChangeMergedCell),p=d&&d.allowDragInsertColumns,!i&&o.isActualProtected()&&!0!==p&&(i=!0,r=k().Exp_ColumnReadOnly),i||(e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:-1,fromColumn:h,toRow:-1,toColumn:a,rowCount:-1,columnCount:u,copy:n.t_,insert:!0,option:g,mouseTargetRow:l,mouseTargetCol:f}))):0<=c&&h<0&&(n.t_&&(s<=c||c+v<=s)||!n.t_&&(s<c||c+v<s))&&((o.GT(c,-1,v,-1)||o.GT(s,-1,0,-1))&&(i=!0,r=k().Exp_ChangeMergedCell),i||C&&(o.KT(c,-1,v,-1)||o.KT(s,-1,0,-1))&&(i=!0,r=k().Exp_ChangePartOfArray),w=d&&d.allowDragInsertRows,!i&&o.isActualProtected()&&!0!==w&&(i=!0,r=k().Exp_RowReadOnly),i||(e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:c,fromColumn:-1,toRow:s,toColumn:-1,rowCount:v,columnCount:-1,copy:n.t_,insert:!0,option:g,mouseTargetRow:l,mouseTargetCol:f}))))),n.rb=!1,n.zk=!1,n.Snt=!1,n.Cnt=!1,n.e_=!1,n.Tnt=F,n.Mnt=F,n.i_=!1,n.t_=!1,n.Int=F,n.xnt=F,n.iy(),e||(n.q6={},o.repaint()),i&&o.jT(3,r)},wk:function(t){var n=this;!0!==n.Yk&&!0!==n.rb&&(n._nt(),n.Ktt)&&(n.rb=!0,n.Yk=!0,n.hO=!0,n.Ent=(0,_.getRowViewportIndex)(t),n.jnt=(0,_.getColViewportIndex)(t),n.Ont=(0,_.getRowViewportIndex)(t),n.Rnt=(0,_.getColViewportIndex)(t),n.Bnt(),n.Rk={e9:(0,_.getRowViewportIndex)(t),r9:(0,_.getColViewportIndex)(t),Bk:(0,_.getHitTestType)(t)},n.Ok())},Bnt:function(){var t,n,i,r,n,t=this,n=(0,_.getFrozenRowCount)(t.Mf),i=(0,_.getFrozenColumnCount)(t.Mf),r=t.Lnt();0<=r&&r<n?t.Fnt=0:n<=r&&r<=(0,_.getSheetRowCount)(t.Mf)&&(t.Fnt=1),t.Pnt()?t.Gnt=1:t.Gnt=t.Ent,0<=(n=t.Unt())&&n<i?t.Hnt=0:i<=n&&n<=(0,_.getSheetColumnCount)(t.Mf)&&(t.Hnt=1),t.znt()?t.Vnt=1:t.Vnt=t.jnt},Zk:function(){var t,n,i,r,t=this;t.Rk&&t.Yk&&t.rb&&t.Ktt&&(t.Ont=t.nD(),t.Rnt=t.eD(),t.Ynt=t.Q9(),t.Znt=t.K9(),0<=t.Ynt&&0<=t.Znt&&(t.Wnt(),t.Qnt(),n=t.Mf.parent,i=!1,(r=t.Knt())&&(i=t.Jnt(t.Ktt,t.Xnt,!0)),n&&n.options.showDragFillTip&&i&&t.qnt(),t.$nt()),t.a9())},tet:function(){var t,n,i,r,e,e,o,u,s,s,a,u,l,f,c,h,v,h,v,d,g,t=this,n=t.Mf,i=t.Ktt,r=t.Xnt,e=n.parent.options.defaultDragFillType,e=t.net(3===e?5:e,3===e),o=t.eet(),u=t.Knt();return 1===e?(s=0===o||1===o?1:0,u=(a=new w.Wtt(n)).Jtt(u,s,!0),s=t.iet(o,r,i),f=(l=n.getActualStyle(s.row,s.col)).cellType||n.$f(),c=l.formatter||l._autoFormatter,h=p.Formatter&&p.Formatter.GeneralFormatter,u instanceof Date&&h&&(c=new h(p.Common.CultureManager.Fe().DateTimeFormat.shortDatePattern+" hh:mm:ss AM/PM;@","0")),h=3,(v=t.Rk)&&(h=v.Bk),v={sheet:n,row:s.row,col:s.col,sheetArea:h,quotePrefix:l.quotePrefix},f.format(u,c,d={},v)):0!==e||(s=t.iet(o,r,i),g=n.getFormula(s.row,s.col))?F:n.getText(s.row,s.col)},iet:function(t,n,i){var r,e,o,i,u,s,r=i.row,e=i.col,o=(0,_.getRowCount)(i),i=(0,_.getColCount)(i),u=D(r,e,1,1);return 3===t?(s=(0,_.getRowCount)(n)%o,u.row=s=0===s?r+o-1:r+s-1,u.col=e):1===t?(s=0===(s=(0,_.getColCount)(n)%i)?e+i-1:e+s-1,u.row=r,u.col=s):0===t?(s=0===(s=(0,_.getColCount)(n)%i)?e:e+i-s,u.row=r,u.col=s):2===t&&(s=(0,_.getRowCount)(n)%o,u.row=s=0===s?r:r+o-s,u.col=e),u},qnt:function(){var t,n,i,r,e,o,u,o,n,t=this,n=t.Mf,i;if(4===t.net()||t.znt()||t.Pnt())return t.iy(),F;u=t.eet(),o=t.Knt(),n=n.j1(o),o=t.tet(),3===u||1===u?(r=n.x+n.width+3,e=n.y+n.height+3):0===u?(r=n.x+3,e=n.y+n.height+3):2===u&&(r=n.x+n.width+3,e=n.y+3),t.Tw(o,r,e)},$nt:function(){var t=this;t.ret(),t.oet(),t.aet(),t.uet=t.Knt()},ret:function(){var t,n,t=this.Mf;this.uet&&((n=t.j1(this.uet)).x-=2,n.y-=2,n.width+=4,n.height+=4,t.Dn.O1(n))},oet:function(t){var n;this.Mf.Dn.E1(this.Ktt,F,t)},aet:function(){var t,n,i,r,t,r,t,n,e,n=this.Mf,i=n.Dn,r=this.Knt();r&&(t=this.cHr(),r=null!=(t=(r=n.j1(r)).getIntersectRect(t))?t:r,t=n.getSelectionBorderColor(),n=(0,_.getLineStyle)(n),(e=i.J()).save(),e.beginPath(),i.cet(e,r,t,n),e.restore())},cHr:function(){var t,n,i,r,e,n,t,t=this.Mf,n=t.Fi(),i=n.c9(this.Ent,this.jnt),r=this.Iet()?n.c9(this.Ont,this.jnt):n.c9(this.Ent,this.Rnt),e=n.c9(t.C0(this.Ktt.row),t.S0(this.Ktt.col)),n=n.c9(t.C0(this.Ktt.row+this.Ktt.rowCount-1),t.S0(this.Ktt.col+this.Ktt.colCount-1)),t=(0,_.mergeRect)(i,r);return t=(0,_.mergeRect)(t,e),(0,_.mergeRect)(t,n)},Qnt:function(){this.Xnt=this.dO()},znt:function(){return-1===this.Ktt.col&&-1!==this.Ktt.row},Pnt:function(){return-1===this.Ktt.row&&-1!==this.Ktt.col},lO:function(){return 4===this.bO||5===this.bO},dO:function(){var t,n,i,r,e,t=this,n=-1,i=-1,r=-1,e=-1;switch(t.bO){case 0:r=t.Pnt()?n=-1:(n=t.Lnt(),(0,_.getRowCount)(t.Ktt)),i=t.Znt,e=t.Unt()-i;break;case 1:r=t.Pnt()?n=-1:(n=t.Lnt(),(0,_.getRowCount)(t.Ktt)),i=t.fet()+1,e=t.Znt-i+1;break;case 2:n=t.Ynt,r=t.Lnt()-n,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 3:n=t.let()+1,r=t.Ynt-n+1,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 5:n=t.Ynt,r=t.let()-n+1,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 4:r=t.Pnt()?n=-1:(n=t.Ktt.row,(0,_.getRowCount)(t.Ktt)),i=t.Znt,e=t.fet()-i+1}return D(n,i,r,e)},het:function(){var t=this.let();return-1!==t?this.Mf._y(this.Gnt).findRow(t):F},det:function(){return this.Mf._y(this.Ont).findRow(this.vet())},vet:function(){return this.Mf.getViewportBottomRow(this.Ont)},met:function(){var t=this.fet();return-1!==t?this.Mf.Yy(this.Vnt).findCol(t):F},pet:function(){return this.Mf.Yy(this.Rnt).findCol(this.bet())},bet:function(){return this.Mf.getViewportRightColumn(this.Rnt)},Wnt:function(){var t,n,i,r,e,o,u,s,e,r,a,l,f,c,o,u,c,f,o,u,a,l,f,o,u,a,f,u,l,h,t=this,n=t.znt(),i=t.Pnt(),r=v(t.Mf.Dg()).offset(),e=t.fk.e,o=t.fk.x,u=t.fk.y,s=e.pageX-r.left,e=e.pageY-r.top,r=!1;n||i?i?t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=4:t.Znt<t.Unt()?t.bO=0:t.Znt>t.fet()&&(t.bO=1):n&&(t.Ynt>=t.Lnt()&&t.Ynt<=t.let()?t.bO=5:t.Ynt<t.Lnt()?t.bO=2:t.Ynt>t.let()&&(t.bO=3)):t.Ynt>=t.Lnt()&&t.Ynt<=t.let()?t.Znt>=t.Unt()&&t.Znt<=t.fet()?(a=j(t.Znt-t.fet()))<(l=j(t.Ynt-t.let()))?t.bO=5:l<a?t.bO=4:(f=(f=t.het())||t.det())?u>f.y+f.height?t.bO=3:(o=(c=(c=t.met())||t.pet()).x+c.width-o,u=f.y+f.height-u,s>=c.x&&s<=c.x+c.width&&e>=f.y&&e<=f.y+f.height?t.bO=u<=o?4:5:r=!0):r=!0:t.Znt<t.Unt()?t.bO=0:t.Znt>t.fet()&&(t.bO=1):t.Ynt<t.Lnt()?t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=2:t.Znt<t.Unt()?(a=j(t.Znt-t.Unt()),l=j(t.Ynt-t.Lnt()),t.bO=a<=l?2:0):t.Znt>t.fet()&&(a=j(t.Znt-t.fet()),l=j(t.Ynt-t.Lnt()),t.bO=a<=l?2:1):t.Ynt>t.let()&&(t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=3:t.Znt<t.Unt()?(a=j(t.Znt-t.Unt()),l=j(t.Ynt-t.let()),t.bO=a<=l?3:0):t.Znt>t.fet()&&(a=j(t.Znt-t.fet()),l=j(t.Ynt-t.let()),t.bO=a<=l?3:1)),(c=t.Mf.Dn.yet)&&(u=(f=t.let())+1,a=(o=t.fet())+1,l=t.Mf.getRowHeight(f,3),f=t.Mf.getColumnWidth(o,3),o=t.Mf.getRowHeight(u,3),u=t.Mf.getColumnWidth(a,3),a=c.x+c.width/2-d(10,f/2),f=c.x+c.width/2+d(10,u/2),u=c.y+c.height/2-d(10,l/2),l=c.y+c.height/2+d(10,o/2),h=!1,(h=n||i?i?a<=s&&s<=f:u<=e&&e<=l:a<=s&&s<=f&&u<=e&&e<=l)||r?(t.hO=!0,t.bO=4):t.hO=!1)},Lnt:function(){return this.Ktt?-1===this.Ktt.row?0:this.Ktt.row:-1},let:function(){var t=this;return t.Ktt?-1===t.Ktt.row?(0,_.getSheetRowCount)(t.Mf)-1:t.Ktt.row+(0,_.getRowCount)(t.Ktt)-1:-1},Unt:function(){return this.Ktt?-1===this.Ktt.col?0:this.Ktt.col:-1},fet:function(){var t=this;return t.Ktt?-1===t.Ktt.col?(0,_.getSheetColumnCount)(t.Mf)-1:t.Ktt.col+(0,_.getColCount)(t.Ktt)-1:-1},wet:function(t,n){var n,i,r,e,e,r,e,t,n=D(n.row,n.col,n.rowCount,n.colCount),i=this.Mf;return i.Ut.findSpan(t.row,t.col)&&(r=t.rowCount,e=n.rowCount,0!==Math.floor(e%r)&&(e=Math.ceil(e/r)*r,n.row+e<=i.getRowCount())&&(n.rowCount=e),r=t.colCount,e=n.colCount,0!==Math.floor(e%r))&&(t=Math.ceil(e/r)*r,n.col+t<=i.getColumnCount())&&(n.colCount=t),n},DD:function(){var t,n,i,r,e,o,u,e,o,t=this,n=t.Mf;t.Rk=F,t.l9(),t.iy(),t.Yk&&t.rb?(t.Yk=!1,t.rb=!1,(i=t.Knt())&&(!(r=t.Jnt(t.Ktt,t.Xnt))||t.hO?(t.Met(),t.Ax(i)):(e=n.rt.Ktt,o=t.wet(e,t.Xnt),u=t.net(),n.Qy().execute({cmd:"fill",sheetName:n.name(),startRange:e,fillRange:o,autoFillType:u,fillDirection:n.rt.eet()}),e=t.lnt,o=n.getSelections(),!e&&t.Cet()&&n.parent.options.showDragFillSmartTag&&1===o.length&&o[0].equals(i)&&4!==t.fnt?t.Tet(t.fnt):t.Ax(i),t.Met()))):t.Met()},IRe:function(){var t,n,i,t=this.Mf,n=s.all,i=t.getCellType(t.getActiveRowIndex(),t.getActiveColumnIndex());return"19"===(null==i?void 0:i.typeName)&&(n&=~s.smartMenuFillSeries),n=t.NMi?(n&=~s.smartMenuFillFormattingOnly)&~s.smartMenuFillWithoutFormatting:n},Tet:function(t){var n,i,i,n=this.Mf,i=n.Dn.yet,i={x:i.x+i.width,y:i.y+i.height,fillType:t,availableFillAction:this.IRe()};n.R_=new r.Aet(n.parent.j2(),n,i),n.R_.rQ()},_nt:function(){var t,n,n,i,t=this.Mf,n=t.Ut.getSelections();1===n.length?(n=n[0],(i=t.Ut.getSpans(n))&&0<i.length&&(n=t.kR(i,n)),this.Ktt=n):0<=t.ui&&0<=t.ci&&(this.Ktt=D(t.ui,t.ci,1,1))},Met:function(){this.rb=!1,this.Yk=!1},Ax:function(t){this.Mf.Dn.E1(t)},net:function(t,n){var i,r,t,e,i=this,r=i.Mf,t=t!==b?t:r.parent.options.defaultDragFillType;return i.lO()?4:5!==t?t:(e=1===(0,_.getRowCount)(i.Ktt)&&1===(0,_.getColCount)(i.Ktt)&&!i.Pnt()&&!i.znt())?i.a_&&!n?1:0:i.a_&&!n?0:1},Knt:function(){var t,n,i,r,e,t=this;return t.Ktt?t.lO()?t.Ktt:t.Xnt?(e=r=i=n=0,e=t.Iet()?(n=(2===t.bO?t.Xnt:t.Ktt).row,i=(0,_.getRowCount)(t.Ktt)+(0,_.getRowCount)(t.Xnt),r=t.Ktt.col,(0,_.getColCount)(t.Ktt)):(n=t.Ktt.row,i=(0,_.getRowCount)(t.Ktt),r=(0===t.bO?t.Xnt:t.Ktt).col,(0,_.getColCount)(t.Ktt)+(0,_.getColCount)(t.Xnt)),D(n,r,i,e)):F:F},Jnt:function(t,n,i){var r,e,o,t,r=this.Mf,e=!0,o="";return r.Ut.eE(n.row,n.col,(0,_.getRowCount)(n),(0,_.getColCount)(n))&&!(0,_.canDragFillSpan)(r,t,n)&&(e=!1,o=k().Exp_FillRangeContainsMergedCell),!(t=r.isActualProtected())&&r.dataRanges&&(t=(0,m.isAnyCellProtectedInDataRange)(r,n)),e&&t&&r.dA(n,!0,m.SheetArea.viewport)&&(e=!1,o=r.FT()),e||i||r.ki(m.Events.InvalidOperation,{sheet:r,sheetName:r.name(),invalidType:m.InvalidOperationType.dragFill,message:o,fillRange:n}),e},Cet:function(){return this.xet()||this.Net()},xet:function(){return 3===this.bO||1===this.bO},Net:function(){return 0===this.bO||2===this.bO},Iet:function(){return 2===this.bO||3===this.bO||5===this.bO},eet:function(){var t=this.bO;return 0<=t&&t<=3?t:4===t?0:5===t?2:3},VL:function(t,n,i){var r,e,o,t,u,s,a,l,f,u,r=this,e=F,o=(0,_.getRowViewportIndex)(t),t=(0,_.getColViewportIndex)(t),u=r.Mf,s=u.parent,a=u.options.rightToLeft;if(!c(o)&&!c(t)&&(s.options.allowUserDragDrop||s.options.allowUserDragFill)&&(-1!==(l=u.U5()).row||-1!==l.col)){if(0<=o&&0<=t&&1===u.Ut.getSelections().length){if(r.yD(o,t,n,i))return e;a&&(f=r.Mf.Dn.yet)&&f.x<=n&&n<=f.x+f.width&&f.y<=i&&i<=f.y+f.height&&(e={action:h,side:T}),u=u.getRangeRect(o,t,l),e||u.x-4<n&&n<u.x+4&&u.y<=i&&i<u.y+u.height&&(e={action:h,side:"left"}),e||a||(f=r.Mf.Dn.yet)&&f.x<=n&&n<=f.x+f.width&&f.y<=i&&i<=f.y+f.height&&(e={action:h,side:T}),e||u.x+u.width-4<n&&n<u.x+u.width+4&&u.y<=i&&i<u.y+u.height&&(e={action:h,side:"right"}),e||u.y-4<i&&i<u.y+4&&u.x<=n&&n<u.x+u.width&&(e={action:h,side:"top"}),e||u.y+u.height-4<i&&i<u.y+u.height+4&&u.x<=n&&n<u.x+u.width&&(e={action:h,side:"bottom"}),e&&(n<u.x||n>u.x+u.width||i<u.y||i>u.y+u.height)&&(e.outside=!0)}s&&s.options.allowUserDragDrop||e&&e.side!==T&&(e.side=F),s&&s.options.allowUserDragFill||e&&e.side===T&&(e.side=F)}return e},ket:function(t,n){var i,r,e,i=this,r,e=i.Mf.getSpan(t,n,3);return e?!c(i.Mf.getValue(e.row,e.col,3,0)):!c(i.Mf.getValue(t,n,3,0))},Det:function(t,n){var i,r,e,e,i,r,e=this.Mf.tables;return!(!e||0===e.all().length)&&(e=e.AB(t,n,1,1)[0])&&e.footerIndex()===t},_et:function(t,n,i,r){for(var e,o,e=this,o=n;o<n+r;o++)if(!e.ket(t,o)||e.Det(t,o))return!1;return!0},Eet:function(t,n,i,r){for(var e,o,e=this,o=n;o<n+r;o++)if(e.ket(t,o))return!1;return!0},jet:function(t,n,i,r){var e,o,u,s,a,l,f,c,h,e=this,o=e.Mf;if("left"===r){for(u=0;u<n;u++)e.ket(t,u)&&(i.searchArray[u]=!0);for(s=n-1,a=1;i.searchArray[s];)s--,a++;i.searchLength=a}if("right"===r){for(l=o.getColumnCount(),f=n;f<l;f++)e.ket(t,f)&&(i.searchArray[f-n]=!0);for(c=0,h=1;i.searchArray[c];)c++,h++;i.searchLength=h}return i},Oet:function(t,n,i,r,e){for(var o,u,s,a,l,f,c,h,v,d,o=this,u=o.Mf,s=0,a={searchArray:new Array(r),searchLength:1},l={searchArray:new Array(u.getColumnCount()-e),searchLength:1},f=i-1;n<=f&&!o.Eet(f,t.col,1,t.colCount);f--)a=o.jet(f,t.col,a,"left"),l=o.jet(f,t.col+t.colCount-1,l,"right");for(;o.Eet(i+s,t.col,1,t.colCount);){for(h=!(c=!0),a=o.jet(i+s,r,a,"left"),l=o.jet(i+s,e,l,"right"),v=r-1;v>=r-a.searchLength;v--)if(o.ket(i+s,v)){s++,c=!1;break}if(c){for(d=e+1;d<=e+l.searchLength;d++)if(o.ket(i+s,d)){s++,h=!0;break}if(!h)return s}}return s},Ret:function(t){for(var n,i,n=this,i=0;n._et(t.row+t.rowCount+i,t.col,1,t.colCount);)i++;return i},Bet:function(t){var n,i,r,e,o,n=this;return n._et(t.row+t.rowCount,t.col,1,t.colCount)?n.Ret(t):(o=t.row+t.rowCount,r=1===t.colCount?i=t.col:(i=t.col,t.col+t.colCount-1),n.Oet(t,e=0,o,i,r))},H_:function(){var t,n,i,r,r,e,o,i,r,t=this,n=t.Mf,i=n.rt.Ktt,r=t.Bet(i);0!==r&&(r=D(i.row+i.rowCount,i.col,r,i.colCount),t.bO=3,t.Xnt=r,e=t.net(),o=t.lnt,n.Qy().execute({cmd:"fill",sheetName:n.name(),startRange:i,fillRange:r,autoFillType:e,fillDirection:t.bO}),i=t.Knt(),r=n.getSelections(),!o)&&n.parent.options.showDragFillSmartTag&&1===r.length&&r[0].equals(i)&&4!==t.fnt&&t.Tet(t.fnt)}})},"./dist/plugins/fill/fill-render.js":function(t,n,i){var F,b,n,j,v;Object.defineProperty(n,"__esModule",{value:!0}),F=i("Core"),b=i("./dist/plugins/fill/utils.js"),n=F.GC$,j=Math.min,v=Math.max,n.extend(F.g7.prototype,{Let:function(t,n){var i,r,e,o,u,t,s,i,a,l,n,i=this.Mf,r=i.options.rightToLeft,e=t.x,o=t.y,u=(0,b.getWidth)(t),t=(0,b.getHeight)(t),s=i.U5(),i=i.Fi(),a=4,l=-2.5;return 2007<n&&(a=5,l=-3),n=new F.Rect(-4,-4,a,a),-1===s.col?(n.x=r?i.BA+l:i.b6,n.y=o+t+l):-1===s.row?(n.x=r?e+l:e+u+l,n.y=i.T6):(n.x=r?e+l:e+u+l,n.y=o+t+l),n},yO:function(t,n,i,r,e){var o,u,s,a,a,r,l,f,c,h,s,n,i,o=this,u=o.Mf,s=u.Fi(),a=u.parent,a=a&&a.SC,r=o.Let(r,a),l=r.x,f=r.y,c=(0,b.getWidth)(r),h=(0,b.getHeight)(r),s=s.c9(n,i);e&&!r.intersectRect(e)||r.intersectRect(s)&&(n=-1.5,(i=new F.Rect(l+(n=2007<a?-1:n),f+n,c+2,h+2)).x<s.x&&(i.width-=s.x-i.x,i.x=s.x),i.y=v(i.y,s.y),o.O1(i),t.save(),e&&!e.containsRect(r)&&(t.rect(e.x,e.y,(0,b.getWidth)(e),(0,b.getHeight)(e)),t.clip()),t.beginPath(),t.fillStyle=F.Pf.vl(u,u.getSelectionBorderColor()),t.fillRect(l,f,c,h),o.yet=new F.Rect(r.x,r.y,4,4),t.beginPath(),t.restore())},cet:function(t,n,i,r){var e=n.x,o=n.y,u=e+(0,b.getWidth)(n),n=o+(0,b.getHeight)(n);(0,b.paintDragLine)(t,e-2,o,u+1,o,i,r),(0,b.paintDragLine)(t,e-1,n,u+1,n,i,r),(0,b.paintDragLine)(t,e,o-1,e,n+1,i,r),(0,b.paintDragLine)(t,u,o-1,u,n+1,i,r)},Fet:function(t,n){var i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,c,w,m,y,_,y,u,y,f,l,C,u,D,y,l,i=this,r=i.Mf,e=r.rt,o=e.q6,u=o.hitTarget;o&&u&&(s=o.hitCol,a=o.hitRow,l=o.row,f=o.col,c=e.i_,h=r.Pet,d=r.getSelectionBorderColor(),g=(0,b.getLineStyle)(r),p=8,t.save(),!0===c?(c=r.Yy(0).findCol(s)||r.Yy(1).findCol(s)||r.Yy(2).findCol(s),w=r._y(0).findRow(a)||r._y(1).findRow(a)||r._y(2).findRow(a),-1===o.row&&-1!==o.col?c&&(m=c.x,y=(0,b.getWidth)(c),o.col=s,u.x>m+y/2&&(o.col<r.getLastFullyVisibleColumn()||o.col===r.G6())&&(m=c.x+(0,b.getWidth)(c),o.col++),(h=h&&0===(0,b.getWidth)(h)?h:e.q6)&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),r.Uet=new F.Rect(m,o.y,0,(0,b.getHeight)(o)),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),(0,b.paintDragLine)(t,m-8,o.y,m+8,o.y,d,g),(0,b.paintDragLine)(t,m,o.y,m,o.y+(0,b.getHeight)(o),d,g),(0,b.paintDragLine)(t,m-8,o.y+(0,b.getHeight)(o),m+8,o.y+(0,b.getHeight)(o),d,g)):-1!==o.row&&-1===o.col?w&&(_=w.y,y=(0,b.getHeight)(w),o.row=a,u.y>_+y/2&&(o.row<r.getLastFullyVisibleRow()||o.row===r.P6())&&(_=w.y+(0,b.getHeight)(w),o.row++),(h=h&&0===(0,b.getHeight)(h)?h:e.q6)&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),r.Uet=new F.Rect(o.x,_,(0,b.getWidth)(o),0),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),(0,b.paintDragLine)(t,o.x,_-8,o.x,_+8,d,g),(0,b.paintDragLine)(t,o.x,_,o.x+(0,b.getWidth)(o),_,d,g),(0,b.paintDragLine)(t,o.x+(0,b.getWidth)(o),_-8,o.x+(0,b.getWidth)(o),_+8,d,g)):-1!==o.row&&-1!==o.col&&(u=r.Yy(0).findCol(f)||r.Yy(1).findCol(f)||r.Yy(2).findCol(f),y=r._y(0).findRow(l)||r._y(1).findRow(l)||r._y(2).findRow(l),w)&&c&&y&&u&&(m=u.x,_=y.y,h&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),f=!1,l=r.getCellRect(a,s),(f=!e.Cnt&&l?(C=o.hitTarget.x-l.x)<j(16,r.nn(s)/4):f)?m=c.x:_=w.y,r.Uet=new F.Rect(m,_,(0,b.getWidth)(o),(0,b.getHeight)(o)),r.U5().contains(a,s)||(t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),f?((0,b.paintDragLine)(t,m-8,_,m+8,_,d,g),(0,b.paintDragLine)(t,m,_,m,_+(0,b.getHeight)(o),d,g),(0,b.paintDragLine)(t,m-8,_+(0,b.getHeight)(o),m+8,_+(0,b.getHeight)(o),d,g),e.Dnt=!0):((0,b.paintDragLine)(t,m,_-8,m,_+8,d,g),(0,b.paintDragLine)(t,m,_,m+(0,b.getWidth)(o),_,d,g),(0,b.paintDragLine)(t,m+(0,b.getWidth)(o),_-8,m+(0,b.getWidth)(o),_+8,d,g),e.Dnt=!1)))):(h&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),u=r.U5(),l=(y=(D=(0,F.Ec)(o.row,o.col,o.rowCount,o.colCount)).union(u)).row,2<y.row&&(y.row-=3),l+y.rowCount+2<r.getRowCount()&&(y.rowCount+=3+l-y.row),i.E1(y,n)),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),i.cet(t,o,d,g)),t.beginPath(),t.restore())},o_:function(){var t,n,i,r,i,e,o,u,s,a,l,f,c,s,l,t=this,n=t.Mf,i=n.sw,r=n.rt.xnt;i&&i.dragInfo&&r&&(i=t.J(),e=n.Fi(),o=n.rt.q6,u=n.j1(r),s=n.frozenTrailingColumnCount(),a=n.frozenTrailingRowCount(),l=n.getColumnCount()-s,f=n.getRowCount()-a,c=e.c9(1,1),0<s&&r.col+r.colCount<=l&&u.x+(0,b.getWidth)(u)>c.x+(0,b.getWidth)(c)&&u.intersectRect(c)&&(u=u.getIntersectRect(c)),0<a&&r.row+r.rowCount<=f&&u.y+(0,b.getHeight)(u)>c.y+(0,b.getHeight)(c)&&u.intersectRect(c)&&(u=u.getIntersectRect(c)),s=n.options.rightToLeft?new F.Rect(e.Hy,e.T6,e.b6+e.F6,e.Ay+e.Iy):new F.Rect(e.b6,e.T6,e.Hy+e.zy,e.Ay+e.Iy),0<=(0,b.getWidth)(u)&&0<=(0,b.getHeight)(u)&&(o.x=u.x,o.y=u.y,o.width=(0,b.getWidth)(u),o.height=(0,b.getHeight)(u),t.Fet(i,s)),l=n.rt.i_,n.Pet=!0===l?n.Uet:new F.Rect(o.x,o.y,(0,b.getWidth)(o),(0,b.getHeight)(o)))}})},"./dist/plugins/fill/fill-ui.js":function(V,t,n){var i,H,u,N,e,s,a,o,r,l,n,f,c,h,v,d,g,p,w,m,y,_,C,P,q,D,F,b,j,R,T,M,k,L,n,x,W,B,$,I,O;function A(t,n,i,r,e,o){var t=t.Oi,u=t?"160px":"150px",t=t?"25px":"20px",u=s(a("div")).css([C,q,D,"padding",F],["block",u,t,0,0]).addClass("gc-smartMenu-item-default "+i+" ui-state-default"+l),t=s(a("div")).addClass(g).appendTo(u),i=s(a("div")).addClass("gc-menu-item-text").appendTo(u),n=s(a("input")).attr({id:n,value:e,type:"radio",name:"fill-group",style:"display:none"}).appendTo(t);return s(a("span")).text(r).appendTo(i),o?(t.addClass(d),n.prop("checked","checked")):n.prop("checked",""),u}function S(t,n,i){var t,r,t=I.call(this,t,o(n.parent.Ti),void 0,!0)||this;return t.ter=u.DialogFeatureType.fill,t.Mf=n,t.Het=s("."+w),(r=t.g$=t.Xc()).addClass(c),i&e.FillAction.smartMenuCopyCells&&A(n,"smartMenuCopyCells",f,x().CopyCells,"0",!0).appendTo(r),i&e.FillAction.smartMenuFillSeries&&A(n,"smartMenuFillSeries",f,x().FillSeries,"1").appendTo(r),i&e.FillAction.smartMenuFillFormattingOnly&&A(n,"smartMenuFillFormattingOnly",f,x().FillFormattingOnly,"2").appendTo(r),i&e.FillAction.smartMenuFillWithoutFormatting&&A(n,"smartMenuFillWithoutFormatting",f,x().FillWithoutFormatting,"3").appendTo(r),t}function E(t,n,i){var t,n,t=O.call(this,t,o(n.parent.Ti),void 0,!0)||this;return t.Mf=n,t.zet=i,n=t.Vet=t.Xc().addClass("gc-smart-tag-default "+w+" gc-no-user-select ui-widget-header"+l),t.Yet=s(a("div")).attr("class","fillSmartTag").css(m,y).appendTo(n),t.Zet=s(a("div")).attr("class","fillSmartTagDown").css([m,C],[y,"none"]).appendTo(n),t}i=this&&this.__extends||($=function(t,n){return($=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}$(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.Aet=void 0,H=n("Common"),u=n("Core"),N=n("./dist/plugins/fill/fill.ns.js"),e=n("./dist/plugins/fill/fill-event.js"),s=u.GC$,a=u.mt.En,o=u.mt.gi,r=s(document),l=" btn btn-default",f="gc-fill-type-item",c="gc-fill-menu-container",h=(n="ui-state-hover ")+"gc-smartMenu-item-hover",v=n+"gc-smart-tag-hover",d="ui-icon ui-icon-check gc-check-image",g="gc-menu-item-input",p="ui-state-active gc-smart-tag-active",w="gc-tag-container",m="float",y="left",_="top",C="display",P="width",q="min-width",D="height",F="margin",b="change",j="input[type=radio]",R="mouseover",T="mouseout",M="click",k="fillTypeChanged",L="keydown.ui-fill",n=new H.Common.ResourceManager(N.SR,"Fill"),x=n.getResource.bind(n),I=u.zc,i(S,I),S.prototype.$c=function(){I.prototype.$c.call(this)},S.prototype.aY=function(){var e,t,n,e=this,t;s("."+f).bind(R,function(){s(this).addClass(h)}).bind(T,function(){s(this).removeClass(h)}).bind(M,function(){var t,n,i,r,i,t=s(this),n=e.Het,i=t.find(j),r=i[0];r.checked=!0,i.trigger(b),n.trigger(M),n.trigger(T),t.removeClass(h),i=parseInt(s(r).attr("value"),10),e.Wet(i)}),(n=e.g$.find(j)).bind(b,function(){s("."+g).removeClass(d),s(this).parent().addClass(d)})},S.prototype.Qet=function(){s("."+f).unbind(R).unbind(T).unbind(M),this.g$.find(j).unbind(b)},S.prototype.Wet=function(t){var n=this,i=n.Mf,r=i.rt;if(n.Ket!==t){n.Ket=t,i.cnt=!0,i.suspendEvent();try{u.Commands.undo.execute(i.parent,{sheetName:i.name()})}finally{i.resumeEvent()}i.cnt=!1,i.Qy().execute({cmd:"fill",sheetName:i.name(),startRange:r.Ktt,fillRange:r.Xnt,autoFillType:t,fillDirection:r.bO}),n.Het.trigger(k,t)}},S.prototype.Jet=function(){return!!s("."+c).length},W=S,O=u.zc,i(E,O),E.prototype.Xet=function(t,n,i){var r=this,e=r.Mf.Oi,n=s(n),o=r.qet,r=r.Zet,u=e?"38px":"32px",e=e?"24px":"18px";o&&o.Jet()||(t?n.addClass(v):n.removeClass(v),n.css([P,D],[t?u:e,e]),i)||(t?r.show():r.hide())},E.prototype.$et=function(){var e=this,t=e.Vet,n=u.mt.pi(),o=u.mt.Tt.safari&&(n.ipad||n.iphone);t.bind(R,function(){e.Xet(!0,this,o)}).bind(T,function(){e.Xet(!1,this,o)}),t.bind(M,function(){var t,n,i,r,n,i,t=s(this),n=e.qet,i=e.Zet,r;n&&n.Jet()?(o&&i.hide(),t.removeClass(p),e.tit()):(o&&i.show(),t.addClass(p),e.nit(),(i=(n=e.g$)&&n.find(j)[e.zet.fillType])&&!i.checked&&(i.checked=!0,s(i).trigger(b)))}),r.bind(L,function(t){27===t.keyCode&&(e.qet&&e.qet.Jet()?e.tit():e.close(),u.mt.vi(t))})},E.prototype.rQ=function(){var t=this,n=t.Vet,i=t.zet,r=t.Mf.Oi,e=r?"3px":"0px",r=r?"24px":"18px";n&&(n.css([y,_],[i.x,i.y]),t.$c(),t.$et(),t.Yet.css(F,e),t.Zet.css(D,r),t.c5())},E.prototype.nit=function(){var t,n,n,i,r,r,e,o,u,t=this,n=t.Mf;t.qet||(t.qet=new W(n.parent.j2(),n,this.zet.availableFillAction),t.g$=t.qet.Xc()),i=(n=t.Vet).css(y),r=n.css(_),r=parseFloat(r),o=t.qet,u=t.zet,o.Ket=u.fillType,isNaN(r)||(e=r+n.height()+2),t.g$.css([y,_],[i,e]),o.$c(),o.aY(),o.Het.unbind(k).bind(k,function(t,n){u.fillType=n})},E.prototype.RRe=function(){var t,n,i,r,e,i,t,i,o,t,u,n;this.rf()&&(e=-1===(i=(n=this.Mf).U5()).col?(r=n.C0(i.row+i.rowCount-1),n.S0(0)):(r=-1===i.row?n.C0(0):n.C0(i.row+i.rowCount-1),n.S0(i.col+i.colCount-1)),i=n.getRangeRect(r,e,i),t=null==(t=n.parent)?void 0:t.SC,i=n.Dn.Let(i,t),t=(o=n.Fi()).c9(r,e),u=3,i.intersectRect(t)?this.Vet.css([y,_],[i.x+3,i.y+3]):this.Vet.css(C,"none"),this.Vet.removeClass(p),n=this.qet)&&n.rf()&&n.close()},E.prototype.tit=function(){var t=this.qet;t&&(t.Qet(),t.close())},E.prototype.c5=function(){var t=this,n=t.qet,t=t.Vet;n&&(n.Jet()&&t.trigger(M),t.trigger(T))},E.prototype.close=function(){var t,n,t,t=this,n=t.Mf;t.c5(),r.unbind(L),O.prototype.close.call(this),(t=n.fg)&&(t.style.cursor="default"),!n||n.il&&n.il.XD||n.Zg()},E.prototype.lf=function(t){var n;return!(!this.Wc||!O.prototype.hf.call(this,this.Wc.get(0),t))||this.g$&&O.prototype.hf.call(this,this.g$.get(0),t)},t.Aet=E},"./dist/plugins/fill/fill.entry.js":function(t,n,i){var r,e,r=this&&this.__createBinding||(Object.create?function(t,n,i,r){void 0===r&&(r=i);var e=Object.getOwnPropertyDescriptor(n,i);e&&("get"in e?n.__esModule:!e.writable&&!e.configurable)||(e={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,r,e)}:function(t,n,i,r){t[r=void 0===r?i:r]=n[i]}),e=this&&this.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||r(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-fill.js"),i("./dist/plugins/fill/fill-event.js"),i("./dist/plugins/fill/fill-render.js"),i("./dist/plugins/fill/drag-header-to-move/index.js"),e(i("./dist/plugins/fill/fill-ui.js"),n),e(i("./dist/plugins/fill/fill.js"),n),e(i("./dist/plugins/fill/fill.ns.js"),n)},"./dist/plugins/fill/fill.js":function(R,t,n){var i,e,h,r,T,n,x,o,tt,_,C,D,nt,I,u,O,M,u,A,S,it,rt,et,E,u,k,V,H,N,P,q,L,ot,W,B,u,n,$,z,U,n,G,K,J,Q,X,Y,Z,at,lt,ft,ct,ht,n,u,n,u,n,vt,dt,gt,pt,wt,mt,yt,_t,Ct,s,a,Dt,Ft;function ut(t){return!st(t)&&o.q8(t)}function st(t){return"string"==typeof t}function bt(t,n){return-1!==t.lastIndexOf(n)}function jt(t){var n=[t];return n.rowCount=1,n.colCount=M(t),n}function Rt(t){return t}function Tt(t,n,i,r){var n=jt(n),i=jt(i),r=jt([r]),t=t?e.Common.eit(n,i,r,!0,Rt,tt,tt,tt):e.Common.iit(n,i,r,!0,tt,tt,tt),n=t&&t[0][0];return typeof n===it?e.Common.st.E8(n,13):n}function Mt(t){return t.toLowerCase()}function l(t){this._indexes=[],this.oit=[],this.ait=[],this._type=tt,this.sit=[],this.cit=tt,this.lit=nt(t)?-1:t}function f(t){this.hit=-1,this.dit=[],this.MV=-1,this.Mf=t}function kt(){this.vit="",this.mit="",this.MV=0,this.git=1,this._padding=""}function c(t){var n,i,r,e,n=t.length,i=1;if(1<n)for(i=t[1]-t[0],e=2;e<n;e++)if(i!==(r=t[e]-t[e-1])){i=0;break}return i}function v(t,n){return 0<t?(t-1)%n:n-Math.abs(t)%n-1}function d(t){for(var n="",i=0;i<t;)n+="0",i++;return n}function g(t,n){return 12*(n.getFullYear()-t.getFullYear())+(n.getMonth()-t.getMonth())}function xt(t){return t.every(function(t){var n;return 1===t.getDate()})}function It(t){return t.every(function(t){var n,i,r,e,n=t.getFullYear(),i=t.getMonth(),r,e;return t.getDate()===new Date(n,i+1,0).getDate()})}function Ot(t){var n,i,n=0,i;return t.every(function(t){var t=t.getDate();return(n=n||t)===t})?n:0}function At(t,n){for(var i,r,e,o,i=t.length,r=!0,o=2;o<i&&(r=n===(e=g(t[o-1],t[o])));o++);return r}function St(t){return t.every(function(t){var n=t.getHours(),i=t.getMinutes(),t=t.getSeconds();return 0!==n||0!==i||0!==t})}function Et(t,n){return new Date(t,n+1,0).getDate()}function p(t){return"0"===t[0]}function Vt(n,t,i){var r,e,o,e,o,u,s,u=i?1:2,s=i?2:1;return t.every(function(t){return!!(r=t.match(n.pit))&&(e=r[u],(o=e.length)>n.yit&&p(e)&&(n.yit=o),o=parseInt(e,10),e=r[s],nt(n.cit)&&(n.cit=e),e!==n.cit?(n.wit=!0,n.cit=tt,n.sit=[]):n.sit.push(o),!0)})}function w(){}function Ht(){var t=null!==vt&&vt.apply(this,arguments)||this;return t.Mit=0,t._type=rt,t}function m(){return null!==dt&&dt.apply(this,arguments)||this}function y(){return null!==gt&>.apply(this,arguments)||this}function Nt(){return null!==pt&&pt.apply(this,arguments)||this}function Pt(){var t=wt.call(this)||this;return t.pit=tt,t.sit=[],t.cit=tt,t.wit=!1,t.yit=0,t._type=et,t.Cit=!1,t.Sit=!1,t.Tit=new B,t}function F(t){var n=mt.call(this)||this;return n.Ait=new W(t),n}function qt(){var t=null!==yt&&yt.apply(this,arguments)||this;return t.pit=/^\d+$/,t}function Lt(){var t=null!==_t&&_t.apply(this,arguments)||this;return t.pit=/^(.*\D+)(\d+)$/,t}function Wt(){var t=null!==Ct&&Ct.apply(this,arguments)||this;return t.pit=/^(\d+)(\D+.*)$/,t}function b(){var t=null!==s&&s.apply(this,arguments)||this;return t.pit=/^(.*\D+)(\d+)(\D+.*)$/,t}function Bt(){return null!==a&&a.apply(this,arguments)||this}function $t(){return null!==Dt&&Dt.apply(this,arguments)||this}function zt(){var t=null!==Ft&&Ft.apply(this,arguments)||this;return t.Cit=!0,t}function Ut(t){var n,i,i,t,r,e,o,n=this;n.Iit=[new $,new z,new U],n.xit=new at,n.Nit=new lt,i=V.culture(),i=V.Fe(i).isJCKCulture,t=new G(t),r=new K,e=new J,o=new Q,n.kit=i?[t,r,new Z,e,o,new X]:[t,r,e,o]}function Gt(t){t.forEach(function(t){t&&t.dispose()})}function j(t){this.Mf=t,this.Dit=!1,this._it=[]}i=this&&this.__extends||(ht=function(t,n){return(ht=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}ht(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.Wtt=t.nnt=t.FillDateUnit=t.FillType=t.FillSeries=t.FillDirection=t.AutoFillType=void 0,e=n("Common"),h=n("Core"),r=n("CalcEngine"),T=n("SheetsCalc"),n=n("./dist/plugins/fill/fill.ns.js"),x=!!r,o=e.Common.lt,tt=null,_=void 0,C=Math.floor,D=h.Ec,nt=o.ht,I=o.uJ,u=e.Common.Uf,O=u.Eit,M=u.tR,u=e.Common.ct,A=u.o0,S=u.Y0,it="number",rt="date",et="string",E="default",u=new e.Common.ResourceManager(n.SR,"Fill"),k=u.getResource.bind(u),V=e.Common.CultureManager,(n=H=t.AutoFillType||(t.AutoFillType={}))[n.copyCells=0]="copyCells",n[n.fillSeries=1]="fillSeries",n[n.fillFormattingOnly=2]="fillFormattingOnly",n[n.fillWithoutFormatting=3]="fillWithoutFormatting",n[n.clearValues=4]="clearValues",n[n.auto=5]="auto",(u=N=t.FillDirection||(t.FillDirection={}))[u.left=0]="left",u[u.right=1]="right",u[u.up=2]="up",u[u.down=3]="down",(n=P=t.FillSeries||(t.FillSeries={}))[n.column=0]="column",n[n.row=1]="row",(u=q=t.FillType||(t.FillType={}))[u.direction=0]="direction",u[u.linear=1]="linear",u[u.growth=2]="growth",u[u.date=3]="date",u[u.auto=4]="auto",(n=L=t.FillDateUnit||(t.FillDateUnit={}))[n.day=0]="day",n[n.weekday=1]="weekday",n[n.month=2]="month",n[n.year=3]="year",l.prototype.jit=function(){return M(this._indexes)},l.prototype.Oit=function(){for(var t=this,n=[],i=t.oit,r,e,r=0;r<M(i);r++)e=i[r],n.push("object"===t._type?t.r0(e):e);return n},l.prototype.Rit=function(){var t,n,i,r,e,t=this,n=t._indexes;if(0<M(n)){for(r=[],e=void 0,-1===(i=t.lit)&&(i=n[0]),e=0;e<M(n);e++)r[e]=n[e]-i+1;return r}return tt},l.prototype.Bit=function(){var t=this.oit;return M(t)?t:tt},l.prototype.Eit=function(t,n,i){if(!ut(i))throw new Error(k().Exp_NumberOnly);var r=this;nt(r._type)&&(r._type=i instanceof Date?rt:it),O(r._indexes,t,n),O(r.oit,t,I(i))},l.prototype.ZP=function(t,n){var i=this,r=nt(i._type);ut(n)?(r&&(n instanceof Date?i._type=rt:i._type=it),i.oit.push(I(n))):r&&(i._type=st(n)?et:E),i._indexes.push(t),i.ait.push(n)},l.prototype.Lit=function(t){return this._type===rt?this.r0(t):t},l.prototype.r0=function(n){var i=tt;if(n instanceof Date)i=n;else if(r)try{i=r.Convert.r0(n)}catch(t){i=n}return i},ot=l,f.prototype.L0=function(){this.Mf=tt},f.prototype.Fit=function(){var t=this.Mf;return t.parent&&t.parent.Ow()||[]},f.prototype.Pit=function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,n=t.length,i=!1;if(t&&0<n)for(r=Mt(t[0]),e=this.Fit(),f=l=a=s=u=o=void 0,o=0;o<e.length;o++)if(0<=(a=(s=(u=e[o]).map(Mt)).indexOf(r))){for(l=a,c=s.length,d=v=h=void 0,g=1;g<n;g++){if(v=Mt(t[g]),!(0<=(h=s.indexOf(v)))){i=!1;break}if(d=h-l+c,f){if(f!==d){i=!1;break}}else i=!0,f=d,l=h}if(p=1===n,i||p){i=!0,this.hit=a,this.dit=u,this.MV=p?1:f;break}}return i},f.prototype.Sl=function(t){var n=this.dit,i=this.hit,r=this.MV,e=n.length,o,u,u;return n[(i+r*v(t,e))%e]},W=f,kt.prototype.Sl=function(t){var t=this.MV*(t-1)+this.git,n=this._padding.length,t=""+Math.abs(t),i,r=this._padding+t,e=r.length,t=n<t.length?t:r.substr(e-n);return this.vit+t+this.mit},B=kt,w.prototype.match=function(t){return!1},w.prototype.getTargetValue=function(t,n,i,r,e){},w.prototype.resetProp=function(){},w.prototype.Git=function(t,n){return t.indexOf(n+1)},w.prototype.dispose=function(){},i(Ht,vt=u=w),i(m,dt=n=Ht),m.prototype.match=function(t){var n,i,r,e,n=this.Mit=g(t[0],t[1]),i=xt(t),r=t.length,e=!0;return i&&2<r&&(e=At(t,n)),i&&e},m.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1);return new Date(r+parseInt(t/12,10),t%12,1)},$=m,i(y,gt=n),y.prototype.match=function(t){var n,i,r,e,n=this.Mit=g(t[0],t[1]),i=It(t),r=t.length,e=!0;return i&&2<r&&(e=At(t,n)),i&&e},y.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1),n=r+parseInt(t/12,10),r=t%12;return new Date(n,r,Et(n,r))},z=y,i(Nt,pt=n),Nt.prototype.match=function(t){var n,i,r,e,o,u,n=!1;return St(t)||(i=this.Mit=g(t[0],t[1]),e=0<(r=Ot(t)),o=t.length,u=!0,this.Uit=r,e&&2<o&&(u=At(t,i)),n=e&&u),n},Nt.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1),n=r+parseInt(t/12,10),s;return new Date(n,t%12,this.Uit)},U=Nt,i(Pt,wt=u),Pt.prototype.resetProp=function(){this.sit=[],this.yit=0,this.cit=tt,this.wit=!1,this.Cit=!1,this.Sit=!1},Pt.prototype.getInternal=function(t){for(var n,i,r,e,n=!1,i=t[0],e=1;e<t.length;e++)if(r=t[e],1!==Math.abs(r-i)){n=!0;break}return n},i(F,mt=n=Pt),F.prototype.dispose=function(){var t=this;t.Ait&&(t.Ait.L0(),t.Ait=tt)},F.prototype.match=function(t){return this.Ait.Pit(t)},F.prototype.getTargetValue=function(t,n,i,r,e){var o,t=t.ait.length,i=this.Git(i,r),r=tt,u;return r=-1!==i?this.Ait.Sl(u=t*e+i+1):r},G=F,i(qt,yt=n),qt.prototype.match=function(t){var n=this,i,r,r;return t.every(function(t){return!!(i=t.match(n.pit))&&((r=t.length)>n.yit&&p(t)&&(n.yit=r),r=parseInt(t,10),n.sit.push(r),!0)})},qt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},K=qt,i(Lt,_t=n),Lt.prototype.match=function(t){return Vt(this,t,!1)},Lt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.vit=this.cit,u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},J=Lt,i(Wt,Ct=n),Wt.prototype.match=function(t){return Vt(this,t,!0)},Wt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.mit=this.cit,u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},Q=Wt,i(b,s=n),b.prototype.resetProp=function(){s.prototype.resetProp.call(this),this.Hit=tt},b.prototype.match=function(t){var n,i,r,i,n,r,e,e=this;return t.every(function(t){return!!(n=t.match(e.pit))&&(i=n[2],(r=i.length)>e.yit&&p(i)&&(e.yit=r),r=parseInt(i,10),i=n[1],nt(e.cit)&&(e.cit=i),n=n[3],nt(e.Hit)&&(e.Hit=n),i!==e.cit||n!==e.Hit?(e.wit=!0,e.cit=tt,e.Hit=tt,e.sit=[]):e.sit.push(r),!0)})},b.prototype.getTargetValue=function(t,n,i,r,e){var o=this,u=t.ait,s=o.Tit,a=c(o.sit),u=u.length,l=0!==a,n=l?0:v(n,u),i=o.Git(i,r),r=tt,f;return o.Cit=l,o.Sit=o.getInternal(t._indexes),-1!==i&&(s.vit=o.cit,s.mit=o.Hit,s.MV=a,s.git=o.sit[n],s._padding=d(o.yit),r=s.Sl(f=u*e+i+1)),r},Y=["-","_",":",".",","],i(Bt,a=X=b),Bt.prototype.resetProp=function(){a.prototype.resetProp.call(this),this.zit=tt},Bt.prototype.match=function(t){var r,e,o,r,e,o,u,s,u=this;return t.every(function(n){var t,t,t,i,t=u.zit;if(s=nt(t)?Y.some(function(t){if(bt(n,t))return u.zit=t,!0}):bt(n,t)){if(t=u.zit,t=n.lastIndexOf(t),r=n.substring(0,t+1),nt(u.cit))u.cit=r;else if(u.cit!==r)return!1;if(t=n.substr(t+1),r=t.match(i=/^(\d+)(\D+.*)$/))return e=r[1],(o=e.length)>u.yit&&p(e)&&(u.yit=o),o=parseInt(e,10),e=r[2],nt(u.Hit)&&(u.Hit=e),e!==u.Hit?(u.cit=tt,u.Hit=tt,!(u.sit=[])):(u.sit.push(o),!0)}return!1})},Z=Bt,i($t,Dt=u),$t.prototype.getTargetValue=function(t,n,i){return Tt(!0,t.Bit(),i,n)},at=$t,i(zt,Ft=u),zt.prototype.getTargetValue=function(t,n,i,r){var t=t.ait,e,o;return t[v(n,t.length)]},lt=zt,Ut.prototype.getRule=function(t,n){var i,r,e,o,u,i=[],r=this.Nit;for(t===rt?(i=this.Iit,r=this.xit):t===et?i=this.kit:t===it&&(r=this.xit),e=0;e<i.length;e++)if(u=void 0,(o=i[e]).resetProp(),o.match(n)){if(u=o.wit,nt(u)||!1===u)return o;if(!0===u)return r}return r},Ut.prototype.L0=function(){var t=this;t.Iit&&(Gt(t.Iit),t.Iit=tt),t.kit&&(Gt(t.kit),t.kit=tt),t.xit&&(t.xit.dispose(),t.xit=tt),t.Nit&&(t.Nit.dispose(),t.Nit=tt)},t.nnt=Ut,j.prototype.qtt=function(t,n,i,r,e){var o=this,t=t?1:2;nt(r)&&nt(e)?o.$tt(n,i,t):o.$tt(n,i,t,r,e,tt)},j.prototype.$tt=function(t,n,i,r,e,o){var u,s,t,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,t,b,j,p,R,T,u=this,s=u.Mf,t=s.JS(t),a=t.row,l=t.col,f=t.rowCount,c=t.colCount;if(s.Ut.eE(a,l,f,c))throw new Error(k().Exp_RangeContainsMergedCell);for(m=0,_=(y=1===n)?c:f,D=y?a+f:l+c,F=(w=3<arguments.length)?1:_,b=(t=this.Mf.rt.Ktt).row===a&&t.rowCount===f&&t.col>l||t.col===l&&t.colCount===c&&t.row>a,h=C=y?a:l;h<D;h++)if(p=b&&w?a+f-1:a,(R=y?u.Vit(h,j=b&&w?l+c-1:l,1,F,n):u.Vit(p,h,F,1,n))&&R.jit())for(g=R._indexes[0],w?(p=b?R.oit[M(R.oit)-1]:R.oit[0],v=u.Yit(b,p,_,i,r,e,o),b&&(m=_-M(v),g=R._indexes[M(R._indexes)-1])):v=u.Zit(R,_,i),d=0;d<M(v);d++)T=R.Lit(v[d]),y?u.Wit(s,h,g,h,l+m+d,T,i):u.Wit(s,g,h,a+m+d,h,T,i)},j.prototype.Vit=function(t,n,i,r,e){for(var o=tt,u=this.Mf,s,a=1===e,l=a?n+r-1:t+i-1,f=a?n:t;f<=l;)ut(s=a?u.getValue(t,l):u.getValue(l,n))&&(o=o||new ot(f)).Eit(0,l,s),l--;return o},j.prototype.Yit=function(t,n,i,r,e,o,u){for(var s,a,l,f,c,h,v,s=[],a=n,f=0<=e,c=nt(o),l=0;l<i;l++)h=o<=a,v=a<=o,t&&(c||f&&h||!f&&v)?(s.unshift(a),1===r?a-=e:2===r?a/=e:3!==r||nt(u)||(a=this.Qit(!0,u,n,a,e,l+1))):!t&&(c||f&&v||!f&&h)&&(s.push(a),1===r?a+=e:2===r?a*=e:3!==r||nt(u)||(a=this.Qit(!1,u,n,a,e,l+1)));return s},j.prototype.Zit=function(t,n,i){var r=[],e,o=1===i;if(o||2===i){for(1===t.jit()&&t.ZP(t._indexes[0]+1,o?t.Lit(t.oit[0]+1):t.Oit()[0]),e=0;e<n;e++)r.push(Tt(!!o,t.Bit(),t.Rit(),e+1));return r}return tt},j.prototype.Jtt=function(t,n,i,r,e,o){var u,s,a,t,l,f,c,t,s,h,v,a,u=this,s=u.Mf,a=s.Ut,t=s.JS(t),l=t.row,f=t.col,c=t.rowCount,t=t.colCount,s=s.JS(s.rt.Ktt),h=s.row,v=s.col;if(a.GT(h,v,s.rowCount,s.colCount)||a.GT(l,f,c,t))throw new Error(k().Exp_ChangeMergedCell);return a=u.Kit(s,c,t,n,i,!(l<h||f<v),r,e,o),u.Jit&&u.Jit.IB&&(u.Jit.IB.reFilter(),delete u.Jit),a},j.prototype.Kit=function(t,n,i,r,e,o,u,s,a){var l=this,f=o?1:-1,c,h,v,d,g=t.row,p=t.col,w=t.rowCount,m=t.colCount;if(1===r){if(c=C(i/m),h=i%m,!e)for(d=1;d<c;d++)l.Mf.Y1r=d*f,v=D(g,p+d*f*m,w,m),l.Fhe(t,v,r,4,e,o,_,_,!0,u,s),l.Xit(t,v,r,4,e,o,_,_,!0,u,s),delete l.Mf.Y1r;if(e&&1<c&&0===h&&(c-=1,h=m),0<c&&0<h)return v=D(g,o?p+c*m:p-c*m+m-h,w,h),l.Fhe(t,v,r,4,e,o,tt,o?0:m-h,_,u,s),l.Xit(t,v,r,4,e,o,tt,o?0:m-h,_,u,s)}else{if(c=C(n/w),h=n%w,l.Dit||(v=D(g+f*w,p,n-w,i),l.qit(t,v,f,a)),!e)for(d=1;d<c;d++)v=D(g+d*f*w,p,w,m),l.Fhe(t,v,r,4,e,o,tt,tt,!0,u,s),l.Xit(t,v,r,4,e,o,tt,tt,!0,u,s);if(e&&1<c&&0===h&&(c-=1,h=w),0<c&&0<h)return v=D(o?g+c*w:g-c*w+w-h,p,h,m),l.Fhe(t,v,r,4,e,o,o?0:w-h,tt,!0,u,s),l.Xit(t,v,r,4,e,o,o?0:w-h,tt,!0,u,s)}},j.prototype.Xit=function(t,n,V,i,r,e,H,N,o,u,s){for(var a,l,P,f,c,h,v,d,q,g,L,p,W,w,B,m,y,_,C,D,F,b,$,z,U,j,R,T,M,G,k,x,c,K,I,J,Q,X,O,A,Y,S,E,Z,a=this,l=a.Mf,P=l.Ut,f=1===V,q=f?t.row:t.col,g=f?t.col:t.row,L=f?n.row:n.col,p=f?n.col:n.row,W=f?t.rowCount:t.colCount,w=f?t.colCount:t.rowCount,B=f?n.colCount:n.rowCount,v=0;v<W;v++){for(_=0,F=C=q+v,b=D=L+v,$=(f?N:H)||0,z=f?0:$,U=f?tt:o,j=y=m=tt;_<w;)if(M=void 0,G=R=g+_,k=T=p+_-$,f||(C=R,R=F,D=T,T=b),h=P.findSpan(C,R),M=l.getValue(C,R),(x=a.Dit)&&nt(j)&&(j=!1===e?l.getValue(g+w-1,R):l.getValue(C,R)),x||4!==i||!ut(M)&&!st(M)||l.hasFormula(C,R)||(m=m||new ot,c=ut(M)?M instanceof Date?rt:it:et,(y=y||c)!==c))if(!x&&M&&m&&m.jit()){if(d=a.$it(f,t,n,F,b,m,r,e,z,U,u,s),r&&d)return d;y=m=tt}else{if(x||!h||h&&(f?h.row:h.col)===F)if(c=k===p+B-1,K=x?j:M,r){if(x)return K;if(h&&c||!h&&(c&&e||!e&&k===p))return M}else!(k<p+B&&p<=k)||!x&&!f&&(f||o&&l.XT&&l.XT(k))||x&&-1!==a._it.indexOf(D)||a.Wit(l,C,R,D,T,K,i,u,s);h?_+=f?h.colCount:h.rowCount:_++}else m.ZP(G,M),h?_+=f?h.colCount:h.rowCount:_++;if(a.Dit)for(I=t.row,J=t.col,Q=t.rowCount,X=t.colCount,A=O=void 0,Y=!1===e?-1:1,S=1;S<Q;S++)for(O=I+Y*S,E=0;E<X;)A=J+E,Z=!1===e?l.getValue(g+w-1,A):l.getValue(I,A),-1===a._it.indexOf(O)&&a.Wit(l,I,J,O,A,Z,i,u,s),E++;if(m&&m.jit()&&(d=a.$it(f,t,n,F,b,m,r,e,z,o,u,s),r)&&!nt(d))return d}return tt},j.prototype.Fhe=function(t,n,V,i,r,e,H,N,P,o,u){var s,a,q,l,f,c,h,v,d,L,g,W,p,B,w,$,m,y,_,C,D,F,b,j,z,U,R,T,M,k,G,x,c,c,h,I,K,J,Q,O,A,X,S,E,Y;if(!r){for(l=(q=(a=(s=this).Mf).Ut).Ehe(),L=(f=1===V)?t.row:t.col,g=f?t.col:t.row,W=f?n.row:n.col,p=f?n.col:n.row,B=f?t.rowCount:t.colCount,w=f?t.colCount:t.rowCount,$=f?n.colCount:n.rowCount,d=0;d<B;d++){for(_=0,F=C=L+d,b=D=W+d,j=(f?N:H)||0,z=f?0:j,U=f?tt:P,R=y=m=tt;_<w;)k=tt,G=T=g+_,x=M=p+_-j,f||(C=T,T=F,D=M,M=b),v=q.findSpan(C,T),c=a.getValueIgnoreDefault(C,T),nt(c)?_++:((c=l.getFormula(C,T))&&""!==c||(k=l.getValue(C,T)),(c=s.Dit)&&nt(R)&&(R=!1===e?l.getValue(g+w-1,T):l.getValue(C,T)),c||4!==i||!ut(k)&&!st(k)||(m=m||new ot,h=ut(k)?k instanceof Date?rt:it:et,(y=y||h)!==h)?!c&&k&&m&&m.jit()?(s.$it(f,t,n,F,b,m,r,e,z,U,o,u,!0),y=m=tt):((c||!v||v&&(f?v.row:v.col)===F)&&(h=c?R:k,!(x<p+$&&p<=x)||!c&&!f&&(f||P&&a.XT&&a.XT(x))||c&&-1!==s._it.indexOf(D)||s.Wit(a,C,T,D,M,h,i,o,u,!0)),v?_+=f?v.colCount:v.rowCount:_++):(m.ZP(G,k),v?_+=f?v.colCount:v.rowCount:_++));if(s.Dit)for(I=t.row,K=t.col,J=t.rowCount,Q=t.colCount,A=O=void 0,X=!1===e?-1:1,S=1;S<J;S++)for(O=I+X*S,E=0;E<Q;)Y=!1===e?l.getValue(g+w-1,A):l.getValue(I,A),A=K+E,-1===s._it.indexOf(O)&&s.Wit(a,I,K,O,A,Y,i,o,u,!0),E++;m&&m.jit()&&s.$it(f,t,n,F,b,m,r,e,z,U,o,u,!0)}return tt}},j.prototype.qit=function(t,n,i,r){var e,o,u,n,s,a,n,l,f,t,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,e=this,o=e.Mf,u=o.tables,n=t.union(n),s=n.row,a=n.rowCount,n=t.row,l=t.col,f=t.rowCount,t=t.colCount;if(u)for(h=0,v=c=u.AB(n,l,f,t);h<v.length;h++){if(g=(d=v[h]).Ky,p=d.iw,w=a,r)for(m=0,y=r;m<y.length;m++)if((_=y[m]).row===g&&_.col===p){w=_.rowCount,e.Jit=d;break}if(C=d.IB,D=e._it,F=void 0,C&&C.isFiltered&&C.isFiltered()){for(b=0;b<w;b++)C.isRowFilteredOut(F=s+i*b)&&e._it.push(F);if(0<D.length){e.Dit=!0;break}}}if(j=o.IB,!0!==e.Dit&&j&&j.isFiltered&&j.isFiltered()){for(D=e._it,F=void 0,b=0;b<a;b++)j.isRowFilteredOut(F=s+i*b)&&e._it.push(F);0<D.length&&(e.Dit=!0)}},j.prototype.Wit=function(t,n,i,r,e,o,u,s,a,l){var f,c,c,c,u,f=t.Ut,c=t.isActualProtected()&&t.getCell(n,i).hidden();x&&!c&&(l?((c=f.Ehe().getExpression(n,i))&&t.hasFormula(n,i,3,!0)||!nt(t.getValueIgnoreDefault(n,i)))&&(0,h.copyDefaultFormula)(t,t,r,e,c):(t.hasFormula(n,i,3)||t.hasFormula(r,e,3))&&(t.setFormula(r,e,tt),0!==u&&4!==u||(t.getFormula(n,i)||f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Expression))&&T.CalcOperatorAdjustor.copyFormula(t,n,i,t,r,e,1,1,_,!0))),l||nt(t.getValueIgnoreDefault(n,i))&&!nt(f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Value))?f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Expression)||f.setDefaultValue(r,e,o,_,h.DefaultChangeValueType.Value):t.setValue(r,e,o),l||(c=a?0:64,s&&(c|=4224),t.vT(n,i,r,e,1,1,c=c|1024|256,_,!0),a)||(t.removeSpan(r,e,3),(u=f.findSpan(n,i))&&n===u.row&&i===u.col&&t.EL(r,e,u.rowCount,u.colCount,3))},j.prototype.$it=function(t,n,i,r,e,o,u,s,a,l,f,c,h){var v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,k,x,T,I,M,T,v=this,d=v.Mf,y=t?i.col:i.row,_=t?n.col:n.row,C=t?i.colCount:i.rowCount,D=t?n.colCount:n.rowCount;if(a=a||0,F=o.jit(),b=(y-_-a)/D,j=v.Cit(o._indexes,o.oit),R=o._type,j){for(w=[],p=0;p<F;p++)w[p]=p+1;g=F}else m=o._indexes[0],g=o._indexes[F-1]-m+1,1===F&&R!==et&&o.ZP(o._indexes[0]+1,o.Lit(o.oit[0]+1)),w=o.Rit();for(p=0;p<g;p++)if(T=o.ait,x=k=M=void 0,I=y+C-1,T=(M=(x=(M=R!==rt&&R!==et?M:d.tnt&&d.tnt.getRule(R,T))?(k=M.getTargetValue(o,g*b+p+1,w,p,b),j=M.Cit||j,T=M.Sit||!1,j&&!T):(k=Tt(!0,o.Bit(),w,g*b+p+1),j))?o._indexes[p]:m+p)+b*D,u){if(j&&(s&&T===I||!s&&T===y)||!j&&T+a===I)return o.Lit(k)}else T<y+C&&y<=T&&(t?l&&d.XT&&d.XT(r)||v.Wit(d,r,M,e,T,o.Lit(k),4,f,c,h):l&&d.XT&&d.XT(T)||v.Wit(d,M,r,T,e,o.Lit(k),4,f,c,h));return tt},j.prototype.Cit=function(t,n){var i,r,e,o,i=M(n);if(i<=1||M(t)!==i)return!1;for(r=t[1]-t[0],e=n[1]-n[0],o=2;o<i;o++)if(t[o]-t[o-1]!=r||n[o]-n[o-1]!=e)return!1;return!0},j.prototype.Xtt=function(t,n){var i=this,r=this.Mf,e=r.Ut.getSpans(),t=r.JS(t),o=t.row,u=t.col,s=t.rowCount,t=t.colCount,a,a=0===n?D(o,u+t-1,s,1):1===n?D(o,u,s,1):D(2===n?o+s-1:o,u,1,t);(a=r.nR(e,a))&&i.trt(a,o,u,s,t,n)},j.prototype.trt=function(t,n,i,r,e,o){var u=this,s=t.row,a=t.col,l=t.rowCount,f=t.colCount,c,h,v,d,g,p,w,m=u.Mf.Ut,y,g=0===o?(y=m.eE(n,i,r,e-f),p=0,w=-1*f,v=e,d=f,1):1===o?(y=m.eE(n,i+f,r,e-f),p=0,v=e,d=w=f,1):w=(d=2===o?(y=m.eE(n,i,r-l,e),p=-1*l,v=r,l):(y=m.eE(n+l,i,r-l,e),v=r,p=l),0);if(y)throw new Error(k().Exp_TargetContainsMergedCells);if(v%d!=0)throw new Error(k().Exp_MergedCellsIdentical);for(c=C(v/d),h=1;h<c;h++)u.Xit(t,D(s+h*p,a+h*w,l,f),g,0,_,_,_,_,!0)},j.prototype.Qit=function(t,n,i,r,e,o){var u,t,s,a,u=t?-1:1,t=C(o*e),s=Math.abs(e),a=S(1<n?i:r);if(0===n)a.setDate(a.getDate()+u*e);else if(1===n)for(;0<s;)a.setDate(a.getDate()+u*(0<e?1:-1)),6!==a.getDay()&&0!==a.getDay()&&s--;else 2===n?a.setMonth(a.getMonth()+u*t):a.setFullYear(a.getFullYear()+u*t);return A(a)},t.Wtt=j},"./dist/plugins/fill/fill.ns.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SR=void 0;var i=i("./dist/plugins/fill/fill.res.en.js");n.SR={en:i}},"./dist/plugins/fill/fill.res.en.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Exp_ChangePartOfArray=n.Exp_RangeIsNull=n.Exp_CellReadOnly=n.Exp_RowReadOnly=n.Exp_ColumnReadOnly=n.Exp_ChangeMergedCell=n.Exp_FillCellsReadOnly=n.Exp_FillRangeContainsMergedCell=n.Exp_MergedCellsIdentical=n.Exp_TargetContainsMergedCells=n.Exp_RangeContainsMergedCell=n.Exp_NumberOnly=n.FillWithoutFormatting=n.FillFormattingOnly=n.FillSeries=n.CopyCells=void 0,n.CopyCells="Copy Cells",n.FillSeries="Fill Series",n.FillFormattingOnly="Fill Formatting Only",n.FillWithoutFormatting="Fill Without Formatting",n.Exp_NumberOnly="Only works for Numbers",n.Exp_RangeContainsMergedCell="Range should not have merged cells.",n.Exp_TargetContainsMergedCells="Target range should not have merged cells.",n.Exp_MergedCellsIdentical="This operation requires the merged cells to be identically sized.",n.Exp_FillRangeContainsMergedCell="Cannot fill range that contains a merged cell.",n.Exp_FillCellsReadOnly="The cells you are trying to fill are protected and therefore read-only.",n.Exp_ChangeMergedCell="Cannot change part of merged cell.",n.Exp_ColumnReadOnly="The column you are trying to change is protected and therefore read-only.",n.Exp_RowReadOnly="The row you are trying to change is protected and therefore read-only.",n.Exp_CellReadOnly="The cell you are trying to change is protected and therefore read-only.",n.Exp_RangeIsNull="range is null",n.Exp_ChangePartOfArray="Cannot change part of an array."},"./dist/plugins/fill/utils.js":function(t,n,i){var f,o,u,c,s,h;function r(t){return t.rowViewportIndex}function e(t){return t.colViewportIndex}function a(t){return t.frozenRowCount()}function l(t){return t.frozenColumnCount()}function v(t){return t.hitTestType}function d(t,n){return t.getRowCount(n)}function g(t,n){return t.getColumnCount(n)}function p(t){return t.colCount}function w(t){return t.rowCount}function m(t){return t.height}function y(t){return t.width}function _(t){var n,t,n=7,t=t.parent;return n=t?2007<t.SC?2:7:n}function C(t,n,i,r,e,o,u){var s,a,l;t.save(),o=o||h,u=u||2,n===r?(t.rect(n-2,i,7,c(e-i)),t.clip(),t.beginPath(),i<e?(i-=3,e+=3):(i+=3,e-=3),s=(0,f.Zx)(n-1,i-1,r-1,e+1,o,u),a=(0,f.Zx)(n,i,r,e,o,u),l=(0,f.Zx)(n+1,i-1,r+1,e+1,o,u)):i===e&&(t.rect(n,i-2,c(r-n),7),t.clip(),t.beginPath(),n<r?(n-=3,r+=3):(n+=3,r-=3),s=(0,f.Zx)(n-1,i-1,r+1,e-1,o,u),a=(0,f.Zx)(n,i,r,e,o,u),l=(0,f.Zx)(n-1,i+1,r+1,e+1,o,u)),s&&s.qx(t),a&&a.qx(t),l&&l.qx(t),t.strokeStyle=o,t.stroke(),t.beginPath(),t.restore()}function D(t,n,i,r,e){for(var o,u,s,o=0;o<i.rowCount;o++){for(u=0;u<i.colCount;u++){if(!(s=t.getSpan(i.row+o,i.col+u))||s.rowCount!==n.rowCount||s.colCount!==n.colCount)return!1;r&&(u+=n.colCount)}e&&(o+=n.rowCount)}return!0}function F(t,n,i){var r,e,o,u,s,a,l,f,e,u,r,r=n.row,e=n.rowCount,o=n.col,u=n.colCount,s=i.row,a=i.rowCount,l=i.col,f=i.colCount,e=r===s&&e===a,u=o===l&&u===f;return(e||u)&&!(!(r=t.getSpan(r,o))||!D(t,r,n,e,u)||t.Ut.GT(s,l,a,f))&&D(t,r,i,e,u)}function b(t){return t.x+t.width}function j(t){return t.y+t.height}function R(t,n){var i,r,r,e,r,o,i=t.rt.eD(),r=t.Yy(i);return(r=r&&r.findNearX(n,t.options.rightToLeft))?(e=t.Fi(),r=r.col,1===i&&n<e.Py&&(o=t.Sw())<r&&t.O5(r-1)||r):-1}function T(t,n){var i,i,i,r,i,e,i=t.rt.nD(),i=t._y(i);return(i=i&&i.findNearY(n,t.options.rightToLeft))?(r=t.Fi(),i=i.row,n<r.Cy&&(e=t.pw())<i&&t.j5(i-1)||i):-1}function M(t){t.dragHeaderToMoveInfo&&(t.dragHeaderToMoveInfo.dragColumn?t.rowViewportIndex<0&&(t.rowViewportIndex=0):t.colViewportIndex<0&&(t.colViewportIndex=0),t.hitTestType=3)}function k(t,n){var i,r,e,t,i,r,e,t;return t||n?!t&&n?n:t&&!n?t:(i=t.x,r=t.y,e=b(t),t=j(t),i=u(i,n.x),r=u(r,n.y),e=s(e,b(n)),t=s(t,j(n)),new f.Rect(i,r,e-i,t-r)):o}function x(t){return t.frozenColumnCount()>=t.getColumnCount()?0:0<t.frozenTrailingColumnCount()?2:1}function I(t){return t.frozenRowCount()>=t.getRowCount()?0:0<t.frozenTrailingRowCount()?2:1}function O(t){var n,i,n,r,n,e,o,t,u,s,n=t.Fi(),i,n=t.options.rightToLeft?n.c9(0,2):n.c9(0,0),r=n.x,n=n.y,e=x(t),o=I(t),t=t.Dn.uO(o,e),u,s;return{minPoint:{x:r,y:n},maxPoint:{x:b(t),y:j(t)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.getSheetVPortBoundary=n.mergeRect=n.fixHitTestInfo=n.getHitRowIndex=n.getHitColumnIndex=n.getEndY=n.getEndX=n.canDragFillSpan=n.hasSameSpan=n.paintDragLine=n.getLineStyle=n.getWidth=n.getHeight=n.getRowCount=n.getColCount=n.getSheetColumnCount=n.getSheetRowCount=n.getHitTestType=n.getFrozenColumnCount=n.getFrozenRowCount=n.getColViewportIndex=n.getRowViewportIndex=void 0,f=i("Core"),o=null,u=Math.min,c=Math.abs,s=Math.max,h="black",n.getRowViewportIndex=r,n.getColViewportIndex=e,n.getFrozenRowCount=a,n.getFrozenColumnCount=l,n.getHitTestType=v,n.getSheetRowCount=d,n.getSheetColumnCount=g,n.getColCount=p,n.getRowCount=w,n.getHeight=m,n.getWidth=y,n.getLineStyle=_,n.paintDragLine=C,n.hasSameSpan=D,n.canDragFillSpan=F,n.getEndX=b,n.getEndY=j,n.getHitColumnIndex=R,n.getHitRowIndex=T,n.fixHitTestInfo=M,n.mergeRect=k,n.getSheetVPortBoundary=O},Common:function(t){t.exports=n.Spread},CalcEngine:function(t){t.exports=n.Spread.CalcEngine},Core:function(t){t.exports=n.Spread.Sheets},SheetsCalc:function(t){t.exports=n.Spread.Sheets.CalcEngine},Touch:function(t){t.exports=n.Spread.Sheets.Touch}},r={},t=e("./dist/plugins/fill/fill.entry.js"),(((n=void 0===n?{}:n).Spread=n.Spread||{}).Sheets=n.Spread.Sheets||{}).Fill=t}()});
|
|
12
|
+
!function(t){var n;"object"==typeof module&&"object"==typeof module.exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),module.exports=t(n)):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-common","@grapecity-software/spread-calc-engine","@grapecity-software/spread-sheets-core","@grapecity-software/spread-sheets-calc-engine"],t):"object"==typeof exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),exports.Spread=t(n)):t(GC)}((function(t){!function(){"use strict";var n,i={"./dist/plugins/fill/drag-fill.js":function(t,n,i){var r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,k,x,I,O,A,S,E,V,H,N,P=this&&this.qKr||(q=function(t,n){return q=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])},q(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}q(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),q;function L(t,n,i,r,o,u,s,a,l,f,c){var h=n?e.Events.DragDropBlock:e.Events.DragDropBlockCompleted,v={sheet:t,sheetName:t.name(),fromRow:i,fromCol:r,toRow:o,toCol:u,rowCount:s,colCount:a,copy:l,insert:f,copyOption:c};return n&&(v.cancel=!1),t.ki(h,v),v}function W(t,n,i,r){return!!(t&&n&&n.containsRange(t))&&(!c(i)&&(1===i&&t.row===n.row&&(0,l.getRowCount)(t)===(0,l.getRowCount)(n)||0===i&&t.col===n.col&&(0,l.getColCount)(t)===(0,l.getColCount)(n))||!(c(r)||(2!==r&&3!==r||t.col!==n.col||(0,l.getColCount)(t)!==(0,l.getColCount)(n))&&(0!==r&&1!==r||t.row!==n.row||(0,l.getRowCount)(t)!==(0,l.getRowCount)(n))))}function B(t,n,i,r,e,o){var u,s,a,l=t.getSelections();t.IA(),t.n4(n,i,r,e,!0),u=t.getSelections(),s=n>0?n:t.N9(),a=i>0?i:t.k9(),t.O6(s,a,t.R9,t.B9),t.jA(l),t.parent&&o._oldPosition&&t.parent.changeSelectionInCommandExecuting(o,null,null,u)}function $(t){var n;t.parent.repaint()}Object.defineProperty(n,"__esModule",{value:!0}),r=i("Common"),e=i("Core"),o=i("./dist/plugins/fill/fill.js"),u=i("./dist/plugins/fill/fill.ns.js"),s=i("CalcEngine"),a=i("Touch"),l=i("./dist/plugins/fill/utils.js"),f=!!s,c=r.Common.lt.ht,h=null,v=void 0,d=e.Ec,g=e.GC$,p=Math.max,w=Math.floor,m=e.Commands.ActionBase,y=e.Commands.CI,_=e.Commands.SI,C=e.CopyToOptions.all,D="startRange",F="fillRange",b="autoFillType",j="fillDirection",R="cancel",T="fill",M="dragDrop",k=g.isEmptyObject,x="onLayoutChanged",I=new r.Common.ResourceManager(u.SR,"Fill"),O=I.getResource.bind(I),A="gc-drag-header-mask",S="gc-drag-header-indicator",E={fillAuto:function(t,n,i){if(!n)throw new Error(O().Exp_RangeIsNull);var e=this,u=i.fillType,s=i.series,a=i.direction,l=i.step,f=i.stop,v=new o.Wtt(e),d=i.Qtt;if(W(t,n,a?h:s,a)){e.suspendPaint(),t&&(e.rt.Ktt=t);try{4===u?v.Jtt(n,s,!1,i.withTag,i.withoutStyle,d):0===u?v.Xtt(n,a):1===u||2===u?v.qtt(1===u,n,s,l,f):3===u&&v.$tt(n,s,3,l,c(f)?h:r.Common.ct.o0(f),i.unit)}finally{e.resumePaint()}}},tBe:function(){var t,n;return(null===(n=null===(t=null==this?void 0:this.parent)||void 0===t?void 0:t.options)||void 0===n?void 0:n.dragHeaderMaskBackColor)||e.I.fl(A).backgroundColor},nBe:function(){var t,n;return(null===(n=null===(t=null==this?void 0:this.parent)||void 0===t?void 0:t.options)||void 0===n?void 0:n.dragHeaderIndicatorColor)||e.I.fl(S).borderTopColor}},g.extend(e.Worksheet.prototype,E),e.Worksheet.ch(T,{init:function(){this.tnt=new o.nnt(this)},setHost:function(t){if(t){var n=this.Qy();n[T]||n.register(T,e.Commands[T]),n[M]||n.register(M,e.Commands[M]),this.D3(e.Events.TopRowChanged+"."+T,(function(t,n){var i=n.sheet.R_;i&&i.RRe()})),this.D3(e.Events.LeftColumnChanged+"."+T,(function(t,n){var i=n.sheet.R_;i&&i.RRe()})),this.D3(e.Events.ViewZoomed+"."+T,(function(t,n){var i=n.sheet.R_;i&&i.close()})),this.D3(e.Events.EditStarted+"."+T,(function(t,n){var i=n.sheet.R_;i&&i.close()})),this.D3(e.Events.FloatingObjectSelectionChanged+"."+T,(function(t,n){var i=n.sheet.R_;i&&i.close()})),this.D3(e.Events.ShapeSelectionChanged+"."+T,(function(t,n){var i=n.sheet.R_;i&&i.close()}))}},dispose:function(t){if(!1!==t.clearCache){var n=this;n.tnt&&(n.tnt.L0(),n.tnt=h)}this._3(e.Events.TopRowChanged+"."+T),this._3(e.Events.LeftColumnChanged+"."+T),this._3(e.Events.ViewZoomed+"."+T),this._3(e.Events.EditStarted+"."+T),this._3(e.Events.FloatingObjectSelectionChanged+"."+T),this._3(e.Events.ShapeSelectionChanged+"."+T)},preProcessKeyDown:function(t){var n=this.R_;n&&n.close()},preProcessMouseDown:function(t){var n=this.R_;n&&n.close()},preProcessContextMenu:function(t){var n=this.R_;n&&n.close()}}),e.Workbook.ch(T,{onCultureChanged:function(){O()}}),e.Hv.ch(T,{preProcessMouseDown:function(t){var n=(0,e.jf)(this.Vv),i=n&&n.R_;i&&i.close()}}),e.Of.touch&&a.TouchEventHandler.ch(T,{preProcessManipulationStarted:function(t){var n=this.Mf.R_;n&&n.close()},preProcessTapped:function(t){var n=this.Mf.R_;n&&n.close()},preProcessDoubleTapped:function(t){var n=this.Mf.R_;n&&n.close()}}),window.gcGlobal.wf.push((function(t,n){var i;n&&!e.util.jBe(n,t)||null===(i=t.R_)||void 0===i||i.close()})),V=function(t){function n(n,i){var r=t.call(this)||this,o=r,u=i[j],s=0===u,a=s||1===u,f=i[F],c=i[D],h=c.row,v=c.col,g=(0,l.getRowCount)(c),p=(0,l.getColCount)(c);return o.Mf=n,o.Ftt=i,4===i[b]?o.Ptt=new e.Commands.JI(n,{ranges:[i[F]]}):o.Gtt=a?d(h,s?f.col:v,g,p+(0,l.getColCount)(f)):d(2===u?f.row:h,v,g+(0,l.getRowCount)(f),p),o.Utt=a?1:0,r}return P(n,t),n.prototype.canExecute=function(){var t=this,n=t.Mf,i=t.Ftt,r=i[D],o=i[F];return!!n.PT(o.row,o.col,(0,l.getRowCount)(o),(0,l.getColCount)(o),{isIgnoreFilterOutRow:!0,sheetArea:e.SheetArea.viewport})&&(4===i[b]||!o.intersect(r.row,r.col,(0,l.getRowCount)(r),(0,l.getColCount)(r)))},n.prototype.execute=function(){var t,n,i,r,o,u,s=this;if(s.canExecute()){n=(t=s.Ftt)[F],r=(i=s.Mf).parent.i4(),e.Commands.II(r),s.X5(i,!0);try{f&&i.suspendCalcService(),o=i.getSelections(),i.isDirtySuspended()||(s.ent=new y(i,t[F],C)),4===t[b]?s.int(i):s.rnt(i),i.EA(o,i.getSelections())&&i.jA(o)}finally{s.q5(i,!0),f&&i.resumeCalcService(!1),e.Commands.xI(r,t),i.Q1i&&i.Q1i(n.row,n.col,(0,l.getRowCount)(n),(0,l.getColCount)(n)),u=[],i.isDirtySuspended()||(s.ont=new y(i,n,C),s.ont.yI(s.ent.bI()),u=s.ont.MI()),_(i,n.row,n.col,(0,l.getRowCount)(n),(0,l.getColCount)(n),u,1)}}},n.prototype.int=function(t){var n,i,r,e,o,u,s,a,f,c=this;c.Ptt.execute(t),i=(n=c.Ftt)[D],r=n[F],e=0===c.Utt,u=(0,l.getRowCount)(i),s=(0,l.getColCount)(i),a=e?p(1,u-(0,l.getRowCount)(r)):u,f=e?s:p(1,s-(0,l.getColCount)(r)),i.equals(r)||(o=d(i.row,i.col,a,f),t.O6(p(t.N9(),o.row),p(t.k9(),o.col),t.R9,t.B9),t.IA(),t.n4(o.row,o.col,(0,l.getRowCount)(o),(0,l.getColCount)(o)))},n.prototype.rnt=function(t){var n,i,r,o,u,s,a,f,c,d,g,m,y,_,C,R,T,M,k,x=this,I=x.Mf,O=x.Ftt,A=O[D],S=O[F],E=O[b],V=x.Gtt,H={fillType:4,series:x.Utt,withTag:!0,withoutStyle:!(I.lF&e.CopyToOptions.style)},N=I.tables,P=!1,q=new e.Range(V.row,V.col,V.rowCount,V.colCount);if(N)try{s=0===(o=O[j]),a=3===o,(u=2===o)&&(f=A.rowCount,(c=0===N.AB(A.row,A.col,f,A.colCount).length)&&(P=!0,q.rowCount-=f)),s&&(d=A.colCount,(c=0===N.AB(A.row,A.col,A.rowCount,d).length)&&(P=!0,q.colCount-=d)),a&&(d=A.colCount,1===(g=N.AB(A.row,A.col,A.rowCount,d)).length&&(y=(m=g[0]).dataRange(),m.showFooter()&&S.row+S.rowCount-1>=m.footerIndex()&&(S.rowCount=y.rowCount-(S.row-y.row),V.rowCount=y.rowCount-(V.row-y.row)))),_=[],C=[],N.yx(h,q,v,v,v,_,{applyDragFillAfterTableExpand:P,backupTableResizedArgs:C,needCheckProtectionWhenSheetProtected:!0}),_.length>0&&(H.Qtt=_),x.eke=C}catch(t){return I.jT(6,t.message),void I.resumePaint()}if(1===E){if(I.fillAuto(A,V,H),I.lF&e.CopyToOptions.style&&I.Ut.eE(A.row,A.col,A.rowCount,A.colCount))for(i=0;i<S.rowCount;i++)for(r=0;r<S.colCount;r++)(R=I.vI(A.row+w(i%A.rowCount),A.col+w(r%A.colCount)))&&R.clone&&(R=R.clone()),I.CL(S.row+i,S.col+r,R)}else 0===E?(T=I.lF&~e.CopyToOptions.comment,x.ant(A,S,T)):2===E?x.ant(A,S,4320):3===E&&((M=!(1!==(0,l.getRowCount)(A)||1!==(0,l.getColCount)(A)||-1===A.row&&-1!==A.col||-1===A.col&&-1!==A.row))?(k=4251,x.ant(A,S,k)):(H.withoutStyle=!0,I.fillAuto(A,V,H)));I.O6(p(t.N9(),V.row),p(t.k9(),V.col),t.R9,t.B9),t.IA&&t.IA(),I.n4(V.row,V.col,(0,l.getRowCount)(V),(0,l.getColCount)(V)),null===(n=I.tables)||void 0===n||n.Fuo()},n.prototype.ant=function(t,n,i){var r,o,u,s,a,f,c=this,h=c.Mf,v=h.JS(t),d=h.JS(n),g=v.row,p=v.col,m=(0,l.getRowCount)(v),y=(0,l.getColCount)(v),_=d.row,C=d.col,D=(0,l.getRowCount)(d),F=(0,l.getColCount)(d),b=c.Ftt[j],R=3===b,T=1===b,M=w(D/m),k=D%m,x=w(F/y),I=F%y;if(h.HB=!0,f=function(t,n){return h.isActualProtected()&&h.getCell(t,n).hidden()},0===c.Utt){for(r=0;r<M;r++)s=R?_+r*m:_+D-(r+1)*m,f(g,p)&&(i&=~e.CopyToOptions.formula),h.vT(g,p,s,C,m,y,i,!0,!0);0!==k&&(s=R?_+m*M:_+D-M*m-k,f(o=R?g:g+(M+1)*m-D,p)&&(i&=~e.CopyToOptions.formula),h.vT(o,p,s,C,k,y,i,!0,!0))}else{for(r=0;r<x;r++)a=T?C+r*y:C+F-(r+1)*y,f(g,p)&&(i&=~e.CopyToOptions.formula),h.Y1r=a-p,h.vT(g,p,_,a,m,y,i,!0,!0),delete h.Y1r;0!==I&&(a=T?C+y*x:C+F-x*y-I,f(g,u=T?p:p+(x+1)*y-F)&&(i&=~e.CopyToOptions.formula),h.vT(g,u,_,a,m,I,i,!0,!0))}delete h.HB,h.recalcRange(_,C,D,F)},n.prototype.undo=function(){var t,n,i,r,e=this,o=e.Mf,u=!1;if(e.canUndo()){e.X5(o,!0);try{f&&o.suspendCalcService(),t=o.getSelections(),n=e.Ftt,i=o.R_,r=n[F],u=4===n[b]?e.unt(o):e.snt(o),!o.cnt&&i&&i.close(),_(o,r.row,r.col,(0,l.getRowCount)(r),(0,l.getColCount)(r),e.ont?e.ont.MI():[],1,v,!0),o.EA(t,o.getSelections())&&o.jA(t)}finally{e.q5(o,!0),f&&o.resumeCalcService(!1)}}return u},n.prototype.unt=function(t){var n=this,i=n.Ftt[D],r=i.row,o=i.col,u=e.Commands.TI(t.name());return t.Ut.undo(n.Ftt[u]),t.O6(p(t.N9(),r),p(t.k9(),o),t.R9,t.B9),!0},n.prototype.snt=function(t){var n,i=this,r=i.Ftt,o=r[D],u=o.row,s=o.col;f&&t.suspendCalcService();try{n=e.Commands.TI(t.name()),t.Ut.undo(r[n]),t.O6(p(t.N9(),u),p(t.k9(),s),t.R9,t.B9)}finally{f&&t.resumeCalcService(!1)}return t.invalidateLayout(),!0},n}(m),H=function(t){function n(n,i){var r=t.call(this)||this,e=r;return e.Mf=n,e.Htt=i,e.ztt=i[D],e.Vtt=i[F],e.Ytt=i[b],e.Ztt=i[j],r}return P(n,t),n.prototype.execute=function(){var t,n,i,r,o,u,s,a,l,f=this,c=!1;if(f.canExecute()){n=(t=f.Mf).parent,i=f.Vtt,r=f.Htt,o=t.parent.i4(),e.Commands.II(o),f.XI(),f.X5(t,!0),t.QI=!0;try{u=t.getSelections(),s=void 0,a=t.rt,(l={sheet:t,sheetName:t.name()})[R]=!1,l[F]=i,l[b]=f.Ytt,l[j]=f.Ztt,t.ki(e.Events.DragFillBlock,l),a.fnt=l[b],a.lnt=l[R],l[R]||(f.hnt(l),t.ki(e.Events.DragFillBlockCompleted,l)),c=!0,s=t.getSelections(),t.EA(u,s)&&t.jA(u),n&&r._oldPosition&&n.changeSelectionInCommandExecuting(r,null,null,s)}finally{f.dnt(t,i),f.q5(t,!0),t.QI=!1,e.Commands.xI(o,f.Htt)}}return c},n.prototype.hnt=function(t){var n,i,r=this,e=r.Mf,o=e.rt,u=r.Vtt,s=r.Ytt;o.fnt=s,o.lnt||((n={})[D]=r.ztt,n[F]=u,n[b]=5===t[b]?s:t[b],n[j]=r.Ztt,i=new V(e,n),e.suspendEvent(),i.execute(),e.resumeEvent(),r.Htt.vnt=i)},n.prototype.XI=function(){var t=this;t.Mf.isDirtySuspended()||(t.ent=new y(t.Mf,t.Vtt,C))},n.prototype.undo=function(){var t,n,i,r,o,u,s,a,l=this;if(l.canUndo()){n=l.Mf,i=l.Vtt,r=n.parent,o=l.Htt,l.XI(),l.X5(n,!0);try{u=n.getSelections(),n.suspendEvent(),n.Nj=!0,s=n.parent.i4(),e.Commands.NI(s,o),n.Nj=!1,n.resumeEvent(),a=o[D],n.EA(u,[a])&&n.jA(u),r&&o._oldPosition&&r.changeSelectionInCommandExecuting(o,null,null,[a]),(0,e.handleRestoredTableResizedArgs)(null===(t=o.vnt)||void 0===t?void 0:t.eke)}finally{l.dnt(n,i,!0),l.q5(n,!0)}}return!0},n.prototype.dnt=function(t,n,i){var r,e=this,o=[];t.isDirtySuspended()||((r=new y(t,n,C)).yI(e.ent.bI()),o=r.MI());try{_(t,n.row,n.col,(0,l.getRowCount)(n),(0,l.getColCount)(n),o,1,v,i)}catch(t){}},n}(m),N=function(t){function n(n,i){var r,e=this;return(e=t.call(this,n,i)||this).MU=null!==(r=i.option)&&void 0!==r?r:n.lF,e}return P(n,t),n.prototype.Spn=function(){return this.MU},n.prototype.PBe=function(t){this.MU=t},n.prototype.canExecute=function(){var t,n,i,r,o,u,s,a=this,f=a.Mf,c=a.tT,h=c.fromRow,v=c.fromColumn,d=(0,l.getRowCount)(c),g=c.columnCount,p=c.toRow,w=c.toColumn,m=!c.copy,y={row:h,col:v,rowCount:d,colCount:g},_={row:p,col:w,rowCount:d,colCount:g};if(f.tables&&f.tables.mx(f,y,f,_,m))return!1;if(!f.zT(h,v,d,g,(0,l.getSheetRowCount)(f),(0,l.getSheetColumnCount)(f)))return!1;if(!c.insert&&!f.zT(p,w,d,g,(0,l.getSheetRowCount)(f),(0,l.getSheetColumnCount)(f)))return!1;if(c.cmd===e.RangeChangedAction[0]&&f.tables&&(t=!1,(n=f.tables.AB(h,v,d,g)).length>0)){for(r=(i=n[0].range()).row;r<i.row+i.rowCount;r++)if(f.isRowFilterOut(r)){t=!0;break}return!(t&&i.contains(c.mouseTargetRow,c.mouseTargetCol,1,1))}return o=p>=0&&w<0&&h>=0&&v<0&&d>0&&g<0,u=p<0&&w>=0&&h<0&&v>=0&&d<0&&g>0,s=a.mnt(o,u),f.PT(p,w,d,g,{isAllowDragInsert:s,sheetArea:e.SheetArea.viewport})&&f.PT(h,v,d,g,{isAllowDragInsert:s,sheetArea:e.SheetArea.viewport})},n.prototype.mnt=function(t,n){var i,r,e=this,o=e.tT,u=e.Mf,s=o.insert,a=u.isActualProtected(),l=u.options.protectionOptions;return!(!a||k(l)||(i=l.allowDragInsertRows,r=l.allowDragInsertColumns,!s||!(i&&t||r&&n)))},n.prototype.execute=function(){var t,n,i,r,o,u,s,a,f,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,k,x,I,O,A,S=this,E=!1;if(S.canExecute()){if(n=S.Mf,i=S.tT,r=n.parent.i4(),o=i.fromRow,u=i.fromColumn,s=i.toRow,a=i.toColumn,f=i.columnCount,d=i.insert,g=i.copy,p=i.rowCount,e.Commands.II(r),(w=L(n,!0,o,u,s,a,p,f,g,d,n.lF)).cancel)return void e.Commands.xI(r,i);S.XI(),m=void 0,y=void 0,_=void 0,C=p,D=f,(F=n.o5())&&(C+=n.lT(s,p,!0),D+=n.lT(a,f)),S.X5(n,!0),n.QI=!0,b=void 0;try{this.PBe(w.copyOption);try{j=[],b={shiftCells:i.insert&&i.shiftCells===e.InsertShiftCell.down,isCopy:i.copy,isFirst:!0},n.tables&&n.tables.yx(n,new e.Range(s,a,C,D),new e.Range(o,u,p,f),h,h,h,{shiftInfo:b,backupTableResizedArgs:j}),i.Kh.eke=j}catch(t){return n.jT(6,t.message),void n.resumePaint()}i.insert?u>=0&&o<0?(m=u,y=a,_=f,R=a,this.Jcr(n,m,y,_)&&(n.WBe(y,_,v,{ignoreExpand:!0}),i.copy?n.copyTo(-1,y<=m?m+_:m,-1,y,-1,_,this.Spn()):(n.moveTo(-1,y<=m?m+_:m,-1,y,-1,_,this.Spn(),void 0,n.getRowCount()<1),n.deleteColumns(y<=m?m+_:m,_),m<y&&(R=y-_)),B(n,-1,R,(0,l.getSheetRowCount)(n),_,i))):o>=0&&u<0?(m=o,y=s,_=p,T=s,this.Kcr(n,m,y,_)&&(n.ffe(y,_,v,{ignoreExpand:!0}),i.copy?n.copyTo(y<=m?m+_:m,-1,y,-1,_,-1,this.Spn()):(n.moveTo(y<=m?m+_:m,-1,y,-1,_,-1,this.Spn(),void 0,n.getColumnCount()<1),n.deleteRows(y<=m?m+_:m,_),m<y&&(T=y-_)),B(n,T,-1,_,(0,l.getSheetColumnCount)(n),i))):o>=0&&u>=0&&(M=i.shiftCells,k=new e.Range(s,a,1,1),x=[new e.Range(o,u,p,f)],c(M)||(I={cmd:"clipboardPaste",sheetName:n.name(),clipboardHtml:"",clipboardImage:"",clipboardText:"",fromRanges:x,fromSheet:n,isCutting:!i.copy,pasteOption:0,pastedRanges:[new e.Range(s,a,p,f)],_acCell:k,_dataRange:x,_shiftCells:M,_fromDragFill:!0,_ignoreTableFooterShiftIndex:b&&b.ignoreFooterShiftIndex},n.Qy().execute(I),O=n.getSelections()[0],M===e.InsertShiftCell.down&&s>o&&!i.copy&&u===a?n.setSelection(O.row-p,O.col,O.rowCount,O.colCount):M===e.InsertShiftCell.right&&a>u&&!i.copy&&o===s&&n.setSelection(O.row,O.col-f,O.rowCount,O.colCount))):(i.copy?n.copyTo(o,u,s,a,p,f,this.Spn()):n.moveTo(o,u,s,a,p,f,this.Spn()),n&&(B(n,s,a,C,D,i),A=i.Kh,i.copy||n.isDirtySuspended()||(A.wx=S.gnt(n,A.qI,o,u,p,f)),n.isDirtySuspended()||(A.Mx=S.gnt(n,A.$I,s,a,p,f)))),E=!0,null===(t=n.tables)||void 0===t||t.Fuo()}finally{n.rt.q6={},S.q5(n,!0),n.QI=!1,L(n,!1,o,u,s,a,p,f,g,d,this.Spn()),e.Commands.xI(r,i)}$(n)}return E},n.prototype.gnt=function(t,n,i,r,e,o){var u=new y(t,d(i,r,e,o),this.Spn()),s=t.tables&&t.tables.WI&&t.tables.WI(i,r,e,o);return s&&s.length>0&&(this.tT.tableNamesObj={r:i,c:r,rc:e,cc:o,tableNames:s}),u.yI(n.bI()),_(t,i,r,e,o,u.MI(),0,s),u},n.prototype.XI=function(){var t,n,i,r,e,o,u,s,a,f,c=this,h=c.Mf,v=c.tT,g=v.Kh;g||(g=v.Kh={}),e=(t=v.fromRow)<0?0:t,o=(n=v.fromColumn)<0?0:n,u=(i=v.toRow)<0?0:i,s=(r=v.toColumn)<0?0:r,a=t<0?(0,l.getSheetRowCount)(h):(0,l.getRowCount)(v),f=n<0?(0,l.getSheetColumnCount)(h):v.columnCount,v.insert||h.isDirtySuspended()||(v.copy||(g.qI=new y(h,d(e,o,a,f),this.Spn())),g.$I=new y(h,d(u,s,a,f),this.Spn())),g.pnt=h.R9,g.bnt=h.B9,g.ynt=h.ui,g.wnt=h.ci},n.prototype.undo=function(){var t,n,i,r,o,u,s,a,f,c,h,v,d,g,p,w,m,y,C,D,F,b,j,R=this;if(R.canUndo()){if(t=R.Mf,i=(n=R.tT).fromRow,r=n.fromColumn,o=n.toRow,u=n.toColumn,s=(0,l.getRowCount)(n),a=n.columnCount,!t.zT(i,r,s,a,(0,l.getSheetRowCount)(t),(0,l.getSheetColumnCount)(t)))return!1;if(!n.insert&&!t.zT(o,u,s,a,(0,l.getSheetRowCount)(t),(0,l.getSheetColumnCount)(t)))return!1;f=void 0,c=n.Kh,R.X5(t,!0),h=t.parent.i4(),e.Commands.NI(h,n);try{n.insert?r>=0&&i>=0||(r>=0?(f=a,t&&B(t,-1,v=r,(0,l.getSheetRowCount)(t),f,n)):i>=0&&(f=s,t&&B(t,d=i,-1,f,(0,l.getSheetColumnCount)(t),n))):(g=i<0?0:i,p=r<0?0:r,w=o<0?0:o,m=u<0?0:u,y=i<0?(0,l.getSheetRowCount)(t):s,C=r<0?(0,l.getSheetColumnCount)(t):a,t&&(B(t,i,r,s,a,n),D=n.tableNamesObj,F=[],b=[],D&&(D.r===w&&D.c===m&&D.rc===y&&D.cc===C?b=D.tableNames:F=D.tableNames),_(t,w,m,y,C,c.Mx?c.Mx.MI():[],0,F,!0),_(t,g,p,y,C,c.wx?c.wx.MI():[],0,b,!0))),t&&(-1!==c.ynt&&-1!==c.wnt&&((j=t.getSelections()[0]).contains(c.ynt,c.wnt)?t.XA(c.ynt,c.wnt):t.XA(j.row,j.col)),-2!==c.pnt&&-2!==c.bnt&&-1!==c.ynt&&-1!==c.wnt&&t.showCell(c.ynt,c.wnt,3,3),(0,e.handleRestoredTableResizedArgs)(c.eke))}finally{R.q5(t,!0)}$(t)}return!0},n.prototype.Jcr=function(t,n,i,r){var o={changeType:"addingColumns",col:i,colCount:r,canAdd:!0,onlyCheck:!0,sheetArea:e.SheetArea.viewport};return e.Worksheet.et(t,x,o),!!o.canAdd&&(o={changeType:"deletingColumns",col:n,colCount:r,canDelete:!0,onlyCheck:!0,sheetArea:e.SheetArea.viewport},e.Worksheet.et(t,x,o),o.canDelete)},n.prototype.Kcr=function(t,n,i,r){var o={changeType:"addingRows",row:i,rowCount:r,canAdd:!0,onlyCheck:!0,sheetArea:e.SheetArea.viewport};return e.Worksheet.et(t,x,o),!!o.canAdd&&(o={changeType:"deletingRows",row:n,rowCount:r,canDelete:!0,onlyCheck:!0,sheetArea:e.SheetArea.viewport},e.Worksheet.et(t,x,o),o.canDelete)},n}(m),e.Commands[T]={canUndo:!0,execute:function(t,n,i){return e.Commands.zA(t,H,n,i)}},e.Commands[M]={canUndo:!0,execute:function(t,n,i){return e.Commands.zA(t,N,n,i)}}},"./dist/plugins/fill/drag-header-to-move/event.js":function(t,n,i){var r,e,o,u,s,a,l,f;function c(t,n){var i,r=t.getColumnCount();if(0===n.col&&n.colCount===r)return!0;for(i=0;i<n.col;i++)if(t.getColumnVisible(i))return!1;for(i=n.col+n.colCount;i<r;i++)if(t.getColumnVisible(i))return!1;return!0}function h(t){var n;return!!t&&(null===(n=t.NMi)||void 0===n?void 0:n._gi)!==e.SheetType.ganttSheet}Object.defineProperty(n,"__esModule",{value:!0}),r=i("Common"),e=i("Core"),o=i("./dist/plugins/fill/utils.js"),u=r.Common.zf,s=e.GC$,a=null,l=5,f={QRe:function(t,n,i){var r,o,u,s,l,f,v,d,g,p,w,m,y,_,C,D,F,b,j=this;if(j.a_)return a;if(1!==t.hitTestType&&2!==t.hitTestType)return a;if(!h(u=j.Mf))return a;if(!(s=null===(o=null===(r=u.parent)||void 0===r?void 0:r.options)||void 0===o?void 0:o.allowDragHeaderToMove))return a;if(!(0,e.needPaintSelection)(u))return a;if(!(l=u.getSelections())||1!==l.length)return a;if(f=l[0],d=(v=u.options).colHeaderVisible,g=v.rowHeaderVisible,(s&e.AllowDragHeaderToMove.column)===e.AllowDragHeaderToMove.column&&1===t.hitTestType&&f.row<0&&f.col>=0&&d&&t.row>=u.getFreeAreaRowCount(1)){if(c(u,f))return a;if(p=f.col+f.colCount,t.col<f.col||t.col>=p)return a;for(w=u.Yy(t.colViewportIndex,1),m=f.col;m<p;m++)if((y=null==w?void 0:w.findCol(m))&&(_=y.width,y.x<=n&&n<=y.x+_))return{action:"dragHeader",dragColumn:!0,selectRange:f}}else if((s&e.AllowDragHeaderToMove.row)===e.AllowDragHeaderToMove.row&&2===t.hitTestType&&f.row>=0&&f.col<0&&g&&t.col>=u.getFreeAreaRowCount(2)){if(f.rowCount===u.getRowCount())return a;for(C=u._y(t.rowViewportIndex,2),D=f.row+f.rowCount,F=f.row;F<D;F++)if((b=null==C?void 0:C.findRow(F))&&b.y<=i&&i<=b.y+b.height)return{action:"dragHeader",dragColumn:!1,selectRange:f}}return a},VRe:function(t){var n,i,r,u,s,a,l,f,c,h,v=this;v.eBe||t&&t.dragHeaderToMoveInfo&&1===(i=(n=v.Mf).Ut.getSelections()).length&&(v.rb=!0,v.eBe=!0,v.cw(t),r=i[0],u=n.Fi(),s=n.options.rightToLeft?new e.Rect(u.Hy,u.T6,u.b6+u.F6,u.Ay+u.Iy):new e.Rect(u.b6,u.T6,u.Hy+u.zy,u.Ay+u.Iy),a=n.getRangeRect((0,o.getRowViewportIndex)(t),(0,o.getColViewportIndex)(t),r),t.dragHeaderToMoveInfo.dragColumn?a.height=(0,o.getHeight)(s):(n.options.rightToLeft&&(a.x=s.x),a.width=(0,o.getWidth)(s)),t.dragHeaderToMoveInfo.selectionRect=a,(l=v.q6).x=a.x,l.y=a.y,l.width=a.width-1,l.height=a.height-1,l.row=r.row,l.col=r.col,l.rowCount=(0,o.getRowCount)(r),l.colCount=(0,o.getColCount)(r),f=n.JS(r),c=t.row,h=t.col,c<f.row&&(c=f.row),c>=f.row+(0,o.getRowCount)(f)&&(c=f.row+(0,o.getRowCount)(f)-1),h<f.col&&(h=f.col),h>=f.col+(0,o.getColCount)(f)&&(h=f.col+(0,o.getColCount)(f)-1),l.hitRow=c,l.hitCol=h,l.rowOffset=c-f.row,l.colOffset=h-f.col,v.Rk={e9:(0,o.getRowViewportIndex)(t),r9:(0,o.getColViewportIndex)(t),Bk:(0,o.getHitTestType)(t)},v.Ok())},YRe:function(){var t,n,i,r,e,u,s,a,l,f,c,h,v=this,d=v.Mf;v.eBe&&v.rb&&(t=v.WRe(),v.q6.hitTarget=v.fk,v.q6.x=t.x,v.q6.y=t.y,v.q6.width=t.width,v.q6.height=t.height,n=v.fk.x,i=v.fk.y,u=(e=(r=(0,o.getSheetVPortBoundary)(d)).minPoint).x,s=e.y,l=(a=r.maxPoint).x,f=a.y,v.fk.x<=u?v.fk.x=u+1:v.fk.x>=l&&(v.fk.x=l-1),v.fk.y<=s?v.fk.y=s+1:v.fk.y>=f&&(v.fk.y=f-1),c=(0,o.getHitColumnIndex)(d,v.fk.x),h=(0,o.getHitRowIndex)(d,v.fk.y),v.KRe(h,c),v.fk.x=n,v.fk.y=i,v.a9())},ZRe:function(){var t,n=this,i=n.Mf;n.eBe=!1,n.i_=!0,n.zk=!0,n.t_=!1,t=i.sw,(0,o.fixHitTestInfo)(t),n.kD&&n.kD(),n.rb=!1,n.ab=!1,n.Rk=a,i.Uet=a,i.JRe=a,i.Pet=a,n.cw&&n.cw(i.sw)},KRe:function(t,n){var i,r,e,o,s,a,f,c,h,v,d=this;d.eBe&&(r=d.Mf,(e=d.q6).hitRow=t,e.hitCol=n,o=null!==(i=d.Int)&&void 0!==i?i:r.JS(e),d.xnt=o,s=r.Dn.XRe(),d.Int=o,(a=r.parent)&&a.options.showDragDropTip&&(s?(f=r.Uet.x+r.Uet.width+l,c=r.Uet.y+r.Uet.height+l,h=r.sw,v=r.U5(),h.dragHeaderToMoveInfo.dragColumn?e.col>v.col?o.col=e.col-v.colCount:o.col=e.col:e.row>v.row?o.row=e.row-v.rowCount:o.row=e.row,a.Tw(u.j0(d.Nnt(o)),f,c)):a.iy()))},WRe:function(){var t,n,i,r,e=this,u=e.Mf,s=u.sw,a=e.fk,l=s.dragHeaderToMoveInfo.selectionRect.clone(),f=(0,o.getSheetVPortBoundary)(u),c=f.minPoint,h=c.x,v=c.y,d=f.maxPoint,g=d.x,p=d.y;return s.dragHeaderToMoveInfo.dragColumn?(t=s.x-l.x,l.x=a.x-t,l.x<h?l.x=h:(n=(0,o.getEndX)(l))>g&&(l.x=g-l.width),(i=(0,o.getEndY)(l))>p&&(l.height=p-l.y)):(r=s.y-l.y,l.y=a.y-r,l.y<v?l.y=v:(i=(0,o.getEndY)(l))>p&&(l.y=p-l.height),(n=(0,o.getEndX)(l))>g&&(l.width=g-l.x)),l}},s.extend(e.nk.prototype,f)},"./dist/plugins/fill/drag-header-to-move/index.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-header-to-move/event.js"),i("./dist/plugins/fill/drag-header-to-move/render.js")},"./dist/plugins/fill/drag-header-to-move/render.js":function(t,n,i){var r,e,o,u,s;Object.defineProperty(n,"__esModule",{value:!0}),r=i("Core"),e=i("./dist/plugins/fill/utils.js"),o=r.GC$,u="black",s={qRe:function(t,n,i){t.save(),t.fillStyle=i||u,t.fillRect(n.x,n.y,n.width,n.height),t.restore()},$Re:function(t,n){var i,o,u,s,a,l,f,c,h=this,v=h.Mf,d=v.rt,g=v.sw,p=d.q6,w=p.hitTarget;if(p&&w)return i=p.hitCol,o=p.hitRow,u=v.nBe(),s=(0,e.getLineStyle)(v),a=8,t.save(),(l=(0,e.mergeRect)(v.Pet,v.JRe))&&(f=new r.Rect(l.x-a,l.y-a,(0,e.getWidth)(l)+2*a,(0,e.getHeight)(l)+2*a),h.O1(f,n),h.E1(v.U5(),n)),y(),c=m(),t.beginPath(),t.restore(),c;function m(){var l,f,c,h,d,m,y=v.Yy(0).findCol(i)||v.Yy(1).findCol(i)||v.Yy(2).findCol(i),_=v._y(0).findRow(o)||v._y(1).findRow(o)||v._y(2).findRow(o),C=!1;return g.dragHeaderToMoveInfo.dragColumn?y&&(l=y.x,f=(0,e.getWidth)(y),p.col=i,w.x>l+f/2&&(l=y.x+(0,e.getWidth)(y),p.col++),(p.col<g.dragHeaderToMoveInfo.selectRange.col||p.col>g.dragHeaderToMoveInfo.selectRange.col+g.dragHeaderToMoveInfo.selectRange.colCount)&&(v.Uet=new r.Rect(l,p.y,0,(0,e.getHeight)(p)),t.rect(n.x,n.y,(0,e.getWidth)(n),(0,e.getHeight)(n)),t.clip(),t.beginPath(),c=n.y+1,(0,e.paintDragLine)(t,l-a,c,l+a,c,u,s),(0,e.paintDragLine)(t,l,p.y,l,p.y+(0,e.getHeight)(p),u,s),(0,e.paintDragLine)(t,l-a,p.y+(0,e.getHeight)(p),l+a,p.y+(0,e.getHeight)(p),u,s),C=!0)):_&&(h=_.y,d=(0,e.getHeight)(_),p.row=o,w.y>h+d/2&&(h=_.y+(0,e.getHeight)(_),p.row++),(p.row<g.dragHeaderToMoveInfo.selectRange.row||p.row>g.dragHeaderToMoveInfo.selectRange.row+g.dragHeaderToMoveInfo.selectRange.rowCount)&&(v.Uet=new r.Rect(p.x,h,(0,e.getWidth)(p),0),t.rect(n.x,n.y,(0,e.getWidth)(n),(0,e.getHeight)(n)),t.clip(),t.beginPath(),m=n.x+1,(0,e.paintDragLine)(t,m,h-a,m,h+a,u,s),(0,e.paintDragLine)(t,p.x,h,p.x+(0,e.getWidth)(p),h,u,s),(0,e.paintDragLine)(t,p.x+(0,e.getWidth)(p),h-a,p.x+(0,e.getWidth)(p),h+a,u,s),C=!0)),C}function y(){t.rect(n.x,n.y,(0,e.getWidth)(n),(0,e.getHeight)(n)),t.clip(),t.beginPath(),h.qRe(t,p,v.tBe())}},XRe:function(){var t,n,i,o,u,s=this,a=s.Mf,l=a.sw,f=a.rt.xnt;if(l&&l.dragHeaderToMoveInfo&&f)return t=s.J(),n=a.Fi(),i=a.rt.q6,o=a.options.rightToLeft?new r.Rect(n.Hy,n.T6,n.b6+n.F6,n.Ay+n.Iy):new r.Rect(n.b6,n.T6,n.Hy+n.zy,n.Ay+n.Iy),u=s.$Re(t,o),a.JRe=a.Uet,a.Pet=new r.Rect(i.x,i.y,(0,e.getWidth)(i),(0,e.getHeight)(i)),u}},o.extend(r.g7.prototype,s)},"./dist/plugins/fill/fill-event.js":function(t,n,i){var r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T;Object.defineProperty(n,"__esModule",{value:!0}),n.FillAction=void 0,r=i("Common"),e=i("Core"),o=i("SheetsCalc"),u=i("./dist/plugins/fill/fill-ui.js"),s=i("./dist/plugins/fill/fill.js"),a=i("./dist/plugins/fill/fill.ns.js"),l=i("CalcEngine"),f=i("./dist/plugins/fill/utils.js"),c=!!l,h=e.GC$,v=e.Ec,d=r.Common.lt.ht,g=null,p=void 0,w=Math.min,m=Math.abs,y=Math.max,_=5,C=3,D="drag",F="corner",b=r.Common.zf,j=new r.Common.ResourceManager(a.SR,"Fill"),R=j.getResource.bind(j),function(t){t[t.smartMenuCopyCells=1]="smartMenuCopyCells",t[t.smartMenuFillSeries=2]="smartMenuFillSeries",t[t.smartMenuFillFormattingOnly=4]="smartMenuFillFormattingOnly",t[t.smartMenuFillWithoutFormatting=8]="smartMenuFillWithoutFormatting",t[t.all=1023]="all"}(T=n.FillAction||(n.FillAction={})),h.extend(e.nk.prototype,{bk:function(t){var n,i,r,e,o,u,s,a,l,c,h,v=this;v.zk||(n=v.Mf,i=g,1===(r=n.Ut.getSelections()).length?i=r[0]:r.length<1&&(i=n.Ut.getSpan(n.ui,n.ci)),i&&(v.zk=!0,v.rb=!0,v.Mnt=i,(e=n.tables&&n.tables.find(i.row,i.col))&&(v.Cnt=!0,o=!0,u=e.range(),(e.showHeader()&&i.row===u.row||e.showFooter()&&i.row===u.row+u.rowCount-1||i.col!==u.col||i.colCount!==u.colCount)&&(o=!1),o&&(v.Snt=!0,v.e_=!0,v.Tnt=e.name())),s=n.getRangeRect((0,f.getRowViewportIndex)(t),(0,f.getColViewportIndex)(t),i),(a=v.q6).x=s.x,a.y=s.y,a.width=s.width-1,a.height=s.height-1,a.row=i.row,a.col=i.col,a.rowCount=(0,f.getRowCount)(i),a.colCount=(0,f.getColCount)(i),l=n.JS(i),c=t.row,h=t.col,c<l.row&&(c=l.row),c>=l.row+(0,f.getRowCount)(l)&&(c=l.row+(0,f.getRowCount)(l)-1),h<l.col&&(h=l.col),h>=l.col+(0,f.getColCount)(l)&&(h=l.col+(0,f.getColCount)(l)-1),a.hitRow=c,a.hitCol=h,a.rowOffset=c-l.row,a.colOffset=h-l.col,v.Rk={e9:(0,f.getRowViewportIndex)(t),r9:(0,f.getColViewportIndex)(t),Bk:(0,f.getHitTestType)(t)},v.Ok()))},Vk:function(){var t,n,i,r,e,o,u,s,a,l,f=this;f.Rk&&f.rb&&f.zk&&f.Mnt&&(t=f.fk,n=f.q6,r=(i=f.Mf.getCellRect(n.hitRow,n.hitCol)).width/2,e=i.x+r,o=i.height/2,u=i.y+o,n.hitTarget={x:t.x,y:t.y},s=f.Q9(),a=f.K9(),l=!1,(m(e-t.x)>r+5||m(u-t.y)>o+5)&&(l=!0),s>=0&&a>=0&&l&&f.Ant(s,a),f.a9())},Ant:function(t,n){var i,r,e,o,u,s,a,l,c,h,v,d,g,p,m,C,D,F,j,R=this;R.zk&&R.Mnt&&(i=R.Mf,r=R.q6,e=i.o5(),o=i.U5(),u=(0,f.getSheetRowCount)(i),s=(0,f.getSheetColumnCount)(i),a=w(s-(0,f.getColCount)(r),n-r.colOffset),l=w(u-(0,f.getRowCount)(r),t-r.rowOffset),e&&(a-=c=i.ox(n,r.colOffset+1),l-=h=i.ox(t,r.rowOffset+1,!0),0===i.getColumnWidth(a)&&(a=i.r6(a)),0===i.getRowHeight(l)&&(l=i.nI(l))),-1===o.row&&-1!==o.col?(r.row=-1,r.col=y(0,a)):-1!==o.row&&-1===o.col?(r.row=y(0,l),r.col=-1):(r.row=r.row<0?-1:y(0,l),r.col=r.col<0?-1:y(0,a)),R.Snt&&(d=(v=i.tables&&i.tables.find(t,n))&&v.range(),!v||v.name()!==R.Tnt||t===d.row||v.showFooter()&&t===d.row+d.rowCount?R.e_=!1:R.e_=!0,R.e_?(r.col=d.col,R.i_=!R.isPressShiftKey):R.i_=R.isPressShiftKey),r.hitRow=t,r.hitCol=n,g=i.JS(r),e&&(p=i.lT(g.row,g.rowCount,!0),m=i.lT(g.col,g.colCount),g.rowCount+=p,g.colCount+=m,g.rowCount=w(u,g.rowCount),g.colCount=w(s,g.colCount),g.row+g.rowCount>u||g.col+g.colCount>s)||(C=R.Int)&&g.row===C.row&&g.col===C.col&&(0,f.getRowCount)(g)===(0,f.getRowCount)(C)&&(0,f.getColCount)(g)===(0,f.getColCount)(C)&&g.row>i.N9()&&g.col>i.k9()&&g.row+(0,f.getRowCount)(g)-1<i.P6()&&g.col+(0,f.getColCount)(g)-1<i.G6()||(R.xnt=g,i.Dn.o_(),R.Int=g,(D=i.parent)&&D.options.showDragDropTip&&(F=r.x+r.width+_,j=r.y+r.height+_,D.Tw(b.j0(R.Nnt(g)),F,j))))},Nnt:function(t){var n,i,r,e,u,s,a,h,v,d,w,m,y,_;return t&&c?(i=(n=this.Mf).U5(),r=(0,f.getRowCount)(i),e=(0,f.getColCount)(i),u=n.getActiveRowIndex(),s=n.getActiveColumnIndex(),a=void 0,h=n.o5(),u=u<0?0:u,s=s<0?0:s,1===r&&1===e?a=l.knt(g,g,t.row-u,t.col-s,!0,!0):(v=void 0,d=void 0,w=void 0,m=void 0,y=0,_=0,-1===i.row&&i.col>=0?(v=w=o.BAND_INDEX_CONST,d=t.col-s,m=t.col-s+e-1,_=e):-1===i.col&&i.row>=0?(d=m=o.BAND_INDEX_CONST,v=t.row-u,w=t.row-u+r-1,y=r):i.row>=0&&i.col>=0&&(v=t.row-u,w=t.row-u+r-1,d=t.col-s,m=t.col-s+e-1,y=r,_=e),h&&(w+=n.lT(t.row,y,!0),m+=n.lT(t.col,_)),a=l.lJ(g,g,v,d,w,m,!0,!0,!0,!0,u,s)),n.op().unparse(n.Uw(),a,u,s)):p},kD:function(t){var n,i,r,o,u,s,a,l,h,d,p,w,m,y,_,C,D,F,b,j,T=this,M=!1,k="",x=!1,I=T.Mf;T.Rk=g,T.l9(),i=I.U5(),r=T.q6.row,o=T.q6.col,u=T.q6.hitRow,s=T.q6.hitCol,T.i_&&i.contains(u,s)||(n=i&&((0,f.getRowCount)(i)>0||(0,f.getColCount)(i)>0)?{r:i.row,c:i.col,rc:(0,f.getRowCount)(i),cc:(0,f.getColCount)(i)}:{r:I.ui,c:I.ci,rc:1,cc:1},!0===T.zk&&!0===T.rb&&(a=n.r,l=n.c,h=n.rc,d=n.cc,p=I.options.protectionOptions,w=I.lF,T.shiftCells=null,T.i_&&(T.shiftCells=T.Dnt?e.InsertShiftCell.right:e.InsertShiftCell.down),m={fromRow:a,fromColumn:l,rowCount:h,columnCount:d,toRow:r,toColumn:o,isDragInsert:T.i_,isDragCopy:T.t_},I.ki(e.Events.BeforeDragDrop,m),(k=m.invalidMessage)&&0!==k.length?M=!0:!T.i_||-1!==a&&-1!==l?r===a&&o===l||(C=I.GT(a,l,h,d),D=I.GT(r,o,h,d),(C||D)&&(F=!1,C||T.shiftCells!==e.InsertShiftCell.right&&T.shiftCells!==e.InsertShiftCell.down||(F=!0),F||(M=!0,k=R().Exp_ChangeMergedCell)),M||c&&(I.KT(a,l,h,d)||I.KT(r,o,h,d))&&(M=!0,k=R().Exp_ChangePartOfArray),M||T.t_||((b=I.isActualProtected())||(b=(0,e.isAnyCellProtectedInDataRange)(I,new e.Range(a,l,h,d))),b&&(b=I.dA(v(a,l,h,d),!1,e.SheetArea.viewport)),(j=I.isActualProtected())||(j=(0,e.isAnyCellProtectedInDataRange)(I,new e.Range(r,o,h,d))),j&&(j=I.dA(v(r,o,h,d),!1,e.SheetArea.viewport)),(b||j)&&(M=!0,k=I.FT())),M||(T.i_&&(T.Dnt?o=T.q6.hitCol:r=T.q6.hitRow),x=I.Qy().execute({cmd:"dragDrop",sheetName:I.name(),fromRow:a,fromColumn:l,toRow:r,toColumn:o,rowCount:h,columnCount:d,copy:T.t_,insert:T.i_,shiftCells:T.shiftCells,option:w,mouseTargetRow:u,mouseTargetCol:s}))):l>=0?(T.t_&&(o<=l||o>=l+d)||!T.t_&&(o<l||o>l+d))&&((I.GT(-1,l,-1,d)||I.GT(-1,o,-1,0))&&(M=!0,k=R().Exp_ChangeMergedCell),y=p&&p.allowDragInsertColumns,!M&&I.isActualProtected()&&!0!==y&&(M=!0,k=R().Exp_ColumnReadOnly),M||(x=I.Qy().execute({cmd:"dragDrop",sheetName:I.name(),fromRow:-1,fromColumn:l,toRow:-1,toColumn:o,rowCount:-1,columnCount:d,copy:T.t_,insert:!0,option:w,mouseTargetRow:u,mouseTargetCol:s}))):a>=0&&l<0&&(T.t_&&(r<=a||r>=a+h)||!T.t_&&(r<a||r>a+h))&&((I.GT(a,-1,h,-1)||I.GT(r,-1,0,-1))&&(M=!0,k=R().Exp_ChangeMergedCell),M||c&&(I.KT(a,-1,h,-1)||I.KT(r,-1,0,-1))&&(M=!0,k=R().Exp_ChangePartOfArray),_=p&&p.allowDragInsertRows,!M&&I.isActualProtected()&&!0!==_&&(M=!0,k=R().Exp_RowReadOnly),M||(x=I.Qy().execute({cmd:"dragDrop",sheetName:I.name(),fromRow:a,fromColumn:-1,toRow:r,toColumn:-1,rowCount:h,columnCount:-1,copy:T.t_,insert:!0,option:w,mouseTargetRow:u,mouseTargetCol:s}))))),T.rb=!1,T.zk=!1,T.Snt=!1,T.Cnt=!1,T.e_=!1,T.Tnt=g,T.Mnt=g,T.i_=!1,T.t_=!1,T.Int=g,T.xnt=g,T.iy(),x||(T.q6={},I.repaint()),M&&I.jT(3,k)},wk:function(t){var n=this;!0!==n.Yk&&!0!==n.rb&&(n._nt(),n.Ktt&&(n.rb=!0,n.Yk=!0,n.hO=!0,n.Ent=(0,f.getRowViewportIndex)(t),n.jnt=(0,f.getColViewportIndex)(t),n.Ont=(0,f.getRowViewportIndex)(t),n.Rnt=(0,f.getColViewportIndex)(t),n.Bnt(),n.Rk={e9:(0,f.getRowViewportIndex)(t),r9:(0,f.getColViewportIndex)(t),Bk:(0,f.getHitTestType)(t)},n.Ok()))},Bnt:function(){var t,n=this,i=(0,f.getFrozenRowCount)(n.Mf),r=(0,f.getFrozenColumnCount)(n.Mf),e=n.Lnt();e>=0&&e<i?n.Fnt=0:e>=i&&e<=(0,f.getSheetRowCount)(n.Mf)&&(n.Fnt=1),n.Pnt()?n.Gnt=1:n.Gnt=n.Ent,(t=n.Unt())>=0&&t<r?n.Hnt=0:t>=r&&t<=(0,f.getSheetColumnCount)(n.Mf)&&(n.Hnt=1),n.znt()?n.Vnt=1:n.Vnt=n.jnt},Zk:function(){var t,n,i,r=this;r.Rk&&r.Yk&&r.rb&&r.Ktt&&(r.Ont=r.nD(),r.Rnt=r.eD(),r.Ynt=r.Q9(),r.Znt=r.K9(),r.Ynt>=0&&r.Znt>=0&&(r.Wnt(),r.Qnt(),t=r.Mf.parent,n=!1,(i=r.Knt())&&(n=r.Jnt(r.Ktt,r.Xnt,!0)),t&&t.options.showDragFillTip&&n&&r.qnt(),r.$nt()),r.a9())},tet:function(){var t,n,i,e,o,u,a,l,f,c,h,v,d,p=this,w=p.Mf,m=p.Ktt,y=p.Xnt,_=w.parent.options.defaultDragFillType,C=p.net(3===_?5:_,3===_),D=p.eet(),F=p.Knt();return 1===C?(t=0===D||1===D?1:0,e=(i=new s.Wtt(w)).Jtt(F,t,!0),n=p.iet(D,y,m),u=(o=w.getActualStyle(n.row,n.col)).cellType||w.$f(),a=o.formatter?o.formatter:o._autoFormatter,l=r.Formatter&&r.Formatter.GeneralFormatter,e instanceof Date&&l&&(a=new l(r.Common.CultureManager.Fe().DateTimeFormat.shortDatePattern+" hh:mm:ss AM/PM;@","0")),c=3,(f=p.Rk)&&(c=f.Bk),h={sheet:w,row:n.row,col:n.col,sheetArea:c,quotePrefix:o.quotePrefix},v={},u.format(e,a,v,h)):0===C?(n=p.iet(D,y,m),(d=w.getFormula(n.row,n.col))?g:w.getText(n.row,n.col)):g},iet:function(t,n,i){var r,e=i.row,o=i.col,u=(0,f.getRowCount)(i),s=(0,f.getColCount)(i),a=v(e,o,1,1);return 3===t?(r=0===(r=(0,f.getRowCount)(n)%u)?e+u-1:e+r-1,a.row=r,a.col=o):1===t?(r=0===(r=(0,f.getColCount)(n)%s)?o+s-1:o+r-1,a.row=e,a.col=r):0===t?(r=0===(r=(0,f.getColCount)(n)%s)?o:o+s-r,a.row=e,a.col=r):2===t&&(r=0===(r=(0,f.getRowCount)(n)%u)?e:e+u-r,a.row=r,a.col=o),a},qnt:function(){var t,n,i,r,e,o,u=this,s=u.Mf,a=u.net();if(4===a||u.znt()||u.Pnt())return u.iy(),g;r=u.eet(),e=u.Knt(),o=s.j1(e),i=u.tet(),3===r||1===r?(t=o.x+o.width+C,n=o.y+o.height+C):0===r?(t=o.x+C,n=o.y+o.height+C):2===r&&(t=o.x+o.width+C,n=o.y+C),u.Tw(i,t,n)},$nt:function(){var t=this;t.ret(),t.oet(),t.aet(),t.uet=t.Knt()},ret:function(){var t,n=this.Mf;this.uet&&((t=n.j1(this.uet)).x-=2,t.y-=2,t.width+=4,t.height+=4,n.Dn.O1(t))},oet:function(t){var n;this.Mf.Dn.E1(this.Ktt,g,t)},aet:function(){var t,n,i,r,e,o,u=this.Mf,s=u.Dn,a=this.Knt();a&&(n=this.cHr(),i=null!==(t=(i=u.j1(a)).getIntersectRect(n))&&void 0!==t?t:i,r=u.getSelectionBorderColor(),e=(0,f.getLineStyle)(u),(o=s.J()).save(),o.beginPath(),s.cet(o,i,r,e),o.restore())},cHr:function(){var t=this.Mf,n=t.Fi(),i=n.c9(this.Ent,this.jnt),r=this.Iet()?n.c9(this.Ont,this.jnt):n.c9(this.Ent,this.Rnt),e=n.c9(t.C0(this.Ktt.row),t.S0(this.Ktt.col)),o=n.c9(t.C0(this.Ktt.row+this.Ktt.rowCount-1),t.S0(this.Ktt.col+this.Ktt.colCount-1)),u=(0,f.mergeRect)(i,r);return u=(0,f.mergeRect)(u,e),(0,f.mergeRect)(u,o)},Qnt:function(){this.Xnt=this.dO()},znt:function(){return-1===this.Ktt.col&&-1!==this.Ktt.row},Pnt:function(){return-1===this.Ktt.row&&-1!==this.Ktt.col},lO:function(){return 4===this.bO||5===this.bO},dO:function(){var t=this,n=-1,i=-1,r=-1,e=-1;switch(t.bO){case 0:t.Pnt()?(n=-1,r=-1):(n=t.Lnt(),r=(0,f.getRowCount)(t.Ktt)),i=t.Znt,e=t.Unt()-i;break;case 1:t.Pnt()?(n=-1,r=-1):(n=t.Lnt(),r=(0,f.getRowCount)(t.Ktt)),i=t.fet()+1,e=t.Znt-i+1;break;case 2:n=t.Ynt,r=t.Lnt()-n,t.znt()?(i=-1,e=-1):(i=t.Unt(),e=(0,f.getColCount)(t.Ktt));break;case 3:n=t.let()+1,r=t.Ynt-n+1,t.znt()?(i=-1,e=-1):(i=t.Unt(),e=(0,f.getColCount)(t.Ktt));break;case 5:n=t.Ynt,r=t.let()-n+1,t.znt()?(i=-1,e=-1):(i=t.Unt(),e=(0,f.getColCount)(t.Ktt));break;case 4:t.Pnt()?(n=-1,r=-1):(n=t.Ktt.row,r=(0,f.getRowCount)(t.Ktt)),i=t.Znt,e=t.fet()-i+1}return v(n,i,r,e)},het:function(){var t=this.let();return-1!==t?this.Mf._y(this.Gnt).findRow(t):g},det:function(){return this.Mf._y(this.Ont).findRow(this.vet())},vet:function(){return this.Mf.getViewportBottomRow(this.Ont)},met:function(){var t=this.fet();return-1!==t?this.Mf.Yy(this.Vnt).findCol(t):g},pet:function(){return this.Mf.Yy(this.Rnt).findCol(this.bet())},bet:function(){return this.Mf.getViewportRightColumn(this.Rnt)},Wnt:function(){var t,n,i,r,e,o,u,s,a,l,f,c,v,d,g,p,y,_,C,D,F=this,b=F.znt(),j=F.Pnt(),R=h(F.Mf.Dg()).offset(),T=F.fk.e,M=F.fk.x,k=F.fk.y,x=T.pageX-R.left,I=T.pageY-R.top,O=!1;b||j?j?F.Znt>=F.Unt()&&F.Znt<=F.fet()?F.bO=4:F.Znt<F.Unt()?F.bO=0:F.Znt>F.fet()&&(F.bO=1):b&&(F.Ynt>=F.Lnt()&&F.Ynt<=F.let()?F.bO=5:F.Ynt<F.Lnt()?F.bO=2:F.Ynt>F.let()&&(F.bO=3)):F.Ynt>=F.Lnt()&&F.Ynt<=F.let()?F.Znt>=F.Unt()&&F.Znt<=F.fet()?(t=m(F.Znt-F.fet()),(n=m(F.Ynt-F.let()))>t?F.bO=5:n<t?F.bO=4:((i=F.het())||(i=F.det()),i?k>i.y+i.height?F.bO=3:((r=F.met())||(r=F.pet()),e=r.x+r.width-M,o=i.y+i.height-k,x>=r.x&&x<=r.x+r.width&&I>=i.y&&I<=i.y+i.height?F.bO=e>=o?4:5:O=!0):O=!0)):F.Znt<F.Unt()?F.bO=0:F.Znt>F.fet()&&(F.bO=1):F.Ynt<F.Lnt()?F.Znt>=F.Unt()&&F.Znt<=F.fet()?F.bO=2:F.Znt<F.Unt()?(t=m(F.Znt-F.Unt()),n=m(F.Ynt-F.Lnt()),F.bO=n>=t?2:0):F.Znt>F.fet()&&(t=m(F.Znt-F.fet()),n=m(F.Ynt-F.Lnt()),F.bO=n>=t?2:1):F.Ynt>F.let()&&(F.Znt>=F.Unt()&&F.Znt<=F.fet()?F.bO=3:F.Znt<F.Unt()?(t=m(F.Znt-F.Unt()),n=m(F.Ynt-F.let()),F.bO=n>=t?3:0):F.Znt>F.fet()&&(t=m(F.Znt-F.fet()),n=m(F.Ynt-F.let()),F.bO=n>=t?3:1)),(u=F.Mf.Dn.yet)&&(l=(s=F.let())+1,f=(a=F.fet())+1,c=F.Mf.getRowHeight(s,3),v=F.Mf.getColumnWidth(a,3),d=F.Mf.getRowHeight(l,3),g=F.Mf.getColumnWidth(f,3),p=u.x+u.width/2-w(10,v/2),y=u.x+u.width/2+w(10,g/2),_=u.y+u.height/2-w(10,c/2),C=u.y+u.height/2+w(10,d/2),D=!1,(D=b||j?j?p<=x&&x<=y:_<=I&&I<=C:p<=x&&x<=y&&_<=I&&I<=C)||O?(F.hO=!0,F.bO=4):F.hO=!1)},Lnt:function(){return this.Ktt?-1===this.Ktt.row?0:this.Ktt.row:-1},let:function(){var t=this;return t.Ktt?-1===t.Ktt.row?(0,f.getSheetRowCount)(t.Mf)-1:t.Ktt.row+(0,f.getRowCount)(t.Ktt)-1:-1},Unt:function(){return this.Ktt?-1===this.Ktt.col?0:this.Ktt.col:-1},fet:function(){var t=this;return t.Ktt?-1===t.Ktt.col?(0,f.getSheetColumnCount)(t.Mf)-1:t.Ktt.col+(0,f.getColCount)(t.Ktt)-1:-1},wet:function(t,n){var i,r,e,o,u,s,a=v(n.row,n.col,n.rowCount,n.colCount),l=this.Mf;return l.Ut.findSpan(t.row,t.col)&&(i=t.rowCount,r=a.rowCount,0!==Math.floor(r%i)&&(e=Math.ceil(r/i)*i,a.row+e<=l.getRowCount()&&(a.rowCount=e)),o=t.colCount,u=a.colCount,0!==Math.floor(u%o)&&(s=Math.ceil(u/o)*o,a.col+s<=l.getColumnCount()&&(a.colCount=s))),a},DD:function(){var t,n,i,r,e,o,u,s=this,a=s.Mf;s.Rk=g,s.l9(),s.iy(),s.Yk&&s.rb?(s.Yk=!1,s.rb=!1,(t=s.Knt())&&(!(n=s.Jnt(s.Ktt,s.Xnt))||s.hO?(s.Met(),s.Ax(t)):(i=a.rt.Ktt,r=s.wet(i,s.Xnt),e=s.net(),a.Qy().execute({cmd:"fill",sheetName:a.name(),startRange:i,fillRange:r,autoFillType:e,fillDirection:a.rt.eet()}),o=s.lnt,u=a.getSelections(),!o&&s.Cet()&&a.parent.options.showDragFillSmartTag&&1===u.length&&u[0].equals(t)&&4!==s.fnt?s.Tet(s.fnt):s.Ax(t),s.Met()))):s.Met()},IRe:function(){var t=this.Mf,n=T.all,i=t.getCellType(t.getActiveRowIndex(),t.getActiveColumnIndex());return"19"===(null==i?void 0:i.typeName)&&(n&=~T.smartMenuFillSeries),t.NMi&&(n&=~T.smartMenuFillFormattingOnly,n&=~T.smartMenuFillWithoutFormatting),n},Tet:function(t){var n=this.Mf,i=n.Dn.yet,r={x:i.x+i.width,y:i.y+i.height,fillType:t,availableFillAction:this.IRe()};n.R_=new u.Aet(n.parent.j2(),n,r),n.R_.rQ()},_nt:function(){var t,n,i=this.Mf,r=i.Ut.getSelections();1===r.length?(t=r[0],(n=i.Ut.getSpans(t))&&n.length>0&&(t=i.kR(n,t)),this.Ktt=t):i.ui>=0&&i.ci>=0&&(this.Ktt=v(i.ui,i.ci,1,1))},Met:function(){this.rb=!1,this.Yk=!1},Ax:function(t){this.Mf.Dn.E1(t)},net:function(t,n){var i,r=this,e=r.Mf,o=t!==p?t:e.parent.options.defaultDragFillType;return r.lO()?4:5!==o?o:(i=1===(0,f.getRowCount)(r.Ktt)&&1===(0,f.getColCount)(r.Ktt)&&!r.Pnt()&&!r.znt())?r.a_&&!n?1:0:r.a_&&!n?0:1},Knt:function(){var t,n,i,r,e=this;return e.Ktt?e.lO()?e.Ktt:e.Xnt?(t=0,n=0,i=0,r=0,e.Iet()?(t=2===e.bO?e.Xnt.row:e.Ktt.row,n=(0,f.getRowCount)(e.Ktt)+(0,f.getRowCount)(e.Xnt),i=e.Ktt.col,r=(0,f.getColCount)(e.Ktt)):(t=e.Ktt.row,n=(0,f.getRowCount)(e.Ktt),i=0===e.bO?e.Xnt.col:e.Ktt.col,r=(0,f.getColCount)(e.Ktt)+(0,f.getColCount)(e.Xnt)),v(t,i,n,r)):g:g},Jnt:function(t,n,i){var r,o=this.Mf,u=!0,s="";return o.Ut.eE(n.row,n.col,(0,f.getRowCount)(n),(0,f.getColCount)(n))&&!(0,f.canDragFillSpan)(o,t,n)&&(u=!1,s=R().Exp_FillRangeContainsMergedCell),!(r=o.isActualProtected())&&o.dataRanges&&(r=(0,e.isAnyCellProtectedInDataRange)(o,n)),u&&r&&o.dA(n,!0,e.SheetArea.viewport)&&(u=!1,s=o.FT()),u||i||o.ki(e.Events.InvalidOperation,{sheet:o,sheetName:o.name(),invalidType:e.InvalidOperationType.dragFill,message:s,fillRange:n}),u},Cet:function(){return this.xet()||this.Net()},xet:function(){return 3===this.bO||1===this.bO},Net:function(){return 0===this.bO||2===this.bO},Iet:function(){return 2===this.bO||3===this.bO||5===this.bO},eet:function(){var t=this.bO;return t>=0&&t<=3?t:4===t?0:5===t?2:3},VL:function(t,n,i){var r,e,o,u=this,s=g,a=(0,f.getRowViewportIndex)(t),l=(0,f.getColViewportIndex)(t),c=u.Mf,h=c.parent,v=c.options.rightToLeft;if(d(a)||d(l)||!h.options.allowUserDragDrop&&!h.options.allowUserDragFill)return s;if(-1===(r=c.U5()).row&&-1===r.col)return s;if(a>=0&&l>=0&&1===c.Ut.getSelections().length){if(u.yD(a,l,n,i))return s;v&&(e=u.Mf.Dn.yet)&&e.x<=n&&n<=e.x+e.width&&e.y<=i&&i<=e.y+e.height&&(s={action:D,side:F}),o=c.getRangeRect(a,l,r),s||o.x-4<n&&n<o.x+4&&o.y<=i&&i<o.y+o.height&&(s={action:D,side:"left"}),s||v||(e=u.Mf.Dn.yet)&&e.x<=n&&n<=e.x+e.width&&e.y<=i&&i<=e.y+e.height&&(s={action:D,side:F}),s||o.x+o.width-4<n&&n<o.x+o.width+4&&o.y<=i&&i<o.y+o.height&&(s={action:D,side:"right"}),s||o.y-4<i&&i<o.y+4&&o.x<=n&&n<o.x+o.width&&(s={action:D,side:"top"}),s||o.y+o.height-4<i&&i<o.y+o.height+4&&o.x<=n&&n<o.x+o.width&&(s={action:D,side:"bottom"}),s&&(n<o.x||n>o.x+o.width||i<o.y||i>o.y+o.height)&&(s.outside=!0)}return h&&h.options.allowUserDragDrop||s&&s.side!==F&&(s.side=g),h&&h.options.allowUserDragFill||s&&s.side===F&&(s.side=g),s},ket:function(t,n){var i=this,r=i.Mf,e=r.getSpan(t,n,3);return e?!d(i.Mf.getValue(e.row,e.col,3,0)):!d(i.Mf.getValue(t,n,3,0))},Det:function(t,n){var i,r=this,e=r.Mf,o=e.tables;return!(!o||0===o.all().length)&&((i=o.AB(t,n,1,1)[0])&&i.footerIndex()===t)},_et:function(t,n,i,r){var e,o=this;for(e=n;e<n+r;e++)if(!o.ket(t,e)||o.Det(t,e))return!1;return!0},Eet:function(t,n,i,r){var e,o=this;for(e=n;e<n+r;e++)if(o.ket(t,e))return!1;return!0},jet:function(t,n,i,r){var e,o,u,s,a,l,f,c=this,h=c.Mf;if("left"===r){for(e=0;e<n;e++)c.ket(t,e)&&(i.searchArray[e]=!0);for(o=n-1,u=1;i.searchArray[o];)o--,u++;i.searchLength=u}if("right"===r){for(s=h.getColumnCount(),a=n;a<s;a++)c.ket(t,a)&&(i.searchArray[a-n]=!0);for(l=0,f=1;i.searchArray[l];)l++,f++;i.searchLength=f}return i},Oet:function(t,n,i,r,e){var o,u,s,a,l,f=this,c=f.Mf,h=0,v={searchArray:new Array(r),searchLength:1},d={searchArray:new Array(c.getColumnCount()-e),searchLength:1};for(o=i-1;o>=n&&!f.Eet(o,t.col,1,t.colCount);o--)v=f.jet(o,t.col,v,"left"),d=f.jet(o,t.col+t.colCount-1,d,"right");for(;f.Eet(i+h,t.col,1,t.colCount);){for(u=!0,s=!1,v=f.jet(i+h,r,v,"left"),d=f.jet(i+h,e,d,"right"),a=r-1;a>=r-v.searchLength;a--)if(f.ket(i+h,a)){h++,u=!1;break}if(u){for(l=e+1;l<=e+d.searchLength;l++)if(f.ket(i+h,l)){h++,s=!0;break}if(!s)return h}}return h},Ret:function(t){for(var n=this,i=0;n._et(t.row+t.rowCount+i,t.col,1,t.colCount);)i++;return i},Bet:function(t){var n,i,r,e,o=this;return o._et(t.row+t.rowCount,t.col,1,t.colCount)?o.Ret(t):(r=0,e=t.row+t.rowCount,1===t.colCount?i=n=t.col:(n=t.col,i=t.col+t.colCount-1),o.Oet(t,0,e,n,i))},H_:function(){var t,n,i,r,e,o=this,u=o.Mf,s=u.rt.Ktt,a=o.Bet(s);0!==a&&(t=v(s.row+s.rowCount,s.col,a,s.colCount),o.bO=3,o.Xnt=t,n=o.net(),i=o.lnt,u.Qy().execute({cmd:"fill",sheetName:u.name(),startRange:s,fillRange:t,autoFillType:n,fillDirection:o.bO}),r=o.Knt(),e=u.getSelections(),!i&&u.parent.options.showDragFillSmartTag&&1===e.length&&e[0].equals(r)&&4!==o.fnt&&o.Tet(o.fnt))}})},"./dist/plugins/fill/fill-render.js":function(t,n,i){var r,e,o,u,s;Object.defineProperty(n,"__esModule",{value:!0}),r=i("Core"),e=i("./dist/plugins/fill/utils.js"),o=r.GC$,u=Math.min,s=Math.max,o.extend(r.g7.prototype,{Let:function(t,n){var i,o=this.Mf,u=o.options.rightToLeft,s=t.x,a=t.y,l=(0,e.getWidth)(t),f=(0,e.getHeight)(t),c=o.U5(),h=o.Fi(),v=4,d=-2.5;return n>2007&&(v=5,d=-3),i=new r.Rect(-4,-4,v,v),-1===c.col?(i.x=u?h.BA+d:h.b6,i.y=a+f+d):-1===c.row?(i.x=u?s+d:s+l+d,i.y=h.T6):(i.x=u?s+d:s+l+d,i.y=a+f+d),i},yO:function(t,n,i,o,u){var a,l,f=this,c=f.Mf,h=c.Fi(),v=c.parent,d=v&&v.SC,g=f.Let(o,d),p=g.x,w=g.y,m=(0,e.getWidth)(g),y=(0,e.getHeight)(g),_=h.c9(n,i);u&&!g.intersectRect(u)||g.intersectRect(_)&&(a=-1.5,d>2007&&(a=-1),(l=new r.Rect(p+a,w+a,m+2,y+2)).x<_.x&&(l.width-=_.x-l.x,l.x=_.x),l.y=s(l.y,_.y),f.O1(l),t.save(),u&&!u.containsRect(g)&&(t.rect(u.x,u.y,(0,e.getWidth)(u),(0,e.getHeight)(u)),t.clip()),t.beginPath(),t.fillStyle=r.Pf.vl(c,c.getSelectionBorderColor()),t.fillRect(p,w,m,y),f.yet=new r.Rect(g.x,g.y,4,4),t.beginPath(),t.restore())},cet:function(t,n,i,r){var o=n.x,u=n.y,s=o+(0,e.getWidth)(n),a=u+(0,e.getHeight)(n);(0,e.paintDragLine)(t,o-2,u,s+1,u,i,r),(0,e.paintDragLine)(t,o-1,a,s+1,a,i,r),(0,e.paintDragLine)(t,o,u-1,o,a+1,i,r),(0,e.paintDragLine)(t,s,u-1,s,a+1,i,r)},Fet:function(t,n){var i,o,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,k,x=this,I=x.Mf,O=I.rt,A=O.q6,S=A.hitTarget;A&&S&&(i=A.hitCol,o=A.hitRow,s=A.row,a=A.col,l=O.i_,f=I.Pet,h=I.getSelectionBorderColor(),v=(0,e.getLineStyle)(I),d=8,t.save(),!0===l?(g=I.Yy(0).findCol(i)||I.Yy(1).findCol(i)||I.Yy(2).findCol(i),p=I._y(0).findRow(o)||I._y(1).findRow(o)||I._y(2).findRow(o),-1===A.row&&-1!==A.col?g&&(w=g.x,m=(0,e.getWidth)(g),A.col=i,S.x>w+m/2&&(A.col<I.getLastFullyVisibleColumn()||A.col===I.G6())&&(w=g.x+(0,e.getWidth)(g),A.col++),f&&0===(0,e.getWidth)(f)||(f=O.q6),f&&(c=new r.Rect(f.x-d,f.y-d,(0,e.getWidth)(f)+2*d,(0,e.getHeight)(f)+2*d),x.O1(c,n),x.E1(I.U5(),n)),I.Uet=new r.Rect(w,A.y,0,(0,e.getHeight)(A)),t.rect(n.x,n.y,(0,e.getWidth)(n),(0,e.getHeight)(n)),t.clip(),t.beginPath(),(0,e.paintDragLine)(t,w-d,A.y,w+d,A.y,h,v),(0,e.paintDragLine)(t,w,A.y,w,A.y+(0,e.getHeight)(A),h,v),(0,e.paintDragLine)(t,w-d,A.y+(0,e.getHeight)(A),w+d,A.y+(0,e.getHeight)(A),h,v)):-1!==A.row&&-1===A.col?p&&(y=p.y,_=(0,e.getHeight)(p),A.row=o,S.y>y+_/2&&(A.row<I.getLastFullyVisibleRow()||A.row===I.P6())&&(y=p.y+(0,e.getHeight)(p),A.row++),f&&0===(0,e.getHeight)(f)||(f=O.q6),f&&(c=new r.Rect(f.x-d,f.y-d,(0,e.getWidth)(f)+2*d,(0,e.getHeight)(f)+2*d),x.O1(c,n),x.E1(I.U5(),n)),I.Uet=new r.Rect(A.x,y,(0,e.getWidth)(A),0),t.rect(n.x,n.y,(0,e.getWidth)(n),(0,e.getHeight)(n)),t.clip(),t.beginPath(),(0,e.paintDragLine)(t,A.x,y-d,A.x,y+d,h,v),(0,e.paintDragLine)(t,A.x,y,A.x+(0,e.getWidth)(A),y,h,v),(0,e.paintDragLine)(t,A.x+(0,e.getWidth)(A),y-d,A.x+(0,e.getWidth)(A),y+d,h,v)):-1!==A.row&&-1!==A.col&&(C=I.Yy(0).findCol(a)||I.Yy(1).findCol(a)||I.Yy(2).findCol(a),D=I._y(0).findRow(s)||I._y(1).findRow(s)||I._y(2).findRow(s),p&&g&&D&&C&&(w=C.x,y=D.y,f&&(c=new r.Rect(f.x-d,f.y-d,(0,e.getWidth)(f)+2*d,(0,e.getHeight)(f)+2*d),x.O1(c,n),x.E1(I.U5(),n)),F=!1,b=I.getCellRect(o,i),!O.Cnt&&b&&(F=(j=A.hitTarget.x-b.x)<u(16,I.nn(i)/4)),F?w=g.x:y=p.y,I.Uet=new r.Rect(w,y,(0,e.getWidth)(A),(0,e.getHeight)(A)),I.U5().contains(o,i)||(t.rect(n.x,n.y,(0,e.getWidth)(n),(0,e.getHeight)(n)),t.clip(),t.beginPath(),F?((0,e.paintDragLine)(t,w-d,y,w+d,y,h,v),(0,e.paintDragLine)(t,w,y,w,y+(0,e.getHeight)(A),h,v),(0,e.paintDragLine)(t,w-d,y+(0,e.getHeight)(A),w+d,y+(0,e.getHeight)(A),h,v),O.Dnt=!0):((0,e.paintDragLine)(t,w,y-d,w,y+d,h,v),(0,e.paintDragLine)(t,w,y,w+(0,e.getWidth)(A),y,h,v),(0,e.paintDragLine)(t,w+(0,e.getWidth)(A),y-d,w+(0,e.getWidth)(A),y+d,h,v),O.Dnt=!1))))):(f&&(c=new r.Rect(f.x-d,f.y-d,(0,e.getWidth)(f)+2*d,(0,e.getHeight)(f)+2*d),x.O1(c,n),R=I.U5(),k=(M=(T=(0,r.Ec)(A.row,A.col,A.rowCount,A.colCount)).union(R)).row,M.row>2&&(M.row-=3),k+M.rowCount+2<I.getRowCount()&&(M.rowCount+=3+k-M.row),x.E1(M,n)),t.rect(n.x,n.y,(0,e.getWidth)(n),(0,e.getHeight)(n)),t.clip(),t.beginPath(),x.cet(t,A,h,v)),t.beginPath(),t.restore())},o_:function(){var t,n,i,o,u,s,a,l,f,c,h,v=this,d=v.Mf,g=d.sw,p=d.rt.xnt;g&&g.dragInfo&&p&&(t=v.J(),n=d.Fi(),i=d.rt.q6,o=d.j1(p),u=d.frozenTrailingColumnCount(),s=d.frozenTrailingRowCount(),a=d.getColumnCount()-u,l=d.getRowCount()-s,f=n.c9(1,1),u>0&&p.col+p.colCount<=a&&o.x+(0,e.getWidth)(o)>f.x+(0,e.getWidth)(f)&&o.intersectRect(f)&&(o=o.getIntersectRect(f)),s>0&&p.row+p.rowCount<=l&&o.y+(0,e.getHeight)(o)>f.y+(0,e.getHeight)(f)&&o.intersectRect(f)&&(o=o.getIntersectRect(f)),c=d.options.rightToLeft?new r.Rect(n.Hy,n.T6,n.b6+n.F6,n.Ay+n.Iy):new r.Rect(n.b6,n.T6,n.Hy+n.zy,n.Ay+n.Iy),(0,e.getWidth)(o)>=0&&(0,e.getHeight)(o)>=0&&(i.x=o.x,i.y=o.y,i.width=(0,e.getWidth)(o),i.height=(0,e.getHeight)(o),v.Fet(t,c)),h=d.rt.i_,d.Pet=!0===h?d.Uet:new r.Rect(i.x,i.y,(0,e.getWidth)(i),(0,e.getHeight)(i)))}})},"./dist/plugins/fill/fill-ui.js":function(t,n,i){var r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,k,x,I,O,A,S,E,V,H,N,P,q=this&&this.qKr||(L=function(t,n){return L=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])},L(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}L(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),L;function W(t,n,i,r,e,o){var u=t.Oi,l=u?"160px":"150px",f=u?"25px":"20px",h=s(a("div")).css([b,R,T,"padding",M],["block",l,f,0,0]).addClass("gc-smartMenu-item-default "+i+" ui-state-default"+c),v=s(a("div")).addClass(m).appendTo(h),d=s(a("div")).addClass("gc-menu-item-text").appendTo(h),g=s(a("input")).attr({id:n,value:e,type:"radio",name:"fill-group",style:"display:none"}).appendTo(v);return s(a("span")).text(r).appendTo(d),o?(v.addClass(w),g.prop("checked","checked")):g.prop("checked",""),h}Object.defineProperty(n,"__esModule",{value:!0}),n.Aet=void 0,r=i("Common"),e=i("Core"),o=i("./dist/plugins/fill/fill.ns.js"),u=i("./dist/plugins/fill/fill-event.js"),s=e.GC$,a=e.mt.En,l=e.mt.gi,f=s(document),c=" btn btn-default",v="gc-fill-type-item",d="gc-fill-menu-container",g=(h="ui-state-hover ")+"gc-smartMenu-item-hover",p=h+"gc-smart-tag-hover",w="ui-icon ui-icon-check gc-check-image",m="gc-menu-item-input",y="ui-state-active gc-smart-tag-active",_="gc-tag-container",C="float",D="left",F="top",b="display",j="width",R="min-width",T="height",M="margin",k="change",x="input[type=radio]",I="mouseover",O="mouseout",A="click",S="fillTypeChanged",E="keydown.ui-fill",V=new r.Common.ResourceManager(o.SR,"Fill"),H=V.getResource.bind(V),N=function(t){function n(n,i,r){var o,a=t.call(this,n,l(i.parent.Ti),void 0,!0)||this;return a.ter=e.DialogFeatureType.fill,a.Mf=i,a.Het=s("."+_),(o=a.g$=a.Xc()).addClass(d),r&u.FillAction.smartMenuCopyCells&&W(i,"smartMenuCopyCells",v,H().CopyCells,"0",!0).appendTo(o),r&u.FillAction.smartMenuFillSeries&&W(i,"smartMenuFillSeries",v,H().FillSeries,"1").appendTo(o),r&u.FillAction.smartMenuFillFormattingOnly&&W(i,"smartMenuFillFormattingOnly",v,H().FillFormattingOnly,"2").appendTo(o),r&u.FillAction.smartMenuFillWithoutFormatting&&W(i,"smartMenuFillWithoutFormatting",v,H().FillWithoutFormatting,"3").appendTo(o),a}return q(n,t),n.prototype.$c=function(){t.prototype.$c.call(this)},n.prototype.aY=function(){var t,n=this,i=s("."+v);i.bind(I,(function(){s(this).addClass(g)})).bind(O,(function(){s(this).removeClass(g)})).bind(A,(function(){var t,i=s(this),r=n.Het,e=i.find(x),o=e[0];o.checked=!0,e.trigger(k),r.trigger(A),r.trigger(O),i.removeClass(g),t=parseInt(s(o).attr("value"),10),n.Wet(t)})),(t=n.g$.find(x)).bind(k,(function(){s("."+m).removeClass(w),s(this).parent().addClass(w)}))},n.prototype.Qet=function(){s("."+v).unbind(I).unbind(O).unbind(A),this.g$.find(x).unbind(k)},n.prototype.Wet=function(t){var n=this,i=n.Mf,r=i.rt;if(n.Ket!==t){n.Ket=t,i.cnt=!0,i.suspendEvent();try{e.Commands.undo.execute(i.parent,{sheetName:i.name()})}finally{i.resumeEvent()}i.cnt=!1,i.Qy().execute({cmd:"fill",sheetName:i.name(),startRange:r.Ktt,fillRange:r.Xnt,autoFillType:t,fillDirection:r.bO}),n.Het.trigger(S,t)}},n.prototype.Jet=function(){return!!s("."+d).length},n}(e.zc),P=function(t){function n(n,i,r){var e,o=t.call(this,n,l(i.parent.Ti),void 0,!0)||this;return o.Mf=i,o.zet=r,e=o.Vet=o.Xc().addClass("gc-smart-tag-default "+_+" gc-no-user-select ui-widget-header"+c),o.Yet=s(a("div")).attr("class","fillSmartTag").css(C,D).appendTo(e),o.Zet=s(a("div")).attr("class","fillSmartTagDown").css([C,b],[D,"none"]).appendTo(e),o}return q(n,t),n.prototype.Xet=function(t,n,i){var r=this,e=r.Mf.Oi,o=s(n),u=r.qet,a=r.Zet,l=e?"38px":"32px",f=e?"24px":"18px";u&&u.Jet()||(t?o.addClass(p):o.removeClass(p),o.css([j,T],[t?l:f,f]),i||(t?a.show():a.hide()))},n.prototype.$et=function(){var t=this,n=t.Vet,i=e.mt.pi(),r=e.mt.Tt.safari&&(i.ipad||i.iphone);n.bind(I,(function(){t.Xet(!0,this,r)})).bind(O,(function(){t.Xet(!1,this,r)})),n.bind(A,(function(){var n,i,e=s(this),o=t.qet,u=t.Zet,a=o&&o.Jet();a?(r&&u.hide(),e.removeClass(y),t.tit()):(r&&u.show(),e.addClass(y),t.nit(),(i=(n=t.g$)&&n.find(x)[t.zet.fillType])&&!i.checked&&(i.checked=!0,s(i).trigger(k)))})),f.bind(E,(function(n){27===n.keyCode&&(t.qet&&t.qet.Jet()?t.tit():t.close(),e.mt.vi(n))}))},n.prototype.rQ=function(){var t=this,n=t.Vet,i=t.zet,r=t.Mf.Oi,e=r?"3px":"0px",o=r?"24px":"18px";n&&(n.css([D,F],[i.x,i.y]),t.$c(),t.$et(),t.Yet.css(M,e),t.Zet.css(T,o),t.c5())},n.prototype.nit=function(){var t,n,i,r,e,o,u,s=this,a=s.Mf;s.qet||(s.qet=new N(a.parent.j2(),a,this.zet.availableFillAction),s.g$=s.qet.Xc()),n=(t=s.Vet).css(D),i=t.css(F),r=parseFloat(i),o=s.qet,u=s.zet,o.Ket=u.fillType,isNaN(r)||(e=r+t.height()+2),s.g$.css([D,F],[n,e]),o.$c(),o.aY(),o.Het.unbind(S).bind(S,(function(t,n){u.fillType=n}))},n.prototype.RRe=function(){var t,n,i,r,e,o,u,s,a,l,f,c;this.rf()&&(-1===(i=(n=this.Mf).U5()).col?(r=n.C0(i.row+i.rowCount-1),e=n.S0(0)):-1===i.row?(r=n.C0(0),e=n.S0(i.col+i.colCount-1)):(r=n.C0(i.row+i.rowCount-1),e=n.S0(i.col+i.colCount-1)),o=n.getRangeRect(r,e,i),u=null===(t=n.parent)||void 0===t?void 0:t.SC,s=n.Dn.Let(o,u),l=(a=n.Fi()).c9(r,e),f=3,s.intersectRect(l)?this.Vet.css([D,F],[s.x+f,s.y+f]):this.Vet.css(b,"none"),this.Vet.removeClass(y),(c=this.qet)&&c.rf()&&c.close())},n.prototype.tit=function(){var t=this.qet;t&&(t.Qet(),t.close())},n.prototype.c5=function(){var t=this,n=t.qet,i=t.Vet;n&&(n.Jet()&&i.trigger(A),i.trigger(O))},n.prototype.close=function(){var n,i=this,r=i.Mf;i.c5(),f.unbind(E),t.prototype.close.call(this),(n=r.fg)&&(n.style.cursor="default"),!r||r.il&&r.il.XD||r.Zg()},n.prototype.lf=function(n){var i;return!(!this.Wc||!t.prototype.hf.call(this,this.Wc.get(0),n))||this.g$&&t.prototype.hf.call(this,this.g$.get(0),n)},n}(e.zc),n.Aet=P},"./dist/plugins/fill/fill.entry.js":function(t,n,i){var r=this&&this.JKr||(Object.create?function(t,n,i,r){void 0===r&&(r=i);var e=Object.getOwnPropertyDescriptor(n,i);e&&!("get"in e?!n.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,r,e)}:function(t,n,i,r){void 0===r&&(r=i),t[r]=n[i]}),e=this&&this.XKr||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||r(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-fill.js"),i("./dist/plugins/fill/fill-event.js"),i("./dist/plugins/fill/fill-render.js"),i("./dist/plugins/fill/drag-header-to-move/index.js"),e(i("./dist/plugins/fill/fill-ui.js"),n),e(i("./dist/plugins/fill/fill.js"),n),e(i("./dist/plugins/fill/fill.ns.js"),n)},"./dist/plugins/fill/fill.js":function(t,n,i){var r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,k,x,I,O,A,S,E,V,H,N,P,q,L,W,B,$,z,U,G,K,J,Q,X,Y,Z,tt=this&&this.qKr||(nt=function(t,n){return nt=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])},nt(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}nt(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),nt;function it(t){return!rt(t)&&l.q8(t)}function rt(t){return"string"==typeof t}function et(t,n){return-1!==t.lastIndexOf(n)}function ot(t){var n=[t];return n.rowCount=1,n.colCount=m(t),n}function ut(t){return t}function st(t,n,i,e){var o=ot(n),u=ot(i),s=ot([e]),a=t?r.Common.eit(o,u,s,!0,ut,f,f,f):r.Common.iit(o,u,s,!0,f,f,f),l=a&&a[0][0];return typeof l===D?r.Common.st.E8(l,13):l}function at(t){return t.toLowerCase()}function lt(t){var n,i,r=t.length,e=1;if(r>1)for(e=t[1]-t[0],i=2;i<r;i++)if(e!==(n=t[i]-t[i-1])){e=0;break}return e}function ft(t,n){return t>0?(t-1)%n:n-Math.abs(t)%n-1}function ct(t){for(var n="",i=0;i<t;)n+="0",i++;return n}function ht(t,n){return 12*(n.getFullYear()-t.getFullYear())+(n.getMonth()-t.getMonth())}function vt(t){return t.every((function(t){var n;return 1===t.getDate()}))}function dt(t){return t.every((function(t){var n=t.getFullYear(),i=t.getMonth(),r=t.getDate(),e=new Date(n,i+1,0).getDate();return r===e}))}function gt(t){var n=0,i=t.every((function(t){var i=t.getDate();return n||(n=i),n===i}));return i?n:0}function pt(t,n){var i,r,e=t.length,o=!0;for(r=2;r<e&&(o=n===(i=ht(t[r-1],t[r])));r++);return o}function wt(t){return t.every((function(t){var n=t.getHours(),i=t.getMinutes(),r=t.getSeconds();return 0!==n||0!==i||0!==r}))}function mt(t,n){return new Date(t,n+1,0).getDate()}function yt(t){return"0"===t[0]}function _t(t,n,i){var r,e,o,u,s,a=i?1:2,l=i?2:1;return n.every((function(n){return!!(r=n.match(t.pit))&&(e=r[a],(s=e.length)>t.yit&&yt(e)&&(t.yit=s),o=parseInt(e,10),u=r[l],d(t.cit)&&(t.cit=u),u!==t.cit?(t.wit=!0,t.cit=f,t.sit=[]):t.sit.push(o),!0)}))}function Ct(t){t.forEach((function(t){t&&t.dispose()}))}Object.defineProperty(n,"__esModule",{value:!0}),n.Wtt=n.nnt=n.FillDateUnit=n.FillType=n.FillSeries=n.FillDirection=n.AutoFillType=void 0,r=i("Common"),e=i("Core"),o=i("CalcEngine"),u=i("SheetsCalc"),s=i("./dist/plugins/fill/fill.ns.js"),a=!!o,l=r.Common.lt,f=null,c=void 0,h=Math.floor,v=e.Ec,d=l.ht,g=l.uJ,p=r.Common.Uf,w=p.Eit,m=p.tR,y=r.Common.ct,_=y.o0,C=y.Y0,D="number",F="date",b="string",j="default",R=new r.Common.ResourceManager(s.SR,"Fill"),T=R.getResource.bind(R),M=r.Common.CultureManager,function(t){t[t.copyCells=0]="copyCells",t[t.fillSeries=1]="fillSeries",t[t.fillFormattingOnly=2]="fillFormattingOnly",t[t.fillWithoutFormatting=3]="fillWithoutFormatting",t[t.clearValues=4]="clearValues",t[t.auto=5]="auto"}(k=n.AutoFillType||(n.AutoFillType={})),function(t){t[t.left=0]="left",t[t.right=1]="right",t[t.up=2]="up",t[t.down=3]="down"}(x=n.FillDirection||(n.FillDirection={})),function(t){t[t.column=0]="column",t[t.row=1]="row"}(I=n.FillSeries||(n.FillSeries={})),function(t){t[t.direction=0]="direction",t[t.linear=1]="linear",t[t.growth=2]="growth",t[t.date=3]="date",t[t.auto=4]="auto"}(O=n.FillType||(n.FillType={})),function(t){t[t.day=0]="day",t[t.weekday=1]="weekday",t[t.month=2]="month",t[t.year=3]="year"}(A=n.FillDateUnit||(n.FillDateUnit={})),S=function(){function t(t){this._indexes=[],this.oit=[],this.ait=[],this._type=f,this.sit=[],this.cit=f,this.lit=d(t)?-1:t}return t.prototype.jit=function(){return m(this._indexes)},t.prototype.Oit=function(){var t=this,n=[],i=t.oit,r,e;for(r=0;r<m(i);r++)e=i[r],n.push("object"===t._type?t.r0(e):e);return n},t.prototype.Rit=function(){var t,n,i,r=this,e=r._indexes;if(m(e)>0){for(n=[],i=void 0,-1===(t=r.lit)&&(t=e[0]),i=0;i<m(e);i++)n[i]=e[i]-t+1;return n}return f},t.prototype.Bit=function(){var t=this.oit;return m(t)?t:f},t.prototype.Eit=function(t,n,i){if(!it(i))throw new Error(T().Exp_NumberOnly);var r=this;d(r._type)&&(r._type=i instanceof Date?F:D),w(r._indexes,t,n),w(r.oit,t,g(i))},t.prototype.ZP=function(t,n){var i=this,r=d(i._type);it(n)?(r&&(n instanceof Date?i._type=F:i._type=D),i.oit.push(g(n))):r&&(i._type=rt(n)?b:j),i._indexes.push(t),i.ait.push(n)},t.prototype.Lit=function(t){return this._type===F?this.r0(t):t},t.prototype.r0=function(t){var n=f;if(t instanceof Date)n=t;else if(o)try{n=o.Convert.r0(t)}catch(i){n=t}return n},t}(),E=function(){function t(t){this.hit=-1,this.dit=[],this.MV=-1,this.Mf=t}return t.prototype.L0=function(){this.Mf=f},t.prototype.Fit=function(){var t=this.Mf;return t.parent&&t.parent.Ow()||[]},t.prototype.Pit=function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d,g=t.length,p=!1;if(t&&g>0)for(n=at(t[0]),i=this.Fit(),r=void 0,e=void 0,o=void 0,u=void 0,s=void 0,a=void 0,r=0;r<i.length;r++)if((u=(o=(e=i[r]).map((function(t){return at(t)}))).indexOf(n))>=0){for(s=u,l=o.length,f=void 0,c=void 0,h=void 0,v=1;v<g;v++){if(c=at(t[v]),!((f=o.indexOf(c))>=0)){p=!1;break}if(h=f-s+l,a){if(a!==h){p=!1;break}}else p=!0,a=h,s=f}if(d=1===g,p||d){p=!0,this.hit=u,this.dit=e,this.MV=d?1:a;break}}return p},t.prototype.Sl=function(t){var n=this.dit,i=this.hit,r=this.MV,e=n.length,o,u;return n[u=(i+r*ft(t,e))%e]},t}(),V=function(){function t(){this.vit="",this.mit="",this.MV=0,this.git=1,this._padding=""}return t.prototype.Sl=function(t){var n=this.MV*(t-1)+this.git,i=this._padding.length,r=""+Math.abs(n),e=r.length,o=this._padding+r,u=o.length;return r=e>i?r:o.substr(u-i),this.vit+r+this.mit},t}(),N=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.Mit=0,n._type=F,n}return tt(n,t),n}(H=function(){function t(){}return t.prototype.match=function(t){return!1},t.prototype.getTargetValue=function(t,n,i,r,e){},t.prototype.resetProp=function(){},t.prototype.Git=function(t,n){return t.indexOf(n+1)},t.prototype.dispose=function(){},t}()),P=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return tt(n,t),n.prototype.match=function(t){var n=this.Mit=ht(t[0],t[1]),i=vt(t),r=t.length,e=!0;return i&&r>2&&(e=pt(t,n)),i&&e},n.prototype.getTargetValue=function(t,n){var i,r=t.ait[0],e=r.getFullYear(),o,u=n-1,s,a=r.getMonth()+this.Mit*u;return new Date(e+parseInt(a/12,10),a%12,1)},n}(N),q=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return tt(n,t),n.prototype.match=function(t){var n=this.Mit=ht(t[0],t[1]),i=dt(t),r=t.length,e=!0;return i&&r>2&&(e=pt(t,n)),i&&e},n.prototype.getTargetValue=function(t,n){var i,r=t.ait[0],e=r.getFullYear(),o,u=n-1,s,a=r.getMonth()+this.Mit*u,l=e+parseInt(a/12,10),f=a%12;return new Date(l,f,mt(l,f))},n}(N),L=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return tt(n,t),n.prototype.match=function(t){var n,i,r,e,o,u=!1;return wt(t)||(n=this.Mit=ht(t[0],t[1]),r=(i=gt(t))>0,e=t.length,o=!0,this.Uit=i,r&&e>2&&(o=pt(t,n)),u=r&&o),u},n.prototype.getTargetValue=function(t,n){var i,r=t.ait[0],e=r.getFullYear(),o,u=n-1,s,a=r.getMonth()+this.Mit*u,l=e+parseInt(a/12,10),f;return new Date(l,a%12,this.Uit)},n}(N),W=function(t){function n(){var n=t.call(this)||this;return n.pit=f,n.sit=[],n.cit=f,n.wit=!1,n.yit=0,n._type=b,n.Cit=!1,n.Sit=!1,n.Tit=new V,n}return tt(n,t),n.prototype.resetProp=function(){this.sit=[],this.yit=0,this.cit=f,this.wit=!1,this.Cit=!1,this.Sit=!1},n.prototype.getInternal=function(t){var n,i,r=!1,e=t[0];for(i=1;i<t.length;i++)if(n=t[i],1!==Math.abs(n-e)){r=!0;break}return r},n}(H),B=function(t){function n(n){var i=t.call(this)||this;return i.Ait=new E(n),i}return tt(n,t),n.prototype.dispose=function(){var t=this;t.Ait&&(t.Ait.L0(),t.Ait=f)},n.prototype.match=function(t){return this.Ait.Pit(t)},n.prototype.getTargetValue=function(t,n,i,r,e){var o,u=t.ait.length,s=this.Git(i,r),a=f,l;return-1!==s&&(l=u*e+s+1,a=this.Ait.Sl(l)),a},n}(W),$=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.pit=/^\d+$/,n}return tt(n,t),n.prototype.match=function(t){var n=this,i,r,e;return t.every((function(t){return!!(i=t.match(n.pit))&&((e=t.length)>n.yit&&yt(t)&&(n.yit=e),r=parseInt(t,10),n.sit.push(r),!0)}))},n.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=lt(this.sit),a=o.length,l=0!==s,c=l?0:ft(n,a),h=this.Git(i,r),v=f,d;return this.Cit=l,this.Sit=this.getInternal(t._indexes),-1!==h&&(u.MV=s,u.git=this.sit[c],u._padding=ct(this.yit),d=a*e+h+1,v=u.Sl(d)),v},n}(W),z=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.pit=/^(.*\D+)(\d+)$/,n}return tt(n,t),n.prototype.match=function(t){return _t(this,t,!1)},n.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=lt(this.sit),a=o.length,l=0!==s,c=l?0:ft(n,a),h=this.Git(i,r),v=f,d;return this.Cit=l,this.Sit=this.getInternal(t._indexes),-1!==h&&(u.vit=this.cit,u.MV=s,u.git=this.sit[c],u._padding=ct(this.yit),d=a*e+h+1,v=u.Sl(d)),v},n}(W),U=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.pit=/^(\d+)(\D+.*)$/,n}return tt(n,t),n.prototype.match=function(t){return _t(this,t,!0)},n.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=lt(this.sit),a=o.length,l=0!==s,c=l?0:ft(n,a),h=this.Git(i,r),v=f,d;return this.Cit=l,this.Sit=this.getInternal(t._indexes),-1!==h&&(u.mit=this.cit,u.MV=s,u.git=this.sit[c],u._padding=ct(this.yit),d=a*e+h+1,v=u.Sl(d)),v},n}(W),G=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.pit=/^(.*\D+)(\d+)(\D+.*)$/,n}return tt(n,t),n.prototype.resetProp=function(){t.prototype.resetProp.call(this),this.Hit=f},n.prototype.match=function(t){var n,i,r,e,o,u,s=this;return t.every((function(t){return!!(n=t.match(s.pit))&&(i=n[2],(u=i.length)>s.yit&&yt(i)&&(s.yit=u),r=parseInt(i,10),e=n[1],d(s.cit)&&(s.cit=e),o=n[3],d(s.Hit)&&(s.Hit=o),e!==s.cit||o!==s.Hit?(s.wit=!0,s.cit=f,s.Hit=f,s.sit=[]):s.sit.push(r),!0)}))},n.prototype.getTargetValue=function(t,n,i,r,e){var o=this,u=t.ait,s=o.Tit,a=lt(o.sit),l=u.length,c=0!==a,h=c?0:ft(n,l),v=o.Git(i,r),d=f,g;return o.Cit=c,o.Sit=o.getInternal(t._indexes),-1!==v&&(s.vit=o.cit,s.mit=o.Hit,s.MV=a,s.git=o.sit[h],s._padding=ct(o.yit),g=l*e+v+1,d=s.Sl(g)),d},n}(W),K=["-","_",":",".",","],J=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return tt(n,t),n.prototype.resetProp=function(){t.prototype.resetProp.call(this),this.zit=f},n.prototype.match=function(t){var n,i,r,e,o,u,s,a=this;return t.every((function(t){var l,c,h,v=a.zit;if(s=d(v)?K.some((function(n){if(et(t,n))return a.zit=n,!0})):et(t,v)){if(v=a.zit,l=t.lastIndexOf(v),e=t.substring(0,l+1),d(a.cit))a.cit=e;else if(a.cit!==e)return!1;if(c=t.substr(l+1),h=/^(\d+)(\D+.*)$/,n=c.match(h))return i=n[1],(u=i.length)>a.yit&&yt(i)&&(a.yit=u),r=parseInt(i,10),o=n[2],d(a.Hit)&&(a.Hit=o),o!==a.Hit?(a.cit=f,a.Hit=f,a.sit=[],!1):(a.sit.push(r),!0)}return!1}))},n}(G),Q=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return tt(n,t),n.prototype.getTargetValue=function(t,n,i){return st(!0,t.Bit(),i,n)},n}(H),X=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.Cit=!0,n}return tt(n,t),n.prototype.getTargetValue=function(t,n,i,r){var e=t.ait,o,u;return e[ft(n,e.length)]},n}(H),Y=function(){function t(t){var n,i,r,e,o,u,s=this;s.Iit=[new P,new q,new L],s.xit=new Q,s.Nit=new X,n=M.culture(),i=M.Fe(n).isJCKCulture,r=new B(t),e=new $,o=new z,u=new U,s.kit=i?[r,e,new J,o,u,new G]:[r,e,o,u]}return t.prototype.getRule=function(t,n){var i,r,e,o=[],u=this.Nit;for(t===F?(o=this.Iit,u=this.xit):t===b?o=this.kit:t===D&&(u=this.xit),i=0;i<o.length;i++)if(e=void 0,(r=o[i]).resetProp(),r.match(n)){if(e=r.wit,d(e)||!1===e)return r;if(!0===e)return u}return u},t.prototype.L0=function(){var t=this;t.Iit&&(Ct(t.Iit),t.Iit=f),t.kit&&(Ct(t.kit),t.kit=f),t.xit&&(t.xit.dispose(),t.xit=f),t.Nit&&(t.Nit.dispose(),t.Nit=f)},t}(),n.nnt=Y,Z=function(){function t(t){this.Mf=t,this.Dit=!1,this._it=[]}return t.prototype.qtt=function(t,n,i,r,e){var o=this,u=t?1:2;d(r)&&d(e)?o.$tt(n,i,u):o.$tt(n,i,u,r,e,f)},t.prototype.$tt=function(t,n,i,r,e,o){var u,s,a,l,f,c,h,v,d,g,p,w,y,_,C,D,F,b,j=this,R=j.Mf,M=R.JS(t),k=M.row,x=M.col,I=M.rowCount,O=M.colCount;if(R.Ut.eE(k,x,I,O))throw new Error(T().Exp_RangeContainsMergedCell);for(h=0,d=(v=1===n)?O:I,g=v?k:x,p=v?k+I:x+O,w=(c=arguments.length>3)?1:d,_=(y=this.Mf.rt.Ktt).row===k&&y.rowCount===I&&y.col>x||y.col===x&&y.colCount===O&&y.row>k,u=g;u<p;u++)if(C=_&&c?x+O-1:x,D=_&&c?k+I-1:k,(F=v?j.Vit(u,C,1,w,n):j.Vit(D,u,w,1,n))&&F.jit())for(l=F._indexes[0],c?(f=_?F.oit[m(F.oit)-1]:F.oit[0],s=j.Yit(_,f,d,i,r,e,o),_&&(h=d-m(s),l=F._indexes[m(F._indexes)-1])):s=j.Zit(F,d,i),a=0;a<m(s);a++)b=F.Lit(s[a]),v?j.Wit(R,u,l,u,x+h+a,b,i):j.Wit(R,l,u,k+h+a,u,b,i)},t.prototype.Vit=function(t,n,i,r,e){for(var o=f,u=this.Mf,s,a=1===e,l=a?n+r-1:t+i-1,c=a?n:t;l>=c;)it(s=a?u.getValue(t,l):u.getValue(l,n))&&(o||(o=new S(c)),o.Eit(0,l,s)),l--;return o},t.prototype.Yit=function(t,n,i,r,e,o,u){var s,a,l,f=[],c=n,h=e>=0,v=d(o);for(s=0;s<i;s++)a=c>=o,l=c<=o,t&&(v||h&&a||!h&&l)?(f.unshift(c),1===r?c-=e:2===r?c/=e:3!==r||d(u)||(c=this.Qit(!0,u,n,c,e,s+1))):!t&&(v||h&&l||!h&&a)&&(f.push(c),1===r?c+=e:2===r?c*=e:3!==r||d(u)||(c=this.Qit(!1,u,n,c,e,s+1)));return f},t.prototype.Zit=function(t,n,i){var r=[],e,o=1===i;if(o||2===i){for(1===t.jit()&&t.ZP(t._indexes[0]+1,o?t.Lit(t.oit[0]+1):t.Oit()[0]),e=0;e<n;e++)r.push(st(!!o,t.Bit(),t.Rit(),e+1));return r}return f},t.prototype.Jtt=function(t,n,i,r,e,o){var u,s=this,a=s.Mf,l=a.Ut,f=a.JS(t),c=f.row,h=f.col,v=f.rowCount,d=f.colCount,g=a.JS(a.rt.Ktt),p=g.row,w=g.col;if(l.GT(p,w,g.rowCount,g.colCount)||l.GT(c,h,v,d))throw new Error(T().Exp_ChangeMergedCell);return u=s.Kit(g,v,d,n,i,!(c<p||h<w),r,e,o),s.Jit&&s.Jit.IB&&(s.Jit.IB.reFilter(),delete s.Jit),u},t.prototype.Kit=function(t,n,i,r,e,o,u,s,a){var l=this,d=o?1:-1,g,p,w,m,y=t.row,_=t.col,C=t.rowCount,D=t.colCount;if(1===r){if(g=h(i/D),p=i%D,!e)for(m=1;m<g;m++)l.Mf.Y1r=m*d,w=v(y,_+m*d*D,C,D),l.Fhe(t,w,r,4,e,o,c,c,!0,u,s),l.Xit(t,w,r,4,e,o,c,c,!0,u,s),delete l.Mf.Y1r;if(e&&g>1&&0===p&&(g-=1,p=D),g>0&&p>0)return w=v(y,o?_+g*D:_-g*D+D-p,C,p),l.Fhe(t,w,r,4,e,o,f,o?0:D-p,c,u,s),l.Xit(t,w,r,4,e,o,f,o?0:D-p,c,u,s)}else{if(g=h(n/C),p=n%C,l.Dit||(w=v(y+d*C,_,n-C,i),l.qit(t,w,d,a)),!e)for(m=1;m<g;m++)w=v(y+m*d*C,_,C,D),l.Fhe(t,w,r,4,e,o,f,f,!0,u,s),l.Xit(t,w,r,4,e,o,f,f,!0,u,s);if(e&&g>1&&0===p&&(g-=1,p=C),g>0&&p>0)return w=v(o?y+g*C:y-g*C+C-p,_,p,D),l.Fhe(t,w,r,4,e,o,o?0:C-p,f,!0,u,s),l.Xit(t,w,r,4,e,o,o?0:C-p,f,!0,u,s)}},t.prototype.Xit=function(t,n,i,r,e,o,u,s,a,l,c){var h,v,g,p,w,m,y,_,C,j,R,T,M,k,x,I,O,A,E,V,H,N,P,q,L,W,B,$,z,U,G,K,J,Q=this,X=Q.Mf,Y=X.Ut,Z=1===i,tt=Z?t.row:t.col,nt=Z?t.col:t.row,et=Z?n.row:n.col,ot=Z?n.col:n.row,ut=Z?t.rowCount:t.colCount,st=Z?t.colCount:t.rowCount,at=Z?n.colCount:n.rowCount;for(g=0;g<ut;g++){for(w=f,m=f,y=0,j=_=tt+g,R=C=et+g,T=(Z?s:u)||0,M=Z?0:T,k=Z?f:a,x=f;y<st;)if(A=void 0,E=I=nt+y,V=O=ot+y-T,Z||(_=I,I=j,C=O,O=R),v=Y.findSpan(_,I),A=X.getValue(_,I),(H=Q.Dit)&&d(x)&&(x=!1===o?X.getValue(nt+st-1,I):X.getValue(_,I)),H||4!==r||!it(A)&&!rt(A)||X.hasFormula(_,I)||(w||(w=new S),h=it(A)?A instanceof Date?F:D:b,m||(m=h),m!==h))if(!H&&A&&w&&w.jit()){if(p=Q.$it(Z,t,n,j,R,w,e,o,M,k,l,c),e&&p)return p;w=f,m=f}else{if(H||!v||v&&(Z?v.row:v.col)===j)if(N=V===ot+at-1,P=H?x:A,e){if(H)return P;if(v&&N||!v&&(N&&o||!o&&V===ot))return A}else V<ot+at&&V>=ot&&(H||Z||!Z&&!(a&&X.XT&&X.XT(V)))&&(H&&-1!==Q._it.indexOf(C)||Q.Wit(X,_,I,C,O,P,r,l,c));v?y+=Z?v.colCount:v.rowCount:y++}else w.ZP(E,A),v?y+=Z?v.colCount:v.rowCount:y++;if(Q.Dit)for(q=t.row,L=t.col,W=t.rowCount,B=t.colCount,$=void 0,z=void 0,U=!1===o?-1:1,G=1;G<W;G++)for($=q+U*G,K=0;K<B;)z=L+K,J=!1===o?X.getValue(nt+st-1,z):X.getValue(q,z),-1===Q._it.indexOf($)&&Q.Wit(X,q,L,$,z,J,r,l,c),K++;if(w&&w.jit()&&(p=Q.$it(Z,t,n,j,R,w,e,o,M,a,l,c),e&&!d(p)))return p}return f},t.prototype.Fhe=function(t,n,i,r,e,o,u,s,a,l,c){var h,v,g,p,w,m,y,_,C,j,R,T,M,k,x,I,O,A,E,V,H,N,P,q,L,W,B,$,z,U,G,K,J,Q,X,Y,Z,tt,nt,et,ot,ut,st,at,lt;if(!e){for(p=(g=(v=(h=this).Mf).Ut).Ehe(),j=(w=1===i)?t.row:t.col,R=w?t.col:t.row,T=w?n.row:n.col,M=w?n.col:n.row,k=w?t.rowCount:t.colCount,x=w?t.colCount:t.rowCount,I=w?n.colCount:n.rowCount,C=0;C<k;C++){for(O=f,A=f,E=0,N=V=j+C,P=H=T+C,q=(w?s:u)||0,L=w?0:q,W=w?f:a,B=f;E<x;)U=f,G=$=R+E,K=z=M+E-q,w||(V=$,$=N,H=z,z=P),_=g.findSpan(V,$),J=v.getValueIgnoreDefault(V,$),d(J)?E++:((m=p.getFormula(V,$))&&""!==m||(U=p.getValue(V,$)),(Q=h.Dit)&&d(B)&&(B=!1===o?p.getValue(R+x-1,$):p.getValue(V,$)),Q||4!==r||!it(U)&&!rt(U)||(O||(O=new S),y=it(U)?U instanceof Date?F:D:b,A||(A=y),A!==y)?!Q&&U&&O&&O.jit()?(h.$it(w,t,n,N,P,O,e,o,L,W,l,c,!0),O=f,A=f):((Q||!_||_&&(w?_.row:_.col)===N)&&(X=Q?B:U,K<M+I&&K>=M&&(Q||w||!w&&!(a&&v.XT&&v.XT(K)))&&(Q&&-1!==h._it.indexOf(H)||h.Wit(v,V,$,H,z,X,r,l,c,!0))),_?E+=w?_.colCount:_.rowCount:E++):(O.ZP(G,U),_?E+=w?_.colCount:_.rowCount:E++));if(h.Dit)for(Y=t.row,Z=t.col,tt=t.rowCount,nt=t.colCount,et=void 0,ot=void 0,ut=!1===o?-1:1,st=1;st<tt;st++)for(et=Y+ut*st,at=0;at<nt;)lt=!1===o?p.getValue(R+x-1,ot):p.getValue(Y,ot),ot=Z+at,-1===h._it.indexOf(et)&&h.Wit(v,Y,Z,et,ot,lt,r,l,c,!0),at++;O&&O.jit()&&h.$it(w,t,n,N,P,O,e,o,L,W,l,c,!0)}return f}},t.prototype.qit=function(t,n,i,r){var e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y=this,_=y.Mf,C=_.tables,D=t.union(n),F=D.row,b=D.rowCount,j=t.row,R=t.col,T=t.rowCount,M=t.colCount;if(C)for(o=0,u=e=C.AB(j,R,T,M);o<u.length;o++){if(a=(s=u[o]).Ky,l=s.iw,f=b,r)for(c=0,h=r;c<h.length;c++)if((v=h[c]).row===a&&v.col===l){f=v.rowCount,y.Jit=s;break}if(d=s.IB,g=y._it,p=void 0,d&&d.isFiltered&&d.isFiltered()){for(w=0;w<f;w++)p=F+i*w,d.isRowFilteredOut(p)&&y._it.push(p);if(g.length>0){y.Dit=!0;break}}}if(m=_.IB,!0!==y.Dit&&m&&m.isFiltered&&m.isFiltered()){for(g=y._it,p=void 0,w=0;w<b;w++)p=F+i*w,m.isRowFilteredOut(p)&&y._it.push(p);g.length>0&&(y.Dit=!0)}},t.prototype.Wit=function(t,n,i,r,o,s,l,h,v,g){var p,w,m,y=t.Ut,_=t.isActualProtected()&&t.getCell(n,i).hidden();a&&!_&&(g?((p=y.Ehe().getExpression(n,i))&&t.hasFormula(n,i,3,!0)||!d(t.getValueIgnoreDefault(n,i)))&&(0,e.copyDefaultFormula)(t,t,r,o,p):(t.hasFormula(n,i,3)||t.hasFormula(r,o,3))&&(t.setFormula(r,o,f),0!==l&&4!==l||(t.getFormula(n,i)||y.getDefaultValue(n,i,f,e.DefaultChangeValueType.Expression))&&u.CalcOperatorAdjustor.copyFormula(t,n,i,t,r,o,1,1,c,!0))),g||d(t.getValueIgnoreDefault(n,i))&&!d(y.getDefaultValue(n,i,f,e.DefaultChangeValueType.Value))?y.getDefaultValue(n,i,f,e.DefaultChangeValueType.Expression)||y.setDefaultValue(r,o,s,c,e.DefaultChangeValueType.Value):t.setValue(r,o,s),g||(w=v?0:64,h&&(w|=128,w|=4096),w|=1024,w|=256,t.vT(n,i,r,o,1,1,w,c,!0),v||(t.removeSpan(r,o,3),(m=y.findSpan(n,i))&&n===m.row&&i===m.col&&t.EL(r,o,m.rowCount,m.colCount,3)))},t.prototype.$it=function(t,n,i,r,e,o,u,s,a,l,c,h,v){var d,g,p,w,m,y,_,C,D,j,R,T,M,k,x,I,O=this,A=O.Mf,S=t?i.col:i.row,E=t?n.col:n.row,V=t?i.colCount:i.rowCount,H=t?n.colCount:n.rowCount;if(a=a||0,m=o.jit(),y=(S-E-a)/H,_=O.Cit(o._indexes,o.oit),C=o._type,_){for(p=[],g=0;g<m;g++)p[g]=g+1;d=m}else w=o._indexes[0],d=o._indexes[m-1]-w+1,1===m&&C!==b&&o.ZP(o._indexes[0]+1,o.Lit(o.oit[0]+1)),p=o.Rit();for(g=0;g<d;g++)if(D=o.ait,j=void 0,R=void 0,T=void 0,C!==F&&C!==b||(j=A.tnt&&A.tnt.getRule(C,D)),j?(R=j.getTargetValue(o,d*y+g+1,p,g,y),_=j.Cit?j.Cit:_,M=!!j.Sit&&j.Sit,T=_&&!M):(R=st(!0,o.Bit(),p,d*y+g+1),T=_),k=S+V-1,I=(x=T?o._indexes[g]:w+g)+y*H,u){if(_&&(s&&I===k||!s&&I===S)||!_&&I+a===k)return o.Lit(R)}else I<S+V&&I>=S&&(t?l&&A.XT&&A.XT(r)||O.Wit(A,r,x,e,I,o.Lit(R),4,c,h,v):l&&A.XT&&A.XT(I)||O.Wit(A,x,r,I,e,o.Lit(R),4,c,h,v));return f},t.prototype.Cit=function(t,n){var i,r,e,o=m(n);if(o<=1||m(t)!==o)return!1;for(i=t[1]-t[0],r=n[1]-n[0],e=2;e<o;e++)if(t[e]-t[e-1]!==i||n[e]-n[e-1]!==r)return!1;return!0},t.prototype.Xtt=function(t,n){var i=this,r=this.Mf,e=r.Ut.getSpans(),o=r.JS(t),u=o.row,s=o.col,a=o.rowCount,l=o.colCount,f;f=0===n?v(u,s+l-1,a,1):1===n?v(u,s,a,1):v(2===n?u+a-1:u,s,1,l),(f=r.nR(e,f))&&i.trt(f,u,s,a,l,n)},t.prototype.trt=function(t,n,i,r,e,o){var u=this,s=t.row,a=t.col,l=t.rowCount,f=t.colCount,d,g,p,w,m,y,_,C=u.Mf.Ut,D;if(0===o?(D=C.eE(n,i,r,e-f),y=0,_=-1*f,p=e,w=f,m=1):1===o?(D=C.eE(n,i+f,r,e-f),y=0,_=f,p=e,w=f,m=1):2===o?(D=C.eE(n,i,r-l,e),y=-1*l,_=0,p=r,w=l,m=0):(D=C.eE(n+l,i,r-l,e),y=l,_=0,p=r,w=l,m=0),D)throw new Error(T().Exp_TargetContainsMergedCells);if(p%w!==0)throw new Error(T().Exp_MergedCellsIdentical);for(d=h(p/w),g=1;g<d;g++)u.Xit(t,v(s+g*y,a+g*_,l,f),m,0,c,c,c,c,!0)},t.prototype.Qit=function(t,n,i,r,e,o){var u=t?-1:1,s=h(o*e),a=Math.abs(e),l=C(n>1?i:r);if(0===n)l.setDate(l.getDate()+u*e);else if(1===n)for(;a>0;)l.setDate(l.getDate()+u*(e>0?1:-1)),6!==l.getDay()&&0!==l.getDay()&&a--;else 2===n?l.setMonth(l.getMonth()+u*s):l.setFullYear(l.getFullYear()+u*s);return _(l)},t}(),n.Wtt=Z},"./dist/plugins/fill/fill.ns.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SR=void 0;var r=i("./dist/plugins/fill/fill.res.en.js");n.SR={en:r}},"./dist/plugins/fill/fill.res.en.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Exp_ChangePartOfArray=n.Exp_RangeIsNull=n.Exp_CellReadOnly=n.Exp_RowReadOnly=n.Exp_ColumnReadOnly=n.Exp_ChangeMergedCell=n.Exp_FillCellsReadOnly=n.Exp_FillRangeContainsMergedCell=n.Exp_MergedCellsIdentical=n.Exp_TargetContainsMergedCells=n.Exp_RangeContainsMergedCell=n.Exp_NumberOnly=n.FillWithoutFormatting=n.FillFormattingOnly=n.FillSeries=n.CopyCells=void 0,n.CopyCells="Copy Cells",n.FillSeries="Fill Series",n.FillFormattingOnly="Fill Formatting Only",n.FillWithoutFormatting="Fill Without Formatting",n.Exp_NumberOnly="Only works for Numbers",n.Exp_RangeContainsMergedCell="Range should not have merged cells.",n.Exp_TargetContainsMergedCells="Target range should not have merged cells.",n.Exp_MergedCellsIdentical="This operation requires the merged cells to be identically sized.",n.Exp_FillRangeContainsMergedCell="Cannot fill range that contains a merged cell.",n.Exp_FillCellsReadOnly="The cells you are trying to fill are protected and therefore read-only.",n.Exp_ChangeMergedCell="Cannot change part of merged cell.",n.Exp_ColumnReadOnly="The column you are trying to change is protected and therefore read-only.",n.Exp_RowReadOnly="The row you are trying to change is protected and therefore read-only.",n.Exp_CellReadOnly="The cell you are trying to change is protected and therefore read-only.",n.Exp_RangeIsNull="range is null",n.Exp_ChangePartOfArray="Cannot change part of an array."},"./dist/plugins/fill/utils.js":function(t,n,i){var r,e,o,u,s,a;function l(t){return t.rowViewportIndex}function f(t){return t.colViewportIndex}function c(t){return t.frozenRowCount()}function h(t){return t.frozenColumnCount()}function v(t){return t.hitTestType}function d(t,n){return t.getRowCount(n)}function g(t,n){return t.getColumnCount(n)}function p(t){return t.colCount}function w(t){return t.rowCount}function m(t){return t.height}function y(t){return t.width}function _(t){var n=7,i=t.parent;return i&&(n=i.SC>2007?2:7),n}function C(t,n,i,e,o,s,l){var f,c,h;t.save(),s=s||a,l=l||2,n===e?(t.rect(n-2,i,7,u(o-i)),t.clip(),t.beginPath(),i<o?(i-=3,o+=3):(i+=3,o-=3),f=(0,r.Zx)(n-1,i-1,e-1,o+1,s,l),c=(0,r.Zx)(n,i,e,o,s,l),h=(0,r.Zx)(n+1,i-1,e+1,o+1,s,l)):i===o&&(t.rect(n,i-2,u(e-n),7),t.clip(),t.beginPath(),n<e?(n-=3,e+=3):(n+=3,e-=3),f=(0,r.Zx)(n-1,i-1,e+1,o-1,s,l),c=(0,r.Zx)(n,i,e,o,s,l),h=(0,r.Zx)(n-1,i+1,e+1,o+1,s,l)),f&&f.qx(t),c&&c.qx(t),h&&h.qx(t),t.strokeStyle=s,t.stroke(),t.beginPath(),t.restore()}function D(t,n,i,r,e){var o,u,s;for(o=0;o<i.rowCount;o++){for(u=0;u<i.colCount;u++){if(!(s=t.getSpan(i.row+o,i.col+u))||s.rowCount!==n.rowCount||s.colCount!==n.colCount)return!1;r&&(u+=n.colCount)}e&&(o+=n.rowCount)}return!0}function F(t,n,i){var r,e=n.row,o=n.rowCount,u=n.col,s=n.colCount,a=i.row,l=i.rowCount,f=i.col,c=i.colCount,h=e===a&&o===l,v=u===f&&s===c;return!(!h&&!v)&&(!(!(r=t.getSpan(e,u))||!D(t,r,n,h,v))&&(!t.Ut.GT(a,f,l,c)&&D(t,r,i,h,v)))}function b(t){return t.x+t.width}function j(t){return t.y+t.height}function R(t,n){var i,r,e,o,u=t.rt.eD(),s=t.Yy(u);return s&&(i=s.findNearX(n,t.options.rightToLeft))?(r=t.Fi(),e=i.col,1===u&&n<r.Py&&e>(o=t.Sw())&&t.O5(e-1)||e):-1}function T(t,n){var i,r,e,o,u=t.rt.nD(),s=t._y(u);return s&&(i=s.findNearY(n,t.options.rightToLeft))?(r=t.Fi(),e=i.row,n<r.Cy&&e>(o=t.pw())&&t.j5(e-1)||e):-1}function M(t){t.dragHeaderToMoveInfo&&(t.dragHeaderToMoveInfo.dragColumn?t.rowViewportIndex<0&&(t.rowViewportIndex=0):t.colViewportIndex<0&&(t.colViewportIndex=0),t.hitTestType=3)}function k(t,n){if(!t&&!n)return e;if(!t&&n)return n;if(t&&!n)return t;var i=t.x,u=t.y,a=b(t),l=j(t);return i=o(i,n.x),u=o(u,n.y),a=s(a,b(n)),l=s(l,j(n)),new r.Rect(i,u,a-i,l-u)}function x(t){return t.frozenColumnCount()>=t.getColumnCount()?0:t.frozenTrailingColumnCount()>0?2:1}function I(t){return t.frozenRowCount()>=t.getRowCount()?0:t.frozenTrailingRowCount()>0?2:1}function O(t){var n=t.Fi(),i=t.options.rightToLeft,r=i?n.c9(0,2):n.c9(0,0),e=r.x,o=r.y,u=x(t),s=I(t),a=t.Dn.uO(s,u),l=b(a),f=j(a);return{minPoint:{x:e,y:o},maxPoint:{x:l,y:f}}}Object.defineProperty(n,"__esModule",{value:!0}),n.getSheetVPortBoundary=n.mergeRect=n.fixHitTestInfo=n.getHitRowIndex=n.getHitColumnIndex=n.getEndY=n.getEndX=n.canDragFillSpan=n.hasSameSpan=n.paintDragLine=n.getLineStyle=n.getWidth=n.getHeight=n.getRowCount=n.getColCount=n.getSheetColumnCount=n.getSheetRowCount=n.getHitTestType=n.getFrozenColumnCount=n.getFrozenRowCount=n.getColViewportIndex=n.getRowViewportIndex=void 0,r=i("Core"),e=null,o=Math.min,u=Math.abs,s=Math.max,a="black",n.getRowViewportIndex=l,n.getColViewportIndex=f,n.getFrozenRowCount=c,n.getFrozenColumnCount=h,n.getHitTestType=v,n.getSheetRowCount=d,n.getSheetColumnCount=g,n.getColCount=p,n.getRowCount=w,n.getHeight=m,n.getWidth=y,n.getLineStyle=_,n.paintDragLine=C,n.hasSameSpan=D,n.canDragFillSpan=F,n.getEndX=b,n.getEndY=j,n.getHitColumnIndex=R,n.getHitRowIndex=T,n.fixHitTestInfo=M,n.mergeRect=k,n.getSheetVPortBoundary=O},CalcEngine:function(n){n.exports=t.Spread.CalcEngine},Common:function(n){n.exports=t.Spread},Core:function(n){n.exports=t.Spread.Sheets},SheetsCalc:function(n){n.exports=t.Spread.Sheets.CalcEngine},Touch:function(n){n.exports=t.Spread.Sheets.Touch}},r={};function e(t){var n,o=r[t];return void 0!==o?o.exports:(n=r[t]={exports:{}},i[t].call(n.exports,n,n.exports,e),n.exports)}n=e("./dist/plugins/fill/fill.entry.js"),(((t=void 0===t?{}:t).Spread=t.Spread||{}).Sheets=t.Spread.Sheets||{}).Fill=n}()}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grapecity-software/spread-sheets-fill",
|
|
3
|
-
"version": "18.1
|
|
3
|
+
"version": "18.2.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description":"SpreadJS sheets fill module",
|
|
6
6
|
"scripts": {},
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"spreadjs"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@grapecity-software/spread-common": "18.1
|
|
20
|
-
"@grapecity-software/spread-calc-engine": "18.1
|
|
21
|
-
"@grapecity-software/spread-sheets-core": "18.1
|
|
22
|
-
"@grapecity-software/spread-sheets-calc-engine": "18.1
|
|
19
|
+
"@grapecity-software/spread-common": "18.2.1",
|
|
20
|
+
"@grapecity-software/spread-calc-engine": "18.2.1",
|
|
21
|
+
"@grapecity-software/spread-sheets-core": "18.2.1",
|
|
22
|
+
"@grapecity-software/spread-sheets-calc-engine": "18.2.1"
|
|
23
23
|
},
|
|
24
24
|
"author": {
|
|
25
25
|
"email": "info.xa@grapecity.com",
|